_ZNK5Botan7AES_1284nameEv:
   28|     70|      std::string name() const override { return "AES-128"; }
_ZNK5Botan7AES_2564nameEv:
  119|    126|      std::string name() const override { return "AES-256"; }

_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EED2Ev:
   64|  21.3k|      ~AlignmentBuffer() { secure_zeroize_buffer(m_buffer.data(), sizeof(T) * m_buffer.size()); }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EEC2Ev:
   62|  21.3k|      AlignmentBuffer() = default;
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE5clearEv:
   71|   106k|      void clear() {
   72|   106k|         zeroize_buffer(m_buffer.data(), m_buffer.size());
   73|   106k|         m_position = 0;
   74|   106k|      }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EEC2Ev:
   62|    817|      AlignmentBuffer() = default;
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE5clearEv:
   71|  8.02k|      void clear() {
   72|  8.02k|         zeroize_buffer(m_buffer.data(), m_buffer.size());
   73|  8.02k|         m_position = 0;
   74|  8.02k|      }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EED2Ev:
   64|    817|      ~AlignmentBuffer() { secure_zeroize_buffer(m_buffer.data(), sizeof(T) * m_buffer.size()); }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE21handle_unaligned_dataERNS_12BufferSlicerE:
  166|   155k|      [[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|   155k|         const size_t defer = (defers_final_block()) ? 1 : 0;
  ------------------
  |  Branch (170:31): [True: 0, False: 155k]
  ------------------
  171|       |
  172|   155k|         if(in_alignment() && slicer.remaining() >= m_buffer.size() + defer) {
  ------------------
  |  Branch (172:13): [True: 143k, False: 11.9k]
  |  Branch (172:31): [True: 54.9k, False: 88.9k]
  ------------------
  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|  54.9k|            return std::nullopt;
  177|  54.9k|         }
  178|       |
  179|       |         // Fill the buffer with as much input data as needed to reach alignment
  180|       |         // or until the input source is depleted.
  181|   100k|         const auto elements_to_consume = std::min(m_buffer.size() - m_position, slicer.remaining());
  182|   100k|         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|   100k|         if(ready_to_consume() && (!defers_final_block() || !slicer.empty())) {
  ------------------
  |  Branch (188:13): [True: 5.91k, False: 94.9k]
  |  Branch (188:36): [True: 5.91k, False: 0]
  |  Branch (188:61): [True: 0, False: 0]
  ------------------
  189|  5.91k|            return consume();
  190|  94.9k|         } else {
  191|  94.9k|            return std::nullopt;
  192|  94.9k|         }
  193|   100k|      }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE18defers_final_blockEv:
  233|   222k|      constexpr bool defers_final_block() const {
  234|   222k|         return FINAL_BLOCK_STRATEGY == AlignmentBufferFinalBlock::must_be_deferred;
  235|   222k|      }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE6appendENSt3__14spanIKhLm18446744073709551615EEE:
   90|   183k|      void append(std::span<const T> elements) {
   91|   183k|         BOTAN_ASSERT_NOMSG(elements.size() <= elements_until_alignment());
  ------------------
  |  |   84|   183k|   do {                                                                     \
  |  |   85|   183k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|   183k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 183k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|   183k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 183k]
  |  |  ------------------
  ------------------
   92|   183k|         std::copy(elements.begin(), elements.end(), m_buffer.begin() + m_position);
   93|   183k|         m_position += elements.size();
   94|   183k|      }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE24elements_until_alignmentEv:
  221|   458k|      size_t elements_until_alignment() const { return m_buffer.size() - m_position; }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE16ready_to_consumeEv:
  231|   408k|      bool ready_to_consume() const { return m_position == m_buffer.size(); }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE7consumeEv:
  200|   115k|      [[nodiscard]] std::span<const T> consume() {
  201|   115k|         BOTAN_ASSERT_NOMSG(ready_to_consume());
  ------------------
  |  |   84|   115k|   do {                                                                     \
  |  |   85|   115k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|   115k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 115k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|   115k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 115k]
  |  |  ------------------
  ------------------
  202|   115k|         m_position = 0;
  203|   115k|         return m_buffer;
  204|   115k|      }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE12in_alignmentEv:
  226|   372k|      bool in_alignment() const { return m_position == 0; }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE23aligned_data_to_processERNS_12BufferSlicerE:
  126|  60.8k|      [[nodiscard]] std::tuple<std::span<const uint8_t>, size_t> aligned_data_to_process(BufferSlicer& slicer) const {
  127|  60.8k|         BOTAN_ASSERT_NOMSG(in_alignment());
  ------------------
  |  |   84|  60.8k|   do {                                                                     \
  |  |   85|  60.8k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  60.8k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 60.8k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  60.8k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 60.8k]
  |  |  ------------------
  ------------------
  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|  60.8k|         const size_t defer = (defers_final_block()) ? 1 : 0;
  ------------------
  |  Branch (131:31): [True: 0, False: 60.8k]
  ------------------
  132|  60.8k|         const size_t full_blocks_to_process = (slicer.remaining() - defer) / m_buffer.size();
  133|  60.8k|         return {slicer.take(full_blocks_to_process * m_buffer.size()), full_blocks_to_process};
  134|  60.8k|      }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE18fill_up_with_zerosEv:
   79|   109k|      void fill_up_with_zeros() {
   80|   109k|         if(!ready_to_consume()) {
  ------------------
  |  Branch (80:13): [True: 109k, False: 7]
  ------------------
   81|   109k|            zeroize_buffer(&m_buffer[m_position], elements_until_alignment());
   82|   109k|            m_position = m_buffer.size();
   83|   109k|         }
   84|   109k|      }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE20directly_modify_lastEm:
  113|  82.9k|      std::span<T> directly_modify_last(size_t elements) {
  114|  82.9k|         BOTAN_ASSERT_NOMSG(size() >= elements);
  ------------------
  |  |   84|  82.9k|   do {                                                                     \
  |  |   85|  82.9k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  82.9k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 82.9k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  82.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 82.9k]
  |  |  ------------------
  ------------------
  115|  82.9k|         return std::span(m_buffer).last(elements);
  116|  82.9k|      }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE4sizeEv:
  217|  82.9k|      constexpr size_t size() const { return m_buffer.size(); }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE21handle_unaligned_dataERNS_12BufferSlicerE:
  166|  16.7k|      [[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|  16.7k|         const size_t defer = (defers_final_block()) ? 1 : 0;
  ------------------
  |  Branch (170:31): [True: 0, False: 16.7k]
  ------------------
  171|       |
  172|  16.7k|         if(in_alignment() && slicer.remaining() >= m_buffer.size() + defer) {
  ------------------
  |  Branch (172:13): [True: 13.7k, False: 3.03k]
  |  Branch (172:31): [True: 7.20k, False: 6.49k]
  ------------------
  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|  7.20k|            return std::nullopt;
  177|  7.20k|         }
  178|       |
  179|       |         // Fill the buffer with as much input data as needed to reach alignment
  180|       |         // or until the input source is depleted.
  181|  9.53k|         const auto elements_to_consume = std::min(m_buffer.size() - m_position, slicer.remaining());
  182|  9.53k|         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|  9.53k|         if(ready_to_consume() && (!defers_final_block() || !slicer.empty())) {
  ------------------
  |  Branch (188:13): [True: 25, False: 9.50k]
  |  Branch (188:36): [True: 25, False: 0]
  |  Branch (188:61): [True: 0, False: 0]
  ------------------
  189|     25|            return consume();
  190|  9.50k|         } else {
  191|  9.50k|            return std::nullopt;
  192|  9.50k|         }
  193|  9.53k|      }
_ZNK5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE18defers_final_blockEv:
  233|  23.9k|      constexpr bool defers_final_block() const {
  234|  23.9k|         return FINAL_BLOCK_STRATEGY == AlignmentBufferFinalBlock::must_be_deferred;
  235|  23.9k|      }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE6appendENSt3__14spanIKhLm18446744073709551615EEE:
   90|  15.9k|      void append(std::span<const T> elements) {
   91|  15.9k|         BOTAN_ASSERT_NOMSG(elements.size() <= elements_until_alignment());
  ------------------
  |  |   84|  15.9k|   do {                                                                     \
  |  |   85|  15.9k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  15.9k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 15.9k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  15.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 15.9k]
  |  |  ------------------
  ------------------
   92|  15.9k|         std::copy(elements.begin(), elements.end(), m_buffer.begin() + m_position);
   93|  15.9k|         m_position += elements.size();
   94|  15.9k|      }
_ZNK5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE24elements_until_alignmentEv:
  221|  36.8k|      size_t elements_until_alignment() const { return m_buffer.size() - m_position; }
_ZNK5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE16ready_to_consumeEv:
  231|  31.9k|      bool ready_to_consume() const { return m_position == m_buffer.size(); }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE7consumeEv:
  200|  7.99k|      [[nodiscard]] std::span<const T> consume() {
  201|  7.99k|         BOTAN_ASSERT_NOMSG(ready_to_consume());
  ------------------
  |  |   84|  7.99k|   do {                                                                     \
  |  |   85|  7.99k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  7.99k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 7.99k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  7.99k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 7.99k]
  |  |  ------------------
  ------------------
  202|  7.99k|         m_position = 0;
  203|  7.99k|         return m_buffer;
  204|  7.99k|      }
_ZNK5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE12in_alignmentEv:
  226|  40.7k|      bool in_alignment() const { return m_position == 0; }
_ZNK5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE23aligned_data_to_processERNS_12BufferSlicerE:
  126|  7.23k|      [[nodiscard]] std::tuple<std::span<const uint8_t>, size_t> aligned_data_to_process(BufferSlicer& slicer) const {
  127|  7.23k|         BOTAN_ASSERT_NOMSG(in_alignment());
  ------------------
  |  |   84|  7.23k|   do {                                                                     \
  |  |   85|  7.23k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  7.23k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 7.23k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  7.23k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 7.23k]
  |  |  ------------------
  ------------------
  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|  7.23k|         const size_t defer = (defers_final_block()) ? 1 : 0;
  ------------------
  |  Branch (131:31): [True: 0, False: 7.23k]
  ------------------
  132|  7.23k|         const size_t full_blocks_to_process = (slicer.remaining() - defer) / m_buffer.size();
  133|  7.23k|         return {slicer.take(full_blocks_to_process * m_buffer.size()), full_blocks_to_process};
  134|  7.23k|      }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE18fill_up_with_zerosEv:
   79|  7.96k|      void fill_up_with_zeros() {
   80|  7.96k|         if(!ready_to_consume()) {
  ------------------
  |  Branch (80:13): [True: 7.96k, False: 0]
  ------------------
   81|  7.96k|            zeroize_buffer(&m_buffer[m_position], elements_until_alignment());
   82|  7.96k|            m_position = m_buffer.size();
   83|  7.96k|         }
   84|  7.96k|      }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE20directly_modify_lastEm:
  113|  6.44k|      std::span<T> directly_modify_last(size_t elements) {
  114|  6.44k|         BOTAN_ASSERT_NOMSG(size() >= elements);
  ------------------
  |  |   84|  6.44k|   do {                                                                     \
  |  |   85|  6.44k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  6.44k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 6.44k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  6.44k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 6.44k]
  |  |  ------------------
  ------------------
  115|  6.44k|         return std::span(m_buffer).last(elements);
  116|  6.44k|      }
_ZNK5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE4sizeEv:
  217|  6.44k|      constexpr size_t size() const { return m_buffer.size(); }
_ZN5Botan15AlignmentBufferIhLm16ELNS_25AlignmentBufferFinalBlockE0EEC2Ev:
   62|    134|      AlignmentBuffer() = default;
_ZN5Botan15AlignmentBufferIhLm16ELNS_25AlignmentBufferFinalBlockE0EED2Ev:
   64|    134|      ~AlignmentBuffer() { secure_zeroize_buffer(m_buffer.data(), sizeof(T) * m_buffer.size()); }
_ZN5Botan15AlignmentBufferIhLm16ELNS_25AlignmentBufferFinalBlockE0EE5clearEv:
   71|    248|      void clear() {
   72|    248|         zeroize_buffer(m_buffer.data(), m_buffer.size());
   73|    248|         m_position = 0;
   74|    248|      }
_ZN5Botan15AlignmentBufferIhLm16ELNS_25AlignmentBufferFinalBlockE0EE21handle_unaligned_dataERNS_12BufferSlicerE:
  166|    294|      [[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|    294|         const size_t defer = (defers_final_block()) ? 1 : 0;
  ------------------
  |  Branch (170:31): [True: 0, False: 294]
  ------------------
  171|       |
  172|    294|         if(in_alignment() && slicer.remaining() >= m_buffer.size() + defer) {
  ------------------
  |  Branch (172:13): [True: 294, False: 0]
  |  Branch (172:31): [True: 93, False: 201]
  ------------------
  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|     93|            return std::nullopt;
  177|     93|         }
  178|       |
  179|       |         // Fill the buffer with as much input data as needed to reach alignment
  180|       |         // or until the input source is depleted.
  181|    201|         const auto elements_to_consume = std::min(m_buffer.size() - m_position, slicer.remaining());
  182|    201|         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|    201|         if(ready_to_consume() && (!defers_final_block() || !slicer.empty())) {
  ------------------
  |  Branch (188:13): [True: 0, False: 201]
  |  Branch (188:36): [True: 0, False: 0]
  |  Branch (188:61): [True: 0, False: 0]
  ------------------
  189|      0|            return consume();
  190|    201|         } else {
  191|    201|            return std::nullopt;
  192|    201|         }
  193|    201|      }
_ZNK5Botan15AlignmentBufferIhLm16ELNS_25AlignmentBufferFinalBlockE0EE18defers_final_blockEv:
  233|    387|      constexpr bool defers_final_block() const {
  234|    387|         return FINAL_BLOCK_STRATEGY == AlignmentBufferFinalBlock::must_be_deferred;
  235|    387|      }
_ZNK5Botan15AlignmentBufferIhLm16ELNS_25AlignmentBufferFinalBlockE0EE16ready_to_consumeEv:
  231|    603|      bool ready_to_consume() const { return m_position == m_buffer.size(); }
_ZNK5Botan15AlignmentBufferIhLm16ELNS_25AlignmentBufferFinalBlockE0EE12in_alignmentEv:
  226|  1.02k|      bool in_alignment() const { return m_position == 0; }
_ZNK5Botan15AlignmentBufferIhLm16ELNS_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());
  ------------------
  |  |   84|     93|   do {                                                                     \
  |  |   85|     93|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     93|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 93]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     93|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90: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|      }
_ZN5Botan15AlignmentBufferIhLm16ELNS_25AlignmentBufferFinalBlockE0EE6appendENSt3__14spanIKhLm18446744073709551615EEE:
   90|    201|      void append(std::span<const T> elements) {
   91|    201|         BOTAN_ASSERT_NOMSG(elements.size() <= elements_until_alignment());
  ------------------
  |  |   84|    201|   do {                                                                     \
  |  |   85|    201|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    201|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 201]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    201|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 201]
  |  |  ------------------
  ------------------
   92|    201|         std::copy(elements.begin(), elements.end(), m_buffer.begin() + m_position);
   93|    201|         m_position += elements.size();
   94|    201|      }
_ZNK5Botan15AlignmentBufferIhLm16ELNS_25AlignmentBufferFinalBlockE0EE24elements_until_alignmentEv:
  221|    402|      size_t elements_until_alignment() const { return m_buffer.size() - m_position; }
_ZN5Botan15AlignmentBufferIhLm16ELNS_25AlignmentBufferFinalBlockE0EE18fill_up_with_zerosEv:
   79|    201|      void fill_up_with_zeros() {
   80|    201|         if(!ready_to_consume()) {
  ------------------
  |  Branch (80:13): [True: 201, False: 0]
  ------------------
   81|    201|            zeroize_buffer(&m_buffer[m_position], elements_until_alignment());
   82|    201|            m_position = m_buffer.size();
   83|    201|         }
   84|    201|      }
_ZN5Botan15AlignmentBufferIhLm16ELNS_25AlignmentBufferFinalBlockE0EE7consumeEv:
  200|    201|      [[nodiscard]] std::span<const T> consume() {
  201|    201|         BOTAN_ASSERT_NOMSG(ready_to_consume());
  ------------------
  |  |   84|    201|   do {                                                                     \
  |  |   85|    201|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    201|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 201]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    201|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 201]
  |  |  ------------------
  ------------------
  202|    201|         m_position = 0;
  203|    201|         return m_buffer;
  204|    201|      }

_ZNK5Botan8ARIA_1284nameEv:
   34|      8|      std::string name() const override { return "ARIA-128"; }
_ZNK5Botan8ARIA_2564nameEv:
  104|     10|      std::string name() const override { return "ARIA-256"; }

_ZNK5Botan17Barrett_Reduction4cubeERKNS_6BigIntE:
   66|      6|      BigInt cube(const BigInt& x) const { return this->multiply(x, this->square(x)); }

_ZN5Botan10ct_is_zeroITkNSt3__117unsigned_integralEhEET_S2_:
   37|  2.56k|BOTAN_FORCE_INLINE constexpr T ct_is_zero(T x) {
   38|  2.56k|   return ct_expand_top_bit<T>(~x & (x - 1));
   39|  2.56k|}
_ZN5Botan17ct_expand_top_bitITkNSt3__117unsigned_integralEhEET_S2_:
   28|  2.56k|BOTAN_FORCE_INLINE constexpr T ct_expand_top_bit(T a) {
   29|  2.56k|   const T top = CT::value_barrier<T>(a >> (sizeof(T) * 8 - 1));
   30|  2.56k|   return static_cast<T>(0) - top;
   31|  2.56k|}
_ZN5Botan9var_ctz64Em:
  180|    803|BOTAN_FORCE_INLINE constexpr size_t var_ctz64(uint64_t n) {
  181|    803|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_ctzll)
  182|    803|   if(n == 0) {
  ------------------
  |  Branch (182:7): [True: 0, False: 803]
  ------------------
  183|      0|      return 64;
  184|      0|   }
  185|    803|   return __builtin_ctzll(n);
  186|       |#else
  187|       |   return ctz<uint64_t>(n);
  188|       |#endif
  189|    803|}
_ZN5Botan17ct_expand_top_bitITkNSt3__117unsigned_integralEmEET_S2_:
   28|  33.1M|BOTAN_FORCE_INLINE constexpr T ct_expand_top_bit(T a) {
   29|  33.1M|   const T top = CT::value_barrier<T>(a >> (sizeof(T) * 8 - 1));
   30|  33.1M|   return static_cast<T>(0) - top;
   31|  33.1M|}
_ZN5Botan10ct_is_zeroITkNSt3__117unsigned_integralEmEET_S2_:
   37|  32.6M|BOTAN_FORCE_INLINE constexpr T ct_is_zero(T x) {
   38|  32.6M|   return ct_expand_top_bit<T>(~x & (x - 1));
   39|  32.6M|}
_ZN5Botan6chooseITkNSt3__117unsigned_integralEmEET_S2_S2_S2_:
  216|   184M|BOTAN_FORCE_INLINE constexpr T choose(T mask, T a, T b) {
  217|       |   //return (mask & a) | (~mask & b);
  218|   184M|   return (b ^ (mask & (a ^ b)));
  219|   184M|}
_ZN5Botan8high_bitITkNSt3__117unsigned_integralEjEEmT_:
   73|  61.0k|BOTAN_FORCE_INLINE constexpr size_t high_bit(T n) {
   74|  61.0k|   size_t hb = 0;
   75|       |
   76|   366k|   for(size_t s = 8 * sizeof(T) / 2; s > 0; s /= 2) {
  ------------------
  |  Branch (76:38): [True: 305k, False: 61.0k]
  ------------------
   77|       |      // Equivalent to: ((n >> s) == 0) ? 0 : s;
   78|   305k|      const size_t z = s - ct_if_is_zero_ret<T>(n >> s, s);
   79|   305k|      hb += z;
   80|   305k|      n >>= z;
   81|   305k|   }
   82|       |
   83|  61.0k|   hb += static_cast<size_t>(n);
   84|       |
   85|  61.0k|   return hb;
   86|  61.0k|}
_ZN5Botan17ct_if_is_zero_retITkNSt3__117unsigned_integralEjEEmT_m:
   45|   305k|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|   305k|   const T a = ~x & (x - 1);
   51|   305k|   const size_t a_top = static_cast<size_t>(CT::value_barrier<T>(a >> (sizeof(T) * 8 - 1)));
   52|   305k|   const size_t mask = static_cast<size_t>(0) - a_top;
   53|   305k|   return mask & s;
   54|   305k|}
_ZN5Botan17significant_bytesITkNSt3__117unsigned_integralEmEEmT_:
   94|  12.9k|BOTAN_FORCE_INLINE constexpr size_t significant_bytes(T n) {
   95|  12.9k|   size_t b = 0;
   96|       |
   97|  51.9k|   for(size_t s = 8 * sizeof(T) / 2; s >= 8; s /= 2) {
  ------------------
  |  Branch (97:38): [True: 38.9k, False: 12.9k]
  ------------------
   98|       |      // Equivalent to: ((n >> s) == 0) ? 0 : s;
   99|  38.9k|      const size_t z = s - ct_if_is_zero_ret<T>(n >> s, s);
  100|  38.9k|      b += z / 8;
  101|  38.9k|      n >>= z;
  102|  38.9k|   }
  103|       |
  104|  12.9k|   b += (n != 0);
  105|       |
  106|  12.9k|   return b;
  107|  12.9k|}
_ZN5Botan17ct_if_is_zero_retITkNSt3__117unsigned_integralEmEEmT_m:
   45|   338k|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|   338k|   const T a = ~x & (x - 1);
   51|   338k|   const size_t a_top = static_cast<size_t>(CT::value_barrier<T>(a >> (sizeof(T) * 8 - 1)));
   52|   338k|   const size_t mask = static_cast<size_t>(0) - a_top;
   53|   338k|   return mask & s;
   54|   338k|}
_ZN5Botan9swap_bitsITkNSt3__117unsigned_integralEmEEvRT_S3_S2_m:
  202|  83.0k|BOTAN_FORCE_INLINE constexpr void swap_bits(T& x, T& y, T mask, size_t shift) {
  203|  83.0k|   const T swap = ((x >> shift) ^ y) & mask;
  204|  83.0k|   x ^= swap << shift;
  205|  83.0k|   y ^= swap;
  206|  83.0k|}
_ZN5Botan13is_power_of_2ITkNSt3__117unsigned_integralEmEEbT_:
   62|    382|BOTAN_FORCE_INLINE constexpr bool is_power_of_2(T arg) {
   63|    382|   return (arg != 0) && (arg != 1) && ((arg & static_cast<T>(arg - 1)) == 0);
  ------------------
  |  Branch (63:11): [True: 382, False: 0]
  |  Branch (63:25): [True: 382, False: 0]
  |  Branch (63:39): [True: 382, False: 0]
  ------------------
   64|    382|}
_ZN5Botan8majorityITkNSt3__117unsigned_integralEmEET_S2_S2_S2_:
  222|  1.28M|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|  1.28M|   return choose(a ^ b, c, b);
  233|  1.28M|}
_ZN5Botan8high_bitITkNSt3__117unsigned_integralEmEEmT_:
   73|  49.9k|BOTAN_FORCE_INLINE constexpr size_t high_bit(T n) {
   74|  49.9k|   size_t hb = 0;
   75|       |
   76|   349k|   for(size_t s = 8 * sizeof(T) / 2; s > 0; s /= 2) {
  ------------------
  |  Branch (76:38): [True: 299k, False: 49.9k]
  ------------------
   77|       |      // Equivalent to: ((n >> s) == 0) ? 0 : s;
   78|   299k|      const size_t z = s - ct_if_is_zero_ret<T>(n >> s, s);
   79|   299k|      hb += z;
   80|   299k|      n >>= z;
   81|   299k|   }
   82|       |
   83|  49.9k|   hb += static_cast<size_t>(n);
   84|       |
   85|  49.9k|   return hb;
   86|  49.9k|}
_ZN5Botan6chooseITkNSt3__117unsigned_integralEhEET_S2_S2_S2_:
  216|  1.07k|BOTAN_FORCE_INLINE constexpr T choose(T mask, T a, T b) {
  217|       |   //return (mask & a) | (~mask & b);
  218|  1.07k|   return (b ^ (mask & (a ^ b)));
  219|  1.07k|}
_ZN5Botan17ct_expand_top_bitITkNSt3__117unsigned_integralEtEET_S2_:
   28|  47.3k|BOTAN_FORCE_INLINE constexpr T ct_expand_top_bit(T a) {
   29|  47.3k|   const T top = CT::value_barrier<T>(a >> (sizeof(T) * 8 - 1));
   30|  47.3k|   return static_cast<T>(0) - top;
   31|  47.3k|}
_ZN5Botan10ct_is_zeroITkNSt3__117unsigned_integralEtEET_S2_:
   37|  23.7k|BOTAN_FORCE_INLINE constexpr T ct_is_zero(T x) {
   38|  23.7k|   return ct_expand_top_bit<T>(~x & (x - 1));
   39|  23.7k|}

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

_ZN5Botan12BufferSlicerC2ENSt3__14spanIKhLm18446744073709551615EEE:
   25|   271k|      explicit BufferSlicer(std::span<const uint8_t> buffer) : m_remaining(buffer) {}
_ZN5Botan12BufferSlicer4takeEm:
   37|   696k|      std::span<const uint8_t> take(const size_t count) {
   38|   696k|         BOTAN_STATE_CHECK(remaining() >= count);
  ------------------
  |  |   51|   696k|   do {                                                         \
  |  |   52|   696k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|   696k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 696k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|   696k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 696k]
  |  |  ------------------
  ------------------
   39|   696k|         auto result = m_remaining.first(count);
   40|   696k|         m_remaining = m_remaining.subspan(count);
   41|   696k|         return result;
   42|   696k|      }
_ZNK5Botan12BufferSlicer9remainingEv:
   66|  1.13M|      size_t remaining() const { return m_remaining.size(); }
_ZN5Botan12BufferSlicer9take_byteEv:
   57|   446k|      uint8_t take_byte() { return take(1)[0]; }
_ZN5Botan12BufferSlicer9copy_intoENSt3__14spanIhLm18446744073709551615EEE:
   59|  36.0k|      void copy_into(std::span<uint8_t> sink) {
   60|  36.0k|         const auto data = take(sink.size());
   61|  36.0k|         std::copy(data.begin(), data.end(), sink.begin());
   62|  36.0k|      }
_ZNK5Botan12BufferSlicer5emptyEv:
   68|  1.23M|      bool empty() const { return m_remaining.empty(); }

_ZN5Botan13BufferStufferC2ENSt3__14spanIhLm18446744073709551615EEE:
   26|  18.6k|      constexpr explicit BufferStuffer(std::span<uint8_t> buffer) : m_buffer(buffer) {}
_ZN5Botan13BufferStuffer4nextEm:
   32|  22.9k|      constexpr std::span<uint8_t> next(size_t bytes) {
   33|  22.9k|         BOTAN_STATE_CHECK(m_buffer.size() >= bytes);
  ------------------
  |  |   51|  22.9k|   do {                                                         \
  |  |   52|  22.9k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  22.9k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 22.9k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  22.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 22.9k]
  |  |  ------------------
  ------------------
   34|       |
   35|  22.9k|         auto result = m_buffer.first(bytes);
   36|  22.9k|         m_buffer = m_buffer.subspan(bytes);
   37|  22.9k|         return result;
   38|  22.9k|      }
_ZN5Botan13BufferStuffer6appendENSt3__14spanIKhLm18446744073709551615EEE:
   59|  7.30k|      constexpr void append(std::span<const uint8_t> buffer) {
   60|  7.30k|         const size_t len = buffer.size();
   61|  7.30k|         auto sink = next(len);
   62|   220k|         for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (62:28): [True: 212k, False: 7.30k]
  ------------------
   63|   212k|            sink[i] = buffer[i];
   64|   212k|         }
   65|  7.30k|      }
_ZN5Botan13BufferStuffer6appendEhm:
   67|  15.5k|      constexpr void append(uint8_t val, size_t repeat = 1) {
   68|  15.5k|         for(auto& b : next(repeat)) {
  ------------------
  |  Branch (68:22): [True: 15.5k, False: 15.5k]
  ------------------
   69|  15.5k|            b = val;
   70|  15.5k|         }
   71|  15.5k|      }
_ZNK5Botan13BufferStuffer4fullEv:
   73|  10.4k|      constexpr bool full() const { return m_buffer.empty(); }
_ZNK5Botan13BufferStuffer18remaining_capacityEv:
   75|  7.30k|      constexpr size_t remaining_capacity() const { return m_buffer.size(); }
_ZN5Botan13BufferStuffer4nextILm32EEENSt3__14spanIhXT_EEEv:
   41|  21.1k|      constexpr std::span<uint8_t, bytes> next() {
   42|  21.1k|         BOTAN_STATE_CHECK(m_buffer.size() >= bytes);
  ------------------
  |  |   51|  21.1k|   do {                                                         \
  |  |   52|  21.1k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  21.1k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 21.1k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  21.1k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 21.1k]
  |  |  ------------------
  ------------------
   43|       |
   44|  21.1k|         auto result = m_buffer.first<bytes>();
   45|  21.1k|         m_buffer = m_buffer.subspan(bytes);
   46|  21.1k|         return result;
   47|  21.1k|      }
_ZN5Botan13BufferStuffer4nextILm48EEENSt3__14spanIhXT_EEEv:
   41|  4.03k|      constexpr std::span<uint8_t, bytes> next() {
   42|  4.03k|         BOTAN_STATE_CHECK(m_buffer.size() >= bytes);
  ------------------
  |  |   51|  4.03k|   do {                                                         \
  |  |   52|  4.03k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  4.03k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 4.03k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  4.03k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 4.03k]
  |  |  ------------------
  ------------------
   43|       |
   44|  4.03k|         auto result = m_buffer.first<bytes>();
   45|  4.03k|         m_buffer = m_buffer.subspan(bytes);
   46|  4.03k|         return result;
   47|  4.03k|      }
_ZN5Botan13BufferStuffer4nextILm64EEENSt3__14spanIhXT_EEEv:
   41|  2.41k|      constexpr std::span<uint8_t, bytes> next() {
   42|  2.41k|         BOTAN_STATE_CHECK(m_buffer.size() >= bytes);
  ------------------
  |  |   51|  2.41k|   do {                                                         \
  |  |   52|  2.41k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  2.41k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 2.41k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  2.41k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 2.41k]
  |  |  ------------------
  ------------------
   43|       |
   44|  2.41k|         auto result = m_buffer.first<bytes>();
   45|  2.41k|         m_buffer = m_buffer.subspan(bytes);
   46|  2.41k|         return result;
   47|  2.41k|      }
_ZN5Botan13BufferStuffer4nextILm66EEENSt3__14spanIhXT_EEEv:
   41|  3.49k|      constexpr std::span<uint8_t, bytes> next() {
   42|  3.49k|         BOTAN_STATE_CHECK(m_buffer.size() >= bytes);
  ------------------
  |  |   51|  3.49k|   do {                                                         \
  |  |   52|  3.49k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  3.49k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 3.49k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  3.49k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 3.49k]
  |  |  ------------------
  ------------------
   43|       |
   44|  3.49k|         auto result = m_buffer.first<bytes>();
   45|  3.49k|         m_buffer = m_buffer.subspan(bytes);
   46|  3.49k|         return result;
   47|  3.49k|      }

_ZNK5Botan12Camellia_1284nameEv:
   26|     16|      std::string name() const override { return "Camellia-128"; }
_ZNK5Botan12Camellia_2564nameEv:
  106|     25|      std::string name() const override { return "Camellia-256"; }

_ZN5Botan14CBC_EncryptionC2ENSt3__110unique_ptrINS_11BlockCipherENS1_14default_deleteIS3_EEEENS2_INS_28BlockCipherModePaddingMethodENS4_IS7_EEEE:
   79|     50|            CBC_Mode(std::move(cipher), std::move(padding)) {}
_ZN5Botan14CBC_DecryptionC2ENSt3__110unique_ptrINS_11BlockCipherENS1_14default_deleteIS3_EEEENS2_INS_28BlockCipherModePaddingMethodENS4_IS7_EEEE:
  120|    157|            CBC_Mode(std::move(cipher), std::move(padding)), m_tempbuf(ideal_granularity()) {}
_ZNK5Botan8CBC_Mode6cipherEv:
   45|  1.11k|      const BlockCipher& cipher() const { return *m_cipher; }
_ZNK5Botan8CBC_Mode10block_sizeEv:
   52|    384|      size_t block_size() const { return m_block_size; }
_ZN5Botan8CBC_Mode5stateEv:
   54|    277|      secure_vector<uint8_t>& state() { return m_state; }
_ZN5Botan8CBC_Mode9state_ptrEv:
   56|    947|      uint8_t* state_ptr() { return m_state.data(); }

_ZN5Botan14CCM_EncryptionC2ENSt3__110unique_ptrINS_11BlockCipherENS1_14default_deleteIS3_EEEEmm:
   94|      3|            CCM_Mode(std::move(cipher), tag_size, L) {}
_ZN5Botan14CCM_DecryptionC2ENSt3__110unique_ptrINS_11BlockCipherENS1_14default_deleteIS3_EEEEmm:
  117|     43|            CCM_Mode(std::move(cipher), tag_size, L) {}
_ZNK5Botan8CCM_Mode8tag_sizeEv:
   46|    340|      size_t tag_size() const final { return m_tag_size; }
_ZNK5Botan8CCM_Mode1LEv:
   53|    246|      size_t L() const { return m_L; }
_ZNK5Botan8CCM_Mode6cipherEv:
   55|     41|      const BlockCipher& cipher() const { return *m_cipher; }
_ZNK5Botan8CCM_Mode6ad_bufEv:
   61|     41|      const secure_vector<uint8_t>& ad_buf() const { return m_ad_buf; }
_ZN5Botan8CCM_Mode7msg_bufEv:
   63|     82|      secure_vector<uint8_t>& msg_buf() { return m_msg_buf; }
_ZNK5Botan14CCM_Decryption18minimum_final_sizeEv:
  121|     37|      size_t minimum_final_size() const override { return tag_size(); }

base64.cpp:_ZN5Botan11base_decodeINS_12_GLOBAL__N_16Base64EEEmRKT_PhPKcmRmbb:
  124|  12.9k|                   bool ignore_ws = true) {
  125|       |   // TODO(Botan4) Check if we can use just base. or Base:: here instead
  126|  12.9k|   constexpr size_t decoding_bytes_in = std::remove_reference_t<Base>::decoding_bytes_in();
  127|  12.9k|   constexpr size_t decoding_bytes_out = std::remove_reference_t<Base>::decoding_bytes_out();
  128|       |
  129|  12.9k|   input_consumed = 0;
  130|       |
  131|  12.9k|   uint8_t* out_ptr = output;
  132|  12.9k|   std::array<uint8_t, decoding_bytes_in> decode_buf{};
  133|  12.9k|   size_t decode_buf_pos = 0;
  134|  12.9k|   size_t final_truncate = 0;
  135|  12.9k|   bool seen_padding = false;
  136|       |
  137|  12.9k|   clear_mem(output, base.decode_max_output(input_length));
  138|       |
  139|  5.38M|   for(size_t i = 0; i != input_length; ++i) {
  ------------------
  |  Branch (139:22): [True: 5.36M, False: 12.9k]
  ------------------
  140|  5.36M|      const uint8_t bin = base.lookup_binary_value(input[i]);
  141|       |
  142|       |      // This call might throw Invalid_Argument
  143|  5.36M|      if(base.check_bad_char(bin, input[i], ignore_ws)) {
  ------------------
  |  Branch (143:10): [True: 5.36M, False: 0]
  ------------------
  144|       |         // Padding may only appear at the end, so a data symbol must never
  145|       |         // follow one (0x81 marks a padding character)
  146|  5.36M|         if(seen_padding) {
  ------------------
  |  Branch (146:13): [True: 0, False: 5.36M]
  ------------------
  147|      0|            throw Invalid_Argument(base.name() + " decoding failed, data follows padding");
  148|      0|         }
  149|  5.36M|         decode_buf[decode_buf_pos] = bin;
  150|  5.36M|         ++decode_buf_pos;
  151|  5.36M|      } else if(bin == 0x81) {
  ------------------
  |  Branch (151:17): [True: 0, False: 0]
  ------------------
  152|      0|         seen_padding = true;
  153|      0|      }
  154|       |
  155|       |      /*
  156|       |      * If we're at the end of the input, pad with 0s and truncate
  157|       |      */
  158|  5.36M|      if(final_inputs && (i == input_length - 1)) {
  ------------------
  |  Branch (158:10): [True: 5.36M, False: 0]
  |  Branch (158:26): [True: 12.9k, False: 5.35M]
  ------------------
  159|  12.9k|         if(decode_buf_pos) {
  ------------------
  |  Branch (159:13): [True: 12.9k, False: 0]
  ------------------
  160|  12.9k|            const size_t bits_per_symbol = base.bits_consumed();
  161|  12.9k|            const size_t pad_bits = (decode_buf_pos * bits_per_symbol) % 8;
  162|       |
  163|       |            // A trailing symbol contributing only pad bits cannot occur in a
  164|       |            // valid encoding; RFC 4648 4 and 6 enumerate the reachable cases
  165|  12.9k|            if(pad_bits >= bits_per_symbol) {
  ------------------
  |  Branch (165:16): [True: 0, False: 12.9k]
  ------------------
  166|      0|               throw Invalid_Argument(base.name() + " decoding failed, invalid length");
  167|      0|            }
  168|       |
  169|       |            // RFC 4648 3.5: "decoders MAY chose to reject an encoding if the
  170|       |            // pad bits have not been set to zero"
  171|  12.9k|            const uint8_t pad_mask = static_cast<uint8_t>((1U << pad_bits) - 1);
  172|  12.9k|            if(decode_buf[decode_buf_pos - 1] & pad_mask) {
  ------------------
  |  Branch (172:16): [True: 0, False: 12.9k]
  ------------------
  173|      0|               throw Invalid_Argument(base.name() + " decoding failed, nonzero padding bits");
  174|      0|            }
  175|       |
  176|  12.9k|            for(size_t j = decode_buf_pos; j < decoding_bytes_in; ++j) {
  ------------------
  |  Branch (176:44): [True: 0, False: 12.9k]
  ------------------
  177|      0|               decode_buf[j] = 0;
  178|      0|            }
  179|       |
  180|  12.9k|            final_truncate = decoding_bytes_in - decode_buf_pos;
  181|  12.9k|            decode_buf_pos = decoding_bytes_in;
  182|  12.9k|         }
  183|  12.9k|      }
  184|       |
  185|  5.36M|      if(decode_buf_pos == decoding_bytes_in) {
  ------------------
  |  Branch (185:10): [True: 1.34M, False: 4.02M]
  ------------------
  186|  1.34M|         base.decode(out_ptr, decode_buf.data());
  187|       |
  188|  1.34M|         out_ptr += decoding_bytes_out;
  189|  1.34M|         decode_buf_pos = 0;
  190|  1.34M|         input_consumed = i + 1;
  191|  1.34M|      }
  192|  5.36M|   }
  193|       |
  194|  12.9k|   while(input_consumed < input_length && base.lookup_binary_value(input[input_consumed]) == 0x80) {
  ------------------
  |  Branch (194:10): [True: 0, False: 12.9k]
  |  Branch (194:43): [True: 0, False: 0]
  ------------------
  195|      0|      ++input_consumed;
  196|      0|   }
  197|       |
  198|  12.9k|   const size_t written = (out_ptr - output) - base.bytes_to_remove(final_truncate);
  199|       |
  200|  12.9k|   return written;
  201|  12.9k|}
base64.cpp:_ZN5Botan16base_decode_fullINS_12_GLOBAL__N_16Base64EEEmRKT_PhPKcmb:
  204|  12.9k|size_t base_decode_full(const Base& base, uint8_t output[], const char input[], size_t input_length, bool ignore_ws) {
  205|  12.9k|   size_t consumed = 0;
  206|  12.9k|   const size_t written = base_decode(base, output, input, input_length, consumed, true, ignore_ws);
  207|       |
  208|  12.9k|   if(consumed != input_length) {
  ------------------
  |  Branch (208:7): [True: 0, False: 12.9k]
  ------------------
  209|      0|      throw Invalid_Argument(base.name() + " decoding failed, input did not have full bytes");
  210|      0|   }
  211|       |
  212|  12.9k|   return written;
  213|  12.9k|}
base64.cpp:_ZN5Botan18base_decode_to_vecINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_12_GLOBAL__N_16Base64EEET_RKT0_PKcmb:
  216|  12.9k|Vector base_decode_to_vec(const Base& base, const char input[], size_t input_length, bool ignore_ws) {
  217|  12.9k|   const size_t output_length = base.decode_max_output(input_length);
  218|  12.9k|   Vector bin(output_length);
  219|       |
  220|  12.9k|   const size_t written = base_decode_full(base, bin.data(), input, input_length, ignore_ws);
  221|       |
  222|  12.9k|   bin.resize(written);
  223|  12.9k|   return bin;
  224|  12.9k|}

_ZN5Botan6concatINSt3__16vectorIhNS_16secure_allocatorIhEEEETpTkNS_6ranges14spanable_rangeEJRNS1_4spanIKhLm18446744073709551615EEESA_EEEDaDpOT0_Q10all_same_vIDpNS1_11conditionalIXsr21__is_primary_templateINS1_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS1_6ranges5__cpo5beginEEclsr3stdE7declvalIRSB_EEEEEEEEE5valueENS1_26indirectly_readable_traitsISK_EESL_E4type10value_typeEE:
   92|  3.10k|{
   93|       |   if constexpr(std::same_as<detail::AutoDetect, OutR>) {
   94|       |      // Try to auto-detect a reasonable output type given the input ranges
   95|       |      static_assert(sizeof...(Rs) > 0, "Cannot auto-detect the output type if not a single input range is provided.");
   96|       |      using candidate_result_t = std::remove_cvref_t<std::tuple_element_t<0, std::tuple<Rs...>>>;
   97|       |      using result_range_value_t = std::remove_cvref_t<std::ranges::range_value_t<candidate_result_t>>;
   98|       |
   99|       |      if constexpr((ranges::statically_spanable_range<Rs> && ...)) {
  100|       |         // If all input ranges have a static extent, we can calculate the total size at compile time
  101|       |         // and therefore can use a statically sized output container. This is constexpr.
  102|       |         constexpr size_t total_size = (decltype(std::span{ranges})::extent + ... + 0);
  103|       |         using out_array_t = std::array<result_range_value_t, total_size>;
  104|       |         return detail::concatenate<out_array_t>(std::forward<Rs>(ranges)...);
  105|       |      } else {
  106|       |         // If at least one input range has a dynamic extent, we must use a dynamically allocated output container.
  107|       |         // We assume that the user wants to use the first input range's container type as output type.
  108|       |         static_assert(
  109|       |            concepts::reservable_container<candidate_result_t>,
  110|       |            "First input range has static extent, but a dynamically allocated output range is required. Please explicitly specify a dynamically allocatable output type.");
  111|       |         return detail::concatenate<candidate_result_t>(std::forward<Rs>(ranges)...);
  112|       |      }
  113|  3.10k|   } else {
  114|       |      // The caller has explicitly specified the output type
  115|  3.10k|      return detail::concatenate<OutR>(std::forward<Rs>(ranges)...);
  116|  3.10k|   }
  117|  3.10k|}
_ZN5Botan6detail11concatenateITkNS_6ranges14spanable_rangeENSt3__16vectorIhNS_16secure_allocatorIhEEEETpTkNS2_14spanable_rangeEJRNS3_4spanIKhLm18446744073709551615EEESB_EEET_DpOT0_Qoosr8conceptsE20reservable_containerISC_Esr6rangesE25statically_spanable_rangeISC_E:
   33|  3.10k|{
   34|  3.10k|   OutR result{};
   35|       |
   36|       |   // Prepare and validate the output range and construct a lambda that does the
   37|       |   // actual filling of the result buffer.
   38|       |   // (if no input ranges are given, GCC claims that fill_fn is unused)
   39|  3.10k|   [[maybe_unused]] auto fill_fn = [&] {
   40|  3.10k|      if constexpr(concepts::reservable_container<OutR>) {
   41|       |         // dynamically allocate the correct result byte length
   42|  3.10k|         const size_t total_size = (ranges.size() + ... + 0);
   43|  3.10k|         result.reserve(total_size);
   44|       |
   45|       |         // fill the result buffer using a back-inserter
   46|  3.10k|         return [&result](auto&& range) {
   47|  3.10k|            std::copy(
   48|  3.10k|               std::ranges::begin(range), std::ranges::end(range), std::back_inserter(unwrap_strong_type(result)));
   49|  3.10k|         };
   50|  3.10k|      } else {
   51|  3.10k|         if constexpr((ranges::statically_spanable_range<Rs> && ... && true)) {
   52|       |            // all input ranges have a static extent, so check the total size at compile time
   53|       |            // (work around an issue in MSVC that warns `total_size` is unused)
   54|  3.10k|            [[maybe_unused]] constexpr size_t total_size = (decltype(std::span{ranges})::extent + ... + 0);
   55|  3.10k|            static_assert(result.size() == total_size, "size of result buffer does not match the sum of input buffers");
   56|  3.10k|         } else {
   57|       |            // at least one input range has a dynamic extent, so check the total size at runtime
   58|  3.10k|            const size_t total_size = (ranges.size() + ... + 0);
   59|  3.10k|            BOTAN_ARG_CHECK(result.size() == total_size,
   60|  3.10k|                            "result buffer has static extent that does not match the sum of input buffers");
   61|  3.10k|         }
   62|       |
   63|       |         // fill the result buffer and hold the current output-iterator position
   64|  3.10k|         return [itr = std::ranges::begin(result)](auto&& range) mutable {
   65|  3.10k|            std::copy(std::ranges::begin(range), std::ranges::end(range), itr);
   66|  3.10k|            std::advance(itr, std::ranges::size(range));
   67|  3.10k|         };
   68|  3.10k|      }
   69|  3.10k|   }();
   70|       |
   71|       |   // perform the actual concatenation
   72|  3.10k|   (fill_fn(std::forward<Rs>(ranges)), ...);
   73|       |
   74|  3.10k|   return result;
   75|  3.10k|}
_ZZN5Botan6detail11concatenateITkNS_6ranges14spanable_rangeENSt3__16vectorIhNS_16secure_allocatorIhEEEETpTkNS2_14spanable_rangeEJRNS3_4spanIKhLm18446744073709551615EEESB_EEET_DpOT0_Qoosr8conceptsE20reservable_containerISC_Esr6rangesE25statically_spanable_rangeISC_EENKUlvE_clEv:
   39|  3.10k|   [[maybe_unused]] auto fill_fn = [&] {
   40|  3.10k|      if constexpr(concepts::reservable_container<OutR>) {
   41|       |         // dynamically allocate the correct result byte length
   42|  3.10k|         const size_t total_size = (ranges.size() + ... + 0);
   43|  3.10k|         result.reserve(total_size);
   44|       |
   45|       |         // fill the result buffer using a back-inserter
   46|  3.10k|         return [&result](auto&& range) {
   47|  3.10k|            std::copy(
   48|  3.10k|               std::ranges::begin(range), std::ranges::end(range), std::back_inserter(unwrap_strong_type(result)));
   49|  3.10k|         };
   50|       |      } else {
   51|       |         if constexpr((ranges::statically_spanable_range<Rs> && ... && true)) {
   52|       |            // all input ranges have a static extent, so check the total size at compile time
   53|       |            // (work around an issue in MSVC that warns `total_size` is unused)
   54|       |            [[maybe_unused]] constexpr size_t total_size = (decltype(std::span{ranges})::extent + ... + 0);
   55|       |            static_assert(result.size() == total_size, "size of result buffer does not match the sum of input buffers");
   56|       |         } else {
   57|       |            // at least one input range has a dynamic extent, so check the total size at runtime
   58|       |            const size_t total_size = (ranges.size() + ... + 0);
   59|       |            BOTAN_ARG_CHECK(result.size() == total_size,
   60|       |                            "result buffer has static extent that does not match the sum of input buffers");
   61|       |         }
   62|       |
   63|       |         // fill the result buffer and hold the current output-iterator position
   64|       |         return [itr = std::ranges::begin(result)](auto&& range) mutable {
   65|       |            std::copy(std::ranges::begin(range), std::ranges::end(range), itr);
   66|       |            std::advance(itr, std::ranges::size(range));
   67|       |         };
   68|       |      }
   69|  3.10k|   }();
_ZZZN5Botan6detail11concatenateITkNS_6ranges14spanable_rangeENSt3__16vectorIhNS_16secure_allocatorIhEEEETpTkNS2_14spanable_rangeEJRNS3_4spanIKhLm18446744073709551615EEESB_EEET_DpOT0_Qoosr8conceptsE20reservable_containerISC_Esr6rangesE25statically_spanable_rangeISC_EENKUlvE_clEvENKUlOSC_E_clISB_EEDaSH_:
   46|  6.20k|         return [&result](auto&& range) {
   47|  6.20k|            std::copy(
   48|  6.20k|               std::ranges::begin(range), std::ranges::end(range), std::back_inserter(unwrap_strong_type(result)));
   49|  6.20k|         };
_ZN5Botan6concatINS_6detail10AutoDetectETpTkNS_6ranges14spanable_rangeEJNSt3__15arrayIhLm1EEENS5_IhLm2EEES7_EEEDaDpOT0_Q10all_same_vIDpNS4_11conditionalIXsr21__is_primary_templateINS4_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS4_6ranges5__cpo5beginEEclsr3stdE7declvalIRS8_EEEEEEEEE5valueENS4_26indirectly_readable_traitsISH_EESI_E4type10value_typeEE:
   92|  2.28k|{
   93|  2.28k|   if constexpr(std::same_as<detail::AutoDetect, OutR>) {
   94|       |      // Try to auto-detect a reasonable output type given the input ranges
   95|  2.28k|      static_assert(sizeof...(Rs) > 0, "Cannot auto-detect the output type if not a single input range is provided.");
   96|  2.28k|      using candidate_result_t = std::remove_cvref_t<std::tuple_element_t<0, std::tuple<Rs...>>>;
   97|  2.28k|      using result_range_value_t = std::remove_cvref_t<std::ranges::range_value_t<candidate_result_t>>;
   98|       |
   99|  2.28k|      if constexpr((ranges::statically_spanable_range<Rs> && ...)) {
  100|       |         // If all input ranges have a static extent, we can calculate the total size at compile time
  101|       |         // and therefore can use a statically sized output container. This is constexpr.
  102|  2.28k|         constexpr size_t total_size = (decltype(std::span{ranges})::extent + ... + 0);
  103|  2.28k|         using out_array_t = std::array<result_range_value_t, total_size>;
  104|  2.28k|         return detail::concatenate<out_array_t>(std::forward<Rs>(ranges)...);
  105|       |      } else {
  106|       |         // If at least one input range has a dynamic extent, we must use a dynamically allocated output container.
  107|       |         // We assume that the user wants to use the first input range's container type as output type.
  108|       |         static_assert(
  109|       |            concepts::reservable_container<candidate_result_t>,
  110|       |            "First input range has static extent, but a dynamically allocated output range is required. Please explicitly specify a dynamically allocatable output type.");
  111|       |         return detail::concatenate<candidate_result_t>(std::forward<Rs>(ranges)...);
  112|       |      }
  113|       |   } else {
  114|       |      // The caller has explicitly specified the output type
  115|       |      return detail::concatenate<OutR>(std::forward<Rs>(ranges)...);
  116|       |   }
  117|  2.28k|}
_ZN5Botan6detail11concatenateITkNS_6ranges14spanable_rangeENSt3__15arrayIhLm5EEETpTkNS2_14spanable_rangeEJNS4_IhLm1EEENS4_IhLm2EEES7_EEET_DpOT0_Qoosr8conceptsE20reservable_containerIS8_Esr6rangesE25statically_spanable_rangeIS8_E:
   33|  2.28k|{
   34|  2.28k|   OutR result{};
   35|       |
   36|       |   // Prepare and validate the output range and construct a lambda that does the
   37|       |   // actual filling of the result buffer.
   38|       |   // (if no input ranges are given, GCC claims that fill_fn is unused)
   39|  2.28k|   [[maybe_unused]] auto fill_fn = [&] {
   40|  2.28k|      if constexpr(concepts::reservable_container<OutR>) {
   41|       |         // dynamically allocate the correct result byte length
   42|  2.28k|         const size_t total_size = (ranges.size() + ... + 0);
   43|  2.28k|         result.reserve(total_size);
   44|       |
   45|       |         // fill the result buffer using a back-inserter
   46|  2.28k|         return [&result](auto&& range) {
   47|  2.28k|            std::copy(
   48|  2.28k|               std::ranges::begin(range), std::ranges::end(range), std::back_inserter(unwrap_strong_type(result)));
   49|  2.28k|         };
   50|  2.28k|      } else {
   51|  2.28k|         if constexpr((ranges::statically_spanable_range<Rs> && ... && true)) {
   52|       |            // all input ranges have a static extent, so check the total size at compile time
   53|       |            // (work around an issue in MSVC that warns `total_size` is unused)
   54|  2.28k|            [[maybe_unused]] constexpr size_t total_size = (decltype(std::span{ranges})::extent + ... + 0);
   55|  2.28k|            static_assert(result.size() == total_size, "size of result buffer does not match the sum of input buffers");
   56|  2.28k|         } else {
   57|       |            // at least one input range has a dynamic extent, so check the total size at runtime
   58|  2.28k|            const size_t total_size = (ranges.size() + ... + 0);
   59|  2.28k|            BOTAN_ARG_CHECK(result.size() == total_size,
   60|  2.28k|                            "result buffer has static extent that does not match the sum of input buffers");
   61|  2.28k|         }
   62|       |
   63|       |         // fill the result buffer and hold the current output-iterator position
   64|  2.28k|         return [itr = std::ranges::begin(result)](auto&& range) mutable {
   65|  2.28k|            std::copy(std::ranges::begin(range), std::ranges::end(range), itr);
   66|  2.28k|            std::advance(itr, std::ranges::size(range));
   67|  2.28k|         };
   68|  2.28k|      }
   69|  2.28k|   }();
   70|       |
   71|       |   // perform the actual concatenation
   72|  2.28k|   (fill_fn(std::forward<Rs>(ranges)), ...);
   73|       |
   74|  2.28k|   return result;
   75|  2.28k|}
_ZZN5Botan6detail11concatenateITkNS_6ranges14spanable_rangeENSt3__15arrayIhLm5EEETpTkNS2_14spanable_rangeEJNS4_IhLm1EEENS4_IhLm2EEES7_EEET_DpOT0_Qoosr8conceptsE20reservable_containerIS8_Esr6rangesE25statically_spanable_rangeIS8_EENKUlvE_clEv:
   39|  2.28k|   [[maybe_unused]] auto fill_fn = [&] {
   40|       |      if constexpr(concepts::reservable_container<OutR>) {
   41|       |         // dynamically allocate the correct result byte length
   42|       |         const size_t total_size = (ranges.size() + ... + 0);
   43|       |         result.reserve(total_size);
   44|       |
   45|       |         // fill the result buffer using a back-inserter
   46|       |         return [&result](auto&& range) {
   47|       |            std::copy(
   48|       |               std::ranges::begin(range), std::ranges::end(range), std::back_inserter(unwrap_strong_type(result)));
   49|       |         };
   50|  2.28k|      } else {
   51|  2.28k|         if constexpr((ranges::statically_spanable_range<Rs> && ... && true)) {
   52|       |            // all input ranges have a static extent, so check the total size at compile time
   53|       |            // (work around an issue in MSVC that warns `total_size` is unused)
   54|  2.28k|            [[maybe_unused]] constexpr size_t total_size = (decltype(std::span{ranges})::extent + ... + 0);
   55|  2.28k|            static_assert(result.size() == total_size, "size of result buffer does not match the sum of input buffers");
   56|       |         } else {
   57|       |            // at least one input range has a dynamic extent, so check the total size at runtime
   58|       |            const size_t total_size = (ranges.size() + ... + 0);
   59|       |            BOTAN_ARG_CHECK(result.size() == total_size,
   60|       |                            "result buffer has static extent that does not match the sum of input buffers");
   61|       |         }
   62|       |
   63|       |         // fill the result buffer and hold the current output-iterator position
   64|  2.28k|         return [itr = std::ranges::begin(result)](auto&& range) mutable {
   65|  2.28k|            std::copy(std::ranges::begin(range), std::ranges::end(range), itr);
   66|  2.28k|            std::advance(itr, std::ranges::size(range));
   67|  2.28k|         };
   68|  2.28k|      }
   69|  2.28k|   }();
_ZZZN5Botan6detail11concatenateITkNS_6ranges14spanable_rangeENSt3__15arrayIhLm5EEETpTkNS2_14spanable_rangeEJNS4_IhLm1EEENS4_IhLm2EEES7_EEET_DpOT0_Qoosr8conceptsE20reservable_containerIS8_Esr6rangesE25statically_spanable_rangeIS8_EENKUlvE_clEvENUlOS8_E_clIS6_EEDaSD_:
   64|  2.28k|         return [itr = std::ranges::begin(result)](auto&& range) mutable {
   65|  2.28k|            std::copy(std::ranges::begin(range), std::ranges::end(range), itr);
   66|  2.28k|            std::advance(itr, std::ranges::size(range));
   67|  2.28k|         };
_ZZZN5Botan6detail11concatenateITkNS_6ranges14spanable_rangeENSt3__15arrayIhLm5EEETpTkNS2_14spanable_rangeEJNS4_IhLm1EEENS4_IhLm2EEES7_EEET_DpOT0_Qoosr8conceptsE20reservable_containerIS8_Esr6rangesE25statically_spanable_rangeIS8_EENKUlvE_clEvENUlOS8_E_clIS7_EEDaSD_:
   64|  4.57k|         return [itr = std::ranges::begin(result)](auto&& range) mutable {
   65|  4.57k|            std::copy(std::ranges::begin(range), std::ranges::end(range), itr);
   66|  4.57k|            std::advance(itr, std::ranges::size(range));
   67|  4.57k|         };

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

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

_ZN5Botan2CT8is_equalIhEENS0_4MaskIT_EEPKS3_S6_m:
  798|    800|constexpr inline CT::Mask<T> is_equal(const T x[], const T y[], size_t len) {
  799|    800|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (799:7): [Folded, False: 800]
  ------------------
  800|      0|      T difference = 0;
  801|       |
  802|      0|      for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (802:25): [True: 0, False: 0]
  ------------------
  803|      0|         difference = difference | (x[i] ^ y[i]);
  804|      0|      }
  805|       |
  806|      0|      return CT::Mask<T>::is_zero(difference);
  807|    800|   } else {
  808|    800|      volatile T difference = 0;
  809|       |
  810|  9.42k|      for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (810:25): [True: 8.62k, False: 800]
  ------------------
  811|  8.62k|         difference = difference | (x[i] ^ y[i]);
  812|  8.62k|      }
  813|       |
  814|    800|      return CT::Mask<T>::is_zero(difference);
  815|    800|   }
  816|    800|}
_ZN5Botan2CT4MaskIhE7is_zeroEh:
  437|  2.56k|      static constexpr Mask<T> is_zero(T x) { return Mask<T>(ct_is_zero<T>(value_barrier<T>(x))); }
_ZN5Botan2CT4MaskIhEC2Eh:
  637|  2.57k|      constexpr explicit Mask(T m) : m_mask(m) {}
_ZNK5Botan2CT4MaskIhE7as_boolEv:
  614|    700|      constexpr bool as_bool() const { return unpoisoned_value() != 0; }
_ZNK5Botan2CT4MaskIhE16unpoisoned_valueEv:
  598|  2.46k|      constexpr T unpoisoned_value() const {
  599|  2.46k|         T r = value();
  600|  2.46k|         CT::unpoison(r);
  601|  2.46k|         return r;
  602|  2.46k|      }
_ZNK5Botan2CT4MaskIhE5valueEv:
  630|  3.64k|      constexpr T value() const { return value_barrier<T>(m_mask); }
_ZN5Botan2CT8unpoisonITkNSt3__18integralEhEEvRKT_:
  112|  2.54k|constexpr void unpoison(const T& p) {
  113|  2.54k|   unpoison(&p, 1);
  114|  2.54k|}
_ZN5Botan2CT8unpoisonIhEEvPKT_m:
   67|  7.01k|constexpr inline void unpoison(const T* p, size_t n) {
   68|       |#if defined(BOTAN_HAS_VALGRIND)
   69|       |   if(!std::is_constant_evaluated()) {
   70|       |      VALGRIND_MAKE_MEM_DEFINED(p, n * sizeof(T));
   71|       |   }
   72|       |#endif
   73|       |
   74|  7.01k|   BOTAN_UNUSED(p, n);
  ------------------
  |  |  151|  7.01k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   75|  7.01k|}
_ZN5Botan2CT6Choice9from_maskEm:
  303|  10.0M|      constexpr static Choice from_mask(underlying_type v) { return Choice(v); }
_ZN5Botan2CT6Choice2noEv:
  307|  1.61k|      constexpr static Choice no() { return Choice(0); }
_ZNK5Botan2CT6ChoicentEv:
  309|   355k|      constexpr Choice operator!() const { return Choice(~value()); }
_ZNK5Botan2CT6ChoiceaaERKS1_:
  311|  1.34M|      constexpr Choice operator&&(const Choice& other) const { return Choice(value() & other.value()); }
_ZNK5Botan2CT6ChoiceooERKS1_:
  313|  42.4k|      constexpr Choice operator||(const Choice& other) const { return Choice(value() | other.value()); }
_ZNK5Botan2CT6ChoiceneERKS1_:
  315|  1.61k|      constexpr Choice operator!=(const Choice& other) const { return Choice(value() ^ other.value()); }
_ZNK5Botan2CT6Choice7as_boolEv:
  329|   411k|      constexpr bool as_bool() const { return m_value != 0; }
_ZNK5Botan2CT6Choice5valueEv:
  332|  12.0M|      constexpr underlying_type value() const { return value_barrier(m_value); }
_ZN5Botan2CT6ChoiceC2Em:
  341|  11.8M|      constexpr explicit Choice(underlying_type v) : m_value(CT::value_barrier<underlying_type>(v)) {}
_ZN5Botan2CT4MaskImE7is_zeroEm:
  437|  32.1M|      static constexpr Mask<T> is_zero(T x) { return Mask<T>(ct_is_zero<T>(value_barrier<T>(x))); }
_ZNK5Botan2CT4MaskImE5valueEv:
  630|  48.4M|      constexpr T value() const { return value_barrier<T>(m_mask); }
_ZNK5Botan2CT4MaskImEcoEv:
  533|  14.9M|      constexpr Mask<T> operator~() const { return Mask<T>(~value()); }
_ZN5Botan2CT4MaskImE6expandEm:
  392|  14.9M|      static constexpr Mask<T> expand(T v) { return ~Mask<T>::is_zero(value_barrier<T>(v)); }
_ZNK5Botan2CT4MaskImE6selectEmm:
  548|  1.17M|      constexpr T select(T x, T y) const { return choose(value(), x, y); }
_ZNK5Botan2CT4MaskImE16conditional_swapImEEvRT_S5_QlestTL0__stS4_:
  587|   106k|      {
  588|   106k|         auto cnd = Mask<U>(*this);
  589|   106k|         U t0 = cnd.select(y, x);
  590|   106k|         U t1 = cnd.select(x, y);
  591|   106k|         x = t0;
  592|   106k|         y = t1;
  593|   106k|      }
_ZN5Botan2CT6poisonIhEEvPKT_m:
   56|  4.52k|constexpr inline void poison(const T* p, size_t n) {
   57|       |#if defined(BOTAN_HAS_VALGRIND)
   58|       |   if(!std::is_constant_evaluated()) {
   59|       |      VALGRIND_MAKE_MEM_UNDEFINED(p, n * sizeof(T));
   60|       |   }
   61|       |#endif
   62|       |
   63|  4.52k|   BOTAN_UNUSED(p, n);
  ------------------
  |  |  151|  4.52k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   64|  4.52k|}
_ZN5Botan2CT8unpoisonItEEvPKT_m:
   67|    321|constexpr inline void unpoison(const T* p, size_t n) {
   68|       |#if defined(BOTAN_HAS_VALGRIND)
   69|       |   if(!std::is_constant_evaluated()) {
   70|       |      VALGRIND_MAKE_MEM_DEFINED(p, n * sizeof(T));
   71|       |   }
   72|       |#endif
   73|       |
   74|    321|   BOTAN_UNUSED(p, n);
  ------------------
  |  |  151|    321|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   75|    321|}
_ZN5Botan2CT4MaskIhE8is_equalEhh:
  442|  1.76k|      static constexpr Mask<T> is_equal(T x, T y) {
  443|  1.76k|         const T diff = value_barrier(x) ^ value_barrier(y);
  444|  1.76k|         return Mask<T>::is_zero(diff);
  445|  1.76k|      }
_ZN5Botan2CT4MaskImE14expand_top_bitEm:
  415|   462k|      static constexpr Mask<T> expand_top_bit(T v) { return Mask<T>(ct_expand_top_bit<T>(v)); }
_ZN5Botan2CT4MaskImEC2Em:
  637|  47.8M|      constexpr explicit Mask(T m) : m_mask(m) {}
_ZN5Botan2CT4MaskImE5is_ltEmm:
  450|   457k|      static constexpr Mask<T> is_lt(T x, T y) {
  451|   457k|         T u = x ^ ((x ^ y) | ((x - y) ^ x));
  452|   457k|         return Mask<T>::expand_top_bit(u);
  453|   457k|      }
_ZNK5Botan2CT4MaskImE13if_set_returnEm:
  538|  41.7k|      constexpr T if_set_return(T x) const { return value() & x; }
_ZN5Botan2CT4MaskImE8is_equalEmm:
  442|  8.39M|      static constexpr Mask<T> is_equal(T x, T y) {
  443|  8.39M|         const T diff = value_barrier(x) ^ value_barrier(y);
  444|  8.39M|         return Mask<T>::is_zero(diff);
  445|  8.39M|      }
_ZN5Botan2CT8unpoisonITkNSt3__18integralEmEEvRKT_:
  112|  10.2M|constexpr void unpoison(const T& p) {
  113|  10.2M|   unpoison(&p, 1);
  114|  10.2M|}
_ZN5Botan2CT8unpoisonImEEvPKT_m:
   67|  10.4M|constexpr inline void unpoison(const T* p, size_t n) {
   68|       |#if defined(BOTAN_HAS_VALGRIND)
   69|       |   if(!std::is_constant_evaluated()) {
   70|       |      VALGRIND_MAKE_MEM_DEFINED(p, n * sizeof(T));
   71|       |   }
   72|       |#endif
   73|       |
   74|  10.4M|   BOTAN_UNUSED(p, n);
  ------------------
  |  |  151|  10.4M|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   75|  10.4M|}
_ZN5Botan2CT4MaskImE5is_gtEmm:
  458|  1.02k|      static constexpr Mask<T> is_gt(T x, T y) { return Mask<T>::is_lt(y, x); }
_ZN5Botan2CT4MaskImE6is_gteEmm:
  468|  2.37k|      static constexpr Mask<T> is_gte(T x, T y) { return ~Mask<T>::is_lt(x, y); }
_ZNK5Botan2CT4MaskImE7as_boolEv:
  614|  50.2k|      constexpr bool as_bool() const { return unpoisoned_value() != 0; }
_ZNK5Botan2CT4MaskImE16unpoisoned_valueEv:
  598|  10.1M|      constexpr T unpoisoned_value() const {
  599|  10.1M|         T r = value();
  600|  10.1M|         CT::unpoison(r);
  601|  10.1M|         return r;
  602|  10.1M|      }
_ZNK5Botan2CT4MaskImE11select_maskES2_S2_:
  559|   258k|      Mask<T> select_mask(Mask<T> x, Mask<T> y) const { return Mask<T>(select(x.value(), y.value())); }
_ZN5Botan2CT4MaskImEaNES2_:
  494|     49|      Mask<T>& operator&=(Mask<T> o) {
  495|     49|         m_mask &= o.value();
  496|     49|         return (*this);
  497|     49|      }
_ZNK5Botan2CT4MaskImE8select_nEPmPKmS5_m:
  565|  10.0M|      constexpr void select_n(T output[], const T x[], const T y[], size_t len) const {
  566|  10.0M|         const T mask = value();
  567|  72.2M|         for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (567:28): [True: 62.2M, False: 10.0M]
  ------------------
  568|  62.2M|            output[i] = choose(mask, x[i], y[i]);
  569|  62.2M|         }
  570|  10.0M|      }
_ZNK5Botan2CT4MaskIhE6selectEhh:
  548|  1.07k|      constexpr T select(T x, T y) const { return choose(value(), x, y); }
_ZNK5Botan2CT4MaskImE9as_choiceEv:
  619|  10.0M|      constexpr CT::Choice as_choice() const {
  620|  10.0M|         if constexpr(sizeof(T) >= sizeof(Choice::underlying_type)) {
  621|  10.0M|            return CT::Choice::from_mask(static_cast<Choice::underlying_type>(unpoisoned_value()));
  622|       |         } else {
  623|       |            return CT::Choice::from_int(unpoisoned_value());
  624|       |         }
  625|  10.0M|      }
_ZN5Botan2CT6poisonImEEvPKT_m:
   56|  12.7k|constexpr inline void poison(const T* p, size_t n) {
   57|       |#if defined(BOTAN_HAS_VALGRIND)
   58|       |   if(!std::is_constant_evaluated()) {
   59|       |      VALGRIND_MAKE_MEM_UNDEFINED(p, n * sizeof(T));
   60|       |   }
   61|       |#endif
   62|       |
   63|  12.7k|   BOTAN_UNUSED(p, n);
  ------------------
  |  |  151|  12.7k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   64|  12.7k|}
_ZN5Botan2CTorENS0_4MaskImEES2_:
  528|  1.74k|      friend constexpr Mask<T> operator|(Mask<T> x, Mask<T> y) { return Mask<T>(x.value() | y.value()); }
_ZN5Botan2CTanENS0_4MaskImEES2_:
  518|    588|      friend constexpr Mask<T> operator&(Mask<T> x, Mask<T> y) { return Mask<T>(x.value() & y.value()); }
_ZN5Botan2CT20conditional_copy_memImEENS0_4MaskIT_EES3_PS3_PKS3_S7_m:
  738|     48|constexpr inline Mask<T> conditional_copy_mem(T cnd, T* dest, const T* if_set, const T* if_unset, size_t elems) {
  739|     48|   const auto mask = CT::Mask<T>::expand(cnd);
  740|     48|   return CT::conditional_copy_mem(mask, dest, if_set, if_unset, elems);
  741|     48|}
_ZN5Botan2CT20conditional_copy_memImEENS0_4MaskIT_EES4_PS3_PKS3_S7_m:
  732|     48|constexpr inline Mask<T> conditional_copy_mem(Mask<T> mask, T* dest, const T* if_set, const T* if_unset, size_t elems) {
  733|     48|   mask.select_n(dest, if_set, if_unset, elems);
  734|     48|   return mask;
  735|     48|}
_ZN5Botan2CTeoENS0_4MaskImEES2_:
  523|  2.91k|      friend constexpr Mask<T> operator^(Mask<T> x, Mask<T> y) { return Mask<T>(x.value() ^ y.value()); }
_ZN5Botan2CT8is_equalIhEENS0_4MaskIT_EENSt3__14spanIKS3_Lm18446744073709551615EEES8_:
  825|    511|constexpr inline CT::Mask<T> is_equal(std::span<const T> x, std::span<const T> y) {
  826|    511|   if(x.size() != y.size()) {
  ------------------
  |  Branch (826:7): [True: 2, False: 509]
  ------------------
  827|      2|      return CT::Mask<T>::cleared();
  828|      2|   }
  829|       |
  830|    509|   return is_equal(x.data(), y.data(), x.size());
  831|    511|}
_ZN5Botan2CT4MaskIhE7clearedEv:
  387|      2|      static constexpr Mask<T> cleared() { return Mask<T>(0); }
_ZN5Botan2CT8unpoisonITkNS_6ranges14spanable_rangeENSt3__15arrayIhLm56EEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEnt19custom_unpoisonableISA_EEEvRKSA_:
  128|     15|constexpr void unpoison(const R& r) {
  129|     15|   const std::span s{r};
  130|     15|   unpoison(s.data(), s.size());
  131|     15|}
_ZN5Botan2CT13scoped_poisonIJNSt3__16vectorIhNS_16secure_allocatorIhEEEEEQaaaagtsZT_Li0Efraa10poisonableIT_Efraa12unpoisonableIS7_EEEDaDpRKS7_:
  222|     17|[[nodiscard]] constexpr auto scoped_poison(const Ts&... xs) {
  223|     17|   auto scope = scoped_cleanup([&] { unpoison_all(xs...); });
  224|     17|   poison_all(xs...);
  225|     17|   return scope;
  226|     17|}
_ZN5Botan2CT10poison_allITpTkNS0_10poisonableEJNSt3__16vectorIhNS_16secure_allocatorIhEEEEEQgtsZT_Li0EEEvDpRKT_:
  201|     17|constexpr void poison_all(const Ts&... ts) {
  202|     17|   (poison(ts), ...);
  203|     17|}
_ZN5Botan2CT6poisonITkNS_6ranges14spanable_rangeENSt3__16vectorIhNS_16secure_allocatorIhEEEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISF_EESG_E4type10value_typeEEnt17custom_poisonableISC_EEEvRKSC_:
  121|     17|constexpr void poison(const R& r) {
  122|     17|   const std::span s{r};
  123|     17|   poison(s.data(), s.size());
  124|     17|}
_ZZN5Botan2CT13scoped_poisonIJNSt3__16vectorIhNS_16secure_allocatorIhEEEEEQaaaagtsZT_Li0Efraa10poisonableIT_Efraa12unpoisonableIS7_EEEDaDpRKS7_ENKUlvE_clEv:
  223|     17|   auto scope = scoped_cleanup([&] { unpoison_all(xs...); });
_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNSt3__16vectorIhNS_16secure_allocatorIhEEEEEQgtsZT_Li0EEEvDpRKT_:
  207|     17|constexpr void unpoison_all(const Ts&... ts) {
  208|     17|   (unpoison(ts), ...);
  209|     17|}
_ZN5Botan2CT8unpoisonITkNS_6ranges14spanable_rangeENSt3__16vectorIhNS_16secure_allocatorIhEEEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISF_EESG_E4type10value_typeEEnt19custom_unpoisonableISC_EEEvRKSC_:
  128|     19|constexpr void unpoison(const R& r) {
  129|     19|   const std::span s{r};
  130|     19|   unpoison(s.data(), s.size());
  131|     19|}
_ZN5Botan2CT9all_zerosIhEENS0_4MaskIT_EEPKS3_m:
  785|      5|constexpr inline CT::Mask<T> all_zeros(const T elem[], size_t len) {
  786|      5|   T sum = 0;
  787|    213|   for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (787:22): [True: 208, False: 5]
  ------------------
  788|    208|      sum |= elem[i];
  789|    208|   }
  790|      5|   return CT::Mask<T>::is_zero(sum);
  791|      5|}
_ZN5Botan2CT4MaskImE7clearedEv:
  387|     17|      static constexpr Mask<T> cleared() { return Mask<T>(0); }
_ZN5Botan2CT4MaskImEeOES2_:
  502|  7.61k|      Mask<T>& operator^=(Mask<T> o) {
  503|  7.61k|         m_mask ^= o.value();
  504|  7.61k|         return (*this);
  505|  7.61k|      }
_ZN5Botan2CT8unpoisonITkNS_6ranges14spanable_rangeENSt3__16vectorImNS_16secure_allocatorImEEEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISF_EESG_E4type10value_typeEEnt19custom_unpoisonableISC_EEEvRKSC_:
  128|    144|constexpr void unpoison(const R& r) {
  129|    144|   const std::span s{r};
  130|    144|   unpoison(s.data(), s.size());
  131|    144|}
_ZN5Botan2CT9all_zerosImEENS0_4MaskIT_EEPKS3_m:
  785|  2.11M|constexpr inline CT::Mask<T> all_zeros(const T elem[], size_t len) {
  786|  2.11M|   T sum = 0;
  787|  15.7M|   for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (787:22): [True: 13.5M, False: 2.11M]
  ------------------
  788|  13.5M|      sum |= elem[i];
  789|  13.5M|   }
  790|  2.11M|   return CT::Mask<T>::is_zero(sum);
  791|  2.11M|}
_ZN5Botan2CT4MaskItEC2Et:
  637|   118k|      constexpr explicit Mask(T m) : m_mask(m) {}
_ZN5Botan2CT4MaskItE14expand_top_bitEt:
  415|  23.6k|      static constexpr Mask<T> expand_top_bit(T v) { return Mask<T>(ct_expand_top_bit<T>(v)); }
_ZNK5Botan2CT4MaskItEcoEv:
  533|  47.1k|      constexpr Mask<T> operator~() const { return Mask<T>(~value()); }
_ZNK5Botan2CT4MaskItE5valueEv:
  630|   118k|      constexpr T value() const { return value_barrier<T>(m_mask); }
_ZNK5Botan2CT4MaskItE7as_boolEv:
  614|    107|      constexpr bool as_bool() const { return unpoisoned_value() != 0; }
_ZNK5Botan2CT4MaskItE16unpoisoned_valueEv:
  598|    107|      constexpr T unpoisoned_value() const {
  599|    107|         T r = value();
  600|    107|         CT::unpoison(r);
  601|    107|         return r;
  602|    107|      }
_ZN5Botan2CT8unpoisonITkNSt3__18integralEtEEvRKT_:
  112|    321|constexpr void unpoison(const T& p) {
  113|    321|   unpoison(&p, 1);
  114|    321|}
_ZN5Botan2CT4MaskIhEC2ImEENS1_IT_EE:
  375|  1.07k|      constexpr explicit Mask(Mask<U> o) : m_mask(static_cast<T>(o.value())) {
  376|  1.07k|         static_assert(sizeof(U) > sizeof(T), "sizes ok");
  377|  1.07k|      }
_ZN5Botan2CT6Choice8from_intIjQaasr3stdE17unsigned_integralIT_Entsr3stdE7same_asIbS3_EEES1_S3_:
  268|     54|      constexpr static Choice from_int(T v) {
  269|     54|         if constexpr(sizeof(T) <= sizeof(underlying_type)) {
  270|     54|            return !Choice(ct_is_zero<underlying_type>(v));
  271|       |         } else {
  272|       |            // Mask of T that is either |0| or |1|
  273|       |            const T v_is_0 = ct_is_zero<T>(value_barrier<T>(v));
  274|       |
  275|       |            // We want the mask to be set if v != 0 so we must check that
  276|       |            // v_is_0 is itself zero.
  277|       |            //
  278|       |            // Also sizeof(T) may not equal sizeof(underlying_type) so we must
  279|       |            // use ct_is_zero<underlying_type>. It's ok to either truncate or
  280|       |            // zero extend v_is_0 to 32 bits since we know it is |0| or |1|
  281|       |            // so even just the low bit is sufficient.
  282|       |            return Choice(ct_is_zero<underlying_type>(static_cast<underlying_type>(v_is_0)));
  283|       |         }
  284|     54|      }
_ZN5Botan2CT6poisonITkNS_6ranges14spanable_rangeENSt3__14spanIKmLm18446744073709551615EEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISE_EESF_E4type10value_typeEEnt17custom_poisonableISB_EEEvRKSB_:
  121|     48|constexpr void poison(const R& r) {
  122|     48|   const std::span s{r};
  123|     48|   poison(s.data(), s.size());
  124|     48|}
_ZN5Botan2CT8unpoisonITkNS_6ranges14spanable_rangeENSt3__14spanIKmLm18446744073709551615EEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISE_EESF_E4type10value_typeEEnt19custom_unpoisonableISB_EEEvRKSB_:
  128|     48|constexpr void unpoison(const R& r) {
  129|     48|   const std::span s{r};
  130|     48|   unpoison(s.data(), s.size());
  131|     48|}
_ZN5Botan2CT22conditional_assign_memImEENS0_4MaskIT_EES3_PS3_PKS3_m:
  749|  10.0M|constexpr inline Mask<T> conditional_assign_mem(T cnd, T* dest, const T* src, size_t elems) {
  750|  10.0M|   const auto mask = CT::Mask<T>::expand(cnd);
  751|  10.0M|   mask.select_n(dest, src, dest, elems);
  752|  10.0M|   return mask;
  753|  10.0M|}
_ZNK5Botan2CT6Choice12into_bitmaskImQaasr3stdE17unsigned_integralIT_Entsr3stdE7same_asIbS3_EEES3_v:
  291|  8.92M|      constexpr T into_bitmask() const {
  292|  8.92M|         if constexpr(sizeof(T) <= sizeof(underlying_type)) {
  293|       |            // The inner mask is already |0| or |1| so just truncate
  294|  8.92M|            return static_cast<T>(value());
  295|       |         } else {
  296|       |            return ~ct_is_zero<T>(value());
  297|       |         }
  298|  8.92M|      }
pcurves_brainpool256r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES4_E11FieldParamsEEEEES9_EEEEvRKT_:
  138|  1.10k|constexpr void poison(const T& x) {
  139|  1.10k|   x._const_time_poison();
  140|  1.10k|}
pcurves_brainpool256r1.cpp:_ZN5Botan2CT10poison_allITpTkNS0_10poisonableEJNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES3_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  201|  1.10k|constexpr void poison_all(const Ts&... ts) {
  202|  1.10k|   (poison(ts), ...);
  203|  1.10k|}
pcurves_brainpool256r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES3_E11FieldParamsEEEEEEEvRKT_:
  138|  3.32k|constexpr void poison(const T& x) {
  139|  3.32k|   x._const_time_poison();
  140|  3.32k|}
_ZN5Botan2CT6poisonITkNS_6ranges14spanable_rangeENSt3__15arrayImLm4EEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEnt17custom_poisonableISA_EEEvRKSA_:
  121|  5.64k|constexpr void poison(const R& r) {
  122|  5.64k|   const std::span s{r};
  123|  5.64k|   poison(s.data(), s.size());
  124|  5.64k|}
pcurves_brainpool256r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES4_E11FieldParamsEEEEES9_EEEEvRKT_:
  143|  1.10k|constexpr void unpoison(const T& x) {
  144|  1.10k|   x._const_time_unpoison();
  145|  1.10k|}
pcurves_brainpool256r1.cpp:_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES3_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  207|  1.10k|constexpr void unpoison_all(const Ts&... ts) {
  208|  1.10k|   (unpoison(ts), ...);
  209|  1.10k|}
pcurves_brainpool256r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES3_E11FieldParamsEEEEEEEvRKT_:
  143|  3.32k|constexpr void unpoison(const T& x) {
  144|  3.32k|   x._const_time_unpoison();
  145|  3.32k|}
_ZN5Botan2CT8unpoisonITkNS_6ranges14spanable_rangeENSt3__15arrayImLm4EEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEnt19custom_unpoisonableISA_EEEvRKSA_:
  128|  5.64k|constexpr void unpoison(const R& r) {
  129|  5.64k|   const std::span s{r};
  130|  5.64k|   unpoison(s.data(), s.size());
  131|  5.64k|}
_ZN5Botan2CT8is_equalImEENS0_4MaskIT_EEPKS3_S6_m:
  798|  12.6k|constexpr inline CT::Mask<T> is_equal(const T x[], const T y[], size_t len) {
  799|  12.6k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (799:7): [Folded, False: 12.6k]
  ------------------
  800|      0|      T difference = 0;
  801|       |
  802|      0|      for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (802:25): [True: 0, False: 0]
  ------------------
  803|      0|         difference = difference | (x[i] ^ y[i]);
  804|      0|      }
  805|       |
  806|      0|      return CT::Mask<T>::is_zero(difference);
  807|  12.6k|   } else {
  808|  12.6k|      volatile T difference = 0;
  809|       |
  810|  75.0k|      for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (810:25): [True: 62.4k, False: 12.6k]
  ------------------
  811|  62.4k|         difference = difference | (x[i] ^ y[i]);
  812|  62.4k|      }
  813|       |
  814|  12.6k|      return CT::Mask<T>::is_zero(difference);
  815|  12.6k|   }
  816|  12.6k|}
_ZNK5Botan2CT4MaskIhE9as_choiceEv:
  619|  1.76k|      constexpr CT::Choice as_choice() const {
  620|       |         if constexpr(sizeof(T) >= sizeof(Choice::underlying_type)) {
  621|       |            return CT::Choice::from_mask(static_cast<Choice::underlying_type>(unpoisoned_value()));
  622|  1.76k|         } else {
  623|  1.76k|            return CT::Choice::from_int(unpoisoned_value());
  624|  1.76k|         }
  625|  1.76k|      }
_ZN5Botan2CT6Choice8from_intIhQaasr3stdE17unsigned_integralIT_Entsr3stdE7same_asIbS3_EEES1_S3_:
  268|  1.76k|      constexpr static Choice from_int(T v) {
  269|  1.76k|         if constexpr(sizeof(T) <= sizeof(underlying_type)) {
  270|  1.76k|            return !Choice(ct_is_zero<underlying_type>(v));
  271|       |         } else {
  272|       |            // Mask of T that is either |0| or |1|
  273|       |            const T v_is_0 = ct_is_zero<T>(value_barrier<T>(v));
  274|       |
  275|       |            // We want the mask to be set if v != 0 so we must check that
  276|       |            // v_is_0 is itself zero.
  277|       |            //
  278|       |            // Also sizeof(T) may not equal sizeof(underlying_type) so we must
  279|       |            // use ct_is_zero<underlying_type>. It's ok to either truncate or
  280|       |            // zero extend v_is_0 to 32 bits since we know it is |0| or |1|
  281|       |            // so even just the low bit is sufficient.
  282|       |            return Choice(ct_is_zero<underlying_type>(static_cast<underlying_type>(v_is_0)));
  283|       |         }
  284|  1.76k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan2CT6OptionINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES3_E11FieldParamsEEEEEEC2ESC_NS0_6ChoiceE:
  653|    478|      constexpr Option(T v, Choice valid) : m_has_value(valid), m_value(std::move(v)) {}
pcurves_brainpool256r1.cpp:_ZNK5Botan2CT6OptionINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES3_E11FieldParamsEEEEEE19as_optional_vartimeEv:
  710|    478|      constexpr std::optional<T> as_optional_vartime() const {
  711|    478|         if(m_has_value.as_bool()) {
  ------------------
  |  Branch (711:13): [True: 413, False: 65]
  ------------------
  712|    413|            return {m_value};
  713|    413|         } else {
  714|     65|            return {};
  715|     65|         }
  716|    478|      }
_ZN5Botan2CT6Choice8from_intImQaasr3stdE17unsigned_integralIT_Entsr3stdE7same_asIbS3_EEES1_S3_:
  268|  1.61k|      constexpr static Choice from_int(T v) {
  269|  1.61k|         if constexpr(sizeof(T) <= sizeof(underlying_type)) {
  270|  1.61k|            return !Choice(ct_is_zero<underlying_type>(v));
  271|       |         } else {
  272|       |            // Mask of T that is either |0| or |1|
  273|       |            const T v_is_0 = ct_is_zero<T>(value_barrier<T>(v));
  274|       |
  275|       |            // We want the mask to be set if v != 0 so we must check that
  276|       |            // v_is_0 is itself zero.
  277|       |            //
  278|       |            // Also sizeof(T) may not equal sizeof(underlying_type) so we must
  279|       |            // use ct_is_zero<underlying_type>. It's ok to either truncate or
  280|       |            // zero extend v_is_0 to 32 bits since we know it is |0| or |1|
  281|       |            // so even just the low bit is sufficient.
  282|       |            return Choice(ct_is_zero<underlying_type>(static_cast<underlying_type>(v_is_0)));
  283|       |         }
  284|  1.61k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES4_E11FieldParamsEEEEES9_EEEEvRKT_:
  138|    497|constexpr void poison(const T& x) {
  139|    497|   x._const_time_poison();
  140|    497|}
pcurves_brainpool384r1.cpp:_ZN5Botan2CT10poison_allITpTkNS0_10poisonableEJNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES3_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  201|    497|constexpr void poison_all(const Ts&... ts) {
  202|    497|   (poison(ts), ...);
  203|    497|}
pcurves_brainpool384r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES3_E11FieldParamsEEEEEEEvRKT_:
  138|  1.49k|constexpr void poison(const T& x) {
  139|  1.49k|   x._const_time_poison();
  140|  1.49k|}
_ZN5Botan2CT6poisonITkNS_6ranges14spanable_rangeENSt3__15arrayImLm6EEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEnt17custom_poisonableISA_EEEvRKSA_:
  121|  2.94k|constexpr void poison(const R& r) {
  122|  2.94k|   const std::span s{r};
  123|  2.94k|   poison(s.data(), s.size());
  124|  2.94k|}
pcurves_brainpool384r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES4_E11FieldParamsEEEEES9_EEEEvRKT_:
  143|    497|constexpr void unpoison(const T& x) {
  144|    497|   x._const_time_unpoison();
  145|    497|}
pcurves_brainpool384r1.cpp:_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES3_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  207|    497|constexpr void unpoison_all(const Ts&... ts) {
  208|    497|   (unpoison(ts), ...);
  209|    497|}
pcurves_brainpool384r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES3_E11FieldParamsEEEEEEEvRKT_:
  143|  1.49k|constexpr void unpoison(const T& x) {
  144|  1.49k|   x._const_time_unpoison();
  145|  1.49k|}
_ZN5Botan2CT8unpoisonITkNS_6ranges14spanable_rangeENSt3__15arrayImLm6EEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEnt19custom_unpoisonableISA_EEEvRKSA_:
  128|  2.94k|constexpr void unpoison(const R& r) {
  129|  2.94k|   const std::span s{r};
  130|  2.94k|   unpoison(s.data(), s.size());
  131|  2.94k|}
pcurves_brainpool384r1.cpp:_ZN5Botan2CT6OptionINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES3_E11FieldParamsEEEEEEC2ESC_NS0_6ChoiceE:
  653|    202|      constexpr Option(T v, Choice valid) : m_has_value(valid), m_value(std::move(v)) {}
pcurves_brainpool384r1.cpp:_ZNK5Botan2CT6OptionINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES3_E11FieldParamsEEEEEE19as_optional_vartimeEv:
  710|    202|      constexpr std::optional<T> as_optional_vartime() const {
  711|    202|         if(m_has_value.as_bool()) {
  ------------------
  |  Branch (711:13): [True: 149, False: 53]
  ------------------
  712|    149|            return {m_value};
  713|    149|         } else {
  714|     53|            return {};
  715|     53|         }
  716|    202|      }
pcurves_brainpool512r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES4_E11FieldParamsEEEEES9_EEEEvRKT_:
  138|    572|constexpr void poison(const T& x) {
  139|    572|   x._const_time_poison();
  140|    572|}
pcurves_brainpool512r1.cpp:_ZN5Botan2CT10poison_allITpTkNS0_10poisonableEJNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES3_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  201|    572|constexpr void poison_all(const Ts&... ts) {
  202|    572|   (poison(ts), ...);
  203|    572|}
pcurves_brainpool512r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES3_E11FieldParamsEEEEEEEvRKT_:
  138|  1.71k|constexpr void poison(const T& x) {
  139|  1.71k|   x._const_time_poison();
  140|  1.71k|}
_ZN5Botan2CT6poisonITkNS_6ranges14spanable_rangeENSt3__15arrayImLm8EEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEnt17custom_poisonableISA_EEEvRKSA_:
  121|  1.71k|constexpr void poison(const R& r) {
  122|  1.71k|   const std::span s{r};
  123|  1.71k|   poison(s.data(), s.size());
  124|  1.71k|}
pcurves_brainpool512r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES4_E11FieldParamsEEEEES9_EEEEvRKT_:
  143|    572|constexpr void unpoison(const T& x) {
  144|    572|   x._const_time_unpoison();
  145|    572|}
pcurves_brainpool512r1.cpp:_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES3_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  207|    572|constexpr void unpoison_all(const Ts&... ts) {
  208|    572|   (unpoison(ts), ...);
  209|    572|}
pcurves_brainpool512r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES3_E11FieldParamsEEEEEEEvRKT_:
  143|  1.71k|constexpr void unpoison(const T& x) {
  144|  1.71k|   x._const_time_unpoison();
  145|  1.71k|}
_ZN5Botan2CT8unpoisonITkNS_6ranges14spanable_rangeENSt3__15arrayImLm8EEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEnt19custom_unpoisonableISA_EEEvRKSA_:
  128|  1.71k|constexpr void unpoison(const R& r) {
  129|  1.71k|   const std::span s{r};
  130|  1.71k|   unpoison(s.data(), s.size());
  131|  1.71k|}
pcurves_brainpool512r1.cpp:_ZN5Botan2CT6OptionINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES3_E11FieldParamsEEEEEEC2ESC_NS0_6ChoiceE:
  653|    225|      constexpr Option(T v, Choice valid) : m_has_value(valid), m_value(std::move(v)) {}
pcurves_brainpool512r1.cpp:_ZNK5Botan2CT6OptionINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES3_E11FieldParamsEEEEEE19as_optional_vartimeEv:
  710|    225|      constexpr std::optional<T> as_optional_vartime() const {
  711|    225|         if(m_has_value.as_bool()) {
  ------------------
  |  Branch (711:13): [True: 212, False: 13]
  ------------------
  712|    212|            return {m_value};
  713|    212|         } else {
  714|     13|            return {};
  715|     13|         }
  716|    225|      }
_ZN5Botan2CT6poisonITkNS_6ranges14spanable_rangeENSt3__15arrayImLm9EEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEnt17custom_poisonableISA_EEEvRKSA_:
  121|  2.31k|constexpr void poison(const R& r) {
  122|  2.31k|   const std::span s{r};
  123|  2.31k|   poison(s.data(), s.size());
  124|  2.31k|}
_ZN5Botan2CT8unpoisonITkNS_6ranges14spanable_rangeENSt3__15arrayImLm9EEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEnt19custom_unpoisonableISA_EEEvRKSA_:
  128|  2.31k|constexpr void unpoison(const R& r) {
  129|  2.31k|   const std::span s{r};
  130|  2.31k|   unpoison(s.data(), s.size());
  131|  2.31k|}
pcurves_secp256r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS5_9secp256r16ParamsES6_E11FieldParamsEEEEES9_EEEEvRKT_:
  138|    776|constexpr void poison(const T& x) {
  139|    776|   x._const_time_poison();
  140|    776|}
pcurves_secp256r1.cpp:_ZN5Botan2CT10poison_allITpTkNS0_10poisonableEJNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS4_9secp256r16ParamsES5_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  201|    776|constexpr void poison_all(const Ts&... ts) {
  202|    776|   (poison(ts), ...);
  203|    776|}
pcurves_secp256r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS4_9secp256r16ParamsES5_E11FieldParamsEEEEEEEvRKT_:
  138|  2.32k|constexpr void poison(const T& x) {
  139|  2.32k|   x._const_time_poison();
  140|  2.32k|}
pcurves_secp256r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS5_9secp256r16ParamsES6_E11FieldParamsEEEEES9_EEEEvRKT_:
  143|    776|constexpr void unpoison(const T& x) {
  144|    776|   x._const_time_unpoison();
  145|    776|}
pcurves_secp256r1.cpp:_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS4_9secp256r16ParamsES5_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  207|    776|constexpr void unpoison_all(const Ts&... ts) {
  208|    776|   (unpoison(ts), ...);
  209|    776|}
pcurves_secp256r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS4_9secp256r16ParamsES5_E11FieldParamsEEEEEEEvRKT_:
  143|  2.32k|constexpr void unpoison(const T& x) {
  144|  2.32k|   x._const_time_unpoison();
  145|  2.32k|}
pcurves_secp256r1.cpp:_ZN5Botan2CT6OptionINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS4_9secp256r16ParamsES5_E11FieldParamsEEEEEEC2ESC_NS0_6ChoiceE:
  653|    319|      constexpr Option(T v, Choice valid) : m_has_value(valid), m_value(std::move(v)) {}
pcurves_secp256r1.cpp:_ZNK5Botan2CT6OptionINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS4_9secp256r16ParamsES5_E11FieldParamsEEEEEE19as_optional_vartimeEv:
  710|    319|      constexpr std::optional<T> as_optional_vartime() const {
  711|    319|         if(m_has_value.as_bool()) {
  ------------------
  |  Branch (711:13): [True: 317, False: 2]
  ------------------
  712|    317|            return {m_value};
  713|    317|         } else {
  714|      2|            return {};
  715|      2|         }
  716|    319|      }
pcurves_secp384r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS5_9secp384r16ParamsES6_E11FieldParamsEEEEES9_EEEEvRKT_:
  138|    483|constexpr void poison(const T& x) {
  139|    483|   x._const_time_poison();
  140|    483|}
pcurves_secp384r1.cpp:_ZN5Botan2CT10poison_allITpTkNS0_10poisonableEJNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS4_9secp384r16ParamsES5_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  201|    483|constexpr void poison_all(const Ts&... ts) {
  202|    483|   (poison(ts), ...);
  203|    483|}
pcurves_secp384r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS4_9secp384r16ParamsES5_E11FieldParamsEEEEEEEvRKT_:
  138|  1.44k|constexpr void poison(const T& x) {
  139|  1.44k|   x._const_time_poison();
  140|  1.44k|}
pcurves_secp384r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS5_9secp384r16ParamsES6_E11FieldParamsEEEEES9_EEEEvRKT_:
  143|    483|constexpr void unpoison(const T& x) {
  144|    483|   x._const_time_unpoison();
  145|    483|}
pcurves_secp384r1.cpp:_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS4_9secp384r16ParamsES5_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  207|    483|constexpr void unpoison_all(const Ts&... ts) {
  208|    483|   (unpoison(ts), ...);
  209|    483|}
pcurves_secp384r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS4_9secp384r16ParamsES5_E11FieldParamsEEEEEEEvRKT_:
  143|  1.44k|constexpr void unpoison(const T& x) {
  144|  1.44k|   x._const_time_unpoison();
  145|  1.44k|}
pcurves_secp384r1.cpp:_ZN5Botan2CT6OptionINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS4_9secp384r16ParamsES5_E11FieldParamsEEEEEEC2ESC_NS0_6ChoiceE:
  653|    198|      constexpr Option(T v, Choice valid) : m_has_value(valid), m_value(std::move(v)) {}
pcurves_secp384r1.cpp:_ZNK5Botan2CT6OptionINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS4_9secp384r16ParamsES5_E11FieldParamsEEEEEE19as_optional_vartimeEv:
  710|    198|      constexpr std::optional<T> as_optional_vartime() const {
  711|    198|         if(m_has_value.as_bool()) {
  ------------------
  |  Branch (711:13): [True: 196, False: 2]
  ------------------
  712|    196|            return {m_value};
  713|    196|         } else {
  714|      2|            return {};
  715|      2|         }
  716|    198|      }
pcurves_secp521r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS6_6ParamsES7_E11FieldParamsEEEEES9_EEEEvRKT_:
  138|    770|constexpr void poison(const T& x) {
  139|    770|   x._const_time_poison();
  140|    770|}
pcurves_secp521r1.cpp:_ZN5Botan2CT10poison_allITpTkNS0_10poisonableEJNS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  201|    770|constexpr void poison_all(const Ts&... ts) {
  202|    770|   (poison(ts), ...);
  203|    770|}
pcurves_secp521r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEEEEvRKT_:
  138|  2.31k|constexpr void poison(const T& x) {
  139|  2.31k|   x._const_time_poison();
  140|  2.31k|}
pcurves_secp521r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS6_6ParamsES7_E11FieldParamsEEEEES9_EEEEvRKT_:
  143|    770|constexpr void unpoison(const T& x) {
  144|    770|   x._const_time_unpoison();
  145|    770|}
pcurves_secp521r1.cpp:_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  207|    770|constexpr void unpoison_all(const Ts&... ts) {
  208|    770|   (unpoison(ts), ...);
  209|    770|}
pcurves_secp521r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEEEEvRKT_:
  143|  2.31k|constexpr void unpoison(const T& x) {
  144|  2.31k|   x._const_time_unpoison();
  145|  2.31k|}
pcurves_secp521r1.cpp:_ZN5Botan2CT6OptionINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEEEC2ESC_NS0_6ChoiceE:
  653|    335|      constexpr Option(T v, Choice valid) : m_has_value(valid), m_value(std::move(v)) {}
pcurves_secp521r1.cpp:_ZNK5Botan2CT6OptionINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEEE19as_optional_vartimeEv:
  710|    335|      constexpr std::optional<T> as_optional_vartime() const {
  711|    335|         if(m_has_value.as_bool()) {
  ------------------
  |  Branch (711:13): [True: 325, False: 10]
  ------------------
  712|    325|            return {m_value};
  713|    325|         } else {
  714|     10|            return {};
  715|     10|         }
  716|    335|      }
_ZNK5Botan2CT4MaskItE13if_set_returnEt:
  538|    214|      constexpr T if_set_return(T x) const { return value() & x; }
_ZN5Botan2CT4MaskItE7is_zeroEt:
  437|  23.7k|      static constexpr Mask<T> is_zero(T x) { return Mask<T>(ct_is_zero<T>(value_barrier<T>(x))); }
_ZN5Botan2CT4MaskItE5is_ltEtt:
  450|  23.6k|      static constexpr Mask<T> is_lt(T x, T y) {
  451|  23.6k|         T u = x ^ ((x ^ y) | ((x - y) ^ x));
  452|  23.6k|         return Mask<T>::expand_top_bit(u);
  453|  23.6k|      }
_ZN5Botan2CT4MaskItE5is_gtEtt:
  458|  23.5k|      static constexpr Mask<T> is_gt(T x, T y) { return Mask<T>::is_lt(y, x); }
_ZN5Botan2CT4MaskItE6is_lteEtt:
  463|  23.5k|      static constexpr Mask<T> is_lte(T x, T y) { return ~Mask<T>::is_gt(x, y); }
_ZN5Botan2CT4MaskItE8is_equalEtt:
  442|  23.5k|      static constexpr Mask<T> is_equal(T x, T y) {
  443|  23.5k|         const T diff = value_barrier(x) ^ value_barrier(y);
  444|  23.5k|         return Mask<T>::is_zero(diff);
  445|  23.5k|      }
_ZN5Botan2CT4MaskItE6expandEt:
  392|    107|      static constexpr Mask<T> expand(T v) { return ~Mask<T>::is_zero(value_barrier<T>(v)); }
_ZN5Botan2CT4MaskImE10expand_bitEmm:
  421|  3.32k|      static constexpr Mask<T> expand_bit(T v, size_t bit) {
  422|  3.32k|         return CT::Mask<T>::expand_top_bit(v << (sizeof(v) * 8 - 1 - bit));
  423|  3.32k|      }
_ZN5Botan2CTanENS0_4MaskItEES2_:
  518|  23.6k|      friend constexpr Mask<T> operator&(Mask<T> x, Mask<T> y) { return Mask<T>(x.value() & y.value()); }
_ZNK5Botan2CT4MaskItE17if_not_set_returnEt:
  543|    107|      constexpr T if_not_set_return(T x) const { return ~value() & x; }
_ZN5Botan2CT4MaskItE6expandIhEES2_NS1_IT_EE:
  429|    107|      static constexpr Mask<T> expand(Mask<U> m) {
  430|    107|         static_assert(sizeof(U) < sizeof(T), "sizes ok");
  431|    107|         return ~Mask<T>::is_zero(m.value());
  432|    107|      }
_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS0_4MaskItEEEEvRKT_:
  143|    107|constexpr void unpoison(const T& x) {
  144|    107|   x._const_time_unpoison();
  145|    107|}
_ZNK5Botan2CT4MaskItE20_const_time_unpoisonEv:
  634|    107|      constexpr void _const_time_unpoison() const { CT::unpoison(m_mask); }
_ZN5Botan2CT4MaskItEoRES2_:
  510|  23.4k|      Mask<T>& operator|=(Mask<T> o) {
  511|  23.4k|         m_mask |= o.value();
  512|  23.4k|         return (*this);
  513|  23.4k|      }

_ZN5Botan9Gf448Elem3oneEv:
   64|     34|      static Gf448Elem one() { return Gf448Elem(1); }
_ZN5Botan9Gf448Elem4zeroEv:
   59|     17|      static Gf448Elem zero() { return Gf448Elem(0); }
_ZN5Botan9Gf448Elem5wordsEv:
  120|  38.0k|      std::span<uint64_t, WORDS_448> words() { return m_x; }
_ZNK5Botan9Gf448Elem5wordsEv:
  128|  38.0k|      std::span<const uint64_t, WORDS_448> words() const { return m_x; }

_ZNK5Botan9TripleDES4nameEv:
   50|     86|      std::string name() const override { return "TripleDES"; }
_ZNK5Botan9TripleDES11parallelismEv:
   54|     64|      size_t parallelism() const override { return 32; }

_ZN5Botan11carry_shiftEom:
  139|   183k|inline uint64_t carry_shift(const uint128_t a, size_t shift) {
  140|   183k|   return static_cast<uint64_t>(a >> shift);
  141|   183k|}
_ZN5Botan13combine_lowerEomom:
  143|     52|inline uint64_t combine_lower(const uint128_t a, size_t s1, const uint128_t b, size_t s2) {
  144|     52|   return static_cast<uint64_t>((a >> s1) | (b << s2));
  145|     52|}

_ZNK5Botan13EC_Group_Data3oidEv:
  166|  33.8k|      const OID& oid() const { return m_oid; }
_ZNK5Botan13EC_Group_Data1pEv:
  170|  21.3k|      const BigInt& p() const { return m_p; }
_ZNK5Botan13EC_Group_Data5curveEv:
  181|  10.6k|      const CurveGFp& curve() const { return m_curve; }
_ZNK5Botan13EC_Group_Data5montyEv:
  185|  53.4k|      const Montgomery_Params& monty() const { return m_monty; }
_ZNK5Botan13EC_Group_Data12has_cofactorEv:
  196|  3.22k|      bool has_cofactor() const { return m_has_cofactor; }
_ZNK5Botan13EC_Group_Data7p_wordsEv:
  202|  10.6k|      size_t p_words() const { return m_p_words; }
_ZNK5Botan13EC_Group_Data6p_bitsEv:
  204|  1.61k|      size_t p_bits() const { return m_p_bits; }
_ZNK5Botan13EC_Group_Data7p_bytesEv:
  206|  12.0k|      size_t p_bytes() const { return (m_p_bits + 7) / 8; }
_ZNK5Botan13EC_Group_Data11order_bytesEv:
  210|  24.6k|      size_t order_bytes() const { return m_order_bytes; }
_ZNK5Botan13EC_Group_Data6pcurveEv:
  297|  69.9k|      const PCurve::PrimeOrderCurve& pcurve() const {
  298|  69.9k|         BOTAN_ASSERT_NONNULL(m_pcurve);
  ------------------
  |  |  123|  69.9k|   do {                                                                                   \
  |  |  124|  69.9k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 69.9k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  69.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 69.9k]
  |  |  ------------------
  ------------------
  299|  69.9k|         return *m_pcurve;
  300|  69.9k|      }
_ZN5Botan19EC_AffinePoint_DataD2Ev:
   74|  15.5k|      virtual ~EC_AffinePoint_Data() = default;
_ZN5Botan14EC_Scalar_DataD2Ev:
   39|  17.1k|      virtual ~EC_Scalar_Data() = default;

_ZNK5Botan17EC_Scalar_Data_PC5valueEv:
   53|  12.3k|      const auto& value() const { return m_v; }
_ZN5Botan17EC_Scalar_Data_PCC2ENSt3__110shared_ptrIKNS_13EC_Group_DataEEENS_6PCurve15PrimeOrderCurve6ScalarE:
   19|  17.1k|            m_group(std::move(group)), m_v(std::move(v)) {}

_ZNK5Botan17EC_PublicKey_Data5groupEv:
   30|  13.9k|      const EC_Group& group() const { return m_group; }
_ZNK5Botan17EC_PublicKey_Data10public_keyEv:
   32|  4.20k|      const EC_AffinePoint& public_key() const { return m_point; }
_ZNK5Botan18EC_PrivateKey_Data11private_keyEv:
   73|  1.61k|      const EC_Scalar& private_key() const { return m_scalar; }

_ZN5Botan3fmtIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEES7_NS1_17basic_string_viewIcS4_EEDpRKT_:
   53|  13.5k|std::string fmt(std::string_view format, const T&... args) {
   54|  13.5k|   std::ostringstream oss;
   55|  13.5k|   oss.imbue(std::locale::classic());
   56|  13.5k|   fmt_detail::do_fmt(oss, format, args...);
   57|  13.5k|   return oss.str();
   58|  13.5k|}
_ZN5Botan10fmt_detail6do_fmtINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEJEEEvRNS2_19basic_ostringstreamIcS5_S7_EENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|  13.5k|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|  13.5k|   size_t i = 0;
   27|       |
   28|   134k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 134k, False: 0]
  ------------------
   29|   134k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 13.5k, False: 120k]
  |  Branch (29:30): [True: 13.5k, False: 0]
  |  Branch (29:59): [True: 13.5k, False: 0]
  ------------------
   30|  13.5k|         oss << val;
   31|  13.5k|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|   120k|      } else {
   33|   120k|         oss << format[i];
   34|   120k|      }
   35|       |
   36|   120k|      i += 1;
   37|   120k|   }
   38|  13.5k|}
_ZN5Botan10fmt_detail6do_fmtERNSt3__119basic_ostringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EE:
   20|  19.2k|inline void do_fmt(std::ostringstream& oss, std::string_view format) {
   21|  19.2k|   oss << format;
   22|  19.2k|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|  3.97k|std::string fmt(std::string_view format, const T&... args) {
   54|  3.97k|   std::ostringstream oss;
   55|  3.97k|   oss.imbue(std::locale::classic());
   56|  3.97k|   fmt_detail::do_fmt(oss, format, args...);
   57|  3.97k|   return oss.str();
   58|  3.97k|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|  4.79k|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|  4.79k|   size_t i = 0;
   27|       |
   28|  36.0k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 36.0k, False: 0]
  ------------------
   29|  36.0k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 4.79k, False: 31.2k]
  |  Branch (29:30): [True: 4.79k, False: 0]
  |  Branch (29:59): [True: 4.79k, False: 0]
  ------------------
   30|  4.79k|         oss << val;
   31|  4.79k|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  31.2k|      } else {
   33|  31.2k|         oss << format[i];
   34|  31.2k|      }
   35|       |
   36|  31.2k|      i += 1;
   37|  31.2k|   }
   38|  4.79k|}
_ZN5Botan3fmtIJPKcS2_S2_EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_17basic_string_viewIcS6_EEDpRKT_:
   53|      1|std::string fmt(std::string_view format, const T&... args) {
   54|      1|   std::ostringstream oss;
   55|      1|   oss.imbue(std::locale::classic());
   56|      1|   fmt_detail::do_fmt(oss, format, args...);
   57|      1|   return oss.str();
   58|      1|}
_ZN5Botan10fmt_detail6do_fmtIPKcJS3_S3_EEEvRNSt3__119basic_ostringstreamIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_17basic_string_viewIcS7_EERKT_DpRKT0_:
   25|      1|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|      1|   size_t i = 0;
   27|       |
   28|      1|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 1, False: 0]
  ------------------
   29|      1|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 1, False: 0]
  |  Branch (29:30): [True: 1, False: 0]
  |  Branch (29:59): [True: 1, False: 0]
  ------------------
   30|      1|         oss << val;
   31|      1|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|      1|      } else {
   33|      0|         oss << format[i];
   34|      0|      }
   35|       |
   36|      0|      i += 1;
   37|      0|   }
   38|      1|}
_ZN5Botan10fmt_detail6do_fmtIPKcJS3_EEEvRNSt3__119basic_ostringstreamIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_17basic_string_viewIcS7_EERKT_DpRKT0_:
   25|      1|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|      1|   size_t i = 0;
   27|       |
   28|      5|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 5, False: 0]
  ------------------
   29|      5|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 1, False: 4]
  |  Branch (29:30): [True: 1, False: 0]
  |  Branch (29:59): [True: 1, False: 0]
  ------------------
   30|      1|         oss << val;
   31|      1|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|      4|      } else {
   33|      4|         oss << format[i];
   34|      4|      }
   35|       |
   36|      4|      i += 1;
   37|      4|   }
   38|      1|}
_ZN5Botan10fmt_detail6do_fmtIPKcJEEEvRNSt3__119basic_ostringstreamIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_17basic_string_viewIcS7_EERKT_DpRKT0_:
   25|    450|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    450|   size_t i = 0;
   27|       |
   28|  6.28k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 6.28k, False: 0]
  ------------------
   29|  6.28k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 450, False: 5.83k]
  |  Branch (29:30): [True: 450, False: 0]
  |  Branch (29:59): [True: 450, False: 0]
  ------------------
   30|    450|         oss << val;
   31|    450|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  5.83k|      } else {
   33|  5.83k|         oss << format[i];
   34|  5.83k|      }
   35|       |
   36|  5.83k|      i += 1;
   37|  5.83k|   }
   38|    450|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEPKcEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|    445|std::string fmt(std::string_view format, const T&... args) {
   54|    445|   std::ostringstream oss;
   55|    445|   oss.imbue(std::locale::classic());
   56|    445|   fmt_detail::do_fmt(oss, format, args...);
   57|    445|   return oss.str();
   58|    445|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJPKcEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|    445|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    445|   size_t i = 0;
   27|       |
   28|    445|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 445, False: 0]
  ------------------
   29|    445|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 445, False: 0]
  |  Branch (29:30): [True: 445, False: 0]
  |  Branch (29:59): [True: 445, False: 0]
  ------------------
   30|    445|         oss << val;
   31|    445|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|    445|      } else {
   33|      0|         oss << format[i];
   34|      0|      }
   35|       |
   36|      0|      i += 1;
   37|      0|   }
   38|    445|}
_ZN5Botan3fmtIJPKcNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEEENS3_12basic_stringIcS6_NS3_9allocatorIcEEEES7_DpRKT_:
   53|    820|std::string fmt(std::string_view format, const T&... args) {
   54|    820|   std::ostringstream oss;
   55|    820|   oss.imbue(std::locale::classic());
   56|    820|   fmt_detail::do_fmt(oss, format, args...);
   57|    820|   return oss.str();
   58|    820|}
_ZN5Botan10fmt_detail6do_fmtIPKcJNSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEEEEvRNS4_19basic_ostringstreamIcS7_NS4_9allocatorIcEEEES8_RKT_DpRKT0_:
   25|    820|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    820|   size_t i = 0;
   27|       |
   28|  5.40k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 5.40k, False: 0]
  ------------------
   29|  5.40k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 820, False: 4.58k]
  |  Branch (29:30): [True: 820, False: 0]
  |  Branch (29:59): [True: 820, False: 0]
  ------------------
   30|    820|         oss << val;
   31|    820|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  4.58k|      } else {
   33|  4.58k|         oss << format[i];
   34|  4.58k|      }
   35|       |
   36|  4.58k|      i += 1;
   37|  4.58k|   }
   38|    820|}
_ZN5Botan10fmt_detail6do_fmtImJEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    399|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    399|   size_t i = 0;
   27|       |
   28|  9.90k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 9.90k, False: 0]
  ------------------
   29|  9.90k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 399, False: 9.50k]
  |  Branch (29:30): [True: 399, False: 0]
  |  Branch (29:59): [True: 399, False: 0]
  ------------------
   30|    399|         oss << val;
   31|    399|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  9.50k|      } else {
   33|  9.50k|         oss << format[i];
   34|  9.50k|      }
   35|       |
   36|  9.50k|      i += 1;
   37|  9.50k|   }
   38|    399|}
_ZN5Botan3fmtIJmmEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EEDpRKT_:
   53|    399|std::string fmt(std::string_view format, const T&... args) {
   54|    399|   std::ostringstream oss;
   55|    399|   oss.imbue(std::locale::classic());
   56|    399|   fmt_detail::do_fmt(oss, format, args...);
   57|    399|   return oss.str();
   58|    399|}
_ZN5Botan10fmt_detail6do_fmtImJmEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    399|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    399|   size_t i = 0;
   27|       |
   28|  5.29k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 5.29k, False: 0]
  ------------------
   29|  5.29k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 399, False: 4.89k]
  |  Branch (29:30): [True: 399, False: 0]
  |  Branch (29:59): [True: 399, False: 0]
  ------------------
   30|    399|         oss << val;
   31|    399|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  4.89k|      } else {
   33|  4.89k|         oss << format[i];
   34|  4.89k|      }
   35|       |
   36|  4.89k|      i += 1;
   37|  4.89k|   }
   38|    399|}
_ZN5Botan10fmt_detail6do_fmtIjJEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|     74|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     74|   size_t i = 0;
   27|       |
   28|    168|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 168, False: 0]
  ------------------
   29|    168|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 74, False: 94]
  |  Branch (29:30): [True: 74, False: 0]
  |  Branch (29:59): [True: 74, False: 0]
  ------------------
   30|     74|         oss << val;
   31|     74|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|     94|      } else {
   33|     94|         oss << format[i];
   34|     94|      }
   35|       |
   36|     94|      i += 1;
   37|     94|   }
   38|     74|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEjEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|     20|std::string fmt(std::string_view format, const T&... args) {
   54|     20|   std::ostringstream oss;
   55|     20|   oss.imbue(std::locale::classic());
   56|     20|   fmt_detail::do_fmt(oss, format, args...);
   57|     20|   return oss.str();
   58|     20|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJjEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|     20|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     20|   size_t i = 0;
   27|       |
   28|     20|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 20, False: 0]
  ------------------
   29|     20|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 20, False: 0]
  |  Branch (29:30): [True: 20, False: 0]
  |  Branch (29:59): [True: 20, False: 0]
  ------------------
   30|     20|         oss << val;
   31|     20|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|     20|      } else {
   33|      0|         oss << format[i];
   34|      0|      }
   35|       |
   36|      0|      i += 1;
   37|      0|   }
   38|     20|}
_ZN5Botan3fmtIJjjEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EEDpRKT_:
   53|     54|std::string fmt(std::string_view format, const T&... args) {
   54|     54|   std::ostringstream oss;
   55|     54|   oss.imbue(std::locale::classic());
   56|     54|   fmt_detail::do_fmt(oss, format, args...);
   57|     54|   return oss.str();
   58|     54|}
_ZN5Botan10fmt_detail6do_fmtIjJjEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|     54|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     54|   size_t i = 0;
   27|       |
   28|  1.83k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 1.83k, False: 0]
  ------------------
   29|  1.83k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 54, False: 1.78k]
  |  Branch (29:30): [True: 54, False: 0]
  |  Branch (29:59): [True: 54, False: 0]
  ------------------
   30|     54|         oss << val;
   31|     54|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  1.78k|      } else {
   33|  1.78k|         oss << format[i];
   34|  1.78k|      }
   35|       |
   36|  1.78k|      i += 1;
   37|  1.78k|   }
   38|     54|}
_ZN5Botan3fmtIJmPKcEEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_17basic_string_viewIcS6_EEDpRKT_:
   53|      4|std::string fmt(std::string_view format, const T&... args) {
   54|      4|   std::ostringstream oss;
   55|      4|   oss.imbue(std::locale::classic());
   56|      4|   fmt_detail::do_fmt(oss, format, args...);
   57|      4|   return oss.str();
   58|      4|}
_ZN5Botan10fmt_detail6do_fmtImJPKcEEEvRNSt3__119basic_ostringstreamIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_17basic_string_viewIcS7_EERKT_DpRKT0_:
   25|      4|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|      4|   size_t i = 0;
   27|       |
   28|     56|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 56, False: 0]
  ------------------
   29|     56|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 4, False: 52]
  |  Branch (29:30): [True: 4, False: 0]
  |  Branch (29:59): [True: 4, False: 0]
  ------------------
   30|      4|         oss << val;
   31|      4|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|     52|      } else {
   33|     52|         oss << format[i];
   34|     52|      }
   35|       |
   36|     52|      i += 1;
   37|     52|   }
   38|      4|}

_ZN5Botan14GCM_EncryptionC2ENSt3__110unique_ptrINS_11BlockCipherENS1_14default_deleteIS3_EEEEm:
   79|     17|            GCM_Mode(std::move(cipher), tag_size) {}
_ZN5Botan14GCM_DecryptionC2ENSt3__110unique_ptrINS_11BlockCipherENS1_14default_deleteIS3_EEEEm:
  100|    117|            GCM_Mode(std::move(cipher), tag_size) {}
_ZNK5Botan8GCM_Mode8tag_sizeEv:
   39|    687|      size_t tag_size() const final { return m_tag_size; }
_ZNK5Botan14GCM_Decryption18minimum_final_sizeEv:
  104|     87|      size_t minimum_final_size() const override { return tag_size(); }

_ZNK5Botan5GHASH8key_specEv:
   42|    134|      Key_Length_Specification key_spec() const override { return Key_Length_Specification(16); }

_ZN5Botan7swar_ltITkNSt3__117unsigned_integralEtEET_S2_S2_:
  121|   337k|constexpr T swar_lt(T a, T b) {
  122|       |   // The constant 0x808080... as a T
  123|   337k|   constexpr T hi1 = (static_cast<T>(-1) / 255) << 7;
  124|       |   // The constant 0x7F7F7F... as a T
  125|   337k|   constexpr T lo7 = static_cast<T>(~hi1);
  126|   337k|   T r = (lo7 - a + b) & hi1;
  127|       |   // Currently the mask is 80 if lt, otherwise 00. Convert to FF/00
  128|   337k|   return (r << 1) - (r >> 7);
  129|   337k|}
_ZN5Botan12mul_or_throwITkNSt3__117unsigned_integralEmEET_S2_S2_NS1_17basic_string_viewIcNS1_11char_traitsIcEEEE:
   81|  12.9k|constexpr T mul_or_throw(T a, T b, std::string_view msg) {
   82|  12.9k|   if(auto r = checked_mul(a, b)) {
  ------------------
  |  Branch (82:12): [True: 12.9k, False: 0]
  ------------------
   83|  12.9k|      return r.value();
   84|  12.9k|   } else {
   85|      0|      throw Invalid_Argument(msg);
   86|      0|   }
   87|  12.9k|}
_ZN5Botan11checked_mulITkNSt3__117unsigned_integralEmEENS1_8optionalIT_EES3_S3_:
   46|   673k|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|   673k|   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|   673k|   if(a != 0 && r / a != b) {
  ------------------
  |  Branch (53:7): [True: 673k, False: 0]
  |  Branch (53:17): [True: 0, False: 673k]
  ------------------
   54|      0|      return {};
   55|      0|   }
   56|   673k|   return r;
   57|   673k|}
_ZN5Botan13swar_in_rangeITkNSt3__117unsigned_integralEmEET_S2_S2_S2_:
  144|  5.46M|constexpr T swar_in_range(T v, T lower, T upper) {
  145|       |   // The constant 0x808080... as a T
  146|  5.46M|   constexpr T hi1 = (static_cast<T>(-1) / 255) << 7;
  147|       |   // The constant 0x7F7F7F... as a T
  148|  5.46M|   constexpr T lo7 = ~hi1;
  149|       |
  150|  5.46M|   const T sub = ((v | hi1) - (lower & lo7)) ^ ((v ^ (~lower)) & hi1);
  151|  5.46M|   const T a_lo = sub & lo7;
  152|  5.46M|   const T a_hi = sub & hi1;
  153|  5.46M|   return (lo7 - a_lo + upper) & hi1 & ~a_hi;
  154|  5.46M|}
_ZN5Botan23index_of_first_set_byteITkNSt3__117unsigned_integralEmEEmT_:
  160|  95.7k|constexpr size_t index_of_first_set_byte(T v) {
  161|       |   // The constant 0x010101... as a T
  162|  95.7k|   constexpr T lo1 = (static_cast<T>(-1) / 255);
  163|       |   // The constant 0x808080... as a T
  164|  95.7k|   constexpr T hi1 = lo1 << 7;
  165|       |   // How many bits to shift in order to get the top byte
  166|  95.7k|   constexpr size_t bits = (sizeof(T) * 8) - 8;
  167|       |
  168|  95.7k|   return static_cast<size_t>((((((v & hi1) - 1) & lo1) * lo1) >> bits) - 1);
  169|  95.7k|}
_ZN5Botan15checked_cast_toItmQaasr3stdE8integralINS_6detail19wrapped_type_helperIu14__remove_cvrefIT_EE4typeEEsr3stdE8integralINS2_Iu14__remove_cvrefIT0_EE4typeEEEES3_S7_:
  104|  2.28k|constexpr RT checked_cast_to(AT i) {
  105|  2.28k|   return checked_cast_to_or_throw<RT, Internal_Error>(i, "Error during integer conversion");
  106|  2.28k|}
_ZN5Botan24checked_cast_to_or_throwItNS_14Internal_ErrorEmQaasr3stdE8integralINS_6detail19wrapped_type_helperIu14__remove_cvrefIT_EE4typeEEsr3stdE8integralINS3_Iu14__remove_cvrefIT1_EE4typeEEEES4_S8_NSt3__117basic_string_viewIcNSC_11char_traitsIcEEEE:
   91|  2.28k|constexpr RT checked_cast_to_or_throw(AT i, std::string_view error_msg_on_fail) {
   92|  2.28k|   const auto unwrapped_input = unwrap_strong_type(i);
   93|       |
   94|  2.28k|   const auto unwrapped_result = static_cast<strong_type_wrapped_type<RT>>(unwrapped_input);
   95|  2.28k|   if(unwrapped_input != static_cast<strong_type_wrapped_type<AT>>(unwrapped_result)) [[unlikely]] {
  ------------------
  |  Branch (95:7): [True: 0, False: 2.28k]
  ------------------
   96|      0|      throw ExceptionType(error_msg_on_fail);
   97|      0|   }
   98|       |
   99|  2.28k|   return wrap_strong_type<RT>(unwrapped_result);
  100|  2.28k|}
_ZN5Botan11checked_addITkNSt3__117unsigned_integralEjEENS1_8optionalIT_EES3_S3_:
   19|  81.5k|constexpr inline std::optional<T> checked_add(T a, T b) {
   20|  81.5k|   const T r = a + b;
   21|  81.5k|   if(r < a || r < b) {
  ------------------
  |  Branch (21:7): [True: 0, False: 81.5k]
  |  Branch (21:16): [True: 0, False: 81.5k]
  ------------------
   22|      0|      return {};
   23|      0|   }
   24|  81.5k|   return r;
   25|  81.5k|}
_ZN5Botan11checked_addITkNSt3__117unsigned_integralEmTpTkNS1_17unsigned_integralEJmmEQ10all_same_vIT_DpT0_EEENS1_8optionalIS2_EES2_S2_S4_:
   37|  46.4k|constexpr inline std::optional<T> checked_add(T a, T b, Ts... rest) {
   38|  46.4k|   if(auto r = checked_add(a, b)) {
  ------------------
  |  Branch (38:12): [True: 46.4k, False: 0]
  ------------------
   39|  46.4k|      return checked_add(r.value(), rest...);
   40|  46.4k|   } else {
   41|      0|      return {};
   42|      0|   }
   43|  46.4k|}
_ZN5Botan11checked_addITkNSt3__117unsigned_integralEmEENS1_8optionalIT_EES3_S3_:
   19|   165k|constexpr inline std::optional<T> checked_add(T a, T b) {
   20|   165k|   const T r = a + b;
   21|   165k|   if(r < a || r < b) {
  ------------------
  |  Branch (21:7): [True: 0, False: 165k]
  |  Branch (21:16): [True: 0, False: 165k]
  ------------------
   22|      0|      return {};
   23|      0|   }
   24|   165k|   return r;
   25|   165k|}
_ZN5Botan11checked_addITkNSt3__117unsigned_integralEmTpTkNS1_17unsigned_integralEJmEQ10all_same_vIT_DpT0_EEENS1_8optionalIS2_EES2_S2_S4_:
   37|  46.4k|constexpr inline std::optional<T> checked_add(T a, T b, Ts... rest) {
   38|  46.4k|   if(auto r = checked_add(a, b)) {
  ------------------
  |  Branch (38:12): [True: 46.4k, False: 0]
  ------------------
   39|  46.4k|      return checked_add(r.value(), rest...);
   40|  46.4k|   } else {
   41|      0|      return {};
   42|      0|   }
   43|  46.4k|}
_ZN5Botan12add_or_throwITkNSt3__117unsigned_integralEmEET_S2_S2_NS1_17basic_string_viewIcNS1_11char_traitsIcEEEE:
   66|    645|constexpr T add_or_throw(T a, T b, std::string_view msg) {
   67|    645|   if(auto r = checked_add(a, b)) {
  ------------------
  |  Branch (67:12): [True: 645, False: 0]
  ------------------
   68|    645|      return r.value();
   69|    645|   } else {
   70|      0|      throw Invalid_Argument(msg);
   71|      0|   }
   72|    645|}
_ZN5Botan11checked_addITkNSt3__117unsigned_integralEmTpTkNS1_17unsigned_integralEJmmmmmmEQ10all_same_vIT_DpT0_EEENS1_8optionalIS2_EES2_S2_S4_:
   37|  6.48k|constexpr inline std::optional<T> checked_add(T a, T b, Ts... rest) {
   38|  6.48k|   if(auto r = checked_add(a, b)) {
  ------------------
  |  Branch (38:12): [True: 6.48k, False: 0]
  ------------------
   39|  6.48k|      return checked_add(r.value(), rest...);
   40|  6.48k|   } else {
   41|      0|      return {};
   42|      0|   }
   43|  6.48k|}
_ZN5Botan11checked_addITkNSt3__117unsigned_integralEmTpTkNS1_17unsigned_integralEJmmmmmEQ10all_same_vIT_DpT0_EEENS1_8optionalIS2_EES2_S2_S4_:
   37|  6.48k|constexpr inline std::optional<T> checked_add(T a, T b, Ts... rest) {
   38|  6.48k|   if(auto r = checked_add(a, b)) {
  ------------------
  |  Branch (38:12): [True: 6.48k, False: 0]
  ------------------
   39|  6.48k|      return checked_add(r.value(), rest...);
   40|  6.48k|   } else {
   41|      0|      return {};
   42|      0|   }
   43|  6.48k|}
_ZN5Botan11checked_addITkNSt3__117unsigned_integralEmTpTkNS1_17unsigned_integralEJmmmmEQ10all_same_vIT_DpT0_EEENS1_8optionalIS2_EES2_S2_S4_:
   37|  6.48k|constexpr inline std::optional<T> checked_add(T a, T b, Ts... rest) {
   38|  6.48k|   if(auto r = checked_add(a, b)) {
  ------------------
  |  Branch (38:12): [True: 6.48k, False: 0]
  ------------------
   39|  6.48k|      return checked_add(r.value(), rest...);
   40|  6.48k|   } else {
   41|      0|      return {};
   42|      0|   }
   43|  6.48k|}
_ZN5Botan11checked_addITkNSt3__117unsigned_integralEmTpTkNS1_17unsigned_integralEJmmmEQ10all_same_vIT_DpT0_EEENS1_8optionalIS2_EES2_S2_S4_:
   37|  6.48k|constexpr inline std::optional<T> checked_add(T a, T b, Ts... rest) {
   38|  6.48k|   if(auto r = checked_add(a, b)) {
  ------------------
  |  Branch (38:12): [True: 6.48k, False: 0]
  ------------------
   39|  6.48k|      return checked_add(r.value(), rest...);
   40|  6.48k|   } else {
   41|      0|      return {};
   42|      0|   }
   43|  6.48k|}

_ZN5Botan8get_byteILm0EtEEhT0_QltT_stS1_:
   81|   363k|{
   82|   363k|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   83|   363k|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   84|   363k|}
_ZN5Botan8get_byteILm1EtEEhT0_QltT_stS1_:
   81|   363k|{
   82|   363k|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   83|   363k|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   84|   363k|}
_ZN5Botan11make_uint16Ehh:
   92|   183k|inline constexpr uint16_t make_uint16(uint8_t i0, uint8_t i1) {
   93|   183k|   return static_cast<uint16_t>((static_cast<uint16_t>(i0) << 8) | i1);
   94|   183k|}
_ZN5Botan11make_uint32Ehhhh:
  104|  35.5k|inline constexpr uint32_t make_uint32(uint8_t i0, uint8_t i1, uint8_t i2, uint8_t i3) {
  105|  35.5k|   return ((static_cast<uint32_t>(i0) << 24) | (static_cast<uint32_t>(i1) << 16) | (static_cast<uint32_t>(i2) << 8) |
  106|  35.5k|           (static_cast<uint32_t>(i3)));
  107|  35.5k|}
_ZN5Botan8store_beINS_6detail10AutoDetectEJRKmPhEEEDaDpOT0_:
  745|   102k|inline constexpr auto store_be(ParamTs&&... params) {
  746|   102k|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|   102k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS0_20unsigned_integralishEmQoosr3stdE7same_asIS4_T0_Esr3stdE7same_asIT1_S5_EEEvS6_Ph:
  711|   102k|inline constexpr void store_any(T in, uint8_t out[]) {
  712|       |   // asserts that *out points to enough bytes to write into
  713|   102k|   store_any<endianness, InT>(in, std::span<uint8_t, sizeof(T)>(out, sizeof(T)));
  714|   102k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS0_20unsigned_integralishEmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm8EEEQsr3stdE7same_asIS4_T0_EEEvT1_OT2_:
  646|   102k|inline constexpr void store_any(T in, OutR&& out_range) {
  647|   102k|   store_any<endianness, T>(in, std::forward<OutR>(out_range));
  648|   102k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm8EEEQnt15custom_storableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEEvS9_OT1_:
  525|   414k|inline constexpr void store_any(WrappedInT wrapped_in, OutR&& out_range) {
  526|   414k|   const auto in = detail::unwrap_strong_type_or_enum(wrapped_in);
  527|   414k|   using InT = decltype(in);
  528|   414k|   ranges::assert_exact_byte_length<sizeof(in)>(out_range);
  529|   414k|   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|   414k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (534:7): [Folded, False: 414k]
  ------------------
  535|      0|      return fallback_store_any<endianness, InT>(in, std::forward<OutR>(out_range));
  536|   414k|   } 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|   414k|      } else {
  542|   414k|         static_assert(opposite(endianness) == std::endian::native);
  543|   414k|         typecast_copy(out, reverse_bytes(in));
  544|   414k|      }
  545|   414k|   }
  546|   414k|}
_ZN5Botan6detail26unwrap_strong_type_or_enumITkNS0_20unsigned_integralishEmEEDaT_:
  190|   416k|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|   416k|   } else {
  195|   416k|      return Botan::unwrap_strong_type(t);
  196|   416k|   }
  197|   416k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmEET0_PKhm:
  454|   257k|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|   257k|   constexpr size_t out_size = sizeof(OutT);
  457|   257k|   return load_any<endianness, OutT>(std::span<const uint8_t, out_size>(in + off * out_size, out_size));
  458|   257k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|   423k|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|   423k|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|   423k|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|   423k|   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|   423k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|   423k|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|   423k|      } else {
  289|   423k|         const std::span in{in_range};
  290|   423k|         if constexpr(sizeof(OutT) == 1) {
  291|   423k|            return static_cast<OutT>(in[0]);
  292|   423k|         } else if constexpr(endianness == std::endian::native) {
  293|   423k|            return typecast_copy<OutT>(in);
  294|   423k|         } else {
  295|   423k|            static_assert(opposite(endianness) == std::endian::native);
  296|   423k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|   423k|         }
  298|   423k|      }
  299|   423k|   }());
  300|   423k|}
_ZN5Botan6detail24wrap_strong_type_or_enumITkNS0_20unsigned_integralishEmTkNSt3__117unsigned_integralEmEEDaT0_:
  200|   451k|constexpr auto wrap_strong_type_or_enum(T t) {
  201|       |   if constexpr(std::is_enum_v<OutT>) {
  202|       |      return static_cast<OutT>(t);
  203|   451k|   } else {
  204|   451k|      return Botan::wrap_strong_type<OutT>(t);
  205|   451k|   }
  206|   451k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|   423k|   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|   423k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 423k]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|   423k|      } else {
  289|   423k|         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|   423k|         } else {
  295|   423k|            static_assert(opposite(endianness) == std::endian::native);
  296|   423k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|   423k|         }
  298|   423k|      }
  299|   423k|   }());
_ZN5Botan8get_byteILm7EmEEhT0_QltT_stS1_:
   81|    246|{
   82|    246|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   83|    246|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   84|    246|}
_ZN5Botan8get_byteILm6EmEEhT0_QltT_stS1_:
   81|    246|{
   82|    246|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   83|    246|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   84|    246|}
_ZN5Botan8get_byteILm5EmEEhT0_QltT_stS1_:
   81|    246|{
   82|    246|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   83|    246|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   84|    246|}
_ZN5Botan8get_byteILm4EmEEhT0_QltT_stS1_:
   81|    246|{
   82|    246|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   83|    246|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   84|    246|}
_ZN5Botan8get_byteILm3EmEEhT0_QltT_stS1_:
   81|    246|{
   82|    246|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   83|    246|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   84|    246|}
_ZN5Botan8get_byteILm2EmEEhT0_QltT_stS1_:
   81|    246|{
   82|    246|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   83|    246|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   84|    246|}
_ZN5Botan8get_byteILm1EmEEhT0_QltT_stS1_:
   81|    246|{
   82|    246|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   83|    246|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   84|    246|}
_ZN5Botan8get_byteILm0EmEEhT0_QltT_stS1_:
   81|    432|{
   82|    432|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   83|    432|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   84|    432|}
_ZN5Botan6detail24wrap_strong_type_or_enumITkNS0_20unsigned_integralishEtTkNSt3__117unsigned_integralEtEEDaT0_:
  200|   192k|constexpr auto wrap_strong_type_or_enum(T t) {
  201|       |   if constexpr(std::is_enum_v<OutT>) {
  202|       |      return static_cast<OutT>(t);
  203|   192k|   } else {
  204|   192k|      return Botan::wrap_strong_type<OutT>(t);
  205|   192k|   }
  206|   192k|}
_ZN5Botan7load_beItJPKhRmEEEDaDpOT0_:
  504|  46.4k|inline constexpr auto load_be(ParamTs&&... params) {
  505|  46.4k|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|  46.4k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEtEET0_PKhm:
  454|  48.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|  48.6k|   constexpr size_t out_size = sizeof(OutT);
  457|  48.6k|   return load_any<endianness, OutT>(std::span<const uint8_t, out_size>(in + off * out_size, out_size));
  458|  48.6k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEtTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm2EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|   192k|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|   192k|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|   192k|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|   192k|   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|   192k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|   192k|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|   192k|      } else {
  289|   192k|         const std::span in{in_range};
  290|   192k|         if constexpr(sizeof(OutT) == 1) {
  291|   192k|            return static_cast<OutT>(in[0]);
  292|   192k|         } else if constexpr(endianness == std::endian::native) {
  293|   192k|            return typecast_copy<OutT>(in);
  294|   192k|         } else {
  295|   192k|            static_assert(opposite(endianness) == std::endian::native);
  296|   192k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|   192k|         }
  298|   192k|      }
  299|   192k|   }());
  300|   192k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEtTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm2EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|   192k|   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|   192k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 192k]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|   192k|      } else {
  289|   192k|         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|   192k|         } else {
  295|   192k|            static_assert(opposite(endianness) == std::endian::native);
  296|   192k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|   192k|         }
  298|   192k|      }
  299|   192k|   }());
_ZN5Botan7load_beIjJPKhRmEEEDaDpOT0_:
  504|    220|inline constexpr auto load_be(ParamTs&&... params) {
  505|    220|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|    220|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEjEET0_PKhm:
  454|    771|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|    771|   constexpr size_t out_size = sizeof(OutT);
  457|    771|   return load_any<endianness, OutT>(std::span<const uint8_t, out_size>(in + off * out_size, out_size));
  458|    771|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEjTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm4EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|    771|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|    771|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|    771|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|    771|   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|    771|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|    771|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|    771|      } else {
  289|    771|         const std::span in{in_range};
  290|    771|         if constexpr(sizeof(OutT) == 1) {
  291|    771|            return static_cast<OutT>(in[0]);
  292|    771|         } else if constexpr(endianness == std::endian::native) {
  293|    771|            return typecast_copy<OutT>(in);
  294|    771|         } else {
  295|    771|            static_assert(opposite(endianness) == std::endian::native);
  296|    771|            return reverse_bytes(typecast_copy<OutT>(in));
  297|    771|         }
  298|    771|      }
  299|    771|   }());
  300|    771|}
_ZN5Botan6detail24wrap_strong_type_or_enumITkNS0_20unsigned_integralishEjTkNSt3__117unsigned_integralEjEEDaT0_:
  200|    771|constexpr auto wrap_strong_type_or_enum(T t) {
  201|       |   if constexpr(std::is_enum_v<OutT>) {
  202|       |      return static_cast<OutT>(t);
  203|    771|   } else {
  204|    771|      return Botan::wrap_strong_type<OutT>(t);
  205|    771|   }
  206|    771|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEjTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm4EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|    771|   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|    771|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 771]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|    771|      } else {
  289|    771|         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|    771|         } else {
  295|    771|            static_assert(opposite(endianness) == std::endian::native);
  296|    771|            return reverse_bytes(typecast_copy<OutT>(in));
  297|    771|         }
  298|    771|      }
  299|    771|   }());
_ZN5Botan8get_byteILm0EjEEhT0_QltT_stS1_:
   81|    216|{
   82|    216|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   83|    216|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   84|    216|}
_ZN5Botan8get_byteILm1EjEEhT0_QltT_stS1_:
   81|  14.2k|{
   82|  14.2k|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   83|  14.2k|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   84|  14.2k|}
_ZN5Botan8get_byteILm2EjEEhT0_QltT_stS1_:
   81|  14.2k|{
   82|  14.2k|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   83|  14.2k|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   84|  14.2k|}
_ZN5Botan8get_byteILm3EjEEhT0_QltT_stS1_:
   81|  14.2k|{
   82|  14.2k|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   83|  14.2k|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   84|  14.2k|}
_ZN5Botan8store_leINS_6detail10AutoDetectEJmEEEDaDpOT0_:
  736|   117k|inline constexpr auto store_le(ParamTs&&... params) {
  737|   117k|   return detail::store_any<std::endian::little, ModifierT>(std::forward<ParamTs>(params)...);
  738|   117k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE57005ENS0_10AutoDetectETpTkNS0_20unsigned_integralishEJmEQ10all_same_vIDpT1_EEEDaS6_:
  696|   117k|inline constexpr auto store_any(Ts... ins) {
  697|   117k|   return store_any<endianness, OutR>(std::array{ins...});
  698|   117k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayImLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_:
  663|   117k|inline constexpr auto store_any(InR&& in_range) {
  664|   117k|   auto out = []([[maybe_unused]] const auto& in) {
  665|   117k|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|   117k|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|   117k|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|   117k|            return std::array<uint8_t, bytes>();
  669|   117k|         } else {
  670|   117k|            static_assert(
  671|   117k|               !std::same_as<AutoDetect, OutR>,
  672|   117k|               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|   117k|         }
  674|   117k|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|   117k|         return OutR(std::span{in}.size_bytes());
  676|   117k|      } else {
  677|   117k|         return OutR{};
  678|   117k|      }
  679|   117k|   }(in_range);
  680|       |
  681|   117k|   store_any<endianness, std::ranges::range_value_t<InR>>(out, std::forward<InR>(in_range));
  682|   117k|   return out;
  683|   117k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayImLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_ENKUlRKT_E_clIS7_EEDaSD_:
  664|   117k|   auto out = []([[maybe_unused]] const auto& in) {
  665|   117k|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|   117k|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|   117k|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|   117k|            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|   117k|   }(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|   117k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|   117k|   ranges::assert_equal_byte_lengths(out, in);
  605|   117k|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|   117k|   auto store_elementwise = [&] {
  608|   117k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|   117k|      std::span<uint8_t> out_s(out);
  610|   117k|      for(auto in_elem : in) {
  611|   117k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|   117k|         out_s = out_s.subspan(bytes_per_element);
  613|   117k|      }
  614|   117k|   };
  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|   117k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 117k]
  ------------------
  620|      0|      store_elementwise();
  621|   117k|   } else {
  622|   117k|      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|   117k|         typecast_copy(out, in);
  624|       |      } else {
  625|       |         store_elementwise();
  626|       |      }
  627|   117k|   }
  628|   117k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE57005ETkNS0_20unsigned_integralishEmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm8EEEQnt15custom_storableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEEvS9_OT1_:
  525|     52|inline constexpr void store_any(WrappedInT wrapped_in, OutR&& out_range) {
  526|     52|   const auto in = detail::unwrap_strong_type_or_enum(wrapped_in);
  527|     52|   using InT = decltype(in);
  528|     52|   ranges::assert_exact_byte_length<sizeof(in)>(out_range);
  529|     52|   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|     52|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (534:7): [Folded, False: 52]
  ------------------
  535|      0|      return fallback_store_any<endianness, InT>(in, std::forward<OutR>(out_range));
  536|     52|   } else {
  537|       |      if constexpr(sizeof(InT) == 1) {
  538|       |         out[0] = static_cast<uint8_t>(in);
  539|     52|      } else if constexpr(endianness == std::endian::native) {
  540|     52|         typecast_copy(out, in);
  541|       |      } else {
  542|       |         static_assert(opposite(endianness) == std::endian::native);
  543|       |         typecast_copy(out, reverse_bytes(in));
  544|       |      }
  545|     52|   }
  546|     52|}
_ZN5Botan12get_byte_varImEEhmT_:
   69|   155k|inline constexpr uint8_t get_byte_var(size_t byte_num, T input) {
   70|   155k|   return static_cast<uint8_t>(input >> (((~byte_num) & (sizeof(T) - 1)) << 3));
   71|   155k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS0_20unsigned_integralishEtQoosr3stdE7same_asIS4_T0_Esr3stdE7same_asIT1_S5_EEEvS6_Ph:
  711|     16|inline constexpr void store_any(T in, uint8_t out[]) {
  712|       |   // asserts that *out points to enough bytes to write into
  713|     16|   store_any<endianness, InT>(in, std::span<uint8_t, sizeof(T)>(out, sizeof(T)));
  714|     16|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS0_20unsigned_integralishEtTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm2EEEQsr3stdE7same_asIS4_T0_EEEvT1_OT2_:
  646|     16|inline constexpr void store_any(T in, OutR&& out_range) {
  647|     16|   store_any<endianness, T>(in, std::forward<OutR>(out_range));
  648|     16|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEtTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm2EEEQnt15custom_storableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEEvS9_OT1_:
  525|  4.59k|inline constexpr void store_any(WrappedInT wrapped_in, OutR&& out_range) {
  526|  4.59k|   const auto in = detail::unwrap_strong_type_or_enum(wrapped_in);
  527|  4.59k|   using InT = decltype(in);
  528|  4.59k|   ranges::assert_exact_byte_length<sizeof(in)>(out_range);
  529|  4.59k|   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|  4.59k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (534:7): [Folded, False: 4.59k]
  ------------------
  535|      0|      return fallback_store_any<endianness, InT>(in, std::forward<OutR>(out_range));
  536|  4.59k|   } 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|  4.59k|      } else {
  542|  4.59k|         static_assert(opposite(endianness) == std::endian::native);
  543|  4.59k|         typecast_copy(out, reverse_bytes(in));
  544|  4.59k|      }
  545|  4.59k|   }
  546|  4.59k|}
_ZN5Botan6detail26unwrap_strong_type_or_enumITkNS0_20unsigned_integralishEtEEDaT_:
  190|  4.59k|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|  4.59k|   } else {
  195|  4.59k|      return Botan::unwrap_strong_type(t);
  196|  4.59k|   }
  197|  4.59k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS0_20unsigned_integralishEjQoosr3stdE7same_asIS4_T0_Esr3stdE7same_asIT1_S5_EEEvS6_Ph:
  711|  11.1k|inline constexpr void store_any(T in, uint8_t out[]) {
  712|       |   // asserts that *out points to enough bytes to write into
  713|  11.1k|   store_any<endianness, InT>(in, std::span<uint8_t, sizeof(T)>(out, sizeof(T)));
  714|  11.1k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS0_20unsigned_integralishEjTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm4EEEQsr3stdE7same_asIS4_T0_EEEvT1_OT2_:
  646|  11.1k|inline constexpr void store_any(T in, OutR&& out_range) {
  647|  11.1k|   store_any<endianness, T>(in, std::forward<OutR>(out_range));
  648|  11.1k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEjTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm4EEEQnt15custom_storableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEEvS9_OT1_:
  525|   596k|inline constexpr void store_any(WrappedInT wrapped_in, OutR&& out_range) {
  526|   596k|   const auto in = detail::unwrap_strong_type_or_enum(wrapped_in);
  527|   596k|   using InT = decltype(in);
  528|   596k|   ranges::assert_exact_byte_length<sizeof(in)>(out_range);
  529|   596k|   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|   596k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (534:7): [Folded, False: 596k]
  ------------------
  535|      0|      return fallback_store_any<endianness, InT>(in, std::forward<OutR>(out_range));
  536|   596k|   } 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|   596k|      } else {
  542|   596k|         static_assert(opposite(endianness) == std::endian::native);
  543|   596k|         typecast_copy(out, reverse_bytes(in));
  544|   596k|      }
  545|   596k|   }
  546|   596k|}
_ZN5Botan6detail26unwrap_strong_type_or_enumITkNS0_20unsigned_integralishEjEEDaT_:
  190|   596k|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|   596k|   } else {
  195|   596k|      return Botan::unwrap_strong_type(t);
  196|   596k|   }
  197|   596k|}
_ZN5Botan7load_beImJPKhiEEEDaDpOT0_:
  504|    132|inline constexpr auto load_be(ParamTs&&... params) {
  505|    132|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|    132|}
_ZN5Botan7load_beImJRA32_mRPKhRmEEEDaDpOT0_:
  504|    519|inline constexpr auto load_be(ParamTs&&... params) {
  505|    519|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|    519|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206EmTkNS0_20unsigned_integralishEmQoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asIT1_S5_EEEvPS6_PKhm:
  483|    519|inline constexpr void load_any(T out[], const uint8_t in[], size_t count) {
  484|       |   // asserts that *in and *out point to the correct amount of memory
  485|    519|   load_any<endianness, OutT>(std::span<T>(out, count), std::span<const uint8_t>(in, count * sizeof(T)));
  486|    519|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeENS2_4spanImLm18446744073709551615EEETkNS4_16contiguous_rangeIhEENS5_IKhLm18446744073709551615EEEQaa20unsigned_integralishINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT1_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISH_EESI_E4type10value_typeEEoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asISP_SN_EEEvOSE_RKT2_:
  355|    519|inline constexpr void load_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  356|    519|   ranges::assert_equal_byte_lengths(out, in);
  357|    519|   using element_type = std::ranges::range_value_t<OutR>;
  358|       |
  359|    519|   auto load_elementwise = [&] {
  360|    519|      constexpr size_t bytes_per_element = sizeof(element_type);
  361|    519|      std::span<const uint8_t> in_s(in);
  362|    519|      for(auto& out_elem : out) {
  363|    519|         out_elem = load_any<endianness, element_type>(in_s.template first<bytes_per_element>());
  364|    519|         in_s = in_s.subspan(bytes_per_element);
  365|    519|      }
  366|    519|   };
  367|       |
  368|       |   // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  369|       |   // internally to copy ranges on a byte-by-byte basis, which is not allowed
  370|       |   // in a `constexpr` context.
  371|    519|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (371:7): [Folded, False: 519]
  ------------------
  372|      0|      load_elementwise();
  373|    519|   } else {
  374|       |      if constexpr(endianness == std::endian::native && !custom_loadable<element_type>) {
  375|       |         typecast_copy(out, in);
  376|    519|      } else {
  377|    519|         load_elementwise();
  378|    519|      }
  379|    519|   }
  380|    519|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeENS2_4spanImLm18446744073709551615EEETkNS4_16contiguous_rangeIhEENS5_IKhLm18446744073709551615EEEQaa20unsigned_integralishINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT1_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISH_EESI_E4type10value_typeEEoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asISP_SN_EEEvOSE_RKT2_ENKUlvE_clEv:
  359|    519|   auto load_elementwise = [&] {
  360|    519|      constexpr size_t bytes_per_element = sizeof(element_type);
  361|    519|      std::span<const uint8_t> in_s(in);
  362|  10.9k|      for(auto& out_elem : out) {
  ------------------
  |  Branch (362:26): [True: 10.9k, False: 519]
  ------------------
  363|  10.9k|         out_elem = load_any<endianness, element_type>(in_s.template first<bytes_per_element>());
  364|  10.9k|         in_s = in_s.subspan(bytes_per_element);
  365|  10.9k|      }
  366|    519|   };
_ZN5Botan8store_beINS_6detail10AutoDetectEJPhRmEEEDaDpOT0_:
  745|  10.9k|inline constexpr auto store_be(ParamTs&&... params) {
  746|  10.9k|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|  10.9k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS0_20unsigned_integralishEmTpTkNS0_20unsigned_integralishEJEQaaoosr3stdE7same_asIS4_T0_Esr3stdE7same_asIT1_S5_E10all_same_vIS6_DpT2_EEEvPhS6_S8_:
  723|  10.9k|inline constexpr void store_any(uint8_t out[], T0 in0, Ts... ins) {
  724|  10.9k|   constexpr auto bytes = sizeof(in0) + (sizeof(ins) + ... + 0);
  725|       |   // asserts that *out points to the correct amount of memory
  726|  10.9k|   store_any<endianness, T0>(std::span<uint8_t, bytes>(out, bytes), in0, ins...);
  727|  10.9k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm8EEETpTkNS0_20unsigned_integralishEJmEQaagtsZT2_Li0Eooaasr3stdE7same_asINS0_10AutoDetectET0_E10all_same_vIDpT2_Eaa20unsigned_integralishIS9_E10all_same_vIS9_SB_EEEvOT1_SB_:
  582|   311k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, Ts... ins) {
  583|   311k|   ranges::assert_exact_byte_length<(sizeof(Ts) + ...)>(out);
  584|   311k|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|   311k|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|   311k|      off += sizeof(T);
  587|   311k|   };
  588|       |
  589|   311k|   (store_one(std::span{out}, ins), ...);
  590|   311k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm8EEETpTkNS0_20unsigned_integralishEJmEQaagtsZT2_Li0Eooaasr3stdE7same_asINS0_10AutoDetectET0_E10all_same_vIDpT2_Eaa20unsigned_integralishIS9_E10all_same_vIS9_SB_EEEvOT1_SB_ENUlTyS9_T_E_clImS7_EEDaS9_SE_:
  584|   311k|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|   311k|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|   311k|      off += sizeof(T);
  587|   311k|   };
_ZN5Botan7load_leImJPKhiEEEDaDpOT0_:
  495|     52|inline constexpr auto load_le(ParamTs&&... params) {
  496|     52|   return detail::load_any<std::endian::little, OutT>(std::forward<ParamTs>(params)...);
  497|     52|}
_ZN5Botan6detail8load_anyILNSt3__16endianE57005ETkNS0_20unsigned_integralishEmEET0_PKhm:
  454|     65|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|     65|   constexpr size_t out_size = sizeof(OutT);
  457|     65|   return load_any<endianness, OutT>(std::span<const uint8_t, out_size>(in + off * out_size, out_size));
  458|     65|}
_ZN5Botan6detail8load_anyILNSt3__16endianE57005ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|     65|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|     65|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|     65|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|     65|   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|     65|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|     65|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|     65|      } else {
  289|     65|         const std::span in{in_range};
  290|     65|         if constexpr(sizeof(OutT) == 1) {
  291|     65|            return static_cast<OutT>(in[0]);
  292|     65|         } else if constexpr(endianness == std::endian::native) {
  293|     65|            return typecast_copy<OutT>(in);
  294|     65|         } else {
  295|     65|            static_assert(opposite(endianness) == std::endian::native);
  296|     65|            return reverse_bytes(typecast_copy<OutT>(in));
  297|     65|         }
  298|     65|      }
  299|     65|   }());
  300|     65|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE57005ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|     65|   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|     65|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 65]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|     65|      } else {
  289|     65|         const std::span in{in_range};
  290|       |         if constexpr(sizeof(OutT) == 1) {
  291|       |            return static_cast<OutT>(in[0]);
  292|     65|         } else if constexpr(endianness == std::endian::native) {
  293|     65|            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|     65|      }
  299|     65|   }());
_ZN5Botan7load_leImJRPKhiEEEDaDpOT0_:
  495|     13|inline constexpr auto load_le(ParamTs&&... params) {
  496|     13|   return detail::load_any<std::endian::little, OutT>(std::forward<ParamTs>(params)...);
  497|     13|}
_ZN5Botan7load_beIjJPKhiEEEDaDpOT0_:
  504|    112|inline constexpr auto load_be(ParamTs&&... params) {
  505|    112|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|    112|}
_ZN5Botan12get_byte_varIjEEhmT_:
   69|     24|inline constexpr uint8_t get_byte_var(size_t byte_num, T input) {
   70|     24|   return static_cast<uint8_t>(input >> (((~byte_num) & (sizeof(T) - 1)) << 3));
   71|     24|}
_ZN5Botan11copy_out_beITkNS_6ranges14spanable_rangeENSt3__16vectorIjNS_16secure_allocatorIjEEEEEEvNS2_4spanIhLm18446744073709551615EEERKT_:
  773|  82.9k|inline void copy_out_be(std::span<uint8_t> out, const InR& in) {
  774|  82.9k|   using T = std::ranges::range_value_t<InR>;
  775|  82.9k|   std::span<const T> in_s{in};
  776|  82.9k|   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|  82.9k|   for(size_t i = 0; i < remaining_bytes; ++i) {
  ------------------
  |  Branch (779:22): [True: 0, False: 82.9k]
  ------------------
  780|      0|      out[i] = get_byte_var(i, in_s.front());
  781|      0|   }
  782|  82.9k|}
_ZN5Botan6detail33copy_out_any_word_aligned_portionILNSt3__16endianE64206ETkNS0_20unsigned_integralishEjEEmRNS2_4spanIhLm18446744073709551615EEERNS4_IKT0_Lm18446744073709551615EEE:
  752|  82.9k|inline size_t copy_out_any_word_aligned_portion(std::span<uint8_t>& out, std::span<const T>& in) {
  753|  82.9k|   const size_t full_words = out.size() / sizeof(T);
  754|  82.9k|   const size_t full_word_bytes = full_words * sizeof(T);
  755|  82.9k|   const size_t remaining_bytes = out.size() - full_word_bytes;
  756|  82.9k|   BOTAN_ASSERT_NOMSG(in.size_bytes() >= full_word_bytes + remaining_bytes);
  ------------------
  |  |   84|  82.9k|   do {                                                                     \
  |  |   85|  82.9k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  82.9k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 82.9k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  82.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 82.9k]
  |  |  ------------------
  ------------------
  757|       |
  758|       |   // copy full words
  759|  82.9k|   store_any<endianness, T>(out.first(full_word_bytes), in.first(full_words));
  760|  82.9k|   out = out.subspan(full_word_bytes);
  761|  82.9k|   in = in.subspan(full_words);
  762|       |
  763|  82.9k|   return remaining_bytes;
  764|  82.9k|}
_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|  82.9k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|  82.9k|   ranges::assert_equal_byte_lengths(out, in);
  605|  82.9k|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|  82.9k|   auto store_elementwise = [&] {
  608|  82.9k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  82.9k|      std::span<uint8_t> out_s(out);
  610|  82.9k|      for(auto in_elem : in) {
  611|  82.9k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  82.9k|         out_s = out_s.subspan(bytes_per_element);
  613|  82.9k|      }
  614|  82.9k|   };
  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|  82.9k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 82.9k]
  ------------------
  620|      0|      store_elementwise();
  621|  82.9k|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|  82.9k|      } else {
  625|  82.9k|         store_elementwise();
  626|  82.9k|      }
  627|  82.9k|   }
  628|  82.9k|}
_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|  82.9k|   auto store_elementwise = [&] {
  608|  82.9k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  82.9k|      std::span<uint8_t> out_s(out);
  610|   584k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 584k, False: 82.9k]
  ------------------
  611|   584k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|   584k|         out_s = out_s.subspan(bytes_per_element);
  613|   584k|      }
  614|  82.9k|   };
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EjTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm4EEETpTkNS0_20unsigned_integralishEJjEQaagtsZT2_Li0Eooaasr3stdE7same_asINS0_10AutoDetectET0_E10all_same_vIDpT2_Eaa20unsigned_integralishIS9_E10all_same_vIS9_SB_EEEvOT1_SB_:
  582|   584k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, Ts... ins) {
  583|   584k|   ranges::assert_exact_byte_length<(sizeof(Ts) + ...)>(out);
  584|   584k|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|   584k|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|   584k|      off += sizeof(T);
  587|   584k|   };
  588|       |
  589|   584k|   (store_one(std::span{out}, ins), ...);
  590|   584k|}
_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|   584k|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|   584k|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|   584k|      off += sizeof(T);
  587|   584k|   };
_ZN5Botan11copy_out_beITkNS_6ranges14spanable_rangeENSt3__16vectorImNS_16secure_allocatorImEEEEEEvNS2_4spanIhLm18446744073709551615EEERKT_:
  773|  6.44k|inline void copy_out_be(std::span<uint8_t> out, const InR& in) {
  774|  6.44k|   using T = std::ranges::range_value_t<InR>;
  775|  6.44k|   std::span<const T> in_s{in};
  776|  6.44k|   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|  6.44k|   for(size_t i = 0; i < remaining_bytes; ++i) {
  ------------------
  |  Branch (779:22): [True: 0, False: 6.44k]
  ------------------
  780|      0|      out[i] = get_byte_var(i, in_s.front());
  781|      0|   }
  782|  6.44k|}
_ZN5Botan6detail33copy_out_any_word_aligned_portionILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmEEmRNS2_4spanIhLm18446744073709551615EEERNS4_IKT0_Lm18446744073709551615EEE:
  752|  7.06k|inline size_t copy_out_any_word_aligned_portion(std::span<uint8_t>& out, std::span<const T>& in) {
  753|  7.06k|   const size_t full_words = out.size() / sizeof(T);
  754|  7.06k|   const size_t full_word_bytes = full_words * sizeof(T);
  755|  7.06k|   const size_t remaining_bytes = out.size() - full_word_bytes;
  756|  7.06k|   BOTAN_ASSERT_NOMSG(in.size_bytes() >= full_word_bytes + remaining_bytes);
  ------------------
  |  |   84|  7.06k|   do {                                                                     \
  |  |   85|  7.06k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  7.06k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 7.06k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  7.06k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 7.06k]
  |  |  ------------------
  ------------------
  757|       |
  758|       |   // copy full words
  759|  7.06k|   store_any<endianness, T>(out.first(full_word_bytes), in.first(full_words));
  760|  7.06k|   out = out.subspan(full_word_bytes);
  761|  7.06k|   in = in.subspan(full_words);
  762|       |
  763|  7.06k|   return remaining_bytes;
  764|  7.06k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm18446744073709551615EEETkNS4_14spanable_rangeENS6_IKmLm18446744073709551615EEEQoosr3stdE7same_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|  7.06k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|  7.06k|   ranges::assert_equal_byte_lengths(out, in);
  605|  7.06k|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|  7.06k|   auto store_elementwise = [&] {
  608|  7.06k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  7.06k|      std::span<uint8_t> out_s(out);
  610|  7.06k|      for(auto in_elem : in) {
  611|  7.06k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  7.06k|         out_s = out_s.subspan(bytes_per_element);
  613|  7.06k|      }
  614|  7.06k|   };
  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|  7.06k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 7.06k]
  ------------------
  620|      0|      store_elementwise();
  621|  7.06k|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|  7.06k|      } else {
  625|  7.06k|         store_elementwise();
  626|  7.06k|      }
  627|  7.06k|   }
  628|  7.06k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm18446744073709551615EEETkNS4_14spanable_rangeENS6_IKmLm18446744073709551615EEEQoosr3stdE7same_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|  7.06k|   auto store_elementwise = [&] {
  608|  7.06k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  7.06k|      std::span<uint8_t> out_s(out);
  610|  39.9k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 39.9k, False: 7.06k]
  ------------------
  611|  39.9k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  39.9k|         out_s = out_s.subspan(bytes_per_element);
  613|  39.9k|      }
  614|  7.06k|   };
_ZN5Botan6detail8load_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS0_20unsigned_integralishEmQoosr3stdE7same_asIS4_T0_Esr3stdE7same_asIT1_S5_EEEvPS6_PKhm:
  483|  4.20k|inline constexpr void load_any(T out[], const uint8_t in[], size_t count) {
  484|       |   // asserts that *in and *out point to the correct amount of memory
  485|  4.20k|   load_any<endianness, OutT>(std::span<T>(out, count), std::span<const uint8_t>(in, count * sizeof(T)));
  486|  4.20k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges23contiguous_output_rangeENS2_4spanImLm18446744073709551615EEETkNS5_16contiguous_rangeIhEENS6_IKhLm18446744073709551615EEEQaa20unsigned_integralishINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT1_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISI_EESJ_E4type10value_typeEEoosr3stdE7same_asIS4_T0_Esr3stdE7same_asISP_SO_EEEvOSF_RKT2_:
  355|  4.20k|inline constexpr void load_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  356|  4.20k|   ranges::assert_equal_byte_lengths(out, in);
  357|  4.20k|   using element_type = std::ranges::range_value_t<OutR>;
  358|       |
  359|  4.20k|   auto load_elementwise = [&] {
  360|  4.20k|      constexpr size_t bytes_per_element = sizeof(element_type);
  361|  4.20k|      std::span<const uint8_t> in_s(in);
  362|  4.20k|      for(auto& out_elem : out) {
  363|  4.20k|         out_elem = load_any<endianness, element_type>(in_s.template first<bytes_per_element>());
  364|  4.20k|         in_s = in_s.subspan(bytes_per_element);
  365|  4.20k|      }
  366|  4.20k|   };
  367|       |
  368|       |   // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  369|       |   // internally to copy ranges on a byte-by-byte basis, which is not allowed
  370|       |   // in a `constexpr` context.
  371|  4.20k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (371:7): [Folded, False: 4.20k]
  ------------------
  372|      0|      load_elementwise();
  373|  4.20k|   } else {
  374|  4.20k|      if constexpr(endianness == std::endian::native && !custom_loadable<element_type>) {
  375|  4.20k|         typecast_copy(out, in);
  376|       |      } else {
  377|       |         load_elementwise();
  378|       |      }
  379|  4.20k|   }
  380|  4.20k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS0_20unsigned_integralishEmQoosr3stdE7same_asIS4_T0_Esr3stdE7same_asIT1_S5_EEEvPS6_PKhm:
  483|    623|inline constexpr void load_any(T out[], const uint8_t in[], size_t count) {
  484|       |   // asserts that *in and *out point to the correct amount of memory
  485|    623|   load_any<endianness, OutT>(std::span<T>(out, count), std::span<const uint8_t>(in, count * sizeof(T)));
  486|    623|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges23contiguous_output_rangeENS2_4spanImLm18446744073709551615EEETkNS5_16contiguous_rangeIhEENS6_IKhLm18446744073709551615EEEQaa20unsigned_integralishINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT1_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISI_EESJ_E4type10value_typeEEoosr3stdE7same_asIS4_T0_Esr3stdE7same_asISP_SO_EEEvOSF_RKT2_:
  355|    623|inline constexpr void load_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  356|    623|   ranges::assert_equal_byte_lengths(out, in);
  357|    623|   using element_type = std::ranges::range_value_t<OutR>;
  358|       |
  359|    623|   auto load_elementwise = [&] {
  360|    623|      constexpr size_t bytes_per_element = sizeof(element_type);
  361|    623|      std::span<const uint8_t> in_s(in);
  362|    623|      for(auto& out_elem : out) {
  363|    623|         out_elem = load_any<endianness, element_type>(in_s.template first<bytes_per_element>());
  364|    623|         in_s = in_s.subspan(bytes_per_element);
  365|    623|      }
  366|    623|   };
  367|       |
  368|       |   // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  369|       |   // internally to copy ranges on a byte-by-byte basis, which is not allowed
  370|       |   // in a `constexpr` context.
  371|    623|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (371:7): [Folded, False: 623]
  ------------------
  372|      0|      load_elementwise();
  373|    623|   } else {
  374|       |      if constexpr(endianness == std::endian::native && !custom_loadable<element_type>) {
  375|       |         typecast_copy(out, in);
  376|    623|      } else {
  377|    623|         load_elementwise();
  378|    623|      }
  379|    623|   }
  380|    623|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges23contiguous_output_rangeENS2_4spanImLm18446744073709551615EEETkNS5_16contiguous_rangeIhEENS6_IKhLm18446744073709551615EEEQaa20unsigned_integralishINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT1_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISI_EESJ_E4type10value_typeEEoosr3stdE7same_asIS4_T0_Esr3stdE7same_asISP_SO_EEEvOSF_RKT2_ENKUlvE_clEv:
  359|    623|   auto load_elementwise = [&] {
  360|    623|      constexpr size_t bytes_per_element = sizeof(element_type);
  361|    623|      std::span<const uint8_t> in_s(in);
  362|  1.24k|      for(auto& out_elem : out) {
  ------------------
  |  Branch (362:26): [True: 1.24k, False: 623]
  ------------------
  363|  1.24k|         out_elem = load_any<endianness, element_type>(in_s.template first<bytes_per_element>());
  364|  1.24k|         in_s = in_s.subspan(bytes_per_element);
  365|  1.24k|      }
  366|    623|   };
_ZN5Botan7load_beImJNSt3__14spanIKhLm8EEEEEEDaDpOT0_:
  504|   154k|inline constexpr auto load_be(ParamTs&&... params) {
  505|   154k|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|   154k|}
_ZN5Botan7load_beImJRNSt3__15arrayIhLm8EEEEEEDaDpOT0_:
  504|  27.9k|inline constexpr auto load_be(ParamTs&&... params) {
  505|  27.9k|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|  27.9k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEERNS2_5arrayIhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|  27.9k|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|  27.9k|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|  27.9k|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|  27.9k|   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|  27.9k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|  27.9k|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  27.9k|      } else {
  289|  27.9k|         const std::span in{in_range};
  290|  27.9k|         if constexpr(sizeof(OutT) == 1) {
  291|  27.9k|            return static_cast<OutT>(in[0]);
  292|  27.9k|         } else if constexpr(endianness == std::endian::native) {
  293|  27.9k|            return typecast_copy<OutT>(in);
  294|  27.9k|         } else {
  295|  27.9k|            static_assert(opposite(endianness) == std::endian::native);
  296|  27.9k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  27.9k|         }
  298|  27.9k|      }
  299|  27.9k|   }());
  300|  27.9k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEERNS2_5arrayIhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|  27.9k|   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|  27.9k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 27.9k]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  27.9k|      } else {
  289|  27.9k|         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|  27.9k|         } else {
  295|  27.9k|            static_assert(opposite(endianness) == std::endian::native);
  296|  27.9k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  27.9k|         }
  298|  27.9k|      }
  299|  27.9k|   }());
_ZN5Botan8store_beINS_6detail10AutoDetectEJRmPhEEEDaDpOT0_:
  745|    543|inline constexpr auto store_be(ParamTs&&... params) {
  746|    543|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|    543|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayIhLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_ENKUlRKT_E_clIS7_EEDaSD_:
  664|  2.28k|   auto out = []([[maybe_unused]] const auto& in) {
  665|  2.28k|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|  2.28k|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|  2.28k|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|  2.28k|            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.28k|   }(in_range);
_ZN5Botan6detail26unwrap_strong_type_or_enumITkNS0_20unsigned_integralishEhEEDaT_:
  190|  2.28k|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|  2.28k|   } else {
  195|  2.28k|      return Botan::unwrap_strong_type(t);
  196|  2.28k|   }
  197|  2.28k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEhTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm1EEEQnt15custom_storableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEEvS9_OT1_:
  525|  2.28k|inline constexpr void store_any(WrappedInT wrapped_in, OutR&& out_range) {
  526|  2.28k|   const auto in = detail::unwrap_strong_type_or_enum(wrapped_in);
  527|  2.28k|   using InT = decltype(in);
  528|  2.28k|   ranges::assert_exact_byte_length<sizeof(in)>(out_range);
  529|  2.28k|   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|  2.28k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (534:7): [Folded, False: 2.28k]
  ------------------
  535|      0|      return fallback_store_any<endianness, InT>(in, std::forward<OutR>(out_range));
  536|  2.28k|   } else {
  537|  2.28k|      if constexpr(sizeof(InT) == 1) {
  538|  2.28k|         out[0] = static_cast<uint8_t>(in);
  539|       |      } else if constexpr(endianness == std::endian::native) {
  540|       |         typecast_copy(out, in);
  541|       |      } else {
  542|       |         static_assert(opposite(endianness) == std::endian::native);
  543|       |         typecast_copy(out, reverse_bytes(in));
  544|       |      }
  545|  2.28k|   }
  546|  2.28k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206EhTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm1EEETpTkNS0_20unsigned_integralishEJhEQaagtsZT2_Li0Eooaasr3stdE7same_asINS0_10AutoDetectET0_E10all_same_vIDpT2_Eaa20unsigned_integralishIS9_E10all_same_vIS9_SB_EEEvOT1_SB_ENUlTyS9_T_E_clIhS7_EEDaS9_SE_:
  584|  2.28k|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|  2.28k|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|  2.28k|      off += sizeof(T);
  587|  2.28k|   };
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EhTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm1EEETpTkNS0_20unsigned_integralishEJhEQaagtsZT2_Li0Eooaasr3stdE7same_asINS0_10AutoDetectET0_E10all_same_vIDpT2_Eaa20unsigned_integralishIS9_E10all_same_vIS9_SB_EEEvOT1_SB_:
  582|  2.28k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, Ts... ins) {
  583|  2.28k|   ranges::assert_exact_byte_length<(sizeof(Ts) + ...)>(out);
  584|  2.28k|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|  2.28k|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|  2.28k|      off += sizeof(T);
  587|  2.28k|   };
  588|       |
  589|  2.28k|   (store_one(std::span{out}, ins), ...);
  590|  2.28k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EhTkNS_6ranges23contiguous_output_rangeIhEERNS2_5arrayIhLm1EEETkNS4_14spanable_rangeES7_Qoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asISA_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISI_EESJ_E4type10value_typeEEEEvOT1_RKSF_:
  603|  2.28k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|  2.28k|   ranges::assert_equal_byte_lengths(out, in);
  605|  2.28k|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|  2.28k|   auto store_elementwise = [&] {
  608|  2.28k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  2.28k|      std::span<uint8_t> out_s(out);
  610|  2.28k|      for(auto in_elem : in) {
  611|  2.28k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  2.28k|         out_s = out_s.subspan(bytes_per_element);
  613|  2.28k|      }
  614|  2.28k|   };
  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.28k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 2.28k]
  ------------------
  620|      0|      store_elementwise();
  621|  2.28k|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|  2.28k|      } else {
  625|  2.28k|         store_elementwise();
  626|  2.28k|      }
  627|  2.28k|   }
  628|  2.28k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayIhLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_:
  663|  2.28k|inline constexpr auto store_any(InR&& in_range) {
  664|  2.28k|   auto out = []([[maybe_unused]] const auto& in) {
  665|  2.28k|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|  2.28k|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|  2.28k|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|  2.28k|            return std::array<uint8_t, bytes>();
  669|  2.28k|         } else {
  670|  2.28k|            static_assert(
  671|  2.28k|               !std::same_as<AutoDetect, OutR>,
  672|  2.28k|               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|  2.28k|         }
  674|  2.28k|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|  2.28k|         return OutR(std::span{in}.size_bytes());
  676|  2.28k|      } else {
  677|  2.28k|         return OutR{};
  678|  2.28k|      }
  679|  2.28k|   }(in_range);
  680|       |
  681|  2.28k|   store_any<endianness, std::ranges::range_value_t<InR>>(out, std::forward<InR>(in_range));
  682|  2.28k|   return out;
  683|  2.28k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETpTkNS0_20unsigned_integralishEJhEQ10all_same_vIDpT1_EEEDaS6_:
  696|  2.28k|inline constexpr auto store_any(Ts... ins) {
  697|  2.28k|   return store_any<endianness, OutR>(std::array{ins...});
  698|  2.28k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayItLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_ENKUlRKT_E_clIS7_EEDaSD_:
  664|  4.57k|   auto out = []([[maybe_unused]] const auto& in) {
  665|  4.57k|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|  4.57k|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|  4.57k|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|  4.57k|            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|  4.57k|   }(in_range);
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206EtTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm2EEETpTkNS0_20unsigned_integralishEJtEQaagtsZT2_Li0Eooaasr3stdE7same_asINS0_10AutoDetectET0_E10all_same_vIDpT2_Eaa20unsigned_integralishIS9_E10all_same_vIS9_SB_EEEvOT1_SB_ENUlTyS9_T_E_clItS7_EEDaS9_SE_:
  584|  4.57k|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|  4.57k|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|  4.57k|      off += sizeof(T);
  587|  4.57k|   };
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EtTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm2EEETpTkNS0_20unsigned_integralishEJtEQaagtsZT2_Li0Eooaasr3stdE7same_asINS0_10AutoDetectET0_E10all_same_vIDpT2_Eaa20unsigned_integralishIS9_E10all_same_vIS9_SB_EEEvOT1_SB_:
  582|  4.57k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, Ts... ins) {
  583|  4.57k|   ranges::assert_exact_byte_length<(sizeof(Ts) + ...)>(out);
  584|  4.57k|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|  4.57k|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|  4.57k|      off += sizeof(T);
  587|  4.57k|   };
  588|       |
  589|  4.57k|   (store_one(std::span{out}, ins), ...);
  590|  4.57k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EtTkNS_6ranges23contiguous_output_rangeIhEERNS2_5arrayIhLm2EEETkNS4_14spanable_rangeENS6_ItLm1EEEQoosr3stdE7same_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|  4.57k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|  4.57k|   ranges::assert_equal_byte_lengths(out, in);
  605|  4.57k|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|  4.57k|   auto store_elementwise = [&] {
  608|  4.57k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  4.57k|      std::span<uint8_t> out_s(out);
  610|  4.57k|      for(auto in_elem : in) {
  611|  4.57k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  4.57k|         out_s = out_s.subspan(bytes_per_element);
  613|  4.57k|      }
  614|  4.57k|   };
  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|  4.57k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 4.57k]
  ------------------
  620|      0|      store_elementwise();
  621|  4.57k|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|  4.57k|      } else {
  625|  4.57k|         store_elementwise();
  626|  4.57k|      }
  627|  4.57k|   }
  628|  4.57k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayItLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_:
  663|  4.57k|inline constexpr auto store_any(InR&& in_range) {
  664|  4.57k|   auto out = []([[maybe_unused]] const auto& in) {
  665|  4.57k|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|  4.57k|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|  4.57k|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|  4.57k|            return std::array<uint8_t, bytes>();
  669|  4.57k|         } else {
  670|  4.57k|            static_assert(
  671|  4.57k|               !std::same_as<AutoDetect, OutR>,
  672|  4.57k|               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|  4.57k|         }
  674|  4.57k|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|  4.57k|         return OutR(std::span{in}.size_bytes());
  676|  4.57k|      } else {
  677|  4.57k|         return OutR{};
  678|  4.57k|      }
  679|  4.57k|   }(in_range);
  680|       |
  681|  4.57k|   store_any<endianness, std::ranges::range_value_t<InR>>(out, std::forward<InR>(in_range));
  682|  4.57k|   return out;
  683|  4.57k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETpTkNS0_20unsigned_integralishEJtEQ10all_same_vIDpT1_EEEDaS6_:
  696|  4.57k|inline constexpr auto store_any(Ts... ins) {
  697|  4.57k|   return store_any<endianness, OutR>(std::array{ins...});
  698|  4.57k|}
_ZN5Botan8store_beINS_6detail10AutoDetectEJtEEEDaDpOT0_:
  745|  2.28k|inline constexpr auto store_be(ParamTs&&... params) {
  746|  2.28k|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|  2.28k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206EhTkNS_6ranges23contiguous_output_rangeIhEERNS2_5arrayIhLm1EEETkNS4_14spanable_rangeES7_Qoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asISA_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISI_EESJ_E4type10value_typeEEEEvOT1_RKSF_ENKUlvE_clEv:
  607|  2.28k|   auto store_elementwise = [&] {
  608|  2.28k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  2.28k|      std::span<uint8_t> out_s(out);
  610|  2.28k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 2.28k, False: 2.28k]
  ------------------
  611|  2.28k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  2.28k|         out_s = out_s.subspan(bytes_per_element);
  613|  2.28k|      }
  614|  2.28k|   };
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206EtTkNS_6ranges23contiguous_output_rangeIhEERNS2_5arrayIhLm2EEETkNS4_14spanable_rangeENS6_ItLm1EEEQoosr3stdE7same_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|  4.57k|   auto store_elementwise = [&] {
  608|  4.57k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  4.57k|      std::span<uint8_t> out_s(out);
  610|  4.57k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 4.57k, False: 4.57k]
  ------------------
  611|  4.57k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  4.57k|         out_s = out_s.subspan(bytes_per_element);
  613|  4.57k|      }
  614|  4.57k|   };
_ZN5Botan8store_beINS_6detail10AutoDetectEJhEEEDaDpOT0_:
  745|  2.28k|inline constexpr auto store_be(ParamTs&&... params) {
  746|  2.28k|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|  2.28k|}
_ZN5Botan8store_beINS_6detail10AutoDetectEJRKjPhEEEDaDpOT0_:
  745|  10.4k|inline constexpr auto store_be(ParamTs&&... params) {
  746|  10.4k|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|  10.4k|}
_ZN5Botan8store_beINS_6detail10AutoDetectEJjPhEEEDaDpOT0_:
  745|    696|inline constexpr auto store_be(ParamTs&&... params) {
  746|    696|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|    696|}
_ZN5Botan7load_leIjJPjPKhmEEEDaDpOT0_:
  495|      2|inline constexpr auto load_le(ParamTs&&... params) {
  496|      2|   return detail::load_any<std::endian::little, OutT>(std::forward<ParamTs>(params)...);
  497|      2|}
_ZN5Botan6detail8load_anyILNSt3__16endianE57005EjTkNS0_20unsigned_integralishEjQoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asIT1_S5_EEEvPS6_PKhm:
  483|      2|inline constexpr void load_any(T out[], const uint8_t in[], size_t count) {
  484|       |   // asserts that *in and *out point to the correct amount of memory
  485|      2|   load_any<endianness, OutT>(std::span<T>(out, count), std::span<const uint8_t>(in, count * sizeof(T)));
  486|      2|}
_ZN5Botan6detail8load_anyILNSt3__16endianE57005EjTkNS_6ranges23contiguous_output_rangeENS2_4spanIjLm18446744073709551615EEETkNS4_16contiguous_rangeIhEENS5_IKhLm18446744073709551615EEEQaa20unsigned_integralishINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT1_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISH_EESI_E4type10value_typeEEoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asISP_SN_EEEvOSE_RKT2_:
  355|      2|inline constexpr void load_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  356|      2|   ranges::assert_equal_byte_lengths(out, in);
  357|      2|   using element_type = std::ranges::range_value_t<OutR>;
  358|       |
  359|      2|   auto load_elementwise = [&] {
  360|      2|      constexpr size_t bytes_per_element = sizeof(element_type);
  361|      2|      std::span<const uint8_t> in_s(in);
  362|      2|      for(auto& out_elem : out) {
  363|      2|         out_elem = load_any<endianness, element_type>(in_s.template first<bytes_per_element>());
  364|      2|         in_s = in_s.subspan(bytes_per_element);
  365|      2|      }
  366|      2|   };
  367|       |
  368|       |   // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  369|       |   // internally to copy ranges on a byte-by-byte basis, which is not allowed
  370|       |   // in a `constexpr` context.
  371|      2|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (371:7): [Folded, False: 2]
  ------------------
  372|      0|      load_elementwise();
  373|      2|   } else {
  374|      2|      if constexpr(endianness == std::endian::native && !custom_loadable<element_type>) {
  375|      2|         typecast_copy(out, in);
  376|       |      } else {
  377|       |         load_elementwise();
  378|       |      }
  379|      2|   }
  380|      2|}
_ZN5Botan7load_beIjJPhiEEEDaDpOT0_:
  504|    439|inline constexpr auto load_be(ParamTs&&... params) {
  505|    439|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|    439|}
_ZN5Botan7load_beImJPhiEEEDaDpOT0_:
  504|  3.79k|inline constexpr auto load_be(ParamTs&&... params) {
  505|  3.79k|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|  3.79k|}
_ZN5Botan7load_beIhJPKhRmEEEDaDpOT0_:
  504|  1.63M|inline constexpr auto load_be(ParamTs&&... params) {
  505|  1.63M|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|  1.63M|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEhEET0_PKhm:
  454|  1.63M|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|  1.63M|   constexpr size_t out_size = sizeof(OutT);
  457|  1.63M|   return load_any<endianness, OutT>(std::span<const uint8_t, out_size>(in + off * out_size, out_size));
  458|  1.63M|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEhTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm1EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|  1.63M|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|  1.63M|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|  1.63M|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|  1.63M|   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|  1.63M|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|  1.63M|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  1.63M|      } else {
  289|  1.63M|         const std::span in{in_range};
  290|  1.63M|         if constexpr(sizeof(OutT) == 1) {
  291|  1.63M|            return static_cast<OutT>(in[0]);
  292|  1.63M|         } else if constexpr(endianness == std::endian::native) {
  293|  1.63M|            return typecast_copy<OutT>(in);
  294|  1.63M|         } else {
  295|  1.63M|            static_assert(opposite(endianness) == std::endian::native);
  296|  1.63M|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  1.63M|         }
  298|  1.63M|      }
  299|  1.63M|   }());
  300|  1.63M|}
_ZN5Botan6detail24wrap_strong_type_or_enumITkNS0_20unsigned_integralishEhTkNSt3__117unsigned_integralEhEEDaT0_:
  200|  1.63M|constexpr auto wrap_strong_type_or_enum(T t) {
  201|       |   if constexpr(std::is_enum_v<OutT>) {
  202|       |      return static_cast<OutT>(t);
  203|  1.63M|   } else {
  204|  1.63M|      return Botan::wrap_strong_type<OutT>(t);
  205|  1.63M|   }
  206|  1.63M|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEhTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm1EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|  1.63M|   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|  1.63M|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 1.63M]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  1.63M|      } else {
  289|  1.63M|         const std::span in{in_range};
  290|  1.63M|         if constexpr(sizeof(OutT) == 1) {
  291|  1.63M|            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|  1.63M|      }
  299|  1.63M|   }());
_ZN5Botan12get_byte_varIhEEhmT_:
   69|   458k|inline constexpr uint8_t get_byte_var(size_t byte_num, T input) {
   70|   458k|   return static_cast<uint8_t>(input >> (((~byte_num) & (sizeof(T) - 1)) << 3));
   71|   458k|}
_ZN5Botan8store_beINS_6detail10AutoDetectEJRKmRKNSt3__14spanIhLm18446744073709551615EEEEEEDaDpOT0_:
  745|  2.81k|inline constexpr auto store_be(ParamTs&&... params) {
  746|  2.81k|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|  2.81k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS0_20unsigned_integralishEmTkNS_6ranges23contiguous_output_rangeIhEERKNS2_4spanIhLm18446744073709551615EEEQsr3stdE7same_asIS4_T0_EEEvT1_OT2_:
  646|  2.81k|inline constexpr void store_any(T in, OutR&& out_range) {
  647|  2.81k|   store_any<endianness, T>(in, std::forward<OutR>(out_range));
  648|  2.81k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges23contiguous_output_rangeIhEERKNS2_4spanIhLm18446744073709551615EEEQnt15custom_storableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEEvSB_OT1_:
  525|  2.81k|inline constexpr void store_any(WrappedInT wrapped_in, OutR&& out_range) {
  526|  2.81k|   const auto in = detail::unwrap_strong_type_or_enum(wrapped_in);
  527|  2.81k|   using InT = decltype(in);
  528|  2.81k|   ranges::assert_exact_byte_length<sizeof(in)>(out_range);
  529|  2.81k|   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|  2.81k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (534:7): [Folded, False: 2.81k]
  ------------------
  535|      0|      return fallback_store_any<endianness, InT>(in, std::forward<OutR>(out_range));
  536|  2.81k|   } 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|  2.81k|      } else {
  542|  2.81k|         static_assert(opposite(endianness) == std::endian::native);
  543|  2.81k|         typecast_copy(out, reverse_bytes(in));
  544|  2.81k|      }
  545|  2.81k|   }
  546|  2.81k|}
_ZN5Botan7load_beINS_6detail10AutoDetectEJNSt3__14spanIKhLm2EEEEEEDaDpOT0_:
  504|   144k|inline constexpr auto load_be(ParamTs&&... params) {
  505|   144k|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|   144k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm2EEEQoosr3stdE7same_asIS4_T0_Eaaoosr6rangesE25statically_spanable_rangeISA_Esr8conceptsE19resizable_containerISA_E20unsigned_integralishINSA_10value_typeEEEEDaOT1_:
  397|   144k|inline constexpr auto load_any(InR&& in_range) {
  398|   144k|   auto out = []([[maybe_unused]] const auto& in) {
  399|   144k|      if constexpr(std::same_as<AutoDetect, OutT>) {
  400|   144k|         if constexpr(ranges::statically_spanable_range<InR>) {
  401|   144k|            constexpr size_t extent = decltype(std::span{in})::extent;
  402|       |
  403|       |            // clang-format off
  404|   144k|            using type =
  405|   144k|               std::conditional_t<extent == 1, uint8_t,
  406|   144k|               std::conditional_t<extent == 2, uint16_t,
  407|   144k|               std::conditional_t<extent == 4, uint32_t,
  408|   144k|               std::conditional_t<extent == 8, uint64_t, void>>>>;
  409|       |            // clang-format on
  410|       |
  411|   144k|            static_assert(
  412|   144k|               !std::is_void_v<type>,
  413|   144k|               "Cannot determine the output type based on a statically sized bytearray with length other than those: 1, 2, 4, 8");
  414|       |
  415|   144k|            return type{};
  416|   144k|         } else {
  417|   144k|            static_assert(
  418|   144k|               !std::same_as<AutoDetect, OutT>,
  419|   144k|               "cannot infer return type from a dynamic range at compile time, please specify it explicitly");
  420|   144k|         }
  421|   144k|      } else if constexpr(concepts::resizable_container<OutT>) {
  422|   144k|         const size_t in_bytes = std::span{in}.size_bytes();
  423|   144k|         constexpr size_t out_elem_bytes = sizeof(typename OutT::value_type);
  424|   144k|         BOTAN_ARG_CHECK(in_bytes % out_elem_bytes == 0,
  425|   144k|                         "Input range is not word-aligned with the requested output range");
  426|   144k|         return OutT(in_bytes / out_elem_bytes);
  427|   144k|      } else {
  428|   144k|         return OutT{};
  429|   144k|      }
  430|   144k|   }(in_range);
  431|       |
  432|   144k|   using out_type = decltype(out);
  433|   144k|   if constexpr(unsigned_integralish<out_type>) {
  434|   144k|      out = load_any<endianness, out_type>(std::forward<InR>(in_range));
  435|       |   } else {
  436|       |      static_assert(ranges::contiguous_range<out_type>);
  437|       |      using out_range_type = std::ranges::range_value_t<out_type>;
  438|       |      load_any<endianness, out_range_type>(out, std::forward<InR>(in_range));
  439|       |   }
  440|   144k|   return out;
  441|   144k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm2EEEQoosr3stdE7same_asIS4_T0_Eaaoosr6rangesE25statically_spanable_rangeISA_Esr8conceptsE19resizable_containerISA_E20unsigned_integralishINSA_10value_typeEEEEDaOT1_ENKUlRKT_E_clIS9_EEDaSG_:
  398|   144k|   auto out = []([[maybe_unused]] const auto& in) {
  399|   144k|      if constexpr(std::same_as<AutoDetect, OutT>) {
  400|   144k|         if constexpr(ranges::statically_spanable_range<InR>) {
  401|   144k|            constexpr size_t extent = decltype(std::span{in})::extent;
  402|       |
  403|       |            // clang-format off
  404|   144k|            using type =
  405|   144k|               std::conditional_t<extent == 1, uint8_t,
  406|   144k|               std::conditional_t<extent == 2, uint16_t,
  407|   144k|               std::conditional_t<extent == 4, uint32_t,
  408|   144k|               std::conditional_t<extent == 8, uint64_t, void>>>>;
  409|       |            // clang-format on
  410|       |
  411|   144k|            static_assert(
  412|   144k|               !std::is_void_v<type>,
  413|   144k|               "Cannot determine the output type based on a statically sized bytearray with length other than those: 1, 2, 4, 8");
  414|       |
  415|   144k|            return type{};
  416|       |         } else {
  417|       |            static_assert(
  418|       |               !std::same_as<AutoDetect, OutT>,
  419|       |               "cannot infer return type from a dynamic range at compile time, please specify it explicitly");
  420|       |         }
  421|       |      } else if constexpr(concepts::resizable_container<OutT>) {
  422|       |         const size_t in_bytes = std::span{in}.size_bytes();
  423|       |         constexpr size_t out_elem_bytes = sizeof(typename OutT::value_type);
  424|       |         BOTAN_ARG_CHECK(in_bytes % out_elem_bytes == 0,
  425|       |                         "Input range is not word-aligned with the requested output range");
  426|       |         return OutT(in_bytes / out_elem_bytes);
  427|       |      } else {
  428|       |         return OutT{};
  429|       |      }
  430|   144k|   }(in_range);
_ZN5Botan7load_beItJPKhiEEEDaDpOT0_:
  504|  2.17k|inline constexpr auto load_be(ParamTs&&... params) {
  505|  2.17k|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|  2.17k|}
_ZN5Botan8store_beINS_6detail10AutoDetectEJRtPhEEEDaDpOT0_:
  745|     16|inline constexpr auto store_be(ParamTs&&... params) {
  746|     16|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|     16|}
_ZN5Botan8store_beINS_6detail10AutoDetectEJmmEEEDaDpOT0_:
  745|    114|inline constexpr auto store_be(ParamTs&&... params) {
  746|    114|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|    114|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETpTkNS0_20unsigned_integralishEJmmEQ10all_same_vIDpT1_EEEDaS6_:
  696|    114|inline constexpr auto store_any(Ts... ins) {
  697|    114|   return store_any<endianness, OutR>(std::array{ins...});
  698|    114|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayImLm2EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_:
  663|    114|inline constexpr auto store_any(InR&& in_range) {
  664|    114|   auto out = []([[maybe_unused]] const auto& in) {
  665|    114|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|    114|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|    114|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|    114|            return std::array<uint8_t, bytes>();
  669|    114|         } else {
  670|    114|            static_assert(
  671|    114|               !std::same_as<AutoDetect, OutR>,
  672|    114|               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|    114|         }
  674|    114|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|    114|         return OutR(std::span{in}.size_bytes());
  676|    114|      } else {
  677|    114|         return OutR{};
  678|    114|      }
  679|    114|   }(in_range);
  680|       |
  681|    114|   store_any<endianness, std::ranges::range_value_t<InR>>(out, std::forward<InR>(in_range));
  682|    114|   return out;
  683|    114|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayImLm2EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_ENKUlRKT_E_clIS7_EEDaSD_:
  664|    114|   auto out = []([[maybe_unused]] const auto& in) {
  665|    114|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|    114|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|    114|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|    114|            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|    114|   }(in_range);
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEERNS2_5arrayIhLm16EEETkNS4_14spanable_rangeENS6_ImLm2EEEQoosr3stdE7same_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|    114|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|    114|   ranges::assert_equal_byte_lengths(out, in);
  605|    114|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|    114|   auto store_elementwise = [&] {
  608|    114|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    114|      std::span<uint8_t> out_s(out);
  610|    114|      for(auto in_elem : in) {
  611|    114|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|    114|         out_s = out_s.subspan(bytes_per_element);
  613|    114|      }
  614|    114|   };
  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|    114|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 114]
  ------------------
  620|      0|      store_elementwise();
  621|    114|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|    114|      } else {
  625|    114|         store_elementwise();
  626|    114|      }
  627|    114|   }
  628|    114|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEERNS2_5arrayIhLm16EEETkNS4_14spanable_rangeENS6_ImLm2EEEQoosr3stdE7same_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|    114|   auto store_elementwise = [&] {
  608|    114|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    114|      std::span<uint8_t> out_s(out);
  610|    228|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 228, False: 114]
  ------------------
  611|    228|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|    228|         out_s = out_s.subspan(bytes_per_element);
  613|    228|      }
  614|    114|   };
_ZN5Botan7load_beINS_6detail10AutoDetectEJRA2_mRPKhmEEEDaDpOT0_:
  504|    623|inline constexpr auto load_be(ParamTs&&... params) {
  505|    623|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|    623|}
_ZN5Botan11copy_out_beITkNS_6ranges14spanable_rangeEA2_mEEvNSt3__14spanIhLm18446744073709551615EEERKT_:
  773|    623|inline void copy_out_be(std::span<uint8_t> out, const InR& in) {
  774|    623|   using T = std::ranges::range_value_t<InR>;
  775|    623|   std::span<const T> in_s{in};
  776|    623|   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|    623|   for(size_t i = 0; i < remaining_bytes; ++i) {
  ------------------
  |  Branch (779:22): [True: 0, False: 623]
  ------------------
  780|      0|      out[i] = get_byte_var(i, in_s.front());
  781|      0|   }
  782|    623|}
_ZN5Botan7load_leINS_6detail10AutoDetectEJRA4_mRA8_hRKmEEEDaDpOT0_:
  495|  1.88k|inline constexpr auto load_le(ParamTs&&... params) {
  496|  1.88k|   return detail::load_any<std::endian::little, OutT>(std::forward<ParamTs>(params)...);
  497|  1.88k|}
_ZN5Botan8store_beINSt3__16vectorIhNS1_9allocatorIhEEEEJRA8_mEEEDaDpOT0_:
  745|  1.88k|inline constexpr auto store_be(ParamTs&&... params) {
  746|  1.88k|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|  1.88k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS2_6vectorIhNS2_9allocatorIhEEEETkNS_6ranges14spanable_rangeERA8_mQoooosr3stdE7same_asINS0_10AutoDetectET0_Eaasr6rangesE25statically_spanable_rangeISC_Esr3stdE21default_initializableISC_Esr8conceptsE21resizable_byte_bufferISC_EEEDaOT1_:
  663|  1.88k|inline constexpr auto store_any(InR&& in_range) {
  664|  1.88k|   auto out = []([[maybe_unused]] const auto& in) {
  665|  1.88k|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|  1.88k|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|  1.88k|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|  1.88k|            return std::array<uint8_t, bytes>();
  669|  1.88k|         } else {
  670|  1.88k|            static_assert(
  671|  1.88k|               !std::same_as<AutoDetect, OutR>,
  672|  1.88k|               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|  1.88k|         }
  674|  1.88k|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|  1.88k|         return OutR(std::span{in}.size_bytes());
  676|  1.88k|      } else {
  677|  1.88k|         return OutR{};
  678|  1.88k|      }
  679|  1.88k|   }(in_range);
  680|       |
  681|  1.88k|   store_any<endianness, std::ranges::range_value_t<InR>>(out, std::forward<InR>(in_range));
  682|  1.88k|   return out;
  683|  1.88k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206ENS2_6vectorIhNS2_9allocatorIhEEEETkNS_6ranges14spanable_rangeERA8_mQoooosr3stdE7same_asINS0_10AutoDetectET0_Eaasr6rangesE25statically_spanable_rangeISC_Esr3stdE21default_initializableISC_Esr8conceptsE21resizable_byte_bufferISC_EEEDaOT1_ENKUlRKT_E_clIS9_EEDaSH_:
  664|  1.88k|   auto out = []([[maybe_unused]] const auto& in) {
  665|       |      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|       |         if constexpr(ranges::statically_spanable_range<InR>) {
  667|       |            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|       |            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|  1.88k|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|  1.88k|         return OutR(std::span{in}.size_bytes());
  676|       |      } else {
  677|       |         return OutR{};
  678|       |      }
  679|  1.88k|   }(in_range);
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEERNS2_6vectorIhNS2_9allocatorIhEEEETkNS4_14spanable_rangeEA8_mQoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asISD_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISL_EESM_E4type10value_typeEEEEvOT1_RKSI_:
  603|  1.88k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|  1.88k|   ranges::assert_equal_byte_lengths(out, in);
  605|  1.88k|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|  1.88k|   auto store_elementwise = [&] {
  608|  1.88k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  1.88k|      std::span<uint8_t> out_s(out);
  610|  1.88k|      for(auto in_elem : in) {
  611|  1.88k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  1.88k|         out_s = out_s.subspan(bytes_per_element);
  613|  1.88k|      }
  614|  1.88k|   };
  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|  1.88k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 1.88k]
  ------------------
  620|      0|      store_elementwise();
  621|  1.88k|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|  1.88k|      } else {
  625|  1.88k|         store_elementwise();
  626|  1.88k|      }
  627|  1.88k|   }
  628|  1.88k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEERNS2_6vectorIhNS2_9allocatorIhEEEETkNS4_14spanable_rangeEA8_mQoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asISD_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISL_EESM_E4type10value_typeEEEEvOT1_RKSI_ENKUlvE_clEv:
  607|  1.88k|   auto store_elementwise = [&] {
  608|  1.88k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  1.88k|      std::span<uint8_t> out_s(out);
  610|  15.0k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 15.0k, False: 1.88k]
  ------------------
  611|  15.0k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  15.0k|         out_s = out_s.subspan(bytes_per_element);
  613|  15.0k|      }
  614|  1.88k|   };
_ZN5Botan8store_beINS_6detail10AutoDetectEJRNSt3__14spanIhLm32EEERNS3_5arrayImLm4EEEEEEDaDpOT0_:
  745|  29.4k|inline constexpr auto store_be(ParamTs&&... params) {
  746|  29.4k|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|  29.4k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges23contiguous_output_rangeIhEERNS2_4spanIhLm32EEETkNS5_14spanable_rangeENS2_5arrayImLm4EEEQoosr3stdE7same_asIS4_T0_Esr3stdE7same_asISC_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISK_EESL_E4type10value_typeEEEEvOT1_RKSH_:
  603|  29.4k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|  29.4k|   ranges::assert_equal_byte_lengths(out, in);
  605|  29.4k|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|  29.4k|   auto store_elementwise = [&] {
  608|  29.4k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  29.4k|      std::span<uint8_t> out_s(out);
  610|  29.4k|      for(auto in_elem : in) {
  611|  29.4k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  29.4k|         out_s = out_s.subspan(bytes_per_element);
  613|  29.4k|      }
  614|  29.4k|   };
  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|  29.4k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 29.4k]
  ------------------
  620|      0|      store_elementwise();
  621|  29.4k|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|  29.4k|      } else {
  625|  29.4k|         store_elementwise();
  626|  29.4k|      }
  627|  29.4k|   }
  628|  29.4k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges23contiguous_output_rangeIhEERNS2_4spanIhLm32EEETkNS5_14spanable_rangeENS2_5arrayImLm4EEEQoosr3stdE7same_asIS4_T0_Esr3stdE7same_asISC_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISK_EESL_E4type10value_typeEEEEvOT1_RKSH_ENKUlvE_clEv:
  607|  29.4k|   auto store_elementwise = [&] {
  608|  29.4k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  29.4k|      std::span<uint8_t> out_s(out);
  610|   117k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 117k, False: 29.4k]
  ------------------
  611|   117k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|   117k|         out_s = out_s.subspan(bytes_per_element);
  613|   117k|      }
  614|  29.4k|   };
_ZN5Botan7load_beImJPKhmEEEDaDpOT0_:
  504|   253k|inline constexpr auto load_be(ParamTs&&... params) {
  505|   253k|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|   253k|}
_ZN5Botan7load_leINS_6detail10AutoDetectEJRA6_mRA8_hRKmEEEDaDpOT0_:
  495|    980|inline constexpr auto load_le(ParamTs&&... params) {
  496|    980|   return detail::load_any<std::endian::little, OutT>(std::forward<ParamTs>(params)...);
  497|    980|}
_ZN5Botan8store_beINSt3__16vectorIhNS1_9allocatorIhEEEEJRA12_mEEEDaDpOT0_:
  745|    980|inline constexpr auto store_be(ParamTs&&... params) {
  746|    980|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|    980|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS2_6vectorIhNS2_9allocatorIhEEEETkNS_6ranges14spanable_rangeERA12_mQoooosr3stdE7same_asINS0_10AutoDetectET0_Eaasr6rangesE25statically_spanable_rangeISC_Esr3stdE21default_initializableISC_Esr8conceptsE21resizable_byte_bufferISC_EEEDaOT1_:
  663|    980|inline constexpr auto store_any(InR&& in_range) {
  664|    980|   auto out = []([[maybe_unused]] const auto& in) {
  665|    980|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|    980|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|    980|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|    980|            return std::array<uint8_t, bytes>();
  669|    980|         } else {
  670|    980|            static_assert(
  671|    980|               !std::same_as<AutoDetect, OutR>,
  672|    980|               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|    980|         }
  674|    980|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|    980|         return OutR(std::span{in}.size_bytes());
  676|    980|      } else {
  677|    980|         return OutR{};
  678|    980|      }
  679|    980|   }(in_range);
  680|       |
  681|    980|   store_any<endianness, std::ranges::range_value_t<InR>>(out, std::forward<InR>(in_range));
  682|    980|   return out;
  683|    980|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206ENS2_6vectorIhNS2_9allocatorIhEEEETkNS_6ranges14spanable_rangeERA12_mQoooosr3stdE7same_asINS0_10AutoDetectET0_Eaasr6rangesE25statically_spanable_rangeISC_Esr3stdE21default_initializableISC_Esr8conceptsE21resizable_byte_bufferISC_EEEDaOT1_ENKUlRKT_E_clIS9_EEDaSH_:
  664|    980|   auto out = []([[maybe_unused]] const auto& in) {
  665|       |      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|       |         if constexpr(ranges::statically_spanable_range<InR>) {
  667|       |            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|       |            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|    980|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|    980|         return OutR(std::span{in}.size_bytes());
  676|       |      } else {
  677|       |         return OutR{};
  678|       |      }
  679|    980|   }(in_range);
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEERNS2_6vectorIhNS2_9allocatorIhEEEETkNS4_14spanable_rangeEA12_mQoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asISD_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISL_EESM_E4type10value_typeEEEEvOT1_RKSI_:
  603|    980|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|    980|   ranges::assert_equal_byte_lengths(out, in);
  605|    980|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|    980|   auto store_elementwise = [&] {
  608|    980|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    980|      std::span<uint8_t> out_s(out);
  610|    980|      for(auto in_elem : in) {
  611|    980|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|    980|         out_s = out_s.subspan(bytes_per_element);
  613|    980|      }
  614|    980|   };
  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|    980|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 980]
  ------------------
  620|      0|      store_elementwise();
  621|    980|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|    980|      } else {
  625|    980|         store_elementwise();
  626|    980|      }
  627|    980|   }
  628|    980|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEERNS2_6vectorIhNS2_9allocatorIhEEEETkNS4_14spanable_rangeEA12_mQoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asISD_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISL_EESM_E4type10value_typeEEEEvOT1_RKSI_ENKUlvE_clEv:
  607|    980|   auto store_elementwise = [&] {
  608|    980|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    980|      std::span<uint8_t> out_s(out);
  610|  11.7k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 11.7k, False: 980]
  ------------------
  611|  11.7k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  11.7k|         out_s = out_s.subspan(bytes_per_element);
  613|  11.7k|      }
  614|    980|   };
_ZN5Botan8store_beINS_6detail10AutoDetectEJRNSt3__14spanIhLm48EEERNS3_5arrayImLm6EEEEEEDaDpOT0_:
  745|  5.01k|inline constexpr auto store_be(ParamTs&&... params) {
  746|  5.01k|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|  5.01k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges23contiguous_output_rangeIhEERNS2_4spanIhLm48EEETkNS5_14spanable_rangeENS2_5arrayImLm6EEEQoosr3stdE7same_asIS4_T0_Esr3stdE7same_asISC_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISK_EESL_E4type10value_typeEEEEvOT1_RKSH_:
  603|  5.01k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|  5.01k|   ranges::assert_equal_byte_lengths(out, in);
  605|  5.01k|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|  5.01k|   auto store_elementwise = [&] {
  608|  5.01k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  5.01k|      std::span<uint8_t> out_s(out);
  610|  5.01k|      for(auto in_elem : in) {
  611|  5.01k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  5.01k|         out_s = out_s.subspan(bytes_per_element);
  613|  5.01k|      }
  614|  5.01k|   };
  615|       |
  616|       |   // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  617|       |   // internally to copy ranges on a byte-by-byte basis, which is not allowed
  618|       |   // in a `constexpr` context.
  619|  5.01k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 5.01k]
  ------------------
  620|      0|      store_elementwise();
  621|  5.01k|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|  5.01k|      } else {
  625|  5.01k|         store_elementwise();
  626|  5.01k|      }
  627|  5.01k|   }
  628|  5.01k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges23contiguous_output_rangeIhEERNS2_4spanIhLm48EEETkNS5_14spanable_rangeENS2_5arrayImLm6EEEQoosr3stdE7same_asIS4_T0_Esr3stdE7same_asISC_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISK_EESL_E4type10value_typeEEEEvOT1_RKSH_ENKUlvE_clEv:
  607|  5.01k|   auto store_elementwise = [&] {
  608|  5.01k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  5.01k|      std::span<uint8_t> out_s(out);
  610|  30.0k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 30.0k, False: 5.01k]
  ------------------
  611|  30.0k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  30.0k|         out_s = out_s.subspan(bytes_per_element);
  613|  30.0k|      }
  614|  5.01k|   };
_ZN5Botan7load_leINS_6detail10AutoDetectEJRA8_mRA8_hRKmEEEDaDpOT0_:
  495|    572|inline constexpr auto load_le(ParamTs&&... params) {
  496|    572|   return detail::load_any<std::endian::little, OutT>(std::forward<ParamTs>(params)...);
  497|    572|}
_ZN5Botan8store_beINSt3__16vectorIhNS1_9allocatorIhEEEEJRA16_mEEEDaDpOT0_:
  745|    572|inline constexpr auto store_be(ParamTs&&... params) {
  746|    572|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|    572|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS2_6vectorIhNS2_9allocatorIhEEEETkNS_6ranges14spanable_rangeERA16_mQoooosr3stdE7same_asINS0_10AutoDetectET0_Eaasr6rangesE25statically_spanable_rangeISC_Esr3stdE21default_initializableISC_Esr8conceptsE21resizable_byte_bufferISC_EEEDaOT1_:
  663|    572|inline constexpr auto store_any(InR&& in_range) {
  664|    572|   auto out = []([[maybe_unused]] const auto& in) {
  665|    572|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|    572|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|    572|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|    572|            return std::array<uint8_t, bytes>();
  669|    572|         } else {
  670|    572|            static_assert(
  671|    572|               !std::same_as<AutoDetect, OutR>,
  672|    572|               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|    572|         }
  674|    572|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|    572|         return OutR(std::span{in}.size_bytes());
  676|    572|      } else {
  677|    572|         return OutR{};
  678|    572|      }
  679|    572|   }(in_range);
  680|       |
  681|    572|   store_any<endianness, std::ranges::range_value_t<InR>>(out, std::forward<InR>(in_range));
  682|    572|   return out;
  683|    572|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206ENS2_6vectorIhNS2_9allocatorIhEEEETkNS_6ranges14spanable_rangeERA16_mQoooosr3stdE7same_asINS0_10AutoDetectET0_Eaasr6rangesE25statically_spanable_rangeISC_Esr3stdE21default_initializableISC_Esr8conceptsE21resizable_byte_bufferISC_EEEDaOT1_ENKUlRKT_E_clIS9_EEDaSH_:
  664|    572|   auto out = []([[maybe_unused]] const auto& in) {
  665|       |      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|       |         if constexpr(ranges::statically_spanable_range<InR>) {
  667|       |            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|       |            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|    572|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|    572|         return OutR(std::span{in}.size_bytes());
  676|       |      } else {
  677|       |         return OutR{};
  678|       |      }
  679|    572|   }(in_range);
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEERNS2_6vectorIhNS2_9allocatorIhEEEETkNS4_14spanable_rangeEA16_mQoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asISD_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISL_EESM_E4type10value_typeEEEEvOT1_RKSI_:
  603|    572|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|    572|   ranges::assert_equal_byte_lengths(out, in);
  605|    572|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|    572|   auto store_elementwise = [&] {
  608|    572|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    572|      std::span<uint8_t> out_s(out);
  610|    572|      for(auto in_elem : in) {
  611|    572|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|    572|         out_s = out_s.subspan(bytes_per_element);
  613|    572|      }
  614|    572|   };
  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|    572|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 572]
  ------------------
  620|      0|      store_elementwise();
  621|    572|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|    572|      } else {
  625|    572|         store_elementwise();
  626|    572|      }
  627|    572|   }
  628|    572|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEERNS2_6vectorIhNS2_9allocatorIhEEEETkNS4_14spanable_rangeEA16_mQoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asISD_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISL_EESM_E4type10value_typeEEEEvOT1_RKSI_ENKUlvE_clEv:
  607|    572|   auto store_elementwise = [&] {
  608|    572|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    572|      std::span<uint8_t> out_s(out);
  610|  9.15k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 9.15k, False: 572]
  ------------------
  611|  9.15k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  9.15k|         out_s = out_s.subspan(bytes_per_element);
  613|  9.15k|      }
  614|    572|   };
_ZN5Botan8store_beINS_6detail10AutoDetectEJRNSt3__14spanIhLm64EEERNS3_5arrayImLm8EEEEEEDaDpOT0_:
  745|  2.98k|inline constexpr auto store_be(ParamTs&&... params) {
  746|  2.98k|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|  2.98k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges23contiguous_output_rangeIhEERNS2_4spanIhLm64EEETkNS5_14spanable_rangeENS2_5arrayImLm8EEEQoosr3stdE7same_asIS4_T0_Esr3stdE7same_asISC_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISK_EESL_E4type10value_typeEEEEvOT1_RKSH_:
  603|  2.98k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|  2.98k|   ranges::assert_equal_byte_lengths(out, in);
  605|  2.98k|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|  2.98k|   auto store_elementwise = [&] {
  608|  2.98k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  2.98k|      std::span<uint8_t> out_s(out);
  610|  2.98k|      for(auto in_elem : in) {
  611|  2.98k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  2.98k|         out_s = out_s.subspan(bytes_per_element);
  613|  2.98k|      }
  614|  2.98k|   };
  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.98k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 2.98k]
  ------------------
  620|      0|      store_elementwise();
  621|  2.98k|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|  2.98k|      } else {
  625|  2.98k|         store_elementwise();
  626|  2.98k|      }
  627|  2.98k|   }
  628|  2.98k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges23contiguous_output_rangeIhEERNS2_4spanIhLm64EEETkNS5_14spanable_rangeENS2_5arrayImLm8EEEQoosr3stdE7same_asIS4_T0_Esr3stdE7same_asISC_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISK_EESL_E4type10value_typeEEEEvOT1_RKSH_ENKUlvE_clEv:
  607|  2.98k|   auto store_elementwise = [&] {
  608|  2.98k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  2.98k|      std::span<uint8_t> out_s(out);
  610|  23.9k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 23.9k, False: 2.98k]
  ------------------
  611|  23.9k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  23.9k|         out_s = out_s.subspan(bytes_per_element);
  613|  23.9k|      }
  614|  2.98k|   };
_ZN5Botan8store_beINS_6detail10AutoDetectEJRNSt3__15arrayImLm9EEEEEEDaDpOT0_:
  745|  4.26k|inline constexpr auto store_be(ParamTs&&... params) {
  746|  4.26k|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|  4.26k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges14spanable_rangeERNS2_5arrayImLm9EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS9_Esr3stdE21default_initializableIS9_Esr8conceptsE21resizable_byte_bufferIS9_EEEDaOT1_:
  663|  4.26k|inline constexpr auto store_any(InR&& in_range) {
  664|  4.26k|   auto out = []([[maybe_unused]] const auto& in) {
  665|  4.26k|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|  4.26k|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|  4.26k|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|  4.26k|            return std::array<uint8_t, bytes>();
  669|  4.26k|         } else {
  670|  4.26k|            static_assert(
  671|  4.26k|               !std::same_as<AutoDetect, OutR>,
  672|  4.26k|               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|  4.26k|         }
  674|  4.26k|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|  4.26k|         return OutR(std::span{in}.size_bytes());
  676|  4.26k|      } else {
  677|  4.26k|         return OutR{};
  678|  4.26k|      }
  679|  4.26k|   }(in_range);
  680|       |
  681|  4.26k|   store_any<endianness, std::ranges::range_value_t<InR>>(out, std::forward<InR>(in_range));
  682|  4.26k|   return out;
  683|  4.26k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges14spanable_rangeERNS2_5arrayImLm9EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS9_Esr3stdE21default_initializableIS9_Esr8conceptsE21resizable_byte_bufferIS9_EEEDaOT1_ENKUlRKT_E_clIS7_EEDaSE_:
  664|  4.26k|   auto out = []([[maybe_unused]] const auto& in) {
  665|  4.26k|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|  4.26k|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|  4.26k|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|  4.26k|            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|  4.26k|   }(in_range);
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEERNS2_5arrayIhLm72EEETkNS4_14spanable_rangeENS6_ImLm9EEEQoosr3stdE7same_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|  4.26k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|  4.26k|   ranges::assert_equal_byte_lengths(out, in);
  605|  4.26k|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|  4.26k|   auto store_elementwise = [&] {
  608|  4.26k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  4.26k|      std::span<uint8_t> out_s(out);
  610|  4.26k|      for(auto in_elem : in) {
  611|  4.26k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  4.26k|         out_s = out_s.subspan(bytes_per_element);
  613|  4.26k|      }
  614|  4.26k|   };
  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|  4.26k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 4.26k]
  ------------------
  620|      0|      store_elementwise();
  621|  4.26k|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|  4.26k|      } else {
  625|  4.26k|         store_elementwise();
  626|  4.26k|      }
  627|  4.26k|   }
  628|  4.26k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEERNS2_5arrayIhLm72EEETkNS4_14spanable_rangeENS6_ImLm9EEEQoosr3stdE7same_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|  4.26k|   auto store_elementwise = [&] {
  608|  4.26k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  4.26k|      std::span<uint8_t> out_s(out);
  610|  38.3k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 38.3k, False: 4.26k]
  ------------------
  611|  38.3k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  38.3k|         out_s = out_s.subspan(bytes_per_element);
  613|  38.3k|      }
  614|  4.26k|   };
_ZN5Botan7load_leINS_6detail10AutoDetectEJRA9_mRA8_hRKmEEEDaDpOT0_:
  495|    770|inline constexpr auto load_le(ParamTs&&... params) {
  496|    770|   return detail::load_any<std::endian::little, OutT>(std::forward<ParamTs>(params)...);
  497|    770|}
_ZN5Botan8store_beINSt3__16vectorIhNS1_9allocatorIhEEEEJRA18_mEEEDaDpOT0_:
  745|    770|inline constexpr auto store_be(ParamTs&&... params) {
  746|    770|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|    770|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS2_6vectorIhNS2_9allocatorIhEEEETkNS_6ranges14spanable_rangeERA18_mQoooosr3stdE7same_asINS0_10AutoDetectET0_Eaasr6rangesE25statically_spanable_rangeISC_Esr3stdE21default_initializableISC_Esr8conceptsE21resizable_byte_bufferISC_EEEDaOT1_:
  663|    770|inline constexpr auto store_any(InR&& in_range) {
  664|    770|   auto out = []([[maybe_unused]] const auto& in) {
  665|    770|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|    770|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|    770|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|    770|            return std::array<uint8_t, bytes>();
  669|    770|         } else {
  670|    770|            static_assert(
  671|    770|               !std::same_as<AutoDetect, OutR>,
  672|    770|               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|    770|         }
  674|    770|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|    770|         return OutR(std::span{in}.size_bytes());
  676|    770|      } else {
  677|    770|         return OutR{};
  678|    770|      }
  679|    770|   }(in_range);
  680|       |
  681|    770|   store_any<endianness, std::ranges::range_value_t<InR>>(out, std::forward<InR>(in_range));
  682|    770|   return out;
  683|    770|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206ENS2_6vectorIhNS2_9allocatorIhEEEETkNS_6ranges14spanable_rangeERA18_mQoooosr3stdE7same_asINS0_10AutoDetectET0_Eaasr6rangesE25statically_spanable_rangeISC_Esr3stdE21default_initializableISC_Esr8conceptsE21resizable_byte_bufferISC_EEEDaOT1_ENKUlRKT_E_clIS9_EEDaSH_:
  664|    770|   auto out = []([[maybe_unused]] const auto& in) {
  665|       |      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|       |         if constexpr(ranges::statically_spanable_range<InR>) {
  667|       |            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|       |            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|    770|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|    770|         return OutR(std::span{in}.size_bytes());
  676|       |      } else {
  677|       |         return OutR{};
  678|       |      }
  679|    770|   }(in_range);
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEERNS2_6vectorIhNS2_9allocatorIhEEEETkNS4_14spanable_rangeEA18_mQoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asISD_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISL_EESM_E4type10value_typeEEEEvOT1_RKSI_:
  603|    770|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|    770|   ranges::assert_equal_byte_lengths(out, in);
  605|    770|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|    770|   auto store_elementwise = [&] {
  608|    770|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    770|      std::span<uint8_t> out_s(out);
  610|    770|      for(auto in_elem : in) {
  611|    770|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|    770|         out_s = out_s.subspan(bytes_per_element);
  613|    770|      }
  614|    770|   };
  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|    770|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 770]
  ------------------
  620|      0|      store_elementwise();
  621|    770|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|    770|      } else {
  625|    770|         store_elementwise();
  626|    770|      }
  627|    770|   }
  628|    770|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEERNS2_6vectorIhNS2_9allocatorIhEEEETkNS4_14spanable_rangeEA18_mQoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asISD_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISL_EESM_E4type10value_typeEEEEvOT1_RKSI_ENKUlvE_clEv:
  607|    770|   auto store_elementwise = [&] {
  608|    770|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    770|      std::span<uint8_t> out_s(out);
  610|  13.8k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 13.8k, False: 770]
  ------------------
  611|  13.8k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  13.8k|         out_s = out_s.subspan(bytes_per_element);
  613|  13.8k|      }
  614|    770|   };
_ZN5Botan7load_leINS_6detail10AutoDetectEJRNSt3__15arrayImLm7EEERNS3_4spanIKhLm56EEEEEEDaDpOT0_:
  495|     34|inline constexpr auto load_le(ParamTs&&... params) {
  496|     34|   return detail::load_any<std::endian::little, OutT>(std::forward<ParamTs>(params)...);
  497|     34|}
_ZN5Botan6detail8load_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges23contiguous_output_rangeERNS2_5arrayImLm7EEETkNS5_16contiguous_rangeIhEENS2_4spanIKhLm56EEEQaa20unsigned_integralishINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT1_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISK_EESL_E4type10value_typeEEoosr3stdE7same_asIS4_T0_Esr3stdE7same_asISR_SQ_EEEvOSH_RKT2_:
  355|     34|inline constexpr void load_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  356|     34|   ranges::assert_equal_byte_lengths(out, in);
  357|     34|   using element_type = std::ranges::range_value_t<OutR>;
  358|       |
  359|     34|   auto load_elementwise = [&] {
  360|     34|      constexpr size_t bytes_per_element = sizeof(element_type);
  361|     34|      std::span<const uint8_t> in_s(in);
  362|     34|      for(auto& out_elem : out) {
  363|     34|         out_elem = load_any<endianness, element_type>(in_s.template first<bytes_per_element>());
  364|     34|         in_s = in_s.subspan(bytes_per_element);
  365|     34|      }
  366|     34|   };
  367|       |
  368|       |   // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  369|       |   // internally to copy ranges on a byte-by-byte basis, which is not allowed
  370|       |   // in a `constexpr` context.
  371|     34|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (371:7): [Folded, False: 34]
  ------------------
  372|      0|      load_elementwise();
  373|     34|   } else {
  374|     34|      if constexpr(endianness == std::endian::native && !custom_loadable<element_type>) {
  375|     34|         typecast_copy(out, in);
  376|       |      } else {
  377|       |         load_elementwise();
  378|       |      }
  379|     34|   }
  380|     34|}
_ZN5Botan8store_leINS_6detail10AutoDetectEJRNSt3__14spanIhLm56EEENS3_5arrayImLm7EEEEEEDaDpOT0_:
  736|     17|inline constexpr auto store_le(ParamTs&&... params) {
  737|     17|   return detail::store_any<std::endian::little, ModifierT>(std::forward<ParamTs>(params)...);
  738|     17|}
_ZN5Botan6detail9store_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges23contiguous_output_rangeIhEERNS2_4spanIhLm56EEETkNS5_14spanable_rangeENS2_5arrayImLm7EEEQoosr3stdE7same_asIS4_T0_Esr3stdE7same_asISC_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISK_EESL_E4type10value_typeEEEEvOT1_RKSH_:
  603|     17|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|     17|   ranges::assert_equal_byte_lengths(out, in);
  605|     17|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|     17|   auto store_elementwise = [&] {
  608|     17|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|     17|      std::span<uint8_t> out_s(out);
  610|     17|      for(auto in_elem : in) {
  611|     17|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|     17|         out_s = out_s.subspan(bytes_per_element);
  613|     17|      }
  614|     17|   };
  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|     17|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 17]
  ------------------
  620|      0|      store_elementwise();
  621|     17|   } else {
  622|     17|      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|     17|         typecast_copy(out, in);
  624|       |      } else {
  625|       |         store_elementwise();
  626|       |      }
  627|     17|   }
  628|     17|}
_ZN5Botan8store_leINS_6detail10AutoDetectEJRPhmmmmEEEDaDpOT0_:
  736|     13|inline constexpr auto store_le(ParamTs&&... params) {
  737|     13|   return detail::store_any<std::endian::little, ModifierT>(std::forward<ParamTs>(params)...);
  738|     13|}
_ZN5Botan6detail9store_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS0_20unsigned_integralishEmTpTkNS0_20unsigned_integralishEJmmmEQaaoosr3stdE7same_asIS4_T0_Esr3stdE7same_asIT1_S5_E10all_same_vIS6_DpT2_EEEvPhS6_S8_:
  723|     13|inline constexpr void store_any(uint8_t out[], T0 in0, Ts... ins) {
  724|     13|   constexpr auto bytes = sizeof(in0) + (sizeof(ins) + ... + 0);
  725|       |   // asserts that *out points to the correct amount of memory
  726|     13|   store_any<endianness, T0>(std::span<uint8_t, bytes>(out, bytes), in0, ins...);
  727|     13|}
_ZN5Botan6detail9store_anyILNSt3__16endianE57005EmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm32EEETpTkNS0_20unsigned_integralishEJmmmmEQaagtsZT2_Li0Eooaasr3stdE7same_asINS0_10AutoDetectET0_E10all_same_vIDpT2_Eaa20unsigned_integralishIS9_E10all_same_vIS9_SB_EEEvOT1_SB_:
  582|     13|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, Ts... ins) {
  583|     13|   ranges::assert_exact_byte_length<(sizeof(Ts) + ...)>(out);
  584|     13|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|     13|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|     13|      off += sizeof(T);
  587|     13|   };
  588|       |
  589|     13|   (store_one(std::span{out}, ins), ...);
  590|     13|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE57005EmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm32EEETpTkNS0_20unsigned_integralishEJmmmmEQaagtsZT2_Li0Eooaasr3stdE7same_asINS0_10AutoDetectET0_E10all_same_vIDpT2_Eaa20unsigned_integralishIS9_E10all_same_vIS9_SB_EEEvOT1_SB_ENUlTyS9_T_E_clImS7_EEDaS9_SE_:
  584|     52|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|     52|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|     52|      off += sizeof(T);
  587|     52|   };
_ZN5Botan8store_beINS_6detail10AutoDetectEJRtEEEDaDpOT0_:
  745|  2.28k|inline constexpr auto store_be(ParamTs&&... params) {
  746|  2.28k|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|  2.28k|}

_ZN5Botan18MerkleDamgard_HashINS_5SHA_1EEC2Ev:
   42|  6.60k|      MerkleDamgard_Hash() { clear(); }
_ZN5Botan18MerkleDamgard_HashINS_5SHA_1EE5clearEv:
   70|  32.8k|      void clear() {
   71|  32.8k|         MD::init(m_digest);
   72|  32.8k|         m_buffer.clear();
   73|  32.8k|         m_count = 0;
   74|  32.8k|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EEC2Ev:
   42|  14.7k|      MerkleDamgard_Hash() { clear(); }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE5clearEv:
   70|  73.9k|      void clear() {
   71|  73.9k|         MD::init(m_digest);
   72|  73.9k|         m_buffer.clear();
   73|  73.9k|         m_count = 0;
   74|  73.9k|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_384EEC2Ev:
   42|    817|      MerkleDamgard_Hash() { clear(); }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_384EE5clearEv:
   70|  8.02k|      void clear() {
   71|  8.02k|         MD::init(m_digest);
   72|  8.02k|         m_buffer.clear();
   73|  8.02k|         m_count = 0;
   74|  8.02k|      }
_ZN5Botan18MerkleDamgard_HashINS_5SHA_1EE6updateENSt3__14spanIKhLm18446744073709551615EEE:
   44|  26.7k|      void update(std::span<const uint8_t> input) {
   45|  26.7k|         BufferSlicer in(input);
   46|       |
   47|  66.4k|         while(!in.empty()) {
  ------------------
  |  Branch (47:16): [True: 39.7k, False: 26.7k]
  ------------------
   48|  39.7k|            if(const auto one_block = m_buffer.handle_unaligned_data(in)) {
  ------------------
  |  Branch (48:27): [True: 55, False: 39.6k]
  ------------------
   49|     55|               MD::compress_n(m_digest, one_block.value(), 1);
   50|     55|            }
   51|       |
   52|  39.7k|            if(m_buffer.in_alignment()) {
  ------------------
  |  Branch (52:16): [True: 13.3k, False: 26.3k]
  ------------------
   53|  13.3k|               const auto [aligned_data, full_blocks] = m_buffer.aligned_data_to_process(in);
   54|  13.3k|               if(full_blocks > 0) {
  ------------------
  |  Branch (54:19): [True: 13.3k, False: 6]
  ------------------
   55|  13.3k|                  MD::compress_n(m_digest, aligned_data, full_blocks);
   56|  13.3k|               }
   57|  13.3k|            }
   58|  39.7k|         }
   59|       |
   60|  26.7k|         m_count += input.size();
   61|  26.7k|      }
_ZN5Botan18MerkleDamgard_HashINS_5SHA_1EE5finalENSt3__14spanIhLm18446744073709551615EEE:
   63|  26.1k|      void final(std::span<uint8_t> output) {
   64|  26.1k|         append_padding_bit();
   65|  26.1k|         append_counter_and_finalize();
   66|  26.1k|         copy_output(output);
   67|  26.1k|         clear();
   68|  26.1k|      }
_ZN5Botan18MerkleDamgard_HashINS_5SHA_1EE18append_padding_bitEv:
   77|  26.1k|      void append_padding_bit() {
   78|  26.1k|         BOTAN_ASSERT_NOMSG(!m_buffer.ready_to_consume());
  ------------------
  |  |   84|  26.1k|   do {                                                                     \
  |  |   85|  26.1k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  26.1k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 26.1k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  26.1k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 26.1k]
  |  |  ------------------
  ------------------
   79|  26.1k|         if constexpr(MD::bit_endianness == MD_Endian::Big) {
   80|  26.1k|            const uint8_t final_byte = 0x80;
   81|  26.1k|            m_buffer.append({&final_byte, 1});
   82|       |         } else {
   83|       |            const uint8_t final_byte = 0x01;
   84|       |            m_buffer.append({&final_byte, 1});
   85|       |         }
   86|  26.1k|      }
_ZN5Botan18MerkleDamgard_HashINS_5SHA_1EE27append_counter_and_finalizeEv:
   88|  26.1k|      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|  26.1k|         if(m_buffer.elements_until_alignment() < MD::ctr_bytes) {
  ------------------
  |  Branch (91:13): [True: 12.9k, False: 13.1k]
  ------------------
   92|  12.9k|            m_buffer.fill_up_with_zeros();
   93|  12.9k|            MD::compress_n(m_digest, m_buffer.consume(), 1);
   94|  12.9k|         }
   95|       |
   96|       |         // Make sure that any remaining bytes in the very last block are zero.
   97|  26.1k|         BOTAN_ASSERT_NOMSG(m_buffer.elements_until_alignment() >= MD::ctr_bytes);
  ------------------
  |  |   84|  26.1k|   do {                                                                     \
  |  |   85|  26.1k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  26.1k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 26.1k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  26.1k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 26.1k]
  |  |  ------------------
  ------------------
   98|  26.1k|         m_buffer.fill_up_with_zeros();
   99|       |
  100|       |         // Replace a bunch of the right-most zero-padding with the counter bytes.
  101|  26.1k|         const uint64_t bit_count = m_count * 8;
  102|  26.1k|         auto last_bytes = m_buffer.directly_modify_last(sizeof(bit_count));
  103|  26.1k|         if constexpr(MD::byte_endianness == MD_Endian::Big) {
  104|  26.1k|            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|  26.1k|         MD::compress_n(m_digest, m_buffer.consume(), 1);
  111|  26.1k|      }
_ZN5Botan18MerkleDamgard_HashINS_5SHA_1EE11copy_outputENSt3__14spanIhLm18446744073709551615EEE:
  113|  26.1k|      void copy_output(std::span<uint8_t> output) {
  114|  26.1k|         BOTAN_ASSERT_NOMSG(output.size() >= MD::output_bytes);
  ------------------
  |  |   84|  26.1k|   do {                                                                     \
  |  |   85|  26.1k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  26.1k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 26.1k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  26.1k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 26.1k]
  |  |  ------------------
  ------------------
  115|       |
  116|  26.1k|         if constexpr(MD::byte_endianness == MD_Endian::Big) {
  117|  26.1k|            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|  26.1k|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE6updateENSt3__14spanIKhLm18446744073709551615EEE:
   44|  94.3k|      void update(std::span<const uint8_t> input) {
   45|  94.3k|         BufferSlicer in(input);
   46|       |
   47|   210k|         while(!in.empty()) {
  ------------------
  |  Branch (47:16): [True: 116k, False: 94.3k]
  ------------------
   48|   116k|            if(const auto one_block = m_buffer.handle_unaligned_data(in)) {
  ------------------
  |  Branch (48:27): [True: 5.86k, False: 110k]
  ------------------
   49|  5.86k|               MD::compress_n(m_digest, one_block.value(), 1);
   50|  5.86k|            }
   51|       |
   52|   116k|            if(m_buffer.in_alignment()) {
  ------------------
  |  Branch (52:16): [True: 47.4k, False: 68.5k]
  ------------------
   53|  47.4k|               const auto [aligned_data, full_blocks] = m_buffer.aligned_data_to_process(in);
   54|  47.4k|               if(full_blocks > 0) {
  ------------------
  |  Branch (54:19): [True: 41.6k, False: 5.82k]
  ------------------
   55|  41.6k|                  MD::compress_n(m_digest, aligned_data, full_blocks);
   56|  41.6k|               }
   57|  47.4k|            }
   58|   116k|         }
   59|       |
   60|  94.3k|         m_count += input.size();
   61|  94.3k|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE5finalENSt3__14spanIhLm18446744073709551615EEE:
   63|  56.7k|      void final(std::span<uint8_t> output) {
   64|  56.7k|         append_padding_bit();
   65|  56.7k|         append_counter_and_finalize();
   66|  56.7k|         copy_output(output);
   67|  56.7k|         clear();
   68|  56.7k|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE18append_padding_bitEv:
   77|  56.7k|      void append_padding_bit() {
   78|  56.7k|         BOTAN_ASSERT_NOMSG(!m_buffer.ready_to_consume());
  ------------------
  |  |   84|  56.7k|   do {                                                                     \
  |  |   85|  56.7k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  56.7k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 56.7k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  56.7k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 56.7k]
  |  |  ------------------
  ------------------
   79|  56.7k|         if constexpr(MD::bit_endianness == MD_Endian::Big) {
   80|  56.7k|            const uint8_t final_byte = 0x80;
   81|  56.7k|            m_buffer.append({&final_byte, 1});
   82|       |         } else {
   83|       |            const uint8_t final_byte = 0x01;
   84|       |            m_buffer.append({&final_byte, 1});
   85|       |         }
   86|  56.7k|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE27append_counter_and_finalizeEv:
   88|  56.7k|      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|  56.7k|         if(m_buffer.elements_until_alignment() < MD::ctr_bytes) {
  ------------------
  |  Branch (91:13): [True: 13.2k, False: 43.4k]
  ------------------
   92|  13.2k|            m_buffer.fill_up_with_zeros();
   93|  13.2k|            MD::compress_n(m_digest, m_buffer.consume(), 1);
   94|  13.2k|         }
   95|       |
   96|       |         // Make sure that any remaining bytes in the very last block are zero.
   97|  56.7k|         BOTAN_ASSERT_NOMSG(m_buffer.elements_until_alignment() >= MD::ctr_bytes);
  ------------------
  |  |   84|  56.7k|   do {                                                                     \
  |  |   85|  56.7k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  56.7k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 56.7k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  56.7k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 56.7k]
  |  |  ------------------
  ------------------
   98|  56.7k|         m_buffer.fill_up_with_zeros();
   99|       |
  100|       |         // Replace a bunch of the right-most zero-padding with the counter bytes.
  101|  56.7k|         const uint64_t bit_count = m_count * 8;
  102|  56.7k|         auto last_bytes = m_buffer.directly_modify_last(sizeof(bit_count));
  103|  56.7k|         if constexpr(MD::byte_endianness == MD_Endian::Big) {
  104|  56.7k|            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|  56.7k|         MD::compress_n(m_digest, m_buffer.consume(), 1);
  111|  56.7k|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE11copy_outputENSt3__14spanIhLm18446744073709551615EEE:
  113|  56.7k|      void copy_output(std::span<uint8_t> output) {
  114|  56.7k|         BOTAN_ASSERT_NOMSG(output.size() >= MD::output_bytes);
  ------------------
  |  |   84|  56.7k|   do {                                                                     \
  |  |   85|  56.7k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  56.7k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 56.7k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  56.7k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 56.7k]
  |  |  ------------------
  ------------------
  115|       |
  116|  56.7k|         if constexpr(MD::byte_endianness == MD_Endian::Big) {
  117|  56.7k|            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|  56.7k|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_384EE6updateENSt3__14spanIKhLm18446744073709551615EEE:
   44|  16.3k|      void update(std::span<const uint8_t> input) {
   45|  16.3k|         BufferSlicer in(input);
   46|       |
   47|  33.0k|         while(!in.empty()) {
  ------------------
  |  Branch (47:16): [True: 16.7k, False: 16.3k]
  ------------------
   48|  16.7k|            if(const auto one_block = m_buffer.handle_unaligned_data(in)) {
  ------------------
  |  Branch (48:27): [True: 25, False: 16.7k]
  ------------------
   49|     25|               MD::compress_n(m_digest, one_block.value(), 1);
   50|     25|            }
   51|       |
   52|  16.7k|            if(m_buffer.in_alignment()) {
  ------------------
  |  Branch (52:16): [True: 7.23k, False: 9.50k]
  ------------------
   53|  7.23k|               const auto [aligned_data, full_blocks] = m_buffer.aligned_data_to_process(in);
   54|  7.23k|               if(full_blocks > 0) {
  ------------------
  |  Branch (54:19): [True: 7.22k, False: 6]
  ------------------
   55|  7.22k|                  MD::compress_n(m_digest, aligned_data, full_blocks);
   56|  7.22k|               }
   57|  7.23k|            }
   58|  16.7k|         }
   59|       |
   60|  16.3k|         m_count += input.size();
   61|  16.3k|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_384EE5finalENSt3__14spanIhLm18446744073709551615EEE:
   63|  6.44k|      void final(std::span<uint8_t> output) {
   64|  6.44k|         append_padding_bit();
   65|  6.44k|         append_counter_and_finalize();
   66|  6.44k|         copy_output(output);
   67|  6.44k|         clear();
   68|  6.44k|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_384EE18append_padding_bitEv:
   77|  6.44k|      void append_padding_bit() {
   78|  6.44k|         BOTAN_ASSERT_NOMSG(!m_buffer.ready_to_consume());
  ------------------
  |  |   84|  6.44k|   do {                                                                     \
  |  |   85|  6.44k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  6.44k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 6.44k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  6.44k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 6.44k]
  |  |  ------------------
  ------------------
   79|  6.44k|         if constexpr(MD::bit_endianness == MD_Endian::Big) {
   80|  6.44k|            const uint8_t final_byte = 0x80;
   81|  6.44k|            m_buffer.append({&final_byte, 1});
   82|       |         } else {
   83|       |            const uint8_t final_byte = 0x01;
   84|       |            m_buffer.append({&final_byte, 1});
   85|       |         }
   86|  6.44k|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_384EE27append_counter_and_finalizeEv:
   88|  6.44k|      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|  6.44k|         if(m_buffer.elements_until_alignment() < MD::ctr_bytes) {
  ------------------
  |  Branch (91:13): [True: 1.52k, False: 4.92k]
  ------------------
   92|  1.52k|            m_buffer.fill_up_with_zeros();
   93|  1.52k|            MD::compress_n(m_digest, m_buffer.consume(), 1);
   94|  1.52k|         }
   95|       |
   96|       |         // Make sure that any remaining bytes in the very last block are zero.
   97|  6.44k|         BOTAN_ASSERT_NOMSG(m_buffer.elements_until_alignment() >= MD::ctr_bytes);
  ------------------
  |  |   84|  6.44k|   do {                                                                     \
  |  |   85|  6.44k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  6.44k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 6.44k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  6.44k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 6.44k]
  |  |  ------------------
  ------------------
   98|  6.44k|         m_buffer.fill_up_with_zeros();
   99|       |
  100|       |         // Replace a bunch of the right-most zero-padding with the counter bytes.
  101|  6.44k|         const uint64_t bit_count = m_count * 8;
  102|  6.44k|         auto last_bytes = m_buffer.directly_modify_last(sizeof(bit_count));
  103|  6.44k|         if constexpr(MD::byte_endianness == MD_Endian::Big) {
  104|  6.44k|            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|  6.44k|         MD::compress_n(m_digest, m_buffer.consume(), 1);
  111|  6.44k|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_384EE11copy_outputENSt3__14spanIhLm18446744073709551615EEE:
  113|  6.44k|      void copy_output(std::span<uint8_t> output) {
  114|  6.44k|         BOTAN_ASSERT_NOMSG(output.size() >= MD::output_bytes);
  ------------------
  |  |   84|  6.44k|   do {                                                                     \
  |  |   85|  6.44k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  6.44k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 6.44k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  6.44k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 6.44k]
  |  |  ------------------
  ------------------
  115|       |
  116|  6.44k|         if constexpr(MD::byte_endianness == MD_Endian::Big) {
  117|  6.44k|            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|  6.44k|      }

_ZN5Botan16as_span_of_bytesENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
   68|  17.4k|inline std::span<const uint8_t> as_span_of_bytes(std::string_view s) {
   69|  17.4k|   return as_span_of_bytes(s.data(), s.size());
   70|  17.4k|}
_ZN5Botan16as_span_of_bytesEPKcm:
   59|  17.4k|inline std::span<const uint8_t> as_span_of_bytes(const char* s, size_t len) {
   60|  17.4k|   const uint8_t* b = reinterpret_cast<const uint8_t*>(s);
   61|  17.4k|   return std::span{b, len};
   62|  17.4k|}
_ZN5Botan15bytes_to_stringENSt3__14spanIKhLm18446744073709551615EEE:
   76|  62.4k|inline std::string bytes_to_string(std::span<const uint8_t> bytes) {
   77|  62.4k|   return std::string(reinterpret_cast<const char*>(bytes.data()), bytes.size());
   78|  62.4k|}
_ZN5Botan14zeroize_bufferITkNSt3__117unsigned_integralEhEEvPT_m:
   37|   232k|inline void zeroize_buffer(T buf[], size_t n) {
   38|   232k|   if(n > 0) {
  ------------------
  |  Branch (38:7): [True: 232k, False: 0]
  ------------------
   39|   232k|      std::memset(buf, 0, sizeof(T) * n);
   40|   232k|   }
   41|   232k|}
_ZN5Botan14zeroize_bufferITkNSt3__117unsigned_integralEmEEvPT_m:
   37|  42.9k|inline void zeroize_buffer(T buf[], size_t n) {
   38|  42.9k|   if(n > 0) {
  ------------------
  |  Branch (38:7): [True: 42.9k, False: 0]
  ------------------
   39|  42.9k|      std::memset(buf, 0, sizeof(T) * n);
   40|  42.9k|   }
   41|  42.9k|}

_ZNK5Botan12Null_Padding15valid_blocksizeEm:
  170|    207|      bool valid_blocksize(size_t /*block_size*/) const override { return true; }
_ZN5Botan28BlockCipherModePaddingMethodD2Ev:
   76|    207|      virtual ~BlockCipherModePaddingMethod() = default;

_ZNK5Botan17Montgomery_Params1pEv:
   41|  21.4k|      const BigInt& p() const { return m_data->p(); }
_ZNK5Botan17Montgomery_Params2R1Ev:
   43|  10.6k|      const BigInt& R1() const { return m_data->r1(); }
_ZNK5Botan17Montgomery_Params2R2Ev:
   45|  21.4k|      const BigInt& R2() const { return m_data->r2(); }
_ZNK5Botan17Montgomery_Params6p_dashEv:
   49|  21.4k|      word p_dash() const { return m_data->p_dash(); }
_ZNK5Botan17Montgomery_Params7p_wordsEv:
   51|  21.4k|      size_t p_words() const { return m_data->p_size(); }
_ZNK5Botan17Montgomery_Params4Data1pEv:
   76|  21.4k|            const BigInt& p() const { return m_p; }
_ZNK5Botan17Montgomery_Params4Data2r1Ev:
   78|  10.6k|            const BigInt& r1() const { return m_r1; }
_ZNK5Botan17Montgomery_Params4Data2r2Ev:
   80|  21.4k|            const BigInt& r2() const { return m_r2; }
_ZNK5Botan17Montgomery_Params4Data6p_dashEv:
   84|  21.4k|            word p_dash() const { return m_p_dash; }
_ZNK5Botan17Montgomery_Params4Data6p_sizeEv:
   86|  21.4k|            size_t p_size() const { return m_p_words; }

_ZN5Botan10word8_add3ITkNS_8WordTypeEmEET_PS1_PKS1_S4_S1_:
  304|      4|inline constexpr auto word8_add3(W z[8], const W x[8], const W y[8], W carry) -> W {
  305|      4|#if defined(BOTAN_MP_USE_X86_64_ASM)
  306|      4|   if constexpr(std::same_as<W, uint64_t>) {
  307|      4|      if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (307:10): [True: 4, Folded]
  ------------------
  308|      4|         asm volatile(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB3_OP, "adcq"))
  309|      4|                      : [carry] "=r"(carry)
  310|      4|                      : [x] "r"(x), [y] "r"(y), [z] "r"(z), "0"(carry)
  311|      4|                      : "cc", "memory");
  312|      4|         return carry;
  313|      4|      }
  314|      4|   }
  315|      0|#endif
  316|       |
  317|      0|   z[0] = word_add(x[0], y[0], &carry);
  318|      4|   z[1] = word_add(x[1], y[1], &carry);
  319|      4|   z[2] = word_add(x[2], y[2], &carry);
  320|      4|   z[3] = word_add(x[3], y[3], &carry);
  321|      4|   z[4] = word_add(x[4], y[4], &carry);
  322|      4|   z[5] = word_add(x[5], y[5], &carry);
  323|      4|   z[6] = word_add(x[6], y[6], &carry);
  324|      4|   z[7] = word_add(x[7], y[7], &carry);
  325|      4|   return carry;
  326|      4|}
_ZN5Botan8word_addITkNS_8WordTypeEmEET_S1_S1_PS1_:
  239|  84.1M|inline constexpr auto word_add(W x, W y, W* carry) -> W {
  240|  84.1M|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_addc)
  241|  84.1M|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (241:7): [True: 84.1M, Folded]
  ------------------
  242|       |      if constexpr(std::same_as<W, unsigned int>) {
  243|       |         return __builtin_addc(x, y, *carry & 1, carry);
  244|  84.1M|      } else if constexpr(std::same_as<W, unsigned long>) {
  245|  84.1M|         return __builtin_addcl(x, y, *carry & 1, carry);
  246|       |      } else if constexpr(std::same_as<W, unsigned long long>) {
  247|       |         return __builtin_addcll(x, y, *carry & 1, carry);
  248|       |      }
  249|  84.1M|   }
  250|      0|#endif
  251|       |
  252|       |   if constexpr(WordInfo<W>::dword_is_native && use_dword_for_word_add) {
  253|       |      /*
  254|       |      TODO(Botan4) this is largely a performance hack for GCCs that don't
  255|       |      support __builtin_addc, if we increase the minimum supported version of
  256|       |      GCC to GCC 14 then we can remove this and not worry about it
  257|       |      */
  258|       |      const W cb = *carry & 1;
  259|       |      const auto s = typename WordInfo<W>::dword(x) + y + cb;
  260|       |      *carry = static_cast<W>(s >> WordInfo<W>::bits);
  261|       |      return static_cast<W>(s);
  262|  84.1M|   } else {
  263|  84.1M|      const W cb = *carry & 1;
  264|  84.1M|      W z = x + y;
  265|  84.1M|      W c1 = (z < x);
  266|  84.1M|      z += cb;
  267|  84.1M|      *carry = c1 | (z < cb);
  268|  84.1M|      return z;
  269|  84.1M|   }
  270|  84.1M|}
_ZN5Botan10word8_sub3ITkNS_8WordTypeEmEET_PS1_PKS1_S4_S1_:
  385|  2.69k|inline constexpr auto word8_sub3(W z[8], const W x[8], const W y[8], W carry) -> W {
  386|  2.69k|#if defined(BOTAN_MP_USE_X86_64_ASM)
  387|  2.69k|   if constexpr(std::same_as<W, uint64_t>) {
  388|  2.69k|      if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (388:10): [True: 2.69k, Folded]
  ------------------
  389|  2.69k|         asm volatile(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB3_OP, "sbbq"))
  390|  2.69k|                      : [carry] "=r"(carry)
  391|  2.69k|                      : [x] "r"(x), [y] "r"(y), [z] "r"(z), "0"(carry)
  392|  2.69k|                      : "cc", "memory");
  393|  2.69k|         return carry;
  394|  2.69k|      }
  395|  2.69k|   }
  396|      0|#endif
  397|       |
  398|      0|   z[0] = word_sub(x[0], y[0], &carry);
  399|  2.69k|   z[1] = word_sub(x[1], y[1], &carry);
  400|  2.69k|   z[2] = word_sub(x[2], y[2], &carry);
  401|  2.69k|   z[3] = word_sub(x[3], y[3], &carry);
  402|  2.69k|   z[4] = word_sub(x[4], y[4], &carry);
  403|  2.69k|   z[5] = word_sub(x[5], y[5], &carry);
  404|  2.69k|   z[6] = word_sub(x[6], y[6], &carry);
  405|  2.69k|   z[7] = word_sub(x[7], y[7], &carry);
  406|  2.69k|   return carry;
  407|  2.69k|}
_ZN5Botan8word_subITkNS_8WordTypeEmEET_S1_S1_PS1_:
  332|   139M|inline constexpr auto word_sub(W x, W y, W* carry) -> W {
  333|   139M|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_subc)
  334|   139M|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (334:7): [True: 139M, Folded]
  ------------------
  335|       |      if constexpr(std::same_as<W, unsigned int>) {
  336|       |         return __builtin_subc(x, y, *carry & 1, carry);
  337|   139M|      } else if constexpr(std::same_as<W, unsigned long>) {
  338|   139M|         return __builtin_subcl(x, y, *carry & 1, carry);
  339|       |      } else if constexpr(std::same_as<W, unsigned long long>) {
  340|       |         return __builtin_subcll(x, y, *carry & 1, carry);
  341|       |      }
  342|   139M|   }
  343|      0|#endif
  344|       |
  345|      0|   const W cb = *carry & 1;
  346|   139M|   W t0 = x - y;
  347|   139M|   W c1 = (t0 > x);
  348|   139M|   W z = t0 - cb;
  349|   139M|   *carry = c1 | (z > t0);
  350|   139M|   return z;
  351|   139M|}
_ZN5Botan10word_madd2ITkNS_8WordTypeEmEET_S1_S1_PS1_:
   90|  55.0k|inline constexpr auto word_madd2(W a, W b, W* c) -> W {
   91|  55.0k|#if defined(BOTAN_MP_USE_X86_64_ASM)
   92|  55.0k|   if constexpr(std::same_as<W, uint64_t>) {
   93|  55.0k|      if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (93:10): [True: 55.0k, Folded]
  ------------------
   94|  55.0k|         asm(R"(
   95|  55.0k|            mulq %[b]
   96|  55.0k|            addq %[c],%[a]
   97|  55.0k|            adcq $0,%[carry]
   98|  55.0k|            )"
   99|  55.0k|             : [a] "=a"(a), [b] "=rm"(b), [carry] "=&d"(*c)
  100|  55.0k|             : "0"(a), "1"(b), [c] "g"(*c)
  101|  55.0k|             : "cc");
  102|       |
  103|  55.0k|         return a;
  104|  55.0k|      }
  105|  55.0k|   }
  106|       |#elif defined(BOTAN_MP_USE_AARCH64_ASM)
  107|       |   if constexpr(std::same_as<W, uint64_t>) {
  108|       |      if(!std::is_constant_evaluated()) {
  109|       |         W lo = 0;
  110|       |         W hi = 0;
  111|       |         asm(R"(
  112|       |            mul  %[lo], %[a], %[b]
  113|       |            umulh %[hi], %[a], %[b]
  114|       |            adds %[lo], %[lo], %[c]
  115|       |            adc  %[hi], %[hi], xzr
  116|       |            )"
  117|       |             : [lo] "=&r"(lo), [hi] "=&r"(hi)
  118|       |             : [a] "r"(a), [b] "r"(b), [c] "r"(*c)
  119|       |             : "cc");
  120|       |
  121|       |         *c = hi;
  122|       |         return lo;
  123|       |      }
  124|       |   }
  125|       |#endif
  126|       |
  127|      0|   typedef typename WordInfo<W>::dword dword;
  128|  55.0k|   const dword s = dword(a) * b + *c;
  129|  55.0k|   *c = static_cast<W>(s >> WordInfo<W>::bits);
  130|  55.0k|   return static_cast<W>(s);
  131|  55.0k|}
_ZN5Botan11word8_madd3ITkNS_8WordTypeEmEET_PS1_PKS1_S1_S1_:
  441|    152|inline constexpr auto word8_madd3(W z[8], const W x[8], W y, W carry) -> W {
  442|    152|#if defined(BOTAN_MP_USE_X86_64_ASM)
  443|    152|   if constexpr(std::same_as<W, uint64_t>) {
  444|    152|      if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (444:10): [True: 152, Folded]
  ------------------
  445|    152|         asm volatile(DO_8_TIMES(MULADD_OP, "")
  446|    152|                      : [carry] "=r"(carry)
  447|    152|                      : [z] "r"(z), [x] "r"(x), [y] "rm"(y), "0"(carry)
  448|    152|                      : "cc", "%rax", "%rdx", "memory");
  449|    152|         return carry;
  450|    152|      }
  451|    152|   }
  452|      0|#endif
  453|       |
  454|      0|   z[0] = word_madd3(x[0], y, z[0], &carry);
  455|    152|   z[1] = word_madd3(x[1], y, z[1], &carry);
  456|    152|   z[2] = word_madd3(x[2], y, z[2], &carry);
  457|    152|   z[3] = word_madd3(x[3], y, z[3], &carry);
  458|    152|   z[4] = word_madd3(x[4], y, z[4], &carry);
  459|    152|   z[5] = word_madd3(x[5], y, z[5], &carry);
  460|    152|   z[6] = word_madd3(x[6], y, z[6], &carry);
  461|    152|   z[7] = word_madd3(x[7], y, z[7], &carry);
  462|    152|   return carry;
  463|    152|}
_ZN5Botan10word_madd3ITkNS_8WordTypeEmEET_S1_S1_S1_PS1_:
  137|    304|inline constexpr auto word_madd3(W a, W b, W c, W* d) -> W {
  138|    304|#if defined(BOTAN_MP_USE_X86_64_ASM)
  139|    304|   if constexpr(std::same_as<W, uint64_t>) {
  140|    304|      if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (140:10): [True: 304, Folded]
  ------------------
  141|    304|         asm(R"(
  142|    304|            mulq %[b]
  143|    304|
  144|    304|            addq %[c],%[a]
  145|    304|            adcq $0,%[carry]
  146|    304|
  147|    304|            addq %[d],%[a]
  148|    304|            adcq $0,%[carry]
  149|    304|            )"
  150|    304|             : [a] "=a"(a), [b] "=rm"(b), [carry] "=&d"(*d)
  151|    304|             : "0"(a), "1"(b), [c] "g"(c), [d] "g"(*d)
  152|    304|             : "cc");
  153|       |
  154|    304|         return a;
  155|    304|      }
  156|    304|   }
  157|       |#elif defined(BOTAN_MP_USE_AARCH64_ASM)
  158|       |   if constexpr(std::same_as<W, uint64_t>) {
  159|       |      if(!std::is_constant_evaluated()) {
  160|       |         W lo = 0;
  161|       |         W hi = 0;
  162|       |         asm(R"(
  163|       |            mul  %[lo], %[a], %[b]
  164|       |            umulh %[hi], %[a], %[b]
  165|       |            adds %[lo], %[lo], %[c]
  166|       |            adc  %[hi], %[hi], xzr
  167|       |            adds %[lo], %[lo], %[d]
  168|       |            adc  %[hi], %[hi], xzr
  169|       |            )"
  170|       |             : [lo] "=&r"(lo), [hi] "=&r"(hi)
  171|       |             : [a] "r"(a), [b] "r"(b), [c] "r"(c), [d] "r"(*d)
  172|       |             : "cc");
  173|       |
  174|       |         *d = hi;
  175|       |         return lo;
  176|       |      }
  177|       |   }
  178|       |#endif
  179|       |
  180|      0|   typedef typename WordInfo<W>::dword dword;
  181|    304|   const dword s = dword(a) * b + c + *d;
  182|    304|   *d = static_cast<W>(s >> WordInfo<W>::bits);
  183|    304|   return static_cast<W>(s);
  184|    304|}
_ZN5Botan10word8_add2ITkNS_8WordTypeEmEET_PS1_PKS1_S1_:
  276|  1.81k|inline constexpr auto word8_add2(W x[8], const W y[8], W carry) -> W {
  277|  1.81k|#if defined(BOTAN_MP_USE_X86_64_ASM)
  278|  1.81k|   if constexpr(std::same_as<W, uint64_t>) {
  279|  1.81k|      if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (279:10): [True: 1.81k, Folded]
  ------------------
  280|  1.81k|         asm volatile(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB2_OP, "adcq"))
  281|  1.81k|                      : [carry] "=r"(carry)
  282|  1.81k|                      : [x] "r"(x), [y] "r"(y), "0"(carry)
  283|  1.81k|                      : "cc", "memory");
  284|  1.81k|         return carry;
  285|  1.81k|      }
  286|  1.81k|   }
  287|      0|#endif
  288|       |
  289|      0|   x[0] = word_add(x[0], y[0], &carry);
  290|  1.81k|   x[1] = word_add(x[1], y[1], &carry);
  291|  1.81k|   x[2] = word_add(x[2], y[2], &carry);
  292|  1.81k|   x[3] = word_add(x[3], y[3], &carry);
  293|  1.81k|   x[4] = word_add(x[4], y[4], &carry);
  294|  1.81k|   x[5] = word_add(x[5], y[5], &carry);
  295|  1.81k|   x[6] = word_add(x[6], y[6], &carry);
  296|  1.81k|   x[7] = word_add(x[7], y[7], &carry);
  297|  1.81k|   return carry;
  298|  1.81k|}
_ZN5Botan10word8_sub2ITkNS_8WordTypeEmEET_PS1_PKS1_S1_:
  357|     32|inline constexpr auto word8_sub2(W x[8], const W y[8], W carry) -> W {
  358|     32|#if defined(BOTAN_MP_USE_X86_64_ASM)
  359|     32|   if constexpr(std::same_as<W, uint64_t>) {
  360|     32|      if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (360:10): [True: 32, Folded]
  ------------------
  361|     32|         asm volatile(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB2_OP, "sbbq"))
  362|     32|                      : [carry] "=r"(carry)
  363|     32|                      : [x] "r"(x), [y] "r"(y), "0"(carry)
  364|     32|                      : "cc", "memory");
  365|     32|         return carry;
  366|     32|      }
  367|     32|   }
  368|      0|#endif
  369|       |
  370|      0|   x[0] = word_sub(x[0], y[0], &carry);
  371|     32|   x[1] = word_sub(x[1], y[1], &carry);
  372|     32|   x[2] = word_sub(x[2], y[2], &carry);
  373|     32|   x[3] = word_sub(x[3], y[3], &carry);
  374|     32|   x[4] = word_sub(x[4], y[4], &carry);
  375|     32|   x[5] = word_sub(x[5], y[5], &carry);
  376|     32|   x[6] = word_sub(x[6], y[6], &carry);
  377|     32|   x[7] = word_sub(x[7], y[7], &carry);
  378|     32|   return carry;
  379|     32|}
_ZN5Botan5word3ImEC2Ev:
  478|  19.4M|      constexpr word3() : m_w(0) {}
_ZN5Botan5word3ImE3mulEmm:
  480|   575M|      inline constexpr void mul(W x, W y) { m_w += static_cast<W3>(x) * y; }
_ZN5Botan5word3ImE7extractEv:
  486|   214M|      inline constexpr W extract() {
  487|   214M|         W r = static_cast<W>(m_w);
  488|   214M|         m_w >>= WordInfo<W>::bits;
  489|   214M|         return r;
  490|   214M|      }
_ZN5Botan5word3ImE6mul_x2Emm:
  482|   140M|      inline constexpr void mul_x2(W x, W y) { m_w += static_cast<W3>(x) * y * 2; }
_ZN5Botan5word3ImE3addEm:
  484|  76.9M|      inline constexpr void add(W x) { m_w += x; }
_ZN5Botan5word3ImE10monty_stepEmm:
  492|  38.4M|      inline constexpr W monty_step(W p0, W p_dash) {
  493|  38.4M|         const W w0 = static_cast<W>(m_w);
  494|  38.4M|         const W r = w0 * p_dash;
  495|  38.4M|         mul(r, p0);
  496|  38.4M|         m_w >>= WordInfo<W>::bits;
  497|  38.4M|         return r;
  498|  38.4M|      }

_ZN5Botan11bigint_add3ITkNS_8WordTypeEmEET_PS1_PKS1_mS4_m:
  121|     12|inline constexpr auto bigint_add3(W z[], const W x[], size_t x_size, const W y[], size_t y_size) -> W {
  122|     12|   if(x_size < y_size) {
  ------------------
  |  Branch (122:7): [True: 0, False: 12]
  ------------------
  123|      0|      return bigint_add3(z, y, y_size, x, x_size);
  124|      0|   }
  125|       |
  126|     12|   W carry = 0;
  127|       |
  128|     12|   const size_t blocks = y_size - (y_size % 8);
  129|       |
  130|     16|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (130:22): [True: 4, False: 12]
  ------------------
  131|      4|      carry = word8_add3(z + i, x + i, y + i, carry);
  132|      4|   }
  133|       |
  134|     54|   for(size_t i = blocks; i != y_size; ++i) {
  ------------------
  |  Branch (134:27): [True: 42, False: 12]
  ------------------
  135|     42|      z[i] = word_add(x[i], y[i], &carry);
  136|     42|   }
  137|       |
  138|     12|   for(size_t i = y_size; i != x_size; ++i) {
  ------------------
  |  Branch (138:27): [True: 0, False: 12]
  ------------------
  139|      0|      z[i] = word_add(x[i], static_cast<W>(0), &carry);
  140|      0|   }
  141|       |
  142|     12|   return carry;
  143|     12|}
_ZN5Botan10bigint_cmpITkNS_8WordTypeEmEEiPKT_mS3_m:
  460|  33.4k|inline constexpr int32_t bigint_cmp(const W x[], size_t x_size, const W y[], size_t y_size) {
  461|  33.4k|   static_assert(sizeof(W) >= sizeof(uint32_t), "Size assumption");
  462|       |
  463|  33.4k|   const W LT = static_cast<W>(-1);
  464|  33.4k|   const W EQ = 0;
  465|  33.4k|   const W GT = 1;
  466|       |
  467|  33.4k|   const size_t common_elems = std::min(x_size, y_size);
  468|       |
  469|  33.4k|   W result = EQ;  // until found otherwise
  470|       |
  471|   229k|   for(size_t i = 0; i != common_elems; i++) {
  ------------------
  |  Branch (471:22): [True: 195k, False: 33.4k]
  ------------------
  472|   195k|      const auto is_eq = CT::Mask<W>::is_equal(x[i], y[i]);
  473|   195k|      const auto is_lt = CT::Mask<W>::is_lt(x[i], y[i]);
  474|       |
  475|   195k|      result = is_eq.select(result, is_lt.select(LT, GT));
  476|   195k|   }
  477|       |
  478|  33.4k|   if(x_size < y_size) {
  ------------------
  |  Branch (478:7): [True: 3, False: 33.4k]
  ------------------
  479|      3|      W mask = 0;
  480|      6|      for(size_t i = x_size; i != y_size; i++) {
  ------------------
  |  Branch (480:30): [True: 3, False: 3]
  ------------------
  481|      3|         mask |= y[i];
  482|      3|      }
  483|       |
  484|       |      // If any bits were set in high part of y, then x < y
  485|      3|      result = CT::Mask<W>::is_zero(mask).select(result, LT);
  486|  33.4k|   } else if(y_size < x_size) {
  ------------------
  |  Branch (486:14): [True: 6, False: 33.4k]
  ------------------
  487|      6|      W mask = 0;
  488|     37|      for(size_t i = y_size; i != x_size; i++) {
  ------------------
  |  Branch (488:30): [True: 31, False: 6]
  ------------------
  489|     31|         mask |= x[i];
  490|     31|      }
  491|       |
  492|       |      // If any bits were set in high part of x, then x > y
  493|      6|      result = CT::Mask<W>::is_zero(mask).select(result, GT);
  494|      6|   }
  495|       |
  496|  33.4k|   CT::unpoison(result);
  497|  33.4k|   BOTAN_DEBUG_ASSERT(result == LT || result == GT || result == EQ);
  ------------------
  |  |  137|  33.4k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  33.4k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 33.4k]
  |  |  ------------------
  ------------------
  498|  33.4k|   return static_cast<int32_t>(result);
  499|  33.4k|}
_ZN5Botan11bigint_sub3ITkNS_8WordTypeEmEET_PS1_PKS1_mS4_m:
  193|  2.48k|inline constexpr auto bigint_sub3(W z[], const W x[], size_t x_size, const W y[], size_t y_size) -> W {
  194|  2.48k|   W borrow = 0;
  195|       |
  196|  2.48k|   BOTAN_ASSERT(x_size >= y_size, "Expected sizes");
  ------------------
  |  |   71|  2.48k|   do {                                                                                 \
  |  |   72|  2.48k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|  2.48k|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 2.48k]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|  2.48k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 2.48k]
  |  |  ------------------
  ------------------
  197|       |
  198|  2.48k|   const size_t blocks = y_size - (y_size % 8);
  199|       |
  200|  3.60k|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (200:22): [True: 1.11k, False: 2.48k]
  ------------------
  201|  1.11k|      borrow = word8_sub3(z + i, x + i, y + i, borrow);
  202|  1.11k|   }
  203|       |
  204|  10.1k|   for(size_t i = blocks; i != y_size; ++i) {
  ------------------
  |  Branch (204:27): [True: 7.63k, False: 2.48k]
  ------------------
  205|  7.63k|      z[i] = word_sub(x[i], y[i], &borrow);
  206|  7.63k|   }
  207|       |
  208|  2.61k|   for(size_t i = y_size; i != x_size; ++i) {
  ------------------
  |  Branch (208:27): [True: 127, False: 2.48k]
  ------------------
  209|    127|      z[i] = word_sub(x[i], static_cast<W>(0), &borrow);
  210|    127|   }
  211|       |
  212|  2.48k|   return borrow;
  213|  2.48k|}
_ZN5Botan14divide_precompImEC2Emmmm:
  791|     18|            m_divisor(divisor), m_shift(shift), m_norm_divisor(norm_divisor), m_reciprocal(reciprocal) {}
_ZNK5Botan14divide_precompImE14divmod_2to1_ctEmm:
  751|    147|      inline constexpr std::pair<W, W> divmod_2to1_ct(W n1, W n0) const {
  752|       |         /*
  753|       |         * Scale the numerator to match the normalized divisor; the scaling cancels
  754|       |         * in the quotient and is removed from the remainder by the final shift.
  755|       |         */
  756|    147|         n1 <<= m_shift;
  757|    147|         const size_t rshift = WordInfo<W>::bits - m_shift;
  758|       |         /*
  759|       |         * We can't just `n0 >> rshift` because m_shift may be 0 (high bit divisor)
  760|       |         * in which case rshift will be the maximum bit length, and >> by the maximum
  761|       |         * bitlength is undefined behavior despite having an entirely obvious meaning.
  762|       |         *
  763|       |         * However we know m_shift is not equal to the bit length of the word, because
  764|       |         * that would imply that the divisor is 0. Thus rshift must be >= 1. So split
  765|       |         * the shift into two phases (first rshift-1, then 1)
  766|       |         */
  767|    147|         n1 |= (n0 >> 1) >> (rshift - 1);
  768|    147|         n0 <<= m_shift;
  769|       |
  770|    147|         const auto [q, scaled_r] = div2by1_preinv(n1, n0, m_norm_divisor, m_reciprocal);
  771|    147|         const W r = scaled_r >> m_shift;
  772|    147|         return std::make_pair(q, r);
  773|    147|      }
_ZN5Botan14divide_precompImE14div2by1_preinvEmmmm:
  802|    147|      static constexpr std::pair<W, W> div2by1_preinv(W u1, W u0, W D, W v) {
  803|       |         // Steps 1-3: <q1,q0> = v*u1; <q1,q0> += <u1,u0>; q1 += 1
  804|    147|         W q1 = u0;
  805|    147|         const W q0 = word_madd2(u1, v, &q1);  // <q1,q0> = u1*v + u0
  806|    147|         q1 += u1 + 1;
  807|       |
  808|       |         // Step 4
  809|    147|         W r = u0 - q1 * D;
  810|       |
  811|       |         // Steps 5-7: If r >= q0 { q1 -= 1; r += d; }
  812|    147|         const auto fix_down = CT::Mask<W>::is_gt(r, q0);
  813|    147|         q1 -= fix_down.if_set_return(1);
  814|    147|         r += fix_down.if_set_return(D);
  815|       |
  816|       |         // Steps 8-10: if r >= D { q1 += 1; r -= D; }
  817|    147|         const auto fix_up = CT::Mask<W>::is_gte(r, D);
  818|    147|         q1 += fix_up.if_set_return(1);
  819|    147|         r -= fix_up.if_set_return(D);
  820|       |
  821|       |         // Step 11
  822|    147|         return std::make_pair(q1, r);
  823|    147|      }
_ZN5Botan17bigint_monty_redcEPmPKmS2_mmS0_m:
 1097|  21.4k|   word r[], const word z[], const word p[], size_t p_size, word p_dash, word ws[], size_t ws_size) {
 1098|  21.4k|   const size_t z_size = 2 * p_size;
 1099|       |
 1100|  21.4k|   BOTAN_ARG_CHECK(ws_size >= p_size, "Montgomery reduction workspace too small");
  ------------------
  |  |   35|  21.4k|   do {                                                          \
  |  |   36|  21.4k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  21.4k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 21.4k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  21.4k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 21.4k]
  |  |  ------------------
  ------------------
 1101|       |
 1102|  21.4k|   if(p_size == 4) {
  ------------------
  |  Branch (1102:7): [True: 16.7k, False: 4.66k]
  ------------------
 1103|  16.7k|      bigint_monty_redc_4(r, z, p, p_dash, ws);
 1104|  16.7k|   } else if(p_size == 6) {
  ------------------
  |  Branch (1104:14): [True: 1.96k, False: 2.69k]
  ------------------
 1105|  1.96k|      bigint_monty_redc_6(r, z, p, p_dash, ws);
 1106|  2.69k|   } else if(p_size == 8) {
  ------------------
  |  Branch (1106:14): [True: 1.14k, False: 1.54k]
  ------------------
 1107|  1.14k|      bigint_monty_redc_8(r, z, p, p_dash, ws);
 1108|  1.54k|   } else if(p_size == 12) {
  ------------------
  |  Branch (1108:14): [True: 0, False: 1.54k]
  ------------------
 1109|      0|      bigint_monty_redc_12(r, z, p, p_dash, ws);
 1110|  1.54k|   } else if(p_size == 16) {
  ------------------
  |  Branch (1110:14): [True: 0, False: 1.54k]
  ------------------
 1111|      0|      bigint_monty_redc_16(r, z, p, p_dash, ws);
 1112|  1.54k|   } else if(p_size == 24) {
  ------------------
  |  Branch (1112:14): [True: 0, False: 1.54k]
  ------------------
 1113|      0|      bigint_monty_redc_24(r, z, p, p_dash, ws);
 1114|  1.54k|   } else if(p_size == 32) {
  ------------------
  |  Branch (1114:14): [True: 0, False: 1.54k]
  ------------------
 1115|      0|      bigint_monty_redc_32(r, z, p, p_dash, ws);
 1116|  1.54k|   } else {
 1117|  1.54k|      bigint_monty_redc_generic(r, z, z_size, p, p_size, p_dash, ws);
 1118|  1.54k|   }
 1119|  21.4k|}
_ZN5Botan25bigint_monty_redc_inplaceEPmPKmmmS0_m:
 1121|  21.4k|inline void bigint_monty_redc_inplace(word z[], const word p[], size_t p_size, word p_dash, word ws[], size_t ws_size) {
 1122|  21.4k|   bigint_monty_redc(z, z, p, p_size, p_dash, ws, ws_size);
 1123|  21.4k|   zeroize_buffer(z + p_size, p_size);
 1124|  21.4k|}
_ZN5Botan15bigint_ct_is_eqITkNS_8WordTypeEmEENS_2CT4MaskIT_EEPKS3_mS6_m:
  540|     12|inline constexpr auto bigint_ct_is_eq(const W x[], size_t x_size, const W y[], size_t y_size) -> CT::Mask<W> {
  541|     12|   const size_t common_elems = std::min(x_size, y_size);
  542|       |
  543|     12|   W diff = 0;
  544|       |
  545|    166|   for(size_t i = 0; i != common_elems; i++) {
  ------------------
  |  Branch (545:22): [True: 154, False: 12]
  ------------------
  546|    154|      diff |= (x[i] ^ y[i]);
  547|    154|   }
  548|       |
  549|       |   // If any bits were set in high part of x/y, then they are not equal
  550|     12|   if(x_size < y_size) {
  ------------------
  |  Branch (550:7): [True: 1, False: 11]
  ------------------
  551|      9|      for(size_t i = x_size; i != y_size; i++) {
  ------------------
  |  Branch (551:30): [True: 8, False: 1]
  ------------------
  552|      8|         diff |= y[i];
  553|      8|      }
  554|     11|   } else if(y_size < x_size) {
  ------------------
  |  Branch (554:14): [True: 0, False: 11]
  ------------------
  555|      0|      for(size_t i = y_size; i != x_size; i++) {
  ------------------
  |  Branch (555:30): [True: 0, False: 0]
  ------------------
  556|      0|         diff |= x[i];
  557|      0|      }
  558|      0|   }
  559|       |
  560|     12|   return CT::Mask<W>::is_zero(diff);
  561|     12|}
_ZN5Botan15bigint_ct_is_ltITkNS_8WordTypeEmEENS_2CT4MaskIT_EEPKS3_mS6_mb:
  508|  50.2k|   -> CT::Mask<W> {
  509|  50.2k|   const size_t common_elems = std::min(x_size, y_size);
  510|       |
  511|  50.2k|   auto is_lt = CT::Mask<W>::expand(lt_or_equal);
  512|       |
  513|   308k|   for(size_t i = 0; i != common_elems; i++) {
  ------------------
  |  Branch (513:22): [True: 258k, False: 50.2k]
  ------------------
  514|   258k|      const auto eq = CT::Mask<W>::is_equal(x[i], y[i]);
  515|   258k|      const auto lt = CT::Mask<W>::is_lt(x[i], y[i]);
  516|   258k|      is_lt = eq.select_mask(is_lt, lt);
  517|   258k|   }
  518|       |
  519|  50.2k|   if(x_size < y_size) {
  ------------------
  |  Branch (519:7): [True: 0, False: 50.2k]
  ------------------
  520|      0|      W mask = 0;
  521|      0|      for(size_t i = x_size; i != y_size; i++) {
  ------------------
  |  Branch (521:30): [True: 0, False: 0]
  ------------------
  522|      0|         mask |= y[i];
  523|      0|      }
  524|       |      // If any bits were set in high part of y, then is_lt should be forced true
  525|      0|      is_lt |= CT::Mask<W>::expand(mask);
  526|  50.2k|   } else if(y_size < x_size) {
  ------------------
  |  Branch (526:14): [True: 49, False: 50.2k]
  ------------------
  527|     49|      W mask = 0;
  528|    388|      for(size_t i = y_size; i != x_size; i++) {
  ------------------
  |  Branch (528:30): [True: 339, False: 49]
  ------------------
  529|    339|         mask |= x[i];
  530|    339|      }
  531|       |
  532|       |      // If any bits were set in high part of x, then is_lt should be false
  533|     49|      is_lt &= CT::Mask<W>::is_zero(mask);
  534|     49|   }
  535|       |
  536|  50.2k|   return is_lt;
  537|  50.2k|}
_ZN5Botan14divide_precompImE5setupEm:
  714|     18|      static constexpr divide_precomp setup(W divisor) {
  715|     18|         const size_t shift = WordInfo<W>::bits - high_bit(divisor);
  716|     18|         const W norm_divisor = divisor << shift;
  717|     18|         const W reciprocal = reciprocal_word_ct(norm_divisor);
  718|     18|         return divide_precomp(divisor, shift, norm_divisor, reciprocal);
  719|     18|      }
_ZN5Botan18reciprocal_word_ctITkNS_8WordTypeEmEET_S1_:
  669|     18|constexpr W reciprocal_word_ct(W D) {
  670|     18|   BOTAN_DEBUG_ASSERT((D & WordInfo<W>::top_bit) != 0);
  ------------------
  |  |  137|     18|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|     18|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 18]
  |  |  ------------------
  ------------------
  671|       |
  672|       |   // Bit serial long division of ((~D) || (2^b - 1)) / D, with all of the
  673|       |   // conditional logic computed via masks
  674|     18|   W remainder = static_cast<W>(~D);
  675|     18|   W quotient = 0;
  676|       |
  677|  1.17k|   for(size_t i = 0; i != WordInfo<W>::bits; ++i) {
  ------------------
  |  Branch (677:22): [True: 1.15k, False: 18]
  ------------------
  678|  1.15k|      const auto carry = CT::Mask<W>::expand_top_bit(remainder);
  679|  1.15k|      remainder = static_cast<W>((remainder << 1) | 1);
  680|  1.15k|      quotient <<= 1;
  681|       |
  682|  1.15k|      const auto sub = carry | CT::Mask<W>::is_gte(remainder, D);
  683|  1.15k|      remainder -= sub.if_set_return(D);
  684|  1.15k|      quotient |= sub.if_set_return(1);
  685|  1.15k|   }
  686|       |
  687|     18|   return quotient;
  688|     18|}
_ZN5Botan13bigint_submulITkNS_8WordTypeEmEET_PS1_PKS1_mS1_:
  440|    147|inline constexpr auto bigint_submul(W z[], const W y[], size_t N, W q) -> W {
  441|    147|   W mul_carry = 0;
  442|    147|   W borrow = 0;
  443|       |
  444|  1.11k|   for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (444:22): [True: 969, False: 147]
  ------------------
  445|    969|      const W t = word_madd2(y[i], q, &mul_carry);
  446|    969|      z[i] = word_sub(z[i], t, &borrow);
  447|    969|   }
  448|       |
  449|       |   // Both mul_carry <= W_max - 1 and borrow <= 1, so this cannot overflow
  450|    147|   return mul_carry + borrow;
  451|    147|}
_ZN5Botan14bigint_cnd_addITkNS_8WordTypeEmEET_S1_PS1_PKS1_m:
   46|    147|inline constexpr W bigint_cnd_add(W cnd, W x[], const W y[], size_t size) {
   47|    147|   const auto mask = CT::Mask<W>::expand(cnd).value();
   48|       |
   49|    147|   W carry = 0;
   50|       |
   51|  1.11k|   for(size_t i = 0; i != size; ++i) {
  ------------------
  |  Branch (51:22): [True: 969, False: 147]
  ------------------
   52|    969|      x[i] = word_add(x[i], y[i] & mask, &carry);
   53|    969|   }
   54|       |
   55|    147|   return (mask & carry);
   56|    147|}
_ZN5Botan14bigint_sub_absITkNS_8WordTypeEmEENS_2CT4MaskIT_EEPS3_PKS3_S7_mS5_:
  280|     48|inline constexpr auto bigint_sub_abs(W z[], const W x[], const W y[], size_t N, W ws[]) -> CT::Mask<W> {
  281|       |   // Subtract in both direction then conditional copy out the result
  282|       |
  283|     48|   W* ws0 = ws;
  284|     48|   W* ws1 = ws + N;
  285|       |
  286|     48|   W borrow0 = 0;
  287|     48|   W borrow1 = 0;
  288|       |
  289|     48|   const size_t blocks = N - (N % 8);
  290|       |
  291|     64|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (291:22): [True: 16, False: 48]
  ------------------
  292|     16|      borrow0 = word8_sub3(ws0 + i, x + i, y + i, borrow0);
  293|     16|      borrow1 = word8_sub3(ws1 + i, y + i, x + i, borrow1);
  294|     16|   }
  295|       |
  296|    264|   for(size_t i = blocks; i != N; ++i) {
  ------------------
  |  Branch (296:27): [True: 216, False: 48]
  ------------------
  297|    216|      ws0[i] = word_sub(x[i], y[i], &borrow0);
  298|    216|      ws1[i] = word_sub(y[i], x[i], &borrow1);
  299|    216|   }
  300|       |
  301|     48|   return CT::conditional_copy_mem(borrow0, z, ws1, ws0, N);
  302|     48|}
_ZN5Botan11bigint_add2ITkNS_8WordTypeEmEET_PS1_mPKS1_m:
   95|  5.53k|inline constexpr auto bigint_add2(W x[], size_t x_size, const W y[], size_t y_size) -> W {
   96|  5.53k|   W carry = 0;
   97|       |
   98|  5.53k|   BOTAN_ASSERT(x_size >= y_size, "Expected sizes");
  ------------------
  |  |   71|  5.53k|   do {                                                                                 \
  |  |   72|  5.53k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|  5.53k|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 5.53k]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|  5.53k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 5.53k]
  |  |  ------------------
  ------------------
   99|       |
  100|  5.53k|   const size_t blocks = y_size - (y_size % 8);
  101|       |
  102|  7.35k|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (102:22): [True: 1.81k, False: 5.53k]
  ------------------
  103|  1.81k|      carry = word8_add2(x + i, y + i, carry);
  104|  1.81k|   }
  105|       |
  106|  24.3k|   for(size_t i = blocks; i != y_size; ++i) {
  ------------------
  |  Branch (106:27): [True: 18.8k, False: 5.53k]
  ------------------
  107|  18.8k|      x[i] = word_add(x[i], y[i], &carry);
  108|  18.8k|   }
  109|       |
  110|  30.4k|   for(size_t i = y_size; i != x_size; ++i) {
  ------------------
  |  Branch (110:27): [True: 24.9k, False: 5.53k]
  ------------------
  111|  24.9k|      x[i] = word_add(x[i], static_cast<W>(0), &carry);
  112|  24.9k|   }
  113|       |
  114|  5.53k|   return carry;
  115|  5.53k|}
_ZN5Botan11bigint_sub2ITkNS_8WordTypeEmEET_PS1_mPKS1_m:
  149|     48|inline constexpr auto bigint_sub2(W x[], size_t x_size, const W y[], size_t y_size) -> W {
  150|     48|   W borrow = 0;
  151|       |
  152|     48|   BOTAN_ASSERT(x_size >= y_size, "Expected sizes");
  ------------------
  |  |   71|     48|   do {                                                                                 \
  |  |   72|     48|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|     48|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 48]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|     48|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 48]
  |  |  ------------------
  ------------------
  153|       |
  154|     48|   const size_t blocks = y_size - (y_size % 8);
  155|       |
  156|     80|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (156:22): [True: 32, False: 48]
  ------------------
  157|     32|      borrow = word8_sub2(x + i, y + i, borrow);
  158|     32|   }
  159|       |
  160|    184|   for(size_t i = blocks; i != y_size; ++i) {
  ------------------
  |  Branch (160:27): [True: 136, False: 48]
  ------------------
  161|    136|      x[i] = word_sub(x[i], y[i], &borrow);
  162|    136|   }
  163|       |
  164|     48|   for(size_t i = y_size; i != x_size; ++i) {
  ------------------
  |  Branch (164:27): [True: 0, False: 48]
  ------------------
  165|      0|      x[i] = word_sub(x[i], static_cast<W>(0), &borrow);
  166|      0|   }
  167|       |
  168|     48|   return borrow;
  169|     48|}
_ZN5Botan13monty_inverseITkNS_8WordTypeEmEET_S1_:
  876|      6|inline constexpr auto monty_inverse(W a) -> W {
  877|      6|   BOTAN_ARG_CHECK(a % 2 == 1, "Cannot compute Montgomery inverse of an even integer");
  ------------------
  |  |   35|      6|   do {                                                          \
  |  |   36|      6|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|      6|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 6]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|      6|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 6]
  |  |  ------------------
  ------------------
  878|       |
  879|       |   // Newton's Method, following https://lemire.me/blog/2017/09/18/computing-the-inverse-of-odd-integers/
  880|       |
  881|      6|   constexpr size_t iter = WordInfo<W>::bits == 64 ? 4 : 3;
  ------------------
  |  Branch (881:28): [True: 0, Folded]
  ------------------
  882|       |
  883|       |   // Initial guess provides 5 bits of accuracy
  884|      6|   W r = (3 * a) ^ 2;
  885|       |
  886|       |   // Each iteration doubles the accuracy
  887|     30|   for(size_t i = 0; i != iter; ++i) {
  ------------------
  |  Branch (887:22): [True: 24, False: 6]
  ------------------
  888|     24|      r = r * (2 - r * a);
  889|     24|   }
  890|       |
  891|       |   // Now invert in addition space
  892|      6|   r = (WordInfo<W>::max - r) + 1;
  893|       |
  894|      6|   return r;
  895|      6|}
_ZN5Botan22bigint_monty_maybe_subITkNS_8WordTypeEmEEvmPT_S1_PKS1_S4_:
  226|  1.54k|inline constexpr void bigint_monty_maybe_sub(size_t N, W z[], W x0, const W x[], const W p[]) {
  227|  1.54k|   W borrow = 0;
  228|       |
  229|  1.54k|   const size_t blocks = N - (N % 8);
  230|       |
  231|  3.08k|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (231:22): [True: 1.54k, False: 1.54k]
  ------------------
  232|  1.54k|      borrow = word8_sub3(z + i, x + i, p + i, borrow);
  233|  1.54k|   }
  234|       |
  235|  3.08k|   for(size_t i = blocks; i != N; ++i) {
  ------------------
  |  Branch (235:27): [True: 1.54k, False: 1.54k]
  ------------------
  236|  1.54k|      z[i] = word_sub(x[i], p[i], &borrow);
  237|  1.54k|   }
  238|       |
  239|  1.54k|   borrow = (x0 - borrow) > x0;
  240|       |
  241|  1.54k|   CT::conditional_assign_mem(borrow, z, x, N);
  242|  1.54k|}
_ZN5Botan9comba_sqrILm4ETkNS_8WordTypeEmEEvPT0_PKS1_:
 1027|  2.18M|constexpr inline void comba_sqr(W z[2 * N], const W x[N]) {
 1028|  2.18M|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (1028:7): [True: 2.18M, Folded]
  ------------------
 1029|  2.18M|      if constexpr(std::same_as<W, word> && N == 4) {
 1030|  2.18M|         return bigint_comba_sqr4(z, x);
 1031|  2.18M|      }
 1032|       |      if constexpr(std::same_as<W, word> && N == 6) {
 1033|       |         return bigint_comba_sqr6(z, x);
 1034|       |      }
 1035|       |      if constexpr(std::same_as<W, word> && N == 7) {
 1036|       |         return bigint_comba_sqr7(z, x);
 1037|       |      }
 1038|       |      if constexpr(std::same_as<W, word> && N == 8) {
 1039|       |         return bigint_comba_sqr8(z, x);
 1040|       |      }
 1041|       |      if constexpr(std::same_as<W, word> && N == 9) {
 1042|       |         return bigint_comba_sqr9(z, x);
 1043|       |      }
 1044|       |      if constexpr(std::same_as<W, word> && N == 16) {
 1045|       |         return bigint_comba_sqr16(z, x);
 1046|       |      }
 1047|  2.18M|   }
 1048|       |
 1049|      0|   word3<W> accum;
 1050|       |
 1051|  2.18M|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (1051:22): [True: 0, False: 2.18M]
  ------------------
 1052|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (1052:28): [True: 0, False: 0]
  ------------------
 1053|      0|      const size_t end = std::min(N, i + 1);
 1054|       |
 1055|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (1055:29): [True: 0, False: 0]
  ------------------
 1056|      0|         accum.mul(x[j], x[i - j]);
 1057|      0|      }
 1058|      0|      z[i] = accum.extract();
 1059|      0|   }
 1060|  2.18M|}
_ZN5Botan22bigint_monty_maybe_subILm4ETkNS_8WordTypeEmEEvPT0_S1_PKS1_S4_:
  255|  3.66M|inline constexpr void bigint_monty_maybe_sub(W z[N], W x0, const W x[N], const W y[N]) {
  256|  3.66M|   W borrow = 0;
  257|       |
  258|  18.3M|   for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (258:22): [True: 14.6M, False: 3.66M]
  ------------------
  259|  14.6M|      z[i] = word_sub(x[i], y[i], &borrow);
  260|  14.6M|   }
  261|       |
  262|  3.66M|   borrow = (x0 - borrow) > x0;
  263|       |
  264|  3.66M|   CT::conditional_assign_mem(borrow, z, x, N);
  265|  3.66M|}
_ZN5Botan9comba_mulILm4ETkNS_8WordTypeEmEEvPT0_PKS1_S4_:
  991|  1.96M|constexpr inline void comba_mul(W z[2 * N], const W x[N], const W y[N]) {
  992|  1.96M|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (992:7): [True: 1.96M, Folded]
  ------------------
  993|  1.96M|      if constexpr(std::same_as<W, word> && N == 4) {
  994|  1.96M|         return bigint_comba_mul4(z, x, y);
  995|  1.96M|      }
  996|       |      if constexpr(std::same_as<W, word> && N == 6) {
  997|       |         return bigint_comba_mul6(z, x, y);
  998|       |      }
  999|       |      if constexpr(std::same_as<W, word> && N == 7) {
 1000|       |         return bigint_comba_mul7(z, x, y);
 1001|       |      }
 1002|       |      if constexpr(std::same_as<W, word> && N == 8) {
 1003|       |         return bigint_comba_mul8(z, x, y);
 1004|       |      }
 1005|       |      if constexpr(std::same_as<W, word> && N == 9) {
 1006|       |         return bigint_comba_mul9(z, x, y);
 1007|       |      }
 1008|       |      if constexpr(std::same_as<W, word> && N == 16) {
 1009|       |         return bigint_comba_mul16(z, x, y);
 1010|       |      }
 1011|  1.96M|   }
 1012|       |
 1013|      0|   word3<W> accum;
 1014|       |
 1015|  1.96M|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (1015:22): [True: 0, False: 1.96M]
  ------------------
 1016|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (1016:28): [True: 0, False: 0]
  ------------------
 1017|      0|      const size_t end = std::min(N, i + 1);
 1018|       |
 1019|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (1019:29): [True: 0, False: 0]
  ------------------
 1020|      0|         accum.mul(x[j], y[i - j]);
 1021|      0|      }
 1022|      0|      z[i] = accum.extract();
 1023|      0|   }
 1024|  1.96M|}
_ZN5Botan10shift_leftILm1ETkNS_8WordTypeEmLm4EEET0_RNSt3__15arrayIS1_XT1_EEE:
  898|   725k|inline constexpr W shift_left(std::array<W, N>& x) {
  899|   725k|   static_assert(N >= 1, "Invalid input size");
  900|   725k|   static_assert(S > 0, "Zero shift not supported");
  901|   725k|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  902|       |
  903|   725k|   const W carry = x[N - 1] >> (WordInfo<W>::bits - S);
  904|       |
  905|  2.90M|   for(size_t i = N - 1; i != 0; --i) {
  ------------------
  |  Branch (905:26): [True: 2.17M, False: 725k]
  ------------------
  906|  2.17M|      x[i] = (x[i] << S) | (x[i - 1] >> (WordInfo<W>::bits - S));
  907|  2.17M|   }
  908|   725k|   x[0] <<= S;
  909|       |
  910|   725k|   return carry;
  911|   725k|}
_ZN5Botan16read_window_bitsILm4EmLm4EEEmNSt3__14spanIKT0_XT1_EEEm:
 1244|   127k|constexpr size_t read_window_bits(std::span<const W, N> words, size_t offset) {
 1245|   127k|   static_assert(WindowBits >= 1 && WindowBits <= 7);
 1246|       |
 1247|   127k|   constexpr uint8_t WindowMask = static_cast<uint8_t>(1 << WindowBits) - 1;
 1248|       |
 1249|   127k|   constexpr size_t W_bits = sizeof(W) * 8;
 1250|   127k|   const auto bit_shift = offset % W_bits;
 1251|   127k|   const auto word_offset = words.size() - 1 - (offset / W_bits);
 1252|       |
 1253|   127k|   const bool single_byte_window = bit_shift <= (W_bits - WindowBits) || word_offset == 0;
  ------------------
  |  Branch (1253:36): [True: 127k, False: 0]
  |  Branch (1253:74): [True: 0, False: 0]
  ------------------
 1254|       |
 1255|   127k|   const auto w0 = words[word_offset];
 1256|       |
 1257|   127k|   if(single_byte_window) {
  ------------------
  |  Branch (1257:7): [True: 127k, False: 0]
  ------------------
 1258|   127k|      return (w0 >> bit_shift) & WindowMask;
 1259|   127k|   } else {
 1260|       |      // Otherwise we must join two words and extract the result
 1261|      0|      const auto w1 = words[word_offset - 1];
 1262|      0|      const auto combined = ((w0 >> bit_shift) | (w1 << (W_bits - bit_shift)));
 1263|      0|      return combined & WindowMask;
 1264|      0|   }
 1265|   127k|}
_ZN5Botan11shift_rightILm1ETkNS_8WordTypeEmLm4EEET0_RNSt3__15arrayIS1_XT1_EEE:
  914|  43.0k|inline constexpr W shift_right(std::array<W, N>& x) {
  915|  43.0k|   static_assert(N >= 1, "Invalid input size");
  916|  43.0k|   static_assert(S > 0, "Zero shift not supported");
  917|  43.0k|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  918|       |
  919|  43.0k|   const W carry = x[0] << (WordInfo<W>::bits - S);
  920|       |
  921|   172k|   for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (921:22): [True: 129k, False: 43.0k]
  ------------------
  922|   129k|      x[i] = (x[i] >> S) | (x[i + 1] << (WordInfo<W>::bits - S));
  923|   129k|   }
  924|  43.0k|   x[N - 1] >>= S;
  925|       |
  926|  43.0k|   return carry;
  927|  43.0k|}
_ZN5Botan16read_window_bitsILm7EhLm18446744073709551615EEEmNSt3__14spanIKT0_XT1_EEEm:
 1244|   180k|constexpr size_t read_window_bits(std::span<const W, N> words, size_t offset) {
 1245|   180k|   static_assert(WindowBits >= 1 && WindowBits <= 7);
 1246|       |
 1247|   180k|   constexpr uint8_t WindowMask = static_cast<uint8_t>(1 << WindowBits) - 1;
 1248|       |
 1249|   180k|   constexpr size_t W_bits = sizeof(W) * 8;
 1250|   180k|   const auto bit_shift = offset % W_bits;
 1251|   180k|   const auto word_offset = words.size() - 1 - (offset / W_bits);
 1252|       |
 1253|   180k|   const bool single_byte_window = bit_shift <= (W_bits - WindowBits) || word_offset == 0;
  ------------------
  |  Branch (1253:36): [True: 47.1k, False: 133k]
  |  Branch (1253:74): [True: 0, False: 133k]
  ------------------
 1254|       |
 1255|   180k|   const auto w0 = words[word_offset];
 1256|       |
 1257|   180k|   if(single_byte_window) {
  ------------------
  |  Branch (1257:7): [True: 47.1k, False: 133k]
  ------------------
 1258|  47.1k|      return (w0 >> bit_shift) & WindowMask;
 1259|   133k|   } else {
 1260|       |      // Otherwise we must join two words and extract the result
 1261|   133k|      const auto w1 = words[word_offset - 1];
 1262|   133k|      const auto combined = ((w0 >> bit_shift) | (w1 << (W_bits - bit_shift)));
 1263|   133k|      return combined & WindowMask;
 1264|   133k|   }
 1265|   180k|}
_ZN5Botan16read_window_bitsILm6EhLm18446744073709551615EEEmNSt3__14spanIKT0_XT1_EEEm:
 1244|   134k|constexpr size_t read_window_bits(std::span<const W, N> words, size_t offset) {
 1245|   134k|   static_assert(WindowBits >= 1 && WindowBits <= 7);
 1246|       |
 1247|   134k|   constexpr uint8_t WindowMask = static_cast<uint8_t>(1 << WindowBits) - 1;
 1248|       |
 1249|   134k|   constexpr size_t W_bits = sizeof(W) * 8;
 1250|   134k|   const auto bit_shift = offset % W_bits;
 1251|   134k|   const auto word_offset = words.size() - 1 - (offset / W_bits);
 1252|       |
 1253|   134k|   const bool single_byte_window = bit_shift <= (W_bits - WindowBits) || word_offset == 0;
  ------------------
  |  Branch (1253:36): [True: 51.0k, False: 83.5k]
  |  Branch (1253:74): [True: 0, False: 83.5k]
  ------------------
 1254|       |
 1255|   134k|   const auto w0 = words[word_offset];
 1256|       |
 1257|   134k|   if(single_byte_window) {
  ------------------
  |  Branch (1257:7): [True: 51.0k, False: 83.5k]
  ------------------
 1258|  51.0k|      return (w0 >> bit_shift) & WindowMask;
 1259|  83.5k|   } else {
 1260|       |      // Otherwise we must join two words and extract the result
 1261|  83.5k|      const auto w1 = words[word_offset - 1];
 1262|  83.5k|      const auto combined = ((w0 >> bit_shift) | (w1 << (W_bits - bit_shift)));
 1263|  83.5k|      return combined & WindowMask;
 1264|  83.5k|   }
 1265|   134k|}
_ZN5Botan9comba_sqrILm6ETkNS_8WordTypeEmEEvPT0_PKS1_:
 1027|  1.60M|constexpr inline void comba_sqr(W z[2 * N], const W x[N]) {
 1028|  1.60M|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (1028:7): [True: 1.60M, Folded]
  ------------------
 1029|       |      if constexpr(std::same_as<W, word> && N == 4) {
 1030|       |         return bigint_comba_sqr4(z, x);
 1031|       |      }
 1032|  1.60M|      if constexpr(std::same_as<W, word> && N == 6) {
 1033|  1.60M|         return bigint_comba_sqr6(z, x);
 1034|  1.60M|      }
 1035|       |      if constexpr(std::same_as<W, word> && N == 7) {
 1036|       |         return bigint_comba_sqr7(z, x);
 1037|       |      }
 1038|       |      if constexpr(std::same_as<W, word> && N == 8) {
 1039|       |         return bigint_comba_sqr8(z, x);
 1040|       |      }
 1041|       |      if constexpr(std::same_as<W, word> && N == 9) {
 1042|       |         return bigint_comba_sqr9(z, x);
 1043|       |      }
 1044|       |      if constexpr(std::same_as<W, word> && N == 16) {
 1045|       |         return bigint_comba_sqr16(z, x);
 1046|       |      }
 1047|  1.60M|   }
 1048|       |
 1049|      0|   word3<W> accum;
 1050|       |
 1051|  1.60M|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (1051:22): [True: 0, False: 1.60M]
  ------------------
 1052|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (1052:28): [True: 0, False: 0]
  ------------------
 1053|      0|      const size_t end = std::min(N, i + 1);
 1054|       |
 1055|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (1055:29): [True: 0, False: 0]
  ------------------
 1056|      0|         accum.mul(x[j], x[i - j]);
 1057|      0|      }
 1058|      0|      z[i] = accum.extract();
 1059|      0|   }
 1060|  1.60M|}
_ZN5Botan22bigint_monty_maybe_subILm6ETkNS_8WordTypeEmEEvPT0_S1_PKS1_S4_:
  255|  2.29M|inline constexpr void bigint_monty_maybe_sub(W z[N], W x0, const W x[N], const W y[N]) {
  256|  2.29M|   W borrow = 0;
  257|       |
  258|  16.0M|   for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (258:22): [True: 13.7M, False: 2.29M]
  ------------------
  259|  13.7M|      z[i] = word_sub(x[i], y[i], &borrow);
  260|  13.7M|   }
  261|       |
  262|  2.29M|   borrow = (x0 - borrow) > x0;
  263|       |
  264|  2.29M|   CT::conditional_assign_mem(borrow, z, x, N);
  265|  2.29M|}
_ZN5Botan9comba_mulILm6ETkNS_8WordTypeEmEEvPT0_PKS1_S4_:
  991|  1.41M|constexpr inline void comba_mul(W z[2 * N], const W x[N], const W y[N]) {
  992|  1.41M|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (992:7): [True: 1.41M, Folded]
  ------------------
  993|       |      if constexpr(std::same_as<W, word> && N == 4) {
  994|       |         return bigint_comba_mul4(z, x, y);
  995|       |      }
  996|  1.41M|      if constexpr(std::same_as<W, word> && N == 6) {
  997|  1.41M|         return bigint_comba_mul6(z, x, y);
  998|  1.41M|      }
  999|       |      if constexpr(std::same_as<W, word> && N == 7) {
 1000|       |         return bigint_comba_mul7(z, x, y);
 1001|       |      }
 1002|       |      if constexpr(std::same_as<W, word> && N == 8) {
 1003|       |         return bigint_comba_mul8(z, x, y);
 1004|       |      }
 1005|       |      if constexpr(std::same_as<W, word> && N == 9) {
 1006|       |         return bigint_comba_mul9(z, x, y);
 1007|       |      }
 1008|       |      if constexpr(std::same_as<W, word> && N == 16) {
 1009|       |         return bigint_comba_mul16(z, x, y);
 1010|       |      }
 1011|  1.41M|   }
 1012|       |
 1013|      0|   word3<W> accum;
 1014|       |
 1015|  1.41M|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (1015:22): [True: 0, False: 1.41M]
  ------------------
 1016|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (1016:28): [True: 0, False: 0]
  ------------------
 1017|      0|      const size_t end = std::min(N, i + 1);
 1018|       |
 1019|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (1019:29): [True: 0, False: 0]
  ------------------
 1020|      0|         accum.mul(x[j], y[i - j]);
 1021|      0|      }
 1022|      0|      z[i] = accum.extract();
 1023|      0|   }
 1024|  1.41M|}
_ZN5Botan10shift_leftILm1ETkNS_8WordTypeEmLm6EEET0_RNSt3__15arrayIS1_XT1_EEE:
  898|   516k|inline constexpr W shift_left(std::array<W, N>& x) {
  899|   516k|   static_assert(N >= 1, "Invalid input size");
  900|   516k|   static_assert(S > 0, "Zero shift not supported");
  901|   516k|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  902|       |
  903|   516k|   const W carry = x[N - 1] >> (WordInfo<W>::bits - S);
  904|       |
  905|  3.09M|   for(size_t i = N - 1; i != 0; --i) {
  ------------------
  |  Branch (905:26): [True: 2.58M, False: 516k]
  ------------------
  906|  2.58M|      x[i] = (x[i] << S) | (x[i - 1] >> (WordInfo<W>::bits - S));
  907|  2.58M|   }
  908|   516k|   x[0] <<= S;
  909|       |
  910|   516k|   return carry;
  911|   516k|}
_ZN5Botan16read_window_bitsILm5EmLm6EEEmNSt3__14spanIKT0_XT1_EEEm:
 1244|  65.2k|constexpr size_t read_window_bits(std::span<const W, N> words, size_t offset) {
 1245|  65.2k|   static_assert(WindowBits >= 1 && WindowBits <= 7);
 1246|       |
 1247|  65.2k|   constexpr uint8_t WindowMask = static_cast<uint8_t>(1 << WindowBits) - 1;
 1248|       |
 1249|  65.2k|   constexpr size_t W_bits = sizeof(W) * 8;
 1250|  65.2k|   const auto bit_shift = offset % W_bits;
 1251|  65.2k|   const auto word_offset = words.size() - 1 - (offset / W_bits);
 1252|       |
 1253|  65.2k|   const bool single_byte_window = bit_shift <= (W_bits - WindowBits) || word_offset == 0;
  ------------------
  |  Branch (1253:36): [True: 61.0k, False: 4.24k]
  |  Branch (1253:74): [True: 848, False: 3.39k]
  ------------------
 1254|       |
 1255|  65.2k|   const auto w0 = words[word_offset];
 1256|       |
 1257|  65.2k|   if(single_byte_window) {
  ------------------
  |  Branch (1257:7): [True: 61.9k, False: 3.39k]
  ------------------
 1258|  61.9k|      return (w0 >> bit_shift) & WindowMask;
 1259|  61.9k|   } else {
 1260|       |      // Otherwise we must join two words and extract the result
 1261|  3.39k|      const auto w1 = words[word_offset - 1];
 1262|  3.39k|      const auto combined = ((w0 >> bit_shift) | (w1 << (W_bits - bit_shift)));
 1263|  3.39k|      return combined & WindowMask;
 1264|  3.39k|   }
 1265|  65.2k|}
_ZN5Botan11shift_rightILm1ETkNS_8WordTypeEmLm6EEET0_RNSt3__15arrayIS1_XT1_EEE:
  914|  31.8k|inline constexpr W shift_right(std::array<W, N>& x) {
  915|  31.8k|   static_assert(N >= 1, "Invalid input size");
  916|  31.8k|   static_assert(S > 0, "Zero shift not supported");
  917|  31.8k|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  918|       |
  919|  31.8k|   const W carry = x[0] << (WordInfo<W>::bits - S);
  920|       |
  921|   191k|   for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (921:22): [True: 159k, False: 31.8k]
  ------------------
  922|   159k|      x[i] = (x[i] >> S) | (x[i + 1] << (WordInfo<W>::bits - S));
  923|   159k|   }
  924|  31.8k|   x[N - 1] >>= S;
  925|       |
  926|  31.8k|   return carry;
  927|  31.8k|}
_ZN5Botan9comba_sqrILm8ETkNS_8WordTypeEmEEvPT0_PKS1_:
 1027|  1.28M|constexpr inline void comba_sqr(W z[2 * N], const W x[N]) {
 1028|  1.28M|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (1028:7): [True: 1.28M, Folded]
  ------------------
 1029|       |      if constexpr(std::same_as<W, word> && N == 4) {
 1030|       |         return bigint_comba_sqr4(z, x);
 1031|       |      }
 1032|       |      if constexpr(std::same_as<W, word> && N == 6) {
 1033|       |         return bigint_comba_sqr6(z, x);
 1034|       |      }
 1035|       |      if constexpr(std::same_as<W, word> && N == 7) {
 1036|       |         return bigint_comba_sqr7(z, x);
 1037|       |      }
 1038|  1.28M|      if constexpr(std::same_as<W, word> && N == 8) {
 1039|  1.28M|         return bigint_comba_sqr8(z, x);
 1040|  1.28M|      }
 1041|       |      if constexpr(std::same_as<W, word> && N == 9) {
 1042|       |         return bigint_comba_sqr9(z, x);
 1043|       |      }
 1044|       |      if constexpr(std::same_as<W, word> && N == 16) {
 1045|       |         return bigint_comba_sqr16(z, x);
 1046|       |      }
 1047|  1.28M|   }
 1048|       |
 1049|      0|   word3<W> accum;
 1050|       |
 1051|  1.28M|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (1051:22): [True: 0, False: 1.28M]
  ------------------
 1052|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (1052:28): [True: 0, False: 0]
  ------------------
 1053|      0|      const size_t end = std::min(N, i + 1);
 1054|       |
 1055|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (1055:29): [True: 0, False: 0]
  ------------------
 1056|      0|         accum.mul(x[j], x[i - j]);
 1057|      0|      }
 1058|      0|      z[i] = accum.extract();
 1059|      0|   }
 1060|  1.28M|}
_ZN5Botan22bigint_monty_maybe_subILm8ETkNS_8WordTypeEmEEvPT0_S1_PKS1_S4_:
  255|  3.19M|inline constexpr void bigint_monty_maybe_sub(W z[N], W x0, const W x[N], const W y[N]) {
  256|  3.19M|   W borrow = 0;
  257|       |
  258|  28.7M|   for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (258:22): [True: 25.5M, False: 3.19M]
  ------------------
  259|  25.5M|      z[i] = word_sub(x[i], y[i], &borrow);
  260|  25.5M|   }
  261|       |
  262|  3.19M|   borrow = (x0 - borrow) > x0;
  263|       |
  264|  3.19M|   CT::conditional_assign_mem(borrow, z, x, N);
  265|  3.19M|}
_ZN5Botan9comba_mulILm8ETkNS_8WordTypeEmEEvPT0_PKS1_S4_:
  991|  1.17M|constexpr inline void comba_mul(W z[2 * N], const W x[N], const W y[N]) {
  992|  1.17M|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (992:7): [True: 1.17M, Folded]
  ------------------
  993|       |      if constexpr(std::same_as<W, word> && N == 4) {
  994|       |         return bigint_comba_mul4(z, x, y);
  995|       |      }
  996|       |      if constexpr(std::same_as<W, word> && N == 6) {
  997|       |         return bigint_comba_mul6(z, x, y);
  998|       |      }
  999|       |      if constexpr(std::same_as<W, word> && N == 7) {
 1000|       |         return bigint_comba_mul7(z, x, y);
 1001|       |      }
 1002|  1.17M|      if constexpr(std::same_as<W, word> && N == 8) {
 1003|  1.17M|         return bigint_comba_mul8(z, x, y);
 1004|  1.17M|      }
 1005|       |      if constexpr(std::same_as<W, word> && N == 9) {
 1006|       |         return bigint_comba_mul9(z, x, y);
 1007|       |      }
 1008|       |      if constexpr(std::same_as<W, word> && N == 16) {
 1009|       |         return bigint_comba_mul16(z, x, y);
 1010|       |      }
 1011|  1.17M|   }
 1012|       |
 1013|      0|   word3<W> accum;
 1014|       |
 1015|  1.17M|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (1015:22): [True: 0, False: 1.17M]
  ------------------
 1016|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (1016:28): [True: 0, False: 0]
  ------------------
 1017|      0|      const size_t end = std::min(N, i + 1);
 1018|       |
 1019|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (1019:29): [True: 0, False: 0]
  ------------------
 1020|      0|         accum.mul(x[j], y[i - j]);
 1021|      0|      }
 1022|      0|      z[i] = accum.extract();
 1023|      0|   }
 1024|  1.17M|}
_ZN5Botan10shift_leftILm1ETkNS_8WordTypeEmLm8EEET0_RNSt3__15arrayIS1_XT1_EEE:
  898|   416k|inline constexpr W shift_left(std::array<W, N>& x) {
  899|   416k|   static_assert(N >= 1, "Invalid input size");
  900|   416k|   static_assert(S > 0, "Zero shift not supported");
  901|   416k|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  902|       |
  903|   416k|   const W carry = x[N - 1] >> (WordInfo<W>::bits - S);
  904|       |
  905|  3.33M|   for(size_t i = N - 1; i != 0; --i) {
  ------------------
  |  Branch (905:26): [True: 2.91M, False: 416k]
  ------------------
  906|  2.91M|      x[i] = (x[i] << S) | (x[i - 1] >> (WordInfo<W>::bits - S));
  907|  2.91M|   }
  908|   416k|   x[0] <<= S;
  909|       |
  910|   416k|   return carry;
  911|   416k|}
_ZN5Botan16read_window_bitsILm5EmLm8EEEmNSt3__14spanIKT0_XT1_EEEm:
 1244|   103k|constexpr size_t read_window_bits(std::span<const W, N> words, size_t offset) {
 1245|   103k|   static_assert(WindowBits >= 1 && WindowBits <= 7);
 1246|       |
 1247|   103k|   constexpr uint8_t WindowMask = static_cast<uint8_t>(1 << WindowBits) - 1;
 1248|       |
 1249|   103k|   constexpr size_t W_bits = sizeof(W) * 8;
 1250|   103k|   const auto bit_shift = offset % W_bits;
 1251|   103k|   const auto word_offset = words.size() - 1 - (offset / W_bits);
 1252|       |
 1253|   103k|   const bool single_byte_window = bit_shift <= (W_bits - WindowBits) || word_offset == 0;
  ------------------
  |  Branch (1253:36): [True: 96.8k, False: 7.06k]
  |  Branch (1253:74): [True: 1.00k, False: 6.05k]
  ------------------
 1254|       |
 1255|   103k|   const auto w0 = words[word_offset];
 1256|       |
 1257|   103k|   if(single_byte_window) {
  ------------------
  |  Branch (1257:7): [True: 97.8k, False: 6.05k]
  ------------------
 1258|  97.8k|      return (w0 >> bit_shift) & WindowMask;
 1259|  97.8k|   } else {
 1260|       |      // Otherwise we must join two words and extract the result
 1261|  6.05k|      const auto w1 = words[word_offset - 1];
 1262|  6.05k|      const auto combined = ((w0 >> bit_shift) | (w1 << (W_bits - bit_shift)));
 1263|  6.05k|      return combined & WindowMask;
 1264|  6.05k|   }
 1265|   103k|}
_ZN5Botan11shift_rightILm1ETkNS_8WordTypeEmLm8EEET0_RNSt3__15arrayIS1_XT1_EEE:
  914|  25.8k|inline constexpr W shift_right(std::array<W, N>& x) {
  915|  25.8k|   static_assert(N >= 1, "Invalid input size");
  916|  25.8k|   static_assert(S > 0, "Zero shift not supported");
  917|  25.8k|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  918|       |
  919|  25.8k|   const W carry = x[0] << (WordInfo<W>::bits - S);
  920|       |
  921|   206k|   for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (921:22): [True: 180k, False: 25.8k]
  ------------------
  922|   180k|      x[i] = (x[i] >> S) | (x[i + 1] << (WordInfo<W>::bits - S));
  923|   180k|   }
  924|  25.8k|   x[N - 1] >>= S;
  925|       |
  926|  25.8k|   return carry;
  927|  25.8k|}
_ZN5Botan10shift_leftILm1ETkNS_8WordTypeEmLm9EEET0_RNSt3__15arrayIS1_XT1_EEE:
  898|   631k|inline constexpr W shift_left(std::array<W, N>& x) {
  899|   631k|   static_assert(N >= 1, "Invalid input size");
  900|   631k|   static_assert(S > 0, "Zero shift not supported");
  901|   631k|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  902|       |
  903|   631k|   const W carry = x[N - 1] >> (WordInfo<W>::bits - S);
  904|       |
  905|  5.68M|   for(size_t i = N - 1; i != 0; --i) {
  ------------------
  |  Branch (905:26): [True: 5.05M, False: 631k]
  ------------------
  906|  5.05M|      x[i] = (x[i] << S) | (x[i - 1] >> (WordInfo<W>::bits - S));
  907|  5.05M|   }
  908|   631k|   x[0] <<= S;
  909|       |
  910|   631k|   return carry;
  911|   631k|}
_ZN5Botan22bigint_monty_maybe_subILm9ETkNS_8WordTypeEmEEvPT0_S1_PKS1_S4_:
  255|   915k|inline constexpr void bigint_monty_maybe_sub(W z[N], W x0, const W x[N], const W y[N]) {
  256|   915k|   W borrow = 0;
  257|       |
  258|  9.15M|   for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (258:22): [True: 8.23M, False: 915k]
  ------------------
  259|  8.23M|      z[i] = word_sub(x[i], y[i], &borrow);
  260|  8.23M|   }
  261|       |
  262|   915k|   borrow = (x0 - borrow) > x0;
  263|       |
  264|   915k|   CT::conditional_assign_mem(borrow, z, x, N);
  265|   915k|}
_ZN5Botan11shift_rightILm1ETkNS_8WordTypeEmLm9EEET0_RNSt3__15arrayIS1_XT1_EEE:
  914|  38.8k|inline constexpr W shift_right(std::array<W, N>& x) {
  915|  38.8k|   static_assert(N >= 1, "Invalid input size");
  916|  38.8k|   static_assert(S > 0, "Zero shift not supported");
  917|  38.8k|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  918|       |
  919|  38.8k|   const W carry = x[0] << (WordInfo<W>::bits - S);
  920|       |
  921|   349k|   for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (921:22): [True: 310k, False: 38.8k]
  ------------------
  922|   310k|      x[i] = (x[i] >> S) | (x[i + 1] << (WordInfo<W>::bits - S));
  923|   310k|   }
  924|  38.8k|   x[N - 1] >>= S;
  925|       |
  926|  38.8k|   return carry;
  927|  38.8k|}
_ZN5Botan9comba_sqrILm9ETkNS_8WordTypeEmEEvPT0_PKS1_:
 1027|  1.84M|constexpr inline void comba_sqr(W z[2 * N], const W x[N]) {
 1028|  1.84M|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (1028:7): [True: 1.84M, Folded]
  ------------------
 1029|       |      if constexpr(std::same_as<W, word> && N == 4) {
 1030|       |         return bigint_comba_sqr4(z, x);
 1031|       |      }
 1032|       |      if constexpr(std::same_as<W, word> && N == 6) {
 1033|       |         return bigint_comba_sqr6(z, x);
 1034|       |      }
 1035|       |      if constexpr(std::same_as<W, word> && N == 7) {
 1036|       |         return bigint_comba_sqr7(z, x);
 1037|       |      }
 1038|       |      if constexpr(std::same_as<W, word> && N == 8) {
 1039|       |         return bigint_comba_sqr8(z, x);
 1040|       |      }
 1041|  1.84M|      if constexpr(std::same_as<W, word> && N == 9) {
 1042|  1.84M|         return bigint_comba_sqr9(z, x);
 1043|  1.84M|      }
 1044|       |      if constexpr(std::same_as<W, word> && N == 16) {
 1045|       |         return bigint_comba_sqr16(z, x);
 1046|       |      }
 1047|  1.84M|   }
 1048|       |
 1049|      0|   word3<W> accum;
 1050|       |
 1051|  1.84M|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (1051:22): [True: 0, False: 1.84M]
  ------------------
 1052|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (1052:28): [True: 0, False: 0]
  ------------------
 1053|      0|      const size_t end = std::min(N, i + 1);
 1054|       |
 1055|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (1055:29): [True: 0, False: 0]
  ------------------
 1056|      0|         accum.mul(x[j], x[i - j]);
 1057|      0|      }
 1058|      0|      z[i] = accum.extract();
 1059|      0|   }
 1060|  1.84M|}
_ZN5Botan9comba_mulILm9ETkNS_8WordTypeEmEEvPT0_PKS1_S4_:
  991|  1.48M|constexpr inline void comba_mul(W z[2 * N], const W x[N], const W y[N]) {
  992|  1.48M|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (992:7): [True: 1.48M, Folded]
  ------------------
  993|       |      if constexpr(std::same_as<W, word> && N == 4) {
  994|       |         return bigint_comba_mul4(z, x, y);
  995|       |      }
  996|       |      if constexpr(std::same_as<W, word> && N == 6) {
  997|       |         return bigint_comba_mul6(z, x, y);
  998|       |      }
  999|       |      if constexpr(std::same_as<W, word> && N == 7) {
 1000|       |         return bigint_comba_mul7(z, x, y);
 1001|       |      }
 1002|       |      if constexpr(std::same_as<W, word> && N == 8) {
 1003|       |         return bigint_comba_mul8(z, x, y);
 1004|       |      }
 1005|  1.48M|      if constexpr(std::same_as<W, word> && N == 9) {
 1006|  1.48M|         return bigint_comba_mul9(z, x, y);
 1007|  1.48M|      }
 1008|       |      if constexpr(std::same_as<W, word> && N == 16) {
 1009|       |         return bigint_comba_mul16(z, x, y);
 1010|       |      }
 1011|  1.48M|   }
 1012|       |
 1013|      0|   word3<W> accum;
 1014|       |
 1015|  1.48M|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (1015:22): [True: 0, False: 1.48M]
  ------------------
 1016|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (1016:28): [True: 0, False: 0]
  ------------------
 1017|      0|      const size_t end = std::min(N, i + 1);
 1018|       |
 1019|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (1019:29): [True: 0, False: 0]
  ------------------
 1020|      0|         accum.mul(x[j], y[i - j]);
 1021|      0|      }
 1022|      0|      z[i] = accum.extract();
 1023|      0|   }
 1024|  1.48M|}
_ZN5Botan10shift_leftILm16ETkNS_8WordTypeEmLm9EEET0_RNSt3__15arrayIS1_XT1_EEE:
  898|  4.60k|inline constexpr W shift_left(std::array<W, N>& x) {
  899|  4.60k|   static_assert(N >= 1, "Invalid input size");
  900|  4.60k|   static_assert(S > 0, "Zero shift not supported");
  901|  4.60k|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  902|       |
  903|  4.60k|   const W carry = x[N - 1] >> (WordInfo<W>::bits - S);
  904|       |
  905|  41.4k|   for(size_t i = N - 1; i != 0; --i) {
  ------------------
  |  Branch (905:26): [True: 36.8k, False: 4.60k]
  ------------------
  906|  36.8k|      x[i] = (x[i] << S) | (x[i - 1] >> (WordInfo<W>::bits - S));
  907|  36.8k|   }
  908|  4.60k|   x[0] <<= S;
  909|       |
  910|  4.60k|   return carry;
  911|  4.60k|}
_ZN5Botan9comba_mulILm7ETkNS_8WordTypeEmEEvPT0_PKS1_S4_:
  991|  38.3k|constexpr inline void comba_mul(W z[2 * N], const W x[N], const W y[N]) {
  992|  38.3k|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (992:7): [True: 38.3k, Folded]
  ------------------
  993|       |      if constexpr(std::same_as<W, word> && N == 4) {
  994|       |         return bigint_comba_mul4(z, x, y);
  995|       |      }
  996|       |      if constexpr(std::same_as<W, word> && N == 6) {
  997|       |         return bigint_comba_mul6(z, x, y);
  998|       |      }
  999|  38.3k|      if constexpr(std::same_as<W, word> && N == 7) {
 1000|  38.3k|         return bigint_comba_mul7(z, x, y);
 1001|  38.3k|      }
 1002|       |      if constexpr(std::same_as<W, word> && N == 8) {
 1003|       |         return bigint_comba_mul8(z, x, y);
 1004|       |      }
 1005|       |      if constexpr(std::same_as<W, word> && N == 9) {
 1006|       |         return bigint_comba_mul9(z, x, y);
 1007|       |      }
 1008|       |      if constexpr(std::same_as<W, word> && N == 16) {
 1009|       |         return bigint_comba_mul16(z, x, y);
 1010|       |      }
 1011|  38.3k|   }
 1012|       |
 1013|      0|   word3<W> accum;
 1014|       |
 1015|  38.3k|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (1015:22): [True: 0, False: 38.3k]
  ------------------
 1016|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (1016:28): [True: 0, False: 0]
  ------------------
 1017|      0|      const size_t end = std::min(N, i + 1);
 1018|       |
 1019|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (1019:29): [True: 0, False: 0]
  ------------------
 1020|      0|         accum.mul(x[j], y[i - j]);
 1021|      0|      }
 1022|      0|      z[i] = accum.extract();
 1023|      0|   }
 1024|  38.3k|}
_ZN5Botan9comba_sqrILm7ETkNS_8WordTypeEmEEvPT0_PKS1_:
 1027|  38.0k|constexpr inline void comba_sqr(W z[2 * N], const W x[N]) {
 1028|  38.0k|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (1028:7): [True: 38.0k, Folded]
  ------------------
 1029|       |      if constexpr(std::same_as<W, word> && N == 4) {
 1030|       |         return bigint_comba_sqr4(z, x);
 1031|       |      }
 1032|       |      if constexpr(std::same_as<W, word> && N == 6) {
 1033|       |         return bigint_comba_sqr6(z, x);
 1034|       |      }
 1035|  38.0k|      if constexpr(std::same_as<W, word> && N == 7) {
 1036|  38.0k|         return bigint_comba_sqr7(z, x);
 1037|  38.0k|      }
 1038|       |      if constexpr(std::same_as<W, word> && N == 8) {
 1039|       |         return bigint_comba_sqr8(z, x);
 1040|       |      }
 1041|       |      if constexpr(std::same_as<W, word> && N == 9) {
 1042|       |         return bigint_comba_sqr9(z, x);
 1043|       |      }
 1044|       |      if constexpr(std::same_as<W, word> && N == 16) {
 1045|       |         return bigint_comba_sqr16(z, x);
 1046|       |      }
 1047|  38.0k|   }
 1048|       |
 1049|      0|   word3<W> accum;
 1050|       |
 1051|  38.0k|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (1051:22): [True: 0, False: 38.0k]
  ------------------
 1052|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (1052:28): [True: 0, False: 0]
  ------------------
 1053|      0|      const size_t end = std::min(N, i + 1);
 1054|       |
 1055|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (1055:29): [True: 0, False: 0]
  ------------------
 1056|      0|         accum.mul(x[j], x[i - j]);
 1057|      0|      }
 1058|      0|      z[i] = accum.extract();
 1059|      0|   }
 1060|  38.0k|}

_ZN5Botan14OCB_EncryptionC2ENSt3__110unique_ptrINS_11BlockCipherENS1_14default_deleteIS3_EEEEm:
  101|      9|            OCB_Mode(std::move(cipher), tag_size) {}
_ZN5Botan14OCB_DecryptionC2ENSt3__110unique_ptrINS_11BlockCipherENS1_14default_deleteIS3_EEEEm:
  120|     60|            OCB_Mode(std::move(cipher), tag_size) {}
_ZNK5Botan8OCB_Mode8tag_sizeEv:
   46|    431|      size_t tag_size() const final { return m_tag_size; }
_ZNK5Botan8OCB_Mode10block_sizeEv:
   63|    351|      size_t block_size() const { return m_block_size; }
_ZNK5Botan8OCB_Mode10par_blocksEv:
   65|    218|      size_t par_blocks() const { return m_par_blocks; }
_ZNK5Botan14OCB_Decryption18minimum_final_sizeEv:
  124|     56|      size_t minimum_final_size() const override { return tag_size(); }

_ZN5Botan6PCurve15PrimeOrderCurve6ScalarD2Ev:
   73|  49.9k|            ~Scalar() { _zeroize(); }
_ZN5Botan6PCurve15PrimeOrderCurve11AffinePointD2Ev:
  101|  53.0k|            ~AffinePoint() = default;
_ZN5Botan6PCurve15PrimeOrderCurve15ProjectivePointD2Ev:
  135|  2.59k|            ~ProjectivePoint() = default;
_ZN5Botan6PCurve15PrimeOrderCurve6ScalarC2EOS2_:
   68|  26.2k|            Scalar(Scalar&& other) = default;
_ZN5Botan6PCurve15PrimeOrderCurve6ScalarC2ERKS2_:
   67|  14.5k|            Scalar(const Scalar& other) = default;
_ZN5Botan6PCurve15PrimeOrderCurve11AffinePointC2EOS2_:
   98|  37.5k|            AffinePoint(AffinePoint&& other) = default;
_ZN5Botan6PCurve15PrimeOrderCurve11AffinePointC2ERKS2_:
   97|  3.22k|            AffinePoint(const AffinePoint& other) = default;
_ZNK5Botan6PCurve15PrimeOrderCurve6Scalar6_curveEv:
   77|  22.3k|            const auto& _curve() const { return m_curve; }
_ZNK5Botan6PCurve15PrimeOrderCurve6Scalar6_valueEv:
   79|  22.3k|            const auto& _value() const { return m_value; }
_ZN5Botan6PCurve15PrimeOrderCurve6Scalar7_createENSt3__110shared_ptrIKS1_EENS3_5arrayImLm9EEE:
   81|  9.07k|            static Scalar _create(CurvePtr curve, StorageUnit v) { return Scalar(std::move(curve), v); }
_ZN5Botan6PCurve15PrimeOrderCurve6ScalarC2ENSt3__110shared_ptrIKS1_EENS3_5arrayImLm9EEE:
   84|  9.07k|            Scalar(CurvePtr curve, StorageUnit v) : m_curve(std::move(curve)), m_value(v) {}
_ZNK5Botan6PCurve15PrimeOrderCurve11AffinePoint6_curveEv:
  105|  32.6k|            const auto& _curve() const { return m_curve; }
_ZNK5Botan6PCurve15PrimeOrderCurve11AffinePoint2_xEv:
  107|  32.6k|            const auto& _x() const { return m_x; }
_ZNK5Botan6PCurve15PrimeOrderCurve11AffinePoint2_yEv:
  109|  32.6k|            const auto& _y() const { return m_y; }
_ZN5Botan6PCurve15PrimeOrderCurve11AffinePoint7_createENSt3__110shared_ptrIKS1_EENS3_5arrayImLm9EEES8_:
  111|  12.3k|            static AffinePoint _create(CurvePtr curve, StorageUnit x, StorageUnit y) {
  112|  12.3k|               return AffinePoint(std::move(curve), x, y);
  113|  12.3k|            }
_ZN5Botan6PCurve15PrimeOrderCurve11AffinePointC2ENSt3__110shared_ptrIKS1_EENS3_5arrayImLm9EEES8_:
  116|  12.3k|            AffinePoint(CurvePtr curve, StorageUnit x, StorageUnit y) : m_curve(std::move(curve)), m_x(x), m_y(y) {}
_ZNK5Botan6PCurve15PrimeOrderCurve15ProjectivePoint6_curveEv:
  137|  2.59k|            const auto& _curve() const { return m_curve; }
_ZNK5Botan6PCurve15PrimeOrderCurve15ProjectivePoint2_xEv:
  139|  2.59k|            const auto& _x() const { return m_x; }
_ZNK5Botan6PCurve15PrimeOrderCurve15ProjectivePoint2_yEv:
  141|  2.59k|            const auto& _y() const { return m_y; }
_ZNK5Botan6PCurve15PrimeOrderCurve15ProjectivePoint2_zEv:
  143|  2.59k|            const auto& _z() const { return m_z; }
_ZN5Botan6PCurve15PrimeOrderCurve15ProjectivePoint7_createENSt3__110shared_ptrIKS1_EENS3_5arrayImLm9EEES8_S8_:
  145|  2.59k|            static ProjectivePoint _create(CurvePtr curve, StorageUnit x, StorageUnit y, StorageUnit z) {
  146|  2.59k|               return ProjectivePoint(std::move(curve), x, y, z);
  147|  2.59k|            }
_ZN5Botan6PCurve15PrimeOrderCurve15ProjectivePointC2ENSt3__110shared_ptrIKS1_EENS3_5arrayImLm9EEES8_S8_:
  151|  2.59k|                  m_curve(std::move(curve)), m_x(x), m_y(y), m_z(z) {}
_ZN5Botan6PCurve15PrimeOrderCurveD2Ev:
  164|      6|      virtual ~PrimeOrderCurve() = default;

pcurves_brainpool256r1.cpp:_ZN5Botan11dbl_genericINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES3_E11FieldParamsEEEEES8_EESC_EET_RKSE_RKT0_:
  397|  4.13k|inline constexpr ProjectivePoint dbl_generic(const ProjectivePoint& pt, const FieldElement& A) {
  398|       |   // Cost: 1M + 3S + 1A + 1*3
  399|  4.13k|   const auto z2 = pt.z().square();
  400|  4.13k|   const auto m = pt.x().square().mul3() + A * z2.square();
  401|       |
  402|       |   // Remaining cost: 3M + 3S + 3A + 2*2 + 1*4 + 1*8
  403|  4.13k|   const auto y2 = pt.y().square();
  404|  4.13k|   const auto s = pt.x().mul4() * y2;
  405|  4.13k|   const auto nx = m.square() - s.mul2();
  406|  4.13k|   const auto ny = m * (s - nx) - y2.square().mul8();
  407|  4.13k|   const auto nz = pt.y().mul2() * pt.z();
  408|       |
  409|  4.13k|   return ProjectivePoint(nx, ny, nz);
  410|  4.13k|}
pcurves_brainpool256r1.cpp:_ZN5Botan9point_addINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES3_E11FieldParamsEEEEES8_EESC_EET_RKSE_SG_:
  187|    735|inline constexpr ProjectivePoint point_add(const ProjectivePoint& a, const ProjectivePoint& b) {
  188|    735|   const auto a_is_identity = a.is_identity();
  189|    735|   const auto b_is_identity = b.is_identity();
  190|       |
  191|    735|   const auto Z1Z1 = a.z().square();
  192|    735|   const auto Z2Z2 = b.z().square();
  193|    735|   const auto U1 = a.x() * Z2Z2;
  194|    735|   const auto U2 = b.x() * Z1Z1;
  195|    735|   const auto S1 = a.y() * b.z() * Z2Z2;
  196|    735|   const auto S2 = b.y() * a.z() * Z1Z1;
  197|    735|   const auto H = U2 - U1;
  198|    735|   const auto r = S2 - S1;
  199|       |
  200|       |   /* Risky conditional
  201|       |   *
  202|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  203|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  204|       |   *
  205|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  206|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  207|       |   * in which case at the end we'll set z to a.z * b.z * H = 0, resulting in the correct
  208|       |   * output (the identity element)
  209|       |   */
  210|    735|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (210:7): [True: 0, False: 735]
  ------------------
  211|      0|      return a.dbl();
  212|      0|   }
  213|       |
  214|    735|   const auto HH = H.square();
  215|    735|   const auto HHH = H * HH;
  216|    735|   const auto V = U1 * HH;
  217|    735|   const auto t2 = r.square();
  218|    735|   const auto t3 = V + V;
  219|    735|   const auto t4 = t2 - HHH;
  220|    735|   auto X3 = t4 - t3;
  221|    735|   const auto t5 = V - X3;
  222|    735|   const auto t6 = S1 * HHH;
  223|    735|   const auto t7 = r * t5;
  224|    735|   auto Y3 = t7 - t6;
  225|    735|   const auto t8 = b.z() * H;
  226|    735|   auto Z3 = a.z() * t8;
  227|       |
  228|       |   // if a is identity then return b
  229|    735|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), b.y(), b.z());
  230|       |
  231|       |   // if b is identity then return a
  232|    735|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  233|       |
  234|    735|   return ProjectivePoint(X3, Y3, Z3);
  235|    735|}
pcurves_brainpool256r1.cpp:_ZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELb1EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEE:
  107|      1|auto to_affine_batch(std::span<const typename C::ProjectivePoint> projective) {
  108|      1|   using AffinePoint = typename C::AffinePoint;
  109|       |
  110|      1|   const size_t N = projective.size();
  111|      1|   std::vector<AffinePoint> affine;
  112|      1|   affine.reserve(N);
  113|       |
  114|      1|   CT::Choice any_identity = CT::Choice::no();
  115|       |
  116|  1.56k|   for(const auto& pt : projective) {
  ------------------
  |  Branch (116:23): [True: 1.56k, False: 1]
  ------------------
  117|  1.56k|      any_identity = any_identity || pt.is_identity();
  118|  1.56k|   }
  119|       |
  120|       |   // Conditional acceptable: N is public. State of points is not necessarily
  121|       |   // public, but we don't leak which point was the identity. In practice with
  122|       |   // the algorithms currently in use, the only time an identity can occur is
  123|       |   // during mul2 where the two points g/h have a small relation (ie h = g*k for
  124|       |   // some k < 16)
  125|       |
  126|      1|   if(N <= 2 || any_identity.as_bool()) {
  ------------------
  |  Branch (126:7): [True: 0, False: 1]
  |  Branch (126:17): [True: 0, False: 1]
  ------------------
  127|       |      // If there are identity elements, using the batch inversion gets
  128|       |      // tricky. It can be done, but this should be a rare situation so
  129|       |      // just punt to the serial conversion if it occurs
  130|      0|      for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (130:25): [True: 0, False: 0]
  ------------------
  131|      0|         affine.push_back(to_affine<C>(projective[i]));
  132|      0|      }
  133|      1|   } else {
  134|      1|      std::vector<typename C::FieldElement> c;
  135|      1|      c.reserve(N);
  136|       |
  137|       |      /*
  138|       |      Batch projective->affine using Montgomery's trick
  139|       |
  140|       |      See Algorithm 2.26 in "Guide to Elliptic Curve Cryptography"
  141|       |      (Hankerson, Menezes, Vanstone)
  142|       |      */
  143|       |
  144|      1|      c.push_back(projective[0].z());
  145|  1.56k|      for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (145:25): [True: 1.56k, False: 1]
  ------------------
  146|  1.56k|         c.push_back(c[i - 1] * projective[i].z());
  147|  1.56k|      }
  148|       |
  149|      1|      auto s_inv = [&]() {
  150|      1|         if constexpr(VariableTime) {
  151|      1|            return c[N - 1].invert_vartime();
  152|      1|         } else {
  153|      1|            return invert_field_element<C>(c[N - 1]);
  154|      1|         }
  155|      1|      }();
  156|       |
  157|  1.56k|      for(size_t i = N - 1; i > 0; --i) {
  ------------------
  |  Branch (157:29): [True: 1.56k, False: 1]
  ------------------
  158|  1.56k|         const auto& p = projective[i];
  159|       |
  160|  1.56k|         const auto z_inv = s_inv * c[i - 1];
  161|  1.56k|         const auto z2_inv = z_inv.square();
  162|  1.56k|         const auto z3_inv = z_inv * z2_inv;
  163|       |
  164|  1.56k|         s_inv = s_inv * p.z();
  165|       |
  166|  1.56k|         affine.push_back(AffinePoint(p.x() * z2_inv, p.y() * z3_inv));
  167|  1.56k|      }
  168|       |
  169|      1|      const auto z2_inv = s_inv.square();
  170|      1|      const auto z3_inv = s_inv * z2_inv;
  171|      1|      affine.push_back(AffinePoint(projective[0].x() * z2_inv, projective[0].y() * z3_inv));
  172|      1|      std::reverse(affine.begin(), affine.end());
  173|      1|      return affine;
  174|      1|   }
  175|       |
  176|      0|   return affine;
  177|      1|}
pcurves_brainpool256r1.cpp:_ZN5Botan9to_affineINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveEEEDaRKNT_15ProjectivePointE:
   76|    694|inline constexpr auto to_affine(const typename C::ProjectivePoint& pt) {
   77|       |   // Not strictly required right? - default should work as long
   78|       |   // as (0,0) is identity and invert returns 0 on 0
   79|       |
   80|       |   if constexpr(curve_supports_fe_invert2<C>) {
   81|       |      const auto z2_inv = C::fe_invert2(pt.z());
   82|       |      const auto z3_inv = z2_inv.square() * pt.z();
   83|       |      return typename C::AffinePoint(pt.x() * z2_inv, pt.y() * z3_inv);
   84|    694|   } else {
   85|    694|      const auto z_inv = invert_field_element<C>(pt.z());
   86|    694|      const auto z2_inv = z_inv.square();
   87|    694|      const auto z3_inv = z_inv * z2_inv;
   88|    694|      return typename C::AffinePoint(pt.x() * z2_inv, pt.y() * z3_inv);
   89|    694|   }
   90|    694|}
pcurves_brainpool256r1.cpp:_ZN5Botan20invert_field_elementINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveEEEDaRKNT_12FieldElementE:
   35|  1.52k|inline constexpr auto invert_field_element(const typename C::FieldElement& fe) {
   36|       |   if constexpr(curve_supports_fe_invert2<C>) {
   37|       |      return C::fe_invert2(fe) * fe;
   38|  1.52k|   } else {
   39|  1.52k|      return fe.invert();
   40|  1.52k|   }
   41|  1.52k|}
pcurves_brainpool256r1.cpp:_ZZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELb1EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEEENKUlvE_clEv:
  149|      1|      auto s_inv = [&]() {
  150|      1|         if constexpr(VariableTime) {
  151|      1|            return c[N - 1].invert_vartime();
  152|       |         } else {
  153|       |            return invert_field_element<C>(c[N - 1]);
  154|       |         }
  155|      1|      }();
pcurves_brainpool256r1.cpp:_ZN5Botan22point_add_or_sub_mixedINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES3_E11FieldParamsEEEEES8_EENS_16AffineCurvePointISC_EESC_EET_RKSG_RKT0_NS_2CT6ChoiceERKT1_:
  296|  56.8k|                                                        const FieldElement& one) {
  297|  56.8k|   const auto a_is_identity = a.is_identity();
  298|  56.8k|   const auto b_is_identity = b.is_identity();
  299|       |
  300|       |   /*
  301|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-1998-cmo-2
  302|       |
  303|       |   Cost: 8M + 3S + 6add + 1*2
  304|       |   */
  305|       |
  306|  56.8k|   auto by = b.y();
  307|  56.8k|   by.conditional_assign(sub, by.negate());
  308|       |
  309|  56.8k|   const auto Z1Z1 = a.z().square();
  310|  56.8k|   const auto U2 = b.x() * Z1Z1;
  311|  56.8k|   const auto S2 = by * a.z() * Z1Z1;
  312|  56.8k|   const auto H = U2 - a.x();
  313|  56.8k|   const auto r = S2 - a.y();
  314|       |
  315|       |   /* Risky conditional
  316|       |   *
  317|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  318|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  319|       |   *
  320|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  321|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  322|       |   * in which case at the end we'll set z to a.z * H = 0, resulting in the correct output
  323|       |   * (the identity element)
  324|       |   */
  325|  56.8k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (325:7): [True: 0, False: 56.8k]
  ------------------
  326|      0|      return a.dbl();
  327|      0|   }
  328|       |
  329|  56.8k|   const auto HH = H.square();
  330|  56.8k|   const auto HHH = H * HH;
  331|  56.8k|   const auto V = a.x() * HH;
  332|  56.8k|   const auto t2 = r.square();
  333|  56.8k|   const auto t3 = V + V;
  334|  56.8k|   const auto t4 = t2 - HHH;
  335|  56.8k|   auto X3 = t4 - t3;
  336|  56.8k|   const auto t5 = V - X3;
  337|  56.8k|   const auto t6 = a.y() * HHH;
  338|  56.8k|   const auto t7 = r * t5;
  339|  56.8k|   auto Y3 = t7 - t6;
  340|  56.8k|   auto Z3 = a.z() * H;
  341|       |
  342|       |   // if a is identity then return b
  343|  56.8k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), by, one);
  344|       |
  345|       |   // if b is identity then return a
  346|  56.8k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  347|       |
  348|  56.8k|   return ProjectivePoint(X3, Y3, Z3);
  349|  56.8k|}
pcurves_brainpool256r1.cpp:_ZN5Botan11to_affine_xINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveEEEDaRKNT_15ProjectivePointE:
   96|    413|auto to_affine_x(const typename C::ProjectivePoint& pt) {
   97|       |   if constexpr(curve_supports_fe_invert2<C>) {
   98|       |      return pt.x() * C::fe_invert2(pt.z());
   99|    413|   } else {
  100|    413|      const auto z_inv = invert_field_element<C>(pt.z());
  101|    413|      const auto z2_inv = z_inv.square();
  102|    413|      return pt.x() * z2_inv;
  103|    413|   }
  104|    413|}
pcurves_brainpool256r1.cpp:_ZN5Botan15point_add_mixedINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES3_E11FieldParamsEEEEES8_EENS_16AffineCurvePointISC_EESC_EET_RKSG_RKT0_RKT1_:
  240|  2.89k|                                                 const FieldElement& one) {
  241|  2.89k|   const auto a_is_identity = a.is_identity();
  242|  2.89k|   const auto b_is_identity = b.is_identity();
  243|       |
  244|       |   /*
  245|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-1998-cmo-2
  246|       |
  247|       |   Cost: 8M + 3S + 6add + 1*2
  248|       |   */
  249|       |
  250|  2.89k|   const auto Z1Z1 = a.z().square();
  251|  2.89k|   const auto U2 = b.x() * Z1Z1;
  252|  2.89k|   const auto S2 = b.y() * a.z() * Z1Z1;
  253|  2.89k|   const auto H = U2 - a.x();
  254|  2.89k|   const auto r = S2 - a.y();
  255|       |
  256|       |   /* Risky conditional
  257|       |   *
  258|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  259|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  260|       |   *
  261|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  262|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  263|       |   * in which case at the end we'll set z to a.z * H = 0, resulting in the correct output
  264|       |   * (the identity element)
  265|       |   */
  266|  2.89k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (266:7): [True: 0, False: 2.89k]
  ------------------
  267|      0|      return a.dbl();
  268|      0|   }
  269|       |
  270|  2.89k|   const auto HH = H.square();
  271|  2.89k|   const auto HHH = H * HH;
  272|  2.89k|   const auto V = a.x() * HH;
  273|  2.89k|   const auto t2 = r.square();
  274|  2.89k|   const auto t3 = V + V;
  275|  2.89k|   const auto t4 = t2 - HHH;
  276|  2.89k|   auto X3 = t4 - t3;
  277|  2.89k|   const auto t5 = V - X3;
  278|  2.89k|   const auto t6 = a.y() * HHH;
  279|  2.89k|   const auto t7 = r * t5;
  280|  2.89k|   auto Y3 = t7 - t6;
  281|  2.89k|   auto Z3 = a.z() * H;
  282|       |
  283|       |   // if a is identity then return b
  284|  2.89k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), b.y(), one);
  285|       |
  286|       |   // if b is identity then return a
  287|  2.89k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  288|       |
  289|  2.89k|   return ProjectivePoint(X3, Y3, Z3);
  290|  2.89k|}
pcurves_brainpool256r1.cpp:_ZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELb0EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEE:
  107|    413|auto to_affine_batch(std::span<const typename C::ProjectivePoint> projective) {
  108|    413|   using AffinePoint = typename C::AffinePoint;
  109|       |
  110|    413|   const size_t N = projective.size();
  111|    413|   std::vector<AffinePoint> affine;
  112|    413|   affine.reserve(N);
  113|       |
  114|    413|   CT::Choice any_identity = CT::Choice::no();
  115|       |
  116|  6.60k|   for(const auto& pt : projective) {
  ------------------
  |  Branch (116:23): [True: 6.60k, False: 413]
  ------------------
  117|  6.60k|      any_identity = any_identity || pt.is_identity();
  118|  6.60k|   }
  119|       |
  120|       |   // Conditional acceptable: N is public. State of points is not necessarily
  121|       |   // public, but we don't leak which point was the identity. In practice with
  122|       |   // the algorithms currently in use, the only time an identity can occur is
  123|       |   // during mul2 where the two points g/h have a small relation (ie h = g*k for
  124|       |   // some k < 16)
  125|       |
  126|    413|   if(N <= 2 || any_identity.as_bool()) {
  ------------------
  |  Branch (126:7): [True: 0, False: 413]
  |  Branch (126:17): [True: 0, False: 413]
  ------------------
  127|       |      // If there are identity elements, using the batch inversion gets
  128|       |      // tricky. It can be done, but this should be a rare situation so
  129|       |      // just punt to the serial conversion if it occurs
  130|      0|      for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (130:25): [True: 0, False: 0]
  ------------------
  131|      0|         affine.push_back(to_affine<C>(projective[i]));
  132|      0|      }
  133|    413|   } else {
  134|    413|      std::vector<typename C::FieldElement> c;
  135|    413|      c.reserve(N);
  136|       |
  137|       |      /*
  138|       |      Batch projective->affine using Montgomery's trick
  139|       |
  140|       |      See Algorithm 2.26 in "Guide to Elliptic Curve Cryptography"
  141|       |      (Hankerson, Menezes, Vanstone)
  142|       |      */
  143|       |
  144|    413|      c.push_back(projective[0].z());
  145|  6.60k|      for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (145:25): [True: 6.19k, False: 413]
  ------------------
  146|  6.19k|         c.push_back(c[i - 1] * projective[i].z());
  147|  6.19k|      }
  148|       |
  149|    413|      auto s_inv = [&]() {
  150|    413|         if constexpr(VariableTime) {
  151|    413|            return c[N - 1].invert_vartime();
  152|    413|         } else {
  153|    413|            return invert_field_element<C>(c[N - 1]);
  154|    413|         }
  155|    413|      }();
  156|       |
  157|  6.60k|      for(size_t i = N - 1; i > 0; --i) {
  ------------------
  |  Branch (157:29): [True: 6.19k, False: 413]
  ------------------
  158|  6.19k|         const auto& p = projective[i];
  159|       |
  160|  6.19k|         const auto z_inv = s_inv * c[i - 1];
  161|  6.19k|         const auto z2_inv = z_inv.square();
  162|  6.19k|         const auto z3_inv = z_inv * z2_inv;
  163|       |
  164|  6.19k|         s_inv = s_inv * p.z();
  165|       |
  166|  6.19k|         affine.push_back(AffinePoint(p.x() * z2_inv, p.y() * z3_inv));
  167|  6.19k|      }
  168|       |
  169|    413|      const auto z2_inv = s_inv.square();
  170|    413|      const auto z3_inv = s_inv * z2_inv;
  171|    413|      affine.push_back(AffinePoint(projective[0].x() * z2_inv, projective[0].y() * z3_inv));
  172|    413|      std::reverse(affine.begin(), affine.end());
  173|    413|      return affine;
  174|    413|   }
  175|       |
  176|      0|   return affine;
  177|    413|}
pcurves_brainpool256r1.cpp:_ZZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELb0EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEEENKUlvE_clEv:
  149|    413|      auto s_inv = [&]() {
  150|       |         if constexpr(VariableTime) {
  151|       |            return c[N - 1].invert_vartime();
  152|    413|         } else {
  153|    413|            return invert_field_element<C>(c[N - 1]);
  154|    413|         }
  155|    413|      }();
pcurves_brainpool256r1.cpp:_ZN5Botan13dbl_n_genericINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES3_E11FieldParamsEEEEES8_EESC_EET_RKSE_RKT0_m:
  477|  23.5k|inline constexpr ProjectivePoint dbl_n_generic(const ProjectivePoint& pt, const FieldElement& A, size_t n) {
  478|  23.5k|   auto nx = pt.x();
  479|  23.5k|   auto ny = pt.y().mul2();
  480|  23.5k|   auto nz = pt.z();
  481|  23.5k|   auto w = nz.square().square() * A;
  482|       |
  483|       |   // Conditional ok: loop iteration count is public
  484|   141k|   while(n > 0) {
  ------------------
  |  Branch (484:10): [True: 117k, False: 23.5k]
  ------------------
  485|   117k|      const auto ny2 = ny.square();
  486|   117k|      const auto ny4 = ny2.square();
  487|   117k|      const auto t1 = nx.square().mul3() + w;
  488|   117k|      const auto t2 = nx * ny2;
  489|   117k|      nx = t1.square() - t2.mul2();
  490|   117k|      nz *= ny;
  491|   117k|      ny = t1 * (t2 - nx).mul2() - ny4;
  492|   117k|      n--;
  493|       |      // Conditional ok: loop iteration count is public
  494|   117k|      if(n > 0) {
  ------------------
  |  Branch (494:10): [True: 94.1k, False: 23.5k]
  ------------------
  495|  94.1k|         w *= ny4;
  496|  94.1k|      }
  497|   117k|   }
  498|  23.5k|   return ProjectivePoint(nx, ny.div2(), nz);
  499|  23.5k|}
pcurves_brainpool256r1.cpp:_ZN5Botan18sqrt_field_elementINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveEEENS_2CT6OptionINT_12FieldElementEEERKS8_:
   60|    478|inline constexpr CT::Option<typename C::FieldElement> sqrt_field_element(const typename C::FieldElement& fe) {
   61|       |   if constexpr(curve_supports_fe_sqrt<C>) {
   62|       |      auto z = C::fe_sqrt(fe);
   63|       |      // Zero out the return value if it would otherwise be incorrect
   64|       |      const CT::Choice correct = (z.square() == fe);
   65|       |      z.conditional_assign(!correct, C::FieldElement::zero());
   66|       |      return CT::Option(z, correct);
   67|    478|   } else {
   68|    478|      return fe.sqrt();
   69|    478|   }
   70|    478|}
pcurves_brainpool384r1.cpp:_ZN5Botan11dbl_genericINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES3_E11FieldParamsEEEEES8_EESC_EET_RKSE_RKT0_:
  397|  2.43k|inline constexpr ProjectivePoint dbl_generic(const ProjectivePoint& pt, const FieldElement& A) {
  398|       |   // Cost: 1M + 3S + 1A + 1*3
  399|  2.43k|   const auto z2 = pt.z().square();
  400|  2.43k|   const auto m = pt.x().square().mul3() + A * z2.square();
  401|       |
  402|       |   // Remaining cost: 3M + 3S + 3A + 2*2 + 1*4 + 1*8
  403|  2.43k|   const auto y2 = pt.y().square();
  404|  2.43k|   const auto s = pt.x().mul4() * y2;
  405|  2.43k|   const auto nx = m.square() - s.mul2();
  406|  2.43k|   const auto ny = m * (s - nx) - y2.square().mul8();
  407|  2.43k|   const auto nz = pt.y().mul2() * pt.z();
  408|       |
  409|  2.43k|   return ProjectivePoint(nx, ny, nz);
  410|  2.43k|}
pcurves_brainpool384r1.cpp:_ZN5Botan9point_addINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES3_E11FieldParamsEEEEES8_EESC_EET_RKSE_SG_:
  187|  1.09k|inline constexpr ProjectivePoint point_add(const ProjectivePoint& a, const ProjectivePoint& b) {
  188|  1.09k|   const auto a_is_identity = a.is_identity();
  189|  1.09k|   const auto b_is_identity = b.is_identity();
  190|       |
  191|  1.09k|   const auto Z1Z1 = a.z().square();
  192|  1.09k|   const auto Z2Z2 = b.z().square();
  193|  1.09k|   const auto U1 = a.x() * Z2Z2;
  194|  1.09k|   const auto U2 = b.x() * Z1Z1;
  195|  1.09k|   const auto S1 = a.y() * b.z() * Z2Z2;
  196|  1.09k|   const auto S2 = b.y() * a.z() * Z1Z1;
  197|  1.09k|   const auto H = U2 - U1;
  198|  1.09k|   const auto r = S2 - S1;
  199|       |
  200|       |   /* Risky conditional
  201|       |   *
  202|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  203|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  204|       |   *
  205|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  206|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  207|       |   * in which case at the end we'll set z to a.z * b.z * H = 0, resulting in the correct
  208|       |   * output (the identity element)
  209|       |   */
  210|  1.09k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (210:7): [True: 0, False: 1.09k]
  ------------------
  211|      0|      return a.dbl();
  212|      0|   }
  213|       |
  214|  1.09k|   const auto HH = H.square();
  215|  1.09k|   const auto HHH = H * HH;
  216|  1.09k|   const auto V = U1 * HH;
  217|  1.09k|   const auto t2 = r.square();
  218|  1.09k|   const auto t3 = V + V;
  219|  1.09k|   const auto t4 = t2 - HHH;
  220|  1.09k|   auto X3 = t4 - t3;
  221|  1.09k|   const auto t5 = V - X3;
  222|  1.09k|   const auto t6 = S1 * HHH;
  223|  1.09k|   const auto t7 = r * t5;
  224|  1.09k|   auto Y3 = t7 - t6;
  225|  1.09k|   const auto t8 = b.z() * H;
  226|  1.09k|   auto Z3 = a.z() * t8;
  227|       |
  228|       |   // if a is identity then return b
  229|  1.09k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), b.y(), b.z());
  230|       |
  231|       |   // if b is identity then return a
  232|  1.09k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  233|       |
  234|  1.09k|   return ProjectivePoint(X3, Y3, Z3);
  235|  1.09k|}
pcurves_brainpool384r1.cpp:_ZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELb1EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEE:
  107|      1|auto to_affine_batch(std::span<const typename C::ProjectivePoint> projective) {
  108|      1|   using AffinePoint = typename C::AffinePoint;
  109|       |
  110|      1|   const size_t N = projective.size();
  111|      1|   std::vector<AffinePoint> affine;
  112|      1|   affine.reserve(N);
  113|       |
  114|      1|   CT::Choice any_identity = CT::Choice::no();
  115|       |
  116|  2.33k|   for(const auto& pt : projective) {
  ------------------
  |  Branch (116:23): [True: 2.33k, False: 1]
  ------------------
  117|  2.33k|      any_identity = any_identity || pt.is_identity();
  118|  2.33k|   }
  119|       |
  120|       |   // Conditional acceptable: N is public. State of points is not necessarily
  121|       |   // public, but we don't leak which point was the identity. In practice with
  122|       |   // the algorithms currently in use, the only time an identity can occur is
  123|       |   // during mul2 where the two points g/h have a small relation (ie h = g*k for
  124|       |   // some k < 16)
  125|       |
  126|      1|   if(N <= 2 || any_identity.as_bool()) {
  ------------------
  |  Branch (126:7): [True: 0, False: 1]
  |  Branch (126:17): [True: 0, False: 1]
  ------------------
  127|       |      // If there are identity elements, using the batch inversion gets
  128|       |      // tricky. It can be done, but this should be a rare situation so
  129|       |      // just punt to the serial conversion if it occurs
  130|      0|      for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (130:25): [True: 0, False: 0]
  ------------------
  131|      0|         affine.push_back(to_affine<C>(projective[i]));
  132|      0|      }
  133|      1|   } else {
  134|      1|      std::vector<typename C::FieldElement> c;
  135|      1|      c.reserve(N);
  136|       |
  137|       |      /*
  138|       |      Batch projective->affine using Montgomery's trick
  139|       |
  140|       |      See Algorithm 2.26 in "Guide to Elliptic Curve Cryptography"
  141|       |      (Hankerson, Menezes, Vanstone)
  142|       |      */
  143|       |
  144|      1|      c.push_back(projective[0].z());
  145|  2.33k|      for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (145:25): [True: 2.33k, False: 1]
  ------------------
  146|  2.33k|         c.push_back(c[i - 1] * projective[i].z());
  147|  2.33k|      }
  148|       |
  149|      1|      auto s_inv = [&]() {
  150|      1|         if constexpr(VariableTime) {
  151|      1|            return c[N - 1].invert_vartime();
  152|      1|         } else {
  153|      1|            return invert_field_element<C>(c[N - 1]);
  154|      1|         }
  155|      1|      }();
  156|       |
  157|  2.33k|      for(size_t i = N - 1; i > 0; --i) {
  ------------------
  |  Branch (157:29): [True: 2.33k, False: 1]
  ------------------
  158|  2.33k|         const auto& p = projective[i];
  159|       |
  160|  2.33k|         const auto z_inv = s_inv * c[i - 1];
  161|  2.33k|         const auto z2_inv = z_inv.square();
  162|  2.33k|         const auto z3_inv = z_inv * z2_inv;
  163|       |
  164|  2.33k|         s_inv = s_inv * p.z();
  165|       |
  166|  2.33k|         affine.push_back(AffinePoint(p.x() * z2_inv, p.y() * z3_inv));
  167|  2.33k|      }
  168|       |
  169|      1|      const auto z2_inv = s_inv.square();
  170|      1|      const auto z3_inv = s_inv * z2_inv;
  171|      1|      affine.push_back(AffinePoint(projective[0].x() * z2_inv, projective[0].y() * z3_inv));
  172|      1|      std::reverse(affine.begin(), affine.end());
  173|      1|      return affine;
  174|      1|   }
  175|       |
  176|      0|   return affine;
  177|      1|}
pcurves_brainpool384r1.cpp:_ZN5Botan9to_affineINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveEEEDaRKNT_15ProjectivePointE:
   76|    348|inline constexpr auto to_affine(const typename C::ProjectivePoint& pt) {
   77|       |   // Not strictly required right? - default should work as long
   78|       |   // as (0,0) is identity and invert returns 0 on 0
   79|       |
   80|       |   if constexpr(curve_supports_fe_invert2<C>) {
   81|       |      const auto z2_inv = C::fe_invert2(pt.z());
   82|       |      const auto z3_inv = z2_inv.square() * pt.z();
   83|       |      return typename C::AffinePoint(pt.x() * z2_inv, pt.y() * z3_inv);
   84|    348|   } else {
   85|    348|      const auto z_inv = invert_field_element<C>(pt.z());
   86|    348|      const auto z2_inv = z_inv.square();
   87|    348|      const auto z3_inv = z_inv * z2_inv;
   88|    348|      return typename C::AffinePoint(pt.x() * z2_inv, pt.y() * z3_inv);
   89|    348|   }
   90|    348|}
pcurves_brainpool384r1.cpp:_ZN5Botan20invert_field_elementINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveEEEDaRKNT_12FieldElementE:
   35|    646|inline constexpr auto invert_field_element(const typename C::FieldElement& fe) {
   36|       |   if constexpr(curve_supports_fe_invert2<C>) {
   37|       |      return C::fe_invert2(fe) * fe;
   38|    646|   } else {
   39|    646|      return fe.invert();
   40|    646|   }
   41|    646|}
pcurves_brainpool384r1.cpp:_ZZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELb1EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEEENKUlvE_clEv:
  149|      1|      auto s_inv = [&]() {
  150|      1|         if constexpr(VariableTime) {
  151|      1|            return c[N - 1].invert_vartime();
  152|       |         } else {
  153|       |            return invert_field_element<C>(c[N - 1]);
  154|       |         }
  155|      1|      }();
pcurves_brainpool384r1.cpp:_ZN5Botan22point_add_or_sub_mixedINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES3_E11FieldParamsEEEEES8_EENS_16AffineCurvePointISC_EESC_EET_RKSG_RKT0_NS_2CT6ChoiceERKT1_:
  296|  37.8k|                                                        const FieldElement& one) {
  297|  37.8k|   const auto a_is_identity = a.is_identity();
  298|  37.8k|   const auto b_is_identity = b.is_identity();
  299|       |
  300|       |   /*
  301|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-1998-cmo-2
  302|       |
  303|       |   Cost: 8M + 3S + 6add + 1*2
  304|       |   */
  305|       |
  306|  37.8k|   auto by = b.y();
  307|  37.8k|   by.conditional_assign(sub, by.negate());
  308|       |
  309|  37.8k|   const auto Z1Z1 = a.z().square();
  310|  37.8k|   const auto U2 = b.x() * Z1Z1;
  311|  37.8k|   const auto S2 = by * a.z() * Z1Z1;
  312|  37.8k|   const auto H = U2 - a.x();
  313|  37.8k|   const auto r = S2 - a.y();
  314|       |
  315|       |   /* Risky conditional
  316|       |   *
  317|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  318|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  319|       |   *
  320|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  321|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  322|       |   * in which case at the end we'll set z to a.z * H = 0, resulting in the correct output
  323|       |   * (the identity element)
  324|       |   */
  325|  37.8k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (325:7): [True: 0, False: 37.8k]
  ------------------
  326|      0|      return a.dbl();
  327|      0|   }
  328|       |
  329|  37.8k|   const auto HH = H.square();
  330|  37.8k|   const auto HHH = H * HH;
  331|  37.8k|   const auto V = a.x() * HH;
  332|  37.8k|   const auto t2 = r.square();
  333|  37.8k|   const auto t3 = V + V;
  334|  37.8k|   const auto t4 = t2 - HHH;
  335|  37.8k|   auto X3 = t4 - t3;
  336|  37.8k|   const auto t5 = V - X3;
  337|  37.8k|   const auto t6 = a.y() * HHH;
  338|  37.8k|   const auto t7 = r * t5;
  339|  37.8k|   auto Y3 = t7 - t6;
  340|  37.8k|   auto Z3 = a.z() * H;
  341|       |
  342|       |   // if a is identity then return b
  343|  37.8k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), by, one);
  344|       |
  345|       |   // if b is identity then return a
  346|  37.8k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  347|       |
  348|  37.8k|   return ProjectivePoint(X3, Y3, Z3);
  349|  37.8k|}
pcurves_brainpool384r1.cpp:_ZN5Botan11to_affine_xINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveEEEDaRKNT_15ProjectivePointE:
   96|    149|auto to_affine_x(const typename C::ProjectivePoint& pt) {
   97|       |   if constexpr(curve_supports_fe_invert2<C>) {
   98|       |      return pt.x() * C::fe_invert2(pt.z());
   99|    149|   } else {
  100|    149|      const auto z_inv = invert_field_element<C>(pt.z());
  101|    149|      const auto z2_inv = z_inv.square();
  102|    149|      return pt.x() * z2_inv;
  103|    149|   }
  104|    149|}
pcurves_brainpool384r1.cpp:_ZN5Botan15point_add_mixedINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES3_E11FieldParamsEEEEES8_EENS_16AffineCurvePointISC_EESC_EET_RKSG_RKT0_RKT1_:
  240|  1.04k|                                                 const FieldElement& one) {
  241|  1.04k|   const auto a_is_identity = a.is_identity();
  242|  1.04k|   const auto b_is_identity = b.is_identity();
  243|       |
  244|       |   /*
  245|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-1998-cmo-2
  246|       |
  247|       |   Cost: 8M + 3S + 6add + 1*2
  248|       |   */
  249|       |
  250|  1.04k|   const auto Z1Z1 = a.z().square();
  251|  1.04k|   const auto U2 = b.x() * Z1Z1;
  252|  1.04k|   const auto S2 = b.y() * a.z() * Z1Z1;
  253|  1.04k|   const auto H = U2 - a.x();
  254|  1.04k|   const auto r = S2 - a.y();
  255|       |
  256|       |   /* Risky conditional
  257|       |   *
  258|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  259|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  260|       |   *
  261|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  262|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  263|       |   * in which case at the end we'll set z to a.z * H = 0, resulting in the correct output
  264|       |   * (the identity element)
  265|       |   */
  266|  1.04k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (266:7): [True: 0, False: 1.04k]
  ------------------
  267|      0|      return a.dbl();
  268|      0|   }
  269|       |
  270|  1.04k|   const auto HH = H.square();
  271|  1.04k|   const auto HHH = H * HH;
  272|  1.04k|   const auto V = a.x() * HH;
  273|  1.04k|   const auto t2 = r.square();
  274|  1.04k|   const auto t3 = V + V;
  275|  1.04k|   const auto t4 = t2 - HHH;
  276|  1.04k|   auto X3 = t4 - t3;
  277|  1.04k|   const auto t5 = V - X3;
  278|  1.04k|   const auto t6 = a.y() * HHH;
  279|  1.04k|   const auto t7 = r * t5;
  280|  1.04k|   auto Y3 = t7 - t6;
  281|  1.04k|   auto Z3 = a.z() * H;
  282|       |
  283|       |   // if a is identity then return b
  284|  1.04k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), b.y(), one);
  285|       |
  286|       |   // if b is identity then return a
  287|  1.04k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  288|       |
  289|  1.04k|   return ProjectivePoint(X3, Y3, Z3);
  290|  1.04k|}
pcurves_brainpool384r1.cpp:_ZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELb0EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEE:
  107|    149|auto to_affine_batch(std::span<const typename C::ProjectivePoint> projective) {
  108|    149|   using AffinePoint = typename C::AffinePoint;
  109|       |
  110|    149|   const size_t N = projective.size();
  111|    149|   std::vector<AffinePoint> affine;
  112|    149|   affine.reserve(N);
  113|       |
  114|    149|   CT::Choice any_identity = CT::Choice::no();
  115|       |
  116|  2.38k|   for(const auto& pt : projective) {
  ------------------
  |  Branch (116:23): [True: 2.38k, False: 149]
  ------------------
  117|  2.38k|      any_identity = any_identity || pt.is_identity();
  118|  2.38k|   }
  119|       |
  120|       |   // Conditional acceptable: N is public. State of points is not necessarily
  121|       |   // public, but we don't leak which point was the identity. In practice with
  122|       |   // the algorithms currently in use, the only time an identity can occur is
  123|       |   // during mul2 where the two points g/h have a small relation (ie h = g*k for
  124|       |   // some k < 16)
  125|       |
  126|    149|   if(N <= 2 || any_identity.as_bool()) {
  ------------------
  |  Branch (126:7): [True: 0, False: 149]
  |  Branch (126:17): [True: 0, False: 149]
  ------------------
  127|       |      // If there are identity elements, using the batch inversion gets
  128|       |      // tricky. It can be done, but this should be a rare situation so
  129|       |      // just punt to the serial conversion if it occurs
  130|      0|      for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (130:25): [True: 0, False: 0]
  ------------------
  131|      0|         affine.push_back(to_affine<C>(projective[i]));
  132|      0|      }
  133|    149|   } else {
  134|    149|      std::vector<typename C::FieldElement> c;
  135|    149|      c.reserve(N);
  136|       |
  137|       |      /*
  138|       |      Batch projective->affine using Montgomery's trick
  139|       |
  140|       |      See Algorithm 2.26 in "Guide to Elliptic Curve Cryptography"
  141|       |      (Hankerson, Menezes, Vanstone)
  142|       |      */
  143|       |
  144|    149|      c.push_back(projective[0].z());
  145|  2.38k|      for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (145:25): [True: 2.23k, False: 149]
  ------------------
  146|  2.23k|         c.push_back(c[i - 1] * projective[i].z());
  147|  2.23k|      }
  148|       |
  149|    149|      auto s_inv = [&]() {
  150|    149|         if constexpr(VariableTime) {
  151|    149|            return c[N - 1].invert_vartime();
  152|    149|         } else {
  153|    149|            return invert_field_element<C>(c[N - 1]);
  154|    149|         }
  155|    149|      }();
  156|       |
  157|  2.38k|      for(size_t i = N - 1; i > 0; --i) {
  ------------------
  |  Branch (157:29): [True: 2.23k, False: 149]
  ------------------
  158|  2.23k|         const auto& p = projective[i];
  159|       |
  160|  2.23k|         const auto z_inv = s_inv * c[i - 1];
  161|  2.23k|         const auto z2_inv = z_inv.square();
  162|  2.23k|         const auto z3_inv = z_inv * z2_inv;
  163|       |
  164|  2.23k|         s_inv = s_inv * p.z();
  165|       |
  166|  2.23k|         affine.push_back(AffinePoint(p.x() * z2_inv, p.y() * z3_inv));
  167|  2.23k|      }
  168|       |
  169|    149|      const auto z2_inv = s_inv.square();
  170|    149|      const auto z3_inv = s_inv * z2_inv;
  171|    149|      affine.push_back(AffinePoint(projective[0].x() * z2_inv, projective[0].y() * z3_inv));
  172|    149|      std::reverse(affine.begin(), affine.end());
  173|    149|      return affine;
  174|    149|   }
  175|       |
  176|      0|   return affine;
  177|    149|}
pcurves_brainpool384r1.cpp:_ZZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELb0EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEEENKUlvE_clEv:
  149|    149|      auto s_inv = [&]() {
  150|       |         if constexpr(VariableTime) {
  151|       |            return c[N - 1].invert_vartime();
  152|    149|         } else {
  153|    149|            return invert_field_element<C>(c[N - 1]);
  154|    149|         }
  155|    149|      }();
pcurves_brainpool384r1.cpp:_ZN5Botan13dbl_n_genericINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES3_E11FieldParamsEEEEES8_EESC_EET_RKSE_RKT0_m:
  477|  12.8k|inline constexpr ProjectivePoint dbl_n_generic(const ProjectivePoint& pt, const FieldElement& A, size_t n) {
  478|  12.8k|   auto nx = pt.x();
  479|  12.8k|   auto ny = pt.y().mul2();
  480|  12.8k|   auto nz = pt.z();
  481|  12.8k|   auto w = nz.square().square() * A;
  482|       |
  483|       |   // Conditional ok: loop iteration count is public
  484|  76.8k|   while(n > 0) {
  ------------------
  |  Branch (484:10): [True: 64.0k, False: 12.8k]
  ------------------
  485|  64.0k|      const auto ny2 = ny.square();
  486|  64.0k|      const auto ny4 = ny2.square();
  487|  64.0k|      const auto t1 = nx.square().mul3() + w;
  488|  64.0k|      const auto t2 = nx * ny2;
  489|  64.0k|      nx = t1.square() - t2.mul2();
  490|  64.0k|      nz *= ny;
  491|  64.0k|      ny = t1 * (t2 - nx).mul2() - ny4;
  492|  64.0k|      n--;
  493|       |      // Conditional ok: loop iteration count is public
  494|  64.0k|      if(n > 0) {
  ------------------
  |  Branch (494:10): [True: 51.2k, False: 12.8k]
  ------------------
  495|  51.2k|         w *= ny4;
  496|  51.2k|      }
  497|  64.0k|   }
  498|  12.8k|   return ProjectivePoint(nx, ny.div2(), nz);
  499|  12.8k|}
pcurves_brainpool384r1.cpp:_ZN5Botan18sqrt_field_elementINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveEEENS_2CT6OptionINT_12FieldElementEEERKS8_:
   60|    202|inline constexpr CT::Option<typename C::FieldElement> sqrt_field_element(const typename C::FieldElement& fe) {
   61|       |   if constexpr(curve_supports_fe_sqrt<C>) {
   62|       |      auto z = C::fe_sqrt(fe);
   63|       |      // Zero out the return value if it would otherwise be incorrect
   64|       |      const CT::Choice correct = (z.square() == fe);
   65|       |      z.conditional_assign(!correct, C::FieldElement::zero());
   66|       |      return CT::Option(z, correct);
   67|    202|   } else {
   68|    202|      return fe.sqrt();
   69|    202|   }
   70|    202|}
pcurves_brainpool512r1.cpp:_ZN5Botan11dbl_genericINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES3_E11FieldParamsEEEEES8_EESC_EET_RKSE_RKT0_:
  397|  3.34k|inline constexpr ProjectivePoint dbl_generic(const ProjectivePoint& pt, const FieldElement& A) {
  398|       |   // Cost: 1M + 3S + 1A + 1*3
  399|  3.34k|   const auto z2 = pt.z().square();
  400|  3.34k|   const auto m = pt.x().square().mul3() + A * z2.square();
  401|       |
  402|       |   // Remaining cost: 3M + 3S + 3A + 2*2 + 1*4 + 1*8
  403|  3.34k|   const auto y2 = pt.y().square();
  404|  3.34k|   const auto s = pt.x().mul4() * y2;
  405|  3.34k|   const auto nx = m.square() - s.mul2();
  406|  3.34k|   const auto ny = m * (s - nx) - y2.square().mul8();
  407|  3.34k|   const auto nz = pt.y().mul2() * pt.z();
  408|       |
  409|  3.34k|   return ProjectivePoint(nx, ny, nz);
  410|  3.34k|}
pcurves_brainpool512r1.cpp:_ZN5Botan9point_addINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES3_E11FieldParamsEEEEES8_EESC_EET_RKSE_SG_:
  187|  1.45k|inline constexpr ProjectivePoint point_add(const ProjectivePoint& a, const ProjectivePoint& b) {
  188|  1.45k|   const auto a_is_identity = a.is_identity();
  189|  1.45k|   const auto b_is_identity = b.is_identity();
  190|       |
  191|  1.45k|   const auto Z1Z1 = a.z().square();
  192|  1.45k|   const auto Z2Z2 = b.z().square();
  193|  1.45k|   const auto U1 = a.x() * Z2Z2;
  194|  1.45k|   const auto U2 = b.x() * Z1Z1;
  195|  1.45k|   const auto S1 = a.y() * b.z() * Z2Z2;
  196|  1.45k|   const auto S2 = b.y() * a.z() * Z1Z1;
  197|  1.45k|   const auto H = U2 - U1;
  198|  1.45k|   const auto r = S2 - S1;
  199|       |
  200|       |   /* Risky conditional
  201|       |   *
  202|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  203|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  204|       |   *
  205|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  206|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  207|       |   * in which case at the end we'll set z to a.z * b.z * H = 0, resulting in the correct
  208|       |   * output (the identity element)
  209|       |   */
  210|  1.45k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (210:7): [True: 0, False: 1.45k]
  ------------------
  211|      0|      return a.dbl();
  212|      0|   }
  213|       |
  214|  1.45k|   const auto HH = H.square();
  215|  1.45k|   const auto HHH = H * HH;
  216|  1.45k|   const auto V = U1 * HH;
  217|  1.45k|   const auto t2 = r.square();
  218|  1.45k|   const auto t3 = V + V;
  219|  1.45k|   const auto t4 = t2 - HHH;
  220|  1.45k|   auto X3 = t4 - t3;
  221|  1.45k|   const auto t5 = V - X3;
  222|  1.45k|   const auto t6 = S1 * HHH;
  223|  1.45k|   const auto t7 = r * t5;
  224|  1.45k|   auto Y3 = t7 - t6;
  225|  1.45k|   const auto t8 = b.z() * H;
  226|  1.45k|   auto Z3 = a.z() * t8;
  227|       |
  228|       |   // if a is identity then return b
  229|  1.45k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), b.y(), b.z());
  230|       |
  231|       |   // if b is identity then return a
  232|  1.45k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  233|       |
  234|  1.45k|   return ProjectivePoint(X3, Y3, Z3);
  235|  1.45k|}
pcurves_brainpool512r1.cpp:_ZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELb1EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEE:
  107|      1|auto to_affine_batch(std::span<const typename C::ProjectivePoint> projective) {
  108|      1|   using AffinePoint = typename C::AffinePoint;
  109|       |
  110|      1|   const size_t N = projective.size();
  111|      1|   std::vector<AffinePoint> affine;
  112|      1|   affine.reserve(N);
  113|       |
  114|      1|   CT::Choice any_identity = CT::Choice::no();
  115|       |
  116|  3.10k|   for(const auto& pt : projective) {
  ------------------
  |  Branch (116:23): [True: 3.10k, False: 1]
  ------------------
  117|  3.10k|      any_identity = any_identity || pt.is_identity();
  118|  3.10k|   }
  119|       |
  120|       |   // Conditional acceptable: N is public. State of points is not necessarily
  121|       |   // public, but we don't leak which point was the identity. In practice with
  122|       |   // the algorithms currently in use, the only time an identity can occur is
  123|       |   // during mul2 where the two points g/h have a small relation (ie h = g*k for
  124|       |   // some k < 16)
  125|       |
  126|      1|   if(N <= 2 || any_identity.as_bool()) {
  ------------------
  |  Branch (126:7): [True: 0, False: 1]
  |  Branch (126:17): [True: 0, False: 1]
  ------------------
  127|       |      // If there are identity elements, using the batch inversion gets
  128|       |      // tricky. It can be done, but this should be a rare situation so
  129|       |      // just punt to the serial conversion if it occurs
  130|      0|      for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (130:25): [True: 0, False: 0]
  ------------------
  131|      0|         affine.push_back(to_affine<C>(projective[i]));
  132|      0|      }
  133|      1|   } else {
  134|      1|      std::vector<typename C::FieldElement> c;
  135|      1|      c.reserve(N);
  136|       |
  137|       |      /*
  138|       |      Batch projective->affine using Montgomery's trick
  139|       |
  140|       |      See Algorithm 2.26 in "Guide to Elliptic Curve Cryptography"
  141|       |      (Hankerson, Menezes, Vanstone)
  142|       |      */
  143|       |
  144|      1|      c.push_back(projective[0].z());
  145|  3.10k|      for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (145:25): [True: 3.10k, False: 1]
  ------------------
  146|  3.10k|         c.push_back(c[i - 1] * projective[i].z());
  147|  3.10k|      }
  148|       |
  149|      1|      auto s_inv = [&]() {
  150|      1|         if constexpr(VariableTime) {
  151|      1|            return c[N - 1].invert_vartime();
  152|      1|         } else {
  153|      1|            return invert_field_element<C>(c[N - 1]);
  154|      1|         }
  155|      1|      }();
  156|       |
  157|  3.10k|      for(size_t i = N - 1; i > 0; --i) {
  ------------------
  |  Branch (157:29): [True: 3.10k, False: 1]
  ------------------
  158|  3.10k|         const auto& p = projective[i];
  159|       |
  160|  3.10k|         const auto z_inv = s_inv * c[i - 1];
  161|  3.10k|         const auto z2_inv = z_inv.square();
  162|  3.10k|         const auto z3_inv = z_inv * z2_inv;
  163|       |
  164|  3.10k|         s_inv = s_inv * p.z();
  165|       |
  166|  3.10k|         affine.push_back(AffinePoint(p.x() * z2_inv, p.y() * z3_inv));
  167|  3.10k|      }
  168|       |
  169|      1|      const auto z2_inv = s_inv.square();
  170|      1|      const auto z3_inv = s_inv * z2_inv;
  171|      1|      affine.push_back(AffinePoint(projective[0].x() * z2_inv, projective[0].y() * z3_inv));
  172|      1|      std::reverse(affine.begin(), affine.end());
  173|      1|      return affine;
  174|      1|   }
  175|       |
  176|      0|   return affine;
  177|      1|}
pcurves_brainpool512r1.cpp:_ZN5Botan9to_affineINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveEEEDaRKNT_15ProjectivePointE:
   76|    360|inline constexpr auto to_affine(const typename C::ProjectivePoint& pt) {
   77|       |   // Not strictly required right? - default should work as long
   78|       |   // as (0,0) is identity and invert returns 0 on 0
   79|       |
   80|       |   if constexpr(curve_supports_fe_invert2<C>) {
   81|       |      const auto z2_inv = C::fe_invert2(pt.z());
   82|       |      const auto z3_inv = z2_inv.square() * pt.z();
   83|       |      return typename C::AffinePoint(pt.x() * z2_inv, pt.y() * z3_inv);
   84|    360|   } else {
   85|    360|      const auto z_inv = invert_field_element<C>(pt.z());
   86|    360|      const auto z2_inv = z_inv.square();
   87|    360|      const auto z3_inv = z_inv * z2_inv;
   88|    360|      return typename C::AffinePoint(pt.x() * z2_inv, pt.y() * z3_inv);
   89|    360|   }
   90|    360|}
pcurves_brainpool512r1.cpp:_ZN5Botan20invert_field_elementINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveEEEDaRKNT_12FieldElementE:
   35|    784|inline constexpr auto invert_field_element(const typename C::FieldElement& fe) {
   36|       |   if constexpr(curve_supports_fe_invert2<C>) {
   37|       |      return C::fe_invert2(fe) * fe;
   38|    784|   } else {
   39|    784|      return fe.invert();
   40|    784|   }
   41|    784|}
pcurves_brainpool512r1.cpp:_ZZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELb1EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEEENKUlvE_clEv:
  149|      1|      auto s_inv = [&]() {
  150|      1|         if constexpr(VariableTime) {
  151|      1|            return c[N - 1].invert_vartime();
  152|       |         } else {
  153|       |            return invert_field_element<C>(c[N - 1]);
  154|       |         }
  155|      1|      }();
pcurves_brainpool512r1.cpp:_ZN5Botan22point_add_or_sub_mixedINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES3_E11FieldParamsEEEEES8_EENS_16AffineCurvePointISC_EESC_EET_RKSG_RKT0_NS_2CT6ChoiceERKT1_:
  296|  58.9k|                                                        const FieldElement& one) {
  297|  58.9k|   const auto a_is_identity = a.is_identity();
  298|  58.9k|   const auto b_is_identity = b.is_identity();
  299|       |
  300|       |   /*
  301|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-1998-cmo-2
  302|       |
  303|       |   Cost: 8M + 3S + 6add + 1*2
  304|       |   */
  305|       |
  306|  58.9k|   auto by = b.y();
  307|  58.9k|   by.conditional_assign(sub, by.negate());
  308|       |
  309|  58.9k|   const auto Z1Z1 = a.z().square();
  310|  58.9k|   const auto U2 = b.x() * Z1Z1;
  311|  58.9k|   const auto S2 = by * a.z() * Z1Z1;
  312|  58.9k|   const auto H = U2 - a.x();
  313|  58.9k|   const auto r = S2 - a.y();
  314|       |
  315|       |   /* Risky conditional
  316|       |   *
  317|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  318|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  319|       |   *
  320|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  321|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  322|       |   * in which case at the end we'll set z to a.z * H = 0, resulting in the correct output
  323|       |   * (the identity element)
  324|       |   */
  325|  58.9k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (325:7): [True: 0, False: 58.9k]
  ------------------
  326|      0|      return a.dbl();
  327|      0|   }
  328|       |
  329|  58.9k|   const auto HH = H.square();
  330|  58.9k|   const auto HHH = H * HH;
  331|  58.9k|   const auto V = a.x() * HH;
  332|  58.9k|   const auto t2 = r.square();
  333|  58.9k|   const auto t3 = V + V;
  334|  58.9k|   const auto t4 = t2 - HHH;
  335|  58.9k|   auto X3 = t4 - t3;
  336|  58.9k|   const auto t5 = V - X3;
  337|  58.9k|   const auto t6 = a.y() * HHH;
  338|  58.9k|   const auto t7 = r * t5;
  339|  58.9k|   auto Y3 = t7 - t6;
  340|  58.9k|   auto Z3 = a.z() * H;
  341|       |
  342|       |   // if a is identity then return b
  343|  58.9k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), by, one);
  344|       |
  345|       |   // if b is identity then return a
  346|  58.9k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  347|       |
  348|  58.9k|   return ProjectivePoint(X3, Y3, Z3);
  349|  58.9k|}
pcurves_brainpool512r1.cpp:_ZN5Botan11to_affine_xINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveEEEDaRKNT_15ProjectivePointE:
   96|    212|auto to_affine_x(const typename C::ProjectivePoint& pt) {
   97|       |   if constexpr(curve_supports_fe_invert2<C>) {
   98|       |      return pt.x() * C::fe_invert2(pt.z());
   99|    212|   } else {
  100|    212|      const auto z_inv = invert_field_element<C>(pt.z());
  101|    212|      const auto z2_inv = z_inv.square();
  102|    212|      return pt.x() * z2_inv;
  103|    212|   }
  104|    212|}
pcurves_brainpool512r1.cpp:_ZN5Botan15point_add_mixedINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES3_E11FieldParamsEEEEES8_EENS_16AffineCurvePointISC_EESC_EET_RKSG_RKT0_RKT1_:
  240|  1.48k|                                                 const FieldElement& one) {
  241|  1.48k|   const auto a_is_identity = a.is_identity();
  242|  1.48k|   const auto b_is_identity = b.is_identity();
  243|       |
  244|       |   /*
  245|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-1998-cmo-2
  246|       |
  247|       |   Cost: 8M + 3S + 6add + 1*2
  248|       |   */
  249|       |
  250|  1.48k|   const auto Z1Z1 = a.z().square();
  251|  1.48k|   const auto U2 = b.x() * Z1Z1;
  252|  1.48k|   const auto S2 = b.y() * a.z() * Z1Z1;
  253|  1.48k|   const auto H = U2 - a.x();
  254|  1.48k|   const auto r = S2 - a.y();
  255|       |
  256|       |   /* Risky conditional
  257|       |   *
  258|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  259|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  260|       |   *
  261|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  262|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  263|       |   * in which case at the end we'll set z to a.z * H = 0, resulting in the correct output
  264|       |   * (the identity element)
  265|       |   */
  266|  1.48k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (266:7): [True: 0, False: 1.48k]
  ------------------
  267|      0|      return a.dbl();
  268|      0|   }
  269|       |
  270|  1.48k|   const auto HH = H.square();
  271|  1.48k|   const auto HHH = H * HH;
  272|  1.48k|   const auto V = a.x() * HH;
  273|  1.48k|   const auto t2 = r.square();
  274|  1.48k|   const auto t3 = V + V;
  275|  1.48k|   const auto t4 = t2 - HHH;
  276|  1.48k|   auto X3 = t4 - t3;
  277|  1.48k|   const auto t5 = V - X3;
  278|  1.48k|   const auto t6 = a.y() * HHH;
  279|  1.48k|   const auto t7 = r * t5;
  280|  1.48k|   auto Y3 = t7 - t6;
  281|  1.48k|   auto Z3 = a.z() * H;
  282|       |
  283|       |   // if a is identity then return b
  284|  1.48k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), b.y(), one);
  285|       |
  286|       |   // if b is identity then return a
  287|  1.48k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  288|       |
  289|  1.48k|   return ProjectivePoint(X3, Y3, Z3);
  290|  1.48k|}
pcurves_brainpool512r1.cpp:_ZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELb0EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEE:
  107|    212|auto to_affine_batch(std::span<const typename C::ProjectivePoint> projective) {
  108|    212|   using AffinePoint = typename C::AffinePoint;
  109|       |
  110|    212|   const size_t N = projective.size();
  111|    212|   std::vector<AffinePoint> affine;
  112|    212|   affine.reserve(N);
  113|       |
  114|    212|   CT::Choice any_identity = CT::Choice::no();
  115|       |
  116|  3.39k|   for(const auto& pt : projective) {
  ------------------
  |  Branch (116:23): [True: 3.39k, False: 212]
  ------------------
  117|  3.39k|      any_identity = any_identity || pt.is_identity();
  118|  3.39k|   }
  119|       |
  120|       |   // Conditional acceptable: N is public. State of points is not necessarily
  121|       |   // public, but we don't leak which point was the identity. In practice with
  122|       |   // the algorithms currently in use, the only time an identity can occur is
  123|       |   // during mul2 where the two points g/h have a small relation (ie h = g*k for
  124|       |   // some k < 16)
  125|       |
  126|    212|   if(N <= 2 || any_identity.as_bool()) {
  ------------------
  |  Branch (126:7): [True: 0, False: 212]
  |  Branch (126:17): [True: 0, False: 212]
  ------------------
  127|       |      // If there are identity elements, using the batch inversion gets
  128|       |      // tricky. It can be done, but this should be a rare situation so
  129|       |      // just punt to the serial conversion if it occurs
  130|      0|      for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (130:25): [True: 0, False: 0]
  ------------------
  131|      0|         affine.push_back(to_affine<C>(projective[i]));
  132|      0|      }
  133|    212|   } else {
  134|    212|      std::vector<typename C::FieldElement> c;
  135|    212|      c.reserve(N);
  136|       |
  137|       |      /*
  138|       |      Batch projective->affine using Montgomery's trick
  139|       |
  140|       |      See Algorithm 2.26 in "Guide to Elliptic Curve Cryptography"
  141|       |      (Hankerson, Menezes, Vanstone)
  142|       |      */
  143|       |
  144|    212|      c.push_back(projective[0].z());
  145|  3.39k|      for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (145:25): [True: 3.18k, False: 212]
  ------------------
  146|  3.18k|         c.push_back(c[i - 1] * projective[i].z());
  147|  3.18k|      }
  148|       |
  149|    212|      auto s_inv = [&]() {
  150|    212|         if constexpr(VariableTime) {
  151|    212|            return c[N - 1].invert_vartime();
  152|    212|         } else {
  153|    212|            return invert_field_element<C>(c[N - 1]);
  154|    212|         }
  155|    212|      }();
  156|       |
  157|  3.39k|      for(size_t i = N - 1; i > 0; --i) {
  ------------------
  |  Branch (157:29): [True: 3.18k, False: 212]
  ------------------
  158|  3.18k|         const auto& p = projective[i];
  159|       |
  160|  3.18k|         const auto z_inv = s_inv * c[i - 1];
  161|  3.18k|         const auto z2_inv = z_inv.square();
  162|  3.18k|         const auto z3_inv = z_inv * z2_inv;
  163|       |
  164|  3.18k|         s_inv = s_inv * p.z();
  165|       |
  166|  3.18k|         affine.push_back(AffinePoint(p.x() * z2_inv, p.y() * z3_inv));
  167|  3.18k|      }
  168|       |
  169|    212|      const auto z2_inv = s_inv.square();
  170|    212|      const auto z3_inv = s_inv * z2_inv;
  171|    212|      affine.push_back(AffinePoint(projective[0].x() * z2_inv, projective[0].y() * z3_inv));
  172|    212|      std::reverse(affine.begin(), affine.end());
  173|    212|      return affine;
  174|    212|   }
  175|       |
  176|      0|   return affine;
  177|    212|}
pcurves_brainpool512r1.cpp:_ZZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELb0EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEEENKUlvE_clEv:
  149|    212|      auto s_inv = [&]() {
  150|       |         if constexpr(VariableTime) {
  151|       |            return c[N - 1].invert_vartime();
  152|    212|         } else {
  153|    212|            return invert_field_element<C>(c[N - 1]);
  154|    212|         }
  155|    212|      }();
pcurves_brainpool512r1.cpp:_ZN5Botan13dbl_n_genericINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES3_E11FieldParamsEEEEES8_EESC_EET_RKSE_RKT0_m:
  477|  24.3k|inline constexpr ProjectivePoint dbl_n_generic(const ProjectivePoint& pt, const FieldElement& A, size_t n) {
  478|  24.3k|   auto nx = pt.x();
  479|  24.3k|   auto ny = pt.y().mul2();
  480|  24.3k|   auto nz = pt.z();
  481|  24.3k|   auto w = nz.square().square() * A;
  482|       |
  483|       |   // Conditional ok: loop iteration count is public
  484|   146k|   while(n > 0) {
  ------------------
  |  Branch (484:10): [True: 121k, False: 24.3k]
  ------------------
  485|   121k|      const auto ny2 = ny.square();
  486|   121k|      const auto ny4 = ny2.square();
  487|   121k|      const auto t1 = nx.square().mul3() + w;
  488|   121k|      const auto t2 = nx * ny2;
  489|   121k|      nx = t1.square() - t2.mul2();
  490|   121k|      nz *= ny;
  491|   121k|      ny = t1 * (t2 - nx).mul2() - ny4;
  492|   121k|      n--;
  493|       |      // Conditional ok: loop iteration count is public
  494|   121k|      if(n > 0) {
  ------------------
  |  Branch (494:10): [True: 97.5k, False: 24.3k]
  ------------------
  495|  97.5k|         w *= ny4;
  496|  97.5k|      }
  497|   121k|   }
  498|  24.3k|   return ProjectivePoint(nx, ny.div2(), nz);
  499|  24.3k|}
pcurves_brainpool512r1.cpp:_ZN5Botan18sqrt_field_elementINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveEEENS_2CT6OptionINT_12FieldElementEEERKS8_:
   60|    225|inline constexpr CT::Option<typename C::FieldElement> sqrt_field_element(const typename C::FieldElement& fe) {
   61|       |   if constexpr(curve_supports_fe_sqrt<C>) {
   62|       |      auto z = C::fe_sqrt(fe);
   63|       |      // Zero out the return value if it would otherwise be incorrect
   64|       |      const CT::Choice correct = (z.square() == fe);
   65|       |      z.conditional_assign(!correct, C::FieldElement::zero());
   66|       |      return CT::Option(z, correct);
   67|    225|   } else {
   68|    225|      return fe.sqrt();
   69|    225|   }
   70|    225|}
pcurves_secp256r1.cpp:_ZN5Botan13dbl_a_minus_3INS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS4_9secp256r16ParamsES5_E11FieldParamsEEEEES8_EEEET_RKSE_:
  362|  3.36k|inline constexpr ProjectivePoint dbl_a_minus_3(const ProjectivePoint& pt) {
  363|       |   /*
  364|       |   if a == -3 then
  365|       |   3*x^2 + a*z^4 == 3*x^2 - 3*z^4 == 3*(x^2-z^4) == 3*(x-z^2)*(x+z^2)
  366|       |   */
  367|  3.36k|   const auto z2 = pt.z().square();
  368|  3.36k|   const auto m = (pt.x() - z2).mul3() * (pt.x() + z2);
  369|       |
  370|       |   // Remaining cost: 3M + 3S + 3A + 2*2 + 1*4 + 1*8
  371|  3.36k|   const auto y2 = pt.y().square();
  372|  3.36k|   const auto s = pt.x().mul4() * y2;
  373|  3.36k|   const auto nx = m.square() - s.mul2();
  374|  3.36k|   const auto ny = m * (s - nx) - y2.square().mul8();
  375|  3.36k|   const auto nz = pt.y().mul2() * pt.z();
  376|       |
  377|  3.36k|   return ProjectivePoint(nx, ny, nz);
  378|  3.36k|}
pcurves_secp256r1.cpp:_ZN5Botan9point_addINS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS4_9secp256r16ParamsES5_E11FieldParamsEEEEES8_EESC_EET_RKSE_SG_:
  187|    735|inline constexpr ProjectivePoint point_add(const ProjectivePoint& a, const ProjectivePoint& b) {
  188|    735|   const auto a_is_identity = a.is_identity();
  189|    735|   const auto b_is_identity = b.is_identity();
  190|       |
  191|    735|   const auto Z1Z1 = a.z().square();
  192|    735|   const auto Z2Z2 = b.z().square();
  193|    735|   const auto U1 = a.x() * Z2Z2;
  194|    735|   const auto U2 = b.x() * Z1Z1;
  195|    735|   const auto S1 = a.y() * b.z() * Z2Z2;
  196|    735|   const auto S2 = b.y() * a.z() * Z1Z1;
  197|    735|   const auto H = U2 - U1;
  198|    735|   const auto r = S2 - S1;
  199|       |
  200|       |   /* Risky conditional
  201|       |   *
  202|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  203|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  204|       |   *
  205|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  206|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  207|       |   * in which case at the end we'll set z to a.z * b.z * H = 0, resulting in the correct
  208|       |   * output (the identity element)
  209|       |   */
  210|    735|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (210:7): [True: 0, False: 735]
  ------------------
  211|      0|      return a.dbl();
  212|      0|   }
  213|       |
  214|    735|   const auto HH = H.square();
  215|    735|   const auto HHH = H * HH;
  216|    735|   const auto V = U1 * HH;
  217|    735|   const auto t2 = r.square();
  218|    735|   const auto t3 = V + V;
  219|    735|   const auto t4 = t2 - HHH;
  220|    735|   auto X3 = t4 - t3;
  221|    735|   const auto t5 = V - X3;
  222|    735|   const auto t6 = S1 * HHH;
  223|    735|   const auto t7 = r * t5;
  224|    735|   auto Y3 = t7 - t6;
  225|    735|   const auto t8 = b.z() * H;
  226|    735|   auto Z3 = a.z() * t8;
  227|       |
  228|       |   // if a is identity then return b
  229|    735|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), b.y(), b.z());
  230|       |
  231|       |   // if b is identity then return a
  232|    735|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  233|       |
  234|    735|   return ProjectivePoint(X3, Y3, Z3);
  235|    735|}
pcurves_secp256r1.cpp:_ZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_19secp256r15CurveELb1EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEE:
  107|      1|auto to_affine_batch(std::span<const typename C::ProjectivePoint> projective) {
  108|      1|   using AffinePoint = typename C::AffinePoint;
  109|       |
  110|      1|   const size_t N = projective.size();
  111|      1|   std::vector<AffinePoint> affine;
  112|      1|   affine.reserve(N);
  113|       |
  114|      1|   CT::Choice any_identity = CT::Choice::no();
  115|       |
  116|  1.56k|   for(const auto& pt : projective) {
  ------------------
  |  Branch (116:23): [True: 1.56k, False: 1]
  ------------------
  117|  1.56k|      any_identity = any_identity || pt.is_identity();
  118|  1.56k|   }
  119|       |
  120|       |   // Conditional acceptable: N is public. State of points is not necessarily
  121|       |   // public, but we don't leak which point was the identity. In practice with
  122|       |   // the algorithms currently in use, the only time an identity can occur is
  123|       |   // during mul2 where the two points g/h have a small relation (ie h = g*k for
  124|       |   // some k < 16)
  125|       |
  126|      1|   if(N <= 2 || any_identity.as_bool()) {
  ------------------
  |  Branch (126:7): [True: 0, False: 1]
  |  Branch (126:17): [True: 0, False: 1]
  ------------------
  127|       |      // If there are identity elements, using the batch inversion gets
  128|       |      // tricky. It can be done, but this should be a rare situation so
  129|       |      // just punt to the serial conversion if it occurs
  130|      0|      for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (130:25): [True: 0, False: 0]
  ------------------
  131|      0|         affine.push_back(to_affine<C>(projective[i]));
  132|      0|      }
  133|      1|   } else {
  134|      1|      std::vector<typename C::FieldElement> c;
  135|      1|      c.reserve(N);
  136|       |
  137|       |      /*
  138|       |      Batch projective->affine using Montgomery's trick
  139|       |
  140|       |      See Algorithm 2.26 in "Guide to Elliptic Curve Cryptography"
  141|       |      (Hankerson, Menezes, Vanstone)
  142|       |      */
  143|       |
  144|      1|      c.push_back(projective[0].z());
  145|  1.56k|      for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (145:25): [True: 1.56k, False: 1]
  ------------------
  146|  1.56k|         c.push_back(c[i - 1] * projective[i].z());
  147|  1.56k|      }
  148|       |
  149|      1|      auto s_inv = [&]() {
  150|      1|         if constexpr(VariableTime) {
  151|      1|            return c[N - 1].invert_vartime();
  152|      1|         } else {
  153|      1|            return invert_field_element<C>(c[N - 1]);
  154|      1|         }
  155|      1|      }();
  156|       |
  157|  1.56k|      for(size_t i = N - 1; i > 0; --i) {
  ------------------
  |  Branch (157:29): [True: 1.56k, False: 1]
  ------------------
  158|  1.56k|         const auto& p = projective[i];
  159|       |
  160|  1.56k|         const auto z_inv = s_inv * c[i - 1];
  161|  1.56k|         const auto z2_inv = z_inv.square();
  162|  1.56k|         const auto z3_inv = z_inv * z2_inv;
  163|       |
  164|  1.56k|         s_inv = s_inv * p.z();
  165|       |
  166|  1.56k|         affine.push_back(AffinePoint(p.x() * z2_inv, p.y() * z3_inv));
  167|  1.56k|      }
  168|       |
  169|      1|      const auto z2_inv = s_inv.square();
  170|      1|      const auto z3_inv = s_inv * z2_inv;
  171|      1|      affine.push_back(AffinePoint(projective[0].x() * z2_inv, projective[0].y() * z3_inv));
  172|      1|      std::reverse(affine.begin(), affine.end());
  173|      1|      return affine;
  174|      1|   }
  175|       |
  176|      0|   return affine;
  177|      1|}
pcurves_secp256r1.cpp:_ZN5Botan9to_affineINS_6PCurve12_GLOBAL__N_19secp256r15CurveEEEDaRKNT_15ProjectivePointE:
   76|    459|inline constexpr auto to_affine(const typename C::ProjectivePoint& pt) {
   77|       |   // Not strictly required right? - default should work as long
   78|       |   // as (0,0) is identity and invert returns 0 on 0
   79|       |
   80|    459|   if constexpr(curve_supports_fe_invert2<C>) {
   81|    459|      const auto z2_inv = C::fe_invert2(pt.z());
   82|    459|      const auto z3_inv = z2_inv.square() * pt.z();
   83|    459|      return typename C::AffinePoint(pt.x() * z2_inv, pt.y() * z3_inv);
   84|       |   } else {
   85|       |      const auto z_inv = invert_field_element<C>(pt.z());
   86|       |      const auto z2_inv = z_inv.square();
   87|       |      const auto z3_inv = z_inv * z2_inv;
   88|       |      return typename C::AffinePoint(pt.x() * z2_inv, pt.y() * z3_inv);
   89|       |   }
   90|    459|}
pcurves_secp256r1.cpp:_ZZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_19secp256r15CurveELb1EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEEENKUlvE_clEv:
  149|      1|      auto s_inv = [&]() {
  150|      1|         if constexpr(VariableTime) {
  151|      1|            return c[N - 1].invert_vartime();
  152|       |         } else {
  153|       |            return invert_field_element<C>(c[N - 1]);
  154|       |         }
  155|      1|      }();
pcurves_secp256r1.cpp:_ZN5Botan22point_add_or_sub_mixedINS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS4_9secp256r16ParamsES5_E11FieldParamsEEEEES8_EENS_16AffineCurvePointISC_EESC_EET_RKSG_RKT0_NS_2CT6ChoiceERKT1_:
  296|  40.1k|                                                        const FieldElement& one) {
  297|  40.1k|   const auto a_is_identity = a.is_identity();
  298|  40.1k|   const auto b_is_identity = b.is_identity();
  299|       |
  300|       |   /*
  301|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-1998-cmo-2
  302|       |
  303|       |   Cost: 8M + 3S + 6add + 1*2
  304|       |   */
  305|       |
  306|  40.1k|   auto by = b.y();
  307|  40.1k|   by.conditional_assign(sub, by.negate());
  308|       |
  309|  40.1k|   const auto Z1Z1 = a.z().square();
  310|  40.1k|   const auto U2 = b.x() * Z1Z1;
  311|  40.1k|   const auto S2 = by * a.z() * Z1Z1;
  312|  40.1k|   const auto H = U2 - a.x();
  313|  40.1k|   const auto r = S2 - a.y();
  314|       |
  315|       |   /* Risky conditional
  316|       |   *
  317|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  318|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  319|       |   *
  320|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  321|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  322|       |   * in which case at the end we'll set z to a.z * H = 0, resulting in the correct output
  323|       |   * (the identity element)
  324|       |   */
  325|  40.1k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (325:7): [True: 0, False: 40.1k]
  ------------------
  326|      0|      return a.dbl();
  327|      0|   }
  328|       |
  329|  40.1k|   const auto HH = H.square();
  330|  40.1k|   const auto HHH = H * HH;
  331|  40.1k|   const auto V = a.x() * HH;
  332|  40.1k|   const auto t2 = r.square();
  333|  40.1k|   const auto t3 = V + V;
  334|  40.1k|   const auto t4 = t2 - HHH;
  335|  40.1k|   auto X3 = t4 - t3;
  336|  40.1k|   const auto t5 = V - X3;
  337|  40.1k|   const auto t6 = a.y() * HHH;
  338|  40.1k|   const auto t7 = r * t5;
  339|  40.1k|   auto Y3 = t7 - t6;
  340|  40.1k|   auto Z3 = a.z() * H;
  341|       |
  342|       |   // if a is identity then return b
  343|  40.1k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), by, one);
  344|       |
  345|       |   // if b is identity then return a
  346|  40.1k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  347|       |
  348|  40.1k|   return ProjectivePoint(X3, Y3, Z3);
  349|  40.1k|}
pcurves_secp256r1.cpp:_ZN5Botan11to_affine_xINS_6PCurve12_GLOBAL__N_19secp256r15CurveEEEDaRKNT_15ProjectivePointE:
   96|    317|auto to_affine_x(const typename C::ProjectivePoint& pt) {
   97|    317|   if constexpr(curve_supports_fe_invert2<C>) {
   98|    317|      return pt.x() * C::fe_invert2(pt.z());
   99|       |   } else {
  100|       |      const auto z_inv = invert_field_element<C>(pt.z());
  101|       |      const auto z2_inv = z_inv.square();
  102|       |      return pt.x() * z2_inv;
  103|       |   }
  104|    317|}
pcurves_secp256r1.cpp:_ZN5Botan15point_add_mixedINS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS4_9secp256r16ParamsES5_E11FieldParamsEEEEES8_EENS_16AffineCurvePointISC_EESC_EET_RKSG_RKT0_RKT1_:
  240|  2.21k|                                                 const FieldElement& one) {
  241|  2.21k|   const auto a_is_identity = a.is_identity();
  242|  2.21k|   const auto b_is_identity = b.is_identity();
  243|       |
  244|       |   /*
  245|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-1998-cmo-2
  246|       |
  247|       |   Cost: 8M + 3S + 6add + 1*2
  248|       |   */
  249|       |
  250|  2.21k|   const auto Z1Z1 = a.z().square();
  251|  2.21k|   const auto U2 = b.x() * Z1Z1;
  252|  2.21k|   const auto S2 = b.y() * a.z() * Z1Z1;
  253|  2.21k|   const auto H = U2 - a.x();
  254|  2.21k|   const auto r = S2 - a.y();
  255|       |
  256|       |   /* Risky conditional
  257|       |   *
  258|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  259|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  260|       |   *
  261|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  262|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  263|       |   * in which case at the end we'll set z to a.z * H = 0, resulting in the correct output
  264|       |   * (the identity element)
  265|       |   */
  266|  2.21k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (266:7): [True: 0, False: 2.21k]
  ------------------
  267|      0|      return a.dbl();
  268|      0|   }
  269|       |
  270|  2.21k|   const auto HH = H.square();
  271|  2.21k|   const auto HHH = H * HH;
  272|  2.21k|   const auto V = a.x() * HH;
  273|  2.21k|   const auto t2 = r.square();
  274|  2.21k|   const auto t3 = V + V;
  275|  2.21k|   const auto t4 = t2 - HHH;
  276|  2.21k|   auto X3 = t4 - t3;
  277|  2.21k|   const auto t5 = V - X3;
  278|  2.21k|   const auto t6 = a.y() * HHH;
  279|  2.21k|   const auto t7 = r * t5;
  280|  2.21k|   auto Y3 = t7 - t6;
  281|  2.21k|   auto Z3 = a.z() * H;
  282|       |
  283|       |   // if a is identity then return b
  284|  2.21k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), b.y(), one);
  285|       |
  286|       |   // if b is identity then return a
  287|  2.21k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  288|       |
  289|  2.21k|   return ProjectivePoint(X3, Y3, Z3);
  290|  2.21k|}
pcurves_secp256r1.cpp:_ZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_19secp256r15CurveELb0EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEE:
  107|    317|auto to_affine_batch(std::span<const typename C::ProjectivePoint> projective) {
  108|    317|   using AffinePoint = typename C::AffinePoint;
  109|       |
  110|    317|   const size_t N = projective.size();
  111|    317|   std::vector<AffinePoint> affine;
  112|    317|   affine.reserve(N);
  113|       |
  114|    317|   CT::Choice any_identity = CT::Choice::no();
  115|       |
  116|  5.07k|   for(const auto& pt : projective) {
  ------------------
  |  Branch (116:23): [True: 5.07k, False: 317]
  ------------------
  117|  5.07k|      any_identity = any_identity || pt.is_identity();
  118|  5.07k|   }
  119|       |
  120|       |   // Conditional acceptable: N is public. State of points is not necessarily
  121|       |   // public, but we don't leak which point was the identity. In practice with
  122|       |   // the algorithms currently in use, the only time an identity can occur is
  123|       |   // during mul2 where the two points g/h have a small relation (ie h = g*k for
  124|       |   // some k < 16)
  125|       |
  126|    317|   if(N <= 2 || any_identity.as_bool()) {
  ------------------
  |  Branch (126:7): [True: 0, False: 317]
  |  Branch (126:17): [True: 0, False: 317]
  ------------------
  127|       |      // If there are identity elements, using the batch inversion gets
  128|       |      // tricky. It can be done, but this should be a rare situation so
  129|       |      // just punt to the serial conversion if it occurs
  130|      0|      for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (130:25): [True: 0, False: 0]
  ------------------
  131|      0|         affine.push_back(to_affine<C>(projective[i]));
  132|      0|      }
  133|    317|   } else {
  134|    317|      std::vector<typename C::FieldElement> c;
  135|    317|      c.reserve(N);
  136|       |
  137|       |      /*
  138|       |      Batch projective->affine using Montgomery's trick
  139|       |
  140|       |      See Algorithm 2.26 in "Guide to Elliptic Curve Cryptography"
  141|       |      (Hankerson, Menezes, Vanstone)
  142|       |      */
  143|       |
  144|    317|      c.push_back(projective[0].z());
  145|  5.07k|      for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (145:25): [True: 4.75k, False: 317]
  ------------------
  146|  4.75k|         c.push_back(c[i - 1] * projective[i].z());
  147|  4.75k|      }
  148|       |
  149|    317|      auto s_inv = [&]() {
  150|    317|         if constexpr(VariableTime) {
  151|    317|            return c[N - 1].invert_vartime();
  152|    317|         } else {
  153|    317|            return invert_field_element<C>(c[N - 1]);
  154|    317|         }
  155|    317|      }();
  156|       |
  157|  5.07k|      for(size_t i = N - 1; i > 0; --i) {
  ------------------
  |  Branch (157:29): [True: 4.75k, False: 317]
  ------------------
  158|  4.75k|         const auto& p = projective[i];
  159|       |
  160|  4.75k|         const auto z_inv = s_inv * c[i - 1];
  161|  4.75k|         const auto z2_inv = z_inv.square();
  162|  4.75k|         const auto z3_inv = z_inv * z2_inv;
  163|       |
  164|  4.75k|         s_inv = s_inv * p.z();
  165|       |
  166|  4.75k|         affine.push_back(AffinePoint(p.x() * z2_inv, p.y() * z3_inv));
  167|  4.75k|      }
  168|       |
  169|    317|      const auto z2_inv = s_inv.square();
  170|    317|      const auto z3_inv = s_inv * z2_inv;
  171|    317|      affine.push_back(AffinePoint(projective[0].x() * z2_inv, projective[0].y() * z3_inv));
  172|    317|      std::reverse(affine.begin(), affine.end());
  173|    317|      return affine;
  174|    317|   }
  175|       |
  176|      0|   return affine;
  177|    317|}
pcurves_secp256r1.cpp:_ZZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_19secp256r15CurveELb0EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEEENKUlvE_clEv:
  149|    317|      auto s_inv = [&]() {
  150|       |         if constexpr(VariableTime) {
  151|       |            return c[N - 1].invert_vartime();
  152|    317|         } else {
  153|    317|            return invert_field_element<C>(c[N - 1]);
  154|    317|         }
  155|    317|      }();
pcurves_secp256r1.cpp:_ZN5Botan20invert_field_elementINS_6PCurve12_GLOBAL__N_19secp256r15CurveEEEDaRKNT_12FieldElementE:
   35|    317|inline constexpr auto invert_field_element(const typename C::FieldElement& fe) {
   36|    317|   if constexpr(curve_supports_fe_invert2<C>) {
   37|    317|      return C::fe_invert2(fe) * fe;
   38|       |   } else {
   39|       |      return fe.invert();
   40|       |   }
   41|    317|}
pcurves_secp256r1.cpp:_ZN5Botan15dbl_n_a_minus_3INS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS4_9secp256r16ParamsES5_E11FieldParamsEEEEES8_EEEET_RKSE_m:
  432|  18.0k|inline constexpr ProjectivePoint dbl_n_a_minus_3(const ProjectivePoint& pt, size_t n) {
  433|  18.0k|   auto nx = pt.x();
  434|  18.0k|   auto ny = pt.y().mul2();
  435|  18.0k|   auto nz = pt.z();
  436|  18.0k|   auto w = nz.square().square();
  437|       |
  438|       |   // Conditional ok: loop iteration count is public
  439|   108k|   while(n > 0) {
  ------------------
  |  Branch (439:10): [True: 90.3k, False: 18.0k]
  ------------------
  440|  90.3k|      const auto ny2 = ny.square();
  441|  90.3k|      const auto ny4 = ny2.square();
  442|  90.3k|      const auto t1 = (nx.square() - w).mul3();
  443|  90.3k|      const auto t2 = nx * ny2;
  444|  90.3k|      nx = t1.square() - t2.mul2();
  445|  90.3k|      nz *= ny;
  446|  90.3k|      ny = t1 * (t2 - nx).mul2() - ny4;
  447|  90.3k|      n--;
  448|       |      // Conditional ok: loop iteration count is public
  449|  90.3k|      if(n > 0) {
  ------------------
  |  Branch (449:10): [True: 72.2k, False: 18.0k]
  ------------------
  450|  72.2k|         w *= ny4;
  451|  72.2k|      }
  452|  90.3k|   }
  453|  18.0k|   return ProjectivePoint(nx, ny.div2(), nz);
  454|  18.0k|}
pcurves_secp256r1.cpp:_ZN5Botan18sqrt_field_elementINS_6PCurve12_GLOBAL__N_19secp256r15CurveEEENS_2CT6OptionINT_12FieldElementEEERKS8_:
   60|    319|inline constexpr CT::Option<typename C::FieldElement> sqrt_field_element(const typename C::FieldElement& fe) {
   61|    319|   if constexpr(curve_supports_fe_sqrt<C>) {
   62|    319|      auto z = C::fe_sqrt(fe);
   63|       |      // Zero out the return value if it would otherwise be incorrect
   64|    319|      const CT::Choice correct = (z.square() == fe);
   65|    319|      z.conditional_assign(!correct, C::FieldElement::zero());
   66|    319|      return CT::Option(z, correct);
   67|       |   } else {
   68|       |      return fe.sqrt();
   69|       |   }
   70|    319|}
pcurves_secp384r1.cpp:_ZN5Botan13dbl_a_minus_3INS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS4_9secp384r16ParamsES5_E11FieldParamsEEEEES8_EEEET_RKSE_:
  362|  2.80k|inline constexpr ProjectivePoint dbl_a_minus_3(const ProjectivePoint& pt) {
  363|       |   /*
  364|       |   if a == -3 then
  365|       |   3*x^2 + a*z^4 == 3*x^2 - 3*z^4 == 3*(x^2-z^4) == 3*(x-z^2)*(x+z^2)
  366|       |   */
  367|  2.80k|   const auto z2 = pt.z().square();
  368|  2.80k|   const auto m = (pt.x() - z2).mul3() * (pt.x() + z2);
  369|       |
  370|       |   // Remaining cost: 3M + 3S + 3A + 2*2 + 1*4 + 1*8
  371|  2.80k|   const auto y2 = pt.y().square();
  372|  2.80k|   const auto s = pt.x().mul4() * y2;
  373|  2.80k|   const auto nx = m.square() - s.mul2();
  374|  2.80k|   const auto ny = m * (s - nx) - y2.square().mul8();
  375|  2.80k|   const auto nz = pt.y().mul2() * pt.z();
  376|       |
  377|  2.80k|   return ProjectivePoint(nx, ny, nz);
  378|  2.80k|}
pcurves_secp384r1.cpp:_ZN5Botan9point_addINS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS4_9secp384r16ParamsES5_E11FieldParamsEEEEES8_EESC_EET_RKSE_SG_:
  187|  1.09k|inline constexpr ProjectivePoint point_add(const ProjectivePoint& a, const ProjectivePoint& b) {
  188|  1.09k|   const auto a_is_identity = a.is_identity();
  189|  1.09k|   const auto b_is_identity = b.is_identity();
  190|       |
  191|  1.09k|   const auto Z1Z1 = a.z().square();
  192|  1.09k|   const auto Z2Z2 = b.z().square();
  193|  1.09k|   const auto U1 = a.x() * Z2Z2;
  194|  1.09k|   const auto U2 = b.x() * Z1Z1;
  195|  1.09k|   const auto S1 = a.y() * b.z() * Z2Z2;
  196|  1.09k|   const auto S2 = b.y() * a.z() * Z1Z1;
  197|  1.09k|   const auto H = U2 - U1;
  198|  1.09k|   const auto r = S2 - S1;
  199|       |
  200|       |   /* Risky conditional
  201|       |   *
  202|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  203|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  204|       |   *
  205|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  206|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  207|       |   * in which case at the end we'll set z to a.z * b.z * H = 0, resulting in the correct
  208|       |   * output (the identity element)
  209|       |   */
  210|  1.09k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (210:7): [True: 0, False: 1.09k]
  ------------------
  211|      0|      return a.dbl();
  212|      0|   }
  213|       |
  214|  1.09k|   const auto HH = H.square();
  215|  1.09k|   const auto HHH = H * HH;
  216|  1.09k|   const auto V = U1 * HH;
  217|  1.09k|   const auto t2 = r.square();
  218|  1.09k|   const auto t3 = V + V;
  219|  1.09k|   const auto t4 = t2 - HHH;
  220|  1.09k|   auto X3 = t4 - t3;
  221|  1.09k|   const auto t5 = V - X3;
  222|  1.09k|   const auto t6 = S1 * HHH;
  223|  1.09k|   const auto t7 = r * t5;
  224|  1.09k|   auto Y3 = t7 - t6;
  225|  1.09k|   const auto t8 = b.z() * H;
  226|  1.09k|   auto Z3 = a.z() * t8;
  227|       |
  228|       |   // if a is identity then return b
  229|  1.09k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), b.y(), b.z());
  230|       |
  231|       |   // if b is identity then return a
  232|  1.09k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  233|       |
  234|  1.09k|   return ProjectivePoint(X3, Y3, Z3);
  235|  1.09k|}
pcurves_secp384r1.cpp:_ZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_19secp384r15CurveELb1EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEE:
  107|      1|auto to_affine_batch(std::span<const typename C::ProjectivePoint> projective) {
  108|      1|   using AffinePoint = typename C::AffinePoint;
  109|       |
  110|      1|   const size_t N = projective.size();
  111|      1|   std::vector<AffinePoint> affine;
  112|      1|   affine.reserve(N);
  113|       |
  114|      1|   CT::Choice any_identity = CT::Choice::no();
  115|       |
  116|  2.33k|   for(const auto& pt : projective) {
  ------------------
  |  Branch (116:23): [True: 2.33k, False: 1]
  ------------------
  117|  2.33k|      any_identity = any_identity || pt.is_identity();
  118|  2.33k|   }
  119|       |
  120|       |   // Conditional acceptable: N is public. State of points is not necessarily
  121|       |   // public, but we don't leak which point was the identity. In practice with
  122|       |   // the algorithms currently in use, the only time an identity can occur is
  123|       |   // during mul2 where the two points g/h have a small relation (ie h = g*k for
  124|       |   // some k < 16)
  125|       |
  126|      1|   if(N <= 2 || any_identity.as_bool()) {
  ------------------
  |  Branch (126:7): [True: 0, False: 1]
  |  Branch (126:17): [True: 0, False: 1]
  ------------------
  127|       |      // If there are identity elements, using the batch inversion gets
  128|       |      // tricky. It can be done, but this should be a rare situation so
  129|       |      // just punt to the serial conversion if it occurs
  130|      0|      for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (130:25): [True: 0, False: 0]
  ------------------
  131|      0|         affine.push_back(to_affine<C>(projective[i]));
  132|      0|      }
  133|      1|   } else {
  134|      1|      std::vector<typename C::FieldElement> c;
  135|      1|      c.reserve(N);
  136|       |
  137|       |      /*
  138|       |      Batch projective->affine using Montgomery's trick
  139|       |
  140|       |      See Algorithm 2.26 in "Guide to Elliptic Curve Cryptography"
  141|       |      (Hankerson, Menezes, Vanstone)
  142|       |      */
  143|       |
  144|      1|      c.push_back(projective[0].z());
  145|  2.33k|      for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (145:25): [True: 2.33k, False: 1]
  ------------------
  146|  2.33k|         c.push_back(c[i - 1] * projective[i].z());
  147|  2.33k|      }
  148|       |
  149|      1|      auto s_inv = [&]() {
  150|      1|         if constexpr(VariableTime) {
  151|      1|            return c[N - 1].invert_vartime();
  152|      1|         } else {
  153|      1|            return invert_field_element<C>(c[N - 1]);
  154|      1|         }
  155|      1|      }();
  156|       |
  157|  2.33k|      for(size_t i = N - 1; i > 0; --i) {
  ------------------
  |  Branch (157:29): [True: 2.33k, False: 1]
  ------------------
  158|  2.33k|         const auto& p = projective[i];
  159|       |
  160|  2.33k|         const auto z_inv = s_inv * c[i - 1];
  161|  2.33k|         const auto z2_inv = z_inv.square();
  162|  2.33k|         const auto z3_inv = z_inv * z2_inv;
  163|       |
  164|  2.33k|         s_inv = s_inv * p.z();
  165|       |
  166|  2.33k|         affine.push_back(AffinePoint(p.x() * z2_inv, p.y() * z3_inv));
  167|  2.33k|      }
  168|       |
  169|      1|      const auto z2_inv = s_inv.square();
  170|      1|      const auto z3_inv = s_inv * z2_inv;
  171|      1|      affine.push_back(AffinePoint(projective[0].x() * z2_inv, projective[0].y() * z3_inv));
  172|      1|      std::reverse(affine.begin(), affine.end());
  173|      1|      return affine;
  174|      1|   }
  175|       |
  176|      0|   return affine;
  177|      1|}
pcurves_secp384r1.cpp:_ZN5Botan9to_affineINS_6PCurve12_GLOBAL__N_19secp384r15CurveEEEDaRKNT_15ProjectivePointE:
   76|    287|inline constexpr auto to_affine(const typename C::ProjectivePoint& pt) {
   77|       |   // Not strictly required right? - default should work as long
   78|       |   // as (0,0) is identity and invert returns 0 on 0
   79|       |
   80|    287|   if constexpr(curve_supports_fe_invert2<C>) {
   81|    287|      const auto z2_inv = C::fe_invert2(pt.z());
   82|    287|      const auto z3_inv = z2_inv.square() * pt.z();
   83|    287|      return typename C::AffinePoint(pt.x() * z2_inv, pt.y() * z3_inv);
   84|       |   } else {
   85|       |      const auto z_inv = invert_field_element<C>(pt.z());
   86|       |      const auto z2_inv = z_inv.square();
   87|       |      const auto z3_inv = z_inv * z2_inv;
   88|       |      return typename C::AffinePoint(pt.x() * z2_inv, pt.y() * z3_inv);
   89|       |   }
   90|    287|}
pcurves_secp384r1.cpp:_ZZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_19secp384r15CurveELb1EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEEENKUlvE_clEv:
  149|      1|      auto s_inv = [&]() {
  150|      1|         if constexpr(VariableTime) {
  151|      1|            return c[N - 1].invert_vartime();
  152|       |         } else {
  153|       |            return invert_field_element<C>(c[N - 1]);
  154|       |         }
  155|      1|      }();
pcurves_secp384r1.cpp:_ZN5Botan22point_add_or_sub_mixedINS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS4_9secp384r16ParamsES5_E11FieldParamsEEEEES8_EENS_16AffineCurvePointISC_EESC_EET_RKSG_RKT0_NS_2CT6ChoiceERKT1_:
  296|  37.5k|                                                        const FieldElement& one) {
  297|  37.5k|   const auto a_is_identity = a.is_identity();
  298|  37.5k|   const auto b_is_identity = b.is_identity();
  299|       |
  300|       |   /*
  301|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-1998-cmo-2
  302|       |
  303|       |   Cost: 8M + 3S + 6add + 1*2
  304|       |   */
  305|       |
  306|  37.5k|   auto by = b.y();
  307|  37.5k|   by.conditional_assign(sub, by.negate());
  308|       |
  309|  37.5k|   const auto Z1Z1 = a.z().square();
  310|  37.5k|   const auto U2 = b.x() * Z1Z1;
  311|  37.5k|   const auto S2 = by * a.z() * Z1Z1;
  312|  37.5k|   const auto H = U2 - a.x();
  313|  37.5k|   const auto r = S2 - a.y();
  314|       |
  315|       |   /* Risky conditional
  316|       |   *
  317|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  318|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  319|       |   *
  320|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  321|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  322|       |   * in which case at the end we'll set z to a.z * H = 0, resulting in the correct output
  323|       |   * (the identity element)
  324|       |   */
  325|  37.5k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (325:7): [True: 0, False: 37.5k]
  ------------------
  326|      0|      return a.dbl();
  327|      0|   }
  328|       |
  329|  37.5k|   const auto HH = H.square();
  330|  37.5k|   const auto HHH = H * HH;
  331|  37.5k|   const auto V = a.x() * HH;
  332|  37.5k|   const auto t2 = r.square();
  333|  37.5k|   const auto t3 = V + V;
  334|  37.5k|   const auto t4 = t2 - HHH;
  335|  37.5k|   auto X3 = t4 - t3;
  336|  37.5k|   const auto t5 = V - X3;
  337|  37.5k|   const auto t6 = a.y() * HHH;
  338|  37.5k|   const auto t7 = r * t5;
  339|  37.5k|   auto Y3 = t7 - t6;
  340|  37.5k|   auto Z3 = a.z() * H;
  341|       |
  342|       |   // if a is identity then return b
  343|  37.5k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), by, one);
  344|       |
  345|       |   // if b is identity then return a
  346|  37.5k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  347|       |
  348|  37.5k|   return ProjectivePoint(X3, Y3, Z3);
  349|  37.5k|}
pcurves_secp384r1.cpp:_ZN5Botan11to_affine_xINS_6PCurve12_GLOBAL__N_19secp384r15CurveEEEDaRKNT_15ProjectivePointE:
   96|    196|auto to_affine_x(const typename C::ProjectivePoint& pt) {
   97|    196|   if constexpr(curve_supports_fe_invert2<C>) {
   98|    196|      return pt.x() * C::fe_invert2(pt.z());
   99|       |   } else {
  100|       |      const auto z_inv = invert_field_element<C>(pt.z());
  101|       |      const auto z2_inv = z_inv.square();
  102|       |      return pt.x() * z2_inv;
  103|       |   }
  104|    196|}
pcurves_secp384r1.cpp:_ZN5Botan15point_add_mixedINS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS4_9secp384r16ParamsES5_E11FieldParamsEEEEES8_EENS_16AffineCurvePointISC_EESC_EET_RKSG_RKT0_RKT1_:
  240|  1.37k|                                                 const FieldElement& one) {
  241|  1.37k|   const auto a_is_identity = a.is_identity();
  242|  1.37k|   const auto b_is_identity = b.is_identity();
  243|       |
  244|       |   /*
  245|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-1998-cmo-2
  246|       |
  247|       |   Cost: 8M + 3S + 6add + 1*2
  248|       |   */
  249|       |
  250|  1.37k|   const auto Z1Z1 = a.z().square();
  251|  1.37k|   const auto U2 = b.x() * Z1Z1;
  252|  1.37k|   const auto S2 = b.y() * a.z() * Z1Z1;
  253|  1.37k|   const auto H = U2 - a.x();
  254|  1.37k|   const auto r = S2 - a.y();
  255|       |
  256|       |   /* Risky conditional
  257|       |   *
  258|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  259|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  260|       |   *
  261|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  262|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  263|       |   * in which case at the end we'll set z to a.z * H = 0, resulting in the correct output
  264|       |   * (the identity element)
  265|       |   */
  266|  1.37k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (266:7): [True: 0, False: 1.37k]
  ------------------
  267|      0|      return a.dbl();
  268|      0|   }
  269|       |
  270|  1.37k|   const auto HH = H.square();
  271|  1.37k|   const auto HHH = H * HH;
  272|  1.37k|   const auto V = a.x() * HH;
  273|  1.37k|   const auto t2 = r.square();
  274|  1.37k|   const auto t3 = V + V;
  275|  1.37k|   const auto t4 = t2 - HHH;
  276|  1.37k|   auto X3 = t4 - t3;
  277|  1.37k|   const auto t5 = V - X3;
  278|  1.37k|   const auto t6 = a.y() * HHH;
  279|  1.37k|   const auto t7 = r * t5;
  280|  1.37k|   auto Y3 = t7 - t6;
  281|  1.37k|   auto Z3 = a.z() * H;
  282|       |
  283|       |   // if a is identity then return b
  284|  1.37k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), b.y(), one);
  285|       |
  286|       |   // if b is identity then return a
  287|  1.37k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  288|       |
  289|  1.37k|   return ProjectivePoint(X3, Y3, Z3);
  290|  1.37k|}
pcurves_secp384r1.cpp:_ZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_19secp384r15CurveELb0EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEE:
  107|    196|auto to_affine_batch(std::span<const typename C::ProjectivePoint> projective) {
  108|    196|   using AffinePoint = typename C::AffinePoint;
  109|       |
  110|    196|   const size_t N = projective.size();
  111|    196|   std::vector<AffinePoint> affine;
  112|    196|   affine.reserve(N);
  113|       |
  114|    196|   CT::Choice any_identity = CT::Choice::no();
  115|       |
  116|  3.13k|   for(const auto& pt : projective) {
  ------------------
  |  Branch (116:23): [True: 3.13k, False: 196]
  ------------------
  117|  3.13k|      any_identity = any_identity || pt.is_identity();
  118|  3.13k|   }
  119|       |
  120|       |   // Conditional acceptable: N is public. State of points is not necessarily
  121|       |   // public, but we don't leak which point was the identity. In practice with
  122|       |   // the algorithms currently in use, the only time an identity can occur is
  123|       |   // during mul2 where the two points g/h have a small relation (ie h = g*k for
  124|       |   // some k < 16)
  125|       |
  126|    196|   if(N <= 2 || any_identity.as_bool()) {
  ------------------
  |  Branch (126:7): [True: 0, False: 196]
  |  Branch (126:17): [True: 0, False: 196]
  ------------------
  127|       |      // If there are identity elements, using the batch inversion gets
  128|       |      // tricky. It can be done, but this should be a rare situation so
  129|       |      // just punt to the serial conversion if it occurs
  130|      0|      for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (130:25): [True: 0, False: 0]
  ------------------
  131|      0|         affine.push_back(to_affine<C>(projective[i]));
  132|      0|      }
  133|    196|   } else {
  134|    196|      std::vector<typename C::FieldElement> c;
  135|    196|      c.reserve(N);
  136|       |
  137|       |      /*
  138|       |      Batch projective->affine using Montgomery's trick
  139|       |
  140|       |      See Algorithm 2.26 in "Guide to Elliptic Curve Cryptography"
  141|       |      (Hankerson, Menezes, Vanstone)
  142|       |      */
  143|       |
  144|    196|      c.push_back(projective[0].z());
  145|  3.13k|      for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (145:25): [True: 2.94k, False: 196]
  ------------------
  146|  2.94k|         c.push_back(c[i - 1] * projective[i].z());
  147|  2.94k|      }
  148|       |
  149|    196|      auto s_inv = [&]() {
  150|    196|         if constexpr(VariableTime) {
  151|    196|            return c[N - 1].invert_vartime();
  152|    196|         } else {
  153|    196|            return invert_field_element<C>(c[N - 1]);
  154|    196|         }
  155|    196|      }();
  156|       |
  157|  3.13k|      for(size_t i = N - 1; i > 0; --i) {
  ------------------
  |  Branch (157:29): [True: 2.94k, False: 196]
  ------------------
  158|  2.94k|         const auto& p = projective[i];
  159|       |
  160|  2.94k|         const auto z_inv = s_inv * c[i - 1];
  161|  2.94k|         const auto z2_inv = z_inv.square();
  162|  2.94k|         const auto z3_inv = z_inv * z2_inv;
  163|       |
  164|  2.94k|         s_inv = s_inv * p.z();
  165|       |
  166|  2.94k|         affine.push_back(AffinePoint(p.x() * z2_inv, p.y() * z3_inv));
  167|  2.94k|      }
  168|       |
  169|    196|      const auto z2_inv = s_inv.square();
  170|    196|      const auto z3_inv = s_inv * z2_inv;
  171|    196|      affine.push_back(AffinePoint(projective[0].x() * z2_inv, projective[0].y() * z3_inv));
  172|    196|      std::reverse(affine.begin(), affine.end());
  173|    196|      return affine;
  174|    196|   }
  175|       |
  176|      0|   return affine;
  177|    196|}
pcurves_secp384r1.cpp:_ZZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_19secp384r15CurveELb0EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEEENKUlvE_clEv:
  149|    196|      auto s_inv = [&]() {
  150|       |         if constexpr(VariableTime) {
  151|       |            return c[N - 1].invert_vartime();
  152|    196|         } else {
  153|    196|            return invert_field_element<C>(c[N - 1]);
  154|    196|         }
  155|    196|      }();
pcurves_secp384r1.cpp:_ZN5Botan20invert_field_elementINS_6PCurve12_GLOBAL__N_19secp384r15CurveEEEDaRKNT_12FieldElementE:
   35|    196|inline constexpr auto invert_field_element(const typename C::FieldElement& fe) {
   36|    196|   if constexpr(curve_supports_fe_invert2<C>) {
   37|    196|      return C::fe_invert2(fe) * fe;
   38|       |   } else {
   39|       |      return fe.invert();
   40|       |   }
   41|    196|}
pcurves_secp384r1.cpp:_ZN5Botan15dbl_n_a_minus_3INS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS4_9secp384r16ParamsES5_E11FieldParamsEEEEES8_EEEET_RKSE_m:
  432|  16.8k|inline constexpr ProjectivePoint dbl_n_a_minus_3(const ProjectivePoint& pt, size_t n) {
  433|  16.8k|   auto nx = pt.x();
  434|  16.8k|   auto ny = pt.y().mul2();
  435|  16.8k|   auto nz = pt.z();
  436|  16.8k|   auto w = nz.square().square();
  437|       |
  438|       |   // Conditional ok: loop iteration count is public
  439|   101k|   while(n > 0) {
  ------------------
  |  Branch (439:10): [True: 84.2k, False: 16.8k]
  ------------------
  440|  84.2k|      const auto ny2 = ny.square();
  441|  84.2k|      const auto ny4 = ny2.square();
  442|  84.2k|      const auto t1 = (nx.square() - w).mul3();
  443|  84.2k|      const auto t2 = nx * ny2;
  444|  84.2k|      nx = t1.square() - t2.mul2();
  445|  84.2k|      nz *= ny;
  446|  84.2k|      ny = t1 * (t2 - nx).mul2() - ny4;
  447|  84.2k|      n--;
  448|       |      // Conditional ok: loop iteration count is public
  449|  84.2k|      if(n > 0) {
  ------------------
  |  Branch (449:10): [True: 67.4k, False: 16.8k]
  ------------------
  450|  67.4k|         w *= ny4;
  451|  67.4k|      }
  452|  84.2k|   }
  453|  16.8k|   return ProjectivePoint(nx, ny.div2(), nz);
  454|  16.8k|}
pcurves_secp384r1.cpp:_ZN5Botan18sqrt_field_elementINS_6PCurve12_GLOBAL__N_19secp384r15CurveEEENS_2CT6OptionINT_12FieldElementEEERKS8_:
   60|    198|inline constexpr CT::Option<typename C::FieldElement> sqrt_field_element(const typename C::FieldElement& fe) {
   61|    198|   if constexpr(curve_supports_fe_sqrt<C>) {
   62|    198|      auto z = C::fe_sqrt(fe);
   63|       |      // Zero out the return value if it would otherwise be incorrect
   64|    198|      const CT::Choice correct = (z.square() == fe);
   65|    198|      z.conditional_assign(!correct, C::FieldElement::zero());
   66|    198|      return CT::Option(z, correct);
   67|       |   } else {
   68|       |      return fe.sqrt();
   69|       |   }
   70|    198|}
pcurves_secp521r1.cpp:_ZN5Botan13dbl_a_minus_3INS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEES8_EEEET_RKSE_:
  362|  4.24k|inline constexpr ProjectivePoint dbl_a_minus_3(const ProjectivePoint& pt) {
  363|       |   /*
  364|       |   if a == -3 then
  365|       |   3*x^2 + a*z^4 == 3*x^2 - 3*z^4 == 3*(x^2-z^4) == 3*(x-z^2)*(x+z^2)
  366|       |   */
  367|  4.24k|   const auto z2 = pt.z().square();
  368|  4.24k|   const auto m = (pt.x() - z2).mul3() * (pt.x() + z2);
  369|       |
  370|       |   // Remaining cost: 3M + 3S + 3A + 2*2 + 1*4 + 1*8
  371|  4.24k|   const auto y2 = pt.y().square();
  372|  4.24k|   const auto s = pt.x().mul4() * y2;
  373|  4.24k|   const auto nx = m.square() - s.mul2();
  374|  4.24k|   const auto ny = m * (s - nx) - y2.square().mul8();
  375|  4.24k|   const auto nz = pt.y().mul2() * pt.z();
  376|       |
  377|  4.24k|   return ProjectivePoint(nx, ny, nz);
  378|  4.24k|}
pcurves_secp521r1.cpp:_ZN5Botan9point_addINS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEES8_EESC_EET_RKSE_SG_:
  187|  1.45k|inline constexpr ProjectivePoint point_add(const ProjectivePoint& a, const ProjectivePoint& b) {
  188|  1.45k|   const auto a_is_identity = a.is_identity();
  189|  1.45k|   const auto b_is_identity = b.is_identity();
  190|       |
  191|  1.45k|   const auto Z1Z1 = a.z().square();
  192|  1.45k|   const auto Z2Z2 = b.z().square();
  193|  1.45k|   const auto U1 = a.x() * Z2Z2;
  194|  1.45k|   const auto U2 = b.x() * Z1Z1;
  195|  1.45k|   const auto S1 = a.y() * b.z() * Z2Z2;
  196|  1.45k|   const auto S2 = b.y() * a.z() * Z1Z1;
  197|  1.45k|   const auto H = U2 - U1;
  198|  1.45k|   const auto r = S2 - S1;
  199|       |
  200|       |   /* Risky conditional
  201|       |   *
  202|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  203|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  204|       |   *
  205|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  206|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  207|       |   * in which case at the end we'll set z to a.z * b.z * H = 0, resulting in the correct
  208|       |   * output (the identity element)
  209|       |   */
  210|  1.45k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (210:7): [True: 0, False: 1.45k]
  ------------------
  211|      0|      return a.dbl();
  212|      0|   }
  213|       |
  214|  1.45k|   const auto HH = H.square();
  215|  1.45k|   const auto HHH = H * HH;
  216|  1.45k|   const auto V = U1 * HH;
  217|  1.45k|   const auto t2 = r.square();
  218|  1.45k|   const auto t3 = V + V;
  219|  1.45k|   const auto t4 = t2 - HHH;
  220|  1.45k|   auto X3 = t4 - t3;
  221|  1.45k|   const auto t5 = V - X3;
  222|  1.45k|   const auto t6 = S1 * HHH;
  223|  1.45k|   const auto t7 = r * t5;
  224|  1.45k|   auto Y3 = t7 - t6;
  225|  1.45k|   const auto t8 = b.z() * H;
  226|  1.45k|   auto Z3 = a.z() * t8;
  227|       |
  228|       |   // if a is identity then return b
  229|  1.45k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), b.y(), b.z());
  230|       |
  231|       |   // if b is identity then return a
  232|  1.45k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  233|       |
  234|  1.45k|   return ProjectivePoint(X3, Y3, Z3);
  235|  1.45k|}
pcurves_secp521r1.cpp:_ZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_19secp521r15CurveELb1EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEE:
  107|      1|auto to_affine_batch(std::span<const typename C::ProjectivePoint> projective) {
  108|      1|   using AffinePoint = typename C::AffinePoint;
  109|       |
  110|      1|   const size_t N = projective.size();
  111|      1|   std::vector<AffinePoint> affine;
  112|      1|   affine.reserve(N);
  113|       |
  114|      1|   CT::Choice any_identity = CT::Choice::no();
  115|       |
  116|  3.10k|   for(const auto& pt : projective) {
  ------------------
  |  Branch (116:23): [True: 3.10k, False: 1]
  ------------------
  117|  3.10k|      any_identity = any_identity || pt.is_identity();
  118|  3.10k|   }
  119|       |
  120|       |   // Conditional acceptable: N is public. State of points is not necessarily
  121|       |   // public, but we don't leak which point was the identity. In practice with
  122|       |   // the algorithms currently in use, the only time an identity can occur is
  123|       |   // during mul2 where the two points g/h have a small relation (ie h = g*k for
  124|       |   // some k < 16)
  125|       |
  126|      1|   if(N <= 2 || any_identity.as_bool()) {
  ------------------
  |  Branch (126:7): [True: 0, False: 1]
  |  Branch (126:17): [True: 0, False: 1]
  ------------------
  127|       |      // If there are identity elements, using the batch inversion gets
  128|       |      // tricky. It can be done, but this should be a rare situation so
  129|       |      // just punt to the serial conversion if it occurs
  130|      0|      for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (130:25): [True: 0, False: 0]
  ------------------
  131|      0|         affine.push_back(to_affine<C>(projective[i]));
  132|      0|      }
  133|      1|   } else {
  134|      1|      std::vector<typename C::FieldElement> c;
  135|      1|      c.reserve(N);
  136|       |
  137|       |      /*
  138|       |      Batch projective->affine using Montgomery's trick
  139|       |
  140|       |      See Algorithm 2.26 in "Guide to Elliptic Curve Cryptography"
  141|       |      (Hankerson, Menezes, Vanstone)
  142|       |      */
  143|       |
  144|      1|      c.push_back(projective[0].z());
  145|  3.10k|      for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (145:25): [True: 3.10k, False: 1]
  ------------------
  146|  3.10k|         c.push_back(c[i - 1] * projective[i].z());
  147|  3.10k|      }
  148|       |
  149|      1|      auto s_inv = [&]() {
  150|      1|         if constexpr(VariableTime) {
  151|      1|            return c[N - 1].invert_vartime();
  152|      1|         } else {
  153|      1|            return invert_field_element<C>(c[N - 1]);
  154|      1|         }
  155|      1|      }();
  156|       |
  157|  3.10k|      for(size_t i = N - 1; i > 0; --i) {
  ------------------
  |  Branch (157:29): [True: 3.10k, False: 1]
  ------------------
  158|  3.10k|         const auto& p = projective[i];
  159|       |
  160|  3.10k|         const auto z_inv = s_inv * c[i - 1];
  161|  3.10k|         const auto z2_inv = z_inv.square();
  162|  3.10k|         const auto z3_inv = z_inv * z2_inv;
  163|       |
  164|  3.10k|         s_inv = s_inv * p.z();
  165|       |
  166|  3.10k|         affine.push_back(AffinePoint(p.x() * z2_inv, p.y() * z3_inv));
  167|  3.10k|      }
  168|       |
  169|      1|      const auto z2_inv = s_inv.square();
  170|      1|      const auto z3_inv = s_inv * z2_inv;
  171|      1|      affine.push_back(AffinePoint(projective[0].x() * z2_inv, projective[0].y() * z3_inv));
  172|      1|      std::reverse(affine.begin(), affine.end());
  173|      1|      return affine;
  174|      1|   }
  175|       |
  176|      0|   return affine;
  177|      1|}
pcurves_secp521r1.cpp:_ZN5Botan9to_affineINS_6PCurve12_GLOBAL__N_19secp521r15CurveEEEDaRKNT_15ProjectivePointE:
   76|    445|inline constexpr auto to_affine(const typename C::ProjectivePoint& pt) {
   77|       |   // Not strictly required right? - default should work as long
   78|       |   // as (0,0) is identity and invert returns 0 on 0
   79|       |
   80|    445|   if constexpr(curve_supports_fe_invert2<C>) {
   81|    445|      const auto z2_inv = C::fe_invert2(pt.z());
   82|    445|      const auto z3_inv = z2_inv.square() * pt.z();
   83|    445|      return typename C::AffinePoint(pt.x() * z2_inv, pt.y() * z3_inv);
   84|       |   } else {
   85|       |      const auto z_inv = invert_field_element<C>(pt.z());
   86|       |      const auto z2_inv = z_inv.square();
   87|       |      const auto z3_inv = z_inv * z2_inv;
   88|       |      return typename C::AffinePoint(pt.x() * z2_inv, pt.y() * z3_inv);
   89|       |   }
   90|    445|}
pcurves_secp521r1.cpp:_ZZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_19secp521r15CurveELb1EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEEENKUlvE_clEv:
  149|      1|      auto s_inv = [&]() {
  150|      1|         if constexpr(VariableTime) {
  151|      1|            return c[N - 1].invert_vartime();
  152|       |         } else {
  153|       |            return invert_field_element<C>(c[N - 1]);
  154|       |         }
  155|      1|      }();
pcurves_secp521r1.cpp:_ZN5Botan22point_add_or_sub_mixedINS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEES8_EENS_16AffineCurvePointISC_EESC_EET_RKSG_RKT0_NS_2CT6ChoiceERKT1_:
  296|  80.0k|                                                        const FieldElement& one) {
  297|  80.0k|   const auto a_is_identity = a.is_identity();
  298|  80.0k|   const auto b_is_identity = b.is_identity();
  299|       |
  300|       |   /*
  301|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-1998-cmo-2
  302|       |
  303|       |   Cost: 8M + 3S + 6add + 1*2
  304|       |   */
  305|       |
  306|  80.0k|   auto by = b.y();
  307|  80.0k|   by.conditional_assign(sub, by.negate());
  308|       |
  309|  80.0k|   const auto Z1Z1 = a.z().square();
  310|  80.0k|   const auto U2 = b.x() * Z1Z1;
  311|  80.0k|   const auto S2 = by * a.z() * Z1Z1;
  312|  80.0k|   const auto H = U2 - a.x();
  313|  80.0k|   const auto r = S2 - a.y();
  314|       |
  315|       |   /* Risky conditional
  316|       |   *
  317|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  318|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  319|       |   *
  320|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  321|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  322|       |   * in which case at the end we'll set z to a.z * H = 0, resulting in the correct output
  323|       |   * (the identity element)
  324|       |   */
  325|  80.0k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (325:7): [True: 0, False: 80.0k]
  ------------------
  326|      0|      return a.dbl();
  327|      0|   }
  328|       |
  329|  80.0k|   const auto HH = H.square();
  330|  80.0k|   const auto HHH = H * HH;
  331|  80.0k|   const auto V = a.x() * HH;
  332|  80.0k|   const auto t2 = r.square();
  333|  80.0k|   const auto t3 = V + V;
  334|  80.0k|   const auto t4 = t2 - HHH;
  335|  80.0k|   auto X3 = t4 - t3;
  336|  80.0k|   const auto t5 = V - X3;
  337|  80.0k|   const auto t6 = a.y() * HHH;
  338|  80.0k|   const auto t7 = r * t5;
  339|  80.0k|   auto Y3 = t7 - t6;
  340|  80.0k|   auto Z3 = a.z() * H;
  341|       |
  342|       |   // if a is identity then return b
  343|  80.0k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), by, one);
  344|       |
  345|       |   // if b is identity then return a
  346|  80.0k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  347|       |
  348|  80.0k|   return ProjectivePoint(X3, Y3, Z3);
  349|  80.0k|}
pcurves_secp521r1.cpp:_ZN5Botan11to_affine_xINS_6PCurve12_GLOBAL__N_19secp521r15CurveEEEDaRKNT_15ProjectivePointE:
   96|    325|auto to_affine_x(const typename C::ProjectivePoint& pt) {
   97|    325|   if constexpr(curve_supports_fe_invert2<C>) {
   98|    325|      return pt.x() * C::fe_invert2(pt.z());
   99|       |   } else {
  100|       |      const auto z_inv = invert_field_element<C>(pt.z());
  101|       |      const auto z2_inv = z_inv.square();
  102|       |      return pt.x() * z2_inv;
  103|       |   }
  104|    325|}
pcurves_secp521r1.cpp:_ZN5Botan15point_add_mixedINS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEES8_EENS_16AffineCurvePointISC_EESC_EET_RKSG_RKT0_RKT1_:
  240|  2.27k|                                                 const FieldElement& one) {
  241|  2.27k|   const auto a_is_identity = a.is_identity();
  242|  2.27k|   const auto b_is_identity = b.is_identity();
  243|       |
  244|       |   /*
  245|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-1998-cmo-2
  246|       |
  247|       |   Cost: 8M + 3S + 6add + 1*2
  248|       |   */
  249|       |
  250|  2.27k|   const auto Z1Z1 = a.z().square();
  251|  2.27k|   const auto U2 = b.x() * Z1Z1;
  252|  2.27k|   const auto S2 = b.y() * a.z() * Z1Z1;
  253|  2.27k|   const auto H = U2 - a.x();
  254|  2.27k|   const auto r = S2 - a.y();
  255|       |
  256|       |   /* Risky conditional
  257|       |   *
  258|       |   * This implementation uses projective coordinates, which do not have an efficient complete
  259|       |   * addition formula. We rely on the design of the multiplication algorithms to avoid doublings.
  260|       |   *
  261|       |   * This conditional only comes into play for the actual doubling case, not x + (-x) which
  262|       |   * is another exceptional case in some circumstances. Here if a == -b then H == 0 && r != 0,
  263|       |   * in which case at the end we'll set z to a.z * H = 0, resulting in the correct output
  264|       |   * (the identity element)
  265|       |   */
  266|  2.27k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (266:7): [True: 0, False: 2.27k]
  ------------------
  267|      0|      return a.dbl();
  268|      0|   }
  269|       |
  270|  2.27k|   const auto HH = H.square();
  271|  2.27k|   const auto HHH = H * HH;
  272|  2.27k|   const auto V = a.x() * HH;
  273|  2.27k|   const auto t2 = r.square();
  274|  2.27k|   const auto t3 = V + V;
  275|  2.27k|   const auto t4 = t2 - HHH;
  276|  2.27k|   auto X3 = t4 - t3;
  277|  2.27k|   const auto t5 = V - X3;
  278|  2.27k|   const auto t6 = a.y() * HHH;
  279|  2.27k|   const auto t7 = r * t5;
  280|  2.27k|   auto Y3 = t7 - t6;
  281|  2.27k|   auto Z3 = a.z() * H;
  282|       |
  283|       |   // if a is identity then return b
  284|  2.27k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), b.y(), one);
  285|       |
  286|       |   // if b is identity then return a
  287|  2.27k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  288|       |
  289|  2.27k|   return ProjectivePoint(X3, Y3, Z3);
  290|  2.27k|}
pcurves_secp521r1.cpp:_ZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_19secp521r15CurveELb0EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEE:
  107|    325|auto to_affine_batch(std::span<const typename C::ProjectivePoint> projective) {
  108|    325|   using AffinePoint = typename C::AffinePoint;
  109|       |
  110|    325|   const size_t N = projective.size();
  111|    325|   std::vector<AffinePoint> affine;
  112|    325|   affine.reserve(N);
  113|       |
  114|    325|   CT::Choice any_identity = CT::Choice::no();
  115|       |
  116|  5.20k|   for(const auto& pt : projective) {
  ------------------
  |  Branch (116:23): [True: 5.20k, False: 325]
  ------------------
  117|  5.20k|      any_identity = any_identity || pt.is_identity();
  118|  5.20k|   }
  119|       |
  120|       |   // Conditional acceptable: N is public. State of points is not necessarily
  121|       |   // public, but we don't leak which point was the identity. In practice with
  122|       |   // the algorithms currently in use, the only time an identity can occur is
  123|       |   // during mul2 where the two points g/h have a small relation (ie h = g*k for
  124|       |   // some k < 16)
  125|       |
  126|    325|   if(N <= 2 || any_identity.as_bool()) {
  ------------------
  |  Branch (126:7): [True: 0, False: 325]
  |  Branch (126:17): [True: 0, False: 325]
  ------------------
  127|       |      // If there are identity elements, using the batch inversion gets
  128|       |      // tricky. It can be done, but this should be a rare situation so
  129|       |      // just punt to the serial conversion if it occurs
  130|      0|      for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (130:25): [True: 0, False: 0]
  ------------------
  131|      0|         affine.push_back(to_affine<C>(projective[i]));
  132|      0|      }
  133|    325|   } else {
  134|    325|      std::vector<typename C::FieldElement> c;
  135|    325|      c.reserve(N);
  136|       |
  137|       |      /*
  138|       |      Batch projective->affine using Montgomery's trick
  139|       |
  140|       |      See Algorithm 2.26 in "Guide to Elliptic Curve Cryptography"
  141|       |      (Hankerson, Menezes, Vanstone)
  142|       |      */
  143|       |
  144|    325|      c.push_back(projective[0].z());
  145|  5.20k|      for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (145:25): [True: 4.87k, False: 325]
  ------------------
  146|  4.87k|         c.push_back(c[i - 1] * projective[i].z());
  147|  4.87k|      }
  148|       |
  149|    325|      auto s_inv = [&]() {
  150|    325|         if constexpr(VariableTime) {
  151|    325|            return c[N - 1].invert_vartime();
  152|    325|         } else {
  153|    325|            return invert_field_element<C>(c[N - 1]);
  154|    325|         }
  155|    325|      }();
  156|       |
  157|  5.20k|      for(size_t i = N - 1; i > 0; --i) {
  ------------------
  |  Branch (157:29): [True: 4.87k, False: 325]
  ------------------
  158|  4.87k|         const auto& p = projective[i];
  159|       |
  160|  4.87k|         const auto z_inv = s_inv * c[i - 1];
  161|  4.87k|         const auto z2_inv = z_inv.square();
  162|  4.87k|         const auto z3_inv = z_inv * z2_inv;
  163|       |
  164|  4.87k|         s_inv = s_inv * p.z();
  165|       |
  166|  4.87k|         affine.push_back(AffinePoint(p.x() * z2_inv, p.y() * z3_inv));
  167|  4.87k|      }
  168|       |
  169|    325|      const auto z2_inv = s_inv.square();
  170|    325|      const auto z3_inv = s_inv * z2_inv;
  171|    325|      affine.push_back(AffinePoint(projective[0].x() * z2_inv, projective[0].y() * z3_inv));
  172|    325|      std::reverse(affine.begin(), affine.end());
  173|    325|      return affine;
  174|    325|   }
  175|       |
  176|      0|   return affine;
  177|    325|}
pcurves_secp521r1.cpp:_ZZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_19secp521r15CurveELb0EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEEENKUlvE_clEv:
  149|    325|      auto s_inv = [&]() {
  150|       |         if constexpr(VariableTime) {
  151|       |            return c[N - 1].invert_vartime();
  152|    325|         } else {
  153|    325|            return invert_field_element<C>(c[N - 1]);
  154|    325|         }
  155|    325|      }();
pcurves_secp521r1.cpp:_ZN5Botan20invert_field_elementINS_6PCurve12_GLOBAL__N_19secp521r15CurveEEEDaRKNT_12FieldElementE:
   35|    325|inline constexpr auto invert_field_element(const typename C::FieldElement& fe) {
   36|    325|   if constexpr(curve_supports_fe_invert2<C>) {
   37|    325|      return C::fe_invert2(fe) * fe;
   38|       |   } else {
   39|       |      return fe.invert();
   40|       |   }
   41|    325|}
pcurves_secp521r1.cpp:_ZN5Botan15dbl_n_a_minus_3INS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEES8_EEEET_RKSE_m:
  432|  37.3k|inline constexpr ProjectivePoint dbl_n_a_minus_3(const ProjectivePoint& pt, size_t n) {
  433|  37.3k|   auto nx = pt.x();
  434|  37.3k|   auto ny = pt.y().mul2();
  435|  37.3k|   auto nz = pt.z();
  436|  37.3k|   auto w = nz.square().square();
  437|       |
  438|       |   // Conditional ok: loop iteration count is public
  439|   224k|   while(n > 0) {
  ------------------
  |  Branch (439:10): [True: 186k, False: 37.3k]
  ------------------
  440|   186k|      const auto ny2 = ny.square();
  441|   186k|      const auto ny4 = ny2.square();
  442|   186k|      const auto t1 = (nx.square() - w).mul3();
  443|   186k|      const auto t2 = nx * ny2;
  444|   186k|      nx = t1.square() - t2.mul2();
  445|   186k|      nz *= ny;
  446|   186k|      ny = t1 * (t2 - nx).mul2() - ny4;
  447|   186k|      n--;
  448|       |      // Conditional ok: loop iteration count is public
  449|   186k|      if(n > 0) {
  ------------------
  |  Branch (449:10): [True: 149k, False: 37.3k]
  ------------------
  450|   149k|         w *= ny4;
  451|   149k|      }
  452|   186k|   }
  453|  37.3k|   return ProjectivePoint(nx, ny.div2(), nz);
  454|  37.3k|}
pcurves_secp521r1.cpp:_ZN5Botan18sqrt_field_elementINS_6PCurve12_GLOBAL__N_19secp521r15CurveEEENS_2CT6OptionINT_12FieldElementEEERKS8_:
   60|    335|inline constexpr CT::Option<typename C::FieldElement> sqrt_field_element(const typename C::FieldElement& fe) {
   61|    335|   if constexpr(curve_supports_fe_sqrt<C>) {
   62|    335|      auto z = C::fe_sqrt(fe);
   63|       |      // Zero out the return value if it would otherwise be incorrect
   64|    335|      const CT::Choice correct = (z.square() == fe);
   65|    335|      z.conditional_assign(!correct, C::FieldElement::zero());
   66|    335|      return CT::Option(z, correct);
   67|       |   } else {
   68|       |      return fe.sqrt();
   69|       |   }
   70|    335|}

pcurves_brainpool256r1.cpp:_ZN5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm6EEC2ERKNS_16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
 1405|      1|            m_table(basemul_booth_setup<C, WindowBits>(p, BlindedScalar::Bits + 1)) {}
pcurves_brainpool256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E11from_affineERKNS_16AffineCurvePointISB_EE:
 1016|  1.52k|      static constexpr Self from_affine(const AffinePoint& pt) {
 1017|       |         /*
 1018|       |         * If the point is the identity element (x=0, y=0) then instead of
 1019|       |         * creating (x, y, 1) = (0, 0, 1) we want our projective identity
 1020|       |         * encoding of (0, 1, 0)
 1021|       |         *
 1022|       |         * Which we can achieve by a conditional swap of y and z if the
 1023|       |         * affine point is the identity.
 1024|       |         */
 1025|       |
 1026|  1.52k|         auto x = pt.x();
 1027|  1.52k|         auto y = pt.y();
 1028|  1.52k|         auto z = FieldElement::one();
 1029|       |
 1030|  1.52k|         FieldElement::conditional_swap(pt.is_identity(), y, z);
 1031|       |
 1032|  1.52k|         return ProjectiveCurvePoint(x, y, z);
 1033|  1.52k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEEE1xEv:
  971|  1.66M|      constexpr const FieldElement& x() const { return m_x; }
pcurves_brainpool256r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEEE1yEv:
  976|  1.60M|      constexpr const FieldElement& y() const { return m_y; }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE3oneEv:
  200|  63.6k|      static constexpr Self one() { return Self(Rep::one()); }
pcurves_brainpool256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES0_E11FieldParamsEE3oneEv:
   99|  63.6k|      constexpr static std::array<W, N> one() { return R1; }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEEC2ENSt3__15arrayImLm4EEE:
  898|  3.31M|      explicit constexpr IntMod(std::array<W, N> v) : m_val(v) {}
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE16conditional_swapENS_2CT6ChoiceERSA_SD_:
  410|  1.52k|      static constexpr void conditional_swap(CT::Choice cond, Self& x, Self& y) {
  411|  1.52k|         const W mask = cond.into_bitmask<W>();
  412|       |
  413|  7.60k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (413:28): [True: 6.08k, False: 1.52k]
  ------------------
  414|  6.08k|            auto nx = Botan::choose(mask, y.m_val[i], x.m_val[i]);
  415|  6.08k|            auto ny = Botan::choose(mask, x.m_val[i], y.m_val[i]);
  416|  6.08k|            x.m_val[i] = nx;
  417|  6.08k|            y.m_val[i] = ny;
  418|  6.08k|         }
  419|  1.52k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEEE11is_identityEv:
  928|  66.6k|      constexpr CT::Choice is_identity() const { return x().is_zero() && y().is_zero(); }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE7is_zeroEv:
  225|   328k|      constexpr CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_val.size()).as_choice(); }
pcurves_brainpool256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_EC2ERKSB_SE_SE_:
 1056|  91.8k|            m_x(x), m_y(y), m_z(z) {}
pcurves_brainpool256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E3dblEv:
 1121|  4.13k|      constexpr Self dbl() const {
 1122|       |         if constexpr(Self::A_is_minus_3) {
 1123|       |            return dbl_a_minus_3(*this);
 1124|       |         } else if constexpr(Self::A_is_zero) {
 1125|       |            return dbl_a_zero(*this);
 1126|  4.13k|         } else {
 1127|  4.13k|            return dbl_generic(*this, A);
 1128|  4.13k|         }
 1129|  4.13k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E1zEv:
 1172|   366k|      constexpr const FieldElement& z() const { return m_z; }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE6squareEv:
  426|   755k|      constexpr BOTAN_FORCE_INLINE Self square() const {
  427|   755k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  428|   755k|         comba_sqr<N>(z.data(), this->data());
  429|   755k|         return Self(Rep::redc(z));
  430|   755k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE4dataEv:
  896|  3.67M|      constexpr const W* data() const { return m_val.data(); }
pcurves_brainpool256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES0_E11FieldParamsEE4redcERKNSt3__15arrayImLm8EEE:
  104|  2.44M|      constexpr static std::array<W, N> redc(const std::array<W, 2 * N>& z) {
  105|       |         if constexpr(P_dash == 1) {
  106|       |            return monty_redc_pdash1(z, P);
  107|  2.44M|         } else {
  108|  2.44M|            return monty_redc(z, P, P_dash);
  109|  2.44M|         }
  110|  2.44M|      }
pcurves_brainpool256r1.cpp:_ZN5BotanplERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEEESC_:
  265|   307k|      friend constexpr BOTAN_FORCE_INLINE Self operator+(const Self& a, const Self& b) {
  266|   307k|         std::array<W, N> t;  // NOLINT(*-member-init)
  267|       |
  268|   307k|         W carry = 0;
  269|  1.53M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (269:28): [True: 1.23M, False: 307k]
  ------------------
  270|  1.23M|            t[i] = word_add(a.m_val[i], b.m_val[i], &carry);
  271|  1.23M|         }
  272|       |
  273|   307k|         std::array<W, N> r;  // NOLINT(*-member-init)
  274|   307k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  275|   307k|         return Self(r);
  276|   307k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E1xEv:
 1162|   226k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE4mul3Ev:
  335|   121k|      constexpr inline Self mul3() const { return mul2() + (*this); }
pcurves_brainpool256r1.cpp:_ZN5BotanmlERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEEESC_:
  346|   832k|      friend constexpr BOTAN_FORCE_INLINE Self operator*(const Self& a, const Self& b) {
  347|   832k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  348|   832k|         comba_mul<N>(z.data(), a.data(), b.data());
  349|   832k|         return Self(Rep::redc(z));
  350|   832k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E1yEv:
 1167|   225k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE4mul4Ev:
  338|  4.13k|      constexpr inline Self mul4() const { return mul2().mul2(); }
pcurves_brainpool256r1.cpp:_ZN5BotanmiERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEEESC_:
  281|   728k|      friend constexpr BOTAN_FORCE_INLINE Self operator-(const Self& a, const Self& b) {
  282|   728k|         std::array<W, N> r;  // NOLINT(*-member-init)
  283|   728k|         W carry = 0;
  284|  3.64M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (284:28): [True: 2.91M, False: 728k]
  ------------------
  285|  2.91M|            r[i] = word_sub(a.m_val[i], b.m_val[i], &carry);
  286|  2.91M|         }
  287|       |
  288|   728k|         const auto mask = CT::Mask<W>::expand(carry).value();
  289|       |
  290|   728k|         carry = 0;
  291|       |
  292|  3.64M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (292:28): [True: 2.91M, False: 728k]
  ------------------
  293|  2.91M|            r[i] = word_add(r[i], P[i] & mask, &carry);
  294|  2.91M|         }
  295|       |
  296|   728k|         return Self(r);
  297|   728k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE4mul2Ev:
  325|   409k|      constexpr BOTAN_FORCE_INLINE Self mul2() const {
  326|   409k|         std::array<W, N> t = value();
  327|   409k|         const W carry = shift_left<1>(t);
  328|       |
  329|   409k|         std::array<W, N> r;  // NOLINT(*-member-init)
  330|   409k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  331|   409k|         return Self(r);
  332|   409k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE5valueEv:
  894|   433k|      constexpr const std::array<W, N>& value() const { return m_val; }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE4mul8Ev:
  341|  4.13k|      constexpr inline Self mul8() const { return mul2().mul2().mul2(); }
pcurves_brainpool256r1.cpp:_ZN5BotanplERKNS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_EESE_:
 1064|    735|      friend constexpr Self operator+(const Self& a, const Self& b) { return Self::add(a, b); }
pcurves_brainpool256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E3addERKSC_SE_:
 1103|    735|      constexpr static Self add(const Self& a, const Self& b) { return point_add<Self, FieldElement>(a, b); }
pcurves_brainpool256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E11is_identityEv:
 1082|  69.8k|      constexpr CT::Choice is_identity() const { return z().is_zero(); }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE18conditional_assignERSA_SB_SB_NS_2CT6ChoiceERKSA_SF_SF_:
  395|   122k|         Self& x, Self& y, Self& z, CT::Choice cond, const Self& nx, const Self& ny, const Self& nz) {
  396|   122k|         const W mask = cond.into_bitmask<W>();
  397|       |
  398|   610k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (398:28): [True: 488k, False: 122k]
  ------------------
  399|   488k|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  400|   488k|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  401|   488k|            z.m_val[i] = Botan::choose(mask, nz.m_val[i], z.m_val[i]);
  402|   488k|         }
  403|   122k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE6invertEv:
  538|  1.52k|      constexpr Self invert() const { return pow_vartime(Self::P_MINUS_2); }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE11pow_vartimeERKNSt3__15arrayImLm4EEE:
  477|  1.99k|      constexpr Self pow_vartime(const std::array<W, N>& exp) const {
  478|  1.99k|         constexpr size_t WindowBits = (Self::BITS <= 256) ? 4 : 5;
  ------------------
  |  Branch (478:40): [True: 0, Folded]
  ------------------
  479|  1.99k|         constexpr size_t WindowElements = (1 << WindowBits) - 1;
  480|       |
  481|  1.99k|         constexpr size_t Windows = (Self::BITS + WindowBits - 1) / WindowBits;
  482|       |
  483|       |         /*
  484|       |         A simple fixed width window modular multiplication.
  485|       |
  486|       |         TODO: investigate using sliding window here
  487|       |         */
  488|       |
  489|  1.99k|         std::array<Self, WindowElements> tbl;
  490|       |
  491|  1.99k|         tbl[0] = (*this);
  492|       |
  493|  29.9k|         for(size_t i = 1; i != WindowElements; ++i) {
  ------------------
  |  Branch (493:28): [True: 27.9k, False: 1.99k]
  ------------------
  494|       |            // Conditional ok: table indexes are public here
  495|  27.9k|            if(i % 2 == 1) {
  ------------------
  |  Branch (495:16): [True: 13.9k, False: 13.9k]
  ------------------
  496|  13.9k|               tbl[i] = tbl[i / 2].square();
  497|  13.9k|            } else {
  498|  13.9k|               tbl[i] = tbl[i - 1] * tbl[0];
  499|  13.9k|            }
  500|  27.9k|         }
  501|       |
  502|  1.99k|         auto r = Self::one();
  503|       |
  504|  1.99k|         const size_t w0 = read_window_bits<WindowBits>(std::span{exp}, (Windows - 1) * WindowBits);
  505|       |
  506|       |         // Conditional ok: this function is variable time
  507|  1.99k|         if(w0 > 0) {
  ------------------
  |  Branch (507:13): [True: 1.99k, False: 0]
  ------------------
  508|  1.99k|            r = tbl[w0 - 1];
  509|  1.99k|         }
  510|       |
  511|   127k|         for(size_t i = 1; i != Windows; ++i) {
  ------------------
  |  Branch (511:28): [True: 125k, False: 1.99k]
  ------------------
  512|   125k|            r.square_n(WindowBits);
  513|       |
  514|   125k|            const size_t w = read_window_bits<WindowBits>(std::span{exp}, (Windows - i - 1) * WindowBits);
  515|       |
  516|       |            // Conditional ok: this function is variable time
  517|   125k|            if(w > 0) {
  ------------------
  |  Branch (517:16): [True: 116k, False: 8.94k]
  ------------------
  518|   116k|               r *= tbl[w - 1];
  519|   116k|            }
  520|   125k|         }
  521|       |
  522|  1.99k|         return r;
  523|  1.99k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEEC2Ev:
  180|  29.9k|      constexpr IntMod() : m_val({}) {}
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE8square_nEm:
  439|   125k|      constexpr void square_n(size_t n) {
  440|   125k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  441|   629k|         for(size_t i = 0; i != n; ++i) {
  ------------------
  |  Branch (441:28): [True: 503k, False: 125k]
  ------------------
  442|   503k|            comba_sqr<N>(z.data(), this->data());
  443|   503k|            m_val = Rep::redc(z);
  444|   503k|         }
  445|   125k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEEmLERKSA_:
  355|   342k|      constexpr BOTAN_FORCE_INLINE Self& operator*=(const Self& other) {
  356|   342k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  357|   342k|         comba_mul<N>(z.data(), data(), other.data());
  358|   342k|         m_val = Rep::redc(z);
  359|   342k|         return (*this);
  360|   342k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE14invert_vartimeEv:
  598|      1|      constexpr Self invert_vartime() const {
  599|       |         // Conditional ok: this function is variable time
  600|      1|         if(this->is_zero().as_bool()) {
  ------------------
  |  Branch (600:13): [True: 0, False: 1]
  ------------------
  601|      0|            return Self::zero();
  602|      0|         }
  603|       |
  604|      1|         auto x = Self(std::array<W, N>{1});  // 1 in standard domain
  605|      1|         auto b = Self(this->to_words());     // *this in standard domain
  606|       |
  607|       |         // First loop iteration
  608|      1|         Self::_invert_vartime_div2_helper(b, x);
  609|       |
  610|      1|         auto a = b.negate();
  611|       |         // y += x but y is zero at the outset
  612|      1|         auto y = x;
  613|       |
  614|       |         // First half of second loop iteration
  615|      1|         Self::_invert_vartime_div2_helper(a, y);
  616|       |
  617|    177|         for(;;) {
  618|       |            // Conditional ok: this function is variable time
  619|    177|            if(a.m_val == b.m_val) {
  ------------------
  |  Branch (619:16): [True: 1, False: 176]
  ------------------
  620|       |               // At this point it should be that a == b == 1
  621|      1|               auto r = y.negate();
  622|       |
  623|       |               // Convert back to Montgomery if required
  624|      1|               r.m_val = Rep::to_rep(r.m_val);
  625|      1|               return r;
  626|      1|            }
  627|       |
  628|    176|            auto nx = x + y;
  629|       |
  630|       |            /*
  631|       |            * Otherwise either b > a or a > b
  632|       |            *
  633|       |            * If b > a we want to set b to b - a
  634|       |            * Otherwise we want to set a to a - b
  635|       |            *
  636|       |            * Compute r = b - a and check if it underflowed
  637|       |            * If it did not then we are in the b > a path
  638|       |            */
  639|    176|            std::array<W, N> r;  // NOLINT(*-member-init)
  640|    176|            const word carry = bigint_sub3(r.data(), b.data(), N, a.data(), N);
  641|       |
  642|       |            // Conditional ok: this function is variable time
  643|    176|            if(carry == 0) {
  ------------------
  |  Branch (643:16): [True: 94, False: 82]
  ------------------
  644|       |               // b > a
  645|     94|               b.m_val = r;
  646|     94|               x = nx;
  647|     94|               Self::_invert_vartime_div2_helper(b, x);
  648|     94|            } else {
  649|       |               // We know this can't underflow because a > b
  650|     82|               bigint_sub3(r.data(), a.data(), N, b.data(), N);
  651|     82|               a.m_val = r;
  652|     82|               y = nx;
  653|     82|               Self::_invert_vartime_div2_helper(a, y);
  654|     82|            }
  655|    176|         }
  656|      1|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE4zeroEv:
  195|   117k|      static constexpr Self zero() { return Self(std::array<W, N>{0}); }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE8to_wordsEv:
  734|      1|      constexpr std::array<W, Self::N> to_words() const { return Rep::from_rep(m_val); }
pcurves_brainpool256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES0_E11FieldParamsEE8from_repERKNSt3__15arrayImLm4EEE:
  137|  5.51k|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|  5.51k|         std::array<W, 2 * N> ze = {};
  139|  5.51k|         copy_mem(std::span{ze}.template first<N>(), z);
  140|  5.51k|         return Self::redc(ze);
  141|  5.51k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE27_invert_vartime_div2_helperERSA_SB_:
  547|    178|      static constexpr void _invert_vartime_div2_helper(Self& a, Self& x) {
  548|    178|         constexpr auto INV_2 = p_div_2_plus_1(Rep::P);
  549|       |
  550|       |         // Conditional ok: this function is variable time
  551|    553|         while((a.m_val[0] & 1) != 1) {
  ------------------
  |  Branch (551:16): [True: 375, False: 178]
  ------------------
  552|    375|            shift_right<1>(a.m_val);
  553|       |
  554|    375|            const W borrow = shift_right<1>(x.m_val);
  555|       |
  556|       |            // Conditional ok: this function is variable time
  557|    375|            if(borrow) {
  ------------------
  |  Branch (557:16): [True: 193, False: 182]
  ------------------
  558|    193|               bigint_add2(x.m_val.data(), N, INV_2.data(), N);
  559|    193|            }
  560|    375|         }
  561|    178|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE6negateEv:
  452|  58.3k|      constexpr Self negate() const {
  453|  58.3k|         const W x_is_zero = ~CT::all_zeros(this->data(), N).value();
  454|       |
  455|  58.3k|         std::array<W, N> r;  // NOLINT(*-member-init)
  456|  58.3k|         W carry = 0;
  457|   291k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (457:28): [True: 233k, False: 58.3k]
  ------------------
  458|   233k|            r[i] = word_sub(P[i] & x_is_zero, m_val[i], &carry);
  459|   233k|         }
  460|       |
  461|  58.3k|         return Self(r);
  462|  58.3k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES0_E11FieldParamsEE6to_repERKNSt3__15arrayImLm4EEE:
  115|  5.87k|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|  5.87k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|  5.87k|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|  5.87k|         return Self::redc(z);
  119|  5.87k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEEEC2ERKSB_SE_:
  917|  72.7k|      constexpr AffineCurvePoint(const FieldElement& x, const FieldElement& y) : m_x(x), m_y(y) {}
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|  5.12k|      std::array<W, L> stash_value() const {
  760|  5.12k|         static_assert(L >= N);
  761|  5.12k|         std::array<W, L> stash = {};
  762|  25.6k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 20.4k, False: 5.12k]
  ------------------
  763|  20.4k|            stash[i] = m_val[i];
  764|  20.4k|         }
  765|  5.12k|         return stash;
  766|  5.12k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm6EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1407|    694|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1408|    694|         const BlindedScalar scalar(s, rng);
 1409|    694|         return basemul_booth_exec<C, WindowBits>(m_table, scalar, rng);
 1410|    694|      }
pcurves_brainpool256r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm7EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    694|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    694|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 694, Folded]
  |  Branch (1308:33): [True: 694, False: 0]
  ------------------
 1309|    694|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|    694|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|    694|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|    694|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|    694|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|    694|            W mask[n_words] = {0};
 1318|    694|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|    694|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|    694|            if constexpr(ExcessBits > 0) {
 1323|    694|               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|    694|               mask[MaskWords - 1] &= ExcessMask;
 1325|    694|            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|    694|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|    694|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|    694|            mask[0] |= 1;
 1331|       |
 1332|    694|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|    694|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|    694|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|    694|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|    694|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|    694|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|    694|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    694|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|      0|            m_bytes.resize(C::Scalar::BYTES);
 1346|      0|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|      0|            m_bits = C::Scalar::BITS;
 1348|      0|         }
 1349|       |
 1350|    694|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    694|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E12ScalarParamsEEEE8to_wordsEv:
  734|  1.10k|      constexpr std::array<W, Self::N> to_words() const { return Rep::from_rep(m_val); }
pcurves_brainpool256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES0_E12ScalarParamsEE8from_repERKNSt3__15arrayImLm4EEE:
  137|  1.80k|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|  1.80k|         std::array<W, 2 * N> ze = {};
  139|  1.80k|         copy_mem(std::span{ze}.template first<N>(), z);
  140|  1.80k|         return Self::redc(ze);
  141|  1.80k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES0_E12ScalarParamsEE4redcERKNSt3__15arrayImLm8EEE:
  104|  2.49k|      constexpr static std::array<W, N> redc(const std::array<W, 2 * N>& z) {
  105|       |         if constexpr(P_dash == 1) {
  106|       |            return monty_redc_pdash1(z, P);
  107|  2.49k|         } else {
  108|  2.49k|            return monty_redc(z, P, P_dash);
  109|  2.49k|         }
  110|  2.49k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E12ScalarParamsEEEE12serialize_toENSt3__14spanIhLm32EEE:
  739|    694|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    694|         auto v = Rep::from_rep(m_val);
  741|    694|         std::reverse(v.begin(), v.end());
  742|       |
  743|    694|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|    694|            store_be(bytes, v);
  745|       |         } else {
  746|       |            // Remove leading zero bytes
  747|       |            const auto padded_bytes = store_be(v);
  748|       |            constexpr size_t extra = N * WordInfo<W>::bytes - Self::BYTES;
  749|       |            copy_mem(bytes, std::span{padded_bytes}.template subspan<extra, Self::BYTES>());
  750|       |         }
  751|    694|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm7EE4bitsEv:
 1305|    694|      size_t bits() const { return m_bits; }
pcurves_brainpool256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E18conditional_assignENS_2CT6ChoiceERKSC_:
 1084|  1.10k|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
 1085|  1.10k|         FieldElement::conditional_assign(m_x, m_y, m_z, cond, pt.x(), pt.y(), pt.z());
 1086|  1.10k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E6negateEv:
 1134|  1.10k|      constexpr Self negate() const { return Self(x(), y().negate(), z()); }
pcurves_brainpool256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E18_const_time_poisonEv:
 1174|  1.10k|      constexpr void _const_time_poison() const { CT::poison_all(m_x, m_y, m_z); }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE18_const_time_poisonEv:
  889|  3.32k|      constexpr void _const_time_poison() const { CT::poison(m_val); }
pcurves_brainpool256r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm7EE10get_windowEm:
 1353|  34.0k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  34.0k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  34.0k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E10add_or_subERKSC_RKNS_16AffineCurvePointISB_EENS_2CT6ChoiceE:
 1096|  56.8k|      constexpr static Self add_or_sub(const Self& a, const AffinePoint& b, CT::Choice sub) {
 1097|  56.8k|         return point_add_or_sub_mixed<Self, AffinePoint, FieldElement>(a, b, sub, FieldElement::one());
 1098|  56.8k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE18conditional_assignENS_2CT6ChoiceERKSA_:
  367|  57.7k|      constexpr void conditional_assign(CT::Choice cond, const Self& nx) {
  368|  57.7k|         const W mask = cond.into_bitmask<W>();
  369|       |
  370|   288k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (370:28): [True: 230k, False: 57.7k]
  ------------------
  371|   230k|            m_val[i] = Botan::choose(mask, nx.m_val[i], m_val[i]);
  372|   230k|         }
  373|  57.7k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEEE9ct_selectENSt3__14spanIKSC_Lm18446744073709551615EEEm:
  955|  34.0k|      static constexpr auto ct_select(std::span<const Self> pts, size_t idx) {
  956|  34.0k|         auto result = Self::identity(pts[0]);
  957|       |
  958|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
  959|  34.0k|         const size_t idx1 = static_cast<size_t>(idx - 1);
  960|  1.12M|         for(size_t i = 0; i != pts.size(); ++i) {
  ------------------
  |  Branch (960:28): [True: 1.08M, False: 34.0k]
  ------------------
  961|  1.08M|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
  962|  1.08M|            result.conditional_assign(found, pts[i]);
  963|  1.08M|         }
  964|       |
  965|  34.0k|         return result;
  966|  34.0k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEEE8identityERKSC_:
  924|  57.9k|      static constexpr Self identity(const Self& /*unused*/) {
  925|  57.9k|         return Self(FieldElement::zero(), FieldElement::zero());
  926|  57.9k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEEE18conditional_assignENS_2CT6ChoiceERKSC_:
  981|  1.47M|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
  982|  1.47M|         FieldElement::conditional_assign(m_x, m_y, cond, pt.x(), pt.y());
  983|  1.47M|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE18conditional_assignERSA_SB_NS_2CT6ChoiceERKSA_SF_:
  380|  1.47M|      static constexpr void conditional_assign(Self& x, Self& y, CT::Choice cond, const Self& nx, const Self& ny) {
  381|  1.47M|         const W mask = cond.into_bitmask<W>();
  382|       |
  383|  7.35M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (383:28): [True: 5.88M, False: 1.47M]
  ------------------
  384|  5.88M|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  385|  5.88M|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  386|  5.88M|         }
  387|  1.47M|      }
pcurves_brainpool256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E13randomize_repERNS_21RandomNumberGeneratorE:
 1142|  4.42k|      void randomize_rep(RandomNumberGenerator& rng) {
 1143|       |         // In certain contexts we may be called with a Null_RNG; in that case the
 1144|       |         // caller is accepting that randomization will not occur
 1145|       |
 1146|       |         // Conditional ok: caller's RNG state (seeded vs not) is presumed public
 1147|  4.42k|         if(rng.is_seeded()) {
  ------------------
  |  Branch (1147:13): [True: 4.42k, False: 0]
  ------------------
 1148|  4.42k|            auto r = FieldElement::random(rng);
 1149|       |
 1150|  4.42k|            auto r2 = r.square();
 1151|  4.42k|            auto r3 = r2 * r;
 1152|       |
 1153|  4.42k|            m_x *= r2;
 1154|  4.42k|            m_y *= r3;
 1155|  4.42k|            m_z *= r;
 1156|  4.42k|         }
 1157|  4.42k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE6randomERNS_21RandomNumberGeneratorE:
  851|  4.42k|      static Self random(RandomNumberGenerator& rng) {
  852|  4.42k|         constexpr size_t MAX_ATTEMPTS = 1000;
  853|       |
  854|  4.42k|         std::array<uint8_t, Self::BYTES> buf{};
  855|       |
  856|  6.72k|         for(size_t i = 0; i != MAX_ATTEMPTS; ++i) {
  ------------------
  |  Branch (856:28): [True: 6.72k, False: 0]
  ------------------
  857|  6.72k|            rng.randomize(buf);
  858|       |
  859|       |            // Zero off high bits that if set would certainly cause us
  860|       |            // to be out of range
  861|       |            if constexpr(Self::BITS % 8 != 0) {
  862|       |               constexpr uint8_t mask = 0xFF >> (8 - (Self::BITS % 8));
  863|       |               buf[0] &= mask;
  864|       |            }
  865|       |
  866|       |            // Conditionals ok: rejection sampling reveals only values we didn't use
  867|  6.72k|            if(auto s = Self::deserialize(buf)) {
  ------------------
  |  Branch (867:21): [True: 4.42k, False: 2.29k]
  ------------------
  868|  4.42k|               if(s.value().is_nonzero().as_bool()) {
  ------------------
  |  Branch (868:19): [True: 4.42k, False: 0]
  ------------------
  869|  4.42k|                  return s.value();
  870|  4.42k|               }
  871|  4.42k|            }
  872|  6.72k|         }
  873|       |
  874|      0|         throw Internal_Error("Failed to generate random Scalar within bounded number of attempts");
  875|  4.42k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|  8.17k|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|  8.17k|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 8.17k]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|  8.17k|         const auto words = bytes_to_words<W, N, BYTES>(bytes.first<Self::BYTES>());
  799|       |
  800|       |         // Conditional acceptable: std::optional is implicitly not constant time
  801|  8.17k|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 2.29k, False: 5.87k]
  ------------------
  802|  2.29k|            return {};
  803|  2.29k|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|  5.87k|         return Self::from_words(words);
  807|  8.17k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE10from_wordsILm4EEESA_NSt3__15arrayImXT_EEE:
  211|  5.87k|      static constexpr Self from_words(std::array<W, L> w) {
  212|  5.87k|         if constexpr(L == N) {
  213|  5.87k|            return Self(Rep::to_rep(w));
  214|       |         } else {
  215|       |            static_assert(L < N);
  216|       |            std::array<W, N> ew = {};
  217|       |            copy_mem(std::span{ew}.template first<L>(), w);
  218|       |            return Self(Rep::to_rep(ew));
  219|       |         }
  220|  5.87k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE10is_nonzeroEv:
  230|  4.42k|      constexpr CT::Choice is_nonzero() const { return !is_zero(); }
pcurves_brainpool256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E20_const_time_unpoisonEv:
 1176|  1.10k|      constexpr void _const_time_unpoison() const { CT::unpoison_all(m_x, m_y, m_z); }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE20_const_time_unpoisonEv:
  891|  3.32k|      constexpr void _const_time_unpoison() const { CT::unpoison(m_val); }
pcurves_brainpool256r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm7EED2Ev:
 1358|    694|      ~BlindedScalarBits() {
 1359|    694|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    694|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    694|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E12ScalarParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|  2.49k|      static Self from_stash(const std::array<W, L>& stash) {
  775|  2.49k|         static_assert(L >= N);
  776|  2.49k|         std::array<W, N> val = {};
  777|  12.4k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 9.98k, False: 2.49k]
  ------------------
  778|  9.98k|            val[i] = stash[i];
  779|  9.98k|         }
  780|  2.49k|         return Self(val);
  781|  2.49k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E12ScalarParamsEEEEC2ENSt3__15arrayImLm4EEE:
  898|  3.18k|      explicit constexpr IntMod(std::array<W, N> v) : m_val(v) {}
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE12serialize_toENSt3__14spanIhLm32EEE:
  739|  5.10k|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|  5.10k|         auto v = Rep::from_rep(m_val);
  741|  5.10k|         std::reverse(v.begin(), v.end());
  742|       |
  743|  5.10k|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|  5.10k|            store_be(bytes, v);
  745|       |         } else {
  746|       |            // Remove leading zero bytes
  747|       |            const auto padded_bytes = store_be(v);
  748|       |            constexpr size_t extra = N * WordInfo<W>::bytes - Self::BYTES;
  749|       |            copy_mem(bytes, std::span{padded_bytes}.template subspan<extra, Self::BYTES>());
  750|       |         }
  751|  5.10k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E12ScalarParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|    694|      std::array<W, L> stash_value() const {
  760|    694|         static_assert(L >= N);
  761|    694|         std::array<W, L> stash = {};
  762|  3.47k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 2.77k, False: 694]
  ------------------
  763|  2.77k|            stash[i] = m_val[i];
  764|  2.77k|         }
  765|    694|         return stash;
  766|    694|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|  12.2k|      static Self from_stash(const std::array<W, L>& stash) {
  775|  12.2k|         static_assert(L >= N);
  776|  12.2k|         std::array<W, N> val = {};
  777|  61.4k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 49.1k, False: 12.2k]
  ------------------
  778|  49.1k|            val[i] = stash[i];
  779|  49.1k|         }
  780|  12.2k|         return Self(val);
  781|  12.2k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm4EEC2ERKNS_16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
 1487|    413|      explicit WindowedBoothMulTable(const AffinePoint& p) : m_table(varpoint_setup<C, TableSize>(p)) {}
pcurves_brainpool256r1.cpp:_ZN5BotanplERKNS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_EERKNS_16AffineCurvePointISB_EE:
 1066|  2.89k|      friend constexpr Self operator+(const Self& a, const AffinePoint& b) { return Self::add_mixed(a, b); }
pcurves_brainpool256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E9add_mixedERKSC_RKNS_16AffineCurvePointISB_EE:
 1091|  2.89k|      constexpr static Self add_mixed(const Self& a, const AffinePoint& b) {
 1092|  2.89k|         return point_add_mixed<Self, AffinePoint, FieldElement>(a, b, FieldElement::one());
 1093|  2.89k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm4EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1489|    413|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1490|    413|         const BlindedScalar bits(s, rng);
 1491|       |
 1492|    413|         const size_t scalar_bits = bits.bits();
 1493|    413|         const size_t full_windows = compute_full_windows(scalar_bits + 1, WindowBits);
 1494|    413|         const size_t initial_shift = compute_initial_shift(scalar_bits + 1, WindowBits);
 1495|       |
 1496|    413|         BOTAN_DEBUG_ASSERT(full_windows * WindowBits + initial_shift == scalar_bits + 1);
  ------------------
  |  |  137|    413|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|    413|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 413]
  |  |  ------------------
  ------------------
 1497|    413|         BOTAN_DEBUG_ASSERT(initial_shift > 0);
  ------------------
  |  |  137|    413|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|    413|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 413]
  |  |  ------------------
  ------------------
 1498|       |
 1499|    413|         auto accum = ProjectivePoint::identity();
 1500|    413|         CT::poison(accum);
 1501|       |
 1502|  23.9k|         for(size_t i = 0; i != full_windows; ++i) {
  ------------------
  |  Branch (1502:28): [True: 23.5k, False: 413]
  ------------------
 1503|  23.5k|            const size_t idx = scalar_bits - initial_shift - WindowBits * i;
 1504|       |
 1505|  23.5k|            const size_t w_i = bits.get_window(idx);
 1506|  23.5k|            const auto [tidx, tneg] = booth_recode<WindowBits>(w_i);
 1507|       |
 1508|       |            // Conditional ok: loop iteration count is public
 1509|  23.5k|            if(i == 0) {
  ------------------
  |  Branch (1509:16): [True: 413, False: 23.1k]
  ------------------
 1510|    413|               accum = ProjectivePoint::from_affine(m_table.ct_select(tidx));
 1511|    413|               accum.conditional_assign(tneg, accum.negate());
 1512|  23.1k|            } else {
 1513|  23.1k|               accum = ProjectivePoint::add_or_sub(accum, m_table.ct_select(tidx), tneg);
 1514|  23.1k|            }
 1515|       |
 1516|  23.5k|            accum = accum.dbl_n(WindowBits);
 1517|       |
 1518|       |            // Conditional ok: loop iteration count is public
 1519|  23.5k|            if(i <= 3) {
  ------------------
  |  Branch (1519:16): [True: 1.65k, False: 21.8k]
  ------------------
 1520|  1.65k|               accum.randomize_rep(rng);
 1521|  1.65k|            }
 1522|  23.5k|         }
 1523|       |
 1524|       |         // final window (note one bit shorter than previous reads)
 1525|    413|         const size_t w_l = bits.get_window(0) & ((1 << WindowBits) - 1);
 1526|    413|         const auto [tidx, tneg] = booth_recode<WindowBits>(w_l << 1);
 1527|    413|         accum = ProjectivePoint::add_or_sub(accum, m_table.ct_select(tidx), tneg);
 1528|       |
 1529|    413|         CT::unpoison(accum);
 1530|    413|         return accum;
 1531|    413|      }
pcurves_brainpool256r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm6EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    413|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    413|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 413, Folded]
  |  Branch (1308:33): [True: 413, False: 0]
  ------------------
 1309|    413|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|    413|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|    413|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|    413|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|    413|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|    413|            W mask[n_words] = {0};
 1318|    413|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|    413|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|    413|            if constexpr(ExcessBits > 0) {
 1323|    413|               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|    413|               mask[MaskWords - 1] &= ExcessMask;
 1325|    413|            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|    413|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|    413|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|    413|            mask[0] |= 1;
 1331|       |
 1332|    413|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|    413|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|    413|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|    413|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|    413|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|    413|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|    413|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    413|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|      0|            m_bytes.resize(C::Scalar::BYTES);
 1346|      0|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|      0|            m_bits = C::Scalar::BITS;
 1348|      0|         }
 1349|       |
 1350|    413|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    413|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm6EE4bitsEv:
 1305|    413|      size_t bits() const { return m_bits; }
pcurves_brainpool256r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm4EE20compute_full_windowsEmm:
 1468|    413|      static constexpr size_t compute_full_windows(size_t sb, size_t wb) {
 1469|    413|         if(sb % wb == 0) {
  ------------------
  |  Branch (1469:13): [True: 0, False: 413]
  ------------------
 1470|      0|            return (sb - 1) / wb;
 1471|    413|         } else {
 1472|    413|            return sb / wb;
 1473|    413|         }
 1474|    413|      }
pcurves_brainpool256r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm4EE21compute_initial_shiftEmm:
 1476|    413|      static constexpr size_t compute_initial_shift(size_t sb, size_t wb) {
 1477|    413|         if(sb % wb == 0) {
  ------------------
  |  Branch (1477:13): [True: 0, False: 413]
  ------------------
 1478|      0|            return wb;
 1479|    413|         } else {
 1480|    413|            return sb - (sb / wb) * wb;
 1481|    413|         }
 1482|    413|      }
pcurves_brainpool256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E8identityEv:
 1038|    413|      static constexpr Self identity() { return Self(FieldElement::zero(), FieldElement::one(), FieldElement::zero()); }
pcurves_brainpool256r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm6EE10get_windowEm:
 1353|  23.9k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  23.9k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  23.9k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E5dbl_nEm:
 1108|  23.5k|      constexpr Self dbl_n(size_t n) const {
 1109|       |         if constexpr(Self::A_is_minus_3) {
 1110|       |            return dbl_n_a_minus_3(*this, n);
 1111|       |         } else if constexpr(Self::A_is_zero) {
 1112|       |            return dbl_n_a_zero(*this, n);
 1113|  23.5k|         } else {
 1114|  23.5k|            return dbl_n_generic(*this, A, n);
 1115|  23.5k|         }
 1116|  23.5k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE4div2Ev:
  302|  23.5k|      Self div2() const {
  303|       |         // The inverse of 2 modulo P is (P/2)+1; this avoids a constexpr time
  304|       |         // general inversion, which some compilers can't handle
  305|  23.5k|         constexpr auto INV_2 = p_div_2_plus_1(Rep::P);
  306|       |
  307|       |         // We could multiply by INV_2 but there is a better way ...
  308|       |
  309|  23.5k|         std::array<W, N> t = value();
  310|  23.5k|         const W borrow = shift_right<1>(t);
  311|       |
  312|       |         // If value was odd, add (P/2)+1
  313|  23.5k|         const auto mask = CT::Mask<W>::expand(borrow).value();
  314|       |
  315|  23.5k|         W carry = 0;
  316|       |
  317|   117k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (317:28): [True: 94.1k, False: 23.5k]
  ------------------
  318|  94.1k|            t[i] = word_add(t[i], INV_2[i] & mask, &carry);
  319|  94.1k|         }
  320|       |
  321|  23.5k|         return Self(t);
  322|  23.5k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm6EED2Ev:
 1358|    413|      ~BlindedScalarBits() {
 1359|    413|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    413|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    413|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E12ScalarParamsEEEE7is_zeroEv:
  225|  1.38k|      constexpr CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_val.size()).as_choice(); }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEEeqERKSA_:
  722|  1.65k|      constexpr CT::Choice operator==(const Self& other) const {
  723|  1.65k|         return CT::is_equal(this->data(), other.data(), N).as_choice();
  724|  1.65k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsENS_13MontgomeryRepEE7x3_ax_bERKNS_6IntModINS5_INS6_11FieldParamsEEEEE:
 1275|  1.65k|      static constexpr FieldElement x3_ax_b(const FieldElement& x) { return (x.square() + A) * x + B; }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE4sqrtEv:
  663|    478|      constexpr CT::Option<Self> sqrt() const {
  664|    478|         if constexpr(Self::P_MOD_4 == 3) {
  665|       |            // The easy case for square root is when p == 3 (mod 4)
  666|       |
  667|    478|            constexpr auto P_PLUS_1_OVER_4 = p_plus_1_over_4(P);
  668|    478|            auto z = pow_vartime(P_PLUS_1_OVER_4);
  669|       |
  670|       |            // Zero out the return value if it would otherwise be incorrect
  671|    478|            const CT::Choice correct = (z.square() == *this);
  672|    478|            z.conditional_assign(!correct, Self::zero());
  673|    478|            return CT::Option<Self>(z, correct);
  674|       |         } else {
  675|       |            // Shanks-Tonelli, following I.4 in RFC 9380
  676|       |
  677|       |            /*
  678|       |            Constants:
  679|       |            1. c1, the largest integer such that 2^c1 divides q - 1.
  680|       |            2. c2 = (q - 1) / (2^c1)        # Integer arithmetic
  681|       |            3. c3 = (c2 - 1) / 2            # Integer arithmetic
  682|       |            4. c4, a non-square value in F
  683|       |            5. c5 = c4^c2 in F
  684|       |            */
  685|       |            constexpr auto C1_C2 = shanks_tonelli_c1c2(Self::P);
  686|       |            constexpr std::array<W, N> C3 = shanks_tonelli_c3(C1_C2.second);
  687|       |            constexpr std::array<W, N> P_MINUS_1_OVER_2 = p_minus_1_over_2(Self::P);
  688|       |            constexpr Self C4 = shanks_tonelli_c4<Self>(P_MINUS_1_OVER_2);
  689|       |            constexpr Self C5 = C4.pow_vartime(C1_C2.second);
  690|       |
  691|       |            const Self& x = (*this);
  692|       |
  693|       |            auto z = x.pow_vartime(C3);
  694|       |            auto t = z.square();
  695|       |            t *= x;
  696|       |            z *= x;
  697|       |            auto b = t;
  698|       |            auto c = C5;
  699|       |
  700|       |            for(size_t i = C1_C2.first; i >= 2; i--) {
  701|       |               b.square_n(i - 2);
  702|       |               const CT::Choice e = b.is_one();
  703|       |               z.conditional_assign(!e, z * c);
  704|       |               c.square_n(1);
  705|       |               t.conditional_assign(!e, t * c);
  706|       |               b = t;
  707|       |            }
  708|       |
  709|       |            // Zero out the return value if it would otherwise be incorrect
  710|       |            const CT::Choice correct = (z.square() == *this);
  711|       |            z.conditional_assign(!correct, Self::zero());
  712|       |            return CT::Option<Self>(z, correct);
  713|       |         }
  714|    478|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE12correct_signENS_2CT6ChoiceE:
  248|    413|      constexpr Self correct_sign(CT::Choice even) const {
  249|    413|         const auto flip = (even != this->is_even());
  250|    413|         return Self::choose(flip, this->negate(), *this);
  251|    413|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE7is_evenEv:
  240|    413|      constexpr CT::Choice is_even() const {
  241|    413|         auto v = Rep::from_rep(m_val);
  242|    413|         return !CT::Choice::from_int(v[0] & 0x01);
  243|    413|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE6chooseENS_2CT6ChoiceERKSA_SE_:
  256|    413|      static constexpr Self choose(CT::Choice choice, const Self& x, const Self& y) {
  257|    413|         auto r = y;
  258|    413|         r.conditional_assign(choice, x);
  259|    413|         return r;
  260|    413|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E12ScalarParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|  1.04k|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|  1.04k|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 1.04k]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|  1.04k|         const auto words = bytes_to_words<W, N, BYTES>(bytes.first<Self::BYTES>());
  799|       |
  800|       |         // Conditional acceptable: std::optional is implicitly not constant time
  801|  1.04k|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 347, False: 694]
  ------------------
  802|    347|            return {};
  803|    347|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|    694|         return Self::from_words(words);
  807|  1.04k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E12ScalarParamsEEEE10from_wordsILm4EEESA_NSt3__15arrayImXT_EEE:
  211|    694|      static constexpr Self from_words(std::array<W, L> w) {
  212|    694|         if constexpr(L == N) {
  213|    694|            return Self(Rep::to_rep(w));
  214|       |         } else {
  215|       |            static_assert(L < N);
  216|       |            std::array<W, N> ew = {};
  217|       |            copy_mem(std::span{ew}.template first<L>(), w);
  218|       |            return Self(Rep::to_rep(ew));
  219|       |         }
  220|    694|      }
pcurves_brainpool256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES0_E12ScalarParamsEE6to_repERKNSt3__15arrayImLm4EEE:
  115|    694|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|    694|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|    694|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|    694|         return Self::redc(z);
  119|    694|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEEE12serialize_toENSt3__14spanIhLm65EEE:
  941|  2.34k|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  942|  2.34k|         BOTAN_STATE_CHECK(this->is_identity().as_bool() == false);
  ------------------
  |  |   51|  2.34k|   do {                                                         \
  |  |   52|  2.34k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  2.34k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 2.34k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  2.34k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 2.34k]
  |  |  ------------------
  ------------------
  943|  2.34k|         BufferStuffer pack(bytes);
  944|  2.34k|         pack.append(0x04);
  945|  2.34k|         x().serialize_to(pack.next<FieldElement::BYTES>());
  946|  2.34k|         y().serialize_to(pack.next<FieldElement::BYTES>());
  947|  2.34k|         BOTAN_DEBUG_ASSERT(pack.full());
  ------------------
  |  |  137|  2.34k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  2.34k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 2.34k]
  |  |  ------------------
  ------------------
  948|  2.34k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E12ScalarParamsEEEE6randomERNS_21RandomNumberGeneratorE:
  851|    694|      static Self random(RandomNumberGenerator& rng) {
  852|    694|         constexpr size_t MAX_ATTEMPTS = 1000;
  853|       |
  854|    694|         std::array<uint8_t, Self::BYTES> buf{};
  855|       |
  856|  1.04k|         for(size_t i = 0; i != MAX_ATTEMPTS; ++i) {
  ------------------
  |  Branch (856:28): [True: 1.04k, False: 0]
  ------------------
  857|  1.04k|            rng.randomize(buf);
  858|       |
  859|       |            // Zero off high bits that if set would certainly cause us
  860|       |            // to be out of range
  861|       |            if constexpr(Self::BITS % 8 != 0) {
  862|       |               constexpr uint8_t mask = 0xFF >> (8 - (Self::BITS % 8));
  863|       |               buf[0] &= mask;
  864|       |            }
  865|       |
  866|       |            // Conditionals ok: rejection sampling reveals only values we didn't use
  867|  1.04k|            if(auto s = Self::deserialize(buf)) {
  ------------------
  |  Branch (867:21): [True: 694, False: 347]
  ------------------
  868|    694|               if(s.value().is_nonzero().as_bool()) {
  ------------------
  |  Branch (868:19): [True: 694, False: 0]
  ------------------
  869|    694|                  return s.value();
  870|    694|               }
  871|    694|            }
  872|  1.04k|         }
  873|       |
  874|      0|         throw Internal_Error("Failed to generate random Scalar within bounded number of attempts");
  875|    694|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E12ScalarParamsEEEE10is_nonzeroEv:
  230|    694|      constexpr CT::Choice is_nonzero() const { return !is_zero(); }
pcurves_brainpool384r1.cpp:_ZN5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm6EEC2ERKNS_16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
 1405|      1|            m_table(basemul_booth_setup<C, WindowBits>(p, BlindedScalar::Bits + 1)) {}
pcurves_brainpool384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E11from_affineERKNS_16AffineCurvePointISB_EE:
 1016|    647|      static constexpr Self from_affine(const AffinePoint& pt) {
 1017|       |         /*
 1018|       |         * If the point is the identity element (x=0, y=0) then instead of
 1019|       |         * creating (x, y, 1) = (0, 0, 1) we want our projective identity
 1020|       |         * encoding of (0, 1, 0)
 1021|       |         *
 1022|       |         * Which we can achieve by a conditional swap of y and z if the
 1023|       |         * affine point is the identity.
 1024|       |         */
 1025|       |
 1026|    647|         auto x = pt.x();
 1027|    647|         auto y = pt.y();
 1028|    647|         auto z = FieldElement::one();
 1029|       |
 1030|    647|         FieldElement::conditional_swap(pt.is_identity(), y, z);
 1031|       |
 1032|    647|         return ProjectiveCurvePoint(x, y, z);
 1033|    647|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEEE1xEv:
  971|  1.14M|      constexpr const FieldElement& x() const { return m_x; }
pcurves_brainpool384r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEEE1yEv:
  976|  1.10M|      constexpr const FieldElement& y() const { return m_y; }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE3oneEv:
  200|  40.5k|      static constexpr Self one() { return Self(Rep::one()); }
pcurves_brainpool384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES0_E11FieldParamsEE3oneEv:
   99|  40.5k|      constexpr static std::array<W, N> one() { return R1; }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEEC2ENSt3__15arrayImLm6EEE:
  898|  1.97M|      explicit constexpr IntMod(std::array<W, N> v) : m_val(v) {}
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE16conditional_swapENS_2CT6ChoiceERSA_SD_:
  410|    647|      static constexpr void conditional_swap(CT::Choice cond, Self& x, Self& y) {
  411|    647|         const W mask = cond.into_bitmask<W>();
  412|       |
  413|  4.52k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (413:28): [True: 3.88k, False: 647]
  ------------------
  414|  3.88k|            auto nx = Botan::choose(mask, y.m_val[i], x.m_val[i]);
  415|  3.88k|            auto ny = Botan::choose(mask, x.m_val[i], y.m_val[i]);
  416|  3.88k|            x.m_val[i] = nx;
  417|  3.88k|            y.m_val[i] = ny;
  418|  3.88k|         }
  419|    647|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEEE11is_identityEv:
  928|  41.7k|      constexpr CT::Choice is_identity() const { return x().is_zero() && y().is_zero(); }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE7is_zeroEv:
  225|   211k|      constexpr CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_val.size()).as_choice(); }
pcurves_brainpool384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_EC2ERKSB_SE_SE_:
 1056|  56.8k|            m_x(x), m_y(y), m_z(z) {}
pcurves_brainpool384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E3dblEv:
 1121|  2.43k|      constexpr Self dbl() const {
 1122|       |         if constexpr(Self::A_is_minus_3) {
 1123|       |            return dbl_a_minus_3(*this);
 1124|       |         } else if constexpr(Self::A_is_zero) {
 1125|       |            return dbl_a_zero(*this);
 1126|  2.43k|         } else {
 1127|  2.43k|            return dbl_generic(*this, A);
 1128|  2.43k|         }
 1129|  2.43k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E1zEv:
 1172|   239k|      constexpr const FieldElement& z() const { return m_z; }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE6squareEv:
  426|   438k|      constexpr BOTAN_FORCE_INLINE Self square() const {
  427|   438k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  428|   438k|         comba_sqr<N>(z.data(), this->data());
  429|   438k|         return Self(Rep::redc(z));
  430|   438k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE4dataEv:
  896|  2.20M|      constexpr const W* data() const { return m_val.data(); }
pcurves_brainpool384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES0_E11FieldParamsEE4redcERKNSt3__15arrayImLm12EEE:
  104|  1.46M|      constexpr static std::array<W, N> redc(const std::array<W, 2 * N>& z) {
  105|       |         if constexpr(P_dash == 1) {
  106|       |            return monty_redc_pdash1(z, P);
  107|  1.46M|         } else {
  108|  1.46M|            return monty_redc(z, P, P_dash);
  109|  1.46M|         }
  110|  1.46M|      }
pcurves_brainpool384r1.cpp:_ZN5BotanplERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEEESC_:
  265|   174k|      friend constexpr BOTAN_FORCE_INLINE Self operator+(const Self& a, const Self& b) {
  266|   174k|         std::array<W, N> t;  // NOLINT(*-member-init)
  267|       |
  268|   174k|         W carry = 0;
  269|  1.22M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (269:28): [True: 1.04M, False: 174k]
  ------------------
  270|  1.04M|            t[i] = word_add(a.m_val[i], b.m_val[i], &carry);
  271|  1.04M|         }
  272|       |
  273|   174k|         std::array<W, N> r;  // NOLINT(*-member-init)
  274|   174k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  275|   174k|         return Self(r);
  276|   174k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E1xEv:
 1162|   145k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE4mul3Ev:
  335|  66.5k|      constexpr inline Self mul3() const { return mul2() + (*this); }
pcurves_brainpool384r1.cpp:_ZN5BotanmlERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEEESC_:
  346|   519k|      friend constexpr BOTAN_FORCE_INLINE Self operator*(const Self& a, const Self& b) {
  347|   519k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  348|   519k|         comba_mul<N>(z.data(), a.data(), b.data());
  349|   519k|         return Self(Rep::redc(z));
  350|   519k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E1yEv:
 1167|   145k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE4mul4Ev:
  338|  2.43k|      constexpr inline Self mul4() const { return mul2().mul2(); }
pcurves_brainpool384r1.cpp:_ZN5BotanmiERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEEESC_:
  281|   439k|      friend constexpr BOTAN_FORCE_INLINE Self operator-(const Self& a, const Self& b) {
  282|   439k|         std::array<W, N> r;  // NOLINT(*-member-init)
  283|   439k|         W carry = 0;
  284|  3.07M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (284:28): [True: 2.63M, False: 439k]
  ------------------
  285|  2.63M|            r[i] = word_sub(a.m_val[i], b.m_val[i], &carry);
  286|  2.63M|         }
  287|       |
  288|   439k|         const auto mask = CT::Mask<W>::expand(carry).value();
  289|       |
  290|   439k|         carry = 0;
  291|       |
  292|  3.07M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (292:28): [True: 2.63M, False: 439k]
  ------------------
  293|  2.63M|            r[i] = word_add(r[i], P[i] & mask, &carry);
  294|  2.63M|         }
  295|       |
  296|   439k|         return Self(r);
  297|   439k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE4mul2Ev:
  325|   224k|      constexpr BOTAN_FORCE_INLINE Self mul2() const {
  326|   224k|         std::array<W, N> t = value();
  327|   224k|         const W carry = shift_left<1>(t);
  328|       |
  329|   224k|         std::array<W, N> r;  // NOLINT(*-member-init)
  330|   224k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  331|   224k|         return Self(r);
  332|   224k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE5valueEv:
  894|   237k|      constexpr const std::array<W, N>& value() const { return m_val; }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE4mul8Ev:
  341|  2.43k|      constexpr inline Self mul8() const { return mul2().mul2().mul2(); }
pcurves_brainpool384r1.cpp:_ZN5BotanplERKNS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_EESE_:
 1064|  1.09k|      friend constexpr Self operator+(const Self& a, const Self& b) { return Self::add(a, b); }
pcurves_brainpool384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E3addERKSC_SE_:
 1103|  1.09k|      constexpr static Self add(const Self& a, const Self& b) { return point_add<Self, FieldElement>(a, b); }
pcurves_brainpool384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E11is_identityEv:
 1082|  45.9k|      constexpr CT::Choice is_identity() const { return z().is_zero(); }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE18conditional_assignERSA_SB_SB_NS_2CT6ChoiceERKSA_SF_SF_:
  395|  80.5k|         Self& x, Self& y, Self& z, CT::Choice cond, const Self& nx, const Self& ny, const Self& nz) {
  396|  80.5k|         const W mask = cond.into_bitmask<W>();
  397|       |
  398|   563k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (398:28): [True: 483k, False: 80.5k]
  ------------------
  399|   483k|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  400|   483k|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  401|   483k|            z.m_val[i] = Botan::choose(mask, nz.m_val[i], z.m_val[i]);
  402|   483k|         }
  403|  80.5k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE6invertEv:
  538|    646|      constexpr Self invert() const { return pow_vartime(Self::P_MINUS_2); }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE11pow_vartimeERKNSt3__15arrayImLm6EEE:
  477|    848|      constexpr Self pow_vartime(const std::array<W, N>& exp) const {
  478|    848|         constexpr size_t WindowBits = (Self::BITS <= 256) ? 4 : 5;
  ------------------
  |  Branch (478:40): [Folded, False: 848]
  ------------------
  479|    848|         constexpr size_t WindowElements = (1 << WindowBits) - 1;
  480|       |
  481|    848|         constexpr size_t Windows = (Self::BITS + WindowBits - 1) / WindowBits;
  482|       |
  483|       |         /*
  484|       |         A simple fixed width window modular multiplication.
  485|       |
  486|       |         TODO: investigate using sliding window here
  487|       |         */
  488|       |
  489|    848|         std::array<Self, WindowElements> tbl;
  490|       |
  491|    848|         tbl[0] = (*this);
  492|       |
  493|  26.2k|         for(size_t i = 1; i != WindowElements; ++i) {
  ------------------
  |  Branch (493:28): [True: 25.4k, False: 848]
  ------------------
  494|       |            // Conditional ok: table indexes are public here
  495|  25.4k|            if(i % 2 == 1) {
  ------------------
  |  Branch (495:16): [True: 12.7k, False: 12.7k]
  ------------------
  496|  12.7k|               tbl[i] = tbl[i / 2].square();
  497|  12.7k|            } else {
  498|  12.7k|               tbl[i] = tbl[i - 1] * tbl[0];
  499|  12.7k|            }
  500|  25.4k|         }
  501|       |
  502|    848|         auto r = Self::one();
  503|       |
  504|    848|         const size_t w0 = read_window_bits<WindowBits>(std::span{exp}, (Windows - 1) * WindowBits);
  505|       |
  506|       |         // Conditional ok: this function is variable time
  507|    848|         if(w0 > 0) {
  ------------------
  |  Branch (507:13): [True: 848, False: 0]
  ------------------
  508|    848|            r = tbl[w0 - 1];
  509|    848|         }
  510|       |
  511|  65.2k|         for(size_t i = 1; i != Windows; ++i) {
  ------------------
  |  Branch (511:28): [True: 64.4k, False: 848]
  ------------------
  512|  64.4k|            r.square_n(WindowBits);
  513|       |
  514|  64.4k|            const size_t w = read_window_bits<WindowBits>(std::span{exp}, (Windows - i - 1) * WindowBits);
  515|       |
  516|       |            // Conditional ok: this function is variable time
  517|  64.4k|            if(w > 0) {
  ------------------
  |  Branch (517:16): [True: 61.7k, False: 2.74k]
  ------------------
  518|  61.7k|               r *= tbl[w - 1];
  519|  61.7k|            }
  520|  64.4k|         }
  521|       |
  522|    848|         return r;
  523|    848|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEEC2Ev:
  180|  26.2k|      constexpr IntMod() : m_val({}) {}
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE8square_nEm:
  439|  64.4k|      constexpr void square_n(size_t n) {
  440|  64.4k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  441|   386k|         for(size_t i = 0; i != n; ++i) {
  ------------------
  |  Branch (441:28): [True: 322k, False: 64.4k]
  ------------------
  442|   322k|            comba_sqr<N>(z.data(), this->data());
  443|   322k|            m_val = Rep::redc(z);
  444|   322k|         }
  445|  64.4k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEEmLERKSA_:
  355|   182k|      constexpr BOTAN_FORCE_INLINE Self& operator*=(const Self& other) {
  356|   182k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  357|   182k|         comba_mul<N>(z.data(), data(), other.data());
  358|   182k|         m_val = Rep::redc(z);
  359|   182k|         return (*this);
  360|   182k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE14invert_vartimeEv:
  598|      1|      constexpr Self invert_vartime() const {
  599|       |         // Conditional ok: this function is variable time
  600|      1|         if(this->is_zero().as_bool()) {
  ------------------
  |  Branch (600:13): [True: 0, False: 1]
  ------------------
  601|      0|            return Self::zero();
  602|      0|         }
  603|       |
  604|      1|         auto x = Self(std::array<W, N>{1});  // 1 in standard domain
  605|      1|         auto b = Self(this->to_words());     // *this in standard domain
  606|       |
  607|       |         // First loop iteration
  608|      1|         Self::_invert_vartime_div2_helper(b, x);
  609|       |
  610|      1|         auto a = b.negate();
  611|       |         // y += x but y is zero at the outset
  612|      1|         auto y = x;
  613|       |
  614|       |         // First half of second loop iteration
  615|      1|         Self::_invert_vartime_div2_helper(a, y);
  616|       |
  617|    262|         for(;;) {
  618|       |            // Conditional ok: this function is variable time
  619|    262|            if(a.m_val == b.m_val) {
  ------------------
  |  Branch (619:16): [True: 1, False: 261]
  ------------------
  620|       |               // At this point it should be that a == b == 1
  621|      1|               auto r = y.negate();
  622|       |
  623|       |               // Convert back to Montgomery if required
  624|      1|               r.m_val = Rep::to_rep(r.m_val);
  625|      1|               return r;
  626|      1|            }
  627|       |
  628|    261|            auto nx = x + y;
  629|       |
  630|       |            /*
  631|       |            * Otherwise either b > a or a > b
  632|       |            *
  633|       |            * If b > a we want to set b to b - a
  634|       |            * Otherwise we want to set a to a - b
  635|       |            *
  636|       |            * Compute r = b - a and check if it underflowed
  637|       |            * If it did not then we are in the b > a path
  638|       |            */
  639|    261|            std::array<W, N> r;  // NOLINT(*-member-init)
  640|    261|            const word carry = bigint_sub3(r.data(), b.data(), N, a.data(), N);
  641|       |
  642|       |            // Conditional ok: this function is variable time
  643|    261|            if(carry == 0) {
  ------------------
  |  Branch (643:16): [True: 128, False: 133]
  ------------------
  644|       |               // b > a
  645|    128|               b.m_val = r;
  646|    128|               x = nx;
  647|    128|               Self::_invert_vartime_div2_helper(b, x);
  648|    133|            } else {
  649|       |               // We know this can't underflow because a > b
  650|    133|               bigint_sub3(r.data(), a.data(), N, b.data(), N);
  651|    133|               a.m_val = r;
  652|    133|               y = nx;
  653|    133|               Self::_invert_vartime_div2_helper(a, y);
  654|    133|            }
  655|    261|         }
  656|      1|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE4zeroEv:
  195|  77.2k|      static constexpr Self zero() { return Self(std::array<W, N>{0}); }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE8to_wordsEv:
  734|      1|      constexpr std::array<W, Self::N> to_words() const { return Rep::from_rep(m_val); }
pcurves_brainpool384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES0_E11FieldParamsEE8from_repERKNSt3__15arrayImLm6EEE:
  137|  2.18k|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|  2.18k|         std::array<W, 2 * N> ze = {};
  139|  2.18k|         copy_mem(std::span{ze}.template first<N>(), z);
  140|  2.18k|         return Self::redc(ze);
  141|  2.18k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE27_invert_vartime_div2_helperERSA_SB_:
  547|    263|      static constexpr void _invert_vartime_div2_helper(Self& a, Self& x) {
  548|    263|         constexpr auto INV_2 = p_div_2_plus_1(Rep::P);
  549|       |
  550|       |         // Conditional ok: this function is variable time
  551|    814|         while((a.m_val[0] & 1) != 1) {
  ------------------
  |  Branch (551:16): [True: 551, False: 263]
  ------------------
  552|    551|            shift_right<1>(a.m_val);
  553|       |
  554|    551|            const W borrow = shift_right<1>(x.m_val);
  555|       |
  556|       |            // Conditional ok: this function is variable time
  557|    551|            if(borrow) {
  ------------------
  |  Branch (557:16): [True: 291, False: 260]
  ------------------
  558|    291|               bigint_add2(x.m_val.data(), N, INV_2.data(), N);
  559|    291|            }
  560|    551|         }
  561|    263|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE6negateEv:
  452|  38.5k|      constexpr Self negate() const {
  453|  38.5k|         const W x_is_zero = ~CT::all_zeros(this->data(), N).value();
  454|       |
  455|  38.5k|         std::array<W, N> r;  // NOLINT(*-member-init)
  456|  38.5k|         W carry = 0;
  457|   269k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (457:28): [True: 231k, False: 38.5k]
  ------------------
  458|   231k|            r[i] = word_sub(P[i] & x_is_zero, m_val[i], &carry);
  459|   231k|         }
  460|       |
  461|  38.5k|         return Self(r);
  462|  38.5k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES0_E11FieldParamsEE6to_repERKNSt3__15arrayImLm6EEE:
  115|  2.50k|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|  2.50k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|  2.50k|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|  2.50k|         return Self::redc(z);
  119|  2.50k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEEEC2ERKSB_SE_:
  917|  45.7k|      constexpr AffineCurvePoint(const FieldElement& x, const FieldElement& y) : m_x(x), m_y(y) {}
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|  2.33k|      std::array<W, L> stash_value() const {
  760|  2.33k|         static_assert(L >= N);
  761|  2.33k|         std::array<W, L> stash = {};
  762|  16.3k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 14.0k, False: 2.33k]
  ------------------
  763|  14.0k|            stash[i] = m_val[i];
  764|  14.0k|         }
  765|  2.33k|         return stash;
  766|  2.33k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm6EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1407|    348|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1408|    348|         const BlindedScalar scalar(s, rng);
 1409|    348|         return basemul_booth_exec<C, WindowBits>(m_table, scalar, rng);
 1410|    348|      }
pcurves_brainpool384r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm7EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    348|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    348|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 348, Folded]
  |  Branch (1308:33): [True: 348, False: 0]
  ------------------
 1309|    348|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|    348|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|    348|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|    348|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|    348|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|    348|            W mask[n_words] = {0};
 1318|    348|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|    348|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|    348|            if constexpr(ExcessBits > 0) {
 1323|    348|               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|    348|               mask[MaskWords - 1] &= ExcessMask;
 1325|    348|            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|    348|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|    348|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|    348|            mask[0] |= 1;
 1331|       |
 1332|    348|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|    348|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|    348|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|    348|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|    348|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|    348|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|    348|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    348|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|      0|            m_bytes.resize(C::Scalar::BYTES);
 1346|      0|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|      0|            m_bits = C::Scalar::BITS;
 1348|      0|         }
 1349|       |
 1350|    348|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    348|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E12ScalarParamsEEEE8to_wordsEv:
  734|    497|      constexpr std::array<W, Self::N> to_words() const { return Rep::from_rep(m_val); }
pcurves_brainpool384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES0_E12ScalarParamsEE8from_repERKNSt3__15arrayImLm6EEE:
  137|    845|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|    845|         std::array<W, 2 * N> ze = {};
  139|    845|         copy_mem(std::span{ze}.template first<N>(), z);
  140|    845|         return Self::redc(ze);
  141|    845|      }
pcurves_brainpool384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES0_E12ScalarParamsEE4redcERKNSt3__15arrayImLm12EEE:
  104|  1.19k|      constexpr static std::array<W, N> redc(const std::array<W, 2 * N>& z) {
  105|       |         if constexpr(P_dash == 1) {
  106|       |            return monty_redc_pdash1(z, P);
  107|  1.19k|         } else {
  108|  1.19k|            return monty_redc(z, P, P_dash);
  109|  1.19k|         }
  110|  1.19k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E12ScalarParamsEEEE12serialize_toENSt3__14spanIhLm48EEE:
  739|    348|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    348|         auto v = Rep::from_rep(m_val);
  741|    348|         std::reverse(v.begin(), v.end());
  742|       |
  743|    348|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|    348|            store_be(bytes, v);
  745|       |         } else {
  746|       |            // Remove leading zero bytes
  747|       |            const auto padded_bytes = store_be(v);
  748|       |            constexpr size_t extra = N * WordInfo<W>::bytes - Self::BYTES;
  749|       |            copy_mem(bytes, std::span{padded_bytes}.template subspan<extra, Self::BYTES>());
  750|       |         }
  751|    348|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm7EE4bitsEv:
 1305|    348|      size_t bits() const { return m_bits; }
pcurves_brainpool384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E18conditional_assignENS_2CT6ChoiceERKSC_:
 1084|    497|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
 1085|    497|         FieldElement::conditional_assign(m_x, m_y, m_z, cond, pt.x(), pt.y(), pt.z());
 1086|    497|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E6negateEv:
 1134|    497|      constexpr Self negate() const { return Self(x(), y().negate(), z()); }
pcurves_brainpool384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E18_const_time_poisonEv:
 1174|    497|      constexpr void _const_time_poison() const { CT::poison_all(m_x, m_y, m_z); }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE18_const_time_poisonEv:
  889|  1.49k|      constexpr void _const_time_poison() const { CT::poison(m_val); }
pcurves_brainpool384r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm7EE10get_windowEm:
 1353|  25.4k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  25.4k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  25.4k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E10add_or_subERKSC_RKNS_16AffineCurvePointISB_EENS_2CT6ChoiceE:
 1096|  37.8k|      constexpr static Self add_or_sub(const Self& a, const AffinePoint& b, CT::Choice sub) {
 1097|  37.8k|         return point_add_or_sub_mixed<Self, AffinePoint, FieldElement>(a, b, sub, FieldElement::one());
 1098|  37.8k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE18conditional_assignENS_2CT6ChoiceERKSA_:
  367|  38.2k|      constexpr void conditional_assign(CT::Choice cond, const Self& nx) {
  368|  38.2k|         const W mask = cond.into_bitmask<W>();
  369|       |
  370|   267k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (370:28): [True: 229k, False: 38.2k]
  ------------------
  371|   229k|            m_val[i] = Botan::choose(mask, nx.m_val[i], m_val[i]);
  372|   229k|         }
  373|  38.2k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEEE9ct_selectENSt3__14spanIKSC_Lm18446744073709551615EEEm:
  955|  25.4k|      static constexpr auto ct_select(std::span<const Self> pts, size_t idx) {
  956|  25.4k|         auto result = Self::identity(pts[0]);
  957|       |
  958|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
  959|  25.4k|         const size_t idx1 = static_cast<size_t>(idx - 1);
  960|   838k|         for(size_t i = 0; i != pts.size(); ++i) {
  ------------------
  |  Branch (960:28): [True: 812k, False: 25.4k]
  ------------------
  961|   812k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
  962|   812k|            result.conditional_assign(found, pts[i]);
  963|   812k|         }
  964|       |
  965|  25.4k|         return result;
  966|  25.4k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEEE8identityERKSC_:
  924|  38.3k|      static constexpr Self identity(const Self& /*unused*/) {
  925|  38.3k|         return Self(FieldElement::zero(), FieldElement::zero());
  926|  38.3k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEEE18conditional_assignENS_2CT6ChoiceERKSC_:
  981|  1.02M|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
  982|  1.02M|         FieldElement::conditional_assign(m_x, m_y, cond, pt.x(), pt.y());
  983|  1.02M|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE18conditional_assignERSA_SB_NS_2CT6ChoiceERKSA_SF_:
  380|  1.02M|      static constexpr void conditional_assign(Self& x, Self& y, CT::Choice cond, const Self& nx, const Self& ny) {
  381|  1.02M|         const W mask = cond.into_bitmask<W>();
  382|       |
  383|  7.14M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (383:28): [True: 6.12M, False: 1.02M]
  ------------------
  384|  6.12M|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  385|  6.12M|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  386|  6.12M|         }
  387|  1.02M|      }
pcurves_brainpool384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E13randomize_repERNS_21RandomNumberGeneratorE:
 1142|  1.98k|      void randomize_rep(RandomNumberGenerator& rng) {
 1143|       |         // In certain contexts we may be called with a Null_RNG; in that case the
 1144|       |         // caller is accepting that randomization will not occur
 1145|       |
 1146|       |         // Conditional ok: caller's RNG state (seeded vs not) is presumed public
 1147|  1.98k|         if(rng.is_seeded()) {
  ------------------
  |  Branch (1147:13): [True: 1.98k, False: 0]
  ------------------
 1148|  1.98k|            auto r = FieldElement::random(rng);
 1149|       |
 1150|  1.98k|            auto r2 = r.square();
 1151|  1.98k|            auto r3 = r2 * r;
 1152|       |
 1153|  1.98k|            m_x *= r2;
 1154|  1.98k|            m_y *= r3;
 1155|  1.98k|            m_z *= r;
 1156|  1.98k|         }
 1157|  1.98k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE6randomERNS_21RandomNumberGeneratorE:
  851|  1.98k|      static Self random(RandomNumberGenerator& rng) {
  852|  1.98k|         constexpr size_t MAX_ATTEMPTS = 1000;
  853|       |
  854|  1.98k|         std::array<uint8_t, Self::BYTES> buf{};
  855|       |
  856|  3.63k|         for(size_t i = 0; i != MAX_ATTEMPTS; ++i) {
  ------------------
  |  Branch (856:28): [True: 3.63k, False: 0]
  ------------------
  857|  3.63k|            rng.randomize(buf);
  858|       |
  859|       |            // Zero off high bits that if set would certainly cause us
  860|       |            // to be out of range
  861|       |            if constexpr(Self::BITS % 8 != 0) {
  862|       |               constexpr uint8_t mask = 0xFF >> (8 - (Self::BITS % 8));
  863|       |               buf[0] &= mask;
  864|       |            }
  865|       |
  866|       |            // Conditionals ok: rejection sampling reveals only values we didn't use
  867|  3.63k|            if(auto s = Self::deserialize(buf)) {
  ------------------
  |  Branch (867:21): [True: 1.98k, False: 1.64k]
  ------------------
  868|  1.98k|               if(s.value().is_nonzero().as_bool()) {
  ------------------
  |  Branch (868:19): [True: 1.98k, False: 0]
  ------------------
  869|  1.98k|                  return s.value();
  870|  1.98k|               }
  871|  1.98k|            }
  872|  3.63k|         }
  873|       |
  874|      0|         throw Internal_Error("Failed to generate random Scalar within bounded number of attempts");
  875|  1.98k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|  4.15k|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|  4.15k|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 4.15k]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|  4.15k|         const auto words = bytes_to_words<W, N, BYTES>(bytes.first<Self::BYTES>());
  799|       |
  800|       |         // Conditional acceptable: std::optional is implicitly not constant time
  801|  4.15k|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 1.65k, False: 2.50k]
  ------------------
  802|  1.65k|            return {};
  803|  1.65k|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|  2.50k|         return Self::from_words(words);
  807|  4.15k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE10from_wordsILm6EEESA_NSt3__15arrayImXT_EEE:
  211|  2.50k|      static constexpr Self from_words(std::array<W, L> w) {
  212|  2.50k|         if constexpr(L == N) {
  213|  2.50k|            return Self(Rep::to_rep(w));
  214|       |         } else {
  215|       |            static_assert(L < N);
  216|       |            std::array<W, N> ew = {};
  217|       |            copy_mem(std::span{ew}.template first<L>(), w);
  218|       |            return Self(Rep::to_rep(ew));
  219|       |         }
  220|  2.50k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE10is_nonzeroEv:
  230|  1.98k|      constexpr CT::Choice is_nonzero() const { return !is_zero(); }
pcurves_brainpool384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E20_const_time_unpoisonEv:
 1176|    497|      constexpr void _const_time_unpoison() const { CT::unpoison_all(m_x, m_y, m_z); }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE20_const_time_unpoisonEv:
  891|  1.49k|      constexpr void _const_time_unpoison() const { CT::unpoison(m_val); }
pcurves_brainpool384r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm7EED2Ev:
 1358|    348|      ~BlindedScalarBits() {
 1359|    348|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    348|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    348|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E12ScalarParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|  1.19k|      static Self from_stash(const std::array<W, L>& stash) {
  775|  1.19k|         static_assert(L >= N);
  776|  1.19k|         std::array<W, N> val = {};
  777|  8.35k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 7.15k, False: 1.19k]
  ------------------
  778|  7.15k|            val[i] = stash[i];
  779|  7.15k|         }
  780|  1.19k|         return Self(val);
  781|  1.19k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E12ScalarParamsEEEEC2ENSt3__15arrayImLm6EEE:
  898|  1.54k|      explicit constexpr IntMod(std::array<W, N> v) : m_val(v) {}
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE12serialize_toENSt3__14spanIhLm48EEE:
  739|  2.03k|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|  2.03k|         auto v = Rep::from_rep(m_val);
  741|  2.03k|         std::reverse(v.begin(), v.end());
  742|       |
  743|  2.03k|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|  2.03k|            store_be(bytes, v);
  745|       |         } else {
  746|       |            // Remove leading zero bytes
  747|       |            const auto padded_bytes = store_be(v);
  748|       |            constexpr size_t extra = N * WordInfo<W>::bytes - Self::BYTES;
  749|       |            copy_mem(bytes, std::span{padded_bytes}.template subspan<extra, Self::BYTES>());
  750|       |         }
  751|  2.03k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E12ScalarParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|    348|      std::array<W, L> stash_value() const {
  760|    348|         static_assert(L >= N);
  761|    348|         std::array<W, L> stash = {};
  762|  2.43k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 2.08k, False: 348]
  ------------------
  763|  2.08k|            stash[i] = m_val[i];
  764|  2.08k|         }
  765|    348|         return stash;
  766|    348|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|  5.11k|      static Self from_stash(const std::array<W, L>& stash) {
  775|  5.11k|         static_assert(L >= N);
  776|  5.11k|         std::array<W, N> val = {};
  777|  35.8k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 30.7k, False: 5.11k]
  ------------------
  778|  30.7k|            val[i] = stash[i];
  779|  30.7k|         }
  780|  5.11k|         return Self(val);
  781|  5.11k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm4EEC2ERKNS_16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
 1487|    149|      explicit WindowedBoothMulTable(const AffinePoint& p) : m_table(varpoint_setup<C, TableSize>(p)) {}
pcurves_brainpool384r1.cpp:_ZN5BotanplERKNS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_EERKNS_16AffineCurvePointISB_EE:
 1066|  1.04k|      friend constexpr Self operator+(const Self& a, const AffinePoint& b) { return Self::add_mixed(a, b); }
pcurves_brainpool384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E9add_mixedERKSC_RKNS_16AffineCurvePointISB_EE:
 1091|  1.04k|      constexpr static Self add_mixed(const Self& a, const AffinePoint& b) {
 1092|  1.04k|         return point_add_mixed<Self, AffinePoint, FieldElement>(a, b, FieldElement::one());
 1093|  1.04k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm4EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1489|    149|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1490|    149|         const BlindedScalar bits(s, rng);
 1491|       |
 1492|    149|         const size_t scalar_bits = bits.bits();
 1493|    149|         const size_t full_windows = compute_full_windows(scalar_bits + 1, WindowBits);
 1494|    149|         const size_t initial_shift = compute_initial_shift(scalar_bits + 1, WindowBits);
 1495|       |
 1496|    149|         BOTAN_DEBUG_ASSERT(full_windows * WindowBits + initial_shift == scalar_bits + 1);
  ------------------
  |  |  137|    149|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|    149|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 149]
  |  |  ------------------
  ------------------
 1497|    149|         BOTAN_DEBUG_ASSERT(initial_shift > 0);
  ------------------
  |  |  137|    149|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|    149|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 149]
  |  |  ------------------
  ------------------
 1498|       |
 1499|    149|         auto accum = ProjectivePoint::identity();
 1500|    149|         CT::poison(accum);
 1501|       |
 1502|  12.9k|         for(size_t i = 0; i != full_windows; ++i) {
  ------------------
  |  Branch (1502:28): [True: 12.8k, False: 149]
  ------------------
 1503|  12.8k|            const size_t idx = scalar_bits - initial_shift - WindowBits * i;
 1504|       |
 1505|  12.8k|            const size_t w_i = bits.get_window(idx);
 1506|  12.8k|            const auto [tidx, tneg] = booth_recode<WindowBits>(w_i);
 1507|       |
 1508|       |            // Conditional ok: loop iteration count is public
 1509|  12.8k|            if(i == 0) {
  ------------------
  |  Branch (1509:16): [True: 149, False: 12.6k]
  ------------------
 1510|    149|               accum = ProjectivePoint::from_affine(m_table.ct_select(tidx));
 1511|    149|               accum.conditional_assign(tneg, accum.negate());
 1512|  12.6k|            } else {
 1513|  12.6k|               accum = ProjectivePoint::add_or_sub(accum, m_table.ct_select(tidx), tneg);
 1514|  12.6k|            }
 1515|       |
 1516|  12.8k|            accum = accum.dbl_n(WindowBits);
 1517|       |
 1518|       |            // Conditional ok: loop iteration count is public
 1519|  12.8k|            if(i <= 3) {
  ------------------
  |  Branch (1519:16): [True: 596, False: 12.2k]
  ------------------
 1520|    596|               accum.randomize_rep(rng);
 1521|    596|            }
 1522|  12.8k|         }
 1523|       |
 1524|       |         // final window (note one bit shorter than previous reads)
 1525|    149|         const size_t w_l = bits.get_window(0) & ((1 << WindowBits) - 1);
 1526|    149|         const auto [tidx, tneg] = booth_recode<WindowBits>(w_l << 1);
 1527|    149|         accum = ProjectivePoint::add_or_sub(accum, m_table.ct_select(tidx), tneg);
 1528|       |
 1529|    149|         CT::unpoison(accum);
 1530|    149|         return accum;
 1531|    149|      }
pcurves_brainpool384r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm6EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    149|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    149|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 149, Folded]
  |  Branch (1308:33): [True: 149, False: 0]
  ------------------
 1309|    149|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|    149|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|    149|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|    149|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|    149|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|    149|            W mask[n_words] = {0};
 1318|    149|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|    149|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|    149|            if constexpr(ExcessBits > 0) {
 1323|    149|               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|    149|               mask[MaskWords - 1] &= ExcessMask;
 1325|    149|            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|    149|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|    149|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|    149|            mask[0] |= 1;
 1331|       |
 1332|    149|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|    149|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|    149|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|    149|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|    149|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|    149|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|    149|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    149|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|      0|            m_bytes.resize(C::Scalar::BYTES);
 1346|      0|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|      0|            m_bits = C::Scalar::BITS;
 1348|      0|         }
 1349|       |
 1350|    149|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    149|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm6EE4bitsEv:
 1305|    149|      size_t bits() const { return m_bits; }
pcurves_brainpool384r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm4EE20compute_full_windowsEmm:
 1468|    149|      static constexpr size_t compute_full_windows(size_t sb, size_t wb) {
 1469|    149|         if(sb % wb == 0) {
  ------------------
  |  Branch (1469:13): [True: 0, False: 149]
  ------------------
 1470|      0|            return (sb - 1) / wb;
 1471|    149|         } else {
 1472|    149|            return sb / wb;
 1473|    149|         }
 1474|    149|      }
pcurves_brainpool384r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm4EE21compute_initial_shiftEmm:
 1476|    149|      static constexpr size_t compute_initial_shift(size_t sb, size_t wb) {
 1477|    149|         if(sb % wb == 0) {
  ------------------
  |  Branch (1477:13): [True: 0, False: 149]
  ------------------
 1478|      0|            return wb;
 1479|    149|         } else {
 1480|    149|            return sb - (sb / wb) * wb;
 1481|    149|         }
 1482|    149|      }
pcurves_brainpool384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E8identityEv:
 1038|    149|      static constexpr Self identity() { return Self(FieldElement::zero(), FieldElement::one(), FieldElement::zero()); }
pcurves_brainpool384r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm6EE10get_windowEm:
 1353|  12.9k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  12.9k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  12.9k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E5dbl_nEm:
 1108|  12.8k|      constexpr Self dbl_n(size_t n) const {
 1109|       |         if constexpr(Self::A_is_minus_3) {
 1110|       |            return dbl_n_a_minus_3(*this, n);
 1111|       |         } else if constexpr(Self::A_is_zero) {
 1112|       |            return dbl_n_a_zero(*this, n);
 1113|  12.8k|         } else {
 1114|  12.8k|            return dbl_n_generic(*this, A, n);
 1115|  12.8k|         }
 1116|  12.8k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE4div2Ev:
  302|  12.8k|      Self div2() const {
  303|       |         // The inverse of 2 modulo P is (P/2)+1; this avoids a constexpr time
  304|       |         // general inversion, which some compilers can't handle
  305|  12.8k|         constexpr auto INV_2 = p_div_2_plus_1(Rep::P);
  306|       |
  307|       |         // We could multiply by INV_2 but there is a better way ...
  308|       |
  309|  12.8k|         std::array<W, N> t = value();
  310|  12.8k|         const W borrow = shift_right<1>(t);
  311|       |
  312|       |         // If value was odd, add (P/2)+1
  313|  12.8k|         const auto mask = CT::Mask<W>::expand(borrow).value();
  314|       |
  315|  12.8k|         W carry = 0;
  316|       |
  317|  89.6k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (317:28): [True: 76.8k, False: 12.8k]
  ------------------
  318|  76.8k|            t[i] = word_add(t[i], INV_2[i] & mask, &carry);
  319|  76.8k|         }
  320|       |
  321|  12.8k|         return Self(t);
  322|  12.8k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm6EED2Ev:
 1358|    149|      ~BlindedScalarBits() {
 1359|    149|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    149|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    149|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E12ScalarParamsEEEE7is_zeroEv:
  225|    696|      constexpr CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_val.size()).as_choice(); }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEEeqERKSA_:
  722|    705|      constexpr CT::Choice operator==(const Self& other) const {
  723|    705|         return CT::is_equal(this->data(), other.data(), N).as_choice();
  724|    705|      }
pcurves_brainpool384r1.cpp:_ZN5Botan13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsENS_13MontgomeryRepEE7x3_ax_bERKNS_6IntModINS5_INS6_11FieldParamsEEEEE:
 1275|    705|      static constexpr FieldElement x3_ax_b(const FieldElement& x) { return (x.square() + A) * x + B; }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE4sqrtEv:
  663|    202|      constexpr CT::Option<Self> sqrt() const {
  664|    202|         if constexpr(Self::P_MOD_4 == 3) {
  665|       |            // The easy case for square root is when p == 3 (mod 4)
  666|       |
  667|    202|            constexpr auto P_PLUS_1_OVER_4 = p_plus_1_over_4(P);
  668|    202|            auto z = pow_vartime(P_PLUS_1_OVER_4);
  669|       |
  670|       |            // Zero out the return value if it would otherwise be incorrect
  671|    202|            const CT::Choice correct = (z.square() == *this);
  672|    202|            z.conditional_assign(!correct, Self::zero());
  673|    202|            return CT::Option<Self>(z, correct);
  674|       |         } else {
  675|       |            // Shanks-Tonelli, following I.4 in RFC 9380
  676|       |
  677|       |            /*
  678|       |            Constants:
  679|       |            1. c1, the largest integer such that 2^c1 divides q - 1.
  680|       |            2. c2 = (q - 1) / (2^c1)        # Integer arithmetic
  681|       |            3. c3 = (c2 - 1) / 2            # Integer arithmetic
  682|       |            4. c4, a non-square value in F
  683|       |            5. c5 = c4^c2 in F
  684|       |            */
  685|       |            constexpr auto C1_C2 = shanks_tonelli_c1c2(Self::P);
  686|       |            constexpr std::array<W, N> C3 = shanks_tonelli_c3(C1_C2.second);
  687|       |            constexpr std::array<W, N> P_MINUS_1_OVER_2 = p_minus_1_over_2(Self::P);
  688|       |            constexpr Self C4 = shanks_tonelli_c4<Self>(P_MINUS_1_OVER_2);
  689|       |            constexpr Self C5 = C4.pow_vartime(C1_C2.second);
  690|       |
  691|       |            const Self& x = (*this);
  692|       |
  693|       |            auto z = x.pow_vartime(C3);
  694|       |            auto t = z.square();
  695|       |            t *= x;
  696|       |            z *= x;
  697|       |            auto b = t;
  698|       |            auto c = C5;
  699|       |
  700|       |            for(size_t i = C1_C2.first; i >= 2; i--) {
  701|       |               b.square_n(i - 2);
  702|       |               const CT::Choice e = b.is_one();
  703|       |               z.conditional_assign(!e, z * c);
  704|       |               c.square_n(1);
  705|       |               t.conditional_assign(!e, t * c);
  706|       |               b = t;
  707|       |            }
  708|       |
  709|       |            // Zero out the return value if it would otherwise be incorrect
  710|       |            const CT::Choice correct = (z.square() == *this);
  711|       |            z.conditional_assign(!correct, Self::zero());
  712|       |            return CT::Option<Self>(z, correct);
  713|       |         }
  714|    202|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE12correct_signENS_2CT6ChoiceE:
  248|    149|      constexpr Self correct_sign(CT::Choice even) const {
  249|    149|         const auto flip = (even != this->is_even());
  250|    149|         return Self::choose(flip, this->negate(), *this);
  251|    149|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE7is_evenEv:
  240|    149|      constexpr CT::Choice is_even() const {
  241|    149|         auto v = Rep::from_rep(m_val);
  242|    149|         return !CT::Choice::from_int(v[0] & 0x01);
  243|    149|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE6chooseENS_2CT6ChoiceERKSA_SE_:
  256|    149|      static constexpr Self choose(CT::Choice choice, const Self& x, const Self& y) {
  257|    149|         auto r = y;
  258|    149|         r.conditional_assign(choice, x);
  259|    149|         return r;
  260|    149|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E12ScalarParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|    690|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|    690|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 690]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|    690|         const auto words = bytes_to_words<W, N, BYTES>(bytes.first<Self::BYTES>());
  799|       |
  800|       |         // Conditional acceptable: std::optional is implicitly not constant time
  801|    690|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 342, False: 348]
  ------------------
  802|    342|            return {};
  803|    342|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|    348|         return Self::from_words(words);
  807|    690|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E12ScalarParamsEEEE10from_wordsILm6EEESA_NSt3__15arrayImXT_EEE:
  211|    348|      static constexpr Self from_words(std::array<W, L> w) {
  212|    348|         if constexpr(L == N) {
  213|    348|            return Self(Rep::to_rep(w));
  214|       |         } else {
  215|       |            static_assert(L < N);
  216|       |            std::array<W, N> ew = {};
  217|       |            copy_mem(std::span{ew}.template first<L>(), w);
  218|       |            return Self(Rep::to_rep(ew));
  219|       |         }
  220|    348|      }
pcurves_brainpool384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES0_E12ScalarParamsEE6to_repERKNSt3__15arrayImLm6EEE:
  115|    348|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|    348|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|    348|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|    348|         return Self::redc(z);
  119|    348|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEEE12serialize_toENSt3__14spanIhLm97EEE:
  941|    944|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  942|    944|         BOTAN_STATE_CHECK(this->is_identity().as_bool() == false);
  ------------------
  |  |   51|    944|   do {                                                         \
  |  |   52|    944|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    944|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 944]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    944|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 944]
  |  |  ------------------
  ------------------
  943|    944|         BufferStuffer pack(bytes);
  944|    944|         pack.append(0x04);
  945|    944|         x().serialize_to(pack.next<FieldElement::BYTES>());
  946|    944|         y().serialize_to(pack.next<FieldElement::BYTES>());
  947|    944|         BOTAN_DEBUG_ASSERT(pack.full());
  ------------------
  |  |  137|    944|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|    944|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 944]
  |  |  ------------------
  ------------------
  948|    944|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E12ScalarParamsEEEE6randomERNS_21RandomNumberGeneratorE:
  851|    348|      static Self random(RandomNumberGenerator& rng) {
  852|    348|         constexpr size_t MAX_ATTEMPTS = 1000;
  853|       |
  854|    348|         std::array<uint8_t, Self::BYTES> buf{};
  855|       |
  856|    690|         for(size_t i = 0; i != MAX_ATTEMPTS; ++i) {
  ------------------
  |  Branch (856:28): [True: 690, False: 0]
  ------------------
  857|    690|            rng.randomize(buf);
  858|       |
  859|       |            // Zero off high bits that if set would certainly cause us
  860|       |            // to be out of range
  861|       |            if constexpr(Self::BITS % 8 != 0) {
  862|       |               constexpr uint8_t mask = 0xFF >> (8 - (Self::BITS % 8));
  863|       |               buf[0] &= mask;
  864|       |            }
  865|       |
  866|       |            // Conditionals ok: rejection sampling reveals only values we didn't use
  867|    690|            if(auto s = Self::deserialize(buf)) {
  ------------------
  |  Branch (867:21): [True: 348, False: 342]
  ------------------
  868|    348|               if(s.value().is_nonzero().as_bool()) {
  ------------------
  |  Branch (868:19): [True: 348, False: 0]
  ------------------
  869|    348|                  return s.value();
  870|    348|               }
  871|    348|            }
  872|    690|         }
  873|       |
  874|      0|         throw Internal_Error("Failed to generate random Scalar within bounded number of attempts");
  875|    348|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E12ScalarParamsEEEE10is_nonzeroEv:
  230|    348|      constexpr CT::Choice is_nonzero() const { return !is_zero(); }
pcurves_brainpool512r1.cpp:_ZN5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm6EEC2ERKNS_16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
 1405|      1|            m_table(basemul_booth_setup<C, WindowBits>(p, BlindedScalar::Bits + 1)) {}
pcurves_brainpool512r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E11from_affineERKNS_16AffineCurvePointISB_EE:
 1016|    785|      static constexpr Self from_affine(const AffinePoint& pt) {
 1017|       |         /*
 1018|       |         * If the point is the identity element (x=0, y=0) then instead of
 1019|       |         * creating (x, y, 1) = (0, 0, 1) we want our projective identity
 1020|       |         * encoding of (0, 1, 0)
 1021|       |         *
 1022|       |         * Which we can achieve by a conditional swap of y and z if the
 1023|       |         * affine point is the identity.
 1024|       |         */
 1025|       |
 1026|    785|         auto x = pt.x();
 1027|    785|         auto y = pt.y();
 1028|    785|         auto z = FieldElement::one();
 1029|       |
 1030|    785|         FieldElement::conditional_swap(pt.is_identity(), y, z);
 1031|       |
 1032|    785|         return ProjectiveCurvePoint(x, y, z);
 1033|    785|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEEE1xEv:
  971|  1.69M|      constexpr const FieldElement& x() const { return m_x; }
pcurves_brainpool512r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEEE1yEv:
  976|  1.63M|      constexpr const FieldElement& y() const { return m_y; }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE3oneEv:
  200|  62.4k|      static constexpr Self one() { return Self(Rep::one()); }
pcurves_brainpool512r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES0_E11FieldParamsEE3oneEv:
   99|  62.4k|      constexpr static std::array<W, N> one() { return R1; }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEEC2ENSt3__15arrayImLm8EEE:
  898|  3.36M|      explicit constexpr IntMod(std::array<W, N> v) : m_val(v) {}
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE16conditional_swapENS_2CT6ChoiceERSA_SD_:
  410|    785|      static constexpr void conditional_swap(CT::Choice cond, Self& x, Self& y) {
  411|    785|         const W mask = cond.into_bitmask<W>();
  412|       |
  413|  7.06k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (413:28): [True: 6.28k, False: 785]
  ------------------
  414|  6.28k|            auto nx = Botan::choose(mask, y.m_val[i], x.m_val[i]);
  415|  6.28k|            auto ny = Botan::choose(mask, x.m_val[i], y.m_val[i]);
  416|  6.28k|            x.m_val[i] = nx;
  417|  6.28k|            y.m_val[i] = ny;
  418|  6.28k|         }
  419|    785|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEEE11is_identityEv:
  928|  63.9k|      constexpr CT::Choice is_identity() const { return x().is_zero() && y().is_zero(); }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE7is_zeroEv:
  225|   324k|      constexpr CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_val.size()).as_choice(); }
pcurves_brainpool512r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_EC2ERKSB_SE_SE_:
 1056|  91.5k|            m_x(x), m_y(y), m_z(z) {}
pcurves_brainpool512r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E3dblEv:
 1121|  3.34k|      constexpr Self dbl() const {
 1122|       |         if constexpr(Self::A_is_minus_3) {
 1123|       |            return dbl_a_minus_3(*this);
 1124|       |         } else if constexpr(Self::A_is_zero) {
 1125|       |            return dbl_a_zero(*this);
 1126|  3.34k|         } else {
 1127|  3.34k|            return dbl_generic(*this, A);
 1128|  3.34k|         }
 1129|  3.34k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E1zEv:
 1172|   369k|      constexpr const FieldElement& z() const { return m_z; }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE6squareEv:
  426|   769k|      constexpr BOTAN_FORCE_INLINE Self square() const {
  427|   769k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  428|   769k|         comba_sqr<N>(z.data(), this->data());
  429|   769k|         return Self(Rep::redc(z));
  430|   769k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE4dataEv:
  896|  3.68M|      constexpr const W* data() const { return m_val.data(); }
pcurves_brainpool512r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES0_E11FieldParamsEE4redcERKNSt3__15arrayImLm16EEE:
  104|  2.45M|      constexpr static std::array<W, N> redc(const std::array<W, 2 * N>& z) {
  105|       |         if constexpr(P_dash == 1) {
  106|       |            return monty_redc_pdash1(z, P);
  107|  2.45M|         } else {
  108|  2.45M|            return monty_redc(z, P, P_dash);
  109|  2.45M|         }
  110|  2.45M|      }
pcurves_brainpool512r1.cpp:_ZN5BotanplERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEEESC_:
  265|   314k|      friend constexpr BOTAN_FORCE_INLINE Self operator+(const Self& a, const Self& b) {
  266|   314k|         std::array<W, N> t;  // NOLINT(*-member-init)
  267|       |
  268|   314k|         W carry = 0;
  269|  2.82M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (269:28): [True: 2.51M, False: 314k]
  ------------------
  270|  2.51M|            t[i] = word_add(a.m_val[i], b.m_val[i], &carry);
  271|  2.51M|         }
  272|       |
  273|   314k|         std::array<W, N> r;  // NOLINT(*-member-init)
  274|   314k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  275|   314k|         return Self(r);
  276|   314k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E1xEv:
 1162|   226k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE4mul3Ev:
  335|   125k|      constexpr inline Self mul3() const { return mul2() + (*this); }
pcurves_brainpool512r1.cpp:_ZN5BotanmlERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEEESC_:
  346|   840k|      friend constexpr BOTAN_FORCE_INLINE Self operator*(const Self& a, const Self& b) {
  347|   840k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  348|   840k|         comba_mul<N>(z.data(), a.data(), b.data());
  349|   840k|         return Self(Rep::redc(z));
  350|   840k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E1yEv:
 1167|   226k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE4mul4Ev:
  338|  3.34k|      constexpr inline Self mul4() const { return mul2().mul2(); }
pcurves_brainpool512r1.cpp:_ZN5BotanmiERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEEESC_:
  281|   747k|      friend constexpr BOTAN_FORCE_INLINE Self operator-(const Self& a, const Self& b) {
  282|   747k|         std::array<W, N> r;  // NOLINT(*-member-init)
  283|   747k|         W carry = 0;
  284|  6.72M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (284:28): [True: 5.97M, False: 747k]
  ------------------
  285|  5.97M|            r[i] = word_sub(a.m_val[i], b.m_val[i], &carry);
  286|  5.97M|         }
  287|       |
  288|   747k|         const auto mask = CT::Mask<W>::expand(carry).value();
  289|       |
  290|   747k|         carry = 0;
  291|       |
  292|  6.72M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (292:28): [True: 5.97M, False: 747k]
  ------------------
  293|  5.97M|            r[i] = word_add(r[i], P[i] & mask, &carry);
  294|  5.97M|         }
  295|       |
  296|   747k|         return Self(r);
  297|   747k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE4mul2Ev:
  325|   416k|      constexpr BOTAN_FORCE_INLINE Self mul2() const {
  326|   416k|         std::array<W, N> t = value();
  327|   416k|         const W carry = shift_left<1>(t);
  328|       |
  329|   416k|         std::array<W, N> r;  // NOLINT(*-member-init)
  330|   416k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  331|   416k|         return Self(r);
  332|   416k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE5valueEv:
  894|   441k|      constexpr const std::array<W, N>& value() const { return m_val; }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE4mul8Ev:
  341|  3.34k|      constexpr inline Self mul8() const { return mul2().mul2().mul2(); }
pcurves_brainpool512r1.cpp:_ZN5BotanplERKNS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_EESE_:
 1064|  1.45k|      friend constexpr Self operator+(const Self& a, const Self& b) { return Self::add(a, b); }
pcurves_brainpool512r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E3addERKSC_SE_:
 1103|  1.45k|      constexpr static Self add(const Self& a, const Self& b) { return point_add<Self, FieldElement>(a, b); }
pcurves_brainpool512r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E11is_identityEv:
 1082|  70.0k|      constexpr CT::Choice is_identity() const { return z().is_zero(); }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE18conditional_assignERSA_SB_SB_NS_2CT6ChoiceERKSA_SF_SF_:
  395|   124k|         Self& x, Self& y, Self& z, CT::Choice cond, const Self& nx, const Self& ny, const Self& nz) {
  396|   124k|         const W mask = cond.into_bitmask<W>();
  397|       |
  398|  1.11M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (398:28): [True: 994k, False: 124k]
  ------------------
  399|   994k|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  400|   994k|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  401|   994k|            z.m_val[i] = Botan::choose(mask, nz.m_val[i], z.m_val[i]);
  402|   994k|         }
  403|   124k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE6invertEv:
  538|    784|      constexpr Self invert() const { return pow_vartime(Self::P_MINUS_2); }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE11pow_vartimeERKNSt3__15arrayImLm8EEE:
  477|  1.00k|      constexpr Self pow_vartime(const std::array<W, N>& exp) const {
  478|  1.00k|         constexpr size_t WindowBits = (Self::BITS <= 256) ? 4 : 5;
  ------------------
  |  Branch (478:40): [Folded, False: 1.00k]
  ------------------
  479|  1.00k|         constexpr size_t WindowElements = (1 << WindowBits) - 1;
  480|       |
  481|  1.00k|         constexpr size_t Windows = (Self::BITS + WindowBits - 1) / WindowBits;
  482|       |
  483|       |         /*
  484|       |         A simple fixed width window modular multiplication.
  485|       |
  486|       |         TODO: investigate using sliding window here
  487|       |         */
  488|       |
  489|  1.00k|         std::array<Self, WindowElements> tbl;
  490|       |
  491|  1.00k|         tbl[0] = (*this);
  492|       |
  493|  31.2k|         for(size_t i = 1; i != WindowElements; ++i) {
  ------------------
  |  Branch (493:28): [True: 30.2k, False: 1.00k]
  ------------------
  494|       |            // Conditional ok: table indexes are public here
  495|  30.2k|            if(i % 2 == 1) {
  ------------------
  |  Branch (495:16): [True: 15.1k, False: 15.1k]
  ------------------
  496|  15.1k|               tbl[i] = tbl[i / 2].square();
  497|  15.1k|            } else {
  498|  15.1k|               tbl[i] = tbl[i - 1] * tbl[0];
  499|  15.1k|            }
  500|  30.2k|         }
  501|       |
  502|  1.00k|         auto r = Self::one();
  503|       |
  504|  1.00k|         const size_t w0 = read_window_bits<WindowBits>(std::span{exp}, (Windows - 1) * WindowBits);
  505|       |
  506|       |         // Conditional ok: this function is variable time
  507|  1.00k|         if(w0 > 0) {
  ------------------
  |  Branch (507:13): [True: 784, False: 225]
  ------------------
  508|    784|            r = tbl[w0 - 1];
  509|    784|         }
  510|       |
  511|   103k|         for(size_t i = 1; i != Windows; ++i) {
  ------------------
  |  Branch (511:28): [True: 102k, False: 1.00k]
  ------------------
  512|   102k|            r.square_n(WindowBits);
  513|       |
  514|   102k|            const size_t w = read_window_bits<WindowBits>(std::span{exp}, (Windows - i - 1) * WindowBits);
  515|       |
  516|       |            // Conditional ok: this function is variable time
  517|   102k|            if(w > 0) {
  ------------------
  |  Branch (517:16): [True: 100k, False: 2.69k]
  ------------------
  518|   100k|               r *= tbl[w - 1];
  519|   100k|            }
  520|   102k|         }
  521|       |
  522|  1.00k|         return r;
  523|  1.00k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEEC2Ev:
  180|  31.2k|      constexpr IntMod() : m_val({}) {}
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE8square_nEm:
  439|   102k|      constexpr void square_n(size_t n) {
  440|   102k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  441|   617k|         for(size_t i = 0; i != n; ++i) {
  ------------------
  |  Branch (441:28): [True: 514k, False: 102k]
  ------------------
  442|   514k|            comba_sqr<N>(z.data(), this->data());
  443|   514k|            m_val = Rep::redc(z);
  444|   514k|         }
  445|   102k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEEmLERKSA_:
  355|   326k|      constexpr BOTAN_FORCE_INLINE Self& operator*=(const Self& other) {
  356|   326k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  357|   326k|         comba_mul<N>(z.data(), data(), other.data());
  358|   326k|         m_val = Rep::redc(z);
  359|   326k|         return (*this);
  360|   326k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE14invert_vartimeEv:
  598|      1|      constexpr Self invert_vartime() const {
  599|       |         // Conditional ok: this function is variable time
  600|      1|         if(this->is_zero().as_bool()) {
  ------------------
  |  Branch (600:13): [True: 0, False: 1]
  ------------------
  601|      0|            return Self::zero();
  602|      0|         }
  603|       |
  604|      1|         auto x = Self(std::array<W, N>{1});  // 1 in standard domain
  605|      1|         auto b = Self(this->to_words());     // *this in standard domain
  606|       |
  607|       |         // First loop iteration
  608|      1|         Self::_invert_vartime_div2_helper(b, x);
  609|       |
  610|      1|         auto a = b.negate();
  611|       |         // y += x but y is zero at the outset
  612|      1|         auto y = x;
  613|       |
  614|       |         // First half of second loop iteration
  615|      1|         Self::_invert_vartime_div2_helper(a, y);
  616|       |
  617|    366|         for(;;) {
  618|       |            // Conditional ok: this function is variable time
  619|    366|            if(a.m_val == b.m_val) {
  ------------------
  |  Branch (619:16): [True: 1, False: 365]
  ------------------
  620|       |               // At this point it should be that a == b == 1
  621|      1|               auto r = y.negate();
  622|       |
  623|       |               // Convert back to Montgomery if required
  624|      1|               r.m_val = Rep::to_rep(r.m_val);
  625|      1|               return r;
  626|      1|            }
  627|       |
  628|    365|            auto nx = x + y;
  629|       |
  630|       |            /*
  631|       |            * Otherwise either b > a or a > b
  632|       |            *
  633|       |            * If b > a we want to set b to b - a
  634|       |            * Otherwise we want to set a to a - b
  635|       |            *
  636|       |            * Compute r = b - a and check if it underflowed
  637|       |            * If it did not then we are in the b > a path
  638|       |            */
  639|    365|            std::array<W, N> r;  // NOLINT(*-member-init)
  640|    365|            const word carry = bigint_sub3(r.data(), b.data(), N, a.data(), N);
  641|       |
  642|       |            // Conditional ok: this function is variable time
  643|    365|            if(carry == 0) {
  ------------------
  |  Branch (643:16): [True: 175, False: 190]
  ------------------
  644|       |               // b > a
  645|    175|               b.m_val = r;
  646|    175|               x = nx;
  647|    175|               Self::_invert_vartime_div2_helper(b, x);
  648|    190|            } else {
  649|       |               // We know this can't underflow because a > b
  650|    190|               bigint_sub3(r.data(), a.data(), N, b.data(), N);
  651|    190|               a.m_val = r;
  652|    190|               y = nx;
  653|    190|               Self::_invert_vartime_div2_helper(a, y);
  654|    190|            }
  655|    365|         }
  656|      1|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE4zeroEv:
  195|   119k|      static constexpr Self zero() { return Self(std::array<W, N>{0}); }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE8to_wordsEv:
  734|      1|      constexpr std::array<W, Self::N> to_words() const { return Rep::from_rep(m_val); }
pcurves_brainpool512r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES0_E11FieldParamsEE8from_repERKNSt3__15arrayImLm8EEE:
  137|  2.84k|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|  2.84k|         std::array<W, 2 * N> ze = {};
  139|  2.84k|         copy_mem(std::span{ze}.template first<N>(), z);
  140|  2.84k|         return Self::redc(ze);
  141|  2.84k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE27_invert_vartime_div2_helperERSA_SB_:
  547|    367|      static constexpr void _invert_vartime_div2_helper(Self& a, Self& x) {
  548|    367|         constexpr auto INV_2 = p_div_2_plus_1(Rep::P);
  549|       |
  550|       |         // Conditional ok: this function is variable time
  551|  1.08k|         while((a.m_val[0] & 1) != 1) {
  ------------------
  |  Branch (551:16): [True: 713, False: 367]
  ------------------
  552|    713|            shift_right<1>(a.m_val);
  553|       |
  554|    713|            const W borrow = shift_right<1>(x.m_val);
  555|       |
  556|       |            // Conditional ok: this function is variable time
  557|    713|            if(borrow) {
  ------------------
  |  Branch (557:16): [True: 362, False: 351]
  ------------------
  558|    362|               bigint_add2(x.m_val.data(), N, INV_2.data(), N);
  559|    362|            }
  560|    713|         }
  561|    367|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE6negateEv:
  452|  59.7k|      constexpr Self negate() const {
  453|  59.7k|         const W x_is_zero = ~CT::all_zeros(this->data(), N).value();
  454|       |
  455|  59.7k|         std::array<W, N> r;  // NOLINT(*-member-init)
  456|  59.7k|         W carry = 0;
  457|   537k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (457:28): [True: 477k, False: 59.7k]
  ------------------
  458|   477k|            r[i] = word_sub(P[i] & x_is_zero, m_val[i], &carry);
  459|   477k|         }
  460|       |
  461|  59.7k|         return Self(r);
  462|  59.7k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES0_E11FieldParamsEE6to_repERKNSt3__15arrayImLm8EEE:
  115|  3.04k|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|  3.04k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|  3.04k|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|  3.04k|         return Self::redc(z);
  119|  3.04k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEEEC2ERKSB_SE_:
  917|  69.4k|      constexpr AffineCurvePoint(const FieldElement& x, const FieldElement& y) : m_x(x), m_y(y) {}
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|  2.64k|      std::array<W, L> stash_value() const {
  760|  2.64k|         static_assert(L >= N);
  761|  2.64k|         std::array<W, L> stash = {};
  762|  23.8k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 21.1k, False: 2.64k]
  ------------------
  763|  21.1k|            stash[i] = m_val[i];
  764|  21.1k|         }
  765|  2.64k|         return stash;
  766|  2.64k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm6EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1407|    360|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1408|    360|         const BlindedScalar scalar(s, rng);
 1409|    360|         return basemul_booth_exec<C, WindowBits>(m_table, scalar, rng);
 1410|    360|      }
pcurves_brainpool512r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm7EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    360|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    360|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 360, Folded]
  |  Branch (1308:33): [True: 360, False: 0]
  ------------------
 1309|    360|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|    360|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|    360|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|    360|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|    360|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|    360|            W mask[n_words] = {0};
 1318|    360|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|    360|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|       |            if constexpr(ExcessBits > 0) {
 1323|       |               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|       |               mask[MaskWords - 1] &= ExcessMask;
 1325|       |            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|    360|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|    360|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|    360|            mask[0] |= 1;
 1331|       |
 1332|    360|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|    360|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|    360|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|    360|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|    360|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|    360|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|    360|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    360|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|      0|            m_bytes.resize(C::Scalar::BYTES);
 1346|      0|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|      0|            m_bits = C::Scalar::BITS;
 1348|      0|         }
 1349|       |
 1350|    360|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    360|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E12ScalarParamsEEEE8to_wordsEv:
  734|    572|      constexpr std::array<W, Self::N> to_words() const { return Rep::from_rep(m_val); }
pcurves_brainpool512r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES0_E12ScalarParamsEE8from_repERKNSt3__15arrayImLm8EEE:
  137|    932|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|    932|         std::array<W, 2 * N> ze = {};
  139|    932|         copy_mem(std::span{ze}.template first<N>(), z);
  140|    932|         return Self::redc(ze);
  141|    932|      }
pcurves_brainpool512r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES0_E12ScalarParamsEE4redcERKNSt3__15arrayImLm16EEE:
  104|  1.29k|      constexpr static std::array<W, N> redc(const std::array<W, 2 * N>& z) {
  105|       |         if constexpr(P_dash == 1) {
  106|       |            return monty_redc_pdash1(z, P);
  107|  1.29k|         } else {
  108|  1.29k|            return monty_redc(z, P, P_dash);
  109|  1.29k|         }
  110|  1.29k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E12ScalarParamsEEEE12serialize_toENSt3__14spanIhLm64EEE:
  739|    360|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    360|         auto v = Rep::from_rep(m_val);
  741|    360|         std::reverse(v.begin(), v.end());
  742|       |
  743|    360|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|    360|            store_be(bytes, v);
  745|       |         } else {
  746|       |            // Remove leading zero bytes
  747|       |            const auto padded_bytes = store_be(v);
  748|       |            constexpr size_t extra = N * WordInfo<W>::bytes - Self::BYTES;
  749|       |            copy_mem(bytes, std::span{padded_bytes}.template subspan<extra, Self::BYTES>());
  750|       |         }
  751|    360|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm7EE4bitsEv:
 1305|    360|      size_t bits() const { return m_bits; }
pcurves_brainpool512r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E18conditional_assignENS_2CT6ChoiceERKSC_:
 1084|    572|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
 1085|    572|         FieldElement::conditional_assign(m_x, m_y, m_z, cond, pt.x(), pt.y(), pt.z());
 1086|    572|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E6negateEv:
 1134|    572|      constexpr Self negate() const { return Self(x(), y().negate(), z()); }
pcurves_brainpool512r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E18_const_time_poisonEv:
 1174|    572|      constexpr void _const_time_poison() const { CT::poison_all(m_x, m_y, m_z); }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE18_const_time_poisonEv:
  889|  1.71k|      constexpr void _const_time_poison() const { CT::poison(m_val); }
pcurves_brainpool512r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm7EE10get_windowEm:
 1353|  34.9k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  34.9k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  34.9k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E10add_or_subERKSC_RKNS_16AffineCurvePointISB_EENS_2CT6ChoiceE:
 1096|  58.9k|      constexpr static Self add_or_sub(const Self& a, const AffinePoint& b, CT::Choice sub) {
 1097|  58.9k|         return point_add_or_sub_mixed<Self, AffinePoint, FieldElement>(a, b, sub, FieldElement::one());
 1098|  58.9k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE18conditional_assignENS_2CT6ChoiceERKSA_:
  367|  59.3k|      constexpr void conditional_assign(CT::Choice cond, const Self& nx) {
  368|  59.3k|         const W mask = cond.into_bitmask<W>();
  369|       |
  370|   534k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (370:28): [True: 475k, False: 59.3k]
  ------------------
  371|   475k|            m_val[i] = Botan::choose(mask, nx.m_val[i], m_val[i]);
  372|   475k|         }
  373|  59.3k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEEE9ct_selectENSt3__14spanIKSC_Lm18446744073709551615EEEm:
  955|  34.9k|      static constexpr auto ct_select(std::span<const Self> pts, size_t idx) {
  956|  34.9k|         auto result = Self::identity(pts[0]);
  957|       |
  958|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
  959|  34.9k|         const size_t idx1 = static_cast<size_t>(idx - 1);
  960|  1.15M|         for(size_t i = 0; i != pts.size(); ++i) {
  ------------------
  |  Branch (960:28): [True: 1.11M, False: 34.9k]
  ------------------
  961|  1.11M|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
  962|  1.11M|            result.conditional_assign(found, pts[i]);
  963|  1.11M|         }
  964|       |
  965|  34.9k|         return result;
  966|  34.9k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEEE8identityERKSC_:
  924|  59.5k|      static constexpr Self identity(const Self& /*unused*/) {
  925|  59.5k|         return Self(FieldElement::zero(), FieldElement::zero());
  926|  59.5k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEEE18conditional_assignENS_2CT6ChoiceERKSC_:
  981|  1.51M|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
  982|  1.51M|         FieldElement::conditional_assign(m_x, m_y, cond, pt.x(), pt.y());
  983|  1.51M|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE18conditional_assignERSA_SB_NS_2CT6ChoiceERKSA_SF_:
  380|  1.51M|      static constexpr void conditional_assign(Self& x, Self& y, CT::Choice cond, const Self& nx, const Self& ny) {
  381|  1.51M|         const W mask = cond.into_bitmask<W>();
  382|       |
  383|  13.5M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (383:28): [True: 12.0M, False: 1.51M]
  ------------------
  384|  12.0M|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  385|  12.0M|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  386|  12.0M|         }
  387|  1.51M|      }
pcurves_brainpool512r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E13randomize_repERNS_21RandomNumberGeneratorE:
 1142|  2.28k|      void randomize_rep(RandomNumberGenerator& rng) {
 1143|       |         // In certain contexts we may be called with a Null_RNG; in that case the
 1144|       |         // caller is accepting that randomization will not occur
 1145|       |
 1146|       |         // Conditional ok: caller's RNG state (seeded vs not) is presumed public
 1147|  2.28k|         if(rng.is_seeded()) {
  ------------------
  |  Branch (1147:13): [True: 2.28k, False: 0]
  ------------------
 1148|  2.28k|            auto r = FieldElement::random(rng);
 1149|       |
 1150|  2.28k|            auto r2 = r.square();
 1151|  2.28k|            auto r3 = r2 * r;
 1152|       |
 1153|  2.28k|            m_x *= r2;
 1154|  2.28k|            m_y *= r3;
 1155|  2.28k|            m_z *= r;
 1156|  2.28k|         }
 1157|  2.28k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE6randomERNS_21RandomNumberGeneratorE:
  851|  2.28k|      static Self random(RandomNumberGenerator& rng) {
  852|  2.28k|         constexpr size_t MAX_ATTEMPTS = 1000;
  853|       |
  854|  2.28k|         std::array<uint8_t, Self::BYTES> buf{};
  855|       |
  856|  3.44k|         for(size_t i = 0; i != MAX_ATTEMPTS; ++i) {
  ------------------
  |  Branch (856:28): [True: 3.44k, False: 0]
  ------------------
  857|  3.44k|            rng.randomize(buf);
  858|       |
  859|       |            // Zero off high bits that if set would certainly cause us
  860|       |            // to be out of range
  861|       |            if constexpr(Self::BITS % 8 != 0) {
  862|       |               constexpr uint8_t mask = 0xFF >> (8 - (Self::BITS % 8));
  863|       |               buf[0] &= mask;
  864|       |            }
  865|       |
  866|       |            // Conditionals ok: rejection sampling reveals only values we didn't use
  867|  3.44k|            if(auto s = Self::deserialize(buf)) {
  ------------------
  |  Branch (867:21): [True: 2.28k, False: 1.15k]
  ------------------
  868|  2.28k|               if(s.value().is_nonzero().as_bool()) {
  ------------------
  |  Branch (868:19): [True: 2.28k, False: 0]
  ------------------
  869|  2.28k|                  return s.value();
  870|  2.28k|               }
  871|  2.28k|            }
  872|  3.44k|         }
  873|       |
  874|      0|         throw Internal_Error("Failed to generate random Scalar within bounded number of attempts");
  875|  2.28k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|  4.20k|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|  4.20k|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 4.20k]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|  4.20k|         const auto words = bytes_to_words<W, N, BYTES>(bytes.first<Self::BYTES>());
  799|       |
  800|       |         // Conditional acceptable: std::optional is implicitly not constant time
  801|  4.20k|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 1.16k, False: 3.04k]
  ------------------
  802|  1.16k|            return {};
  803|  1.16k|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|  3.04k|         return Self::from_words(words);
  807|  4.20k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE10from_wordsILm8EEESA_NSt3__15arrayImXT_EEE:
  211|  3.04k|      static constexpr Self from_words(std::array<W, L> w) {
  212|  3.04k|         if constexpr(L == N) {
  213|  3.04k|            return Self(Rep::to_rep(w));
  214|       |         } else {
  215|       |            static_assert(L < N);
  216|       |            std::array<W, N> ew = {};
  217|       |            copy_mem(std::span{ew}.template first<L>(), w);
  218|       |            return Self(Rep::to_rep(ew));
  219|       |         }
  220|  3.04k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE10is_nonzeroEv:
  230|  2.28k|      constexpr CT::Choice is_nonzero() const { return !is_zero(); }
pcurves_brainpool512r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E20_const_time_unpoisonEv:
 1176|    572|      constexpr void _const_time_unpoison() const { CT::unpoison_all(m_x, m_y, m_z); }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE20_const_time_unpoisonEv:
  891|  1.71k|      constexpr void _const_time_unpoison() const { CT::unpoison(m_val); }
pcurves_brainpool512r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm7EED2Ev:
 1358|    360|      ~BlindedScalarBits() {
 1359|    360|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    360|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    360|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E12ScalarParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|  1.29k|      static Self from_stash(const std::array<W, L>& stash) {
  775|  1.29k|         static_assert(L >= N);
  776|  1.29k|         std::array<W, N> val = {};
  777|  11.6k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 10.3k, False: 1.29k]
  ------------------
  778|  10.3k|            val[i] = stash[i];
  779|  10.3k|         }
  780|  1.29k|         return Self(val);
  781|  1.29k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E12ScalarParamsEEEEC2ENSt3__15arrayImLm8EEE:
  898|  1.65k|      explicit constexpr IntMod(std::array<W, N> v) : m_val(v) {}
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE12serialize_toENSt3__14spanIhLm64EEE:
  739|  2.62k|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|  2.62k|         auto v = Rep::from_rep(m_val);
  741|  2.62k|         std::reverse(v.begin(), v.end());
  742|       |
  743|  2.62k|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|  2.62k|            store_be(bytes, v);
  745|       |         } else {
  746|       |            // Remove leading zero bytes
  747|       |            const auto padded_bytes = store_be(v);
  748|       |            constexpr size_t extra = N * WordInfo<W>::bytes - Self::BYTES;
  749|       |            copy_mem(bytes, std::span{padded_bytes}.template subspan<extra, Self::BYTES>());
  750|       |         }
  751|  2.62k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E12ScalarParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|    360|      std::array<W, L> stash_value() const {
  760|    360|         static_assert(L >= N);
  761|    360|         std::array<W, L> stash = {};
  762|  3.24k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 2.88k, False: 360]
  ------------------
  763|  2.88k|            stash[i] = m_val[i];
  764|  2.88k|         }
  765|    360|         return stash;
  766|    360|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|  6.33k|      static Self from_stash(const std::array<W, L>& stash) {
  775|  6.33k|         static_assert(L >= N);
  776|  6.33k|         std::array<W, N> val = {};
  777|  57.0k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 50.6k, False: 6.33k]
  ------------------
  778|  50.6k|            val[i] = stash[i];
  779|  50.6k|         }
  780|  6.33k|         return Self(val);
  781|  6.33k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm4EEC2ERKNS_16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
 1487|    212|      explicit WindowedBoothMulTable(const AffinePoint& p) : m_table(varpoint_setup<C, TableSize>(p)) {}
pcurves_brainpool512r1.cpp:_ZN5BotanplERKNS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_EERKNS_16AffineCurvePointISB_EE:
 1066|  1.48k|      friend constexpr Self operator+(const Self& a, const AffinePoint& b) { return Self::add_mixed(a, b); }
pcurves_brainpool512r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E9add_mixedERKSC_RKNS_16AffineCurvePointISB_EE:
 1091|  1.48k|      constexpr static Self add_mixed(const Self& a, const AffinePoint& b) {
 1092|  1.48k|         return point_add_mixed<Self, AffinePoint, FieldElement>(a, b, FieldElement::one());
 1093|  1.48k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm4EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1489|    212|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1490|    212|         const BlindedScalar bits(s, rng);
 1491|       |
 1492|    212|         const size_t scalar_bits = bits.bits();
 1493|    212|         const size_t full_windows = compute_full_windows(scalar_bits + 1, WindowBits);
 1494|    212|         const size_t initial_shift = compute_initial_shift(scalar_bits + 1, WindowBits);
 1495|       |
 1496|    212|         BOTAN_DEBUG_ASSERT(full_windows * WindowBits + initial_shift == scalar_bits + 1);
  ------------------
  |  |  137|    212|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|    212|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 212]
  |  |  ------------------
  ------------------
 1497|    212|         BOTAN_DEBUG_ASSERT(initial_shift > 0);
  ------------------
  |  |  137|    212|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|    212|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 212]
  |  |  ------------------
  ------------------
 1498|       |
 1499|    212|         auto accum = ProjectivePoint::identity();
 1500|    212|         CT::poison(accum);
 1501|       |
 1502|  24.5k|         for(size_t i = 0; i != full_windows; ++i) {
  ------------------
  |  Branch (1502:28): [True: 24.3k, False: 212]
  ------------------
 1503|  24.3k|            const size_t idx = scalar_bits - initial_shift - WindowBits * i;
 1504|       |
 1505|  24.3k|            const size_t w_i = bits.get_window(idx);
 1506|  24.3k|            const auto [tidx, tneg] = booth_recode<WindowBits>(w_i);
 1507|       |
 1508|       |            // Conditional ok: loop iteration count is public
 1509|  24.3k|            if(i == 0) {
  ------------------
  |  Branch (1509:16): [True: 212, False: 24.1k]
  ------------------
 1510|    212|               accum = ProjectivePoint::from_affine(m_table.ct_select(tidx));
 1511|    212|               accum.conditional_assign(tneg, accum.negate());
 1512|  24.1k|            } else {
 1513|  24.1k|               accum = ProjectivePoint::add_or_sub(accum, m_table.ct_select(tidx), tneg);
 1514|  24.1k|            }
 1515|       |
 1516|  24.3k|            accum = accum.dbl_n(WindowBits);
 1517|       |
 1518|       |            // Conditional ok: loop iteration count is public
 1519|  24.3k|            if(i <= 3) {
  ------------------
  |  Branch (1519:16): [True: 848, False: 23.5k]
  ------------------
 1520|    848|               accum.randomize_rep(rng);
 1521|    848|            }
 1522|  24.3k|         }
 1523|       |
 1524|       |         // final window (note one bit shorter than previous reads)
 1525|    212|         const size_t w_l = bits.get_window(0) & ((1 << WindowBits) - 1);
 1526|    212|         const auto [tidx, tneg] = booth_recode<WindowBits>(w_l << 1);
 1527|    212|         accum = ProjectivePoint::add_or_sub(accum, m_table.ct_select(tidx), tneg);
 1528|       |
 1529|    212|         CT::unpoison(accum);
 1530|    212|         return accum;
 1531|    212|      }
pcurves_brainpool512r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm6EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    212|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    212|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 212, Folded]
  |  Branch (1308:33): [True: 212, False: 0]
  ------------------
 1309|    212|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|    212|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|    212|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|    212|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|    212|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|    212|            W mask[n_words] = {0};
 1318|    212|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|    212|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|       |            if constexpr(ExcessBits > 0) {
 1323|       |               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|       |               mask[MaskWords - 1] &= ExcessMask;
 1325|       |            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|    212|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|    212|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|    212|            mask[0] |= 1;
 1331|       |
 1332|    212|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|    212|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|    212|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|    212|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|    212|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|    212|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|    212|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    212|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|      0|            m_bytes.resize(C::Scalar::BYTES);
 1346|      0|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|      0|            m_bits = C::Scalar::BITS;
 1348|      0|         }
 1349|       |
 1350|    212|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    212|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm6EE4bitsEv:
 1305|    212|      size_t bits() const { return m_bits; }
pcurves_brainpool512r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm4EE20compute_full_windowsEmm:
 1468|    212|      static constexpr size_t compute_full_windows(size_t sb, size_t wb) {
 1469|    212|         if(sb % wb == 0) {
  ------------------
  |  Branch (1469:13): [True: 0, False: 212]
  ------------------
 1470|      0|            return (sb - 1) / wb;
 1471|    212|         } else {
 1472|    212|            return sb / wb;
 1473|    212|         }
 1474|    212|      }
pcurves_brainpool512r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm4EE21compute_initial_shiftEmm:
 1476|    212|      static constexpr size_t compute_initial_shift(size_t sb, size_t wb) {
 1477|    212|         if(sb % wb == 0) {
  ------------------
  |  Branch (1477:13): [True: 0, False: 212]
  ------------------
 1478|      0|            return wb;
 1479|    212|         } else {
 1480|    212|            return sb - (sb / wb) * wb;
 1481|    212|         }
 1482|    212|      }
pcurves_brainpool512r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E8identityEv:
 1038|    212|      static constexpr Self identity() { return Self(FieldElement::zero(), FieldElement::one(), FieldElement::zero()); }
pcurves_brainpool512r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm6EE10get_windowEm:
 1353|  24.5k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  24.5k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  24.5k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E5dbl_nEm:
 1108|  24.3k|      constexpr Self dbl_n(size_t n) const {
 1109|       |         if constexpr(Self::A_is_minus_3) {
 1110|       |            return dbl_n_a_minus_3(*this, n);
 1111|       |         } else if constexpr(Self::A_is_zero) {
 1112|       |            return dbl_n_a_zero(*this, n);
 1113|  24.3k|         } else {
 1114|  24.3k|            return dbl_n_generic(*this, A, n);
 1115|  24.3k|         }
 1116|  24.3k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE4div2Ev:
  302|  24.3k|      Self div2() const {
  303|       |         // The inverse of 2 modulo P is (P/2)+1; this avoids a constexpr time
  304|       |         // general inversion, which some compilers can't handle
  305|  24.3k|         constexpr auto INV_2 = p_div_2_plus_1(Rep::P);
  306|       |
  307|       |         // We could multiply by INV_2 but there is a better way ...
  308|       |
  309|  24.3k|         std::array<W, N> t = value();
  310|  24.3k|         const W borrow = shift_right<1>(t);
  311|       |
  312|       |         // If value was odd, add (P/2)+1
  313|  24.3k|         const auto mask = CT::Mask<W>::expand(borrow).value();
  314|       |
  315|  24.3k|         W carry = 0;
  316|       |
  317|   219k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (317:28): [True: 195k, False: 24.3k]
  ------------------
  318|   195k|            t[i] = word_add(t[i], INV_2[i] & mask, &carry);
  319|   195k|         }
  320|       |
  321|  24.3k|         return Self(t);
  322|  24.3k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm6EED2Ev:
 1358|    212|      ~BlindedScalarBits() {
 1359|    212|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    212|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    212|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E12ScalarParamsEEEE7is_zeroEv:
  225|    720|      constexpr CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_val.size()).as_choice(); }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEEeqERKSA_:
  722|    848|      constexpr CT::Choice operator==(const Self& other) const {
  723|    848|         return CT::is_equal(this->data(), other.data(), N).as_choice();
  724|    848|      }
pcurves_brainpool512r1.cpp:_ZN5Botan13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsENS_13MontgomeryRepEE7x3_ax_bERKNS_6IntModINS5_INS6_11FieldParamsEEEEE:
 1275|    848|      static constexpr FieldElement x3_ax_b(const FieldElement& x) { return (x.square() + A) * x + B; }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE4sqrtEv:
  663|    225|      constexpr CT::Option<Self> sqrt() const {
  664|    225|         if constexpr(Self::P_MOD_4 == 3) {
  665|       |            // The easy case for square root is when p == 3 (mod 4)
  666|       |
  667|    225|            constexpr auto P_PLUS_1_OVER_4 = p_plus_1_over_4(P);
  668|    225|            auto z = pow_vartime(P_PLUS_1_OVER_4);
  669|       |
  670|       |            // Zero out the return value if it would otherwise be incorrect
  671|    225|            const CT::Choice correct = (z.square() == *this);
  672|    225|            z.conditional_assign(!correct, Self::zero());
  673|    225|            return CT::Option<Self>(z, correct);
  674|       |         } else {
  675|       |            // Shanks-Tonelli, following I.4 in RFC 9380
  676|       |
  677|       |            /*
  678|       |            Constants:
  679|       |            1. c1, the largest integer such that 2^c1 divides q - 1.
  680|       |            2. c2 = (q - 1) / (2^c1)        # Integer arithmetic
  681|       |            3. c3 = (c2 - 1) / 2            # Integer arithmetic
  682|       |            4. c4, a non-square value in F
  683|       |            5. c5 = c4^c2 in F
  684|       |            */
  685|       |            constexpr auto C1_C2 = shanks_tonelli_c1c2(Self::P);
  686|       |            constexpr std::array<W, N> C3 = shanks_tonelli_c3(C1_C2.second);
  687|       |            constexpr std::array<W, N> P_MINUS_1_OVER_2 = p_minus_1_over_2(Self::P);
  688|       |            constexpr Self C4 = shanks_tonelli_c4<Self>(P_MINUS_1_OVER_2);
  689|       |            constexpr Self C5 = C4.pow_vartime(C1_C2.second);
  690|       |
  691|       |            const Self& x = (*this);
  692|       |
  693|       |            auto z = x.pow_vartime(C3);
  694|       |            auto t = z.square();
  695|       |            t *= x;
  696|       |            z *= x;
  697|       |            auto b = t;
  698|       |            auto c = C5;
  699|       |
  700|       |            for(size_t i = C1_C2.first; i >= 2; i--) {
  701|       |               b.square_n(i - 2);
  702|       |               const CT::Choice e = b.is_one();
  703|       |               z.conditional_assign(!e, z * c);
  704|       |               c.square_n(1);
  705|       |               t.conditional_assign(!e, t * c);
  706|       |               b = t;
  707|       |            }
  708|       |
  709|       |            // Zero out the return value if it would otherwise be incorrect
  710|       |            const CT::Choice correct = (z.square() == *this);
  711|       |            z.conditional_assign(!correct, Self::zero());
  712|       |            return CT::Option<Self>(z, correct);
  713|       |         }
  714|    225|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE12correct_signENS_2CT6ChoiceE:
  248|    212|      constexpr Self correct_sign(CT::Choice even) const {
  249|    212|         const auto flip = (even != this->is_even());
  250|    212|         return Self::choose(flip, this->negate(), *this);
  251|    212|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE7is_evenEv:
  240|    212|      constexpr CT::Choice is_even() const {
  241|    212|         auto v = Rep::from_rep(m_val);
  242|    212|         return !CT::Choice::from_int(v[0] & 0x01);
  243|    212|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE6chooseENS_2CT6ChoiceERKSA_SE_:
  256|    212|      static constexpr Self choose(CT::Choice choice, const Self& x, const Self& y) {
  257|    212|         auto r = y;
  258|    212|         r.conditional_assign(choice, x);
  259|    212|         return r;
  260|    212|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E12ScalarParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|    533|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|    533|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 533]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|    533|         const auto words = bytes_to_words<W, N, BYTES>(bytes.first<Self::BYTES>());
  799|       |
  800|       |         // Conditional acceptable: std::optional is implicitly not constant time
  801|    533|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 173, False: 360]
  ------------------
  802|    173|            return {};
  803|    173|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|    360|         return Self::from_words(words);
  807|    533|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E12ScalarParamsEEEE10from_wordsILm8EEESA_NSt3__15arrayImXT_EEE:
  211|    360|      static constexpr Self from_words(std::array<W, L> w) {
  212|    360|         if constexpr(L == N) {
  213|    360|            return Self(Rep::to_rep(w));
  214|       |         } else {
  215|       |            static_assert(L < N);
  216|       |            std::array<W, N> ew = {};
  217|       |            copy_mem(std::span{ew}.template first<L>(), w);
  218|       |            return Self(Rep::to_rep(ew));
  219|       |         }
  220|    360|      }
pcurves_brainpool512r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES0_E12ScalarParamsEE6to_repERKNSt3__15arrayImLm8EEE:
  115|    360|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|    360|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|    360|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|    360|         return Self::redc(z);
  119|    360|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEEE12serialize_toENSt3__14spanIhLm129EEE:
  941|  1.20k|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  942|  1.20k|         BOTAN_STATE_CHECK(this->is_identity().as_bool() == false);
  ------------------
  |  |   51|  1.20k|   do {                                                         \
  |  |   52|  1.20k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  1.20k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 1.20k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  1.20k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 1.20k]
  |  |  ------------------
  ------------------
  943|  1.20k|         BufferStuffer pack(bytes);
  944|  1.20k|         pack.append(0x04);
  945|  1.20k|         x().serialize_to(pack.next<FieldElement::BYTES>());
  946|  1.20k|         y().serialize_to(pack.next<FieldElement::BYTES>());
  947|  1.20k|         BOTAN_DEBUG_ASSERT(pack.full());
  ------------------
  |  |  137|  1.20k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  1.20k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 1.20k]
  |  |  ------------------
  ------------------
  948|  1.20k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E12ScalarParamsEEEE6randomERNS_21RandomNumberGeneratorE:
  851|    360|      static Self random(RandomNumberGenerator& rng) {
  852|    360|         constexpr size_t MAX_ATTEMPTS = 1000;
  853|       |
  854|    360|         std::array<uint8_t, Self::BYTES> buf{};
  855|       |
  856|    533|         for(size_t i = 0; i != MAX_ATTEMPTS; ++i) {
  ------------------
  |  Branch (856:28): [True: 533, False: 0]
  ------------------
  857|    533|            rng.randomize(buf);
  858|       |
  859|       |            // Zero off high bits that if set would certainly cause us
  860|       |            // to be out of range
  861|       |            if constexpr(Self::BITS % 8 != 0) {
  862|       |               constexpr uint8_t mask = 0xFF >> (8 - (Self::BITS % 8));
  863|       |               buf[0] &= mask;
  864|       |            }
  865|       |
  866|       |            // Conditionals ok: rejection sampling reveals only values we didn't use
  867|    533|            if(auto s = Self::deserialize(buf)) {
  ------------------
  |  Branch (867:21): [True: 360, False: 173]
  ------------------
  868|    360|               if(s.value().is_nonzero().as_bool()) {
  ------------------
  |  Branch (868:19): [True: 360, False: 0]
  ------------------
  869|    360|                  return s.value();
  870|    360|               }
  871|    360|            }
  872|    533|         }
  873|       |
  874|      0|         throw Internal_Error("Failed to generate random Scalar within bounded number of attempts");
  875|    360|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E12ScalarParamsEEEE10is_nonzeroEv:
  230|    360|      constexpr CT::Choice is_nonzero() const { return !is_zero(); }
pcurves_secp256r1.cpp:_ZN5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm6EEC2ERKNS_16AffineCurvePointINS_6IntModINS2_12Secp256r1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
 1405|      1|            m_table(basemul_booth_setup<C, WindowBits>(p, BlindedScalar::Bits + 1)) {}
pcurves_secp256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E11from_affineERKNS_16AffineCurvePointISB_EE:
 1016|  1.09k|      static constexpr Self from_affine(const AffinePoint& pt) {
 1017|       |         /*
 1018|       |         * If the point is the identity element (x=0, y=0) then instead of
 1019|       |         * creating (x, y, 1) = (0, 0, 1) we want our projective identity
 1020|       |         * encoding of (0, 1, 0)
 1021|       |         *
 1022|       |         * Which we can achieve by a conditional swap of y and z if the
 1023|       |         * affine point is the identity.
 1024|       |         */
 1025|       |
 1026|  1.09k|         auto x = pt.x();
 1027|  1.09k|         auto y = pt.y();
 1028|  1.09k|         auto z = FieldElement::one();
 1029|       |
 1030|  1.09k|         FieldElement::conditional_swap(pt.is_identity(), y, z);
 1031|       |
 1032|  1.09k|         return ProjectiveCurvePoint(x, y, z);
 1033|  1.09k|      }
pcurves_secp256r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEEE1xEv:
  971|  1.17M|      constexpr const FieldElement& x() const { return m_x; }
pcurves_secp256r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEEE1yEv:
  976|  1.13M|      constexpr const FieldElement& y() const { return m_y; }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE3oneEv:
  200|  43.7k|      static constexpr Self one() { return Self(Rep::one()); }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEEC2ENSt3__15arrayImLm4EEE:
  898|  2.50M|      explicit constexpr IntMod(std::array<W, N> v) : m_val(v) {}
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE16conditional_swapENS_2CT6ChoiceERSA_SD_:
  410|  1.09k|      static constexpr void conditional_swap(CT::Choice cond, Self& x, Self& y) {
  411|  1.09k|         const W mask = cond.into_bitmask<W>();
  412|       |
  413|  5.47k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (413:28): [True: 4.37k, False: 1.09k]
  ------------------
  414|  4.37k|            auto nx = Botan::choose(mask, y.m_val[i], x.m_val[i]);
  415|  4.37k|            auto ny = Botan::choose(mask, x.m_val[i], y.m_val[i]);
  416|  4.37k|            x.m_val[i] = nx;
  417|  4.37k|            y.m_val[i] = ny;
  418|  4.37k|         }
  419|  1.09k|      }
pcurves_secp256r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEEE11is_identityEv:
  928|  60.2k|      constexpr CT::Choice is_identity() const { return x().is_zero() && y().is_zero(); }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE7is_zeroEv:
  225|   260k|      constexpr CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_val.size()).as_choice(); }
pcurves_secp256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_EC2ERKSB_SE_SE_:
 1056|  67.1k|            m_x(x), m_y(y), m_z(z) {}
pcurves_secp256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E3dblEv:
 1121|  3.36k|      constexpr Self dbl() const {
 1122|  3.36k|         if constexpr(Self::A_is_minus_3) {
 1123|  3.36k|            return dbl_a_minus_3(*this);
 1124|       |         } else if constexpr(Self::A_is_zero) {
 1125|       |            return dbl_a_zero(*this);
 1126|       |         } else {
 1127|       |            return dbl_generic(*this, A);
 1128|       |         }
 1129|  3.36k|      }
pcurves_secp256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E1zEv:
 1172|   266k|      constexpr const FieldElement& z() const { return m_z; }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE6squareEv:
  426|   569k|      constexpr BOTAN_FORCE_INLINE Self square() const {
  427|   569k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  428|   569k|         comba_sqr<N>(z.data(), this->data());
  429|   569k|         return Self(Rep::redc(z));
  430|   569k|      }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE4dataEv:
  896|  2.54M|      constexpr const W* data() const { return m_val.data(); }
pcurves_secp256r1.cpp:_ZN5BotanmlERKNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEEESC_:
  346|   593k|      friend constexpr BOTAN_FORCE_INLINE Self operator*(const Self& a, const Self& b) {
  347|   593k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  348|   593k|         comba_mul<N>(z.data(), a.data(), b.data());
  349|   593k|         return Self(Rep::redc(z));
  350|   593k|      }
pcurves_secp256r1.cpp:_ZN5BotanmiERKNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEEESC_:
  281|   633k|      friend constexpr BOTAN_FORCE_INLINE Self operator-(const Self& a, const Self& b) {
  282|   633k|         std::array<W, N> r;  // NOLINT(*-member-init)
  283|   633k|         W carry = 0;
  284|  3.16M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (284:28): [True: 2.53M, False: 633k]
  ------------------
  285|  2.53M|            r[i] = word_sub(a.m_val[i], b.m_val[i], &carry);
  286|  2.53M|         }
  287|       |
  288|   633k|         const auto mask = CT::Mask<W>::expand(carry).value();
  289|       |
  290|   633k|         carry = 0;
  291|       |
  292|  3.16M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (292:28): [True: 2.53M, False: 633k]
  ------------------
  293|  2.53M|            r[i] = word_add(r[i], P[i] & mask, &carry);
  294|  2.53M|         }
  295|       |
  296|   633k|         return Self(r);
  297|   633k|      }
pcurves_secp256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E1xEv:
 1162|   167k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE4mul3Ev:
  335|  93.7k|      constexpr inline Self mul3() const { return mul2() + (*this); }
pcurves_secp256r1.cpp:_ZN5BotanplERKNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEEESC_:
  265|   155k|      friend constexpr BOTAN_FORCE_INLINE Self operator+(const Self& a, const Self& b) {
  266|   155k|         std::array<W, N> t;  // NOLINT(*-member-init)
  267|       |
  268|   155k|         W carry = 0;
  269|   777k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (269:28): [True: 621k, False: 155k]
  ------------------
  270|   621k|            t[i] = word_add(a.m_val[i], b.m_val[i], &carry);
  271|   621k|         }
  272|       |
  273|   155k|         std::array<W, N> r;  // NOLINT(*-member-init)
  274|   155k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  275|   155k|         return Self(r);
  276|   155k|      }
pcurves_secp256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E1yEv:
 1167|   163k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE4mul4Ev:
  338|  3.36k|      constexpr inline Self mul4() const { return mul2().mul2(); }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE4mul2Ev:
  325|   316k|      constexpr BOTAN_FORCE_INLINE Self mul2() const {
  326|   316k|         std::array<W, N> t = value();
  327|   316k|         const W carry = shift_left<1>(t);
  328|       |
  329|   316k|         std::array<W, N> r;  // NOLINT(*-member-init)
  330|   316k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  331|   316k|         return Self(r);
  332|   316k|      }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE5valueEv:
  894|   334k|      constexpr const std::array<W, N>& value() const { return m_val; }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE4mul8Ev:
  341|  3.36k|      constexpr inline Self mul8() const { return mul2().mul2().mul2(); }
pcurves_secp256r1.cpp:_ZN5BotanplERKNS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_EESE_:
 1064|    735|      friend constexpr Self operator+(const Self& a, const Self& b) { return Self::add(a, b); }
pcurves_secp256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E3addERKSC_SE_:
 1103|    735|      constexpr static Self add(const Self& a, const Self& b) { return point_add<Self, FieldElement>(a, b); }
pcurves_secp256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E11is_identityEv:
 1082|  50.7k|      constexpr CT::Choice is_identity() const { return z().is_zero(); }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE18conditional_assignERSA_SB_SB_NS_2CT6ChoiceERKSA_SF_SF_:
  395|  86.8k|         Self& x, Self& y, Self& z, CT::Choice cond, const Self& nx, const Self& ny, const Self& nz) {
  396|  86.8k|         const W mask = cond.into_bitmask<W>();
  397|       |
  398|   434k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (398:28): [True: 347k, False: 86.8k]
  ------------------
  399|   347k|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  400|   347k|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  401|   347k|            z.m_val[i] = Botan::choose(mask, nz.m_val[i], z.m_val[i]);
  402|   347k|         }
  403|  86.8k|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEEmLERKSA_:
  355|   186k|      constexpr BOTAN_FORCE_INLINE Self& operator*=(const Self& other) {
  356|   186k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  357|   186k|         comba_mul<N>(z.data(), data(), other.data());
  358|   186k|         m_val = Rep::redc(z);
  359|   186k|         return (*this);
  360|   186k|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE8square_nEm:
  439|  12.0k|      constexpr void square_n(size_t n) {
  440|  12.0k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  441|   367k|         for(size_t i = 0; i != n; ++i) {
  ------------------
  |  Branch (441:28): [True: 355k, False: 12.0k]
  ------------------
  442|   355k|            comba_sqr<N>(z.data(), this->data());
  443|   355k|            m_val = Rep::redc(z);
  444|   355k|         }
  445|  12.0k|      }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE14invert_vartimeEv:
  598|      1|      constexpr Self invert_vartime() const {
  599|       |         // Conditional ok: this function is variable time
  600|      1|         if(this->is_zero().as_bool()) {
  ------------------
  |  Branch (600:13): [True: 0, False: 1]
  ------------------
  601|      0|            return Self::zero();
  602|      0|         }
  603|       |
  604|      1|         auto x = Self(std::array<W, N>{1});  // 1 in standard domain
  605|      1|         auto b = Self(this->to_words());     // *this in standard domain
  606|       |
  607|       |         // First loop iteration
  608|      1|         Self::_invert_vartime_div2_helper(b, x);
  609|       |
  610|      1|         auto a = b.negate();
  611|       |         // y += x but y is zero at the outset
  612|      1|         auto y = x;
  613|       |
  614|       |         // First half of second loop iteration
  615|      1|         Self::_invert_vartime_div2_helper(a, y);
  616|       |
  617|    176|         for(;;) {
  618|       |            // Conditional ok: this function is variable time
  619|    176|            if(a.m_val == b.m_val) {
  ------------------
  |  Branch (619:16): [True: 1, False: 175]
  ------------------
  620|       |               // At this point it should be that a == b == 1
  621|      1|               auto r = y.negate();
  622|       |
  623|       |               // Convert back to Montgomery if required
  624|      1|               r.m_val = Rep::to_rep(r.m_val);
  625|      1|               return r;
  626|      1|            }
  627|       |
  628|    175|            auto nx = x + y;
  629|       |
  630|       |            /*
  631|       |            * Otherwise either b > a or a > b
  632|       |            *
  633|       |            * If b > a we want to set b to b - a
  634|       |            * Otherwise we want to set a to a - b
  635|       |            *
  636|       |            * Compute r = b - a and check if it underflowed
  637|       |            * If it did not then we are in the b > a path
  638|       |            */
  639|    175|            std::array<W, N> r;  // NOLINT(*-member-init)
  640|    175|            const word carry = bigint_sub3(r.data(), b.data(), N, a.data(), N);
  641|       |
  642|       |            // Conditional ok: this function is variable time
  643|    175|            if(carry == 0) {
  ------------------
  |  Branch (643:16): [True: 85, False: 90]
  ------------------
  644|       |               // b > a
  645|     85|               b.m_val = r;
  646|     85|               x = nx;
  647|     85|               Self::_invert_vartime_div2_helper(b, x);
  648|     90|            } else {
  649|       |               // We know this can't underflow because a > b
  650|     90|               bigint_sub3(r.data(), a.data(), N, b.data(), N);
  651|     90|               a.m_val = r;
  652|     90|               y = nx;
  653|     90|               Self::_invert_vartime_div2_helper(a, y);
  654|     90|            }
  655|    175|         }
  656|      1|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE4zeroEv:
  195|  82.7k|      static constexpr Self zero() { return Self(std::array<W, N>{0}); }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE8to_wordsEv:
  734|      1|      constexpr std::array<W, Self::N> to_words() const { return Rep::from_rep(m_val); }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE27_invert_vartime_div2_helperERSA_SB_:
  547|    177|      static constexpr void _invert_vartime_div2_helper(Self& a, Self& x) {
  548|    177|         constexpr auto INV_2 = p_div_2_plus_1(Rep::P);
  549|       |
  550|       |         // Conditional ok: this function is variable time
  551|    545|         while((a.m_val[0] & 1) != 1) {
  ------------------
  |  Branch (551:16): [True: 368, False: 177]
  ------------------
  552|    368|            shift_right<1>(a.m_val);
  553|       |
  554|    368|            const W borrow = shift_right<1>(x.m_val);
  555|       |
  556|       |            // Conditional ok: this function is variable time
  557|    368|            if(borrow) {
  ------------------
  |  Branch (557:16): [True: 129, False: 239]
  ------------------
  558|    129|               bigint_add2(x.m_val.data(), N, INV_2.data(), N);
  559|    129|            }
  560|    368|         }
  561|    177|      }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE6negateEv:
  452|  41.1k|      constexpr Self negate() const {
  453|  41.1k|         const W x_is_zero = ~CT::all_zeros(this->data(), N).value();
  454|       |
  455|  41.1k|         std::array<W, N> r;  // NOLINT(*-member-init)
  456|  41.1k|         W carry = 0;
  457|   205k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (457:28): [True: 164k, False: 41.1k]
  ------------------
  458|   164k|            r[i] = word_sub(P[i] & x_is_zero, m_val[i], &carry);
  459|   164k|         }
  460|       |
  461|  41.1k|         return Self(r);
  462|  41.1k|      }
pcurves_secp256r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEEEC2ERKSB_SE_:
  917|  71.8k|      constexpr AffineCurvePoint(const FieldElement& x, const FieldElement& y) : m_x(x), m_y(y) {}
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|  16.5k|      std::array<W, L> stash_value() const {
  760|  16.5k|         static_assert(L >= N);
  761|  16.5k|         std::array<W, L> stash = {};
  762|  82.6k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 66.1k, False: 16.5k]
  ------------------
  763|  66.1k|            stash[i] = m_val[i];
  764|  66.1k|         }
  765|  16.5k|         return stash;
  766|  16.5k|      }
pcurves_secp256r1.cpp:_ZNK5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm6EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS2_12Secp256r1RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1407|    459|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1408|    459|         const BlindedScalar scalar(s, rng);
 1409|    459|         return basemul_booth_exec<C, WindowBits>(m_table, scalar, rng);
 1410|    459|      }
pcurves_secp256r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm7EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS2_12Secp256r1RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    459|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    459|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 459, Folded]
  |  Branch (1308:33): [True: 459, False: 0]
  ------------------
 1309|    459|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|    459|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|    459|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|    459|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|    459|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|    459|            W mask[n_words] = {0};
 1318|    459|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|    459|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|    459|            if constexpr(ExcessBits > 0) {
 1323|    459|               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|    459|               mask[MaskWords - 1] &= ExcessMask;
 1325|    459|            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|    459|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|    459|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|    459|            mask[0] |= 1;
 1331|       |
 1332|    459|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|    459|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|    459|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|    459|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|    459|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|    459|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|    459|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    459|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|      0|            m_bytes.resize(C::Scalar::BYTES);
 1346|      0|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|      0|            m_bits = C::Scalar::BITS;
 1348|      0|         }
 1349|       |
 1350|    459|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    459|      }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS4_12Secp256r1RepEE12ScalarParamsEEEE8to_wordsEv:
  734|    776|      constexpr std::array<W, Self::N> to_words() const { return Rep::from_rep(m_val); }
pcurves_secp256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS3_12Secp256r1RepEE12ScalarParamsEE8from_repERKNSt3__15arrayImLm4EEE:
  137|  7.71k|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|  7.71k|         std::array<W, 2 * N> ze = {};
  139|  7.71k|         copy_mem(std::span{ze}.template first<N>(), z);
  140|  7.71k|         return Self::redc(ze);
  141|  7.71k|      }
pcurves_secp256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS3_12Secp256r1RepEE12ScalarParamsEE4redcERKNSt3__15arrayImLm8EEE:
  104|  14.6k|      constexpr static std::array<W, N> redc(const std::array<W, 2 * N>& z) {
  105|       |         if constexpr(P_dash == 1) {
  106|       |            return monty_redc_pdash1(z, P);
  107|  14.6k|         } else {
  108|  14.6k|            return monty_redc(z, P, P_dash);
  109|  14.6k|         }
  110|  14.6k|      }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS4_12Secp256r1RepEE12ScalarParamsEEEE12serialize_toENSt3__14spanIhLm32EEE:
  739|  6.94k|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|  6.94k|         auto v = Rep::from_rep(m_val);
  741|  6.94k|         std::reverse(v.begin(), v.end());
  742|       |
  743|  6.94k|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|  6.94k|            store_be(bytes, v);
  745|       |         } else {
  746|       |            // Remove leading zero bytes
  747|       |            const auto padded_bytes = store_be(v);
  748|       |            constexpr size_t extra = N * WordInfo<W>::bytes - Self::BYTES;
  749|       |            copy_mem(bytes, std::span{padded_bytes}.template subspan<extra, Self::BYTES>());
  750|       |         }
  751|  6.94k|      }
pcurves_secp256r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm7EE4bitsEv:
 1305|    459|      size_t bits() const { return m_bits; }
pcurves_secp256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E18conditional_assignENS_2CT6ChoiceERKSC_:
 1084|    776|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
 1085|    776|         FieldElement::conditional_assign(m_x, m_y, m_z, cond, pt.x(), pt.y(), pt.z());
 1086|    776|      }
pcurves_secp256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E6negateEv:
 1134|    776|      constexpr Self negate() const { return Self(x(), y().negate(), z()); }
pcurves_secp256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E18_const_time_poisonEv:
 1174|    776|      constexpr void _const_time_poison() const { CT::poison_all(m_x, m_y, m_z); }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE18_const_time_poisonEv:
  889|  2.32k|      constexpr void _const_time_poison() const { CT::poison(m_val); }
pcurves_secp256r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm7EE10get_windowEm:
 1353|  22.4k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  22.4k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  22.4k|      }
pcurves_secp256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E10add_or_subERKSC_RKNS_16AffineCurvePointISB_EENS_2CT6ChoiceE:
 1096|  40.1k|      constexpr static Self add_or_sub(const Self& a, const AffinePoint& b, CT::Choice sub) {
 1097|  40.1k|         return point_add_or_sub_mixed<Self, AffinePoint, FieldElement>(a, b, sub, FieldElement::one());
 1098|  40.1k|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE18conditional_assignENS_2CT6ChoiceERKSA_:
  367|  40.7k|      constexpr void conditional_assign(CT::Choice cond, const Self& nx) {
  368|  40.7k|         const W mask = cond.into_bitmask<W>();
  369|       |
  370|   203k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (370:28): [True: 162k, False: 40.7k]
  ------------------
  371|   162k|            m_val[i] = Botan::choose(mask, nx.m_val[i], m_val[i]);
  372|   162k|         }
  373|  40.7k|      }
pcurves_secp256r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEEE9ct_selectENSt3__14spanIKSC_Lm18446744073709551615EEEm:
  955|  22.4k|      static constexpr auto ct_select(std::span<const Self> pts, size_t idx) {
  956|  22.4k|         auto result = Self::identity(pts[0]);
  957|       |
  958|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
  959|  22.4k|         const size_t idx1 = static_cast<size_t>(idx - 1);
  960|   742k|         for(size_t i = 0; i != pts.size(); ++i) {
  ------------------
  |  Branch (960:28): [True: 719k, False: 22.4k]
  ------------------
  961|   719k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
  962|   719k|            result.conditional_assign(found, pts[i]);
  963|   719k|         }
  964|       |
  965|  22.4k|         return result;
  966|  22.4k|      }
pcurves_secp256r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEEE8identityERKSC_:
  924|  40.8k|      static constexpr Self identity(const Self& /*unused*/) {
  925|  40.8k|         return Self(FieldElement::zero(), FieldElement::zero());
  926|  40.8k|      }
pcurves_secp256r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEEE18conditional_assignENS_2CT6ChoiceERKSC_:
  981|  1.01M|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
  982|  1.01M|         FieldElement::conditional_assign(m_x, m_y, cond, pt.x(), pt.y());
  983|  1.01M|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE18conditional_assignERSA_SB_NS_2CT6ChoiceERKSA_SF_:
  380|  1.01M|      static constexpr void conditional_assign(Self& x, Self& y, CT::Choice cond, const Self& nx, const Self& ny) {
  381|  1.01M|         const W mask = cond.into_bitmask<W>();
  382|       |
  383|  5.06M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (383:28): [True: 4.05M, False: 1.01M]
  ------------------
  384|  4.05M|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  385|  4.05M|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  386|  4.05M|         }
  387|  1.01M|      }
pcurves_secp256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E13randomize_repERNS_21RandomNumberGeneratorE:
 1142|  3.10k|      void randomize_rep(RandomNumberGenerator& rng) {
 1143|       |         // In certain contexts we may be called with a Null_RNG; in that case the
 1144|       |         // caller is accepting that randomization will not occur
 1145|       |
 1146|       |         // Conditional ok: caller's RNG state (seeded vs not) is presumed public
 1147|  3.10k|         if(rng.is_seeded()) {
  ------------------
  |  Branch (1147:13): [True: 3.10k, False: 0]
  ------------------
 1148|  3.10k|            auto r = FieldElement::random(rng);
 1149|       |
 1150|  3.10k|            auto r2 = r.square();
 1151|  3.10k|            auto r3 = r2 * r;
 1152|       |
 1153|  3.10k|            m_x *= r2;
 1154|  3.10k|            m_y *= r3;
 1155|  3.10k|            m_z *= r;
 1156|  3.10k|         }
 1157|  3.10k|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE6randomERNS_21RandomNumberGeneratorE:
  851|  3.10k|      static Self random(RandomNumberGenerator& rng) {
  852|  3.10k|         constexpr size_t MAX_ATTEMPTS = 1000;
  853|       |
  854|  3.10k|         std::array<uint8_t, Self::BYTES> buf{};
  855|       |
  856|  3.10k|         for(size_t i = 0; i != MAX_ATTEMPTS; ++i) {
  ------------------
  |  Branch (856:28): [True: 3.10k, False: 0]
  ------------------
  857|  3.10k|            rng.randomize(buf);
  858|       |
  859|       |            // Zero off high bits that if set would certainly cause us
  860|       |            // to be out of range
  861|       |            if constexpr(Self::BITS % 8 != 0) {
  862|       |               constexpr uint8_t mask = 0xFF >> (8 - (Self::BITS % 8));
  863|       |               buf[0] &= mask;
  864|       |            }
  865|       |
  866|       |            // Conditionals ok: rejection sampling reveals only values we didn't use
  867|  3.10k|            if(auto s = Self::deserialize(buf)) {
  ------------------
  |  Branch (867:21): [True: 3.10k, False: 0]
  ------------------
  868|  3.10k|               if(s.value().is_nonzero().as_bool()) {
  ------------------
  |  Branch (868:19): [True: 3.10k, False: 0]
  ------------------
  869|  3.10k|                  return s.value();
  870|  3.10k|               }
  871|  3.10k|            }
  872|  3.10k|         }
  873|       |
  874|      0|         throw Internal_Error("Failed to generate random Scalar within bounded number of attempts");
  875|  3.10k|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|  17.0k|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|  17.0k|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 17.0k]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|  17.0k|         const auto words = bytes_to_words<W, N, BYTES>(bytes.first<Self::BYTES>());
  799|       |
  800|       |         // Conditional acceptable: std::optional is implicitly not constant time
  801|  17.0k|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 5, False: 17.0k]
  ------------------
  802|      5|            return {};
  803|      5|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|  17.0k|         return Self::from_words(words);
  807|  17.0k|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE10from_wordsILm4EEESA_NSt3__15arrayImXT_EEE:
  211|  17.0k|      static constexpr Self from_words(std::array<W, L> w) {
  212|  17.0k|         if constexpr(L == N) {
  213|  17.0k|            return Self(Rep::to_rep(w));
  214|       |         } else {
  215|       |            static_assert(L < N);
  216|       |            std::array<W, N> ew = {};
  217|       |            copy_mem(std::span{ew}.template first<L>(), w);
  218|       |            return Self(Rep::to_rep(ew));
  219|       |         }
  220|  17.0k|      }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE10is_nonzeroEv:
  230|  3.10k|      constexpr CT::Choice is_nonzero() const { return !is_zero(); }
pcurves_secp256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E20_const_time_unpoisonEv:
 1176|    776|      constexpr void _const_time_unpoison() const { CT::unpoison_all(m_x, m_y, m_z); }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE20_const_time_unpoisonEv:
  891|  2.32k|      constexpr void _const_time_unpoison() const { CT::unpoison(m_val); }
pcurves_secp256r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm7EED2Ev:
 1358|    459|      ~BlindedScalarBits() {
 1359|    459|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    459|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    459|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS4_12Secp256r1RepEE12ScalarParamsEEEE10from_stashILm9EEESB_RKNSt3__15arrayImXT_EEE:
  774|  14.6k|      static Self from_stash(const std::array<W, L>& stash) {
  775|  14.6k|         static_assert(L >= N);
  776|  14.6k|         std::array<W, N> val = {};
  777|  73.3k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 58.6k, False: 14.6k]
  ------------------
  778|  58.6k|            val[i] = stash[i];
  779|  58.6k|         }
  780|  14.6k|         return Self(val);
  781|  14.6k|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS4_12Secp256r1RepEE12ScalarParamsEEEEC2ENSt3__15arrayImLm4EEE:
  898|  21.6k|      explicit constexpr IntMod(std::array<W, N> v) : m_val(v) {}
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE12serialize_toENSt3__14spanIhLm32EEE:
  739|  16.7k|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|  16.7k|         auto v = Rep::from_rep(m_val);
  741|  16.7k|         std::reverse(v.begin(), v.end());
  742|       |
  743|  16.7k|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|  16.7k|            store_be(bytes, v);
  745|       |         } else {
  746|       |            // Remove leading zero bytes
  747|       |            const auto padded_bytes = store_be(v);
  748|       |            constexpr size_t extra = N * WordInfo<W>::bytes - Self::BYTES;
  749|       |            copy_mem(bytes, std::span{padded_bytes}.template subspan<extra, Self::BYTES>());
  750|       |         }
  751|  16.7k|      }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS4_12Secp256r1RepEE12ScalarParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|  6.94k|      std::array<W, L> stash_value() const {
  760|  6.94k|         static_assert(L >= N);
  761|  6.94k|         std::array<W, L> stash = {};
  762|  34.7k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 27.7k, False: 6.94k]
  ------------------
  763|  27.7k|            stash[i] = m_val[i];
  764|  27.7k|         }
  765|  6.94k|         return stash;
  766|  6.94k|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|  34.8k|      static Self from_stash(const std::array<W, L>& stash) {
  775|  34.8k|         static_assert(L >= N);
  776|  34.8k|         std::array<W, N> val = {};
  777|   174k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 139k, False: 34.8k]
  ------------------
  778|   139k|            val[i] = stash[i];
  779|   139k|         }
  780|  34.8k|         return Self(val);
  781|  34.8k|      }
pcurves_secp256r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm4EEC2ERKNS_16AffineCurvePointINS_6IntModINS2_12Secp256r1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
 1487|    317|      explicit WindowedBoothMulTable(const AffinePoint& p) : m_table(varpoint_setup<C, TableSize>(p)) {}
pcurves_secp256r1.cpp:_ZN5BotanplERKNS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_EERKNS_16AffineCurvePointISB_EE:
 1066|  2.21k|      friend constexpr Self operator+(const Self& a, const AffinePoint& b) { return Self::add_mixed(a, b); }
pcurves_secp256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E9add_mixedERKSC_RKNS_16AffineCurvePointISB_EE:
 1091|  2.21k|      constexpr static Self add_mixed(const Self& a, const AffinePoint& b) {
 1092|  2.21k|         return point_add_mixed<Self, AffinePoint, FieldElement>(a, b, FieldElement::one());
 1093|  2.21k|      }
pcurves_secp256r1.cpp:_ZNK5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm4EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS2_12Secp256r1RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1489|    317|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1490|    317|         const BlindedScalar bits(s, rng);
 1491|       |
 1492|    317|         const size_t scalar_bits = bits.bits();
 1493|    317|         const size_t full_windows = compute_full_windows(scalar_bits + 1, WindowBits);
 1494|    317|         const size_t initial_shift = compute_initial_shift(scalar_bits + 1, WindowBits);
 1495|       |
 1496|    317|         BOTAN_DEBUG_ASSERT(full_windows * WindowBits + initial_shift == scalar_bits + 1);
  ------------------
  |  |  137|    317|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|    317|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 317]
  |  |  ------------------
  ------------------
 1497|    317|         BOTAN_DEBUG_ASSERT(initial_shift > 0);
  ------------------
  |  |  137|    317|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|    317|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 317]
  |  |  ------------------
  ------------------
 1498|       |
 1499|    317|         auto accum = ProjectivePoint::identity();
 1500|    317|         CT::poison(accum);
 1501|       |
 1502|  18.3k|         for(size_t i = 0; i != full_windows; ++i) {
  ------------------
  |  Branch (1502:28): [True: 18.0k, False: 317]
  ------------------
 1503|  18.0k|            const size_t idx = scalar_bits - initial_shift - WindowBits * i;
 1504|       |
 1505|  18.0k|            const size_t w_i = bits.get_window(idx);
 1506|  18.0k|            const auto [tidx, tneg] = booth_recode<WindowBits>(w_i);
 1507|       |
 1508|       |            // Conditional ok: loop iteration count is public
 1509|  18.0k|            if(i == 0) {
  ------------------
  |  Branch (1509:16): [True: 317, False: 17.7k]
  ------------------
 1510|    317|               accum = ProjectivePoint::from_affine(m_table.ct_select(tidx));
 1511|    317|               accum.conditional_assign(tneg, accum.negate());
 1512|  17.7k|            } else {
 1513|  17.7k|               accum = ProjectivePoint::add_or_sub(accum, m_table.ct_select(tidx), tneg);
 1514|  17.7k|            }
 1515|       |
 1516|  18.0k|            accum = accum.dbl_n(WindowBits);
 1517|       |
 1518|       |            // Conditional ok: loop iteration count is public
 1519|  18.0k|            if(i <= 3) {
  ------------------
  |  Branch (1519:16): [True: 1.26k, False: 16.8k]
  ------------------
 1520|  1.26k|               accum.randomize_rep(rng);
 1521|  1.26k|            }
 1522|  18.0k|         }
 1523|       |
 1524|       |         // final window (note one bit shorter than previous reads)
 1525|    317|         const size_t w_l = bits.get_window(0) & ((1 << WindowBits) - 1);
 1526|    317|         const auto [tidx, tneg] = booth_recode<WindowBits>(w_l << 1);
 1527|    317|         accum = ProjectivePoint::add_or_sub(accum, m_table.ct_select(tidx), tneg);
 1528|       |
 1529|    317|         CT::unpoison(accum);
 1530|    317|         return accum;
 1531|    317|      }
pcurves_secp256r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm6EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS2_12Secp256r1RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    317|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    317|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 317, Folded]
  |  Branch (1308:33): [True: 317, False: 0]
  ------------------
 1309|    317|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|    317|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|    317|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|    317|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|    317|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|    317|            W mask[n_words] = {0};
 1318|    317|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|    317|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|    317|            if constexpr(ExcessBits > 0) {
 1323|    317|               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|    317|               mask[MaskWords - 1] &= ExcessMask;
 1325|    317|            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|    317|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|    317|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|    317|            mask[0] |= 1;
 1331|       |
 1332|    317|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|    317|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|    317|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|    317|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|    317|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|    317|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|    317|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    317|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|      0|            m_bytes.resize(C::Scalar::BYTES);
 1346|      0|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|      0|            m_bits = C::Scalar::BITS;
 1348|      0|         }
 1349|       |
 1350|    317|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    317|      }
pcurves_secp256r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm6EE4bitsEv:
 1305|    317|      size_t bits() const { return m_bits; }
pcurves_secp256r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm4EE20compute_full_windowsEmm:
 1468|    317|      static constexpr size_t compute_full_windows(size_t sb, size_t wb) {
 1469|    317|         if(sb % wb == 0) {
  ------------------
  |  Branch (1469:13): [True: 0, False: 317]
  ------------------
 1470|      0|            return (sb - 1) / wb;
 1471|    317|         } else {
 1472|    317|            return sb / wb;
 1473|    317|         }
 1474|    317|      }
pcurves_secp256r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm4EE21compute_initial_shiftEmm:
 1476|    317|      static constexpr size_t compute_initial_shift(size_t sb, size_t wb) {
 1477|    317|         if(sb % wb == 0) {
  ------------------
  |  Branch (1477:13): [True: 0, False: 317]
  ------------------
 1478|      0|            return wb;
 1479|    317|         } else {
 1480|    317|            return sb - (sb / wb) * wb;
 1481|    317|         }
 1482|    317|      }
pcurves_secp256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E8identityEv:
 1038|    317|      static constexpr Self identity() { return Self(FieldElement::zero(), FieldElement::one(), FieldElement::zero()); }
pcurves_secp256r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm6EE10get_windowEm:
 1353|  18.3k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  18.3k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  18.3k|      }
pcurves_secp256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E5dbl_nEm:
 1108|  18.0k|      constexpr Self dbl_n(size_t n) const {
 1109|  18.0k|         if constexpr(Self::A_is_minus_3) {
 1110|  18.0k|            return dbl_n_a_minus_3(*this, n);
 1111|       |         } else if constexpr(Self::A_is_zero) {
 1112|       |            return dbl_n_a_zero(*this, n);
 1113|       |         } else {
 1114|       |            return dbl_n_generic(*this, A, n);
 1115|       |         }
 1116|  18.0k|      }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE4div2Ev:
  302|  18.0k|      Self div2() const {
  303|       |         // The inverse of 2 modulo P is (P/2)+1; this avoids a constexpr time
  304|       |         // general inversion, which some compilers can't handle
  305|  18.0k|         constexpr auto INV_2 = p_div_2_plus_1(Rep::P);
  306|       |
  307|       |         // We could multiply by INV_2 but there is a better way ...
  308|       |
  309|  18.0k|         std::array<W, N> t = value();
  310|  18.0k|         const W borrow = shift_right<1>(t);
  311|       |
  312|       |         // If value was odd, add (P/2)+1
  313|  18.0k|         const auto mask = CT::Mask<W>::expand(borrow).value();
  314|       |
  315|  18.0k|         W carry = 0;
  316|       |
  317|  90.3k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (317:28): [True: 72.2k, False: 18.0k]
  ------------------
  318|  72.2k|            t[i] = word_add(t[i], INV_2[i] & mask, &carry);
  319|  72.2k|         }
  320|       |
  321|  18.0k|         return Self(t);
  322|  18.0k|      }
pcurves_secp256r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm6EED2Ev:
 1358|    317|      ~BlindedScalarBits() {
 1359|    317|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    317|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    317|      }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS4_12Secp256r1RepEE12ScalarParamsEEEE7is_zeroEv:
  225|  13.8k|      constexpr CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_val.size()).as_choice(); }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEEeqERKSA_:
  722|  7.59k|      constexpr CT::Choice operator==(const Self& other) const {
  723|  7.59k|         return CT::is_equal(this->data(), other.data(), N).as_choice();
  724|  7.59k|      }
pcurves_secp256r1.cpp:_ZN5Botan13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS2_12Secp256r1RepEE7x3_ax_bERKNS_6IntModINS5_INS6_11FieldParamsEEEEE:
 1275|  7.59k|      static constexpr FieldElement x3_ax_b(const FieldElement& x) { return (x.square() + A) * x + B; }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE12correct_signENS_2CT6ChoiceE:
  248|    317|      constexpr Self correct_sign(CT::Choice even) const {
  249|    317|         const auto flip = (even != this->is_even());
  250|    317|         return Self::choose(flip, this->negate(), *this);
  251|    317|      }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE7is_evenEv:
  240|    317|      constexpr CT::Choice is_even() const {
  241|    317|         auto v = Rep::from_rep(m_val);
  242|    317|         return !CT::Choice::from_int(v[0] & 0x01);
  243|    317|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE6chooseENS_2CT6ChoiceERKSA_SE_:
  256|    317|      static constexpr Self choose(CT::Choice choice, const Self& x, const Self& y) {
  257|    317|         auto r = y;
  258|    317|         r.conditional_assign(choice, x);
  259|    317|         return r;
  260|    317|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS4_12Secp256r1RepEE12ScalarParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|  6.94k|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|  6.94k|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 6.94k]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|  6.94k|         const auto words = bytes_to_words<W, N, BYTES>(bytes.first<Self::BYTES>());
  799|       |
  800|       |         // Conditional acceptable: std::optional is implicitly not constant time
  801|  6.94k|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 0, False: 6.94k]
  ------------------
  802|      0|            return {};
  803|      0|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|  6.94k|         return Self::from_words(words);
  807|  6.94k|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS4_12Secp256r1RepEE12ScalarParamsEEEE10from_wordsILm4EEESB_NSt3__15arrayImXT_EEE:
  211|  6.94k|      static constexpr Self from_words(std::array<W, L> w) {
  212|  6.94k|         if constexpr(L == N) {
  213|  6.94k|            return Self(Rep::to_rep(w));
  214|       |         } else {
  215|       |            static_assert(L < N);
  216|       |            std::array<W, N> ew = {};
  217|       |            copy_mem(std::span{ew}.template first<L>(), w);
  218|       |            return Self(Rep::to_rep(ew));
  219|       |         }
  220|  6.94k|      }
pcurves_secp256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS3_12Secp256r1RepEE12ScalarParamsEE6to_repERKNSt3__15arrayImLm4EEE:
  115|  6.94k|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|  6.94k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|  6.94k|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|  6.94k|         return Self::redc(z);
  119|  6.94k|      }
pcurves_secp256r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEEE12serialize_toENSt3__14spanIhLm65EEE:
  941|  8.21k|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  942|  8.21k|         BOTAN_STATE_CHECK(this->is_identity().as_bool() == false);
  ------------------
  |  |   51|  8.21k|   do {                                                         \
  |  |   52|  8.21k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  8.21k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 8.21k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  8.21k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 8.21k]
  |  |  ------------------
  ------------------
  943|  8.21k|         BufferStuffer pack(bytes);
  944|  8.21k|         pack.append(0x04);
  945|  8.21k|         x().serialize_to(pack.next<FieldElement::BYTES>());
  946|  8.21k|         y().serialize_to(pack.next<FieldElement::BYTES>());
  947|  8.21k|         BOTAN_DEBUG_ASSERT(pack.full());
  ------------------
  |  |  137|  8.21k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  8.21k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 8.21k]
  |  |  ------------------
  ------------------
  948|  8.21k|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS4_12Secp256r1RepEE12ScalarParamsEEEE6randomERNS_21RandomNumberGeneratorE:
  851|    459|      static Self random(RandomNumberGenerator& rng) {
  852|    459|         constexpr size_t MAX_ATTEMPTS = 1000;
  853|       |
  854|    459|         std::array<uint8_t, Self::BYTES> buf{};
  855|       |
  856|    459|         for(size_t i = 0; i != MAX_ATTEMPTS; ++i) {
  ------------------
  |  Branch (856:28): [True: 459, False: 0]
  ------------------
  857|    459|            rng.randomize(buf);
  858|       |
  859|       |            // Zero off high bits that if set would certainly cause us
  860|       |            // to be out of range
  861|       |            if constexpr(Self::BITS % 8 != 0) {
  862|       |               constexpr uint8_t mask = 0xFF >> (8 - (Self::BITS % 8));
  863|       |               buf[0] &= mask;
  864|       |            }
  865|       |
  866|       |            // Conditionals ok: rejection sampling reveals only values we didn't use
  867|    459|            if(auto s = Self::deserialize(buf)) {
  ------------------
  |  Branch (867:21): [True: 459, False: 0]
  ------------------
  868|    459|               if(s.value().is_nonzero().as_bool()) {
  ------------------
  |  Branch (868:19): [True: 459, False: 0]
  ------------------
  869|    459|                  return s.value();
  870|    459|               }
  871|    459|            }
  872|    459|         }
  873|       |
  874|      0|         throw Internal_Error("Failed to generate random Scalar within bounded number of attempts");
  875|    459|      }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS4_12Secp256r1RepEE12ScalarParamsEEEE10is_nonzeroEv:
  230|    459|      constexpr CT::Choice is_nonzero() const { return !is_zero(); }
pcurves_secp384r1.cpp:_ZN5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm6EEC2ERKNS_16AffineCurvePointINS_6IntModINS2_12Secp384r1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
 1405|      1|            m_table(basemul_booth_setup<C, WindowBits>(p, BlindedScalar::Bits + 1)) {}
pcurves_secp384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E11from_affineERKNS_16AffineCurvePointISB_EE:
 1016|    680|      static constexpr Self from_affine(const AffinePoint& pt) {
 1017|       |         /*
 1018|       |         * If the point is the identity element (x=0, y=0) then instead of
 1019|       |         * creating (x, y, 1) = (0, 0, 1) we want our projective identity
 1020|       |         * encoding of (0, 1, 0)
 1021|       |         *
 1022|       |         * Which we can achieve by a conditional swap of y and z if the
 1023|       |         * affine point is the identity.
 1024|       |         */
 1025|       |
 1026|    680|         auto x = pt.x();
 1027|    680|         auto y = pt.y();
 1028|    680|         auto z = FieldElement::one();
 1029|       |
 1030|    680|         FieldElement::conditional_swap(pt.is_identity(), y, z);
 1031|       |
 1032|    680|         return ProjectiveCurvePoint(x, y, z);
 1033|    680|      }
pcurves_secp384r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEEE1xEv:
  971|  1.06M|      constexpr const FieldElement& x() const { return m_x; }
pcurves_secp384r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEEE1yEv:
  976|  1.02M|      constexpr const FieldElement& y() const { return m_y; }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE3oneEv:
  200|  39.7k|      static constexpr Self one() { return Self(Rep::one()); }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEEC2ENSt3__15arrayImLm6EEE:
  898|  2.24M|      explicit constexpr IntMod(std::array<W, N> v) : m_val(v) {}
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE16conditional_swapENS_2CT6ChoiceERSA_SD_:
  410|    680|      static constexpr void conditional_swap(CT::Choice cond, Self& x, Self& y) {
  411|    680|         const W mask = cond.into_bitmask<W>();
  412|       |
  413|  4.76k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (413:28): [True: 4.08k, False: 680]
  ------------------
  414|  4.08k|            auto nx = Botan::choose(mask, y.m_val[i], x.m_val[i]);
  415|  4.08k|            auto ny = Botan::choose(mask, x.m_val[i], y.m_val[i]);
  416|  4.08k|            x.m_val[i] = nx;
  417|  4.08k|            y.m_val[i] = ny;
  418|  4.08k|         }
  419|    680|      }
pcurves_secp384r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEEE11is_identityEv:
  928|  42.0k|      constexpr CT::Choice is_identity() const { return x().is_zero() && y().is_zero(); }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE7is_zeroEv:
  225|   212k|      constexpr CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_val.size()).as_choice(); }
pcurves_secp384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_EC2ERKSB_SE_SE_:
 1056|  61.2k|            m_x(x), m_y(y), m_z(z) {}
pcurves_secp384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E3dblEv:
 1121|  2.80k|      constexpr Self dbl() const {
 1122|  2.80k|         if constexpr(Self::A_is_minus_3) {
 1123|  2.80k|            return dbl_a_minus_3(*this);
 1124|       |         } else if constexpr(Self::A_is_zero) {
 1125|       |            return dbl_a_zero(*this);
 1126|       |         } else {
 1127|       |            return dbl_generic(*this, A);
 1128|       |         }
 1129|  2.80k|      }
pcurves_secp384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E1zEv:
 1172|   246k|      constexpr const FieldElement& z() const { return m_z; }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE6squareEv:
  426|   514k|      constexpr BOTAN_FORCE_INLINE Self square() const {
  427|   514k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  428|   514k|         comba_sqr<N>(z.data(), this->data());
  429|   514k|         return Self(Rep::redc(z));
  430|   514k|      }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE4dataEv:
  896|  2.30M|      constexpr const W* data() const { return m_val.data(); }
pcurves_secp384r1.cpp:_ZN5BotanmlERKNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEEESC_:
  346|   540k|      friend constexpr BOTAN_FORCE_INLINE Self operator*(const Self& a, const Self& b) {
  347|   540k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  348|   540k|         comba_mul<N>(z.data(), a.data(), b.data());
  349|   540k|         return Self(Rep::redc(z));
  350|   540k|      }
pcurves_secp384r1.cpp:_ZN5BotanmiERKNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEEESC_:
  281|   588k|      friend constexpr BOTAN_FORCE_INLINE Self operator-(const Self& a, const Self& b) {
  282|   588k|         std::array<W, N> r;  // NOLINT(*-member-init)
  283|   588k|         W carry = 0;
  284|  4.11M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (284:28): [True: 3.52M, False: 588k]
  ------------------
  285|  3.52M|            r[i] = word_sub(a.m_val[i], b.m_val[i], &carry);
  286|  3.52M|         }
  287|       |
  288|   588k|         const auto mask = CT::Mask<W>::expand(carry).value();
  289|       |
  290|   588k|         carry = 0;
  291|       |
  292|  4.11M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (292:28): [True: 3.52M, False: 588k]
  ------------------
  293|  3.52M|            r[i] = word_add(r[i], P[i] & mask, &carry);
  294|  3.52M|         }
  295|       |
  296|   588k|         return Self(r);
  297|   588k|      }
pcurves_secp384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E1xEv:
 1162|   153k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE4mul3Ev:
  335|  87.0k|      constexpr inline Self mul3() const { return mul2() + (*this); }
pcurves_secp384r1.cpp:_ZN5BotanplERKNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEEESC_:
  265|   131k|      friend constexpr BOTAN_FORCE_INLINE Self operator+(const Self& a, const Self& b) {
  266|   131k|         std::array<W, N> t;  // NOLINT(*-member-init)
  267|       |
  268|   131k|         W carry = 0;
  269|   920k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (269:28): [True: 789k, False: 131k]
  ------------------
  270|   789k|            t[i] = word_add(a.m_val[i], b.m_val[i], &carry);
  271|   789k|         }
  272|       |
  273|   131k|         std::array<W, N> r;  // NOLINT(*-member-init)
  274|   131k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  275|   131k|         return Self(r);
  276|   131k|      }
pcurves_secp384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E1yEv:
 1167|   150k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE4mul4Ev:
  338|  2.80k|      constexpr inline Self mul4() const { return mul2().mul2(); }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE4mul2Ev:
  325|   292k|      constexpr BOTAN_FORCE_INLINE Self mul2() const {
  326|   292k|         std::array<W, N> t = value();
  327|   292k|         const W carry = shift_left<1>(t);
  328|       |
  329|   292k|         std::array<W, N> r;  // NOLINT(*-member-init)
  330|   292k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  331|   292k|         return Self(r);
  332|   292k|      }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE5valueEv:
  894|   309k|      constexpr const std::array<W, N>& value() const { return m_val; }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE4mul8Ev:
  341|  2.80k|      constexpr inline Self mul8() const { return mul2().mul2().mul2(); }
pcurves_secp384r1.cpp:_ZN5BotanplERKNS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_EESE_:
 1064|  1.09k|      friend constexpr Self operator+(const Self& a, const Self& b) { return Self::add(a, b); }
pcurves_secp384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E3addERKSC_SE_:
 1103|  1.09k|      constexpr static Self add(const Self& a, const Self& b) { return point_add<Self, FieldElement>(a, b); }
pcurves_secp384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E11is_identityEv:
 1082|  46.7k|      constexpr CT::Choice is_identity() const { return z().is_zero(); }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE18conditional_assignERSA_SB_SB_NS_2CT6ChoiceERKSA_SF_SF_:
  395|  80.4k|         Self& x, Self& y, Self& z, CT::Choice cond, const Self& nx, const Self& ny, const Self& nz) {
  396|  80.4k|         const W mask = cond.into_bitmask<W>();
  397|       |
  398|   563k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (398:28): [True: 482k, False: 80.4k]
  ------------------
  399|   482k|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  400|   482k|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  401|   482k|            z.m_val[i] = Botan::choose(mask, nz.m_val[i], z.m_val[i]);
  402|   482k|         }
  403|  80.4k|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEEmLERKSA_:
  355|   168k|      constexpr BOTAN_FORCE_INLINE Self& operator*=(const Self& other) {
  356|   168k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  357|   168k|         comba_mul<N>(z.data(), data(), other.data());
  358|   168k|         m_val = Rep::redc(z);
  359|   168k|         return (*this);
  360|   168k|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE8square_nEm:
  439|  10.3k|      constexpr void square_n(size_t n) {
  440|  10.3k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  441|   343k|         for(size_t i = 0; i != n; ++i) {
  ------------------
  |  Branch (441:28): [True: 333k, False: 10.3k]
  ------------------
  442|   333k|            comba_sqr<N>(z.data(), this->data());
  443|   333k|            m_val = Rep::redc(z);
  444|   333k|         }
  445|  10.3k|      }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE14invert_vartimeEv:
  598|      1|      constexpr Self invert_vartime() const {
  599|       |         // Conditional ok: this function is variable time
  600|      1|         if(this->is_zero().as_bool()) {
  ------------------
  |  Branch (600:13): [True: 0, False: 1]
  ------------------
  601|      0|            return Self::zero();
  602|      0|         }
  603|       |
  604|      1|         auto x = Self(std::array<W, N>{1});  // 1 in standard domain
  605|      1|         auto b = Self(this->to_words());     // *this in standard domain
  606|       |
  607|       |         // First loop iteration
  608|      1|         Self::_invert_vartime_div2_helper(b, x);
  609|       |
  610|      1|         auto a = b.negate();
  611|       |         // y += x but y is zero at the outset
  612|      1|         auto y = x;
  613|       |
  614|       |         // First half of second loop iteration
  615|      1|         Self::_invert_vartime_div2_helper(a, y);
  616|       |
  617|    252|         for(;;) {
  618|       |            // Conditional ok: this function is variable time
  619|    252|            if(a.m_val == b.m_val) {
  ------------------
  |  Branch (619:16): [True: 1, False: 251]
  ------------------
  620|       |               // At this point it should be that a == b == 1
  621|      1|               auto r = y.negate();
  622|       |
  623|       |               // Convert back to Montgomery if required
  624|      1|               r.m_val = Rep::to_rep(r.m_val);
  625|      1|               return r;
  626|      1|            }
  627|       |
  628|    251|            auto nx = x + y;
  629|       |
  630|       |            /*
  631|       |            * Otherwise either b > a or a > b
  632|       |            *
  633|       |            * If b > a we want to set b to b - a
  634|       |            * Otherwise we want to set a to a - b
  635|       |            *
  636|       |            * Compute r = b - a and check if it underflowed
  637|       |            * If it did not then we are in the b > a path
  638|       |            */
  639|    251|            std::array<W, N> r;  // NOLINT(*-member-init)
  640|    251|            const word carry = bigint_sub3(r.data(), b.data(), N, a.data(), N);
  641|       |
  642|       |            // Conditional ok: this function is variable time
  643|    251|            if(carry == 0) {
  ------------------
  |  Branch (643:16): [True: 118, False: 133]
  ------------------
  644|       |               // b > a
  645|    118|               b.m_val = r;
  646|    118|               x = nx;
  647|    118|               Self::_invert_vartime_div2_helper(b, x);
  648|    133|            } else {
  649|       |               // We know this can't underflow because a > b
  650|    133|               bigint_sub3(r.data(), a.data(), N, b.data(), N);
  651|    133|               a.m_val = r;
  652|    133|               y = nx;
  653|    133|               Self::_invert_vartime_div2_helper(a, y);
  654|    133|            }
  655|    251|         }
  656|      1|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE4zeroEv:
  195|  76.5k|      static constexpr Self zero() { return Self(std::array<W, N>{0}); }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE8to_wordsEv:
  734|      1|      constexpr std::array<W, Self::N> to_words() const { return Rep::from_rep(m_val); }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE27_invert_vartime_div2_helperERSA_SB_:
  547|    253|      static constexpr void _invert_vartime_div2_helper(Self& a, Self& x) {
  548|    253|         constexpr auto INV_2 = p_div_2_plus_1(Rep::P);
  549|       |
  550|       |         // Conditional ok: this function is variable time
  551|    809|         while((a.m_val[0] & 1) != 1) {
  ------------------
  |  Branch (551:16): [True: 556, False: 253]
  ------------------
  552|    556|            shift_right<1>(a.m_val);
  553|       |
  554|    556|            const W borrow = shift_right<1>(x.m_val);
  555|       |
  556|       |            // Conditional ok: this function is variable time
  557|    556|            if(borrow) {
  ------------------
  |  Branch (557:16): [True: 248, False: 308]
  ------------------
  558|    248|               bigint_add2(x.m_val.data(), N, INV_2.data(), N);
  559|    248|            }
  560|    556|         }
  561|    253|      }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE6negateEv:
  452|  38.2k|      constexpr Self negate() const {
  453|  38.2k|         const W x_is_zero = ~CT::all_zeros(this->data(), N).value();
  454|       |
  455|  38.2k|         std::array<W, N> r;  // NOLINT(*-member-init)
  456|  38.2k|         W carry = 0;
  457|   267k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (457:28): [True: 229k, False: 38.2k]
  ------------------
  458|   229k|            r[i] = word_sub(P[i] & x_is_zero, m_val[i], &carry);
  459|   229k|         }
  460|       |
  461|  38.2k|         return Self(r);
  462|  38.2k|      }
pcurves_secp384r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEEEC2ERKSB_SE_:
  917|  46.4k|      constexpr AffineCurvePoint(const FieldElement& x, const FieldElement& y) : m_x(x), m_y(y) {}
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|  2.21k|      std::array<W, L> stash_value() const {
  760|  2.21k|         static_assert(L >= N);
  761|  2.21k|         std::array<W, L> stash = {};
  762|  15.5k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 13.3k, False: 2.21k]
  ------------------
  763|  13.3k|            stash[i] = m_val[i];
  764|  13.3k|         }
  765|  2.21k|         return stash;
  766|  2.21k|      }
pcurves_secp384r1.cpp:_ZNK5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm6EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS2_12Secp384r1RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1407|    287|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1408|    287|         const BlindedScalar scalar(s, rng);
 1409|    287|         return basemul_booth_exec<C, WindowBits>(m_table, scalar, rng);
 1410|    287|      }
pcurves_secp384r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm7EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS2_12Secp384r1RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    287|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    287|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 287, Folded]
  |  Branch (1308:33): [True: 287, False: 0]
  ------------------
 1309|    287|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|    287|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|    287|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|    287|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|    287|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|    287|            W mask[n_words] = {0};
 1318|    287|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|    287|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|    287|            if constexpr(ExcessBits > 0) {
 1323|    287|               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|    287|               mask[MaskWords - 1] &= ExcessMask;
 1325|    287|            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|    287|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|    287|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|    287|            mask[0] |= 1;
 1331|       |
 1332|    287|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|    287|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|    287|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|    287|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|    287|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|    287|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|    287|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    287|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|      0|            m_bytes.resize(C::Scalar::BYTES);
 1346|      0|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|      0|            m_bits = C::Scalar::BITS;
 1348|      0|         }
 1349|       |
 1350|    287|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    287|      }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS4_12Secp384r1RepEE12ScalarParamsEEEE8to_wordsEv:
  734|    483|      constexpr std::array<W, Self::N> to_words() const { return Rep::from_rep(m_val); }
pcurves_secp384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS3_12Secp384r1RepEE12ScalarParamsEE8from_repERKNSt3__15arrayImLm6EEE:
  137|    770|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|    770|         std::array<W, 2 * N> ze = {};
  139|    770|         copy_mem(std::span{ze}.template first<N>(), z);
  140|    770|         return Self::redc(ze);
  141|    770|      }
pcurves_secp384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS3_12Secp384r1RepEE12ScalarParamsEE4redcERKNSt3__15arrayImLm12EEE:
  104|  1.05k|      constexpr static std::array<W, N> redc(const std::array<W, 2 * N>& z) {
  105|       |         if constexpr(P_dash == 1) {
  106|       |            return monty_redc_pdash1(z, P);
  107|  1.05k|         } else {
  108|  1.05k|            return monty_redc(z, P, P_dash);
  109|  1.05k|         }
  110|  1.05k|      }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS4_12Secp384r1RepEE12ScalarParamsEEEE12serialize_toENSt3__14spanIhLm48EEE:
  739|    287|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    287|         auto v = Rep::from_rep(m_val);
  741|    287|         std::reverse(v.begin(), v.end());
  742|       |
  743|    287|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|    287|            store_be(bytes, v);
  745|       |         } else {
  746|       |            // Remove leading zero bytes
  747|       |            const auto padded_bytes = store_be(v);
  748|       |            constexpr size_t extra = N * WordInfo<W>::bytes - Self::BYTES;
  749|       |            copy_mem(bytes, std::span{padded_bytes}.template subspan<extra, Self::BYTES>());
  750|       |         }
  751|    287|      }
pcurves_secp384r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm7EE4bitsEv:
 1305|    287|      size_t bits() const { return m_bits; }
pcurves_secp384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E18conditional_assignENS_2CT6ChoiceERKSC_:
 1084|    483|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
 1085|    483|         FieldElement::conditional_assign(m_x, m_y, m_z, cond, pt.x(), pt.y(), pt.z());
 1086|    483|      }
pcurves_secp384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E6negateEv:
 1134|    483|      constexpr Self negate() const { return Self(x(), y().negate(), z()); }
pcurves_secp384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E18_const_time_poisonEv:
 1174|    483|      constexpr void _const_time_poison() const { CT::poison_all(m_x, m_y, m_z); }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE18_const_time_poisonEv:
  889|  1.44k|      constexpr void _const_time_poison() const { CT::poison(m_val); }
pcurves_secp384r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm7EE10get_windowEm:
 1353|  20.9k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  20.9k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  20.9k|      }
pcurves_secp384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E10add_or_subERKSC_RKNS_16AffineCurvePointISB_EENS_2CT6ChoiceE:
 1096|  37.5k|      constexpr static Self add_or_sub(const Self& a, const AffinePoint& b, CT::Choice sub) {
 1097|  37.5k|         return point_add_or_sub_mixed<Self, AffinePoint, FieldElement>(a, b, sub, FieldElement::one());
 1098|  37.5k|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE18conditional_assignENS_2CT6ChoiceERKSA_:
  367|  37.9k|      constexpr void conditional_assign(CT::Choice cond, const Self& nx) {
  368|  37.9k|         const W mask = cond.into_bitmask<W>();
  369|       |
  370|   265k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (370:28): [True: 227k, False: 37.9k]
  ------------------
  371|   227k|            m_val[i] = Botan::choose(mask, nx.m_val[i], m_val[i]);
  372|   227k|         }
  373|  37.9k|      }
pcurves_secp384r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEEE9ct_selectENSt3__14spanIKSC_Lm18446744073709551615EEEm:
  955|  20.9k|      static constexpr auto ct_select(std::span<const Self> pts, size_t idx) {
  956|  20.9k|         auto result = Self::identity(pts[0]);
  957|       |
  958|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
  959|  20.9k|         const size_t idx1 = static_cast<size_t>(idx - 1);
  960|   691k|         for(size_t i = 0; i != pts.size(); ++i) {
  ------------------
  |  Branch (960:28): [True: 670k, False: 20.9k]
  ------------------
  961|   670k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
  962|   670k|            result.conditional_assign(found, pts[i]);
  963|   670k|         }
  964|       |
  965|  20.9k|         return result;
  966|  20.9k|      }
pcurves_secp384r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEEE8identityERKSC_:
  924|  38.0k|      static constexpr Self identity(const Self& /*unused*/) {
  925|  38.0k|         return Self(FieldElement::zero(), FieldElement::zero());
  926|  38.0k|      }
pcurves_secp384r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEEE18conditional_assignENS_2CT6ChoiceERKSC_:
  981|   943k|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
  982|   943k|         FieldElement::conditional_assign(m_x, m_y, cond, pt.x(), pt.y());
  983|   943k|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE18conditional_assignERSA_SB_NS_2CT6ChoiceERKSA_SF_:
  380|   943k|      static constexpr void conditional_assign(Self& x, Self& y, CT::Choice cond, const Self& nx, const Self& ny) {
  381|   943k|         const W mask = cond.into_bitmask<W>();
  382|       |
  383|  6.60M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (383:28): [True: 5.65M, False: 943k]
  ------------------
  384|  5.65M|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  385|  5.65M|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  386|  5.65M|         }
  387|   943k|      }
pcurves_secp384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E13randomize_repERNS_21RandomNumberGeneratorE:
 1142|  1.93k|      void randomize_rep(RandomNumberGenerator& rng) {
 1143|       |         // In certain contexts we may be called with a Null_RNG; in that case the
 1144|       |         // caller is accepting that randomization will not occur
 1145|       |
 1146|       |         // Conditional ok: caller's RNG state (seeded vs not) is presumed public
 1147|  1.93k|         if(rng.is_seeded()) {
  ------------------
  |  Branch (1147:13): [True: 1.93k, False: 0]
  ------------------
 1148|  1.93k|            auto r = FieldElement::random(rng);
 1149|       |
 1150|  1.93k|            auto r2 = r.square();
 1151|  1.93k|            auto r3 = r2 * r;
 1152|       |
 1153|  1.93k|            m_x *= r2;
 1154|  1.93k|            m_y *= r3;
 1155|  1.93k|            m_z *= r;
 1156|  1.93k|         }
 1157|  1.93k|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE6randomERNS_21RandomNumberGeneratorE:
  851|  1.93k|      static Self random(RandomNumberGenerator& rng) {
  852|  1.93k|         constexpr size_t MAX_ATTEMPTS = 1000;
  853|       |
  854|  1.93k|         std::array<uint8_t, Self::BYTES> buf{};
  855|       |
  856|  1.93k|         for(size_t i = 0; i != MAX_ATTEMPTS; ++i) {
  ------------------
  |  Branch (856:28): [True: 1.93k, False: 0]
  ------------------
  857|  1.93k|            rng.randomize(buf);
  858|       |
  859|       |            // Zero off high bits that if set would certainly cause us
  860|       |            // to be out of range
  861|       |            if constexpr(Self::BITS % 8 != 0) {
  862|       |               constexpr uint8_t mask = 0xFF >> (8 - (Self::BITS % 8));
  863|       |               buf[0] &= mask;
  864|       |            }
  865|       |
  866|       |            // Conditionals ok: rejection sampling reveals only values we didn't use
  867|  1.93k|            if(auto s = Self::deserialize(buf)) {
  ------------------
  |  Branch (867:21): [True: 1.93k, False: 0]
  ------------------
  868|  1.93k|               if(s.value().is_nonzero().as_bool()) {
  ------------------
  |  Branch (868:19): [True: 1.93k, False: 0]
  ------------------
  869|  1.93k|                  return s.value();
  870|  1.93k|               }
  871|  1.93k|            }
  872|  1.93k|         }
  873|       |
  874|      0|         throw Internal_Error("Failed to generate random Scalar within bounded number of attempts");
  875|  1.93k|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|  2.52k|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|  2.52k|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 2.52k]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|  2.52k|         const auto words = bytes_to_words<W, N, BYTES>(bytes.first<Self::BYTES>());
  799|       |
  800|       |         // Conditional acceptable: std::optional is implicitly not constant time
  801|  2.52k|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 4, False: 2.52k]
  ------------------
  802|      4|            return {};
  803|      4|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|  2.52k|         return Self::from_words(words);
  807|  2.52k|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE10from_wordsILm6EEESA_NSt3__15arrayImXT_EEE:
  211|  2.52k|      static constexpr Self from_words(std::array<W, L> w) {
  212|  2.52k|         if constexpr(L == N) {
  213|  2.52k|            return Self(Rep::to_rep(w));
  214|       |         } else {
  215|       |            static_assert(L < N);
  216|       |            std::array<W, N> ew = {};
  217|       |            copy_mem(std::span{ew}.template first<L>(), w);
  218|       |            return Self(Rep::to_rep(ew));
  219|       |         }
  220|  2.52k|      }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE10is_nonzeroEv:
  230|  1.93k|      constexpr CT::Choice is_nonzero() const { return !is_zero(); }
pcurves_secp384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E20_const_time_unpoisonEv:
 1176|    483|      constexpr void _const_time_unpoison() const { CT::unpoison_all(m_x, m_y, m_z); }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE20_const_time_unpoisonEv:
  891|  1.44k|      constexpr void _const_time_unpoison() const { CT::unpoison(m_val); }
pcurves_secp384r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm7EED2Ev:
 1358|    287|      ~BlindedScalarBits() {
 1359|    287|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    287|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    287|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS4_12Secp384r1RepEE12ScalarParamsEEEE10from_stashILm9EEESB_RKNSt3__15arrayImXT_EEE:
  774|  1.05k|      static Self from_stash(const std::array<W, L>& stash) {
  775|  1.05k|         static_assert(L >= N);
  776|  1.05k|         std::array<W, N> val = {};
  777|  7.39k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 6.34k, False: 1.05k]
  ------------------
  778|  6.34k|            val[i] = stash[i];
  779|  6.34k|         }
  780|  1.05k|         return Self(val);
  781|  1.05k|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS4_12Secp384r1RepEE12ScalarParamsEEEEC2ENSt3__15arrayImLm6EEE:
  898|  1.34k|      explicit constexpr IntMod(std::array<W, N> v) : m_val(v) {}
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE12serialize_toENSt3__14spanIhLm48EEE:
  739|  2.33k|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|  2.33k|         auto v = Rep::from_rep(m_val);
  741|  2.33k|         std::reverse(v.begin(), v.end());
  742|       |
  743|  2.33k|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|  2.33k|            store_be(bytes, v);
  745|       |         } else {
  746|       |            // Remove leading zero bytes
  747|       |            const auto padded_bytes = store_be(v);
  748|       |            constexpr size_t extra = N * WordInfo<W>::bytes - Self::BYTES;
  749|       |            copy_mem(bytes, std::span{padded_bytes}.template subspan<extra, Self::BYTES>());
  750|       |         }
  751|  2.33k|      }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS4_12Secp384r1RepEE12ScalarParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|    287|      std::array<W, L> stash_value() const {
  760|    287|         static_assert(L >= N);
  761|    287|         std::array<W, L> stash = {};
  762|  2.00k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 1.72k, False: 287]
  ------------------
  763|  1.72k|            stash[i] = m_val[i];
  764|  1.72k|         }
  765|    287|         return stash;
  766|    287|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|  5.53k|      static Self from_stash(const std::array<W, L>& stash) {
  775|  5.53k|         static_assert(L >= N);
  776|  5.53k|         std::array<W, N> val = {};
  777|  38.7k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 33.2k, False: 5.53k]
  ------------------
  778|  33.2k|            val[i] = stash[i];
  779|  33.2k|         }
  780|  5.53k|         return Self(val);
  781|  5.53k|      }
pcurves_secp384r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm4EEC2ERKNS_16AffineCurvePointINS_6IntModINS2_12Secp384r1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
 1487|    196|      explicit WindowedBoothMulTable(const AffinePoint& p) : m_table(varpoint_setup<C, TableSize>(p)) {}
pcurves_secp384r1.cpp:_ZN5BotanplERKNS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_EERKNS_16AffineCurvePointISB_EE:
 1066|  1.37k|      friend constexpr Self operator+(const Self& a, const AffinePoint& b) { return Self::add_mixed(a, b); }
pcurves_secp384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E9add_mixedERKSC_RKNS_16AffineCurvePointISB_EE:
 1091|  1.37k|      constexpr static Self add_mixed(const Self& a, const AffinePoint& b) {
 1092|  1.37k|         return point_add_mixed<Self, AffinePoint, FieldElement>(a, b, FieldElement::one());
 1093|  1.37k|      }
pcurves_secp384r1.cpp:_ZNK5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm4EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS2_12Secp384r1RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1489|    196|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1490|    196|         const BlindedScalar bits(s, rng);
 1491|       |
 1492|    196|         const size_t scalar_bits = bits.bits();
 1493|    196|         const size_t full_windows = compute_full_windows(scalar_bits + 1, WindowBits);
 1494|    196|         const size_t initial_shift = compute_initial_shift(scalar_bits + 1, WindowBits);
 1495|       |
 1496|    196|         BOTAN_DEBUG_ASSERT(full_windows * WindowBits + initial_shift == scalar_bits + 1);
  ------------------
  |  |  137|    196|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|    196|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 196]
  |  |  ------------------
  ------------------
 1497|    196|         BOTAN_DEBUG_ASSERT(initial_shift > 0);
  ------------------
  |  |  137|    196|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|    196|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 196]
  |  |  ------------------
  ------------------
 1498|       |
 1499|    196|         auto accum = ProjectivePoint::identity();
 1500|    196|         CT::poison(accum);
 1501|       |
 1502|  17.0k|         for(size_t i = 0; i != full_windows; ++i) {
  ------------------
  |  Branch (1502:28): [True: 16.8k, False: 196]
  ------------------
 1503|  16.8k|            const size_t idx = scalar_bits - initial_shift - WindowBits * i;
 1504|       |
 1505|  16.8k|            const size_t w_i = bits.get_window(idx);
 1506|  16.8k|            const auto [tidx, tneg] = booth_recode<WindowBits>(w_i);
 1507|       |
 1508|       |            // Conditional ok: loop iteration count is public
 1509|  16.8k|            if(i == 0) {
  ------------------
  |  Branch (1509:16): [True: 196, False: 16.6k]
  ------------------
 1510|    196|               accum = ProjectivePoint::from_affine(m_table.ct_select(tidx));
 1511|    196|               accum.conditional_assign(tneg, accum.negate());
 1512|  16.6k|            } else {
 1513|  16.6k|               accum = ProjectivePoint::add_or_sub(accum, m_table.ct_select(tidx), tneg);
 1514|  16.6k|            }
 1515|       |
 1516|  16.8k|            accum = accum.dbl_n(WindowBits);
 1517|       |
 1518|       |            // Conditional ok: loop iteration count is public
 1519|  16.8k|            if(i <= 3) {
  ------------------
  |  Branch (1519:16): [True: 784, False: 16.0k]
  ------------------
 1520|    784|               accum.randomize_rep(rng);
 1521|    784|            }
 1522|  16.8k|         }
 1523|       |
 1524|       |         // final window (note one bit shorter than previous reads)
 1525|    196|         const size_t w_l = bits.get_window(0) & ((1 << WindowBits) - 1);
 1526|    196|         const auto [tidx, tneg] = booth_recode<WindowBits>(w_l << 1);
 1527|    196|         accum = ProjectivePoint::add_or_sub(accum, m_table.ct_select(tidx), tneg);
 1528|       |
 1529|    196|         CT::unpoison(accum);
 1530|    196|         return accum;
 1531|    196|      }
pcurves_secp384r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm6EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS2_12Secp384r1RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    196|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    196|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 196, Folded]
  |  Branch (1308:33): [True: 196, False: 0]
  ------------------
 1309|    196|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|    196|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|    196|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|    196|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|    196|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|    196|            W mask[n_words] = {0};
 1318|    196|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|    196|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|    196|            if constexpr(ExcessBits > 0) {
 1323|    196|               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|    196|               mask[MaskWords - 1] &= ExcessMask;
 1325|    196|            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|    196|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|    196|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|    196|            mask[0] |= 1;
 1331|       |
 1332|    196|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|    196|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|    196|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|    196|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|    196|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|    196|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|    196|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    196|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|      0|            m_bytes.resize(C::Scalar::BYTES);
 1346|      0|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|      0|            m_bits = C::Scalar::BITS;
 1348|      0|         }
 1349|       |
 1350|    196|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    196|      }
pcurves_secp384r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm6EE4bitsEv:
 1305|    196|      size_t bits() const { return m_bits; }
pcurves_secp384r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm4EE20compute_full_windowsEmm:
 1468|    196|      static constexpr size_t compute_full_windows(size_t sb, size_t wb) {
 1469|    196|         if(sb % wb == 0) {
  ------------------
  |  Branch (1469:13): [True: 0, False: 196]
  ------------------
 1470|      0|            return (sb - 1) / wb;
 1471|    196|         } else {
 1472|    196|            return sb / wb;
 1473|    196|         }
 1474|    196|      }
pcurves_secp384r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm4EE21compute_initial_shiftEmm:
 1476|    196|      static constexpr size_t compute_initial_shift(size_t sb, size_t wb) {
 1477|    196|         if(sb % wb == 0) {
  ------------------
  |  Branch (1477:13): [True: 0, False: 196]
  ------------------
 1478|      0|            return wb;
 1479|    196|         } else {
 1480|    196|            return sb - (sb / wb) * wb;
 1481|    196|         }
 1482|    196|      }
pcurves_secp384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E8identityEv:
 1038|    196|      static constexpr Self identity() { return Self(FieldElement::zero(), FieldElement::one(), FieldElement::zero()); }
pcurves_secp384r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm6EE10get_windowEm:
 1353|  17.0k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  17.0k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  17.0k|      }
pcurves_secp384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E5dbl_nEm:
 1108|  16.8k|      constexpr Self dbl_n(size_t n) const {
 1109|  16.8k|         if constexpr(Self::A_is_minus_3) {
 1110|  16.8k|            return dbl_n_a_minus_3(*this, n);
 1111|       |         } else if constexpr(Self::A_is_zero) {
 1112|       |            return dbl_n_a_zero(*this, n);
 1113|       |         } else {
 1114|       |            return dbl_n_generic(*this, A, n);
 1115|       |         }
 1116|  16.8k|      }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE4div2Ev:
  302|  16.8k|      Self div2() const {
  303|       |         // The inverse of 2 modulo P is (P/2)+1; this avoids a constexpr time
  304|       |         // general inversion, which some compilers can't handle
  305|  16.8k|         constexpr auto INV_2 = p_div_2_plus_1(Rep::P);
  306|       |
  307|       |         // We could multiply by INV_2 but there is a better way ...
  308|       |
  309|  16.8k|         std::array<W, N> t = value();
  310|  16.8k|         const W borrow = shift_right<1>(t);
  311|       |
  312|       |         // If value was odd, add (P/2)+1
  313|  16.8k|         const auto mask = CT::Mask<W>::expand(borrow).value();
  314|       |
  315|  16.8k|         W carry = 0;
  316|       |
  317|   117k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (317:28): [True: 101k, False: 16.8k]
  ------------------
  318|   101k|            t[i] = word_add(t[i], INV_2[i] & mask, &carry);
  319|   101k|         }
  320|       |
  321|  16.8k|         return Self(t);
  322|  16.8k|      }
pcurves_secp384r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm6EED2Ev:
 1358|    196|      ~BlindedScalarBits() {
 1359|    196|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    196|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    196|      }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS4_12Secp384r1RepEE12ScalarParamsEEEE7is_zeroEv:
  225|    574|      constexpr CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_val.size()).as_choice(); }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEEeqERKSA_:
  722|    682|      constexpr CT::Choice operator==(const Self& other) const {
  723|    682|         return CT::is_equal(this->data(), other.data(), N).as_choice();
  724|    682|      }
pcurves_secp384r1.cpp:_ZN5Botan13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS2_12Secp384r1RepEE7x3_ax_bERKNS_6IntModINS5_INS6_11FieldParamsEEEEE:
 1275|    682|      static constexpr FieldElement x3_ax_b(const FieldElement& x) { return (x.square() + A) * x + B; }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE12correct_signENS_2CT6ChoiceE:
  248|    196|      constexpr Self correct_sign(CT::Choice even) const {
  249|    196|         const auto flip = (even != this->is_even());
  250|    196|         return Self::choose(flip, this->negate(), *this);
  251|    196|      }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE7is_evenEv:
  240|    196|      constexpr CT::Choice is_even() const {
  241|    196|         auto v = Rep::from_rep(m_val);
  242|    196|         return !CT::Choice::from_int(v[0] & 0x01);
  243|    196|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE6chooseENS_2CT6ChoiceERKSA_SE_:
  256|    196|      static constexpr Self choose(CT::Choice choice, const Self& x, const Self& y) {
  257|    196|         auto r = y;
  258|    196|         r.conditional_assign(choice, x);
  259|    196|         return r;
  260|    196|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS4_12Secp384r1RepEE12ScalarParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|    287|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|    287|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 287]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|    287|         const auto words = bytes_to_words<W, N, BYTES>(bytes.first<Self::BYTES>());
  799|       |
  800|       |         // Conditional acceptable: std::optional is implicitly not constant time
  801|    287|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 0, False: 287]
  ------------------
  802|      0|            return {};
  803|      0|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|    287|         return Self::from_words(words);
  807|    287|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS4_12Secp384r1RepEE12ScalarParamsEEEE10from_wordsILm6EEESB_NSt3__15arrayImXT_EEE:
  211|    287|      static constexpr Self from_words(std::array<W, L> w) {
  212|    287|         if constexpr(L == N) {
  213|    287|            return Self(Rep::to_rep(w));
  214|       |         } else {
  215|       |            static_assert(L < N);
  216|       |            std::array<W, N> ew = {};
  217|       |            copy_mem(std::span{ew}.template first<L>(), w);
  218|       |            return Self(Rep::to_rep(ew));
  219|       |         }
  220|    287|      }
pcurves_secp384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS3_12Secp384r1RepEE12ScalarParamsEE6to_repERKNSt3__15arrayImLm6EEE:
  115|    287|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|    287|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|    287|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|    287|         return Self::redc(z);
  119|    287|      }
pcurves_secp384r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEEE12serialize_toENSt3__14spanIhLm97EEE:
  941|  1.07k|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  942|  1.07k|         BOTAN_STATE_CHECK(this->is_identity().as_bool() == false);
  ------------------
  |  |   51|  1.07k|   do {                                                         \
  |  |   52|  1.07k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  1.07k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 1.07k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  1.07k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 1.07k]
  |  |  ------------------
  ------------------
  943|  1.07k|         BufferStuffer pack(bytes);
  944|  1.07k|         pack.append(0x04);
  945|  1.07k|         x().serialize_to(pack.next<FieldElement::BYTES>());
  946|  1.07k|         y().serialize_to(pack.next<FieldElement::BYTES>());
  947|  1.07k|         BOTAN_DEBUG_ASSERT(pack.full());
  ------------------
  |  |  137|  1.07k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  1.07k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 1.07k]
  |  |  ------------------
  ------------------
  948|  1.07k|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS4_12Secp384r1RepEE12ScalarParamsEEEE6randomERNS_21RandomNumberGeneratorE:
  851|    287|      static Self random(RandomNumberGenerator& rng) {
  852|    287|         constexpr size_t MAX_ATTEMPTS = 1000;
  853|       |
  854|    287|         std::array<uint8_t, Self::BYTES> buf{};
  855|       |
  856|    287|         for(size_t i = 0; i != MAX_ATTEMPTS; ++i) {
  ------------------
  |  Branch (856:28): [True: 287, False: 0]
  ------------------
  857|    287|            rng.randomize(buf);
  858|       |
  859|       |            // Zero off high bits that if set would certainly cause us
  860|       |            // to be out of range
  861|       |            if constexpr(Self::BITS % 8 != 0) {
  862|       |               constexpr uint8_t mask = 0xFF >> (8 - (Self::BITS % 8));
  863|       |               buf[0] &= mask;
  864|       |            }
  865|       |
  866|       |            // Conditionals ok: rejection sampling reveals only values we didn't use
  867|    287|            if(auto s = Self::deserialize(buf)) {
  ------------------
  |  Branch (867:21): [True: 287, False: 0]
  ------------------
  868|    287|               if(s.value().is_nonzero().as_bool()) {
  ------------------
  |  Branch (868:19): [True: 287, False: 0]
  ------------------
  869|    287|                  return s.value();
  870|    287|               }
  871|    287|            }
  872|    287|         }
  873|       |
  874|      0|         throw Internal_Error("Failed to generate random Scalar within bounded number of attempts");
  875|    287|      }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS4_12Secp384r1RepEE12ScalarParamsEEEE10is_nonzeroEv:
  230|    287|      constexpr CT::Choice is_nonzero() const { return !is_zero(); }
pcurves_secp521r1.cpp:_ZN5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm6EEC2ERKNS_16AffineCurvePointINS_6IntModINS3_7P521RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
 1405|      1|            m_table(basemul_booth_setup<C, WindowBits>(p, BlindedScalar::Bits + 1)) {}
pcurves_secp521r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E11from_affineERKNS_16AffineCurvePointISB_EE:
 1016|  1.09k|      static constexpr Self from_affine(const AffinePoint& pt) {
 1017|       |         /*
 1018|       |         * If the point is the identity element (x=0, y=0) then instead of
 1019|       |         * creating (x, y, 1) = (0, 0, 1) we want our projective identity
 1020|       |         * encoding of (0, 1, 0)
 1021|       |         *
 1022|       |         * Which we can achieve by a conditional swap of y and z if the
 1023|       |         * affine point is the identity.
 1024|       |         */
 1025|       |
 1026|  1.09k|         auto x = pt.x();
 1027|  1.09k|         auto y = pt.y();
 1028|  1.09k|         auto z = FieldElement::one();
 1029|       |
 1030|  1.09k|         FieldElement::conditional_swap(pt.is_identity(), y, z);
 1031|       |
 1032|  1.09k|         return ProjectiveCurvePoint(x, y, z);
 1033|  1.09k|      }
pcurves_secp521r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE1xEv:
  971|  2.24M|      constexpr const FieldElement& x() const { return m_x; }
pcurves_secp521r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE1yEv:
  976|  2.16M|      constexpr const FieldElement& y() const { return m_y; }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE3oneEv:
  200|  83.7k|      static constexpr Self one() { return Self(Rep::one()); }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEC2ENSt3__15arrayImLm9EEE:
  898|  4.79M|      explicit constexpr IntMod(std::array<W, N> v) : m_val(v) {}
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE16conditional_swapENS_2CT6ChoiceERSA_SD_:
  410|  1.09k|      static constexpr void conditional_swap(CT::Choice cond, Self& x, Self& y) {
  411|  1.09k|         const W mask = cond.into_bitmask<W>();
  412|       |
  413|  10.9k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (413:28): [True: 9.86k, False: 1.09k]
  ------------------
  414|  9.86k|            auto nx = Botan::choose(mask, y.m_val[i], x.m_val[i]);
  415|  9.86k|            auto ny = Botan::choose(mask, x.m_val[i], y.m_val[i]);
  416|  9.86k|            x.m_val[i] = nx;
  417|  9.86k|            y.m_val[i] = ny;
  418|  9.86k|         }
  419|  1.09k|      }
pcurves_secp521r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE11is_identityEv:
  928|  87.4k|      constexpr CT::Choice is_identity() const { return x().is_zero() && y().is_zero(); }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE7is_zeroEv:
  225|   439k|      constexpr CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_val.size()).as_choice(); }
pcurves_secp521r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_EC2ERKSB_SE_SE_:
 1056|   128k|            m_x(x), m_y(y), m_z(z) {}
pcurves_secp521r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E3dblEv:
 1121|  4.24k|      constexpr Self dbl() const {
 1122|  4.24k|         if constexpr(Self::A_is_minus_3) {
 1123|  4.24k|            return dbl_a_minus_3(*this);
 1124|       |         } else if constexpr(Self::A_is_zero) {
 1125|       |            return dbl_a_zero(*this);
 1126|       |         } else {
 1127|       |            return dbl_generic(*this, A);
 1128|       |         }
 1129|  4.24k|      }
pcurves_secp521r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E1zEv:
 1172|   500k|      constexpr const FieldElement& z() const { return m_z; }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE6squareEv:
  426|  1.10M|      constexpr BOTAN_FORCE_INLINE Self square() const {
  427|  1.10M|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  428|  1.10M|         comba_sqr<N>(z.data(), this->data());
  429|  1.10M|         return Self(Rep::redc(z));
  430|  1.10M|      }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4dataEv:
  896|  4.89M|      constexpr const W* data() const { return m_val.data(); }
pcurves_secp521r1.cpp:_ZN5BotanmlERKNS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEESC_:
  346|  1.12M|      friend constexpr BOTAN_FORCE_INLINE Self operator*(const Self& a, const Self& b) {
  347|  1.12M|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  348|  1.12M|         comba_mul<N>(z.data(), a.data(), b.data());
  349|  1.12M|         return Self(Rep::redc(z));
  350|  1.12M|      }
pcurves_secp521r1.cpp:_ZN5BotanmiERKNS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEESC_:
  281|  1.26M|      friend constexpr BOTAN_FORCE_INLINE Self operator-(const Self& a, const Self& b) {
  282|  1.26M|         std::array<W, N> r;  // NOLINT(*-member-init)
  283|  1.26M|         W carry = 0;
  284|  12.6M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (284:28): [True: 11.4M, False: 1.26M]
  ------------------
  285|  11.4M|            r[i] = word_sub(a.m_val[i], b.m_val[i], &carry);
  286|  11.4M|         }
  287|       |
  288|  1.26M|         const auto mask = CT::Mask<W>::expand(carry).value();
  289|       |
  290|  1.26M|         carry = 0;
  291|       |
  292|  12.6M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (292:28): [True: 11.4M, False: 1.26M]
  ------------------
  293|  11.4M|            r[i] = word_add(r[i], P[i] & mask, &carry);
  294|  11.4M|         }
  295|       |
  296|  1.26M|         return Self(r);
  297|  1.26M|      }
pcurves_secp521r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E1xEv:
 1162|   314k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4mul3Ev:
  335|   191k|      constexpr inline Self mul3() const { return mul2() + (*this); }
pcurves_secp521r1.cpp:_ZN5BotanplERKNS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEESC_:
  265|   281k|      friend constexpr BOTAN_FORCE_INLINE Self operator+(const Self& a, const Self& b) {
  266|   281k|         std::array<W, N> t;  // NOLINT(*-member-init)
  267|       |
  268|   281k|         W carry = 0;
  269|  2.81M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (269:28): [True: 2.53M, False: 281k]
  ------------------
  270|  2.53M|            t[i] = word_add(a.m_val[i], b.m_val[i], &carry);
  271|  2.53M|         }
  272|       |
  273|   281k|         std::array<W, N> r;  // NOLINT(*-member-init)
  274|   281k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  275|   281k|         return Self(r);
  276|   281k|      }
pcurves_secp521r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E1yEv:
 1167|   309k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4mul4Ev:
  338|  4.24k|      constexpr inline Self mul4() const { return mul2().mul2(); }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4mul2Ev:
  325|   631k|      constexpr BOTAN_FORCE_INLINE Self mul2() const {
  326|   631k|         std::array<W, N> t = value();
  327|   631k|         const W carry = shift_left<1>(t);
  328|       |
  329|   631k|         std::array<W, N> r;  // NOLINT(*-member-init)
  330|   631k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  331|   631k|         return Self(r);
  332|   631k|      }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE5valueEv:
  894|   669k|      constexpr const std::array<W, N>& value() const { return m_val; }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4mul8Ev:
  341|  4.24k|      constexpr inline Self mul8() const { return mul2().mul2().mul2(); }
pcurves_secp521r1.cpp:_ZN5BotanplERKNS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_EESE_:
 1064|  1.45k|      friend constexpr Self operator+(const Self& a, const Self& b) { return Self::add(a, b); }
pcurves_secp521r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E3addERKSC_SE_:
 1103|  1.45k|      constexpr static Self add(const Self& a, const Self& b) { return point_add<Self, FieldElement>(a, b); }
pcurves_secp521r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E11is_identityEv:
 1082|  93.9k|      constexpr CT::Choice is_identity() const { return z().is_zero(); }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE18conditional_assignERSA_SB_SB_NS_2CT6ChoiceERKSA_SF_SF_:
  395|   168k|         Self& x, Self& y, Self& z, CT::Choice cond, const Self& nx, const Self& ny, const Self& nz) {
  396|   168k|         const W mask = cond.into_bitmask<W>();
  397|       |
  398|  1.68M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (398:28): [True: 1.51M, False: 168k]
  ------------------
  399|  1.51M|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  400|  1.51M|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  401|  1.51M|            z.m_val[i] = Botan::choose(mask, nz.m_val[i], z.m_val[i]);
  402|  1.51M|         }
  403|   168k|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEmLERKSA_:
  355|   358k|      constexpr BOTAN_FORCE_INLINE Self& operator*=(const Self& other) {
  356|   358k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  357|   358k|         comba_mul<N>(z.data(), data(), other.data());
  358|   358k|         m_val = Rep::redc(z);
  359|   358k|         return (*this);
  360|   358k|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE8square_nEm:
  439|  12.3k|      constexpr void square_n(size_t n) {
  440|  12.3k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  441|   753k|         for(size_t i = 0; i != n; ++i) {
  ------------------
  |  Branch (441:28): [True: 741k, False: 12.3k]
  ------------------
  442|   741k|            comba_sqr<N>(z.data(), this->data());
  443|   741k|            m_val = Rep::redc(z);
  444|   741k|         }
  445|  12.3k|      }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE14invert_vartimeEv:
  598|      1|      constexpr Self invert_vartime() const {
  599|       |         // Conditional ok: this function is variable time
  600|      1|         if(this->is_zero().as_bool()) {
  ------------------
  |  Branch (600:13): [True: 0, False: 1]
  ------------------
  601|      0|            return Self::zero();
  602|      0|         }
  603|       |
  604|      1|         auto x = Self(std::array<W, N>{1});  // 1 in standard domain
  605|      1|         auto b = Self(this->to_words());     // *this in standard domain
  606|       |
  607|       |         // First loop iteration
  608|      1|         Self::_invert_vartime_div2_helper(b, x);
  609|       |
  610|      1|         auto a = b.negate();
  611|       |         // y += x but y is zero at the outset
  612|      1|         auto y = x;
  613|       |
  614|       |         // First half of second loop iteration
  615|      1|         Self::_invert_vartime_div2_helper(a, y);
  616|       |
  617|    350|         for(;;) {
  618|       |            // Conditional ok: this function is variable time
  619|    350|            if(a.m_val == b.m_val) {
  ------------------
  |  Branch (619:16): [True: 1, False: 349]
  ------------------
  620|       |               // At this point it should be that a == b == 1
  621|      1|               auto r = y.negate();
  622|       |
  623|       |               // Convert back to Montgomery if required
  624|      1|               r.m_val = Rep::to_rep(r.m_val);
  625|      1|               return r;
  626|      1|            }
  627|       |
  628|    349|            auto nx = x + y;
  629|       |
  630|       |            /*
  631|       |            * Otherwise either b > a or a > b
  632|       |            *
  633|       |            * If b > a we want to set b to b - a
  634|       |            * Otherwise we want to set a to a - b
  635|       |            *
  636|       |            * Compute r = b - a and check if it underflowed
  637|       |            * If it did not then we are in the b > a path
  638|       |            */
  639|    349|            std::array<W, N> r;  // NOLINT(*-member-init)
  640|    349|            const word carry = bigint_sub3(r.data(), b.data(), N, a.data(), N);
  641|       |
  642|       |            // Conditional ok: this function is variable time
  643|    349|            if(carry == 0) {
  ------------------
  |  Branch (643:16): [True: 170, False: 179]
  ------------------
  644|       |               // b > a
  645|    170|               b.m_val = r;
  646|    170|               x = nx;
  647|    170|               Self::_invert_vartime_div2_helper(b, x);
  648|    179|            } else {
  649|       |               // We know this can't underflow because a > b
  650|    179|               bigint_sub3(r.data(), a.data(), N, b.data(), N);
  651|    179|               a.m_val = r;
  652|    179|               y = nx;
  653|    179|               Self::_invert_vartime_div2_helper(a, y);
  654|    179|            }
  655|    349|         }
  656|      1|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4zeroEv:
  195|   162k|      static constexpr Self zero() { return Self(std::array<W, N>{0}); }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE8to_wordsEv:
  734|      1|      constexpr std::array<W, Self::N> to_words() const { return Rep::from_rep(m_val); }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE27_invert_vartime_div2_helperERSA_SB_:
  547|    351|      static constexpr void _invert_vartime_div2_helper(Self& a, Self& x) {
  548|    351|         constexpr auto INV_2 = p_div_2_plus_1(Rep::P);
  549|       |
  550|       |         // Conditional ok: this function is variable time
  551|  1.09k|         while((a.m_val[0] & 1) != 1) {
  ------------------
  |  Branch (551:16): [True: 742, False: 351]
  ------------------
  552|    742|            shift_right<1>(a.m_val);
  553|       |
  554|    742|            const W borrow = shift_right<1>(x.m_val);
  555|       |
  556|       |            // Conditional ok: this function is variable time
  557|    742|            if(borrow) {
  ------------------
  |  Branch (557:16): [True: 109, False: 633]
  ------------------
  558|    109|               bigint_add2(x.m_val.data(), N, INV_2.data(), N);
  559|    109|            }
  560|    742|         }
  561|    351|      }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE6negateEv:
  452|  81.1k|      constexpr Self negate() const {
  453|  81.1k|         const W x_is_zero = ~CT::all_zeros(this->data(), N).value();
  454|       |
  455|  81.1k|         std::array<W, N> r;  // NOLINT(*-member-init)
  456|  81.1k|         W carry = 0;
  457|   811k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (457:28): [True: 730k, False: 81.1k]
  ------------------
  458|   730k|            r[i] = word_sub(P[i] & x_is_zero, m_val[i], &carry);
  459|   730k|         }
  460|       |
  461|  81.1k|         return Self(r);
  462|  81.1k|      }
pcurves_secp521r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEEC2ERKSB_SE_:
  917|  94.0k|      constexpr AffineCurvePoint(const FieldElement& x, const FieldElement& y) : m_x(x), m_y(y) {}
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|  3.52k|      std::array<W, L> stash_value() const {
  760|  3.52k|         static_assert(L >= N);
  761|  3.52k|         std::array<W, L> stash = {};
  762|  35.2k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 31.7k, False: 3.52k]
  ------------------
  763|  31.7k|            stash[i] = m_val[i];
  764|  31.7k|         }
  765|  3.52k|         return stash;
  766|  3.52k|      }
pcurves_secp521r1.cpp:_ZNK5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm6EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS3_7P521RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1407|    445|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1408|    445|         const BlindedScalar scalar(s, rng);
 1409|    445|         return basemul_booth_exec<C, WindowBits>(m_table, scalar, rng);
 1410|    445|      }
pcurves_secp521r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm7EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS3_7P521RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    445|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    445|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 445, Folded]
  |  Branch (1308:33): [True: 445, False: 0]
  ------------------
 1309|    445|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|    445|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|    445|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|    445|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|    445|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|    445|            W mask[n_words] = {0};
 1318|    445|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|    445|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|    445|            if constexpr(ExcessBits > 0) {
 1323|    445|               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|    445|               mask[MaskWords - 1] &= ExcessMask;
 1325|    445|            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|    445|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|    445|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|    445|            mask[0] |= 1;
 1331|       |
 1332|    445|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|    445|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|    445|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|    445|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|    445|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|    445|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|    445|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    445|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|      0|            m_bytes.resize(C::Scalar::BYTES);
 1346|      0|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|      0|            m_bits = C::Scalar::BITS;
 1348|      0|         }
 1349|       |
 1350|    445|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    445|      }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS5_7P521RepEE12ScalarParamsEEEE8to_wordsEv:
  734|    770|      constexpr std::array<W, Self::N> to_words() const { return Rep::from_rep(m_val); }
pcurves_secp521r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS4_7P521RepEE12ScalarParamsEE8from_repERKNSt3__15arrayImLm9EEE:
  137|  1.21k|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|  1.21k|         std::array<W, 2 * N> ze = {};
  139|  1.21k|         copy_mem(std::span{ze}.template first<N>(), z);
  140|  1.21k|         return Self::redc(ze);
  141|  1.21k|      }
pcurves_secp521r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS4_7P521RepEE12ScalarParamsEE4redcERKNSt3__15arrayImLm18EEE:
  104|  1.66k|      constexpr static std::array<W, N> redc(const std::array<W, 2 * N>& z) {
  105|       |         if constexpr(P_dash == 1) {
  106|       |            return monty_redc_pdash1(z, P);
  107|  1.66k|         } else {
  108|  1.66k|            return monty_redc(z, P, P_dash);
  109|  1.66k|         }
  110|  1.66k|      }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS5_7P521RepEE12ScalarParamsEEEE12serialize_toENSt3__14spanIhLm66EEE:
  739|    445|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    445|         auto v = Rep::from_rep(m_val);
  741|    445|         std::reverse(v.begin(), v.end());
  742|       |
  743|       |         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|       |            store_be(bytes, v);
  745|    445|         } else {
  746|       |            // Remove leading zero bytes
  747|    445|            const auto padded_bytes = store_be(v);
  748|    445|            constexpr size_t extra = N * WordInfo<W>::bytes - Self::BYTES;
  749|    445|            copy_mem(bytes, std::span{padded_bytes}.template subspan<extra, Self::BYTES>());
  750|    445|         }
  751|    445|      }
pcurves_secp521r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm7EE4bitsEv:
 1305|    445|      size_t bits() const { return m_bits; }
pcurves_secp521r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E18conditional_assignENS_2CT6ChoiceERKSC_:
 1084|    770|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
 1085|    770|         FieldElement::conditional_assign(m_x, m_y, m_z, cond, pt.x(), pt.y(), pt.z());
 1086|    770|      }
pcurves_secp521r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E6negateEv:
 1134|    770|      constexpr Self negate() const { return Self(x(), y().negate(), z()); }
pcurves_secp521r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E18_const_time_poisonEv:
 1174|    770|      constexpr void _const_time_poison() const { CT::poison_all(m_x, m_y, m_z); }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE18_const_time_poisonEv:
  889|  2.31k|      constexpr void _const_time_poison() const { CT::poison(m_val); }
pcurves_secp521r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm7EE10get_windowEm:
 1353|  43.1k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  43.1k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  43.1k|      }
pcurves_secp521r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E10add_or_subERKSC_RKNS_16AffineCurvePointISB_EENS_2CT6ChoiceE:
 1096|  80.0k|      constexpr static Self add_or_sub(const Self& a, const AffinePoint& b, CT::Choice sub) {
 1097|  80.0k|         return point_add_or_sub_mixed<Self, AffinePoint, FieldElement>(a, b, sub, FieldElement::one());
 1098|  80.0k|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE18conditional_assignENS_2CT6ChoiceERKSA_:
  367|  80.7k|      constexpr void conditional_assign(CT::Choice cond, const Self& nx) {
  368|  80.7k|         const W mask = cond.into_bitmask<W>();
  369|       |
  370|   807k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (370:28): [True: 726k, False: 80.7k]
  ------------------
  371|   726k|            m_val[i] = Botan::choose(mask, nx.m_val[i], m_val[i]);
  372|   726k|         }
  373|  80.7k|      }
pcurves_secp521r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE9ct_selectENSt3__14spanIKSC_Lm18446744073709551615EEEm:
  955|  43.1k|      static constexpr auto ct_select(std::span<const Self> pts, size_t idx) {
  956|  43.1k|         auto result = Self::identity(pts[0]);
  957|       |
  958|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
  959|  43.1k|         const size_t idx1 = static_cast<size_t>(idx - 1);
  960|  1.42M|         for(size_t i = 0; i != pts.size(); ++i) {
  ------------------
  |  Branch (960:28): [True: 1.38M, False: 43.1k]
  ------------------
  961|  1.38M|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
  962|  1.38M|            result.conditional_assign(found, pts[i]);
  963|  1.38M|         }
  964|       |
  965|  43.1k|         return result;
  966|  43.1k|      }
pcurves_secp521r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE8identityERKSC_:
  924|  80.8k|      static constexpr Self identity(const Self& /*unused*/) {
  925|  80.8k|         return Self(FieldElement::zero(), FieldElement::zero());
  926|  80.8k|      }
pcurves_secp521r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE18conditional_assignENS_2CT6ChoiceERKSC_:
  981|  1.98M|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
  982|  1.98M|         FieldElement::conditional_assign(m_x, m_y, cond, pt.x(), pt.y());
  983|  1.98M|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE18conditional_assignERSA_SB_NS_2CT6ChoiceERKSA_SF_:
  380|  1.98M|      static constexpr void conditional_assign(Self& x, Self& y, CT::Choice cond, const Self& nx, const Self& ny) {
  381|  1.98M|         const W mask = cond.into_bitmask<W>();
  382|       |
  383|  19.8M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (383:28): [True: 17.8M, False: 1.98M]
  ------------------
  384|  17.8M|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  385|  17.8M|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  386|  17.8M|         }
  387|  1.98M|      }
pcurves_secp521r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E13randomize_repERNS_21RandomNumberGeneratorE:
 1142|  3.08k|      void randomize_rep(RandomNumberGenerator& rng) {
 1143|       |         // In certain contexts we may be called with a Null_RNG; in that case the
 1144|       |         // caller is accepting that randomization will not occur
 1145|       |
 1146|       |         // Conditional ok: caller's RNG state (seeded vs not) is presumed public
 1147|  3.08k|         if(rng.is_seeded()) {
  ------------------
  |  Branch (1147:13): [True: 3.08k, False: 0]
  ------------------
 1148|  3.08k|            auto r = FieldElement::random(rng);
 1149|       |
 1150|  3.08k|            auto r2 = r.square();
 1151|  3.08k|            auto r3 = r2 * r;
 1152|       |
 1153|  3.08k|            m_x *= r2;
 1154|  3.08k|            m_y *= r3;
 1155|  3.08k|            m_z *= r;
 1156|  3.08k|         }
 1157|  3.08k|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE6randomERNS_21RandomNumberGeneratorE:
  851|  3.08k|      static Self random(RandomNumberGenerator& rng) {
  852|  3.08k|         constexpr size_t MAX_ATTEMPTS = 1000;
  853|       |
  854|  3.08k|         std::array<uint8_t, Self::BYTES> buf{};
  855|       |
  856|  3.08k|         for(size_t i = 0; i != MAX_ATTEMPTS; ++i) {
  ------------------
  |  Branch (856:28): [True: 3.08k, False: 0]
  ------------------
  857|  3.08k|            rng.randomize(buf);
  858|       |
  859|       |            // Zero off high bits that if set would certainly cause us
  860|       |            // to be out of range
  861|  3.08k|            if constexpr(Self::BITS % 8 != 0) {
  862|  3.08k|               constexpr uint8_t mask = 0xFF >> (8 - (Self::BITS % 8));
  863|  3.08k|               buf[0] &= mask;
  864|  3.08k|            }
  865|       |
  866|       |            // Conditionals ok: rejection sampling reveals only values we didn't use
  867|  3.08k|            if(auto s = Self::deserialize(buf)) {
  ------------------
  |  Branch (867:21): [True: 3.08k, False: 0]
  ------------------
  868|  3.08k|               if(s.value().is_nonzero().as_bool()) {
  ------------------
  |  Branch (868:19): [True: 3.08k, False: 0]
  ------------------
  869|  3.08k|                  return s.value();
  870|  3.08k|               }
  871|  3.08k|            }
  872|  3.08k|         }
  873|       |
  874|      0|         throw Internal_Error("Failed to generate random Scalar within bounded number of attempts");
  875|  3.08k|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|  4.16k|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|  4.16k|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 4.16k]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|  4.16k|         const auto words = bytes_to_words<W, N, BYTES>(bytes.first<Self::BYTES>());
  799|       |
  800|       |         // Conditional acceptable: std::optional is implicitly not constant time
  801|  4.16k|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 4, False: 4.15k]
  ------------------
  802|      4|            return {};
  803|      4|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|  4.15k|         return Self::from_words(words);
  807|  4.16k|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE10from_wordsILm9EEESA_NSt3__15arrayImXT_EEE:
  211|  4.15k|      static constexpr Self from_words(std::array<W, L> w) {
  212|  4.15k|         if constexpr(L == N) {
  213|  4.15k|            return Self(Rep::to_rep(w));
  214|       |         } else {
  215|       |            static_assert(L < N);
  216|       |            std::array<W, N> ew = {};
  217|       |            copy_mem(std::span{ew}.template first<L>(), w);
  218|       |            return Self(Rep::to_rep(ew));
  219|       |         }
  220|  4.15k|      }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE10is_nonzeroEv:
  230|  3.08k|      constexpr CT::Choice is_nonzero() const { return !is_zero(); }
pcurves_secp521r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E20_const_time_unpoisonEv:
 1176|    770|      constexpr void _const_time_unpoison() const { CT::unpoison_all(m_x, m_y, m_z); }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE20_const_time_unpoisonEv:
  891|  2.31k|      constexpr void _const_time_unpoison() const { CT::unpoison(m_val); }
pcurves_secp521r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm7EED2Ev:
 1358|    445|      ~BlindedScalarBits() {
 1359|    445|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    445|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    445|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS5_7P521RepEE12ScalarParamsEEEE10from_stashILm9EEESB_RKNSt3__15arrayImXT_EEE:
  774|  1.66k|      static Self from_stash(const std::array<W, L>& stash) {
  775|  1.66k|         static_assert(L >= N);
  776|  1.66k|         std::array<W, N> val = {};
  777|  16.6k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 14.9k, False: 1.66k]
  ------------------
  778|  14.9k|            val[i] = stash[i];
  779|  14.9k|         }
  780|  1.66k|         return Self(val);
  781|  1.66k|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS5_7P521RepEE12ScalarParamsEEEEC2ENSt3__15arrayImLm9EEE:
  898|  2.10k|      explicit constexpr IntMod(std::array<W, N> v) : m_val(v) {}
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE12serialize_toENSt3__14spanIhLm66EEE:
  739|  3.81k|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|  3.81k|         auto v = Rep::from_rep(m_val);
  741|  3.81k|         std::reverse(v.begin(), v.end());
  742|       |
  743|       |         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|       |            store_be(bytes, v);
  745|  3.81k|         } else {
  746|       |            // Remove leading zero bytes
  747|  3.81k|            const auto padded_bytes = store_be(v);
  748|  3.81k|            constexpr size_t extra = N * WordInfo<W>::bytes - Self::BYTES;
  749|  3.81k|            copy_mem(bytes, std::span{padded_bytes}.template subspan<extra, Self::BYTES>());
  750|  3.81k|         }
  751|  3.81k|      }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS5_7P521RepEE12ScalarParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|    445|      std::array<W, L> stash_value() const {
  760|    445|         static_assert(L >= N);
  761|    445|         std::array<W, L> stash = {};
  762|  4.45k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 4.00k, False: 445]
  ------------------
  763|  4.00k|            stash[i] = m_val[i];
  764|  4.00k|         }
  765|    445|         return stash;
  766|    445|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|  8.96k|      static Self from_stash(const std::array<W, L>& stash) {
  775|  8.96k|         static_assert(L >= N);
  776|  8.96k|         std::array<W, N> val = {};
  777|  89.6k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 80.6k, False: 8.96k]
  ------------------
  778|  80.6k|            val[i] = stash[i];
  779|  80.6k|         }
  780|  8.96k|         return Self(val);
  781|  8.96k|      }
pcurves_secp521r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm4EEC2ERKNS_16AffineCurvePointINS_6IntModINS3_7P521RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
 1487|    325|      explicit WindowedBoothMulTable(const AffinePoint& p) : m_table(varpoint_setup<C, TableSize>(p)) {}
pcurves_secp521r1.cpp:_ZN5BotanplERKNS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_EERKNS_16AffineCurvePointISB_EE:
 1066|  2.27k|      friend constexpr Self operator+(const Self& a, const AffinePoint& b) { return Self::add_mixed(a, b); }
pcurves_secp521r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E9add_mixedERKSC_RKNS_16AffineCurvePointISB_EE:
 1091|  2.27k|      constexpr static Self add_mixed(const Self& a, const AffinePoint& b) {
 1092|  2.27k|         return point_add_mixed<Self, AffinePoint, FieldElement>(a, b, FieldElement::one());
 1093|  2.27k|      }
pcurves_secp521r1.cpp:_ZNK5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm4EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS3_7P521RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1489|    325|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1490|    325|         const BlindedScalar bits(s, rng);
 1491|       |
 1492|    325|         const size_t scalar_bits = bits.bits();
 1493|    325|         const size_t full_windows = compute_full_windows(scalar_bits + 1, WindowBits);
 1494|    325|         const size_t initial_shift = compute_initial_shift(scalar_bits + 1, WindowBits);
 1495|       |
 1496|    325|         BOTAN_DEBUG_ASSERT(full_windows * WindowBits + initial_shift == scalar_bits + 1);
  ------------------
  |  |  137|    325|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|    325|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 325]
  |  |  ------------------
  ------------------
 1497|    325|         BOTAN_DEBUG_ASSERT(initial_shift > 0);
  ------------------
  |  |  137|    325|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|    325|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 325]
  |  |  ------------------
  ------------------
 1498|       |
 1499|    325|         auto accum = ProjectivePoint::identity();
 1500|    325|         CT::poison(accum);
 1501|       |
 1502|  37.7k|         for(size_t i = 0; i != full_windows; ++i) {
  ------------------
  |  Branch (1502:28): [True: 37.3k, False: 325]
  ------------------
 1503|  37.3k|            const size_t idx = scalar_bits - initial_shift - WindowBits * i;
 1504|       |
 1505|  37.3k|            const size_t w_i = bits.get_window(idx);
 1506|  37.3k|            const auto [tidx, tneg] = booth_recode<WindowBits>(w_i);
 1507|       |
 1508|       |            // Conditional ok: loop iteration count is public
 1509|  37.3k|            if(i == 0) {
  ------------------
  |  Branch (1509:16): [True: 325, False: 37.0k]
  ------------------
 1510|    325|               accum = ProjectivePoint::from_affine(m_table.ct_select(tidx));
 1511|    325|               accum.conditional_assign(tneg, accum.negate());
 1512|  37.0k|            } else {
 1513|  37.0k|               accum = ProjectivePoint::add_or_sub(accum, m_table.ct_select(tidx), tneg);
 1514|  37.0k|            }
 1515|       |
 1516|  37.3k|            accum = accum.dbl_n(WindowBits);
 1517|       |
 1518|       |            // Conditional ok: loop iteration count is public
 1519|  37.3k|            if(i <= 3) {
  ------------------
  |  Branch (1519:16): [True: 1.30k, False: 36.0k]
  ------------------
 1520|  1.30k|               accum.randomize_rep(rng);
 1521|  1.30k|            }
 1522|  37.3k|         }
 1523|       |
 1524|       |         // final window (note one bit shorter than previous reads)
 1525|    325|         const size_t w_l = bits.get_window(0) & ((1 << WindowBits) - 1);
 1526|    325|         const auto [tidx, tneg] = booth_recode<WindowBits>(w_l << 1);
 1527|    325|         accum = ProjectivePoint::add_or_sub(accum, m_table.ct_select(tidx), tneg);
 1528|       |
 1529|    325|         CT::unpoison(accum);
 1530|    325|         return accum;
 1531|    325|      }
pcurves_secp521r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm6EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS3_7P521RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    325|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    325|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 325, Folded]
  |  Branch (1308:33): [True: 325, False: 0]
  ------------------
 1309|    325|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|    325|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|    325|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|    325|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|    325|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|    325|            W mask[n_words] = {0};
 1318|    325|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|    325|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|    325|            if constexpr(ExcessBits > 0) {
 1323|    325|               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|    325|               mask[MaskWords - 1] &= ExcessMask;
 1325|    325|            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|    325|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|    325|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|    325|            mask[0] |= 1;
 1331|       |
 1332|    325|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|    325|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|    325|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|    325|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|    325|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|    325|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|    325|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    325|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|      0|            m_bytes.resize(C::Scalar::BYTES);
 1346|      0|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|      0|            m_bits = C::Scalar::BITS;
 1348|      0|         }
 1349|       |
 1350|    325|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    325|      }
pcurves_secp521r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm6EE4bitsEv:
 1305|    325|      size_t bits() const { return m_bits; }
pcurves_secp521r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm4EE20compute_full_windowsEmm:
 1468|    325|      static constexpr size_t compute_full_windows(size_t sb, size_t wb) {
 1469|    325|         if(sb % wb == 0) {
  ------------------
  |  Branch (1469:13): [True: 0, False: 325]
  ------------------
 1470|      0|            return (sb - 1) / wb;
 1471|    325|         } else {
 1472|    325|            return sb / wb;
 1473|    325|         }
 1474|    325|      }
pcurves_secp521r1.cpp:_ZN5Botan21WindowedBoothMulTableINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm4EE21compute_initial_shiftEmm:
 1476|    325|      static constexpr size_t compute_initial_shift(size_t sb, size_t wb) {
 1477|    325|         if(sb % wb == 0) {
  ------------------
  |  Branch (1477:13): [True: 0, False: 325]
  ------------------
 1478|      0|            return wb;
 1479|    325|         } else {
 1480|    325|            return sb - (sb / wb) * wb;
 1481|    325|         }
 1482|    325|      }
pcurves_secp521r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E8identityEv:
 1038|    325|      static constexpr Self identity() { return Self(FieldElement::zero(), FieldElement::one(), FieldElement::zero()); }
pcurves_secp521r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm6EE10get_windowEm:
 1353|  37.7k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  37.7k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  37.7k|      }
pcurves_secp521r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E5dbl_nEm:
 1108|  37.3k|      constexpr Self dbl_n(size_t n) const {
 1109|  37.3k|         if constexpr(Self::A_is_minus_3) {
 1110|  37.3k|            return dbl_n_a_minus_3(*this, n);
 1111|       |         } else if constexpr(Self::A_is_zero) {
 1112|       |            return dbl_n_a_zero(*this, n);
 1113|       |         } else {
 1114|       |            return dbl_n_generic(*this, A, n);
 1115|       |         }
 1116|  37.3k|      }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4div2Ev:
  302|  37.3k|      Self div2() const {
  303|       |         // The inverse of 2 modulo P is (P/2)+1; this avoids a constexpr time
  304|       |         // general inversion, which some compilers can't handle
  305|  37.3k|         constexpr auto INV_2 = p_div_2_plus_1(Rep::P);
  306|       |
  307|       |         // We could multiply by INV_2 but there is a better way ...
  308|       |
  309|  37.3k|         std::array<W, N> t = value();
  310|  37.3k|         const W borrow = shift_right<1>(t);
  311|       |
  312|       |         // If value was odd, add (P/2)+1
  313|  37.3k|         const auto mask = CT::Mask<W>::expand(borrow).value();
  314|       |
  315|  37.3k|         W carry = 0;
  316|       |
  317|   373k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (317:28): [True: 336k, False: 37.3k]
  ------------------
  318|   336k|            t[i] = word_add(t[i], INV_2[i] & mask, &carry);
  319|   336k|         }
  320|       |
  321|  37.3k|         return Self(t);
  322|  37.3k|      }
pcurves_secp521r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm6EED2Ev:
 1358|    325|      ~BlindedScalarBits() {
 1359|    325|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    325|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    325|      }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS5_7P521RepEE12ScalarParamsEEEE7is_zeroEv:
  225|    890|      constexpr CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_val.size()).as_choice(); }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEeqERKSA_:
  722|  1.15k|      constexpr CT::Choice operator==(const Self& other) const {
  723|  1.15k|         return CT::is_equal(this->data(), other.data(), N).as_choice();
  724|  1.15k|      }
pcurves_secp521r1.cpp:_ZN5Botan13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS3_7P521RepEE7x3_ax_bERKNS_6IntModINS5_INS6_11FieldParamsEEEEE:
 1275|  1.15k|      static constexpr FieldElement x3_ax_b(const FieldElement& x) { return (x.square() + A) * x + B; }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE12correct_signENS_2CT6ChoiceE:
  248|    325|      constexpr Self correct_sign(CT::Choice even) const {
  249|    325|         const auto flip = (even != this->is_even());
  250|    325|         return Self::choose(flip, this->negate(), *this);
  251|    325|      }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE7is_evenEv:
  240|    325|      constexpr CT::Choice is_even() const {
  241|    325|         auto v = Rep::from_rep(m_val);
  242|    325|         return !CT::Choice::from_int(v[0] & 0x01);
  243|    325|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE6chooseENS_2CT6ChoiceERKSA_SE_:
  256|    325|      static constexpr Self choose(CT::Choice choice, const Self& x, const Self& y) {
  257|    325|         auto r = y;
  258|    325|         r.conditional_assign(choice, x);
  259|    325|         return r;
  260|    325|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS5_7P521RepEE12ScalarParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|    445|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|    445|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 445]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|    445|         const auto words = bytes_to_words<W, N, BYTES>(bytes.first<Self::BYTES>());
  799|       |
  800|       |         // Conditional acceptable: std::optional is implicitly not constant time
  801|    445|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 0, False: 445]
  ------------------
  802|      0|            return {};
  803|      0|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|    445|         return Self::from_words(words);
  807|    445|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS5_7P521RepEE12ScalarParamsEEEE10from_wordsILm9EEESB_NSt3__15arrayImXT_EEE:
  211|    445|      static constexpr Self from_words(std::array<W, L> w) {
  212|    445|         if constexpr(L == N) {
  213|    445|            return Self(Rep::to_rep(w));
  214|       |         } else {
  215|       |            static_assert(L < N);
  216|       |            std::array<W, N> ew = {};
  217|       |            copy_mem(std::span{ew}.template first<L>(), w);
  218|       |            return Self(Rep::to_rep(ew));
  219|       |         }
  220|    445|      }
pcurves_secp521r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS4_7P521RepEE12ScalarParamsEE6to_repERKNSt3__15arrayImLm9EEE:
  115|    445|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|    445|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|    445|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|    445|         return Self::redc(z);
  119|    445|      }
pcurves_secp521r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE12serialize_toENSt3__14spanIhLm133EEE:
  941|  1.74k|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  942|  1.74k|         BOTAN_STATE_CHECK(this->is_identity().as_bool() == false);
  ------------------
  |  |   51|  1.74k|   do {                                                         \
  |  |   52|  1.74k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  1.74k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 1.74k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  1.74k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 1.74k]
  |  |  ------------------
  ------------------
  943|  1.74k|         BufferStuffer pack(bytes);
  944|  1.74k|         pack.append(0x04);
  945|  1.74k|         x().serialize_to(pack.next<FieldElement::BYTES>());
  946|  1.74k|         y().serialize_to(pack.next<FieldElement::BYTES>());
  947|  1.74k|         BOTAN_DEBUG_ASSERT(pack.full());
  ------------------
  |  |  137|  1.74k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  1.74k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 1.74k]
  |  |  ------------------
  ------------------
  948|  1.74k|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS5_7P521RepEE12ScalarParamsEEEE6randomERNS_21RandomNumberGeneratorE:
  851|    445|      static Self random(RandomNumberGenerator& rng) {
  852|    445|         constexpr size_t MAX_ATTEMPTS = 1000;
  853|       |
  854|    445|         std::array<uint8_t, Self::BYTES> buf{};
  855|       |
  856|    445|         for(size_t i = 0; i != MAX_ATTEMPTS; ++i) {
  ------------------
  |  Branch (856:28): [True: 445, False: 0]
  ------------------
  857|    445|            rng.randomize(buf);
  858|       |
  859|       |            // Zero off high bits that if set would certainly cause us
  860|       |            // to be out of range
  861|    445|            if constexpr(Self::BITS % 8 != 0) {
  862|    445|               constexpr uint8_t mask = 0xFF >> (8 - (Self::BITS % 8));
  863|    445|               buf[0] &= mask;
  864|    445|            }
  865|       |
  866|       |            // Conditionals ok: rejection sampling reveals only values we didn't use
  867|    445|            if(auto s = Self::deserialize(buf)) {
  ------------------
  |  Branch (867:21): [True: 445, False: 0]
  ------------------
  868|    445|               if(s.value().is_nonzero().as_bool()) {
  ------------------
  |  Branch (868:19): [True: 445, False: 0]
  ------------------
  869|    445|                  return s.value();
  870|    445|               }
  871|    445|            }
  872|    445|         }
  873|       |
  874|      0|         throw Internal_Error("Failed to generate random Scalar within bounded number of attempts");
  875|    445|      }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS5_7P521RepEE12ScalarParamsEEEE10is_nonzeroEv:
  230|    445|      constexpr CT::Choice is_nonzero() const { return !is_zero(); }

pcurves_brainpool256r1.cpp:_ZN5Botan19basemul_booth_setupINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm6EEENSt3__16vectorINT_11AffinePointENS5_9allocatorIS8_EEEERKS8_m:
  254|      1|std::vector<typename C::AffinePoint> basemul_booth_setup(const typename C::AffinePoint& p, size_t max_scalar_bits) {
  255|      1|   static_assert(WindowBits >= 1 && WindowBits <= 8);
  256|       |
  257|       |   // 2^(W-1) elements per window [1*base .. 2^(W-1)*base]
  258|      1|   constexpr size_t WindowElements = 1 << (WindowBits - 1);
  259|       |
  260|      1|   const size_t Windows = (max_scalar_bits + WindowBits - 1) / WindowBits;
  261|       |
  262|      1|   const size_t TableSize = Windows * WindowElements;
  263|       |
  264|      1|   std::vector<typename C::ProjectivePoint> table;
  265|      1|   table.reserve(TableSize);
  266|       |
  267|      1|   auto accum = C::ProjectivePoint::from_affine(p);
  268|       |
  269|     50|   for(size_t i = 0; i != TableSize; i += WindowElements) {
  ------------------
  |  Branch (269:22): [True: 49, False: 1]
  ------------------
  270|     49|      table.push_back(accum);
  271|       |
  272|  1.56k|      for(size_t j = 1; j != WindowElements; ++j) {
  ------------------
  |  Branch (272:25): [True: 1.51k, False: 49]
  ------------------
  273|       |         // Conditional ok: loop iteration count is public
  274|  1.51k|         if(j % 2 == 1) {
  ------------------
  |  Branch (274:13): [True: 784, False: 735]
  ------------------
  275|    784|            table.emplace_back(table[i + j / 2].dbl());
  276|    784|         } else {
  277|    735|            table.emplace_back(table[i + j - 1] + table[i]);
  278|    735|         }
  279|  1.51k|      }
  280|       |
  281|       |      // Advance to next window's base: 2^W * current_base
  282|       |      // The last entry is 2^(W-1) * base, so doubling gives 2^W * base
  283|     49|      accum = table[i + WindowElements - 1].dbl();
  284|     49|   }
  285|       |
  286|       |   // Variable time batch conversion is fine since generator is public
  287|      1|   return to_affine_batch<C, true>(table);
  288|      1|}
pcurves_brainpool256r1.cpp:_ZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorE:
  308|    694|                                               RandomNumberGenerator& rng) {
  309|    694|   static constexpr size_t WindowElements = 1 << (WindowBits - 1);
  310|       |
  311|    694|   const size_t windows = (scalar.bits() + WindowBits) / WindowBits;
  312|       |
  313|    694|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    694|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    694|      const size_t raw = w_bits << 1;
  317|    694|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    694|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    694|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    694|      pt.conditional_assign(tneg, pt.negate());
  322|    694|      CT::poison(pt);
  323|    694|      pt.randomize_rep(rng);
  324|    694|      return pt;
  325|    694|   }();
  326|       |
  327|  34.0k|   for(size_t i = 1; i != windows; ++i) {
  ------------------
  |  Branch (327:22): [True: 33.3k, False: 694]
  ------------------
  328|       |      // Extract W+1 bits overlapping by 1 with the previous window
  329|  33.3k|      const size_t bit_pos = WindowBits * i - 1;
  330|  33.3k|      const size_t raw = scalar.get_window(bit_pos);
  331|  33.3k|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  332|       |
  333|  33.3k|      const auto tbl_i = table.subspan(WindowElements * i, WindowElements);
  334|       |
  335|  33.3k|      accum = C::ProjectivePoint::add_or_sub(accum, C::AffinePoint::ct_select(tbl_i, tidx), tneg);
  336|       |
  337|       |      // Conditional ok: loop iteration count is public
  338|  33.3k|      if(i <= 3) {
  ------------------
  |  Branch (338:10): [True: 2.08k, False: 31.2k]
  ------------------
  339|  2.08k|         accum.randomize_rep(rng);
  340|  2.08k|      }
  341|  33.3k|   }
  342|       |
  343|    694|   CT::unpoison(accum);
  344|    694|   return accum;
  345|    694|}
pcurves_brainpool256r1.cpp:_ZZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorEENKUlvE_clEv:
  313|    694|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    694|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    694|      const size_t raw = w_bits << 1;
  317|    694|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    694|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    694|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    694|      pt.conditional_assign(tneg, pt.negate());
  322|    694|      CT::poison(pt);
  323|    694|      pt.randomize_rep(rng);
  324|    694|      return pt;
  325|    694|   }();
_ZN5Botan12booth_recodeILm6ETkNSt3__117unsigned_integralEmEENS1_4pairImNS_2CT6ChoiceEEET0_:
  294|   180k|constexpr std::pair<size_t, CT::Choice> booth_recode(T x) {
  295|   180k|   static_assert(WindowBits >= 1 && WindowBits <= 8);
  296|       |
  297|   180k|   auto s_mask = CT::Mask<T>::expand(x >> WindowBits);
  298|   180k|   const T neg_x = (1 << (WindowBits + 1)) - x - 1;
  299|   180k|   T d = s_mask.select(neg_x, x);
  300|   180k|   d = (d >> 1) + (d & 1);
  301|       |
  302|   180k|   return std::make_pair(static_cast<size_t>(d), s_mask.as_choice());
  303|   180k|}
pcurves_brainpool256r1.cpp:_ZN5Botan14varpoint_setupINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm16EEENS_16AffinePointTableIT_Lm0EEERKNS6_11AffinePointE:
  351|    413|AffinePointTable<C> varpoint_setup(const typename C::AffinePoint& p) {
  352|    413|   static_assert(TableSize > 2);
  353|       |
  354|    413|   std::vector<typename C::ProjectivePoint> table;
  355|    413|   table.reserve(TableSize);
  356|    413|   table.push_back(C::ProjectivePoint::from_affine(p));
  357|       |
  358|  6.60k|   for(size_t i = 1; i != TableSize; ++i) {
  ------------------
  |  Branch (358:22): [True: 6.19k, False: 413]
  ------------------
  359|       |      // Conditional ok: loop iteration count is public
  360|  6.19k|      if(i % 2 == 1) {
  ------------------
  |  Branch (360:10): [True: 3.30k, False: 2.89k]
  ------------------
  361|  3.30k|         table.push_back(table[i / 2].dbl());
  362|  3.30k|      } else {
  363|  2.89k|         table.push_back(table[i - 1] + p);
  364|  2.89k|      }
  365|  6.19k|   }
  366|       |
  367|    413|   return AffinePointTable<C>(table);
  368|    413|}
pcurves_brainpool256r1.cpp:_ZN5Botan16AffinePointTableINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm0EEC2ENSt3__14spanIKNS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsESA_E11FieldParamsEEEEESC_EELm18446744073709551615EEE:
   70|    413|      explicit AffinePointTable(std::span<const ProjectivePoint> pts) {
   71|    413|         BOTAN_ASSERT_NOMSG(pts.size() > 1);
  ------------------
  |  |   84|    413|   do {                                                                     \
  |  |   85|    413|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    413|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 413]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    413|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 413]
  |  |  ------------------
  ------------------
   72|       |
   73|       |         if constexpr(R > 0) {
   74|       |            BOTAN_ASSERT_NOMSG(pts.size() % R == 0);
   75|       |         }
   76|       |
   77|       |         // TODO scatter/gather with SIMD lookup
   78|    413|         m_table = to_affine_batch<C>(pts);
   79|    413|      }
_ZN5Botan12booth_recodeILm5ETkNSt3__117unsigned_integralEmEENS1_4pairImNS_2CT6ChoiceEEET0_:
  294|   134k|constexpr std::pair<size_t, CT::Choice> booth_recode(T x) {
  295|   134k|   static_assert(WindowBits >= 1 && WindowBits <= 8);
  296|       |
  297|   134k|   auto s_mask = CT::Mask<T>::expand(x >> WindowBits);
  298|   134k|   const T neg_x = (1 << (WindowBits + 1)) - x - 1;
  299|   134k|   T d = s_mask.select(neg_x, x);
  300|   134k|   d = (d >> 1) + (d & 1);
  301|       |
  302|   134k|   return std::make_pair(static_cast<size_t>(d), s_mask.as_choice());
  303|   134k|}
pcurves_brainpool256r1.cpp:_ZNK5Botan16AffinePointTableINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm0EE9ct_selectEmQL_ZNS_16AffinePointTable16WholeRangeSearchEE:
   86|  23.9k|      {
   87|  23.9k|         BOTAN_DEBUG_ASSERT(idx < m_table.size() + 1);
  ------------------
  |  |  137|  23.9k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  23.9k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 23.9k]
  |  |  ------------------
  ------------------
   88|       |
   89|  23.9k|         auto result = AffinePoint::identity(m_table[0]);
   90|       |
   91|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
   92|  23.9k|         const size_t idx1 = static_cast<size_t>(idx - 1);
   93|   407k|         for(size_t i = 0; i != m_table.size(); ++i) {
  ------------------
  |  Branch (93:28): [True: 383k, False: 23.9k]
  ------------------
   94|   383k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
   95|   383k|            result.conditional_assign(found, m_table[i]);
   96|   383k|         }
   97|       |
   98|  23.9k|         return result;
   99|  23.9k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan19basemul_booth_setupINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm6EEENSt3__16vectorINT_11AffinePointENS5_9allocatorIS8_EEEERKS8_m:
  254|      1|std::vector<typename C::AffinePoint> basemul_booth_setup(const typename C::AffinePoint& p, size_t max_scalar_bits) {
  255|      1|   static_assert(WindowBits >= 1 && WindowBits <= 8);
  256|       |
  257|       |   // 2^(W-1) elements per window [1*base .. 2^(W-1)*base]
  258|      1|   constexpr size_t WindowElements = 1 << (WindowBits - 1);
  259|       |
  260|      1|   const size_t Windows = (max_scalar_bits + WindowBits - 1) / WindowBits;
  261|       |
  262|      1|   const size_t TableSize = Windows * WindowElements;
  263|       |
  264|      1|   std::vector<typename C::ProjectivePoint> table;
  265|      1|   table.reserve(TableSize);
  266|       |
  267|      1|   auto accum = C::ProjectivePoint::from_affine(p);
  268|       |
  269|     74|   for(size_t i = 0; i != TableSize; i += WindowElements) {
  ------------------
  |  Branch (269:22): [True: 73, False: 1]
  ------------------
  270|     73|      table.push_back(accum);
  271|       |
  272|  2.33k|      for(size_t j = 1; j != WindowElements; ++j) {
  ------------------
  |  Branch (272:25): [True: 2.26k, False: 73]
  ------------------
  273|       |         // Conditional ok: loop iteration count is public
  274|  2.26k|         if(j % 2 == 1) {
  ------------------
  |  Branch (274:13): [True: 1.16k, False: 1.09k]
  ------------------
  275|  1.16k|            table.emplace_back(table[i + j / 2].dbl());
  276|  1.16k|         } else {
  277|  1.09k|            table.emplace_back(table[i + j - 1] + table[i]);
  278|  1.09k|         }
  279|  2.26k|      }
  280|       |
  281|       |      // Advance to next window's base: 2^W * current_base
  282|       |      // The last entry is 2^(W-1) * base, so doubling gives 2^W * base
  283|     73|      accum = table[i + WindowElements - 1].dbl();
  284|     73|   }
  285|       |
  286|       |   // Variable time batch conversion is fine since generator is public
  287|      1|   return to_affine_batch<C, true>(table);
  288|      1|}
pcurves_brainpool384r1.cpp:_ZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorE:
  308|    348|                                               RandomNumberGenerator& rng) {
  309|    348|   static constexpr size_t WindowElements = 1 << (WindowBits - 1);
  310|       |
  311|    348|   const size_t windows = (scalar.bits() + WindowBits) / WindowBits;
  312|       |
  313|    348|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    348|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    348|      const size_t raw = w_bits << 1;
  317|    348|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    348|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    348|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    348|      pt.conditional_assign(tneg, pt.negate());
  322|    348|      CT::poison(pt);
  323|    348|      pt.randomize_rep(rng);
  324|    348|      return pt;
  325|    348|   }();
  326|       |
  327|  25.4k|   for(size_t i = 1; i != windows; ++i) {
  ------------------
  |  Branch (327:22): [True: 25.0k, False: 348]
  ------------------
  328|       |      // Extract W+1 bits overlapping by 1 with the previous window
  329|  25.0k|      const size_t bit_pos = WindowBits * i - 1;
  330|  25.0k|      const size_t raw = scalar.get_window(bit_pos);
  331|  25.0k|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  332|       |
  333|  25.0k|      const auto tbl_i = table.subspan(WindowElements * i, WindowElements);
  334|       |
  335|  25.0k|      accum = C::ProjectivePoint::add_or_sub(accum, C::AffinePoint::ct_select(tbl_i, tidx), tneg);
  336|       |
  337|       |      // Conditional ok: loop iteration count is public
  338|  25.0k|      if(i <= 3) {
  ------------------
  |  Branch (338:10): [True: 1.04k, False: 24.0k]
  ------------------
  339|  1.04k|         accum.randomize_rep(rng);
  340|  1.04k|      }
  341|  25.0k|   }
  342|       |
  343|    348|   CT::unpoison(accum);
  344|    348|   return accum;
  345|    348|}
pcurves_brainpool384r1.cpp:_ZZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorEENKUlvE_clEv:
  313|    348|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    348|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    348|      const size_t raw = w_bits << 1;
  317|    348|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    348|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    348|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    348|      pt.conditional_assign(tneg, pt.negate());
  322|    348|      CT::poison(pt);
  323|    348|      pt.randomize_rep(rng);
  324|    348|      return pt;
  325|    348|   }();
pcurves_brainpool384r1.cpp:_ZN5Botan14varpoint_setupINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm16EEENS_16AffinePointTableIT_Lm0EEERKNS6_11AffinePointE:
  351|    149|AffinePointTable<C> varpoint_setup(const typename C::AffinePoint& p) {
  352|    149|   static_assert(TableSize > 2);
  353|       |
  354|    149|   std::vector<typename C::ProjectivePoint> table;
  355|    149|   table.reserve(TableSize);
  356|    149|   table.push_back(C::ProjectivePoint::from_affine(p));
  357|       |
  358|  2.38k|   for(size_t i = 1; i != TableSize; ++i) {
  ------------------
  |  Branch (358:22): [True: 2.23k, False: 149]
  ------------------
  359|       |      // Conditional ok: loop iteration count is public
  360|  2.23k|      if(i % 2 == 1) {
  ------------------
  |  Branch (360:10): [True: 1.19k, False: 1.04k]
  ------------------
  361|  1.19k|         table.push_back(table[i / 2].dbl());
  362|  1.19k|      } else {
  363|  1.04k|         table.push_back(table[i - 1] + p);
  364|  1.04k|      }
  365|  2.23k|   }
  366|       |
  367|    149|   return AffinePointTable<C>(table);
  368|    149|}
pcurves_brainpool384r1.cpp:_ZN5Botan16AffinePointTableINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm0EEC2ENSt3__14spanIKNS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsESA_E11FieldParamsEEEEESC_EELm18446744073709551615EEE:
   70|    149|      explicit AffinePointTable(std::span<const ProjectivePoint> pts) {
   71|    149|         BOTAN_ASSERT_NOMSG(pts.size() > 1);
  ------------------
  |  |   84|    149|   do {                                                                     \
  |  |   85|    149|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    149|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 149]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    149|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 149]
  |  |  ------------------
  ------------------
   72|       |
   73|       |         if constexpr(R > 0) {
   74|       |            BOTAN_ASSERT_NOMSG(pts.size() % R == 0);
   75|       |         }
   76|       |
   77|       |         // TODO scatter/gather with SIMD lookup
   78|    149|         m_table = to_affine_batch<C>(pts);
   79|    149|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan16AffinePointTableINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm0EE9ct_selectEmQL_ZNS_16AffinePointTable16WholeRangeSearchEE:
   86|  12.9k|      {
   87|  12.9k|         BOTAN_DEBUG_ASSERT(idx < m_table.size() + 1);
  ------------------
  |  |  137|  12.9k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  12.9k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 12.9k]
  |  |  ------------------
  ------------------
   88|       |
   89|  12.9k|         auto result = AffinePoint::identity(m_table[0]);
   90|       |
   91|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
   92|  12.9k|         const size_t idx1 = static_cast<size_t>(idx - 1);
   93|   220k|         for(size_t i = 0; i != m_table.size(); ++i) {
  ------------------
  |  Branch (93:28): [True: 207k, False: 12.9k]
  ------------------
   94|   207k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
   95|   207k|            result.conditional_assign(found, m_table[i]);
   96|   207k|         }
   97|       |
   98|  12.9k|         return result;
   99|  12.9k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan19basemul_booth_setupINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm6EEENSt3__16vectorINT_11AffinePointENS5_9allocatorIS8_EEEERKS8_m:
  254|      1|std::vector<typename C::AffinePoint> basemul_booth_setup(const typename C::AffinePoint& p, size_t max_scalar_bits) {
  255|      1|   static_assert(WindowBits >= 1 && WindowBits <= 8);
  256|       |
  257|       |   // 2^(W-1) elements per window [1*base .. 2^(W-1)*base]
  258|      1|   constexpr size_t WindowElements = 1 << (WindowBits - 1);
  259|       |
  260|      1|   const size_t Windows = (max_scalar_bits + WindowBits - 1) / WindowBits;
  261|       |
  262|      1|   const size_t TableSize = Windows * WindowElements;
  263|       |
  264|      1|   std::vector<typename C::ProjectivePoint> table;
  265|      1|   table.reserve(TableSize);
  266|       |
  267|      1|   auto accum = C::ProjectivePoint::from_affine(p);
  268|       |
  269|     98|   for(size_t i = 0; i != TableSize; i += WindowElements) {
  ------------------
  |  Branch (269:22): [True: 97, False: 1]
  ------------------
  270|     97|      table.push_back(accum);
  271|       |
  272|  3.10k|      for(size_t j = 1; j != WindowElements; ++j) {
  ------------------
  |  Branch (272:25): [True: 3.00k, False: 97]
  ------------------
  273|       |         // Conditional ok: loop iteration count is public
  274|  3.00k|         if(j % 2 == 1) {
  ------------------
  |  Branch (274:13): [True: 1.55k, False: 1.45k]
  ------------------
  275|  1.55k|            table.emplace_back(table[i + j / 2].dbl());
  276|  1.55k|         } else {
  277|  1.45k|            table.emplace_back(table[i + j - 1] + table[i]);
  278|  1.45k|         }
  279|  3.00k|      }
  280|       |
  281|       |      // Advance to next window's base: 2^W * current_base
  282|       |      // The last entry is 2^(W-1) * base, so doubling gives 2^W * base
  283|     97|      accum = table[i + WindowElements - 1].dbl();
  284|     97|   }
  285|       |
  286|       |   // Variable time batch conversion is fine since generator is public
  287|      1|   return to_affine_batch<C, true>(table);
  288|      1|}
pcurves_brainpool512r1.cpp:_ZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorE:
  308|    360|                                               RandomNumberGenerator& rng) {
  309|    360|   static constexpr size_t WindowElements = 1 << (WindowBits - 1);
  310|       |
  311|    360|   const size_t windows = (scalar.bits() + WindowBits) / WindowBits;
  312|       |
  313|    360|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    360|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    360|      const size_t raw = w_bits << 1;
  317|    360|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    360|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    360|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    360|      pt.conditional_assign(tneg, pt.negate());
  322|    360|      CT::poison(pt);
  323|    360|      pt.randomize_rep(rng);
  324|    360|      return pt;
  325|    360|   }();
  326|       |
  327|  34.9k|   for(size_t i = 1; i != windows; ++i) {
  ------------------
  |  Branch (327:22): [True: 34.5k, False: 360]
  ------------------
  328|       |      // Extract W+1 bits overlapping by 1 with the previous window
  329|  34.5k|      const size_t bit_pos = WindowBits * i - 1;
  330|  34.5k|      const size_t raw = scalar.get_window(bit_pos);
  331|  34.5k|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  332|       |
  333|  34.5k|      const auto tbl_i = table.subspan(WindowElements * i, WindowElements);
  334|       |
  335|  34.5k|      accum = C::ProjectivePoint::add_or_sub(accum, C::AffinePoint::ct_select(tbl_i, tidx), tneg);
  336|       |
  337|       |      // Conditional ok: loop iteration count is public
  338|  34.5k|      if(i <= 3) {
  ------------------
  |  Branch (338:10): [True: 1.08k, False: 33.4k]
  ------------------
  339|  1.08k|         accum.randomize_rep(rng);
  340|  1.08k|      }
  341|  34.5k|   }
  342|       |
  343|    360|   CT::unpoison(accum);
  344|    360|   return accum;
  345|    360|}
pcurves_brainpool512r1.cpp:_ZZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorEENKUlvE_clEv:
  313|    360|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    360|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    360|      const size_t raw = w_bits << 1;
  317|    360|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    360|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    360|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    360|      pt.conditional_assign(tneg, pt.negate());
  322|    360|      CT::poison(pt);
  323|    360|      pt.randomize_rep(rng);
  324|    360|      return pt;
  325|    360|   }();
pcurves_brainpool512r1.cpp:_ZN5Botan14varpoint_setupINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm16EEENS_16AffinePointTableIT_Lm0EEERKNS6_11AffinePointE:
  351|    212|AffinePointTable<C> varpoint_setup(const typename C::AffinePoint& p) {
  352|    212|   static_assert(TableSize > 2);
  353|       |
  354|    212|   std::vector<typename C::ProjectivePoint> table;
  355|    212|   table.reserve(TableSize);
  356|    212|   table.push_back(C::ProjectivePoint::from_affine(p));
  357|       |
  358|  3.39k|   for(size_t i = 1; i != TableSize; ++i) {
  ------------------
  |  Branch (358:22): [True: 3.18k, False: 212]
  ------------------
  359|       |      // Conditional ok: loop iteration count is public
  360|  3.18k|      if(i % 2 == 1) {
  ------------------
  |  Branch (360:10): [True: 1.69k, False: 1.48k]
  ------------------
  361|  1.69k|         table.push_back(table[i / 2].dbl());
  362|  1.69k|      } else {
  363|  1.48k|         table.push_back(table[i - 1] + p);
  364|  1.48k|      }
  365|  3.18k|   }
  366|       |
  367|    212|   return AffinePointTable<C>(table);
  368|    212|}
pcurves_brainpool512r1.cpp:_ZN5Botan16AffinePointTableINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm0EEC2ENSt3__14spanIKNS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsESA_E11FieldParamsEEEEESC_EELm18446744073709551615EEE:
   70|    212|      explicit AffinePointTable(std::span<const ProjectivePoint> pts) {
   71|    212|         BOTAN_ASSERT_NOMSG(pts.size() > 1);
  ------------------
  |  |   84|    212|   do {                                                                     \
  |  |   85|    212|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    212|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 212]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    212|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 212]
  |  |  ------------------
  ------------------
   72|       |
   73|       |         if constexpr(R > 0) {
   74|       |            BOTAN_ASSERT_NOMSG(pts.size() % R == 0);
   75|       |         }
   76|       |
   77|       |         // TODO scatter/gather with SIMD lookup
   78|    212|         m_table = to_affine_batch<C>(pts);
   79|    212|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan16AffinePointTableINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm0EE9ct_selectEmQL_ZNS_16AffinePointTable16WholeRangeSearchEE:
   86|  24.5k|      {
   87|  24.5k|         BOTAN_DEBUG_ASSERT(idx < m_table.size() + 1);
  ------------------
  |  |  137|  24.5k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  24.5k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 24.5k]
  |  |  ------------------
  ------------------
   88|       |
   89|  24.5k|         auto result = AffinePoint::identity(m_table[0]);
   90|       |
   91|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
   92|  24.5k|         const size_t idx1 = static_cast<size_t>(idx - 1);
   93|   418k|         for(size_t i = 0; i != m_table.size(); ++i) {
  ------------------
  |  Branch (93:28): [True: 393k, False: 24.5k]
  ------------------
   94|   393k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
   95|   393k|            result.conditional_assign(found, m_table[i]);
   96|   393k|         }
   97|       |
   98|  24.5k|         return result;
   99|  24.5k|      }
pcurves_secp256r1.cpp:_ZN5Botan19basemul_booth_setupINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm6EEENSt3__16vectorINT_11AffinePointENS5_9allocatorIS8_EEEERKS8_m:
  254|      1|std::vector<typename C::AffinePoint> basemul_booth_setup(const typename C::AffinePoint& p, size_t max_scalar_bits) {
  255|      1|   static_assert(WindowBits >= 1 && WindowBits <= 8);
  256|       |
  257|       |   // 2^(W-1) elements per window [1*base .. 2^(W-1)*base]
  258|      1|   constexpr size_t WindowElements = 1 << (WindowBits - 1);
  259|       |
  260|      1|   const size_t Windows = (max_scalar_bits + WindowBits - 1) / WindowBits;
  261|       |
  262|      1|   const size_t TableSize = Windows * WindowElements;
  263|       |
  264|      1|   std::vector<typename C::ProjectivePoint> table;
  265|      1|   table.reserve(TableSize);
  266|       |
  267|      1|   auto accum = C::ProjectivePoint::from_affine(p);
  268|       |
  269|     50|   for(size_t i = 0; i != TableSize; i += WindowElements) {
  ------------------
  |  Branch (269:22): [True: 49, False: 1]
  ------------------
  270|     49|      table.push_back(accum);
  271|       |
  272|  1.56k|      for(size_t j = 1; j != WindowElements; ++j) {
  ------------------
  |  Branch (272:25): [True: 1.51k, False: 49]
  ------------------
  273|       |         // Conditional ok: loop iteration count is public
  274|  1.51k|         if(j % 2 == 1) {
  ------------------
  |  Branch (274:13): [True: 784, False: 735]
  ------------------
  275|    784|            table.emplace_back(table[i + j / 2].dbl());
  276|    784|         } else {
  277|    735|            table.emplace_back(table[i + j - 1] + table[i]);
  278|    735|         }
  279|  1.51k|      }
  280|       |
  281|       |      // Advance to next window's base: 2^W * current_base
  282|       |      // The last entry is 2^(W-1) * base, so doubling gives 2^W * base
  283|     49|      accum = table[i + WindowElements - 1].dbl();
  284|     49|   }
  285|       |
  286|       |   // Variable time batch conversion is fine since generator is public
  287|      1|   return to_affine_batch<C, true>(table);
  288|      1|}
pcurves_secp256r1.cpp:_ZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorE:
  308|    459|                                               RandomNumberGenerator& rng) {
  309|    459|   static constexpr size_t WindowElements = 1 << (WindowBits - 1);
  310|       |
  311|    459|   const size_t windows = (scalar.bits() + WindowBits) / WindowBits;
  312|       |
  313|    459|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    459|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    459|      const size_t raw = w_bits << 1;
  317|    459|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    459|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    459|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    459|      pt.conditional_assign(tneg, pt.negate());
  322|    459|      CT::poison(pt);
  323|    459|      pt.randomize_rep(rng);
  324|    459|      return pt;
  325|    459|   }();
  326|       |
  327|  22.4k|   for(size_t i = 1; i != windows; ++i) {
  ------------------
  |  Branch (327:22): [True: 22.0k, False: 459]
  ------------------
  328|       |      // Extract W+1 bits overlapping by 1 with the previous window
  329|  22.0k|      const size_t bit_pos = WindowBits * i - 1;
  330|  22.0k|      const size_t raw = scalar.get_window(bit_pos);
  331|  22.0k|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  332|       |
  333|  22.0k|      const auto tbl_i = table.subspan(WindowElements * i, WindowElements);
  334|       |
  335|  22.0k|      accum = C::ProjectivePoint::add_or_sub(accum, C::AffinePoint::ct_select(tbl_i, tidx), tneg);
  336|       |
  337|       |      // Conditional ok: loop iteration count is public
  338|  22.0k|      if(i <= 3) {
  ------------------
  |  Branch (338:10): [True: 1.37k, False: 20.6k]
  ------------------
  339|  1.37k|         accum.randomize_rep(rng);
  340|  1.37k|      }
  341|  22.0k|   }
  342|       |
  343|    459|   CT::unpoison(accum);
  344|    459|   return accum;
  345|    459|}
pcurves_secp256r1.cpp:_ZZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorEENKUlvE_clEv:
  313|    459|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    459|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    459|      const size_t raw = w_bits << 1;
  317|    459|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    459|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    459|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    459|      pt.conditional_assign(tneg, pt.negate());
  322|    459|      CT::poison(pt);
  323|    459|      pt.randomize_rep(rng);
  324|    459|      return pt;
  325|    459|   }();
pcurves_secp256r1.cpp:_ZN5Botan14varpoint_setupINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm16EEENS_16AffinePointTableIT_Lm0EEERKNS6_11AffinePointE:
  351|    317|AffinePointTable<C> varpoint_setup(const typename C::AffinePoint& p) {
  352|    317|   static_assert(TableSize > 2);
  353|       |
  354|    317|   std::vector<typename C::ProjectivePoint> table;
  355|    317|   table.reserve(TableSize);
  356|    317|   table.push_back(C::ProjectivePoint::from_affine(p));
  357|       |
  358|  5.07k|   for(size_t i = 1; i != TableSize; ++i) {
  ------------------
  |  Branch (358:22): [True: 4.75k, False: 317]
  ------------------
  359|       |      // Conditional ok: loop iteration count is public
  360|  4.75k|      if(i % 2 == 1) {
  ------------------
  |  Branch (360:10): [True: 2.53k, False: 2.21k]
  ------------------
  361|  2.53k|         table.push_back(table[i / 2].dbl());
  362|  2.53k|      } else {
  363|  2.21k|         table.push_back(table[i - 1] + p);
  364|  2.21k|      }
  365|  4.75k|   }
  366|       |
  367|    317|   return AffinePointTable<C>(table);
  368|    317|}
pcurves_secp256r1.cpp:_ZN5Botan16AffinePointTableINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm0EEC2ENSt3__14spanIKNS_20ProjectiveCurvePointINS_6IntModINS2_12Secp256r1RepINS_13EllipticCurveINS3_6ParamsESA_E11FieldParamsEEEEESC_EELm18446744073709551615EEE:
   70|    317|      explicit AffinePointTable(std::span<const ProjectivePoint> pts) {
   71|    317|         BOTAN_ASSERT_NOMSG(pts.size() > 1);
  ------------------
  |  |   84|    317|   do {                                                                     \
  |  |   85|    317|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    317|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 317]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    317|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 317]
  |  |  ------------------
  ------------------
   72|       |
   73|       |         if constexpr(R > 0) {
   74|       |            BOTAN_ASSERT_NOMSG(pts.size() % R == 0);
   75|       |         }
   76|       |
   77|       |         // TODO scatter/gather with SIMD lookup
   78|    317|         m_table = to_affine_batch<C>(pts);
   79|    317|      }
pcurves_secp256r1.cpp:_ZNK5Botan16AffinePointTableINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm0EE9ct_selectEmQL_ZNS_16AffinePointTable16WholeRangeSearchEE:
   86|  18.3k|      {
   87|  18.3k|         BOTAN_DEBUG_ASSERT(idx < m_table.size() + 1);
  ------------------
  |  |  137|  18.3k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  18.3k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 18.3k]
  |  |  ------------------
  ------------------
   88|       |
   89|  18.3k|         auto result = AffinePoint::identity(m_table[0]);
   90|       |
   91|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
   92|  18.3k|         const size_t idx1 = static_cast<size_t>(idx - 1);
   93|   312k|         for(size_t i = 0; i != m_table.size(); ++i) {
  ------------------
  |  Branch (93:28): [True: 294k, False: 18.3k]
  ------------------
   94|   294k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
   95|   294k|            result.conditional_assign(found, m_table[i]);
   96|   294k|         }
   97|       |
   98|  18.3k|         return result;
   99|  18.3k|      }
pcurves_secp384r1.cpp:_ZN5Botan19basemul_booth_setupINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm6EEENSt3__16vectorINT_11AffinePointENS5_9allocatorIS8_EEEERKS8_m:
  254|      1|std::vector<typename C::AffinePoint> basemul_booth_setup(const typename C::AffinePoint& p, size_t max_scalar_bits) {
  255|      1|   static_assert(WindowBits >= 1 && WindowBits <= 8);
  256|       |
  257|       |   // 2^(W-1) elements per window [1*base .. 2^(W-1)*base]
  258|      1|   constexpr size_t WindowElements = 1 << (WindowBits - 1);
  259|       |
  260|      1|   const size_t Windows = (max_scalar_bits + WindowBits - 1) / WindowBits;
  261|       |
  262|      1|   const size_t TableSize = Windows * WindowElements;
  263|       |
  264|      1|   std::vector<typename C::ProjectivePoint> table;
  265|      1|   table.reserve(TableSize);
  266|       |
  267|      1|   auto accum = C::ProjectivePoint::from_affine(p);
  268|       |
  269|     74|   for(size_t i = 0; i != TableSize; i += WindowElements) {
  ------------------
  |  Branch (269:22): [True: 73, False: 1]
  ------------------
  270|     73|      table.push_back(accum);
  271|       |
  272|  2.33k|      for(size_t j = 1; j != WindowElements; ++j) {
  ------------------
  |  Branch (272:25): [True: 2.26k, False: 73]
  ------------------
  273|       |         // Conditional ok: loop iteration count is public
  274|  2.26k|         if(j % 2 == 1) {
  ------------------
  |  Branch (274:13): [True: 1.16k, False: 1.09k]
  ------------------
  275|  1.16k|            table.emplace_back(table[i + j / 2].dbl());
  276|  1.16k|         } else {
  277|  1.09k|            table.emplace_back(table[i + j - 1] + table[i]);
  278|  1.09k|         }
  279|  2.26k|      }
  280|       |
  281|       |      // Advance to next window's base: 2^W * current_base
  282|       |      // The last entry is 2^(W-1) * base, so doubling gives 2^W * base
  283|     73|      accum = table[i + WindowElements - 1].dbl();
  284|     73|   }
  285|       |
  286|       |   // Variable time batch conversion is fine since generator is public
  287|      1|   return to_affine_batch<C, true>(table);
  288|      1|}
pcurves_secp384r1.cpp:_ZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorE:
  308|    287|                                               RandomNumberGenerator& rng) {
  309|    287|   static constexpr size_t WindowElements = 1 << (WindowBits - 1);
  310|       |
  311|    287|   const size_t windows = (scalar.bits() + WindowBits) / WindowBits;
  312|       |
  313|    287|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    287|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    287|      const size_t raw = w_bits << 1;
  317|    287|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    287|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    287|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    287|      pt.conditional_assign(tneg, pt.negate());
  322|    287|      CT::poison(pt);
  323|    287|      pt.randomize_rep(rng);
  324|    287|      return pt;
  325|    287|   }();
  326|       |
  327|  20.9k|   for(size_t i = 1; i != windows; ++i) {
  ------------------
  |  Branch (327:22): [True: 20.6k, False: 287]
  ------------------
  328|       |      // Extract W+1 bits overlapping by 1 with the previous window
  329|  20.6k|      const size_t bit_pos = WindowBits * i - 1;
  330|  20.6k|      const size_t raw = scalar.get_window(bit_pos);
  331|  20.6k|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  332|       |
  333|  20.6k|      const auto tbl_i = table.subspan(WindowElements * i, WindowElements);
  334|       |
  335|  20.6k|      accum = C::ProjectivePoint::add_or_sub(accum, C::AffinePoint::ct_select(tbl_i, tidx), tneg);
  336|       |
  337|       |      // Conditional ok: loop iteration count is public
  338|  20.6k|      if(i <= 3) {
  ------------------
  |  Branch (338:10): [True: 861, False: 19.8k]
  ------------------
  339|    861|         accum.randomize_rep(rng);
  340|    861|      }
  341|  20.6k|   }
  342|       |
  343|    287|   CT::unpoison(accum);
  344|    287|   return accum;
  345|    287|}
pcurves_secp384r1.cpp:_ZZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorEENKUlvE_clEv:
  313|    287|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    287|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    287|      const size_t raw = w_bits << 1;
  317|    287|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    287|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    287|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    287|      pt.conditional_assign(tneg, pt.negate());
  322|    287|      CT::poison(pt);
  323|    287|      pt.randomize_rep(rng);
  324|    287|      return pt;
  325|    287|   }();
pcurves_secp384r1.cpp:_ZN5Botan14varpoint_setupINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm16EEENS_16AffinePointTableIT_Lm0EEERKNS6_11AffinePointE:
  351|    196|AffinePointTable<C> varpoint_setup(const typename C::AffinePoint& p) {
  352|    196|   static_assert(TableSize > 2);
  353|       |
  354|    196|   std::vector<typename C::ProjectivePoint> table;
  355|    196|   table.reserve(TableSize);
  356|    196|   table.push_back(C::ProjectivePoint::from_affine(p));
  357|       |
  358|  3.13k|   for(size_t i = 1; i != TableSize; ++i) {
  ------------------
  |  Branch (358:22): [True: 2.94k, False: 196]
  ------------------
  359|       |      // Conditional ok: loop iteration count is public
  360|  2.94k|      if(i % 2 == 1) {
  ------------------
  |  Branch (360:10): [True: 1.56k, False: 1.37k]
  ------------------
  361|  1.56k|         table.push_back(table[i / 2].dbl());
  362|  1.56k|      } else {
  363|  1.37k|         table.push_back(table[i - 1] + p);
  364|  1.37k|      }
  365|  2.94k|   }
  366|       |
  367|    196|   return AffinePointTable<C>(table);
  368|    196|}
pcurves_secp384r1.cpp:_ZN5Botan16AffinePointTableINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm0EEC2ENSt3__14spanIKNS_20ProjectiveCurvePointINS_6IntModINS2_12Secp384r1RepINS_13EllipticCurveINS3_6ParamsESA_E11FieldParamsEEEEESC_EELm18446744073709551615EEE:
   70|    196|      explicit AffinePointTable(std::span<const ProjectivePoint> pts) {
   71|    196|         BOTAN_ASSERT_NOMSG(pts.size() > 1);
  ------------------
  |  |   84|    196|   do {                                                                     \
  |  |   85|    196|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    196|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 196]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    196|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 196]
  |  |  ------------------
  ------------------
   72|       |
   73|       |         if constexpr(R > 0) {
   74|       |            BOTAN_ASSERT_NOMSG(pts.size() % R == 0);
   75|       |         }
   76|       |
   77|       |         // TODO scatter/gather with SIMD lookup
   78|    196|         m_table = to_affine_batch<C>(pts);
   79|    196|      }
pcurves_secp384r1.cpp:_ZNK5Botan16AffinePointTableINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm0EE9ct_selectEmQL_ZNS_16AffinePointTable16WholeRangeSearchEE:
   86|  17.0k|      {
   87|  17.0k|         BOTAN_DEBUG_ASSERT(idx < m_table.size() + 1);
  ------------------
  |  |  137|  17.0k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  17.0k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 17.0k]
  |  |  ------------------
  ------------------
   88|       |
   89|  17.0k|         auto result = AffinePoint::identity(m_table[0]);
   90|       |
   91|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
   92|  17.0k|         const size_t idx1 = static_cast<size_t>(idx - 1);
   93|   289k|         for(size_t i = 0; i != m_table.size(); ++i) {
  ------------------
  |  Branch (93:28): [True: 272k, False: 17.0k]
  ------------------
   94|   272k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
   95|   272k|            result.conditional_assign(found, m_table[i]);
   96|   272k|         }
   97|       |
   98|  17.0k|         return result;
   99|  17.0k|      }
pcurves_secp521r1.cpp:_ZN5Botan19basemul_booth_setupINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm6EEENSt3__16vectorINT_11AffinePointENS5_9allocatorIS8_EEEERKS8_m:
  254|      1|std::vector<typename C::AffinePoint> basemul_booth_setup(const typename C::AffinePoint& p, size_t max_scalar_bits) {
  255|      1|   static_assert(WindowBits >= 1 && WindowBits <= 8);
  256|       |
  257|       |   // 2^(W-1) elements per window [1*base .. 2^(W-1)*base]
  258|      1|   constexpr size_t WindowElements = 1 << (WindowBits - 1);
  259|       |
  260|      1|   const size_t Windows = (max_scalar_bits + WindowBits - 1) / WindowBits;
  261|       |
  262|      1|   const size_t TableSize = Windows * WindowElements;
  263|       |
  264|      1|   std::vector<typename C::ProjectivePoint> table;
  265|      1|   table.reserve(TableSize);
  266|       |
  267|      1|   auto accum = C::ProjectivePoint::from_affine(p);
  268|       |
  269|     98|   for(size_t i = 0; i != TableSize; i += WindowElements) {
  ------------------
  |  Branch (269:22): [True: 97, False: 1]
  ------------------
  270|     97|      table.push_back(accum);
  271|       |
  272|  3.10k|      for(size_t j = 1; j != WindowElements; ++j) {
  ------------------
  |  Branch (272:25): [True: 3.00k, False: 97]
  ------------------
  273|       |         // Conditional ok: loop iteration count is public
  274|  3.00k|         if(j % 2 == 1) {
  ------------------
  |  Branch (274:13): [True: 1.55k, False: 1.45k]
  ------------------
  275|  1.55k|            table.emplace_back(table[i + j / 2].dbl());
  276|  1.55k|         } else {
  277|  1.45k|            table.emplace_back(table[i + j - 1] + table[i]);
  278|  1.45k|         }
  279|  3.00k|      }
  280|       |
  281|       |      // Advance to next window's base: 2^W * current_base
  282|       |      // The last entry is 2^(W-1) * base, so doubling gives 2^W * base
  283|     97|      accum = table[i + WindowElements - 1].dbl();
  284|     97|   }
  285|       |
  286|       |   // Variable time batch conversion is fine since generator is public
  287|      1|   return to_affine_batch<C, true>(table);
  288|      1|}
pcurves_secp521r1.cpp:_ZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorE:
  308|    445|                                               RandomNumberGenerator& rng) {
  309|    445|   static constexpr size_t WindowElements = 1 << (WindowBits - 1);
  310|       |
  311|    445|   const size_t windows = (scalar.bits() + WindowBits) / WindowBits;
  312|       |
  313|    445|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    445|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    445|      const size_t raw = w_bits << 1;
  317|    445|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    445|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    445|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    445|      pt.conditional_assign(tneg, pt.negate());
  322|    445|      CT::poison(pt);
  323|    445|      pt.randomize_rep(rng);
  324|    445|      return pt;
  325|    445|   }();
  326|       |
  327|  43.1k|   for(size_t i = 1; i != windows; ++i) {
  ------------------
  |  Branch (327:22): [True: 42.7k, False: 445]
  ------------------
  328|       |      // Extract W+1 bits overlapping by 1 with the previous window
  329|  42.7k|      const size_t bit_pos = WindowBits * i - 1;
  330|  42.7k|      const size_t raw = scalar.get_window(bit_pos);
  331|  42.7k|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  332|       |
  333|  42.7k|      const auto tbl_i = table.subspan(WindowElements * i, WindowElements);
  334|       |
  335|  42.7k|      accum = C::ProjectivePoint::add_or_sub(accum, C::AffinePoint::ct_select(tbl_i, tidx), tneg);
  336|       |
  337|       |      // Conditional ok: loop iteration count is public
  338|  42.7k|      if(i <= 3) {
  ------------------
  |  Branch (338:10): [True: 1.33k, False: 41.3k]
  ------------------
  339|  1.33k|         accum.randomize_rep(rng);
  340|  1.33k|      }
  341|  42.7k|   }
  342|       |
  343|    445|   CT::unpoison(accum);
  344|    445|   return accum;
  345|    445|}
pcurves_secp521r1.cpp:_ZZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorEENKUlvE_clEv:
  313|    445|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    445|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    445|      const size_t raw = w_bits << 1;
  317|    445|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    445|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    445|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    445|      pt.conditional_assign(tneg, pt.negate());
  322|    445|      CT::poison(pt);
  323|    445|      pt.randomize_rep(rng);
  324|    445|      return pt;
  325|    445|   }();
pcurves_secp521r1.cpp:_ZN5Botan14varpoint_setupINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm16EEENS_16AffinePointTableIT_Lm0EEERKNS6_11AffinePointE:
  351|    325|AffinePointTable<C> varpoint_setup(const typename C::AffinePoint& p) {
  352|    325|   static_assert(TableSize > 2);
  353|       |
  354|    325|   std::vector<typename C::ProjectivePoint> table;
  355|    325|   table.reserve(TableSize);
  356|    325|   table.push_back(C::ProjectivePoint::from_affine(p));
  357|       |
  358|  5.20k|   for(size_t i = 1; i != TableSize; ++i) {
  ------------------
  |  Branch (358:22): [True: 4.87k, False: 325]
  ------------------
  359|       |      // Conditional ok: loop iteration count is public
  360|  4.87k|      if(i % 2 == 1) {
  ------------------
  |  Branch (360:10): [True: 2.60k, False: 2.27k]
  ------------------
  361|  2.60k|         table.push_back(table[i / 2].dbl());
  362|  2.60k|      } else {
  363|  2.27k|         table.push_back(table[i - 1] + p);
  364|  2.27k|      }
  365|  4.87k|   }
  366|       |
  367|    325|   return AffinePointTable<C>(table);
  368|    325|}
pcurves_secp521r1.cpp:_ZN5Botan16AffinePointTableINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm0EEC2ENSt3__14spanIKNS_20ProjectiveCurvePointINS_6IntModINS3_7P521RepINS_13EllipticCurveINS3_6ParamsESA_E11FieldParamsEEEEESC_EELm18446744073709551615EEE:
   70|    325|      explicit AffinePointTable(std::span<const ProjectivePoint> pts) {
   71|    325|         BOTAN_ASSERT_NOMSG(pts.size() > 1);
  ------------------
  |  |   84|    325|   do {                                                                     \
  |  |   85|    325|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    325|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 325]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    325|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 325]
  |  |  ------------------
  ------------------
   72|       |
   73|       |         if constexpr(R > 0) {
   74|       |            BOTAN_ASSERT_NOMSG(pts.size() % R == 0);
   75|       |         }
   76|       |
   77|       |         // TODO scatter/gather with SIMD lookup
   78|    325|         m_table = to_affine_batch<C>(pts);
   79|    325|      }
pcurves_secp521r1.cpp:_ZNK5Botan16AffinePointTableINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm0EE9ct_selectEmQL_ZNS_16AffinePointTable16WholeRangeSearchEE:
   86|  37.7k|      {
   87|  37.7k|         BOTAN_DEBUG_ASSERT(idx < m_table.size() + 1);
  ------------------
  |  |  137|  37.7k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  37.7k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 37.7k]
  |  |  ------------------
  ------------------
   88|       |
   89|  37.7k|         auto result = AffinePoint::identity(m_table[0]);
   90|       |
   91|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
   92|  37.7k|         const size_t idx1 = static_cast<size_t>(idx - 1);
   93|   640k|         for(size_t i = 0; i != m_table.size(); ++i) {
  ------------------
  |  Branch (93:28): [True: 603k, False: 37.7k]
  ------------------
   94|   603k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
   95|   603k|            result.conditional_assign(found, m_table[i]);
   96|   603k|         }
   97|       |
   98|  37.7k|         return result;
   99|  37.7k|      }

_ZN5Botan10get_uint32ITkNS_8WordTypeEmEEjPKT_m:
   33|  64.6M|constexpr uint32_t get_uint32(const W xw[], size_t i) {
   34|  64.6M|   static_assert(WordInfo<W>::bits == 32 || WordInfo<W>::bits == 64);
   35|       |
   36|       |   if constexpr(WordInfo<W>::bits == 32) {
   37|       |      return xw[i];
   38|  64.6M|   } else {
   39|  64.6M|      return static_cast<uint32_t>(xw[i / 2] >> ((i % 2) * 32));
   40|  64.6M|   }
   41|  64.6M|}
_ZN5Botan12SolinasAccumImLm4EEC2ERNSt3__15arrayImLm4EEE:
   50|  1.70M|      constexpr explicit SolinasAccum(std::array<W, N>& r) : m_r(r) {}
_ZN5Botan12SolinasAccumImLm4EE5accumEl:
   52|  13.6M|      constexpr void accum(int64_t v) {
   53|  13.6M|         BOTAN_DEBUG_ASSERT(m_idx < N32);
  ------------------
  |  |  137|  13.6M|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  13.6M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 13.6M]
  |  |  ------------------
  ------------------
   54|       |
   55|  13.6M|         m_S += v;
   56|  13.6M|         const uint32_t r = static_cast<uint32_t>(m_S);
   57|  13.6M|         m_S >>= 32;
   58|       |
   59|       |         if constexpr(WordInfo<W>::bits == 32) {
   60|       |            m_r[m_idx] = r;
   61|  13.6M|         } else {
   62|  13.6M|            m_r[m_idx / 2] |= static_cast<uint64_t>(r) << (32 * (m_idx % 2));
   63|  13.6M|         }
   64|       |
   65|  13.6M|         m_idx += 1;
   66|  13.6M|      }
_ZN5Botan12SolinasAccumImLm4EE11final_carryEl:
   68|  1.70M|      constexpr W final_carry(int64_t C) {
   69|  1.70M|         m_S += C;
   70|  1.70M|         BOTAN_DEBUG_ASSERT(m_S >= 0);
  ------------------
  |  |  137|  1.70M|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  1.70M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 1.70M]
  |  |  ------------------
  ------------------
   71|  1.70M|         return static_cast<W>(m_S);
   72|  1.70M|      }
_ZN5Botan20solinas_correct_redcILm4ETkNS_8WordTypeEmEEvRNSt3__15arrayIT0_XT_EEERKS4_S7_:
   84|  1.70M|constexpr inline void solinas_correct_redc(std::array<W, N>& r, const std::array<W, N>& P, const std::array<W, N>& C) {
   85|  1.70M|   W borrow = 0;
   86|  8.52M|   for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (86:22): [True: 6.82M, False: 1.70M]
  ------------------
   87|  6.82M|      r[i] = word_sub(r[i], C[i], &borrow);
   88|  6.82M|   }
   89|       |
   90|       |   // borrow is either 0 or 1, perfect for setting up a mask without extra work
   91|  1.70M|   const W mask = CT::value_barrier<W>(0 - borrow);
   92|       |
   93|  1.70M|   W carry = 0;
   94|       |
   95|  8.52M|   for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (95:22): [True: 6.82M, False: 1.70M]
  ------------------
   96|  6.82M|      r[i] = word_add(r[i], P[i] & mask, &carry);
   97|  6.82M|   }
   98|  1.70M|}
_ZN5Botan12SolinasAccumImLm6EEC2ERNSt3__15arrayImLm6EEE:
   50|  1.55M|      constexpr explicit SolinasAccum(std::array<W, N>& r) : m_r(r) {}
_ZN5Botan12SolinasAccumImLm6EE5accumEl:
   52|  18.6M|      constexpr void accum(int64_t v) {
   53|  18.6M|         BOTAN_DEBUG_ASSERT(m_idx < N32);
  ------------------
  |  |  137|  18.6M|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  18.6M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 18.6M]
  |  |  ------------------
  ------------------
   54|       |
   55|  18.6M|         m_S += v;
   56|  18.6M|         const uint32_t r = static_cast<uint32_t>(m_S);
   57|  18.6M|         m_S >>= 32;
   58|       |
   59|       |         if constexpr(WordInfo<W>::bits == 32) {
   60|       |            m_r[m_idx] = r;
   61|  18.6M|         } else {
   62|  18.6M|            m_r[m_idx / 2] |= static_cast<uint64_t>(r) << (32 * (m_idx % 2));
   63|  18.6M|         }
   64|       |
   65|  18.6M|         m_idx += 1;
   66|  18.6M|      }
_ZN5Botan12SolinasAccumImLm6EE11final_carryEl:
   68|  1.55M|      constexpr W final_carry(int64_t C) {
   69|  1.55M|         m_S += C;
   70|  1.55M|         BOTAN_DEBUG_ASSERT(m_S >= 0);
  ------------------
  |  |  137|  1.55M|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  1.55M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 1.55M]
  |  |  ------------------
  ------------------
   71|  1.55M|         return static_cast<W>(m_S);
   72|  1.55M|      }
_ZN5Botan20solinas_correct_redcILm6ETkNS_8WordTypeEmEEvRNSt3__15arrayIT0_XT_EEERKS4_S7_:
   84|  1.55M|constexpr inline void solinas_correct_redc(std::array<W, N>& r, const std::array<W, N>& P, const std::array<W, N>& C) {
   85|  1.55M|   W borrow = 0;
   86|  10.8M|   for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (86:22): [True: 9.34M, False: 1.55M]
  ------------------
   87|  9.34M|      r[i] = word_sub(r[i], C[i], &borrow);
   88|  9.34M|   }
   89|       |
   90|       |   // borrow is either 0 or 1, perfect for setting up a mask without extra work
   91|  1.55M|   const W mask = CT::value_barrier<W>(0 - borrow);
   92|       |
   93|  1.55M|   W carry = 0;
   94|       |
   95|  10.8M|   for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (95:22): [True: 9.34M, False: 1.55M]
  ------------------
   96|  9.34M|      r[i] = word_add(r[i], P[i] & mask, &carry);
   97|  9.34M|   }
   98|  1.55M|}

_ZN5Botan10monty_redcITkNS_8WordTypeEmLm4EEENSt3__15arrayIT_XT0_EEERKNS2_IS3_XmlLi2ET0_EEERKS4_S3_:
  110|  2.46M|   -> std::array<W, N> {
  111|  2.46M|   static_assert(N >= 1);
  112|       |
  113|  2.46M|   std::array<W, N> ws;  // NOLINT(*-member-init)
  114|  2.46M|   std::array<W, N> r;   // NOLINT(*-member-init)
  115|       |
  116|       |   // Conditional ok: the parameter size is public
  117|  2.46M|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (117:7): [True: 2.46M, Folded]
  ------------------
  118|       |      // This range ensures we cover fields of 256, 384 and 512 bits for both 32 and 64 bit words
  119|  2.46M|      if constexpr(N == 4) {
  120|  2.46M|         bigint_monty_redc_4(r.data(), z.data(), p.data(), p_dash, ws.data());
  121|  2.46M|         return r;
  122|       |      } else if constexpr(N == 6) {
  123|       |         bigint_monty_redc_6(r.data(), z.data(), p.data(), p_dash, ws.data());
  124|       |         return r;
  125|       |      } else if constexpr(N == 8) {
  126|       |         bigint_monty_redc_8(r.data(), z.data(), p.data(), p_dash, ws.data());
  127|       |         return r;
  128|       |      } else if constexpr(N == 12) {
  129|       |         bigint_monty_redc_12(r.data(), z.data(), p.data(), p_dash, ws.data());
  130|       |         return r;
  131|       |      } else if constexpr(N == 16) {
  132|       |         bigint_monty_redc_16(r.data(), z.data(), p.data(), p_dash, ws.data());
  133|       |         return r;
  134|       |      }
  135|  2.46M|   }
  136|       |
  137|      0|   word3<W> accum;
  138|       |
  139|  2.46M|   accum.add(z[0]);
  140|       |
  141|  2.46M|   ws[0] = accum.monty_step(p[0], p_dash);
  142|       |
  143|  2.46M|   for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (143:22): [True: 0, False: 2.46M]
  ------------------
  144|      0|      for(size_t j = 0; j < i; ++j) {
  ------------------
  |  Branch (144:25): [True: 0, False: 0]
  ------------------
  145|      0|         accum.mul(ws[j], p[i - j]);
  146|      0|      }
  147|       |
  148|      0|      accum.add(z[i]);
  149|       |
  150|      0|      ws[i] = accum.monty_step(p[0], p_dash);
  151|      0|   }
  152|       |
  153|  2.46M|   for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (153:22): [True: 0, False: 2.46M]
  ------------------
  154|      0|      for(size_t j = i + 1; j != N; ++j) {
  ------------------
  |  Branch (154:29): [True: 0, False: 0]
  ------------------
  155|      0|         accum.mul(ws[j], p[N + i - j]);
  156|      0|      }
  157|       |
  158|      0|      accum.add(z[N + i]);
  159|       |
  160|      0|      ws[i] = accum.extract();
  161|      0|   }
  162|       |
  163|  2.46M|   accum.add(z[2 * N - 1]);
  164|       |
  165|  2.46M|   ws[N - 1] = accum.extract();
  166|       |   // w1 is the final part, which is not stored in the workspace
  167|  2.46M|   const W w1 = accum.extract();
  168|       |
  169|  2.46M|   bigint_monty_maybe_sub<N>(r.data(), w1, ws.data(), p.data());
  170|       |
  171|  2.46M|   return r;
  172|  2.46M|}
_ZN5Botan14bytes_to_wordsITkNS_8WordTypeEmLm4ELm32EEEDaNSt3__14spanIKhXT1_EEE:
  287|  33.2k|inline constexpr auto bytes_to_words(std::span<const uint8_t, L> bytes) {
  288|  33.2k|   static_assert(L <= WordInfo<W>::bytes * N);
  289|       |
  290|  33.2k|   std::array<W, N> r = {};
  291|       |
  292|  33.2k|   constexpr size_t full_words = L / WordInfo<W>::bytes;
  293|  33.2k|   constexpr size_t extra_bytes = L % WordInfo<W>::bytes;
  294|       |
  295|  33.2k|   static_assert(full_words + (extra_bytes ? 1 : 0) <= N);
  296|       |
  297|   166k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (297:22): [True: 132k, False: 33.2k]
  ------------------
  298|   132k|      r[i] = load_be<W>(bytes.data(), full_words - 1 - i);
  299|   132k|   }
  300|       |
  301|       |   if constexpr(extra_bytes > 0) {
  302|       |      constexpr size_t shift = extra_bytes * 8;
  303|       |      shift_left<shift>(r);
  304|       |
  305|       |      for(size_t i = 0; i != extra_bytes; ++i) {
  306|       |         const W b0 = bytes[WordInfo<W>::bytes * full_words + i];
  307|       |         r[0] |= (b0 << (8 * (extra_bytes - 1 - i)));
  308|       |      }
  309|       |   }
  310|       |
  311|  33.2k|   return r;
  312|  33.2k|}
_ZN5Botan14bytes_to_wordsITkNS_8WordTypeEmLm8ELm64EEEDaNSt3__14spanIKhXT1_EEE:
  287|  4.73k|inline constexpr auto bytes_to_words(std::span<const uint8_t, L> bytes) {
  288|  4.73k|   static_assert(L <= WordInfo<W>::bytes * N);
  289|       |
  290|  4.73k|   std::array<W, N> r = {};
  291|       |
  292|  4.73k|   constexpr size_t full_words = L / WordInfo<W>::bytes;
  293|  4.73k|   constexpr size_t extra_bytes = L % WordInfo<W>::bytes;
  294|       |
  295|  4.73k|   static_assert(full_words + (extra_bytes ? 1 : 0) <= N);
  296|       |
  297|  42.6k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (297:22): [True: 37.8k, False: 4.73k]
  ------------------
  298|  37.8k|      r[i] = load_be<W>(bytes.data(), full_words - 1 - i);
  299|  37.8k|   }
  300|       |
  301|       |   if constexpr(extra_bytes > 0) {
  302|       |      constexpr size_t shift = extra_bytes * 8;
  303|       |      shift_left<shift>(r);
  304|       |
  305|       |      for(size_t i = 0; i != extra_bytes; ++i) {
  306|       |         const W b0 = bytes[WordInfo<W>::bytes * full_words + i];
  307|       |         r[0] |= (b0 << (8 * (extra_bytes - 1 - i)));
  308|       |      }
  309|       |   }
  310|       |
  311|  4.73k|   return r;
  312|  4.73k|}
_ZN5Botan10monty_redcITkNS_8WordTypeEmLm6EEENSt3__15arrayIT_XT0_EEERKNS2_IS3_XmlLi2ET0_EEERKS4_S3_:
  110|  1.47M|   -> std::array<W, N> {
  111|  1.47M|   static_assert(N >= 1);
  112|       |
  113|  1.47M|   std::array<W, N> ws;  // NOLINT(*-member-init)
  114|  1.47M|   std::array<W, N> r;   // NOLINT(*-member-init)
  115|       |
  116|       |   // Conditional ok: the parameter size is public
  117|  1.47M|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (117:7): [True: 1.47M, Folded]
  ------------------
  118|       |      // This range ensures we cover fields of 256, 384 and 512 bits for both 32 and 64 bit words
  119|       |      if constexpr(N == 4) {
  120|       |         bigint_monty_redc_4(r.data(), z.data(), p.data(), p_dash, ws.data());
  121|       |         return r;
  122|  1.47M|      } else if constexpr(N == 6) {
  123|  1.47M|         bigint_monty_redc_6(r.data(), z.data(), p.data(), p_dash, ws.data());
  124|  1.47M|         return r;
  125|       |      } else if constexpr(N == 8) {
  126|       |         bigint_monty_redc_8(r.data(), z.data(), p.data(), p_dash, ws.data());
  127|       |         return r;
  128|       |      } else if constexpr(N == 12) {
  129|       |         bigint_monty_redc_12(r.data(), z.data(), p.data(), p_dash, ws.data());
  130|       |         return r;
  131|       |      } else if constexpr(N == 16) {
  132|       |         bigint_monty_redc_16(r.data(), z.data(), p.data(), p_dash, ws.data());
  133|       |         return r;
  134|       |      }
  135|  1.47M|   }
  136|       |
  137|      0|   word3<W> accum;
  138|       |
  139|  1.47M|   accum.add(z[0]);
  140|       |
  141|  1.47M|   ws[0] = accum.monty_step(p[0], p_dash);
  142|       |
  143|  1.47M|   for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (143:22): [True: 0, False: 1.47M]
  ------------------
  144|      0|      for(size_t j = 0; j < i; ++j) {
  ------------------
  |  Branch (144:25): [True: 0, False: 0]
  ------------------
  145|      0|         accum.mul(ws[j], p[i - j]);
  146|      0|      }
  147|       |
  148|      0|      accum.add(z[i]);
  149|       |
  150|      0|      ws[i] = accum.monty_step(p[0], p_dash);
  151|      0|   }
  152|       |
  153|  1.47M|   for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (153:22): [True: 0, False: 1.47M]
  ------------------
  154|      0|      for(size_t j = i + 1; j != N; ++j) {
  ------------------
  |  Branch (154:29): [True: 0, False: 0]
  ------------------
  155|      0|         accum.mul(ws[j], p[N + i - j]);
  156|      0|      }
  157|       |
  158|      0|      accum.add(z[N + i]);
  159|       |
  160|      0|      ws[i] = accum.extract();
  161|      0|   }
  162|       |
  163|  1.47M|   accum.add(z[2 * N - 1]);
  164|       |
  165|  1.47M|   ws[N - 1] = accum.extract();
  166|       |   // w1 is the final part, which is not stored in the workspace
  167|  1.47M|   const W w1 = accum.extract();
  168|       |
  169|  1.47M|   bigint_monty_maybe_sub<N>(r.data(), w1, ws.data(), p.data());
  170|       |
  171|  1.47M|   return r;
  172|  1.47M|}
_ZN5Botan14bytes_to_wordsITkNS_8WordTypeEmLm6ELm48EEEDaNSt3__14spanIKhXT1_EEE:
  287|  7.65k|inline constexpr auto bytes_to_words(std::span<const uint8_t, L> bytes) {
  288|  7.65k|   static_assert(L <= WordInfo<W>::bytes * N);
  289|       |
  290|  7.65k|   std::array<W, N> r = {};
  291|       |
  292|  7.65k|   constexpr size_t full_words = L / WordInfo<W>::bytes;
  293|  7.65k|   constexpr size_t extra_bytes = L % WordInfo<W>::bytes;
  294|       |
  295|  7.65k|   static_assert(full_words + (extra_bytes ? 1 : 0) <= N);
  296|       |
  297|  53.6k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (297:22): [True: 45.9k, False: 7.65k]
  ------------------
  298|  45.9k|      r[i] = load_be<W>(bytes.data(), full_words - 1 - i);
  299|  45.9k|   }
  300|       |
  301|       |   if constexpr(extra_bytes > 0) {
  302|       |      constexpr size_t shift = extra_bytes * 8;
  303|       |      shift_left<shift>(r);
  304|       |
  305|       |      for(size_t i = 0; i != extra_bytes; ++i) {
  306|       |         const W b0 = bytes[WordInfo<W>::bytes * full_words + i];
  307|       |         r[0] |= (b0 << (8 * (extra_bytes - 1 - i)));
  308|       |      }
  309|       |   }
  310|       |
  311|  7.65k|   return r;
  312|  7.65k|}
_ZN5Botan10monty_redcITkNS_8WordTypeEmLm8EEENSt3__15arrayIT_XT0_EEERKNS2_IS3_XmlLi2ET0_EEERKS4_S3_:
  110|  2.45M|   -> std::array<W, N> {
  111|  2.45M|   static_assert(N >= 1);
  112|       |
  113|  2.45M|   std::array<W, N> ws;  // NOLINT(*-member-init)
  114|  2.45M|   std::array<W, N> r;   // NOLINT(*-member-init)
  115|       |
  116|       |   // Conditional ok: the parameter size is public
  117|  2.45M|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (117:7): [True: 2.45M, Folded]
  ------------------
  118|       |      // This range ensures we cover fields of 256, 384 and 512 bits for both 32 and 64 bit words
  119|       |      if constexpr(N == 4) {
  120|       |         bigint_monty_redc_4(r.data(), z.data(), p.data(), p_dash, ws.data());
  121|       |         return r;
  122|       |      } else if constexpr(N == 6) {
  123|       |         bigint_monty_redc_6(r.data(), z.data(), p.data(), p_dash, ws.data());
  124|       |         return r;
  125|  2.45M|      } else if constexpr(N == 8) {
  126|  2.45M|         bigint_monty_redc_8(r.data(), z.data(), p.data(), p_dash, ws.data());
  127|  2.45M|         return r;
  128|       |      } else if constexpr(N == 12) {
  129|       |         bigint_monty_redc_12(r.data(), z.data(), p.data(), p_dash, ws.data());
  130|       |         return r;
  131|       |      } else if constexpr(N == 16) {
  132|       |         bigint_monty_redc_16(r.data(), z.data(), p.data(), p_dash, ws.data());
  133|       |         return r;
  134|       |      }
  135|  2.45M|   }
  136|       |
  137|      0|   word3<W> accum;
  138|       |
  139|  2.45M|   accum.add(z[0]);
  140|       |
  141|  2.45M|   ws[0] = accum.monty_step(p[0], p_dash);
  142|       |
  143|  2.45M|   for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (143:22): [True: 0, False: 2.45M]
  ------------------
  144|      0|      for(size_t j = 0; j < i; ++j) {
  ------------------
  |  Branch (144:25): [True: 0, False: 0]
  ------------------
  145|      0|         accum.mul(ws[j], p[i - j]);
  146|      0|      }
  147|       |
  148|      0|      accum.add(z[i]);
  149|       |
  150|      0|      ws[i] = accum.monty_step(p[0], p_dash);
  151|      0|   }
  152|       |
  153|  2.45M|   for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (153:22): [True: 0, False: 2.45M]
  ------------------
  154|      0|      for(size_t j = i + 1; j != N; ++j) {
  ------------------
  |  Branch (154:29): [True: 0, False: 0]
  ------------------
  155|      0|         accum.mul(ws[j], p[N + i - j]);
  156|      0|      }
  157|       |
  158|      0|      accum.add(z[N + i]);
  159|       |
  160|      0|      ws[i] = accum.extract();
  161|      0|   }
  162|       |
  163|  2.45M|   accum.add(z[2 * N - 1]);
  164|       |
  165|  2.45M|   ws[N - 1] = accum.extract();
  166|       |   // w1 is the final part, which is not stored in the workspace
  167|  2.45M|   const W w1 = accum.extract();
  168|       |
  169|  2.45M|   bigint_monty_maybe_sub<N>(r.data(), w1, ws.data(), p.data());
  170|       |
  171|  2.45M|   return r;
  172|  2.45M|}
_ZN5Botan10monty_redcITkNS_8WordTypeEmLm9EEENSt3__15arrayIT_XT0_EEERKNS2_IS3_XmlLi2ET0_EEERKS4_S3_:
  110|  1.66k|   -> std::array<W, N> {
  111|  1.66k|   static_assert(N >= 1);
  112|       |
  113|  1.66k|   std::array<W, N> ws;  // NOLINT(*-member-init)
  114|  1.66k|   std::array<W, N> r;   // NOLINT(*-member-init)
  115|       |
  116|       |   // Conditional ok: the parameter size is public
  117|  1.66k|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (117:7): [True: 1.66k, Folded]
  ------------------
  118|       |      // This range ensures we cover fields of 256, 384 and 512 bits for both 32 and 64 bit words
  119|       |      if constexpr(N == 4) {
  120|       |         bigint_monty_redc_4(r.data(), z.data(), p.data(), p_dash, ws.data());
  121|       |         return r;
  122|       |      } else if constexpr(N == 6) {
  123|       |         bigint_monty_redc_6(r.data(), z.data(), p.data(), p_dash, ws.data());
  124|       |         return r;
  125|       |      } else if constexpr(N == 8) {
  126|       |         bigint_monty_redc_8(r.data(), z.data(), p.data(), p_dash, ws.data());
  127|       |         return r;
  128|       |      } else if constexpr(N == 12) {
  129|       |         bigint_monty_redc_12(r.data(), z.data(), p.data(), p_dash, ws.data());
  130|       |         return r;
  131|  1.66k|      } else if constexpr(N == 16) {
  132|  1.66k|         bigint_monty_redc_16(r.data(), z.data(), p.data(), p_dash, ws.data());
  133|  1.66k|         return r;
  134|  1.66k|      }
  135|  1.66k|   }
  136|       |
  137|  1.66k|   word3<W> accum;
  138|       |
  139|  1.66k|   accum.add(z[0]);
  140|       |
  141|  1.66k|   ws[0] = accum.monty_step(p[0], p_dash);
  142|       |
  143|  14.9k|   for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (143:22): [True: 13.2k, False: 1.66k]
  ------------------
  144|  73.0k|      for(size_t j = 0; j < i; ++j) {
  ------------------
  |  Branch (144:25): [True: 59.7k, False: 13.2k]
  ------------------
  145|  59.7k|         accum.mul(ws[j], p[i - j]);
  146|  59.7k|      }
  147|       |
  148|  13.2k|      accum.add(z[i]);
  149|       |
  150|  13.2k|      ws[i] = accum.monty_step(p[0], p_dash);
  151|  13.2k|   }
  152|       |
  153|  14.9k|   for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (153:22): [True: 13.2k, False: 1.66k]
  ------------------
  154|  73.0k|      for(size_t j = i + 1; j != N; ++j) {
  ------------------
  |  Branch (154:29): [True: 59.7k, False: 13.2k]
  ------------------
  155|  59.7k|         accum.mul(ws[j], p[N + i - j]);
  156|  59.7k|      }
  157|       |
  158|  13.2k|      accum.add(z[N + i]);
  159|       |
  160|  13.2k|      ws[i] = accum.extract();
  161|  13.2k|   }
  162|       |
  163|  1.66k|   accum.add(z[2 * N - 1]);
  164|       |
  165|  1.66k|   ws[N - 1] = accum.extract();
  166|       |   // w1 is the final part, which is not stored in the workspace
  167|  1.66k|   const W w1 = accum.extract();
  168|       |
  169|  1.66k|   bigint_monty_maybe_sub<N>(r.data(), w1, ws.data(), p.data());
  170|       |
  171|  1.66k|   return r;
  172|  1.66k|}
_ZN5Botan14bytes_to_wordsITkNS_8WordTypeEmLm9ELm66EEEDaNSt3__14spanIKhXT1_EEE:
  287|  4.60k|inline constexpr auto bytes_to_words(std::span<const uint8_t, L> bytes) {
  288|  4.60k|   static_assert(L <= WordInfo<W>::bytes * N);
  289|       |
  290|  4.60k|   std::array<W, N> r = {};
  291|       |
  292|  4.60k|   constexpr size_t full_words = L / WordInfo<W>::bytes;
  293|  4.60k|   constexpr size_t extra_bytes = L % WordInfo<W>::bytes;
  294|       |
  295|  4.60k|   static_assert(full_words + (extra_bytes ? 1 : 0) <= N);
  296|       |
  297|  41.4k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (297:22): [True: 36.8k, False: 4.60k]
  ------------------
  298|  36.8k|      r[i] = load_be<W>(bytes.data(), full_words - 1 - i);
  299|  36.8k|   }
  300|       |
  301|  4.60k|   if constexpr(extra_bytes > 0) {
  302|  4.60k|      constexpr size_t shift = extra_bytes * 8;
  303|  4.60k|      shift_left<shift>(r);
  304|       |
  305|  13.8k|      for(size_t i = 0; i != extra_bytes; ++i) {
  ------------------
  |  Branch (305:25): [True: 9.21k, False: 4.60k]
  ------------------
  306|  9.21k|         const W b0 = bytes[WordInfo<W>::bytes * full_words + i];
  307|  9.21k|         r[0] |= (b0 << (8 * (extra_bytes - 1 - i)));
  308|  9.21k|      }
  309|  4.60k|   }
  310|       |
  311|  4.60k|   return r;
  312|  4.60k|}

pcurves_brainpool256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE8instanceEv:
  344|  11.2k|      static std::shared_ptr<const PrimeOrderCurve> instance() {
  345|  11.2k|         static auto g_curve = std::make_shared<const PrimeOrderCurveImpl<C>>();
  346|  11.2k|         return g_curve;
  347|  11.2k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEEC2Ev:
  342|      1|      PrimeOrderCurveImpl() : m_mul_by_g(C::G) {}
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE19field_element_bytesEv:
   36|  5.69k|      size_t field_element_bytes() const override { return C::FieldElement::BYTES; }
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE8mul_by_gERKNS0_15PrimeOrderCurve6ScalarERNS_21RandomNumberGeneratorE:
   38|    694|      ProjectivePoint mul_by_g(const Scalar& scalar, RandomNumberGenerator& rng) const override {
   39|    694|         return stash(m_mul_by_g.mul(from_stash(scalar), rng));
   40|    694|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE5stashERKNS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEESA_EE:
  376|    694|      static ProjectivePoint stash(const typename C::ProjectivePoint& pt) {
  377|    694|         auto x_w = pt.x().template stash_value<StorageWords>();
  378|    694|         auto y_w = pt.y().template stash_value<StorageWords>();
  379|    694|         auto z_w = pt.z().template stash_value<StorageWords>();
  380|    694|         return ProjectivePoint::_create(instance(), x_w, y_w, z_w);
  381|    694|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE10from_stashERKNS0_15PrimeOrderCurve6ScalarE:
  354|  2.49k|      static typename C::Scalar from_stash(const Scalar& s) {
  355|  2.49k|         if(s._curve() != instance()) {
  ------------------
  |  Branch (355:13): [True: 0, False: 2.49k]
  ------------------
  356|      0|            throw Invalid_Argument("Curve mismatch");
  357|      0|         }
  358|  2.49k|         return C::Scalar::from_stash(s._value());
  359|  2.49k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE5stashERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEE:
  350|    694|      static Scalar stash(const typename C::Scalar& s) {
  351|    694|         return Scalar::_create(instance(), s.template stash_value<StorageWords>());
  352|    694|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE10from_stashERKNS0_15PrimeOrderCurve11AffinePointE:
  367|  5.10k|      static typename C::AffinePoint from_stash(const AffinePoint& pt) {
  368|  5.10k|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (368:13): [True: 0, False: 5.10k]
  ------------------
  369|      0|            throw Invalid_Argument("Curve mismatch");
  370|      0|         }
  371|  5.10k|         auto x = C::FieldElement::from_stash(pt._x());
  372|  5.10k|         auto y = C::FieldElement::from_stash(pt._y());
  373|  5.10k|         return typename C::AffinePoint(x, y);
  374|  5.10k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE10mul_x_onlyERKNS0_15PrimeOrderCurve11AffinePointERKNS6_6ScalarERNS_21RandomNumberGeneratorE:
   49|    413|                                        RandomNumberGenerator& rng) const override {
   50|    413|         auto tbl = WindowedBoothMulTable<C, VarPointWindowBits>(from_stash(pt));
   51|    413|         auto result = tbl.mul(from_stash(scalar), rng);
   52|    413|         BOTAN_STATE_CHECK(!result.is_identity().as_bool());
  ------------------
  |  |   51|    413|   do {                                                         \
  |  |   52|    413|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    413|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 413]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    413|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 413]
  |  |  ------------------
  ------------------
   53|    413|         auto pt_x = to_affine_x<C>(result);
   54|    413|         secure_vector<uint8_t> x_bytes(C::FieldElement::BYTES);
   55|    413|         pt_x.serialize_to(std::span<uint8_t, C::FieldElement::BYTES>{x_bytes});
   56|    413|         return x_bytes;
   57|    413|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE5stashERKNS_16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
  361|  1.52k|      static AffinePoint stash(const typename C::AffinePoint& pt) {
  362|  1.52k|         auto x_w = pt.x().template stash_value<StorageWords>();
  363|  1.52k|         auto y_w = pt.y().template stash_value<StorageWords>();
  364|  1.52k|         return AffinePoint::_create(instance(), x_w, y_w);
  365|  1.52k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE30deserialize_point_uncompressedENSt3__14spanIKhLm18446744073709551615EEE:
  244|    485|      std::optional<AffinePoint> deserialize_point_uncompressed(std::span<const uint8_t> bytes) const override {
  245|    485|         constexpr size_t FieldElementBytes = C::FieldElement::BYTES;
  246|    485|         constexpr size_t UncompressedBytes = 2 * C::FieldElement::BYTES + 1;
  247|       |
  248|    485|         if(bytes.size() == UncompressedBytes && bytes[0] == 0x04) {
  ------------------
  |  Branch (248:13): [True: 485, False: 0]
  |  Branch (248:50): [True: 485, False: 0]
  ------------------
  249|    485|            const auto encoded_point = bytes.subspan(1);
  250|    485|            auto x = C::FieldElement::deserialize(encoded_point.first(FieldElementBytes));
  251|    485|            auto y = C::FieldElement::deserialize(encoded_point.last(FieldElementBytes));
  252|       |
  253|    485|            if(x && y) {
  ------------------
  |  Branch (253:16): [True: 483, False: 2]
  |  Branch (253:21): [True: 482, False: 1]
  ------------------
  254|       |               // Check that y^2 = x^3 + ax + b
  255|    482|               const auto lhs = (*y).square();
  256|    482|               const auto rhs = C::x3_ax_b(*x);
  257|    482|               const auto valid = (lhs == rhs);
  258|    482|               if(valid.as_bool()) {
  ------------------
  |  Branch (258:19): [True: 413, False: 69]
  ------------------
  259|    413|                  return stash(typename C::AffinePoint(*x, *y));
  260|    413|               }
  261|    482|            }
  262|    485|         }
  263|       |
  264|     72|         return {};
  265|    485|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE28deserialize_point_compressedENSt3__14spanIKhLm18446744073709551615EEE:
  267|    479|      std::optional<AffinePoint> deserialize_point_compressed(std::span<const uint8_t> bytes) const override {
  268|    479|         constexpr size_t FieldElementBytes = C::FieldElement::BYTES;
  269|    479|         constexpr size_t CompressedBytes = C::FieldElement::BYTES + 1;
  270|       |
  271|    479|         if(bytes.size() == CompressedBytes && (bytes[0] == 0x02 || bytes[0] == 0x03)) {
  ------------------
  |  Branch (271:13): [True: 479, False: 0]
  |  Branch (271:49): [True: 125, False: 354]
  |  Branch (271:69): [True: 354, False: 0]
  ------------------
  272|    479|            const CT::Choice y_is_even = CT::Mask<uint8_t>::is_equal(bytes[0], 0x02).as_choice();
  273|       |
  274|    479|            if(auto x = C::FieldElement::deserialize(bytes.subspan(1, FieldElementBytes))) {
  ------------------
  |  Branch (274:21): [True: 478, False: 1]
  ------------------
  275|    478|               if(auto y = sqrt_field_element<C>(C::x3_ax_b(*x)).as_optional_vartime()) {
  ------------------
  |  Branch (275:24): [True: 413, False: 65]
  ------------------
  276|    413|                  return stash(typename C::AffinePoint(*x, y->correct_sign(y_is_even)));
  277|    413|               }
  278|    478|            }
  279|    479|         }
  280|       |
  281|     66|         return {};
  282|    479|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE15point_to_affineERKNS0_15PrimeOrderCurve15ProjectivePointE:
  192|    694|      AffinePoint point_to_affine(const ProjectivePoint& pt) const override {
  193|    694|         auto affine = to_affine<C>(from_stash(pt));
  194|       |
  195|    694|         const auto y2 = affine.y().square();
  196|    694|         const auto x3_ax_b = C::x3_ax_b(affine.x());
  197|    694|         const auto valid_point = affine.is_identity() || (y2 == x3_ax_b);
  198|       |
  199|    694|         BOTAN_ASSERT(valid_point.as_bool(), "Computed point is on the curve");
  ------------------
  |  |   71|    694|   do {                                                                                 \
  |  |   72|    694|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|    694|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 694]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|    694|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 694]
  |  |  ------------------
  ------------------
  200|       |
  201|    694|         return stash(affine);
  202|    694|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE10from_stashERKNS0_15PrimeOrderCurve15ProjectivePointE:
  383|    694|      static typename C::ProjectivePoint from_stash(const ProjectivePoint& pt) {
  384|    694|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (384:13): [True: 0, False: 694]
  ------------------
  385|      0|            throw Invalid_Argument("Curve mismatch");
  386|      0|         }
  387|    694|         auto x = C::FieldElement::from_stash(pt._x());
  388|    694|         auto y = C::FieldElement::from_stash(pt._y());
  389|    694|         auto z = C::FieldElement::from_stash(pt._z());
  390|    694|         return typename C::ProjectivePoint(x, y, z);
  391|    694|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE24affine_point_is_identityERKNS0_15PrimeOrderCurve11AffinePointE:
  210|  2.34k|      bool affine_point_is_identity(const AffinePoint& pt) const override {
  211|  2.34k|         return from_stash(pt).is_identity().as_bool();
  212|  2.34k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE15serialize_pointENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve11AffinePointE:
  214|  2.34k|      void serialize_point(std::span<uint8_t> bytes, const AffinePoint& pt) const override {
  215|  2.34k|         BOTAN_ARG_CHECK(bytes.size() == C::AffinePoint::BYTES, "Invalid length for serialize_point");
  ------------------
  |  |   35|  2.34k|   do {                                                          \
  |  |   36|  2.34k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  2.34k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 2.34k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  2.34k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 2.34k]
  |  |  ------------------
  ------------------
  216|  2.34k|         from_stash(pt).serialize_to(bytes.subspan<0, C::AffinePoint::BYTES>());
  217|  2.34k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE16serialize_scalarENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve6ScalarE:
  219|    694|      void serialize_scalar(std::span<uint8_t> bytes, const Scalar& scalar) const override {
  220|    694|         BOTAN_ARG_CHECK(bytes.size() == C::Scalar::BYTES, "Invalid length to serialize_scalar");
  ------------------
  |  |   35|    694|   do {                                                          \
  |  |   36|    694|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    694|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 694]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    694|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 694]
  |  |  ------------------
  ------------------
  221|    694|         return from_stash(scalar).serialize_to(bytes.subspan<0, C::Scalar::BYTES>());
  222|    694|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE14scalar_is_zeroERKNS0_15PrimeOrderCurve6ScalarE:
  332|    694|      bool scalar_is_zero(const Scalar& s) const override { return from_stash(s).is_zero().as_bool(); }
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE13random_scalarERNS_21RandomNumberGeneratorE:
  340|    694|      Scalar random_scalar(RandomNumberGenerator& rng) const override { return stash(C::Scalar::random(rng)); }
pcurves_brainpool384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE8instanceEv:
  344|  4.92k|      static std::shared_ptr<const PrimeOrderCurve> instance() {
  345|  4.92k|         static auto g_curve = std::make_shared<const PrimeOrderCurveImpl<C>>();
  346|  4.92k|         return g_curve;
  347|  4.92k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEEC2Ev:
  342|      1|      PrimeOrderCurveImpl() : m_mul_by_g(C::G) {}
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE19field_element_bytesEv:
   36|  2.45k|      size_t field_element_bytes() const override { return C::FieldElement::BYTES; }
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE8mul_by_gERKNS0_15PrimeOrderCurve6ScalarERNS_21RandomNumberGeneratorE:
   38|    348|      ProjectivePoint mul_by_g(const Scalar& scalar, RandomNumberGenerator& rng) const override {
   39|    348|         return stash(m_mul_by_g.mul(from_stash(scalar), rng));
   40|    348|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE5stashERKNS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEESA_EE:
  376|    348|      static ProjectivePoint stash(const typename C::ProjectivePoint& pt) {
  377|    348|         auto x_w = pt.x().template stash_value<StorageWords>();
  378|    348|         auto y_w = pt.y().template stash_value<StorageWords>();
  379|    348|         auto z_w = pt.z().template stash_value<StorageWords>();
  380|    348|         return ProjectivePoint::_create(instance(), x_w, y_w, z_w);
  381|    348|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE10from_stashERKNS0_15PrimeOrderCurve6ScalarE:
  354|  1.19k|      static typename C::Scalar from_stash(const Scalar& s) {
  355|  1.19k|         if(s._curve() != instance()) {
  ------------------
  |  Branch (355:13): [True: 0, False: 1.19k]
  ------------------
  356|      0|            throw Invalid_Argument("Curve mismatch");
  357|      0|         }
  358|  1.19k|         return C::Scalar::from_stash(s._value());
  359|  1.19k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE5stashERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEE:
  350|    348|      static Scalar stash(const typename C::Scalar& s) {
  351|    348|         return Scalar::_create(instance(), s.template stash_value<StorageWords>());
  352|    348|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE10from_stashERKNS0_15PrimeOrderCurve11AffinePointE:
  367|  2.03k|      static typename C::AffinePoint from_stash(const AffinePoint& pt) {
  368|  2.03k|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (368:13): [True: 0, False: 2.03k]
  ------------------
  369|      0|            throw Invalid_Argument("Curve mismatch");
  370|      0|         }
  371|  2.03k|         auto x = C::FieldElement::from_stash(pt._x());
  372|  2.03k|         auto y = C::FieldElement::from_stash(pt._y());
  373|  2.03k|         return typename C::AffinePoint(x, y);
  374|  2.03k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE10mul_x_onlyERKNS0_15PrimeOrderCurve11AffinePointERKNS6_6ScalarERNS_21RandomNumberGeneratorE:
   49|    149|                                        RandomNumberGenerator& rng) const override {
   50|    149|         auto tbl = WindowedBoothMulTable<C, VarPointWindowBits>(from_stash(pt));
   51|    149|         auto result = tbl.mul(from_stash(scalar), rng);
   52|    149|         BOTAN_STATE_CHECK(!result.is_identity().as_bool());
  ------------------
  |  |   51|    149|   do {                                                         \
  |  |   52|    149|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    149|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 149]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    149|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 149]
  |  |  ------------------
  ------------------
   53|    149|         auto pt_x = to_affine_x<C>(result);
   54|    149|         secure_vector<uint8_t> x_bytes(C::FieldElement::BYTES);
   55|    149|         pt_x.serialize_to(std::span<uint8_t, C::FieldElement::BYTES>{x_bytes});
   56|    149|         return x_bytes;
   57|    149|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE5stashERKNS_16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
  361|    646|      static AffinePoint stash(const typename C::AffinePoint& pt) {
  362|    646|         auto x_w = pt.x().template stash_value<StorageWords>();
  363|    646|         auto y_w = pt.y().template stash_value<StorageWords>();
  364|    646|         return AffinePoint::_create(instance(), x_w, y_w);
  365|    646|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE30deserialize_point_uncompressedENSt3__14spanIKhLm18446744073709551615EEE:
  244|    158|      std::optional<AffinePoint> deserialize_point_uncompressed(std::span<const uint8_t> bytes) const override {
  245|    158|         constexpr size_t FieldElementBytes = C::FieldElement::BYTES;
  246|    158|         constexpr size_t UncompressedBytes = 2 * C::FieldElement::BYTES + 1;
  247|       |
  248|    158|         if(bytes.size() == UncompressedBytes && bytes[0] == 0x04) {
  ------------------
  |  Branch (248:13): [True: 158, False: 0]
  |  Branch (248:50): [True: 158, False: 0]
  ------------------
  249|    158|            const auto encoded_point = bytes.subspan(1);
  250|    158|            auto x = C::FieldElement::deserialize(encoded_point.first(FieldElementBytes));
  251|    158|            auto y = C::FieldElement::deserialize(encoded_point.last(FieldElementBytes));
  252|       |
  253|    158|            if(x && y) {
  ------------------
  |  Branch (253:16): [True: 156, False: 2]
  |  Branch (253:21): [True: 155, False: 1]
  ------------------
  254|       |               // Check that y^2 = x^3 + ax + b
  255|    155|               const auto lhs = (*y).square();
  256|    155|               const auto rhs = C::x3_ax_b(*x);
  257|    155|               const auto valid = (lhs == rhs);
  258|    155|               if(valid.as_bool()) {
  ------------------
  |  Branch (258:19): [True: 149, False: 6]
  ------------------
  259|    149|                  return stash(typename C::AffinePoint(*x, *y));
  260|    149|               }
  261|    155|            }
  262|    158|         }
  263|       |
  264|      9|         return {};
  265|    158|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE28deserialize_point_compressedENSt3__14spanIKhLm18446744073709551615EEE:
  267|    203|      std::optional<AffinePoint> deserialize_point_compressed(std::span<const uint8_t> bytes) const override {
  268|    203|         constexpr size_t FieldElementBytes = C::FieldElement::BYTES;
  269|    203|         constexpr size_t CompressedBytes = C::FieldElement::BYTES + 1;
  270|       |
  271|    203|         if(bytes.size() == CompressedBytes && (bytes[0] == 0x02 || bytes[0] == 0x03)) {
  ------------------
  |  Branch (271:13): [True: 203, False: 0]
  |  Branch (271:49): [True: 162, False: 41]
  |  Branch (271:69): [True: 41, False: 0]
  ------------------
  272|    203|            const CT::Choice y_is_even = CT::Mask<uint8_t>::is_equal(bytes[0], 0x02).as_choice();
  273|       |
  274|    203|            if(auto x = C::FieldElement::deserialize(bytes.subspan(1, FieldElementBytes))) {
  ------------------
  |  Branch (274:21): [True: 202, False: 1]
  ------------------
  275|    202|               if(auto y = sqrt_field_element<C>(C::x3_ax_b(*x)).as_optional_vartime()) {
  ------------------
  |  Branch (275:24): [True: 149, False: 53]
  ------------------
  276|    149|                  return stash(typename C::AffinePoint(*x, y->correct_sign(y_is_even)));
  277|    149|               }
  278|    202|            }
  279|    203|         }
  280|       |
  281|     54|         return {};
  282|    203|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE15point_to_affineERKNS0_15PrimeOrderCurve15ProjectivePointE:
  192|    348|      AffinePoint point_to_affine(const ProjectivePoint& pt) const override {
  193|    348|         auto affine = to_affine<C>(from_stash(pt));
  194|       |
  195|    348|         const auto y2 = affine.y().square();
  196|    348|         const auto x3_ax_b = C::x3_ax_b(affine.x());
  197|    348|         const auto valid_point = affine.is_identity() || (y2 == x3_ax_b);
  198|       |
  199|    348|         BOTAN_ASSERT(valid_point.as_bool(), "Computed point is on the curve");
  ------------------
  |  |   71|    348|   do {                                                                                 \
  |  |   72|    348|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|    348|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 348]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|    348|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 348]
  |  |  ------------------
  ------------------
  200|       |
  201|    348|         return stash(affine);
  202|    348|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE10from_stashERKNS0_15PrimeOrderCurve15ProjectivePointE:
  383|    348|      static typename C::ProjectivePoint from_stash(const ProjectivePoint& pt) {
  384|    348|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (384:13): [True: 0, False: 348]
  ------------------
  385|      0|            throw Invalid_Argument("Curve mismatch");
  386|      0|         }
  387|    348|         auto x = C::FieldElement::from_stash(pt._x());
  388|    348|         auto y = C::FieldElement::from_stash(pt._y());
  389|    348|         auto z = C::FieldElement::from_stash(pt._z());
  390|    348|         return typename C::ProjectivePoint(x, y, z);
  391|    348|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE24affine_point_is_identityERKNS0_15PrimeOrderCurve11AffinePointE:
  210|    944|      bool affine_point_is_identity(const AffinePoint& pt) const override {
  211|    944|         return from_stash(pt).is_identity().as_bool();
  212|    944|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE15serialize_pointENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve11AffinePointE:
  214|    944|      void serialize_point(std::span<uint8_t> bytes, const AffinePoint& pt) const override {
  215|    944|         BOTAN_ARG_CHECK(bytes.size() == C::AffinePoint::BYTES, "Invalid length for serialize_point");
  ------------------
  |  |   35|    944|   do {                                                          \
  |  |   36|    944|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    944|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 944]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    944|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 944]
  |  |  ------------------
  ------------------
  216|    944|         from_stash(pt).serialize_to(bytes.subspan<0, C::AffinePoint::BYTES>());
  217|    944|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE16serialize_scalarENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve6ScalarE:
  219|    348|      void serialize_scalar(std::span<uint8_t> bytes, const Scalar& scalar) const override {
  220|    348|         BOTAN_ARG_CHECK(bytes.size() == C::Scalar::BYTES, "Invalid length to serialize_scalar");
  ------------------
  |  |   35|    348|   do {                                                          \
  |  |   36|    348|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    348|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 348]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    348|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 348]
  |  |  ------------------
  ------------------
  221|    348|         return from_stash(scalar).serialize_to(bytes.subspan<0, C::Scalar::BYTES>());
  222|    348|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE14scalar_is_zeroERKNS0_15PrimeOrderCurve6ScalarE:
  332|    348|      bool scalar_is_zero(const Scalar& s) const override { return from_stash(s).is_zero().as_bool(); }
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE13random_scalarERNS_21RandomNumberGeneratorE:
  340|    348|      Scalar random_scalar(RandomNumberGenerator& rng) const override { return stash(C::Scalar::random(rng)); }
pcurves_brainpool512r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE8instanceEv:
  344|  5.78k|      static std::shared_ptr<const PrimeOrderCurve> instance() {
  345|  5.78k|         static auto g_curve = std::make_shared<const PrimeOrderCurveImpl<C>>();
  346|  5.78k|         return g_curve;
  347|  5.78k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEEC2Ev:
  342|      1|      PrimeOrderCurveImpl() : m_mul_by_g(C::G) {}
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE19field_element_bytesEv:
   36|  2.93k|      size_t field_element_bytes() const override { return C::FieldElement::BYTES; }
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE8mul_by_gERKNS0_15PrimeOrderCurve6ScalarERNS_21RandomNumberGeneratorE:
   38|    360|      ProjectivePoint mul_by_g(const Scalar& scalar, RandomNumberGenerator& rng) const override {
   39|    360|         return stash(m_mul_by_g.mul(from_stash(scalar), rng));
   40|    360|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE5stashERKNS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEESA_EE:
  376|    360|      static ProjectivePoint stash(const typename C::ProjectivePoint& pt) {
  377|    360|         auto x_w = pt.x().template stash_value<StorageWords>();
  378|    360|         auto y_w = pt.y().template stash_value<StorageWords>();
  379|    360|         auto z_w = pt.z().template stash_value<StorageWords>();
  380|    360|         return ProjectivePoint::_create(instance(), x_w, y_w, z_w);
  381|    360|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE10from_stashERKNS0_15PrimeOrderCurve6ScalarE:
  354|  1.29k|      static typename C::Scalar from_stash(const Scalar& s) {
  355|  1.29k|         if(s._curve() != instance()) {
  ------------------
  |  Branch (355:13): [True: 0, False: 1.29k]
  ------------------
  356|      0|            throw Invalid_Argument("Curve mismatch");
  357|      0|         }
  358|  1.29k|         return C::Scalar::from_stash(s._value());
  359|  1.29k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE5stashERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEE:
  350|    360|      static Scalar stash(const typename C::Scalar& s) {
  351|    360|         return Scalar::_create(instance(), s.template stash_value<StorageWords>());
  352|    360|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE10from_stashERKNS0_15PrimeOrderCurve11AffinePointE:
  367|  2.62k|      static typename C::AffinePoint from_stash(const AffinePoint& pt) {
  368|  2.62k|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (368:13): [True: 0, False: 2.62k]
  ------------------
  369|      0|            throw Invalid_Argument("Curve mismatch");
  370|      0|         }
  371|  2.62k|         auto x = C::FieldElement::from_stash(pt._x());
  372|  2.62k|         auto y = C::FieldElement::from_stash(pt._y());
  373|  2.62k|         return typename C::AffinePoint(x, y);
  374|  2.62k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE10mul_x_onlyERKNS0_15PrimeOrderCurve11AffinePointERKNS6_6ScalarERNS_21RandomNumberGeneratorE:
   49|    212|                                        RandomNumberGenerator& rng) const override {
   50|    212|         auto tbl = WindowedBoothMulTable<C, VarPointWindowBits>(from_stash(pt));
   51|    212|         auto result = tbl.mul(from_stash(scalar), rng);
   52|    212|         BOTAN_STATE_CHECK(!result.is_identity().as_bool());
  ------------------
  |  |   51|    212|   do {                                                         \
  |  |   52|    212|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    212|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 212]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    212|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 212]
  |  |  ------------------
  ------------------
   53|    212|         auto pt_x = to_affine_x<C>(result);
   54|    212|         secure_vector<uint8_t> x_bytes(C::FieldElement::BYTES);
   55|    212|         pt_x.serialize_to(std::span<uint8_t, C::FieldElement::BYTES>{x_bytes});
   56|    212|         return x_bytes;
   57|    212|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE5stashERKNS_16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
  361|    784|      static AffinePoint stash(const typename C::AffinePoint& pt) {
  362|    784|         auto x_w = pt.x().template stash_value<StorageWords>();
  363|    784|         auto y_w = pt.y().template stash_value<StorageWords>();
  364|    784|         return AffinePoint::_create(instance(), x_w, y_w);
  365|    784|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE30deserialize_point_uncompressedENSt3__14spanIKhLm18446744073709551615EEE:
  244|    265|      std::optional<AffinePoint> deserialize_point_uncompressed(std::span<const uint8_t> bytes) const override {
  245|    265|         constexpr size_t FieldElementBytes = C::FieldElement::BYTES;
  246|    265|         constexpr size_t UncompressedBytes = 2 * C::FieldElement::BYTES + 1;
  247|       |
  248|    265|         if(bytes.size() == UncompressedBytes && bytes[0] == 0x04) {
  ------------------
  |  Branch (248:13): [True: 265, False: 0]
  |  Branch (248:50): [True: 265, False: 0]
  ------------------
  249|    265|            const auto encoded_point = bytes.subspan(1);
  250|    265|            auto x = C::FieldElement::deserialize(encoded_point.first(FieldElementBytes));
  251|    265|            auto y = C::FieldElement::deserialize(encoded_point.last(FieldElementBytes));
  252|       |
  253|    265|            if(x && y) {
  ------------------
  |  Branch (253:16): [True: 264, False: 1]
  |  Branch (253:21): [True: 263, False: 1]
  ------------------
  254|       |               // Check that y^2 = x^3 + ax + b
  255|    263|               const auto lhs = (*y).square();
  256|    263|               const auto rhs = C::x3_ax_b(*x);
  257|    263|               const auto valid = (lhs == rhs);
  258|    263|               if(valid.as_bool()) {
  ------------------
  |  Branch (258:19): [True: 212, False: 51]
  ------------------
  259|    212|                  return stash(typename C::AffinePoint(*x, *y));
  260|    212|               }
  261|    263|            }
  262|    265|         }
  263|       |
  264|     53|         return {};
  265|    265|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE28deserialize_point_compressedENSt3__14spanIKhLm18446744073709551615EEE:
  267|    226|      std::optional<AffinePoint> deserialize_point_compressed(std::span<const uint8_t> bytes) const override {
  268|    226|         constexpr size_t FieldElementBytes = C::FieldElement::BYTES;
  269|    226|         constexpr size_t CompressedBytes = C::FieldElement::BYTES + 1;
  270|       |
  271|    226|         if(bytes.size() == CompressedBytes && (bytes[0] == 0x02 || bytes[0] == 0x03)) {
  ------------------
  |  Branch (271:13): [True: 226, False: 0]
  |  Branch (271:49): [True: 217, False: 9]
  |  Branch (271:69): [True: 9, False: 0]
  ------------------
  272|    226|            const CT::Choice y_is_even = CT::Mask<uint8_t>::is_equal(bytes[0], 0x02).as_choice();
  273|       |
  274|    226|            if(auto x = C::FieldElement::deserialize(bytes.subspan(1, FieldElementBytes))) {
  ------------------
  |  Branch (274:21): [True: 225, False: 1]
  ------------------
  275|    225|               if(auto y = sqrt_field_element<C>(C::x3_ax_b(*x)).as_optional_vartime()) {
  ------------------
  |  Branch (275:24): [True: 212, False: 13]
  ------------------
  276|    212|                  return stash(typename C::AffinePoint(*x, y->correct_sign(y_is_even)));
  277|    212|               }
  278|    225|            }
  279|    226|         }
  280|       |
  281|     14|         return {};
  282|    226|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE15point_to_affineERKNS0_15PrimeOrderCurve15ProjectivePointE:
  192|    360|      AffinePoint point_to_affine(const ProjectivePoint& pt) const override {
  193|    360|         auto affine = to_affine<C>(from_stash(pt));
  194|       |
  195|    360|         const auto y2 = affine.y().square();
  196|    360|         const auto x3_ax_b = C::x3_ax_b(affine.x());
  197|    360|         const auto valid_point = affine.is_identity() || (y2 == x3_ax_b);
  198|       |
  199|    360|         BOTAN_ASSERT(valid_point.as_bool(), "Computed point is on the curve");
  ------------------
  |  |   71|    360|   do {                                                                                 \
  |  |   72|    360|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|    360|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 360]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|    360|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 360]
  |  |  ------------------
  ------------------
  200|       |
  201|    360|         return stash(affine);
  202|    360|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE10from_stashERKNS0_15PrimeOrderCurve15ProjectivePointE:
  383|    360|      static typename C::ProjectivePoint from_stash(const ProjectivePoint& pt) {
  384|    360|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (384:13): [True: 0, False: 360]
  ------------------
  385|      0|            throw Invalid_Argument("Curve mismatch");
  386|      0|         }
  387|    360|         auto x = C::FieldElement::from_stash(pt._x());
  388|    360|         auto y = C::FieldElement::from_stash(pt._y());
  389|    360|         auto z = C::FieldElement::from_stash(pt._z());
  390|    360|         return typename C::ProjectivePoint(x, y, z);
  391|    360|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE24affine_point_is_identityERKNS0_15PrimeOrderCurve11AffinePointE:
  210|  1.20k|      bool affine_point_is_identity(const AffinePoint& pt) const override {
  211|  1.20k|         return from_stash(pt).is_identity().as_bool();
  212|  1.20k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE15serialize_pointENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve11AffinePointE:
  214|  1.20k|      void serialize_point(std::span<uint8_t> bytes, const AffinePoint& pt) const override {
  215|  1.20k|         BOTAN_ARG_CHECK(bytes.size() == C::AffinePoint::BYTES, "Invalid length for serialize_point");
  ------------------
  |  |   35|  1.20k|   do {                                                          \
  |  |   36|  1.20k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  1.20k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 1.20k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.20k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.20k]
  |  |  ------------------
  ------------------
  216|  1.20k|         from_stash(pt).serialize_to(bytes.subspan<0, C::AffinePoint::BYTES>());
  217|  1.20k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE16serialize_scalarENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve6ScalarE:
  219|    360|      void serialize_scalar(std::span<uint8_t> bytes, const Scalar& scalar) const override {
  220|    360|         BOTAN_ARG_CHECK(bytes.size() == C::Scalar::BYTES, "Invalid length to serialize_scalar");
  ------------------
  |  |   35|    360|   do {                                                          \
  |  |   36|    360|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    360|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 360]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    360|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 360]
  |  |  ------------------
  ------------------
  221|    360|         return from_stash(scalar).serialize_to(bytes.subspan<0, C::Scalar::BYTES>());
  222|    360|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE14scalar_is_zeroERKNS0_15PrimeOrderCurve6ScalarE:
  332|    360|      bool scalar_is_zero(const Scalar& s) const override { return from_stash(s).is_zero().as_bool(); }
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE13random_scalarERNS_21RandomNumberGeneratorE:
  340|    360|      Scalar random_scalar(RandomNumberGenerator& rng) const override { return stash(C::Scalar::random(rng)); }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE8instanceEv:
  344|  46.8k|      static std::shared_ptr<const PrimeOrderCurve> instance() {
  345|  46.8k|         static auto g_curve = std::make_shared<const PrimeOrderCurveImpl<C>>();
  346|  46.8k|         return g_curve;
  347|  46.8k|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEEC2Ev:
  342|      1|      PrimeOrderCurveImpl() : m_mul_by_g(C::G) {}
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE19field_element_bytesEv:
   36|  17.0k|      size_t field_element_bytes() const override { return C::FieldElement::BYTES; }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE8mul_by_gERKNS0_15PrimeOrderCurve6ScalarERNS_21RandomNumberGeneratorE:
   38|    459|      ProjectivePoint mul_by_g(const Scalar& scalar, RandomNumberGenerator& rng) const override {
   39|    459|         return stash(m_mul_by_g.mul(from_stash(scalar), rng));
   40|    459|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE5stashERKNS_20ProjectiveCurvePointINS_6IntModINS2_12Secp256r1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEESA_EE:
  376|    459|      static ProjectivePoint stash(const typename C::ProjectivePoint& pt) {
  377|    459|         auto x_w = pt.x().template stash_value<StorageWords>();
  378|    459|         auto y_w = pt.y().template stash_value<StorageWords>();
  379|    459|         auto z_w = pt.z().template stash_value<StorageWords>();
  380|    459|         return ProjectivePoint::_create(instance(), x_w, y_w, z_w);
  381|    459|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE10from_stashERKNS0_15PrimeOrderCurve6ScalarE:
  354|  14.6k|      static typename C::Scalar from_stash(const Scalar& s) {
  355|  14.6k|         if(s._curve() != instance()) {
  ------------------
  |  Branch (355:13): [True: 0, False: 14.6k]
  ------------------
  356|      0|            throw Invalid_Argument("Curve mismatch");
  357|      0|         }
  358|  14.6k|         return C::Scalar::from_stash(s._value());
  359|  14.6k|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE5stashERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS2_12Secp256r1RepEE12ScalarParamsEEEEE:
  350|  6.94k|      static Scalar stash(const typename C::Scalar& s) {
  351|  6.94k|         return Scalar::_create(instance(), s.template stash_value<StorageWords>());
  352|  6.94k|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE10from_stashERKNS0_15PrimeOrderCurve11AffinePointE:
  367|  16.7k|      static typename C::AffinePoint from_stash(const AffinePoint& pt) {
  368|  16.7k|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (368:13): [True: 0, False: 16.7k]
  ------------------
  369|      0|            throw Invalid_Argument("Curve mismatch");
  370|      0|         }
  371|  16.7k|         auto x = C::FieldElement::from_stash(pt._x());
  372|  16.7k|         auto y = C::FieldElement::from_stash(pt._y());
  373|  16.7k|         return typename C::AffinePoint(x, y);
  374|  16.7k|      }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE10mul_x_onlyERKNS0_15PrimeOrderCurve11AffinePointERKNS6_6ScalarERNS_21RandomNumberGeneratorE:
   49|    317|                                        RandomNumberGenerator& rng) const override {
   50|    317|         auto tbl = WindowedBoothMulTable<C, VarPointWindowBits>(from_stash(pt));
   51|    317|         auto result = tbl.mul(from_stash(scalar), rng);
   52|    317|         BOTAN_STATE_CHECK(!result.is_identity().as_bool());
  ------------------
  |  |   51|    317|   do {                                                         \
  |  |   52|    317|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    317|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 317]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    317|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 317]
  |  |  ------------------
  ------------------
   53|    317|         auto pt_x = to_affine_x<C>(result);
   54|    317|         secure_vector<uint8_t> x_bytes(C::FieldElement::BYTES);
   55|    317|         pt_x.serialize_to(std::span<uint8_t, C::FieldElement::BYTES>{x_bytes});
   56|    317|         return x_bytes;
   57|    317|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE5stashERKNS_16AffineCurvePointINS_6IntModINS2_12Secp256r1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
  361|  7.57k|      static AffinePoint stash(const typename C::AffinePoint& pt) {
  362|  7.57k|         auto x_w = pt.x().template stash_value<StorageWords>();
  363|  7.57k|         auto y_w = pt.y().template stash_value<StorageWords>();
  364|  7.57k|         return AffinePoint::_create(instance(), x_w, y_w);
  365|  7.57k|      }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE30deserialize_point_uncompressedENSt3__14spanIKhLm18446744073709551615EEE:
  244|  6.81k|      std::optional<AffinePoint> deserialize_point_uncompressed(std::span<const uint8_t> bytes) const override {
  245|  6.81k|         constexpr size_t FieldElementBytes = C::FieldElement::BYTES;
  246|  6.81k|         constexpr size_t UncompressedBytes = 2 * C::FieldElement::BYTES + 1;
  247|       |
  248|  6.81k|         if(bytes.size() == UncompressedBytes && bytes[0] == 0x04) {
  ------------------
  |  Branch (248:13): [True: 6.81k, False: 0]
  |  Branch (248:50): [True: 6.81k, False: 0]
  ------------------
  249|  6.81k|            const auto encoded_point = bytes.subspan(1);
  250|  6.81k|            auto x = C::FieldElement::deserialize(encoded_point.first(FieldElementBytes));
  251|  6.81k|            auto y = C::FieldElement::deserialize(encoded_point.last(FieldElementBytes));
  252|       |
  253|  6.81k|            if(x && y) {
  ------------------
  |  Branch (253:16): [True: 6.81k, False: 1]
  |  Branch (253:21): [True: 6.81k, False: 1]
  ------------------
  254|       |               // Check that y^2 = x^3 + ax + b
  255|  6.81k|               const auto lhs = (*y).square();
  256|  6.81k|               const auto rhs = C::x3_ax_b(*x);
  257|  6.81k|               const auto valid = (lhs == rhs);
  258|  6.81k|               if(valid.as_bool()) {
  ------------------
  |  Branch (258:19): [True: 6.80k, False: 14]
  ------------------
  259|  6.80k|                  return stash(typename C::AffinePoint(*x, *y));
  260|  6.80k|               }
  261|  6.81k|            }
  262|  6.81k|         }
  263|       |
  264|     16|         return {};
  265|  6.81k|      }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE28deserialize_point_compressedENSt3__14spanIKhLm18446744073709551615EEE:
  267|    321|      std::optional<AffinePoint> deserialize_point_compressed(std::span<const uint8_t> bytes) const override {
  268|    321|         constexpr size_t FieldElementBytes = C::FieldElement::BYTES;
  269|    321|         constexpr size_t CompressedBytes = C::FieldElement::BYTES + 1;
  270|       |
  271|    321|         if(bytes.size() == CompressedBytes && (bytes[0] == 0x02 || bytes[0] == 0x03)) {
  ------------------
  |  Branch (271:13): [True: 321, False: 0]
  |  Branch (271:49): [True: 54, False: 267]
  |  Branch (271:69): [True: 267, False: 0]
  ------------------
  272|    321|            const CT::Choice y_is_even = CT::Mask<uint8_t>::is_equal(bytes[0], 0x02).as_choice();
  273|       |
  274|    321|            if(auto x = C::FieldElement::deserialize(bytes.subspan(1, FieldElementBytes))) {
  ------------------
  |  Branch (274:21): [True: 319, False: 2]
  ------------------
  275|    319|               if(auto y = sqrt_field_element<C>(C::x3_ax_b(*x)).as_optional_vartime()) {
  ------------------
  |  Branch (275:24): [True: 317, False: 2]
  ------------------
  276|    317|                  return stash(typename C::AffinePoint(*x, y->correct_sign(y_is_even)));
  277|    317|               }
  278|    319|            }
  279|    321|         }
  280|       |
  281|      4|         return {};
  282|    321|      }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE18deserialize_scalarENSt3__14spanIKhLm18446744073709551615EEE:
  224|  6.48k|      std::optional<Scalar> deserialize_scalar(std::span<const uint8_t> bytes) const override {
  225|  6.48k|         if(auto scalar = C::Scalar::deserialize(bytes)) {
  ------------------
  |  Branch (225:18): [True: 6.48k, False: 0]
  ------------------
  226|  6.48k|            if(!scalar->is_zero().as_bool()) {
  ------------------
  |  Branch (226:16): [True: 6.48k, False: 0]
  ------------------
  227|  6.48k|               return stash(*scalar);
  228|  6.48k|            }
  229|  6.48k|         }
  230|       |
  231|      0|         return {};
  232|  6.48k|      }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE15point_to_affineERKNS0_15PrimeOrderCurve15ProjectivePointE:
  192|    459|      AffinePoint point_to_affine(const ProjectivePoint& pt) const override {
  193|    459|         auto affine = to_affine<C>(from_stash(pt));
  194|       |
  195|    459|         const auto y2 = affine.y().square();
  196|    459|         const auto x3_ax_b = C::x3_ax_b(affine.x());
  197|    459|         const auto valid_point = affine.is_identity() || (y2 == x3_ax_b);
  198|       |
  199|    459|         BOTAN_ASSERT(valid_point.as_bool(), "Computed point is on the curve");
  ------------------
  |  |   71|    459|   do {                                                                                 \
  |  |   72|    459|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|    459|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 459]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|    459|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 459]
  |  |  ------------------
  ------------------
  200|       |
  201|    459|         return stash(affine);
  202|    459|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE10from_stashERKNS0_15PrimeOrderCurve15ProjectivePointE:
  383|    459|      static typename C::ProjectivePoint from_stash(const ProjectivePoint& pt) {
  384|    459|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (384:13): [True: 0, False: 459]
  ------------------
  385|      0|            throw Invalid_Argument("Curve mismatch");
  386|      0|         }
  387|    459|         auto x = C::FieldElement::from_stash(pt._x());
  388|    459|         auto y = C::FieldElement::from_stash(pt._y());
  389|    459|         auto z = C::FieldElement::from_stash(pt._z());
  390|    459|         return typename C::ProjectivePoint(x, y, z);
  391|    459|      }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE24affine_point_is_identityERKNS0_15PrimeOrderCurve11AffinePointE:
  210|  8.21k|      bool affine_point_is_identity(const AffinePoint& pt) const override {
  211|  8.21k|         return from_stash(pt).is_identity().as_bool();
  212|  8.21k|      }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE15serialize_pointENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve11AffinePointE:
  214|  8.21k|      void serialize_point(std::span<uint8_t> bytes, const AffinePoint& pt) const override {
  215|  8.21k|         BOTAN_ARG_CHECK(bytes.size() == C::AffinePoint::BYTES, "Invalid length for serialize_point");
  ------------------
  |  |   35|  8.21k|   do {                                                          \
  |  |   36|  8.21k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  8.21k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 8.21k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  8.21k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 8.21k]
  |  |  ------------------
  ------------------
  216|  8.21k|         from_stash(pt).serialize_to(bytes.subspan<0, C::AffinePoint::BYTES>());
  217|  8.21k|      }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE16serialize_scalarENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve6ScalarE:
  219|  6.94k|      void serialize_scalar(std::span<uint8_t> bytes, const Scalar& scalar) const override {
  220|  6.94k|         BOTAN_ARG_CHECK(bytes.size() == C::Scalar::BYTES, "Invalid length to serialize_scalar");
  ------------------
  |  |   35|  6.94k|   do {                                                          \
  |  |   36|  6.94k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  6.94k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 6.94k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  6.94k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 6.94k]
  |  |  ------------------
  ------------------
  221|  6.94k|         return from_stash(scalar).serialize_to(bytes.subspan<0, C::Scalar::BYTES>());
  222|  6.94k|      }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE14scalar_is_zeroERKNS0_15PrimeOrderCurve6ScalarE:
  332|  6.94k|      bool scalar_is_zero(const Scalar& s) const override { return from_stash(s).is_zero().as_bool(); }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE13random_scalarERNS_21RandomNumberGeneratorE:
  340|    459|      Scalar random_scalar(RandomNumberGenerator& rng) const override { return stash(C::Scalar::random(rng)); }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE8instanceEv:
  344|  4.93k|      static std::shared_ptr<const PrimeOrderCurve> instance() {
  345|  4.93k|         static auto g_curve = std::make_shared<const PrimeOrderCurveImpl<C>>();
  346|  4.93k|         return g_curve;
  347|  4.93k|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEEC2Ev:
  342|      1|      PrimeOrderCurveImpl() : m_mul_by_g(C::G) {}
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE19field_element_bytesEv:
   36|  2.52k|      size_t field_element_bytes() const override { return C::FieldElement::BYTES; }
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE8mul_by_gERKNS0_15PrimeOrderCurve6ScalarERNS_21RandomNumberGeneratorE:
   38|    287|      ProjectivePoint mul_by_g(const Scalar& scalar, RandomNumberGenerator& rng) const override {
   39|    287|         return stash(m_mul_by_g.mul(from_stash(scalar), rng));
   40|    287|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE5stashERKNS_20ProjectiveCurvePointINS_6IntModINS2_12Secp384r1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEESA_EE:
  376|    287|      static ProjectivePoint stash(const typename C::ProjectivePoint& pt) {
  377|    287|         auto x_w = pt.x().template stash_value<StorageWords>();
  378|    287|         auto y_w = pt.y().template stash_value<StorageWords>();
  379|    287|         auto z_w = pt.z().template stash_value<StorageWords>();
  380|    287|         return ProjectivePoint::_create(instance(), x_w, y_w, z_w);
  381|    287|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE10from_stashERKNS0_15PrimeOrderCurve6ScalarE:
  354|  1.05k|      static typename C::Scalar from_stash(const Scalar& s) {
  355|  1.05k|         if(s._curve() != instance()) {
  ------------------
  |  Branch (355:13): [True: 0, False: 1.05k]
  ------------------
  356|      0|            throw Invalid_Argument("Curve mismatch");
  357|      0|         }
  358|  1.05k|         return C::Scalar::from_stash(s._value());
  359|  1.05k|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE5stashERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS2_12Secp384r1RepEE12ScalarParamsEEEEE:
  350|    287|      static Scalar stash(const typename C::Scalar& s) {
  351|    287|         return Scalar::_create(instance(), s.template stash_value<StorageWords>());
  352|    287|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE10from_stashERKNS0_15PrimeOrderCurve11AffinePointE:
  367|  2.33k|      static typename C::AffinePoint from_stash(const AffinePoint& pt) {
  368|  2.33k|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (368:13): [True: 0, False: 2.33k]
  ------------------
  369|      0|            throw Invalid_Argument("Curve mismatch");
  370|      0|         }
  371|  2.33k|         auto x = C::FieldElement::from_stash(pt._x());
  372|  2.33k|         auto y = C::FieldElement::from_stash(pt._y());
  373|  2.33k|         return typename C::AffinePoint(x, y);
  374|  2.33k|      }
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE10mul_x_onlyERKNS0_15PrimeOrderCurve11AffinePointERKNS6_6ScalarERNS_21RandomNumberGeneratorE:
   49|    196|                                        RandomNumberGenerator& rng) const override {
   50|    196|         auto tbl = WindowedBoothMulTable<C, VarPointWindowBits>(from_stash(pt));
   51|    196|         auto result = tbl.mul(from_stash(scalar), rng);
   52|    196|         BOTAN_STATE_CHECK(!result.is_identity().as_bool());
  ------------------
  |  |   51|    196|   do {                                                         \
  |  |   52|    196|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    196|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 196]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    196|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 196]
  |  |  ------------------
  ------------------
   53|    196|         auto pt_x = to_affine_x<C>(result);
   54|    196|         secure_vector<uint8_t> x_bytes(C::FieldElement::BYTES);
   55|    196|         pt_x.serialize_to(std::span<uint8_t, C::FieldElement::BYTES>{x_bytes});
   56|    196|         return x_bytes;
   57|    196|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE5stashERKNS_16AffineCurvePointINS_6IntModINS2_12Secp384r1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
  361|    679|      static AffinePoint stash(const typename C::AffinePoint& pt) {
  362|    679|         auto x_w = pt.x().template stash_value<StorageWords>();
  363|    679|         auto y_w = pt.y().template stash_value<StorageWords>();
  364|    679|         return AffinePoint::_create(instance(), x_w, y_w);
  365|    679|      }
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE30deserialize_point_uncompressedENSt3__14spanIKhLm18446744073709551615EEE:
  244|    199|      std::optional<AffinePoint> deserialize_point_uncompressed(std::span<const uint8_t> bytes) const override {
  245|    199|         constexpr size_t FieldElementBytes = C::FieldElement::BYTES;
  246|    199|         constexpr size_t UncompressedBytes = 2 * C::FieldElement::BYTES + 1;
  247|       |
  248|    199|         if(bytes.size() == UncompressedBytes && bytes[0] == 0x04) {
  ------------------
  |  Branch (248:13): [True: 199, False: 0]
  |  Branch (248:50): [True: 199, False: 0]
  ------------------
  249|    199|            const auto encoded_point = bytes.subspan(1);
  250|    199|            auto x = C::FieldElement::deserialize(encoded_point.first(FieldElementBytes));
  251|    199|            auto y = C::FieldElement::deserialize(encoded_point.last(FieldElementBytes));
  252|       |
  253|    199|            if(x && y) {
  ------------------
  |  Branch (253:16): [True: 198, False: 1]
  |  Branch (253:21): [True: 197, False: 1]
  ------------------
  254|       |               // Check that y^2 = x^3 + ax + b
  255|    197|               const auto lhs = (*y).square();
  256|    197|               const auto rhs = C::x3_ax_b(*x);
  257|    197|               const auto valid = (lhs == rhs);
  258|    197|               if(valid.as_bool()) {
  ------------------
  |  Branch (258:19): [True: 196, False: 1]
  ------------------
  259|    196|                  return stash(typename C::AffinePoint(*x, *y));
  260|    196|               }
  261|    197|            }
  262|    199|         }
  263|       |
  264|      3|         return {};
  265|    199|      }
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE28deserialize_point_compressedENSt3__14spanIKhLm18446744073709551615EEE:
  267|    199|      std::optional<AffinePoint> deserialize_point_compressed(std::span<const uint8_t> bytes) const override {
  268|    199|         constexpr size_t FieldElementBytes = C::FieldElement::BYTES;
  269|    199|         constexpr size_t CompressedBytes = C::FieldElement::BYTES + 1;
  270|       |
  271|    199|         if(bytes.size() == CompressedBytes && (bytes[0] == 0x02 || bytes[0] == 0x03)) {
  ------------------
  |  Branch (271:13): [True: 199, False: 0]
  |  Branch (271:49): [True: 180, False: 19]
  |  Branch (271:69): [True: 19, False: 0]
  ------------------
  272|    199|            const CT::Choice y_is_even = CT::Mask<uint8_t>::is_equal(bytes[0], 0x02).as_choice();
  273|       |
  274|    199|            if(auto x = C::FieldElement::deserialize(bytes.subspan(1, FieldElementBytes))) {
  ------------------
  |  Branch (274:21): [True: 198, False: 1]
  ------------------
  275|    198|               if(auto y = sqrt_field_element<C>(C::x3_ax_b(*x)).as_optional_vartime()) {
  ------------------
  |  Branch (275:24): [True: 196, False: 2]
  ------------------
  276|    196|                  return stash(typename C::AffinePoint(*x, y->correct_sign(y_is_even)));
  277|    196|               }
  278|    198|            }
  279|    199|         }
  280|       |
  281|      3|         return {};
  282|    199|      }
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE15point_to_affineERKNS0_15PrimeOrderCurve15ProjectivePointE:
  192|    287|      AffinePoint point_to_affine(const ProjectivePoint& pt) const override {
  193|    287|         auto affine = to_affine<C>(from_stash(pt));
  194|       |
  195|    287|         const auto y2 = affine.y().square();
  196|    287|         const auto x3_ax_b = C::x3_ax_b(affine.x());
  197|    287|         const auto valid_point = affine.is_identity() || (y2 == x3_ax_b);
  198|       |
  199|    287|         BOTAN_ASSERT(valid_point.as_bool(), "Computed point is on the curve");
  ------------------
  |  |   71|    287|   do {                                                                                 \
  |  |   72|    287|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|    287|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 287]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|    287|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 287]
  |  |  ------------------
  ------------------
  200|       |
  201|    287|         return stash(affine);
  202|    287|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE10from_stashERKNS0_15PrimeOrderCurve15ProjectivePointE:
  383|    287|      static typename C::ProjectivePoint from_stash(const ProjectivePoint& pt) {
  384|    287|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (384:13): [True: 0, False: 287]
  ------------------
  385|      0|            throw Invalid_Argument("Curve mismatch");
  386|      0|         }
  387|    287|         auto x = C::FieldElement::from_stash(pt._x());
  388|    287|         auto y = C::FieldElement::from_stash(pt._y());
  389|    287|         auto z = C::FieldElement::from_stash(pt._z());
  390|    287|         return typename C::ProjectivePoint(x, y, z);
  391|    287|      }
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE24affine_point_is_identityERKNS0_15PrimeOrderCurve11AffinePointE:
  210|  1.07k|      bool affine_point_is_identity(const AffinePoint& pt) const override {
  211|  1.07k|         return from_stash(pt).is_identity().as_bool();
  212|  1.07k|      }
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE15serialize_pointENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve11AffinePointE:
  214|  1.07k|      void serialize_point(std::span<uint8_t> bytes, const AffinePoint& pt) const override {
  215|  1.07k|         BOTAN_ARG_CHECK(bytes.size() == C::AffinePoint::BYTES, "Invalid length for serialize_point");
  ------------------
  |  |   35|  1.07k|   do {                                                          \
  |  |   36|  1.07k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  1.07k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 1.07k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.07k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.07k]
  |  |  ------------------
  ------------------
  216|  1.07k|         from_stash(pt).serialize_to(bytes.subspan<0, C::AffinePoint::BYTES>());
  217|  1.07k|      }
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE16serialize_scalarENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve6ScalarE:
  219|    287|      void serialize_scalar(std::span<uint8_t> bytes, const Scalar& scalar) const override {
  220|    287|         BOTAN_ARG_CHECK(bytes.size() == C::Scalar::BYTES, "Invalid length to serialize_scalar");
  ------------------
  |  |   35|    287|   do {                                                          \
  |  |   36|    287|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    287|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 287]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    287|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 287]
  |  |  ------------------
  ------------------
  221|    287|         return from_stash(scalar).serialize_to(bytes.subspan<0, C::Scalar::BYTES>());
  222|    287|      }
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE14scalar_is_zeroERKNS0_15PrimeOrderCurve6ScalarE:
  332|    287|      bool scalar_is_zero(const Scalar& s) const override { return from_stash(s).is_zero().as_bool(); }
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE13random_scalarERNS_21RandomNumberGeneratorE:
  340|    287|      Scalar random_scalar(RandomNumberGenerator& rng) const override { return stash(C::Scalar::random(rng)); }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE8instanceEv:
  344|  7.90k|      static std::shared_ptr<const PrimeOrderCurve> instance() {
  345|  7.90k|         static auto g_curve = std::make_shared<const PrimeOrderCurveImpl<C>>();
  346|  7.90k|         return g_curve;
  347|  7.90k|      }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEEC2Ev:
  342|      1|      PrimeOrderCurveImpl() : m_mul_by_g(C::G) {}
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE19field_element_bytesEv:
   36|  4.05k|      size_t field_element_bytes() const override { return C::FieldElement::BYTES; }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE8mul_by_gERKNS0_15PrimeOrderCurve6ScalarERNS_21RandomNumberGeneratorE:
   38|    445|      ProjectivePoint mul_by_g(const Scalar& scalar, RandomNumberGenerator& rng) const override {
   39|    445|         return stash(m_mul_by_g.mul(from_stash(scalar), rng));
   40|    445|      }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE5stashERKNS_20ProjectiveCurvePointINS_6IntModINS3_7P521RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEESA_EE:
  376|    445|      static ProjectivePoint stash(const typename C::ProjectivePoint& pt) {
  377|    445|         auto x_w = pt.x().template stash_value<StorageWords>();
  378|    445|         auto y_w = pt.y().template stash_value<StorageWords>();
  379|    445|         auto z_w = pt.z().template stash_value<StorageWords>();
  380|    445|         return ProjectivePoint::_create(instance(), x_w, y_w, z_w);
  381|    445|      }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE10from_stashERKNS0_15PrimeOrderCurve6ScalarE:
  354|  1.66k|      static typename C::Scalar from_stash(const Scalar& s) {
  355|  1.66k|         if(s._curve() != instance()) {
  ------------------
  |  Branch (355:13): [True: 0, False: 1.66k]
  ------------------
  356|      0|            throw Invalid_Argument("Curve mismatch");
  357|      0|         }
  358|  1.66k|         return C::Scalar::from_stash(s._value());
  359|  1.66k|      }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE5stashERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS3_7P521RepEE12ScalarParamsEEEEE:
  350|    445|      static Scalar stash(const typename C::Scalar& s) {
  351|    445|         return Scalar::_create(instance(), s.template stash_value<StorageWords>());
  352|    445|      }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE10from_stashERKNS0_15PrimeOrderCurve11AffinePointE:
  367|  3.81k|      static typename C::AffinePoint from_stash(const AffinePoint& pt) {
  368|  3.81k|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (368:13): [True: 0, False: 3.81k]
  ------------------
  369|      0|            throw Invalid_Argument("Curve mismatch");
  370|      0|         }
  371|  3.81k|         auto x = C::FieldElement::from_stash(pt._x());
  372|  3.81k|         auto y = C::FieldElement::from_stash(pt._y());
  373|  3.81k|         return typename C::AffinePoint(x, y);
  374|  3.81k|      }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE10mul_x_onlyERKNS0_15PrimeOrderCurve11AffinePointERKNS6_6ScalarERNS_21RandomNumberGeneratorE:
   49|    325|                                        RandomNumberGenerator& rng) const override {
   50|    325|         auto tbl = WindowedBoothMulTable<C, VarPointWindowBits>(from_stash(pt));
   51|    325|         auto result = tbl.mul(from_stash(scalar), rng);
   52|    325|         BOTAN_STATE_CHECK(!result.is_identity().as_bool());
  ------------------
  |  |   51|    325|   do {                                                         \
  |  |   52|    325|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    325|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 325]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    325|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 325]
  |  |  ------------------
  ------------------
   53|    325|         auto pt_x = to_affine_x<C>(result);
   54|    325|         secure_vector<uint8_t> x_bytes(C::FieldElement::BYTES);
   55|    325|         pt_x.serialize_to(std::span<uint8_t, C::FieldElement::BYTES>{x_bytes});
   56|    325|         return x_bytes;
   57|    325|      }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE5stashERKNS_16AffineCurvePointINS_6IntModINS3_7P521RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
  361|  1.09k|      static AffinePoint stash(const typename C::AffinePoint& pt) {
  362|  1.09k|         auto x_w = pt.x().template stash_value<StorageWords>();
  363|  1.09k|         auto y_w = pt.y().template stash_value<StorageWords>();
  364|  1.09k|         return AffinePoint::_create(instance(), x_w, y_w);
  365|  1.09k|      }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE30deserialize_point_uncompressedENSt3__14spanIKhLm18446744073709551615EEE:
  244|    372|      std::optional<AffinePoint> deserialize_point_uncompressed(std::span<const uint8_t> bytes) const override {
  245|    372|         constexpr size_t FieldElementBytes = C::FieldElement::BYTES;
  246|    372|         constexpr size_t UncompressedBytes = 2 * C::FieldElement::BYTES + 1;
  247|       |
  248|    372|         if(bytes.size() == UncompressedBytes && bytes[0] == 0x04) {
  ------------------
  |  Branch (248:13): [True: 372, False: 0]
  |  Branch (248:50): [True: 372, False: 0]
  ------------------
  249|    372|            const auto encoded_point = bytes.subspan(1);
  250|    372|            auto x = C::FieldElement::deserialize(encoded_point.first(FieldElementBytes));
  251|    372|            auto y = C::FieldElement::deserialize(encoded_point.last(FieldElementBytes));
  252|       |
  253|    372|            if(x && y) {
  ------------------
  |  Branch (253:16): [True: 371, False: 1]
  |  Branch (253:21): [True: 370, False: 1]
  ------------------
  254|       |               // Check that y^2 = x^3 + ax + b
  255|    370|               const auto lhs = (*y).square();
  256|    370|               const auto rhs = C::x3_ax_b(*x);
  257|    370|               const auto valid = (lhs == rhs);
  258|    370|               if(valid.as_bool()) {
  ------------------
  |  Branch (258:19): [True: 325, False: 45]
  ------------------
  259|    325|                  return stash(typename C::AffinePoint(*x, *y));
  260|    325|               }
  261|    370|            }
  262|    372|         }
  263|       |
  264|     47|         return {};
  265|    372|      }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE28deserialize_point_compressedENSt3__14spanIKhLm18446744073709551615EEE:
  267|    336|      std::optional<AffinePoint> deserialize_point_compressed(std::span<const uint8_t> bytes) const override {
  268|    336|         constexpr size_t FieldElementBytes = C::FieldElement::BYTES;
  269|    336|         constexpr size_t CompressedBytes = C::FieldElement::BYTES + 1;
  270|       |
  271|    336|         if(bytes.size() == CompressedBytes && (bytes[0] == 0x02 || bytes[0] == 0x03)) {
  ------------------
  |  Branch (271:13): [True: 336, False: 0]
  |  Branch (271:49): [True: 3, False: 333]
  |  Branch (271:69): [True: 333, False: 0]
  ------------------
  272|    336|            const CT::Choice y_is_even = CT::Mask<uint8_t>::is_equal(bytes[0], 0x02).as_choice();
  273|       |
  274|    336|            if(auto x = C::FieldElement::deserialize(bytes.subspan(1, FieldElementBytes))) {
  ------------------
  |  Branch (274:21): [True: 335, False: 1]
  ------------------
  275|    335|               if(auto y = sqrt_field_element<C>(C::x3_ax_b(*x)).as_optional_vartime()) {
  ------------------
  |  Branch (275:24): [True: 325, False: 10]
  ------------------
  276|    325|                  return stash(typename C::AffinePoint(*x, y->correct_sign(y_is_even)));
  277|    325|               }
  278|    335|            }
  279|    336|         }
  280|       |
  281|     11|         return {};
  282|    336|      }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE15point_to_affineERKNS0_15PrimeOrderCurve15ProjectivePointE:
  192|    445|      AffinePoint point_to_affine(const ProjectivePoint& pt) const override {
  193|    445|         auto affine = to_affine<C>(from_stash(pt));
  194|       |
  195|    445|         const auto y2 = affine.y().square();
  196|    445|         const auto x3_ax_b = C::x3_ax_b(affine.x());
  197|    445|         const auto valid_point = affine.is_identity() || (y2 == x3_ax_b);
  198|       |
  199|    445|         BOTAN_ASSERT(valid_point.as_bool(), "Computed point is on the curve");
  ------------------
  |  |   71|    445|   do {                                                                                 \
  |  |   72|    445|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|    445|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 445]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|    445|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 445]
  |  |  ------------------
  ------------------
  200|       |
  201|    445|         return stash(affine);
  202|    445|      }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE10from_stashERKNS0_15PrimeOrderCurve15ProjectivePointE:
  383|    445|      static typename C::ProjectivePoint from_stash(const ProjectivePoint& pt) {
  384|    445|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (384:13): [True: 0, False: 445]
  ------------------
  385|      0|            throw Invalid_Argument("Curve mismatch");
  386|      0|         }
  387|    445|         auto x = C::FieldElement::from_stash(pt._x());
  388|    445|         auto y = C::FieldElement::from_stash(pt._y());
  389|    445|         auto z = C::FieldElement::from_stash(pt._z());
  390|    445|         return typename C::ProjectivePoint(x, y, z);
  391|    445|      }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE24affine_point_is_identityERKNS0_15PrimeOrderCurve11AffinePointE:
  210|  1.74k|      bool affine_point_is_identity(const AffinePoint& pt) const override {
  211|  1.74k|         return from_stash(pt).is_identity().as_bool();
  212|  1.74k|      }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE15serialize_pointENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve11AffinePointE:
  214|  1.74k|      void serialize_point(std::span<uint8_t> bytes, const AffinePoint& pt) const override {
  215|  1.74k|         BOTAN_ARG_CHECK(bytes.size() == C::AffinePoint::BYTES, "Invalid length for serialize_point");
  ------------------
  |  |   35|  1.74k|   do {                                                          \
  |  |   36|  1.74k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  1.74k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 1.74k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.74k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.74k]
  |  |  ------------------
  ------------------
  216|  1.74k|         from_stash(pt).serialize_to(bytes.subspan<0, C::AffinePoint::BYTES>());
  217|  1.74k|      }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE16serialize_scalarENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve6ScalarE:
  219|    445|      void serialize_scalar(std::span<uint8_t> bytes, const Scalar& scalar) const override {
  220|    445|         BOTAN_ARG_CHECK(bytes.size() == C::Scalar::BYTES, "Invalid length to serialize_scalar");
  ------------------
  |  |   35|    445|   do {                                                          \
  |  |   36|    445|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    445|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 445]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    445|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 445]
  |  |  ------------------
  ------------------
  221|    445|         return from_stash(scalar).serialize_to(bytes.subspan<0, C::Scalar::BYTES>());
  222|    445|      }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE14scalar_is_zeroERKNS0_15PrimeOrderCurve6ScalarE:
  332|    445|      bool scalar_is_zero(const Scalar& s) const override { return from_stash(s).is_zero().as_bool(); }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE13random_scalarERNS_21RandomNumberGeneratorE:
  340|    445|      Scalar random_scalar(RandomNumberGenerator& rng) const override { return stash(C::Scalar::random(rng)); }

_ZN5Botan16polyval_multiplyERKNS_9SIMD_4x32ES2_:
  154|  1.12k|BOTAN_FORCE_INLINE SIMD_4x32 BOTAN_FN_ISA_CLMUL polyval_multiply(const SIMD_4x32& H, const SIMD_4x32& x) {
  155|  1.12k|   SIMD_4x32 hi = clmul<0x11>(H, x);
  156|  1.12k|   const SIMD_4x32 mid = clmul<0x10>(H, x) ^ clmul<0x01>(H, x);
  157|  1.12k|   SIMD_4x32 lo = clmul<0x00>(H, x);
  158|       |
  159|  1.12k|   hi ^= mid.shift_elems_right<2>();
  160|  1.12k|   lo ^= mid.shift_elems_left<2>();
  161|       |
  162|  1.12k|   return polyval_reduce(hi, lo);
  163|  1.12k|}
_ZN5Botan5clmulILi17EEENS_9SIMD_4x32ERKS1_S3_:
   35|  7.49k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_CLMUL SIMD_4x32 clmul(const SIMD_4x32& H, const SIMD_4x32& x) {
   36|  7.49k|   static_assert(M == 0x00 || M == 0x01 || M == 0x10 || M == 0x11, "Valid clmul mode");
   37|       |
   38|  7.49k|#if defined(BOTAN_SIMD_USE_SSSE3)
   39|  7.49k|   return SIMD_4x32(_mm_clmulepi64_si128(x.raw(), H.raw(), M));
   40|       |#elif defined(BOTAN_SIMD_USE_NEON)
   41|       |   const uint64_t a = vgetq_lane_u64(vreinterpretq_u64_u32(x.raw()), M & 0x01);
   42|       |   const uint64_t b = vgetq_lane_u64(vreinterpretq_u64_u32(H.raw()), (M & 0x10) >> 4);
   43|       |
   44|       |   #if defined(BOTAN_BUILD_COMPILER_IS_MSVC)
   45|       |   __n64 a1 = {a}, b1 = {b};
   46|       |   return SIMD_4x32(vmull_p64(a1, b1));
   47|       |   #else
   48|       |   return SIMD_4x32(reinterpret_cast<uint32x4_t>(vmull_p64(a, b)));
   49|       |   #endif
   50|       |
   51|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
   52|       |   const SIMD_4x32 mask_lo = SIMD_4x32(0, 0, 0xFFFFFFFF, 0xFFFFFFFF);
   53|       |   constexpr uint8_t flip = (std::endian::native == std::endian::big) ? 0x11 : 0x00;
   54|       |
   55|       |   SIMD_4x32 i1 = x;
   56|       |   SIMD_4x32 i2 = H;
   57|       |
   58|       |   if constexpr(std::endian::native == std::endian::big) {
   59|       |      i1 = reverse_vector(i1).bswap();
   60|       |      i2 = reverse_vector(i2).bswap();
   61|       |   }
   62|       |
   63|       |   if constexpr(M == (0x11 ^ flip)) {
   64|       |      i1 &= mask_lo;
   65|       |      i2 &= mask_lo;
   66|       |   } else if constexpr(M == (0x10 ^ flip)) {
   67|       |      i1 = i1.shift_elems_left<2>();
   68|       |   } else if constexpr(M == (0x01 ^ flip)) {
   69|       |      i2 = i2.shift_elems_left<2>();
   70|       |   } else if constexpr(M == (0x00 ^ flip)) {
   71|       |      i1 = mask_lo.andc(i1);
   72|       |      i2 = mask_lo.andc(i2);
   73|       |   }
   74|       |
   75|       |   auto i1v = reinterpret_cast<__vector unsigned long long>(i1.raw());
   76|       |   auto i2v = reinterpret_cast<__vector unsigned long long>(i2.raw());
   77|       |
   78|       |   #if BOTAN_COMPILER_HAS_BUILTIN(__builtin_crypto_vpmsumd)
   79|       |   auto rv = __builtin_crypto_vpmsumd(i1v, i2v);
   80|       |   #else
   81|       |   auto rv = __builtin_altivec_crypto_vpmsumd(i1v, i2v);
   82|       |   #endif
   83|       |
   84|       |   auto z = SIMD_4x32(reinterpret_cast<__vector unsigned int>(rv));
   85|       |
   86|       |   if constexpr(std::endian::native == std::endian::big) {
   87|       |      z = reverse_vector(z).bswap();
   88|       |   }
   89|       |
   90|       |   return z;
   91|       |#endif
   92|  7.49k|}
_ZN5Botan5clmulILi16EEENS_9SIMD_4x32ERKS1_S3_:
   35|  1.12k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_CLMUL SIMD_4x32 clmul(const SIMD_4x32& H, const SIMD_4x32& x) {
   36|  1.12k|   static_assert(M == 0x00 || M == 0x01 || M == 0x10 || M == 0x11, "Valid clmul mode");
   37|       |
   38|  1.12k|#if defined(BOTAN_SIMD_USE_SSSE3)
   39|  1.12k|   return SIMD_4x32(_mm_clmulepi64_si128(x.raw(), H.raw(), M));
   40|       |#elif defined(BOTAN_SIMD_USE_NEON)
   41|       |   const uint64_t a = vgetq_lane_u64(vreinterpretq_u64_u32(x.raw()), M & 0x01);
   42|       |   const uint64_t b = vgetq_lane_u64(vreinterpretq_u64_u32(H.raw()), (M & 0x10) >> 4);
   43|       |
   44|       |   #if defined(BOTAN_BUILD_COMPILER_IS_MSVC)
   45|       |   __n64 a1 = {a}, b1 = {b};
   46|       |   return SIMD_4x32(vmull_p64(a1, b1));
   47|       |   #else
   48|       |   return SIMD_4x32(reinterpret_cast<uint32x4_t>(vmull_p64(a, b)));
   49|       |   #endif
   50|       |
   51|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
   52|       |   const SIMD_4x32 mask_lo = SIMD_4x32(0, 0, 0xFFFFFFFF, 0xFFFFFFFF);
   53|       |   constexpr uint8_t flip = (std::endian::native == std::endian::big) ? 0x11 : 0x00;
   54|       |
   55|       |   SIMD_4x32 i1 = x;
   56|       |   SIMD_4x32 i2 = H;
   57|       |
   58|       |   if constexpr(std::endian::native == std::endian::big) {
   59|       |      i1 = reverse_vector(i1).bswap();
   60|       |      i2 = reverse_vector(i2).bswap();
   61|       |   }
   62|       |
   63|       |   if constexpr(M == (0x11 ^ flip)) {
   64|       |      i1 &= mask_lo;
   65|       |      i2 &= mask_lo;
   66|       |   } else if constexpr(M == (0x10 ^ flip)) {
   67|       |      i1 = i1.shift_elems_left<2>();
   68|       |   } else if constexpr(M == (0x01 ^ flip)) {
   69|       |      i2 = i2.shift_elems_left<2>();
   70|       |   } else if constexpr(M == (0x00 ^ flip)) {
   71|       |      i1 = mask_lo.andc(i1);
   72|       |      i2 = mask_lo.andc(i2);
   73|       |   }
   74|       |
   75|       |   auto i1v = reinterpret_cast<__vector unsigned long long>(i1.raw());
   76|       |   auto i2v = reinterpret_cast<__vector unsigned long long>(i2.raw());
   77|       |
   78|       |   #if BOTAN_COMPILER_HAS_BUILTIN(__builtin_crypto_vpmsumd)
   79|       |   auto rv = __builtin_crypto_vpmsumd(i1v, i2v);
   80|       |   #else
   81|       |   auto rv = __builtin_altivec_crypto_vpmsumd(i1v, i2v);
   82|       |   #endif
   83|       |
   84|       |   auto z = SIMD_4x32(reinterpret_cast<__vector unsigned int>(rv));
   85|       |
   86|       |   if constexpr(std::endian::native == std::endian::big) {
   87|       |      z = reverse_vector(z).bswap();
   88|       |   }
   89|       |
   90|       |   return z;
   91|       |#endif
   92|  1.12k|}
_ZN5Botan5clmulILi1EEENS_9SIMD_4x32ERKS1_S3_:
   35|  1.12k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_CLMUL SIMD_4x32 clmul(const SIMD_4x32& H, const SIMD_4x32& x) {
   36|  1.12k|   static_assert(M == 0x00 || M == 0x01 || M == 0x10 || M == 0x11, "Valid clmul mode");
   37|       |
   38|  1.12k|#if defined(BOTAN_SIMD_USE_SSSE3)
   39|  1.12k|   return SIMD_4x32(_mm_clmulepi64_si128(x.raw(), H.raw(), M));
   40|       |#elif defined(BOTAN_SIMD_USE_NEON)
   41|       |   const uint64_t a = vgetq_lane_u64(vreinterpretq_u64_u32(x.raw()), M & 0x01);
   42|       |   const uint64_t b = vgetq_lane_u64(vreinterpretq_u64_u32(H.raw()), (M & 0x10) >> 4);
   43|       |
   44|       |   #if defined(BOTAN_BUILD_COMPILER_IS_MSVC)
   45|       |   __n64 a1 = {a}, b1 = {b};
   46|       |   return SIMD_4x32(vmull_p64(a1, b1));
   47|       |   #else
   48|       |   return SIMD_4x32(reinterpret_cast<uint32x4_t>(vmull_p64(a, b)));
   49|       |   #endif
   50|       |
   51|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
   52|       |   const SIMD_4x32 mask_lo = SIMD_4x32(0, 0, 0xFFFFFFFF, 0xFFFFFFFF);
   53|       |   constexpr uint8_t flip = (std::endian::native == std::endian::big) ? 0x11 : 0x00;
   54|       |
   55|       |   SIMD_4x32 i1 = x;
   56|       |   SIMD_4x32 i2 = H;
   57|       |
   58|       |   if constexpr(std::endian::native == std::endian::big) {
   59|       |      i1 = reverse_vector(i1).bswap();
   60|       |      i2 = reverse_vector(i2).bswap();
   61|       |   }
   62|       |
   63|       |   if constexpr(M == (0x11 ^ flip)) {
   64|       |      i1 &= mask_lo;
   65|       |      i2 &= mask_lo;
   66|       |   } else if constexpr(M == (0x10 ^ flip)) {
   67|       |      i1 = i1.shift_elems_left<2>();
   68|       |   } else if constexpr(M == (0x01 ^ flip)) {
   69|       |      i2 = i2.shift_elems_left<2>();
   70|       |   } else if constexpr(M == (0x00 ^ flip)) {
   71|       |      i1 = mask_lo.andc(i1);
   72|       |      i2 = mask_lo.andc(i2);
   73|       |   }
   74|       |
   75|       |   auto i1v = reinterpret_cast<__vector unsigned long long>(i1.raw());
   76|       |   auto i2v = reinterpret_cast<__vector unsigned long long>(i2.raw());
   77|       |
   78|       |   #if BOTAN_COMPILER_HAS_BUILTIN(__builtin_crypto_vpmsumd)
   79|       |   auto rv = __builtin_crypto_vpmsumd(i1v, i2v);
   80|       |   #else
   81|       |   auto rv = __builtin_altivec_crypto_vpmsumd(i1v, i2v);
   82|       |   #endif
   83|       |
   84|       |   auto z = SIMD_4x32(reinterpret_cast<__vector unsigned int>(rv));
   85|       |
   86|       |   if constexpr(std::endian::native == std::endian::big) {
   87|       |      z = reverse_vector(z).bswap();
   88|       |   }
   89|       |
   90|       |   return z;
   91|       |#endif
   92|  1.12k|}
_ZN5Botan5clmulILi0EEENS_9SIMD_4x32ERKS1_S3_:
   35|  17.7k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_CLMUL SIMD_4x32 clmul(const SIMD_4x32& H, const SIMD_4x32& x) {
   36|  17.7k|   static_assert(M == 0x00 || M == 0x01 || M == 0x10 || M == 0x11, "Valid clmul mode");
   37|       |
   38|  17.7k|#if defined(BOTAN_SIMD_USE_SSSE3)
   39|  17.7k|   return SIMD_4x32(_mm_clmulepi64_si128(x.raw(), H.raw(), M));
   40|       |#elif defined(BOTAN_SIMD_USE_NEON)
   41|       |   const uint64_t a = vgetq_lane_u64(vreinterpretq_u64_u32(x.raw()), M & 0x01);
   42|       |   const uint64_t b = vgetq_lane_u64(vreinterpretq_u64_u32(H.raw()), (M & 0x10) >> 4);
   43|       |
   44|       |   #if defined(BOTAN_BUILD_COMPILER_IS_MSVC)
   45|       |   __n64 a1 = {a}, b1 = {b};
   46|       |   return SIMD_4x32(vmull_p64(a1, b1));
   47|       |   #else
   48|       |   return SIMD_4x32(reinterpret_cast<uint32x4_t>(vmull_p64(a, b)));
   49|       |   #endif
   50|       |
   51|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
   52|       |   const SIMD_4x32 mask_lo = SIMD_4x32(0, 0, 0xFFFFFFFF, 0xFFFFFFFF);
   53|       |   constexpr uint8_t flip = (std::endian::native == std::endian::big) ? 0x11 : 0x00;
   54|       |
   55|       |   SIMD_4x32 i1 = x;
   56|       |   SIMD_4x32 i2 = H;
   57|       |
   58|       |   if constexpr(std::endian::native == std::endian::big) {
   59|       |      i1 = reverse_vector(i1).bswap();
   60|       |      i2 = reverse_vector(i2).bswap();
   61|       |   }
   62|       |
   63|       |   if constexpr(M == (0x11 ^ flip)) {
   64|       |      i1 &= mask_lo;
   65|       |      i2 &= mask_lo;
   66|       |   } else if constexpr(M == (0x10 ^ flip)) {
   67|       |      i1 = i1.shift_elems_left<2>();
   68|       |   } else if constexpr(M == (0x01 ^ flip)) {
   69|       |      i2 = i2.shift_elems_left<2>();
   70|       |   } else if constexpr(M == (0x00 ^ flip)) {
   71|       |      i1 = mask_lo.andc(i1);
   72|       |      i2 = mask_lo.andc(i2);
   73|       |   }
   74|       |
   75|       |   auto i1v = reinterpret_cast<__vector unsigned long long>(i1.raw());
   76|       |   auto i2v = reinterpret_cast<__vector unsigned long long>(i2.raw());
   77|       |
   78|       |   #if BOTAN_COMPILER_HAS_BUILTIN(__builtin_crypto_vpmsumd)
   79|       |   auto rv = __builtin_crypto_vpmsumd(i1v, i2v);
   80|       |   #else
   81|       |   auto rv = __builtin_altivec_crypto_vpmsumd(i1v, i2v);
   82|       |   #endif
   83|       |
   84|       |   auto z = SIMD_4x32(reinterpret_cast<__vector unsigned int>(rv));
   85|       |
   86|       |   if constexpr(std::endian::native == std::endian::big) {
   87|       |      z = reverse_vector(z).bswap();
   88|       |   }
   89|       |
   90|       |   return z;
   91|       |#endif
   92|  17.7k|}
_ZN5Botan14polyval_reduceERKNS_9SIMD_4x32ES2_:
  133|  1.94k|BOTAN_FORCE_INLINE SIMD_4x32 BOTAN_FN_ISA_CLMUL polyval_reduce(const SIMD_4x32& hi, const SIMD_4x32& lo) {
  134|  1.94k|   const SIMD_4x32 V(0, 0xC2000000, 0, 0);
  135|       |
  136|       |   /*
  137|       |   Montgomery reduction
  138|       |   Input: 256-bit operand [X3 : X2 : X1 : X0]
  139|       |   [A1 : A0] = X0 • 0xc200000000000000
  140|       |   [B1 : B0] = [X0 ⨁ A1 : X1 ⨁ A0]
  141|       |   [C1 : C0] = B0 • 0xc200000000000000
  142|       |   [D1 : D0] = [B0 ⨁ C1 : B1 ⨁ C0]
  143|       |   Output: [D1 ⨁ X3 : D0 ⨁ X2]
  144|       |   */
  145|       |
  146|  1.94k|   const auto A = clmul<0x00>(lo, V);
  147|  1.94k|   const auto B = A ^ lo.swap_halves();
  148|  1.94k|   const auto C = clmul<0x00>(B, V);
  149|  1.94k|   const auto D = C ^ B.swap_halves();
  150|       |
  151|  1.94k|   return D ^ hi;
  152|  1.94k|}
_ZN5Botan12mulx_polyvalERKNS_9SIMD_4x32E:
  118|    134|BOTAN_FORCE_INLINE SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 mulx_polyval(const SIMD_4x32& h) {
  119|    134|   const auto V = SIMD_4x32(0x00000001, 0x00000000, 0x00000000, 0xc2000000);
  120|       |
  121|       |   // Bitmask set iff the top bit of h is set
  122|    134|   const auto mask = h.top_bit_mask();
  123|       |
  124|       |   // Extract the top bits of the words and move them into place as the low bit of the next word
  125|    134|   auto top_bits = h.shr<31>().shift_elems_left<1>();
  126|       |
  127|       |   // The main shift, adding back in the top bits that are otherwise lost
  128|    134|   auto shifted_h = h.shl<1>() | top_bits;
  129|       |
  130|    134|   return shifted_h ^ (mask & V);
  131|    134|}
_ZN5Botan14reverse_vectorERKNS_9SIMD_4x32E:
   20|  7.80k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32 reverse_vector(const SIMD_4x32& in) {
   21|  7.80k|#if defined(BOTAN_SIMD_USE_SSSE3)
   22|  7.80k|   const __m128i BSWAP_MASK = _mm_set_epi8(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
   23|  7.80k|   return SIMD_4x32(_mm_shuffle_epi8(in.raw(), BSWAP_MASK));
   24|       |#elif defined(BOTAN_SIMD_USE_NEON)
   25|       |   const uint8_t maskb[16] = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
   26|       |   const uint8x16_t mask = vld1q_u8(maskb);
   27|       |   return SIMD_4x32(vreinterpretq_u32_u8(vqtbl1q_u8(vreinterpretq_u8_u32(in.raw()), mask)));
   28|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
   29|       |   const __vector unsigned char mask = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
   30|       |   return SIMD_4x32(vec_perm(in.raw(), in.raw(), mask));
   31|       |#endif
   32|  7.80k|}
_ZN5Botan10load_blockILb1EEENS_9SIMD_4x32EPKh:
  101|  7.25k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32 load_block(const uint8_t in[]) {
  102|  7.25k|   if constexpr(BSWAP) {
  103|  7.25k|      return reverse_vector(SIMD_4x32::load_le(in));
  104|       |   } else {
  105|       |      return SIMD_4x32::load_le(in);
  106|       |   }
  107|  7.25k|}
_ZN5Botan11store_blockILb1EEEvRKNS_9SIMD_4x32EPh:
  110|    408|BOTAN_FORCE_INLINE BOTAN_FN_ISA_SIMD_4X32 void store_block(const SIMD_4x32& b, uint8_t out[]) {
  111|    408|   if constexpr(BSWAP) {
  112|    408|      reverse_vector(b).store_le(out);
  113|       |   } else {
  114|       |      b.store_le(out);
  115|       |   }
  116|    408|}

_ZN5Botan15prefetch_arraysITkNSt3__117unsigned_integralEKhJLm256ELm256ELm256ELm256EEEET_DpRAT0__S3_:
   34|     18|T prefetch_arrays(T (&... arr)[Ns]) noexcept {
   35|     18|   return (static_cast<T>(prefetch_array_raw(sizeof(T) * Ns, arr)) & ...);
   36|     18|}
_ZN5Botan15prefetch_arraysITkNSt3__117unsigned_integralEKhJLm256EEEET_DpRAT0__S3_:
   34|     41|T prefetch_arrays(T (&... arr)[Ns]) noexcept {
   35|     41|   return (static_cast<T>(prefetch_array_raw(sizeof(T) * Ns, arr)) & ...);
   36|     41|}

_ZN5Botan10TLS_12_PRFC2ENSt3__110unique_ptrINS_25MessageAuthenticationCodeENS1_14default_deleteIS3_EEEE:
   28|  1.63k|      explicit TLS_12_PRF(std::unique_ptr<MessageAuthenticationCode> mac) : m_mac(std::move(mac)) {}

_ZN5Botan4rotlILm1ETkNSt3__117unsigned_integralEhEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|    984|{
   26|    984|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|    984|}
_ZN5Botan4rotlILm7ETkNSt3__117unsigned_integralEhEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|    492|{
   26|    492|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|    492|}
_ZN5Botan4rotrILm8ETkNSt3__117unsigned_integralEjEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|    952|{
   38|    952|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|    952|}
_ZN5Botan4rotrILm16ETkNSt3__117unsigned_integralEjEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|  1.24k|{
   38|  1.24k|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|  1.24k|}
_ZN5Botan4rotrILm24ETkNSt3__117unsigned_integralEjEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|    952|{
   38|    952|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|    952|}
_ZN5Botan4rotrILm39ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|  1.28M|{
   38|  1.28M|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|  1.28M|}
_ZN5Botan4rotrILm34ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|  1.28M|{
   38|  1.28M|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|  1.28M|}
_ZN5Botan4rotrILm14ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|  1.28M|{
   38|  1.28M|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|  1.28M|}
_ZN5Botan3rhoILm14ELm18ELm41ETkNSt3__117unsigned_integralEmEET2_S2_:
   53|  1.28M|BOTAN_FORCE_INLINE constexpr T rho(T x) {
   54|  1.28M|   return rotr<R1>(x) ^ rotr<R2>(x) ^ rotr<R3>(x);
   55|  1.28M|}
_ZN5Botan4rotrILm18ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|  1.28M|{
   38|  1.28M|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|  1.28M|}
_ZN5Botan4rotrILm41ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|  1.28M|{
   38|  1.28M|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|  1.28M|}
_ZN5Botan3rhoILm28ELm34ELm39ETkNSt3__117unsigned_integralEmEET2_S2_:
   53|  1.28M|BOTAN_FORCE_INLINE constexpr T rho(T x) {
   54|  1.28M|   return rotr<R1>(x) ^ rotr<R2>(x) ^ rotr<R3>(x);
   55|  1.28M|}
_ZN5Botan4rotrILm28ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|  1.28M|{
   38|  1.28M|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|  1.28M|}

_ZN5Botan8round_upEmm:
   26|   119k|constexpr inline size_t round_up(size_t n, size_t align_to) {
   27|       |   // Arguably returning n in this case would also be sensible
   28|   119k|   BOTAN_ARG_CHECK(align_to != 0, "align_to must not be 0");
  ------------------
  |  |   35|   119k|   do {                                                          \
  |  |   36|   119k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|   119k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 119k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|   119k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 119k]
  |  |  ------------------
  ------------------
   29|       |
   30|   119k|   if(n % align_to > 0) {
  ------------------
  |  Branch (30:7): [True: 79.1k, False: 40.4k]
  ------------------
   31|  79.1k|      const size_t adj = align_to - (n % align_to);
   32|  79.1k|      BOTAN_ARG_CHECK(n + adj >= n, "Integer overflow during rounding");
  ------------------
  |  |   35|  79.1k|   do {                                                          \
  |  |   36|  79.1k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  79.1k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 79.1k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  79.1k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 79.1k]
  |  |  ------------------
  ------------------
   33|  79.1k|      n += adj;
   34|  79.1k|   }
   35|   119k|   return n;
   36|   119k|}

_ZNK5Botan9SCAN_Name9arg_countEv:
   43|  7.73k|      size_t arg_count() const { return m_args.size(); }
_ZNK5Botan9SCAN_Name9algo_nameEv:
   38|  19.3k|      const std::string& algo_name() const { return m_alg_name; }

_ZN5Botan14scoped_cleanupIZNS_2CT13scoped_poisonIJNSt3__16vectorIhNS_16secure_allocatorIhEEEEEQaaaagtsZT_Li0Efraa10poisonableIT_Efraa12unpoisonableIS8_EEEDaDpRKS8_EUlvE_EC2ESC_:
   26|     17|      explicit scoped_cleanup(FunT cleanup) : m_cleanup(std::move(cleanup)) {}
_ZN5Botan14scoped_cleanupIZNS_2CT13scoped_poisonIJNSt3__16vectorIhNS_16secure_allocatorIhEEEEEQaaaagtsZT_Li0Efraa10poisonableIT_Efraa12unpoisonableIS8_EEEDaDpRKS8_EUlvE_EC2EOSD_:
   32|     17|      scoped_cleanup(scoped_cleanup&& other) noexcept : m_cleanup(std::move(other.m_cleanup)) { other.disengage(); }
_ZN5Botan14scoped_cleanupIZNS_2CT13scoped_poisonIJNSt3__16vectorIhNS_16secure_allocatorIhEEEEEQaaaagtsZT_Li0Efraa10poisonableIT_Efraa12unpoisonableIS8_EEEDaDpRKS8_EUlvE_E9disengageEv:
   43|     17|      void disengage() noexcept { m_cleanup.reset(); }
_ZN5Botan14scoped_cleanupIZNS_2CT13scoped_poisonIJNSt3__16vectorIhNS_16secure_allocatorIhEEEEEQaaaagtsZT_Li0Efraa10poisonableIT_Efraa12unpoisonableIS8_EEEDaDpRKS8_EUlvE_ED2Ev:
   34|     34|      ~scoped_cleanup() {
   35|     34|         if(m_cleanup.has_value()) {
  ------------------
  |  Branch (35:13): [True: 17, False: 17]
  ------------------
   36|     17|            (*m_cleanup)();  // NOLINT(bugprone-exception-escape) clang-tidy bug
   37|     17|         }
   38|     34|      }

_ZNK5Botan5SHA_14nameEv:
   32|    182|      std::string name() const override { return "SHA-1"; }
_ZNK5Botan5SHA_113output_lengthEv:
   34|  45.9k|      size_t output_length() const override { return 20; }
_ZNK5Botan5SHA_115hash_block_sizeEv:
   36|    119|      size_t hash_block_size() const override { return block_bytes; }
_ZN5Botan5SHA_15clearEv:
   47|    119|      void clear() override { m_md.clear(); }

_ZNK5Botan7SHA_2564nameEv:
   73|     45|      std::string name() const override { return "SHA-256"; }
_ZNK5Botan7SHA_25613output_lengthEv:
   75|  94.3k|      size_t output_length() const override { return output_bytes; }
_ZNK5Botan7SHA_25615hash_block_sizeEv:
   77|  1.28k|      size_t hash_block_size() const override { return block_bytes; }
_ZN5Botan7SHA_2565clearEv:
   83|  2.43k|      void clear() override { m_md.clear(); }

_ZNK5Botan7SHA_3844nameEv:
   32|     87|      std::string name() const override { return "SHA-384"; }
_ZNK5Botan7SHA_38413output_lengthEv:
   34|  12.9k|      size_t output_length() const override { return output_bytes; }
_ZNK5Botan7SHA_38415hash_block_sizeEv:
   36|    439|      size_t hash_block_size() const override { return block_bytes; }
_ZN5Botan7SHA_3845clearEv:
   44|    761|      void clear() override { m_md.clear(); }

_ZN5Botan9SHA2_64_FEmmmRmmmmS0_m:
   64|  1.28M|   uint64_t A, uint64_t B, uint64_t C, uint64_t& D, uint64_t E, uint64_t F, uint64_t G, uint64_t& H, uint64_t M) {
   65|  1.28M|   H += rho<14, 18, 41>(E) + choose(E, F, G) + M;
   66|  1.28M|   D += H;
   67|  1.28M|   H += rho<28, 34, 39>(A) + majority(A, B, C);
   68|  1.28M|}

_ZN5Botan9SIMD_2x64C2Ev:
   53|   119k|            m_simd(_mm_setzero_si128())
   54|       |#elif defined(BOTAN_SIMD_USE_NEON)
   55|       |            m_simd(vdupq_n_u64(0))
   56|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
   57|       |            m_simd(wasm_u64x2_const_splat(0))
   58|       |#endif
   59|   119k|      {
   60|   119k|      }
_ZN5Botan9SIMD_2x647load_beEPKv:
  103|   119k|      static SIMD_2x64 BOTAN_FN_ISA_SIMD_2X64 load_be(const void* in) { return SIMD_2x64::load_le(in).bswap(); }
_ZNK5Botan9SIMD_2x645bswapEv:
  113|   119k|      SIMD_2x64 BOTAN_FN_ISA_SIMD_2X64 bswap() const {
  114|   119k|#if defined(BOTAN_SIMD_USE_SSSE3)
  115|   119k|         const auto idx = _mm_set_epi8(8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7);
  116|   119k|         return SIMD_2x64(_mm_shuffle_epi8(m_simd, idx));
  117|       |#elif defined(BOTAN_SIMD_USE_NEON)
  118|       |         return SIMD_2x64(vreinterpretq_u64_u8(vrev64q_u8(vreinterpretq_u8_u64(m_simd))));
  119|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  120|       |         return SIMD_2x64(wasm_i8x16_shuffle(m_simd, m_simd, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8));
  121|       |#endif
  122|   119k|      }
_ZN5Botan9SIMD_2x64C2EDv2_x:
  397|  4.67M|      explicit BOTAN_FN_ISA_SIMD_2X64 SIMD_2x64(native_simd_type x) : m_simd(x) {}
_ZNK5Botan9SIMD_2x64plERKS0_:
  165|  2.03M|      SIMD_2x64 BOTAN_FN_ISA_SIMD_2X64 operator+(const SIMD_2x64& other) const {
  166|  2.03M|         SIMD_2x64 retval(*this);
  167|  2.03M|         retval += other;
  168|  2.03M|         return retval;
  169|  2.03M|      }
_ZN5Botan9SIMD_2x64pLERKS0_:
  193|  2.03M|      void BOTAN_FN_ISA_SIMD_2X64 operator+=(const SIMD_2x64& other) {
  194|  2.03M|#if defined(BOTAN_SIMD_USE_SSSE3)
  195|  2.03M|         m_simd = _mm_add_epi64(m_simd, other.m_simd);
  196|       |#elif defined(BOTAN_SIMD_USE_NEON)
  197|       |         m_simd = vaddq_u64(m_simd, other.m_simd);
  198|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  199|       |         m_simd = wasm_i64x2_add(m_simd, other.m_simd);
  200|       |#endif
  201|  2.03M|      }
_ZN5Botan9SIMD_2x647load_leEPKv:
   93|   719k|      static SIMD_2x64 BOTAN_FN_ISA_SIMD_2X64 load_le(const void* in) {
   94|   719k|#if defined(BOTAN_SIMD_USE_SSSE3)
   95|   719k|         return SIMD_2x64(_mm_loadu_si128(reinterpret_cast<const __m128i*>(in)));
   96|       |#elif defined(BOTAN_SIMD_USE_NEON)
   97|       |         return SIMD_2x64(vreinterpretq_u64_u8(vld1q_u8(reinterpret_cast<const uint8_t*>(in))));
   98|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
   99|       |         return SIMD_2x64(wasm_v128_load(in));
  100|       |#endif
  101|   719k|      }
_ZNK5Botan9SIMD_2x648store_leEPm:
  145|   599k|      void BOTAN_FN_ISA_SIMD_2X64 store_le(uint64_t out[2]) const { this->store_le(reinterpret_cast<uint8_t*>(out)); }
_ZNK5Botan9SIMD_2x648store_leEPh:
  147|   599k|      void BOTAN_FN_ISA_SIMD_2X64 store_le(uint8_t out[]) const {
  148|   599k|#if defined(BOTAN_SIMD_USE_SSSE3)
  149|   599k|         _mm_storeu_si128(reinterpret_cast<__m128i*>(out), m_simd);
  150|       |#elif defined(BOTAN_SIMD_USE_NEON)
  151|       |         vst1q_u8(out, vreinterpretq_u8_u64(m_simd));
  152|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  153|       |         wasm_v128_store(out, m_simd);
  154|       |#endif
  155|   599k|      }
_ZN5Botan9SIMD_2x647alignr8ERKS0_S2_:
  312|   958k|      static SIMD_2x64 BOTAN_FN_ISA_SIMD_2X64 alignr8(const SIMD_2x64& a, const SIMD_2x64& b) {
  313|   958k|#if defined(BOTAN_SIMD_USE_SSSE3)
  314|   958k|         return SIMD_2x64(_mm_alignr_epi8(a.m_simd, b.m_simd, 8));
  315|       |#elif defined(BOTAN_SIMD_USE_NEON)
  316|       |         return SIMD_2x64(vextq_u64(b.m_simd, a.m_simd, 1));
  317|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  318|       |         return SIMD_2x64(
  319|       |            wasm_i8x16_shuffle(b.m_simd, a.m_simd, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23));
  320|       |#endif
  321|   958k|      }
_ZNK5Botan9SIMD_2x644rotrILm1EEES0_vQaagtT_Li0EltT_Li64E:
  228|   479k|      {
  229|   479k|#if defined(BOTAN_SIMD_USE_SSSE3)
  230|       |         if constexpr(ROT == 8) {
  231|       |            auto tab = _mm_setr_epi8(1, 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 14, 15, 8);
  232|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  233|       |         } else if constexpr(ROT == 16) {
  234|       |            auto tab = _mm_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9);
  235|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  236|       |         } else if constexpr(ROT == 24) {
  237|       |            auto tab = _mm_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10);
  238|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  239|       |         } else if constexpr(ROT == 32) {
  240|       |            auto tab = _mm_setr_epi8(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11);
  241|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  242|   479k|         } else {
  243|   479k|            return SIMD_2x64(_mm_or_si128(_mm_srli_epi64(m_simd, static_cast<int>(ROT)),
  244|   479k|                                          _mm_slli_epi64(m_simd, static_cast<int>(64 - ROT))));
  245|   479k|         }
  246|       |#elif defined(BOTAN_SIMD_USE_NEON)
  247|       |         return SIMD_2x64(vsriq_n_u64(vshlq_n_u64(m_simd, 64 - ROT), m_simd, ROT));
  248|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  249|       |         if constexpr(ROT == 8) {
  250|       |            return SIMD_2x64(wasm_i8x16_shuffle(m_simd, m_simd, 1, 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 14, 15, 8));
  251|       |         } else if constexpr(ROT == 16) {
  252|       |            return SIMD_2x64(wasm_i8x16_shuffle(m_simd, m_simd, 2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9));
  253|       |         } else if constexpr(ROT == 24) {
  254|       |            return SIMD_2x64(wasm_i8x16_shuffle(m_simd, m_simd, 3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10));
  255|       |         } else if constexpr(ROT == 32) {
  256|       |            return SIMD_2x64(wasm_i8x16_shuffle(m_simd, m_simd, 4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11));
  257|       |         } else {
  258|       |            return SIMD_2x64(wasm_v128_or(wasm_u64x2_shr(m_simd, ROT), wasm_i64x2_shl(m_simd, 64 - ROT)));
  259|       |         }
  260|       |#endif
  261|   479k|      }
_ZNK5Botan9SIMD_2x64eoERKS0_:
  171|  1.91M|      SIMD_2x64 BOTAN_FN_ISA_SIMD_2X64 operator^(const SIMD_2x64& other) const {
  172|  1.91M|         SIMD_2x64 retval(*this);
  173|  1.91M|         retval ^= other;
  174|  1.91M|         return retval;
  175|  1.91M|      }
_ZN5Botan9SIMD_2x64eOERKS0_:
  203|  1.91M|      void BOTAN_FN_ISA_SIMD_2X64 operator^=(const SIMD_2x64& other) {
  204|  1.91M|#if defined(BOTAN_SIMD_USE_SSSE3)
  205|  1.91M|         m_simd = _mm_xor_si128(m_simd, other.m_simd);
  206|       |#elif defined(BOTAN_SIMD_USE_NEON)
  207|       |         m_simd = veorq_u64(m_simd, other.m_simd);
  208|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  209|       |         m_simd = wasm_v128_xor(m_simd, other.m_simd);
  210|       |#endif
  211|  1.91M|      }
_ZNK5Botan9SIMD_2x644rotrILm8EEES0_vQaagtT_Li0EltT_Li64E:
  228|   479k|      {
  229|   479k|#if defined(BOTAN_SIMD_USE_SSSE3)
  230|   479k|         if constexpr(ROT == 8) {
  231|   479k|            auto tab = _mm_setr_epi8(1, 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 14, 15, 8);
  232|   479k|            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  233|       |         } else if constexpr(ROT == 16) {
  234|       |            auto tab = _mm_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9);
  235|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  236|       |         } else if constexpr(ROT == 24) {
  237|       |            auto tab = _mm_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10);
  238|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  239|       |         } else if constexpr(ROT == 32) {
  240|       |            auto tab = _mm_setr_epi8(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11);
  241|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  242|       |         } else {
  243|       |            return SIMD_2x64(_mm_or_si128(_mm_srli_epi64(m_simd, static_cast<int>(ROT)),
  244|       |                                          _mm_slli_epi64(m_simd, static_cast<int>(64 - ROT))));
  245|       |         }
  246|       |#elif defined(BOTAN_SIMD_USE_NEON)
  247|       |         return SIMD_2x64(vsriq_n_u64(vshlq_n_u64(m_simd, 64 - ROT), m_simd, ROT));
  248|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  249|       |         if constexpr(ROT == 8) {
  250|       |            return SIMD_2x64(wasm_i8x16_shuffle(m_simd, m_simd, 1, 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 14, 15, 8));
  251|       |         } else if constexpr(ROT == 16) {
  252|       |            return SIMD_2x64(wasm_i8x16_shuffle(m_simd, m_simd, 2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9));
  253|       |         } else if constexpr(ROT == 24) {
  254|       |            return SIMD_2x64(wasm_i8x16_shuffle(m_simd, m_simd, 3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10));
  255|       |         } else if constexpr(ROT == 32) {
  256|       |            return SIMD_2x64(wasm_i8x16_shuffle(m_simd, m_simd, 4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11));
  257|       |         } else {
  258|       |            return SIMD_2x64(wasm_v128_or(wasm_u64x2_shr(m_simd, ROT), wasm_i64x2_shl(m_simd, 64 - ROT)));
  259|       |         }
  260|       |#endif
  261|   479k|      }
_ZNK5Botan9SIMD_2x643shrILi7EEES0_v:
  291|   479k|      SIMD_2x64 BOTAN_FN_ISA_SIMD_2X64 shr() const noexcept {
  292|   479k|#if defined(BOTAN_SIMD_USE_SSSE3)
  293|   479k|         return SIMD_2x64(_mm_srli_epi64(m_simd, SHIFT));
  294|       |#elif defined(BOTAN_SIMD_USE_NEON)
  295|       |         return SIMD_2x64(vshrq_n_u64(m_simd, SHIFT));
  296|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  297|       |         return SIMD_2x64(wasm_u64x2_shr(m_simd, SHIFT));
  298|       |#endif
  299|   479k|      }
_ZNK5Botan9SIMD_2x644rotrILm19EEES0_vQaagtT_Li0EltT_Li64E:
  228|   479k|      {
  229|   479k|#if defined(BOTAN_SIMD_USE_SSSE3)
  230|       |         if constexpr(ROT == 8) {
  231|       |            auto tab = _mm_setr_epi8(1, 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 14, 15, 8);
  232|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  233|       |         } else if constexpr(ROT == 16) {
  234|       |            auto tab = _mm_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9);
  235|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  236|       |         } else if constexpr(ROT == 24) {
  237|       |            auto tab = _mm_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10);
  238|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  239|       |         } else if constexpr(ROT == 32) {
  240|       |            auto tab = _mm_setr_epi8(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11);
  241|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  242|   479k|         } else {
  243|   479k|            return SIMD_2x64(_mm_or_si128(_mm_srli_epi64(m_simd, static_cast<int>(ROT)),
  244|   479k|                                          _mm_slli_epi64(m_simd, static_cast<int>(64 - ROT))));
  245|   479k|         }
  246|       |#elif defined(BOTAN_SIMD_USE_NEON)
  247|       |         return SIMD_2x64(vsriq_n_u64(vshlq_n_u64(m_simd, 64 - ROT), m_simd, ROT));
  248|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  249|       |         if constexpr(ROT == 8) {
  250|       |            return SIMD_2x64(wasm_i8x16_shuffle(m_simd, m_simd, 1, 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 14, 15, 8));
  251|       |         } else if constexpr(ROT == 16) {
  252|       |            return SIMD_2x64(wasm_i8x16_shuffle(m_simd, m_simd, 2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9));
  253|       |         } else if constexpr(ROT == 24) {
  254|       |            return SIMD_2x64(wasm_i8x16_shuffle(m_simd, m_simd, 3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10));
  255|       |         } else if constexpr(ROT == 32) {
  256|       |            return SIMD_2x64(wasm_i8x16_shuffle(m_simd, m_simd, 4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11));
  257|       |         } else {
  258|       |            return SIMD_2x64(wasm_v128_or(wasm_u64x2_shr(m_simd, ROT), wasm_i64x2_shl(m_simd, 64 - ROT)));
  259|       |         }
  260|       |#endif
  261|   479k|      }
_ZNK5Botan9SIMD_2x644rotrILm61EEES0_vQaagtT_Li0EltT_Li64E:
  228|   479k|      {
  229|   479k|#if defined(BOTAN_SIMD_USE_SSSE3)
  230|       |         if constexpr(ROT == 8) {
  231|       |            auto tab = _mm_setr_epi8(1, 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 14, 15, 8);
  232|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  233|       |         } else if constexpr(ROT == 16) {
  234|       |            auto tab = _mm_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9);
  235|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  236|       |         } else if constexpr(ROT == 24) {
  237|       |            auto tab = _mm_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10);
  238|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  239|       |         } else if constexpr(ROT == 32) {
  240|       |            auto tab = _mm_setr_epi8(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11);
  241|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  242|   479k|         } else {
  243|   479k|            return SIMD_2x64(_mm_or_si128(_mm_srli_epi64(m_simd, static_cast<int>(ROT)),
  244|   479k|                                          _mm_slli_epi64(m_simd, static_cast<int>(64 - ROT))));
  245|   479k|         }
  246|       |#elif defined(BOTAN_SIMD_USE_NEON)
  247|       |         return SIMD_2x64(vsriq_n_u64(vshlq_n_u64(m_simd, 64 - ROT), m_simd, ROT));
  248|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  249|       |         if constexpr(ROT == 8) {
  250|       |            return SIMD_2x64(wasm_i8x16_shuffle(m_simd, m_simd, 1, 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 14, 15, 8));
  251|       |         } else if constexpr(ROT == 16) {
  252|       |            return SIMD_2x64(wasm_i8x16_shuffle(m_simd, m_simd, 2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9));
  253|       |         } else if constexpr(ROT == 24) {
  254|       |            return SIMD_2x64(wasm_i8x16_shuffle(m_simd, m_simd, 3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10));
  255|       |         } else if constexpr(ROT == 32) {
  256|       |            return SIMD_2x64(wasm_i8x16_shuffle(m_simd, m_simd, 4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11));
  257|       |         } else {
  258|       |            return SIMD_2x64(wasm_v128_or(wasm_u64x2_shr(m_simd, ROT), wasm_i64x2_shl(m_simd, 64 - ROT)));
  259|       |         }
  260|       |#endif
  261|   479k|      }
_ZNK5Botan9SIMD_2x643shrILi6EEES0_v:
  291|   479k|      SIMD_2x64 BOTAN_FN_ISA_SIMD_2X64 shr() const noexcept {
  292|   479k|#if defined(BOTAN_SIMD_USE_SSSE3)
  293|   479k|         return SIMD_2x64(_mm_srli_epi64(m_simd, SHIFT));
  294|       |#elif defined(BOTAN_SIMD_USE_NEON)
  295|       |         return SIMD_2x64(vshrq_n_u64(m_simd, SHIFT));
  296|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  297|       |         return SIMD_2x64(wasm_u64x2_shr(m_simd, SHIFT));
  298|       |#endif
  299|   479k|      }

_ZN5Botan9SIMD_4x32C2Ev:
   86|  4.71k|      BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32() noexcept {
   87|  4.71k|#if defined(BOTAN_SIMD_USE_SSSE3)
   88|  4.71k|         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|  4.71k|      }
_ZN5Botan9SIMD_4x3212byte_shuffleERKS0_S2_:
  835|   807k|      static inline SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 byte_shuffle(const SIMD_4x32& tbl, const SIMD_4x32& idx) {
  836|   807k|#if defined(BOTAN_SIMD_USE_SSSE3)
  837|   807k|         return SIMD_4x32(_mm_shuffle_epi8(tbl.raw(), idx.raw()));
  838|       |#elif defined(BOTAN_SIMD_USE_NEON)
  839|       |         const uint8x16_t tbl8 = vreinterpretq_u8_u32(tbl.raw());
  840|       |         const uint8x16_t idx8 = vreinterpretq_u8_u32(idx.raw());
  841|       |
  842|       |   #if defined(BOTAN_TARGET_ARCH_IS_ARM32)
  843|       |         const uint8x8x2_t tbl2 = {vget_low_u8(tbl8), vget_high_u8(tbl8)};
  844|       |
  845|       |         return SIMD_4x32(
  846|       |            vreinterpretq_u32_u8(vcombine_u8(vtbl2_u8(tbl2, vget_low_u8(idx8)), vtbl2_u8(tbl2, vget_high_u8(idx8)))));
  847|       |   #else
  848|       |         return SIMD_4x32(vreinterpretq_u32_u8(vqtbl1q_u8(tbl8, idx8)));
  849|       |   #endif
  850|       |
  851|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  852|       |         const auto r = vec_perm(reinterpret_cast<__vector signed char>(tbl.raw()),
  853|       |                                 reinterpret_cast<__vector signed char>(tbl.raw()),
  854|       |                                 reinterpret_cast<__vector unsigned char>(idx.raw()));
  855|       |         return SIMD_4x32(reinterpret_cast<__vector unsigned int>(r));
  856|       |#elif defined(BOTAN_SIMD_USE_LSX)
  857|       |         return SIMD_4x32(__lsx_vshuf_b(tbl.raw(), tbl.raw(), idx.raw()));
  858|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  859|       |         return SIMD_4x32(wasm_i8x16_swizzle(tbl.raw(), idx.raw()));
  860|       |#endif
  861|   807k|      }
_ZNK5Botan9SIMD_4x323rawEv:
 1006|  49.9M|      native_simd_type BOTAN_FN_ISA_SIMD_4X32 raw() const noexcept { return m_simd; }
_ZN5Botan9SIMD_4x32C2EDv2_x:
 1008|  29.1M|      explicit BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32(native_simd_type x) noexcept : m_simd(x) {}
_ZN5Botan9SIMD_4x327load_leEPKv:
  171|  4.00M|      static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 load_le(const void* in) noexcept {
  172|  4.00M|#if defined(BOTAN_SIMD_USE_SSSE3)
  173|  4.00M|         return SIMD_4x32(_mm_loadu_si128(reinterpret_cast<const __m128i*>(in)));
  174|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  175|       |         uint32_t R0 = Botan::load_le<uint32_t>(reinterpret_cast<const uint8_t*>(in), 0);
  176|       |         uint32_t R1 = Botan::load_le<uint32_t>(reinterpret_cast<const uint8_t*>(in), 1);
  177|       |         uint32_t R2 = Botan::load_le<uint32_t>(reinterpret_cast<const uint8_t*>(in), 2);
  178|       |         uint32_t R3 = Botan::load_le<uint32_t>(reinterpret_cast<const uint8_t*>(in), 3);
  179|       |         __vector unsigned int val = {R0, R1, R2, R3};
  180|       |         return SIMD_4x32(val);
  181|       |#elif defined(BOTAN_SIMD_USE_NEON)
  182|       |         SIMD_4x32 l(vld1q_u32(static_cast<const uint32_t*>(in)));
  183|       |         if constexpr(std::endian::native == std::endian::big) {
  184|       |            return l.bswap();
  185|       |         } else {
  186|       |            return l;
  187|       |         }
  188|       |#elif defined(BOTAN_SIMD_USE_LSX)
  189|       |         return SIMD_4x32(__lsx_vld(in, 0));
  190|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  191|       |         return SIMD_4x32(wasm_v128_load(in));
  192|       |#endif
  193|  4.00M|      }
_ZN5Botan9SIMD_4x32C2Ejjjj:
  103|  1.05M|      BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32(uint32_t B0, uint32_t B1, uint32_t B2, uint32_t B3) noexcept {
  104|  1.05M|#if defined(BOTAN_SIMD_USE_SSSE3)
  105|  1.05M|         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|  1.05M|      }
_ZN5Botan9SIMD_4x3210byte_blendERKS0_S2_S2_:
  805|   143k|                                                                const SIMD_4x32& b) noexcept {
  806|       |         // TODO(SSE4.1) could use _mm_blendv_epi8 here
  807|   143k|         return SIMD_4x32::choose(mask, a, b);
  808|   143k|      }
_ZN5Botan9SIMD_4x326chooseERKS0_S2_S2_:
  782|   143k|                                                            const SIMD_4x32& b) noexcept {
  783|       |#if defined(BOTAN_SIMD_USE_ALTIVEC)
  784|       |         return SIMD_4x32(vec_sel(b.raw(), a.raw(), mask.raw()));
  785|       |#elif defined(BOTAN_SIMD_USE_NEON)
  786|       |         return SIMD_4x32(vbslq_u32(mask.raw(), a.raw(), b.raw()));
  787|       |#elif defined(BOTAN_SIMD_USE_LSX)
  788|       |         return SIMD_4x32(__lsx_vbitsel_v(b.raw(), a.raw(), mask.raw()));
  789|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  790|       |         return SIMD_4x32(wasm_v128_bitselect(a.raw(), b.raw(), mask.raw()));
  791|       |#else
  792|   143k|         return (mask & a) ^ mask.andc(b);
  793|   143k|#endif
  794|   143k|      }
_ZNK5Botan9SIMD_4x32anERKS0_:
  431|   589k|      SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 operator&(const SIMD_4x32& other) const noexcept {
  432|   589k|         SIMD_4x32 retval(*this);
  433|   589k|         retval &= other;
  434|   589k|         return retval;
  435|   589k|      }
_ZN5Botan9SIMD_4x32aNERKS0_:
  495|   589k|      void BOTAN_FN_ISA_SIMD_4X32 operator&=(const SIMD_4x32& other) noexcept {
  496|   589k|#if defined(BOTAN_SIMD_USE_SSSE3)
  497|   589k|         m_simd = _mm_and_si128(m_simd, other.m_simd);
  498|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  499|       |         m_simd = vec_and(m_simd, other.m_simd);
  500|       |#elif defined(BOTAN_SIMD_USE_NEON)
  501|       |         m_simd = vandq_u32(m_simd, other.m_simd);
  502|       |#elif defined(BOTAN_SIMD_USE_LSX)
  503|       |         m_simd = __lsx_vand_v(m_simd, other.m_simd);
  504|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  505|       |         m_simd = wasm_v128_and(m_simd, other.m_simd);
  506|       |#endif
  507|   589k|      }
_ZNK5Botan9SIMD_4x32eoERKS0_:
  413|   675k|      SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 operator^(const SIMD_4x32& other) const noexcept {
  414|   675k|         SIMD_4x32 retval(*this);
  415|   675k|         retval ^= other;
  416|   675k|         return retval;
  417|   675k|      }
_ZNK5Botan9SIMD_4x324andcERKS0_:
  562|   143k|      SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 andc(const SIMD_4x32& other) const noexcept {
  563|   143k|#if defined(BOTAN_SIMD_USE_SSSE3)
  564|   143k|         return SIMD_4x32(_mm_andnot_si128(m_simd, other.m_simd));
  565|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  566|       |         /*
  567|       |         AltiVec does arg1 & ~arg2 rather than SSE's ~arg1 & arg2
  568|       |         so swap the arguments
  569|       |         */
  570|       |         return SIMD_4x32(vec_andc(other.m_simd, m_simd));
  571|       |#elif defined(BOTAN_SIMD_USE_NEON)
  572|       |         // NEON is also a & ~b
  573|       |         return SIMD_4x32(vbicq_u32(other.m_simd, m_simd));
  574|       |#elif defined(BOTAN_SIMD_USE_LSX)
  575|       |         // LSX is ~a & b
  576|       |         return SIMD_4x32(__lsx_vandn_v(m_simd, other.m_simd));
  577|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  578|       |         // SIMD128 is a & ~b
  579|       |         return SIMD_4x32(wasm_v128_andnot(other.m_simd, m_simd));
  580|       |#endif
  581|   143k|      }
_ZNK5Botan9SIMD_4x3211swap_halvesEv:
  966|  11.6k|      inline SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 swap_halves() const {
  967|  11.6k|#if defined(BOTAN_SIMD_USE_SSSE3)
  968|  11.6k|         return SIMD_4x32(_mm_shuffle_epi32(raw(), 0b01001110));
  969|       |#else
  970|       |         return SIMD_4x32::alignr8(*this, *this);
  971|       |#endif
  972|  11.6k|      }
_ZN5Botan9SIMD_4x32eOERKS0_:
  465|  2.42M|      void BOTAN_FN_ISA_SIMD_4X32 operator^=(const SIMD_4x32& other) noexcept {
  466|  2.42M|#if defined(BOTAN_SIMD_USE_SSSE3)
  467|  2.42M|         m_simd = _mm_xor_si128(m_simd, other.m_simd);
  468|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  469|       |         m_simd = vec_xor(m_simd, other.m_simd);
  470|       |#elif defined(BOTAN_SIMD_USE_NEON)
  471|       |         m_simd = veorq_u32(m_simd, other.m_simd);
  472|       |#elif defined(BOTAN_SIMD_USE_LSX)
  473|       |         m_simd = __lsx_vxor_v(m_simd, other.m_simd);
  474|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  475|       |         m_simd = wasm_v128_xor(m_simd, other.m_simd);
  476|       |#endif
  477|  2.42M|      }
_ZN5Botan9SIMD_4x328splat_u8Eh:
  144|   217k|      static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 splat_u8(uint8_t B) noexcept {
  145|   217k|#if defined(BOTAN_SIMD_USE_SSSE3)
  146|   217k|         return SIMD_4x32(_mm_set1_epi8(B));
  147|       |#elif defined(BOTAN_SIMD_USE_NEON)
  148|       |         /*
  149|       |         * Do not use vdupq_n_u8 here. MSVC ARM64 (VS 17.13 through at least
  150|       |         * VS 18.6) can fold vand(vdupq_n_u8(k), vdupq_n_u32(x)) into a scalar
  151|       |         * and+dup which wrongly uses the 8-bit k as the 32-bit immediate,
  152|       |         * computing dup(x & k) instead of dup(x) & splat_u8(k). This
  153|       |         * miscompiled the SM4 key schedule. Broadcasting an explicitly
  154|       |         * replicated 32-bit value avoids the bad fold; GCC and Clang generate
  155|       |         * identical code either way.
  156|       |         */
  157|       |         return SIMD_4x32(vdupq_n_u32(static_cast<uint32_t>(B) * 0x01010101U));
  158|       |#elif defined(BOTAN_SIMD_USE_LSX)
  159|       |         return SIMD_4x32(__lsx_vreplgr2vr_b(B));
  160|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  161|       |         return SIMD_4x32(wasm_u8x16_splat(B));
  162|       |#else
  163|       |         const uint32_t B4 = make_uint32(B, B, B, B);
  164|       |         return SIMD_4x32(B4, B4, B4, B4);
  165|       |#endif
  166|   217k|      }
_ZNK5Botan9SIMD_4x323shrILi4EEES0_v:
  530|   217k|      SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 shr() const noexcept {
  531|   217k|#if defined(BOTAN_SIMD_USE_SSSE3)
  532|   217k|         return SIMD_4x32(_mm_srli_epi32(m_simd, SHIFT));
  533|       |
  534|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  535|       |         const unsigned int s = static_cast<unsigned int>(SHIFT);
  536|       |         const __vector unsigned int shifts = {s, s, s, s};
  537|       |         return SIMD_4x32(vec_sr(m_simd, shifts));
  538|       |#elif defined(BOTAN_SIMD_USE_NEON)
  539|       |         return SIMD_4x32(vshrq_n_u32(m_simd, SHIFT));
  540|       |#elif defined(BOTAN_SIMD_USE_LSX)
  541|       |         return SIMD_4x32(__lsx_vsrli_w(m_simd, SHIFT));
  542|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  543|       |         return SIMD_4x32(wasm_u32x4_shr(m_simd, SHIFT));
  544|       |#endif
  545|   217k|      }
_ZN5Botan9SIMD_4x325splatEj:
  127|  36.9k|      static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 splat(uint32_t B) noexcept {
  128|  36.9k|#if defined(BOTAN_SIMD_USE_SSSE3)
  129|  36.9k|         return SIMD_4x32(_mm_set1_epi32(B));
  130|       |#elif defined(BOTAN_SIMD_USE_NEON)
  131|       |         return SIMD_4x32(vdupq_n_u32(B));
  132|       |#elif defined(BOTAN_SIMD_USE_LSX)
  133|       |         return SIMD_4x32(__lsx_vreplgr2vr_w(B));
  134|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  135|       |         return SIMD_4x32(wasm_u32x4_splat(B));
  136|       |#else
  137|       |         return SIMD_4x32(B, B, B, B);
  138|       |#endif
  139|  36.9k|      }
_ZNK5Botan9SIMD_4x324rotlILm1EEES0_vQaagtT_Li0EltT_Li32E:
  340|  10.0k|      {
  341|  10.0k|#if defined(BOTAN_SIMD_USE_SSSE3)
  342|       |         if constexpr(ROT == 8) {
  343|       |            const auto shuf_rotl_8 = _mm_set_epi64x(0x0e0d0c0f0a09080b, 0x0605040702010003);
  344|       |            return SIMD_4x32(_mm_shuffle_epi8(raw(), shuf_rotl_8));
  345|       |         } else if constexpr(ROT == 16) {
  346|       |            const auto shuf_rotl_16 = _mm_set_epi64x(0x0d0c0f0e09080b0a, 0x0504070601000302);
  347|       |            return SIMD_4x32(_mm_shuffle_epi8(raw(), shuf_rotl_16));
  348|       |         } else if constexpr(ROT == 24) {
  349|       |            const auto shuf_rotl_24 = _mm_set_epi64x(0x0c0f0e0d080b0a09, 0x0407060500030201);
  350|       |            return SIMD_4x32(_mm_shuffle_epi8(raw(), shuf_rotl_24));
  351|  10.0k|         } else {
  352|  10.0k|            return SIMD_4x32(_mm_xor_si128(_mm_slli_epi32(raw(), static_cast<int>(ROT)),
  353|  10.0k|                                           _mm_srli_epi32(raw(), static_cast<int>(32 - ROT))));
  354|  10.0k|         }
  355|       |
  356|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  357|       |
  358|       |         const unsigned int r = static_cast<unsigned int>(ROT);
  359|       |         __vector unsigned int rot = {r, r, r, r};
  360|       |         return SIMD_4x32(vec_rl(m_simd, rot));
  361|       |
  362|       |#elif defined(BOTAN_SIMD_USE_NEON) && defined(BOTAN_TARGET_ARCH_IS_ARM64)
  363|       |
  364|       |         if constexpr(ROT == 8) {
  365|       |            const uint8_t maskb[16] = {3, 0, 1, 2, 7, 4, 5, 6, 11, 8, 9, 10, 15, 12, 13, 14};
  366|       |            const uint8x16_t mask = vld1q_u8(maskb);
  367|       |            return SIMD_4x32(vreinterpretq_u32_u8(vqtbl1q_u8(vreinterpretq_u8_u32(m_simd), mask)));
  368|       |         } else if constexpr(ROT == 16) {
  369|       |            return SIMD_4x32(vreinterpretq_u32_u16(vrev32q_u16(vreinterpretq_u16_u32(m_simd))));
  370|       |         } else {
  371|       |            return SIMD_4x32(
  372|       |               vorrq_u32(vshlq_n_u32(m_simd, static_cast<int>(ROT)), vshrq_n_u32(m_simd, static_cast<int>(32 - ROT))));
  373|       |         }
  374|       |#elif defined(BOTAN_SIMD_USE_NEON)
  375|       |         return SIMD_4x32(
  376|       |            vorrq_u32(vshlq_n_u32(m_simd, static_cast<int>(ROT)), vshrq_n_u32(m_simd, static_cast<int>(32 - ROT))));
  377|       |#elif defined(BOTAN_SIMD_USE_LSX)
  378|       |         return SIMD_4x32(__lsx_vrotri_w(raw(), 32 - ROT));
  379|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  380|       |         return SIMD_4x32(wasm_v128_or(wasm_i32x4_shl(m_simd, ROT), wasm_u32x4_shr(m_simd, 32 - ROT)));
  381|       |#endif
  382|  10.0k|      }
_ZNK5Botan9SIMD_4x32orERKS0_:
  422|  10.2k|      SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 operator|(const SIMD_4x32& other) const noexcept {
  423|  10.2k|         SIMD_4x32 retval(*this);
  424|  10.2k|         retval |= other;
  425|  10.2k|         return retval;
  426|  10.2k|      }
_ZN5Botan9SIMD_4x32oRERKS0_:
  481|  10.2k|      void BOTAN_FN_ISA_SIMD_4X32 operator|=(const SIMD_4x32& other) noexcept {
  482|  10.2k|#if defined(BOTAN_SIMD_USE_SSSE3)
  483|  10.2k|         m_simd = _mm_or_si128(m_simd, other.m_simd);
  484|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  485|       |         m_simd = vec_or(m_simd, other.m_simd);
  486|       |#elif defined(BOTAN_SIMD_USE_NEON)
  487|       |         m_simd = vorrq_u32(m_simd, other.m_simd);
  488|       |#elif defined(BOTAN_SIMD_USE_LSX)
  489|       |         m_simd = __lsx_vor_v(m_simd, other.m_simd);
  490|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  491|       |         m_simd = wasm_v128_or(m_simd, other.m_simd);
  492|       |#endif
  493|  10.2k|      }
_ZNK5Botan9SIMD_4x328store_leEPh:
  243|   319k|      void BOTAN_FN_ISA_SIMD_4X32 store_le(uint8_t out[]) const noexcept {
  244|   319k|#if defined(BOTAN_SIMD_USE_SSSE3)
  245|       |
  246|   319k|         _mm_storeu_si128(reinterpret_cast<__m128i*>(out), raw());
  247|       |
  248|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  249|       |
  250|       |         union {
  251|       |               __vector unsigned int V;
  252|       |               uint32_t R[4];
  253|       |         } vec{};
  254|       |
  255|       |         // NOLINTNEXTLINE(*-union-access)
  256|       |         vec.V = raw();
  257|       |         // NOLINTNEXTLINE(*-union-access)
  258|       |         Botan::store_le(out, vec.R[0], vec.R[1], vec.R[2], vec.R[3]);
  259|       |
  260|       |#elif defined(BOTAN_SIMD_USE_NEON)
  261|       |         if constexpr(std::endian::native == std::endian::little) {
  262|       |            vst1q_u8(out, vreinterpretq_u8_u32(m_simd));
  263|       |         } else {
  264|       |            vst1q_u8(out, vreinterpretq_u8_u32(bswap().m_simd));
  265|       |         }
  266|       |#elif defined(BOTAN_SIMD_USE_LSX)
  267|       |         __lsx_vst(raw(), out, 0);
  268|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  269|       |         wasm_v128_store(out, m_simd);
  270|       |#endif
  271|   319k|      }
_ZN5Botan9SIMD_4x327load_beEPKv:
  198|  1.02M|      static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 load_be(const void* in) noexcept {
  199|  1.02M|#if defined(BOTAN_SIMD_USE_SSSE3) || defined(BOTAN_SIMD_USE_LSX) || defined(BOTAN_SIMD_USE_SIMD128)
  200|  1.02M|         return load_le(in).bswap();
  201|       |
  202|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  203|       |         uint32_t R0 = Botan::load_be<uint32_t>(reinterpret_cast<const uint8_t*>(in), 0);
  204|       |         uint32_t R1 = Botan::load_be<uint32_t>(reinterpret_cast<const uint8_t*>(in), 1);
  205|       |         uint32_t R2 = Botan::load_be<uint32_t>(reinterpret_cast<const uint8_t*>(in), 2);
  206|       |         uint32_t R3 = Botan::load_be<uint32_t>(reinterpret_cast<const uint8_t*>(in), 3);
  207|       |         __vector unsigned int val = {R0, R1, R2, R3};
  208|       |         return SIMD_4x32(val);
  209|       |
  210|       |#elif defined(BOTAN_SIMD_USE_NEON)
  211|       |         SIMD_4x32 l(vld1q_u32(static_cast<const uint32_t*>(in)));
  212|       |         if constexpr(std::endian::native == std::endian::little) {
  213|       |            return l.bswap();
  214|       |         } else {
  215|       |            return l;
  216|       |         }
  217|       |#endif
  218|  1.02M|      }
_ZNK5Botan9SIMD_4x328store_leEPj:
  228|   296k|      void BOTAN_FN_ISA_SIMD_4X32 store_le(uint32_t out[4]) const noexcept {
  229|   296k|         this->store_le(reinterpret_cast<uint8_t*>(out));
  230|   296k|      }
_ZNK5Botan9SIMD_4x328store_leEPm:
  236|    780|      void BOTAN_FN_ISA_SIMD_4X32 store_le(uint64_t out[2]) const noexcept {
  237|    780|         this->store_le(reinterpret_cast<uint8_t*>(out));
  238|    780|      }
_ZNK5Botan9SIMD_4x328store_beEPh:
  276|  1.08k|      BOTAN_FN_ISA_SIMD_4X32 void store_be(uint8_t out[]) const noexcept {
  277|  1.08k|#if defined(BOTAN_SIMD_USE_SSSE3) || defined(BOTAN_SIMD_USE_LSX) || defined(BOTAN_SIMD_USE_SIMD128)
  278|       |
  279|  1.08k|         bswap().store_le(out);
  280|       |
  281|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  282|       |
  283|       |         union {
  284|       |               __vector unsigned int V;
  285|       |               uint32_t R[4];
  286|       |         } vec{};
  287|       |
  288|       |         // NOLINTNEXTLINE(*-union-access)
  289|       |         vec.V = m_simd;
  290|       |         // NOLINTNEXTLINE(*-union-access)
  291|       |         Botan::store_be(out, vec.R[0], vec.R[1], vec.R[2], vec.R[3]);
  292|       |
  293|       |#elif defined(BOTAN_SIMD_USE_NEON)
  294|       |         if constexpr(std::endian::native == std::endian::little) {
  295|       |            vst1q_u8(out, vreinterpretq_u8_u32(bswap().m_simd));
  296|       |         } else {
  297|       |            vst1q_u8(out, vreinterpretq_u8_u32(m_simd));
  298|       |         }
  299|       |#endif
  300|  1.08k|      }
_ZNK5Botan9SIMD_4x32plERKS0_:
  395|  2.69M|      SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 operator+(const SIMD_4x32& other) const noexcept {
  396|  2.69M|         SIMD_4x32 retval(*this);
  397|  2.69M|         retval += other;
  398|  2.69M|         return retval;
  399|  2.69M|      }
_ZN5Botan9SIMD_4x32pLERKS0_:
  437|  5.06M|      void BOTAN_FN_ISA_SIMD_4X32 operator+=(const SIMD_4x32& other) noexcept {
  438|  5.06M|#if defined(BOTAN_SIMD_USE_SSSE3)
  439|  5.06M|         m_simd = _mm_add_epi32(m_simd, other.m_simd);
  440|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  441|       |         m_simd = vec_add(m_simd, other.m_simd);
  442|       |#elif defined(BOTAN_SIMD_USE_NEON)
  443|       |         m_simd = vaddq_u32(m_simd, other.m_simd);
  444|       |#elif defined(BOTAN_SIMD_USE_LSX)
  445|       |         m_simd = __lsx_vadd_w(m_simd, other.m_simd);
  446|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  447|       |         m_simd = wasm_i32x4_add(m_simd, other.m_simd);
  448|       |#endif
  449|  5.06M|      }
_ZNK5Botan9SIMD_4x325bswapEv:
  586|  1.02M|      BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32 bswap() const noexcept {
  587|  1.02M|#if defined(BOTAN_SIMD_USE_SSSE3)
  588|  1.02M|         const auto idx = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10, 11, 4, 5, 6, 7, 0, 1, 2, 3);
  589|       |
  590|  1.02M|         return SIMD_4x32(_mm_shuffle_epi8(raw(), idx));
  591|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  592|       |   #ifdef BOTAN_SIMD_USE_VSX
  593|       |         return SIMD_4x32(vec_revb(m_simd));
  594|       |   #else
  595|       |         const __vector unsigned char rev[1] = {
  596|       |            {3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12},
  597|       |         };
  598|       |
  599|       |         return SIMD_4x32(vec_perm(m_simd, m_simd, rev[0]));
  600|       |   #endif
  601|       |
  602|       |#elif defined(BOTAN_SIMD_USE_NEON)
  603|       |         return SIMD_4x32(vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(m_simd))));
  604|       |#elif defined(BOTAN_SIMD_USE_LSX)
  605|       |         return SIMD_4x32(__lsx_vshuf4i_b(m_simd, 0b00011011));
  606|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  607|       |         return SIMD_4x32(wasm_i8x16_shuffle(m_simd, m_simd, 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12));
  608|       |#endif
  609|  1.02M|      }
_ZN5Botan9SIMD_4x329transposeERS0_S1_S1_S1_:
  694|  8.38k|                                                   SIMD_4x32& B3) noexcept {
  695|  8.38k|#if defined(BOTAN_SIMD_USE_SSSE3)
  696|  8.38k|         const __m128i T0 = _mm_unpacklo_epi32(B0.m_simd, B1.m_simd);
  697|  8.38k|         const __m128i T1 = _mm_unpacklo_epi32(B2.m_simd, B3.m_simd);
  698|  8.38k|         const __m128i T2 = _mm_unpackhi_epi32(B0.m_simd, B1.m_simd);
  699|  8.38k|         const __m128i T3 = _mm_unpackhi_epi32(B2.m_simd, B3.m_simd);
  700|       |
  701|  8.38k|         B0.m_simd = _mm_unpacklo_epi64(T0, T1);
  702|  8.38k|         B1.m_simd = _mm_unpackhi_epi64(T0, T1);
  703|  8.38k|         B2.m_simd = _mm_unpacklo_epi64(T2, T3);
  704|  8.38k|         B3.m_simd = _mm_unpackhi_epi64(T2, T3);
  705|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  706|       |         const __vector unsigned int T0 = vec_mergeh(B0.m_simd, B2.m_simd);
  707|       |         const __vector unsigned int T1 = vec_mergeh(B1.m_simd, B3.m_simd);
  708|       |         const __vector unsigned int T2 = vec_mergel(B0.m_simd, B2.m_simd);
  709|       |         const __vector unsigned int T3 = vec_mergel(B1.m_simd, B3.m_simd);
  710|       |
  711|       |         B0.m_simd = vec_mergeh(T0, T1);
  712|       |         B1.m_simd = vec_mergel(T0, T1);
  713|       |         B2.m_simd = vec_mergeh(T2, T3);
  714|       |         B3.m_simd = vec_mergel(T2, T3);
  715|       |
  716|       |#elif defined(BOTAN_SIMD_USE_NEON) && defined(BOTAN_TARGET_ARCH_IS_ARM32)
  717|       |         const uint32x4x2_t T0 = vzipq_u32(B0.m_simd, B2.m_simd);
  718|       |         const uint32x4x2_t T1 = vzipq_u32(B1.m_simd, B3.m_simd);
  719|       |         const uint32x4x2_t O0 = vzipq_u32(T0.val[0], T1.val[0]);
  720|       |         const uint32x4x2_t O1 = vzipq_u32(T0.val[1], T1.val[1]);
  721|       |
  722|       |         B0.m_simd = O0.val[0];
  723|       |         B1.m_simd = O0.val[1];
  724|       |         B2.m_simd = O1.val[0];
  725|       |         B3.m_simd = O1.val[1];
  726|       |
  727|       |#elif defined(BOTAN_SIMD_USE_NEON) && defined(BOTAN_TARGET_ARCH_IS_ARM64)
  728|       |         const uint32x4_t T0 = vzip1q_u32(B0.m_simd, B2.m_simd);
  729|       |         const uint32x4_t T2 = vzip2q_u32(B0.m_simd, B2.m_simd);
  730|       |         const uint32x4_t T1 = vzip1q_u32(B1.m_simd, B3.m_simd);
  731|       |         const uint32x4_t T3 = vzip2q_u32(B1.m_simd, B3.m_simd);
  732|       |
  733|       |         B0.m_simd = vzip1q_u32(T0, T1);
  734|       |         B1.m_simd = vzip2q_u32(T0, T1);
  735|       |         B2.m_simd = vzip1q_u32(T2, T3);
  736|       |         B3.m_simd = vzip2q_u32(T2, T3);
  737|       |#elif defined(BOTAN_SIMD_USE_LSX)
  738|       |         const __m128i T0 = __lsx_vilvl_w(B2.raw(), B0.raw());
  739|       |         const __m128i T1 = __lsx_vilvh_w(B2.raw(), B0.raw());
  740|       |         const __m128i T2 = __lsx_vilvl_w(B3.raw(), B1.raw());
  741|       |         const __m128i T3 = __lsx_vilvh_w(B3.raw(), B1.raw());
  742|       |         B0.m_simd = __lsx_vilvl_w(T2, T0);
  743|       |         B1.m_simd = __lsx_vilvh_w(T2, T0);
  744|       |         B2.m_simd = __lsx_vilvl_w(T3, T1);
  745|       |         B3.m_simd = __lsx_vilvh_w(T3, T1);
  746|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  747|       |         const auto T0 = wasm_i32x4_shuffle(B0.m_simd, B2.m_simd, 0, 4, 1, 5);
  748|       |         const auto T2 = wasm_i32x4_shuffle(B0.m_simd, B2.m_simd, 2, 6, 3, 7);
  749|       |         const auto T1 = wasm_i32x4_shuffle(B1.m_simd, B3.m_simd, 0, 4, 1, 5);
  750|       |         const auto T3 = wasm_i32x4_shuffle(B1.m_simd, B3.m_simd, 2, 6, 3, 7);
  751|       |
  752|       |         B0.m_simd = wasm_i32x4_shuffle(T0, T1, 0, 4, 1, 5);
  753|       |         B1.m_simd = wasm_i32x4_shuffle(T0, T1, 2, 6, 3, 7);
  754|       |         B2.m_simd = wasm_i32x4_shuffle(T2, T3, 0, 4, 1, 5);
  755|       |         B3.m_simd = wasm_i32x4_shuffle(T2, T3, 2, 6, 3, 7);
  756|       |#endif
  757|  8.38k|      }
_ZN5Botan9SIMD_4x327alignr4ERKS0_S2_:
  901|  1.95M|      static inline SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 alignr4(const SIMD_4x32& a, const SIMD_4x32& b) {
  902|  1.95M|#if defined(BOTAN_SIMD_USE_SSSE3)
  903|  1.95M|         return SIMD_4x32(_mm_alignr_epi8(a.raw(), b.raw(), 4));
  904|       |#elif defined(BOTAN_SIMD_USE_NEON)
  905|       |         return SIMD_4x32(vextq_u32(b.raw(), a.raw(), 1));
  906|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  907|       |         const __vector unsigned char mask = {4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
  908|       |         return SIMD_4x32(vec_perm(b.raw(), a.raw(), mask));
  909|       |#elif defined(BOTAN_SIMD_USE_LSX)
  910|       |         const auto mask = SIMD_4x32(0x07060504, 0x0B0A0908, 0x0F0E0D0C, 0x13121110);
  911|       |         return SIMD_4x32(__lsx_vshuf_b(a.raw(), b.raw(), mask.raw()));
  912|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  913|       |         return SIMD_4x32(
  914|       |            wasm_i8x16_shuffle(b.raw(), a.raw(), 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19));
  915|       |#endif
  916|  1.95M|      }
_ZN5Botan9SIMD_4x327alignr8ERKS0_S2_:
  918|   235k|      static inline SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 alignr8(const SIMD_4x32& a, const SIMD_4x32& b) {
  919|   235k|#if defined(BOTAN_SIMD_USE_SSSE3)
  920|   235k|         return SIMD_4x32(_mm_alignr_epi8(a.raw(), b.raw(), 8));
  921|       |#elif defined(BOTAN_SIMD_USE_NEON)
  922|       |         return SIMD_4x32(vextq_u32(b.raw(), a.raw(), 2));
  923|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  924|       |         const __vector unsigned char mask = {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23};
  925|       |         return SIMD_4x32(vec_perm(b.raw(), a.raw(), mask));
  926|       |#elif defined(BOTAN_SIMD_USE_LSX)
  927|       |         return SIMD_4x32(__lsx_vshuf4i_d(a.raw(), b.raw(), 0b0011));
  928|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  929|       |         return SIMD_4x32(
  930|       |            wasm_i8x16_shuffle(b.raw(), a.raw(), 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23));
  931|       |#endif
  932|   235k|      }
_ZNK5Botan9SIMD_4x3212top_bit_maskEv:
  941|    134|      inline SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 top_bit_mask() const {
  942|    134|#if defined(BOTAN_SIMD_USE_SSSE3)
  943|    134|         return SIMD_4x32(_mm_shuffle_epi32(_mm_srai_epi32(raw(), 31), 0b11111111));
  944|       |#elif defined(BOTAN_SIMD_USE_NEON)
  945|       |   #if defined(BOTAN_TARGET_ARCH_IS_ARM32)
  946|       |         int32x4_t v = vshrq_n_s32(vreinterpretq_s32_u32(raw()), 31);
  947|       |         int32x2_t hi = vget_high_s32(v);
  948|       |         return SIMD_4x32(vreinterpretq_u32_s32(vdupq_lane_s32(hi, 1)));
  949|       |   #else
  950|       |         return SIMD_4x32(vreinterpretq_u32_s32(vdupq_laneq_s32(vshrq_n_s32(vreinterpretq_s32_u32(raw()), 31), 3)));
  951|       |   #endif
  952|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  953|       |         const __vector unsigned int shift = vec_splats(31U);
  954|       |         const __vector signed int shifted = vec_sra(reinterpret_cast<__vector signed int>(raw()), shift);
  955|       |         return SIMD_4x32(reinterpret_cast<__vector unsigned int>(vec_splat(shifted, 3)));
  956|       |#elif defined(BOTAN_SIMD_USE_LSX)
  957|       |         return SIMD_4x32(__lsx_vshuf4i_w(__lsx_vsrai_w(raw(), 31), 0xFF));
  958|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  959|       |         return SIMD_4x32(wasm_i32x4_splat(wasm_i32x4_extract_lane(wasm_i32x4_shr(raw(), 31), 3)));
  960|       |#endif
  961|    134|      }
_ZNK5Botan9SIMD_4x324rotlILm8EEES0_vQaagtT_Li0EltT_Li32E:
  340|  14.5k|      {
  341|  14.5k|#if defined(BOTAN_SIMD_USE_SSSE3)
  342|  14.5k|         if constexpr(ROT == 8) {
  343|  14.5k|            const auto shuf_rotl_8 = _mm_set_epi64x(0x0e0d0c0f0a09080b, 0x0605040702010003);
  344|  14.5k|            return SIMD_4x32(_mm_shuffle_epi8(raw(), shuf_rotl_8));
  345|       |         } else if constexpr(ROT == 16) {
  346|       |            const auto shuf_rotl_16 = _mm_set_epi64x(0x0d0c0f0e09080b0a, 0x0504070601000302);
  347|       |            return SIMD_4x32(_mm_shuffle_epi8(raw(), shuf_rotl_16));
  348|       |         } else if constexpr(ROT == 24) {
  349|       |            const auto shuf_rotl_24 = _mm_set_epi64x(0x0c0f0e0d080b0a09, 0x0407060500030201);
  350|       |            return SIMD_4x32(_mm_shuffle_epi8(raw(), shuf_rotl_24));
  351|       |         } else {
  352|       |            return SIMD_4x32(_mm_xor_si128(_mm_slli_epi32(raw(), static_cast<int>(ROT)),
  353|       |                                           _mm_srli_epi32(raw(), static_cast<int>(32 - ROT))));
  354|       |         }
  355|       |
  356|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  357|       |
  358|       |         const unsigned int r = static_cast<unsigned int>(ROT);
  359|       |         __vector unsigned int rot = {r, r, r, r};
  360|       |         return SIMD_4x32(vec_rl(m_simd, rot));
  361|       |
  362|       |#elif defined(BOTAN_SIMD_USE_NEON) && defined(BOTAN_TARGET_ARCH_IS_ARM64)
  363|       |
  364|       |         if constexpr(ROT == 8) {
  365|       |            const uint8_t maskb[16] = {3, 0, 1, 2, 7, 4, 5, 6, 11, 8, 9, 10, 15, 12, 13, 14};
  366|       |            const uint8x16_t mask = vld1q_u8(maskb);
  367|       |            return SIMD_4x32(vreinterpretq_u32_u8(vqtbl1q_u8(vreinterpretq_u8_u32(m_simd), mask)));
  368|       |         } else if constexpr(ROT == 16) {
  369|       |            return SIMD_4x32(vreinterpretq_u32_u16(vrev32q_u16(vreinterpretq_u16_u32(m_simd))));
  370|       |         } else {
  371|       |            return SIMD_4x32(
  372|       |               vorrq_u32(vshlq_n_u32(m_simd, static_cast<int>(ROT)), vshrq_n_u32(m_simd, static_cast<int>(32 - ROT))));
  373|       |         }
  374|       |#elif defined(BOTAN_SIMD_USE_NEON)
  375|       |         return SIMD_4x32(
  376|       |            vorrq_u32(vshlq_n_u32(m_simd, static_cast<int>(ROT)), vshrq_n_u32(m_simd, static_cast<int>(32 - ROT))));
  377|       |#elif defined(BOTAN_SIMD_USE_LSX)
  378|       |         return SIMD_4x32(__lsx_vrotri_w(raw(), 32 - ROT));
  379|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  380|       |         return SIMD_4x32(wasm_v128_or(wasm_i32x4_shl(m_simd, ROT), wasm_u32x4_shr(m_simd, 32 - ROT)));
  381|       |#endif
  382|  14.5k|      }
_ZNK5Botan9SIMD_4x324rotlILm24EEES0_vQaagtT_Li0EltT_Li32E:
  340|  14.5k|      {
  341|  14.5k|#if defined(BOTAN_SIMD_USE_SSSE3)
  342|       |         if constexpr(ROT == 8) {
  343|       |            const auto shuf_rotl_8 = _mm_set_epi64x(0x0e0d0c0f0a09080b, 0x0605040702010003);
  344|       |            return SIMD_4x32(_mm_shuffle_epi8(raw(), shuf_rotl_8));
  345|       |         } else if constexpr(ROT == 16) {
  346|       |            const auto shuf_rotl_16 = _mm_set_epi64x(0x0d0c0f0e09080b0a, 0x0504070601000302);
  347|       |            return SIMD_4x32(_mm_shuffle_epi8(raw(), shuf_rotl_16));
  348|  14.5k|         } else if constexpr(ROT == 24) {
  349|  14.5k|            const auto shuf_rotl_24 = _mm_set_epi64x(0x0c0f0e0d080b0a09, 0x0407060500030201);
  350|  14.5k|            return SIMD_4x32(_mm_shuffle_epi8(raw(), shuf_rotl_24));
  351|       |         } else {
  352|       |            return SIMD_4x32(_mm_xor_si128(_mm_slli_epi32(raw(), static_cast<int>(ROT)),
  353|       |                                           _mm_srli_epi32(raw(), static_cast<int>(32 - ROT))));
  354|       |         }
  355|       |
  356|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  357|       |
  358|       |         const unsigned int r = static_cast<unsigned int>(ROT);
  359|       |         __vector unsigned int rot = {r, r, r, r};
  360|       |         return SIMD_4x32(vec_rl(m_simd, rot));
  361|       |
  362|       |#elif defined(BOTAN_SIMD_USE_NEON) && defined(BOTAN_TARGET_ARCH_IS_ARM64)
  363|       |
  364|       |         if constexpr(ROT == 8) {
  365|       |            const uint8_t maskb[16] = {3, 0, 1, 2, 7, 4, 5, 6, 11, 8, 9, 10, 15, 12, 13, 14};
  366|       |            const uint8x16_t mask = vld1q_u8(maskb);
  367|       |            return SIMD_4x32(vreinterpretq_u32_u8(vqtbl1q_u8(vreinterpretq_u8_u32(m_simd), mask)));
  368|       |         } else if constexpr(ROT == 16) {
  369|       |            return SIMD_4x32(vreinterpretq_u32_u16(vrev32q_u16(vreinterpretq_u16_u32(m_simd))));
  370|       |         } else {
  371|       |            return SIMD_4x32(
  372|       |               vorrq_u32(vshlq_n_u32(m_simd, static_cast<int>(ROT)), vshrq_n_u32(m_simd, static_cast<int>(32 - ROT))));
  373|       |         }
  374|       |#elif defined(BOTAN_SIMD_USE_NEON)
  375|       |         return SIMD_4x32(
  376|       |            vorrq_u32(vshlq_n_u32(m_simd, static_cast<int>(ROT)), vshrq_n_u32(m_simd, static_cast<int>(32 - ROT))));
  377|       |#elif defined(BOTAN_SIMD_USE_LSX)
  378|       |         return SIMD_4x32(__lsx_vrotri_w(raw(), 32 - ROT));
  379|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  380|       |         return SIMD_4x32(wasm_v128_or(wasm_i32x4_shl(m_simd, ROT), wasm_u32x4_shr(m_simd, 32 - ROT)));
  381|       |#endif
  382|  14.5k|      }
_ZNK5Botan9SIMD_4x3212extract_wordILm3EEEjv:
  978|  52.5k|      inline uint32_t BOTAN_FN_ISA_SIMD_4X32 extract_word() const noexcept {
  979|  52.5k|         static_assert(W <= 3);
  980|       |
  981|       |#if defined(BOTAN_SIMD_USE_NEON)
  982|       |         return vgetq_lane_u32(raw(), W);
  983|       |#elif defined(BOTAN_SIMD_USE_LSX)
  984|       |         return __lsx_vpickve2gr_wu(raw(), W);
  985|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  986|       |         return wasm_u32x4_extract_lane(raw(), W);
  987|       |#elif defined(BOTAN_SIMD_USE_SSSE3)
  988|       |         if constexpr(W == 0) {
  989|       |            return static_cast<uint32_t>(_mm_cvtsi128_si32(raw()));
  990|  52.5k|         } else {
  991|       |            // Broadcast the word then extract the low
  992|       |            // TODO(SSE4.1) could use _mm_extract_epi32 here
  993|  52.5k|            return static_cast<uint32_t>(_mm_cvtsi128_si32(_mm_shuffle_epi32(raw(), _MM_SHUFFLE(W, W, W, W))));
  994|  52.5k|         }
  995|       |#else
  996|       |         uint32_t result[4];
  997|       |         if constexpr(std::endian::native == std::endian::big) {
  998|       |            this->store_be(result);
  999|       |         } else {
 1000|       |            this->store_le(result);
 1001|       |         }
 1002|       |         return result[W];
 1003|       |#endif
 1004|  52.5k|      }
_ZNK5Botan9SIMD_4x3217shift_elems_rightILm2EEES0_vQleT_Li3E:
  651|  2.61M|      {
  652|  2.61M|#if defined(BOTAN_SIMD_USE_SSSE3)
  653|  2.61M|         return SIMD_4x32(_mm_srli_si128(raw(), 4 * I));
  654|       |#elif defined(BOTAN_SIMD_USE_NEON)
  655|       |         return SIMD_4x32(vextq_u32(raw(), vdupq_n_u32(0), I));
  656|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  657|       |         const __vector unsigned int zero = vec_splat_u32(0);
  658|       |
  659|       |         const __vector unsigned char shuf[3] = {
  660|       |            {4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19},
  661|       |            {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23},
  662|       |            {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27},
  663|       |         };
  664|       |
  665|       |         return SIMD_4x32(vec_perm(raw(), zero, shuf[I - 1]));
  666|       |#elif defined(BOTAN_SIMD_USE_LSX)
  667|       |         return SIMD_4x32(__lsx_vbsrl_v(raw(), 4 * I));
  668|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  669|       |         if constexpr(I == 0) {
  670|       |            return SIMD_4x32(m_simd);
  671|       |         }
  672|       |
  673|       |         const auto zero = wasm_u32x4_const_splat(0);
  674|       |         if constexpr(I == 1) {
  675|       |            return SIMD_4x32(
  676|       |               wasm_i8x16_shuffle(m_simd, zero, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16));
  677|       |         }
  678|       |         if constexpr(I == 2) {
  679|       |            return SIMD_4x32(
  680|       |               wasm_i8x16_shuffle(m_simd, zero, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16));
  681|       |         }
  682|       |
  683|       |         return SIMD_4x32(
  684|       |            wasm_i8x16_shuffle(m_simd, zero, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16));
  685|       |#endif
  686|  2.61M|      }
_ZNK5Botan9SIMD_4x324rotlILm16EEES0_vQaagtT_Li0EltT_Li32E:
  340|  11.4k|      {
  341|  11.4k|#if defined(BOTAN_SIMD_USE_SSSE3)
  342|       |         if constexpr(ROT == 8) {
  343|       |            const auto shuf_rotl_8 = _mm_set_epi64x(0x0e0d0c0f0a09080b, 0x0605040702010003);
  344|       |            return SIMD_4x32(_mm_shuffle_epi8(raw(), shuf_rotl_8));
  345|  11.4k|         } else if constexpr(ROT == 16) {
  346|  11.4k|            const auto shuf_rotl_16 = _mm_set_epi64x(0x0d0c0f0e09080b0a, 0x0504070601000302);
  347|  11.4k|            return SIMD_4x32(_mm_shuffle_epi8(raw(), shuf_rotl_16));
  348|       |         } else if constexpr(ROT == 24) {
  349|       |            const auto shuf_rotl_24 = _mm_set_epi64x(0x0c0f0e0d080b0a09, 0x0407060500030201);
  350|       |            return SIMD_4x32(_mm_shuffle_epi8(raw(), shuf_rotl_24));
  351|       |         } else {
  352|       |            return SIMD_4x32(_mm_xor_si128(_mm_slli_epi32(raw(), static_cast<int>(ROT)),
  353|       |                                           _mm_srli_epi32(raw(), static_cast<int>(32 - ROT))));
  354|       |         }
  355|       |
  356|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  357|       |
  358|       |         const unsigned int r = static_cast<unsigned int>(ROT);
  359|       |         __vector unsigned int rot = {r, r, r, r};
  360|       |         return SIMD_4x32(vec_rl(m_simd, rot));
  361|       |
  362|       |#elif defined(BOTAN_SIMD_USE_NEON) && defined(BOTAN_TARGET_ARCH_IS_ARM64)
  363|       |
  364|       |         if constexpr(ROT == 8) {
  365|       |            const uint8_t maskb[16] = {3, 0, 1, 2, 7, 4, 5, 6, 11, 8, 9, 10, 15, 12, 13, 14};
  366|       |            const uint8x16_t mask = vld1q_u8(maskb);
  367|       |            return SIMD_4x32(vreinterpretq_u32_u8(vqtbl1q_u8(vreinterpretq_u8_u32(m_simd), mask)));
  368|       |         } else if constexpr(ROT == 16) {
  369|       |            return SIMD_4x32(vreinterpretq_u32_u16(vrev32q_u16(vreinterpretq_u16_u32(m_simd))));
  370|       |         } else {
  371|       |            return SIMD_4x32(
  372|       |               vorrq_u32(vshlq_n_u32(m_simd, static_cast<int>(ROT)), vshrq_n_u32(m_simd, static_cast<int>(32 - ROT))));
  373|       |         }
  374|       |#elif defined(BOTAN_SIMD_USE_NEON)
  375|       |         return SIMD_4x32(
  376|       |            vorrq_u32(vshlq_n_u32(m_simd, static_cast<int>(ROT)), vshrq_n_u32(m_simd, static_cast<int>(32 - ROT))));
  377|       |#elif defined(BOTAN_SIMD_USE_LSX)
  378|       |         return SIMD_4x32(__lsx_vrotri_w(raw(), 32 - ROT));
  379|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  380|       |         return SIMD_4x32(wasm_v128_or(wasm_i32x4_shl(m_simd, ROT), wasm_u32x4_shr(m_simd, 32 - ROT)));
  381|       |#endif
  382|  11.4k|      }
_ZNK5Botan9SIMD_4x3216shift_elems_leftILm2EEES0_vQleT_Li3E:
  614|  1.94k|      {
  615|  1.94k|#if defined(BOTAN_SIMD_USE_SSSE3)
  616|  1.94k|         return SIMD_4x32(_mm_slli_si128(raw(), 4 * I));
  617|       |#elif defined(BOTAN_SIMD_USE_NEON)
  618|       |         return SIMD_4x32(vextq_u32(vdupq_n_u32(0), raw(), 4 - I));
  619|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  620|       |         const __vector unsigned int zero = vec_splat_u32(0);
  621|       |
  622|       |         const __vector unsigned char shuf[3] = {
  623|       |            {16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11},
  624|       |            {16, 17, 18, 19, 20, 21, 22, 23, 0, 1, 2, 3, 4, 5, 6, 7},
  625|       |            {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 0, 1, 2, 3},
  626|       |         };
  627|       |
  628|       |         return SIMD_4x32(vec_perm(raw(), zero, shuf[I - 1]));
  629|       |#elif defined(BOTAN_SIMD_USE_LSX)
  630|       |         return SIMD_4x32(__lsx_vbsll_v(raw(), 4 * I));
  631|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  632|       |         if constexpr(I == 0) {
  633|       |            return SIMD_4x32(m_simd);
  634|       |         }
  635|       |
  636|       |         const auto zero = wasm_u32x4_const_splat(0);
  637|       |         if constexpr(I == 1) {
  638|       |            return SIMD_4x32(wasm_i8x16_shuffle(m_simd, zero, 16, 16, 16, 16, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11));
  639|       |         }
  640|       |         if constexpr(I == 2) {
  641|       |            return SIMD_4x32(wasm_i8x16_shuffle(m_simd, zero, 16, 16, 16, 16, 16, 16, 16, 16, 0, 1, 2, 3, 4, 5, 6, 7));
  642|       |         }
  643|       |
  644|       |         return SIMD_4x32(wasm_i8x16_shuffle(m_simd, zero, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 1, 2, 3));
  645|       |#endif
  646|  1.94k|      }
_ZNK5Botan9SIMD_4x323shrILi31EEES0_v:
  530|    134|      SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 shr() const noexcept {
  531|    134|#if defined(BOTAN_SIMD_USE_SSSE3)
  532|    134|         return SIMD_4x32(_mm_srli_epi32(m_simd, SHIFT));
  533|       |
  534|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  535|       |         const unsigned int s = static_cast<unsigned int>(SHIFT);
  536|       |         const __vector unsigned int shifts = {s, s, s, s};
  537|       |         return SIMD_4x32(vec_sr(m_simd, shifts));
  538|       |#elif defined(BOTAN_SIMD_USE_NEON)
  539|       |         return SIMD_4x32(vshrq_n_u32(m_simd, SHIFT));
  540|       |#elif defined(BOTAN_SIMD_USE_LSX)
  541|       |         return SIMD_4x32(__lsx_vsrli_w(m_simd, SHIFT));
  542|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  543|       |         return SIMD_4x32(wasm_u32x4_shr(m_simd, SHIFT));
  544|       |#endif
  545|    134|      }
_ZNK5Botan9SIMD_4x3216shift_elems_leftILm1EEES0_vQleT_Li3E:
  614|  11.2k|      {
  615|  11.2k|#if defined(BOTAN_SIMD_USE_SSSE3)
  616|  11.2k|         return SIMD_4x32(_mm_slli_si128(raw(), 4 * I));
  617|       |#elif defined(BOTAN_SIMD_USE_NEON)
  618|       |         return SIMD_4x32(vextq_u32(vdupq_n_u32(0), raw(), 4 - I));
  619|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  620|       |         const __vector unsigned int zero = vec_splat_u32(0);
  621|       |
  622|       |         const __vector unsigned char shuf[3] = {
  623|       |            {16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11},
  624|       |            {16, 17, 18, 19, 20, 21, 22, 23, 0, 1, 2, 3, 4, 5, 6, 7},
  625|       |            {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 0, 1, 2, 3},
  626|       |         };
  627|       |
  628|       |         return SIMD_4x32(vec_perm(raw(), zero, shuf[I - 1]));
  629|       |#elif defined(BOTAN_SIMD_USE_LSX)
  630|       |         return SIMD_4x32(__lsx_vbsll_v(raw(), 4 * I));
  631|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  632|       |         if constexpr(I == 0) {
  633|       |            return SIMD_4x32(m_simd);
  634|       |         }
  635|       |
  636|       |         const auto zero = wasm_u32x4_const_splat(0);
  637|       |         if constexpr(I == 1) {
  638|       |            return SIMD_4x32(wasm_i8x16_shuffle(m_simd, zero, 16, 16, 16, 16, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11));
  639|       |         }
  640|       |         if constexpr(I == 2) {
  641|       |            return SIMD_4x32(wasm_i8x16_shuffle(m_simd, zero, 16, 16, 16, 16, 16, 16, 16, 16, 0, 1, 2, 3, 4, 5, 6, 7));
  642|       |         }
  643|       |
  644|       |         return SIMD_4x32(wasm_i8x16_shuffle(m_simd, zero, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 1, 2, 3));
  645|       |#endif
  646|  11.2k|      }
_ZNK5Botan9SIMD_4x323shlILi1EEES0_vQaagtT_Li0EltT_Li32E:
  512|    134|      {
  513|    134|#if defined(BOTAN_SIMD_USE_SSSE3)
  514|    134|         return SIMD_4x32(_mm_slli_epi32(m_simd, SHIFT));
  515|       |
  516|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  517|       |         const unsigned int s = static_cast<unsigned int>(SHIFT);
  518|       |         const __vector unsigned int shifts = {s, s, s, s};
  519|       |         return SIMD_4x32(vec_sl(m_simd, shifts));
  520|       |#elif defined(BOTAN_SIMD_USE_NEON)
  521|       |         return SIMD_4x32(vshlq_n_u32(m_simd, SHIFT));
  522|       |#elif defined(BOTAN_SIMD_USE_LSX)
  523|       |         return SIMD_4x32(__lsx_vslli_w(m_simd, SHIFT));
  524|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  525|       |         return SIMD_4x32(wasm_i32x4_shl(m_simd, SHIFT));
  526|       |#endif
  527|    134|      }

_ZN5Botan9SIMD_4x64C2Ev:
   33|  4.30k|      BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64() : m_simd(_mm256_setzero_si256()) {}
_ZNK5Botan9SIMD_4x645bswapEv:
   65|  4.30k|      SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 bswap() const {
   66|  4.30k|         const auto idx = _mm256_set_epi8(
   67|  4.30k|            8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7);
   68|       |
   69|  4.30k|         return SIMD_4x64(_mm256_shuffle_epi8(m_simd, idx));
   70|  4.30k|      }
_ZN5Botan9SIMD_4x64C2EDv4_x:
  267|   167k|      explicit BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64(__m256i x) : m_simd(x) {}
_ZN5Botan9SIMD_4x64eOERKS0_:
  112|  68.8k|      BOTAN_FN_ISA_SIMD_4X64 void operator^=(const SIMD_4x64& other) {
  113|  68.8k|         m_simd = _mm256_xor_si256(m_simd, other.m_simd);
  114|  68.8k|      }
_ZNK5Botan9SIMD_4x64eoERKS0_:
   90|  68.8k|      SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 operator^(const SIMD_4x64& other) const {
   91|  68.8k|         SIMD_4x64 retval(*this);
   92|  68.8k|         retval ^= other;
   93|  68.8k|         return retval;
   94|  68.8k|      }
_ZN5Botan9SIMD_4x648load_le2EPKvS2_:
   36|  4.30k|      static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 load_le2(const void* lo, const void* hi) {
   37|  4.30k|         return SIMD_4x64(
   38|  4.30k|            _mm256_loadu2_m128i(reinterpret_cast<const __m128i*>(lo), reinterpret_cast<const __m128i*>(hi)));
   39|  4.30k|      }
_ZN5Botan9SIMD_4x648load_be2EPKvS2_:
   41|  4.30k|      static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 load_be2(const void* lo, const void* hi) {
   42|  4.30k|         return SIMD_4x64::load_le2(lo, hi).bswap();
   43|  4.30k|      }
_ZN5Botan9SIMD_4x6414broadcast_2x64EPKm:
   61|  21.5k|      static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 broadcast_2x64(const uint64_t* in) {
   62|  21.5k|         return SIMD_4x64(_mm256_broadcastsi128_si256(_mm_loadu_si128(reinterpret_cast<const __m128i*>(in))));
   63|  21.5k|      }
_ZN5Botan9SIMD_4x649store_le2EPvS1_:
   78|  21.5k|      BOTAN_FN_ISA_SIMD_4X64 void store_le2(void* outh, void* outl) {
   79|  21.5k|         _mm256_storeu2_m128i(reinterpret_cast<__m128i*>(outh), reinterpret_cast<__m128i*>(outl), m_simd);
   80|  21.5k|      }
_ZNK5Botan9SIMD_4x64plERKS0_:
   84|  73.1k|      SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 operator+(const SIMD_4x64& other) const {
   85|  73.1k|         SIMD_4x64 retval(*this);
   86|  73.1k|         retval += other;
   87|  73.1k|         return retval;
   88|  73.1k|      }
_ZN5Botan9SIMD_4x64pLERKS0_:
  108|  73.1k|      BOTAN_FN_ISA_SIMD_4X64 void operator+=(const SIMD_4x64& other) {
  109|  73.1k|         m_simd = _mm256_add_epi64(m_simd, other.m_simd);
  110|  73.1k|      }
_ZN5Botan9SIMD_4x647alignr8ERKS0_S2_:
  233|  34.4k|      static SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 alignr8(const SIMD_4x64& a, const SIMD_4x64& b) {
  234|       |         return SIMD_4x64(_mm256_alignr_epi8(a.m_simd, b.m_simd, 8));
  235|  34.4k|      }
_ZNK5Botan9SIMD_4x644rotrILm1EEES0_vQaagtT_Li0EltT_Li64E:
  130|  17.2k|      {
  131|       |#if defined(__AVX512VL__)
  132|       |         return SIMD_4x64(_mm256_ror_epi64(m_simd, ROT));
  133|       |#else
  134|       |         if constexpr(ROT == 8) {
  135|       |            auto shuf_rot_8 =
  136|       |               _mm256_set_epi64x(0x080f0e0d0c0b0a09, 0x0007060504030201, 0x080f0e0d0c0b0a09, 0x0007060504030201);
  137|       |
  138|       |            return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_8));
  139|       |         } else if constexpr(ROT == 16) {
  140|       |            auto shuf_rot_16 =
  141|       |               _mm256_set_epi64x(0x09080f0e0d0c0b0a, 0x0100070605040302, 0x09080f0e0d0c0b0a, 0x0100070605040302);
  142|       |
  143|       |            return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_16));
  144|       |         } else if constexpr(ROT == 24) {
  145|       |            auto shuf_rot_24 =
  146|       |               _mm256_set_epi64x(0x0a09080f0e0d0c0b, 0x0201000706050403, 0x0a09080f0e0d0c0b, 0x0201000706050403);
  147|       |
  148|       |            return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_24));
  149|       |         } else if constexpr(ROT == 32) {
  150|       |            auto shuf_rot_32 =
  151|       |               _mm256_set_epi64x(0x0b0a09080f0e0d0c, 0x0302010007060504, 0x0b0a09080f0e0d0c, 0x0302010007060504);
  152|       |
  153|       |            return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_32));
  154|  17.2k|         } else {
  155|  17.2k|            return SIMD_4x64(_mm256_or_si256(_mm256_srli_epi64(m_simd, static_cast<int>(ROT)),
  156|  17.2k|                                             _mm256_slli_epi64(m_simd, static_cast<int>(64 - ROT))));
  157|  17.2k|         }
  158|  17.2k|#endif
  159|  17.2k|      }
_ZNK5Botan9SIMD_4x644rotrILm8EEES0_vQaagtT_Li0EltT_Li64E:
  130|  17.2k|      {
  131|       |#if defined(__AVX512VL__)
  132|       |         return SIMD_4x64(_mm256_ror_epi64(m_simd, ROT));
  133|       |#else
  134|  17.2k|         if constexpr(ROT == 8) {
  135|  17.2k|            auto shuf_rot_8 =
  136|  17.2k|               _mm256_set_epi64x(0x080f0e0d0c0b0a09, 0x0007060504030201, 0x080f0e0d0c0b0a09, 0x0007060504030201);
  137|       |
  138|  17.2k|            return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_8));
  139|       |         } else if constexpr(ROT == 16) {
  140|       |            auto shuf_rot_16 =
  141|       |               _mm256_set_epi64x(0x09080f0e0d0c0b0a, 0x0100070605040302, 0x09080f0e0d0c0b0a, 0x0100070605040302);
  142|       |
  143|       |            return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_16));
  144|       |         } else if constexpr(ROT == 24) {
  145|       |            auto shuf_rot_24 =
  146|       |               _mm256_set_epi64x(0x0a09080f0e0d0c0b, 0x0201000706050403, 0x0a09080f0e0d0c0b, 0x0201000706050403);
  147|       |
  148|       |            return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_24));
  149|       |         } else if constexpr(ROT == 32) {
  150|       |            auto shuf_rot_32 =
  151|       |               _mm256_set_epi64x(0x0b0a09080f0e0d0c, 0x0302010007060504, 0x0b0a09080f0e0d0c, 0x0302010007060504);
  152|       |
  153|       |            return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_32));
  154|       |         } else {
  155|       |            return SIMD_4x64(_mm256_or_si256(_mm256_srli_epi64(m_simd, static_cast<int>(ROT)),
  156|       |                                             _mm256_slli_epi64(m_simd, static_cast<int>(64 - ROT))));
  157|       |         }
  158|  17.2k|#endif
  159|  17.2k|      }
_ZNK5Botan9SIMD_4x643shrILi7EEES0_v:
  224|  17.2k|      SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 shr() const noexcept {
  225|  17.2k|         return SIMD_4x64(_mm256_srli_epi64(m_simd, SHIFT));
  226|  17.2k|      }
_ZNK5Botan9SIMD_4x644rotrILm19EEES0_vQaagtT_Li0EltT_Li64E:
  130|  17.2k|      {
  131|       |#if defined(__AVX512VL__)
  132|       |         return SIMD_4x64(_mm256_ror_epi64(m_simd, ROT));
  133|       |#else
  134|       |         if constexpr(ROT == 8) {
  135|       |            auto shuf_rot_8 =
  136|       |               _mm256_set_epi64x(0x080f0e0d0c0b0a09, 0x0007060504030201, 0x080f0e0d0c0b0a09, 0x0007060504030201);
  137|       |
  138|       |            return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_8));
  139|       |         } else if constexpr(ROT == 16) {
  140|       |            auto shuf_rot_16 =
  141|       |               _mm256_set_epi64x(0x09080f0e0d0c0b0a, 0x0100070605040302, 0x09080f0e0d0c0b0a, 0x0100070605040302);
  142|       |
  143|       |            return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_16));
  144|       |         } else if constexpr(ROT == 24) {
  145|       |            auto shuf_rot_24 =
  146|       |               _mm256_set_epi64x(0x0a09080f0e0d0c0b, 0x0201000706050403, 0x0a09080f0e0d0c0b, 0x0201000706050403);
  147|       |
  148|       |            return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_24));
  149|       |         } else if constexpr(ROT == 32) {
  150|       |            auto shuf_rot_32 =
  151|       |               _mm256_set_epi64x(0x0b0a09080f0e0d0c, 0x0302010007060504, 0x0b0a09080f0e0d0c, 0x0302010007060504);
  152|       |
  153|       |            return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_32));
  154|  17.2k|         } else {
  155|  17.2k|            return SIMD_4x64(_mm256_or_si256(_mm256_srli_epi64(m_simd, static_cast<int>(ROT)),
  156|  17.2k|                                             _mm256_slli_epi64(m_simd, static_cast<int>(64 - ROT))));
  157|  17.2k|         }
  158|  17.2k|#endif
  159|  17.2k|      }
_ZNK5Botan9SIMD_4x644rotrILm61EEES0_vQaagtT_Li0EltT_Li64E:
  130|  17.2k|      {
  131|       |#if defined(__AVX512VL__)
  132|       |         return SIMD_4x64(_mm256_ror_epi64(m_simd, ROT));
  133|       |#else
  134|       |         if constexpr(ROT == 8) {
  135|       |            auto shuf_rot_8 =
  136|       |               _mm256_set_epi64x(0x080f0e0d0c0b0a09, 0x0007060504030201, 0x080f0e0d0c0b0a09, 0x0007060504030201);
  137|       |
  138|       |            return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_8));
  139|       |         } else if constexpr(ROT == 16) {
  140|       |            auto shuf_rot_16 =
  141|       |               _mm256_set_epi64x(0x09080f0e0d0c0b0a, 0x0100070605040302, 0x09080f0e0d0c0b0a, 0x0100070605040302);
  142|       |
  143|       |            return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_16));
  144|       |         } else if constexpr(ROT == 24) {
  145|       |            auto shuf_rot_24 =
  146|       |               _mm256_set_epi64x(0x0a09080f0e0d0c0b, 0x0201000706050403, 0x0a09080f0e0d0c0b, 0x0201000706050403);
  147|       |
  148|       |            return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_24));
  149|       |         } else if constexpr(ROT == 32) {
  150|       |            auto shuf_rot_32 =
  151|       |               _mm256_set_epi64x(0x0b0a09080f0e0d0c, 0x0302010007060504, 0x0b0a09080f0e0d0c, 0x0302010007060504);
  152|       |
  153|       |            return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_32));
  154|  17.2k|         } else {
  155|  17.2k|            return SIMD_4x64(_mm256_or_si256(_mm256_srli_epi64(m_simd, static_cast<int>(ROT)),
  156|  17.2k|                                             _mm256_slli_epi64(m_simd, static_cast<int>(64 - ROT))));
  157|  17.2k|         }
  158|  17.2k|#endif
  159|  17.2k|      }
_ZNK5Botan9SIMD_4x643shrILi6EEES0_v:
  224|  17.2k|      SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 shr() const noexcept {
  225|  17.2k|         return SIMD_4x64(_mm256_srli_epi64(m_simd, SHIFT));
  226|  17.2k|      }

_ZN5Botan9SIMD_8x32C2Ejjjjjjjj:
   46|  2.82k|                         uint32_t B7) noexcept {
   47|       |         // NOLINTNEXTLINE(*-prefer-member-initializer)
   48|  2.82k|         m_avx2 = _mm256_set_epi32(B7, B6, B5, B4, B3, B2, B1, B0);
   49|  2.82k|      }
_ZN5Botan9SIMD_8x32C2Ejjjj:
   52|     44|      explicit SIMD_8x32(uint32_t B0, uint32_t B1, uint32_t B2, uint32_t B3) noexcept {
   53|       |         // NOLINTNEXTLINE(*-prefer-member-initializer)
   54|     44|         m_avx2 = _mm256_set_epi32(B3, B2, B1, B0, B3, B2, B1, B0);
   55|     44|      }
_ZN5Botan9SIMD_8x325splatEj:
   58|  83.6k|      static SIMD_8x32 splat(uint32_t B) noexcept { return SIMD_8x32(_mm256_set1_epi32(B)); }
_ZN5Botan9SIMD_8x327load_leEPKh:
   61|  5.47k|      static SIMD_8x32 load_le(const uint8_t* in) noexcept {
   62|  5.47k|         return SIMD_8x32(_mm256_loadu_si256(reinterpret_cast<const __m256i*>(in)));
   63|  5.47k|      }
_ZN5Botan9SIMD_8x3210load_le128EPKh:
   71|     44|      static SIMD_8x32 load_le128(const uint8_t* in) noexcept {
   72|     44|         return SIMD_8x32(_mm256_broadcastsi128_si256(_mm_loadu_si128(reinterpret_cast<const __m128i*>(in))));
   73|     44|      }
_ZNK5Botan9SIMD_8x328store_leEPh:
   94|  48.6k|      void store_le(uint8_t out[]) const noexcept { _mm256_storeu_si256(reinterpret_cast<__m256i*>(out), m_avx2); }
_ZNK5Botan9SIMD_8x32plERKS0_:
  174|  2.78k|      SIMD_8x32 operator+(const SIMD_8x32& other) const noexcept {
  175|  2.78k|         SIMD_8x32 retval(*this);
  176|  2.78k|         retval += other;
  177|  2.78k|         return retval;
  178|  2.78k|      }
_ZNK5Botan9SIMD_8x32miERKS0_:
  181|  2.69k|      SIMD_8x32 operator-(const SIMD_8x32& other) const noexcept {
  182|  2.69k|         SIMD_8x32 retval(*this);
  183|  2.69k|         retval -= other;
  184|  2.69k|         return retval;
  185|  2.69k|      }
_ZN5Botan9SIMD_8x32pLERKS0_:
  209|   911k|      void operator+=(const SIMD_8x32& other) { m_avx2 = _mm256_add_epi32(m_avx2, other.m_avx2); }
_ZN5Botan9SIMD_8x32mIERKS0_:
  212|  2.69k|      void operator-=(const SIMD_8x32& other) { m_avx2 = _mm256_sub_epi32(m_avx2, other.m_avx2); }
_ZN5Botan9SIMD_8x32eOERKS0_:
  215|   865k|      void operator^=(const SIMD_8x32& other) { m_avx2 = _mm256_xor_si256(m_avx2, other.m_avx2); }
_ZN5Botan9SIMD_8x329transposeERS0_S1_S1_S1_:
  274|  10.7k|      static void transpose(SIMD_8x32& B0, SIMD_8x32& B1, SIMD_8x32& B2, SIMD_8x32& B3) noexcept {
  275|  10.7k|         const __m256i T0 = _mm256_unpacklo_epi32(B0.m_avx2, B1.m_avx2);
  276|  10.7k|         const __m256i T1 = _mm256_unpacklo_epi32(B2.m_avx2, B3.m_avx2);
  277|  10.7k|         const __m256i T2 = _mm256_unpackhi_epi32(B0.m_avx2, B1.m_avx2);
  278|  10.7k|         const __m256i T3 = _mm256_unpackhi_epi32(B2.m_avx2, B3.m_avx2);
  279|       |
  280|  10.7k|         B0.m_avx2 = _mm256_unpacklo_epi64(T0, T1);
  281|  10.7k|         B1.m_avx2 = _mm256_unpackhi_epi64(T0, T1);
  282|  10.7k|         B2.m_avx2 = _mm256_unpacklo_epi64(T2, T3);
  283|  10.7k|         B3.m_avx2 = _mm256_unpackhi_epi64(T2, T3);
  284|  10.7k|      }
_ZN5Botan9SIMD_8x329transposeERS0_S1_S1_S1_S1_S1_S1_S1_:
  312|  5.39k|                            SIMD_8x32& B7) noexcept {
  313|  5.39k|         transpose(B0, B1, B2, B3);
  314|  5.39k|         transpose(B4, B5, B6, B7);
  315|       |
  316|  5.39k|         swap_tops(B0, B4);
  317|  5.39k|         swap_tops(B1, B5);
  318|  5.39k|         swap_tops(B2, B6);
  319|  5.39k|         swap_tops(B3, B7);
  320|  5.39k|      }
_ZNK5Botan9SIMD_8x3211unsigned_ltERKS0_:
  327|  2.69k|      SIMD_8x32 BOTAN_FN_ISA_SIMD_8X32 unsigned_lt(const SIMD_8x32& other) const noexcept {
  328|       |         // No unsigned comparison before AVX-512; bias into the signed domain
  329|  2.69k|         const __m256i bias = _mm256_set1_epi32(static_cast<int32_t>(0x80000000));
  330|  2.69k|         return SIMD_8x32(_mm256_cmpgt_epi32(_mm256_xor_si256(other.raw(), bias), _mm256_xor_si256(raw(), bias)));
  331|  2.69k|      }
_ZN5Botan9SIMD_8x3212byte_shuffleERKS0_S2_:
  351|  2.78k|      static inline SIMD_8x32 BOTAN_FN_ISA_SIMD_8X32 byte_shuffle(const SIMD_8x32& tbl, const SIMD_8x32& idx) {
  352|  2.78k|         return SIMD_8x32(_mm256_shuffle_epi8(tbl.raw(), idx.raw()));
  353|  2.78k|      }
_ZN5Botan9SIMD_8x3215reset_registersEv:
  385|  2.69k|      static void reset_registers() noexcept { _mm256_zeroupper(); }
_ZN5Botan9SIMD_8x3214zero_registersEv:
  388|  2.69k|      static void zero_registers() noexcept { _mm256_zeroall(); }
_ZNK5Botan9SIMD_8x323rawEv:
  390|  97.2k|      __m256i BOTAN_FN_ISA_SIMD_8X32 raw() const noexcept { return m_avx2; }
_ZN5Botan9SIMD_8x32C2EDv4_x:
  393|  1.00M|      explicit SIMD_8x32(__m256i x) noexcept : m_avx2(x) {}
_ZN5Botan9SIMD_8x329swap_topsERS0_S1_:
  397|  21.5k|      static void swap_tops(SIMD_8x32& A, SIMD_8x32& B) {
  398|  21.5k|         auto T0 = SIMD_8x32(_mm256_permute2x128_si256(A.raw(), B.raw(), 0 + (2 << 4)));
  399|       |         auto T1 = SIMD_8x32(_mm256_permute2x128_si256(A.raw(), B.raw(), 1 + (3 << 4)));
  400|  21.5k|         A = T0;
  401|  21.5k|         B = T1;
  402|  21.5k|      }
_ZNK5Botan9SIMD_8x324rotlILm7EEES0_vQaagtT_Li0EltT_Li32E:
  128|   215k|      {
  129|       |#if defined(__AVX512VL__)
  130|       |         return SIMD_8x32(_mm256_rol_epi32(m_avx2, ROT));
  131|       |#else
  132|       |         if constexpr(ROT == 8) {
  133|       |            const __m256i shuf_rotl_8 =
  134|       |               _mm256_set_epi64x(0x0e0d0c0f'0a09080b, 0x06050407'02010003, 0x0e0d0c0f'0a09080b, 0x06050407'02010003);
  135|       |
  136|       |            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_8));
  137|       |         } else if constexpr(ROT == 16) {
  138|       |            const __m256i shuf_rotl_16 =
  139|       |               _mm256_set_epi64x(0x0d0c0f0e'09080b0a, 0x05040706'01000302, 0x0d0c0f0e'09080b0a, 0x05040706'01000302);
  140|       |
  141|       |            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_16));
  142|       |         } else if constexpr(ROT == 24) {
  143|       |            const __m256i shuf_rotl_24 =
  144|       |               _mm256_set_epi64x(0x0c0f0e0d'080b0a09, 0x04070605'00030201, 0x0c0f0e0d'080b0a09, 0x04070605'00030201);
  145|       |
  146|       |            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_24));
  147|   215k|         } else {
  148|   215k|            return SIMD_8x32(_mm256_xor_si256(_mm256_slli_epi32(m_avx2, static_cast<int>(ROT)),
  149|   215k|                                              _mm256_srli_epi32(m_avx2, static_cast<int>(32 - ROT))));
  150|   215k|         }
  151|   215k|#endif
  152|   215k|      }
_ZNK5Botan9SIMD_8x324rotlILm16EEES0_vQaagtT_Li0EltT_Li32E:
  128|   215k|      {
  129|       |#if defined(__AVX512VL__)
  130|       |         return SIMD_8x32(_mm256_rol_epi32(m_avx2, ROT));
  131|       |#else
  132|       |         if constexpr(ROT == 8) {
  133|       |            const __m256i shuf_rotl_8 =
  134|       |               _mm256_set_epi64x(0x0e0d0c0f'0a09080b, 0x06050407'02010003, 0x0e0d0c0f'0a09080b, 0x06050407'02010003);
  135|       |
  136|       |            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_8));
  137|   215k|         } else if constexpr(ROT == 16) {
  138|   215k|            const __m256i shuf_rotl_16 =
  139|   215k|               _mm256_set_epi64x(0x0d0c0f0e'09080b0a, 0x05040706'01000302, 0x0d0c0f0e'09080b0a, 0x05040706'01000302);
  140|       |
  141|   215k|            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_16));
  142|       |         } else if constexpr(ROT == 24) {
  143|       |            const __m256i shuf_rotl_24 =
  144|       |               _mm256_set_epi64x(0x0c0f0e0d'080b0a09, 0x04070605'00030201, 0x0c0f0e0d'080b0a09, 0x04070605'00030201);
  145|       |
  146|       |            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_24));
  147|       |         } else {
  148|       |            return SIMD_8x32(_mm256_xor_si256(_mm256_slli_epi32(m_avx2, static_cast<int>(ROT)),
  149|       |                                              _mm256_srli_epi32(m_avx2, static_cast<int>(32 - ROT))));
  150|       |         }
  151|   215k|#endif
  152|   215k|      }
_ZNK5Botan9SIMD_8x324rotlILm12EEES0_vQaagtT_Li0EltT_Li32E:
  128|   215k|      {
  129|       |#if defined(__AVX512VL__)
  130|       |         return SIMD_8x32(_mm256_rol_epi32(m_avx2, ROT));
  131|       |#else
  132|       |         if constexpr(ROT == 8) {
  133|       |            const __m256i shuf_rotl_8 =
  134|       |               _mm256_set_epi64x(0x0e0d0c0f'0a09080b, 0x06050407'02010003, 0x0e0d0c0f'0a09080b, 0x06050407'02010003);
  135|       |
  136|       |            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_8));
  137|       |         } else if constexpr(ROT == 16) {
  138|       |            const __m256i shuf_rotl_16 =
  139|       |               _mm256_set_epi64x(0x0d0c0f0e'09080b0a, 0x05040706'01000302, 0x0d0c0f0e'09080b0a, 0x05040706'01000302);
  140|       |
  141|       |            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_16));
  142|       |         } else if constexpr(ROT == 24) {
  143|       |            const __m256i shuf_rotl_24 =
  144|       |               _mm256_set_epi64x(0x0c0f0e0d'080b0a09, 0x04070605'00030201, 0x0c0f0e0d'080b0a09, 0x04070605'00030201);
  145|       |
  146|       |            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_24));
  147|   215k|         } else {
  148|   215k|            return SIMD_8x32(_mm256_xor_si256(_mm256_slli_epi32(m_avx2, static_cast<int>(ROT)),
  149|   215k|                                              _mm256_srli_epi32(m_avx2, static_cast<int>(32 - ROT))));
  150|   215k|         }
  151|   215k|#endif
  152|   215k|      }
_ZNK5Botan9SIMD_8x324rotlILm8EEES0_vQaagtT_Li0EltT_Li32E:
  128|   215k|      {
  129|       |#if defined(__AVX512VL__)
  130|       |         return SIMD_8x32(_mm256_rol_epi32(m_avx2, ROT));
  131|       |#else
  132|   215k|         if constexpr(ROT == 8) {
  133|   215k|            const __m256i shuf_rotl_8 =
  134|   215k|               _mm256_set_epi64x(0x0e0d0c0f'0a09080b, 0x06050407'02010003, 0x0e0d0c0f'0a09080b, 0x06050407'02010003);
  135|       |
  136|   215k|            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_8));
  137|       |         } else if constexpr(ROT == 16) {
  138|       |            const __m256i shuf_rotl_16 =
  139|       |               _mm256_set_epi64x(0x0d0c0f0e'09080b0a, 0x05040706'01000302, 0x0d0c0f0e'09080b0a, 0x05040706'01000302);
  140|       |
  141|       |            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_16));
  142|       |         } else if constexpr(ROT == 24) {
  143|       |            const __m256i shuf_rotl_24 =
  144|       |               _mm256_set_epi64x(0x0c0f0e0d'080b0a09, 0x04070605'00030201, 0x0c0f0e0d'080b0a09, 0x04070605'00030201);
  145|       |
  146|       |            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_24));
  147|       |         } else {
  148|       |            return SIMD_8x32(_mm256_xor_si256(_mm256_slli_epi32(m_avx2, static_cast<int>(ROT)),
  149|       |                                              _mm256_srli_epi32(m_avx2, static_cast<int>(32 - ROT))));
  150|       |         }
  151|   215k|#endif
  152|   215k|      }

_ZNK5Botan23Gf2AffineTransformation16affine_transformENS_9SIMD_4x32E:
  159|   217k|      inline SIMD_4x32 BOTAN_FN_ISA_HWAES affine_transform(SIMD_4x32 x) const {
  160|   217k|         const SIMD_4x32 tbl_lo(lo[0], lo[1], lo[2], lo[3]);
  161|   217k|         const SIMD_4x32 tbl_hi(hi[0], hi[1], hi[2], hi[3]);
  162|   217k|         const auto lo_mask = SIMD_4x32::splat_u8(0x0F);
  163|       |
  164|   217k|         return SIMD_4x32::byte_shuffle(tbl_lo, lo_mask & x) ^ SIMD_4x32::byte_shuffle(tbl_hi, lo_mask & x.shr<4>());
  165|   217k|      }
_ZN5Botan11hw_aes_sboxENS_9SIMD_4x32E:
   23|  49.8k|inline SIMD_4x32 BOTAN_FN_ISA_HWAES hw_aes_sbox(SIMD_4x32 x) {
   24|       |   // Undo the ShiftRows with a byte shuffle implementing InvShiftRows
   25|  49.8k|   const auto inv_sr = SIMD_4x32(0x070A0D00, 0x0B0E0104, 0x0F020508, 0x0306090C);
   26|       |
   27|  49.8k|#if defined(BOTAN_TARGET_ARCH_IS_X86_FAMILY)
   28|  49.8k|   auto enc = SIMD_4x32(_mm_aesenclast_si128(x.raw(), _mm_setzero_si128()));
   29|       |#elif defined(BOTAN_TARGET_ARCH_IS_ARM64)
   30|       |   auto enc = SIMD_4x32(vreinterpretq_u32_u8(vaeseq_u8(vreinterpretq_u8_u32(x.raw()), vdupq_n_u8(0))));
   31|       |#else
   32|       |   #error "hw_aes_sbox not implemented for this architecture"
   33|       |#endif
   34|       |
   35|  49.8k|   return SIMD_4x32::byte_shuffle(enc, inv_sr);
   36|  49.8k|}
_ZN5Botan15hw_aes_inv_sboxENS_9SIMD_4x32E:
   41|  7.84k|inline SIMD_4x32 BOTAN_FN_ISA_HWAES hw_aes_inv_sbox(SIMD_4x32 x) {
   42|       |   // Undo the InvShiftRows with a byte shuffle implementing ShiftRows
   43|  7.84k|   const auto sr = SIMD_4x32(0x0F0A0500, 0x030E0904, 0x07020D08, 0x0B06010C);
   44|       |
   45|  7.84k|#if defined(BOTAN_TARGET_ARCH_IS_X86_FAMILY)
   46|  7.84k|   auto dec = SIMD_4x32(_mm_aesdeclast_si128(x.raw(), _mm_setzero_si128()));
   47|       |#elif defined(BOTAN_TARGET_ARCH_IS_ARM64)
   48|       |   auto dec = SIMD_4x32(vreinterpretq_u32_u8(vaesdq_u8(vreinterpretq_u8_u32(x.raw()), vdupq_n_u8(0))));
   49|       |#else
   50|       |   #error "hw_aes_inv_sbox not implemented for this architecture"
   51|       |#endif
   52|       |
   53|  7.84k|   return SIMD_4x32::byte_shuffle(dec, sr);
   54|  7.84k|}

_ZN5Botan12value_existsINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EEEEbRKNS1_6vectorIT_NS5_ISB_EEEERKT0_:
   44|   146k|bool value_exists(const std::vector<T>& vec, const V& val) {
   45|   262k|   for(const auto& elem : vec) {
  ------------------
  |  Branch (45:25): [True: 262k, False: 0]
  ------------------
   46|   262k|      if(elem == val) {
  ------------------
  |  Branch (46:10): [True: 146k, False: 115k]
  ------------------
   47|   146k|         return true;
   48|   146k|      }
   49|   262k|   }
   50|      0|   return false;
   51|   146k|}
_ZN5Botan12value_existsINS_3TLS12Group_ParamsES2_EEbRKNSt3__16vectorIT_NS3_9allocatorIS5_EEEERKT0_:
   44|  48.7k|bool value_exists(const std::vector<T>& vec, const V& val) {
   45|  52.2k|   for(const auto& elem : vec) {
  ------------------
  |  Branch (45:25): [True: 52.2k, False: 43.5k]
  ------------------
   46|  52.2k|      if(elem == val) {
  ------------------
  |  Branch (46:10): [True: 5.27k, False: 46.9k]
  ------------------
   47|  5.27k|         return true;
   48|  5.27k|      }
   49|  52.2k|   }
   50|  43.5k|   return false;
   51|  48.7k|}
_ZN5Botan12value_existsINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_EEbRKNS1_6vectorIT_NS5_IS9_EEEERKT0_:
   44|     32|bool value_exists(const std::vector<T>& vec, const V& val) {
   45|     32|   for(const auto& elem : vec) {
  ------------------
  |  Branch (45:25): [True: 32, False: 2]
  ------------------
   46|     32|      if(elem == val) {
  ------------------
  |  Branch (46:10): [True: 30, False: 2]
  ------------------
   47|     30|         return true;
   48|     30|      }
   49|     32|   }
   50|      2|   return false;
   51|     32|}
tls_channel_impl_12.cpp:_ZN5Botan13map_remove_ifINSt3__13mapItNS1_10shared_ptrINS_3TLS23Connection_Cipher_StateEEENS1_4lessItEENS1_9allocatorINS1_4pairIKtS6_EEEEEEZNS4_15Channel_Impl_1216activate_sessionEvE3$_0EEvT0_RT_:
   54|     79|void map_remove_if(Pred pred, T& assoc) {
   55|     79|   auto i = assoc.begin();
   56|    237|   while(i != assoc.end()) {
  ------------------
  |  Branch (56:10): [True: 158, False: 79]
  ------------------
   57|    158|      if(pred(i->first)) {
  ------------------
  |  Branch (57:10): [True: 79, False: 79]
  ------------------
   58|     79|         assoc.erase(i++);
   59|     79|      } else {
   60|     79|         i++;
   61|     79|      }
   62|    158|   }
   63|     79|}
tls_channel_impl_12.cpp:_ZN5Botan13map_remove_ifINSt3__13mapItNS_3TLS15Channel_Impl_1226Retained_Read_Cipher_StateENS1_4lessItEENS1_9allocatorINS1_4pairIKtS5_EEEEEEZNS4_16activate_sessionEvE3$_0EEvT0_RT_:
   54|     79|void map_remove_if(Pred pred, T& assoc) {
   55|     79|   auto i = assoc.begin();
   56|    237|   while(i != assoc.end()) {
  ------------------
  |  Branch (56:10): [True: 158, False: 79]
  ------------------
   57|    158|      if(pred(i->first)) {
  ------------------
  |  Branch (57:10): [True: 79, False: 79]
  ------------------
   58|     79|         assoc.erase(i++);
   59|     79|      } else {
   60|     79|         i++;
   61|     79|      }
   62|    158|   }
   63|     79|}
_ZN5Botan12value_existsINS_3TLS16Protocol_VersionES2_EEbRKNSt3__16vectorIT_NS3_9allocatorIS5_EEEERKT0_:
   44|     28|bool value_exists(const std::vector<T>& vec, const V& val) {
   45|    274|   for(const auto& elem : vec) {
  ------------------
  |  Branch (45:25): [True: 274, False: 20]
  ------------------
   46|    274|      if(elem == val) {
  ------------------
  |  Branch (46:10): [True: 8, False: 266]
  ------------------
   47|      8|         return true;
   48|      8|      }
   49|    274|   }
   50|     20|   return false;
   51|     28|}
_ZN5Botan12value_existsIhhEEbRKNSt3__16vectorIT_NS1_9allocatorIS3_EEEERKT0_:
   44|  3.17k|bool value_exists(const std::vector<T>& vec, const V& val) {
   45|  3.73k|   for(const auto& elem : vec) {
  ------------------
  |  Branch (45:25): [True: 3.73k, False: 46]
  ------------------
   46|  3.73k|      if(elem == val) {
  ------------------
  |  Branch (46:10): [True: 3.12k, False: 607]
  ------------------
   47|  3.12k|         return true;
   48|  3.12k|      }
   49|  3.73k|   }
   50|     46|   return false;
   51|  3.17k|}
_ZN5Botan12holds_any_ofIJNS_3TLS20Client_Hello_12_ShimENS1_15Client_Hello_13ENS1_15Server_Hello_13ENS1_19Hello_Retry_RequestENS1_11Finished_13EEJS3_S2_S4_NS1_20Server_Hello_12_ShimES5_NS1_20Encrypted_ExtensionsENS1_14Certificate_13ENS1_22Certificate_Request_13ENS1_21Certificate_Verify_13ES6_EEEbRKNSt3__17variantIJDpT0_EEE:
   66|  3.42k|constexpr bool holds_any_of(const std::variant<Ts...>& v) noexcept {
   67|  4.84k|   return (std::holds_alternative<Alts>(v) || ...);
  ------------------
  |  Branch (67:12): [True: 0, False: 203]
  |  Branch (67:12): [True: 10, False: 193]
  |  Branch (67:12): [True: 0, False: 203]
  |  Branch (67:12): [True: 0, False: 203]
  |  Branch (67:12): [True: 3.22k, False: 203]
  ------------------
   68|  3.42k|}
_ZN5Botan13to_underlyingINS_3TLS11Record_TypeEQsr3stdE9is_enum_vIT_EEEDaS3_:
  142|  2.28k|auto to_underlying(T e) noexcept {
  143|  2.28k|   return static_cast<std::underlying_type_t<T>>(e);
  144|  2.28k|}
_ZN5Botan13generalize_toINSt3__17variantIJNS_3TLS15Client_Hello_13ENS3_20Client_Hello_12_ShimENS3_15Server_Hello_13ENS3_20Server_Hello_12_ShimENS3_19Hello_Retry_RequestENS3_20Encrypted_ExtensionsENS3_14Certificate_13ENS3_22Certificate_Request_13ENS3_21Certificate_Verify_13ENS3_11Finished_13EEEEJS4_S5_EEET_NS2_IJDpT0_EEE:
  102|  3.22k|constexpr GeneralVariantT generalize_to(std::variant<SpecialTs...> specific) {
  103|  3.22k|   static_assert(
  104|  3.22k|      is_generalizable_to<GeneralVariantT>(specific),
  105|  3.22k|      "Desired general type must be implicitly constructible by all types of the specialized std::variant<>");
  106|  3.22k|   return std::visit([](auto s) -> GeneralVariantT { return s; }, std::move(specific));
  107|  3.22k|}
_ZZN5Botan13generalize_toINSt3__17variantIJNS_3TLS15Client_Hello_13ENS3_20Client_Hello_12_ShimENS3_15Server_Hello_13ENS3_20Server_Hello_12_ShimENS3_19Hello_Retry_RequestENS3_20Encrypted_ExtensionsENS3_14Certificate_13ENS3_22Certificate_Request_13ENS3_21Certificate_Verify_13ENS3_11Finished_13EEEEJS4_S5_EEET_NS2_IJDpT0_EEEENKUlSF_E_clIS5_EESE_SF_:
  106|  3.22k|   return std::visit([](auto s) -> GeneralVariantT { return s; }, std::move(specific));
_ZN5Botan13generalize_toINSt3__17variantIJNS_3TLS15Client_Hello_13ENS3_20Client_Hello_12_ShimENS3_15Server_Hello_13ENS3_20Server_Hello_12_ShimENS3_19Hello_Retry_RequestENS3_20Encrypted_ExtensionsENS3_14Certificate_13ENS3_22Certificate_Request_13ENS3_21Certificate_Verify_13ENS3_11Finished_13EEEEJS8_S6_S7_EEET_NS2_IJDpT0_EEE:
  102|     19|constexpr GeneralVariantT generalize_to(std::variant<SpecialTs...> specific) {
  103|     19|   static_assert(
  104|     19|      is_generalizable_to<GeneralVariantT>(specific),
  105|     19|      "Desired general type must be implicitly constructible by all types of the specialized std::variant<>");
  106|     19|   return std::visit([](auto s) -> GeneralVariantT { return s; }, std::move(specific));
  107|     19|}
_ZZN5Botan13generalize_toINSt3__17variantIJNS_3TLS15Client_Hello_13ENS3_20Client_Hello_12_ShimENS3_15Server_Hello_13ENS3_20Server_Hello_12_ShimENS3_19Hello_Retry_RequestENS3_20Encrypted_ExtensionsENS3_14Certificate_13ENS3_22Certificate_Request_13ENS3_21Certificate_Verify_13ENS3_11Finished_13EEEEJS8_S6_S7_EEET_NS2_IJDpT0_EEEENKUlSF_E_clIS7_EESE_SF_:
  106|     19|   return std::visit([](auto s) -> GeneralVariantT { return s; }, std::move(specific));

_ZNK5Botan3TLS22TLS_CBC_HMAC_AEAD_Mode8tag_sizeEv:
   43|  1.44k|      size_t tag_size() const final { return m_tag_size; }
_ZNK5Botan3TLS22TLS_CBC_HMAC_AEAD_Mode7iv_sizeEv:
   74|     83|      size_t iv_size() const { return m_iv_size; }
_ZNK5Botan3TLS22TLS_CBC_HMAC_AEAD_Mode10block_sizeEv:
   76|    872|      size_t block_size() const { return m_block_size; }
_ZNK5Botan3TLS22TLS_CBC_HMAC_AEAD_Mode20use_encrypt_then_macEv:
   78|    666|      bool use_encrypt_then_mac() const { return m_use_encrypt_then_mac; }
_ZNK5Botan3TLS22TLS_CBC_HMAC_AEAD_Mode20is_datagram_protocolEv:
   80|    107|      bool is_datagram_protocol() const { return m_is_datagram; }
_ZNK5Botan3TLS22TLS_CBC_HMAC_AEAD_Mode3cbcEv:
   82|    591|      Cipher_Mode& cbc() const { return *m_cbc; }
_ZNK5Botan3TLS22TLS_CBC_HMAC_AEAD_Mode3macEv:
   84|  1.04k|      MessageAuthenticationCode& mac() const { return *m_mac; }
_ZN5Botan3TLS22TLS_CBC_HMAC_AEAD_Mode9cbc_stateEv:
   86|    408|      secure_vector<uint8_t>& cbc_state() { return m_cbc_state; }
_ZN5Botan3TLS22TLS_CBC_HMAC_AEAD_Mode10assoc_dataEv:
   88|    149|      std::vector<uint8_t>& assoc_data() { return m_ad; }
_ZN5Botan3TLS22TLS_CBC_HMAC_AEAD_Mode3msgEv:
   90|    422|      secure_vector<uint8_t>& msg() { return m_msg; }
_ZNK5Botan3TLS28TLS_CBC_HMAC_AEAD_Decryption18minimum_final_sizeEv:
  159|    128|      size_t minimum_final_size() const override { return tag_size(); }

_ZNK5Botan3TLS12Channel_Impl17expects_downgradeEv:
  299|  18.3k|      bool expects_downgrade() const {
  300|  18.3k|#if defined(BOTAN_HAS_TLS_DOWNGRADE_SUPPORT)
  301|  18.3k|         return m_downgrade_info != nullptr;
  302|       |#else
  303|       |         return false;
  304|       |#endif
  305|  18.3k|      }
_ZN5Botan3TLS12Channel_Impl18set_io_buffer_sizeEm:
  252|  5.71k|      void set_io_buffer_size(size_t io_buf_sz) {
  253|  5.71k|         BOTAN_STATE_CHECK(m_downgrade_info);
  ------------------
  |  |   51|  5.71k|   do {                                                         \
  |  |   52|  5.71k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  5.71k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 5.71k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  5.71k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 5.71k]
  |  |  ------------------
  ------------------
  254|  5.71k|         m_downgrade_info->io_buffer_size = io_buf_sz;
  255|  5.71k|      }
_ZNK5Botan3TLS12Channel_Impl14is_downgradingEv:
  291|  15.0k|      bool is_downgrading() const {
  292|  15.0k|#if defined(BOTAN_HAS_TLS_DOWNGRADE_SUPPORT)
  293|  15.0k|         return m_downgrade_info && m_downgrade_info->will_downgrade;
  ------------------
  |  Branch (293:17): [True: 14.6k, False: 368]
  |  Branch (293:37): [True: 6.42k, False: 8.22k]
  ------------------
  294|       |#else
  295|       |         return false;
  296|       |#endif
  297|  15.0k|      }
_ZN5Botan3TLS12Channel_Impl22extract_downgrade_infoEv:
  282|  3.21k|      std::unique_ptr<Downgrade_Information> extract_downgrade_info() { return std::exchange(m_downgrade_info, {}); }
_ZN5Botan3TLS12Channel_Impl18send_warning_alertENS0_9AlertTypeE:
   79|    238|      void send_warning_alert(Alert::Type type) { send_alert(Alert(type, false)); }
_ZN5Botan3TLS12Channel_Impl16send_fatal_alertENS0_9AlertTypeE:
   84|  4.28k|      void send_fatal_alert(Alert::Type type) { send_alert(Alert(type, true)); }
_ZN5Botan3TLS12Channel_Impl5closeEv:
   89|      7|      void close() { send_warning_alert(Alert::CloseNotify); }
_ZN5Botan3TLS12Channel_Impl24preserve_peer_transcriptENSt3__14spanIKhLm18446744073709551615EEE:
  239|  5.71k|      void preserve_peer_transcript(std::span<const uint8_t> input) {
  240|  5.71k|         BOTAN_STATE_CHECK(m_downgrade_info);
  ------------------
  |  |   51|  5.71k|   do {                                                         \
  |  |   52|  5.71k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  5.71k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 5.71k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  5.71k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 5.71k]
  |  |  ------------------
  ------------------
  241|  5.71k|         m_downgrade_info->peer_transcript.insert(m_downgrade_info->peer_transcript.end(), input.begin(), input.end());
  242|  5.71k|      }
_ZN5Botan3TLS12Channel_Impl17request_downgradeEv:
  265|  3.21k|      void request_downgrade() {
  266|  3.21k|         BOTAN_STATE_CHECK(m_downgrade_info && !m_downgrade_info->will_downgrade);
  ------------------
  |  |   51|  3.21k|   do {                                                         \
  |  |   52|  3.21k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  6.42k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:12): [True: 3.21k, False: 0]
  |  |  |  Branch (53:12): [True: 3.21k, False: 0]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  3.21k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 3.21k]
  |  |  ------------------
  ------------------
  267|  3.21k|         m_downgrade_info->will_downgrade = true;
  268|  3.21k|      }
_ZN5Botan3TLS12Channel_ImplC2Ev:
  198|  9.69k|      Channel_Impl() = default;
_ZN5Botan3TLS12Channel_ImplD2Ev:
   49|  9.69k|      virtual ~Channel_Impl() = default;

_ZNK5Botan3TLS15Channel_Impl_1212active_stateEv:
  154|  9.46k|      const std::optional<Active_Connection_State_12>& active_state() const { return m_active_state; }
_ZN5Botan3TLS15Channel_Impl_123rngEv:
  180|  10.7k|      RandomNumberGenerator& rng() { return *m_rng; }
_ZN5Botan3TLS15Channel_Impl_1215session_managerEv:
  182|  2.99k|      Session_Manager& session_manager() { return *m_session_manager; }
_ZNK5Botan3TLS15Channel_Impl_126policyEv:
  184|  47.9k|      const Policy& policy() const { return *m_policy; }
_ZNK5Botan3TLS15Channel_Impl_129callbacksEv:
  186|  24.3k|      Callbacks& callbacks() const { return *m_callbacks; }
_ZNK5Botan3TLS15Channel_Impl_1213pending_stateEv:
  224|  20.2k|      const Handshake_State* pending_state() const { return m_pending_state.get(); }

_ZNK5Botan3TLS15Channel_Impl_139callbacksEv:
  266|  6.29k|      Callbacks& callbacks() const { return *m_callbacks; }
_ZNK5Botan3TLS15Channel_Impl_136policyEv:
  274|  20.7k|      const Policy& policy() const { return *m_policy; }
_ZN5Botan3TLS13Secret_LoggerD2Ev:
   34|  5.71k|      virtual ~Secret_Logger() = default;

_ZNK5Botan3TLS26Active_Connection_State_127versionEv:
   48|     56|      Protocol_Version version() const { return m_version; }
_ZNK5Botan3TLS26Active_Connection_State_1210session_idEv:
   62|     56|      const Session_ID& session_id() const { return m_session_id; }

_ZN5Botan3TLS14Handshake_Hash6updateERKNSt3__16vectorIhNS2_9allocatorIhEEEE:
   23|  13.9k|      void update(const std::vector<uint8_t>& in) { m_data += in; }

_ZN5Botan3TLS12Handshake_IOD2Ev:
   84|  3.83k|      virtual ~Handshake_IO() = default;
_ZN5Botan3TLS19Stream_Handshake_IOC2ENSt3__18functionIFvNS0_11Record_TypeERKNS2_6vectorIhNS2_9allocatorIhEEEEEEE:
   94|  3.21k|      explicit Stream_Handshake_IO(writer_fn writer) : m_send_hs(std::move(writer)) {}
_ZN5Botan3TLS12Handshake_IOC2Ev:
   77|  3.83k|      Handshake_IO() = default;
_ZNK5Botan3TLS19Stream_Handshake_IO14have_more_dataEv:
  102|  3.29k|      bool have_more_data() const override { return !m_queue.empty(); }
_ZNK5Botan3TLS21Datagram_Handshake_IO20Handshake_Reassembly11initializedEv:
  246|  1.50k|            bool initialized() const { return m_msg_type != Handshake_Type::None; }
_ZNK5Botan3TLS21Datagram_Handshake_IO20Handshake_Reassembly5epochEv:
  250|    132|            uint16_t epoch() const { return m_epoch; }
_ZNK5Botan3TLS21Datagram_Handshake_IO20Handshake_Reassembly10msg_lengthEv:
  253|    132|            size_t msg_length() const { return m_msg_length; }

_ZN5Botan3TLS15Handshake_LayerC2ENS0_15Connection_SideE:
   31|  5.71k|            m_peer(whoami == Connection_Side::Server ? Connection_Side::Client : Connection_Side::Server)
  ------------------
  |  Branch (31:20): [True: 5.71k, False: 0]
  ------------------
   32|       |            // RFC 8446 4.4.2
   33|       |            //    If the corresponding certificate type extension
   34|       |            //    ("server_certificate_type" or "client_certificate_type") was not
   35|       |            //    negotiated in EncryptedExtensions, or the X.509 certificate type
   36|       |            //    was negotiated, then each CertificateEntry contains a DER-encoded
   37|       |            //    X.509 certificate.
   38|       |            //
   39|       |            // We need the certificate_type info to parse Certificate messages.
   40|       |            ,
   41|  5.71k|            m_certificate_type(Certificate_Type::X509) {}
_ZNK5Botan3TLS15Handshake_Layer16has_pending_dataEv:
   95|  4.04k|      bool has_pending_data() const { return m_read_offset < m_read_buffer.size(); }

_ZN5Botan3TLS15Handshake_State12handshake_ioEv:
   71|  26.7k|      Handshake_IO& handshake_io() { return *m_handshake_io; }
_ZNK5Botan3TLS15Handshake_State12server_helloEv:
  137|  15.4k|      const Server_Hello_12* server_hello() const { return m_server_hello.get(); }
_ZNK5Botan3TLS15Handshake_State7versionEv:
  110|  19.7k|      Protocol_Version version() const { return m_version; }
_ZNK5Botan3TLS15Handshake_State12session_keysEv:
  169|    772|      const Session_Keys& session_keys() const { return m_session_keys; }
_ZNK5Botan3TLS15Handshake_State12client_helloEv:
  135|  50.2k|      const Client_Hello_12* client_hello() const { return m_client_hello.get(); }
_ZNK5Botan3TLS15Handshake_State12server_certsEv:
  139|      4|      const Certificate_12* server_certs() const { return m_server_certs.get(); }
_ZNK5Botan3TLS15Handshake_State10server_kexEv:
  141|  4.02k|      const Server_Key_Exchange* server_kex() const { return m_server_kex.get(); }
_ZNK5Botan3TLS15Handshake_State12client_certsEv:
  147|    158|      const Certificate_12* client_certs() const { return m_client_certs.get(); }
_ZNK5Botan3TLS15Handshake_State10client_kexEv:
  149|  2.94k|      const Client_Key_Exchange* client_kex() const { return m_client_kex.get(); }
_ZNK5Botan3TLS15Handshake_State18new_session_ticketEv:
  157|     79|      const New_Session_Ticket_12* new_session_ticket() const { return m_new_session_ticket.get(); }
_ZNK5Botan3TLS15Handshake_State15server_finishedEv:
  159|    158|      const Finished_12* server_finished() const { return m_server_finished.get(); }
_ZNK5Botan3TLS15Handshake_State15client_finishedEv:
  161|    158|      const Finished_12* client_finished() const { return m_client_finished.get(); }
_ZNK5Botan3TLS15Handshake_State9callbacksEv:
  171|  4.62k|      Callbacks& callbacks() const { return m_callbacks; }
_ZN5Botan3TLS15Handshake_State4hashEv:
  177|  13.9k|      Handshake_Hash& hash() { return m_handshake_hash; }
_ZNK5Botan3TLS15Handshake_State4hashEv:
  179|  1.63k|      const Handshake_Hash& hash() const { return m_handshake_hash; }

_ZNK5Botan3TLS8Internal23Handshake_State_13_Base16has_client_helloEv:
   25|  2.29k|      bool has_client_hello() const { return m_client_hello.has_value(); }
_ZNK5Botan3TLS8Internal23Handshake_State_13_Base23has_hello_retry_requestEv:
   33|  3.21k|      bool has_hello_retry_request() const { return m_hello_retry_request.has_value(); }
_ZNK5Botan3TLS8Internal23Handshake_State_13_Base19has_server_finishedEv:
   37|  20.7k|      bool has_server_finished() const { return m_server_finished.has_value(); }
_ZNK5Botan3TLS8Internal23Handshake_State_13_Base18handshake_finishedEv:
   41|  20.7k|      bool handshake_finished() const {
   42|  20.7k|         return has_server_finished() && has_client_finished() && m_peer_finished_verified;
  ------------------
  |  Branch (42:17): [True: 0, False: 20.7k]
  |  Branch (42:42): [True: 0, False: 0]
  |  Branch (42:67): [True: 0, False: 0]
  ------------------
   43|  20.7k|      }
_ZN5Botan3TLS8Internal23Handshake_State_13_BaseC2ENS0_15Connection_SideE:
   90|  5.71k|      explicit Handshake_State_13_Base(Connection_Side whoami) : m_side(whoami) {}
_ZN5Botan3TLS18Handshake_State_13ILNS0_15Connection_SideE2ENSt3__17variantIJNS0_15Server_Hello_13ENS0_20Server_Hello_12_ShimENS0_19Hello_Retry_RequestENS0_20Encrypted_ExtensionsENS0_14Certificate_13ENS0_22Certificate_Request_13ENS0_21Certificate_Verify_13ENS0_11Finished_13EEEENS4_IJNS0_15Client_Hello_13ENS0_20Client_Hello_12_ShimES9_SB_SC_EEENS4_IJNS0_10Key_UpdateEEEEE8receivedENS4_IJSE_SF_S5_S6_S7_S8_S9_SA_SB_SC_EEE:
  176|  3.21k|      decltype(auto) received(Handshake_Message_13 message) {
  177|  3.21k|         return std::visit(
  178|  3.21k|            [&](auto msg) -> detail::as_wrapped_references_t<Inbound_Message_T> {
  179|  3.21k|               if constexpr(std::is_constructible_v<Inbound_Message_T, decltype(msg)>) {
  180|  3.21k|                  return std::reference_wrapper<decltype(msg)>(store(std::move(msg), true));
  181|  3.21k|               } else {
  182|  3.21k|                  throw TLS_Exception(AlertType::UnexpectedMessage, "received an illegal handshake message");
  183|  3.21k|               }
  184|  3.21k|            },
  185|  3.21k|            std::move(message));
  186|  3.21k|      }
_ZZN5Botan3TLS18Handshake_State_13ILNS0_15Connection_SideE2ENSt3__17variantIJNS0_15Server_Hello_13ENS0_20Server_Hello_12_ShimENS0_19Hello_Retry_RequestENS0_20Encrypted_ExtensionsENS0_14Certificate_13ENS0_22Certificate_Request_13ENS0_21Certificate_Verify_13ENS0_11Finished_13EEEENS4_IJNS0_15Client_Hello_13ENS0_20Client_Hello_12_ShimES9_SB_SC_EEENS4_IJNS0_10Key_UpdateEEEEE8receivedENS4_IJSE_SF_S5_S6_S7_S8_S9_SA_SB_SC_EEEENKUlT_E_clISF_EENS4_IJNS3_17reference_wrapperISE_EENSO_ISF_EENSO_IS9_EENSO_ISB_EENSO_ISC_EEEEESL_:
  178|  3.21k|            [&](auto msg) -> detail::as_wrapped_references_t<Inbound_Message_T> {
  179|  3.21k|               if constexpr(std::is_constructible_v<Inbound_Message_T, decltype(msg)>) {
  180|  3.21k|                  return std::reference_wrapper<decltype(msg)>(store(std::move(msg), true));
  181|       |               } else {
  182|       |                  throw TLS_Exception(AlertType::UnexpectedMessage, "received an illegal handshake message");
  183|       |               }
  184|  3.21k|            },
_ZN5Botan3TLS18Handshake_State_13ILNS0_15Connection_SideE2ENSt3__17variantIJNS0_15Server_Hello_13ENS0_20Server_Hello_12_ShimENS0_19Hello_Retry_RequestENS0_20Encrypted_ExtensionsENS0_14Certificate_13ENS0_22Certificate_Request_13ENS0_21Certificate_Verify_13ENS0_11Finished_13EEEENS4_IJNS0_15Client_Hello_13ENS0_20Client_Hello_12_ShimES9_SB_SC_EEENS4_IJNS0_10Key_UpdateEEEEEC2Ev:
  156|  5.71k|      Handshake_State_13() : Handshake_State_13_Base(whoami) {}

_ZNK5Botan3TLS21Client_Hello_Internal10extensionsEv:
   88|  3.32k|      const Extensions& extensions() const { return m_extensions; }
_ZNK5Botan3TLS21Client_Hello_Internal14legacy_versionEv:
   74|  3.26k|      Protocol_Version legacy_version() const { return m_legacy_version; }
_ZNK5Botan3TLS21Client_Hello_Internal6randomEv:
   78|  1.55k|      const std::vector<uint8_t>& random() const { return m_random; }
_ZNK5Botan3TLS21Client_Hello_Internal10session_idEv:
   76|  3.00k|      const Session_ID& session_id() const { return m_session_id; }
_ZNK5Botan3TLS21Client_Hello_Internal12comp_methodsEv:
   82|  3.19k|      const std::vector<uint8_t>& comp_methods() const { return m_comp_methods; }
_ZNK5Botan3TLS21Client_Hello_Internal12ciphersuitesEv:
   80|  12.6k|      const std::vector<uint16_t>& ciphersuites() const { return m_suites; }
_ZN5Botan3TLS21Client_Hello_Internal10extensionsEv:
   90|  66.3k|      Extensions& extensions() { return m_extensions; }
_ZN5Botan3TLS21Server_Hello_InternalC2ENS0_16Protocol_VersionENS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS0_11Session_ID_EJEEES8_thb:
  123|  2.81k|            m_legacy_version(lv),
  124|  2.81k|            m_session_id(std::move(sid)),
  125|  2.81k|            m_random(std::move(r)),
  126|  2.81k|            m_is_hello_retry_request(is_hrr),
  127|  2.81k|            m_ciphersuite(cs),
  128|  2.81k|            m_comp_method(cm) {}
_ZNK5Botan3TLS21Server_Hello_Internal14legacy_versionEv:
  132|  8.55k|      Protocol_Version legacy_version() const { return m_legacy_version; }
_ZNK5Botan3TLS21Server_Hello_Internal10session_idEv:
  134|  3.05k|      const Session_ID& session_id() const { return m_session_id; }
_ZNK5Botan3TLS21Server_Hello_Internal6randomEv:
  136|  4.36k|      const std::vector<uint8_t>& random() const { return m_random; }
_ZNK5Botan3TLS21Server_Hello_Internal11ciphersuiteEv:
  138|  11.4k|      uint16_t ciphersuite() const { return m_ciphersuite; }
_ZNK5Botan3TLS21Server_Hello_Internal11comp_methodEv:
  140|  3.28k|      uint8_t comp_method() const { return m_comp_method; }
_ZNK5Botan3TLS21Server_Hello_Internal22is_hello_retry_requestEv:
  142|     38|      bool is_hello_retry_request() const { return m_is_hello_retry_request; }
_ZNK5Botan3TLS21Server_Hello_Internal10extensionsEv:
  144|  2.92k|      const Extensions& extensions() const { return m_extensions; }
_ZN5Botan3TLS21Server_Hello_Internal10extensionsEv:
  146|  14.6k|      Extensions& extensions() { return m_extensions; }

_ZN5Botan3TLS15TLS_Data_ReaderC2EPKcNSt3__14spanIKhLm18446744073709551615EEE:
   27|  75.5k|            m_typename(type), m_buf(buf_in), m_offset(0) {}
_ZN5Botan3TLS15TLS_Data_Reader8get_byteEv:
   83|  59.0k|      uint8_t get_byte() {
   84|  59.0k|         assert_at_least(1);
   85|  59.0k|         const uint8_t result = m_buf[m_offset];
   86|  59.0k|         m_offset += 1;
   87|  59.0k|         return result;
   88|  59.0k|      }
_ZN5Botan3TLS15TLS_Data_Reader20get_data_read_so_farEv:
   46|    150|      std::vector<uint8_t> get_data_read_so_far() {
   47|    150|         const std::span first = m_buf.first(m_offset);
   48|    150|         return std::vector<uint8_t>(first.begin(), first.end());
   49|    150|      }
_ZN5Botan3TLS15TLS_Data_Reader13get_remainingEv:
   41|    143|      std::vector<uint8_t> get_remaining() {
   42|    143|         const std::span rest = m_buf.subspan(m_offset);
   43|    143|         return std::vector<uint8_t>(rest.begin(), rest.end());
   44|    143|      }
_ZN5Botan3TLS15TLS_Data_Reader9get_fixedIhEENSt3__16vectorIT_NS3_9allocatorIS5_EEEEm:
  129|  87.9k|      std::vector<T> get_fixed(size_t size) {
  130|  87.9k|         return get_elem<T, std::vector<T>>(size);
  131|  87.9k|      }
_ZN5Botan3TLS15TLS_Data_Reader8get_elemIhNSt3__16vectorIhNS3_9allocatorIhEEEEEET0_m:
   91|   109k|      Container get_elem(size_t num_elems) {
   92|   109k|         assert_at_least(num_elems * sizeof(T));
   93|       |
   94|   109k|         Container result(num_elems);
   95|       |
   96|  1.74M|         for(size_t i = 0; i != num_elems; ++i) {
  ------------------
  |  Branch (96:28): [True: 1.63M, False: 109k]
  ------------------
   97|  1.63M|            result[i] = load_be<T>(&m_buf[m_offset], i);
   98|  1.63M|         }
   99|       |
  100|   109k|         m_offset += num_elems * sizeof(T);
  101|       |
  102|   109k|         return result;
  103|   109k|      }
_ZN5Botan3TLS15TLS_Data_Reader16get_range_vectorIhEENSt3__16vectorIT_NS3_9allocatorIS5_EEEEmmm:
  117|  11.0k|      std::vector<T> get_range_vector(size_t len_bytes, size_t min_elems, size_t max_elems) {
  118|  11.0k|         const size_t num_elems = get_num_elems(len_bytes, sizeof(T), min_elems, max_elems);
  119|       |
  120|  11.0k|         return get_elem<T, std::vector<T>>(num_elems);
  121|  11.0k|      }
_ZN5Botan3TLS15TLS_Data_Reader13get_num_elemsEmmmm:
  148|  29.2k|      size_t get_num_elems(size_t len_bytes, size_t T_size, size_t min_elems, size_t max_elems) {
  149|  29.2k|         const size_t byte_length = get_length_field(len_bytes);
  150|       |
  151|  29.2k|         if(byte_length % T_size != 0) {
  ------------------
  |  Branch (151:13): [True: 8, False: 29.2k]
  ------------------
  152|      8|            throw_decode_error("Size isn't multiple of T");
  153|      8|         }
  154|       |
  155|  29.2k|         const size_t num_elems = byte_length / T_size;
  156|       |
  157|  29.2k|         if(num_elems < min_elems || num_elems > max_elems) {
  ------------------
  |  Branch (157:13): [True: 48, False: 29.2k]
  |  Branch (157:38): [True: 23, False: 29.1k]
  ------------------
  158|     41|            throw_decode_error("Length field outside parameters");
  159|     41|         }
  160|       |
  161|  29.2k|         return num_elems;
  162|  29.2k|      }
_ZN5Botan3TLS15TLS_Data_Reader16get_length_fieldEm:
  134|  30.6k|      size_t get_length_field(size_t len_bytes) {
  135|  30.6k|         assert_at_least(len_bytes);
  136|       |
  137|  30.6k|         if(len_bytes == 1) {
  ------------------
  |  Branch (137:13): [True: 19.3k, False: 11.2k]
  ------------------
  138|  19.3k|            return get_byte();
  139|  19.3k|         } else if(len_bytes == 2) {
  ------------------
  |  Branch (139:20): [True: 10.8k, False: 480]
  ------------------
  140|  10.8k|            return get_uint16_t();
  141|  10.8k|         } else if(len_bytes == 3) {
  ------------------
  |  Branch (141:20): [True: 456, False: 24]
  ------------------
  142|    456|            return get_uint24_t();
  143|    456|         }
  144|       |
  145|     24|         throw_decode_error("Bad length size");
  146|     24|      }
_ZN5Botan3TLS15TLS_Data_Reader12get_uint16_tEv:
   71|   173k|      uint16_t get_uint16_t() {
   72|   173k|         assert_at_least(2);
   73|   173k|         const uint16_t result = make_uint16(m_buf[m_offset], m_buf[m_offset + 1]);
   74|   173k|         m_offset += 2;
   75|   173k|         return result;
   76|   173k|      }
_ZN5Botan3TLS15TLS_Data_Reader12get_uint24_tEv:
   64|  21.5k|      uint32_t get_uint24_t() {
   65|  21.5k|         assert_at_least(3);
   66|  21.5k|         const uint32_t result = make_uint32(0, m_buf[m_offset], m_buf[m_offset + 1], m_buf[m_offset + 2]);
   67|  21.5k|         m_offset += 3;
   68|  21.5k|         return result;
   69|  21.5k|      }
_ZN5Botan3TLS15TLS_Data_Reader9get_rangeIhEENSt3__16vectorIT_NS3_9allocatorIS5_EEEEmmm:
  110|  10.8k|      std::vector<T> get_range(size_t len_bytes, size_t min_elems, size_t max_elems) {
  111|  10.8k|         const size_t num_elems = get_num_elems(len_bytes, sizeof(T), min_elems, max_elems);
  112|       |
  113|  10.8k|         return get_elem<T, std::vector<T>>(num_elems);
  114|  10.8k|      }
_ZN5Botan3TLS15TLS_Data_Reader16get_range_vectorItEENSt3__16vectorIT_NS3_9allocatorIS5_EEEEmmm:
  117|  7.22k|      std::vector<T> get_range_vector(size_t len_bytes, size_t min_elems, size_t max_elems) {
  118|  7.22k|         const size_t num_elems = get_num_elems(len_bytes, sizeof(T), min_elems, max_elems);
  119|       |
  120|  7.22k|         return get_elem<T, std::vector<T>>(num_elems);
  121|  7.22k|      }
_ZN5Botan3TLS15TLS_Data_Reader8get_elemItNSt3__16vectorItNS3_9allocatorItEEEEEET0_m:
   91|  7.33k|      Container get_elem(size_t num_elems) {
   92|  7.33k|         assert_at_least(num_elems * sizeof(T));
   93|       |
   94|  7.33k|         Container result(num_elems);
   95|       |
   96|  53.6k|         for(size_t i = 0; i != num_elems; ++i) {
  ------------------
  |  Branch (96:28): [True: 46.2k, False: 7.33k]
  ------------------
   97|  46.2k|            result[i] = load_be<T>(&m_buf[m_offset], i);
   98|  46.2k|         }
   99|       |
  100|  7.33k|         m_offset += num_elems * sizeof(T);
  101|       |
  102|  7.33k|         return result;
  103|  7.33k|      }
_ZN5Botan3TLS23append_tls_length_valueIhNSt3__19allocatorIhEES4_EEvRNS2_6vectorIhT0_EERKNS5_IT_T1_EEm:
  209|  5.60k|                                    size_t tag_size) {
  210|  5.60k|   append_tls_length_value(buf, std::span{vals}, tag_size);
  211|  5.60k|}
_ZN5Botan3TLS23append_tls_length_valueIhNSt3__19allocatorIhEEEEvRNS2_6vectorIhT0_EENS2_4spanIKT_Lm18446744073709551615EEEm:
  202|  8.43k|inline void append_tls_length_value(std::vector<uint8_t, Alloc>& buf, std::span<const T> vals, size_t tag_size) {
  203|  8.43k|   append_tls_length_value(buf, vals.data(), vals.size(), tag_size);
  204|  8.43k|}
_ZN5Botan3TLS23append_tls_length_valueIhNSt3__19allocatorIhEEEEvRNS2_6vectorIhT0_EEPKT_mm:
  180|  8.43k|                                    size_t tag_size) {
  181|  8.43k|   const size_t T_size = sizeof(T);
  182|  8.43k|   const size_t val_bytes = T_size * vals_size;
  183|       |
  184|  8.43k|   BOTAN_ARG_CHECK(tag_size == 1 || tag_size == 2 || tag_size == 3, "Invalid TLS tag size");
  ------------------
  |  |   35|  8.43k|   do {                                                          \
  |  |   36|  8.43k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  19.6k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 5.62k, False: 2.81k]
  |  |  |  Branch (37:12): [True: 2.81k, False: 0]
  |  |  |  Branch (37:12): [True: 0, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  8.43k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 8.43k]
  |  |  ------------------
  ------------------
  185|       |
  186|  8.43k|   const size_t max_possible_size = (1 << (8 * tag_size)) - 1;
  187|       |
  188|  8.43k|   BOTAN_ARG_CHECK(val_bytes <= max_possible_size, "Value too large to encode");
  ------------------
  |  |   35|  8.43k|   do {                                                          \
  |  |   36|  8.43k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  8.43k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 8.43k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  8.43k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 8.43k]
  |  |  ------------------
  ------------------
  189|       |
  190|  19.6k|   for(size_t i = 0; i != tag_size; ++i) {
  ------------------
  |  Branch (190:22): [True: 11.2k, False: 8.43k]
  ------------------
  191|  11.2k|      buf.push_back(get_byte_var(sizeof(val_bytes) - tag_size + i, val_bytes));
  192|  11.2k|   }
  193|       |
  194|   363k|   for(size_t i = 0; i != vals_size; ++i) {
  ------------------
  |  Branch (194:22): [True: 354k, False: 8.43k]
  ------------------
  195|   709k|      for(size_t j = 0; j != T_size; ++j) {
  ------------------
  |  Branch (195:25): [True: 354k, False: 354k]
  ------------------
  196|   354k|         buf.push_back(get_byte_var(j, vals[i]));
  197|   354k|      }
  198|   354k|   }
  199|  8.43k|}
_ZNK5Botan3TLS15TLS_Data_Reader11assert_doneEv:
   29|  45.1k|      void assert_done() const {
   30|  45.1k|         if(has_remaining()) {
  ------------------
  |  Branch (30:13): [True: 234, False: 44.8k]
  ------------------
   31|    234|            throw_decode_error("Extra bytes at end of message");
   32|    234|         }
   33|  45.1k|      }
_ZNK5Botan3TLS15TLS_Data_Reader11read_so_farEv:
   35|  7.91k|      size_t read_so_far() const { return m_offset; }
_ZNK5Botan3TLS15TLS_Data_Reader15remaining_bytesEv:
   37|   603k|      size_t remaining_bytes() const { return m_buf.size() - m_offset; }
_ZNK5Botan3TLS15TLS_Data_Reader13has_remainingEv:
   39|   106k|      bool has_remaining() const { return (remaining_bytes() > 0); }
_ZN5Botan3TLS15TLS_Data_Reader12discard_nextEm:
   51|    535|      void discard_next(size_t bytes) {
   52|    535|         assert_at_least(bytes);
   53|    535|         m_offset += bytes;
   54|    535|      }
_ZN5Botan3TLS15TLS_Data_Reader12get_uint32_tEv:
   56|    547|      uint32_t get_uint32_t() {
   57|    547|         assert_at_least(4);
   58|    547|         const uint32_t result =
   59|    547|            make_uint32(m_buf[m_offset], m_buf[m_offset + 1], m_buf[m_offset + 2], m_buf[m_offset + 3]);
   60|    547|         m_offset += 4;
   61|    547|         return result;
   62|    547|      }
_ZN5Botan3TLS15TLS_Data_Reader20get_tls_length_valueEm:
  105|  1.37k|      std::vector<uint8_t> get_tls_length_value(size_t len_bytes) {
  106|  1.37k|         return get_fixed<uint8_t>(get_length_field(len_bytes));
  107|  1.37k|      }
_ZN5Botan3TLS15TLS_Data_Reader10get_stringEmmm:
  123|  3.83k|      std::string get_string(size_t len_bytes, size_t min_bytes, size_t max_bytes) {
  124|  3.83k|         std::vector<uint8_t> v = get_range_vector<uint8_t>(len_bytes, min_bytes, max_bytes);
  125|  3.83k|         return bytes_to_string(v);
  126|  3.83k|      }
_ZN5Botan3TLS23append_tls_length_valueINSt3__19allocatorIhEEEEvRNS2_6vectorIhT_EENS2_17basic_string_viewIcNS2_11char_traitsIcEEEEm:
  214|  2.83k|inline void append_tls_length_value(std::vector<uint8_t, Alloc>& buf, std::string_view str, size_t tag_size) {
  215|  2.83k|   append_tls_length_value(buf, as_span_of_bytes(str), tag_size);
  216|  2.83k|}
_ZN5Botan3TLS15TLS_Data_Reader9get_rangeItEENSt3__16vectorIT_NS3_9allocatorIS5_EEEEmmm:
  110|    158|      std::vector<T> get_range(size_t len_bytes, size_t min_elems, size_t max_elems) {
  111|    158|         const size_t num_elems = get_num_elems(len_bytes, sizeof(T), min_elems, max_elems);
  112|       |
  113|    158|         return get_elem<T, std::vector<T>>(num_elems);
  114|    158|      }
_ZN5Botan3TLS23append_tls_length_valueIhNS_16secure_allocatorIhEENSt3__19allocatorIhEEEEvRNS4_6vectorIhT0_EERKNS7_IT_T1_EEm:
  209|     76|                                    size_t tag_size) {
  210|     76|   append_tls_length_value(buf, std::span{vals}, tag_size);
  211|     76|}
_ZN5Botan3TLS23append_tls_length_valueIhNS_16secure_allocatorIhEEEEvRNSt3__16vectorIhT0_EENS4_4spanIKT_Lm18446744073709551615EEEm:
  202|  3.38k|inline void append_tls_length_value(std::vector<uint8_t, Alloc>& buf, std::span<const T> vals, size_t tag_size) {
  203|  3.38k|   append_tls_length_value(buf, vals.data(), vals.size(), tag_size);
  204|  3.38k|}
_ZN5Botan3TLS23append_tls_length_valueIhNS_16secure_allocatorIhEEEEvRNSt3__16vectorIhT0_EEPKT_mm:
  180|  3.38k|                                    size_t tag_size) {
  181|  3.38k|   const size_t T_size = sizeof(T);
  182|  3.38k|   const size_t val_bytes = T_size * vals_size;
  183|       |
  184|  3.38k|   BOTAN_ARG_CHECK(tag_size == 1 || tag_size == 2 || tag_size == 3, "Invalid TLS tag size");
  ------------------
  |  |   35|  3.38k|   do {                                                          \
  |  |   36|  3.38k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  10.1k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 0, False: 3.38k]
  |  |  |  Branch (37:12): [True: 3.38k, False: 0]
  |  |  |  Branch (37:12): [True: 0, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  3.38k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 3.38k]
  |  |  ------------------
  ------------------
  185|       |
  186|  3.38k|   const size_t max_possible_size = (1 << (8 * tag_size)) - 1;
  187|       |
  188|  3.38k|   BOTAN_ARG_CHECK(val_bytes <= max_possible_size, "Value too large to encode");
  ------------------
  |  |   35|  3.38k|   do {                                                          \
  |  |   36|  3.38k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  3.38k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 3.38k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  3.38k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 3.38k]
  |  |  ------------------
  ------------------
  189|       |
  190|  10.1k|   for(size_t i = 0; i != tag_size; ++i) {
  ------------------
  |  Branch (190:22): [True: 6.76k, False: 3.38k]
  ------------------
  191|  6.76k|      buf.push_back(get_byte_var(sizeof(val_bytes) - tag_size + i, val_bytes));
  192|  6.76k|   }
  193|       |
  194|   106k|   for(size_t i = 0; i != vals_size; ++i) {
  ------------------
  |  Branch (194:22): [True: 103k, False: 3.38k]
  ------------------
  195|   206k|      for(size_t j = 0; j != T_size; ++j) {
  ------------------
  |  Branch (195:25): [True: 103k, False: 103k]
  ------------------
  196|   103k|         buf.push_back(get_byte_var(j, vals[i]));
  197|   103k|      }
  198|   103k|   }
  199|  3.38k|}
_ZN5Botan3TLS23append_tls_length_valueIhNS_16secure_allocatorIhEES3_EEvRNSt3__16vectorIhT0_EERKNS5_IT_T1_EEm:
  209|  3.30k|                                    size_t tag_size) {
  210|  3.30k|   append_tls_length_value(buf, std::span{vals}, tag_size);
  211|  3.30k|}

_ZNK5Botan3TLS13Record_Header6neededEv:
   91|  10.8k|      size_t needed() const { return m_needed; }
_ZNK5Botan3TLS13Record_Header4typeEv:
  105|  46.8k|      Record_Type type() const {
  106|  46.8k|         BOTAN_ASSERT_NOMSG(m_needed == 0);
  ------------------
  |  |   84|  46.8k|   do {                                                                     \
  |  |   85|  46.8k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  46.8k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 46.8k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  46.8k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 46.8k]
  |  |  ------------------
  ------------------
  107|  46.8k|         return m_type;
  108|  46.8k|      }
_ZNK5Botan3TLS13Record_Header5epochEv:
  103|  3.82k|      uint16_t epoch() const { return static_cast<uint16_t>(sequence() >> 48); }
_ZNK5Botan3TLS13Record_Header7versionEv:
   93|  16.8k|      Protocol_Version version() const {
   94|  16.8k|         BOTAN_ASSERT_NOMSG(m_needed == 0);
  ------------------
  |  |   84|  16.8k|   do {                                                                     \
  |  |   85|  16.8k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  16.8k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 16.8k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  16.8k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 16.8k]
  |  |  ------------------
  ------------------
   95|  16.8k|         return m_version;
   96|  16.8k|      }
_ZNK5Botan3TLS13Record_Header8sequenceEv:
   98|  13.1k|      uint64_t sequence() const {
   99|  13.1k|         BOTAN_ASSERT_NOMSG(m_needed == 0);
  ------------------
  |  |   84|  13.1k|   do {                                                                     \
  |  |   85|  13.1k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  13.1k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 13.1k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  13.1k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 13.1k]
  |  |  ------------------
  ------------------
  100|  13.1k|         return m_sequence;
  101|  13.1k|      }
_ZN5Botan3TLS23Connection_Cipher_State4aeadEv:
   58|    449|      AEAD_Mode& aead() {
   59|    449|         BOTAN_ASSERT_NONNULL(m_aead.get());
  ------------------
  |  |  123|    449|   do {                                                                                   \
  |  |  124|    449|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 449]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|    449|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 449]
  |  |  ------------------
  ------------------
   60|    449|         return *m_aead;
   61|    449|      }
_ZNK5Botan3TLS23Connection_Cipher_State26nonce_bytes_from_handshakeEv:
   69|    191|      size_t nonce_bytes_from_handshake() const { return m_nonce_bytes_from_handshake; }
_ZNK5Botan3TLS23Connection_Cipher_State23nonce_bytes_from_recordEv:
   71|  1.21k|      size_t nonce_bytes_from_record() const { return m_nonce_bytes_from_record; }
_ZNK5Botan3TLS23Connection_Cipher_State12nonce_formatEv:
   73|    823|      Nonce_Format nonce_format() const { return m_nonce_format; }
_ZN5Botan3TLS13Record_HeaderC2EmNS0_16Protocol_VersionENS0_11Record_TypeE:
   87|  10.2k|            m_needed(0), m_sequence(sequence), m_version(version), m_type(type) {}
_ZN5Botan3TLS13Record_HeaderC2Em:
   89|    597|      explicit Record_Header(size_t needed) : m_needed(needed), m_sequence(0), m_type(Record_Type::Invalid) {}

_ZNK5Botan3TLS10Record_TLS15header_completeEv:
   68|   426k|      bool header_complete() const { return m_header_bytes_stored == TLS_HEADER_SIZE; }
_ZNK5Botan3TLS10Record_TLS8completeEv:
   71|   109k|      bool complete() const { return missing_bytes_hint() == 0; }
_ZN5Botan3TLS10Record_TLSD2Ev:
   47|  57.6k|      ~Record_TLS() = default;
_ZN5Botan3TLS10Record_TLSC2Ev:
   41|  36.0k|      Record_TLS() = default;
_ZN5Botan3TLS10Record_TLSC2EOS1_:
   44|  21.5k|      Record_TLS(Record_TLS&&) = default;

_ZN5Botan3TLS12Record_Layer17clear_read_bufferEv:
   76|      7|      void clear_read_buffer() { m_incoming_records.clear(); }
_ZN5Botan3TLS12Record_LayerD2Ev:
   38|  5.71k|      ~Record_Layer() = default;

_ZN5Botan3TLS25Datagram_Sequence_NumbersC2Ev:
   89|    619|      Datagram_Sequence_Numbers() { Datagram_Sequence_Numbers::reset(); }
_ZN5Botan3TLS25Datagram_Sequence_Numbers5resetEv:
   91|    619|      void reset() override {
   92|    619|         m_write_seqs.clear();
   93|    619|         m_write_seqs[0] = 0;
   94|    619|         m_write_epoch = 0;
   95|    619|         m_read_epoch = 0;
   96|    619|         m_read_windows.clear();
   97|    619|         m_read_windows[0] = Replay_Window{};
   98|    619|      }
_ZN5Botan3TLS27Connection_Sequence_NumbersD2Ev:
   20|  3.83k|      virtual ~Connection_Sequence_Numbers() = default;
_ZNK5Botan3TLS25Datagram_Sequence_Numbers18current_read_epochEv:
  112|    619|      uint16_t current_read_epoch() const override { return m_read_epoch; }
_ZNK5Botan3TLS25Datagram_Sequence_Numbers19current_write_epochEv:
  114|    989|      uint16_t current_write_epoch() const override { return m_write_epoch; }
_ZN5Botan3TLS25Datagram_Sequence_Numbers19next_write_sequenceEt:
  116|    370|      uint64_t next_write_sequence(uint16_t epoch) override {
  117|    370|         auto i = m_write_seqs.find(epoch);
  118|    370|         if(i == m_write_seqs.end()) {
  ------------------
  |  Branch (118:13): [True: 0, False: 370]
  ------------------
  119|      0|            throw Invalid_State("DTLS epoch not found");
  120|      0|         }
  121|    370|         if(i->second > 0x0000FFFFFFFFFFFF) {
  ------------------
  |  Branch (121:13): [True: 0, False: 370]
  ------------------
  122|      0|            throw Invalid_State("DTLS write sequence number overflow");
  123|      0|         }
  124|    370|         return (static_cast<uint64_t>(epoch) << 48) | i->second++;
  125|    370|      }
_ZNK5Botan3TLS25Datagram_Sequence_Numbers12already_seenEm:
  129|  2.75k|      bool already_seen(uint64_t sequence) const override {
  130|  2.75k|         const uint16_t epoch = static_cast<uint16_t>(sequence >> 48);
  131|  2.75k|         const uint64_t record_sequence = sequence & 0x0000FFFFFFFFFFFF;
  132|  2.75k|         const auto window = m_read_windows.find(epoch);
  133|       |
  134|  2.75k|         if(window == m_read_windows.end()) {
  ------------------
  |  Branch (134:13): [True: 17, False: 2.73k]
  ------------------
  135|     17|            return false;
  136|     17|         }
  137|       |
  138|  2.73k|         const size_t window_size = sizeof(window->second.bits) * 8;
  139|       |
  140|  2.73k|         if(record_sequence > window->second.highest) {
  ------------------
  |  Branch (140:13): [True: 2.23k, False: 500]
  ------------------
  141|  2.23k|            return false;
  142|  2.23k|         }
  143|       |
  144|    500|         const uint64_t offset = window->second.highest - record_sequence;
  145|       |
  146|    500|         if(offset >= window_size) {
  ------------------
  |  Branch (146:13): [True: 0, False: 500]
  ------------------
  147|      0|            return true;  // really old?
  148|      0|         }
  149|       |
  150|    500|         return (((window->second.bits >> offset) & 1) == 1);
  151|    500|      }
_ZN5Botan3TLS23Stream_Sequence_NumbersC2Ev:
   39|  3.21k|      Stream_Sequence_Numbers() : m_write_seq_no(0), m_read_seq_no(0), m_read_epoch(0), m_write_epoch(0) {}
_ZN5Botan3TLS23Stream_Sequence_Numbers21new_read_cipher_stateEv:
   48|    377|      void new_read_cipher_state() override {
   49|    377|         m_read_seq_no = 0;
   50|    377|         m_read_epoch++;
   51|    377|      }
_ZN5Botan3TLS23Stream_Sequence_Numbers22new_write_cipher_stateEv:
   53|     79|      void new_write_cipher_state() override {
   54|     79|         m_write_seq_no = 0;
   55|     79|         m_write_epoch++;
   56|     79|      }
_ZNK5Botan3TLS23Stream_Sequence_Numbers18current_read_epochEv:
   58|  6.81k|      uint16_t current_read_epoch() const override { return m_read_epoch; }
_ZNK5Botan3TLS23Stream_Sequence_Numbers19current_write_epochEv:
   60|  13.5k|      uint16_t current_write_epoch() const override { return m_write_epoch; }
_ZN5Botan3TLS23Stream_Sequence_Numbers19next_write_sequenceEt:
   62|  10.2k|      uint64_t next_write_sequence(uint16_t /*epoch*/) override {
   63|  10.2k|         if(m_write_seq_no == std::numeric_limits<uint64_t>::max()) {
  ------------------
  |  Branch (63:13): [True: 0, False: 10.2k]
  ------------------
   64|      0|            throw Invalid_State("TLS 1.2 write sequence number overflow");
   65|      0|         }
   66|  10.2k|         return m_write_seq_no++;
   67|  10.2k|      }
_ZN5Botan3TLS23Stream_Sequence_Numbers18next_read_sequenceEv:
   69|  3.22k|      uint64_t next_read_sequence() override { return m_read_seq_no; }

_ZN5Botan3TLS14Server_Impl_1220create_for_downgradeERKNS0_12Channel_Impl21Downgrade_InformationE:
   69|  3.21k|         const Channel_Impl::Downgrade_Information& downgrade_info) {
   70|  3.21k|         return std::make_shared<Server_Impl_12>(Private{}, downgrade_info);
   71|  3.21k|      }
_ZN5Botan3TLS14Server_Impl_12C2ENS0_12Channel_Impl7PrivateERKNS2_21Downgrade_InformationE:
   74|  3.21k|            Channel_Impl_12(downgrade_info.callbacks,
   75|  3.21k|                            downgrade_info.session_manager,
   76|  3.21k|                            downgrade_info.rng,
   77|  3.21k|                            downgrade_info.policy,
   78|  3.21k|                            true /* is_server*/,
   79|  3.21k|                            false /* TLS 1.3 does not support DTLS yet */,
   80|  3.21k|                            downgrade_info.io_buffer_size),
   81|  3.21k|            m_creds(downgrade_info.creds) {}
_ZN5Botan3TLS14Server_Impl_12C2ENS0_12Channel_Impl7PrivateERKNSt3__110shared_ptrINS0_9CallbacksEEERKNS5_INS0_15Session_ManagerEEERKNS5_INS_19Credentials_ManagerEEERKNS5_IKNS0_6PolicyEEERKNS5_INS_21RandomNumberGeneratorEEEbm:
   63|    767|            Channel_Impl_12(callbacks, session_manager, rng, policy, true, is_datagram, reserved_io_buffer_size),
   64|    767|            m_creds(creds) {}
_ZNK5Botan3TLS14Server_Impl_1220application_protocolEv:
   92|     79|      std::string application_protocol() const override { return m_next_protocol; }

_ZN5Botan3TLS14Server_Impl_13C2ENS0_12Channel_Impl7PrivateERKNSt3__110shared_ptrINS0_9CallbacksEEERKNS5_INS0_15Session_ManagerEEERKNS5_INS_19Credentials_ManagerEEERKNS5_IKNS0_6PolicyEEERKNS5_INS_21RandomNumberGeneratorEEE:
   35|  5.71k|            Channel_Impl_13(callbacks, session_manager, credentials_manager, rng, policy, true /* is_server */),
   36|  5.71k|            m_handshake(std::make_unique<Pending_Handshake>()) {}

_ZNK5Botan3TLS12Session_Keys15client_aead_keyEv:
   26|    377|      const secure_vector<uint8_t>& client_aead_key() const { return m_c_aead; }
_ZNK5Botan3TLS12Session_Keys15server_aead_keyEv:
   31|     79|      const secure_vector<uint8_t>& server_aead_key() const { return m_s_aead; }
_ZNK5Botan3TLS12Session_Keys12client_nonceEv:
   36|    377|      const std::vector<uint8_t>& client_nonce() const { return m_c_nonce; }
_ZNK5Botan3TLS12Session_Keys12server_nonceEv:
   41|     79|      const std::vector<uint8_t>& server_nonce() const { return m_s_nonce; }
_ZNK5Botan3TLS12Session_Keys13master_secretEv:
   46|    316|      const secure_vector<uint8_t>& master_secret() const { return m_master_sec; }
_ZNK5Botan3TLS12Session_Keys8aead_keyENS0_15Connection_SideE:
   48|    456|      const secure_vector<uint8_t>& aead_key(Connection_Side side) const {
   49|    456|         return (side == Connection_Side::Client) ? client_aead_key() : server_aead_key();
  ------------------
  |  Branch (49:17): [True: 377, False: 79]
  ------------------
   50|    456|      }
_ZNK5Botan3TLS12Session_Keys5nonceENS0_15Connection_SideE:
   52|    456|      const std::vector<uint8_t>& nonce(Connection_Side side) const {
   53|    456|         return (side == Connection_Side::Client) ? client_nonce() : server_nonce();
  ------------------
  |  Branch (53:17): [True: 377, False: 79]
  ------------------
   54|    456|      }
_ZN5Botan3TLS12Session_KeysC2Ev:
   56|  3.83k|      Session_Keys() = default;

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

_ZN5Botan17is_sub_element_ofERKNS_3OIDESt16initializer_listIjE:
   22|  25.9k|inline std::optional<uint32_t> is_sub_element_of(const OID& oid, std::initializer_list<uint32_t> prefix) {
   23|  25.9k|   const auto& c = oid.get_components();
   24|       |
   25|  25.9k|   if(c.size() != prefix.size() + 1) {
  ------------------
  |  Branch (25:7): [True: 0, False: 25.9k]
  ------------------
   26|      0|      return {};
   27|      0|   }
   28|       |
   29|  25.9k|   if(!std::equal(c.begin(), c.end() - 1, prefix.begin(), prefix.end())) {
  ------------------
  |  Branch (29:7): [True: 0, False: 25.9k]
  ------------------
   30|      0|      return {};
   31|      0|   }
   32|       |
   33|  25.9k|   return c[c.size() - 1];
   34|  25.9k|}

_ZN5Botan9AEAD_Mode19set_associated_dataENSt3__14spanIKhLm18446744073709551615EEE:
   59|    437|      void set_associated_data(std::span<const uint8_t> ad) { set_associated_data_n(0, ad); }

_ZN5Botan21Allocator_InitializerC2Ev:
   57|      1|      Allocator_Initializer() { initialize_allocator(); }

_ZN5Botan11ASN1_ObjectC2ERKS0_:
  151|   131k|      ASN1_Object(const ASN1_Object&) = default;
_ZN5Botan11ASN1_ObjectD2Ev:
  168|   971k|      virtual ~ASN1_Object() = default;
_ZN5Botan11ASN1_ObjectC2EOS0_:
  161|   342k|      ASN1_Object(ASN1_Object&&) = default;
_ZNK5Botan14ASN1_BitString5bytesEv:
  206|  39.0k|      std::span<const uint8_t> bytes() const { return std::span{m_bytes}; }
_ZNK5Botan14ASN1_BitString11unused_bitsEv:
  211|  19.5k|      size_t unused_bits() const { return m_unused_bits; }
_ZNK5Botan10BER_Object6is_setEv:
  267|  1.47M|      bool is_set() const { return m_type_tag != ASN1_Type::NoObject; }
_ZNK5Botan10BER_Object7taggingEv:
  272|   588k|      uint32_t tagging() const { return type_tag() | class_tag(); }
_ZNK5Botan10BER_Object8type_tagEv:
  277|   594k|      ASN1_Type type_tag() const { return m_type_tag; }
_ZNK5Botan10BER_Object9class_tagEv:
  282|   679k|      ASN1_Class class_tag() const { return m_class_tag; }
_ZNK5Botan10BER_Object4typeEv:
  287|   104k|      ASN1_Type type() const { return m_type_tag; }
_ZNK5Botan10BER_Object9get_classEv:
  292|  52.4k|      ASN1_Class get_class() const { return m_class_tag; }
_ZNK5Botan10BER_Object4bitsEv:
  298|  1.42M|      const uint8_t* bits() const { return m_value.data(); }
_ZNK5Botan10BER_Object6lengthEv:
  303|  3.57M|      size_t length() const { return m_value.size(); }
_ZNK5Botan10BER_Object4dataEv:
  308|   202k|      std::span<const uint8_t> data() const { return std::span{m_value}; }
_ZN5Botan10BER_Object12mutable_bitsEm:
  344|   490k|      uint8_t* mutable_bits(size_t length) {
  345|   490k|         m_value.resize(length);
  346|   490k|         return m_value.data();
  347|   490k|      }
_ZNK5Botan3OID5emptyEv:
  468|  71.6k|      bool empty() const { return m_id.empty(); }
_ZNK5Botan3OID9has_valueEv:
  474|  54.4k|      bool has_value() const { return !empty(); }
_ZNK5Botan3OIDeqERKS0_:
  510|  36.1k|      bool operator==(const OID& other) const { return m_id == other.m_id; }
_ZNK5Botan3OID14get_componentsEv:
  530|   753k|      const std::vector<uint32_t>& get_components() const {
  531|   753k|         return m_id;
  532|   753k|      }
_ZNK5Botan11ASN1_String5valueEv:
  590|  39.2k|      const std::string& value() const { return m_utf8_str; }
_ZNK5Botan19AlgorithmIdentifier3oidEv:
  688|  74.7k|      const OID& oid() const { return m_oid; }
_ZNK5Botan19AlgorithmIdentifier10parametersEv:
  693|  61.7k|      const std::vector<uint8_t>& parameters() const { return m_parameters; }
_ZNK5Botan19AlgorithmIdentifier20parameters_are_emptyEv:
  715|  32.5k|      bool parameters_are_empty() const { return m_parameters.empty(); }
_ZNK5Botan19AlgorithmIdentifier28parameters_are_null_or_emptyEv:
  720|  26.1k|      bool parameters_are_null_or_empty() const { return parameters_are_empty() || parameters_are_null(); }
  ------------------
  |  Branch (720:58): [True: 13.0k, False: 13.0k]
  |  Branch (720:84): [True: 1, False: 13.0k]
  ------------------
_ZN5BotanorENS_10ASN1_ClassES0_:
   91|   339k|inline ASN1_Class operator|(ASN1_Class x, ASN1_Class y) {
   92|   339k|   return static_cast<ASN1_Class>(static_cast<uint32_t>(x) | static_cast<uint32_t>(y));
   93|   339k|}
_ZN5BotanorENS_9ASN1_TypeENS_10ASN1_ClassE:
   98|   588k|inline uint32_t operator|(ASN1_Type x, ASN1_Class y) {
   99|   588k|   return static_cast<uint32_t>(x) | static_cast<uint32_t>(y);
  100|   588k|}
_ZN5BotanorENS_10ASN1_ClassENS_9ASN1_TypeE:
  105|  98.0k|inline uint32_t operator|(ASN1_Class x, ASN1_Type y) {
  106|  98.0k|   return static_cast<uint32_t>(x) | static_cast<uint32_t>(y);
  107|  98.0k|}
_ZN5BotanneERKNS_3OIDES2_:
  561|  6.49k|inline bool operator!=(const OID& a, const OID& b) {
  562|  6.49k|   return !(a == b);
  563|  6.49k|}
_ZNKSt3__14hashIN5Botan3OIDEEclERKS2_:
  761|      4|      size_t operator()(const Botan::OID& oid) const noexcept { return static_cast<size_t>(oid.hash_code()); }
_ZN5Botan19AlgorithmIdentifierC2Ev:
  655|  49.5k|      AlgorithmIdentifier() = default;
_ZN5Botan11ASN1_ObjectC2Ev:
  146|   497k|      ASN1_Object() = default;
_ZN5Botan3OIDC2Ev:
  423|   134k|      explicit OID() = default;
_ZN5Botan11ASN1_ObjectaSERKS0_:
  156|  12.9k|      ASN1_Object& operator=(const ASN1_Object&) = default;
_ZN5Botan11ASN1_ObjectaSEOS0_:
  166|  19.7k|      ASN1_Object& operator=(ASN1_Object&&) = default;
_ZN5Botan10BER_ObjectC2Ev:
  239|   896k|      BER_Object() = default;
_ZN5Botan10BER_ObjectaSEOS0_:
  259|   220k|      BER_Object& operator=(BER_Object&& other) = default;
_ZN5Botan14ASN1_BitStringC2Ev:
  179|  19.5k|      ASN1_BitString() = default;
_ZN5Botan10BER_ObjectC2EOS0_:
  249|   261k|      BER_Object(BER_Object&& other) = default;

_ZN5Botan9ASN1_TimeC2Ev:
   42|  13.1k|      ASN1_Time() = default;

_ZN5Botan13ignore_paramsIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEEvDpRKT_:
  149|    498|constexpr void ignore_params([[maybe_unused]] const T&... args) {}
_ZN5Botan13ignore_paramsIJNS_3TLS15Session_SummaryEEEEvDpRKT_:
  149|     79|constexpr void ignore_params([[maybe_unused]] const T&... args) {}
_ZN5Botan13ignore_paramsIJNSt3__16vectorINS_16X509_CertificateENS1_9allocatorIS3_EEEENS_3TLS26Certificate_Status_RequestEEEEvDpRKT_:
  149|      1|constexpr void ignore_params([[maybe_unused]] const T&... args) {}
_ZN5Botan13ignore_paramsIJNS_3TLS16Protocol_VersionEEEEvDpRKT_:
  149|    456|constexpr void ignore_params([[maybe_unused]] const T&... args) {}
_ZN5Botan13ignore_paramsIJPKhmEEEvDpRKT_:
  149|  11.5k|constexpr void ignore_params([[maybe_unused]] const T&... args) {}
_ZN5Botan13ignore_paramsIJjEEEvDpRKT_:
  149|   221k|constexpr void ignore_params([[maybe_unused]] const T&... args) {}
_ZN5Botan13ignore_paramsIJPKtmEEEvDpRKT_:
  149|    321|constexpr void ignore_params([[maybe_unused]] const T&... args) {}
_ZN5Botan13ignore_paramsIJPKmmEEEvDpRKT_:
  149|  10.4M|constexpr void ignore_params([[maybe_unused]] const T&... args) {}
_ZN5Botan13ignore_paramsIJNS_3TLS20Client_Hello_12_ShimEEEEvDpRKT_:
  149|  3.21k|constexpr void ignore_params([[maybe_unused]] const T&... args) {}

_ZN5Botan11BER_Decoder6Limits3DEREv:
   43|  72.4k|            static Limits DER() { return Limits(false, 0, false, DefaultMaxObjectSize, false); }
_ZN5Botan11BER_Decoder6LimitsC2EbmbNSt3__18optionalImEEb:
  134|  72.4k|                  m_allow_ber(allow_ber),
  135|  72.4k|                  m_max_nested_indef(max_nested_indef),
  136|  72.4k|                  m_allow_standalone_eoc(allow_standalone_eoc),
  137|  72.4k|                  m_max_object_size(max_object_size),
  138|  72.4k|                  m_reject_default_value_encoding(reject_default_value_encoding) {}
_ZN5Botan11BER_Decoder14start_sequenceEv:
  276|   164k|      BER_Decoder start_sequence() { return start_cons(ASN1_Type::Sequence, ASN1_Class::Universal); }
_ZN5Botan11BER_Decoder16decode_and_checkImEERS0_RKT_NSt3__117basic_string_viewIcNS6_11char_traitsIcEEEE:
  699|  12.9k|      BER_Decoder& decode_and_check(const T& expected, std::string_view error_msg) {
  700|  12.9k|         T actual;
  701|  12.9k|         decode(actual);
  702|       |
  703|  12.9k|         if(actual != expected) {
  ------------------
  |  Branch (703:13): [True: 0, False: 12.9k]
  ------------------
  704|      0|            throw Decoding_Error(error_msg);
  705|      0|         }
  706|       |
  707|  12.9k|         return (*this);
  708|  12.9k|      }
_ZN5Botan11BER_Decoder6decodeERm:
  361|  19.4k|      BER_Decoder& decode(size_t& out) { return decode(out, ASN1_Type::Integer, ASN1_Class::Universal); }
_ZN5Botan11BER_Decoder6decodeINS_16secure_allocatorIhEEEERS0_RNSt3__16vectorIhT_EENS_9ASN1_TypeE:
  384|  12.9k|      BER_Decoder& decode(std::vector<uint8_t, Alloc>& out, ASN1_Type real_type) {
  385|  12.9k|         return decode(out, real_type, real_type, ASN1_Class::Universal);
  386|  12.9k|      }
_ZNK5Botan11BER_Decoder6Limits18allow_ber_encodingEv:
   57|  1.23M|            bool allow_ber_encoding() const { return m_allow_ber; }
_ZNK5Botan11BER_Decoder6Limits20require_der_encodingEv:
   62|   745k|            bool require_der_encoding() const { return !allow_ber_encoding(); }
_ZNK5Botan11BER_Decoder6Limits15max_object_sizeEv:
   81|   490k|            std::optional<size_t> max_object_size() const { return m_max_object_size; }
_ZN5Botan11BER_DecoderC2ERKNS_10BER_ObjectENS0_6LimitsE:
  168|  19.4k|            BER_Decoder(obj.data(), limits) {}
_ZNK5Botan11BER_Decoder6limitsEv:
  198|   216k|      Limits limits() const { return m_limits; }
_ZN5Botan11BER_Decoder8get_nextERNS_10BER_ObjectE:
  211|  12.9k|      BER_Decoder& get_next(BER_Object& ber) {
  212|  12.9k|         ber = get_next_object();
  213|  12.9k|         return (*this);
  214|  12.9k|      }
_ZN5Botan11BER_Decoder9start_setEv:
  282|  39.3k|      BER_Decoder start_set() { return start_cons(ASN1_Type::Set, ASN1_Class::Universal); }
_ZN5Botan11BER_Decoder6decodeERNS_6BigIntE:
  366|  6.57k|      BER_Decoder& decode(BigInt& out) { return decode(out, ASN1_Type::Integer, ASN1_Class::Universal); }
_ZN5Botan11BER_Decoder6decodeINSt3__19allocatorIhEEEERS0_RNS2_6vectorIhT_EENS_9ASN1_TypeE:
  384|  32.4k|      BER_Decoder& decode(std::vector<uint8_t, Alloc>& out, ASN1_Type real_type) {
  385|  32.4k|         return decode(out, real_type, real_type, ASN1_Class::Universal);
  386|  32.4k|      }
_ZN5Botan11BER_Decoder9raw_bytesINSt3__19allocatorIhEEEERS0_RNS2_6vectorIhT_EE:
  339|  46.2k|      BER_Decoder& raw_bytes(std::vector<uint8_t, Alloc>& out) {
  340|  46.2k|         out.clear();
  341|  46.2k|         uint8_t buf[64];
  342|   118k|         while(const size_t got = this->read_bytes(std::span{buf})) {
  ------------------
  |  Branch (342:29): [True: 72.1k, False: 46.2k]
  ------------------
  343|  72.1k|            out.insert(out.end(), buf, buf + got);
  344|  72.1k|         }
  345|  46.2k|         return (*this);
  346|  46.2k|      }
_ZN5Botan11BER_Decoder30decode_octet_aligned_bitstringINSt3__19allocatorIhEEEERS0_RNS2_6vectorIhT_EENS_9ASN1_TypeENS_10ASN1_ClassE:
  462|  13.0k|                                                  ASN1_Class class_tag = ASN1_Class::Universal) {
  463|  13.0k|         ASN1_BitString bits;
  464|  13.0k|         decode_bitstring(bits, type_tag, class_tag);
  465|       |
  466|  13.0k|         if(bits.unused_bits() != 0) {
  ------------------
  |  Branch (466:13): [True: 3, False: 13.0k]
  ------------------
  467|      3|            throw Decoding_Error("Expected octet-aligned BIT STRING");
  468|      3|         }
  469|       |
  470|  13.0k|         out.assign(bits.bytes().begin(), bits.bytes().end());
  471|  13.0k|         return (*this);
  472|  13.0k|      }
_ZN5Botan11BER_Decoder15decode_optionalImEERS0_RT_NS_9ASN1_TypeENS_10ASN1_ClassERKS3_:
  551|  6.57k|      BER_Decoder& decode_optional(T& out, ASN1_Type type_tag, ASN1_Class class_tag, const T& default_value = T()) {
  552|  6.57k|         std::optional<T> optval;
  553|  6.57k|         this->decode_optional(optval, type_tag, class_tag);
  554|  6.57k|         out = optval ? *optval : default_value;
  ------------------
  |  Branch (554:16): [True: 6.48k, False: 91]
  ------------------
  555|  6.57k|         return (*this);
  556|  6.57k|      }
_ZN5Botan11BER_Decoder15decode_optionalImEERS0_RNSt3__18optionalIT_EENS_9ASN1_TypeENS_10ASN1_ClassE:
  827|  13.0k|BER_Decoder& BER_Decoder::decode_optional(std::optional<T>& optval, ASN1_Type type_tag, ASN1_Class class_tag) {
  828|  13.0k|   BER_Object obj = get_next_object();
  829|       |
  830|  13.0k|   if(obj.is_a(type_tag, class_tag)) {
  ------------------
  |  Branch (830:7): [True: 6.48k, False: 6.57k]
  ------------------
  831|  6.48k|      T out{};
  832|  6.48k|      if(class_tag == ASN1_Class::ExplicitContextSpecific) {
  ------------------
  |  Branch (832:10): [True: 6.48k, False: 0]
  ------------------
  833|  6.48k|         BER_Decoder(obj, m_limits).decode(out).verify_end();
  834|  6.48k|      } else {
  835|      0|         this->push_back(std::move(obj));
  836|       |         if constexpr(std::is_base_of_v<ASN1_Object, T>) {
  837|       |            // Object types check the tag in decode_from; a re-tagging
  838|       |            // implicit override of an object is not supported here
  839|       |            this->decode(out);
  840|      0|         } else {
  841|      0|            this->decode(out, type_tag, class_tag);
  842|      0|         }
  843|      0|      }
  844|  6.48k|      optval = std::move(out);
  845|  6.57k|   } else {
  846|  6.57k|      this->push_back(std::move(obj));
  847|  6.57k|      optval = std::nullopt;
  848|  6.57k|   }
  849|       |
  850|  13.0k|   return (*this);
  851|  13.0k|}
_ZN5Botan11BER_Decoder22decode_optional_stringINSt3__19allocatorIhEEEERS0_RNS2_6vectorIhT_EENS_9ASN1_TypeEjNS_10ASN1_ClassE:
  722|  12.9k|                                          ASN1_Class class_tag = ASN1_Class::ContextSpecific) {
  723|  12.9k|         BER_Object obj = get_next_object();
  724|       |
  725|  12.9k|         const ASN1_Type type_tag = static_cast<ASN1_Type>(expected_tag);
  726|       |
  727|  12.9k|         if(obj.is_a(type_tag, class_tag)) {
  ------------------
  |  Branch (727:13): [True: 0, False: 12.9k]
  ------------------
  728|      0|            if(class_tag == ASN1_Class::ExplicitContextSpecific) {
  ------------------
  |  Branch (728:16): [True: 0, False: 0]
  ------------------
  729|      0|               BER_Decoder(obj, m_limits).decode(out, real_type).verify_end();
  730|      0|            } else {
  731|      0|               push_back(std::move(obj));
  732|      0|               decode(out, real_type, type_tag, class_tag);
  733|      0|            }
  734|  12.9k|         } else {
  735|  12.9k|            out.clear();
  736|  12.9k|            push_back(std::move(obj));
  737|  12.9k|         }
  738|       |
  739|  12.9k|         return (*this);
  740|  12.9k|      }
_ZN5Botan11BER_Decoder15decode_optionalIbEERS0_RT_NS_9ASN1_TypeENS_10ASN1_ClassERKS3_:
  551|  32.4k|      BER_Decoder& decode_optional(T& out, ASN1_Type type_tag, ASN1_Class class_tag, const T& default_value = T()) {
  552|  32.4k|         std::optional<T> optval;
  553|  32.4k|         this->decode_optional(optval, type_tag, class_tag);
  554|  32.4k|         out = optval ? *optval : default_value;
  ------------------
  |  Branch (554:16): [True: 6.48k, False: 25.9k]
  ------------------
  555|  32.4k|         return (*this);
  556|  32.4k|      }
_ZN5Botan11BER_Decoder15decode_optionalIbEERS0_RNSt3__18optionalIT_EENS_9ASN1_TypeENS_10ASN1_ClassE:
  827|  32.4k|BER_Decoder& BER_Decoder::decode_optional(std::optional<T>& optval, ASN1_Type type_tag, ASN1_Class class_tag) {
  828|  32.4k|   BER_Object obj = get_next_object();
  829|       |
  830|  32.4k|   if(obj.is_a(type_tag, class_tag)) {
  ------------------
  |  Branch (830:7): [True: 6.48k, False: 25.9k]
  ------------------
  831|  6.48k|      T out{};
  832|  6.48k|      if(class_tag == ASN1_Class::ExplicitContextSpecific) {
  ------------------
  |  Branch (832:10): [True: 0, False: 6.48k]
  ------------------
  833|      0|         BER_Decoder(obj, m_limits).decode(out).verify_end();
  834|  6.48k|      } else {
  835|  6.48k|         this->push_back(std::move(obj));
  836|       |         if constexpr(std::is_base_of_v<ASN1_Object, T>) {
  837|       |            // Object types check the tag in decode_from; a re-tagging
  838|       |            // implicit override of an object is not supported here
  839|       |            this->decode(out);
  840|  6.48k|         } else {
  841|  6.48k|            this->decode(out, type_tag, class_tag);
  842|  6.48k|         }
  843|  6.48k|      }
  844|  6.48k|      optval = std::move(out);
  845|  25.9k|   } else {
  846|  25.9k|      this->push_back(std::move(obj));
  847|  25.9k|      optval = std::nullopt;
  848|  25.9k|   }
  849|       |
  850|  32.4k|   return (*this);
  851|  32.4k|}
x509_ext.cpp:_ZN5Botan11BER_Decoder21decode_optional_fieldIZNS_14Cert_Extension16Authority_Key_ID12decode_innerERKNSt3__16vectorIhNS4_9allocatorIhEEEEE3$_0EERS0_jNS_10ASN1_ClassEOT_:
  624|  6.48k|      BER_Decoder& decode_optional_field(uint32_t tag_no, ASN1_Class class_tag, F&& fn) {
  625|  6.48k|         if(peek_next_object().is_a(tag_no, class_tag)) {
  ------------------
  |  Branch (625:13): [True: 6.48k, False: 0]
  ------------------
  626|  6.48k|            std::forward<F>(fn)(*this);
  627|  6.48k|         }
  628|  6.48k|         return (*this);
  629|  6.48k|      }
x509_ext.cpp:_ZN5Botan11BER_Decoder21decode_optional_fieldIZNS_14Cert_Extension16Authority_Key_ID12decode_innerERKNSt3__16vectorIhNS4_9allocatorIhEEEEE3$_1EERS0_jNS_10ASN1_ClassEOT_:
  624|  6.48k|      BER_Decoder& decode_optional_field(uint32_t tag_no, ASN1_Class class_tag, F&& fn) {
  625|  6.48k|         if(peek_next_object().is_a(tag_no, class_tag)) {
  ------------------
  |  Branch (625:13): [True: 0, False: 6.48k]
  ------------------
  626|      0|            std::forward<F>(fn)(*this);
  627|      0|         }
  628|  6.48k|         return (*this);
  629|  6.48k|      }
x509_ext.cpp:_ZN5Botan11BER_Decoder21decode_optional_fieldIZNS_14Cert_Extension16Authority_Key_ID12decode_innerERKNSt3__16vectorIhNS4_9allocatorIhEEEEE3$_2EERS0_jNS_10ASN1_ClassEOT_:
  624|  6.48k|      BER_Decoder& decode_optional_field(uint32_t tag_no, ASN1_Class class_tag, F&& fn) {
  625|  6.48k|         if(peek_next_object().is_a(tag_no, class_tag)) {
  ------------------
  |  Branch (625:13): [True: 0, False: 6.48k]
  ------------------
  626|      0|            std::forward<F>(fn)(*this);
  627|      0|         }
  628|  6.48k|         return (*this);
  629|  6.48k|      }
_ZN5Botan11BER_Decoder15decode_optionalINS_3OIDEEERS0_RT_NS_9ASN1_TypeENS_10ASN1_ClassERKS4_:
  551|  6.48k|      BER_Decoder& decode_optional(T& out, ASN1_Type type_tag, ASN1_Class class_tag, const T& default_value = T()) {
  552|  6.48k|         std::optional<T> optval;
  553|  6.48k|         this->decode_optional(optval, type_tag, class_tag);
  554|  6.48k|         out = optval ? *optval : default_value;
  ------------------
  |  Branch (554:16): [True: 0, False: 6.48k]
  ------------------
  555|  6.48k|         return (*this);
  556|  6.48k|      }
_ZN5Botan11BER_Decoder15decode_optionalINS_3OIDEEERS0_RNSt3__18optionalIT_EENS_9ASN1_TypeENS_10ASN1_ClassE:
  827|  6.48k|BER_Decoder& BER_Decoder::decode_optional(std::optional<T>& optval, ASN1_Type type_tag, ASN1_Class class_tag) {
  828|  6.48k|   BER_Object obj = get_next_object();
  829|       |
  830|  6.48k|   if(obj.is_a(type_tag, class_tag)) {
  ------------------
  |  Branch (830:7): [True: 0, False: 6.48k]
  ------------------
  831|      0|      T out{};
  832|      0|      if(class_tag == ASN1_Class::ExplicitContextSpecific) {
  ------------------
  |  Branch (832:10): [True: 0, False: 0]
  ------------------
  833|      0|         BER_Decoder(obj, m_limits).decode(out).verify_end();
  834|      0|      } else {
  835|      0|         this->push_back(std::move(obj));
  836|      0|         if constexpr(std::is_base_of_v<ASN1_Object, T>) {
  837|       |            // Object types check the tag in decode_from; a re-tagging
  838|       |            // implicit override of an object is not supported here
  839|      0|            this->decode(out);
  840|       |         } else {
  841|       |            this->decode(out, type_tag, class_tag);
  842|       |         }
  843|      0|      }
  844|      0|      optval = std::move(out);
  845|  6.48k|   } else {
  846|  6.48k|      this->push_back(std::move(obj));
  847|  6.48k|      optval = std::nullopt;
  848|  6.48k|   }
  849|       |
  850|  6.48k|   return (*this);
  851|  6.48k|}
_ZN5Botan11BER_Decoder39decode_optional_octet_aligned_bitstringINS_16secure_allocatorIhEEEERS0_RNSt3__16vectorIhT_EEjNS_10ASN1_ClassE:
  769|  6.48k|                                                           ASN1_Class class_tag = ASN1_Class::ContextSpecific) {
  770|  6.48k|         BER_Object obj = get_next_object();
  771|       |
  772|  6.48k|         const ASN1_Type type_tag = static_cast<ASN1_Type>(expected_tag);
  773|       |
  774|  6.48k|         if(obj.is_a(type_tag, class_tag)) {
  ------------------
  |  Branch (774:13): [True: 6.48k, False: 0]
  ------------------
  775|  6.48k|            if(class_tag == ASN1_Class::ExplicitContextSpecific) {
  ------------------
  |  Branch (775:16): [True: 6.48k, False: 0]
  ------------------
  776|  6.48k|               BER_Decoder(obj, m_limits).decode_octet_aligned_bitstring(out).verify_end();
  777|  6.48k|            } else {
  778|      0|               push_back(std::move(obj));
  779|      0|               decode_octet_aligned_bitstring(out, type_tag, class_tag);
  780|      0|            }
  781|  6.48k|         } else {
  782|      0|            out.clear();
  783|      0|            push_back(std::move(obj));
  784|      0|         }
  785|       |
  786|  6.48k|         return (*this);
  787|  6.48k|      }
_ZN5Botan11BER_Decoder30decode_octet_aligned_bitstringINS_16secure_allocatorIhEEEERS0_RNSt3__16vectorIhT_EENS_9ASN1_TypeENS_10ASN1_ClassE:
  462|  6.48k|                                                  ASN1_Class class_tag = ASN1_Class::Universal) {
  463|  6.48k|         ASN1_BitString bits;
  464|  6.48k|         decode_bitstring(bits, type_tag, class_tag);
  465|       |
  466|  6.48k|         if(bits.unused_bits() != 0) {
  ------------------
  |  Branch (466:13): [True: 0, False: 6.48k]
  ------------------
  467|      0|            throw Decoding_Error("Expected octet-aligned BIT STRING");
  468|      0|         }
  469|       |
  470|  6.48k|         out.assign(bits.bytes().begin(), bits.bytes().end());
  471|  6.48k|         return (*this);
  472|  6.48k|      }

_ZN5BotangeERKNS_6BigIntES2_:
 1343|  21.3k|inline bool operator>=(const BigInt& a, const BigInt& b) {
 1344|  21.3k|   return (a.cmp(b) >= 0);
 1345|  21.3k|}
_ZN5BotanmiERKNS_6BigIntEm:
 1229|      6|inline BigInt operator-(const BigInt& x, word y) {
 1230|      6|   return BigInt::add2(x, &y, 1, BigInt::Negative);
 1231|      6|}
_ZN5Botan6BigIntD2Ev:
  185|   158k|      ~BigInt() { _const_time_unpoison(); }
_ZN5Botan6BigIntC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   98|     36|      explicit BigInt(std::string_view str) { *this = BigInt::from_string(str); }
_ZN5Botan6BigIntC2EOS0_:
  183|  21.4k|      BigInt(BigInt&& other) noexcept { this->swap(other); }
_ZN5Botan6BigIntaSEOS0_:
  190|  26.0k|      BigInt& operator=(BigInt&& other) noexcept {
  191|  26.0k|         if(this != &other) {
  ------------------
  |  Branch (191:13): [True: 26.0k, False: 0]
  ------------------
  192|  26.0k|            this->swap(other);
  193|  26.0k|         }
  194|       |
  195|  26.0k|         return (*this);
  196|  26.0k|      }
_ZN5Botan6BigInt4swapERS0_:
  207|  79.5k|      void swap(BigInt& other) noexcept {
  208|  79.5k|         m_data.swap(other.m_data);
  209|  79.5k|         std::swap(m_signedness, other.m_signedness);
  210|  79.5k|      }
_ZN5Botan6BigInt5clearEv:
  441|  56.4k|      void clear() {
  442|  56.4k|         m_data.set_to_zero();
  443|  56.4k|         m_signedness = Positive;
  444|  56.4k|      }
_ZNK5Botan6BigInt7is_evenEv:
  481|      6|      bool is_even() const { return !get_bit(0); }
_ZNK5Botan6BigInt6signumEv:
  493|   163k|      int signum() const {
  494|   163k|         if(sig_words() == 0) {
  ------------------
  |  Branch (494:13): [True: 6.48k, False: 157k]
  ------------------
  495|  6.48k|            return 0;
  496|  6.48k|         }
  497|   157k|         return (sign() == Negative) ? -1 : 1;
  ------------------
  |  Branch (497:17): [True: 38, False: 156k]
  ------------------
  498|   163k|      }
_ZNK5Botan6BigInt7is_zeroEv:
  510|     25|      bool is_zero() const { return sig_words() == 0; }
_ZN5Botan6BigInt7set_bitEm:
  516|     24|      void set_bit(size_t n) { conditionally_set_bit(n, true); }
_ZN5Botan6BigInt21conditionally_set_bitEmb:
  526|     24|      void conditionally_set_bit(size_t n, bool set_it) {
  527|     24|         const size_t which = n / (sizeof(word) * 8);
  528|     24|         const word mask = static_cast<word>(set_it) << (n % (sizeof(word) * 8));
  529|     24|         m_data.set_word_at(which, word_at(which) | mask);
  530|     24|      }
_ZNK5Botan6BigInt7get_bitEm:
  549|      6|      bool get_bit(size_t n) const { return ((word_at(n / (sizeof(word) * 8)) >> (n % (sizeof(word) * 8))) & 1) == 1; }
_ZNK5Botan6BigInt7word_atEm:
  601|   159k|      word word_at(size_t n) const { return m_data.get_word_at(n); }
_ZNK5Botan6BigInt4signEv:
  641|   157k|      Sign sign() const { return (m_signedness); }
_ZN5Botan6BigInt8set_signENS0_4SignE:
  663|     73|      void set_sign(Sign sign) {
  664|     73|         if(sign == Negative && is_zero()) {
  ------------------
  |  Branch (664:13): [True: 19, False: 54]
  |  Branch (664:33): [True: 0, False: 19]
  ------------------
  665|      0|            sign = Positive;
  666|      0|         }
  667|       |
  668|     73|         m_signedness = sign;
  669|     73|      }
_ZNK5Botan6BigInt4sizeEv:
  681|   150k|      size_t size() const { return m_data.size(); }
_ZNK5Botan6BigInt9sig_wordsEv:
  687|   310k|      size_t sig_words() const { return m_data.sig_words(); }
_ZN5Botan6BigInt12mutable_dataEv:
  712|  21.4k|      BOTAN_DEPRECATED("Deprecated no replacement") word* mutable_data() { return m_data.mutable_data(); }
_ZNK5Botan6BigInt4dataEv:
  718|     12|      BOTAN_DEPRECATED("Deprecated no replacement") const word* data() const { return m_data.const_data(); }
_ZNK5Botan6BigInt7grow_toEm:
  738|  4.73k|      BOTAN_DEPRECATED("Deprecated no replacement") void grow_to(size_t n) const { m_data.grow_to(n); }
_ZN5Botan6BigInt10power_of_2Em:
  906|     24|      static BigInt power_of_2(size_t n) {
  907|     24|         BigInt b;
  908|     24|         b.set_bit(n);
  909|     24|         return b;
  910|     24|      }
_ZNK5Botan6BigInt8_as_spanEv:
 1023|     12|      std::span<const word> _as_span() const { return m_data.const_span(); }
_ZNK5Botan6BigInt5_dataEv:
 1033|   119k|      const word* _data() const { return m_data.const_data(); }
_ZN5Botan6BigInt18_assign_from_bytesENSt3__14spanIKhLm18446744073709551615EEE:
 1044|  25.9k|      void _assign_from_bytes(std::span<const uint8_t> bytes) { assign_from_bytes(bytes); }
_ZN5Botan6BigInt11_from_wordsERNSt3__16vectorImNS_16secure_allocatorImEEEE:
 1052|     84|      static BigInt _from_words(secure_vector<word>& words) {
 1053|     84|         BigInt bn;
 1054|     84|         bn.m_data.swap(words);
 1055|     84|         return bn;
 1056|     84|      }
_ZN5Botan6BigInt4Data12mutable_dataEv:
 1083|  21.4k|            word* mutable_data() {
 1084|  21.4k|               invalidate_sig_words();
 1085|  21.4k|               return m_reg.data();
 1086|  21.4k|            }
_ZNK5Botan6BigInt4Data10const_dataEv:
 1088|   278k|            const word* const_data() const { return m_reg.data(); }
_ZNK5Botan6BigInt4Data10const_spanEv:
 1090|     12|            std::span<const word> const_span() const { return std::span{m_reg}; }
_ZNK5Botan6BigInt4Data11get_word_atEm:
 1099|   159k|            word get_word_at(size_t n) const {
 1100|   159k|               if(n < m_reg.size()) {
  ------------------
  |  Branch (1100:19): [True: 159k, False: 24]
  ------------------
 1101|   159k|                  return m_reg[n];
 1102|   159k|               }
 1103|     24|               return 0;
 1104|   159k|            }
_ZN5Botan6BigInt4Data11set_word_atEmm:
 1106|  11.9k|            void set_word_at(size_t i, word w) {
 1107|  11.9k|               invalidate_sig_words();
 1108|  11.9k|               if(i >= m_reg.size()) {
  ------------------
  |  Branch (1108:19): [True: 11.9k, False: 0]
  ------------------
 1109|  11.9k|                  if(w == 0) {
  ------------------
  |  Branch (1109:22): [True: 0, False: 11.9k]
  ------------------
 1110|      0|                     return;
 1111|      0|                  }
 1112|  11.9k|                  grow_to(i + 1);
 1113|  11.9k|               }
 1114|  11.9k|               m_reg[i] = w;
 1115|  11.9k|            }
_ZNK5Botan6BigInt4Data7grow_toEm:
 1126|  16.7k|            void grow_to(size_t n) const {
 1127|  16.7k|               if(n > size()) {
  ------------------
  |  Branch (1127:19): [True: 16.6k, False: 6]
  ------------------
 1128|  16.6k|                  if(n <= m_reg.capacity()) {
  ------------------
  |  Branch (1128:22): [True: 0, False: 16.6k]
  ------------------
 1129|      0|                     m_reg.resize(n);
 1130|  16.6k|                  } else {
 1131|  16.6k|                     m_reg.resize(n + (8 - (n % 8)));
 1132|  16.6k|                  }
 1133|  16.6k|               }
 1134|  16.7k|            }
_ZNK5Botan6BigInt4Data4sizeEv:
 1136|   325k|            size_t size() const { return m_reg.size(); }
_ZN5Botan6BigInt4Data4swapERS1_:
 1151|  79.5k|            void swap(Data& other) noexcept {
 1152|  79.5k|               m_reg.swap(other.m_reg);
 1153|  79.5k|               std::swap(m_sig_words, other.m_sig_words);
 1154|  79.5k|            }
_ZN5Botan6BigInt4Data4swapERNSt3__16vectorImNS_16secure_allocatorImEEEE:
 1156|  56.5k|            void swap(secure_vector<word>& reg) noexcept {
 1157|  56.5k|               m_reg.swap(reg);
 1158|  56.5k|               invalidate_sig_words();
 1159|  56.5k|            }
_ZNK5Botan6BigInt4Data20invalidate_sig_wordsEv:
 1161|  89.9k|            void invalidate_sig_words() const noexcept { m_sig_words = sig_words_npos; }
_ZNK5Botan6BigInt4Data9sig_wordsEv:
 1163|   310k|            size_t sig_words() const {
 1164|   310k|               if(m_sig_words == sig_words_npos) {
  ------------------
  |  Branch (1164:19): [True: 59.4k, False: 250k]
  ------------------
 1165|  59.4k|                  m_sig_words = calc_sig_words();
 1166|  59.4k|               }
 1167|   310k|               return m_sig_words;
 1168|   310k|            }
_ZN5BotanplERKNS_6BigIntES2_:
 1189|     12|inline BigInt operator+(const BigInt& x, const BigInt& y) {
 1190|     12|   return BigInt::add2(x, y._data(), y.sig_words(), y.sign());
 1191|     12|}
_ZN5BotaneqERKNS_6BigIntES2_:
 1313|      6|inline bool operator==(const BigInt& a, const BigInt& b) {
 1314|      6|   return a.is_equal(b);
 1315|      6|}
_ZN5BotanneERKNS_6BigIntES2_:
 1323|      6|inline bool operator!=(const BigInt& a, const BigInt& b) {
 1324|      6|   return !a.is_equal(b);
 1325|      6|}
_ZN5BotanltERKNS_6BigIntES2_:
 1353|      6|inline bool operator<(const BigInt& a, const BigInt& b) {
 1354|      6|   return a.is_less_than(b);
 1355|      6|}
_ZN5BotaneqERKNS_6BigIntEm:
 1373|  18.4k|inline bool operator==(const BigInt& a, word b) {
 1374|  18.4k|   return (a.cmp_word(b) == 0);
 1375|  18.4k|}
_ZN5BotanneERKNS_6BigIntEm:
 1383|      6|inline bool operator!=(const BigInt& a, word b) {
 1384|      6|   return (a.cmp_word(b) != 0);
 1385|      6|}
_ZN5BotanltERKNS_6BigIntEm:
 1413|  21.3k|inline bool operator<(const BigInt& a, word b) {
 1414|  21.3k|   return (a.cmp_word(b) < 0);
 1415|  21.3k|}
_ZNK5Botan6BigInt9serializeINSt3__16vectorIhNS2_9allocatorIhEEEEEET_m:
  790|  18.4k|      T serialize(size_t len) const {
  791|       |         // TODO this supports std::vector and secure_vector
  792|       |         // it would be nice if this also could work with std::array as in
  793|       |         //   bn.serialize_to<std::array<uint8_t, 32>>(32);
  794|  18.4k|         T out(len);
  795|  18.4k|         this->serialize_to(out);
  796|  18.4k|         return out;
  797|  18.4k|      }
_ZN5Botan6BigIntC2Ev:
   45|   114k|      BigInt() = default;
_ZN5Botan6BigIntC2ERKS0_:
   88|  10.7k|      BigInt(const BigInt& other) = default;
_ZN5Botan6BigIntaSERKS0_:
  201|      6|      BigInt& operator=(const BigInt&) = default;

_ZNK5Botan11BlockCipher14parallel_bytesEv:
   71|    632|      size_t parallel_bytes() const { return parallelism() * block_size() * BlockCipher::ParallelismMult; }
_ZNK5Botan11BlockCipher7encryptEPh:
  104|    318|      void encrypt(uint8_t block[]) const { encrypt_n(block, block, 1); }
_ZNK5Botan11BlockCipher7encryptENSt3__14spanIhLm18446744073709551615EEE:
  118|  1.92k|      void encrypt(std::span<uint8_t> block) const {
  119|  1.92k|         return encrypt_n(block.data(), block.data(), block.size() / block_size());
  120|  1.92k|      }
_ZNK5Botan11BlockCipher7encryptENSt3__14spanIKhLm18446744073709551615EEENS2_IhLm18446744073709551615EEE:
  135|  1.74k|      void encrypt(std::span<const uint8_t> in, std::span<uint8_t> out) const {
  136|  1.74k|         return encrypt_n(in.data(), out.data(), in.size() / block_size());
  137|  1.74k|      }
_ZNK5Botan25Block_Cipher_Fixed_ParamsILm16ELm16ELm0ELm1ENS_11BlockCipherEE8key_specEv:
  246|    360|      Key_Length_Specification key_spec() const final { return Key_Length_Specification(KMIN, KMAX, KMOD); }
_ZNK5Botan25Block_Cipher_Fixed_ParamsILm16ELm16ELm0ELm1ENS_11BlockCipherEE10block_sizeEv:
  240|  3.47k|      size_t block_size() const final { return BS; }
_ZNK5Botan25Block_Cipher_Fixed_ParamsILm16ELm32ELm0ELm1ENS_11BlockCipherEE8key_specEv:
  246|    635|      Key_Length_Specification key_spec() const final { return Key_Length_Specification(KMIN, KMAX, KMOD); }
_ZNK5Botan25Block_Cipher_Fixed_ParamsILm16ELm32ELm0ELm1ENS_11BlockCipherEE10block_sizeEv:
  240|  1.59k|      size_t block_size() const final { return BS; }
_ZNK5Botan25Block_Cipher_Fixed_ParamsILm8ELm16ELm24ELm8ENS_11BlockCipherEE8key_specEv:
  246|    258|      Key_Length_Specification key_spec() const final { return Key_Length_Specification(KMIN, KMAX, KMOD); }
_ZNK5Botan25Block_Cipher_Fixed_ParamsILm8ELm16ELm24ELm8ENS_11BlockCipherEE10block_sizeEv:
  240|    236|      size_t block_size() const final { return BS; }

_ZN5Botan20Buffered_Computation6updateEPKhm:
   35|    200|      void update(const uint8_t in[], size_t length) { add_data({in, length}); }
_ZN5Botan20Buffered_Computation6updateENSt3__14spanIKhLm18446744073709551615EEE:
   41|   166k|      void update(std::span<const uint8_t> in) { add_data(in); }
_ZN5Botan20Buffered_Computation5finalEPh:
   97|    659|      void final(uint8_t out[]) { final_result({out, output_length()}); }
_ZN5Botan20Buffered_Computation12final_stdvecEv:
  114|  19.5k|      std::vector<uint8_t> final_stdvec() { return final<std::vector<uint8_t>>(); }
_ZN5Botan20Buffered_Computation5finalITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS3_9allocatorIhEEEEEET_v:
  104|  19.5k|      T final() {
  105|  19.5k|         T output(output_length());
  106|  19.5k|         final_result(output);
  107|  19.5k|         return output;
  108|  19.5k|      }
_ZN5Botan20Buffered_Computation5finalITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS_16secure_allocatorIhEEEEEET_v:
  104|  8.93k|      T final() {
  105|  8.93k|         T output(output_length());
  106|  8.93k|         final_result(output);
  107|  8.93k|         return output;
  108|  8.93k|      }
_ZN5Botan20Buffered_ComputationD2Ev:
  169|  24.0k|      virtual ~Buffered_Computation() = default;
_ZN5Botan20Buffered_Computation5finalITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS_16secure_allocatorIhEEEEEEvRT_:
  127|  7.30k|      void final(T& out) {
  128|  7.30k|         out.resize(output_length());
  129|  7.30k|         final_result(out);
  130|  7.30k|      }
_ZN5Botan20Buffered_Computation7processITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS_16secure_allocatorIhEEEEEET_NS3_4spanIKhLm18446744073709551615EEE:
  164|  7.30k|      T process(std::span<const uint8_t> in) {
  165|  7.30k|         update(in);
  166|  7.30k|         return final<T>();
  167|  7.30k|      }
_ZN5Botan20Buffered_Computation5finalITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS3_9allocatorIhEEEEEEvRT_:
  127|  5.63k|      void final(T& out) {
  128|  5.63k|         out.resize(output_length());
  129|  5.63k|         final_result(out);
  130|  5.63k|      }

_ZNK5Botan10ChaCha_RNG31max_number_of_bytes_per_requestEv:
  120|  35.3k|      size_t max_number_of_bytes_per_request() const override { return 0; }

_ZN5Botan11Cipher_Mode5startENSt3__14spanIKhLm18446744073709551615EEE:
   98|    629|      void start(std::span<const uint8_t> nonce) { start_msg(nonce.data(), nonce.size()); }
_ZN5Botan11Cipher_Mode6finishERNSt3__16vectorIhNS_16secure_allocatorIhEEEEm:
  185|    437|      void finish(secure_vector<uint8_t>& final_block, size_t offset = 0) { finish_msg(final_block, offset); }
_ZN5Botan11Cipher_Mode7processENSt3__14spanIhLm18446744073709551615EEE:
  132|    211|      size_t process(std::span<uint8_t> msg) { return this->process_msg(msg.data(), msg.size()); }
_ZN5Botan11Cipher_Mode7processEPhm:
  140|    192|      size_t process(uint8_t msg[], size_t msg_len) { return this->process_msg(msg, msg_len); }
_ZN5Botan11Cipher_Mode6updateITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS_16secure_allocatorIhEEEEEEvRT_m:
  155|    211|      void update(T& buffer, size_t offset = 0) {
  156|    211|         const size_t written = process(std::span(buffer).subspan(offset));
  157|    211|         buffer.resize(offset + written);
  158|    211|      }

_ZN5Botan19Credentials_ManagerD2Ev:
   42|  6.48k|      virtual ~Credentials_Manager() = default;

_ZN5Botan8CurveGFp4swapERS0_:
   82|  10.6k|      void swap(CurveGFp& other) noexcept { std::swap(m_group, other.m_group); }
_ZN5Botan8CurveGFpC2Ev:
   75|  10.7k|      CurveGFp() = default;

_ZN5Botan10DataSourceD2Ev:
  109|   315k|      virtual ~DataSource() = default;
_ZN5Botan17DataSource_MemoryC2ENSt3__16vectorIhNS_16secure_allocatorIhEEEE:
  175|  6.48k|      explicit DataSource_Memory(secure_vector<uint8_t> in) : m_source(std::move(in)), m_offset(0) {}
_ZN5Botan17DataSource_MemoryC2ENSt3__14spanIKhLm18446744073709551615EEE:
  181|   105k|      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|   105k|         if(!in.empty()) {
  ------------------
  |  Branch (183:13): [True: 105k, False: 17]
  ------------------
  184|   105k|            m_source.assign(in.begin(), in.end());
  185|   105k|         }
  186|   105k|      }
_ZN5Botan10DataSourceC2Ev:
  107|   380k|      DataSource() = default;

_ZN5Botan11DER_Encoder14start_sequenceEv:
   86|  67.2k|      DER_Encoder& start_sequence() { return start_cons(ASN1_Type::Sequence, ASN1_Class::Universal); }
_ZN5Botan11DER_Encoder12DER_SequenceD2Ev:
  504|   351k|            ~DER_Sequence() = default;
_ZN5Botan11DER_Encoder22start_context_specificEj:
  113|  35.8k|      DER_Encoder& start_context_specific(uint32_t tag) {
  114|  35.8k|         return start_cons(ASN1_Type(tag), ASN1_Class::ContextSpecific);
  115|  35.8k|      }
_ZN5Botan11DER_Encoder9raw_bytesENSt3__14spanIKhLm18446744073709551615EEE:
  154|  48.8k|      DER_Encoder& raw_bytes(std::span<const uint8_t> val) { return raw_bytes(val.data(), val.size()); }
_ZN5Botan11DER_Encoder30encode_octet_aligned_bitstringENSt3__14spanIKhLm18446744073709551615EEENS_9ASN1_TypeENS_10ASN1_ClassE:
  212|  6.48k|                                                  ASN1_Class class_tag = ASN1_Class::Universal) {
  213|  6.48k|         return encode_bitstring(bytes, 0, type_tag, class_tag);
  214|  6.48k|      }
_ZN5Botan11DER_Encoder10add_objectENS_9ASN1_TypeENS_10ASN1_ClassENSt3__14spanIKhLm18446744073709551615EEE:
  410|  99.9k|      DER_Encoder& add_object(ASN1_Type type_tag, ASN1_Class class_tag, std::span<const uint8_t> rep) {
  411|  99.9k|         return add_object(type_tag, class_tag, rep.data(), rep.size());
  412|  99.9k|      }
_ZN5Botan11DER_Encoder10add_objectENS_9ASN1_TypeENS_10ASN1_ClassERKNSt3__16vectorIhNS3_9allocatorIhEEEE:
  421|  93.4k|      DER_Encoder& add_object(ASN1_Type type_tag, ASN1_Class class_tag, const std::vector<uint8_t>& rep) {
  422|  93.4k|         return add_object(type_tag, class_tag, std::span{rep});
  423|  93.4k|      }
_ZN5Botan11DER_Encoder10add_objectENS_9ASN1_TypeENS_10ASN1_ClassERKNSt3__16vectorIhNS_16secure_allocatorIhEEEE:
  432|  6.48k|      DER_Encoder& add_object(ASN1_Type type_tag, ASN1_Class class_tag, const secure_vector<uint8_t>& rep) {
  433|  6.48k|         return add_object(type_tag, class_tag, std::span{rep});
  434|  6.48k|      }
_ZN5Botan11DER_Encoder12DER_SequenceC2EOS1_:
  487|   248k|                  m_type_tag(seq.m_type_tag),
  488|   248k|                  m_class_tag(seq.m_class_tag),
  489|   248k|                  m_sort_contents(seq.m_sort_contents),
  490|   248k|                  m_contents(std::move(seq.m_contents)),
  491|   248k|                  m_set_contents(std::move(seq.m_set_contents)) {}

_ZN5Botan7DNSNameC2ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  101|  6.48k|      explicit DNSName(std::string canonical) : m_name(std::move(canonical)) {}

_ZNK5Botan14EC_AffinePoint5innerEv:
  354|  25.5k|      const EC_AffinePoint_Data& inner() const { return *m_point; }
_ZNK5Botan14EC_AffinePoint22serialize_uncompressedITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS3_9allocatorIhEEEEEET_v:
  232|  4.13k|      T serialize_uncompressed() const {
  233|  4.13k|         T bytes(1 + 2 * this->field_element_bytes());
  234|  4.13k|         this->serialize_uncompressed_to(bytes);
  235|  4.13k|         return bytes;
  236|  4.13k|      }
_ZNK5Botan14EC_AffinePoint20serialize_compressedITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS3_9allocatorIhEEEEEET_v:
  242|     66|      T serialize_compressed() const {
  243|     66|         T bytes(1 + this->field_element_bytes());
  244|     66|         this->serialize_compressed_to(bytes);
  245|     66|         return bytes;
  246|     66|      }

_ZNK5Botan8EC_Group5_dataEv:
  604|  21.1k|      const std::shared_ptr<EC_Group_Data>& _data() const { return m_data; }
_ZN5Botan8EC_GroupC2EOS0_:
  297|  19.7k|      EC_Group(EC_Group&&) = default;

_ZN5Botan8EC_PointaSEOS0_:
   75|  10.6k|      EC_Point& operator=(EC_Point&& other) noexcept {
   76|  10.6k|         if(this != &other) {
  ------------------
  |  Branch (76:13): [True: 10.6k, False: 0]
  ------------------
   77|  10.6k|            this->swap(other);
   78|  10.6k|         }
   79|  10.6k|         return (*this);
   80|  10.6k|      }
_ZN5Botan8EC_PointD2Ev:
   82|  21.3k|      ~EC_Point() = default;
_ZN5Botan8EC_PointC2Ev:
   49|  10.6k|      EC_Point() = default;

_ZNK5Botan9EC_Scalar10is_nonzeroEv:
  170|  9.07k|      bool is_nonzero() const { return !is_zero(); }
_ZNK5Botan9EC_Scalar6_innerEv:
  277|  4.20k|      const EC_Scalar_Data& _inner() const { return inner(); }
_ZNK5Botan9EC_Scalar5innerEv:
  291|  23.9k|      const EC_Scalar_Data& inner() const { return *m_scalar; }

_ZN5Botan12EC_PublicKeyC2Ev:
  140|  9.07k|      EC_PublicKey() = default;
_ZN5Botan12EC_PublicKeyD2Ev:
   42|  10.6k|      ~EC_PublicKey() override = default;
_ZN5Botan13EC_PrivateKeyD2Ev:
  173|  9.07k|      ~EC_PrivateKey() override = default;
_ZNK5Botan12EC_PublicKey14point_encodingEv:
  102|  4.20k|      EC_Point_Format point_encoding() const { return m_point_encoding; }

_ZN5Botan14ECDH_PublicKeyC1ERKNS_8EC_GroupERKNS_14EC_AffinePointE:
   44|  1.61k|      ECDH_PublicKey(const EC_Group& group, const EC_AffinePoint& public_key) : EC_PublicKey(group, public_key) {}
_ZN5Botan15ECDH_PrivateKeyC1ERNS_21RandomNumberGeneratorERKNS_8EC_GroupE:
  101|  2.59k|      ECDH_PrivateKey(RandomNumberGenerator& rng, const EC_Group& group) : EC_PrivateKey(rng, group) {}
_ZN5Botan14ECDH_PublicKeyC2Ev:
   67|  2.59k|      ECDH_PublicKey() = default;
_ZNK5Botan14ECDH_PublicKey9algo_nameEv:
   50|  5.22k|      std::string algo_name() const override { return "ECDH"; }

_ZN5Botan16ECDSA_PrivateKeyC1ERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEE:
   97|  6.48k|            EC_PrivateKey(assert_algorithm_identifier(alg_id, "ECDSA"), key_bits) {}
_ZN5Botan15ECDSA_PublicKeyC2Ev:
   78|  6.48k|      ECDSA_PublicKey() = default;

_ZNK5Botan9Exception4whatEv:
   94|  1.28k|      const char* what() const noexcept override { return m_msg.c_str(); }
_ZN5Botan13Invalid_StateC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  284|     22|      explicit Invalid_State(std::string_view err) : Exception(err) {}

_ZN5Botan10hex_encodeENSt3__14spanIKhLm18446744073709551615EEEb:
   43|  12.9k|inline std::string hex_encode(std::span<const uint8_t> input, bool uppercase = true) {
   44|  12.9k|   return hex_encode(input.data(), input.size(), uppercase);
   45|  12.9k|}

_ZN5Botan3KDFD2Ev:
   27|  1.63k|      virtual ~KDF() = default;
_ZNK5Botan3KDF10derive_keyITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS_16secure_allocatorIhEEEEEET_mNS3_4spanIKhLm18446744073709551615EEESB_SB_:
  145|  3.10k|                   std::span<const uint8_t> label) const {
  146|  3.10k|         T key(key_len);
  147|  3.10k|         perform_kdf(key, secret, salt, label);
  148|  3.10k|         return key;
  149|  3.10k|      }
_ZNK5Botan3KDF10derive_keyITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS_16secure_allocatorIhEEEEEET_mPKhmSA_mSA_m:
   99|  1.47k|                   size_t label_len = 0) const {
  100|  1.47k|         return derive_key<T>(key_len, {secret, secret_len}, {salt, salt_len}, {label, label_len});
  101|  1.47k|      }

_ZN5Botan9clear_memIhEEvPT_m:
  118|  22.6k|inline constexpr void clear_mem(T* ptr, size_t n) {
  119|  22.6k|   clear_bytes(ptr, sizeof(T) * n);
  120|  22.6k|}
_ZN5Botan11clear_bytesEPvm:
  101|   216k|inline constexpr void clear_bytes(void* ptr, size_t bytes) {
  102|   216k|   if(bytes > 0) {
  ------------------
  |  Branch (102:7): [True: 160k, False: 56.4k]
  ------------------
  103|   160k|      std::memset(ptr, 0, bytes);
  104|   160k|   }
  105|   216k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERNSt3__15arrayImLm4EEETkNS1_16contiguous_rangeENS2_4spanIhLm32EEEQaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISF_EESG_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINS8_IXsr21__is_primary_templateINS9_Iu14__remove_cvrefIDTclL_ZNSB_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSH_ISP_EESQ_E4type10value_typeEEEEvOSM_RKSC_:
  176|  8.96k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  8.96k|   ranges::assert_equal_byte_lengths(out, in);
  178|  8.96k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  8.96k|}
_ZN5Botan13typecast_copyINSt3__15arrayImLm4EEETkNS_6ranges16contiguous_rangeENS1_4spanIhLm32EEEQaaaasr3stdE26is_default_constructible_vIT_Esr3stdE23is_trivially_copyable_vIS7_Esr3stdE23is_trivially_copyable_vINS1_11conditionalIXsr21__is_primary_templateINS1_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS1_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS1_26indirectly_readable_traitsISF_EESG_E4type10value_typeEEEES7_RKSC_:
  210|  8.96k|inline constexpr ToT typecast_copy(const FromR& src) {
  211|  8.96k|   ToT dst;  // NOLINT(*-member-init)
  212|  8.96k|   typecast_copy(dst, src);
  213|  8.96k|   return dst;
  214|  8.96k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERNSt3__15arrayImLm4EEETkNS1_16contiguous_rangeENS2_4spanIKhLm32EEEQaasr3stdE23is_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|  9.91k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  9.91k|   ranges::assert_equal_byte_lengths(out, in);
  178|  9.91k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  9.91k|}
_ZN5Botan13typecast_copyINSt3__15arrayImLm4EEETkNS_6ranges16contiguous_rangeENS1_4spanIKhLm32EEEQaaaasr3stdE26is_default_constructible_vIT_Esr3stdE23is_trivially_copyable_vIS8_Esr3stdE23is_trivially_copyable_vINS1_11conditionalIXsr21__is_primary_templateINS1_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS1_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS1_26indirectly_readable_traitsISG_EESH_E4type10value_typeEEEES8_RKSD_:
  210|  9.91k|inline constexpr ToT typecast_copy(const FromR& src) {
  211|  9.91k|   ToT dst;  // NOLINT(*-member-init)
  212|  9.91k|   typecast_copy(dst, src);
  213|  9.91k|   return dst;
  214|  9.91k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeENSt3__14spanIhLm32EEETkNS1_16contiguous_rangeENS2_5arrayImLm4EEEQaasr3stdE23is_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|  9.44k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  9.44k|   ranges::assert_equal_byte_lengths(out, in);
  178|  9.44k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  9.44k|}
_ZN5Botan7xor_bufITkNS_6ranges23contiguous_output_rangeIhEENSt3__14spanIhLm18446744073709551615EEETkNS1_16contiguous_rangeIhEENS4_IKhLm18446744073709551615EEEEEvOT_OT0_:
  404|  8.03k|                              ranges::contiguous_range<uint8_t> auto&& in) {
  405|  8.03k|   ranges::assert_equal_byte_lengths(out, in);
  406|       |
  407|  8.03k|   std::span<uint8_t> o(out);
  408|  8.03k|   std::span<const uint8_t> i(in);
  409|       |
  410|  17.0k|   for(; o.size_bytes() >= 32; o = o.subspan(32), i = i.subspan(32)) {
  ------------------
  |  Branch (410:10): [True: 8.96k, False: 8.03k]
  ------------------
  411|  8.96k|      auto x = typecast_copy<std::array<uint64_t, 4>>(o.template first<32>());
  412|  8.96k|      const auto y = typecast_copy<std::array<uint64_t, 4>>(i.template first<32>());
  413|       |
  414|  8.96k|      x[0] ^= y[0];
  415|  8.96k|      x[1] ^= y[1];
  416|  8.96k|      x[2] ^= y[2];
  417|  8.96k|      x[3] ^= y[3];
  418|       |
  419|  8.96k|      typecast_copy(o.template first<32>(), x);
  420|  8.96k|   }
  421|       |
  422|   123k|   for(size_t off = 0; off != o.size_bytes(); ++off) {
  ------------------
  |  Branch (422:24): [True: 115k, False: 8.03k]
  ------------------
  423|   115k|      o[off] ^= i[off];
  424|   115k|   }
  425|  8.03k|}
_ZN5Botan7xor_bufITkNS_6ranges23contiguous_output_rangeIhEENSt3__14spanIhLm18446744073709551615EEETkNS1_16contiguous_rangeIhEENS4_IKhLm18446744073709551615EEETkNS6_IhEES8_EEvOT_OT0_OT1_:
  435|  1.85k|                              ranges::contiguous_range<uint8_t> auto&& in2) {
  436|  1.85k|   ranges::assert_equal_byte_lengths(out, in1, in2);
  437|       |
  438|  1.85k|   std::span o{out};
  439|  1.85k|   std::span i1{in1};
  440|  1.85k|   std::span i2{in2};
  441|       |
  442|  2.32k|   for(; o.size_bytes() >= 32; o = o.subspan(32), i1 = i1.subspan(32), i2 = i2.subspan(32)) {
  ------------------
  |  Branch (442:10): [True: 474, False: 1.85k]
  ------------------
  443|    474|      auto x = typecast_copy<std::array<uint64_t, 4>>(i1.template first<32>());
  444|    474|      const auto y = typecast_copy<std::array<uint64_t, 4>>(i2.template first<32>());
  445|       |
  446|    474|      x[0] ^= y[0];
  447|    474|      x[1] ^= y[1];
  448|    474|      x[2] ^= y[2];
  449|    474|      x[3] ^= y[3];
  450|       |
  451|    474|      typecast_copy(o.template first<32>(), x);
  452|    474|   }
  453|       |
  454|  31.3k|   for(size_t off = 0; off != o.size_bytes(); ++off) {
  ------------------
  |  Branch (454:24): [True: 29.5k, False: 1.85k]
  ------------------
  455|  29.5k|      o[off] = i1[off] ^ i2[off];
  456|  29.5k|   }
  457|  1.85k|}
_ZN5Botan7xor_bufEPhPKhm:
  465|  7.96k|inline void xor_buf(uint8_t out[], const uint8_t in[], size_t length) {
  466|       |   // simply assumes that *out and *in point to "length" allocated bytes at least
  467|  7.96k|   xor_buf(std::span{out, length}, std::span{in, length});
  468|  7.96k|}
_ZN5Botan7xor_bufEPhPKhS2_m:
  477|  1.85k|inline void xor_buf(uint8_t out[], const uint8_t in[], const uint8_t in2[], size_t length) {
  478|       |   // simply assumes that *out, *in, and *in2 point to "length" allocated bytes at least
  479|  1.85k|   xor_buf(std::span{out, length}, std::span{in, length}, std::span{in2, length});
  480|  1.85k|}
_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|   414k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromT& in) {
  200|   414k|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  201|   414k|}
_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|   414k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|   414k|   ranges::assert_equal_byte_lengths(out, in);
  178|   414k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|   414k|}
_ZN5Botan13typecast_copyImTkNS_6ranges16contiguous_rangeENSt3__14spanIKhLm8EEEQaaaasr3stdE26is_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|   423k|inline constexpr ToT typecast_copy(const FromR& src) {
  211|   423k|   ToT dst;  // NOLINT(*-member-init)
  212|   423k|   typecast_copy(dst, src);
  213|   423k|   return dst;
  214|   423k|}
_ZN5Botan13typecast_copyImTkNS_6ranges16contiguous_rangeENSt3__14spanIKhLm8EEEQaaaasr3stdE23is_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|   423k|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|   423k|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|   423k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeENSt3__14spanImLm1EEETkNS1_16contiguous_rangeENS3_IKhLm8EEEQaasr3stdE23is_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|   423k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|   423k|   ranges::assert_equal_byte_lengths(out, in);
  178|   423k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|   423k|}
_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|   192k|inline constexpr ToT typecast_copy(const FromR& src) {
  211|   192k|   ToT dst;  // NOLINT(*-member-init)
  212|   192k|   typecast_copy(dst, src);
  213|   192k|   return dst;
  214|   192k|}
_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|   192k|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|   192k|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|   192k|}
_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|   192k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|   192k|   ranges::assert_equal_byte_lengths(out, in);
  178|   192k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|   192k|}
_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|    771|inline constexpr ToT typecast_copy(const FromR& src) {
  211|    771|   ToT dst;  // NOLINT(*-member-init)
  212|    771|   typecast_copy(dst, src);
  213|    771|   return dst;
  214|    771|}
_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|    771|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|    771|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|    771|}
_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|    771|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|    771|   ranges::assert_equal_byte_lengths(out, in);
  178|    771|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|    771|}
_ZN5Botan8copy_memIhQsr3stdE12is_trivial_vIu7__decayIT_EEEEvPS1_PKS1_m:
  144|  7.89M|inline constexpr void copy_mem(T* out, const T* in, size_t n) {
  145|  7.89M|   BOTAN_ASSERT_IMPLICATION(n > 0, in != nullptr && out != nullptr, "If n > 0 then args are not null");
  ------------------
  |  |  110|  7.89M|   do {                                                                                          \
  |  |  111|  7.89M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                              \
  |  |  112|  15.6M|      if((expr1) && !(expr2)) {                                                                  \
  |  |  ------------------
  |  |  |  Branch (112:10): [True: 7.80M, False: 87.4k]
  |  |  |  Branch (112:23): [True: 7.80M, False: 0]
  |  |  |  Branch (112:23): [True: 7.80M, False: 0]
  |  |  ------------------
  |  |  113|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                     \
  |  |  114|      0|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |  115|      0|      }                                                                                          \
  |  |  116|  7.89M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (116:12): [Folded, False: 7.89M]
  |  |  ------------------
  ------------------
  146|       |
  147|  7.89M|   if(in != nullptr && out != nullptr && n > 0) {
  ------------------
  |  Branch (147:7): [True: 7.88M, False: 13.1k]
  |  Branch (147:24): [True: 7.87M, False: 6.79k]
  |  Branch (147:42): [True: 7.80M, False: 67.5k]
  ------------------
  148|  7.80M|      std::memmove(out, in, sizeof(T) * n);
  149|  7.80M|   }
  150|  7.89M|}
_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|   117k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|   117k|   ranges::assert_equal_byte_lengths(out, in);
  178|   117k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|   117k|}
_ZN5Botan19secure_scrub_memoryITkNS_6ranges23contiguous_output_rangeERNSt3__16vectorIhNS2_9allocatorIhEEEEEEvOT_:
   59|  1.15M|void secure_scrub_memory(ranges::contiguous_output_range auto&& data) {
   60|  1.15M|   secure_scrub_memory(std::ranges::data(data), ranges::size_bytes(data));
   61|  1.15M|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERKNSt3__14spanIhLm2EEEtQaaaasr3stdE23is_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|  4.59k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromT& in) {
  200|  4.59k|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  201|  4.59k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERKNSt3__14spanIhLm2EEETkNS1_16contiguous_rangeENS3_IKtLm1EEEQaasr3stdE23is_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|  4.59k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  4.59k|   ranges::assert_equal_byte_lengths(out, in);
  178|  4.59k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  4.59k|}
_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|   596k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromT& in) {
  200|   596k|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  201|   596k|}
_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|   596k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|   596k|   ranges::assert_equal_byte_lengths(out, in);
  178|   596k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|   596k|}
_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|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERNSt3__14spanImLm18446744073709551615EEETkNS1_16contiguous_rangeENS3_IKhLm18446744073709551615EEEQaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISF_EESG_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINS8_IXsr21__is_primary_templateINS9_Iu14__remove_cvrefIDTclL_ZNSB_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSH_ISP_EESQ_E4type10value_typeEEEEvOSM_RKSC_:
  176|  4.20k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  4.20k|   ranges::assert_equal_byte_lengths(out, in);
  178|  4.20k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  4.20k|}
_ZN5Botan8copy_memImQsr3stdE12is_trivial_vIu7__decayIT_EEEEvPS1_PKS1_m:
  144|  31.4k|inline constexpr void copy_mem(T* out, const T* in, size_t n) {
  145|  31.4k|   BOTAN_ASSERT_IMPLICATION(n > 0, in != nullptr && out != nullptr, "If n > 0 then args are not null");
  ------------------
  |  |  110|  31.4k|   do {                                                                                          \
  |  |  111|  31.4k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                              \
  |  |  112|  62.9k|      if((expr1) && !(expr2)) {                                                                  \
  |  |  ------------------
  |  |  |  Branch (112:10): [True: 31.4k, False: 0]
  |  |  |  Branch (112:23): [True: 31.4k, False: 0]
  |  |  |  Branch (112:23): [True: 31.4k, False: 0]
  |  |  ------------------
  |  |  113|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                     \
  |  |  114|      0|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |  115|      0|      }                                                                                          \
  |  |  116|  31.4k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (116:12): [Folded, False: 31.4k]
  |  |  ------------------
  ------------------
  146|       |
  147|  31.4k|   if(in != nullptr && out != nullptr && n > 0) {
  ------------------
  |  Branch (147:7): [True: 31.4k, False: 0]
  |  Branch (147:24): [True: 31.4k, False: 0]
  |  Branch (147:42): [True: 31.4k, False: 0]
  ------------------
  148|  31.4k|      std::memmove(out, in, sizeof(T) * n);
  149|  31.4k|   }
  150|  31.4k|}
_ZN5Botan8copy_memITkNS_6ranges23contiguous_output_rangeERNSt3__14spanIhLm18446744073709551615EEETkNS1_16contiguous_rangeENS3_IKhLm18446744073709551615EEEQaasr3stdE9is_same_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISF_EESG_E4type10value_typeENS8_IXsr21__is_primary_templateINS9_Iu14__remove_cvrefIDTclL_ZNSB_5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENSH_ISP_EESQ_E4type10value_typeEEsr3stdE23is_trivially_copyable_vISU_EEEvOSC_RKSM_:
  160|     66|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|     66|   ranges::assert_equal_byte_lengths(out, in);
  162|     66|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 66]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|     66|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 66, False: 0]
  ------------------
  165|     66|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|     66|   }
  167|     66|}
_ZN5Botan9clear_memImEEvPT_m:
  118|  56.5k|inline constexpr void clear_mem(T* ptr, size_t n) {
  119|  56.5k|   clear_bytes(ptr, sizeof(T) * n);
  120|  56.5k|}
_ZN5Botan8copy_memITkNS_6ranges23contiguous_output_rangeENSt3__14spanIhLm18446744073709551615EEETkNS1_16contiguous_rangeENS3_IKhLm18446744073709551615EEEQaasr3stdE9is_same_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeENS7_IXsr21__is_primary_templateINS8_Iu14__remove_cvrefIDTclL_ZNSA_5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENSG_ISO_EESP_E4type10value_typeEEsr3stdE23is_trivially_copyable_vIST_EEEvOSB_RKSL_:
  160|  30.8k|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|  30.8k|   ranges::assert_equal_byte_lengths(out, in);
  162|  30.8k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 30.8k]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|  30.8k|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 30.8k, False: 0]
  ------------------
  165|  30.8k|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|  30.8k|   }
  167|  30.8k|}
_ZN5Botan13typecast_copyImTkNS_6ranges16contiguous_rangeENSt3__14spanIhLm8EEEQaaaasr3stdE26is_default_constructible_vIT_Esr3stdE23is_trivially_copyable_vIS5_Esr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEEES5_RKSA_:
  210|  27.9k|inline constexpr ToT typecast_copy(const FromR& src) {
  211|  27.9k|   ToT dst;  // NOLINT(*-member-init)
  212|  27.9k|   typecast_copy(dst, src);
  213|  27.9k|   return dst;
  214|  27.9k|}
_ZN5Botan13typecast_copyImTkNS_6ranges16contiguous_rangeENSt3__14spanIhLm8EEEQaaaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISC_EESD_E4type10value_typeEEsr3stdE23is_trivially_copyable_vIT_Entsr3std6rangesE5rangeISJ_EEEvRSJ_RKS9_:
  188|  27.9k|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|  27.9k|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|  27.9k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeENSt3__14spanImLm1EEETkNS1_16contiguous_rangeENS3_IhLm8EEEQaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINS6_IXsr21__is_primary_templateINS7_Iu14__remove_cvrefIDTclL_ZNS9_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSF_ISN_EESO_E4type10value_typeEEEEvOSK_RKSA_:
  176|  27.9k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  27.9k|   ranges::assert_equal_byte_lengths(out, in);
  178|  27.9k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  27.9k|}
_ZN5Botan9clear_memITkNS_6ranges23contiguous_output_rangeENSt3__14spanIhLm18446744073709551615EEEEEvOT_Qsr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRS5_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISD_EESE_E4type10value_typeEE:
  132|    176|{
  133|    176|   clear_bytes(std::ranges::data(mem), ranges::size_bytes(mem));
  134|    176|}
_ZN5BotaneOINS_16secure_allocatorIhEES2_EERNSt3__16vectorIhT_EES7_RKNS4_IhT0_EE:
  532|    400|std::vector<uint8_t, Alloc>& operator^=(std::vector<uint8_t, Alloc>& out, const std::vector<uint8_t, Alloc2>& in) {
  533|    400|   if(out.size() < in.size()) {
  ------------------
  |  Branch (533:7): [True: 0, False: 400]
  ------------------
  534|      0|      out.resize(in.size());
  535|      0|   }
  536|       |
  537|    400|   xor_buf(std::span{out}.first(in.size()), in);
  538|    400|   return out;
  539|    400|}
_ZN5Botan7xor_bufITkNS_6ranges23contiguous_output_rangeIhEENSt3__14spanIhLm18446744073709551615EEETkNS1_16contiguous_rangeIhEERKNS3_6vectorIhNS_16secure_allocatorIhEEEEEEvOT_OT0_:
  404|    400|                              ranges::contiguous_range<uint8_t> auto&& in) {
  405|    400|   ranges::assert_equal_byte_lengths(out, in);
  406|       |
  407|    400|   std::span<uint8_t> o(out);
  408|    400|   std::span<const uint8_t> i(in);
  409|       |
  410|    400|   for(; o.size_bytes() >= 32; o = o.subspan(32), i = i.subspan(32)) {
  ------------------
  |  Branch (410:10): [True: 0, False: 400]
  ------------------
  411|      0|      auto x = typecast_copy<std::array<uint64_t, 4>>(o.template first<32>());
  412|      0|      const auto y = typecast_copy<std::array<uint64_t, 4>>(i.template first<32>());
  413|       |
  414|      0|      x[0] ^= y[0];
  415|      0|      x[1] ^= y[1];
  416|      0|      x[2] ^= y[2];
  417|      0|      x[3] ^= y[3];
  418|       |
  419|      0|      typecast_copy(o.template first<32>(), x);
  420|      0|   }
  421|       |
  422|  6.80k|   for(size_t off = 0; off != o.size_bytes(); ++off) {
  ------------------
  |  Branch (422:24): [True: 6.40k, False: 400]
  ------------------
  423|  6.40k|      o[off] ^= i[off];
  424|  6.40k|   }
  425|    400|}
_ZN5Botan19secure_scrub_memoryITkNS_6ranges23contiguous_output_rangeERNSt3__15arrayIhLm16EEEEEvOT_:
   59|    362|void secure_scrub_memory(ranges::contiguous_output_range auto&& data) {
   60|    362|   secure_scrub_memory(std::ranges::data(data), ranges::size_bytes(data));
   61|    362|}
_ZN5Botan8copy_memITkNS_6ranges23contiguous_output_rangeERNSt3__15arrayIhLm56EEETkNS1_16contiguous_rangeENS2_4spanIKhLm18446744073709551615EEEQaasr3stdE9is_same_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISG_EESH_E4type10value_typeENS9_IXsr21__is_primary_templateINSA_Iu14__remove_cvrefIDTclL_ZNSC_5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENSI_ISQ_EESR_E4type10value_typeEEsr3stdE23is_trivially_copyable_vISV_EEEvOSD_RKSN_:
  160|      2|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|      2|   ranges::assert_equal_byte_lengths(out, in);
  162|      2|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 2]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|      2|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 2, False: 0]
  ------------------
  165|      2|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|      2|   }
  167|      2|}
_ZN5Botan8copy_memITkNS_6ranges23contiguous_output_rangeERNSt3__14spanIhLm56EEETkNS1_16contiguous_rangeENS2_6vectorIhNS_16secure_allocatorIhEEEEQaasr3stdE9is_same_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISH_EESI_E4type10value_typeENSA_IXsr21__is_primary_templateINSB_Iu14__remove_cvrefIDTclL_ZNSD_5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENSJ_ISR_EESS_E4type10value_typeEEsr3stdE23is_trivially_copyable_vISW_EEEvOSE_RKSO_:
  160|     15|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|     15|   ranges::assert_equal_byte_lengths(out, in);
  162|     15|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 15]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|     15|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 15, False: 0]
  ------------------
  165|     15|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|     15|   }
  167|     15|}
_ZN5Botan13typecast_copyINS_6StrongINSt3__15arrayIhLm56EEENS_9Point448_EJEEETkNS_6ranges16contiguous_rangeENS2_4spanIKhLm18446744073709551615EEEQaaaasr3stdE26is_default_constructible_vIT_Esr3stdE23is_trivially_copyable_vISB_Esr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISJ_EESK_E4type10value_typeEEEESB_RKSG_:
  210|      2|inline constexpr ToT typecast_copy(const FromR& src) {
  211|      2|   ToT dst;  // NOLINT(*-member-init)
  212|      2|   typecast_copy(dst, src);
  213|      2|   return dst;
  214|      2|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERNS_6StrongINSt3__15arrayIhLm56EEENS_9Point448_EJEEETkNS1_16contiguous_rangeENS3_4spanIKhLm18446744073709551615EEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISJ_EESK_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINSC_IXsr21__is_primary_templateINSD_Iu14__remove_cvrefIDTclL_ZNSF_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSL_IST_EESU_E4type10value_typeEEEEvOSQ_RKSG_:
  176|      2|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|      2|   ranges::assert_equal_byte_lengths(out, in);
  178|      2|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|      2|}
_ZN5Botan13typecast_copyINS_6StrongINSt3__15arrayIhLm56EEENS_11ScalarX448_EJEEETkNS_6ranges16contiguous_rangeENS2_4spanIKhLm18446744073709551615EEEQaaaasr3stdE26is_default_constructible_vIT_Esr3stdE23is_trivially_copyable_vISB_Esr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISJ_EESK_E4type10value_typeEEEESB_RKSG_:
  210|     17|inline constexpr ToT typecast_copy(const FromR& src) {
  211|     17|   ToT dst;  // NOLINT(*-member-init)
  212|     17|   typecast_copy(dst, src);
  213|     17|   return dst;
  214|     17|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERNS_6StrongINSt3__15arrayIhLm56EEENS_11ScalarX448_EJEEETkNS1_16contiguous_rangeENS3_4spanIKhLm18446744073709551615EEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISJ_EESK_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINSC_IXsr21__is_primary_templateINSD_Iu14__remove_cvrefIDTclL_ZNSF_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSL_IST_EESU_E4type10value_typeEEEEvOSQ_RKSG_:
  176|     17|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|     17|   ranges::assert_equal_byte_lengths(out, in);
  178|     17|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|     17|}
_ZN5Botan8copy_memITkNS_6ranges23contiguous_output_rangeERNSt3__14spanIhLm18446744073709551615EEETkNS1_16contiguous_rangeENS2_6vectorIhNS_16secure_allocatorIhEEEEQaasr3stdE9is_same_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISH_EESI_E4type10value_typeENSA_IXsr21__is_primary_templateINSB_Iu14__remove_cvrefIDTclL_ZNSD_5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENSJ_ISR_EESS_E4type10value_typeEEsr3stdE23is_trivially_copyable_vISW_EEEvOSE_RKSO_:
  160|  4.13k|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|  4.13k|   ranges::assert_equal_byte_lengths(out, in);
  162|  4.13k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 4.13k]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|  4.13k|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 4.13k, False: 0]
  ------------------
  165|  4.13k|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|  4.13k|   }
  167|  4.13k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERNSt3__14spanIjLm18446744073709551615EEETkNS1_16contiguous_rangeENS3_IKhLm18446744073709551615EEEQaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISF_EESG_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINS8_IXsr21__is_primary_templateINS9_Iu14__remove_cvrefIDTclL_ZNSB_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSH_ISP_EESQ_E4type10value_typeEEEEvOSM_RKSC_:
  176|      2|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|      2|   ranges::assert_equal_byte_lengths(out, in);
  178|      2|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|      2|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERKNSt3__14spanIhLm18446744073709551615EEEmQaaaasr3stdE23is_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|  2.81k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromT& in) {
  200|  2.81k|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  201|  2.81k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERKNSt3__14spanIhLm18446744073709551615EEETkNS1_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|  2.81k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  2.81k|   ranges::assert_equal_byte_lengths(out, in);
  178|  2.81k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  2.81k|}
_ZN5Botan7xor_bufINSt3__19allocatorIhEEEEvRNS1_6vectorIhT_EEPKhm:
  503|     73|void xor_buf(std::vector<uint8_t, Alloc>& out, const uint8_t* in, size_t n) {
  504|     73|   BOTAN_ARG_CHECK(out.size() >= n, "output vector is too small");
  ------------------
  |  |   35|     73|   do {                                                          \
  |  |   36|     73|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     73|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 73]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     73|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 73]
  |  |  ------------------
  ------------------
  505|       |   // simply assumes that *in points to "n" allocated bytes at least
  506|     73|   xor_buf(std::span{out}.first(n), std::span{in, n});
  507|     73|}
_ZN5Botan8copy_memITkNS_6ranges23contiguous_output_rangeERNSt3__15arrayIhLm16EEETkNS1_16contiguous_rangeENS2_4spanIKhLm18446744073709551615EEEQaasr3stdE9is_same_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISG_EESH_E4type10value_typeENS9_IXsr21__is_primary_templateINSA_Iu14__remove_cvrefIDTclL_ZNSC_5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENSI_ISQ_EESR_E4type10value_typeEEsr3stdE23is_trivially_copyable_vISV_EEEvOSD_RKSN_:
  160|    114|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|    114|   ranges::assert_equal_byte_lengths(out, in);
  162|    114|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 114]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|    114|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 114, False: 0]
  ------------------
  165|    114|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|    114|   }
  167|    114|}
_ZN5Botan8copy_memITkNS_6ranges23contiguous_output_rangeERNSt3__15arrayIhLm16EEETkNS1_16contiguous_rangeES4_Qaasr3stdE9is_same_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISD_EESE_E4type10value_typeENS6_IXsr21__is_primary_templateINS7_Iu14__remove_cvrefIDTclL_ZNS9_5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENSF_ISN_EESO_E4type10value_typeEEsr3stdE23is_trivially_copyable_vISS_EEEvOSA_RKSK_:
  160|    114|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|    114|   ranges::assert_equal_byte_lengths(out, in);
  162|    114|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 114]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|    114|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 114, False: 0]
  ------------------
  165|    114|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|    114|   }
  167|    114|}
_ZN5Botan7xor_bufITkNS_6ranges23contiguous_output_rangeIhEERNSt3__14spanIhLm18446744073709551615EEETkNS1_16contiguous_rangeIhEES5_TkNS7_IhEES5_EEvOT_OT0_OT1_:
  435|    114|                              ranges::contiguous_range<uint8_t> auto&& in2) {
  436|    114|   ranges::assert_equal_byte_lengths(out, in1, in2);
  437|       |
  438|    114|   std::span o{out};
  439|    114|   std::span i1{in1};
  440|    114|   std::span i2{in2};
  441|       |
  442|    114|   for(; o.size_bytes() >= 32; o = o.subspan(32), i1 = i1.subspan(32), i2 = i2.subspan(32)) {
  ------------------
  |  Branch (442:10): [True: 0, False: 114]
  ------------------
  443|      0|      auto x = typecast_copy<std::array<uint64_t, 4>>(i1.template first<32>());
  444|      0|      const auto y = typecast_copy<std::array<uint64_t, 4>>(i2.template first<32>());
  445|       |
  446|      0|      x[0] ^= y[0];
  447|      0|      x[1] ^= y[1];
  448|      0|      x[2] ^= y[2];
  449|      0|      x[3] ^= y[3];
  450|       |
  451|      0|      typecast_copy(o.template first<32>(), x);
  452|      0|   }
  453|       |
  454|  1.93k|   for(size_t off = 0; off != o.size_bytes(); ++off) {
  ------------------
  |  Branch (454:24): [True: 1.82k, False: 114]
  ------------------
  455|  1.82k|      o[off] = i1[off] ^ i2[off];
  456|  1.82k|   }
  457|    114|}
_ZN5Botan9clear_memITkNS_6ranges23contiguous_output_rangeENSt3__14spanImLm18446744073709551615EEEEEvOT_Qsr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRS5_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISD_EESE_E4type10value_typeEE:
  132|     48|{
  133|     48|   clear_bytes(std::ranges::data(mem), ranges::size_bytes(mem));
  134|     48|}
_ZN5Botan8copy_memITkNS_6ranges23contiguous_output_rangeENSt3__14spanImLm4EEETkNS1_16contiguous_rangeENS2_5arrayImLm4EEEQaasr3stdE9is_same_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeENS7_IXsr21__is_primary_templateINS8_Iu14__remove_cvrefIDTclL_ZNSA_5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENSG_ISO_EESP_E4type10value_typeEEsr3stdE23is_trivially_copyable_vIST_EEEvOSB_RKSL_:
  160|  15.0k|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|  15.0k|   ranges::assert_equal_byte_lengths(out, in);
  162|  15.0k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 15.0k]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|  15.0k|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 15.0k, False: 0]
  ------------------
  165|  15.0k|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|  15.0k|   }
  167|  15.0k|}
_ZN5Botan8copy_memITkNS_6ranges23contiguous_output_rangeENSt3__14spanImLm6EEETkNS1_16contiguous_rangeENS2_5arrayImLm6EEEQaasr3stdE9is_same_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeENS7_IXsr21__is_primary_templateINS8_Iu14__remove_cvrefIDTclL_ZNSA_5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENSG_ISO_EESP_E4type10value_typeEEsr3stdE23is_trivially_copyable_vIST_EEEvOSB_RKSL_:
  160|  3.80k|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|  3.80k|   ranges::assert_equal_byte_lengths(out, in);
  162|  3.80k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 3.80k]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|  3.80k|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 3.80k, False: 0]
  ------------------
  165|  3.80k|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|  3.80k|   }
  167|  3.80k|}
_ZN5Botan8copy_memITkNS_6ranges23contiguous_output_rangeENSt3__14spanImLm8EEETkNS1_16contiguous_rangeENS2_5arrayImLm8EEEQaasr3stdE9is_same_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeENS7_IXsr21__is_primary_templateINS8_Iu14__remove_cvrefIDTclL_ZNSA_5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENSG_ISO_EESP_E4type10value_typeEEsr3stdE23is_trivially_copyable_vIST_EEEvOSB_RKSL_:
  160|  3.77k|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|  3.77k|   ranges::assert_equal_byte_lengths(out, in);
  162|  3.77k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 3.77k]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|  3.77k|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 3.77k, False: 0]
  ------------------
  165|  3.77k|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|  3.77k|   }
  167|  3.77k|}
_ZN5Botan8copy_memITkNS_6ranges23contiguous_output_rangeENSt3__14spanImLm9EEETkNS1_16contiguous_rangeENS2_5arrayImLm9EEEQaasr3stdE9is_same_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeENS7_IXsr21__is_primary_templateINS8_Iu14__remove_cvrefIDTclL_ZNSA_5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENSG_ISO_EESP_E4type10value_typeEEsr3stdE23is_trivially_copyable_vIST_EEEvOSB_RKSL_:
  160|  1.21k|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|  1.21k|   ranges::assert_equal_byte_lengths(out, in);
  162|  1.21k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 1.21k]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|  1.21k|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 1.21k, False: 0]
  ------------------
  165|  1.21k|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|  1.21k|   }
  167|  1.21k|}
_ZN5Botan8copy_memITkNS_6ranges23contiguous_output_rangeERNSt3__14spanIhLm66EEETkNS1_16contiguous_rangeENS3_IKhLm66EEEQaasr3stdE9is_same_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISF_EESG_E4type10value_typeENS8_IXsr21__is_primary_templateINS9_Iu14__remove_cvrefIDTclL_ZNSB_5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENSH_ISP_EESQ_E4type10value_typeEEsr3stdE23is_trivially_copyable_vISU_EEEvOSC_RKSM_:
  160|  4.26k|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|  4.26k|   ranges::assert_equal_byte_lengths(out, in);
  162|  4.26k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 4.26k]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|  4.26k|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 4.26k, False: 0]
  ------------------
  165|  4.26k|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|  4.26k|   }
  167|  4.26k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERNSt3__15arrayImLm7EEETkNS1_16contiguous_rangeENS2_4spanIKhLm56EEEQaasr3stdE23is_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|     34|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|     34|   ranges::assert_equal_byte_lengths(out, in);
  178|     34|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|     34|}
_ZN5Botan9clear_memITkNS_6ranges23contiguous_output_rangeERNSt3__15arrayImLm7EEEEEvOT_Qsr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRS6_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeEE:
  132|   137k|{
  133|   137k|   clear_bytes(std::ranges::data(mem), ranges::size_bytes(mem));
  134|   137k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERNSt3__14spanIhLm56EEETkNS1_16contiguous_rangeENS2_5arrayImLm7EEEQaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISF_EESG_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINS8_IXsr21__is_primary_templateINS9_Iu14__remove_cvrefIDTclL_ZNSB_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSH_ISP_EESQ_E4type10value_typeEEEEvOSM_RKSC_:
  176|     17|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|     17|   ranges::assert_equal_byte_lengths(out, in);
  178|     17|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|     17|}

_ZN5Botan14Asymmetric_KeyD2Ev:
   63|  10.7k|      virtual ~Asymmetric_Key() = default;

_ZN5Botan6PK_Ops13Key_AgreementD2Ev:
  153|  1.61k|      virtual ~Key_Agreement() = default;

_ZN5Botan15Key_ConstraintsC2Ev:
  166|  6.57k|      Key_Constraints() : m_value(0) {}

_ZN5Botan18X509_Serial_NumberC2Ev:
   70|  6.57k|      X509_Serial_Number() : m_contents{0x00} {}
_ZNK5Botan7X509_DN8get_bitsEv:
  198|  12.9k|      const std::vector<uint8_t>& get_bits() const { return m_dn_bits; }
_ZNK5Botan7X509_DN16_canonical_bytesEv:
  274|  12.9k|      const std::vector<uint8_t>& _canonical_bytes() const { return m_canonical_dn_bits; }
_ZN5Botan10Extensions15Extensions_InfoC2EbNSt3__16vectorIhNS2_9allocatorIhEEEENS2_10unique_ptrINS_21Certificate_ExtensionENS2_14default_deleteIS8_EEEE:
 1051|  25.9k|                  m_obj(std::move(ext)), m_bits(std::move(encoding)), m_critical(critical) {}
_ZN5Botan10ExtensionsC2Ev:
 1029|  6.57k|      Extensions() = default;
_ZN5Botan10ExtensionsD2Ev:
 1037|  6.57k|      ~Extensions() override = default;
_ZN5Botan7X509_DNC2Ev:
  159|  13.7k|      X509_DN() = default;
_ZN5Botan15NameConstraintsC2Ev:
  755|  6.57k|      NameConstraints() = default;
_ZN5Botan21Certificate_ExtensionD2Ev:
  858|  25.9k|      virtual ~Certificate_Extension() = default;
_ZN5Botan15AlternativeNameC2Ev:
  338|  19.6k|      AlternativeName() = default;
_ZNK5Botan10Extensions23get_extension_object_asINS_14Cert_Extension17Basic_ConstraintsEEEPKT_RKNS_3OIDE:
  884|  6.48k|      const T* get_extension_object_as(const OID& oid = T::static_oid()) const {
  885|  6.48k|         if(const Certificate_Extension* extn = get_extension_object(oid)) {
  ------------------
  |  Branch (885:42): [True: 6.48k, False: 0]
  ------------------
  886|       |            // Unknown_Extension oid_name is empty
  887|  6.48k|            if(extn->oid_name().empty()) {
  ------------------
  |  Branch (887:16): [True: 0, False: 6.48k]
  ------------------
  888|      0|               return nullptr;
  889|  6.48k|            } else if(const T* extn_as_T = dynamic_cast<const T*>(extn)) {
  ------------------
  |  Branch (889:32): [True: 6.48k, False: 0]
  ------------------
  890|  6.48k|               return extn_as_T;
  891|  6.48k|            } else {
  892|      0|               throw Decoding_Error("Exception::get_extension_object_as dynamic_cast failed");
  893|      0|            }
  894|  6.48k|         }
  895|       |
  896|      0|         return nullptr;
  897|  6.48k|      }
_ZNK5Botan10Extensions23get_extension_object_asINS_14Cert_Extension28Authority_Information_AccessEEEPKT_RKNS_3OIDE:
  884|  6.48k|      const T* get_extension_object_as(const OID& oid = T::static_oid()) const {
  885|  6.48k|         if(const Certificate_Extension* extn = get_extension_object(oid)) {
  ------------------
  |  Branch (885:42): [True: 0, False: 6.48k]
  ------------------
  886|       |            // Unknown_Extension oid_name is empty
  887|      0|            if(extn->oid_name().empty()) {
  ------------------
  |  Branch (887:16): [True: 0, False: 0]
  ------------------
  888|      0|               return nullptr;
  889|      0|            } else if(const T* extn_as_T = dynamic_cast<const T*>(extn)) {
  ------------------
  |  Branch (889:32): [True: 0, False: 0]
  ------------------
  890|      0|               return extn_as_T;
  891|      0|            } else {
  892|      0|               throw Decoding_Error("Exception::get_extension_object_as dynamic_cast failed");
  893|      0|            }
  894|      0|         }
  895|       |
  896|  6.48k|         return nullptr;
  897|  6.48k|      }
_ZNK5Botan10Extensions23get_extension_object_asINS_14Cert_Extension9Key_UsageEEEPKT_RKNS_3OIDE:
  884|  6.48k|      const T* get_extension_object_as(const OID& oid = T::static_oid()) const {
  885|  6.48k|         if(const Certificate_Extension* extn = get_extension_object(oid)) {
  ------------------
  |  Branch (885:42): [True: 0, False: 6.48k]
  ------------------
  886|       |            // Unknown_Extension oid_name is empty
  887|      0|            if(extn->oid_name().empty()) {
  ------------------
  |  Branch (887:16): [True: 0, False: 0]
  ------------------
  888|      0|               return nullptr;
  889|      0|            } else if(const T* extn_as_T = dynamic_cast<const T*>(extn)) {
  ------------------
  |  Branch (889:32): [True: 0, False: 0]
  ------------------
  890|      0|               return extn_as_T;
  891|      0|            } else {
  892|      0|               throw Decoding_Error("Exception::get_extension_object_as dynamic_cast failed");
  893|      0|            }
  894|      0|         }
  895|       |
  896|  6.48k|         return nullptr;
  897|  6.48k|      }
_ZNK5Botan10Extensions23get_extension_object_asINS_14Cert_Extension14Subject_Key_IDEEEPKT_RKNS_3OIDE:
  884|  6.48k|      const T* get_extension_object_as(const OID& oid = T::static_oid()) const {
  885|  6.48k|         if(const Certificate_Extension* extn = get_extension_object(oid)) {
  ------------------
  |  Branch (885:42): [True: 6.48k, False: 0]
  ------------------
  886|       |            // Unknown_Extension oid_name is empty
  887|  6.48k|            if(extn->oid_name().empty()) {
  ------------------
  |  Branch (887:16): [True: 0, False: 6.48k]
  ------------------
  888|      0|               return nullptr;
  889|  6.48k|            } else if(const T* extn_as_T = dynamic_cast<const T*>(extn)) {
  ------------------
  |  Branch (889:32): [True: 6.48k, False: 0]
  ------------------
  890|  6.48k|               return extn_as_T;
  891|  6.48k|            } else {
  892|      0|               throw Decoding_Error("Exception::get_extension_object_as dynamic_cast failed");
  893|      0|            }
  894|  6.48k|         }
  895|       |
  896|      0|         return nullptr;
  897|  6.48k|      }
_ZNK5Botan10Extensions23get_extension_object_asINS_14Cert_Extension16Authority_Key_IDEEEPKT_RKNS_3OIDE:
  884|  6.48k|      const T* get_extension_object_as(const OID& oid = T::static_oid()) const {
  885|  6.48k|         if(const Certificate_Extension* extn = get_extension_object(oid)) {
  ------------------
  |  Branch (885:42): [True: 6.48k, False: 0]
  ------------------
  886|       |            // Unknown_Extension oid_name is empty
  887|  6.48k|            if(extn->oid_name().empty()) {
  ------------------
  |  Branch (887:16): [True: 0, False: 6.48k]
  ------------------
  888|      0|               return nullptr;
  889|  6.48k|            } else if(const T* extn_as_T = dynamic_cast<const T*>(extn)) {
  ------------------
  |  Branch (889:32): [True: 6.48k, False: 0]
  ------------------
  890|  6.48k|               return extn_as_T;
  891|  6.48k|            } else {
  892|      0|               throw Decoding_Error("Exception::get_extension_object_as dynamic_cast failed");
  893|      0|            }
  894|  6.48k|         }
  895|       |
  896|      0|         return nullptr;
  897|  6.48k|      }
_ZNK5Botan10Extensions23get_extension_object_asINS_14Cert_Extension16Name_ConstraintsEEEPKT_RKNS_3OIDE:
  884|  6.48k|      const T* get_extension_object_as(const OID& oid = T::static_oid()) const {
  885|  6.48k|         if(const Certificate_Extension* extn = get_extension_object(oid)) {
  ------------------
  |  Branch (885:42): [True: 0, False: 6.48k]
  ------------------
  886|       |            // Unknown_Extension oid_name is empty
  887|      0|            if(extn->oid_name().empty()) {
  ------------------
  |  Branch (887:16): [True: 0, False: 0]
  ------------------
  888|      0|               return nullptr;
  889|      0|            } else if(const T* extn_as_T = dynamic_cast<const T*>(extn)) {
  ------------------
  |  Branch (889:32): [True: 0, False: 0]
  ------------------
  890|      0|               return extn_as_T;
  891|      0|            } else {
  892|      0|               throw Decoding_Error("Exception::get_extension_object_as dynamic_cast failed");
  893|      0|            }
  894|      0|         }
  895|       |
  896|  6.48k|         return nullptr;
  897|  6.48k|      }
_ZNK5Botan10Extensions23get_extension_object_asINS_14Cert_Extension18Extended_Key_UsageEEEPKT_RKNS_3OIDE:
  884|  6.48k|      const T* get_extension_object_as(const OID& oid = T::static_oid()) const {
  885|  6.48k|         if(const Certificate_Extension* extn = get_extension_object(oid)) {
  ------------------
  |  Branch (885:42): [True: 0, False: 6.48k]
  ------------------
  886|       |            // Unknown_Extension oid_name is empty
  887|      0|            if(extn->oid_name().empty()) {
  ------------------
  |  Branch (887:16): [True: 0, False: 0]
  ------------------
  888|      0|               return nullptr;
  889|      0|            } else if(const T* extn_as_T = dynamic_cast<const T*>(extn)) {
  ------------------
  |  Branch (889:32): [True: 0, False: 0]
  ------------------
  890|      0|               return extn_as_T;
  891|      0|            } else {
  892|      0|               throw Decoding_Error("Exception::get_extension_object_as dynamic_cast failed");
  893|      0|            }
  894|      0|         }
  895|       |
  896|  6.48k|         return nullptr;
  897|  6.48k|      }
_ZNK5Botan10Extensions23get_extension_object_asINS_14Cert_Extension23Issuer_Alternative_NameEEEPKT_RKNS_3OIDE:
  884|  6.48k|      const T* get_extension_object_as(const OID& oid = T::static_oid()) const {
  885|  6.48k|         if(const Certificate_Extension* extn = get_extension_object(oid)) {
  ------------------
  |  Branch (885:42): [True: 0, False: 6.48k]
  ------------------
  886|       |            // Unknown_Extension oid_name is empty
  887|      0|            if(extn->oid_name().empty()) {
  ------------------
  |  Branch (887:16): [True: 0, False: 0]
  ------------------
  888|      0|               return nullptr;
  889|      0|            } else if(const T* extn_as_T = dynamic_cast<const T*>(extn)) {
  ------------------
  |  Branch (889:32): [True: 0, False: 0]
  ------------------
  890|      0|               return extn_as_T;
  891|      0|            } else {
  892|      0|               throw Decoding_Error("Exception::get_extension_object_as dynamic_cast failed");
  893|      0|            }
  894|      0|         }
  895|       |
  896|  6.48k|         return nullptr;
  897|  6.48k|      }
_ZNK5Botan10Extensions23get_extension_object_asINS_14Cert_Extension24Subject_Alternative_NameEEEPKT_RKNS_3OIDE:
  884|  6.48k|      const T* get_extension_object_as(const OID& oid = T::static_oid()) const {
  885|  6.48k|         if(const Certificate_Extension* extn = get_extension_object(oid)) {
  ------------------
  |  Branch (885:42): [True: 6.48k, False: 0]
  ------------------
  886|       |            // Unknown_Extension oid_name is empty
  887|  6.48k|            if(extn->oid_name().empty()) {
  ------------------
  |  Branch (887:16): [True: 0, False: 6.48k]
  ------------------
  888|      0|               return nullptr;
  889|  6.48k|            } else if(const T* extn_as_T = dynamic_cast<const T*>(extn)) {
  ------------------
  |  Branch (889:32): [True: 6.48k, False: 0]
  ------------------
  890|  6.48k|               return extn_as_T;
  891|  6.48k|            } else {
  892|      0|               throw Decoding_Error("Exception::get_extension_object_as dynamic_cast failed");
  893|      0|            }
  894|  6.48k|         }
  895|       |
  896|      0|         return nullptr;
  897|  6.48k|      }
_ZNK5Botan10Extensions23get_extension_object_asINS_14Cert_Extension20Certificate_PoliciesEEEPKT_RKNS_3OIDE:
  884|  6.48k|      const T* get_extension_object_as(const OID& oid = T::static_oid()) const {
  885|  6.48k|         if(const Certificate_Extension* extn = get_extension_object(oid)) {
  ------------------
  |  Branch (885:42): [True: 0, False: 6.48k]
  ------------------
  886|       |            // Unknown_Extension oid_name is empty
  887|      0|            if(extn->oid_name().empty()) {
  ------------------
  |  Branch (887:16): [True: 0, False: 0]
  ------------------
  888|      0|               return nullptr;
  889|      0|            } else if(const T* extn_as_T = dynamic_cast<const T*>(extn)) {
  ------------------
  |  Branch (889:32): [True: 0, False: 0]
  ------------------
  890|      0|               return extn_as_T;
  891|      0|            } else {
  892|      0|               throw Decoding_Error("Exception::get_extension_object_as dynamic_cast failed");
  893|      0|            }
  894|      0|         }
  895|       |
  896|  6.48k|         return nullptr;
  897|  6.48k|      }
_ZNK5Botan10Extensions23get_extension_object_asINS_14Cert_Extension23CRL_Distribution_PointsEEEPKT_RKNS_3OIDE:
  884|  6.48k|      const T* get_extension_object_as(const OID& oid = T::static_oid()) const {
  885|  6.48k|         if(const Certificate_Extension* extn = get_extension_object(oid)) {
  ------------------
  |  Branch (885:42): [True: 0, False: 6.48k]
  ------------------
  886|       |            // Unknown_Extension oid_name is empty
  887|      0|            if(extn->oid_name().empty()) {
  ------------------
  |  Branch (887:16): [True: 0, False: 0]
  ------------------
  888|      0|               return nullptr;
  889|      0|            } else if(const T* extn_as_T = dynamic_cast<const T*>(extn)) {
  ------------------
  |  Branch (889:32): [True: 0, False: 0]
  ------------------
  890|      0|               return extn_as_T;
  891|      0|            } else {
  892|      0|               throw Decoding_Error("Exception::get_extension_object_as dynamic_cast failed");
  893|      0|            }
  894|      0|         }
  895|       |
  896|  6.48k|         return nullptr;
  897|  6.48k|      }

_ZN5Botan6ranges24assert_exact_byte_lengthILm32ETkNS0_14spanable_rangeENSt3__14spanIhLm32EEEEEvRKT0_:
   77|  8.98k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  8.98k|   const std::span s{r};
   79|  8.98k|   if constexpr(statically_spanable_range<R>) {
   80|  8.98k|      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|  8.98k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayImLm4EEETpTkNS0_14spanable_rangeEJNS2_4spanIhLm32EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  8.96k|{
  101|  8.96k|   const std::span s0{r0};
  102|       |
  103|  8.96k|   if constexpr(statically_spanable_range<R0>) {
  104|  8.96k|      constexpr size_t expected_size = s0.size_bytes();
  105|  8.96k|      (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|  8.96k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayImLm4EEEEEmRKT_:
   59|  18.8k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  18.8k|   return std::span{r}.size_bytes();
   61|  18.8k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm32ETkNS0_14spanable_rangeENSt3__14spanIKhLm32EEEEEvRKT0_:
   77|  9.91k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  9.91k|   const std::span s{r};
   79|  9.91k|   if constexpr(statically_spanable_range<R>) {
   80|  9.91k|      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|  9.91k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayImLm4EEETpTkNS0_14spanable_rangeEJNS2_4spanIKhLm32EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  9.91k|{
  101|  9.91k|   const std::span s0{r0};
  102|       |
  103|  9.91k|   if constexpr(statically_spanable_range<R0>) {
  104|  9.91k|      constexpr size_t expected_size = s0.size_bytes();
  105|  9.91k|      (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|  9.91k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm32ETkNS0_14spanable_rangeENSt3__15arrayImLm4EEEEEvRKT0_:
   77|  53.9k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  53.9k|   const std::span s{r};
   79|  53.9k|   if constexpr(statically_spanable_range<R>) {
   80|  53.9k|      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|  53.9k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm32EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm4EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  38.9k|{
  101|  38.9k|   const std::span s0{r0};
  102|       |
  103|  38.9k|   if constexpr(statically_spanable_range<R0>) {
  104|  38.9k|      constexpr size_t expected_size = s0.size_bytes();
  105|  38.9k|      (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|  38.9k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm32EEEEEmRKT_:
   59|  9.44k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  9.44k|   return std::span{r}.size_bytes();
   61|  9.44k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKhLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  38.9k|{
  101|  38.9k|   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|  38.9k|   } else {
  107|  38.9k|      const size_t expected_size = s0.size_bytes();
  108|  38.9k|      const bool correct_size =
  109|  38.9k|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|  38.9k|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 38.9k]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|  38.9k|   }
  115|  38.9k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKhLm18446744073709551615EEES6_EEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  1.85k|{
  101|  1.85k|   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|  1.85k|   } else {
  107|  1.85k|      const size_t expected_size = s0.size_bytes();
  108|  1.85k|      const bool correct_size =
  109|  3.71k|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  ------------------
  |  Branch (109:11): [True: 1.85k, False: 0]
  |  Branch (109:11): [True: 1.85k, False: 0]
  ------------------
  110|       |
  111|  1.85k|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 1.85k]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|  1.85k|   }
  115|  1.85k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIhLm8EEEEEvRKT0_:
   77|   753k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|   753k|   const std::span s{r};
   79|   753k|   if constexpr(statically_spanable_range<R>) {
   80|   753k|      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|   753k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm8EEETpTkNS0_14spanable_rangeEJNS3_IKmLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|   414k|{
  101|   414k|   const std::span s0{r0};
  102|       |
  103|   414k|   if constexpr(statically_spanable_range<R0>) {
  104|   414k|      constexpr size_t expected_size = s0.size_bytes();
  105|   414k|      (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|   414k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIKmLm1EEEEEvRKT0_:
   77|   414k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|   414k|   const std::span s{r};
   79|   414k|   if constexpr(statically_spanable_range<R>) {
   80|   414k|      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|   414k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm8EEEEEmRKT_:
   59|   414k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|   414k|   return std::span{r}.size_bytes();
   61|   414k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIKhLm8EEEEEvRKT0_:
   77|   847k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|   847k|   const std::span s{r};
   79|   847k|   if constexpr(statically_spanable_range<R>) {
   80|   847k|      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|   847k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm1EEETpTkNS0_14spanable_rangeEJNS3_IKhLm8EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|   423k|{
  101|   423k|   const std::span s0{r0};
  102|       |
  103|   423k|   if constexpr(statically_spanable_range<R0>) {
  104|   423k|      constexpr size_t expected_size = s0.size_bytes();
  105|   423k|      (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|   423k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm1EEEEEmRKT_:
   59|   451k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|   451k|   return std::span{r}.size_bytes();
   61|   451k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm2ETkNS0_14spanable_rangeENSt3__14spanIhLm2EEEEEvRKT0_:
   77|  9.17k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  9.17k|   const std::span s{r};
   79|  9.17k|   if constexpr(statically_spanable_range<R>) {
   80|  9.17k|      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|  9.17k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanItLm1EEEEEmRKT_:
   59|   192k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|   192k|   return std::span{r}.size_bytes();
   61|   192k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm2ETkNS0_14spanable_rangeENSt3__14spanIKhLm2EEEEEvRKT0_:
   77|   385k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|   385k|   const std::span s{r};
   79|   385k|   if constexpr(statically_spanable_range<R>) {
   80|   385k|      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|   385k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanItLm1EEETpTkNS0_14spanable_rangeEJNS3_IKhLm2EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|   192k|{
  101|   192k|   const std::span s0{r0};
  102|       |
  103|   192k|   if constexpr(statically_spanable_range<R0>) {
  104|   192k|      constexpr size_t expected_size = s0.size_bytes();
  105|   192k|      (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|   192k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__14spanIKhLm4EEEEEvRKT0_:
   77|  1.54k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  1.54k|   const std::span s{r};
   79|  1.54k|   if constexpr(statically_spanable_range<R>) {
   80|  1.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|  1.54k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIjLm1EEETpTkNS0_14spanable_rangeEJNS3_IKhLm4EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    771|{
  101|    771|   const std::span s0{r0};
  102|       |
  103|    771|   if constexpr(statically_spanable_range<R0>) {
  104|    771|      constexpr size_t expected_size = s0.size_bytes();
  105|    771|      (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|    771|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIjLm1EEEEEmRKT_:
   59|    771|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|    771|   return std::span{r}.size_bytes();
   61|    771|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm8EEETpTkNS0_14spanable_rangeEJNS3_ImLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|   234k|{
  101|   234k|   const std::span s0{r0};
  102|       |
  103|   234k|   if constexpr(statically_spanable_range<R0>) {
  104|   234k|      constexpr size_t expected_size = s0.size_bytes();
  105|   234k|      (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|   234k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__15arrayImLm1EEEEEvRKT0_:
   77|   234k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|   234k|   const std::span s{r};
   79|   234k|   if constexpr(statically_spanable_range<R>) {
   80|   234k|      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|   234k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayIhLm8EEEEEmRKT_:
   59|   117k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|   117k|   return std::span{r}.size_bytes();
   61|   117k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__16vectorIhNS2_9allocatorIhEEEEEEmRKT_:
   59|  1.15M|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  1.15M|   return std::span{r}.size_bytes();
   61|  1.15M|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm2EEETpTkNS0_14spanable_rangeEJNS3_IKtLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  4.59k|{
  101|  4.59k|   const std::span s0{r0};
  102|       |
  103|  4.59k|   if constexpr(statically_spanable_range<R0>) {
  104|  4.59k|      constexpr size_t expected_size = s0.size_bytes();
  105|  4.59k|      (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|  4.59k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm2ETkNS0_14spanable_rangeENSt3__14spanIKtLm1EEEEEvRKT0_:
   77|  4.59k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  4.59k|   const std::span s{r};
   79|  4.59k|   if constexpr(statically_spanable_range<R>) {
   80|  4.59k|      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|  4.59k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm2EEEEEmRKT_:
   59|  4.59k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  4.59k|   return std::span{r}.size_bytes();
   61|  4.59k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__14spanIhLm4EEEEEvRKT0_:
   77|  1.18M|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  1.18M|   const std::span s{r};
   79|  1.18M|   if constexpr(statically_spanable_range<R>) {
   80|  1.18M|      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.18M|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm4EEETpTkNS0_14spanable_rangeEJNS3_IKjLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|   596k|{
  101|   596k|   const std::span s0{r0};
  102|       |
  103|   596k|   if constexpr(statically_spanable_range<R0>) {
  104|   596k|      constexpr size_t expected_size = s0.size_bytes();
  105|   596k|      (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|   596k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__14spanIKjLm1EEEEEvRKT0_:
   77|   596k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|   596k|   const std::span s{r};
   79|   596k|   if constexpr(statically_spanable_range<R>) {
   80|   596k|      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|   596k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm4EEEEEmRKT_:
   59|   596k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|   596k|   return std::span{r}.size_bytes();
   61|   596k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKhLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  9.55k|{
  101|  9.55k|   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|  9.55k|   } else {
  107|  9.55k|      const size_t expected_size = s0.size_bytes();
  108|  9.55k|      const bool correct_size =
  109|  9.55k|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|  9.55k|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 9.55k]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|  9.55k|   }
  115|  9.55k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIjLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKhLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|      4|{
  101|      4|   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|      4|   } else {
  107|      4|      const size_t expected_size = s0.size_bytes();
  108|      4|      const bool correct_size =
  109|      4|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|      4|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 4]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|      4|   }
  115|      4|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKjLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  82.9k|{
  101|  82.9k|   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|  82.9k|   } else {
  107|  82.9k|      const size_t expected_size = s0.size_bytes();
  108|  82.9k|      const bool correct_size =
  109|  82.9k|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|  82.9k|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 82.9k]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|  82.9k|   }
  115|  82.9k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEEEEmRKT_:
   59|  73.0k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  73.0k|   return std::span{r}.size_bytes();
   61|  73.0k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKmLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  7.06k|{
  101|  7.06k|   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|  7.06k|   } else {
  107|  7.06k|      const size_t expected_size = s0.size_bytes();
  108|  7.06k|      const bool correct_size =
  109|  7.06k|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|  7.06k|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 7.06k]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|  7.06k|   }
  115|  7.06k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm18446744073709551615EEEEEmRKT_:
   59|  4.25k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  4.25k|   return std::span{r}.size_bytes();
   61|  4.25k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__15arrayIhLm8EEEEEvRKT0_:
   77|  27.9k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  27.9k|   const std::span s{r};
   79|  27.9k|   if constexpr(statically_spanable_range<R>) {
   80|  27.9k|      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|  27.9k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm1EEETpTkNS0_14spanable_rangeEJNS3_IhLm8EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  27.9k|{
  101|  27.9k|   const std::span s0{r0};
  102|       |
  103|  27.9k|   if constexpr(statically_spanable_range<R0>) {
  104|  27.9k|      constexpr size_t expected_size = s0.size_bytes();
  105|  27.9k|      (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|  27.9k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayIhLm16EEEEEmRKT_:
   59|    818|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|    818|   return std::span{r}.size_bytes();
   61|    818|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS2_6vectorIhNS_16secure_allocatorIhEEEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  4.53k|{
  101|  4.53k|   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|  4.53k|   } else {
  107|  4.53k|      const size_t expected_size = s0.size_bytes();
  108|  4.53k|      const bool correct_size =
  109|  4.53k|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|  4.53k|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 4.53k]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|  4.53k|   }
  115|  4.53k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm16EEETpTkNS0_14spanable_rangeEJNS3_ImLm2EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    114|{
  101|    114|   const std::span s0{r0};
  102|       |
  103|    114|   if constexpr(statically_spanable_range<R0>) {
  104|    114|      constexpr size_t expected_size = s0.size_bytes();
  105|    114|      (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|    114|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm16ETkNS0_14spanable_rangeENSt3__15arrayImLm2EEEEEvRKT0_:
   77|    114|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    114|   const std::span s{r};
   79|    114|   if constexpr(statically_spanable_range<R>) {
   80|    114|      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|    114|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm56EEETpTkNS0_14spanable_rangeEJNS2_4spanIKhLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|      2|{
  101|      2|   const std::span s0{r0};
  102|       |
  103|      2|   if constexpr(statically_spanable_range<R0>) {
  104|      2|      constexpr size_t expected_size = s0.size_bytes();
  105|      2|      (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|      2|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm56ETkNS0_14spanable_rangeENSt3__14spanIKhLm18446744073709551615EEEEEvRKT0_:
   77|      2|inline constexpr void assert_exact_byte_length(const R& r) {
   78|      2|   const std::span s{r};
   79|       |   if constexpr(statically_spanable_range<R>) {
   80|       |      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|      2|   } else {
   82|      2|      if(s.size_bytes() != expected) {
  ------------------
  |  Branch (82:10): [True: 0, False: 2]
  ------------------
   83|      0|         memory_region_size_violation();
   84|      0|      }
   85|      2|   }
   86|      2|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayIhLm56EEEEEmRKT_:
   59|      4|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|      4|   return std::span{r}.size_bytes();
   61|      4|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm56EEETpTkNS0_14spanable_rangeEJNS2_6vectorIhNS_16secure_allocatorIhEEEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|     15|{
  101|     15|   const std::span s0{r0};
  102|       |
  103|     15|   if constexpr(statically_spanable_range<R0>) {
  104|     15|      constexpr size_t expected_size = s0.size_bytes();
  105|     15|      (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|     15|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm56ETkNS0_14spanable_rangeENSt3__16vectorIhNS_16secure_allocatorIhEEEEEEvRKT0_:
   77|     15|inline constexpr void assert_exact_byte_length(const R& r) {
   78|     15|   const std::span s{r};
   79|       |   if constexpr(statically_spanable_range<R>) {
   80|       |      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|     15|   } else {
   82|     15|      if(s.size_bytes() != expected) {
  ------------------
  |  Branch (82:10): [True: 0, False: 15]
  ------------------
   83|      0|         memory_region_size_violation();
   84|      0|      }
   85|     15|   }
   86|     15|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm56EEEEEmRKT_:
   59|     47|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|     47|   return std::span{r}.size_bytes();
   61|     47|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENS_6StrongINSt3__15arrayIhLm56EEENS_9Point448_EJEEETpTkNS0_14spanable_rangeEJNS3_4spanIKhLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|      2|{
  101|      2|   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|      2|   } else {
  107|      2|      const size_t expected_size = s0.size_bytes();
  108|      2|      const bool correct_size =
  109|      2|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|      2|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 2]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|      2|   }
  115|      2|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENS_6StrongINSt3__15arrayIhLm56EEENS_9Point448_EJEEEEEmRKT_:
   59|      2|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|      2|   return std::span{r}.size_bytes();
   61|      2|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENS_6StrongINSt3__15arrayIhLm56EEENS_11ScalarX448_EJEEETpTkNS0_14spanable_rangeEJNS3_4spanIKhLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|     17|{
  101|     17|   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|     17|   } else {
  107|     17|      const size_t expected_size = s0.size_bytes();
  108|     17|      const bool correct_size =
  109|     17|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|     17|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 17]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|     17|   }
  115|     17|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENS_6StrongINSt3__15arrayIhLm56EEENS_11ScalarX448_EJEEEEEmRKT_:
   59|     17|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|     17|   return std::span{r}.size_bytes();
   61|     17|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayImLm7EEEEEmRKT_:
   59|   137k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|   137k|   return std::span{r}.size_bytes();
   61|   137k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm1ETkNS0_14spanable_rangeENSt3__15arrayIhLm1EEEEEvRKT0_:
   77|  2.28k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  2.28k|   const std::span s{r};
   79|  2.28k|   if constexpr(statically_spanable_range<R>) {
   80|  2.28k|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|       |   } else {
   82|       |      if(s.size_bytes() != expected) {
   83|       |         memory_region_size_violation();
   84|       |      }
   85|       |   }
   86|  2.28k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm1EEETpTkNS0_14spanable_rangeEJS4_EEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  2.28k|{
  101|  2.28k|   const std::span s0{r0};
  102|       |
  103|  2.28k|   if constexpr(statically_spanable_range<R0>) {
  104|  2.28k|      constexpr size_t expected_size = s0.size_bytes();
  105|  2.28k|      (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|  2.28k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm1ETkNS0_14spanable_rangeENSt3__14spanIhLm1EEEEEvRKT0_:
   77|  4.57k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  4.57k|   const std::span s{r};
   79|  4.57k|   if constexpr(statically_spanable_range<R>) {
   80|  4.57k|      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|  4.57k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm2ETkNS0_14spanable_rangeENSt3__15arrayItLm1EEEEEvRKT0_:
   77|  4.57k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  4.57k|   const std::span s{r};
   79|  4.57k|   if constexpr(statically_spanable_range<R>) {
   80|  4.57k|      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|  4.57k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm2EEETpTkNS0_14spanable_rangeEJNS3_ItLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  4.57k|{
  101|  4.57k|   const std::span s0{r0};
  102|       |
  103|  4.57k|   if constexpr(statically_spanable_range<R0>) {
  104|  4.57k|      constexpr size_t expected_size = s0.size_bytes();
  105|  4.57k|      (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|  4.57k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm16ETkNS0_14spanable_rangeENSt3__15arrayIhLm16EEEEEvRKT0_:
   77|    114|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    114|   const std::span s{r};
   79|    114|   if constexpr(statically_spanable_range<R>) {
   80|    114|      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|    114|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIjLm18446744073709551615EEEEEmRKT_:
   59|      2|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|      2|   return std::span{r}.size_bytes();
   61|      2|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm1ETkNS0_14spanable_rangeENSt3__14spanIKhLm1EEEEEvRKT0_:
   77|  1.63M|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  1.63M|   const std::span s{r};
   79|  1.63M|   if constexpr(statically_spanable_range<R>) {
   80|  1.63M|      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.63M|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEEEEvRKT0_:
   77|  2.81k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  2.81k|   const std::span s{r};
   79|       |   if constexpr(statically_spanable_range<R>) {
   80|       |      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|  2.81k|   } else {
   82|  2.81k|      if(s.size_bytes() != expected) {
  ------------------
  |  Branch (82:10): [True: 0, False: 2.81k]
  ------------------
   83|      0|         memory_region_size_violation();
   84|      0|      }
   85|  2.81k|   }
   86|  2.81k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKmLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  2.81k|{
  101|  2.81k|   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|  2.81k|   } else {
  107|  2.81k|      const size_t expected_size = s0.size_bytes();
  108|  2.81k|      const bool correct_size =
  109|  2.81k|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|  2.81k|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 2.81k]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|  2.81k|   }
  115|  2.81k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm16EEETpTkNS0_14spanable_rangeEJNS2_4spanIKhLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    114|{
  101|    114|   const std::span s0{r0};
  102|       |
  103|    114|   if constexpr(statically_spanable_range<R0>) {
  104|    114|      constexpr size_t expected_size = s0.size_bytes();
  105|    114|      (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|    114|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm16ETkNS0_14spanable_rangeENSt3__14spanIKhLm18446744073709551615EEEEEvRKT0_:
   77|    114|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    114|   const std::span s{r};
   79|       |   if constexpr(statically_spanable_range<R>) {
   80|       |      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|    114|   } else {
   82|    114|      if(s.size_bytes() != expected) {
  ------------------
  |  Branch (82:10): [True: 0, False: 114]
  ------------------
   83|      0|         memory_region_size_violation();
   84|      0|      }
   85|    114|   }
   86|    114|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm16EEETpTkNS0_14spanable_rangeEJS4_EEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    114|{
  101|    114|   const std::span s0{r0};
  102|       |
  103|    114|   if constexpr(statically_spanable_range<R0>) {
  104|    114|      constexpr size_t expected_size = s0.size_bytes();
  105|    114|      (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|    114|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJS4_S4_EEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    114|{
  101|    114|   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|    114|   } else {
  107|    114|      const size_t expected_size = s0.size_bytes();
  108|    114|      const bool correct_size =
  109|    228|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  ------------------
  |  Branch (109:11): [True: 114, False: 0]
  |  Branch (109:11): [True: 114, False: 0]
  ------------------
  110|       |
  111|    114|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 114]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|    114|   }
  115|    114|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm4EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm4EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  15.0k|{
  101|  15.0k|   const std::span s0{r0};
  102|       |
  103|  15.0k|   if constexpr(statically_spanable_range<R0>) {
  104|  15.0k|      constexpr size_t expected_size = s0.size_bytes();
  105|  15.0k|      (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|  15.0k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm4EEEEEmRKT_:
   59|  30.0k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  30.0k|   return std::span{r}.size_bytes();
   61|  30.0k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__16vectorIhNS2_9allocatorIhEEEETpTkNS0_14spanable_rangeEJA8_mEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  1.88k|{
  101|  1.88k|   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|  1.88k|   } else {
  107|  1.88k|      const size_t expected_size = s0.size_bytes();
  108|  1.88k|      const bool correct_size =
  109|  1.88k|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|  1.88k|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 1.88k]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|  1.88k|   }
  115|  1.88k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm6EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm6EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  3.80k|{
  101|  3.80k|   const std::span s0{r0};
  102|       |
  103|  3.80k|   if constexpr(statically_spanable_range<R0>) {
  104|  3.80k|      constexpr size_t expected_size = s0.size_bytes();
  105|  3.80k|      (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|  3.80k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm48ETkNS0_14spanable_rangeENSt3__15arrayImLm6EEEEEvRKT0_:
   77|  8.81k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  8.81k|   const std::span s{r};
   79|  8.81k|   if constexpr(statically_spanable_range<R>) {
   80|  8.81k|      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|  8.81k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm6EEEEEmRKT_:
   59|  7.60k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  7.60k|   return std::span{r}.size_bytes();
   61|  7.60k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__16vectorIhNS2_9allocatorIhEEEETpTkNS0_14spanable_rangeEJA12_mEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    980|{
  101|    980|   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|    980|   } else {
  107|    980|      const size_t expected_size = s0.size_bytes();
  108|    980|      const bool correct_size =
  109|    980|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|    980|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 980]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|    980|   }
  115|    980|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm48EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm6EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  5.01k|{
  101|  5.01k|   const std::span s0{r0};
  102|       |
  103|  5.01k|   if constexpr(statically_spanable_range<R0>) {
  104|  5.01k|      constexpr size_t expected_size = s0.size_bytes();
  105|  5.01k|      (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.01k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm8EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm8EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  3.77k|{
  101|  3.77k|   const std::span s0{r0};
  102|       |
  103|  3.77k|   if constexpr(statically_spanable_range<R0>) {
  104|  3.77k|      constexpr size_t expected_size = s0.size_bytes();
  105|  3.77k|      (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|  3.77k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm64ETkNS0_14spanable_rangeENSt3__15arrayImLm8EEEEEvRKT0_:
   77|  6.76k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  6.76k|   const std::span s{r};
   79|  6.76k|   if constexpr(statically_spanable_range<R>) {
   80|  6.76k|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|       |   } else {
   82|       |      if(s.size_bytes() != expected) {
   83|       |         memory_region_size_violation();
   84|       |      }
   85|       |   }
   86|  6.76k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm8EEEEEmRKT_:
   59|  7.54k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  7.54k|   return std::span{r}.size_bytes();
   61|  7.54k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__16vectorIhNS2_9allocatorIhEEEETpTkNS0_14spanable_rangeEJA16_mEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    572|{
  101|    572|   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|    572|   } else {
  107|    572|      const size_t expected_size = s0.size_bytes();
  108|    572|      const bool correct_size =
  109|    572|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|    572|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 572]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|    572|   }
  115|    572|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm64EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm8EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  2.98k|{
  101|  2.98k|   const std::span s0{r0};
  102|       |
  103|  2.98k|   if constexpr(statically_spanable_range<R0>) {
  104|  2.98k|      constexpr size_t expected_size = s0.size_bytes();
  105|  2.98k|      (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|  2.98k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm9EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm9EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  1.21k|{
  101|  1.21k|   const std::span s0{r0};
  102|       |
  103|  1.21k|   if constexpr(statically_spanable_range<R0>) {
  104|  1.21k|      constexpr size_t expected_size = s0.size_bytes();
  105|  1.21k|      (assert_exact_byte_length<expected_size>(rs), ...);
  106|       |   } else {
  107|       |      const size_t expected_size = s0.size_bytes();
  108|       |      const bool correct_size =
  109|       |         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|       |      if(!correct_size) {
  112|       |         memory_region_size_violation();
  113|       |      }
  114|       |   }
  115|  1.21k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm72ETkNS0_14spanable_rangeENSt3__15arrayImLm9EEEEEvRKT0_:
   77|  5.47k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  5.47k|   const std::span s{r};
   79|  5.47k|   if constexpr(statically_spanable_range<R>) {
   80|  5.47k|      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.47k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm9EEEEEmRKT_:
   59|  2.43k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  2.43k|   return std::span{r}.size_bytes();
   61|  2.43k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm72EEETpTkNS0_14spanable_rangeEJNS3_ImLm9EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  4.26k|{
  101|  4.26k|   const std::span s0{r0};
  102|       |
  103|  4.26k|   if constexpr(statically_spanable_range<R0>) {
  104|  4.26k|      constexpr size_t expected_size = s0.size_bytes();
  105|  4.26k|      (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|  4.26k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__16vectorIhNS2_9allocatorIhEEEETpTkNS0_14spanable_rangeEJA18_mEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    770|{
  101|    770|   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|    770|   } else {
  107|    770|      const size_t expected_size = s0.size_bytes();
  108|    770|      const bool correct_size =
  109|    770|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|    770|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 770]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|    770|   }
  115|    770|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm66EEETpTkNS0_14spanable_rangeEJNS3_IKhLm66EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  4.26k|{
  101|  4.26k|   const std::span s0{r0};
  102|       |
  103|  4.26k|   if constexpr(statically_spanable_range<R0>) {
  104|  4.26k|      constexpr size_t expected_size = s0.size_bytes();
  105|  4.26k|      (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|  4.26k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm66ETkNS0_14spanable_rangeENSt3__14spanIKhLm66EEEEEvRKT0_:
   77|  4.26k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  4.26k|   const std::span s{r};
   79|  4.26k|   if constexpr(statically_spanable_range<R>) {
   80|  4.26k|      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|  4.26k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm66EEEEEmRKT_:
   59|  8.52k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  8.52k|   return std::span{r}.size_bytes();
   61|  8.52k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayImLm7EEETpTkNS0_14spanable_rangeEJNS2_4spanIKhLm56EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|     68|{
  101|     68|   const std::span s0{r0};
  102|       |
  103|     68|   if constexpr(statically_spanable_range<R0>) {
  104|     68|      constexpr size_t expected_size = s0.size_bytes();
  105|     68|      (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|     68|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm56ETkNS0_14spanable_rangeENSt3__14spanIKhLm56EEEEEvRKT0_:
   77|     68|inline constexpr void assert_exact_byte_length(const R& r) {
   78|     68|   const std::span s{r};
   79|     68|   if constexpr(statically_spanable_range<R>) {
   80|     68|      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|     68|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm56EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm7EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|     34|{
  101|     34|   const std::span s0{r0};
  102|       |
  103|     34|   if constexpr(statically_spanable_range<R0>) {
  104|     34|      constexpr size_t expected_size = s0.size_bytes();
  105|     34|      (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|     34|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm56ETkNS0_14spanable_rangeENSt3__15arrayImLm7EEEEEvRKT0_:
   77|     34|inline constexpr void assert_exact_byte_length(const R& r) {
   78|     34|   const std::span s{r};
   79|     34|   if constexpr(statically_spanable_range<R>) {
   80|     34|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|       |   } else {
   82|       |      if(s.size_bytes() != expected) {
   83|       |         memory_region_size_violation();
   84|       |      }
   85|       |   }
   86|     34|}

_ZN5Botan21RandomNumberGeneratorD2Ev:
   52|  6.48k|      virtual ~RandomNumberGenerator() = default;
_ZN5Botan21RandomNumberGenerator9randomizeENSt3__14spanIhLm18446744073709551615EEE:
   86|  35.3k|      void randomize(std::span<uint8_t> output) { this->fill_bytes_with_input(output, {}); }
_ZN5Botan21RandomNumberGenerator9randomizeEPhm:
   93|  4.29k|      void randomize(uint8_t output[], size_t length) { this->randomize(std::span(output, length)); }
_ZN5Botan21RandomNumberGenerator11add_entropyENSt3__14spanIKhLm18446744073709551615EEE:
  114|      1|      void add_entropy(std::span<const uint8_t> input) { this->fill_bytes_with_input({}, input); }
_ZN5Botan21RandomNumberGenerator10random_vecENSt3__14spanIhLm18446744073709551615EEE:
  244|  5.65k|      void random_vec(std::span<uint8_t> v) { this->randomize(v); }
_ZN5Botan21RandomNumberGeneratorC2Ev:
   57|  6.48k|      RandomNumberGenerator() = default;
_ZN5Botan21RandomNumberGenerator10random_vecITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS3_9allocatorIhEEEEEEvRT_m:
  255|  5.63k|      void random_vec(T& v, size_t bytes) {
  256|  5.63k|         v.resize(bytes);
  257|  5.63k|         random_vec(v);
  258|  5.63k|      }
_ZN5Botan21RandomNumberGenerator10random_vecITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS_16secure_allocatorIhEEEEQsr3stdE21default_initializableIT_EEES8_m:
  270|     25|      T random_vec(size_t bytes) {
  271|     25|         T result;
  272|     25|         random_vec(result, bytes);
  273|     25|         return result;
  274|     25|      }
_ZN5Botan21RandomNumberGenerator10random_vecITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS_16secure_allocatorIhEEEEEEvRT_m:
  255|     25|      void random_vec(T& v, size_t bytes) {
  256|     25|         v.resize(bytes);
  257|     25|         random_vec(v);
  258|     25|      }
_ZN5Botan21RandomNumberGenerator10random_vecITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS3_9allocatorIhEEEEQsr3stdE21default_initializableIT_EEES8_m:
  270|  5.63k|      T random_vec(size_t bytes) {
  271|  5.63k|         T result;
  272|  5.63k|         random_vec(result, bytes);
  273|  5.63k|         return result;
  274|  5.63k|      }

_ZN5Botan16secure_allocatorIhE8allocateEm:
   95|   531k|      T* allocate(std::size_t n) { return static_cast<T*>(allocate_memory(n, sizeof(T))); }
_ZN5Botan16secure_allocatorIhE10deallocateEPhm:
  102|   531k|      void deallocate(T* p, std::size_t n) { deallocate_memory(p, n, sizeof(T)); }
_ZN5BotanneIhhEEbRKNS_16secure_allocatorIT_EERKNS1_IT0_EE:
  123|  45.5k|inline bool operator!=(const secure_allocator<T>& /*a*/, const secure_allocator<U>& /*b*/) {
  124|  45.5k|   return false;
  125|  45.5k|}
_ZN5Botan16secure_allocatorIjE10deallocateEPjm:
  102|  22.1k|      void deallocate(T* p, std::size_t n) { deallocate_memory(p, n, sizeof(T)); }
_ZN5Botan16secure_allocatorImE10deallocateEPmm:
  102|   106k|      void deallocate(T* p, std::size_t n) { deallocate_memory(p, n, sizeof(T)); }
_ZN5Botan16secure_allocatorImE8allocateEm:
   95|   106k|      T* allocate(std::size_t n) { return static_cast<T*>(allocate_memory(n, sizeof(T))); }
_ZN5BotanpLIhNSt3__19allocatorIhEES3_EERNS1_6vectorIT_T0_EES8_RKNS4_IS5_T1_EE:
  168|  25.9k|std::vector<T, Alloc>& operator+=(std::vector<T, Alloc>& out, const std::vector<T, Alloc2>& in) {
  169|  25.9k|   out.insert(out.end(), in.begin(), in.end());
  170|  25.9k|   return out;
  171|  25.9k|}
_ZN5BotanpLIhNSt3__19allocatorIhEENS_16secure_allocatorIhEEEERNS1_6vectorIT_T0_EESA_RKNS6_IS7_T1_EE:
  168|  1.63k|std::vector<T, Alloc>& operator+=(std::vector<T, Alloc>& out, const std::vector<T, Alloc2>& in) {
  169|  1.63k|   out.insert(out.end(), in.begin(), in.end());
  170|  1.63k|   return out;
  171|  1.63k|}
_ZN5BotanpLIhNS_16secure_allocatorIhEES2_EERNSt3__16vectorIT_T0_EES8_RKNS4_IS5_T1_EE:
  168|      5|std::vector<T, Alloc>& operator+=(std::vector<T, Alloc>& out, const std::vector<T, Alloc2>& in) {
  169|      5|   out.insert(out.end(), in.begin(), in.end());
  170|      5|   return out;
  171|      5|}
_ZN5BotanpLIhNS_16secure_allocatorIhEEmEERNSt3__16vectorIT_T0_EES8_RKNS3_4pairIPKS5_T1_EE:
  204|   315k|std::vector<T, Alloc>& operator+=(std::vector<T, Alloc>& out, const std::pair<const T*, L>& in) {
  205|   315k|   if(in.second > 0) {
  ------------------
  |  Branch (205:7): [True: 309k, False: 6.48k]
  ------------------
  206|   309k|      out.insert(out.end(), in.first, in.first + in.second);
  207|   309k|   }
  208|   315k|   return out;
  209|   315k|}
_ZN5BotanpLIhNS_16secure_allocatorIhEENSt3__19allocatorIhEEEERNS3_6vectorIT_T0_EESA_RKNS6_IS7_T1_EE:
  168|     85|std::vector<T, Alloc>& operator+=(std::vector<T, Alloc>& out, const std::vector<T, Alloc2>& in) {
  169|     85|   out.insert(out.end(), in.begin(), in.end());
  170|     85|   return out;
  171|     85|}
_ZN5Botan16secure_allocatorIjE8allocateEm:
   95|  22.1k|      T* allocate(std::size_t n) { return static_cast<T*>(allocate_memory(n, sizeof(T))); }
_ZN5Botan3zapImNS_16secure_allocatorImEEEEvRNSt3__16vectorIT_T0_EE:
  261|    134|void zap(std::vector<T, Alloc>& vec) {
  262|    134|   zeroise(vec);
  263|    134|   vec.clear();
  264|    134|   vec.shrink_to_fit();
  265|    134|}
_ZN5Botan7zeroiseImNS_16secure_allocatorImEEEEvRNSt3__16vectorIT_T0_EE:
  241|    134|void zeroise(std::vector<T, Alloc>& vec) {
  242|    134|   for(size_t i = 0; i != vec.size(); ++i) {
  ------------------
  |  Branch (242:22): [True: 0, False: 134]
  ------------------
  243|      0|      vec[i] = static_cast<T>(0);
  244|      0|   }
  245|    134|}
_ZN5Botan7zeroiseIhNS_16secure_allocatorIhEEEEvRNSt3__16vectorIT_T0_EE:
  241|    942|void zeroise(std::vector<T, Alloc>& vec) {
  242|   141k|   for(size_t i = 0; i != vec.size(); ++i) {
  ------------------
  |  Branch (242:22): [True: 140k, False: 942]
  ------------------
  243|   140k|      vec[i] = static_cast<T>(0);
  244|   140k|   }
  245|    942|}
_ZN5BotanpLIhNS_16secure_allocatorIhEEmEERNSt3__16vectorIT_T0_EES8_RKNS3_4pairIPS5_T1_EE:
  218|     50|std::vector<T, Alloc>& operator+=(std::vector<T, Alloc>& out, const std::pair<T*, L>& in) {
  219|     50|   if(in.second > 0) {
  ------------------
  |  Branch (219:7): [True: 50, False: 0]
  ------------------
  220|     50|      out.insert(out.end(), in.first, in.first + in.second);
  221|     50|   }
  222|     50|   return out;
  223|     50|}
_ZN5Botan6unlockIhEENSt3__16vectorIT_NS1_9allocatorIS3_EEEERKNS2_IS3_NS_16secure_allocatorIS3_EEEE:
  155|    158|std::vector<T> unlock(const secure_vector<T>& in) {
  156|    158|   return std::vector<T>(in.begin(), in.end());
  157|    158|}
_ZN5Botan7zeroiseIhNSt3__19allocatorIhEEEEvRNS1_6vectorIT_T0_EE:
  241|    382|void zeroise(std::vector<T, Alloc>& vec) {
  242|  6.49k|   for(size_t i = 0; i != vec.size(); ++i) {
  ------------------
  |  Branch (242:22): [True: 6.11k, False: 382]
  ------------------
  243|  6.11k|      vec[i] = static_cast<T>(0);
  244|  6.11k|   }
  245|    382|}
_ZN5BotanpLIhNSt3__19allocatorIhEEmEERNS1_6vectorIT_T0_EES8_RKNS1_4pairIPKS5_T1_EE:
  204|    158|std::vector<T, Alloc>& operator+=(std::vector<T, Alloc>& out, const std::pair<const T*, L>& in) {
  205|    158|   if(in.second > 0) {
  ------------------
  |  Branch (205:7): [True: 158, False: 0]
  ------------------
  206|    158|      out.insert(out.end(), in.first, in.first + in.second);
  207|    158|   }
  208|    158|   return out;
  209|    158|}

_ZN5Botan12Stateful_RNGC2Ev:
   64|      1|      Stateful_RNG() : m_reseed_interval(0) {}

_ZN5Botan12StreamCipher6cipherEPKhPhm:
   61|    361|      void cipher(const uint8_t in[], uint8_t out[], size_t len) { cipher_bytes(in, out, len); }
_ZN5Botan12StreamCipher15write_keystreamENSt3__14spanIhLm18446744073709551615EEE:
   88|  35.3k|      void write_keystream(std::span<uint8_t> out) { generate_keystream(out.data(), out.size()); }
_ZN5Botan12StreamCipher8encipherENSt3__14spanIhLm18446744073709551615EEE:
  124|    248|      void encipher(std::span<uint8_t> inout) { cipher(inout.data(), inout.data(), inout.size()); }
_ZN5Botan12StreamCipher6set_ivEPKhm:
  168|    250|      void set_iv(const uint8_t iv[], size_t iv_len) { set_iv_bytes(iv, iv_len); }
_ZN5Botan12StreamCipher6set_ivENSt3__14spanIKhLm18446744073709551615EEE:
  175|    134|      void set_iv(std::span<const uint8_t> iv) { set_iv_bytes(iv.data(), iv.size()); }
_ZN5Botan12StreamCipher15keystream_bytesITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS_16secure_allocatorIhEEEEEET_m:
   98|      1|      T keystream_bytes(size_t bytes) {
   99|      1|         T out(bytes);
  100|      1|         write_keystream(out);
  101|      1|         return out;
  102|      1|      }

_ZNKR5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEE3getEv:
  113|  9.10k|      constexpr const T& get() const& { return m_value; }
_ZNK5Botan6detail29Container_Strong_Adapter_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEE4sizeEv:
  210|     97|      size_type size() const noexcept(noexcept(this->get().size())) { return this->get().size(); }
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEED2Ev:
  101|  29.8k|      ~Strong_Base() = default;
_ZNK5Botan6detail29Container_Strong_Adapter_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEE5emptyEvQsr8conceptsE9has_emptyIT_E:
  216|  6.19k|      {
  217|  6.19k|         return this->get().empty();
  218|  6.19k|      }
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2ES6_:
  105|  10.2k|      constexpr explicit Strong_Base(T v) : m_value(std::move(v)) {}
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2EOS7_:
   91|  5.84k|      Strong_Base(Strong_Base&&) noexcept = default;
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2ERKS7_:
   88|  3.18k|      Strong_Base(const Strong_Base&) = default;
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2Ev:
   85|  10.5k|      Strong_Base() = default;
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEaSEOS7_:
   99|  7.51k|      Strong_Base& operator=(Strong_Base&&) noexcept = default;
_ZN5Botan18unwrap_strong_typeIRmEEDcOT_:
  328|   419k|[[nodiscard]] constexpr decltype(auto) unwrap_strong_type(T&& t) {
  329|   419k|   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|   419k|      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|   419k|}
_ZN5Botan16wrap_strong_typeImRmQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  353|   451k|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  354|   451k|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  355|       |      // Noop, if the parameter type already is the desired return type.
  356|   451k|      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|   451k|}
_ZN5Botan16wrap_strong_typeItRtQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  353|   192k|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  354|   192k|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  355|       |      // Noop, if the parameter type already is the desired return type.
  356|   192k|      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|   192k|}
_ZN5Botan16wrap_strong_typeIjRjQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  353|    771|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  354|    771|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  355|       |      // Noop, if the parameter type already is the desired return type.
  356|    771|      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|    771|}
_ZN5Botan16wrap_strong_typeItRKtQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS3_Esr3stdE18constructible_fromINS3_12wrapped_typeES4_EEEDcOS4_:
  353|  2.28k|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  354|  2.28k|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  355|       |      // Noop, if the parameter type already is the desired return type.
  356|  2.28k|      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|  2.28k|}
_ZN5Botan18unwrap_strong_typeIRtEEDcOT_:
  328|  4.59k|[[nodiscard]] constexpr decltype(auto) unwrap_strong_type(T&& t) {
  329|  4.59k|   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|  4.59k|      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|  4.59k|}
_ZN5Botan18unwrap_strong_typeIRjEEDcOT_:
  328|   596k|[[nodiscard]] constexpr decltype(auto) unwrap_strong_type(T&& t) {
  329|   596k|   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|   596k|      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|   596k|}
_ZN5Botan18unwrap_strong_typeIRNSt3__16vectorIhNS_16secure_allocatorIhEEEEEEDcOT_:
  328|  6.20k|[[nodiscard]] constexpr decltype(auto) unwrap_strong_type(T&& t) {
  329|  6.20k|   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|  6.20k|      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|  6.20k|}
_ZNK5Botan6detail29Container_Strong_Adapter_BaseINSt3__15arrayIhLm56EEEE5beginEv:
  182|     17|      decltype(auto) begin() const noexcept(noexcept(this->get().begin())) { return this->get().begin(); }
_ZNK5Botan6detail29Container_Strong_Adapter_BaseINSt3__15arrayIhLm56EEEE3endEv:
  190|     17|      decltype(auto) end() const noexcept(noexcept(this->get().end())) { return this->get().end(); }
_ZNK5Botan6detail14Strong_AdapterINSt3__15arrayIhLm56EEEE4dataEv:
  281|     38|      decltype(auto) data() const noexcept(noexcept(this->get().data())) { return this->get().data(); }
_ZNK5Botan6detail29Container_Strong_Adapter_BaseINSt3__15arrayIhLm56EEEE4sizeEv:
  210|     38|      size_type size() const noexcept(noexcept(this->get().size())) { return this->get().size(); }
_ZN5Botan6detail14Strong_AdapterINSt3__15arrayIhLm56EEEE4dataEv:
  279|     19|      decltype(auto) data() noexcept(noexcept(this->get().data())) { return this->get().data(); }
_ZNR5Botan6detail11Strong_BaseINSt3__15arrayIhLm56EEEE3getEv:
  109|     53|      constexpr T& get() & { return m_value; }
_ZN5Botan6detail29Container_Strong_Adapter_BaseINSt3__15arrayIhLm56EEEEixIiEEDcOT_:
  248|     34|      decltype(auto) operator[](U&& i) noexcept(noexcept(this->get().operator[](i))) {
  249|     34|         return this->get()[std::forward<U>(i)];
  250|     34|      }
_ZNKR5Botan6detail11Strong_BaseINSt3__15arrayIhLm56EEEE3getEv:
  113|  7.76k|      constexpr const T& get() const& { return m_value; }
_ZNK5Botan6detail29Container_Strong_Adapter_BaseINSt3__15arrayIhLm56EEEEixImEEDcOT_:
  240|  7.61k|      decltype(auto) operator[](U&& i) const noexcept(noexcept(this->get().operator[](i))) {
  241|  7.61k|         return this->get()[std::forward<U>(i)];
  242|  7.61k|      }
_ZN5Botan6detail11Strong_BaseINSt3__15arrayIhLm56EEEEC2ES4_:
  105|     17|      constexpr explicit Strong_Base(T v) : m_value(std::move(v)) {}
_ZN5Botan18unwrap_strong_typeIRhEEDcOT_:
  328|  2.28k|[[nodiscard]] constexpr decltype(auto) unwrap_strong_type(T&& t) {
  329|  2.28k|   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|  2.28k|      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|  2.28k|}
_ZN5Botan16wrap_strong_typeIhRhQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  353|  1.63M|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  354|  1.63M|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  355|       |      // Noop, if the parameter type already is the desired return type.
  356|  1.63M|      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|  1.63M|}

_ZN5Botan24Key_Length_SpecificationC2Em:
   28|    341|      explicit Key_Length_Specification(size_t keylen) : m_min_keylen(keylen), m_max_keylen(keylen), m_keylen_mod(1) {}
_ZN5Botan24Key_Length_SpecificationC2Emmm:
   37|  4.77k|            m_min_keylen(min_k), m_max_keylen(max_k > 0 ? max_k : min_k), m_keylen_mod(k_mod) {}
  ------------------
  |  Branch (37:47): [True: 3.77k, False: 995]
  ------------------
_ZNK5Botan24Key_Length_Specification15valid_keylengthEm:
   44|  5.11k|      bool valid_keylength(size_t length) const {
   45|  5.11k|         return ((length >= m_min_keylen) && (length <= m_max_keylen) && (length % m_keylen_mod == 0));
  ------------------
  |  Branch (45:18): [True: 5.11k, False: 0]
  |  Branch (45:46): [True: 5.11k, False: 0]
  |  Branch (45:74): [True: 5.11k, False: 0]
  ------------------
   46|  5.11k|      }
_ZNK5Botan18SymmetricAlgorithm15valid_keylengthEm:
  143|  5.11k|      bool valid_keylength(size_t length) const { return key_spec().valid_keylength(length); }
_ZNK5Botan18SymmetricAlgorithm23assert_key_material_setEv:
  180|  86.8k|      void assert_key_material_set() const { assert_key_material_set(has_keying_material()); }
_ZNK5Botan18SymmetricAlgorithm23assert_key_material_setEb:
  186|  86.8k|      void assert_key_material_set(bool predicate) const {
  187|  86.8k|         if(!predicate) {
  ------------------
  |  Branch (187:13): [True: 0, False: 86.8k]
  ------------------
  188|      0|            throw_key_not_set_error();
  189|      0|         }
  190|  86.8k|      }
_ZN5Botan18SymmetricAlgorithmD2Ev:
   90|  3.22k|      virtual ~SymmetricAlgorithm() = default;
_ZN5Botan18SymmetricAlgorithmC2Ev:
   88|  3.22k|      SymmetricAlgorithm() = default;

_ZNK5Botan11OctetString6lengthEv:
   28|     76|      size_t length() const { return m_data.size(); }
_ZNK5Botan11OctetString5emptyEv:
   40|  2.11k|      bool empty() const { return m_data.empty(); }
_ZNK5Botan11OctetString7bits_ofEv:
   46|  4.09k|      secure_vector<uint8_t> bits_of() const { return m_data; }
_ZN5Botan11OctetStringC2ENSt3__16vectorIhNS_16secure_allocatorIhEEEE:
  112|  4.49k|      explicit OctetString(secure_vector<uint8_t> in) : m_data(std::move(in)) {}

_ZNK5Botan3TLS5Alert8is_validEv:
   78|  4.52k|      bool is_valid() const { return (m_type_code != AlertType::None); }
_ZNK5Botan3TLS5Alert8is_fatalEv:
   93|  10.7k|      bool is_fatal() const { return m_fatal; }
_ZNK5Botan3TLS5Alert4typeEv:
  100|  22.6k|      Type type() const { return m_type_code; }
_ZN5Botan3TLS5AlertC2ENS0_9AlertTypeEb:
  126|  4.52k|            m_fatal(fatal), m_type_code(type_code) {}

_ZN5Botan3TLS12Group_ParamsC2Ev:
  145|    100|      constexpr Group_Params() : m_code(Group_Params_Code::NONE) {}
_ZN5Botan3TLS12Group_ParamsC2ENS0_17Group_Params_CodeE:
  148|  3.42k|      constexpr Group_Params(Group_Params_Code code) : m_code(code) {}
_ZN5Botan3TLS12Group_ParamsC2Et:
  151|  29.1k|      constexpr Group_Params(uint16_t code) : m_code(static_cast<Group_Params_Code>(code)) {}
_ZNK5Botan3TLS12Group_ParamseqENS0_17Group_Params_CodeE:
  158|  10.7k|      constexpr bool operator==(Group_Params_Code code) const { return m_code == code; }
_ZNK5Botan3TLS12Group_ParamseqES1_:
  160|  52.2k|      constexpr bool operator==(Group_Params other) const { return m_code == other.m_code; }
_ZNK5Botan3TLS12Group_Params9wire_codeEv:
  166|  73.6k|      constexpr uint16_t wire_code() const { return static_cast<uint16_t>(m_code); }
_ZNK5Botan3TLS12Group_Params9is_x25519Ev:
  173|  23.8k|      constexpr bool is_x25519() const { return m_code == Group_Params_Code::X25519; }
_ZNK5Botan3TLS12Group_Params7is_x448Ev:
  175|  23.8k|      constexpr bool is_x448() const { return m_code == Group_Params_Code::X448; }
_ZNK5Botan3TLS12Group_Params19is_ecdh_named_curveEv:
  177|  31.0k|      constexpr bool is_ecdh_named_curve() const {
  178|  31.0k|         return m_code == Group_Params_Code::SECP256R1 || m_code == Group_Params_Code::SECP384R1 ||
  ------------------
  |  Branch (178:17): [True: 2.18k, False: 28.8k]
  |  Branch (178:59): [True: 1.36k, False: 27.4k]
  ------------------
  179|  27.4k|                m_code == Group_Params_Code::SECP521R1 || m_code == Group_Params_Code::BRAINPOOL256R1 ||
  ------------------
  |  Branch (179:17): [True: 2.19k, False: 25.2k]
  |  Branch (179:59): [True: 2.97k, False: 22.3k]
  ------------------
  180|  22.3k|                m_code == Group_Params_Code::BRAINPOOL384R1 || m_code == Group_Params_Code::BRAINPOOL512R1 ||
  ------------------
  |  Branch (180:17): [True: 1.49k, False: 20.8k]
  |  Branch (180:64): [True: 1.63k, False: 19.1k]
  ------------------
  181|  19.1k|                m_code == Group_Params_Code::BRAINPOOL256R1TLS13 || m_code == Group_Params_Code::BRAINPOOL384R1TLS13 ||
  ------------------
  |  Branch (181:17): [True: 433, False: 18.7k]
  |  Branch (181:69): [True: 190, False: 18.5k]
  ------------------
  182|  18.5k|                m_code == Group_Params_Code::BRAINPOOL512R1TLS13;
  ------------------
  |  Branch (182:17): [True: 152, False: 18.4k]
  ------------------
  183|  31.0k|      }
_ZNK5Botan3TLS12Group_Params17is_in_ffdhe_rangeEv:
  185|  25.2k|      constexpr bool is_in_ffdhe_range() const {
  186|       |         // See RFC 7919
  187|  25.2k|         return wire_code() >= 256 && wire_code() < 512;
  ------------------
  |  Branch (187:17): [True: 16.6k, False: 8.65k]
  |  Branch (187:39): [True: 1.15k, False: 15.4k]
  ------------------
  188|  25.2k|      }
_ZNK5Botan3TLS12Group_Params17is_dh_named_groupEv:
  190|  4.62k|      constexpr bool is_dh_named_group() const {
  191|  4.62k|         return m_code == Group_Params_Code::FFDHE_2048 || m_code == Group_Params_Code::FFDHE_3072 ||
  ------------------
  |  Branch (191:17): [True: 0, False: 4.62k]
  |  Branch (191:60): [True: 0, False: 4.62k]
  ------------------
  192|  4.62k|                m_code == Group_Params_Code::FFDHE_4096 || m_code == Group_Params_Code::FFDHE_6144 ||
  ------------------
  |  Branch (192:17): [True: 0, False: 4.62k]
  |  Branch (192:60): [True: 0, False: 4.62k]
  ------------------
  193|  4.62k|                m_code == Group_Params_Code::FFDHE_8192;
  ------------------
  |  Branch (193:17): [True: 0, False: 4.62k]
  ------------------
  194|  4.62k|      }
_ZNK5Botan3TLS12Group_Params14is_pure_ml_kemEv:
  196|  6.06k|      constexpr bool is_pure_ml_kem() const {
  197|  6.06k|         return m_code == Group_Params_Code::ML_KEM_512 || m_code == Group_Params_Code::ML_KEM_768 ||
  ------------------
  |  Branch (197:17): [True: 0, False: 6.06k]
  |  Branch (197:60): [True: 0, False: 6.06k]
  ------------------
  198|  6.06k|                m_code == Group_Params_Code::ML_KEM_1024;
  ------------------
  |  Branch (198:17): [True: 0, False: 6.06k]
  ------------------
  199|  6.06k|      }
_ZNK5Botan3TLS12Group_Params16is_pure_frodokemEv:
  201|  6.06k|      constexpr bool is_pure_frodokem() const {
  202|  6.06k|         return m_code == Group_Params_Code::eFRODOKEM_640_SHAKE_OQS ||
  ------------------
  |  Branch (202:17): [True: 0, False: 6.06k]
  ------------------
  203|  6.06k|                m_code == Group_Params_Code::eFRODOKEM_976_SHAKE_OQS ||
  ------------------
  |  Branch (203:17): [True: 0, False: 6.06k]
  ------------------
  204|  6.06k|                m_code == Group_Params_Code::eFRODOKEM_1344_SHAKE_OQS ||
  ------------------
  |  Branch (204:17): [True: 0, False: 6.06k]
  ------------------
  205|  6.06k|                m_code == Group_Params_Code::eFRODOKEM_640_AES_OQS ||
  ------------------
  |  Branch (205:17): [True: 0, False: 6.06k]
  ------------------
  206|  6.06k|                m_code == Group_Params_Code::eFRODOKEM_976_AES_OQS ||
  ------------------
  |  Branch (206:17): [True: 0, False: 6.06k]
  ------------------
  207|  6.06k|                m_code == Group_Params_Code::eFRODOKEM_1344_AES_OQS;
  ------------------
  |  Branch (207:17): [True: 0, False: 6.06k]
  ------------------
  208|  6.06k|      }
_ZNK5Botan3TLS12Group_Params17is_pure_ecc_groupEv:
  210|  23.8k|      constexpr bool is_pure_ecc_group() const { return is_x25519() || is_x448() || is_ecdh_named_curve(); }
  ------------------
  |  Branch (210:57): [True: 22, False: 23.8k]
  |  Branch (210:72): [True: 33, False: 23.7k]
  |  Branch (210:85): [True: 5.43k, False: 18.3k]
  ------------------
_ZNK5Botan3TLS12Group_Params15is_post_quantumEv:
  212|  6.06k|      constexpr bool is_post_quantum() const {
  213|  6.06k|         BOTAN_DIAGNOSTIC_PUSH
  214|  6.06k|         BOTAN_DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS
  215|       |
  216|  6.06k|         return is_pure_ml_kem() || is_pure_frodokem() || is_pqc_hybrid();
  ------------------
  |  Branch (216:17): [True: 0, False: 6.06k]
  |  Branch (216:37): [True: 0, False: 6.06k]
  |  Branch (216:59): [True: 0, False: 6.06k]
  ------------------
  217|       |
  218|  6.06k|         BOTAN_DIAGNOSTIC_POP
  219|  6.06k|      }
_ZNK5Botan3TLS12Group_Params20is_pqc_hybrid_ml_kemEv:
  221|  6.06k|      constexpr bool is_pqc_hybrid_ml_kem() const {
  222|  6.06k|         return m_code == Group_Params_Code::HYBRID_SECP256R1_ML_KEM_768 ||
  ------------------
  |  Branch (222:17): [True: 0, False: 6.06k]
  ------------------
  223|  6.06k|                m_code == Group_Params_Code::HYBRID_SECP384R1_ML_KEM_1024 ||
  ------------------
  |  Branch (223:17): [True: 0, False: 6.06k]
  ------------------
  224|  6.06k|                m_code == Group_Params_Code::HYBRID_X25519_ML_KEM_768;
  ------------------
  |  Branch (224:17): [True: 0, False: 6.06k]
  ------------------
  225|  6.06k|      }
_ZNK5Botan3TLS12Group_Params22is_pqc_hybrid_frodokemEv:
  227|  6.06k|      constexpr bool is_pqc_hybrid_frodokem() const {
  228|  6.06k|         return m_code == Group_Params_Code::HYBRID_X25519_eFRODOKEM_640_SHAKE_OQS ||
  ------------------
  |  Branch (228:17): [True: 0, False: 6.06k]
  ------------------
  229|  6.06k|                m_code == Group_Params_Code::HYBRID_X25519_eFRODOKEM_640_AES_OQS ||
  ------------------
  |  Branch (229:17): [True: 0, False: 6.06k]
  ------------------
  230|  6.06k|                m_code == Group_Params_Code::HYBRID_X448_eFRODOKEM_976_SHAKE_OQS ||
  ------------------
  |  Branch (230:17): [True: 0, False: 6.06k]
  ------------------
  231|  6.06k|                m_code == Group_Params_Code::HYBRID_X448_eFRODOKEM_976_AES_OQS ||
  ------------------
  |  Branch (231:17): [True: 0, False: 6.06k]
  ------------------
  232|  6.06k|                m_code == Group_Params_Code::HYBRID_SECP256R1_eFRODOKEM_640_SHAKE_OQS ||
  ------------------
  |  Branch (232:17): [True: 0, False: 6.06k]
  ------------------
  233|  6.06k|                m_code == Group_Params_Code::HYBRID_SECP256R1_eFRODOKEM_640_AES_OQS ||
  ------------------
  |  Branch (233:17): [True: 0, False: 6.06k]
  ------------------
  234|  6.06k|                m_code == Group_Params_Code::HYBRID_SECP384R1_eFRODOKEM_976_SHAKE_OQS ||
  ------------------
  |  Branch (234:17): [True: 0, False: 6.06k]
  ------------------
  235|  6.06k|                m_code == Group_Params_Code::HYBRID_SECP384R1_eFRODOKEM_976_AES_OQS ||
  ------------------
  |  Branch (235:17): [True: 0, False: 6.06k]
  ------------------
  236|  6.06k|                m_code == Group_Params_Code::HYBRID_SECP521R1_eFRODOKEM_1344_SHAKE_OQS ||
  ------------------
  |  Branch (236:17): [True: 0, False: 6.06k]
  ------------------
  237|  6.06k|                m_code == Group_Params_Code::HYBRID_SECP521R1_eFRODOKEM_1344_AES_OQS;
  ------------------
  |  Branch (237:17): [True: 0, False: 6.06k]
  ------------------
  238|  6.06k|      }
_ZNK5Botan3TLS12Group_Params13is_pqc_hybridEv:
  240|  6.06k|      constexpr bool is_pqc_hybrid() const { return is_pqc_hybrid_ml_kem() || is_pqc_hybrid_frodokem(); }
  ------------------
  |  Branch (240:53): [True: 0, False: 6.06k]
  |  Branch (240:79): [True: 0, False: 6.06k]
  ------------------
_ZN5Botan3TLS19key_exchange_is_pskENS0_8Kex_AlgoE:
  284|  2.13k|inline bool key_exchange_is_psk(Kex_Algo m) {
  285|  2.13k|   return (m == Kex_Algo::PSK || m == Kex_Algo::ECDHE_PSK || m == Kex_Algo::DHE_PSK);
  ------------------
  |  Branch (285:12): [True: 82, False: 2.04k]
  |  Branch (285:34): [True: 2.04k, False: 0]
  |  Branch (285:62): [True: 0, False: 0]
  ------------------
  286|  2.13k|}

_ZN5Botan3TLS9CallbacksD2Ev:
   59|  6.48k|      virtual ~Callbacks() = default;
_ZN5Botan3TLS9Callbacks21tls_session_activatedEv:
  154|     79|      virtual void tls_session_activated() {}
_ZN5Botan3TLS9Callbacks26tls_peer_closed_connectionEv:
  176|    238|      virtual bool tls_peer_closed_connection() { return true; }

_ZN5Botan3TLS7Channel13received_dataENSt3__14spanIKhLm18446744073709551615EEE:
   59|  6.48k|      size_t received_data(std::span<const uint8_t> data) { return this->from_peer(data); }
_ZN5Botan3TLS7ChannelC2Ev:
   48|  6.48k|      Channel() = default;
_ZN5Botan3TLS7ChannelD2Ev:
   40|  6.48k|      virtual ~Channel() = default;

_ZNK5Botan3TLS11Ciphersuite5validEv:
  147|   314k|      bool valid() const { return m_usable; }
_ZNK5Botan3TLS11Ciphersuite16ciphersuite_codeEv:
   62|   625k|      uint16_t ciphersuite_code() const { return m_ciphersuite_code; }
_ZNK5Botan3TLS11Ciphersuite8kex_algoEv:
  108|     79|      std::string kex_algo() const { return kex_method_to_string(kex_method()); }
_ZNK5Botan3TLS11Ciphersuite10kex_methodEv:
  110|  23.1k|      Kex_Algo kex_method() const { return m_kex_algo; }
_ZNK5Botan3TLS11Ciphersuite8sig_algoEv:
  115|    339|      std::string sig_algo() const { return auth_method_to_string(auth_method()); }
_ZNK5Botan3TLS11Ciphersuite11auth_methodEv:
  117|  12.9k|      Auth_Method auth_method() const { return m_auth_method; }
_ZNK5Botan3TLS11Ciphersuite11cipher_algoEv:
  122|  2.20k|      std::string cipher_algo() const { return m_cipher_algo; }
_ZNK5Botan3TLS11Ciphersuite8mac_algoEv:
  127|  3.02k|      std::string mac_algo() const { return m_mac_algo; }
_ZNK5Botan3TLS11Ciphersuite8prf_algoEv:
  129|  3.33k|      std::string prf_algo() const { return kdf_algo_to_string(m_prf_algo); }
_ZNK5Botan3TLS11Ciphersuite13cipher_keylenEv:
  134|  1.67k|      size_t cipher_keylen() const { return m_cipher_keylen; }
_ZNK5Botan3TLS11Ciphersuite12nonce_formatEv:
  140|    456|      Nonce_Format nonce_format() const { return m_nonce_format; }
_ZNK5Botan3TLS11Ciphersuite10mac_keylenEv:
  142|  1.67k|      size_t mac_keylen() const { return m_mac_keylen; }
_ZNK5Botan3TLS11CiphersuiteltEt:
  153|  60.3k|      bool operator<(const uint16_t c) const { return ciphersuite_code() < c; }
_ZN5Botan3TLS11CiphersuiteC2EtPKcNS0_11Auth_MethodENS0_8Kex_AlgoES3_mS3_mNS0_8KDF_AlgoENS0_12Nonce_FormatE:
  168|    102|            m_ciphersuite_code(ciphersuite_code),
  169|    102|            m_iana_id(iana_id),
  170|    102|            m_auth_method(auth_method),
  171|    102|            m_kex_algo(kex_algo),
  172|    102|            m_prf_algo(prf_algo),
  173|    102|            m_nonce_format(nonce_format),
  174|    102|            m_cipher_algo(cipher_algo),
  175|    102|            m_mac_algo(mac_algo),
  176|    102|            m_cipher_keylen(cipher_keylen),
  177|    102|            m_mac_keylen(mac_keylen),
  178|    102|            m_usable(is_known_usable(ciphersuite_code)) {}

_ZN5Botan3TLS13TLS_ExceptionC2ENS0_9AlertTypeENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   24|  2.50k|            Exception(err_msg), m_alert_type(type) {}
_ZNK5Botan3TLS13TLS_Exception4typeEv:
   21|  2.50k|      Alert::Type type() const { return m_alert_type; }
_ZN5Botan3TLS18Unexpected_MessageC2ENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   39|    290|      explicit Unexpected_Message(std::string_view err) : TLS_Exception(AlertType::UnexpectedMessage, err) {}

_ZNK5Botan3TLS9Extension14is_implementedEv:
  113|     56|      virtual bool is_implemented() const { return true; }
_ZN5Botan3TLS21Server_Name_Indicator11static_typeEv:
  123|  8.11k|      static Extension_Code static_type() { return Extension_Code::ServerNameIndication; }
_ZNK5Botan3TLS21Server_Name_Indicator4typeEv:
  125|     74|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS21Server_Name_Indicator9host_nameEv:
  131|     16|      std::string host_name() const { return m_sni_host_name; }
_ZNK5Botan3TLS21Server_Name_Indicator5emptyEv:
  135|     25|      bool empty() const override { return false; }
_ZN5Botan3TLS39Application_Layer_Protocol_Notification11static_typeEv:
  148|  3.21k|      static Extension_Code static_type() { return Extension_Code::ApplicationLayerProtocolNegotiation; }
_ZNK5Botan3TLS39Application_Layer_Protocol_Notification4typeEv:
  150|    116|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS39Application_Layer_Protocol_Notification9protocolsEv:
  152|     32|      const std::vector<std::string>& protocols() const { return m_protocols; }
_ZNK5Botan3TLS39Application_Layer_Protocol_Notification5emptyEv:
  170|     36|      bool empty() const override { return m_protocols.empty(); }
_ZNK5Botan3TLS21Certificate_Type_Base5emptyEv:
  202|     45|      bool empty() const override {
  203|       |         // RFC 7250 4.1
  204|       |         //    If the client has no remaining certificate types to send in the
  205|       |         //    client hello, other than the default X.509 type, it MUST omit the
  206|       |         //    entire client[/server]_certificate_type extension [...].
  207|     45|         return m_from == Connection_Side::Client && m_certificate_types.size() == 1 &&
  ------------------
  |  Branch (207:17): [True: 34, False: 11]
  |  Branch (207:54): [True: 7, False: 27]
  ------------------
  208|      7|                m_certificate_types.front() == Certificate_Type::X509;
  ------------------
  |  Branch (208:17): [True: 1, False: 6]
  ------------------
  209|     45|      }
_ZN5Botan3TLS23Client_Certificate_Type11static_typeEv:
  225|     16|      static Extension_Code static_type() { return Extension_Code::ClientCertificateType; }
_ZNK5Botan3TLS23Client_Certificate_Type4typeEv:
  227|     16|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS23Server_Certificate_Type11static_typeEv:
  239|     79|      static Extension_Code static_type() { return Extension_Code::ServerCertificateType; }
_ZNK5Botan3TLS23Server_Certificate_Type4typeEv:
  241|     79|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS16Supported_Groups11static_typeEv:
  249|  17.2k|      static Extension_Code static_type() { return Extension_Code::SupportedGroups; }
_ZNK5Botan3TLS16Supported_Groups4typeEv:
  251|  5.47k|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS16Supported_Groups5emptyEv:
  267|  2.65k|      bool empty() const override { return m_groups.empty(); }
_ZN5Botan3TLS20Signature_Algorithms11static_typeEv:
  278|  6.41k|      static Extension_Code static_type() { return Extension_Code::SignatureAlgorithms; }
_ZNK5Botan3TLS20Signature_Algorithms4typeEv:
  280|    346|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS20Signature_Algorithms17supported_schemesEv:
  282|    335|      const std::vector<Signature_Scheme>& supported_schemes() const { return m_schemes; }
_ZNK5Botan3TLS20Signature_Algorithms5emptyEv:
  286|     11|      bool empty() const override { return m_schemes.empty(); }
_ZN5Botan3TLS25Signature_Algorithms_Cert11static_typeEv:
  311|  3.05k|      static Extension_Code static_type() { return Extension_Code::CertSignatureAlgorithms; }
_ZNK5Botan3TLS25Signature_Algorithms_Cert4typeEv:
  313|     19|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS25Signature_Algorithms_Cert17supported_schemesEv:
  315|      5|      const std::vector<Signature_Scheme>& supported_schemes() const { return m_schemes; }
_ZNK5Botan3TLS25Signature_Algorithms_Cert5emptyEv:
  319|      4|      bool empty() const override { return m_schemes.empty(); }
_ZN5Botan3TLS24SRTP_Protection_Profiles11static_typeEv:
  334|     95|      static Extension_Code static_type() { return Extension_Code::UseSrtp; }
_ZNK5Botan3TLS24SRTP_Protection_Profiles4typeEv:
  336|     16|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS24SRTP_Protection_Profiles5emptyEv:
  342|      8|      bool empty() const override { return m_pp.empty(); }
_ZN5Botan3TLS26Certificate_Status_Request11static_typeEv:
  361|  3.41k|      static Extension_Code static_type() { return Extension_Code::CertificateStatusRequest; }
_ZNK5Botan3TLS26Certificate_Status_Request4typeEv:
  363|    597|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS26Certificate_Status_Request5emptyEv:
  367|    348|      bool empty() const override { return false; }
_ZN5Botan3TLS18Supported_Versions11static_typeEv:
  399|  9.61k|      static Extension_Code static_type() { return Extension_Code::SupportedVersions; }
_ZNK5Botan3TLS18Supported_Versions4typeEv:
  401|    116|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS18Supported_Versions5emptyEv:
  405|      5|      bool empty() const override { return m_versions.empty(); }
_ZNK5Botan3TLS18Supported_Versions8versionsEv:
  415|     38|      const std::vector<Protocol_Version>& versions() const { return m_versions; }
_ZN5Botan3TLS17Record_Size_Limit11static_typeEv:
  430|     27|      static Extension_Code static_type() { return Extension_Code::RecordSizeLimit; }
_ZNK5Botan3TLS17Record_Size_Limit4typeEv:
  432|     27|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS17Record_Size_Limit5emptyEv:
  442|     20|      bool empty() const override { return m_limit == 0; }
_ZNK5Botan3TLS17Unknown_Extension5emptyEv:
  459|  13.2k|      bool empty() const override { return false; }
_ZNK5Botan3TLS17Unknown_Extension4typeEv:
  461|  29.5k|      Extension_Code type() const override { return m_type; }
_ZNK5Botan3TLS17Unknown_Extension14is_implementedEv:
  463|    414|      bool is_implemented() const override { return false; }
_ZN5Botan3TLS10Extensions3addEPNS0_9ExtensionE:
  495|  3.66k|      void add(Extension* extn) { add(std::unique_ptr<Extension>(extn)); }
_ZNK5Botan3TLS10Extensions42contains_implemented_extensions_other_thanERKNSt3__13setINS0_14Extension_CodeENS2_4lessIS4_EENS2_9allocatorIS4_EEEE:
  516|    219|      bool contains_implemented_extensions_other_than(const std::set<Extension_Code>& allowed_extensions) const {
  517|    219|         return contains_other_than(allowed_extensions, true);
  518|    219|      }
_ZNK5Botan3TLS10Extensions3getINS0_9Key_ShareEEEPT_v:
  478|      1|      T* get() const {
  479|      1|         return dynamic_cast<T*>(get(T::static_type()));
  480|      1|      }
_ZN5Botan3TLS10ExtensionsC2Ev:
  548|  11.2k|      Extensions() = default;
_ZNK5Botan3TLS10Extensions3hasINS0_18Supported_VersionsEEEbv:
  483|  6.22k|      bool has() const {
  484|  6.22k|         return get<T>() != nullptr;
  485|  6.22k|      }
_ZNK5Botan3TLS10Extensions3getINS0_18Supported_VersionsEEEPT_v:
  478|  9.49k|      T* get() const {
  479|  9.49k|         return dynamic_cast<T*>(get(T::static_type()));
  480|  9.49k|      }
_ZNK5Botan3TLS10Extensions3getINS0_20Signature_AlgorithmsEEEPT_v:
  478|  6.07k|      T* get() const {
  479|  6.07k|         return dynamic_cast<T*>(get(T::static_type()));
  480|  6.07k|      }
_ZNK5Botan3TLS10Extensions3getINS0_25Signature_Algorithms_CertEEEPT_v:
  478|  3.03k|      T* get() const {
  479|  3.03k|         return dynamic_cast<T*>(get(T::static_type()));
  480|  3.03k|      }
_ZNK5Botan3TLS10Extensions3getINS0_16Supported_GroupsEEEPT_v:
  478|  11.7k|      T* get() const {
  479|  11.7k|         return dynamic_cast<T*>(get(T::static_type()));
  480|  11.7k|      }
_ZNK5Botan3TLS10Extensions3getINS0_21Server_Name_IndicatorEEEPT_v:
  478|  8.04k|      T* get() const {
  479|  8.04k|         return dynamic_cast<T*>(get(T::static_type()));
  480|  8.04k|      }
_ZNK5Botan3TLS10Extensions3hasINS0_39Application_Layer_Protocol_NotificationEEEbv:
  483|  3.06k|      bool has() const {
  484|  3.06k|         return get<T>() != nullptr;
  485|  3.06k|      }
_ZNK5Botan3TLS10Extensions3hasINS0_20Signature_AlgorithmsEEEbv:
  483|      2|      bool has() const {
  484|      2|         return get<T>() != nullptr;
  485|      2|      }
_ZNK5Botan3TLS10Extensions3getINS0_39Application_Layer_Protocol_NotificationEEEPT_v:
  478|  3.09k|      T* get() const {
  479|  3.09k|         return dynamic_cast<T*>(get(T::static_type()));
  480|  3.09k|      }
_ZNK5Botan3TLS10Extensions3getINS0_24SRTP_Protection_ProfilesEEEPT_v:
  478|     79|      T* get() const {
  479|     79|         return dynamic_cast<T*>(get(T::static_type()));
  480|     79|      }
_ZNK5Botan3TLS10Extensions3getINS0_26Certificate_Status_RequestEEEPT_v:
  478|  2.82k|      T* get() const {
  479|  2.82k|         return dynamic_cast<T*>(get(T::static_type()));
  480|  2.82k|      }
_ZN5Botan3TLS9ExtensionD2Ev:
  115|  47.8k|      virtual ~Extension() = default;
_ZNK5Botan3TLS10Extensions3hasINS0_16Supported_GroupsEEEbv:
  483|      4|      bool has() const {
  484|      4|         return get<T>() != nullptr;
  485|      4|      }
_ZNK5Botan3TLS10Extensions3hasINS0_9Key_ShareEEEbv:
  483|      1|      bool has() const {
  484|      1|         return get<T>() != nullptr;
  485|      1|      }
_ZNK5Botan3TLS10Extensions3hasINS0_3PSKEEEbv:
  483|      6|      bool has() const {
  484|      6|         return get<T>() != nullptr;
  485|      6|      }
_ZNK5Botan3TLS10Extensions3getINS0_3PSKEEEPT_v:
  478|      6|      T* get() const {
  479|      6|         return dynamic_cast<T*>(get(T::static_type()));
  480|      6|      }
_ZN5Botan3TLS10ExtensionsC2EOS1_:
  551|    326|      Extensions(Extensions&&) = default;
_ZNK5Botan3TLS10Extensions3hasINS0_26Certificate_Status_RequestEEEbv:
  483|  2.81k|      bool has() const {
  484|  2.81k|         return get<T>() != nullptr;
  485|  2.81k|      }
_ZNK5Botan3TLS10Extensions3getINS0_23Supported_Point_FormatsEEEPT_v:
  478|  2.59k|      T* get() const {
  479|  2.59k|         return dynamic_cast<T*>(get(T::static_type()));
  480|  2.59k|      }
_ZNK5Botan3TLS10Extensions3hasINS0_23Renegotiation_ExtensionEEEbv:
  483|  8.89k|      bool has() const {
  484|  8.89k|         return get<T>() != nullptr;
  485|  8.89k|      }
_ZNK5Botan3TLS10Extensions3getINS0_23Renegotiation_ExtensionEEEPT_v:
  478|  9.57k|      T* get() const {
  479|  9.57k|         return dynamic_cast<T*>(get(T::static_type()));
  480|  9.57k|      }
_ZNK5Botan3TLS10Extensions3hasINS0_24Session_Ticket_ExtensionEEEbv:
  483|  3.05k|      bool has() const {
  484|  3.05k|         return get<T>() != nullptr;
  485|  3.05k|      }
_ZNK5Botan3TLS10Extensions3getINS0_24Session_Ticket_ExtensionEEEPT_v:
  478|  6.09k|      T* get() const {
  479|  6.09k|         return dynamic_cast<T*>(get(T::static_type()));
  480|  6.09k|      }
_ZNK5Botan3TLS10Extensions3hasINS0_22Extended_Master_SecretEEEbv:
  483|  7.54k|      bool has() const {
  484|  7.54k|         return get<T>() != nullptr;
  485|  7.54k|      }
_ZNK5Botan3TLS10Extensions3getINS0_22Extended_Master_SecretEEEPT_v:
  478|  7.54k|      T* get() const {
  479|  7.54k|         return dynamic_cast<T*>(get(T::static_type()));
  480|  7.54k|      }
_ZNK5Botan3TLS10Extensions3hasINS0_16Encrypt_then_MACEEEbv:
  483|  2.07k|      bool has() const {
  484|  2.07k|         return get<T>() != nullptr;
  485|  2.07k|      }
_ZNK5Botan3TLS10Extensions3getINS0_16Encrypt_then_MACEEEPT_v:
  478|  2.07k|      T* get() const {
  479|  2.07k|         return dynamic_cast<T*>(get(T::static_type()));
  480|  2.07k|      }

_ZN5Botan3TLS23Renegotiation_Extension11static_typeEv:
   31|  10.0k|      static Extension_Code static_type() { return Extension_Code::SafeRenegotiation; }
_ZNK5Botan3TLS23Renegotiation_Extension4typeEv:
   33|    444|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS23Renegotiation_ExtensionC2ENSt3__16vectorIhNS2_9allocatorIhEEEE:
   37|    170|      explicit Renegotiation_Extension(std::vector<uint8_t> bits) : m_reneg_data(std::move(bits)) {}
_ZNK5Botan3TLS23Renegotiation_Extension18renegotiation_infoEv:
   41|    422|      const std::vector<uint8_t>& renegotiation_info() const { return m_reneg_data; }
_ZNK5Botan3TLS23Renegotiation_Extension5emptyEv:
   45|    297|      bool empty() const override { return false; }  // always send this
_ZN5Botan3TLS24Session_Ticket_Extension11static_typeEv:
   56|  6.20k|      static Extension_Code static_type() { return Extension_Code::SessionTicket; }
_ZNK5Botan3TLS24Session_Ticket_Extension4typeEv:
   58|    114|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS24Session_Ticket_Extension8contentsEv:
   63|     37|      const Session_Ticket& contents() const { return m_ticket; }
_ZNK5Botan3TLS24Session_Ticket_Extension5emptyEv:
   82|     32|      bool empty() const override { return false; }
_ZN5Botan3TLS23Supported_Point_Formats11static_typeEv:
   99|  2.93k|      static Extension_Code static_type() { return Extension_Code::EcPointFormats; }
_ZNK5Botan3TLS23Supported_Point_Formats4typeEv:
  101|    338|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS23Supported_Point_FormatsC2Eb:
  105|    107|      explicit Supported_Point_Formats(bool prefer_compressed) : m_prefers_compressed(prefer_compressed) {}
_ZNK5Botan3TLS23Supported_Point_Formats5emptyEv:
  109|    219|      bool empty() const override { return false; }
_ZNK5Botan3TLS23Supported_Point_Formats18prefers_compressedEv:
  111|    107|      bool prefers_compressed() const { return m_prefers_compressed; }
_ZN5Botan3TLS22Extended_Master_Secret11static_typeEv:
  122|  16.4k|      static Extension_Code static_type() { return Extension_Code::ExtendedMasterSecret; }
_ZNK5Botan3TLS22Extended_Master_Secret4typeEv:
  124|  8.92k|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS22Extended_Master_Secret5emptyEv:
  128|  5.44k|      bool empty() const override { return false; }
_ZN5Botan3TLS16Encrypt_then_MAC11static_typeEv:
  140|  2.55k|      static Extension_Code static_type() { return Extension_Code::EncryptThenMac; }
_ZNK5Botan3TLS16Encrypt_then_MAC4typeEv:
  142|    480|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS16Encrypt_then_MAC5emptyEv:
  146|    227|      bool empty() const override { return false; }
_ZN5Botan3TLS22Extended_Master_SecretC2Ev:
  130|  2.81k|      Extended_Master_Secret() = default;
_ZN5Botan3TLS16Encrypt_then_MACC2Ev:
  148|    112|      Encrypt_then_MAC() = default;
_ZN5Botan3TLS23Renegotiation_ExtensionC2Ev:
   35|    256|      Renegotiation_Extension() = default;

_ZN5Botan3TLS9Key_Share11static_typeEv:
  212|     37|      static Extension_Code static_type() { return Extension_Code::KeyShare; }
_ZN5Botan3TLS6Cookie11static_typeEv:
   44|     16|      static Extension_Code static_type() { return Extension_Code::Cookie; }
_ZNK5Botan3TLS6Cookie4typeEv:
   46|     16|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS6Cookie5emptyEv:
   50|      8|      bool empty() const override { return m_cookie.empty(); }
_ZN5Botan3TLS22PSK_Key_Exchange_Modes11static_typeEv:
   67|     53|      static Extension_Code static_type() { return Extension_Code::PskKeyExchangeModes; }
_ZNK5Botan3TLS22PSK_Key_Exchange_Modes4typeEv:
   69|     53|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS22PSK_Key_Exchange_Modes5emptyEv:
   73|     30|      bool empty() const override { return m_modes.empty(); }
_ZN5Botan3TLS23Certificate_Authorities11static_typeEv:
   90|      3|      static Extension_Code static_type() { return Extension_Code::CertificateAuthorities; }
_ZNK5Botan3TLS23Certificate_Authorities4typeEv:
   92|      3|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS23Certificate_Authorities5emptyEv:
   96|      1|      bool empty() const override { return m_distinguished_names.empty(); }
_ZN5Botan3TLS3PSK11static_typeEv:
  112|     19|      static Extension_Code static_type() { return Extension_Code::PresharedKey; }
_ZNK5Botan3TLS3PSK4typeEv:
  114|     13|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS9Key_Share4typeEv:
  214|     36|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS19EarlyDataIndication11static_typeEv:
  306|     56|      static Extension_Code static_type() { return Extension_Code::EarlyData; }
_ZNK5Botan3TLS19EarlyDataIndication4typeEv:
  308|     56|      Extension_Code type() const override { return static_type(); }

_ZN5Botan3TLS11ExternalPSKC2ENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEES6_NS2_6vectorIhNS_16secure_allocatorIhEEEE:
   31|  2.09k|            m_identity(identity), m_prf_algo(prf_algo), m_master_secret(std::move(psk)), m_is_imported(false) {}
_ZN5Botan3TLS11ExternalPSKD2Ev:
   28|  2.09k|      ~ExternalPSK() = default;

_ZNK5Botan3TLS17Handshake_Message9wire_typeEv:
   47|  8.52k|      virtual Handshake_Type wire_type() const { return type(); }
_ZN5Botan3TLS17Handshake_MessageC2EOS1_:
   57|  29.4k|      Handshake_Message(Handshake_Message&&) = default;
_ZN5Botan3TLS17Handshake_MessageD2Ev:
   54|  47.9k|      virtual ~Handshake_Message() = default;
_ZN5Botan3TLS17Handshake_MessageC2Ev:
   55|  18.5k|      Handshake_Message() = default;

_ZNK5Botan3TLS18Certificate_Verify4typeEv:
  251|      8|      Handshake_Type type() const override { return Handshake_Type::CertificateVerify; }
_ZN5Botan3TLS8FinishedC2ENSt3__16vectorIhNS2_9allocatorIhEEEE:
  270|     89|      explicit Finished(std::vector<uint8_t> buf) : m_verification_data(std::move(buf)) {}
_ZNK5Botan3TLS8Finished4typeEv:
  272|    161|      Handshake_Type type() const override { return Handshake_Type::Finished; }
_ZNK5Botan3TLS8Finished11verify_dataEv:
  274|    158|      std::vector<uint8_t> verify_data() const { return m_verification_data; }
_ZNK5Botan3TLS8Finished9serializeEv:
  276|     79|      std::vector<uint8_t> serialize() const override { return m_verification_data; }

_ZN5Botan3TLS15Server_Hello_128SettingsC2ENS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS0_11Session_ID_EJEEENS0_16Protocol_VersionEtb:
  109|  2.81k|                  m_new_session_id(std::move(new_session_id)),
  110|  2.81k|                  m_new_session_version(new_session_version),
  111|  2.81k|                  m_ciphersuite(ciphersuite),
  112|  2.81k|                  m_offer_session_ticket(offer_session_ticket) {}
_ZNK5Botan3TLS15Server_Hello_128Settings10session_idEv:
  114|  2.81k|            const Session_ID& session_id() const { return m_new_session_id; }
_ZNK5Botan3TLS15Server_Hello_128Settings16protocol_versionEv:
  116|  5.63k|            Protocol_Version protocol_version() const { return m_new_session_version; }
_ZNK5Botan3TLS15Server_Hello_128Settings11ciphersuiteEv:
  118|  2.81k|            uint16_t ciphersuite() const { return m_ciphersuite; }
_ZNK5Botan3TLS15Server_Hello_128Settings20offer_session_ticketEv:
  120|     30|            bool offer_session_ticket() const { return m_offer_session_ticket; }
_ZNK5Botan3TLS19Client_Key_Exchange17pre_master_secretEv:
  186|  1.47k|      const secure_vector<uint8_t>& pre_master_secret() const { return m_pre_master; }
_ZNK5Botan3TLS19Client_Key_Exchange12psk_identityEv:
  191|    158|      const std::optional<std::string>& psk_identity() const { return m_psk_identity; }
_ZNK5Botan3TLS14Certificate_124typeEv:
  221|      8|      Handshake_Type type() const override { return Handshake_Type::Certificate; }
_ZNK5Botan3TLS14Certificate_1210cert_chainEv:
  223|      4|      const std::vector<X509_Certificate>& cert_chain() const { return m_certs; }
_ZNK5Botan3TLS19Server_Key_Exchange4typeEv:
  336|  5.62k|      Handshake_Type type() const override { return Handshake_Type::ServerKeyExchange; }
_ZNK5Botan3TLS19Server_Key_Exchange6paramsEv:
  338|  2.81k|      const std::vector<uint8_t>& params() const { return m_params; }
_ZNK5Botan3TLS19Server_Key_Exchange12shared_groupEv:
  349|  2.00k|      const std::optional<Group_Params>& shared_group() const { return m_shared_group; }
_ZNK5Botan3TLS17Server_Hello_Done4typeEv:
  387|  5.62k|      Handshake_Type type() const override { return Handshake_Type::ServerHelloDone; }
_ZNK5Botan3TLS18Change_Cipher_Spec4typeEv:
  428|     79|      Handshake_Type type() const override { return Handshake_Type::HandshakeCCS; }
_ZNK5Botan3TLS18Change_Cipher_Spec9serializeEv:
  430|     79|      std::vector<uint8_t> serialize() const override { return std::vector<uint8_t>(1, 1); }

_ZNK5Botan3TLS20Encrypted_Extensions4typeEv:
  162|    791|      Handshake_Type type() const override { return Handshake_Type::EncryptedExtensions; }
_ZNK5Botan3TLS14Certificate_134typeEv:
  211|      3|      Handshake_Type type() const override { return Handshake_Type::Certificate; }

_ZN5Botan3TLS6PolicyD2Ev:
  698|  6.48k|      virtual ~Policy() = default;

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

_ZN5Botan3TLS18Server_InformationC2ENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEt:
   32|  6.56k|            m_hostname(hostname), m_port(port) {}
_ZN5Botan3TLS18Server_InformationC2Ev:
   24|  5.71k|      Server_Information() = default;

_ZNK5Botan3TLS7Session13lifetime_hintEv:
  349|     79|      std::chrono::seconds lifetime_hint() const { return m_lifetime_hint; }
_ZNK5Botan3TLS12Session_Base7versionEv:
   73|     79|      Protocol_Version version() const { return m_version; }
_ZN5Botan3TLS15Session_Summary14set_session_idENS_6StrongINSt3__16vectorIhNS3_9allocatorIhEEEENS0_11Session_ID_EJEEE:
  219|     79|      void set_session_id(Session_ID id) { m_session_id = std::move(id); }

_ZN5Botan3TLS14Session_HandleC2ENS_6StrongINSt3__16vectorIhNS3_9allocatorIhEEEENS0_11Session_ID_EJEEE:
   59|     62|      Session_Handle(Session_ID id) : m_handle(std::move(id)) { validate_constraints(); }
_ZN5Botan3TLS14Session_HandleC2ENS_6StrongINSt3__16vectorIhNS3_9allocatorIhEEEENS0_15Session_Ticket_EJEEE:
   70|     35|      Session_Handle(Session_Ticket ticket) : m_handle(std::move(ticket)) { validate_constraints(); }

_ZN5Botan3TLS15Session_ManagerD2Ev:
  217|  6.48k|      virtual ~Session_Manager() = default;
_ZN5Botan3TLS15Session_Manager21emits_session_ticketsEv:
  215|  2.81k|      virtual bool emits_session_tickets() { return false; }

_ZN5Botan3TLS20Session_Manager_Noop6removeERKNS0_14Session_HandleE:
   33|     56|      size_t remove(const Session_Handle& /*session*/) override { return 0; }

_ZNK5Botan3TLS16Signature_Scheme9wire_codeEv:
  104|  42.8k|      Signature_Scheme::Code wire_code() const noexcept { return m_code; }

_ZN5Botan3TLS16Protocol_VersionC2Ev:
   56|  11.1k|      Protocol_Version() : m_version(0) {}
_ZN5Botan3TLS16Protocol_VersionC2Et:
   58|   393k|      explicit Protocol_Version(uint16_t code) : m_version(code) {}
_ZN5Botan3TLS16Protocol_VersionC2ENS0_12Version_CodeE:
   64|   338k|            Protocol_Version(static_cast<uint16_t>(named_version)) {}
_ZN5Botan3TLS16Protocol_VersionC2Ehh:
   71|  18.1k|            Protocol_Version(static_cast<uint16_t>((static_cast<uint16_t>(major) << 8) | minor)) {}
_ZNK5Botan3TLS16Protocol_Version13major_versionEv:
   86|   456k|      uint8_t major_version() const { return static_cast<uint8_t>(m_version >> 8); }
_ZNK5Botan3TLS16Protocol_Version13minor_versionEv:
   91|  17.0k|      uint8_t minor_version() const { return static_cast<uint8_t>(m_version & 0xFF); }
_ZNK5Botan3TLS16Protocol_Version12version_codeEv:
   96|  2.28k|      uint16_t version_code() const { return m_version; }
_ZNK5Botan3TLS16Protocol_VersioneqERKS1_:
  125|   319k|      bool operator==(const Protocol_Version& other) const { return (m_version == other.m_version); }
_ZNK5Botan3TLS16Protocol_VersionneERKS1_:
  130|  2.82k|      bool operator!=(const Protocol_Version& other) const { return (m_version != other.m_version); }
_ZNK5Botan3TLS16Protocol_VersiongeERKS1_:
  140|  9.05k|      bool operator>=(const Protocol_Version& other) const { return (*this == other || *this > other); }
  ------------------
  |  Branch (140:70): [True: 11, False: 9.03k]
  |  Branch (140:88): [True: 8.98k, False: 52]
  ------------------
_ZNK5Botan3TLS16Protocol_VersionltERKS1_:
  145|  5.84k|      bool operator<(const Protocol_Version& other) const { return !(*this >= other); }
_ZNK5Botan3TLS16Protocol_VersionleERKS1_:
  150|   301k|      bool operator<=(const Protocol_Version& other) const { return (*this == other || *this < other); }
  ------------------
  |  Branch (150:70): [True: 296k, False: 5.84k]
  |  Branch (150:88): [True: 34, False: 5.81k]
  ------------------

_ZNK5Botan16X25519_PublicKey9algo_nameEv:
   21|     12|      std::string algo_name() const override { return "X25519"; }
_ZNK5Botan16X25519_PublicKey10key_lengthEv:
   25|      3|      size_t key_length() const override { return 255; }
_ZN5Botan16X25519_PublicKeyC2Ev:
   57|     10|      X25519_PublicKey() = default;

_ZNK5Botan14X448_PublicKey9algo_nameEv:
   39|      6|      std::string algo_name() const override { return "X448"; }
_ZNK5Botan14X448_PublicKey10key_lengthEv:
   43|      2|      size_t key_length() const override { return 448; }
_ZN5Botan14X448_PublicKeyC2Ev:
   62|     15|      X448_PublicKey() = default;

_ZNK5Botan14Cert_Extension17Basic_Constraints5is_caEv:
   53|  6.48k|      bool is_ca() const { return m_is_ca; }
_ZN5Botan14Cert_Extension17Basic_Constraints10static_oidEv:
   57|  6.48k|      static OID static_oid() { return OID({2, 5, 29, 19}); }
_ZNK5Botan14Cert_Extension17Basic_Constraints8oid_nameEv:
   62|  12.9k|      std::string oid_name() const override { return "X509v3.BasicConstraints"; }
_ZN5Botan14Cert_Extension9Key_Usage10static_oidEv:
   88|  6.48k|      static OID static_oid() { return OID({2, 5, 29, 15}); }
_ZNK5Botan14Cert_Extension14Subject_Key_ID10get_key_idEv:
  131|  6.48k|      const std::vector<uint8_t>& get_key_id() const { return m_key_id; }
_ZN5Botan14Cert_Extension14Subject_Key_ID10static_oidEv:
  133|  6.48k|      static OID static_oid() { return OID({2, 5, 29, 14}); }
_ZNK5Botan14Cert_Extension14Subject_Key_ID8oid_nameEv:
  138|  6.48k|      std::string oid_name() const override { return "X509v3.SubjectKeyIdentifier"; }
_ZNK5Botan14Cert_Extension16Authority_Key_ID10get_key_idEv:
  173|  6.48k|      const std::vector<uint8_t>& get_key_id() const { return m_key_id; }
_ZN5Botan14Cert_Extension16Authority_Key_ID10static_oidEv:
  180|  6.48k|      static OID static_oid() { return OID({2, 5, 29, 35}); }
_ZNK5Botan14Cert_Extension16Authority_Key_ID8oid_nameEv:
  185|  6.48k|      std::string oid_name() const override { return "X509v3.AuthorityKeyIdentifier"; }
_ZNK5Botan14Cert_Extension24Subject_Alternative_Name12get_alt_nameEv:
  203|  6.48k|      const AlternativeName& get_alt_name() const { return m_alt_name; }
_ZN5Botan14Cert_Extension24Subject_Alternative_Name10static_oidEv:
  205|  6.48k|      static OID static_oid() { return OID({2, 5, 29, 17}); }
_ZN5Botan14Cert_Extension24Subject_Alternative_NameC2ERKNS_15AlternativeNameE:
  213|  6.48k|      explicit Subject_Alternative_Name(const AlternativeName& name = AlternativeName()) : m_alt_name(name) {}
_ZNK5Botan14Cert_Extension24Subject_Alternative_Name8oid_nameEv:
  216|  6.48k|      std::string oid_name() const override { return "X509v3.SubjectAlternativeName"; }
_ZN5Botan14Cert_Extension23Issuer_Alternative_Name10static_oidEv:
  235|  6.48k|      static OID static_oid() { return OID({2, 5, 29, 18}); }
_ZN5Botan14Cert_Extension18Extended_Key_Usage10static_oidEv:
  273|  6.48k|      static OID static_oid() { return OID({2, 5, 29, 37}); }
_ZN5Botan14Cert_Extension16Name_Constraints10static_oidEv:
  311|  6.48k|      static OID static_oid() { return OID({2, 5, 29, 30}); }
_ZN5Botan14Cert_Extension20Certificate_Policies10static_oidEv:
  343|  6.48k|      static OID static_oid() { return OID({2, 5, 29, 32}); }
_ZN5Botan14Cert_Extension28Authority_Information_Access10static_oidEv:
  468|  6.48k|      static OID static_oid() { return OID({1, 3, 6, 1, 5, 5, 7, 1, 1}); }
_ZN5Botan14Cert_Extension23CRL_Distribution_Points10static_oidEv:
  662|  6.48k|      static OID static_oid() { return OID({2, 5, 29, 31}); }
_ZN5Botan14Cert_Extension12OCSP_NoCheck10static_oidEv:
  791|  6.48k|      static OID static_oid() { return OID({1, 3, 6, 1, 5, 5, 7, 48, 1, 5}); }
_ZN5Botan14Cert_Extension21NoRevocationAvailable10static_oidEv:
  834|  6.48k|      static OID static_oid() { return OID({2, 5, 29, 56}); }
_ZN5Botan14Cert_Extension14Subject_Key_IDC2Ev:
  110|  6.48k|      Subject_Key_ID() = default;
_ZN5Botan14Cert_Extension16Authority_Key_IDC2Ev:
  157|  6.48k|      Authority_Key_ID() = default;

_ZN5Botan11X509_ObjectC2Ev:
  120|  6.93k|      X509_Object() = default;

_ZN5Botan16X509_CertificateC2ERKS0_:
  559|  6.07k|      X509_Certificate(const X509_Certificate& other) = default;

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|  6.49k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t in[], size_t len) {
   40|  6.49k|   if(len <= max_fuzzer_input_size) {
  ------------------
  |  Branch (40:7): [True: 6.48k, False: 7]
  ------------------
   41|  6.48k|      try {
   42|  6.48k|         fuzz(std::span<const uint8_t>(in, len));
   43|  6.48k|      } 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|  6.48k|   }
   51|  6.49k|   return 0;
   52|  6.49k|}
_Z20fuzzer_rng_as_sharedv:
   56|  6.48k|inline std::shared_ptr<Botan::RandomNumberGenerator> fuzzer_rng_as_shared() {
   57|  6.48k|   static const std::shared_ptr<Botan::ChaCha_RNG> rng =
   58|  6.48k|      std::make_shared<Botan::ChaCha_RNG>(Botan::secure_vector<uint8_t>(32));
   59|  6.48k|   return rng;
   60|  6.48k|}

_Z4fuzzNSt3__14spanIKhLm18446744073709551615EEE:
  175|  6.48k|void fuzz(std::span<const uint8_t> in) {
  176|  6.48k|   if(in.size() <= 1) {
  ------------------
  |  Branch (176:7): [True: 1, False: 6.48k]
  ------------------
  177|      1|      return;
  178|      1|   }
  179|       |
  180|  6.48k|   auto session_manager = std::make_shared<Botan::TLS::Session_Manager_Noop>();
  181|  6.48k|   auto policy = std::make_shared<Fuzzer_TLS_Policy>();
  182|  6.48k|   const Botan::TLS::Server_Information info("server.name", 443);
  183|  6.48k|   auto creds = std::make_shared<Fuzzer_TLS_Server_Creds>();
  184|  6.48k|   auto callbacks = std::make_shared<Fuzzer_TLS_Server_Callbacks>();
  185|       |
  186|  6.48k|   const bool is_datagram = (in[0] & 1) == 1;
  187|       |
  188|  6.48k|   Botan::TLS::Server server(callbacks, session_manager, creds, policy, fuzzer_rng_as_shared(), is_datagram);
  189|       |
  190|  6.48k|   try {
  191|  6.48k|      server.received_data(in.subspan(1, in.size() - 1));
  192|  6.48k|   } catch(const std::exception& e) {}
  193|  6.48k|}
tls_server.cpp:_ZNK12_GLOBAL__N_117Fuzzer_TLS_Policy16ciphersuite_listEN5Botan3TLS16Protocol_VersionE:
  122|  3.03k|      std::vector<uint16_t> ciphersuite_list(Botan::TLS::Protocol_Version version) const override {
  123|  3.03k|         std::vector<uint16_t> ciphersuites;
  124|       |
  125|   309k|         for(auto&& suite : Botan::TLS::Ciphersuite::all_known_ciphersuites()) {
  ------------------
  |  Branch (125:27): [True: 309k, False: 3.03k]
  ------------------
  126|   309k|            if(suite.valid() and suite.usable_in_version(version)) {
  ------------------
  |  Branch (126:16): [True: 285k, False: 24.2k]
  |  Branch (126:34): [True: 270k, False: 15.1k]
  ------------------
  127|   270k|               ciphersuites.push_back(suite.ciphersuite_code());
  128|   270k|            }
  129|   309k|         }
  130|       |
  131|  3.03k|         return ciphersuites;
  132|  3.03k|      }
tls_server.cpp:_ZN12_GLOBAL__N_123Fuzzer_TLS_Server_CredsC2Ev:
   49|  6.48k|      Fuzzer_TLS_Server_Creds() {
   50|  6.48k|         Botan::DataSource_Memory cert_in(fixed_ecdsa_cert);
   51|  6.48k|         m_ecdsa_cert = std::make_unique<Botan::X509_Certificate>(cert_in);
   52|       |
   53|  6.48k|         Botan::DataSource_Memory key_in(fixed_ecdsa_key);
   54|  6.48k|         m_ecdsa_key.reset(Botan::PKCS8::load_key(key_in).release());
   55|  6.48k|      }
tls_server.cpp:_ZN12_GLOBAL__N_123Fuzzer_TLS_Server_Creds10cert_chainERKNSt3__16vectorINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS6_IS8_EEEERKNS2_IN5Botan19AlgorithmIdentifierENS6_ISE_EEEERKS8_SK_:
   61|  6.07k|         const std::string& /*hostname*/) override {
   62|  6.07k|         std::vector<Botan::X509_Certificate> v;
   63|       |
   64|  6.07k|         for(const auto& algo : algos) {
  ------------------
  |  Branch (64:31): [True: 6.07k, False: 3.03k]
  ------------------
   65|  6.07k|            if(algo == "ECDSA") {
  ------------------
  |  Branch (65:16): [True: 3.03k, False: 3.03k]
  ------------------
   66|  3.03k|               v.push_back(*m_ecdsa_cert);
   67|  3.03k|               break;
   68|  3.03k|            }
   69|  6.07k|         }
   70|       |
   71|  6.07k|         return v;
   72|  6.07k|      }
tls_server.cpp:_ZN12_GLOBAL__N_123Fuzzer_TLS_Server_Creds15private_key_forERKN5Botan16X509_CertificateERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESD_:
   76|      4|                                                          const std::string& /*context*/) override {
   77|      4|         if(type == "ECDSA") {
  ------------------
  |  Branch (77:13): [True: 0, False: 4]
  ------------------
   78|      0|            return m_ecdsa_key;
   79|      0|         }
   80|      4|         return nullptr;
   81|      4|      }
tls_server.cpp:_ZN12_GLOBAL__N_123Fuzzer_TLS_Server_Creds18dtls_cookie_secretEv:
   87|    789|      Botan::secure_vector<uint8_t> dtls_cookie_secret() override {
   88|    789|         return Botan::hex_decode_locked("AABBCCDDEEFF00112233445566778899");
   89|    789|      }
tls_server.cpp:_ZN12_GLOBAL__N_123Fuzzer_TLS_Server_Creds17psk_identity_hintERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
   91|  2.81k|      std::string psk_identity_hint(const std::string& /*type*/, const std::string& /*context*/) override {
   92|  2.81k|         return "psk_hint";
   93|  2.81k|      }
tls_server.cpp:_ZN12_GLOBAL__N_123Fuzzer_TLS_Server_Creds19find_preshared_keysENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEN5Botan3TLS15Connection_SideERKNS1_6vectorINS1_12basic_stringIcS4_NS1_9allocatorIcEEEENSB_ISD_EEEERKNS1_8optionalISD_EE:
  105|  2.11k|         const std::optional<std::string>& prf = std::nullopt) override {
  106|  2.11k|         if(!identities.empty() && std::find(identities.begin(), identities.end(), "psk_id") == identities.end()) {
  ------------------
  |  Branch (106:13): [True: 2.11k, False: 0]
  |  Branch (106:13): [True: 22, False: 2.09k]
  |  Branch (106:36): [True: 22, False: 2.09k]
  ------------------
  107|     22|            return Botan::Credentials_Manager::find_preshared_keys(host, whoami, identities, prf);
  108|     22|         }
  109|       |
  110|  2.09k|         std::vector<Botan::TLS::ExternalPSK> psks;
  111|  2.09k|         psks.emplace_back("psk_id", "SHA-256", Botan::hex_decode_locked("AABBCCDDEEFF00112233445566778899"));
  112|  2.09k|         return psks;
  113|  2.11k|      }
tls_server.cpp:_ZN12_GLOBAL__N_127Fuzzer_TLS_Server_Callbacks13tls_emit_dataENSt3__14spanIKhLm18446744073709551615EEE:
  137|  12.8k|      void tls_emit_data(std::span<const uint8_t> /*data*/) override {
  138|       |         // discard
  139|  12.8k|      }
tls_server.cpp:_ZN12_GLOBAL__N_127Fuzzer_TLS_Server_Callbacks9tls_alertEN5Botan3TLS5AlertE:
  145|  1.42k|      void tls_alert(Botan::TLS::Alert /*alert*/) override {
  146|       |         // ignore alert
  147|  1.42k|      }
tls_server.cpp:_ZN12_GLOBAL__N_127Fuzzer_TLS_Server_Callbacks30tls_server_choose_app_protocolERKNSt3__16vectorINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS6_IS8_EEEE:
  149|     32|      std::string tls_server_choose_app_protocol(const std::vector<std::string>& client_protos) override {
  150|     32|         if(client_protos.size() > 1) {
  ------------------
  |  Branch (150:13): [True: 30, False: 2]
  ------------------
  151|     30|            return client_protos[0];
  152|     30|         } else {
  153|      2|            return "fuzzy";
  154|      2|         }
  155|     32|      }

_ZN5Botan19AlgorithmIdentifierC2ERKNS_3OIDERKNSt3__16vectorIhNS4_9allocatorIhEEEE:
   20|  23.8k|      m_oid(oid), m_parameters(param) {}
_ZN5Botan19AlgorithmIdentifierC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEERKNS1_6vectorIhNS1_9allocatorIhEEEE:
   26|  11.9k|      AlgorithmIdentifier(OID::from_string(oid), param) {}
_ZN5Botan19AlgorithmIdentifierC2ERKNS_3OIDENS0_15Encoding_OptionE:
   31|  1.08k|AlgorithmIdentifier::AlgorithmIdentifier(const OID& oid, Encoding_Option option) : m_oid(oid) {
   32|  1.08k|   constexpr uint8_t DER_NULL[] = {0x05, 0x00};
   33|       |
   34|  1.08k|   if(option == USE_NULL_PARAM) {
  ------------------
  |  Branch (34:7): [True: 510, False: 578]
  ------------------
   35|    510|      m_parameters.assign(DER_NULL, DER_NULL + 2);
   36|    510|   }
   37|  1.08k|}
_ZN5Botan19AlgorithmIdentifierC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS0_15Encoding_OptionE:
   42|  11.9k|AlgorithmIdentifier::AlgorithmIdentifier(std::string_view oid, Encoding_Option option) : m_oid(OID::from_string(oid)) {
   43|  11.9k|   constexpr uint8_t DER_NULL[2] = {0x05, 0x00};
   44|       |
   45|  11.9k|   if(option == USE_NULL_PARAM) {
  ------------------
  |  Branch (45:7): [True: 11.9k, False: 0]
  ------------------
   46|  11.9k|      m_parameters.assign(DER_NULL, DER_NULL + 2);
   47|  11.9k|   }
   48|  11.9k|}
_ZNK5Botan19AlgorithmIdentifier19parameters_are_nullEv:
   50|  13.0k|bool AlgorithmIdentifier::parameters_are_null() const {
   51|  13.0k|   return (m_parameters.size() == 2 && (m_parameters[0] == 0x05) && (m_parameters[1] == 0x00));
  ------------------
  |  Branch (51:12): [True: 14, False: 13.0k]
  |  Branch (51:40): [True: 2, False: 12]
  |  Branch (51:69): [True: 1, False: 1]
  ------------------
   52|  13.0k|}
_ZN5BotaneqERKNS_19AlgorithmIdentifierES2_:
   54|  6.48k|bool operator==(const AlgorithmIdentifier& x, const AlgorithmIdentifier& y) {
   55|  6.48k|   return (x.oid() == y.oid() && x.parameters() == y.parameters());
  ------------------
  |  Branch (55:12): [True: 6.48k, False: 0]
  |  Branch (55:34): [True: 6.48k, False: 0]
  ------------------
   56|  6.48k|}
_ZN5BotanneERKNS_19AlgorithmIdentifierES2_:
   58|  6.48k|bool operator!=(const AlgorithmIdentifier& x, const AlgorithmIdentifier& y) {
   59|  6.48k|   return !(x == y);
   60|  6.48k|}
_ZNK5Botan19AlgorithmIdentifier11encode_intoERNS_11DER_EncoderE:
   65|  42.3k|void AlgorithmIdentifier::encode_into(DER_Encoder& codec) const {
   66|  42.3k|   codec.start_sequence().encode(oid()).raw_bytes(parameters()).end_cons();
   67|  42.3k|}
_ZN5Botan19AlgorithmIdentifier11decode_fromERNS_11BER_DecoderE:
   72|  26.2k|void AlgorithmIdentifier::decode_from(BER_Decoder& codec) {
   73|  26.2k|   codec.start_sequence().decode(m_oid).raw_bytes(m_parameters).end_cons();
   74|       |
   75|       |   /*
   76|       |   * The parameters field is OPTIONAL ANY but in practice it is one of
   77|       |   * - empty
   78|       |   * - NULL
   79|       |   * - SEQUENCE
   80|       |   * - OBJECT IDENTIFIER (namedCurve)
   81|       |   * - OCTET STRING (CBC IV in PBES2)
   82|       |   *
   83|       |   * So require it be exactly one of these values. In particular this ensures that
   84|       |   * there is not any additional trailing data (eg after the SEQUENCE encoding)
   85|       |   * that might be otherwise skipped over by a reader.
   86|       |   */
   87|       |
   88|  26.2k|   const bool acceptable_parameters = [&]() {
   89|  26.2k|      if(this->parameters_are_null_or_empty()) {
   90|  26.2k|         return true;
   91|  26.2k|      }
   92|  26.2k|      if(ASN1::is_der_sequence_header(m_parameters)) {
   93|  26.2k|         return true;
   94|  26.2k|      }
   95|  26.2k|      if(ASN1::is_single_der_object(m_parameters, ASN1_Type::ObjectId, ASN1_Class::Universal)) {
   96|  26.2k|         return true;
   97|  26.2k|      }
   98|  26.2k|      if(ASN1::is_single_der_object(m_parameters, ASN1_Type::OctetString, ASN1_Class::Universal)) {
   99|  26.2k|         return true;
  100|  26.2k|      }
  101|  26.2k|      return false;
  102|  26.2k|   }();
  103|       |
  104|  26.2k|   if(!acceptable_parameters) {
  ------------------
  |  Branch (104:7): [True: 64, False: 26.1k]
  ------------------
  105|     64|      throw Decoding_Error("AlgorithmIdentifier parameters were not NULL, a SEQUENCE, an OID, or an OCTET STRING");
  106|     64|   }
  107|  26.2k|}
alg_id.cpp:_ZZN5Botan19AlgorithmIdentifier11decode_fromERNS_11BER_DecoderEENK3$_0clEv:
   88|  26.1k|   const bool acceptable_parameters = [&]() {
   89|  26.1k|      if(this->parameters_are_null_or_empty()) {
  ------------------
  |  Branch (89:10): [True: 13.0k, False: 13.0k]
  ------------------
   90|  13.0k|         return true;
   91|  13.0k|      }
   92|  13.0k|      if(ASN1::is_der_sequence_header(m_parameters)) {
  ------------------
  |  Branch (92:10): [True: 1, False: 13.0k]
  ------------------
   93|      1|         return true;
   94|      1|      }
   95|  13.0k|      if(ASN1::is_single_der_object(m_parameters, ASN1_Type::ObjectId, ASN1_Class::Universal)) {
  ------------------
  |  Branch (95:10): [True: 12.9k, False: 65]
  ------------------
   96|  12.9k|         return true;
   97|  12.9k|      }
   98|     65|      if(ASN1::is_single_der_object(m_parameters, ASN1_Type::OctetString, ASN1_Class::Universal)) {
  ------------------
  |  Branch (98:10): [True: 1, False: 64]
  ------------------
   99|      1|         return true;
  100|      1|      }
  101|     64|      return false;
  102|     65|   }();

_ZNK5Botan11ASN1_Object10BER_encodeEv:
   21|  57.6k|std::vector<uint8_t> ASN1_Object::BER_encode() const {
   22|  57.6k|   std::vector<uint8_t> output;
   23|  57.6k|   DER_Encoder der(output);
   24|  57.6k|   this->encode_into(der);
   25|  57.6k|   return output;
   26|  57.6k|}
_ZN5Botan14ASN1_BitStringC2ENSt3__16vectorIhNS1_9allocatorIhEEEEm:
   29|  19.5k|      m_bytes(std::move(bytes)), m_unused_bits(unused_bits) {
   30|  19.5k|   if(m_unused_bits >= 8) {
  ------------------
  |  Branch (30:7): [True: 0, False: 19.5k]
  ------------------
   31|      0|      throw Invalid_Argument("ASN1_BitString: Invalid unused bit count");
   32|      0|   }
   33|       |
   34|  19.5k|   if(m_bytes.empty() && m_unused_bits != 0) {
  ------------------
  |  Branch (34:7): [True: 2, False: 19.5k]
  |  Branch (34:26): [True: 0, False: 2]
  ------------------
   35|      0|      throw Invalid_Argument("ASN1_BitString: Empty BIT STRING cannot have unused bits");
   36|      0|   }
   37|       |
   38|  19.5k|   if(m_unused_bits > 0 && (m_bytes.back() & ((1U << m_unused_bits) - 1)) != 0) {
  ------------------
  |  Branch (38:7): [True: 3, False: 19.5k]
  |  Branch (38:28): [True: 0, False: 3]
  ------------------
   39|      0|      throw Invalid_Argument("ASN1_BitString: Unused bits must be zero");
   40|      0|   }
   41|  19.5k|}
_ZN5Botan10BER_ObjectD2Ev:
   58|  1.15M|BER_Object::~BER_Object() {
   59|  1.15M|   secure_scrub_memory(m_value);
   60|  1.15M|}
_ZNK5Botan10BER_Object11assert_is_aENS_9ASN1_TypeENS_10ASN1_ClassENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   65|   313k|void BER_Object::assert_is_a(ASN1_Type expected_type_tag, ASN1_Class expected_class_tag, std::string_view descr) const {
   66|   313k|   if(!this->is_a(expected_type_tag, expected_class_tag)) {
  ------------------
  |  Branch (66:7): [True: 188, False: 313k]
  ------------------
   67|    188|      std::stringstream msg;
   68|       |
   69|    188|      msg << "Tag mismatch when decoding " << descr << " got ";
   70|       |
   71|    188|      if(m_class_tag == ASN1_Class::NoObject && m_type_tag == ASN1_Type::NoObject) {
  ------------------
  |  Branch (71:10): [True: 13, False: 175]
  |  Branch (71:49): [True: 13, False: 0]
  ------------------
   72|     13|         msg << "EOF";
   73|    175|      } else {
   74|    175|         if(m_class_tag == ASN1_Class::Universal || m_class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (74:13): [True: 40, False: 135]
  |  Branch (74:53): [True: 94, False: 41]
  ------------------
   75|    134|            msg << asn1_tag_to_string(m_type_tag);
   76|    134|         } else {
   77|     41|            msg << std::to_string(static_cast<uint32_t>(m_type_tag));
   78|     41|         }
   79|       |
   80|    175|         msg << "/" << asn1_class_to_string(m_class_tag);
   81|    175|      }
   82|       |
   83|    188|      msg << " expected ";
   84|       |
   85|    188|      if(expected_class_tag == ASN1_Class::Universal || expected_class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (85:10): [True: 36, False: 152]
  |  Branch (85:57): [True: 152, False: 0]
  ------------------
   86|    188|         msg << asn1_tag_to_string(expected_type_tag);
   87|    188|      } else {
   88|      0|         msg << std::to_string(static_cast<uint32_t>(expected_type_tag));
   89|      0|      }
   90|       |
   91|    188|      msg << "/" << asn1_class_to_string(expected_class_tag);
   92|       |
   93|    188|      throw BER_Decoding_Error(msg.str());
   94|    188|   }
   95|   313k|}
_ZNK5Botan10BER_Object4is_aENS_9ASN1_TypeENS_10ASN1_ClassE:
   97|   430k|bool BER_Object::is_a(ASN1_Type expected_type_tag, ASN1_Class expected_class_tag) const {
   98|   430k|   return (m_type_tag == expected_type_tag && m_class_tag == expected_class_tag);
  ------------------
  |  Branch (98:12): [True: 352k, False: 78.0k]
  |  Branch (98:47): [True: 352k, False: 10]
  ------------------
   99|   430k|}
_ZNK5Botan10BER_Object4is_aEiNS_10ASN1_ClassE:
  101|  45.3k|bool BER_Object::is_a(int expected_type_tag, ASN1_Class expected_class_tag) const {
  102|  45.3k|   return is_a(ASN1_Type(expected_type_tag), expected_class_tag);
  103|  45.3k|}
_ZN5Botan10BER_Object11set_taggingENS_9ASN1_TypeENS_10ASN1_ClassE:
  105|   516k|void BER_Object::set_tagging(ASN1_Type type_tag, ASN1_Class class_tag) {
  106|   516k|   m_type_tag = type_tag;
  107|   516k|   m_class_tag = class_tag;
  108|   516k|}
_ZN5Botan20asn1_class_to_stringENS_10ASN1_ClassE:
  110|    363|std::string asn1_class_to_string(ASN1_Class type) {
  111|    363|   switch(type) {
  112|     76|      case ASN1_Class::Universal:
  ------------------
  |  Branch (112:7): [True: 76, False: 287]
  ------------------
  113|     76|         return "UNIVERSAL";
  114|    246|      case ASN1_Class::Constructed:
  ------------------
  |  Branch (114:7): [True: 246, False: 117]
  ------------------
  115|    246|         return "CONSTRUCTED";
  116|      2|      case ASN1_Class::ContextSpecific:
  ------------------
  |  Branch (116:7): [True: 2, False: 361]
  ------------------
  117|      2|         return "CONTEXT_SPECIFIC";
  118|      4|      case ASN1_Class::Application:
  ------------------
  |  Branch (118:7): [True: 4, False: 359]
  ------------------
  119|      4|         return "APPLICATION";
  120|      2|      case ASN1_Class::Private:
  ------------------
  |  Branch (120:7): [True: 2, False: 361]
  ------------------
  121|      2|         return "PRIVATE";
  122|      0|      case ASN1_Class::NoObject:
  ------------------
  |  Branch (122:7): [True: 0, False: 363]
  ------------------
  123|      0|         return "NO_OBJECT";
  124|     33|      default:
  ------------------
  |  Branch (124:7): [True: 33, False: 330]
  ------------------
  125|     33|         return "CLASS(" + std::to_string(static_cast<size_t>(type)) + ")";
  126|    363|   }
  127|    363|}
_ZN5Botan18asn1_tag_to_stringENS_9ASN1_TypeE:
  129|    361|std::string asn1_tag_to_string(ASN1_Type type) {
  130|    361|   switch(type) {
  131|    151|      case ASN1_Type::Sequence:
  ------------------
  |  Branch (131:7): [True: 151, False: 210]
  ------------------
  132|    151|         return "SEQUENCE";
  133|       |
  134|      5|      case ASN1_Type::Set:
  ------------------
  |  Branch (134:7): [True: 5, False: 356]
  ------------------
  135|      5|         return "SET";
  136|       |
  137|      3|      case ASN1_Type::PrintableString:
  ------------------
  |  Branch (137:7): [True: 3, False: 358]
  ------------------
  138|      3|         return "PRINTABLE STRING";
  139|       |
  140|      1|      case ASN1_Type::NumericString:
  ------------------
  |  Branch (140:7): [True: 1, False: 360]
  ------------------
  141|      1|         return "NUMERIC STRING";
  142|       |
  143|      2|      case ASN1_Type::Ia5String:
  ------------------
  |  Branch (143:7): [True: 2, False: 359]
  ------------------
  144|      2|         return "IA5 STRING";
  145|       |
  146|      1|      case ASN1_Type::TeletexString:
  ------------------
  |  Branch (146:7): [True: 1, False: 360]
  ------------------
  147|      1|         return "T61 STRING";
  148|       |
  149|     39|      case ASN1_Type::Utf8String:
  ------------------
  |  Branch (149:7): [True: 39, False: 322]
  ------------------
  150|     39|         return "UTF8 STRING";
  151|       |
  152|      2|      case ASN1_Type::VisibleString:
  ------------------
  |  Branch (152:7): [True: 2, False: 359]
  ------------------
  153|      2|         return "VISIBLE STRING";
  154|       |
  155|      1|      case ASN1_Type::BmpString:
  ------------------
  |  Branch (155:7): [True: 1, False: 360]
  ------------------
  156|      1|         return "BMP STRING";
  157|       |
  158|      1|      case ASN1_Type::UniversalString:
  ------------------
  |  Branch (158:7): [True: 1, False: 360]
  ------------------
  159|      1|         return "UNIVERSAL STRING";
  160|       |
  161|      1|      case ASN1_Type::UtcTime:
  ------------------
  |  Branch (161:7): [True: 1, False: 360]
  ------------------
  162|      1|         return "UTC TIME";
  163|       |
  164|      3|      case ASN1_Type::GeneralizedTime:
  ------------------
  |  Branch (164:7): [True: 3, False: 358]
  ------------------
  165|      3|         return "GENERALIZED TIME";
  166|       |
  167|      2|      case ASN1_Type::OctetString:
  ------------------
  |  Branch (167:7): [True: 2, False: 359]
  ------------------
  168|      2|         return "OCTET STRING";
  169|       |
  170|      5|      case ASN1_Type::BitString:
  ------------------
  |  Branch (170:7): [True: 5, False: 356]
  ------------------
  171|      5|         return "BIT STRING";
  172|       |
  173|      1|      case ASN1_Type::Enumerated:
  ------------------
  |  Branch (173:7): [True: 1, False: 360]
  ------------------
  174|      1|         return "ENUMERATED";
  175|       |
  176|     36|      case ASN1_Type::Integer:
  ------------------
  |  Branch (176:7): [True: 36, False: 325]
  ------------------
  177|     36|         return "INTEGER";
  178|       |
  179|      1|      case ASN1_Type::Null:
  ------------------
  |  Branch (179:7): [True: 1, False: 360]
  ------------------
  180|      1|         return "NULL";
  181|       |
  182|      4|      case ASN1_Type::ObjectId:
  ------------------
  |  Branch (182:7): [True: 4, False: 357]
  ------------------
  183|      4|         return "OBJECT";
  184|       |
  185|      2|      case ASN1_Type::Boolean:
  ------------------
  |  Branch (185:7): [True: 2, False: 359]
  ------------------
  186|      2|         return "BOOLEAN";
  187|       |
  188|      0|      case ASN1_Type::NoObject:
  ------------------
  |  Branch (188:7): [True: 0, False: 361]
  ------------------
  189|      0|         return "NO_OBJECT";
  190|       |
  191|    100|      default:
  ------------------
  |  Branch (191:7): [True: 100, False: 261]
  ------------------
  192|    100|         return "TAG(" + std::to_string(static_cast<uint32_t>(type)) + ")";
  193|    361|   }
  194|    361|}
_ZN5Botan18BER_Decoding_ErrorC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  199|    671|BER_Decoding_Error::BER_Decoding_Error(std::string_view err) : Decoding_Error(fmt("BER: {}", err)) {}
_ZN5Botan11BER_Bad_TagC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEj:
  201|     20|BER_Bad_Tag::BER_Bad_Tag(std::string_view str, uint32_t tagging) : BER_Decoding_Error(fmt("{}: {}", str, tagging)) {}
_ZN5Botan4ASN115put_in_sequenceERKNSt3__16vectorIhNS1_9allocatorIhEEEE:
  208|  19.4k|std::vector<uint8_t> put_in_sequence(const std::vector<uint8_t>& contents) {
  209|  19.4k|   return ASN1::put_in_sequence(contents.data(), contents.size());
  210|  19.4k|}
_ZN5Botan4ASN115put_in_sequenceEPKhm:
  212|  19.4k|std::vector<uint8_t> put_in_sequence(const uint8_t bits[], size_t len) {
  213|  19.4k|   std::vector<uint8_t> output = der_sequence_header(len);
  214|  19.4k|   output.reserve(output.size() + len);
  215|  19.4k|   if(len > 0) {
  ------------------
  |  Branch (215:7): [True: 19.4k, False: 0]
  ------------------
  216|  19.4k|      output.insert(output.end(), bits, bits + len);
  217|  19.4k|   }
  218|  19.4k|   return output;
  219|  19.4k|}
_ZN5Botan4ASN19to_stringERKNS_10BER_ObjectE:
  224|  58.6k|std::string to_string(const BER_Object& obj) {
  225|  58.6k|   return bytes_to_string(obj.data());
  226|  58.6k|}
_ZN5Botan4ASN19maybe_BERERNS_10DataSourceE:
  231|  13.4k|bool maybe_BER(DataSource& source) {
  232|  13.4k|   uint8_t first_u8 = 0;
  233|  13.4k|   if(source.peek_byte(first_u8) == 0) {
  ------------------
  |  Branch (233:7): [True: 1, False: 13.4k]
  ------------------
  234|      1|      BOTAN_ASSERT_EQUAL(source.read_byte(first_u8), 0, "Expected EOF");
  ------------------
  |  |   97|      1|   do {                                                                                                \
  |  |   98|      1|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                                    \
  |  |   99|      1|      if((expr1) != (expr2)) {                                                                         \
  |  |  ------------------
  |  |  |  Branch (99:10): [True: 0, False: 1]
  |  |  ------------------
  |  |  100|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                           \
  |  |  101|      0|         Botan::assertion_failure(#expr1 " == " #expr2, assertion_made, __func__, __FILE__, __LINE__); \
  |  |  102|      0|      }                                                                                                \
  |  |  103|      1|   } while(0)
  |  |  ------------------
  |  |  |  Branch (103:12): [Folded, False: 1]
  |  |  ------------------
  ------------------
  235|      1|      throw Stream_IO_Error("ASN1::maybe_BER: Source was empty");
  236|      1|   }
  237|       |
  238|  13.4k|   const auto cons_seq = static_cast<uint8_t>(ASN1_Class::Constructed) | static_cast<uint8_t>(ASN1_Type::Sequence);
  239|  13.4k|   return first_u8 == cons_seq;
  240|  13.4k|}

_ZN5Botan3OID9from_nameENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   66|  4.59k|std::optional<OID> OID::from_name(std::string_view name) {
   67|  4.59k|   if(name.empty()) {
  ------------------
  |  Branch (67:7): [True: 0, False: 4.59k]
  ------------------
   68|      0|      throw Invalid_Argument("OID::from_name argument must be non-empty");
   69|      0|   }
   70|       |
   71|  4.59k|   OID o = OID_Map::global_registry().str2oid(name);
   72|  4.59k|   if(o.has_value()) {
  ------------------
  |  Branch (72:7): [True: 4.59k, False: 0]
  ------------------
   73|  4.59k|      return std::optional(o);
   74|  4.59k|   }
   75|       |
   76|      0|   return std::nullopt;
   77|  4.59k|}
_ZN5Botan3OID11from_stringENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   80|  49.8k|OID OID::from_string(std::string_view str) {
   81|  49.8k|   if(str.empty()) {
  ------------------
  |  Branch (81:7): [True: 0, False: 49.8k]
  ------------------
   82|      0|      throw Invalid_Argument("OID::from_string argument must be non-empty");
   83|      0|   }
   84|       |
   85|  49.8k|   OID o = OID_Map::global_registry().str2oid(str);
   86|  49.8k|   if(o.has_value()) {
  ------------------
  |  Branch (86:7): [True: 49.8k, False: 0]
  ------------------
   87|  49.8k|      return o;
   88|  49.8k|   }
   89|       |
   90|       |   // Try to parse as a dotted decimal
   91|      0|   try {
   92|      0|      return OID(str);
   93|      0|   } catch(...) {}
   94|       |
   95|      0|   throw Lookup_Error(fmt("No OID associated with name '{}'", str));
   96|      0|}
_ZN5Botan3OIDC2ESt16initializer_listIjE:
   98|   138k|OID::OID(std::initializer_list<uint32_t> init) : m_id(init) {
   99|   138k|   oid_valid_check(m_id);
  100|   138k|}
_ZNK5Botan3OID15registered_nameEv:
  149|  12.9k|std::optional<std::string> OID::registered_name() const {
  150|  12.9k|   return OID_Map::global_registry().oid2str(*this);
  151|  12.9k|}
_ZNK5Botan3OID7matchesESt16initializer_listIjE:
  157|  12.9k|bool OID::matches(std::initializer_list<uint32_t> other) const {
  158|       |   // TODO: once all target compilers support it, use std::ranges::equal
  159|  12.9k|   return std::equal(m_id.begin(), m_id.end(), other.begin(), other.end());
  160|  12.9k|}
_ZNK5Botan3OID9hash_codeEv:
  162|  12.9k|uint64_t OID::hash_code() const {
  163|       |   // If this is changed also update gen_oids.py to match
  164|  12.9k|   uint64_t hash = 0x621F302327D9A49A;
  165|  77.8k|   for(auto id : m_id) {
  ------------------
  |  Branch (165:16): [True: 77.8k, False: 12.9k]
  ------------------
  166|  77.8k|      hash *= 193;
  167|  77.8k|      hash += id;
  168|  77.8k|   }
  169|  12.9k|   return hash;
  170|  12.9k|}
_ZN5BotanltERKNS_3OIDES2_:
  175|   363k|bool operator<(const OID& a, const OID& b) {
  176|   363k|   const std::vector<uint32_t>& oid1 = a.get_components();
  177|   363k|   const std::vector<uint32_t>& oid2 = b.get_components();
  178|       |
  179|   363k|   return std::lexicographical_compare(oid1.begin(), oid1.end(), oid2.begin(), oid2.end());
  180|   363k|}
_ZNK5Botan3OID11encode_intoERNS_11DER_EncoderE:
  185|  81.5k|void OID::encode_into(DER_Encoder& der) const {
  186|  81.5k|   if(m_id.size() < 2) {
  ------------------
  |  Branch (186:7): [True: 0, False: 81.5k]
  ------------------
  187|      0|      throw Invalid_Argument("OID::encode_into: OID is invalid");
  188|      0|   }
  189|       |
  190|  81.5k|   auto append = [](std::vector<uint8_t>& encoding, uint32_t z) {
  191|  81.5k|      if(z <= 0x7F) {
  192|  81.5k|         encoding.push_back(static_cast<uint8_t>(z));
  193|  81.5k|      } else {
  194|  81.5k|         const size_t z7 = (high_bit(z) + 7 - 1) / 7;
  195|       |
  196|  81.5k|         for(size_t j = 0; j != z7; ++j) {
  197|  81.5k|            uint8_t zp = static_cast<uint8_t>(z >> (7 * (z7 - j - 1)) & 0x7F);
  198|       |
  199|  81.5k|            if(j != z7 - 1) {
  200|  81.5k|               zp |= 0x80;
  201|  81.5k|            }
  202|       |
  203|  81.5k|            encoding.push_back(zp);
  204|  81.5k|         }
  205|  81.5k|      }
  206|  81.5k|   };
  207|       |
  208|  81.5k|   std::vector<uint8_t> encoding;
  209|       |
  210|       |   // We know 40 * root can't overflow because root is between 0 and 2
  211|  81.5k|   auto first = checked_add(40 * m_id[0], m_id[1]);
  212|  81.5k|   BOTAN_ASSERT_NOMSG(first.has_value());
  ------------------
  |  |   84|  81.5k|   do {                                                                     \
  |  |   85|  81.5k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  81.5k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 81.5k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  81.5k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 81.5k]
  |  |  ------------------
  ------------------
  213|       |
  214|  81.5k|   append(encoding, *first);
  215|       |
  216|   419k|   for(size_t i = 2; i != m_id.size(); ++i) {
  ------------------
  |  Branch (216:22): [True: 338k, False: 81.5k]
  ------------------
  217|   338k|      append(encoding, m_id[i]);
  218|   338k|   }
  219|  81.5k|   der.add_object(ASN1_Type::ObjectId, ASN1_Class::Universal, encoding);
  220|  81.5k|}
_ZN5Botan3OID11decode_fromERNS_11BER_DecoderE:
  225|  98.0k|void OID::decode_from(BER_Decoder& decoder) {
  226|  98.0k|   const BER_Object obj = decoder.get_next_object();
  227|  98.0k|   if(obj.tagging() != (ASN1_Class::Universal | ASN1_Type::ObjectId)) {
  ------------------
  |  Branch (227:7): [True: 20, False: 97.9k]
  ------------------
  228|     20|      throw BER_Bad_Tag("Error decoding OID, unknown tag", obj.tagging());
  229|     20|   }
  230|       |
  231|  97.9k|   if(obj.length() == 0) {
  ------------------
  |  Branch (231:7): [True: 1, False: 97.9k]
  ------------------
  232|      1|      throw BER_Decoding_Error("OID encoding is too short");
  233|      1|   }
  234|       |
  235|  97.9k|   auto consume = [](BufferSlicer& data) -> uint32_t {
  236|  97.9k|      BOTAN_ASSERT_NOMSG(!data.empty());
  237|  97.9k|      uint32_t b = data.take_byte();
  238|       |
  239|  97.9k|      if(b > 0x7F) {
  240|  97.9k|         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|  97.9k|         if(b == 0) {
  246|  97.9k|            throw Decoding_Error("Leading zero byte in multibyte OID encoding");
  247|  97.9k|         }
  248|       |
  249|  97.9k|         while(true) {
  250|  97.9k|            if(data.empty()) {
  251|  97.9k|               throw Decoding_Error("Truncated OID value");
  252|  97.9k|            }
  253|       |
  254|  97.9k|            const uint8_t next = data.take_byte();
  255|  97.9k|            const bool more = (next & 0x80) == 0x80;
  256|  97.9k|            const uint8_t value = next & 0x7F;
  257|       |
  258|  97.9k|            if((b >> (32 - 7)) != 0) {
  259|  97.9k|               throw Decoding_Error("OID component overflow");
  260|  97.9k|            }
  261|       |
  262|  97.9k|            b = (b << 7) | value;
  263|       |
  264|  97.9k|            if(!more) {
  265|  97.9k|               break;
  266|  97.9k|            }
  267|  97.9k|         }
  268|  97.9k|      }
  269|       |
  270|  97.9k|      return b;
  271|  97.9k|   };
  272|       |
  273|  97.9k|   BufferSlicer data(obj.data());
  274|  97.9k|   std::vector<uint32_t> parts;
  275|       |
  276|       |   // Each byte of the DER encoding can result in at most one additional arc,
  277|       |   // except the first byte which always encodes two.
  278|  97.9k|   parts.reserve(obj.length() + 1);
  279|       |
  280|   477k|   while(!data.empty()) {
  ------------------
  |  Branch (280:10): [True: 379k, False: 97.9k]
  ------------------
  281|   379k|      const uint32_t comp = consume(data);
  282|       |
  283|   379k|      if(parts.empty()) {
  ------------------
  |  Branch (283:10): [True: 97.9k, False: 281k]
  ------------------
  284|       |         // divide into root and second arc
  285|       |
  286|  97.9k|         const uint32_t root_arc = [](uint32_t b0) -> uint32_t {
  287|  97.9k|            if(b0 < 40) {
  288|  97.9k|               return 0;
  289|  97.9k|            } else if(b0 < 80) {
  290|  97.9k|               return 1;
  291|  97.9k|            } else {
  292|  97.9k|               return 2;
  293|  97.9k|            }
  294|  97.9k|         }(comp);
  295|       |
  296|  97.9k|         parts.push_back(root_arc);
  297|  97.9k|         BOTAN_ASSERT_NOMSG(comp >= 40 * root_arc);
  ------------------
  |  |   84|  97.9k|   do {                                                                     \
  |  |   85|  97.9k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  97.9k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 97.9k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  97.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 97.9k]
  |  |  ------------------
  ------------------
  298|  97.9k|         parts.push_back(comp - 40 * root_arc);
  299|   281k|      } else {
  300|   281k|         parts.push_back(comp);
  301|   281k|      }
  302|   379k|   }
  303|       |
  304|  97.9k|   m_id = std::move(parts);
  305|  97.9k|}
asn1_oid.cpp:_ZN5Botan12_GLOBAL__N_115oid_valid_checkENSt3__14spanIKjLm18446744073709551615EEE:
   26|   138k|void oid_valid_check(std::span<const uint32_t> oid) {
   27|   138k|   BOTAN_ARG_CHECK(oid.size() >= 2, "OID too short to be valid");
  ------------------
  |  |   35|   138k|   do {                                                          \
  |  |   36|   138k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|   138k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 138k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|   138k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 138k]
  |  |  ------------------
  ------------------
   28|   138k|   BOTAN_ARG_CHECK(oid[0] <= 2, "OID root out of range");
  ------------------
  |  |   35|   138k|   do {                                                          \
  |  |   36|   138k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|   138k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 138k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|   138k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 138k]
  |  |  ------------------
  ------------------
   29|   138k|   BOTAN_ARG_CHECK(oid[1] <= 39 || oid[0] == 2, "OID second arc too large");
  ------------------
  |  |   35|   138k|   do {                                                          \
  |  |   36|   138k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|   138k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 138k, False: 0]
  |  |  |  Branch (37:12): [True: 0, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|   138k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 138k]
  |  |  ------------------
  ------------------
   30|       |   // This last is a limitation of using 32 bit integers when decoding
   31|       |   // not a limitation of ASN.1 object identifiers in general
   32|   138k|   BOTAN_ARG_CHECK(oid[1] <= 0xFFFFFFAF, "OID second arc too large");
  ------------------
  |  |   35|   138k|   do {                                                          \
  |  |   36|   138k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|   138k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 138k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|   138k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 138k]
  |  |  ------------------
  ------------------
   33|   138k|}
asn1_oid.cpp:_ZZNK5Botan3OID11encode_intoERNS_11DER_EncoderEENK3$_0clERNSt3__16vectorIhNS4_9allocatorIhEEEEj:
  190|   419k|   auto append = [](std::vector<uint8_t>& encoding, uint32_t z) {
  191|   419k|      if(z <= 0x7F) {
  ------------------
  |  Branch (191:10): [True: 358k, False: 61.0k]
  ------------------
  192|   358k|         encoding.push_back(static_cast<uint8_t>(z));
  193|   358k|      } else {
  194|  61.0k|         const size_t z7 = (high_bit(z) + 7 - 1) / 7;
  195|       |
  196|   195k|         for(size_t j = 0; j != z7; ++j) {
  ------------------
  |  Branch (196:28): [True: 134k, False: 61.0k]
  ------------------
  197|   134k|            uint8_t zp = static_cast<uint8_t>(z >> (7 * (z7 - j - 1)) & 0x7F);
  198|       |
  199|   134k|            if(j != z7 - 1) {
  ------------------
  |  Branch (199:16): [True: 73.1k, False: 61.0k]
  ------------------
  200|  73.1k|               zp |= 0x80;
  201|  73.1k|            }
  202|       |
  203|   134k|            encoding.push_back(zp);
  204|   134k|         }
  205|  61.0k|      }
  206|   419k|   };
asn1_oid.cpp:_ZZN5Botan3OID11decode_fromERNS_11BER_DecoderEENK3$_0clERNS_12BufferSlicerE:
  235|   379k|   auto consume = [](BufferSlicer& data) -> uint32_t {
  236|   379k|      BOTAN_ASSERT_NOMSG(!data.empty());
  ------------------
  |  |   84|   379k|   do {                                                                     \
  |  |   85|   379k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|   379k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 379k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|   379k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 379k]
  |  |  ------------------
  ------------------
  237|   379k|      uint32_t b = data.take_byte();
  238|       |
  239|   379k|      if(b > 0x7F) {
  ------------------
  |  Branch (239:10): [True: 65.7k, False: 313k]
  ------------------
  240|  65.7k|         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|  65.7k|         if(b == 0) {
  ------------------
  |  Branch (245:13): [True: 2, False: 65.7k]
  ------------------
  246|      2|            throw Decoding_Error("Leading zero byte in multibyte OID encoding");
  247|      2|         }
  248|       |
  249|  66.3k|         while(true) {
  ------------------
  |  Branch (249:16): [True: 66.3k, Folded]
  ------------------
  250|  66.3k|            if(data.empty()) {
  ------------------
  |  Branch (250:16): [True: 7, False: 66.3k]
  ------------------
  251|      7|               throw Decoding_Error("Truncated OID value");
  252|      7|            }
  253|       |
  254|  66.3k|            const uint8_t next = data.take_byte();
  255|  66.3k|            const bool more = (next & 0x80) == 0x80;
  256|  66.3k|            const uint8_t value = next & 0x7F;
  257|       |
  258|  66.3k|            if((b >> (32 - 7)) != 0) {
  ------------------
  |  Branch (258:16): [True: 13, False: 66.3k]
  ------------------
  259|     13|               throw Decoding_Error("OID component overflow");
  260|     13|            }
  261|       |
  262|  66.3k|            b = (b << 7) | value;
  263|       |
  264|  66.3k|            if(!more) {
  ------------------
  |  Branch (264:16): [True: 65.7k, False: 620]
  ------------------
  265|  65.7k|               break;
  266|  65.7k|            }
  267|  66.3k|         }
  268|  65.7k|      }
  269|       |
  270|   379k|      return b;
  271|   379k|   };
asn1_oid.cpp:_ZZN5Botan3OID11decode_fromERNS_11BER_DecoderEENK3$_1clEj:
  286|  97.9k|         const uint32_t root_arc = [](uint32_t b0) -> uint32_t {
  287|  97.9k|            if(b0 < 40) {
  ------------------
  |  Branch (287:16): [True: 274, False: 97.7k]
  ------------------
  288|    274|               return 0;
  289|  97.7k|            } else if(b0 < 80) {
  ------------------
  |  Branch (289:23): [True: 32.4k, False: 65.2k]
  ------------------
  290|  32.4k|               return 1;
  291|  65.2k|            } else {
  292|  65.2k|               return 2;
  293|  65.2k|            }
  294|  97.9k|         }(comp);

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

_ZN5Botan9ASN1_TimeC2EthhhhhNS_9ASN1_TypeE:
   43|  12.9k|      m_year(year), m_month(month), m_day(day), m_hour(hour), m_minute(minute), m_second(second), m_tag(tag) {
   44|  12.9k|   if(tag != ASN1_Type::UtcTime && tag != ASN1_Type::GeneralizedTime) {
  ------------------
  |  Branch (44:7): [True: 0, False: 12.9k]
  |  Branch (44:36): [True: 0, False: 0]
  ------------------
   45|      0|      throw Invalid_Argument("ASN1_Time tag must be UtcTime or GeneralizedTime");
   46|      0|   }
   47|       |
   48|       |   /*
   49|       |   * RFC 5280 Section 4.1.2.5:
   50|       |   *    To indicate that a certificate has no well-defined expiration date,
   51|       |   *    the notAfter SHOULD be assigned the GeneralizedTime value of
   52|       |   *    99991231235959Z.
   53|       |   */
   54|  12.9k|   const uint16_t min_year = 1950;
   55|  12.9k|   const uint16_t max_year = (tag == ASN1_Type::UtcTime) ? 2049 : 9999;
  ------------------
  |  Branch (55:30): [True: 12.9k, False: 0]
  ------------------
   56|       |
   57|  12.9k|   if(m_year < min_year || m_year > max_year) {
  ------------------
  |  Branch (57:7): [True: 0, False: 12.9k]
  |  Branch (57:28): [True: 0, False: 12.9k]
  ------------------
   58|      0|      throw Invalid_Argument(fmt("ASN1_Time year {} is out of range ({} to {})", m_year, min_year, max_year));
   59|      0|   }
   60|       |
   61|  12.9k|   if(m_month < 1 || m_month > 12) {
  ------------------
  |  Branch (61:7): [True: 0, False: 12.9k]
  |  Branch (61:22): [True: 0, False: 12.9k]
  ------------------
   62|      0|      throw Invalid_Argument(fmt("ASN1_Time month {} is out of range", static_cast<uint32_t>(m_month)));
   63|      0|   }
   64|       |
   65|  12.9k|   constexpr uint8_t days_in_month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
   66|       |
   67|  12.9k|   const bool is_leap_year = (m_year % 4 == 0) && (m_year % 100 != 0 || m_year % 400 == 0);
  ------------------
  |  Branch (67:30): [True: 0, False: 12.9k]
  |  Branch (67:52): [True: 0, False: 0]
  |  Branch (67:73): [True: 0, False: 0]
  ------------------
   68|  12.9k|   const uint8_t max_day = (m_month == 2 && is_leap_year) ? 29 : days_in_month[m_month - 1];
  ------------------
  |  Branch (68:29): [True: 0, False: 12.9k]
  |  Branch (68:45): [True: 0, False: 0]
  ------------------
   69|       |
   70|  12.9k|   if(m_day < 1 || m_day > max_day) {
  ------------------
  |  Branch (70:7): [True: 0, False: 12.9k]
  |  Branch (70:20): [True: 0, False: 12.9k]
  ------------------
   71|      0|      throw Invalid_Argument(fmt("ASN1_Time day {} is out of range for month {}",
   72|      0|                                 static_cast<uint32_t>(m_day),
   73|      0|                                 static_cast<uint32_t>(m_month)));
   74|      0|   }
   75|       |
   76|  12.9k|   if(m_hour > 23) {
  ------------------
  |  Branch (76:7): [True: 0, False: 12.9k]
  ------------------
   77|      0|      throw Invalid_Argument(fmt("ASN1_Time hour {} is out of range", static_cast<uint32_t>(m_hour)));
   78|      0|   }
   79|       |
   80|  12.9k|   if(m_minute > 59) {
  ------------------
  |  Branch (80:7): [True: 0, False: 12.9k]
  ------------------
   81|      0|      throw Invalid_Argument(fmt("ASN1_Time minute {} is out of range", static_cast<uint32_t>(m_minute)));
   82|      0|   }
   83|       |
   84|       |   /*
   85|       |   * RFC 5280 is silent on the issue of leap seconds in certificate fields, but both
   86|       |   * OpenSSL and Go reject which suggests they are rarely if ever used in practice.
   87|       |   */
   88|  12.9k|   if(m_second > 59) {
  ------------------
  |  Branch (88:7): [True: 0, False: 12.9k]
  ------------------
   89|      0|      throw Invalid_Argument(fmt("ASN1_Time second {} is out of range", static_cast<uint32_t>(m_second)));
   90|      0|   }
   91|  12.9k|}
_ZN5Botan9ASN1_Time11from_stringENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS_9ASN1_TypeE:
  109|  12.9k|ASN1_Time ASN1_Time::from_string(std::string_view t_spec, ASN1_Type tag) {
  110|  12.9k|   BOTAN_ARG_CHECK(tag == ASN1_Type::UtcTime || tag == ASN1_Type::GeneralizedTime, "Invalid tag for ASN1_Time");
  ------------------
  |  |   35|  12.9k|   do {                                                          \
  |  |   36|  12.9k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  12.9k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 12.9k, False: 0]
  |  |  |  Branch (37:12): [True: 0, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  12.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 12.9k]
  |  |  ------------------
  ------------------
  111|       |
  112|  12.9k|   if(tag == ASN1_Type::GeneralizedTime) {
  ------------------
  |  Branch (112:7): [True: 0, False: 12.9k]
  ------------------
  113|      0|      BOTAN_ARG_CHECK(t_spec.size() == 15, "Invalid GeneralizedTime input string");
  ------------------
  |  |   35|      0|   do {                                                          \
  |  |   36|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|      0|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  114|  12.9k|   } else {
  115|  12.9k|      BOTAN_ARG_CHECK(t_spec.size() == 13, "Invalid UTCTime input string");
  ------------------
  |  |   35|  12.9k|   do {                                                          \
  |  |   36|  12.9k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  12.9k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 12.9k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  12.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 12.9k]
  |  |  ------------------
  ------------------
  116|  12.9k|   }
  117|       |
  118|  12.9k|   BOTAN_ARG_CHECK(t_spec.back() == 'Z', "Botan does not support ASN1 times with timezones other than Z");
  ------------------
  |  |   35|  12.9k|   do {                                                          \
  |  |   36|  12.9k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  12.9k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 12.9k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  12.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 12.9k]
  |  |  ------------------
  ------------------
  119|       |
  120|  12.9k|   const size_t field_len = 2;
  121|  12.9k|   const size_t year_len = (tag == ASN1_Type::UtcTime) ? 2 : 4;
  ------------------
  |  Branch (121:28): [True: 12.9k, False: 0]
  ------------------
  122|       |
  123|  12.9k|   const size_t year_start = 0;
  124|  12.9k|   const size_t month_start = year_start + year_len;
  125|  12.9k|   const size_t day_start = month_start + field_len;
  126|  12.9k|   const size_t hour_start = day_start + field_len;
  127|  12.9k|   const size_t min_start = hour_start + field_len;
  128|  12.9k|   const size_t sec_start = min_start + field_len;
  129|       |
  130|  12.9k|   uint32_t year = to_u32bit(t_spec.substr(year_start, year_len));
  131|  12.9k|   const uint32_t month = to_u32bit(t_spec.substr(month_start, field_len));
  132|  12.9k|   const uint32_t day = to_u32bit(t_spec.substr(day_start, field_len));
  133|  12.9k|   const uint32_t hour = to_u32bit(t_spec.substr(hour_start, field_len));
  134|  12.9k|   const uint32_t minute = to_u32bit(t_spec.substr(min_start, field_len));
  135|  12.9k|   const uint32_t second = to_u32bit(t_spec.substr(sec_start, field_len));
  136|       |
  137|  12.9k|   if(tag == ASN1_Type::UtcTime) {
  ------------------
  |  Branch (137:7): [True: 12.9k, False: 0]
  ------------------
  138|       |      // Interpret the two digit year by the 1950/2050 split (RFC 5280 Section 4.1.2.5.1)
  139|  12.9k|      year += (year >= 50) ? 1900 : 2000;
  ------------------
  |  Branch (139:15): [True: 0, False: 12.9k]
  ------------------
  140|  12.9k|   }
  141|       |
  142|  12.9k|   return ASN1_Time(static_cast<uint16_t>(year),
  143|  12.9k|                    static_cast<uint8_t>(month),
  144|  12.9k|                    static_cast<uint8_t>(day),
  145|  12.9k|                    static_cast<uint8_t>(hour),
  146|  12.9k|                    static_cast<uint8_t>(minute),
  147|  12.9k|                    static_cast<uint8_t>(second),
  148|  12.9k|                    tag);
  149|  12.9k|}
_ZN5Botan9ASN1_Time11decode_fromERNS_11BER_DecoderE:
  168|  12.9k|void ASN1_Time::decode_from(BER_Decoder& source) {
  169|  12.9k|   const BER_Object ber_time = source.get_next_object();
  170|       |
  171|  12.9k|   if(ber_time.get_class() != ASN1_Class::Universal ||
  ------------------
  |  Branch (171:7): [True: 0, False: 12.9k]
  ------------------
  172|  12.9k|      (ber_time.type() != ASN1_Type::UtcTime && ber_time.type() != ASN1_Type::GeneralizedTime)) {
  ------------------
  |  Branch (172:8): [True: 0, False: 12.9k]
  |  Branch (172:49): [True: 0, False: 0]
  ------------------
  173|      0|      throw Decoding_Error(fmt("ASN1_Time: Unexpected tag {}/{}",
  174|      0|                               static_cast<uint32_t>(ber_time.type()),
  175|      0|                               static_cast<uint32_t>(ber_time.get_class())));
  176|      0|   }
  177|       |
  178|  12.9k|   try {
  179|       |      // Assigning only after a successful parse means that a decoding error
  180|       |      // cannot leave this object in a partially written state
  181|  12.9k|      *this = ASN1_Time::from_string(ASN1::to_string(ber_time), ber_time.type());
  182|  12.9k|   } catch(Invalid_Argument& e) {
  183|      0|      throw Decoding_Error(fmt("Invalid ASN1_Time encoding: {}", e.what()));
  184|      0|   }
  185|  12.9k|}

_ZN5Botan11BER_DecoderD2Ev:
  456|   302k|BER_Decoder::~BER_Decoder() = default;
_ZNK5Botan11BER_Decoder10more_itemsEv:
  461|   176k|bool BER_Decoder::more_items() const {
  462|   176k|   if(m_source->end_of_data() && !m_pushed.is_set()) {
  ------------------
  |  Branch (462:7): [True: 65.1k, False: 111k]
  |  Branch (462:34): [True: 65.1k, False: 0]
  ------------------
  463|  65.1k|      return false;
  464|  65.1k|   }
  465|   111k|   return true;
  466|   176k|}
_ZN5Botan11BER_Decoder10verify_endEv:
  471|  77.9k|BER_Decoder& BER_Decoder::verify_end() {
  472|  77.9k|   return verify_end("BER_Decoder::verify_end called, but data remains");
  473|  77.9k|}
_ZN5Botan11BER_Decoder10verify_endENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  478|  84.4k|BER_Decoder& BER_Decoder::verify_end(std::string_view err) {
  479|  84.4k|   if(!m_source->end_of_data() || m_pushed.is_set()) {
  ------------------
  |  Branch (479:7): [True: 98, False: 84.3k]
  |  Branch (479:35): [True: 0, False: 84.3k]
  ------------------
  480|     98|      throw Decoding_Error(err);
  481|     98|   }
  482|  84.3k|   return (*this);
  483|  84.4k|}
_ZN5Botan11BER_Decoder17discard_remainingEv:
  488|  6.48k|BER_Decoder& BER_Decoder::discard_remaining() {
  489|  6.48k|   m_pushed = BER_Object();
  490|  6.48k|   uint8_t buf[64];
  491|  6.48k|   while(m_source->read(buf, sizeof(buf)) != 0) {}
  ------------------
  |  Branch (491:10): [True: 0, False: 6.48k]
  ------------------
  492|  6.48k|   return (*this);
  493|  6.48k|}
_ZN5Botan11BER_Decoder10read_bytesENSt3__14spanIhLm18446744073709551615EEE:
  505|   118k|size_t BER_Decoder::read_bytes(std::span<uint8_t> out) {
  506|   118k|   BOTAN_ASSERT_NOMSG(m_source != nullptr);
  ------------------
  |  |   84|   118k|   do {                                                                     \
  |  |   85|   118k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|   118k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 118k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|   118k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 118k]
  |  |  ------------------
  ------------------
  507|   118k|   return m_source->read(out.data(), out.size());
  508|   118k|}
_ZN5Botan11BER_Decoder16peek_next_objectEv:
  510|  25.9k|const BER_Object& BER_Decoder::peek_next_object() {
  511|  25.9k|   if(!m_pushed.is_set()) {
  ------------------
  |  Branch (511:7): [True: 25.9k, False: 0]
  ------------------
  512|  25.9k|      m_pushed = get_next_object();
  513|  25.9k|   }
  514|       |
  515|  25.9k|   return m_pushed;
  516|  25.9k|}
_ZN5Botan11BER_Decoder15get_next_objectEv:
  521|   574k|BER_Object BER_Decoder::get_next_object() {
  522|   574k|   BER_Object next;
  523|       |
  524|   574k|   if(m_pushed.is_set()) {
  ------------------
  |  Branch (524:7): [True: 58.4k, False: 516k]
  ------------------
  525|  58.4k|      std::swap(next, m_pushed);
  526|  58.4k|      return next;
  527|  58.4k|   }
  528|       |
  529|   516k|   for(;;) {
  530|   516k|      ASN1_Type type_tag = ASN1_Type::NoObject;
  531|   516k|      ASN1_Class class_tag = ASN1_Class::NoObject;
  532|   516k|      decode_tag(m_source, type_tag, class_tag);
  533|   516k|      next.set_tagging(type_tag, class_tag);
  534|   516k|      if(next.is_set() == false) {  // no more objects
  ------------------
  |  Branch (534:10): [True: 25.9k, False: 490k]
  ------------------
  535|  25.9k|         return next;
  536|  25.9k|      }
  537|       |
  538|   490k|      const size_t allow_indef = m_limits.allow_ber_encoding() ? m_limits.max_nested_indefinite_length() : 0;
  ------------------
  |  Branch (538:34): [True: 0, False: 490k]
  ------------------
  539|   490k|      const bool der_mode = m_limits.require_der_encoding();
  540|   490k|      const auto dl = decode_length(m_source, allow_indef, der_mode, is_constructed(class_tag));
  541|       |
  542|       |      // Per X.690 8.1.5 the only valid EOC encoding is the two-octet
  543|       |      // sequence 0x00 0x00. Reject any other length encoding on a tag of
  544|       |      // (Eoc, Universal) before we consume the "content" bytes.
  545|   490k|      if(type_tag == ASN1_Type::Eoc && class_tag == ASN1_Class::Universal &&
  ------------------
  |  Branch (545:10): [True: 13.0k, False: 477k]
  |  Branch (545:40): [True: 45, False: 12.9k]
  ------------------
  546|     45|         (dl.content_length() != 0 || dl.indefinite_length())) {
  ------------------
  |  Branch (546:11): [True: 37, False: 8]
  |  Branch (546:39): [True: 0, False: 8]
  ------------------
  547|     37|         throw BER_Decoding_Error("EOC marker with non-zero length");
  548|     37|      }
  549|       |
  550|   490k|      if(const auto max_size = m_limits.max_object_size(); max_size && dl.content_length() > *max_size) {
  ------------------
  |  Branch (550:60): [True: 490k, False: 91]
  |  Branch (550:72): [True: 33, False: 490k]
  ------------------
  551|     33|         throw BER_Decoding_Error("Encoded object exceeds maximum size");
  552|     33|      }
  553|       |
  554|   490k|      if(!m_source->check_available(dl.total_length())) {
  ------------------
  |  Branch (554:10): [True: 97, False: 490k]
  ------------------
  555|     97|         throw BER_Decoding_Error("Value truncated");
  556|     97|      }
  557|       |
  558|   490k|      uint8_t* out = next.mutable_bits(dl.content_length());
  559|   490k|      if(m_source->read(out, dl.content_length()) != dl.content_length()) {
  ------------------
  |  Branch (559:10): [True: 0, False: 490k]
  ------------------
  560|      0|         throw BER_Decoding_Error("Value truncated");
  561|      0|      }
  562|       |
  563|   490k|      if(dl.indefinite_length()) {
  ------------------
  |  Branch (563:10): [True: 0, False: 490k]
  ------------------
  564|       |         // After reading the data consume the 2-byte EOC
  565|      0|         uint8_t eoc[2] = {0xFF, 0xFF};
  566|      0|         if(m_source->read(eoc, 2) != 2 || eoc[0] != 0x00 || eoc[1] != 0x00) {
  ------------------
  |  Branch (566:13): [True: 0, False: 0]
  |  Branch (566:44): [True: 0, False: 0]
  |  Branch (566:62): [True: 0, False: 0]
  ------------------
  567|      0|            throw BER_Decoding_Error("Missing or malformed EOC marker");
  568|      0|         }
  569|      0|      }
  570|       |
  571|   490k|      if(next.tagging() == static_cast<uint32_t>(ASN1_Type::Eoc)) {
  ------------------
  |  Branch (571:10): [True: 8, False: 490k]
  ------------------
  572|      8|         if(m_limits.require_der_encoding()) {
  ------------------
  |  Branch (572:13): [True: 8, False: 0]
  ------------------
  573|      8|            throw BER_Decoding_Error("Detected EOC marker in DER structure");
  574|      8|         }
  575|       |         // An EOC marker is only valid as an indefinite-length terminator, which
  576|       |         // is consumed above when reading the indefinite-length object. A
  577|       |         // standalone EOC is rejected unless the caller opted to tolerate it.
  578|      0|         if(m_limits.allow_standalone_eoc()) {
  ------------------
  |  Branch (578:13): [True: 0, False: 0]
  ------------------
  579|      0|            continue;
  580|      0|         }
  581|      0|         throw BER_Decoding_Error("Encountered EOC marker outside of indefinite-length encoding");
  582|      0|      }
  583|       |
  584|   490k|      break;
  585|   490k|   }
  586|       |
  587|   490k|   return next;
  588|   516k|}
_ZN5Botan11BER_Decoder9push_backEONS_10BER_ObjectE:
  612|  58.4k|void BER_Decoder::push_back(BER_Object&& obj) {
  613|  58.4k|   if(m_pushed.is_set()) {
  ------------------
  |  Branch (613:7): [True: 0, False: 58.4k]
  ------------------
  614|      0|      throw Invalid_State("BER_Decoder: Only one push back is allowed");
  615|      0|   }
  616|  58.4k|   m_pushed = std::move(obj);
  617|  58.4k|}
_ZN5Botan11BER_Decoder10start_consENS_9ASN1_TypeENS_10ASN1_ClassE:
  619|   203k|BER_Decoder BER_Decoder::start_cons(ASN1_Type type_tag, ASN1_Class class_tag) {
  620|   203k|   BER_Object obj = get_next_object();
  621|   203k|   obj.assert_is_a(type_tag, class_tag | ASN1_Class::Constructed);
  622|       |
  623|       |   // In DER mode the elements of a universal SET must appear in sorted order
  624|   203k|   if(m_limits.require_der_encoding() && type_tag == ASN1_Type::Set && class_tag == ASN1_Class::Universal) {
  ------------------
  |  Branch (624:7): [True: 203k, False: 402]
  |  Branch (624:42): [True: 39.3k, False: 163k]
  |  Branch (624:72): [True: 39.3k, False: 0]
  ------------------
  625|  39.3k|      verify_set_is_sorted(std::span<const uint8_t>{obj.bits(), obj.length()});
  626|  39.3k|   }
  627|       |
  628|   203k|   BER_Decoder child(std::move(obj), this);
  629|   203k|   return child;
  630|   203k|}
_ZN5Botan11BER_Decoder8end_consEv:
  635|   150k|BER_Decoder& BER_Decoder::end_cons() {
  636|   150k|   if(m_parent == nullptr) {
  ------------------
  |  Branch (636:7): [True: 0, False: 150k]
  ------------------
  637|      0|      throw Invalid_State("BER_Decoder::end_cons called with null parent");
  638|      0|   }
  639|   150k|   if(!m_source->end_of_data() || m_pushed.is_set()) {
  ------------------
  |  Branch (639:7): [True: 19, False: 150k]
  |  Branch (639:35): [True: 0, False: 150k]
  ------------------
  640|     19|      throw Decoding_Error("BER_Decoder::end_cons called with data left");
  641|     19|   }
  642|   150k|   return (*m_parent);
  643|   150k|}
_ZN5Botan11BER_DecoderC2EONS_10BER_ObjectEPS0_:
  646|   203k|      m_limits(parent != nullptr ? parent->limits() : BER_Decoder::Limits::BER()), m_parent(parent) {
  ------------------
  |  Branch (646:16): [True: 203k, False: 0]
  ------------------
  647|   203k|   m_data_src = std::make_unique<DataSource_BERObject>(std::move(obj));
  648|   203k|   m_source = m_data_src.get();
  649|   203k|}
_ZN5Botan11BER_DecoderC2ERNS_10DataSourceENS0_6LimitsE:
  659|  6.89k|BER_Decoder::BER_Decoder(DataSource& src, Limits limits) : m_limits(limits), m_source(&src) {}
_ZN5Botan11BER_DecoderC2ENSt3__14spanIKhLm18446744073709551615EEENS0_6LimitsE:
  664|  91.9k|BER_Decoder::BER_Decoder(std::span<const uint8_t> buf, Limits limits) : m_limits(limits) {
  665|  91.9k|   m_data_src = std::make_unique<DataSource_Memory>(buf);
  666|  91.9k|   m_source = m_data_src.get();
  667|  91.9k|}
_ZN5Botan11BER_Decoder6decodeERNS_11ASN1_ObjectENS_9ASN1_TypeENS_10ASN1_ClassE:
  676|   203k|BER_Decoder& BER_Decoder::decode(ASN1_Object& obj, ASN1_Type type_tag, ASN1_Class class_tag) {
  677|       |   // TODO support this case properly
  678|   203k|   if(type_tag != ASN1_Type::NoObject || class_tag != ASN1_Class::NoObject) {
  ------------------
  |  Branch (678:7): [True: 0, False: 203k]
  |  Branch (678:42): [True: 0, False: 203k]
  ------------------
  679|      0|      throw Not_Implemented("BER_Decoder::decode(ASN1_Object) does not support implicit tagged decoding");
  680|      0|   }
  681|   203k|   obj.decode_from(*this);
  682|   203k|   return (*this);
  683|   203k|}
_ZN5Botan11BER_Decoder6decodeERbNS_9ASN1_TypeENS_10ASN1_ClassE:
  707|  6.48k|BER_Decoder& BER_Decoder::decode(bool& out, ASN1_Type type_tag, ASN1_Class class_tag) {
  708|  6.48k|   const BER_Object obj = get_next_object();
  709|  6.48k|   obj.assert_is_a(type_tag, class_tag);
  710|       |
  711|  6.48k|   if(obj.length() != 1) {
  ------------------
  |  Branch (711:7): [True: 0, False: 6.48k]
  ------------------
  712|      0|      throw BER_Decoding_Error("BER boolean value had invalid size");
  713|      0|   }
  714|       |
  715|  6.48k|   const uint8_t val = obj.bits()[0];
  716|       |
  717|       |   // DER requires boolean values to be exactly 0x00 or 0xFF
  718|  6.48k|   if(m_limits.require_der_encoding() && val != 0x00 && val != 0xFF) {
  ------------------
  |  Branch (718:7): [True: 6.48k, False: 0]
  |  Branch (718:42): [True: 6.48k, False: 0]
  |  Branch (718:57): [True: 0, False: 6.48k]
  ------------------
  719|      0|      throw BER_Decoding_Error("Detected non-canonical boolean encoding in DER structure");
  720|      0|   }
  721|       |
  722|  6.48k|   out = (val != 0) ? true : false;
  ------------------
  |  Branch (722:10): [True: 6.48k, False: 0]
  ------------------
  723|       |
  724|  6.48k|   return (*this);
  725|  6.48k|}
_ZN5Botan11BER_Decoder6decodeERmNS_9ASN1_TypeENS_10ASN1_ClassE:
  730|  19.4k|BER_Decoder& BER_Decoder::decode(size_t& out, ASN1_Type type_tag, ASN1_Class class_tag) {
  731|  19.4k|   BigInt integer;
  732|  19.4k|   decode(integer, type_tag, class_tag);
  733|       |
  734|  19.4k|   if(integer.signum() < 0) {
  ------------------
  |  Branch (734:7): [True: 0, False: 19.4k]
  ------------------
  735|      0|      throw BER_Decoding_Error("Decoded small integer value was negative");
  736|      0|   }
  737|       |
  738|  19.4k|   if(integer.bits() > 32) {
  ------------------
  |  Branch (738:7): [True: 0, False: 19.4k]
  ------------------
  739|      0|      throw BER_Decoding_Error("Decoded integer value larger than expected");
  740|      0|   }
  741|       |
  742|  19.4k|   out = 0;
  743|  97.2k|   for(size_t i = 0; i != 4; ++i) {
  ------------------
  |  Branch (743:22): [True: 77.8k, False: 19.4k]
  ------------------
  744|  77.8k|      out = (out << 8) | integer.byte_at(3 - i);
  745|  77.8k|   }
  746|       |
  747|  19.4k|   return (*this);
  748|  19.4k|}
_ZN5Botan11BER_Decoder6decodeERNS_6BigIntENS_9ASN1_TypeENS_10ASN1_ClassE:
  780|  26.0k|BER_Decoder& BER_Decoder::decode(BigInt& out, ASN1_Type type_tag, ASN1_Class class_tag) {
  781|  26.0k|   const BER_Object obj = get_next_object();
  782|  26.0k|   obj.assert_is_a(type_tag, class_tag);
  783|       |
  784|       |   // An INTEGER must have at least one content octet (X.690 section 8.3.1)
  785|  26.0k|   if(obj.length() == 0) {
  ------------------
  |  Branch (785:7): [True: 1, False: 26.0k]
  ------------------
  786|      1|      throw BER_Decoding_Error("INTEGER encoding has no content octets");
  787|      1|   }
  788|       |
  789|       |   // DER requires minimal INTEGER encoding (X.690 section 8.3.2)
  790|  26.0k|   if(m_limits.require_der_encoding()) {
  ------------------
  |  Branch (790:7): [True: 25.9k, False: 35]
  ------------------
  791|  25.9k|      if(obj.length() > 1) {
  ------------------
  |  Branch (791:10): [True: 6.53k, False: 19.4k]
  ------------------
  792|  6.53k|         if(obj.bits()[0] == 0x00 && (obj.bits()[1] & 0x80) == 0) {
  ------------------
  |  Branch (792:13): [True: 6.49k, False: 40]
  |  Branch (792:38): [True: 4, False: 6.49k]
  ------------------
  793|      4|            throw BER_Decoding_Error("Detected non-minimal INTEGER encoding in DER structure");
  794|      4|         }
  795|  6.53k|         if(obj.bits()[0] == 0xFF && (obj.bits()[1] & 0x80) != 0) {
  ------------------
  |  Branch (795:13): [True: 8, False: 6.52k]
  |  Branch (795:38): [True: 1, False: 7]
  ------------------
  796|      1|            throw BER_Decoding_Error("Detected non-minimal INTEGER encoding in DER structure");
  797|      1|         }
  798|  6.53k|      }
  799|  25.9k|   }
  800|       |
  801|  26.0k|   out = ASN1::integer_from_contents(obj.data());
  802|       |
  803|  26.0k|   return (*this);
  804|  26.0k|}
_ZN5Botan4ASN121integer_from_contentsENSt3__14spanIKhLm18446744073709551615EEE:
  806|  25.9k|BigInt ASN1::integer_from_contents(std::span<const uint8_t> contents) {
  807|  25.9k|   if(contents.empty()) {
  ------------------
  |  Branch (807:7): [True: 0, False: 25.9k]
  ------------------
  808|      0|      throw BER_Decoding_Error("INTEGER encoding has no content octets");
  809|      0|   }
  810|       |
  811|  25.9k|   BigInt out;
  812|       |
  813|  25.9k|   const bool negative = (contents[0] & 0x80) == 0x80;
  814|       |
  815|  25.9k|   if(negative) {
  ------------------
  |  Branch (815:7): [True: 19, False: 25.9k]
  ------------------
  816|     19|      secure_vector<uint8_t> vec(contents.begin(), contents.end());
  817|     39|      for(size_t i = vec.size(); i > 0; --i) {
  ------------------
  |  Branch (817:34): [True: 39, False: 0]
  ------------------
  818|     39|         const bool gt0 = (vec[i - 1] > 0);
  819|     39|         vec[i - 1] -= 1;
  820|     39|         if(gt0) {
  ------------------
  |  Branch (820:13): [True: 19, False: 20]
  ------------------
  821|     19|            break;
  822|     19|         }
  823|     39|      }
  824|     82|      for(auto& byte : vec) {
  ------------------
  |  Branch (824:22): [True: 82, False: 19]
  ------------------
  825|     82|         byte = ~byte;
  826|     82|      }
  827|     19|      out._assign_from_bytes(vec);
  828|     19|      out.set_sign(BigInt::Negative);
  829|  25.9k|   } else {
  830|  25.9k|      out._assign_from_bytes(contents);
  831|  25.9k|   }
  832|       |
  833|  25.9k|   return out;
  834|  25.9k|}
_ZN5Botan11BER_Decoder6decodeERNSt3__16vectorIhNS_16secure_allocatorIhEEEENS_9ASN1_TypeES7_NS_10ASN1_ClassE:
 1026|  12.9k|                                 ASN1_Class class_tag) {
 1027|  12.9k|   if(real_type != ASN1_Type::OctetString && real_type != ASN1_Type::BitString) {
  ------------------
  |  Branch (1027:7): [True: 0, False: 12.9k]
  |  Branch (1027:46): [True: 0, False: 0]
  ------------------
 1028|      0|      throw BER_Bad_Tag("Bad tag for {BIT,OCTET} STRING", static_cast<uint32_t>(real_type));
 1029|      0|   }
 1030|       |
 1031|  12.9k|   asn1_decode_binary_string(buffer, get_next_object(), real_type, type_tag, class_tag, m_limits);
 1032|  12.9k|   return (*this);
 1033|  12.9k|}
_ZN5Botan11BER_Decoder6decodeERNSt3__16vectorIhNS1_9allocatorIhEEEENS_9ASN1_TypeES7_NS_10ASN1_ClassE:
 1038|  38.9k|                                 ASN1_Class class_tag) {
 1039|  38.9k|   if(real_type != ASN1_Type::OctetString && real_type != ASN1_Type::BitString) {
  ------------------
  |  Branch (1039:7): [True: 0, False: 38.9k]
  |  Branch (1039:46): [True: 0, False: 0]
  ------------------
 1040|      0|      throw BER_Bad_Tag("Bad tag for {BIT,OCTET} STRING", static_cast<uint32_t>(real_type));
 1041|      0|   }
 1042|       |
 1043|  38.9k|   asn1_decode_binary_string(buffer, get_next_object(), real_type, type_tag, class_tag, m_limits);
 1044|  38.9k|   return (*this);
 1045|  38.9k|}
_ZN5Botan11BER_Decoder16decode_bitstringERNS_14ASN1_BitStringENS_9ASN1_TypeENS_10ASN1_ClassE:
 1047|  19.5k|BER_Decoder& BER_Decoder::decode_bitstring(ASN1_BitString& out, ASN1_Type type_tag, ASN1_Class class_tag) {
 1048|  19.5k|   const BER_Object obj = get_next_object();
 1049|       |
 1050|  19.5k|   std::vector<uint8_t> bits;
 1051|  19.5k|   uint8_t unused_bits = 0;
 1052|       |
 1053|  19.5k|   if(is_constructed(obj.class_tag())) {
  ------------------
  |  Branch (1053:7): [True: 2, False: 19.5k]
  ------------------
 1054|      2|      obj.assert_is_a(type_tag, class_tag | ASN1_Class::Constructed);
 1055|      2|      if(m_limits.require_der_encoding()) {
  ------------------
  |  Branch (1055:10): [True: 1, False: 1]
  ------------------
 1056|      1|         throw BER_Decoding_Error("Detected constructed string encoding in DER structure");
 1057|      1|      }
 1058|      1|      bits.reserve(obj.length());  // upper possible bound on the output size
 1059|      1|      unused_bits = asn1_concat_constructed_bit_string(bits, obj, m_limits, 0);
 1060|  19.5k|   } else {
 1061|  19.5k|      unused_bits = asn1_bitstring_unused_bits(obj, type_tag, class_tag, m_limits.require_der_encoding());
 1062|  19.5k|      bits.assign(obj.bits() + 1, obj.bits() + obj.length());
 1063|  19.5k|   }
 1064|       |
 1065|  19.5k|   if(unused_bits > 0 && !bits.empty()) {
  ------------------
  |  Branch (1065:7): [True: 3, False: 19.5k]
  |  Branch (1065:26): [True: 3, False: 0]
  ------------------
 1066|      3|      bits.back() &= static_cast<uint8_t>(0xFF << unused_bits);
 1067|      3|   }
 1068|       |
 1069|  19.5k|   out = ASN1_BitString(std::move(bits), unused_bits);
 1070|  19.5k|   return (*this);
 1071|  19.5k|}
_ZN5Botan4ASN120is_single_der_objectENSt3__14spanIKhLm18446744073709551615EEENS_9ASN1_TypeENS_10ASN1_ClassE:
 1105|  26.1k|bool is_single_der_object(std::span<const uint8_t> bytes, ASN1_Type expected_type, ASN1_Class expected_class) {
 1106|  26.1k|   if(bytes.empty()) {
  ------------------
  |  Branch (1106:7): [True: 0, False: 26.1k]
  ------------------
 1107|      0|      return false;
 1108|      0|   }
 1109|       |
 1110|  26.1k|   try {
 1111|  26.1k|      DataSource_Span src(bytes);
 1112|       |
 1113|  26.1k|      ASN1_Type type_tag = ASN1_Type::NoObject;
 1114|  26.1k|      ASN1_Class class_tag = ASN1_Class::NoObject;
 1115|  26.1k|      const size_t tag_bytes = decode_tag(&src, type_tag, class_tag);
 1116|       |
 1117|  26.1k|      if(type_tag != expected_type || class_tag != expected_class) {
  ------------------
  |  Branch (1117:10): [True: 13.1k, False: 12.9k]
  |  Branch (1117:39): [True: 4, False: 12.9k]
  ------------------
 1118|  13.1k|         return false;
 1119|  13.1k|      }
 1120|       |
 1121|  13.0k|      const auto dl = decode_length(&src, /*allow_indef=*/0, /*der_mode=*/true, is_constructed(expected_class));
 1122|       |
 1123|  13.0k|      const size_t header_bytes = tag_bytes + dl.field_length();
 1124|  13.0k|      if(header_bytes > bytes.size()) {
  ------------------
  |  Branch (1124:10): [True: 0, False: 13.0k]
  ------------------
 1125|      0|         return false;
 1126|      0|      }
 1127|  13.0k|      return dl.content_length() == bytes.size() - header_bytes;
 1128|  13.0k|   } catch(Decoding_Error&) {
 1129|     19|      return false;
 1130|     19|   }
 1131|  26.1k|}
_ZN5Botan4ASN122is_der_sequence_headerENSt3__14spanIKhLm18446744073709551615EEE:
 1133|  13.0k|bool is_der_sequence_header(std::span<const uint8_t> bytes) {
 1134|  13.0k|   return is_single_der_object(bytes, ASN1_Type::Sequence, ASN1_Class::Universal | ASN1_Class::Constructed);
 1135|  13.0k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_110decode_tagEPNS_10DataSourceERNS_9ASN1_TypeERNS_10ASN1_ClassE:
   29|   542k|size_t decode_tag(DataSource* ber, ASN1_Type& type_tag, ASN1_Class& class_tag) {
   30|   542k|   auto b = ber->read_byte();
   31|       |
   32|   542k|   if(!b) {
  ------------------
  |  Branch (32:7): [True: 25.9k, False: 516k]
  ------------------
   33|  25.9k|      type_tag = ASN1_Type::NoObject;
   34|  25.9k|      class_tag = ASN1_Class::NoObject;
   35|  25.9k|      return 0;
   36|  25.9k|   }
   37|       |
   38|   516k|   if((*b & 0x1F) != 0x1F) {
  ------------------
  |  Branch (38:7): [True: 516k, False: 364]
  ------------------
   39|   516k|      type_tag = ASN1_Type(*b & 0x1F);
   40|   516k|      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|   516k|      if(type_tag == ASN1_Type::Eoc && class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (44:10): [True: 13.0k, False: 503k]
  |  Branch (44:40): [True: 4, False: 13.0k]
  ------------------
   45|      4|         throw BER_Decoding_Error("EOC tag with constructed encoding");
   46|      4|      }
   47|   516k|      return 1;
   48|   516k|   }
   49|       |
   50|    364|   size_t tag_bytes = 1;
   51|    364|   class_tag = ASN1_Class(*b & 0xE0);
   52|       |
   53|    364|   uint32_t tag_buf = 0;
   54|  1.31k|   while(true) {
  ------------------
  |  Branch (54:10): [True: 1.31k, Folded]
  ------------------
   55|  1.31k|      b = ber->read_byte();
   56|  1.31k|      if(!b) {
  ------------------
  |  Branch (56:10): [True: 16, False: 1.29k]
  ------------------
   57|     16|         throw BER_Decoding_Error("Long-form tag truncated");
   58|     16|      }
   59|       |      // Reject if shifting in another 7 bits would overflow the uint32_t tag
   60|  1.29k|      if((tag_buf >> 25) != 0) {
  ------------------
  |  Branch (60:10): [True: 11, False: 1.28k]
  ------------------
   61|     11|         throw BER_Decoding_Error("Long-form tag overflowed 32 bits");
   62|     11|      }
   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.28k|      if(tag_bytes == 1 && (*b & 0x7F) == 0) {
  ------------------
  |  Branch (67:10): [True: 351, False: 937]
  |  Branch (67:28): [True: 7, False: 344]
  ------------------
   68|      7|         throw BER_Decoding_Error("Long form tag with leading zero");
   69|      7|      }
   70|  1.28k|      ++tag_bytes;
   71|  1.28k|      tag_buf = (tag_buf << 7) | (*b & 0x7F);
   72|  1.28k|      if((*b & 0x80) == 0) {
  ------------------
  |  Branch (72:10): [True: 330, False: 951]
  ------------------
   73|    330|         break;
   74|    330|      }
   75|  1.28k|   }
   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|    330|   if(tag_buf <= 30) {
  ------------------
  |  Branch (79:7): [True: 6, False: 324]
  ------------------
   80|      6|      throw BER_Decoding_Error("Long-form tag encoding used for small tag value");
   81|      6|   }
   82|       |
   83|    324|   if(tag_buf == static_cast<uint32_t>(ASN1_Type::NoObject)) {
  ------------------
  |  Branch (83:7): [True: 4, False: 320]
  ------------------
   84|      4|      throw BER_Decoding_Error("Tag value collides with internal sentinel");
   85|      4|   }
   86|       |
   87|       |   // NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange)
   88|    320|   type_tag = ASN1_Type(tag_buf);
   89|    320|   return tag_bytes;
   90|    324|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_113decode_lengthEPNS_10DataSourceEmbb:
  135|   503k|BerDecodedLength decode_length(DataSource* ber, size_t allow_indef, bool der_mode, bool constructed) {
  136|   503k|   uint8_t b = 0;
  137|   503k|   if(ber->read_byte(b) == 0) {
  ------------------
  |  Branch (137:7): [True: 39, False: 503k]
  ------------------
  138|     39|      throw BER_Decoding_Error("Length field not found");
  139|     39|   }
  140|   503k|   if((b & 0x80) == 0) {
  ------------------
  |  Branch (140:7): [True: 483k, False: 19.6k]
  ------------------
  141|   483k|      return BerDecodedLength(b, 1);
  142|   483k|   }
  143|       |
  144|  19.6k|   const size_t num_length_bytes = (b & 0x7F);
  145|  19.6k|   if(num_length_bytes > 4) {
  ------------------
  |  Branch (145:7): [True: 11, False: 19.6k]
  ------------------
  146|     11|      throw BER_Decoding_Error("Length field is too large");
  147|     11|   }
  148|       |
  149|  19.6k|   const size_t field_size = 1 + num_length_bytes;
  150|       |
  151|  19.6k|   if(num_length_bytes == 0) {
  ------------------
  |  Branch (151:7): [True: 3, False: 19.6k]
  ------------------
  152|      3|      if(der_mode) {
  ------------------
  |  Branch (152:10): [True: 3, False: 0]
  ------------------
  153|      3|         throw BER_Decoding_Error("Detected indefinite-length encoding in DER structure");
  154|      3|      } 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|      3|   }
  169|       |
  170|  19.6k|   size_t length = 0;
  171|       |
  172|  52.4k|   for(size_t i = 0; i != num_length_bytes; ++i) {
  ------------------
  |  Branch (172:22): [True: 32.8k, False: 19.6k]
  ------------------
  173|  32.8k|      if(ber->read_byte(b) == 0) {
  ------------------
  |  Branch (173:10): [True: 2, False: 32.8k]
  ------------------
  174|      2|         throw BER_Decoding_Error("Corrupted length field");
  175|      2|      }
  176|       |      // Can't overflow since we already checked that num_length_bytes <= 4
  177|  32.8k|      length = (length << 8) | b;
  178|  32.8k|   }
  179|       |
  180|       |   // DER requires shortest possible length encoding
  181|  19.6k|   if(der_mode) {
  ------------------
  |  Branch (181:7): [True: 19.6k, False: 0]
  ------------------
  182|  19.6k|      if(length < 128) {
  ------------------
  |  Branch (182:10): [True: 6, False: 19.6k]
  ------------------
  183|      6|         throw BER_Decoding_Error("Detected non-canonical length encoding in DER structure");
  184|      6|      }
  185|  19.6k|      if(num_length_bytes > 1 && length < (size_t(1) << ((num_length_bytes - 1) * 8))) {
  ------------------
  |  Branch (185:10): [True: 13.0k, False: 6.50k]
  |  Branch (185:34): [True: 1, False: 13.0k]
  ------------------
  186|      1|         throw BER_Decoding_Error("Detected non-canonical length encoding in DER structure");
  187|      1|      }
  188|  19.6k|   }
  189|       |
  190|  19.5k|   return BerDecodedLength(length, field_size);
  191|  19.6k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_116BerDecodedLengthC2Emm:
  108|   503k|            BerDecodedLength(content_length, field_length, false) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_116BerDecodedLengthC2Emmb:
  125|   503k|            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|  40.0k|size_t peek_tag(DataSource* src, size_t offset, ASN1_Type& type_tag, ASN1_Class& class_tag) {
  198|  40.0k|   uint8_t b = 0;
  199|  40.0k|   if(src->peek(&b, 1, offset) == 0) {
  ------------------
  |  Branch (199:7): [True: 0, False: 40.0k]
  ------------------
  200|      0|      type_tag = ASN1_Type::NoObject;
  201|      0|      class_tag = ASN1_Class::NoObject;
  202|      0|      return 0;
  203|      0|   }
  204|       |
  205|  40.0k|   if((b & 0x1F) != 0x1F) {
  ------------------
  |  Branch (205:7): [True: 39.9k, False: 90]
  ------------------
  206|  39.9k|      type_tag = ASN1_Type(b & 0x1F);
  207|  39.9k|      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|  39.9k|      if(type_tag == ASN1_Type::Eoc && class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (211:10): [True: 173, False: 39.7k]
  |  Branch (211:40): [True: 1, False: 172]
  ------------------
  212|      1|         throw BER_Decoding_Error("EOC tag with constructed encoding");
  213|      1|      }
  214|  39.9k|      return 1;
  215|  39.9k|   }
  216|       |
  217|     90|   class_tag = ASN1_Class(b & 0xE0);
  218|     90|   size_t tag_bytes = 1;
  219|     90|   uint32_t tag_buf = 0;
  220|       |
  221|    316|   while(true) {
  ------------------
  |  Branch (221:10): [True: 316, Folded]
  ------------------
  222|    316|      if(src->peek(&b, 1, offset + tag_bytes) == 0) {
  ------------------
  |  Branch (222:10): [True: 1, False: 315]
  ------------------
  223|      1|         throw BER_Decoding_Error("Long-form tag truncated");
  224|      1|      }
  225|       |      // Reject if shifting in another 7 bits would overflow the uint32_t tag
  226|    315|      if((tag_buf >> 25) != 0) {
  ------------------
  |  Branch (226:10): [True: 10, False: 305]
  ------------------
  227|     10|         throw BER_Decoding_Error("Long-form tag overflowed 32 bits");
  228|     10|      }
  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|    305|      if(tag_bytes == 1 && (b & 0x7F) == 0) {
  ------------------
  |  Branch (233:10): [True: 90, False: 215]
  |  Branch (233:28): [True: 3, False: 87]
  ------------------
  234|      3|         throw BER_Decoding_Error("Long form tag with leading zero");
  235|      3|      }
  236|    302|      ++tag_bytes;
  237|    302|      tag_buf = (tag_buf << 7) | (b & 0x7F);
  238|    302|      if((b & 0x80) == 0) {
  ------------------
  |  Branch (238:10): [True: 76, False: 226]
  ------------------
  239|     76|         break;
  240|     76|      }
  241|    302|   }
  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|     76|   if(tag_buf <= 30) {
  ------------------
  |  Branch (246:7): [True: 2, False: 74]
  ------------------
  247|      2|      throw BER_Decoding_Error("Long-form tag encoding used for small tag value");
  248|      2|   }
  249|       |
  250|     74|   if(tag_buf == static_cast<uint32_t>(ASN1_Type::NoObject)) {
  ------------------
  |  Branch (250:7): [True: 1, False: 73]
  ------------------
  251|      1|      throw BER_Decoding_Error("Tag value collides with internal sentinel");
  252|      1|   }
  253|       |
  254|       |   // NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange)
  255|     73|   type_tag = ASN1_Type(tag_buf);
  256|     73|   return tag_bytes;
  257|     74|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_111peek_lengthEPNS_10DataSourceEmRmmbb:
  265|  39.9k|   DataSource* src, size_t offset, size_t& field_size, size_t allow_indef, bool constructed, bool der_mode) {
  266|  39.9k|   uint8_t b = 0;
  267|  39.9k|   if(src->peek(&b, 1, offset) == 0) {
  ------------------
  |  Branch (267:7): [True: 1, False: 39.9k]
  ------------------
  268|      1|      throw BER_Decoding_Error("Length field not found");
  269|      1|   }
  270|       |
  271|  39.9k|   field_size = 1;
  272|  39.9k|   if((b & 0x80) == 0) {
  ------------------
  |  Branch (272:7): [True: 39.9k, False: 83]
  ------------------
  273|  39.9k|      return b;
  274|  39.9k|   }
  275|       |
  276|     83|   const size_t num_length_bytes = (b & 0x7F);
  277|     83|   field_size += num_length_bytes;
  278|     83|   if(field_size > 5) {
  ------------------
  |  Branch (278:7): [True: 20, False: 63]
  ------------------
  279|     20|      throw BER_Decoding_Error("Length field is too large");
  280|     20|   }
  281|       |
  282|     63|   if(num_length_bytes == 0) {
  ------------------
  |  Branch (282:7): [True: 2, False: 61]
  ------------------
  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|     61|   size_t length = 0;
  298|    247|   for(size_t i = 0; i < num_length_bytes; ++i) {
  ------------------
  |  Branch (298:22): [True: 188, False: 59]
  ------------------
  299|    188|      if(src->peek(&b, 1, offset + 1 + i) == 0) {
  ------------------
  |  Branch (299:10): [True: 2, False: 186]
  ------------------
  300|      2|         throw BER_Decoding_Error("Corrupted length field");
  301|      2|      }
  302|    186|      if(get_byte<0>(length) != 0) {
  ------------------
  |  Branch (302:10): [True: 0, False: 186]
  ------------------
  303|      0|         throw BER_Decoding_Error("Field length overflow");
  304|      0|      }
  305|    186|      length = (length << 8) | b;
  306|    186|   }
  307|     59|   return length;
  308|     61|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_114is_constructedENS_10ASN1_ClassE:
   22|   634k|bool is_constructed(ASN1_Class class_tag) {
   23|   634k|   return (static_cast<uint32_t>(class_tag) & static_cast<uint32_t>(ASN1_Class::Constructed)) != 0;
   24|   634k|}
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength14content_lengthEv:
  114|  1.97M|      size_t content_length() const { return m_content_length; }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength17indefinite_lengthEv:
  121|   490k|      bool indefinite_length() const { return m_indefinite; }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength12total_lengthEv:
  117|   490k|      size_t total_length() const { return m_indefinite ? m_content_length + 2 : m_content_length; }
  ------------------
  |  Branch (117:44): [True: 0, False: 490k]
  ------------------
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120verify_set_is_sortedENSt3__14spanIKhLm18446744073709551615EEE:
  426|  39.3k|void verify_set_is_sorted(std::span<const uint8_t> content) {
  427|  39.3k|   DataSource_Span src(content);
  428|  39.3k|   size_t offset = 0;
  429|  39.3k|   std::optional<std::span<const uint8_t>> prev;
  430|       |
  431|  79.2k|   while(offset < content.size()) {
  ------------------
  |  Branch (431:10): [True: 40.0k, False: 39.2k]
  ------------------
  432|  40.0k|      ASN1_Type type_tag = ASN1_Type::NoObject;
  433|  40.0k|      ASN1_Class class_tag = ASN1_Class::NoObject;
  434|  40.0k|      const size_t tag_size = peek_tag(&src, offset, type_tag, class_tag);
  435|       |
  436|  40.0k|      size_t length_size = 0;
  437|  40.0k|      const size_t item_size =
  438|  40.0k|         peek_length(&src, offset + tag_size, length_size, /*allow_indef=*/0, is_constructed(class_tag), true);
  439|       |
  440|  40.0k|      const auto end = checked_add(offset, tag_size, length_size, item_size);
  441|  40.0k|      if(!end || *end > content.size()) {
  ------------------
  |  Branch (441:10): [True: 43, False: 39.9k]
  |  Branch (441:18): [True: 71, False: 39.8k]
  ------------------
  442|     71|         throw BER_Decoding_Error("SET element exceeds available data");
  443|     71|      }
  444|       |
  445|  39.9k|      const auto elem = content.subspan(offset, *end - offset);
  446|  39.9k|      if(prev && std::lexicographical_compare(elem.begin(), elem.end(), prev->begin(), prev->end())) {
  ------------------
  |  Branch (446:10): [True: 557, False: 39.3k]
  |  Branch (446:18): [True: 50, False: 507]
  ------------------
  447|     50|         throw BER_Decoding_Error("Detected unsorted SET in DER structure");
  448|     50|      }
  449|  39.8k|      prev = elem;
  450|  39.8k|      offset = *end;
  451|  39.8k|   }
  452|  39.3k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_126asn1_bitstring_unused_bitsERKNS_10BER_ObjectENS_9ASN1_TypeENS_10ASN1_ClassEb:
  990|  19.5k|uint8_t asn1_bitstring_unused_bits(const BER_Object& obj, ASN1_Type type_tag, ASN1_Class class_tag, bool require_der) {
  991|  19.5k|   obj.assert_is_a(type_tag, class_tag);
  992|  19.5k|   BOTAN_ASSERT_NOMSG(!is_constructed(obj));
  ------------------
  |  |   84|  19.5k|   do {                                                                     \
  |  |   85|  19.5k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  19.5k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 19.5k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  19.5k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 19.5k]
  |  |  ------------------
  ------------------
  993|       |
  994|  19.5k|   if(obj.length() == 0) {
  ------------------
  |  Branch (994:7): [True: 1, False: 19.5k]
  ------------------
  995|      1|      throw BER_Decoding_Error("Invalid BIT STRING");
  996|      1|   }
  997|       |
  998|  19.5k|   const uint8_t unused_bits = obj.bits()[0];
  999|       |
 1000|  19.5k|   if(unused_bits >= 8) {
  ------------------
  |  Branch (1000:7): [True: 3, False: 19.5k]
  ------------------
 1001|      3|      throw BER_Decoding_Error("Invalid number of unused bits in BIT STRING");
 1002|      3|   }
 1003|       |
 1004|  19.5k|   if(obj.length() == 1 && unused_bits != 0) {
  ------------------
  |  Branch (1004:7): [True: 3, False: 19.5k]
  |  Branch (1004:28): [True: 1, False: 2]
  ------------------
 1005|      1|      throw BER_Decoding_Error("Invalid BIT STRING");
 1006|      1|   }
 1007|       |
 1008|  19.5k|   if(require_der && unused_bits > 0) {
  ------------------
  |  Branch (1008:7): [True: 19.5k, False: 2]
  |  Branch (1008:22): [True: 4, False: 19.5k]
  ------------------
 1009|      4|      const uint8_t last_byte = obj.bits()[obj.length() - 1];
 1010|      4|      if((last_byte & ((1 << unused_bits) - 1)) != 0) {
  ------------------
  |  Branch (1010:10): [True: 1, False: 3]
  ------------------
 1011|      1|         throw BER_Decoding_Error("Detected non-zero padding bits in BIT STRING in DER structure");
 1012|      1|      }
 1013|      4|   }
 1014|       |
 1015|  19.5k|   return unused_bits;
 1016|  19.5k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_114is_constructedERKNS_10BER_ObjectE:
  838|  71.4k|bool is_constructed(const BER_Object& obj) {
  839|  71.4k|   return is_constructed(obj.class_tag());
  840|  71.4k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_115DataSource_SpanC2ENSt3__14spanIKhLm18446744073709551615EEE:
  414|  65.5k|      explicit DataSource_Span(std::span<const uint8_t> buf) : m_buf(buf) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_115DataSource_Span4readEPhm:
  392|  39.5k|      size_t read(uint8_t out[], size_t length) override {
  393|  39.5k|         const size_t got = std::min(m_buf.size() - m_offset, length);
  394|  39.5k|         copy_mem(out, m_buf.data() + m_offset, got);
  395|  39.5k|         m_offset += got;
  396|  39.5k|         return got;
  397|  39.5k|      }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_115DataSource_Span4peekEPhmm:
  399|  80.5k|      size_t peek(uint8_t out[], size_t length, size_t peek_offset) const override {
  400|  80.5k|         if(peek_offset >= m_buf.size() - m_offset) {
  ------------------
  |  Branch (400:13): [True: 4, False: 80.4k]
  ------------------
  401|      4|            return 0;
  402|      4|         }
  403|  80.4k|         const size_t got = std::min(m_buf.size() - m_offset - peek_offset, length);
  404|  80.4k|         copy_mem(out, m_buf.data() + m_offset + peek_offset, got);
  405|  80.4k|         return got;
  406|  80.5k|      }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength12field_lengthEv:
  119|  12.9k|      size_t field_length() const { return m_field_length; }
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObjectC2EONS_10BER_ObjectE:
  379|   203k|      explicit DataSource_BERObject(BER_Object&& obj) : m_obj(std::move(obj)) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObject4readEPhm:
  349|  1.10M|      size_t read(uint8_t out[], size_t length) override {
  350|  1.10M|         BOTAN_ASSERT_NOMSG(m_offset <= m_obj.length());
  ------------------
  |  |   84|  1.10M|   do {                                                                     \
  |  |   85|  1.10M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  1.10M|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 1.10M]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  1.10M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 1.10M]
  |  |  ------------------
  ------------------
  351|  1.10M|         const size_t got = std::min<size_t>(m_obj.length() - m_offset, length);
  352|  1.10M|         copy_mem(out, m_obj.bits() + m_offset, got);
  353|  1.10M|         m_offset += got;
  354|  1.10M|         return got;
  355|  1.10M|      }
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObject15check_availableEm:
  370|   313k|      bool check_available(size_t n) override {
  371|   313k|         BOTAN_ASSERT_NOMSG(m_offset <= m_obj.length());
  ------------------
  |  |   84|   313k|   do {                                                                     \
  |  |   85|   313k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|   313k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 313k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|   313k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 313k]
  |  |  ------------------
  ------------------
  372|   313k|         return (n <= (m_obj.length() - m_offset));
  373|   313k|      }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_120DataSource_BERObject11end_of_dataEv:
  375|   280k|      bool end_of_data() const override { return get_bytes_read() == m_obj.length(); }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_120DataSource_BERObject14get_bytes_readEv:
  377|   280k|      size_t get_bytes_read() const override { return m_offset; }
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_125asn1_decode_binary_stringINS_16secure_allocatorIhEEEEvRNSt3__16vectorIhT_EERKNS_10BER_ObjectENS_9ASN1_TypeESC_NS_10ASN1_ClassERKNS_11BER_Decoder6LimitsE:
  932|  12.9k|                               const BER_Decoder::Limits& limits) {
  933|       |   // DER requires BIT STRING and OCTET STRING to use primitive encoding;
  934|       |   // in BER the constructed (fragmented) form is decoded by concatenation
  935|  12.9k|   if(is_constructed(obj)) {
  ------------------
  |  Branch (935:7): [True: 0, False: 12.9k]
  ------------------
  936|      0|      obj.assert_is_a(type_tag, class_tag | ASN1_Class::Constructed);
  937|       |
  938|      0|      if(limits.require_der_encoding()) {
  ------------------
  |  Branch (938:10): [True: 0, False: 0]
  ------------------
  939|      0|         throw BER_Decoding_Error("Detected constructed string encoding in DER structure");
  940|      0|      }
  941|       |
  942|       |      // Concatenate into a temporary so a failed decode leaves buffer unmodified
  943|      0|      std::vector<uint8_t, Alloc> concat;
  944|      0|      concat.reserve(obj.length());  // upper possible bound on the output size
  945|      0|      if(real_type == ASN1_Type::OctetString) {
  ------------------
  |  Branch (945:10): [True: 0, False: 0]
  ------------------
  946|      0|         asn1_concat_constructed_octet_string(concat, obj, limits, 0);
  947|      0|      } else {
  948|      0|         asn1_concat_constructed_bit_string(concat, obj, limits, 0);
  949|      0|      }
  950|      0|      buffer = std::move(concat);
  951|      0|      return;
  952|      0|   }
  953|       |
  954|  12.9k|   obj.assert_is_a(type_tag, class_tag);
  955|       |
  956|  12.9k|   if(real_type == ASN1_Type::OctetString) {
  ------------------
  |  Branch (956:7): [True: 12.9k, False: 0]
  ------------------
  957|  12.9k|      buffer.assign(obj.bits(), obj.bits() + obj.length());
  958|  12.9k|   } else {
  959|      0|      if(obj.length() == 0) {
  ------------------
  |  Branch (959:10): [True: 0, False: 0]
  ------------------
  960|      0|         throw BER_Decoding_Error("Invalid BIT STRING");
  961|      0|      }
  962|       |
  963|      0|      const uint8_t unused_bits = obj.bits()[0];
  964|       |
  965|      0|      if(unused_bits >= 8) {
  ------------------
  |  Branch (965:10): [True: 0, False: 0]
  ------------------
  966|      0|         throw BER_Decoding_Error("Bad number of unused bits in BIT STRING");
  967|      0|      }
  968|       |
  969|       |      // Empty BIT STRING with unused bits > 0 ...
  970|      0|      if(unused_bits > 0 && obj.length() < 2) {
  ------------------
  |  Branch (970:10): [True: 0, False: 0]
  |  Branch (970:29): [True: 0, False: 0]
  ------------------
  971|      0|         throw BER_Decoding_Error("Invalid BIT STRING");
  972|      0|      }
  973|       |
  974|       |      // DER requires unused bits in BIT STRING to be zero (X.690 section 11.2.2)
  975|      0|      if(limits.require_der_encoding() && unused_bits > 0) {
  ------------------
  |  Branch (975:10): [True: 0, False: 0]
  |  Branch (975:43): [True: 0, False: 0]
  ------------------
  976|      0|         const uint8_t last_byte = obj.bits()[obj.length() - 1];
  977|      0|         if((last_byte & ((1 << unused_bits) - 1)) != 0) {
  ------------------
  |  Branch (977:13): [True: 0, False: 0]
  ------------------
  978|      0|            throw BER_Decoding_Error("Detected non-zero padding bits in BIT STRING in DER structure");
  979|      0|         }
  980|      0|      }
  981|       |
  982|      0|      buffer.resize(obj.length() - 1);
  983|       |
  984|      0|      if(obj.length() > 1) {
  ------------------
  |  Branch (984:10): [True: 0, False: 0]
  ------------------
  985|      0|         copy_mem(buffer.data(), obj.bits() + 1, obj.length() - 1);
  986|      0|      }
  987|      0|   }
  988|  12.9k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_125asn1_decode_binary_stringINSt3__19allocatorIhEEEEvRNS2_6vectorIhT_EERKNS_10BER_ObjectENS_9ASN1_TypeESC_NS_10ASN1_ClassERKNS_11BER_Decoder6LimitsE:
  932|  38.9k|                               const BER_Decoder::Limits& limits) {
  933|       |   // DER requires BIT STRING and OCTET STRING to use primitive encoding;
  934|       |   // in BER the constructed (fragmented) form is decoded by concatenation
  935|  38.9k|   if(is_constructed(obj)) {
  ------------------
  |  Branch (935:7): [True: 0, False: 38.9k]
  ------------------
  936|      0|      obj.assert_is_a(type_tag, class_tag | ASN1_Class::Constructed);
  937|       |
  938|      0|      if(limits.require_der_encoding()) {
  ------------------
  |  Branch (938:10): [True: 0, False: 0]
  ------------------
  939|      0|         throw BER_Decoding_Error("Detected constructed string encoding in DER structure");
  940|      0|      }
  941|       |
  942|       |      // Concatenate into a temporary so a failed decode leaves buffer unmodified
  943|      0|      std::vector<uint8_t, Alloc> concat;
  944|      0|      concat.reserve(obj.length());  // upper possible bound on the output size
  945|      0|      if(real_type == ASN1_Type::OctetString) {
  ------------------
  |  Branch (945:10): [True: 0, False: 0]
  ------------------
  946|      0|         asn1_concat_constructed_octet_string(concat, obj, limits, 0);
  947|      0|      } else {
  948|      0|         asn1_concat_constructed_bit_string(concat, obj, limits, 0);
  949|      0|      }
  950|      0|      buffer = std::move(concat);
  951|      0|      return;
  952|      0|   }
  953|       |
  954|  38.9k|   obj.assert_is_a(type_tag, class_tag);
  955|       |
  956|  38.9k|   if(real_type == ASN1_Type::OctetString) {
  ------------------
  |  Branch (956:7): [True: 38.9k, False: 0]
  ------------------
  957|  38.9k|      buffer.assign(obj.bits(), obj.bits() + obj.length());
  958|  38.9k|   } else {
  959|      0|      if(obj.length() == 0) {
  ------------------
  |  Branch (959:10): [True: 0, False: 0]
  ------------------
  960|      0|         throw BER_Decoding_Error("Invalid BIT STRING");
  961|      0|      }
  962|       |
  963|      0|      const uint8_t unused_bits = obj.bits()[0];
  964|       |
  965|      0|      if(unused_bits >= 8) {
  ------------------
  |  Branch (965:10): [True: 0, False: 0]
  ------------------
  966|      0|         throw BER_Decoding_Error("Bad number of unused bits in BIT STRING");
  967|      0|      }
  968|       |
  969|       |      // Empty BIT STRING with unused bits > 0 ...
  970|      0|      if(unused_bits > 0 && obj.length() < 2) {
  ------------------
  |  Branch (970:10): [True: 0, False: 0]
  |  Branch (970:29): [True: 0, False: 0]
  ------------------
  971|      0|         throw BER_Decoding_Error("Invalid BIT STRING");
  972|      0|      }
  973|       |
  974|       |      // DER requires unused bits in BIT STRING to be zero (X.690 section 11.2.2)
  975|      0|      if(limits.require_der_encoding() && unused_bits > 0) {
  ------------------
  |  Branch (975:10): [True: 0, False: 0]
  |  Branch (975:43): [True: 0, False: 0]
  ------------------
  976|      0|         const uint8_t last_byte = obj.bits()[obj.length() - 1];
  977|      0|         if((last_byte & ((1 << unused_bits) - 1)) != 0) {
  ------------------
  |  Branch (977:13): [True: 0, False: 0]
  ------------------
  978|      0|            throw BER_Decoding_Error("Detected non-zero padding bits in BIT STRING in DER structure");
  979|      0|         }
  980|      0|      }
  981|       |
  982|      0|      buffer.resize(obj.length() - 1);
  983|       |
  984|      0|      if(obj.length() > 1) {
  ------------------
  |  Branch (984:10): [True: 0, False: 0]
  ------------------
  985|      0|         copy_mem(buffer.data(), obj.bits() + 1, obj.length() - 1);
  986|      0|      }
  987|      0|   }
  988|  38.9k|}

_ZN5Botan4ASN119der_sequence_headerEm:
   71|  19.4k|std::vector<uint8_t> der_sequence_header(size_t contents_len) {
   72|  19.4k|   std::vector<uint8_t> header;
   73|  19.4k|   header.reserve(2 + sizeof(contents_len));
   74|  19.4k|   encode_tag(header, ASN1_Type::Sequence, ASN1_Class::Constructed);
   75|  19.4k|   encode_length(header, contents_len);
   76|  19.4k|   return header;
   77|  19.4k|}
_ZN5Botan11DER_EncoderC2ERNSt3__16vectorIhNS1_9allocatorIhEEEE:
   89|  69.5k|DER_Encoder::DER_Encoder(std::vector<uint8_t>& vec) {
   90|  69.5k|   m_append_output = [&vec](const uint8_t b[], size_t l) {
   91|  69.5k|      if(l > 0) {
   92|  69.5k|         vec.insert(vec.end(), b, b + l);
   93|  69.5k|      }
   94|  69.5k|   };
   95|  69.5k|}
_ZN5Botan11DER_Encoder12DER_Sequence13push_contentsERS0_:
  100|   103k|void DER_Encoder::DER_Sequence::push_contents(DER_Encoder& der) {
  101|   103k|   const auto real_class_tag = m_class_tag | ASN1_Class::Constructed;
  102|       |
  103|   103k|   if(m_sort_contents) {
  ------------------
  |  Branch (103:7): [True: 0, False: 103k]
  ------------------
  104|      0|      std::sort(m_set_contents.begin(), m_set_contents.end());
  105|      0|      for(const auto& set_elem : m_set_contents) {
  ------------------
  |  Branch (105:32): [True: 0, False: 0]
  ------------------
  106|      0|         m_contents += set_elem;
  107|      0|      }
  108|      0|      m_set_contents.clear();
  109|      0|   }
  110|       |
  111|   103k|   der.add_object(m_type_tag, real_class_tag, m_contents.data(), m_contents.size());
  112|   103k|   m_contents.clear();
  113|   103k|}
_ZN5Botan11DER_Encoder12DER_Sequence9add_bytesEPKhm:
  118|  48.8k|void DER_Encoder::DER_Sequence::add_bytes(const uint8_t data[], size_t length) {
  119|  48.8k|   if(m_sort_contents) {
  ------------------
  |  Branch (119:7): [True: 0, False: 48.8k]
  ------------------
  120|      0|      if(length > 0) {
  ------------------
  |  Branch (120:10): [True: 0, False: 0]
  ------------------
  121|      0|         m_set_contents.emplace_back(data, data + length);
  122|      0|      } else {
  123|      0|         m_set_contents.emplace_back();
  124|      0|      }
  125|  48.8k|   } else {
  126|  48.8k|      m_contents += std::make_pair(data, length);
  127|  48.8k|   }
  128|  48.8k|}
_ZN5Botan11DER_Encoder12DER_Sequence9add_bytesEPKhmS3_m:
  130|   133k|void DER_Encoder::DER_Sequence::add_bytes(const uint8_t hdr[], size_t hdr_len, const uint8_t val[], size_t val_len) {
  131|   133k|   if(m_sort_contents) {
  ------------------
  |  Branch (131:7): [True: 0, False: 133k]
  ------------------
  132|      0|      secure_vector<uint8_t> m;
  133|      0|      m.reserve(hdr_len + val_len);
  134|      0|      m += std::make_pair(hdr, hdr_len);
  135|      0|      m += std::make_pair(val, val_len);
  136|      0|      m_set_contents.push_back(std::move(m));
  137|   133k|   } else {
  138|   133k|      m_contents += std::make_pair(hdr, hdr_len);
  139|   133k|      m_contents += std::make_pair(val, val_len);
  140|   133k|   }
  141|   133k|}
_ZN5Botan11DER_Encoder12DER_SequenceC2ENS_9ASN1_TypeENS_10ASN1_ClassEb:
  154|   103k|      m_type_tag(type_tag),
  155|   103k|      m_class_tag(class_tag),
  156|   103k|      m_sort_contents(sort_contents || (type_tag == ASN1_Type::Set && class_tag == ASN1_Class::Universal)) {}
  ------------------
  |  Branch (156:23): [True: 0, False: 103k]
  |  Branch (156:41): [True: 0, False: 103k]
  |  Branch (156:71): [True: 0, False: 0]
  ------------------
_ZN5Botan11DER_Encoder10start_consENS_9ASN1_TypeENS_10ASN1_ClassE:
  192|   103k|DER_Encoder& DER_Encoder::start_cons(ASN1_Type type_tag, ASN1_Class class_tag) {
  193|   103k|   return start_cons(type_tag, class_tag, false);
  194|   103k|}
_ZN5Botan11DER_Encoder10start_consENS_9ASN1_TypeENS_10ASN1_ClassEb:
  200|   103k|DER_Encoder& DER_Encoder::start_cons(ASN1_Type type_tag, ASN1_Class class_tag, bool sort_contents) {
  201|   103k|   m_subsequences.push_back(DER_Sequence(type_tag, class_tag, sort_contents));
  202|   103k|   return (*this);
  203|   103k|}
_ZN5Botan11DER_Encoder8end_consEv:
  208|   103k|DER_Encoder& DER_Encoder::end_cons() {
  209|   103k|   if(m_subsequences.empty()) {
  ------------------
  |  Branch (209:7): [True: 0, False: 103k]
  ------------------
  210|      0|      throw Invalid_State("DER_Encoder::end_cons: No such sequence");
  211|      0|   }
  212|       |
  213|   103k|   DER_Sequence last_seq = std::move(m_subsequences[m_subsequences.size() - 1]);
  214|   103k|   m_subsequences.pop_back();
  215|   103k|   last_seq.push_contents(*this);
  216|       |
  217|   103k|   return (*this);
  218|   103k|}
_ZN5Botan11DER_Encoder9raw_bytesEPKhm:
  237|  48.8k|DER_Encoder& DER_Encoder::raw_bytes(const uint8_t bytes[], size_t length) {
  238|  48.8k|   if(!m_subsequences.empty()) {
  ------------------
  |  Branch (238:7): [True: 48.8k, False: 0]
  ------------------
  239|  48.8k|      m_subsequences[m_subsequences.size() - 1].add_bytes(bytes, length);
  240|  48.8k|   } else if(m_append_output) {
  ------------------
  |  Branch (240:14): [True: 0, False: 0]
  ------------------
  241|      0|      m_append_output(bytes, length);
  242|      0|   } else {
  243|      0|      m_default_outbuf += std::make_pair(bytes, length);
  244|      0|   }
  245|       |
  246|  48.8k|   return (*this);
  247|  48.8k|}
_ZN5Botan11DER_Encoder10add_objectENS_9ASN1_TypeENS_10ASN1_ClassEPKhm:
  285|   203k|DER_Encoder& DER_Encoder::add_object(ASN1_Type type_tag, ASN1_Class class_tag, const uint8_t rep[], size_t length) {
  286|   203k|   std::vector<uint8_t> hdr;
  287|   203k|   encode_tag(hdr, type_tag, class_tag);
  288|   203k|   encode_length(hdr, length);
  289|       |
  290|   203k|   if(!m_subsequences.empty()) {
  ------------------
  |  Branch (290:7): [True: 133k, False: 69.5k]
  ------------------
  291|   133k|      m_subsequences[m_subsequences.size() - 1].add_bytes(hdr.data(), hdr.size(), rep, length);
  292|   133k|   } else if(m_append_output) {
  ------------------
  |  Branch (292:14): [True: 69.5k, False: 0]
  ------------------
  293|  69.5k|      m_append_output(hdr.data(), hdr.size());
  294|  69.5k|      m_append_output(rep, length);
  295|  69.5k|   } else {
  296|      0|      m_default_outbuf += hdr;
  297|      0|      m_default_outbuf += std::make_pair(rep, length);
  298|      0|   }
  299|       |
  300|   203k|   return (*this);
  301|   203k|}
_ZN5Botan11DER_Encoder6encodeEm:
  320|  11.9k|DER_Encoder& DER_Encoder::encode(size_t n) {
  321|  11.9k|   return encode(BigInt::from_u64(n), ASN1_Type::Integer, ASN1_Class::Universal);
  322|  11.9k|}
_ZN5Botan4ASN116integer_contentsERKNS_6BigIntE:
  356|  18.4k|std::vector<uint8_t> ASN1::integer_contents(const BigInt& n) {
  357|  18.4k|   if(n == 0) {
  ------------------
  |  Branch (357:7): [True: 1, False: 18.4k]
  ------------------
  358|      1|      return {0x00};
  359|      1|   }
  360|       |
  361|       |   // Serialize magnitude with one extra leading byte
  362|  18.4k|   auto contents = n.serialize(n.bytes() + 1);
  363|       |
  364|  18.4k|   if(n.signum() < 0) {
  ------------------
  |  Branch (364:7): [True: 19, False: 18.4k]
  ------------------
  365|       |      // Two's complement: bitwise NOT then increment
  366|     95|      for(auto& byte : contents) {
  ------------------
  |  Branch (366:22): [True: 95, False: 19]
  ------------------
  367|     95|         byte = ~byte;
  368|     95|      }
  369|     39|      for(size_t i = contents.size(); i > 0; --i) {
  ------------------
  |  Branch (369:39): [True: 39, False: 0]
  ------------------
  370|     39|         if(++contents[i - 1] != 0) {
  ------------------
  |  Branch (370:13): [True: 19, False: 20]
  ------------------
  371|     19|            break;
  372|     19|         }
  373|     39|      }
  374|     19|   }
  375|       |
  376|       |   /*
  377|       |   * DER requires the leading byte be emitted only if it required
  378|       |   */
  379|  18.4k|   BOTAN_ASSERT_NOMSG(contents.size() >= 2);
  ------------------
  |  |   84|  18.4k|   do {                                                                     \
  |  |   85|  18.4k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  18.4k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 18.4k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  18.4k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 18.4k]
  |  |  ------------------
  ------------------
  380|  18.4k|   const bool leading_byte_redundant =
  381|  18.4k|      (contents[0] == 0x00 && (contents[1] & 0x80) == 0) || (contents[0] == 0xFF && (contents[1] & 0x80) != 0);
  ------------------
  |  Branch (381:8): [True: 18.4k, False: 19]
  |  Branch (381:31): [True: 11.9k, False: 6.49k]
  |  Branch (381:62): [True: 19, False: 6.49k]
  |  Branch (381:85): [True: 13, False: 6]
  ------------------
  382|       |
  383|  18.4k|   if(leading_byte_redundant) {
  ------------------
  |  Branch (383:7): [True: 11.9k, False: 6.49k]
  ------------------
  384|  11.9k|      contents.erase(contents.begin());
  385|  11.9k|   }
  386|  18.4k|   return contents;
  387|  18.4k|}
_ZN5Botan11DER_Encoder6encodeERKNS_6BigIntENS_9ASN1_TypeENS_10ASN1_ClassE:
  389|  11.9k|DER_Encoder& DER_Encoder::encode(const BigInt& n, ASN1_Type type_tag, ASN1_Class class_tag) {
  390|  11.9k|   return add_object(type_tag, class_tag, ASN1::integer_contents(n));
  391|  11.9k|}
_ZN5Botan11DER_Encoder16encode_bitstringENSt3__14spanIKhLm18446744073709551615EEEmNS_9ASN1_TypeENS_10ASN1_ClassE:
  414|  6.48k|                                           ASN1_Class class_tag) {
  415|  6.48k|   if(unused_bits >= 8) {
  ------------------
  |  Branch (415:7): [True: 0, False: 6.48k]
  ------------------
  416|      0|      throw Invalid_Argument("DER_Encoder: Invalid unused bit count for BIT STRING");
  417|      0|   }
  418|       |
  419|  6.48k|   if(bits.empty() && unused_bits != 0) {
  ------------------
  |  Branch (419:7): [True: 0, False: 6.48k]
  |  Branch (419:23): [True: 0, False: 0]
  ------------------
  420|      0|      throw Invalid_Argument("DER_Encoder: Empty BIT STRING cannot have unused bits");
  421|      0|   }
  422|       |
  423|  6.48k|   if(unused_bits > 0 && (bits.back() & ((1U << unused_bits) - 1)) != 0) {
  ------------------
  |  Branch (423:7): [True: 0, False: 6.48k]
  |  Branch (423:26): [True: 0, False: 0]
  ------------------
  424|      0|      throw Invalid_Argument("DER_Encoder: BIT STRING unused bits must be zero");
  425|      0|   }
  426|       |
  427|  6.48k|   secure_vector<uint8_t> encoded;
  428|  6.48k|   encoded.reserve(1 + bits.size());
  429|  6.48k|   encoded.push_back(static_cast<uint8_t>(unused_bits));
  430|  6.48k|   encoded.insert(encoded.end(), bits.begin(), bits.end());
  431|  6.48k|   return add_object(type_tag, class_tag, encoded);
  432|  6.48k|}
_ZN5Botan11DER_Encoder6encodeERKNS_11ASN1_ObjectE:
  467|  84.6k|DER_Encoder& DER_Encoder::encode(const ASN1_Object& obj) {
  468|  84.6k|   obj.encode_into(*this);
  469|  84.6k|   return (*this);
  470|  84.6k|}
der_enc.cpp:_ZN5Botan12_GLOBAL__N_110encode_tagERNSt3__16vectorIhNS1_9allocatorIhEEEENS_9ASN1_TypeENS_10ASN1_ClassE:
   26|   222k|void encode_tag(std::vector<uint8_t>& encoded_tag, ASN1_Type type_tag_e, ASN1_Class class_tag_e) {
   27|   222k|   const uint32_t type_tag = static_cast<uint32_t>(type_tag_e);
   28|   222k|   const uint32_t class_tag = static_cast<uint32_t>(class_tag_e);
   29|       |
   30|   222k|   if((class_tag | 0xE0) != 0xE0) {
  ------------------
  |  Branch (30:7): [True: 0, False: 222k]
  ------------------
   31|      0|      throw Encoding_Error(fmt("DER_Encoder: Invalid class tag {}", std::to_string(class_tag)));
   32|      0|   }
   33|       |
   34|   222k|   if(type_tag <= 30) {
  ------------------
  |  Branch (34:7): [True: 222k, False: 0]
  ------------------
   35|   222k|      encoded_tag.push_back(static_cast<uint8_t>(type_tag | class_tag));
   36|   222k|   } else {
   37|      0|      size_t blocks = high_bit(static_cast<uint32_t>(type_tag)) + 6;
   38|      0|      blocks = (blocks - (blocks % 7)) / 7;
   39|       |
   40|      0|      BOTAN_ASSERT_NOMSG(blocks > 0);
  ------------------
  |  |   84|      0|   do {                                                                     \
  |  |   85|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|      0|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
   41|       |
   42|      0|      encoded_tag.push_back(static_cast<uint8_t>(class_tag | 0x1F));
   43|      0|      for(size_t i = 0; i != blocks - 1; ++i) {
  ------------------
  |  Branch (43:25): [True: 0, False: 0]
  ------------------
   44|      0|         encoded_tag.push_back(0x80 | ((type_tag >> 7 * (blocks - i - 1)) & 0x7F));
   45|      0|      }
   46|      0|      encoded_tag.push_back(type_tag & 0x7F);
   47|      0|   }
   48|   222k|}
der_enc.cpp:_ZN5Botan12_GLOBAL__N_113encode_lengthERNSt3__16vectorIhNS1_9allocatorIhEEEEm:
   53|   222k|void encode_length(std::vector<uint8_t>& encoded_length, size_t length) {
   54|   222k|   if(length <= 127) {
  ------------------
  |  Branch (54:7): [True: 209k, False: 12.9k]
  ------------------
   55|   209k|      encoded_length.push_back(static_cast<uint8_t>(length));
   56|   209k|   } else {
   57|  12.9k|      const size_t bytes_needed = significant_bytes(length);
   58|       |
   59|  12.9k|      encoded_length.push_back(static_cast<uint8_t>(0x80 | bytes_needed));
   60|       |
   61|  38.9k|      for(size_t i = sizeof(length) - bytes_needed; i < sizeof(length); ++i) {
  ------------------
  |  Branch (61:53): [True: 25.9k, False: 12.9k]
  ------------------
   62|  25.9k|         encoded_length.push_back(get_byte_var(i, length));
   63|  25.9k|      }
   64|  12.9k|   }
   65|   222k|}
der_enc.cpp:_ZZN5Botan11DER_EncoderC1ERNSt3__16vectorIhNS1_9allocatorIhEEEEENK3$_0clEPKhm:
   90|   139k|   m_append_output = [&vec](const uint8_t b[], size_t l) {
   91|   139k|      if(l > 0) {
  ------------------
  |  Branch (91:10): [True: 139k, False: 0]
  ------------------
   92|   139k|         vec.insert(vec.end(), b, b + l);
   93|   139k|      }
   94|   139k|   };

_ZN5Botan7OID_MapC2Ev:
   11|      1|OID_Map::OID_Map() {
   12|      1|   m_str2oid = OID_Map::load_str2oid_map();
   13|      1|   m_oid2str = OID_Map::load_oid2str_map();
   14|      1|}
_ZN5Botan7OID_Map15global_registryEv:
   16|  67.4k|OID_Map& OID_Map::global_registry() {
   17|  67.4k|   static OID_Map g_map;
   18|  67.4k|   return g_map;
   19|  67.4k|}
_ZN5Botan7OID_Map7oid2strERKNS_3OIDE:
   73|  12.9k|std::optional<std::string> OID_Map::oid2str(const OID& oid) {
   74|  12.9k|   if(auto name = lookup_static_oid(oid)) {
  ------------------
  |  Branch (74:12): [True: 12.9k, False: 0]
  ------------------
   75|  12.9k|      return std::string(*name);
   76|  12.9k|   }
   77|       |
   78|      0|   const lock_guard_type<mutex_type> lock(m_mutex);
   79|       |
   80|      0|   auto i = m_oid2str.find(oid);
   81|      0|   if(i != m_oid2str.end()) {
  ------------------
  |  Branch (81:7): [True: 0, False: 0]
  ------------------
   82|      0|      return i->second;
   83|      0|   }
   84|       |
   85|      0|   return {};
   86|      0|}
_ZN5Botan7OID_Map7str2oidENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   88|  54.4k|OID OID_Map::str2oid(std::string_view str) {
   89|  54.4k|   if(auto oid = lookup_static_oid_name(str)) {
  ------------------
  |  Branch (89:12): [True: 54.4k, False: 0]
  ------------------
   90|  54.4k|      return std::move(*oid);
   91|  54.4k|   }
   92|       |
   93|      0|   const lock_guard_type<mutex_type> lock(m_mutex);
   94|      0|   auto i = m_str2oid.find(std::string(str));
   95|      0|   if(i != m_str2oid.end()) {
  ------------------
  |  Branch (95:7): [True: 0, False: 0]
  ------------------
   96|      0|      return i->second;
   97|      0|   }
   98|       |
   99|      0|   return OID();
  100|      0|}

_ZN5Botan10PSS_ParamsC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEm:
   33|  11.9k|      m_hash(hash_fn, AlgorithmIdentifier::USE_NULL_PARAM),
   34|  11.9k|      m_mgf("MGF1", m_hash.BER_encode()),
   35|  11.9k|      m_mgf_hash(m_hash),
   36|  11.9k|      m_salt_len(salt_len),
   37|  11.9k|      m_trailer_field(1) {}
_ZNK5Botan10PSS_Params9serializeEv:
   45|  11.9k|std::vector<uint8_t> PSS_Params::serialize() const {
   46|  11.9k|   std::vector<uint8_t> output;
   47|  11.9k|   DER_Encoder(output).encode(*this);
   48|  11.9k|   return output;
   49|  11.9k|}
_ZNK5Botan10PSS_Params11encode_intoERNS_11DER_EncoderE:
   51|  11.9k|void PSS_Params::encode_into(DER_Encoder& to) const {
   52|  11.9k|   to.start_sequence()
   53|  11.9k|      .start_context_specific(0)
   54|  11.9k|      .encode(m_hash)
   55|  11.9k|      .end_cons()
   56|  11.9k|      .start_context_specific(1)
   57|  11.9k|      .encode(m_mgf)
   58|  11.9k|      .end_cons()
   59|  11.9k|      .start_context_specific(2)
   60|  11.9k|      .encode(m_salt_len)
   61|  11.9k|      .end_cons()
   62|  11.9k|      .end_cons();
   63|  11.9k|}

_ZN5Botan7OID_Map17lookup_static_oidERKNS_3OIDE:
   48|  12.9k|std::optional<std::string_view> OID_Map::lookup_static_oid(const OID& oid) {
   49|  12.9k|   const uint32_t hc = static_cast<uint32_t>(oid.hash_code() % 858701);
   50|       |
   51|  12.9k|   switch(hc) {
   52|      0|      case 0x01506:
  ------------------
  |  Branch (52:7): [True: 0, False: 12.9k]
  ------------------
   53|      0|         return if_match(oid, {1, 2, 840, 10045, 4, 3, 1}, "ECDSA/SHA-224");
   54|      0|      case 0x01507:
  ------------------
  |  Branch (54:7): [True: 0, False: 12.9k]
  ------------------
   55|      0|         return if_match(oid, {1, 2, 840, 10045, 4, 3, 2}, "ECDSA/SHA-256");
   56|      0|      case 0x01508:
  ------------------
  |  Branch (56:7): [True: 0, False: 12.9k]
  ------------------
   57|      0|         return if_match(oid, {1, 2, 840, 10045, 4, 3, 3}, "ECDSA/SHA-384");
   58|      0|      case 0x01509:
  ------------------
  |  Branch (58:7): [True: 0, False: 12.9k]
  ------------------
   59|      0|         return if_match(oid, {1, 2, 840, 10045, 4, 3, 4}, "ECDSA/SHA-512");
   60|      0|      case 0x04C1E:
  ------------------
  |  Branch (60:7): [True: 0, False: 12.9k]
  ------------------
   61|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 3029, 1, 2, 1}, "ElGamal");
   62|      0|      case 0x04E61:
  ------------------
  |  Branch (62:7): [True: 0, False: 12.9k]
  ------------------
   63|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 3029, 1, 5, 1}, "OpenPGP.Curve25519");
   64|      0|      case 0x0779B:
  ------------------
  |  Branch (64:7): [True: 0, False: 12.9k]
  ------------------
   65|      0|         return if_match(oid, {1, 2, 840, 113549, 2, 5}, "MD5");
   66|      0|      case 0x0779D:
  ------------------
  |  Branch (66:7): [True: 0, False: 12.9k]
  ------------------
   67|      0|         return if_match(oid, {1, 2, 840, 113549, 2, 7}, "HMAC(SHA-1)");
   68|      0|      case 0x0779E:
  ------------------
  |  Branch (68:7): [True: 0, False: 12.9k]
  ------------------
   69|      0|         return if_match(oid, {1, 2, 840, 113549, 2, 8}, "HMAC(SHA-224)");
   70|      0|      case 0x0779F:
  ------------------
  |  Branch (70:7): [True: 0, False: 12.9k]
  ------------------
   71|      0|         return if_match(oid, {1, 2, 840, 113549, 2, 9}, "HMAC(SHA-256)");
   72|      0|      case 0x077A0:
  ------------------
  |  Branch (72:7): [True: 0, False: 12.9k]
  ------------------
   73|      0|         return if_match(oid, {1, 2, 840, 113549, 2, 10}, "HMAC(SHA-384)");
   74|      0|      case 0x077A1:
  ------------------
  |  Branch (74:7): [True: 0, False: 12.9k]
  ------------------
   75|      0|         return if_match(oid, {1, 2, 840, 113549, 2, 11}, "HMAC(SHA-512)");
   76|      0|      case 0x077A3:
  ------------------
  |  Branch (76:7): [True: 0, False: 12.9k]
  ------------------
   77|      0|         return if_match(oid, {1, 2, 840, 113549, 2, 13}, "HMAC(SHA-512-256)");
   78|      0|      case 0x0785E:
  ------------------
  |  Branch (78:7): [True: 0, False: 12.9k]
  ------------------
   79|      0|         return if_match(oid, {1, 2, 840, 113549, 3, 7}, "TripleDES/CBC");
   80|      0|      case 0x0C904:
  ------------------
  |  Branch (80:7): [True: 0, False: 12.9k]
  ------------------
   81|      0|         return if_match(oid, {1, 0, 14888, 3, 0, 5}, "ECKCDSA");
   82|      0|      case 0x11547:
  ------------------
  |  Branch (82:7): [True: 0, False: 12.9k]
  ------------------
   83|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 1}, "SphincsPlus-shake-128s-r3.1");
   84|      0|      case 0x11548:
  ------------------
  |  Branch (84:7): [True: 0, False: 12.9k]
  ------------------
   85|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 2}, "SphincsPlus-shake-128f-r3.1");
   86|      0|      case 0x11549:
  ------------------
  |  Branch (86:7): [True: 0, False: 12.9k]
  ------------------
   87|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 3}, "SphincsPlus-shake-192s-r3.1");
   88|      0|      case 0x1154A:
  ------------------
  |  Branch (88:7): [True: 0, False: 12.9k]
  ------------------
   89|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 4}, "SphincsPlus-shake-192f-r3.1");
   90|      0|      case 0x1154B:
  ------------------
  |  Branch (90:7): [True: 0, False: 12.9k]
  ------------------
   91|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 5}, "SphincsPlus-shake-256s-r3.1");
   92|      0|      case 0x1154C:
  ------------------
  |  Branch (92:7): [True: 0, False: 12.9k]
  ------------------
   93|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 6}, "SphincsPlus-shake-256f-r3.1");
   94|      0|      case 0x11608:
  ------------------
  |  Branch (94:7): [True: 0, False: 12.9k]
  ------------------
   95|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 1}, "SphincsPlus-sha2-128s-r3.1");
   96|      0|      case 0x11609:
  ------------------
  |  Branch (96:7): [True: 0, False: 12.9k]
  ------------------
   97|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 2}, "SphincsPlus-sha2-128f-r3.1");
   98|      0|      case 0x1160A:
  ------------------
  |  Branch (98:7): [True: 0, False: 12.9k]
  ------------------
   99|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 3}, "SphincsPlus-sha2-192s-r3.1");
  100|      0|      case 0x1160B:
  ------------------
  |  Branch (100:7): [True: 0, False: 12.9k]
  ------------------
  101|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 4}, "SphincsPlus-sha2-192f-r3.1");
  102|      0|      case 0x1160C:
  ------------------
  |  Branch (102:7): [True: 0, False: 12.9k]
  ------------------
  103|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 5}, "SphincsPlus-sha2-256s-r3.1");
  104|      0|      case 0x1160D:
  ------------------
  |  Branch (104:7): [True: 0, False: 12.9k]
  ------------------
  105|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 6}, "SphincsPlus-sha2-256f-r3.1");
  106|      0|      case 0x116C9:
  ------------------
  |  Branch (106:7): [True: 0, False: 12.9k]
  ------------------
  107|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 1}, "SphincsPlus-haraka-128s-r3.1");
  108|      0|      case 0x116CA:
  ------------------
  |  Branch (108:7): [True: 0, False: 12.9k]
  ------------------
  109|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 2}, "SphincsPlus-haraka-128f-r3.1");
  110|      0|      case 0x116CB:
  ------------------
  |  Branch (110:7): [True: 0, False: 12.9k]
  ------------------
  111|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 3}, "SphincsPlus-haraka-192s-r3.1");
  112|      0|      case 0x116CC:
  ------------------
  |  Branch (112:7): [True: 0, False: 12.9k]
  ------------------
  113|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 4}, "SphincsPlus-haraka-192f-r3.1");
  114|      0|      case 0x116CD:
  ------------------
  |  Branch (114:7): [True: 0, False: 12.9k]
  ------------------
  115|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 5}, "SphincsPlus-haraka-256s-r3.1");
  116|      0|      case 0x116CE:
  ------------------
  |  Branch (116:7): [True: 0, False: 12.9k]
  ------------------
  117|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 6}, "SphincsPlus-haraka-256f-r3.1");
  118|      0|      case 0x1533B:
  ------------------
  |  Branch (118:7): [True: 0, False: 12.9k]
  ------------------
  119|      0|         return if_match(oid, {1, 2, 156, 10197, 1, 104, 2}, "SM4/CBC");
  120|      0|      case 0x15341:
  ------------------
  |  Branch (120:7): [True: 0, False: 12.9k]
  ------------------
  121|      0|         return if_match(oid, {1, 2, 156, 10197, 1, 104, 8}, "SM4/GCM");
  122|      0|      case 0x1539D:
  ------------------
  |  Branch (122:7): [True: 0, False: 12.9k]
  ------------------
  123|      0|         return if_match(oid, {1, 2, 156, 10197, 1, 104, 100}, "SM4/OCB");
  124|      0|      case 0x187D7:
  ------------------
  |  Branch (124:7): [True: 0, False: 12.9k]
  ------------------
  125|      0|         return if_match(oid, {1, 3, 14, 3, 2, 7}, "DES/CBC");
  126|      0|      case 0x187EA:
  ------------------
  |  Branch (126:7): [True: 0, False: 12.9k]
  ------------------
  127|      0|         return if_match(oid, {1, 3, 14, 3, 2, 26}, "SHA-1");
  128|      0|      case 0x19933:
  ------------------
  |  Branch (128:7): [True: 0, False: 12.9k]
  ------------------
  129|      0|         return if_match(oid, {1, 3, 132, 0, 8}, "secp160r1");
  130|      0|      case 0x19934:
  ------------------
  |  Branch (130:7): [True: 0, False: 12.9k]
  ------------------
  131|      0|         return if_match(oid, {1, 3, 132, 0, 9}, "secp160k1");
  132|      0|      case 0x19935:
  ------------------
  |  Branch (132:7): [True: 0, False: 12.9k]
  ------------------
  133|      0|         return if_match(oid, {1, 3, 132, 0, 10}, "secp256k1");
  134|      0|      case 0x19949:
  ------------------
  |  Branch (134:7): [True: 0, False: 12.9k]
  ------------------
  135|      0|         return if_match(oid, {1, 3, 132, 0, 30}, "secp160r2");
  136|      0|      case 0x1994A:
  ------------------
  |  Branch (136:7): [True: 0, False: 12.9k]
  ------------------
  137|      0|         return if_match(oid, {1, 3, 132, 0, 31}, "secp192k1");
  138|      0|      case 0x1994B:
  ------------------
  |  Branch (138:7): [True: 0, False: 12.9k]
  ------------------
  139|      0|         return if_match(oid, {1, 3, 132, 0, 32}, "secp224k1");
  140|      0|      case 0x1994C:
  ------------------
  |  Branch (140:7): [True: 0, False: 12.9k]
  ------------------
  141|      0|         return if_match(oid, {1, 3, 132, 0, 33}, "secp224r1");
  142|      1|      case 0x1994D:
  ------------------
  |  Branch (142:7): [True: 1, False: 12.9k]
  ------------------
  143|      1|         return if_match(oid, {1, 3, 132, 0, 34}, "secp384r1");
  144|      1|      case 0x1994E:
  ------------------
  |  Branch (144:7): [True: 1, False: 12.9k]
  ------------------
  145|      1|         return if_match(oid, {1, 3, 132, 0, 35}, "secp521r1");
  146|      0|      case 0x199F8:
  ------------------
  |  Branch (146:7): [True: 0, False: 12.9k]
  ------------------
  147|      0|         return if_match(oid, {1, 3, 132, 1, 12}, "ECDH");
  148|      0|      case 0x1E7BF:
  ------------------
  |  Branch (148:7): [True: 0, False: 12.9k]
  ------------------
  149|      0|         return if_match(oid, {1, 2, 156, 10197, 1, 301, 1}, "SM2");
  150|      0|      case 0x1E7C0:
  ------------------
  |  Branch (150:7): [True: 0, False: 12.9k]
  ------------------
  151|      0|         return if_match(oid, {1, 2, 156, 10197, 1, 301, 2}, "SM2_Kex");
  152|      0|      case 0x1E7C1:
  ------------------
  |  Branch (152:7): [True: 0, False: 12.9k]
  ------------------
  153|      0|         return if_match(oid, {1, 2, 156, 10197, 1, 301, 3}, "SM2_Enc");
  154|      0|      case 0x21960:
  ------------------
  |  Branch (154:7): [True: 0, False: 12.9k]
  ------------------
  155|      0|         return if_match(oid, {1, 3, 36, 3, 3, 1, 2}, "RSA/PKCS1v15(RIPEMD-160)");
  156|      0|      case 0x2198A:
  ------------------
  |  Branch (156:7): [True: 0, False: 12.9k]
  ------------------
  157|      0|         return if_match(oid, {1, 2, 840, 113533, 7, 66, 10}, "CAST-128/CBC");
  158|      0|      case 0x2198F:
  ------------------
  |  Branch (158:7): [True: 0, False: 12.9k]
  ------------------
  159|      0|         return if_match(oid, {1, 2, 840, 113533, 7, 66, 15}, "KeyWrap.CAST-128");
  160|      0|      case 0x227C0:
  ------------------
  |  Branch (160:7): [True: 0, False: 12.9k]
  ------------------
  161|      0|         return if_match(oid, {1, 3, 101, 110}, "X25519");
  162|      0|      case 0x227C1:
  ------------------
  |  Branch (162:7): [True: 0, False: 12.9k]
  ------------------
  163|      0|         return if_match(oid, {1, 3, 101, 111}, "X448");
  164|      0|      case 0x227C2:
  ------------------
  |  Branch (164:7): [True: 0, False: 12.9k]
  ------------------
  165|      0|         return if_match(oid, {1, 3, 101, 112}, "Ed25519");
  166|      0|      case 0x227C3:
  ------------------
  |  Branch (166:7): [True: 0, False: 12.9k]
  ------------------
  167|      0|         return if_match(oid, {1, 3, 101, 113}, "Ed448");
  168|      0|      case 0x27565:
  ------------------
  |  Branch (168:7): [True: 0, False: 12.9k]
  ------------------
  169|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 48, 1, 1}, "PKIX.OCSP.BasicResponse");
  170|      0|      case 0x27566:
  ------------------
  |  Branch (170:7): [True: 0, False: 12.9k]
  ------------------
  171|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 48, 1, 2}, "PKIX.OCSP.Nonce");
  172|      0|      case 0x27569:
  ------------------
  |  Branch (172:7): [True: 0, False: 12.9k]
  ------------------
  173|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 48, 1, 5}, "PKIX.OCSP.NoCheck");
  174|      0|      case 0x29F7C:
  ------------------
  |  Branch (174:7): [True: 0, False: 12.9k]
  ------------------
  175|      0|         return if_match(oid, {1, 2, 410, 200004, 1, 100, 4, 3}, "ECKCDSA/SHA-1");
  176|      0|      case 0x29F7D:
  ------------------
  |  Branch (176:7): [True: 0, False: 12.9k]
  ------------------
  177|      0|         return if_match(oid, {1, 2, 410, 200004, 1, 100, 4, 4}, "ECKCDSA/SHA-224");
  178|      0|      case 0x29F7E:
  ------------------
  |  Branch (178:7): [True: 0, False: 12.9k]
  ------------------
  179|      0|         return if_match(oid, {1, 2, 410, 200004, 1, 100, 4, 5}, "ECKCDSA/SHA-256");
  180|      0|      case 0x2AC3B:
  ------------------
  |  Branch (180:7): [True: 0, False: 12.9k]
  ------------------
  181|      0|         return if_match(oid, {2, 5, 29, 32, 0}, "X509v3.AnyPolicy");
  182|      0|      case 0x2B000:
  ------------------
  |  Branch (182:7): [True: 0, False: 12.9k]
  ------------------
  183|      0|         return if_match(oid, {2, 5, 29, 37, 0}, "X509v3.AnyExtendedKeyUsage");
  184|  12.9k|      case 0x2B5C9:
  ------------------
  |  Branch (184:7): [True: 12.9k, False: 6]
  ------------------
  185|  12.9k|         return if_match(oid, {1, 2, 840, 10045, 2, 1}, "ECDSA");
  186|      0|      case 0x2B74B:
  ------------------
  |  Branch (186:7): [True: 0, False: 12.9k]
  ------------------
  187|      0|         return if_match(oid, {1, 2, 840, 10045, 4, 1}, "ECDSA/SHA-1");
  188|      0|      case 0x3474A:
  ------------------
  |  Branch (188:7): [True: 0, False: 12.9k]
  ------------------
  189|      0|         return if_match(oid, {1, 2, 840, 10046, 2, 1}, "DH");
  190|      0|      case 0x38D6D:
  ------------------
  |  Branch (190:7): [True: 0, False: 12.9k]
  ------------------
  191|      0|         return if_match(oid, {1, 2, 643, 7, 1, 2, 1, 1, 1}, "gost_256A");
  192|      0|      case 0x38D6E:
  ------------------
  |  Branch (192:7): [True: 0, False: 12.9k]
  ------------------
  193|      0|         return if_match(oid, {1, 2, 643, 7, 1, 2, 1, 1, 2}, "gost_256B");
  194|      0|      case 0x38E2E:
  ------------------
  |  Branch (194:7): [True: 0, False: 12.9k]
  ------------------
  195|      0|         return if_match(oid, {1, 2, 643, 7, 1, 2, 1, 2, 1}, "gost_512A");
  196|      0|      case 0x38E2F:
  ------------------
  |  Branch (196:7): [True: 0, False: 12.9k]
  ------------------
  197|      0|         return if_match(oid, {1, 2, 643, 7, 1, 2, 1, 2, 2}, "gost_512B");
  198|      0|      case 0x38F2C:
  ------------------
  |  Branch (198:7): [True: 0, False: 12.9k]
  ------------------
  199|      0|         return if_match(oid, {1, 2, 643, 2, 2, 3}, "GOST-34.10/GOST-R-34.11-94");
  200|      0|      case 0x38F3C:
  ------------------
  |  Branch (200:7): [True: 0, False: 12.9k]
  ------------------
  201|      0|         return if_match(oid, {1, 2, 643, 2, 2, 19}, "GOST-34.10");
  202|      0|      case 0x3D7B8:
  ------------------
  |  Branch (202:7): [True: 0, False: 12.9k]
  ------------------
  203|      0|         return if_match(oid, {0, 3, 4401, 5, 3, 1, 9, 6}, "Camellia-128/GCM");
  204|      0|      case 0x3D7CC:
  ------------------
  |  Branch (204:7): [True: 0, False: 12.9k]
  ------------------
  205|      0|         return if_match(oid, {0, 3, 4401, 5, 3, 1, 9, 26}, "Camellia-192/GCM");
  206|      0|      case 0x3D7E0:
  ------------------
  |  Branch (206:7): [True: 0, False: 12.9k]
  ------------------
  207|      0|         return if_match(oid, {0, 3, 4401, 5, 3, 1, 9, 46}, "Camellia-256/GCM");
  208|      0|      case 0x3F20F:
  ------------------
  |  Branch (208:7): [True: 0, False: 12.9k]
  ------------------
  209|      0|         return if_match(oid, {1, 3, 36, 3, 2, 1}, "RIPEMD-160");
  210|      0|      case 0x4266E:
  ------------------
  |  Branch (210:7): [True: 0, False: 12.9k]
  ------------------
  211|      0|         return if_match(oid, {0, 4, 0, 127, 0, 15, 1, 1, 13, 0}, "XMSS");
  212|      0|      case 0x478C4:
  ------------------
  |  Branch (212:7): [True: 0, False: 12.9k]
  ------------------
  213|      0|         return if_match(oid, {1, 2, 410, 200004, 1, 4}, "SEED/CBC");
  214|      0|      case 0x47D98:
  ------------------
  |  Branch (214:7): [True: 0, False: 12.9k]
  ------------------
  215|      0|         return if_match(oid, {1, 2, 156, 10197, 1, 301}, "sm2p256v1");
  216|      0|      case 0x47DFC:
  ------------------
  |  Branch (216:7): [True: 0, False: 12.9k]
  ------------------
  217|      0|         return if_match(oid, {1, 2, 156, 10197, 1, 401}, "SM3");
  218|      0|      case 0x47E60:
  ------------------
  |  Branch (218:7): [True: 0, False: 12.9k]
  ------------------
  219|      0|         return if_match(oid, {1, 2, 156, 10197, 1, 501}, "SM2_Sig/SM3");
  220|      0|      case 0x47E63:
  ------------------
  |  Branch (220:7): [True: 0, False: 12.9k]
  ------------------
  221|      0|         return if_match(oid, {1, 2, 156, 10197, 1, 504}, "RSA/PKCS1v15(SM3)");
  222|      0|      case 0x52B13:
  ------------------
  |  Branch (222:7): [True: 0, False: 12.9k]
  ------------------
  223|      0|         return if_match(oid, {1, 2, 643, 3, 131, 1, 1}, "GOST.INN");
  224|      0|      case 0x635AE:
  ------------------
  |  Branch (224:7): [True: 0, False: 12.9k]
  ------------------
  225|      0|         return if_match(oid, {1, 2, 250, 1, 223, 101, 256, 1}, "frp256v1");
  226|      0|      case 0x6A784:
  ------------------
  |  Branch (226:7): [True: 0, False: 12.9k]
  ------------------
  227|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 12, 10, 1, 1}, "PKCS12.KeyBag");
  228|      0|      case 0x6A785:
  ------------------
  |  Branch (228:7): [True: 0, False: 12.9k]
  ------------------
  229|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 12, 10, 1, 2}, "PKCS12.PKCS8ShroudedKeyBag");
  230|      0|      case 0x6A786:
  ------------------
  |  Branch (230:7): [True: 0, False: 12.9k]
  ------------------
  231|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 12, 10, 1, 3}, "PKCS12.CertBag");
  232|      0|      case 0x6A787:
  ------------------
  |  Branch (232:7): [True: 0, False: 12.9k]
  ------------------
  233|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 12, 10, 1, 4}, "PKCS12.CRLBag");
  234|      0|      case 0x6A788:
  ------------------
  |  Branch (234:7): [True: 0, False: 12.9k]
  ------------------
  235|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 12, 10, 1, 5}, "PKCS12.SecretBag");
  236|      0|      case 0x6A789:
  ------------------
  |  Branch (236:7): [True: 0, False: 12.9k]
  ------------------
  237|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 12, 10, 1, 6}, "PKCS12.SafeContentsBag");
  238|      0|      case 0x6EB86:
  ------------------
  |  Branch (238:7): [True: 0, False: 12.9k]
  ------------------
  239|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 6, 1}, "GOST-34.10-2012-256/SHA-256");
  240|      0|      case 0x6EC47:
  ------------------
  |  Branch (240:7): [True: 0, False: 12.9k]
  ------------------
  241|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 7, 1}, "Kyber-512-r3");
  242|      0|      case 0x6EC48:
  ------------------
  |  Branch (242:7): [True: 0, False: 12.9k]
  ------------------
  243|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 7, 2}, "Kyber-768-r3");
  244|      0|      case 0x6EC49:
  ------------------
  |  Branch (244:7): [True: 0, False: 12.9k]
  ------------------
  245|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 7, 3}, "Kyber-1024-r3");
  246|      0|      case 0x6EDC9:
  ------------------
  |  Branch (246:7): [True: 0, False: 12.9k]
  ------------------
  247|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 9, 1}, "Dilithium-4x4-r3");
  248|      0|      case 0x6EDCA:
  ------------------
  |  Branch (248:7): [True: 0, False: 12.9k]
  ------------------
  249|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 9, 2}, "Dilithium-6x5-r3");
  250|      0|      case 0x6EDCB:
  ------------------
  |  Branch (250:7): [True: 0, False: 12.9k]
  ------------------
  251|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 9, 3}, "Dilithium-8x7-r3");
  252|      0|      case 0x6EE8A:
  ------------------
  |  Branch (252:7): [True: 0, False: 12.9k]
  ------------------
  253|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 10, 1}, "Dilithium-4x4-AES-r3");
  254|      0|      case 0x6EE8B:
  ------------------
  |  Branch (254:7): [True: 0, False: 12.9k]
  ------------------
  255|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 10, 2}, "Dilithium-6x5-AES-r3");
  256|      0|      case 0x6EE8C:
  ------------------
  |  Branch (256:7): [True: 0, False: 12.9k]
  ------------------
  257|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 10, 3}, "Dilithium-8x7-AES-r3");
  258|      0|      case 0x6EF4B:
  ------------------
  |  Branch (258:7): [True: 0, False: 12.9k]
  ------------------
  259|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 11, 1}, "Kyber-512-90s-r3");
  260|      0|      case 0x6EF4C:
  ------------------
  |  Branch (260:7): [True: 0, False: 12.9k]
  ------------------
  261|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 11, 2}, "Kyber-768-90s-r3");
  262|      0|      case 0x6EF4D:
  ------------------
  |  Branch (262:7): [True: 0, False: 12.9k]
  ------------------
  263|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 11, 3}, "Kyber-1024-90s-r3");
  264|      0|      case 0x6F18E:
  ------------------
  |  Branch (264:7): [True: 0, False: 12.9k]
  ------------------
  265|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 14, 1}, "FrodoKEM-640-SHAKE");
  266|      0|      case 0x6F18F:
  ------------------
  |  Branch (266:7): [True: 0, False: 12.9k]
  ------------------
  267|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 14, 2}, "FrodoKEM-976-SHAKE");
  268|      0|      case 0x6F190:
  ------------------
  |  Branch (268:7): [True: 0, False: 12.9k]
  ------------------
  269|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 14, 3}, "FrodoKEM-1344-SHAKE");
  270|      0|      case 0x6F24F:
  ------------------
  |  Branch (270:7): [True: 0, False: 12.9k]
  ------------------
  271|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 15, 1}, "FrodoKEM-640-AES");
  272|      0|      case 0x6F250:
  ------------------
  |  Branch (272:7): [True: 0, False: 12.9k]
  ------------------
  273|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 15, 2}, "FrodoKEM-976-AES");
  274|      0|      case 0x6F251:
  ------------------
  |  Branch (274:7): [True: 0, False: 12.9k]
  ------------------
  275|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 15, 3}, "FrodoKEM-1344-AES");
  276|      0|      case 0x6F310:
  ------------------
  |  Branch (276:7): [True: 0, False: 12.9k]
  ------------------
  277|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 16, 1}, "eFrodoKEM-640-SHAKE");
  278|      0|      case 0x6F311:
  ------------------
  |  Branch (278:7): [True: 0, False: 12.9k]
  ------------------
  279|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 16, 2}, "eFrodoKEM-976-SHAKE");
  280|      0|      case 0x6F312:
  ------------------
  |  Branch (280:7): [True: 0, False: 12.9k]
  ------------------
  281|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 16, 3}, "eFrodoKEM-1344-SHAKE");
  282|      0|      case 0x6F3D1:
  ------------------
  |  Branch (282:7): [True: 0, False: 12.9k]
  ------------------
  283|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 17, 1}, "eFrodoKEM-640-AES");
  284|      0|      case 0x6F3D2:
  ------------------
  |  Branch (284:7): [True: 0, False: 12.9k]
  ------------------
  285|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 17, 2}, "eFrodoKEM-976-AES");
  286|      0|      case 0x6F3D3:
  ------------------
  |  Branch (286:7): [True: 0, False: 12.9k]
  ------------------
  287|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 17, 3}, "eFrodoKEM-1344-AES");
  288|      0|      case 0x6F492:
  ------------------
  |  Branch (288:7): [True: 0, False: 12.9k]
  ------------------
  289|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 18, 1}, "ClassicMcEliece_6688128pc");
  290|      0|      case 0x6F493:
  ------------------
  |  Branch (290:7): [True: 0, False: 12.9k]
  ------------------
  291|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 18, 2}, "ClassicMcEliece_6688128pcf");
  292|      0|      case 0x6F494:
  ------------------
  |  Branch (292:7): [True: 0, False: 12.9k]
  ------------------
  293|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 18, 3}, "ClassicMcEliece_6960119pc");
  294|      0|      case 0x6F495:
  ------------------
  |  Branch (294:7): [True: 0, False: 12.9k]
  ------------------
  295|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 18, 4}, "ClassicMcEliece_6960119pcf");
  296|      0|      case 0x6F496:
  ------------------
  |  Branch (296:7): [True: 0, False: 12.9k]
  ------------------
  297|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 18, 5}, "ClassicMcEliece_8192128pc");
  298|      0|      case 0x6F497:
  ------------------
  |  Branch (298:7): [True: 0, False: 12.9k]
  ------------------
  299|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 18, 6}, "ClassicMcEliece_8192128pcf");
  300|      0|      case 0x6F79D:
  ------------------
  |  Branch (300:7): [True: 0, False: 12.9k]
  ------------------
  301|      0|         return if_match(oid, {2, 16, 840, 1, 113730, 1, 13}, "Certificate Comment");
  302|      0|      case 0x701A0:
  ------------------
  |  Branch (302:7): [True: 0, False: 12.9k]
  ------------------
  303|      0|         return if_match(oid, {1, 3, 36, 3, 3, 2, 5, 2, 1}, "ECGDSA");
  304|      0|      case 0x70322:
  ------------------
  |  Branch (304:7): [True: 0, False: 12.9k]
  ------------------
  305|      0|         return if_match(oid, {1, 3, 36, 3, 3, 2, 5, 4, 1}, "ECGDSA/RIPEMD-160");
  306|      0|      case 0x70323:
  ------------------
  |  Branch (306:7): [True: 0, False: 12.9k]
  ------------------
  307|      0|         return if_match(oid, {1, 3, 36, 3, 3, 2, 5, 4, 2}, "ECGDSA/SHA-1");
  308|      0|      case 0x70324:
  ------------------
  |  Branch (308:7): [True: 0, False: 12.9k]
  ------------------
  309|      0|         return if_match(oid, {1, 3, 36, 3, 3, 2, 5, 4, 3}, "ECGDSA/SHA-224");
  310|      0|      case 0x70325:
  ------------------
  |  Branch (310:7): [True: 0, False: 12.9k]
  ------------------
  311|      0|         return if_match(oid, {1, 3, 36, 3, 3, 2, 5, 4, 4}, "ECGDSA/SHA-256");
  312|      0|      case 0x70326:
  ------------------
  |  Branch (312:7): [True: 0, False: 12.9k]
  ------------------
  313|      0|         return if_match(oid, {1, 3, 36, 3, 3, 2, 5, 4, 5}, "ECGDSA/SHA-384");
  314|      0|      case 0x70327:
  ------------------
  |  Branch (314:7): [True: 0, False: 12.9k]
  ------------------
  315|      0|         return if_match(oid, {1, 3, 36, 3, 3, 2, 5, 4, 6}, "ECGDSA/SHA-512");
  316|      0|      case 0x72B21:
  ------------------
  |  Branch (316:7): [True: 0, False: 12.9k]
  ------------------
  317|      0|         return if_match(oid, {1, 2, 643, 7, 1, 1, 1, 1}, "GOST-34.10-2012-256");
  318|      0|      case 0x72B22:
  ------------------
  |  Branch (318:7): [True: 0, False: 12.9k]
  ------------------
  319|      0|         return if_match(oid, {1, 2, 643, 7, 1, 1, 1, 2}, "GOST-34.10-2012-512");
  320|      0|      case 0x72BE3:
  ------------------
  |  Branch (320:7): [True: 0, False: 12.9k]
  ------------------
  321|      0|         return if_match(oid, {1, 2, 643, 7, 1, 1, 2, 2}, "Streebog-256");
  322|      0|      case 0x72BE4:
  ------------------
  |  Branch (322:7): [True: 0, False: 12.9k]
  ------------------
  323|      0|         return if_match(oid, {1, 2, 643, 7, 1, 1, 2, 3}, "Streebog-512");
  324|      0|      case 0x72CA4:
  ------------------
  |  Branch (324:7): [True: 0, False: 12.9k]
  ------------------
  325|      0|         return if_match(oid, {1, 2, 643, 7, 1, 1, 3, 2}, "GOST-34.10-2012-256/Streebog-256");
  326|      0|      case 0x72CA5:
  ------------------
  |  Branch (326:7): [True: 0, False: 12.9k]
  ------------------
  327|      0|         return if_match(oid, {1, 2, 643, 7, 1, 1, 3, 3}, "GOST-34.10-2012-512/Streebog-512");
  328|      0|      case 0x7C7C7:
  ------------------
  |  Branch (328:7): [True: 0, False: 12.9k]
  ------------------
  329|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 9, 22, 1}, "PKCS9.X509Certificate");
  330|      0|      case 0x7C7C8:
  ------------------
  |  Branch (330:7): [True: 0, False: 12.9k]
  ------------------
  331|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 9, 22, 2}, "PKCS9.SDSICertificate");
  332|      0|      case 0x7C888:
  ------------------
  |  Branch (332:7): [True: 0, False: 12.9k]
  ------------------
  333|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 9, 23, 1}, "PKCS9.X509CRL");
  334|      0|      case 0x7E10F:
  ------------------
  |  Branch (334:7): [True: 0, False: 12.9k]
  ------------------
  335|      0|         return if_match(oid, {2, 5, 4, 3}, "X520.CommonName");
  336|      0|      case 0x7E110:
  ------------------
  |  Branch (336:7): [True: 0, False: 12.9k]
  ------------------
  337|      0|         return if_match(oid, {2, 5, 4, 4}, "X520.Surname");
  338|      0|      case 0x7E111:
  ------------------
  |  Branch (338:7): [True: 0, False: 12.9k]
  ------------------
  339|      0|         return if_match(oid, {2, 5, 4, 5}, "X520.SerialNumber");
  340|      0|      case 0x7E112:
  ------------------
  |  Branch (340:7): [True: 0, False: 12.9k]
  ------------------
  341|      0|         return if_match(oid, {2, 5, 4, 6}, "X520.Country");
  342|      0|      case 0x7E113:
  ------------------
  |  Branch (342:7): [True: 0, False: 12.9k]
  ------------------
  343|      0|         return if_match(oid, {2, 5, 4, 7}, "X520.Locality");
  344|      0|      case 0x7E114:
  ------------------
  |  Branch (344:7): [True: 0, False: 12.9k]
  ------------------
  345|      0|         return if_match(oid, {2, 5, 4, 8}, "X520.State");
  346|      0|      case 0x7E115:
  ------------------
  |  Branch (346:7): [True: 0, False: 12.9k]
  ------------------
  347|      0|         return if_match(oid, {2, 5, 4, 9}, "X520.StreetAddress");
  348|      0|      case 0x7E116:
  ------------------
  |  Branch (348:7): [True: 0, False: 12.9k]
  ------------------
  349|      0|         return if_match(oid, {2, 5, 4, 10}, "X520.Organization");
  350|      0|      case 0x7E117:
  ------------------
  |  Branch (350:7): [True: 0, False: 12.9k]
  ------------------
  351|      0|         return if_match(oid, {2, 5, 4, 11}, "X520.OrganizationalUnit");
  352|      0|      case 0x7E118:
  ------------------
  |  Branch (352:7): [True: 0, False: 12.9k]
  ------------------
  353|      0|         return if_match(oid, {2, 5, 4, 12}, "X520.Title");
  354|      0|      case 0x7E136:
  ------------------
  |  Branch (354:7): [True: 0, False: 12.9k]
  ------------------
  355|      0|         return if_match(oid, {2, 5, 4, 42}, "X520.GivenName");
  356|      0|      case 0x7E137:
  ------------------
  |  Branch (356:7): [True: 0, False: 12.9k]
  ------------------
  357|      0|         return if_match(oid, {2, 5, 4, 43}, "X520.Initials");
  358|      0|      case 0x7E138:
  ------------------
  |  Branch (358:7): [True: 0, False: 12.9k]
  ------------------
  359|      0|         return if_match(oid, {2, 5, 4, 44}, "X520.GenerationalQualifier");
  360|      0|      case 0x7E13A:
  ------------------
  |  Branch (360:7): [True: 0, False: 12.9k]
  ------------------
  361|      0|         return if_match(oid, {2, 5, 4, 46}, "X520.DNQualifier");
  362|      0|      case 0x7E14D:
  ------------------
  |  Branch (362:7): [True: 0, False: 12.9k]
  ------------------
  363|      0|         return if_match(oid, {2, 5, 4, 65}, "X520.Pseudonym");
  364|      0|      case 0x7F3F3:
  ------------------
  |  Branch (364:7): [True: 0, False: 12.9k]
  ------------------
  365|      0|         return if_match(oid, {2, 5, 29, 14}, "X509v3.SubjectKeyIdentifier");
  366|      0|      case 0x7F3F4:
  ------------------
  |  Branch (366:7): [True: 0, False: 12.9k]
  ------------------
  367|      0|         return if_match(oid, {2, 5, 29, 15}, "X509v3.KeyUsage");
  368|      0|      case 0x7F3F5:
  ------------------
  |  Branch (368:7): [True: 0, False: 12.9k]
  ------------------
  369|      0|         return if_match(oid, {2, 5, 29, 16}, "X509v3.PrivateKeyUsagePeriod");
  370|      0|      case 0x7F3F6:
  ------------------
  |  Branch (370:7): [True: 0, False: 12.9k]
  ------------------
  371|      0|         return if_match(oid, {2, 5, 29, 17}, "X509v3.SubjectAlternativeName");
  372|      0|      case 0x7F3F7:
  ------------------
  |  Branch (372:7): [True: 0, False: 12.9k]
  ------------------
  373|      0|         return if_match(oid, {2, 5, 29, 18}, "X509v3.IssuerAlternativeName");
  374|      0|      case 0x7F3F8:
  ------------------
  |  Branch (374:7): [True: 0, False: 12.9k]
  ------------------
  375|      0|         return if_match(oid, {2, 5, 29, 19}, "X509v3.BasicConstraints");
  376|      0|      case 0x7F3F9:
  ------------------
  |  Branch (376:7): [True: 0, False: 12.9k]
  ------------------
  377|      0|         return if_match(oid, {2, 5, 29, 20}, "X509v3.CRLNumber");
  378|      0|      case 0x7F3FA:
  ------------------
  |  Branch (378:7): [True: 0, False: 12.9k]
  ------------------
  379|      0|         return if_match(oid, {2, 5, 29, 21}, "X509v3.ReasonCode");
  380|      0|      case 0x7F3FC:
  ------------------
  |  Branch (380:7): [True: 0, False: 12.9k]
  ------------------
  381|      0|         return if_match(oid, {2, 5, 29, 23}, "X509v3.HoldInstructionCode");
  382|      0|      case 0x7F3FD:
  ------------------
  |  Branch (382:7): [True: 0, False: 12.9k]
  ------------------
  383|      0|         return if_match(oid, {2, 5, 29, 24}, "X509v3.InvalidityDate");
  384|      0|      case 0x7F401:
  ------------------
  |  Branch (384:7): [True: 0, False: 12.9k]
  ------------------
  385|      0|         return if_match(oid, {2, 5, 29, 28}, "X509v3.CRLIssuingDistributionPoint");
  386|      0|      case 0x7F403:
  ------------------
  |  Branch (386:7): [True: 0, False: 12.9k]
  ------------------
  387|      0|         return if_match(oid, {2, 5, 29, 30}, "X509v3.NameConstraints");
  388|      0|      case 0x7F404:
  ------------------
  |  Branch (388:7): [True: 0, False: 12.9k]
  ------------------
  389|      0|         return if_match(oid, {2, 5, 29, 31}, "X509v3.CRLDistributionPoints");
  390|      0|      case 0x7F405:
  ------------------
  |  Branch (390:7): [True: 0, False: 12.9k]
  ------------------
  391|      0|         return if_match(oid, {2, 5, 29, 32}, "X509v3.CertificatePolicies");
  392|      0|      case 0x7F408:
  ------------------
  |  Branch (392:7): [True: 0, False: 12.9k]
  ------------------
  393|      0|         return if_match(oid, {2, 5, 29, 35}, "X509v3.AuthorityKeyIdentifier");
  394|      0|      case 0x7F409:
  ------------------
  |  Branch (394:7): [True: 0, False: 12.9k]
  ------------------
  395|      0|         return if_match(oid, {2, 5, 29, 36}, "X509v3.PolicyConstraints");
  396|      0|      case 0x7F40A:
  ------------------
  |  Branch (396:7): [True: 0, False: 12.9k]
  ------------------
  397|      0|         return if_match(oid, {2, 5, 29, 37}, "X509v3.ExtendedKeyUsage");
  398|      0|      case 0x7F41D:
  ------------------
  |  Branch (398:7): [True: 0, False: 12.9k]
  ------------------
  399|      0|         return if_match(oid, {2, 5, 29, 56}, "X509v3.NoRevocationAvailable");
  400|      0|      case 0x80B84:
  ------------------
  |  Branch (400:7): [True: 0, False: 12.9k]
  ------------------
  401|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 2, 1}, "AES-128/OCB");
  402|      0|      case 0x80B85:
  ------------------
  |  Branch (402:7): [True: 0, False: 12.9k]
  ------------------
  403|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 2, 2}, "AES-192/OCB");
  404|      0|      case 0x80B86:
  ------------------
  |  Branch (404:7): [True: 0, False: 12.9k]
  ------------------
  405|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 2, 3}, "AES-256/OCB");
  406|      0|      case 0x80B87:
  ------------------
  |  Branch (406:7): [True: 0, False: 12.9k]
  ------------------
  407|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 2, 4}, "Serpent/OCB");
  408|      0|      case 0x80B88:
  ------------------
  |  Branch (408:7): [True: 0, False: 12.9k]
  ------------------
  409|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 2, 5}, "Twofish/OCB");
  410|      0|      case 0x80B89:
  ------------------
  |  Branch (410:7): [True: 0, False: 12.9k]
  ------------------
  411|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 2, 6}, "Camellia-128/OCB");
  412|      0|      case 0x80B8A:
  ------------------
  |  Branch (412:7): [True: 0, False: 12.9k]
  ------------------
  413|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 2, 7}, "Camellia-192/OCB");
  414|      0|      case 0x80B8B:
  ------------------
  |  Branch (414:7): [True: 0, False: 12.9k]
  ------------------
  415|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 2, 8}, "Camellia-256/OCB");
  416|      0|      case 0x80D06:
  ------------------
  |  Branch (416:7): [True: 0, False: 12.9k]
  ------------------
  417|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 4, 1}, "AES-128/SIV");
  418|      0|      case 0x80D07:
  ------------------
  |  Branch (418:7): [True: 0, False: 12.9k]
  ------------------
  419|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 4, 2}, "AES-192/SIV");
  420|      0|      case 0x80D08:
  ------------------
  |  Branch (420:7): [True: 0, False: 12.9k]
  ------------------
  421|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 4, 3}, "AES-256/SIV");
  422|      0|      case 0x80D09:
  ------------------
  |  Branch (422:7): [True: 0, False: 12.9k]
  ------------------
  423|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 4, 4}, "Serpent/SIV");
  424|      0|      case 0x80D0A:
  ------------------
  |  Branch (424:7): [True: 0, False: 12.9k]
  ------------------
  425|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 4, 5}, "Twofish/SIV");
  426|      0|      case 0x80D0B:
  ------------------
  |  Branch (426:7): [True: 0, False: 12.9k]
  ------------------
  427|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 4, 6}, "Camellia-128/SIV");
  428|      0|      case 0x80D0C:
  ------------------
  |  Branch (428:7): [True: 0, False: 12.9k]
  ------------------
  429|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 4, 7}, "Camellia-192/SIV");
  430|      0|      case 0x80D0D:
  ------------------
  |  Branch (430:7): [True: 0, False: 12.9k]
  ------------------
  431|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 4, 8}, "Camellia-256/SIV");
  432|      0|      case 0x80D0E:
  ------------------
  |  Branch (432:7): [True: 0, False: 12.9k]
  ------------------
  433|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 4, 9}, "SM4/SIV");
  434|      0|      case 0x84C6A:
  ------------------
  |  Branch (434:7): [True: 0, False: 12.9k]
  ------------------
  435|      0|         return if_match(oid, {1, 2, 392, 200011, 61, 1, 1, 1, 2}, "Camellia-128/CBC");
  436|      0|      case 0x84C6B:
  ------------------
  |  Branch (436:7): [True: 0, False: 12.9k]
  ------------------
  437|      0|         return if_match(oid, {1, 2, 392, 200011, 61, 1, 1, 1, 3}, "Camellia-192/CBC");
  438|      0|      case 0x84C6C:
  ------------------
  |  Branch (438:7): [True: 0, False: 12.9k]
  ------------------
  439|      0|         return if_match(oid, {1, 2, 392, 200011, 61, 1, 1, 1, 4}, "Camellia-256/CBC");
  440|      0|      case 0x88CD3:
  ------------------
  |  Branch (440:7): [True: 0, False: 12.9k]
  ------------------
  441|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 9, 16, 3, 6}, "KeyWrap.TripleDES");
  442|      0|      case 0x88CD5:
  ------------------
  |  Branch (442:7): [True: 0, False: 12.9k]
  ------------------
  443|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 9, 16, 3, 8}, "Compression.Zlib");
  444|      0|      case 0x88CDE:
  ------------------
  |  Branch (444:7): [True: 0, False: 12.9k]
  ------------------
  445|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 9, 16, 3, 17}, "HSS-LMS");
  446|      0|      case 0x88CDF:
  ------------------
  |  Branch (446:7): [True: 0, False: 12.9k]
  ------------------
  447|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 9, 16, 3, 18}, "ChaCha20Poly1305");
  448|      0|      case 0x92296:
  ------------------
  |  Branch (448:7): [True: 0, False: 12.9k]
  ------------------
  449|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 1, 2}, "AES-128/CBC");
  450|      0|      case 0x92299:
  ------------------
  |  Branch (450:7): [True: 0, False: 12.9k]
  ------------------
  451|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 1, 5}, "KeyWrap.AES-128");
  452|      0|      case 0x9229A:
  ------------------
  |  Branch (452:7): [True: 0, False: 12.9k]
  ------------------
  453|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 1, 6}, "AES-128/GCM");
  454|      0|      case 0x9229B:
  ------------------
  |  Branch (454:7): [True: 0, False: 12.9k]
  ------------------
  455|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 1, 7}, "AES-128/CCM");
  456|      0|      case 0x922AA:
  ------------------
  |  Branch (456:7): [True: 0, False: 12.9k]
  ------------------
  457|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 1, 22}, "AES-192/CBC");
  458|      0|      case 0x922AD:
  ------------------
  |  Branch (458:7): [True: 0, False: 12.9k]
  ------------------
  459|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 1, 25}, "KeyWrap.AES-192");
  460|      0|      case 0x922AE:
  ------------------
  |  Branch (460:7): [True: 0, False: 12.9k]
  ------------------
  461|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 1, 26}, "AES-192/GCM");
  462|      0|      case 0x922AF:
  ------------------
  |  Branch (462:7): [True: 0, False: 12.9k]
  ------------------
  463|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 1, 27}, "AES-192/CCM");
  464|      0|      case 0x922BE:
  ------------------
  |  Branch (464:7): [True: 0, False: 12.9k]
  ------------------
  465|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 1, 42}, "AES-256/CBC");
  466|      0|      case 0x922C1:
  ------------------
  |  Branch (466:7): [True: 0, False: 12.9k]
  ------------------
  467|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 1, 45}, "KeyWrap.AES-256");
  468|      0|      case 0x922C2:
  ------------------
  |  Branch (468:7): [True: 0, False: 12.9k]
  ------------------
  469|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 1, 46}, "AES-256/GCM");
  470|      0|      case 0x922C3:
  ------------------
  |  Branch (470:7): [True: 0, False: 12.9k]
  ------------------
  471|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 1, 47}, "AES-256/CCM");
  472|      0|      case 0x92356:
  ------------------
  |  Branch (472:7): [True: 0, False: 12.9k]
  ------------------
  473|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 2, 1}, "SHA-256");
  474|      0|      case 0x92357:
  ------------------
  |  Branch (474:7): [True: 0, False: 12.9k]
  ------------------
  475|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 2, 2}, "SHA-384");
  476|      0|      case 0x92358:
  ------------------
  |  Branch (476:7): [True: 0, False: 12.9k]
  ------------------
  477|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 2, 3}, "SHA-512");
  478|      0|      case 0x92359:
  ------------------
  |  Branch (478:7): [True: 0, False: 12.9k]
  ------------------
  479|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 2, 4}, "SHA-224");
  480|      0|      case 0x9235B:
  ------------------
  |  Branch (480:7): [True: 0, False: 12.9k]
  ------------------
  481|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 2, 6}, "SHA-512-256");
  482|      0|      case 0x9235C:
  ------------------
  |  Branch (482:7): [True: 0, False: 12.9k]
  ------------------
  483|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 2, 7}, "SHA-3(224)");
  484|      0|      case 0x9235D:
  ------------------
  |  Branch (484:7): [True: 0, False: 12.9k]
  ------------------
  485|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 2, 8}, "SHA-3(256)");
  486|      0|      case 0x9235E:
  ------------------
  |  Branch (486:7): [True: 0, False: 12.9k]
  ------------------
  487|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 2, 9}, "SHA-3(384)");
  488|      0|      case 0x9235F:
  ------------------
  |  Branch (488:7): [True: 0, False: 12.9k]
  ------------------
  489|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 2, 10}, "SHA-3(512)");
  490|      0|      case 0x92360:
  ------------------
  |  Branch (490:7): [True: 0, False: 12.9k]
  ------------------
  491|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 2, 11}, "SHAKE-128");
  492|      0|      case 0x92361:
  ------------------
  |  Branch (492:7): [True: 0, False: 12.9k]
  ------------------
  493|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 2, 12}, "SHAKE-256");
  494|      0|      case 0x92417:
  ------------------
  |  Branch (494:7): [True: 0, False: 12.9k]
  ------------------
  495|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 1}, "DSA/SHA-224");
  496|      0|      case 0x92418:
  ------------------
  |  Branch (496:7): [True: 0, False: 12.9k]
  ------------------
  497|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 2}, "DSA/SHA-256");
  498|      0|      case 0x92419:
  ------------------
  |  Branch (498:7): [True: 0, False: 12.9k]
  ------------------
  499|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 3}, "DSA/SHA-384");
  500|      0|      case 0x9241A:
  ------------------
  |  Branch (500:7): [True: 0, False: 12.9k]
  ------------------
  501|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 4}, "DSA/SHA-512");
  502|      0|      case 0x9241B:
  ------------------
  |  Branch (502:7): [True: 0, False: 12.9k]
  ------------------
  503|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 5}, "DSA/SHA-3(224)");
  504|      0|      case 0x9241C:
  ------------------
  |  Branch (504:7): [True: 0, False: 12.9k]
  ------------------
  505|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 6}, "DSA/SHA-3(256)");
  506|      0|      case 0x9241D:
  ------------------
  |  Branch (506:7): [True: 0, False: 12.9k]
  ------------------
  507|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 7}, "DSA/SHA-3(384)");
  508|      0|      case 0x9241E:
  ------------------
  |  Branch (508:7): [True: 0, False: 12.9k]
  ------------------
  509|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 8}, "DSA/SHA-3(512)");
  510|      0|      case 0x9241F:
  ------------------
  |  Branch (510:7): [True: 0, False: 12.9k]
  ------------------
  511|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 9}, "ECDSA/SHA-3(224)");
  512|      0|      case 0x92420:
  ------------------
  |  Branch (512:7): [True: 0, False: 12.9k]
  ------------------
  513|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 10}, "ECDSA/SHA-3(256)");
  514|      0|      case 0x92421:
  ------------------
  |  Branch (514:7): [True: 0, False: 12.9k]
  ------------------
  515|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 11}, "ECDSA/SHA-3(384)");
  516|      0|      case 0x92422:
  ------------------
  |  Branch (516:7): [True: 0, False: 12.9k]
  ------------------
  517|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 12}, "ECDSA/SHA-3(512)");
  518|      0|      case 0x92423:
  ------------------
  |  Branch (518:7): [True: 0, False: 12.9k]
  ------------------
  519|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 13}, "RSA/PKCS1v15(SHA-3(224))");
  520|      0|      case 0x92424:
  ------------------
  |  Branch (520:7): [True: 0, False: 12.9k]
  ------------------
  521|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 14}, "RSA/PKCS1v15(SHA-3(256))");
  522|      0|      case 0x92425:
  ------------------
  |  Branch (522:7): [True: 0, False: 12.9k]
  ------------------
  523|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 15}, "RSA/PKCS1v15(SHA-3(384))");
  524|      0|      case 0x92426:
  ------------------
  |  Branch (524:7): [True: 0, False: 12.9k]
  ------------------
  525|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 16}, "RSA/PKCS1v15(SHA-3(512))");
  526|      0|      case 0x92427:
  ------------------
  |  Branch (526:7): [True: 0, False: 12.9k]
  ------------------
  527|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 17}, "ML-DSA-4x4");
  528|      0|      case 0x92428:
  ------------------
  |  Branch (528:7): [True: 0, False: 12.9k]
  ------------------
  529|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 18}, "ML-DSA-6x5");
  530|      0|      case 0x92429:
  ------------------
  |  Branch (530:7): [True: 0, False: 12.9k]
  ------------------
  531|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 19}, "ML-DSA-8x7");
  532|      0|      case 0x9242A:
  ------------------
  |  Branch (532:7): [True: 0, False: 12.9k]
  ------------------
  533|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 20}, "SLH-DSA-SHA2-128s");
  534|      0|      case 0x9242B:
  ------------------
  |  Branch (534:7): [True: 0, False: 12.9k]
  ------------------
  535|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 21}, "SLH-DSA-SHA2-128f");
  536|      0|      case 0x9242C:
  ------------------
  |  Branch (536:7): [True: 0, False: 12.9k]
  ------------------
  537|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 22}, "SLH-DSA-SHA2-192s");
  538|      0|      case 0x9242D:
  ------------------
  |  Branch (538:7): [True: 0, False: 12.9k]
  ------------------
  539|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 23}, "SLH-DSA-SHA2-192f");
  540|      0|      case 0x9242E:
  ------------------
  |  Branch (540:7): [True: 0, False: 12.9k]
  ------------------
  541|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 24}, "SLH-DSA-SHA2-256s");
  542|      0|      case 0x9242F:
  ------------------
  |  Branch (542:7): [True: 0, False: 12.9k]
  ------------------
  543|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 25}, "SLH-DSA-SHA2-256f");
  544|      0|      case 0x92430:
  ------------------
  |  Branch (544:7): [True: 0, False: 12.9k]
  ------------------
  545|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 26}, "SLH-DSA-SHAKE-128s");
  546|      0|      case 0x92431:
  ------------------
  |  Branch (546:7): [True: 0, False: 12.9k]
  ------------------
  547|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 27}, "SLH-DSA-SHAKE-128f");
  548|      0|      case 0x92432:
  ------------------
  |  Branch (548:7): [True: 0, False: 12.9k]
  ------------------
  549|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 28}, "SLH-DSA-SHAKE-192s");
  550|      0|      case 0x92433:
  ------------------
  |  Branch (550:7): [True: 0, False: 12.9k]
  ------------------
  551|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 29}, "SLH-DSA-SHAKE-192f");
  552|      0|      case 0x92434:
  ------------------
  |  Branch (552:7): [True: 0, False: 12.9k]
  ------------------
  553|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 30}, "SLH-DSA-SHAKE-256s");
  554|      0|      case 0x92435:
  ------------------
  |  Branch (554:7): [True: 0, False: 12.9k]
  ------------------
  555|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 3, 31}, "SLH-DSA-SHAKE-256f");
  556|      0|      case 0x924D8:
  ------------------
  |  Branch (556:7): [True: 0, False: 12.9k]
  ------------------
  557|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 4, 1}, "ML-KEM-512");
  558|      0|      case 0x924D9:
  ------------------
  |  Branch (558:7): [True: 0, False: 12.9k]
  ------------------
  559|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 4, 2}, "ML-KEM-768");
  560|      0|      case 0x924DA:
  ------------------
  |  Branch (560:7): [True: 0, False: 12.9k]
  ------------------
  561|      0|         return if_match(oid, {2, 16, 840, 1, 101, 3, 4, 4, 3}, "ML-KEM-1024");
  562|      0|      case 0x9479F:
  ------------------
  |  Branch (562:7): [True: 0, False: 12.9k]
  ------------------
  563|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 1, 1}, "PKIX.AuthorityInformationAccess");
  564|      0|      case 0x947A5:
  ------------------
  |  Branch (564:7): [True: 0, False: 12.9k]
  ------------------
  565|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 1, 7}, "PKIX.IpAddrBlocks");
  566|      0|      case 0x947A6:
  ------------------
  |  Branch (566:7): [True: 0, False: 12.9k]
  ------------------
  567|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 1, 8}, "PKIX.AutonomousSysIds");
  568|      0|      case 0x947B8:
  ------------------
  |  Branch (568:7): [True: 0, False: 12.9k]
  ------------------
  569|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 1, 26}, "PKIX.TNAuthList");
  570|      0|      case 0x94921:
  ------------------
  |  Branch (570:7): [True: 0, False: 12.9k]
  ------------------
  571|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 3, 1}, "PKIX.ServerAuth");
  572|      0|      case 0x94922:
  ------------------
  |  Branch (572:7): [True: 0, False: 12.9k]
  ------------------
  573|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 3, 2}, "PKIX.ClientAuth");
  574|      0|      case 0x94923:
  ------------------
  |  Branch (574:7): [True: 0, False: 12.9k]
  ------------------
  575|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 3, 3}, "PKIX.CodeSigning");
  576|      0|      case 0x94924:
  ------------------
  |  Branch (576:7): [True: 0, False: 12.9k]
  ------------------
  577|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 3, 4}, "PKIX.EmailProtection");
  578|      0|      case 0x94925:
  ------------------
  |  Branch (578:7): [True: 0, False: 12.9k]
  ------------------
  579|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 3, 5}, "PKIX.IPsecEndSystem");
  580|      0|      case 0x94926:
  ------------------
  |  Branch (580:7): [True: 0, False: 12.9k]
  ------------------
  581|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 3, 6}, "PKIX.IPsecTunnel");
  582|      0|      case 0x94927:
  ------------------
  |  Branch (582:7): [True: 0, False: 12.9k]
  ------------------
  583|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 3, 7}, "PKIX.IPsecUser");
  584|      0|      case 0x94928:
  ------------------
  |  Branch (584:7): [True: 0, False: 12.9k]
  ------------------
  585|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 3, 8}, "PKIX.TimeStamping");
  586|      0|      case 0x94929:
  ------------------
  |  Branch (586:7): [True: 0, False: 12.9k]
  ------------------
  587|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 3, 9}, "PKIX.OCSPSigning");
  588|      0|      case 0x94CEA:
  ------------------
  |  Branch (588:7): [True: 0, False: 12.9k]
  ------------------
  589|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 8, 5}, "PKIX.XMPPAddr");
  590|      0|      case 0x94CEE:
  ------------------
  |  Branch (590:7): [True: 0, False: 12.9k]
  ------------------
  591|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 8, 9}, "PKIX.SmtpUTF8Mailbox");
  592|      0|      case 0x954DB:
  ------------------
  |  Branch (592:7): [True: 0, False: 12.9k]
  ------------------
  593|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 311, 20, 2, 2}, "Microsoft SmartcardLogon");
  594|      0|      case 0x954DC:
  ------------------
  |  Branch (594:7): [True: 0, False: 12.9k]
  ------------------
  595|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 311, 20, 2, 3}, "Microsoft UPN");
  596|      0|      case 0x96B0E:
  ------------------
  |  Branch (596:7): [True: 0, False: 12.9k]
  ------------------
  597|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 48, 1}, "PKIX.OCSP");
  598|      0|      case 0x96B0F:
  ------------------
  |  Branch (598:7): [True: 0, False: 12.9k]
  ------------------
  599|      0|         return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 48, 2}, "PKIX.CertificateAuthorityIssuers");
  600|      0|      case 0x96C77:
  ------------------
  |  Branch (600:7): [True: 0, False: 12.9k]
  ------------------
  601|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 12, 1, 3}, "PBE-SHA1-3DES");
  602|      0|      case 0x96C78:
  ------------------
  |  Branch (602:7): [True: 0, False: 12.9k]
  ------------------
  603|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 12, 1, 4}, "PBE-SHA1-2DES");
  604|      0|      case 0x9A008:
  ------------------
  |  Branch (604:7): [True: 0, False: 12.9k]
  ------------------
  605|      0|         return if_match(oid, {1, 3, 36, 3, 3, 2, 8, 1, 1, 1}, "brainpool160r1");
  606|      0|      case 0x9A00A:
  ------------------
  |  Branch (606:7): [True: 0, False: 12.9k]
  ------------------
  607|      0|         return if_match(oid, {1, 3, 36, 3, 3, 2, 8, 1, 1, 3}, "brainpool192r1");
  608|      0|      case 0x9A00C:
  ------------------
  |  Branch (608:7): [True: 0, False: 12.9k]
  ------------------
  609|      0|         return if_match(oid, {1, 3, 36, 3, 3, 2, 8, 1, 1, 5}, "brainpool224r1");
  610|      1|      case 0x9A00E:
  ------------------
  |  Branch (610:7): [True: 1, False: 12.9k]
  ------------------
  611|      1|         return if_match(oid, {1, 3, 36, 3, 3, 2, 8, 1, 1, 7}, "brainpool256r1");
  612|      0|      case 0x9A010:
  ------------------
  |  Branch (612:7): [True: 0, False: 12.9k]
  ------------------
  613|      0|         return if_match(oid, {1, 3, 36, 3, 3, 2, 8, 1, 1, 9}, "brainpool320r1");
  614|      1|      case 0x9A012:
  ------------------
  |  Branch (614:7): [True: 1, False: 12.9k]
  ------------------
  615|      1|         return if_match(oid, {1, 3, 36, 3, 3, 2, 8, 1, 1, 11}, "brainpool384r1");
  616|      1|      case 0x9A014:
  ------------------
  |  Branch (616:7): [True: 1, False: 12.9k]
  ------------------
  617|      1|         return if_match(oid, {1, 3, 36, 3, 3, 2, 8, 1, 1, 13}, "brainpool512r1");
  618|      0|      case 0xA0D61:
  ------------------
  |  Branch (618:7): [True: 0, False: 12.9k]
  ------------------
  619|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 3}, "McEliece");
  620|      0|      case 0xA0D63:
  ------------------
  |  Branch (620:7): [True: 0, False: 12.9k]
  ------------------
  621|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 5}, "XMSS-draft6");
  622|      0|      case 0xA0D66:
  ------------------
  |  Branch (622:7): [True: 0, False: 12.9k]
  ------------------
  623|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 8}, "XMSS-draft12");
  624|      0|      case 0xA0D6B:
  ------------------
  |  Branch (624:7): [True: 0, False: 12.9k]
  ------------------
  625|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 1, 13}, "HSS-LMS-Private-Key");
  626|      0|      case 0xA0EE1:
  ------------------
  |  Branch (626:7): [True: 0, False: 12.9k]
  ------------------
  627|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 1}, "Serpent/CBC");
  628|      0|      case 0xA0EE2:
  ------------------
  |  Branch (628:7): [True: 0, False: 12.9k]
  ------------------
  629|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 2}, "Threefish-512/CBC");
  630|      0|      case 0xA0EE3:
  ------------------
  |  Branch (630:7): [True: 0, False: 12.9k]
  ------------------
  631|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 3}, "Twofish/CBC");
  632|      0|      case 0xA0F45:
  ------------------
  |  Branch (632:7): [True: 0, False: 12.9k]
  ------------------
  633|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 101}, "Serpent/GCM");
  634|      0|      case 0xA0F46:
  ------------------
  |  Branch (634:7): [True: 0, False: 12.9k]
  ------------------
  635|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 3, 102}, "Twofish/GCM");
  636|      0|      case 0xA0FA2:
  ------------------
  |  Branch (636:7): [True: 0, False: 12.9k]
  ------------------
  637|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 4, 1}, "numsp256d1");
  638|      0|      case 0xA0FA3:
  ------------------
  |  Branch (638:7): [True: 0, False: 12.9k]
  ------------------
  639|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 4, 2}, "numsp384d1");
  640|      0|      case 0xA0FA4:
  ------------------
  |  Branch (640:7): [True: 0, False: 12.9k]
  ------------------
  641|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 25258, 4, 3}, "numsp512d1");
  642|      0|      case 0xA244B:
  ------------------
  |  Branch (642:7): [True: 0, False: 12.9k]
  ------------------
  643|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 22554, 5, 1, 1}, "ClassicMcEliece_348864");
  644|      0|      case 0xA244C:
  ------------------
  |  Branch (644:7): [True: 0, False: 12.9k]
  ------------------
  645|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 22554, 5, 1, 2}, "ClassicMcEliece_348864f");
  646|      0|      case 0xA244D:
  ------------------
  |  Branch (646:7): [True: 0, False: 12.9k]
  ------------------
  647|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 22554, 5, 1, 3}, "ClassicMcEliece_460896");
  648|      0|      case 0xA244E:
  ------------------
  |  Branch (648:7): [True: 0, False: 12.9k]
  ------------------
  649|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 22554, 5, 1, 4}, "ClassicMcEliece_460896f");
  650|      0|      case 0xA244F:
  ------------------
  |  Branch (650:7): [True: 0, False: 12.9k]
  ------------------
  651|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 22554, 5, 1, 5}, "ClassicMcEliece_6688128");
  652|      0|      case 0xA2450:
  ------------------
  |  Branch (652:7): [True: 0, False: 12.9k]
  ------------------
  653|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 22554, 5, 1, 6}, "ClassicMcEliece_6688128f");
  654|      0|      case 0xA2451:
  ------------------
  |  Branch (654:7): [True: 0, False: 12.9k]
  ------------------
  655|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 22554, 5, 1, 7}, "ClassicMcEliece_6960119");
  656|      0|      case 0xA2452:
  ------------------
  |  Branch (656:7): [True: 0, False: 12.9k]
  ------------------
  657|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 22554, 5, 1, 8}, "ClassicMcEliece_6960119f");
  658|      0|      case 0xA2453:
  ------------------
  |  Branch (658:7): [True: 0, False: 12.9k]
  ------------------
  659|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 22554, 5, 1, 9}, "ClassicMcEliece_8192128");
  660|      0|      case 0xA2454:
  ------------------
  |  Branch (660:7): [True: 0, False: 12.9k]
  ------------------
  661|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 22554, 5, 1, 10}, "ClassicMcEliece_8192128f");
  662|      0|      case 0xAF989:
  ------------------
  |  Branch (662:7): [True: 0, False: 12.9k]
  ------------------
  663|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 1, 1}, "RSA");
  664|      0|      case 0xAF98A:
  ------------------
  |  Branch (664:7): [True: 0, False: 12.9k]
  ------------------
  665|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 1, 2}, "RSA/PKCS1v15(MD2)");
  666|      0|      case 0xAF98C:
  ------------------
  |  Branch (666:7): [True: 0, False: 12.9k]
  ------------------
  667|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 1, 4}, "RSA/PKCS1v15(MD5)");
  668|      0|      case 0xAF98D:
  ------------------
  |  Branch (668:7): [True: 0, False: 12.9k]
  ------------------
  669|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 1, 5}, "RSA/PKCS1v15(SHA-1)");
  670|      0|      case 0xAF98F:
  ------------------
  |  Branch (670:7): [True: 0, False: 12.9k]
  ------------------
  671|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 1, 7}, "RSA/OAEP");
  672|      0|      case 0xAF990:
  ------------------
  |  Branch (672:7): [True: 0, False: 12.9k]
  ------------------
  673|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 1, 8}, "MGF1");
  674|      0|      case 0xAF992:
  ------------------
  |  Branch (674:7): [True: 0, False: 12.9k]
  ------------------
  675|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 1, 10}, "RSA/PSS");
  676|      0|      case 0xAF993:
  ------------------
  |  Branch (676:7): [True: 0, False: 12.9k]
  ------------------
  677|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 1, 11}, "RSA/PKCS1v15(SHA-256)");
  678|      0|      case 0xAF994:
  ------------------
  |  Branch (678:7): [True: 0, False: 12.9k]
  ------------------
  679|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 1, 12}, "RSA/PKCS1v15(SHA-384)");
  680|      0|      case 0xAF995:
  ------------------
  |  Branch (680:7): [True: 0, False: 12.9k]
  ------------------
  681|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 1, 13}, "RSA/PKCS1v15(SHA-512)");
  682|      0|      case 0xAF996:
  ------------------
  |  Branch (682:7): [True: 0, False: 12.9k]
  ------------------
  683|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 1, 14}, "RSA/PKCS1v15(SHA-224)");
  684|      0|      case 0xAF998:
  ------------------
  |  Branch (684:7): [True: 0, False: 12.9k]
  ------------------
  685|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 1, 16}, "RSA/PKCS1v15(SHA-512-256)");
  686|      0|      case 0xAFC98:
  ------------------
  |  Branch (686:7): [True: 0, False: 12.9k]
  ------------------
  687|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 5, 12}, "PKCS5.PBKDF2");
  688|      0|      case 0xAFC99:
  ------------------
  |  Branch (688:7): [True: 0, False: 12.9k]
  ------------------
  689|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 5, 13}, "PBE-PKCS5v20");
  690|      0|      case 0xAFE0F:
  ------------------
  |  Branch (690:7): [True: 0, False: 12.9k]
  ------------------
  691|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 7, 1}, "PKCS7.Data");
  692|      0|      case 0xAFE14:
  ------------------
  |  Branch (692:7): [True: 0, False: 12.9k]
  ------------------
  693|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 7, 6}, "PKCS7.EncryptedData");
  694|      0|      case 0xAFF91:
  ------------------
  |  Branch (694:7): [True: 0, False: 12.9k]
  ------------------
  695|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 9, 1}, "PKCS9.EmailAddress");
  696|      0|      case 0xAFF92:
  ------------------
  |  Branch (696:7): [True: 0, False: 12.9k]
  ------------------
  697|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 9, 2}, "PKCS9.UnstructuredName");
  698|      0|      case 0xAFF93:
  ------------------
  |  Branch (698:7): [True: 0, False: 12.9k]
  ------------------
  699|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 9, 3}, "PKCS9.ContentType");
  700|      0|      case 0xAFF94:
  ------------------
  |  Branch (700:7): [True: 0, False: 12.9k]
  ------------------
  701|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 9, 4}, "PKCS9.MessageDigest");
  702|      0|      case 0xAFF97:
  ------------------
  |  Branch (702:7): [True: 0, False: 12.9k]
  ------------------
  703|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 9, 7}, "PKCS9.ChallengePassword");
  704|      0|      case 0xAFF9E:
  ------------------
  |  Branch (704:7): [True: 0, False: 12.9k]
  ------------------
  705|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 9, 14}, "PKCS9.ExtensionRequest");
  706|      0|      case 0xAFFA4:
  ------------------
  |  Branch (706:7): [True: 0, False: 12.9k]
  ------------------
  707|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 9, 20}, "PKCS9.FriendlyName");
  708|      0|      case 0xAFFA5:
  ------------------
  |  Branch (708:7): [True: 0, False: 12.9k]
  ------------------
  709|      0|         return if_match(oid, {1, 2, 840, 113549, 1, 9, 21}, "PKCS9.LocalKeyId");
  710|      0|      case 0xC0226:
  ------------------
  |  Branch (710:7): [True: 0, False: 12.9k]
  ------------------
  711|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 11591, 4, 11}, "Scrypt");
  712|      0|      case 0xC0A67:
  ------------------
  |  Branch (712:7): [True: 0, False: 12.9k]
  ------------------
  713|      0|         return if_match(oid, {1, 3, 6, 1, 4, 1, 11591, 15, 1}, "OpenPGP.Ed25519");
  714|      0|      case 0xC4CE5:
  ------------------
  |  Branch (714:7): [True: 0, False: 12.9k]
  ------------------
  715|      0|         return if_match(oid, {1, 2, 643, 100, 1}, "GOST.OGRN");
  716|      0|      case 0xC4D53:
  ------------------
  |  Branch (716:7): [True: 0, False: 12.9k]
  ------------------
  717|      0|         return if_match(oid, {1, 2, 643, 100, 111}, "GOST.SubjectSigningTool");
  718|      0|      case 0xC4D54:
  ------------------
  |  Branch (718:7): [True: 0, False: 12.9k]
  ------------------
  719|      0|         return if_match(oid, {1, 2, 643, 100, 112}, "GOST.IssuerSigningTool");
  720|      0|      case 0xC9C50:
  ------------------
  |  Branch (720:7): [True: 0, False: 12.9k]
  ------------------
  721|      0|         return if_match(oid, {1, 2, 840, 10045, 3, 1, 1}, "secp192r1");
  722|      0|      case 0xC9C51:
  ------------------
  |  Branch (722:7): [True: 0, False: 12.9k]
  ------------------
  723|      0|         return if_match(oid, {1, 2, 840, 10045, 3, 1, 2}, "x962_p192v2");
  724|      0|      case 0xC9C52:
  ------------------
  |  Branch (724:7): [True: 0, False: 12.9k]
  ------------------
  725|      0|         return if_match(oid, {1, 2, 840, 10045, 3, 1, 3}, "x962_p192v3");
  726|      0|      case 0xC9C53:
  ------------------
  |  Branch (726:7): [True: 0, False: 12.9k]
  ------------------
  727|      0|         return if_match(oid, {1, 2, 840, 10045, 3, 1, 4}, "x962_p239v1");
  728|      0|      case 0xC9C54:
  ------------------
  |  Branch (728:7): [True: 0, False: 12.9k]
  ------------------
  729|      0|         return if_match(oid, {1, 2, 840, 10045, 3, 1, 5}, "x962_p239v2");
  730|      0|      case 0xC9C55:
  ------------------
  |  Branch (730:7): [True: 0, False: 12.9k]
  ------------------
  731|      0|         return if_match(oid, {1, 2, 840, 10045, 3, 1, 6}, "x962_p239v3");
  732|      1|      case 0xC9C56:
  ------------------
  |  Branch (732:7): [True: 1, False: 12.9k]
  ------------------
  733|      1|         return if_match(oid, {1, 2, 840, 10045, 3, 1, 7}, "secp256r1");
  734|      0|      case 0xCFA13:
  ------------------
  |  Branch (734:7): [True: 0, False: 12.9k]
  ------------------
  735|      0|         return if_match(oid, {1, 2, 840, 10040, 4, 1}, "DSA");
  736|      0|      case 0xCFA15:
  ------------------
  |  Branch (736:7): [True: 0, False: 12.9k]
  ------------------
  737|      0|         return if_match(oid, {1, 2, 840, 10040, 4, 3}, "DSA/SHA-1");
  738|      0|      default:
  ------------------
  |  Branch (738:7): [True: 0, False: 12.9k]
  ------------------
  739|      0|         return {};
  740|  12.9k|   }
  741|  12.9k|}
_ZN5Botan7OID_Map22lookup_static_oid_nameENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  744|  54.4k|std::optional<OID> OID_Map::lookup_static_oid_name(std::string_view req) {
  745|  54.4k|   const uint32_t hc = hash_oid_name(req);
  746|       |
  747|  54.4k|   switch(hc) {
  748|      0|      case 0x00545:
  ------------------
  |  Branch (748:7): [True: 0, False: 54.4k]
  ------------------
  749|      0|         return if_match(req, "Twofish/GCM", {1, 3, 6, 1, 4, 1, 25258, 3, 102});
  750|      0|      case 0x00CF3:
  ------------------
  |  Branch (750:7): [True: 0, False: 54.4k]
  ------------------
  751|      0|         return if_match(req, "SphincsPlus-sha2-192f-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 4});
  752|      0|      case 0x015FE:
  ------------------
  |  Branch (752:7): [True: 0, False: 54.4k]
  ------------------
  753|      0|         return if_match(req, "FrodoKEM-640-SHAKE", {1, 3, 6, 1, 4, 1, 25258, 1, 14, 1});
  754|      0|      case 0x01F9E:
  ------------------
  |  Branch (754:7): [True: 0, False: 54.4k]
  ------------------
  755|      0|         return if_match(req, "MD5", {1, 2, 840, 113549, 2, 5});
  756|      0|      case 0x02293:
  ------------------
  |  Branch (756:7): [True: 0, False: 54.4k]
  ------------------
  757|      0|         return if_match(req, "SphincsPlus-shake-192f-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 4});
  758|      0|      case 0x02B93:
  ------------------
  |  Branch (758:7): [True: 0, False: 54.4k]
  ------------------
  759|      0|         return if_match(req, "Microsoft SmartcardLogon", {1, 3, 6, 1, 4, 1, 311, 20, 2, 2});
  760|      0|      case 0x041D5:
  ------------------
  |  Branch (760:7): [True: 0, False: 54.4k]
  ------------------
  761|      0|         return if_match(req, "secp160k1", {1, 3, 132, 0, 9});
  762|      0|      case 0x044B3:
  ------------------
  |  Branch (762:7): [True: 0, False: 54.4k]
  ------------------
  763|      0|         return if_match(req, "Camellia-256/SIV", {1, 3, 6, 1, 4, 1, 25258, 3, 4, 8});
  764|      0|      case 0x048B2:
  ------------------
  |  Branch (764:7): [True: 0, False: 54.4k]
  ------------------
  765|      0|         return if_match(req, "secp160r1", {1, 3, 132, 0, 8});
  766|      0|      case 0x048B3:
  ------------------
  |  Branch (766:7): [True: 0, False: 54.4k]
  ------------------
  767|      0|         return if_match(req, "secp160r2", {1, 3, 132, 0, 30});
  768|      0|      case 0x05CDA:
  ------------------
  |  Branch (768:7): [True: 0, False: 54.4k]
  ------------------
  769|      0|         return if_match(req, "X520.Country", {2, 5, 4, 6});
  770|      0|      case 0x07783:
  ------------------
  |  Branch (770:7): [True: 0, False: 54.4k]
  ------------------
  771|      0|         return if_match(req, "PKIX.ServerAuth", {1, 3, 6, 1, 5, 5, 7, 3, 1});
  772|      0|      case 0x086C7:
  ------------------
  |  Branch (772:7): [True: 0, False: 54.4k]
  ------------------
  773|      0|         return if_match(req, "numsp384d1", {1, 3, 6, 1, 4, 1, 25258, 4, 2});
  774|    124|      case 0x08A92:
  ------------------
  |  Branch (774:7): [True: 124, False: 54.3k]
  ------------------
  775|    124|         return if_match(req, "RSA/PKCS1v15(SHA-1)", {1, 2, 840, 113549, 1, 1, 5});
  776|      0|      case 0x09EA0:
  ------------------
  |  Branch (776:7): [True: 0, False: 54.4k]
  ------------------
  777|      0|         return if_match(req, "DES/CBC", {1, 3, 14, 3, 2, 7});
  778|      0|      case 0x0B2D6:
  ------------------
  |  Branch (778:7): [True: 0, False: 54.4k]
  ------------------
  779|      0|         return if_match(req, "ECDSA/SHA-3(512)", {2, 16, 840, 1, 101, 3, 4, 3, 12});
  780|      0|      case 0x0BA72:
  ------------------
  |  Branch (780:7): [True: 0, False: 54.4k]
  ------------------
  781|      0|         return if_match(req, "SphincsPlus-sha2-128s-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 1});
  782|      0|      case 0x0BE23:
  ------------------
  |  Branch (782:7): [True: 0, False: 54.4k]
  ------------------
  783|      0|         return if_match(req, "ECGDSA", {1, 3, 36, 3, 3, 2, 5, 2, 1});
  784|      0|      case 0x0C109:
  ------------------
  |  Branch (784:7): [True: 0, False: 54.4k]
  ------------------
  785|      0|         return if_match(req, "PKCS9.FriendlyName", {1, 2, 840, 113549, 1, 9, 20});
  786|      0|      case 0x0D012:
  ------------------
  |  Branch (786:7): [True: 0, False: 54.4k]
  ------------------
  787|      0|         return if_match(req, "SphincsPlus-shake-128s-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 1});
  788|      0|      case 0x0DCE9:
  ------------------
  |  Branch (788:7): [True: 0, False: 54.4k]
  ------------------
  789|      0|         return if_match(req, "ClassicMcEliece_8192128f", {1, 3, 6, 1, 4, 1, 22554, 5, 1, 10});
  790|      0|      case 0x0E52A:
  ------------------
  |  Branch (790:7): [True: 0, False: 54.4k]
  ------------------
  791|      0|         return if_match(req, "numsp512d1", {1, 3, 6, 1, 4, 1, 25258, 4, 3});
  792|      0|      case 0x0F9CC:
  ------------------
  |  Branch (792:7): [True: 0, False: 54.4k]
  ------------------
  793|      0|         return if_match(req, "PKCS9.UnstructuredName", {1, 2, 840, 113549, 1, 9, 2});
  794|      0|      case 0x0FF45:
  ------------------
  |  Branch (794:7): [True: 0, False: 54.4k]
  ------------------
  795|      0|         return if_match(req, "Camellia-256/GCM", {0, 3, 4401, 5, 3, 1, 9, 46});
  796|      0|      case 0x1033D:
  ------------------
  |  Branch (796:7): [True: 0, False: 54.4k]
  ------------------
  797|      0|         return if_match(req, "DSA/SHA-3(384)", {2, 16, 840, 1, 101, 3, 4, 3, 7});
  798|      0|      case 0x1139D:
  ------------------
  |  Branch (798:7): [True: 0, False: 54.4k]
  ------------------
  799|      0|         return if_match(req, "secp192k1", {1, 3, 132, 0, 31});
  800|      0|      case 0x113D6:
  ------------------
  |  Branch (800:7): [True: 0, False: 54.4k]
  ------------------
  801|      0|         return if_match(req, "X520.DNQualifier", {2, 5, 4, 46});
  802|      0|      case 0x11A7A:
  ------------------
  |  Branch (802:7): [True: 0, False: 54.4k]
  ------------------
  803|      0|         return if_match(req, "secp192r1", {1, 2, 840, 10045, 3, 1, 1});
  804|      0|      case 0x12096:
  ------------------
  |  Branch (804:7): [True: 0, False: 54.4k]
  ------------------
  805|      0|         return if_match(req, "SM2_Kex", {1, 2, 156, 10197, 1, 301, 2});
  806|      0|      case 0x13FC1:
  ------------------
  |  Branch (806:7): [True: 0, False: 54.4k]
  ------------------
  807|      0|         return if_match(req, "X520.GenerationalQualifier", {2, 5, 4, 44});
  808|      0|      case 0x1445B:
  ------------------
  |  Branch (808:7): [True: 0, False: 54.4k]
  ------------------
  809|      0|         return if_match(req, "PKCS5.PBKDF2", {1, 2, 840, 113549, 1, 5, 12});
  810|      0|      case 0x1495D:
  ------------------
  |  Branch (810:7): [True: 0, False: 54.4k]
  ------------------
  811|      0|         return if_match(req, "eFrodoKEM-1344-AES", {1, 3, 6, 1, 4, 1, 25258, 1, 17, 3});
  812|      0|      case 0x14E30:
  ------------------
  |  Branch (812:7): [True: 0, False: 54.4k]
  ------------------
  813|      0|         return if_match(req, "ClassicMcEliece_460896", {1, 3, 6, 1, 4, 1, 22554, 5, 1, 3});
  814|      0|      case 0x14FB1:
  ------------------
  |  Branch (814:7): [True: 0, False: 54.4k]
  ------------------
  815|      0|         return if_match(req, "XMSS-draft12", {1, 3, 6, 1, 4, 1, 25258, 1, 8});
  816|      0|      case 0x156E3:
  ------------------
  |  Branch (816:7): [True: 0, False: 54.4k]
  ------------------
  817|      0|         return if_match(req, "Compression.Zlib", {1, 2, 840, 113549, 1, 9, 16, 3, 8});
  818|      0|      case 0x1579E:
  ------------------
  |  Branch (818:7): [True: 0, False: 54.4k]
  ------------------
  819|      0|         return if_match(req, "Streebog-512", {1, 2, 643, 7, 1, 1, 2, 3});
  820|      0|      case 0x1701A:
  ------------------
  |  Branch (820:7): [True: 0, False: 54.4k]
  ------------------
  821|      0|         return if_match(req, "X509v3.AnyExtendedKeyUsage", {2, 5, 29, 37, 0});
  822|      0|      case 0x175EF:
  ------------------
  |  Branch (822:7): [True: 0, False: 54.4k]
  ------------------
  823|      0|         return if_match(req, "Kyber-1024-90s-r3", {1, 3, 6, 1, 4, 1, 25258, 1, 11, 3});
  824|      0|      case 0x17709:
  ------------------
  |  Branch (824:7): [True: 0, False: 54.4k]
  ------------------
  825|      0|         return if_match(req, "X520.GivenName", {2, 5, 4, 42});
  826|      0|      case 0x17AD9:
  ------------------
  |  Branch (826:7): [True: 0, False: 54.4k]
  ------------------
  827|      0|         return if_match(req, "RSA/PKCS1v15(SM3)", {1, 2, 156, 10197, 1, 504});
  828|      0|      case 0x17CE2:
  ------------------
  |  Branch (828:7): [True: 0, False: 54.4k]
  ------------------
  829|      0|         return if_match(req, "SLH-DSA-SHA2-256f", {2, 16, 840, 1, 101, 3, 4, 3, 25});
  830|      0|      case 0x17CEF:
  ------------------
  |  Branch (830:7): [True: 0, False: 54.4k]
  ------------------
  831|      0|         return if_match(req, "SLH-DSA-SHA2-256s", {2, 16, 840, 1, 101, 3, 4, 3, 24});
  832|      0|      case 0x18618:
  ------------------
  |  Branch (832:7): [True: 0, False: 54.4k]
  ------------------
  833|      0|         return if_match(req, "FrodoKEM-976-AES", {1, 3, 6, 1, 4, 1, 25258, 1, 15, 2});
  834|      0|      case 0x19480:
  ------------------
  |  Branch (834:7): [True: 0, False: 54.4k]
  ------------------
  835|      0|         return if_match(req, "eFrodoKEM-1344-SHAKE", {1, 3, 6, 1, 4, 1, 25258, 1, 16, 3});
  836|      0|      case 0x1958A:
  ------------------
  |  Branch (836:7): [True: 0, False: 54.4k]
  ------------------
  837|      0|         return if_match(req, "X509v3.InvalidityDate", {2, 5, 29, 24});
  838|      0|      case 0x19851:
  ------------------
  |  Branch (838:7): [True: 0, False: 54.4k]
  ------------------
  839|      0|         return if_match(req, "DSA/SHA-1", {1, 2, 840, 10040, 4, 3});
  840|      0|      case 0x1B2E7:
  ------------------
  |  Branch (840:7): [True: 0, False: 54.4k]
  ------------------
  841|      0|         return if_match(req, "KeyWrap.AES-128", {2, 16, 840, 1, 101, 3, 4, 1, 5});
  842|      0|      case 0x1B9BE:
  ------------------
  |  Branch (842:7): [True: 0, False: 54.4k]
  ------------------
  843|      0|         return if_match(req, "KeyWrap.AES-192", {2, 16, 840, 1, 101, 3, 4, 1, 25});
  844|      0|      case 0x1D439:
  ------------------
  |  Branch (844:7): [True: 0, False: 54.4k]
  ------------------
  845|      0|         return if_match(req, "SphincsPlus-haraka-192f-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 4});
  846|      0|      case 0x2065B:
  ------------------
  |  Branch (846:7): [True: 0, False: 54.4k]
  ------------------
  847|      0|         return if_match(req, "KeyWrap.CAST-128", {1, 2, 840, 113533, 7, 66, 15});
  848|      0|      case 0x216A0:
  ------------------
  |  Branch (848:7): [True: 0, False: 54.4k]
  ------------------
  849|      0|         return if_match(req, "ML-KEM-512", {2, 16, 840, 1, 101, 3, 4, 4, 1});
  850|      0|      case 0x2216B:
  ------------------
  |  Branch (850:7): [True: 0, False: 54.4k]
  ------------------
  851|      0|         return if_match(req, "GOST-34.10-2012-512", {1, 2, 643, 7, 1, 1, 1, 2});
  852|      0|      case 0x22C2C:
  ------------------
  |  Branch (852:7): [True: 0, False: 54.4k]
  ------------------
  853|      0|         return if_match(req, "ElGamal", {1, 3, 6, 1, 4, 1, 3029, 1, 2, 1});
  854|      0|      case 0x2559A:
  ------------------
  |  Branch (854:7): [True: 0, False: 54.4k]
  ------------------
  855|      0|         return if_match(req, "X520.Initials", {2, 5, 4, 43});
  856|      0|      case 0x271AC:
  ------------------
  |  Branch (856:7): [True: 0, False: 54.4k]
  ------------------
  857|      0|         return if_match(req, "PKIX.AutonomousSysIds", {1, 3, 6, 1, 5, 5, 7, 1, 8});
  858|      0|      case 0x2808B:
  ------------------
  |  Branch (858:7): [True: 0, False: 54.4k]
  ------------------
  859|      0|         return if_match(req, "PKCS7.Data", {1, 2, 840, 113549, 1, 7, 1});
  860|      0|      case 0x281B8:
  ------------------
  |  Branch (860:7): [True: 0, False: 54.4k]
  ------------------
  861|      0|         return if_match(req, "SphincsPlus-haraka-128s-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 1});
  862|      0|      case 0x282FE:
  ------------------
  |  Branch (862:7): [True: 0, False: 54.4k]
  ------------------
  863|      0|         return if_match(req, "PKIX.OCSP.Nonce", {1, 3, 6, 1, 5, 5, 7, 48, 1, 2});
  864|      0|      case 0x29999:
  ------------------
  |  Branch (864:7): [True: 0, False: 54.4k]
  ------------------
  865|      0|         return if_match(req, "DSA/SHA-3(256)", {2, 16, 840, 1, 101, 3, 4, 3, 6});
  866|      0|      case 0x2A83D:
  ------------------
  |  Branch (866:7): [True: 0, False: 54.4k]
  ------------------
  867|      0|         return if_match(req, "SHA-224", {2, 16, 840, 1, 101, 3, 4, 2, 4});
  868|  8.20k|      case 0x2AB30:
  ------------------
  |  Branch (868:7): [True: 8.20k, False: 46.2k]
  ------------------
  869|  8.20k|         return if_match(req, "SHA-256", {2, 16, 840, 1, 101, 3, 4, 2, 1});
  870|      0|      case 0x2ABEF:
  ------------------
  |  Branch (870:7): [True: 0, False: 54.4k]
  ------------------
  871|      0|         return if_match(req, "KeyWrap.AES-256", {2, 16, 840, 1, 101, 3, 4, 1, 45});
  872|      0|      case 0x2BAEF:
  ------------------
  |  Branch (872:7): [True: 0, False: 54.4k]
  ------------------
  873|      0|         return if_match(req, "SM2_Sig/SM3", {1, 2, 156, 10197, 1, 501});
  874|      0|      case 0x2C39A:
  ------------------
  |  Branch (874:7): [True: 0, False: 54.4k]
  ------------------
  875|      0|         return if_match(req, "ECGDSA/RIPEMD-160", {1, 3, 36, 3, 3, 2, 5, 4, 1});
  876|      0|      case 0x2C54F:
  ------------------
  |  Branch (876:7): [True: 0, False: 54.4k]
  ------------------
  877|      0|         return if_match(req, "ECDSA/SHA-3(224)", {2, 16, 840, 1, 101, 3, 4, 3, 9});
  878|      0|      case 0x2EEA6:
  ------------------
  |  Branch (878:7): [True: 0, False: 54.4k]
  ------------------
  879|      0|         return if_match(req, "RSA/PKCS1v15(RIPEMD-160)", {1, 3, 36, 3, 3, 1, 2});
  880|      0|      case 0x2EFBA:
  ------------------
  |  Branch (880:7): [True: 0, False: 54.4k]
  ------------------
  881|      0|         return if_match(req, "Kyber-512-r3", {1, 3, 6, 1, 4, 1, 25258, 1, 7, 1});
  882|      0|      case 0x2F0AD:
  ------------------
  |  Branch (882:7): [True: 0, False: 54.4k]
  ------------------
  883|      0|         return if_match(req, "PKCS7.EncryptedData", {1, 2, 840, 113549, 1, 7, 6});
  884|      0|      case 0x2F219:
  ------------------
  |  Branch (884:7): [True: 0, False: 54.4k]
  ------------------
  885|      0|         return if_match(req, "PBE-SHA1-2DES", {1, 2, 840, 113549, 1, 12, 1, 4});
  886|      0|      case 0x3133E:
  ------------------
  |  Branch (886:7): [True: 0, False: 54.4k]
  ------------------
  887|      0|         return if_match(req, "SLH-DSA-SHA2-128f", {2, 16, 840, 1, 101, 3, 4, 3, 21});
  888|      0|      case 0x3134B:
  ------------------
  |  Branch (888:7): [True: 0, False: 54.4k]
  ------------------
  889|      0|         return if_match(req, "SLH-DSA-SHA2-128s", {2, 16, 840, 1, 101, 3, 4, 3, 20});
  890|      0|      case 0x3160D:
  ------------------
  |  Branch (890:7): [True: 0, False: 54.4k]
  ------------------
  891|      0|         return if_match(req, "RSA/PKCS1v15(SHA-3(224))", {2, 16, 840, 1, 101, 3, 4, 3, 13});
  892|      0|      case 0x319E0:
  ------------------
  |  Branch (892:7): [True: 0, False: 54.4k]
  ------------------
  893|      0|         return if_match(req, "GOST-34.10-2012-256/Streebog-256", {1, 2, 643, 7, 1, 1, 3, 2});
  894|      0|      case 0x31B3D:
  ------------------
  |  Branch (894:7): [True: 0, False: 54.4k]
  ------------------
  895|      0|         return if_match(req, "HMAC(SHA-512)", {1, 2, 840, 113549, 2, 11});
  896|    492|      case 0x31C6D:
  ------------------
  |  Branch (896:7): [True: 492, False: 53.9k]
  ------------------
  897|    492|         return if_match(req, "secp384r1", {1, 3, 132, 0, 34});
  898|      0|      case 0x32899:
  ------------------
  |  Branch (898:7): [True: 0, False: 54.4k]
  ------------------
  899|      0|         return if_match(req, "TripleDES/CBC", {1, 2, 840, 113549, 3, 7});
  900|      0|      case 0x33C9C:
  ------------------
  |  Branch (900:7): [True: 0, False: 54.4k]
  ------------------
  901|      0|         return if_match(req, "PKIX.SmtpUTF8Mailbox", {1, 3, 6, 1, 5, 5, 7, 8, 9});
  902|      0|      case 0x33D04:
  ------------------
  |  Branch (902:7): [True: 0, False: 54.4k]
  ------------------
  903|      0|         return if_match(req, "PKCS12.SecretBag", {1, 2, 840, 113549, 1, 12, 10, 1, 5});
  904|      0|      case 0x3615D:
  ------------------
  |  Branch (904:7): [True: 0, False: 54.4k]
  ------------------
  905|      0|         return if_match(req, "FrodoKEM-976-SHAKE", {1, 3, 6, 1, 4, 1, 25258, 1, 14, 2});
  906|      0|      case 0x361B8:
  ------------------
  |  Branch (906:7): [True: 0, False: 54.4k]
  ------------------
  907|      0|         return if_match(req, "Ed25519", {1, 3, 101, 112});
  908|      0|      case 0x3649D:
  ------------------
  |  Branch (908:7): [True: 0, False: 54.4k]
  ------------------
  909|      0|         return if_match(req, "SHAKE-128", {2, 16, 840, 1, 101, 3, 4, 2, 11});
  910|      0|      case 0x36693:
  ------------------
  |  Branch (910:7): [True: 0, False: 54.4k]
  ------------------
  911|      0|         return if_match(req, "ClassicMcEliece_348864", {1, 3, 6, 1, 4, 1, 22554, 5, 1, 1});
  912|      0|      case 0x373C7:
  ------------------
  |  Branch (912:7): [True: 0, False: 54.4k]
  ------------------
  913|      0|         return if_match(req, "ML-DSA-4x4", {2, 16, 840, 1, 101, 3, 4, 3, 17});
  914|      0|      case 0x3750B:
  ------------------
  |  Branch (914:7): [True: 0, False: 54.4k]
  ------------------
  915|      0|         return if_match(req, "ClassicMcEliece_8192128", {1, 3, 6, 1, 4, 1, 22554, 5, 1, 9});
  916|      0|      case 0x39890:
  ------------------
  |  Branch (916:7): [True: 0, False: 54.4k]
  ------------------
  917|      0|         return if_match(req, "Ed448", {1, 3, 101, 113});
  918|  3.44k|      case 0x3A438:
  ------------------
  |  Branch (918:7): [True: 3.44k, False: 51.0k]
  ------------------
  919|  3.44k|         return if_match(req, "SHA-384", {2, 16, 840, 1, 101, 3, 4, 2, 2});
  920|      0|      case 0x3A963:
  ------------------
  |  Branch (920:7): [True: 0, False: 54.4k]
  ------------------
  921|      0|         return if_match(req, "DH", {1, 2, 840, 10046, 2, 1});
  922|  11.9k|      case 0x3AC83:
  ------------------
  |  Branch (922:7): [True: 11.9k, False: 42.5k]
  ------------------
  923|  11.9k|         return if_match(req, "MGF1", {1, 2, 840, 113549, 1, 1, 8});
  924|      0|      case 0x3ACBA:
  ------------------
  |  Branch (924:7): [True: 0, False: 54.4k]
  ------------------
  925|      0|         return if_match(req, "X509v3.IssuerAlternativeName", {2, 5, 29, 18});
  926|      0|      case 0x3B273:
  ------------------
  |  Branch (926:7): [True: 0, False: 54.4k]
  ------------------
  927|      0|         return if_match(req, "KeyWrap.TripleDES", {1, 2, 840, 113549, 1, 9, 16, 3, 6});
  928|      0|      case 0x3B91E:
  ------------------
  |  Branch (928:7): [True: 0, False: 54.4k]
  ------------------
  929|      0|         return if_match(req, "X509v3.PrivateKeyUsagePeriod", {2, 5, 29, 16});
  930|      0|      case 0x3BC8A:
  ------------------
  |  Branch (930:7): [True: 0, False: 54.4k]
  ------------------
  931|      0|         return if_match(req, "SLH-DSA-SHAKE-192f", {2, 16, 840, 1, 101, 3, 4, 3, 29});
  932|      0|      case 0x3BC97:
  ------------------
  |  Branch (932:7): [True: 0, False: 54.4k]
  ------------------
  933|      0|         return if_match(req, "SLH-DSA-SHAKE-192s", {2, 16, 840, 1, 101, 3, 4, 3, 28});
  934|      0|      case 0x3D127:
  ------------------
  |  Branch (934:7): [True: 0, False: 54.4k]
  ------------------
  935|      0|         return if_match(req, "DSA", {1, 2, 840, 10040, 4, 1});
  936|      0|      case 0x3E249:
  ------------------
  |  Branch (936:7): [True: 0, False: 54.4k]
  ------------------
  937|      0|         return if_match(req, "HSS-LMS", {1, 2, 840, 113549, 1, 9, 16, 3, 17});
  938|      0|      case 0x3E7D5:
  ------------------
  |  Branch (938:7): [True: 0, False: 54.4k]
  ------------------
  939|      0|         return if_match(req, "RSA/PKCS1v15(SHA-3(256))", {2, 16, 840, 1, 101, 3, 4, 3, 14});
  940|      0|      case 0x3F748:
  ------------------
  |  Branch (940:7): [True: 0, False: 54.4k]
  ------------------
  941|      0|         return if_match(req, "GOST.OGRN", {1, 2, 643, 100, 1});
  942|      0|      case 0x3F99F:
  ------------------
  |  Branch (942:7): [True: 0, False: 54.4k]
  ------------------
  943|      0|         return if_match(req, "X509v3.BasicConstraints", {2, 5, 29, 19});
  944|      0|      case 0x40726:
  ------------------
  |  Branch (944:7): [True: 0, False: 54.4k]
  ------------------
  945|      0|         return if_match(req, "SHA-3(512)", {2, 16, 840, 1, 101, 3, 4, 2, 10});
  946|      0|      case 0x407BF:
  ------------------
  |  Branch (946:7): [True: 0, False: 54.4k]
  ------------------
  947|      0|         return if_match(req, "ML-KEM-768", {2, 16, 840, 1, 101, 3, 4, 4, 2});
  948|      0|      case 0x41334:
  ------------------
  |  Branch (948:7): [True: 0, False: 54.4k]
  ------------------
  949|      0|         return if_match(req, "ECDSA/SHA-3(384)", {2, 16, 840, 1, 101, 3, 4, 3, 11});
  950|      0|      case 0x42DF3:
  ------------------
  |  Branch (950:7): [True: 0, False: 54.4k]
  ------------------
  951|      0|         return if_match(req, "X509v3.CRLDistributionPoints", {2, 5, 29, 31});
  952|      0|      case 0x437FB:
  ------------------
  |  Branch (952:7): [True: 0, False: 54.4k]
  ------------------
  953|      0|         return if_match(req, "brainpool160r1", {1, 3, 36, 3, 3, 2, 8, 1, 1, 1});
  954|      0|      case 0x441F5:
  ------------------
  |  Branch (954:7): [True: 0, False: 54.4k]
  ------------------
  955|      0|         return if_match(req, "gost_256A", {1, 2, 643, 7, 1, 2, 1, 1, 1});
  956|      0|      case 0x441F6:
  ------------------
  |  Branch (956:7): [True: 0, False: 54.4k]
  ------------------
  957|      0|         return if_match(req, "gost_256B", {1, 2, 643, 7, 1, 2, 1, 1, 2});
  958|      0|      case 0x44221:
  ------------------
  |  Branch (958:7): [True: 0, False: 54.4k]
  ------------------
  959|      0|         return if_match(req, "GOST-34.10-2012-512/Streebog-512", {1, 2, 643, 7, 1, 1, 3, 3});
  960|      0|      case 0x44322:
  ------------------
  |  Branch (960:7): [True: 0, False: 54.4k]
  ------------------
  961|      0|         return if_match(req, "ClassicMcEliece_6960119pc", {1, 3, 6, 1, 4, 1, 25258, 1, 18, 3});
  962|      0|      case 0x44973:
  ------------------
  |  Branch (962:7): [True: 0, False: 54.4k]
  ------------------
  963|      0|         return if_match(req, "Kyber-512-90s-r3", {1, 3, 6, 1, 4, 1, 25258, 1, 11, 1});
  964|      0|      case 0x45C27:
  ------------------
  |  Branch (964:7): [True: 0, False: 54.4k]
  ------------------
  965|      0|         return if_match(req, "RSA/PKCS1v15(SHA-512-256)", {1, 2, 840, 113549, 1, 1, 16});
  966|      0|      case 0x45C85:
  ------------------
  |  Branch (966:7): [True: 0, False: 54.4k]
  ------------------
  967|      0|         return if_match(req, "X509v3.ReasonCode", {2, 5, 29, 21});
  968|      0|      case 0x45DA5:
  ------------------
  |  Branch (968:7): [True: 0, False: 54.4k]
  ------------------
  969|      0|         return if_match(req, "SHAKE-256", {2, 16, 840, 1, 101, 3, 4, 2, 12});
  970|      0|      case 0x4663C:
  ------------------
  |  Branch (970:7): [True: 0, False: 54.4k]
  ------------------
  971|      0|         return if_match(req, "X509v3.PolicyConstraints", {2, 5, 29, 36});
  972|      0|      case 0x480F7:
  ------------------
  |  Branch (972:7): [True: 0, False: 54.4k]
  ------------------
  973|      0|         return if_match(req, "Serpent/OCB", {1, 3, 6, 1, 4, 1, 25258, 3, 2, 4});
  974|      0|      case 0x48627:
  ------------------
  |  Branch (974:7): [True: 0, False: 54.4k]
  ------------------
  975|      0|         return if_match(req, "Dilithium-4x4-AES-r3", {1, 3, 6, 1, 4, 1, 25258, 1, 10, 1});
  976|      0|      case 0x48861:
  ------------------
  |  Branch (976:7): [True: 0, False: 54.4k]
  ------------------
  977|      0|         return if_match(req, "ChaCha20Poly1305", {1, 2, 840, 113549, 1, 9, 16, 3, 18});
  978|      0|      case 0x4A292:
  ------------------
  |  Branch (978:7): [True: 0, False: 54.4k]
  ------------------
  979|      0|         return if_match(req, "frp256v1", {1, 2, 250, 1, 223, 101, 256, 1});
  980|      0|      case 0x4A9EE:
  ------------------
  |  Branch (980:7): [True: 0, False: 54.4k]
  ------------------
  981|      0|         return if_match(req, "ClassicMcEliece_6960119f", {1, 3, 6, 1, 4, 1, 22554, 5, 1, 8});
  982|      0|      case 0x4BF87:
  ------------------
  |  Branch (982:7): [True: 0, False: 54.4k]
  ------------------
  983|      0|         return if_match(req, "PKIX.TNAuthList", {1, 3, 6, 1, 5, 5, 7, 1, 26});
  984|      0|      case 0x4C088:
  ------------------
  |  Branch (984:7): [True: 0, False: 54.4k]
  ------------------
  985|      0|         return if_match(req, "eFrodoKEM-976-AES", {1, 3, 6, 1, 4, 1, 25258, 1, 17, 2});
  986|      0|      case 0x4C513:
  ------------------
  |  Branch (986:7): [True: 0, False: 54.4k]
  ------------------
  987|      0|         return if_match(req, "DSA/SHA-224", {2, 16, 840, 1, 101, 3, 4, 3, 1});
  988|      0|      case 0x4C806:
  ------------------
  |  Branch (988:7): [True: 0, False: 54.4k]
  ------------------
  989|      0|         return if_match(req, "DSA/SHA-256", {2, 16, 840, 1, 101, 3, 4, 3, 2});
  990|      0|      case 0x4D740:
  ------------------
  |  Branch (990:7): [True: 0, False: 54.4k]
  ------------------
  991|      0|         return if_match(req, "X509v3.AnyPolicy", {2, 5, 29, 32, 0});
  992|    150|      case 0x4DE49:
  ------------------
  |  Branch (992:7): [True: 150, False: 54.3k]
  ------------------
  993|    150|         return if_match(req, "RSA/PKCS1v15(SHA-512)", {1, 2, 840, 113549, 1, 1, 13});
  994|      0|      case 0x4ED5D:
  ------------------
  |  Branch (994:7): [True: 0, False: 54.4k]
  ------------------
  995|      0|         return if_match(req, "CAST-128/CBC", {1, 2, 840, 113533, 7, 66, 10});
  996|      0|      case 0x4FCDC:
  ------------------
  |  Branch (996:7): [True: 0, False: 54.4k]
  ------------------
  997|      0|         return if_match(req, "RSA", {1, 2, 840, 113549, 1, 1, 1});
  998|      0|      case 0x501CB:
  ------------------
  |  Branch (998:7): [True: 0, False: 54.4k]
  ------------------
  999|      0|         return if_match(req, "ECDSA/SHA-224", {1, 2, 840, 10045, 4, 3, 1});
 1000|      0|      case 0x50395:
  ------------------
  |  Branch (1000:7): [True: 0, False: 54.4k]
  ------------------
 1001|      0|         return if_match(req, "GOST-34.10/GOST-R-34.11-94", {1, 2, 643, 2, 2, 3});
 1002|    224|      case 0x504BE:
  ------------------
  |  Branch (1002:7): [True: 224, False: 54.2k]
  ------------------
 1003|    224|         return if_match(req, "ECDSA/SHA-256", {1, 2, 840, 10045, 4, 3, 2});
 1004|      0|      case 0x509C3:
  ------------------
  |  Branch (1004:7): [True: 0, False: 54.4k]
  ------------------
 1005|      0|         return if_match(req, "brainpool192r1", {1, 3, 36, 3, 3, 2, 8, 1, 1, 3});
 1006|      0|      case 0x509F9:
  ------------------
  |  Branch (1006:7): [True: 0, False: 54.4k]
  ------------------
 1007|      0|         return if_match(req, "PKCS9.ContentType", {1, 2, 840, 113549, 1, 9, 3});
 1008|      0|      case 0x50B26:
  ------------------
  |  Branch (1008:7): [True: 0, False: 54.4k]
  ------------------
 1009|      0|         return if_match(req, "FrodoKEM-640-AES", {1, 3, 6, 1, 4, 1, 25258, 1, 15, 1});
 1010|      0|      case 0x50D78:
  ------------------
  |  Branch (1010:7): [True: 0, False: 54.4k]
  ------------------
 1011|      0|         return if_match(req, "x962_p192v2", {1, 2, 840, 10045, 3, 1, 2});
 1012|      0|      case 0x50D79:
  ------------------
  |  Branch (1012:7): [True: 0, False: 54.4k]
  ------------------
 1013|      0|         return if_match(req, "x962_p192v3", {1, 2, 840, 10045, 3, 1, 3});
 1014|      0|      case 0x51DC6:
  ------------------
  |  Branch (1014:7): [True: 0, False: 54.4k]
  ------------------
 1015|      0|         return if_match(req, "AES-128/OCB", {1, 3, 6, 1, 4, 1, 25258, 3, 2, 1});
 1016|      0|      case 0x52DB6:
  ------------------
  |  Branch (1016:7): [True: 0, False: 54.4k]
  ------------------
 1017|      0|         return if_match(req, "HMAC(SHA-224)", {1, 2, 840, 113549, 2, 8});
 1018|      0|      case 0x53E11:
  ------------------
  |  Branch (1018:7): [True: 0, False: 54.4k]
  ------------------
 1019|      0|         return if_match(req, "FrodoKEM-1344-SHAKE", {1, 3, 6, 1, 4, 1, 25258, 1, 14, 3});
 1020|      0|      case 0x54012:
  ------------------
  |  Branch (1020:7): [True: 0, False: 54.4k]
  ------------------
 1021|      0|         return if_match(req, "PKIX.TimeStamping", {1, 3, 6, 1, 5, 5, 7, 3, 8});
 1022|      0|      case 0x5407A:
  ------------------
  |  Branch (1022:7): [True: 0, False: 54.4k]
  ------------------
 1023|      0|         return if_match(req, "Serpent/CBC", {1, 3, 6, 1, 4, 1, 25258, 3, 1});
 1024|      0|      case 0x5576D:
  ------------------
  |  Branch (1024:7): [True: 0, False: 54.4k]
  ------------------
 1025|      0|         return if_match(req, "SphincsPlus-sha2-128f-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 2});
 1026|      0|      case 0x55EF6:
  ------------------
  |  Branch (1026:7): [True: 0, False: 54.4k]
  ------------------
 1027|      0|         return if_match(req, "AES-192/OCB", {1, 3, 6, 1, 4, 1, 25258, 3, 2, 2});
 1028|      0|      case 0x55FFA:
  ------------------
  |  Branch (1028:7): [True: 0, False: 54.4k]
  ------------------
 1029|      0|         return if_match(req, "ML-DSA-6x5", {2, 16, 840, 1, 101, 3, 4, 3, 18});
 1030|      0|      case 0x56826:
  ------------------
  |  Branch (1030:7): [True: 0, False: 54.4k]
  ------------------
 1031|      0|         return if_match(req, "brainpool320r1", {1, 3, 36, 3, 3, 2, 8, 1, 1, 9});
 1032|      0|      case 0x56D0D:
  ------------------
  |  Branch (1032:7): [True: 0, False: 54.4k]
  ------------------
 1033|      0|         return if_match(req, "SphincsPlus-shake-128f-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 2});
 1034|      0|      case 0x57077:
  ------------------
  |  Branch (1034:7): [True: 0, False: 54.4k]
  ------------------
 1035|      0|         return if_match(req, "XMSS-draft6", {1, 3, 6, 1, 4, 1, 25258, 1, 5});
 1036|      0|      case 0x5818B:
  ------------------
  |  Branch (1036:7): [True: 0, False: 54.4k]
  ------------------
 1037|      0|         return if_match(req, "ECGDSA/SHA-224", {1, 3, 36, 3, 3, 2, 5, 4, 3});
 1038|      0|      case 0x5847E:
  ------------------
  |  Branch (1038:7): [True: 0, False: 54.4k]
  ------------------
 1039|      0|         return if_match(req, "ECGDSA/SHA-256", {1, 3, 36, 3, 3, 2, 5, 4, 4});
 1040|    296|      case 0x5898B:
  ------------------
  |  Branch (1040:7): [True: 296, False: 54.1k]
  ------------------
 1041|    296|         return if_match(req, "SHA-512", {2, 16, 840, 1, 101, 3, 4, 2, 3});
 1042|      0|      case 0x58991:
  ------------------
  |  Branch (1042:7): [True: 0, False: 54.4k]
  ------------------
 1043|      0|         return if_match(req, "PKIX.OCSP.NoCheck", {1, 3, 6, 1, 5, 5, 7, 48, 1, 5});
 1044|      0|      case 0x59717:
  ------------------
  |  Branch (1044:7): [True: 0, False: 54.4k]
  ------------------
 1045|      0|         return if_match(req, "X509v3.SubjectKeyIdentifier", {2, 5, 29, 14});
 1046|      0|      case 0x5A1E1:
  ------------------
  |  Branch (1046:7): [True: 0, False: 54.4k]
  ------------------
 1047|      0|         return if_match(req, "PKCS12.KeyBag", {1, 2, 840, 113549, 1, 12, 10, 1, 1});
 1048|      0|      case 0x5A570:
  ------------------
  |  Branch (1048:7): [True: 0, False: 54.4k]
  ------------------
 1049|      0|         return if_match(req, "X520.CommonName", {2, 5, 4, 3});
 1050|      0|      case 0x5A990:
  ------------------
  |  Branch (1050:7): [True: 0, False: 54.4k]
  ------------------
 1051|      0|         return if_match(req, "ECDSA/SHA-3(256)", {2, 16, 840, 1, 101, 3, 4, 3, 10});
 1052|      0|      case 0x5AB0E:
  ------------------
  |  Branch (1052:7): [True: 0, False: 54.4k]
  ------------------
 1053|      0|         return if_match(req, "SphincsPlus-sha2-256s-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 5});
 1054|      0|      case 0x5AC4A:
  ------------------
  |  Branch (1054:7): [True: 0, False: 54.4k]
  ------------------
 1055|      0|         return if_match(req, "X520.Surname", {2, 5, 4, 4});
 1056|      0|      case 0x5AF2C:
  ------------------
  |  Branch (1056:7): [True: 0, False: 54.4k]
  ------------------
 1057|      0|         return if_match(req, "ClassicMcEliece_8192128pc", {1, 3, 6, 1, 4, 1, 25258, 1, 18, 5});
 1058|      0|      case 0x5BC39:
  ------------------
  |  Branch (1058:7): [True: 0, False: 54.4k]
  ------------------
 1059|      0|         return if_match(req, "X509v3.KeyUsage", {2, 5, 29, 15});
 1060|      0|      case 0x5BDDB:
  ------------------
  |  Branch (1060:7): [True: 0, False: 54.4k]
  ------------------
 1061|      0|         return if_match(req, "numsp256d1", {1, 3, 6, 1, 4, 1, 25258, 4, 1});
 1062|      0|      case 0x5C0AE:
  ------------------
  |  Branch (1062:7): [True: 0, False: 54.4k]
  ------------------
 1063|      0|         return if_match(req, "SphincsPlus-shake-256s-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 5});
 1064|      0|      case 0x5C10E:
  ------------------
  |  Branch (1064:7): [True: 0, False: 54.4k]
  ------------------
 1065|      0|         return if_match(req, "DSA/SHA-384", {2, 16, 840, 1, 101, 3, 4, 3, 3});
 1066|      0|      case 0x5CFE5:
  ------------------
  |  Branch (1066:7): [True: 0, False: 54.4k]
  ------------------
 1067|      0|         return if_match(req, "PKCS9.X509Certificate", {1, 2, 840, 113549, 1, 9, 22, 1});
 1068|      0|      case 0x5D1CF:
  ------------------
  |  Branch (1068:7): [True: 0, False: 54.4k]
  ------------------
 1069|      0|         return if_match(req, "X520.SerialNumber", {2, 5, 4, 5});
 1070|      0|      case 0x5D375:
  ------------------
  |  Branch (1070:7): [True: 0, False: 54.4k]
  ------------------
 1071|      0|         return if_match(req, "SM4/OCB", {1, 2, 156, 10197, 1, 104, 100});
 1072|      0|      case 0x5DD49:
  ------------------
  |  Branch (1072:7): [True: 0, False: 54.4k]
  ------------------
 1073|      0|         return if_match(req, "AES-128/CBC", {2, 16, 840, 1, 101, 3, 4, 1, 2});
 1074|      0|      case 0x5DE4E:
  ------------------
  |  Branch (1074:7): [True: 0, False: 54.4k]
  ------------------
 1075|      0|         return if_match(req, "AES-128/CCM", {2, 16, 840, 1, 101, 3, 4, 1, 7});
 1076|      0|      case 0x5DF23:
  ------------------
  |  Branch (1076:7): [True: 0, False: 54.4k]
  ------------------
 1077|      0|         return if_match(req, "HMAC(SHA-512-256)", {1, 2, 840, 113549, 2, 13});
 1078|      0|      case 0x5ED04:
  ------------------
  |  Branch (1078:7): [True: 0, False: 54.4k]
  ------------------
 1079|      0|         return if_match(req, "SM2", {1, 2, 156, 10197, 1, 301, 1});
 1080|      0|      case 0x5ED05:
  ------------------
  |  Branch (1080:7): [True: 0, False: 54.4k]
  ------------------
 1081|      0|         return if_match(req, "SM3", {1, 2, 156, 10197, 1, 401});
 1082|    130|      case 0x5FDC6:
  ------------------
  |  Branch (1082:7): [True: 130, False: 54.3k]
  ------------------
 1083|    130|         return if_match(req, "ECDSA/SHA-384", {1, 2, 840, 10045, 4, 3, 3});
 1084|      0|      case 0x6199F:
  ------------------
  |  Branch (1084:7): [True: 0, False: 54.4k]
  ------------------
 1085|      0|         return if_match(req, "SHA-3(224)", {2, 16, 840, 1, 101, 3, 4, 2, 7});
 1086|      0|      case 0x61E79:
  ------------------
  |  Branch (1086:7): [True: 0, False: 54.4k]
  ------------------
 1087|      0|         return if_match(req, "AES-192/CBC", {2, 16, 840, 1, 101, 3, 4, 1, 22});
 1088|      0|      case 0x61F7E:
  ------------------
  |  Branch (1088:7): [True: 0, False: 54.4k]
  ------------------
 1089|      0|         return if_match(req, "AES-192/CCM", {2, 16, 840, 1, 101, 3, 4, 1, 27});
 1090|      0|      case 0x64947:
  ------------------
  |  Branch (1090:7): [True: 0, False: 54.4k]
  ------------------
 1091|      0|         return if_match(req, "OpenPGP.Ed25519", {1, 3, 6, 1, 4, 1, 11591, 15, 1});
 1092|      0|      case 0x652E7:
  ------------------
  |  Branch (1092:7): [True: 0, False: 54.4k]
  ------------------
 1093|      0|         return if_match(req, "sm2p256v1", {1, 2, 156, 10197, 1, 301});
 1094|      0|      case 0x6697B:
  ------------------
  |  Branch (1094:7): [True: 0, False: 54.4k]
  ------------------
 1095|      0|         return if_match(req, "FrodoKEM-1344-AES", {1, 3, 6, 1, 4, 1, 25258, 1, 15, 3});
 1096|      0|      case 0x67B2C:
  ------------------
  |  Branch (1096:7): [True: 0, False: 54.4k]
  ------------------
 1097|      0|         return if_match(req, "X520.State", {2, 5, 4, 8});
 1098|      0|      case 0x67B9B:
  ------------------
  |  Branch (1098:7): [True: 0, False: 54.4k]
  ------------------
 1099|      0|         return if_match(req, "HMAC(SHA-384)", {1, 2, 840, 113549, 2, 10});
 1100|      0|      case 0x67D86:
  ------------------
  |  Branch (1100:7): [True: 0, False: 54.4k]
  ------------------
 1101|      0|         return if_match(req, "ECGDSA/SHA-384", {1, 3, 36, 3, 3, 2, 5, 4, 5});
 1102|      0|      case 0x68A0B:
  ------------------
  |  Branch (1102:7): [True: 0, False: 54.4k]
  ------------------
 1103|      0|         return if_match(req, "Camellia-128/OCB", {1, 3, 6, 1, 4, 1, 25258, 3, 2, 6});
 1104|      0|      case 0x68E33:
  ------------------
  |  Branch (1104:7): [True: 0, False: 54.4k]
  ------------------
 1105|      0|         return if_match(req, "PKCS9.ExtensionRequest", {1, 2, 840, 113549, 1, 9, 14});
 1106|  6.48k|      case 0x69126:
  ------------------
  |  Branch (1106:7): [True: 6.48k, False: 47.9k]
  ------------------
 1107|  6.48k|         return if_match(req, "X509v3.SubjectAlternativeName", {2, 5, 29, 17});
 1108|      0|      case 0x692F8:
  ------------------
  |  Branch (1108:7): [True: 0, False: 54.4k]
  ------------------
 1109|      0|         return if_match(req, "SM4/CBC", {1, 2, 156, 10197, 1, 104, 2});
 1110|      0|      case 0x695E1:
  ------------------
  |  Branch (1110:7): [True: 0, False: 54.4k]
  ------------------
 1111|      0|         return if_match(req, "Dilithium-4x4-r3", {1, 3, 6, 1, 4, 1, 25258, 1, 9, 1});
 1112|      0|      case 0x696DC:
  ------------------
  |  Branch (1112:7): [True: 0, False: 54.4k]
  ------------------
 1113|      0|         return if_match(req, "PKIX.IpAddrBlocks", {1, 3, 6, 1, 5, 5, 7, 1, 7});
 1114|  6.48k|      case 0x6A7CA:
  ------------------
  |  Branch (1114:7): [True: 6.48k, False: 47.9k]
  ------------------
 1115|  6.48k|         return if_match(req, "ECDSA", {1, 2, 840, 10045, 2, 1});
 1116|      0|      case 0x6BD26:
  ------------------
  |  Branch (1116:7): [True: 0, False: 54.4k]
  ------------------
 1117|      0|         return if_match(req, "GOST.INN", {1, 2, 643, 3, 131, 1, 1});
 1118|      0|      case 0x6CB3B:
  ------------------
  |  Branch (1118:7): [True: 0, False: 54.4k]
  ------------------
 1119|      0|         return if_match(req, "Camellia-192/OCB", {1, 3, 6, 1, 4, 1, 25258, 3, 2, 7});
 1120|      0|      case 0x6E602:
  ------------------
  |  Branch (1120:7): [True: 0, False: 54.4k]
  ------------------
 1121|      0|         return if_match(req, "Dilithium-8x7-r3", {1, 3, 6, 1, 4, 1, 25258, 1, 9, 3});
 1122|      0|      case 0x6F0C2:
  ------------------
  |  Branch (1122:7): [True: 0, False: 54.4k]
  ------------------
 1123|      0|         return if_match(req, "RSA/PKCS1v15(SHA-224)", {1, 2, 840, 113549, 1, 1, 14});
 1124|      0|      case 0x6F9F8:
  ------------------
  |  Branch (1124:7): [True: 0, False: 54.4k]
  ------------------
 1125|      0|         return if_match(req, "PKCS12.SafeContentsBag", {1, 2, 840, 113549, 1, 12, 10, 1, 6});
 1126|      0|      case 0x6FB26:
  ------------------
  |  Branch (1126:7): [True: 0, False: 54.4k]
  ------------------
 1127|      0|         return if_match(req, "PKIX.AuthorityInformationAccess", {1, 3, 6, 1, 5, 5, 7, 1, 1});
 1128|    569|      case 0x70BB6:
  ------------------
  |  Branch (1128:7): [True: 569, False: 53.9k]
  ------------------
 1129|    569|         return if_match(req, "brainpool384r1", {1, 3, 36, 3, 3, 2, 8, 1, 1, 11});
 1130|      0|      case 0x70EA6:
  ------------------
  |  Branch (1130:7): [True: 0, False: 54.4k]
  ------------------
 1131|      0|         return if_match(req, "PKCS12.PKCS8ShroudedKeyBag", {1, 2, 840, 113549, 1, 12, 10, 1, 2});
 1132|      0|      case 0x71EB3:
  ------------------
  |  Branch (1132:7): [True: 0, False: 54.4k]
  ------------------
 1133|      0|         return if_match(req, "SphincsPlus-haraka-128f-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 2});
 1134|      0|      case 0x7382C:
  ------------------
  |  Branch (1134:7): [True: 0, False: 54.4k]
  ------------------
 1135|      0|         return if_match(req, "ML-KEM-1024", {2, 16, 840, 1, 101, 3, 4, 4, 3});
 1136|      0|      case 0x743BD:
  ------------------
  |  Branch (1136:7): [True: 0, False: 54.4k]
  ------------------
 1137|      0|         return if_match(req, "AES-256/OCB", {1, 3, 6, 1, 4, 1, 25258, 3, 2, 3});
 1138|      0|      case 0x7498E:
  ------------------
  |  Branch (1138:7): [True: 0, False: 54.4k]
  ------------------
 1139|      0|         return if_match(req, "Camellia-128/CBC", {1, 2, 392, 200011, 61, 1, 1, 1, 2});
 1140|      0|      case 0x74C2E:
  ------------------
  |  Branch (1140:7): [True: 0, False: 54.4k]
  ------------------
 1141|      0|         return if_match(req, "ML-DSA-8x7", {2, 16, 840, 1, 101, 3, 4, 3, 19});
 1142|      0|      case 0x7505F:
  ------------------
  |  Branch (1142:7): [True: 0, False: 54.4k]
  ------------------
 1143|      0|         return if_match(req, "PKIX.XMPPAddr", {1, 3, 6, 1, 5, 5, 7, 8, 5});
 1144|      0|      case 0x7517A:
  ------------------
  |  Branch (1144:7): [True: 0, False: 54.4k]
  ------------------
 1145|      0|         return if_match(req, "RSA/PKCS1v15(MD2)", {1, 2, 840, 113549, 1, 1, 2});
 1146|      0|      case 0x7546B:
  ------------------
  |  Branch (1146:7): [True: 0, False: 54.4k]
  ------------------
 1147|      0|         return if_match(req, "RSA/PKCS1v15(MD5)", {1, 2, 840, 113549, 1, 1, 4});
 1148|      0|      case 0x75921:
  ------------------
  |  Branch (1148:7): [True: 0, False: 54.4k]
  ------------------
 1149|      0|         return if_match(req, "ClassicMcEliece_348864f", {1, 3, 6, 1, 4, 1, 22554, 5, 1, 2});
 1150|      0|      case 0x76784:
  ------------------
  |  Branch (1150:7): [True: 0, False: 54.4k]
  ------------------
 1151|      0|         return if_match(req, "SHA-3(384)", {2, 16, 840, 1, 101, 3, 4, 2, 9});
 1152|      0|      case 0x768FD:
  ------------------
  |  Branch (1152:7): [True: 0, False: 54.4k]
  ------------------
 1153|      0|         return if_match(req, "PKCS9.LocalKeyId", {1, 2, 840, 113549, 1, 9, 21});
 1154|    643|      case 0x76A19:
  ------------------
  |  Branch (1154:7): [True: 643, False: 53.8k]
  ------------------
 1155|    643|         return if_match(req, "brainpool512r1", {1, 3, 36, 3, 3, 2, 8, 1, 1, 13});
 1156|      0|      case 0x77254:
  ------------------
  |  Branch (1156:7): [True: 0, False: 54.4k]
  ------------------
 1157|      0|         return if_match(req, "SphincsPlus-haraka-256s-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 5});
 1158|      0|      case 0x77ADC:
  ------------------
  |  Branch (1158:7): [True: 0, False: 54.4k]
  ------------------
 1159|      0|         return if_match(req, "secp224k1", {1, 3, 132, 0, 32});
 1160|      0|      case 0x781B9:
  ------------------
  |  Branch (1160:7): [True: 0, False: 54.4k]
  ------------------
 1161|      0|         return if_match(req, "secp224r1", {1, 3, 132, 0, 33});
 1162|      0|      case 0x78ABE:
  ------------------
  |  Branch (1162:7): [True: 0, False: 54.4k]
  ------------------
 1163|      0|         return if_match(req, "Camellia-192/CBC", {1, 2, 392, 200011, 61, 1, 1, 1, 3});
 1164|      0|      case 0x792F2:
  ------------------
  |  Branch (1164:7): [True: 0, False: 54.4k]
  ------------------
 1165|      0|         return if_match(req, "ClassicMcEliece_6688128pc", {1, 3, 6, 1, 4, 1, 25258, 1, 18, 1});
 1166|      0|      case 0x7A661:
  ------------------
  |  Branch (1166:7): [True: 0, False: 54.4k]
  ------------------
 1167|      0|         return if_match(req, "DSA/SHA-512", {2, 16, 840, 1, 101, 3, 4, 3, 4});
 1168|      0|      case 0x7A977:
  ------------------
  |  Branch (1168:7): [True: 0, False: 54.4k]
  ------------------
 1169|      0|         return if_match(req, "X509v3.ExtendedKeyUsage", {2, 5, 29, 37});
 1170|      0|      case 0x7AE67:
  ------------------
  |  Branch (1170:7): [True: 0, False: 54.4k]
  ------------------
 1171|      0|         return if_match(req, "SM2_Enc", {1, 2, 156, 10197, 1, 301, 3});
 1172|      0|      case 0x7B602:
  ------------------
  |  Branch (1172:7): [True: 0, False: 54.4k]
  ------------------
 1173|      0|         return if_match(req, "Twofish/OCB", {1, 3, 6, 1, 4, 1, 25258, 3, 2, 5});
 1174|      0|      case 0x7B9A1:
  ------------------
  |  Branch (1174:7): [True: 0, False: 54.4k]
  ------------------
 1175|      0|         return if_match(req, "SphincsPlus-sha2-192s-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 3});
 1176|      0|      case 0x7BB0A:
  ------------------
  |  Branch (1176:7): [True: 0, False: 54.4k]
  ------------------
 1177|      0|         return if_match(req, "SLH-DSA-SHAKE-256f", {2, 16, 840, 1, 101, 3, 4, 3, 31});
 1178|      0|      case 0x7BB17:
  ------------------
  |  Branch (1178:7): [True: 0, False: 54.4k]
  ------------------
 1179|      0|         return if_match(req, "SLH-DSA-SHAKE-256s", {2, 16, 840, 1, 101, 3, 4, 3, 30});
 1180|      0|      case 0x7BCF3:
  ------------------
  |  Branch (1180:7): [True: 0, False: 54.4k]
  ------------------
 1181|      0|         return if_match(req, "PKIX.EmailProtection", {1, 3, 6, 1, 5, 5, 7, 3, 4});
 1182|      0|      case 0x7CC2C:
  ------------------
  |  Branch (1182:7): [True: 0, False: 54.4k]
  ------------------
 1183|      0|         return if_match(req, "SHA-512-256", {2, 16, 840, 1, 101, 3, 4, 2, 6});
 1184|      0|      case 0x7CF41:
  ------------------
  |  Branch (1184:7): [True: 0, False: 54.4k]
  ------------------
 1185|      0|         return if_match(req, "SphincsPlus-shake-192s-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 3});
 1186|      0|      case 0x7DB91:
  ------------------
  |  Branch (1186:7): [True: 0, False: 54.4k]
  ------------------
 1187|      0|         return if_match(req, "GOST-34.10", {1, 2, 643, 2, 2, 19});
 1188|    182|      case 0x7E319:
  ------------------
  |  Branch (1188:7): [True: 182, False: 54.2k]
  ------------------
 1189|    182|         return if_match(req, "ECDSA/SHA-512", {1, 2, 840, 10045, 4, 3, 4});
 1190|      0|      case 0x7E874:
  ------------------
  |  Branch (1190:7): [True: 0, False: 54.4k]
  ------------------
 1191|      0|         return if_match(req, "ClassicMcEliece_6688128f", {1, 3, 6, 1, 4, 1, 22554, 5, 1, 6});
 1192|      0|      case 0x7EAAF:
  ------------------
  |  Branch (1192:7): [True: 0, False: 54.4k]
  ------------------
 1193|      0|         return if_match(req, "eFrodoKEM-640-SHAKE", {1, 3, 6, 1, 4, 1, 25258, 1, 16, 1});
 1194|      0|      case 0x7F51F:
  ------------------
  |  Branch (1194:7): [True: 0, False: 54.4k]
  ------------------
 1195|      0|         return if_match(req, "PKIX.IPsecTunnel", {1, 3, 6, 1, 5, 5, 7, 3, 6});
 1196|      0|      case 0x80272:
  ------------------
  |  Branch (1196:7): [True: 0, False: 54.4k]
  ------------------
 1197|      0|         return if_match(req, "X520.Organization", {2, 5, 4, 10});
 1198|      0|      case 0x80340:
  ------------------
  |  Branch (1198:7): [True: 0, False: 54.4k]
  ------------------
 1199|      0|         return if_match(req, "AES-256/CBC", {2, 16, 840, 1, 101, 3, 4, 1, 42});
 1200|      0|      case 0x80445:
  ------------------
  |  Branch (1200:7): [True: 0, False: 54.4k]
  ------------------
 1201|      0|         return if_match(req, "AES-256/CCM", {2, 16, 840, 1, 101, 3, 4, 1, 47});
 1202|      0|      case 0x811F7:
  ------------------
  |  Branch (1202:7): [True: 0, False: 54.4k]
  ------------------
 1203|      0|         return if_match(req, "HMAC(SHA-256)", {1, 2, 840, 113549, 2, 9});
 1204|      0|      case 0x82434:
  ------------------
  |  Branch (1204:7): [True: 0, False: 54.4k]
  ------------------
 1205|      0|         return if_match(req, "PKCS9.X509CRL", {1, 2, 840, 113549, 1, 9, 23, 1});
 1206|      0|      case 0x82B47:
  ------------------
  |  Branch (1206:7): [True: 0, False: 54.4k]
  ------------------
 1207|      0|         return if_match(req, "Threefish-512/CBC", {1, 3, 6, 1, 4, 1, 25258, 3, 2});
 1208|    126|      case 0x83EA7:
  ------------------
  |  Branch (1208:7): [True: 126, False: 54.3k]
  ------------------
 1209|    126|         return if_match(req, "RSA/PKCS1v15(SHA-384)", {1, 2, 840, 113549, 1, 1, 12});
 1210|      0|      case 0x84596:
  ------------------
  |  Branch (1210:7): [True: 0, False: 54.4k]
  ------------------
 1211|      0|         return if_match(req, "eFrodoKEM-640-AES", {1, 3, 6, 1, 4, 1, 25258, 1, 17, 1});
 1212|      0|      case 0x8469F:
  ------------------
  |  Branch (1212:7): [True: 0, False: 54.4k]
  ------------------
 1213|      0|         return if_match(req, "ClassicMcEliece_6960119pcf", {1, 3, 6, 1, 4, 1, 25258, 1, 18, 4});
 1214|      0|      case 0x84CA4:
  ------------------
  |  Branch (1214:7): [True: 0, False: 54.4k]
  ------------------
 1215|      0|         return if_match(req, "secp256k1", {1, 3, 132, 0, 10});
 1216|    802|      case 0x85381:
  ------------------
  |  Branch (1216:7): [True: 802, False: 53.6k]
  ------------------
 1217|    802|         return if_match(req, "secp256r1", {1, 2, 840, 10045, 3, 1, 7});
 1218|      0|      case 0x854FC:
  ------------------
  |  Branch (1218:7): [True: 0, False: 54.4k]
  ------------------
 1219|      0|         return if_match(req, "PKIX.IPsecUser", {1, 3, 6, 1, 5, 5, 7, 3, 7});
 1220|      0|      case 0x85F51:
  ------------------
  |  Branch (1220:7): [True: 0, False: 54.4k]
  ------------------
 1221|      0|         return if_match(req, "Serpent/SIV", {1, 3, 6, 1, 4, 1, 25258, 3, 4, 4});
 1222|      0|      case 0x862D9:
  ------------------
  |  Branch (1222:7): [True: 0, False: 54.4k]
  ------------------
 1223|      0|         return if_match(req, "ECGDSA/SHA-512", {1, 3, 36, 3, 3, 2, 5, 4, 6});
 1224|      0|      case 0x87585:
  ------------------
  |  Branch (1224:7): [True: 0, False: 54.4k]
  ------------------
 1225|      0|         return if_match(req, "Twofish/CBC", {1, 3, 6, 1, 4, 1, 25258, 3, 3});
 1226|      0|      case 0x877D1:
  ------------------
  |  Branch (1226:7): [True: 0, False: 54.4k]
  ------------------
 1227|      0|         return if_match(req, "PKCS9.EmailAddress", {1, 2, 840, 113549, 1, 9, 1});
 1228|      0|      case 0x87D27:
  ------------------
  |  Branch (1228:7): [True: 0, False: 54.4k]
  ------------------
 1229|      0|         return if_match(req, "PKIX.CertificateAuthorityIssuers", {1, 3, 6, 1, 5, 5, 7, 48, 2});
 1230|      0|      case 0x87E42:
  ------------------
  |  Branch (1230:7): [True: 0, False: 54.4k]
  ------------------
 1231|      0|         return if_match(req, "X509v3.AuthorityKeyIdentifier", {2, 5, 29, 35});
 1232|     42|      case 0x889B1:
  ------------------
  |  Branch (1232:7): [True: 42, False: 54.4k]
  ------------------
 1233|     42|         return if_match(req, "ECDSA/SHA-1", {1, 2, 840, 10045, 4, 1});
 1234|      0|      case 0x89658:
  ------------------
  |  Branch (1234:7): [True: 0, False: 54.4k]
  ------------------
 1235|      0|         return if_match(req, "PBE-PKCS5v20", {1, 2, 840, 113549, 1, 5, 13});
 1236|      0|      case 0x8976D:
  ------------------
  |  Branch (1236:7): [True: 0, False: 54.4k]
  ------------------
 1237|      0|         return if_match(req, "PKCS9.MessageDigest", {1, 2, 840, 113549, 1, 9, 4});
 1238|      0|      case 0x8B002:
  ------------------
  |  Branch (1238:7): [True: 0, False: 54.4k]
  ------------------
 1239|      0|         return if_match(req, "Camellia-256/OCB", {1, 3, 6, 1, 4, 1, 25258, 3, 2, 8});
 1240|      0|      case 0x8B935:
  ------------------
  |  Branch (1240:7): [True: 0, False: 54.4k]
  ------------------
 1241|      0|         return if_match(req, "ClassicMcEliece_6688128", {1, 3, 6, 1, 4, 1, 22554, 5, 1, 5});
 1242|      0|      case 0x8BB11:
  ------------------
  |  Branch (1242:7): [True: 0, False: 54.4k]
  ------------------
 1243|      0|         return if_match(req, "X509v3.NoRevocationAvailable", {2, 5, 29, 56});
 1244|      0|      case 0x8CE3D:
  ------------------
  |  Branch (1244:7): [True: 0, False: 54.4k]
  ------------------
 1245|      0|         return if_match(req, "PKCS9.ChallengePassword", {1, 2, 840, 113549, 1, 9, 7});
 1246|      0|      case 0x8D45C:
  ------------------
  |  Branch (1246:7): [True: 0, False: 54.4k]
  ------------------
 1247|      0|         return if_match(req, "ECKCDSA", {1, 0, 14888, 3, 0, 5});
 1248|      0|      case 0x8E0C1:
  ------------------
  |  Branch (1248:7): [True: 0, False: 54.4k]
  ------------------
 1249|      0|         return if_match(req, "X509v3.CertificatePolicies", {2, 5, 29, 32});
 1250|      0|      case 0x8E39A:
  ------------------
  |  Branch (1250:7): [True: 0, False: 54.4k]
  ------------------
 1251|      0|         return if_match(req, "HSS-LMS-Private-Key", {1, 3, 6, 1, 4, 1, 25258, 1, 13});
 1252|      0|      case 0x8EC51:
  ------------------
  |  Branch (1252:7): [True: 0, False: 54.4k]
  ------------------
 1253|      0|         return if_match(req, "Kyber-768-r3", {1, 3, 6, 1, 4, 1, 25258, 1, 7, 2});
 1254|      0|      case 0x8F94A:
  ------------------
  |  Branch (1254:7): [True: 0, False: 54.4k]
  ------------------
 1255|      0|         return if_match(req, "Dilithium-6x5-r3", {1, 3, 6, 1, 4, 1, 25258, 1, 9, 2});
 1256|      0|      case 0x8FC20:
  ------------------
  |  Branch (1256:7): [True: 0, False: 54.4k]
  ------------------
 1257|      0|         return if_match(req, "AES-128/SIV", {1, 3, 6, 1, 4, 1, 25258, 3, 4, 1});
 1258|      0|      case 0x8FDE0:
  ------------------
  |  Branch (1258:7): [True: 0, False: 54.4k]
  ------------------
 1259|      0|         return if_match(req, "SHA-3(256)", {2, 16, 840, 1, 101, 3, 4, 2, 8});
 1260|      0|      case 0x919E3:
  ------------------
  |  Branch (1260:7): [True: 0, False: 54.4k]
  ------------------
 1261|      0|         return if_match(req, "Serpent/GCM", {1, 3, 6, 1, 4, 1, 25258, 3, 101});
 1262|      0|      case 0x91C1A:
  ------------------
  |  Branch (1262:7): [True: 0, False: 54.4k]
  ------------------
 1263|      0|         return if_match(req, "X25519", {1, 3, 101, 110});
 1264|      0|      case 0x91DC4:
  ------------------
  |  Branch (1264:7): [True: 0, False: 54.4k]
  ------------------
 1265|      0|         return if_match(req, "McEliece", {1, 3, 6, 1, 4, 1, 25258, 1, 3});
 1266|      0|      case 0x93467:
  ------------------
  |  Branch (1266:7): [True: 0, False: 54.4k]
  ------------------
 1267|      0|         return if_match(req, "Dilithium-6x5-AES-r3", {1, 3, 6, 1, 4, 1, 25258, 1, 10, 2});
 1268|      0|      case 0x93D50:
  ------------------
  |  Branch (1268:7): [True: 0, False: 54.4k]
  ------------------
 1269|      0|         return if_match(req, "AES-192/SIV", {1, 3, 6, 1, 4, 1, 25258, 3, 4, 2});
 1270|      0|      case 0x95166:
  ------------------
  |  Branch (1270:7): [True: 0, False: 54.4k]
  ------------------
 1271|      0|         return if_match(req, "SLH-DSA-SHAKE-128f", {2, 16, 840, 1, 101, 3, 4, 3, 27});
 1272|      0|      case 0x95173:
  ------------------
  |  Branch (1272:7): [True: 0, False: 54.4k]
  ------------------
 1273|      0|         return if_match(req, "SLH-DSA-SHAKE-128s", {2, 16, 840, 1, 101, 3, 4, 3, 26});
 1274|      0|      case 0x952D6:
  ------------------
  |  Branch (1274:7): [True: 0, False: 54.4k]
  ------------------
 1275|      0|         return if_match(req, "PKIX.OCSP", {1, 3, 6, 1, 5, 5, 7, 48, 1});
 1276|      0|      case 0x959B9:
  ------------------
  |  Branch (1276:7): [True: 0, False: 54.4k]
  ------------------
 1277|      0|         return if_match(req, "PKIX.IPsecEndSystem", {1, 3, 6, 1, 5, 5, 7, 3, 5});
 1278|      0|      case 0x96F85:
  ------------------
  |  Branch (1278:7): [True: 0, False: 54.4k]
  ------------------
 1279|      0|         return if_match(req, "Camellia-256/CBC", {1, 2, 392, 200011, 61, 1, 1, 1, 4});
 1280|      0|      case 0x97D5E:
  ------------------
  |  Branch (1280:7): [True: 0, False: 54.4k]
  ------------------
 1281|      0|         return if_match(req, "HMAC(SHA-1)", {1, 2, 840, 113549, 2, 7});
 1282|      0|      case 0x9805C:
  ------------------
  |  Branch (1282:7): [True: 0, False: 54.4k]
  ------------------
 1283|      0|         return if_match(req, "SEED/CBC", {1, 2, 410, 200004, 1, 4});
 1284|      0|      case 0x980E7:
  ------------------
  |  Branch (1284:7): [True: 0, False: 54.4k]
  ------------------
 1285|      0|         return if_match(req, "SphincsPlus-haraka-192s-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 3});
 1286|      0|      case 0x980F5:
  ------------------
  |  Branch (1286:7): [True: 0, False: 54.4k]
  ------------------
 1287|      0|         return if_match(req, "GOST.SubjectSigningTool", {1, 2, 643, 100, 111});
 1288|      0|      case 0x98B03:
  ------------------
  |  Branch (1288:7): [True: 0, False: 54.4k]
  ------------------
 1289|      0|         return if_match(req, "XMSS", {0, 4, 0, 127, 0, 15, 1, 1, 13, 0});
 1290|      0|      case 0x9A6B2:
  ------------------
  |  Branch (1290:7): [True: 0, False: 54.4k]
  ------------------
 1291|      0|         return if_match(req, "ECKCDSA/SHA-1", {1, 2, 410, 200004, 1, 100, 4, 3});
 1292|      0|      case 0x9B1CF:
  ------------------
  |  Branch (1292:7): [True: 0, False: 54.4k]
  ------------------
 1293|      0|         return if_match(req, "SM4/SIV", {1, 3, 6, 1, 4, 1, 25258, 3, 4, 9});
 1294|      0|      case 0x9B6B2:
  ------------------
  |  Branch (1294:7): [True: 0, False: 54.4k]
  ------------------
 1295|      0|         return if_match(req, "AES-128/GCM", {2, 16, 840, 1, 101, 3, 4, 1, 6});
 1296|      0|      case 0x9B6BB:
  ------------------
  |  Branch (1296:7): [True: 0, False: 54.4k]
  ------------------
 1297|      0|         return if_match(req, "X520.OrganizationalUnit", {2, 5, 4, 11});
 1298|      0|      case 0x9B851:
  ------------------
  |  Branch (1298:7): [True: 0, False: 54.4k]
  ------------------
 1299|      0|         return if_match(req, "OpenPGP.Curve25519", {1, 3, 6, 1, 4, 1, 3029, 1, 5, 1});
 1300|      0|      case 0x9C80B:
  ------------------
  |  Branch (1300:7): [True: 0, False: 54.4k]
  ------------------
 1301|      0|         return if_match(req, "SLH-DSA-SHA2-192f", {2, 16, 840, 1, 101, 3, 4, 3, 23});
 1302|      0|      case 0x9C818:
  ------------------
  |  Branch (1302:7): [True: 0, False: 54.4k]
  ------------------
 1303|      0|         return if_match(req, "SLH-DSA-SHA2-192s", {2, 16, 840, 1, 101, 3, 4, 3, 22});
 1304|      0|      case 0x9CD2B:
  ------------------
  |  Branch (1304:7): [True: 0, False: 54.4k]
  ------------------
 1305|      0|         return if_match(req, "Scrypt", {1, 3, 6, 1, 4, 1, 11591, 4, 11});
 1306|      0|      case 0x9CDE1:
  ------------------
  |  Branch (1306:7): [True: 0, False: 54.4k]
  ------------------
 1307|      0|         return if_match(req, "GOST-34.10-2012-256/SHA-256", {1, 3, 6, 1, 4, 1, 25258, 1, 6, 1});
 1308|      0|      case 0x9CF73:
  ------------------
  |  Branch (1308:7): [True: 0, False: 54.4k]
  ------------------
 1309|      0|         return if_match(req, "ClassicMcEliece_460896f", {1, 3, 6, 1, 4, 1, 22554, 5, 1, 4});
 1310|      0|      case 0x9D354:
  ------------------
  |  Branch (1310:7): [True: 0, False: 54.4k]
  ------------------
 1311|      0|         return if_match(req, "RIPEMD-160", {1, 3, 36, 3, 2, 1});
 1312|    110|      case 0x9D503:
  ------------------
  |  Branch (1312:7): [True: 110, False: 54.3k]
  ------------------
 1313|    110|         return if_match(req, "RSA/PKCS1v15(SHA-256)", {1, 2, 840, 113549, 1, 1, 11});
 1314|      0|      case 0x9EC88:
  ------------------
  |  Branch (1314:7): [True: 0, False: 54.4k]
  ------------------
 1315|      0|         return if_match(req, "DSA/SHA-3(512)", {2, 16, 840, 1, 101, 3, 4, 3, 8});
 1316|      0|      case 0x9EF36:
  ------------------
  |  Branch (1316:7): [True: 0, False: 54.4k]
  ------------------
 1317|      0|         return if_match(req, "ClassicMcEliece_6960119", {1, 3, 6, 1, 4, 1, 22554, 5, 1, 7});
 1318|      0|      case 0x9F764:
  ------------------
  |  Branch (1318:7): [True: 0, False: 54.4k]
  ------------------
 1319|      0|         return if_match(req, "X448", {1, 3, 101, 111});
 1320|      0|      case 0x9F7E2:
  ------------------
  |  Branch (1320:7): [True: 0, False: 54.4k]
  ------------------
 1321|      0|         return if_match(req, "AES-192/GCM", {2, 16, 840, 1, 101, 3, 4, 1, 26});
 1322|      0|      case 0x9F9C5:
  ------------------
  |  Branch (1322:7): [True: 0, False: 54.4k]
  ------------------
 1323|      0|         return if_match(req, "ClassicMcEliece_6688128pcf", {1, 3, 6, 1, 4, 1, 25258, 1, 18, 2});
 1324|      0|      case 0xA0805:
  ------------------
  |  Branch (1324:7): [True: 0, False: 54.4k]
  ------------------
 1325|      0|         return if_match(req, "PKCS9.SDSICertificate", {1, 2, 840, 113549, 1, 9, 22, 2});
 1326|      0|      case 0xA2B5B:
  ------------------
  |  Branch (1326:7): [True: 0, False: 54.4k]
  ------------------
 1327|      0|         return if_match(req, "X509v3.CRLNumber", {2, 5, 29, 20});
 1328|      0|      case 0xA3005:
  ------------------
  |  Branch (1328:7): [True: 0, False: 54.4k]
  ------------------
 1329|      0|         return if_match(req, "X520.Title", {2, 5, 4, 12});
 1330|      0|      case 0xA323F:
  ------------------
  |  Branch (1330:7): [True: 0, False: 54.4k]
  ------------------
 1331|      0|         return if_match(req, "X509v3.NameConstraints", {2, 5, 29, 30});
 1332|      0|      case 0xA3C55:
  ------------------
  |  Branch (1332:7): [True: 0, False: 54.4k]
  ------------------
 1333|      0|         return if_match(req, "X520.Pseudonym", {2, 5, 4, 65});
 1334|      0|      case 0xA4809:
  ------------------
  |  Branch (1334:7): [True: 0, False: 54.4k]
  ------------------
 1335|      0|         return if_match(req, "SphincsPlus-sha2-256f-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 6});
 1336|    833|      case 0xA57AF:
  ------------------
  |  Branch (1336:7): [True: 833, False: 53.6k]
  ------------------
 1337|    833|         return if_match(req, "secp521r1", {1, 3, 132, 0, 35});
 1338|      0|      case 0xA5DA9:
  ------------------
  |  Branch (1338:7): [True: 0, False: 54.4k]
  ------------------
 1339|      0|         return if_match(req, "SphincsPlus-shake-256f-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 6});
 1340|      0|      case 0xA6865:
  ------------------
  |  Branch (1340:7): [True: 0, False: 54.4k]
  ------------------
 1341|      0|         return if_match(req, "Camellia-128/SIV", {1, 3, 6, 1, 4, 1, 25258, 3, 4, 6});
 1342|      0|      case 0xA6C61:
  ------------------
  |  Branch (1342:7): [True: 0, False: 54.4k]
  ------------------
 1343|      0|         return if_match(req, "SM4/GCM", {1, 2, 156, 10197, 1, 104, 8});
 1344|      0|      case 0xA8439:
  ------------------
  |  Branch (1344:7): [True: 0, False: 54.4k]
  ------------------
 1345|      0|         return if_match(req, "PKCS12.CertBag", {1, 2, 840, 113549, 1, 12, 10, 1, 3});
 1346|      0|      case 0xA9061:
  ------------------
  |  Branch (1346:7): [True: 0, False: 54.4k]
  ------------------
 1347|      0|         return if_match(req, "Kyber-768-90s-r3", {1, 3, 6, 1, 4, 1, 25258, 1, 11, 2});
 1348|      0|      case 0xAA995:
  ------------------
  |  Branch (1348:7): [True: 0, False: 54.4k]
  ------------------
 1349|      0|         return if_match(req, "Camellia-192/SIV", {1, 3, 6, 1, 4, 1, 25258, 3, 4, 7});
 1350|      0|      case 0xAAE2B:
  ------------------
  |  Branch (1350:7): [True: 0, False: 54.4k]
  ------------------
 1351|      0|         return if_match(req, "Dilithium-8x7-AES-r3", {1, 3, 6, 1, 4, 1, 25258, 1, 10, 3});
 1352|      0|      case 0xABCED:
  ------------------
  |  Branch (1352:7): [True: 0, False: 54.4k]
  ------------------
 1353|      0|         return if_match(req, "GOST.IssuerSigningTool", {1, 2, 643, 100, 112});
 1354|      0|      case 0xABD24:
  ------------------
  |  Branch (1354:7): [True: 0, False: 54.4k]
  ------------------
 1355|      0|         return if_match(req, "RSA/OAEP", {1, 2, 840, 113549, 1, 1, 7});
 1356|      0|      case 0xAC2EC:
  ------------------
  |  Branch (1356:7): [True: 0, False: 54.4k]
  ------------------
 1357|      0|         return if_match(req, "Streebog-256", {1, 2, 643, 7, 1, 1, 2, 2});
 1358|      0|      case 0xAC3DD:
  ------------------
  |  Branch (1358:7): [True: 0, False: 54.4k]
  ------------------
 1359|      0|         return if_match(req, "Certificate Comment", {2, 16, 840, 1, 113730, 1, 13});
 1360|      0|      case 0xAC511:
  ------------------
  |  Branch (1360:7): [True: 0, False: 54.4k]
  ------------------
 1361|      0|         return if_match(req, "PBE-SHA1-3DES", {1, 2, 840, 113549, 1, 12, 1, 3});
 1362|      0|      case 0xAE6FE:
  ------------------
  |  Branch (1362:7): [True: 0, False: 54.4k]
  ------------------
 1363|      0|         return if_match(req, "PKIX.ClientAuth", {1, 3, 6, 1, 5, 5, 7, 3, 2});
 1364|      0|      case 0xAE8D3:
  ------------------
  |  Branch (1364:7): [True: 0, False: 54.4k]
  ------------------
 1365|      0|         return if_match(req, "ClassicMcEliece_8192128pcf", {1, 3, 6, 1, 4, 1, 25258, 1, 18, 6});
 1366|      0|      case 0xAF476:
  ------------------
  |  Branch (1366:7): [True: 0, False: 54.4k]
  ------------------
 1367|      0|         return if_match(req, "ECDH", {1, 3, 132, 1, 12});
 1368|      0|      case 0xAFA6A:
  ------------------
  |  Branch (1368:7): [True: 0, False: 54.4k]
  ------------------
 1369|      0|         return if_match(req, "RSA/PKCS1v15(SHA-3(384))", {2, 16, 840, 1, 101, 3, 4, 3, 15});
 1370|      0|      case 0xB2217:
  ------------------
  |  Branch (1370:7): [True: 0, False: 54.4k]
  ------------------
 1371|      0|         return if_match(req, "AES-256/SIV", {1, 3, 6, 1, 4, 1, 25258, 3, 4, 3});
 1372|      0|      case 0xB22F7:
  ------------------
  |  Branch (1372:7): [True: 0, False: 54.4k]
  ------------------
 1373|      0|         return if_match(req, "Camellia-128/GCM", {0, 3, 4401, 5, 3, 1, 9, 6});
 1374|      0|      case 0xB23DE:
  ------------------
  |  Branch (1374:7): [True: 0, False: 54.4k]
  ------------------
 1375|      0|         return if_match(req, "X520.Locality", {2, 5, 4, 7});
 1376|      0|      case 0xB2FBD:
  ------------------
  |  Branch (1376:7): [True: 0, False: 54.4k]
  ------------------
 1377|      0|         return if_match(req, "ECKCDSA/SHA-224", {1, 2, 410, 200004, 1, 100, 4, 4});
 1378|      0|      case 0xB32B0:
  ------------------
  |  Branch (1378:7): [True: 0, False: 54.4k]
  ------------------
 1379|      0|         return if_match(req, "ECKCDSA/SHA-256", {1, 2, 410, 200004, 1, 100, 4, 5});
 1380|      0|      case 0xB360E:
  ------------------
  |  Branch (1380:7): [True: 0, False: 54.4k]
  ------------------
 1381|      0|         return if_match(req, "eFrodoKEM-976-SHAKE", {1, 3, 6, 1, 4, 1, 25258, 1, 16, 2});
 1382|      0|      case 0xB4368:
  ------------------
  |  Branch (1382:7): [True: 0, False: 54.4k]
  ------------------
 1383|      0|         return if_match(req, "ECGDSA/SHA-1", {1, 3, 36, 3, 3, 2, 5, 4, 2});
 1384|      0|      case 0xB58CD:
  ------------------
  |  Branch (1384:7): [True: 0, False: 54.4k]
  ------------------
 1385|      0|         return if_match(req, "RSA/PKCS1v15(SHA-3(512))", {2, 16, 840, 1, 101, 3, 4, 3, 16});
 1386|      0|      case 0xB6427:
  ------------------
  |  Branch (1386:7): [True: 0, False: 54.4k]
  ------------------
 1387|      0|         return if_match(req, "Camellia-192/GCM", {0, 3, 4401, 5, 3, 1, 9, 26});
 1388|      0|      case 0xB7102:
  ------------------
  |  Branch (1388:7): [True: 0, False: 54.4k]
  ------------------
 1389|      0|         return if_match(req, "brainpool224r1", {1, 3, 36, 3, 3, 2, 8, 1, 1, 5});
 1390|      0|      case 0xB710D:
  ------------------
  |  Branch (1390:7): [True: 0, False: 54.4k]
  ------------------
 1391|      0|         return if_match(req, "X509v3.CRLIssuingDistributionPoint", {2, 5, 29, 28});
 1392|      0|      case 0xB72D4:
  ------------------
  |  Branch (1392:7): [True: 0, False: 54.4k]
  ------------------
 1393|      0|         return if_match(req, "Microsoft UPN", {1, 3, 6, 1, 4, 1, 311, 20, 2, 3});
 1394|  11.9k|      case 0xB73A5:
  ------------------
  |  Branch (1394:7): [True: 11.9k, False: 42.5k]
  ------------------
 1395|  11.9k|         return if_match(req, "RSA/PSS", {1, 2, 840, 113549, 1, 1, 10});
 1396|      0|      case 0xB84B3:
  ------------------
  |  Branch (1396:7): [True: 0, False: 54.4k]
  ------------------
 1397|      0|         return if_match(req, "PKIX.CodeSigning", {1, 3, 6, 1, 5, 5, 7, 3, 3});
 1398|      0|      case 0xB8CB9:
  ------------------
  |  Branch (1398:7): [True: 0, False: 54.4k]
  ------------------
 1399|      0|         return if_match(req, "GOST-34.10-2012-256", {1, 2, 643, 7, 1, 1, 1, 1});
 1400|      0|      case 0xB945C:
  ------------------
  |  Branch (1400:7): [True: 0, False: 54.4k]
  ------------------
 1401|      0|         return if_match(req, "Twofish/SIV", {1, 3, 6, 1, 4, 1, 25258, 3, 4, 5});
 1402|      0|      case 0xB94E4:
  ------------------
  |  Branch (1402:7): [True: 0, False: 54.4k]
  ------------------
 1403|      0|         return if_match(req, "gost_512A", {1, 2, 643, 7, 1, 2, 1, 2, 1});
 1404|      0|      case 0xB94E5:
  ------------------
  |  Branch (1404:7): [True: 0, False: 54.4k]
  ------------------
 1405|      0|         return if_match(req, "gost_512B", {1, 2, 643, 7, 1, 2, 1, 2, 2});
 1406|      0|      case 0xBA1D8:
  ------------------
  |  Branch (1406:7): [True: 0, False: 54.4k]
  ------------------
 1407|      0|         return if_match(req, "X520.StreetAddress", {2, 5, 4, 9});
 1408|      0|      case 0xBCB45:
  ------------------
  |  Branch (1408:7): [True: 0, False: 54.4k]
  ------------------
 1409|      0|         return if_match(req, "PKCS12.CRLBag", {1, 2, 840, 113549, 1, 12, 10, 1, 4});
 1410|      0|      case 0xBCC82:
  ------------------
  |  Branch (1410:7): [True: 0, False: 54.4k]
  ------------------
 1411|      0|         return if_match(req, "x962_p239v1", {1, 2, 840, 10045, 3, 1, 4});
 1412|      0|      case 0xBCC83:
  ------------------
  |  Branch (1412:7): [True: 0, False: 54.4k]
  ------------------
 1413|      0|         return if_match(req, "x962_p239v2", {1, 2, 840, 10045, 3, 1, 5});
 1414|      0|      case 0xBCC84:
  ------------------
  |  Branch (1414:7): [True: 0, False: 54.4k]
  ------------------
 1415|      0|         return if_match(req, "x962_p239v3", {1, 2, 840, 10045, 3, 1, 6});
 1416|      0|      case 0xBD92B:
  ------------------
  |  Branch (1416:7): [True: 0, False: 54.4k]
  ------------------
 1417|      0|         return if_match(req, "X509v3.HoldInstructionCode", {2, 5, 29, 23});
 1418|      0|      case 0xBDCA9:
  ------------------
  |  Branch (1418:7): [True: 0, False: 54.4k]
  ------------------
 1419|      0|         return if_match(req, "AES-256/GCM", {2, 16, 840, 1, 101, 3, 4, 1, 46});
 1420|      0|      case 0xBE48D:
  ------------------
  |  Branch (1420:7): [True: 0, False: 54.4k]
  ------------------
 1421|      0|         return if_match(req, "PKIX.OCSP.BasicResponse", {1, 3, 6, 1, 5, 5, 7, 48, 1, 1});
 1422|      0|      case 0xBF71E:
  ------------------
  |  Branch (1422:7): [True: 0, False: 54.4k]
  ------------------
 1423|      0|         return if_match(req, "Kyber-1024-r3", {1, 3, 6, 1, 4, 1, 25258, 1, 7, 3});
 1424|      0|      case 0xBFF01:
  ------------------
  |  Branch (1424:7): [True: 0, False: 54.4k]
  ------------------
 1425|      0|         return if_match(req, "DSA/SHA-3(224)", {2, 16, 840, 1, 101, 3, 4, 3, 5});
 1426|      0|      case 0xC0F4F:
  ------------------
  |  Branch (1426:7): [True: 0, False: 54.4k]
  ------------------
 1427|      0|         return if_match(req, "SphincsPlus-haraka-256f-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 6});
 1428|      0|      case 0xC1875:
  ------------------
  |  Branch (1428:7): [True: 0, False: 54.4k]
  ------------------
 1429|      0|         return if_match(req, "SHA-1", {1, 3, 14, 3, 2, 26});
 1430|      0|      case 0xC28D1:
  ------------------
  |  Branch (1430:7): [True: 0, False: 54.4k]
  ------------------
 1431|      0|         return if_match(req, "PKIX.OCSPSigning", {1, 3, 6, 1, 5, 5, 7, 3, 9});
 1432|  1.25k|      case 0xC42CA:
  ------------------
  |  Branch (1432:7): [True: 1.25k, False: 53.2k]
  ------------------
 1433|  1.25k|         return if_match(req, "brainpool256r1", {1, 3, 36, 3, 3, 2, 8, 1, 1, 7});
 1434|      0|      default:
  ------------------
  |  Branch (1434:7): [True: 0, False: 54.4k]
  ------------------
 1435|      0|         return {};
 1436|  54.4k|   }
 1437|  54.4k|}
_ZN5Botan7OID_Map16load_oid2str_mapEv:
 1439|      1|std::unordered_map<OID, std::string> OID_Map::load_oid2str_map() {
 1440|      1|   return {
 1441|      1|      {OID{2, 5, 8, 1, 1}, "RSA"},
 1442|      1|      {OID{1, 3, 6, 1, 4, 1, 8301, 3, 1, 2, 9, 0, 38}, "secp521r1"},
 1443|      1|      {OID{1, 2, 643, 2, 2, 35, 1}, "gost_256A"},
 1444|      1|      {OID{1, 2, 643, 2, 2, 36, 0}, "gost_256A"},
 1445|      1|   };
 1446|      1|}
_ZN5Botan7OID_Map16load_str2oid_mapEv:
 1448|      1|std::unordered_map<std::string, OID> OID_Map::load_str2oid_map() {
 1449|      1|   return {
 1450|      1|      {"Curve25519", OID{1, 3, 101, 110}},
 1451|      1|      {"SM2_Sig", OID{1, 2, 156, 10197, 1, 301, 1}},
 1452|      1|      {"RSA/EMSA3(MD2)", OID{1, 2, 840, 113549, 1, 1, 2}},
 1453|      1|      {"RSA/EMSA3(MD5)", OID{1, 2, 840, 113549, 1, 1, 4}},
 1454|      1|      {"RSA/EMSA3(SHA-1)", OID{1, 2, 840, 113549, 1, 1, 5}},
 1455|      1|      {"RSA/EMSA3(SHA-256)", OID{1, 2, 840, 113549, 1, 1, 11}},
 1456|      1|      {"RSA/EMSA3(SHA-384)", OID{1, 2, 840, 113549, 1, 1, 12}},
 1457|      1|      {"RSA/EMSA3(SHA-512)", OID{1, 2, 840, 113549, 1, 1, 13}},
 1458|      1|      {"RSA/EMSA3(SHA-224)", OID{1, 2, 840, 113549, 1, 1, 14}},
 1459|      1|      {"RSA/EMSA3(SHA-512-256)", OID{1, 2, 840, 113549, 1, 1, 16}},
 1460|      1|      {"RSA/EMSA3(SHA-3(224))", OID{2, 16, 840, 1, 101, 3, 4, 3, 13}},
 1461|      1|      {"RSA/EMSA3(SHA-3(256))", OID{2, 16, 840, 1, 101, 3, 4, 3, 14}},
 1462|      1|      {"RSA/EMSA3(SHA-3(384))", OID{2, 16, 840, 1, 101, 3, 4, 3, 15}},
 1463|      1|      {"RSA/EMSA3(SHA-3(512))", OID{2, 16, 840, 1, 101, 3, 4, 3, 16}},
 1464|      1|      {"RSA/EMSA3(SM3)", OID{1, 2, 156, 10197, 1, 504}},
 1465|      1|      {"RSA/EMSA3(RIPEMD-160)", OID{1, 3, 36, 3, 3, 1, 2}},
 1466|      1|      {"RSA/EMSA4", OID{1, 2, 840, 113549, 1, 1, 10}},
 1467|      1|      {"PBES2", OID{1, 2, 840, 113549, 1, 5, 13}},
 1468|      1|   };
 1469|      1|}
static_oids.cpp:_ZN5Botan12_GLOBAL__N_18if_matchERKNS_3OIDESt16initializer_listIjENSt3__117basic_string_viewIcNS6_11char_traitsIcEEEE:
   18|  12.9k|std::optional<std::string_view> if_match(const OID& oid, std::initializer_list<uint32_t> val, std::string_view name) {
   19|  12.9k|   if(oid.matches(val)) {
  ------------------
  |  Branch (19:7): [True: 12.9k, False: 0]
  ------------------
   20|  12.9k|      return name;
   21|  12.9k|   } else {
   22|      0|      return {};
   23|      0|   }
   24|  12.9k|}
static_oids.cpp:_ZN5Botan12_GLOBAL__N_113hash_oid_nameENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   34|  54.4k|uint32_t hash_oid_name(std::string_view s) {
   35|  54.4k|   uint64_t hash = 0x8188B31879A4879A;
   36|       |
   37|   506k|   for(const char c : s) {
  ------------------
  |  Branch (37:21): [True: 506k, False: 54.4k]
  ------------------
   38|   506k|      hash *= 251;
   39|   506k|      hash += c;
   40|   506k|   }
   41|       |
   42|  54.4k|   return static_cast<uint32_t>(hash % 805289);
   43|  54.4k|}
static_oids.cpp:_ZN5Botan12_GLOBAL__N_18if_matchENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_St16initializer_listIjE:
   26|  54.4k|std::optional<OID> if_match(std::string_view req, std::string_view actual, std::initializer_list<uint32_t> oid) {
   27|  54.4k|   if(req == actual) {
  ------------------
  |  Branch (27:7): [True: 54.4k, False: 0]
  ------------------
   28|  54.4k|      return OID(oid);
   29|  54.4k|   } else {
   30|      0|      return {};
   31|      0|   }
   32|  54.4k|}

_ZN5Botan20Buffered_Computation5finalENSt3__14spanIhLm18446744073709551615EEE:
   54|  62.0k|void Buffered_Computation::final(std::span<uint8_t> out) {
   55|  62.0k|   BOTAN_ARG_CHECK(out.size() >= output_length(), "Output buffer has insufficient capacity");
  ------------------
  |  |   35|  62.0k|   do {                                                          \
  |  |   36|  62.0k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  62.0k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 62.0k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  62.0k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 62.0k]
  |  |  ------------------
  ------------------
   56|       |   // Pass exactly output_length() bytes so that an oversized buffer has the
   57|       |   // result written to its leading bytes with the remainder left untouched.
   58|  62.0k|   final_result(out.first(output_length()));
   59|  62.0k|}

_ZN5Botan18SymmetricAlgorithm7set_keyENSt3__14spanIKhLm18446744073709551615EEE:
   22|  4.70k|void SymmetricAlgorithm::set_key(std::span<const uint8_t> key) {
   23|  4.70k|   if(!valid_keylength(key.size())) {
  ------------------
  |  Branch (23:7): [True: 0, False: 4.70k]
  ------------------
   24|      0|      throw Invalid_Key_Length(name(), key.size());
   25|      0|   }
   26|  4.70k|   key_schedule(key);
   27|  4.70k|}

_ZN5Botan11OctetStringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   27|  2.13k|OctetString::OctetString(std::string_view hex_string) {
   28|  2.13k|   if(!hex_string.empty()) {
  ------------------
  |  Branch (28:7): [True: 0, False: 2.13k]
  ------------------
   29|      0|      m_data.resize(1 + hex_string.length() / 2);
   30|      0|      m_data.resize(hex_decode(m_data.data(), hex_string));
   31|      0|   }
   32|  2.13k|}

_ZNK5Botan7AES_12811parallelismEv:
  867|     84|size_t AES_128::parallelism() const {
  868|     84|   return aes_parallelism();
  869|     84|}
_ZNK5Botan7AES_25611parallelismEv:
  875|    366|size_t AES_256::parallelism() const {
  876|    366|   return aes_parallelism();
  877|    366|}
_ZNK5Botan7AES_12819has_keying_materialEv:
  879|  3.54k|bool AES_128::has_keying_material() const {
  880|  3.54k|   return !m_EK.empty();
  881|  3.54k|}
_ZNK5Botan7AES_25619has_keying_materialEv:
  887|  1.93k|bool AES_256::has_keying_material() const {
  888|  1.93k|   return !m_EK.empty();
  889|  1.93k|}
_ZNK5Botan7AES_1289encrypt_nEPKhPhm:
  891|  3.28k|void AES_128::encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const {
  892|  3.28k|   assert_key_material_set();
  893|       |
  894|  3.28k|#if defined(BOTAN_HAS_AES_VAES)
  895|  3.28k|   if(CPUID::has(CPUID::Feature::AVX2_AES)) {
  ------------------
  |  Branch (895:7): [True: 0, False: 3.28k]
  ------------------
  896|      0|      return x86_vaes_encrypt_n(in, out, blocks);
  897|      0|   }
  898|  3.28k|#endif
  899|       |
  900|  3.28k|#if defined(BOTAN_HAS_HW_AES_SUPPORT)
  901|  3.28k|   if(CPUID::has(CPUID::Feature::HW_AES)) {
  ------------------
  |  Branch (901:7): [True: 3.28k, False: 0]
  ------------------
  902|  3.28k|      return hw_aes_encrypt_n(in, out, blocks);
  903|  3.28k|   }
  904|      0|#endif
  905|       |
  906|      0|#if defined(BOTAN_HAS_AES_VPERM)
  907|      0|   if(CPUID::has(CPUID::Feature::SIMD_4X32)) {
  ------------------
  |  Branch (907:7): [True: 0, False: 0]
  ------------------
  908|      0|      return vperm_encrypt_n(in, out, blocks);
  909|      0|   }
  910|      0|#endif
  911|       |
  912|      0|   aes_encrypt_n(in, out, blocks, m_EK);
  913|      0|}
_ZNK5Botan7AES_1289decrypt_nEPKhPhm:
  915|    117|void AES_128::decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const {
  916|    117|   assert_key_material_set();
  917|       |
  918|    117|#if defined(BOTAN_HAS_AES_VAES)
  919|    117|   if(CPUID::has(CPUID::Feature::AVX2_AES)) {
  ------------------
  |  Branch (919:7): [True: 0, False: 117]
  ------------------
  920|      0|      return x86_vaes_decrypt_n(in, out, blocks);
  921|      0|   }
  922|    117|#endif
  923|       |
  924|    117|#if defined(BOTAN_HAS_HW_AES_SUPPORT)
  925|    117|   if(CPUID::has(CPUID::Feature::HW_AES)) {
  ------------------
  |  Branch (925:7): [True: 117, False: 0]
  ------------------
  926|    117|      return hw_aes_decrypt_n(in, out, blocks);
  927|    117|   }
  928|      0|#endif
  929|       |
  930|      0|#if defined(BOTAN_HAS_AES_VPERM)
  931|      0|   if(CPUID::has(CPUID::Feature::SIMD_4X32)) {
  ------------------
  |  Branch (931:7): [True: 0, False: 0]
  ------------------
  932|      0|      return vperm_decrypt_n(in, out, blocks);
  933|      0|   }
  934|      0|#endif
  935|       |
  936|      0|   aes_decrypt_n(in, out, blocks, m_DK);
  937|      0|}
_ZN5Botan7AES_12812key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
  939|    109|void AES_128::key_schedule(std::span<const uint8_t> key) {
  940|    109|#if defined(BOTAN_HAS_AES_NI)
  941|    109|   if(CPUID::has(CPUID::Feature::AESNI)) {
  ------------------
  |  Branch (941:7): [True: 109, False: 0]
  ------------------
  942|    109|      return aesni_key_schedule(key.data(), key.size());
  943|    109|   }
  944|      0|#endif
  945|       |
  946|      0|#if defined(BOTAN_HAS_AES_VAES)
  947|      0|   if(CPUID::has(CPUID::Feature::AVX2_AES)) {
  ------------------
  |  Branch (947:7): [True: 0, False: 0]
  ------------------
  948|      0|      return aes_key_schedule(key.data(), key.size(), m_EK, m_DK, true);
  949|      0|   }
  950|      0|#endif
  951|       |
  952|      0|#if defined(BOTAN_HAS_HW_AES_SUPPORT)
  953|      0|   if(CPUID::has(CPUID::Feature::HW_AES)) {
  ------------------
  |  Branch (953:7): [True: 0, False: 0]
  ------------------
  954|      0|      constexpr bool is_little_endian = std::endian::native == std::endian::little;
  955|      0|      return aes_key_schedule(key.data(), key.size(), m_EK, m_DK, is_little_endian);
  956|      0|   }
  957|      0|#endif
  958|       |
  959|      0|#if defined(BOTAN_HAS_AES_VPERM)
  960|      0|   if(CPUID::has(CPUID::Feature::SIMD_4X32)) {
  ------------------
  |  Branch (960:7): [True: 0, False: 0]
  ------------------
  961|      0|      return vperm_key_schedule(key.data(), key.size());
  962|      0|   }
  963|      0|#endif
  964|       |
  965|      0|   aes_key_schedule(key.data(), key.size(), m_EK, m_DK);
  966|      0|}
_ZNK5Botan7AES_2569encrypt_nEPKhPhm:
 1055|    966|void AES_256::encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const {
 1056|    966|   assert_key_material_set();
 1057|       |
 1058|    966|#if defined(BOTAN_HAS_AES_VAES)
 1059|    966|   if(CPUID::has(CPUID::Feature::AVX2_AES)) {
  ------------------
  |  Branch (1059:7): [True: 0, False: 966]
  ------------------
 1060|      0|      return x86_vaes_encrypt_n(in, out, blocks);
 1061|      0|   }
 1062|    966|#endif
 1063|       |
 1064|    966|#if defined(BOTAN_HAS_HW_AES_SUPPORT)
 1065|    966|   if(CPUID::has(CPUID::Feature::HW_AES)) {
  ------------------
  |  Branch (1065:7): [True: 966, False: 0]
  ------------------
 1066|    966|      return hw_aes_encrypt_n(in, out, blocks);
 1067|    966|   }
 1068|      0|#endif
 1069|       |
 1070|      0|#if defined(BOTAN_HAS_AES_VPERM)
 1071|      0|   if(CPUID::has(CPUID::Feature::SIMD_4X32)) {
  ------------------
  |  Branch (1071:7): [True: 0, False: 0]
  ------------------
 1072|      0|      return vperm_encrypt_n(in, out, blocks);
 1073|      0|   }
 1074|      0|#endif
 1075|       |
 1076|      0|   aes_encrypt_n(in, out, blocks, m_EK);
 1077|      0|}
_ZNK5Botan7AES_2569decrypt_nEPKhPhm:
 1079|    408|void AES_256::decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const {
 1080|    408|   assert_key_material_set();
 1081|       |
 1082|    408|#if defined(BOTAN_HAS_AES_VAES)
 1083|    408|   if(CPUID::has(CPUID::Feature::AVX2_AES)) {
  ------------------
  |  Branch (1083:7): [True: 0, False: 408]
  ------------------
 1084|      0|      return x86_vaes_decrypt_n(in, out, blocks);
 1085|      0|   }
 1086|    408|#endif
 1087|       |
 1088|    408|#if defined(BOTAN_HAS_HW_AES_SUPPORT)
 1089|    408|   if(CPUID::has(CPUID::Feature::HW_AES)) {
  ------------------
  |  Branch (1089:7): [True: 408, False: 0]
  ------------------
 1090|    408|      return hw_aes_decrypt_n(in, out, blocks);
 1091|    408|   }
 1092|      0|#endif
 1093|       |
 1094|      0|#if defined(BOTAN_HAS_AES_VPERM)
 1095|      0|   if(CPUID::has(CPUID::Feature::SIMD_4X32)) {
  ------------------
  |  Branch (1095:7): [True: 0, False: 0]
  ------------------
 1096|      0|      return vperm_decrypt_n(in, out, blocks);
 1097|      0|   }
 1098|      0|#endif
 1099|       |
 1100|      0|   aes_decrypt_n(in, out, blocks, m_DK);
 1101|      0|}
_ZN5Botan7AES_25612key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
 1103|    202|void AES_256::key_schedule(std::span<const uint8_t> key) {
 1104|    202|#if defined(BOTAN_HAS_AES_NI)
 1105|    202|   if(CPUID::has(CPUID::Feature::AESNI)) {
  ------------------
  |  Branch (1105:7): [True: 202, False: 0]
  ------------------
 1106|    202|      return aesni_key_schedule(key.data(), key.size());
 1107|    202|   }
 1108|      0|#endif
 1109|       |
 1110|      0|#if defined(BOTAN_HAS_AES_VAES)
 1111|      0|   if(CPUID::has(CPUID::Feature::AVX2_AES)) {
  ------------------
  |  Branch (1111:7): [True: 0, False: 0]
  ------------------
 1112|      0|      return aes_key_schedule(key.data(), key.size(), m_EK, m_DK, true);
 1113|      0|   }
 1114|      0|#endif
 1115|       |
 1116|      0|#if defined(BOTAN_HAS_HW_AES_SUPPORT)
 1117|      0|   if(CPUID::has(CPUID::Feature::HW_AES)) {
  ------------------
  |  Branch (1117:7): [True: 0, False: 0]
  ------------------
 1118|      0|      constexpr bool is_little_endian = std::endian::native == std::endian::little;
 1119|      0|      return aes_key_schedule(key.data(), key.size(), m_EK, m_DK, is_little_endian);
 1120|      0|   }
 1121|      0|#endif
 1122|       |
 1123|      0|#if defined(BOTAN_HAS_AES_VPERM)
 1124|      0|   if(CPUID::has(CPUID::Feature::SIMD_4X32)) {
  ------------------
  |  Branch (1124:7): [True: 0, False: 0]
  ------------------
 1125|      0|      return vperm_key_schedule(key.data(), key.size());
 1126|      0|   }
 1127|      0|#endif
 1128|       |
 1129|      0|   aes_key_schedule(key.data(), key.size(), m_EK, m_DK);
 1130|      0|}
aes.cpp:_ZN5Botan12_GLOBAL__N_115aes_parallelismEv:
  808|    450|size_t aes_parallelism() {
  809|    450|#if defined(BOTAN_HAS_AES_VAES)
  810|    450|   if(CPUID::has(CPUID::Feature::AVX2_AES)) {
  ------------------
  |  Branch (810:7): [True: 0, False: 450]
  ------------------
  811|      0|      return 8;  // pipelined
  812|      0|   }
  813|    450|#endif
  814|       |
  815|    450|#if defined(BOTAN_HAS_HW_AES_SUPPORT)
  816|    450|   if(CPUID::has(CPUID::Feature::HW_AES)) {
  ------------------
  |  Branch (816:7): [True: 450, False: 0]
  ------------------
  817|    450|      return 4;  // pipelined
  818|    450|   }
  819|      0|#endif
  820|       |
  821|      0|#if defined(BOTAN_HAS_AES_VPERM)
  822|      0|   if(CPUID::has(CPUID::Feature::SIMD_4X32)) {
  ------------------
  |  Branch (822:7): [True: 0, False: 0]
  ------------------
  823|      0|      return 2;  // pipelined
  824|      0|   }
  825|      0|#endif
  826|       |
  827|       |   // bitsliced:
  828|      0|   return AES_BITSLICED_BLOCKS;
  829|      0|}

_ZNK5Botan7AES_12816hw_aes_encrypt_nEPKhPhm:
  135|  3.28k|BOTAN_FN_ISA_AESNI void AES_128::hw_aes_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const {
  136|  3.28k|   const SIMD_4x32 K0 = SIMD_4x32::load_le(&m_EK[4 * 0]);
  137|  3.28k|   const SIMD_4x32 K1 = SIMD_4x32::load_le(&m_EK[4 * 1]);
  138|  3.28k|   const SIMD_4x32 K2 = SIMD_4x32::load_le(&m_EK[4 * 2]);
  139|  3.28k|   const SIMD_4x32 K3 = SIMD_4x32::load_le(&m_EK[4 * 3]);
  140|  3.28k|   const SIMD_4x32 K4 = SIMD_4x32::load_le(&m_EK[4 * 4]);
  141|  3.28k|   const SIMD_4x32 K5 = SIMD_4x32::load_le(&m_EK[4 * 5]);
  142|  3.28k|   const SIMD_4x32 K6 = SIMD_4x32::load_le(&m_EK[4 * 6]);
  143|  3.28k|   const SIMD_4x32 K7 = SIMD_4x32::load_le(&m_EK[4 * 7]);
  144|  3.28k|   const SIMD_4x32 K8 = SIMD_4x32::load_le(&m_EK[4 * 8]);
  145|  3.28k|   const SIMD_4x32 K9 = SIMD_4x32::load_le(&m_EK[4 * 9]);
  146|  3.28k|   const SIMD_4x32 K10 = SIMD_4x32::load_le(&m_EK[4 * 10]);
  147|       |
  148|  3.79k|   while(blocks >= 4) {
  ------------------
  |  Branch (148:10): [True: 512, False: 3.28k]
  ------------------
  149|    512|      SIMD_4x32 B0 = SIMD_4x32::load_le(in + 16 * 0);
  150|    512|      SIMD_4x32 B1 = SIMD_4x32::load_le(in + 16 * 1);
  151|    512|      SIMD_4x32 B2 = SIMD_4x32::load_le(in + 16 * 2);
  152|    512|      SIMD_4x32 B3 = SIMD_4x32::load_le(in + 16 * 3);
  153|       |
  154|    512|      keyxor(K0, B0, B1, B2, B3);
  155|    512|      aesenc(K1, B0, B1, B2, B3);
  156|    512|      aesenc(K2, B0, B1, B2, B3);
  157|    512|      aesenc(K3, B0, B1, B2, B3);
  158|    512|      aesenc(K4, B0, B1, B2, B3);
  159|    512|      aesenc(K5, B0, B1, B2, B3);
  160|    512|      aesenc(K6, B0, B1, B2, B3);
  161|    512|      aesenc(K7, B0, B1, B2, B3);
  162|    512|      aesenc(K8, B0, B1, B2, B3);
  163|    512|      aesenc(K9, B0, B1, B2, B3);
  164|    512|      aesenclast(K10, B0, B1, B2, B3);
  165|       |
  166|    512|      B0.store_le(out + 16 * 0);
  167|    512|      B1.store_le(out + 16 * 1);
  168|    512|      B2.store_le(out + 16 * 2);
  169|    512|      B3.store_le(out + 16 * 3);
  170|       |
  171|    512|      blocks -= 4;
  172|    512|      in += 4 * 16;
  173|    512|      out += 4 * 16;
  174|    512|   }
  175|       |
  176|  6.43k|   for(size_t i = 0; i != blocks; ++i) {
  ------------------
  |  Branch (176:22): [True: 3.15k, False: 3.28k]
  ------------------
  177|  3.15k|      SIMD_4x32 B0 = SIMD_4x32::load_le(in + 16 * i);
  178|       |
  179|  3.15k|      B0 ^= K0;
  180|  3.15k|      aesenc(K1, B0);
  181|  3.15k|      aesenc(K2, B0);
  182|  3.15k|      aesenc(K3, B0);
  183|  3.15k|      aesenc(K4, B0);
  184|  3.15k|      aesenc(K5, B0);
  185|  3.15k|      aesenc(K6, B0);
  186|  3.15k|      aesenc(K7, B0);
  187|  3.15k|      aesenc(K8, B0);
  188|  3.15k|      aesenc(K9, B0);
  189|  3.15k|      aesenclast(K10, B0);
  190|       |
  191|  3.15k|      B0.store_le(out + 16 * i);
  192|  3.15k|   }
  193|  3.28k|}
_ZNK5Botan7AES_12816hw_aes_decrypt_nEPKhPhm:
  198|    117|BOTAN_FN_ISA_AESNI void AES_128::hw_aes_decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const {
  199|    117|   const SIMD_4x32 K0 = SIMD_4x32::load_le(&m_DK[4 * 0]);
  200|    117|   const SIMD_4x32 K1 = SIMD_4x32::load_le(&m_DK[4 * 1]);
  201|    117|   const SIMD_4x32 K2 = SIMD_4x32::load_le(&m_DK[4 * 2]);
  202|    117|   const SIMD_4x32 K3 = SIMD_4x32::load_le(&m_DK[4 * 3]);
  203|    117|   const SIMD_4x32 K4 = SIMD_4x32::load_le(&m_DK[4 * 4]);
  204|    117|   const SIMD_4x32 K5 = SIMD_4x32::load_le(&m_DK[4 * 5]);
  205|    117|   const SIMD_4x32 K6 = SIMD_4x32::load_le(&m_DK[4 * 6]);
  206|    117|   const SIMD_4x32 K7 = SIMD_4x32::load_le(&m_DK[4 * 7]);
  207|    117|   const SIMD_4x32 K8 = SIMD_4x32::load_le(&m_DK[4 * 8]);
  208|    117|   const SIMD_4x32 K9 = SIMD_4x32::load_le(&m_DK[4 * 9]);
  209|    117|   const SIMD_4x32 K10 = SIMD_4x32::load_le(&m_DK[4 * 10]);
  210|       |
  211|    511|   while(blocks >= 4) {
  ------------------
  |  Branch (211:10): [True: 394, False: 117]
  ------------------
  212|    394|      SIMD_4x32 B0 = SIMD_4x32::load_le(in + 16 * 0);
  213|    394|      SIMD_4x32 B1 = SIMD_4x32::load_le(in + 16 * 1);
  214|    394|      SIMD_4x32 B2 = SIMD_4x32::load_le(in + 16 * 2);
  215|    394|      SIMD_4x32 B3 = SIMD_4x32::load_le(in + 16 * 3);
  216|       |
  217|    394|      keyxor(K0, B0, B1, B2, B3);
  218|    394|      aesdec(K1, B0, B1, B2, B3);
  219|    394|      aesdec(K2, B0, B1, B2, B3);
  220|    394|      aesdec(K3, B0, B1, B2, B3);
  221|    394|      aesdec(K4, B0, B1, B2, B3);
  222|    394|      aesdec(K5, B0, B1, B2, B3);
  223|    394|      aesdec(K6, B0, B1, B2, B3);
  224|    394|      aesdec(K7, B0, B1, B2, B3);
  225|    394|      aesdec(K8, B0, B1, B2, B3);
  226|    394|      aesdec(K9, B0, B1, B2, B3);
  227|    394|      aesdeclast(K10, B0, B1, B2, B3);
  228|       |
  229|    394|      B0.store_le(out + 16 * 0);
  230|    394|      B1.store_le(out + 16 * 1);
  231|    394|      B2.store_le(out + 16 * 2);
  232|    394|      B3.store_le(out + 16 * 3);
  233|       |
  234|    394|      blocks -= 4;
  235|    394|      in += 4 * 16;
  236|    394|      out += 4 * 16;
  237|    394|   }
  238|       |
  239|    143|   for(size_t i = 0; i != blocks; ++i) {
  ------------------
  |  Branch (239:22): [True: 26, False: 117]
  ------------------
  240|     26|      SIMD_4x32 B0 = SIMD_4x32::load_le(in + 16 * i);
  241|       |
  242|     26|      B0 ^= K0;
  243|     26|      aesdec(K1, B0);
  244|     26|      aesdec(K2, B0);
  245|     26|      aesdec(K3, B0);
  246|     26|      aesdec(K4, B0);
  247|     26|      aesdec(K5, B0);
  248|     26|      aesdec(K6, B0);
  249|     26|      aesdec(K7, B0);
  250|     26|      aesdec(K8, B0);
  251|     26|      aesdec(K9, B0);
  252|     26|      aesdeclast(K10, B0);
  253|       |
  254|     26|      B0.store_le(out + 16 * i);
  255|     26|   }
  256|    117|}
_ZN5Botan7AES_12818aesni_key_scheduleEPKhm:
  261|    109|BOTAN_FN_ISA_AESNI void AES_128::aesni_key_schedule(const uint8_t key[], size_t /*length*/) {
  262|    109|   m_EK.resize(44);
  263|    109|   m_DK.resize(44);
  264|       |
  265|    109|   const SIMD_4x32 K0 = SIMD_4x32::load_le(key);
  266|    109|   const SIMD_4x32 K1 = aes_128_key_expansion<0x01>(K0, K0);
  267|    109|   const SIMD_4x32 K2 = aes_128_key_expansion<0x02>(K1, K1);
  268|    109|   const SIMD_4x32 K3 = aes_128_key_expansion<0x04>(K2, K2);
  269|    109|   const SIMD_4x32 K4 = aes_128_key_expansion<0x08>(K3, K3);
  270|    109|   const SIMD_4x32 K5 = aes_128_key_expansion<0x10>(K4, K4);
  271|    109|   const SIMD_4x32 K6 = aes_128_key_expansion<0x20>(K5, K5);
  272|    109|   const SIMD_4x32 K7 = aes_128_key_expansion<0x40>(K6, K6);
  273|    109|   const SIMD_4x32 K8 = aes_128_key_expansion<0x80>(K7, K7);
  274|    109|   const SIMD_4x32 K9 = aes_128_key_expansion<0x1B>(K8, K8);
  275|    109|   const SIMD_4x32 K10 = aes_128_key_expansion<0x36>(K9, K9);
  276|       |
  277|    109|   K0.store_le(&m_EK[4 * 0]);
  278|    109|   K1.store_le(&m_EK[4 * 1]);
  279|    109|   K2.store_le(&m_EK[4 * 2]);
  280|    109|   K3.store_le(&m_EK[4 * 3]);
  281|    109|   K4.store_le(&m_EK[4 * 4]);
  282|    109|   K5.store_le(&m_EK[4 * 5]);
  283|    109|   K6.store_le(&m_EK[4 * 6]);
  284|    109|   K7.store_le(&m_EK[4 * 7]);
  285|    109|   K8.store_le(&m_EK[4 * 8]);
  286|    109|   K9.store_le(&m_EK[4 * 9]);
  287|    109|   K10.store_le(&m_EK[4 * 10]);
  288|       |
  289|       |   // Now generate decryption keys
  290|    109|   K10.store_le(&m_DK[4 * 0]);
  291|    109|   aesimc(K9).store_le(&m_DK[4 * 1]);
  292|    109|   aesimc(K8).store_le(&m_DK[4 * 2]);
  293|    109|   aesimc(K7).store_le(&m_DK[4 * 3]);
  294|    109|   aesimc(K6).store_le(&m_DK[4 * 4]);
  295|    109|   aesimc(K5).store_le(&m_DK[4 * 5]);
  296|    109|   aesimc(K4).store_le(&m_DK[4 * 6]);
  297|    109|   aesimc(K3).store_le(&m_DK[4 * 7]);
  298|    109|   aesimc(K2).store_le(&m_DK[4 * 8]);
  299|    109|   aesimc(K1).store_le(&m_DK[4 * 9]);
  300|    109|   K0.store_le(&m_DK[4 * 10]);
  301|    109|}
_ZNK5Botan7AES_25616hw_aes_encrypt_nEPKhPhm:
  483|    966|BOTAN_FN_ISA_AESNI void AES_256::hw_aes_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const {
  484|    966|   const SIMD_4x32 K0 = SIMD_4x32::load_le(&m_EK[4 * 0]);
  485|    966|   const SIMD_4x32 K1 = SIMD_4x32::load_le(&m_EK[4 * 1]);
  486|    966|   const SIMD_4x32 K2 = SIMD_4x32::load_le(&m_EK[4 * 2]);
  487|    966|   const SIMD_4x32 K3 = SIMD_4x32::load_le(&m_EK[4 * 3]);
  488|    966|   const SIMD_4x32 K4 = SIMD_4x32::load_le(&m_EK[4 * 4]);
  489|    966|   const SIMD_4x32 K5 = SIMD_4x32::load_le(&m_EK[4 * 5]);
  490|    966|   const SIMD_4x32 K6 = SIMD_4x32::load_le(&m_EK[4 * 6]);
  491|    966|   const SIMD_4x32 K7 = SIMD_4x32::load_le(&m_EK[4 * 7]);
  492|    966|   const SIMD_4x32 K8 = SIMD_4x32::load_le(&m_EK[4 * 8]);
  493|    966|   const SIMD_4x32 K9 = SIMD_4x32::load_le(&m_EK[4 * 9]);
  494|    966|   const SIMD_4x32 K10 = SIMD_4x32::load_le(&m_EK[4 * 10]);
  495|    966|   const SIMD_4x32 K11 = SIMD_4x32::load_le(&m_EK[4 * 11]);
  496|    966|   const SIMD_4x32 K12 = SIMD_4x32::load_le(&m_EK[4 * 12]);
  497|    966|   const SIMD_4x32 K13 = SIMD_4x32::load_le(&m_EK[4 * 13]);
  498|    966|   const SIMD_4x32 K14 = SIMD_4x32::load_le(&m_EK[4 * 14]);
  499|       |
  500|  2.04k|   while(blocks >= 4) {
  ------------------
  |  Branch (500:10): [True: 1.08k, False: 966]
  ------------------
  501|  1.08k|      SIMD_4x32 B0 = SIMD_4x32::load_le(in + 16 * 0);
  502|  1.08k|      SIMD_4x32 B1 = SIMD_4x32::load_le(in + 16 * 1);
  503|  1.08k|      SIMD_4x32 B2 = SIMD_4x32::load_le(in + 16 * 2);
  504|  1.08k|      SIMD_4x32 B3 = SIMD_4x32::load_le(in + 16 * 3);
  505|       |
  506|  1.08k|      keyxor(K0, B0, B1, B2, B3);
  507|  1.08k|      aesenc(K1, B0, B1, B2, B3);
  508|  1.08k|      aesenc(K2, B0, B1, B2, B3);
  509|  1.08k|      aesenc(K3, B0, B1, B2, B3);
  510|  1.08k|      aesenc(K4, B0, B1, B2, B3);
  511|  1.08k|      aesenc(K5, B0, B1, B2, B3);
  512|  1.08k|      aesenc(K6, B0, B1, B2, B3);
  513|  1.08k|      aesenc(K7, B0, B1, B2, B3);
  514|  1.08k|      aesenc(K8, B0, B1, B2, B3);
  515|  1.08k|      aesenc(K9, B0, B1, B2, B3);
  516|  1.08k|      aesenc(K10, B0, B1, B2, B3);
  517|  1.08k|      aesenc(K11, B0, B1, B2, B3);
  518|  1.08k|      aesenc(K12, B0, B1, B2, B3);
  519|  1.08k|      aesenc(K13, B0, B1, B2, B3);
  520|  1.08k|      aesenclast(K14, B0, B1, B2, B3);
  521|       |
  522|  1.08k|      B0.store_le(out + 16 * 0);
  523|  1.08k|      B1.store_le(out + 16 * 1);
  524|  1.08k|      B2.store_le(out + 16 * 2);
  525|  1.08k|      B3.store_le(out + 16 * 3);
  526|       |
  527|  1.08k|      blocks -= 4;
  528|  1.08k|      in += 4 * 16;
  529|  1.08k|      out += 4 * 16;
  530|  1.08k|   }
  531|       |
  532|  1.66k|   for(size_t i = 0; i != blocks; ++i) {
  ------------------
  |  Branch (532:22): [True: 696, False: 966]
  ------------------
  533|    696|      SIMD_4x32 B0 = SIMD_4x32::load_le(in + 16 * i);
  534|       |
  535|    696|      B0 ^= K0;
  536|       |
  537|    696|      aesenc(K1, B0);
  538|    696|      aesenc(K2, B0);
  539|    696|      aesenc(K3, B0);
  540|    696|      aesenc(K4, B0);
  541|    696|      aesenc(K5, B0);
  542|    696|      aesenc(K6, B0);
  543|    696|      aesenc(K7, B0);
  544|    696|      aesenc(K8, B0);
  545|    696|      aesenc(K9, B0);
  546|    696|      aesenc(K10, B0);
  547|    696|      aesenc(K11, B0);
  548|    696|      aesenc(K12, B0);
  549|    696|      aesenc(K13, B0);
  550|    696|      aesenclast(K14, B0);
  551|       |
  552|    696|      B0.store_le(out + 16 * i);
  553|    696|   }
  554|    966|}
_ZNK5Botan7AES_25616hw_aes_decrypt_nEPKhPhm:
  559|    408|BOTAN_FN_ISA_AESNI void AES_256::hw_aes_decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const {
  560|    408|   const SIMD_4x32 K0 = SIMD_4x32::load_le(&m_DK[4 * 0]);
  561|    408|   const SIMD_4x32 K1 = SIMD_4x32::load_le(&m_DK[4 * 1]);
  562|    408|   const SIMD_4x32 K2 = SIMD_4x32::load_le(&m_DK[4 * 2]);
  563|    408|   const SIMD_4x32 K3 = SIMD_4x32::load_le(&m_DK[4 * 3]);
  564|    408|   const SIMD_4x32 K4 = SIMD_4x32::load_le(&m_DK[4 * 4]);
  565|    408|   const SIMD_4x32 K5 = SIMD_4x32::load_le(&m_DK[4 * 5]);
  566|    408|   const SIMD_4x32 K6 = SIMD_4x32::load_le(&m_DK[4 * 6]);
  567|    408|   const SIMD_4x32 K7 = SIMD_4x32::load_le(&m_DK[4 * 7]);
  568|    408|   const SIMD_4x32 K8 = SIMD_4x32::load_le(&m_DK[4 * 8]);
  569|    408|   const SIMD_4x32 K9 = SIMD_4x32::load_le(&m_DK[4 * 9]);
  570|    408|   const SIMD_4x32 K10 = SIMD_4x32::load_le(&m_DK[4 * 10]);
  571|    408|   const SIMD_4x32 K11 = SIMD_4x32::load_le(&m_DK[4 * 11]);
  572|    408|   const SIMD_4x32 K12 = SIMD_4x32::load_le(&m_DK[4 * 12]);
  573|    408|   const SIMD_4x32 K13 = SIMD_4x32::load_le(&m_DK[4 * 13]);
  574|    408|   const SIMD_4x32 K14 = SIMD_4x32::load_le(&m_DK[4 * 14]);
  575|       |
  576|  1.85k|   while(blocks >= 4) {
  ------------------
  |  Branch (576:10): [True: 1.44k, False: 408]
  ------------------
  577|  1.44k|      SIMD_4x32 B0 = SIMD_4x32::load_le(in + 16 * 0);
  578|  1.44k|      SIMD_4x32 B1 = SIMD_4x32::load_le(in + 16 * 1);
  579|  1.44k|      SIMD_4x32 B2 = SIMD_4x32::load_le(in + 16 * 2);
  580|  1.44k|      SIMD_4x32 B3 = SIMD_4x32::load_le(in + 16 * 3);
  581|       |
  582|  1.44k|      keyxor(K0, B0, B1, B2, B3);
  583|  1.44k|      aesdec(K1, B0, B1, B2, B3);
  584|  1.44k|      aesdec(K2, B0, B1, B2, B3);
  585|  1.44k|      aesdec(K3, B0, B1, B2, B3);
  586|  1.44k|      aesdec(K4, B0, B1, B2, B3);
  587|  1.44k|      aesdec(K5, B0, B1, B2, B3);
  588|  1.44k|      aesdec(K6, B0, B1, B2, B3);
  589|  1.44k|      aesdec(K7, B0, B1, B2, B3);
  590|  1.44k|      aesdec(K8, B0, B1, B2, B3);
  591|  1.44k|      aesdec(K9, B0, B1, B2, B3);
  592|  1.44k|      aesdec(K10, B0, B1, B2, B3);
  593|  1.44k|      aesdec(K11, B0, B1, B2, B3);
  594|  1.44k|      aesdec(K12, B0, B1, B2, B3);
  595|  1.44k|      aesdec(K13, B0, B1, B2, B3);
  596|  1.44k|      aesdeclast(K14, B0, B1, B2, B3);
  597|       |
  598|  1.44k|      B0.store_le(out + 16 * 0);
  599|  1.44k|      B1.store_le(out + 16 * 1);
  600|  1.44k|      B2.store_le(out + 16 * 2);
  601|  1.44k|      B3.store_le(out + 16 * 3);
  602|       |
  603|  1.44k|      blocks -= 4;
  604|  1.44k|      in += 4 * 16;
  605|  1.44k|      out += 4 * 16;
  606|  1.44k|   }
  607|       |
  608|    510|   for(size_t i = 0; i != blocks; ++i) {
  ------------------
  |  Branch (608:22): [True: 102, False: 408]
  ------------------
  609|    102|      SIMD_4x32 B0 = SIMD_4x32::load_le(in + 16 * i);
  610|       |
  611|    102|      B0 ^= K0;
  612|       |
  613|    102|      aesdec(K1, B0);
  614|    102|      aesdec(K2, B0);
  615|    102|      aesdec(K3, B0);
  616|    102|      aesdec(K4, B0);
  617|    102|      aesdec(K5, B0);
  618|    102|      aesdec(K6, B0);
  619|    102|      aesdec(K7, B0);
  620|    102|      aesdec(K8, B0);
  621|    102|      aesdec(K9, B0);
  622|    102|      aesdec(K10, B0);
  623|    102|      aesdec(K11, B0);
  624|    102|      aesdec(K12, B0);
  625|    102|      aesdec(K13, B0);
  626|    102|      aesdeclast(K14, B0);
  627|       |
  628|    102|      B0.store_le(out + 16 * i);
  629|    102|   }
  630|    408|}
_ZN5Botan7AES_25618aesni_key_scheduleEPKhm:
  635|    202|BOTAN_FN_ISA_AESNI void AES_256::aesni_key_schedule(const uint8_t key[], size_t /*length*/) {
  636|    202|   m_EK.resize(60);
  637|    202|   m_DK.resize(60);
  638|       |
  639|    202|   const SIMD_4x32 K0 = SIMD_4x32::load_le(key);
  640|    202|   const SIMD_4x32 K1 = SIMD_4x32::load_le(key + 16);
  641|       |
  642|    202|   const SIMD_4x32 K2 = aes_128_key_expansion<0x01>(K0, K1);
  643|    202|   const SIMD_4x32 K3 = aes_256_key_expansion(K1, K2);
  644|       |
  645|    202|   const SIMD_4x32 K4 = aes_128_key_expansion<0x02>(K2, K3);
  646|    202|   const SIMD_4x32 K5 = aes_256_key_expansion(K3, K4);
  647|       |
  648|    202|   const SIMD_4x32 K6 = aes_128_key_expansion<0x04>(K4, K5);
  649|    202|   const SIMD_4x32 K7 = aes_256_key_expansion(K5, K6);
  650|       |
  651|    202|   const SIMD_4x32 K8 = aes_128_key_expansion<0x08>(K6, K7);
  652|    202|   const SIMD_4x32 K9 = aes_256_key_expansion(K7, K8);
  653|       |
  654|    202|   const SIMD_4x32 K10 = aes_128_key_expansion<0x10>(K8, K9);
  655|    202|   const SIMD_4x32 K11 = aes_256_key_expansion(K9, K10);
  656|       |
  657|    202|   const SIMD_4x32 K12 = aes_128_key_expansion<0x20>(K10, K11);
  658|    202|   const SIMD_4x32 K13 = aes_256_key_expansion(K11, K12);
  659|       |
  660|    202|   const SIMD_4x32 K14 = aes_128_key_expansion<0x40>(K12, K13);
  661|       |
  662|    202|   K0.store_le(&m_EK[4 * 0]);
  663|    202|   K1.store_le(&m_EK[4 * 1]);
  664|    202|   K2.store_le(&m_EK[4 * 2]);
  665|    202|   K3.store_le(&m_EK[4 * 3]);
  666|    202|   K4.store_le(&m_EK[4 * 4]);
  667|    202|   K5.store_le(&m_EK[4 * 5]);
  668|    202|   K6.store_le(&m_EK[4 * 6]);
  669|    202|   K7.store_le(&m_EK[4 * 7]);
  670|    202|   K8.store_le(&m_EK[4 * 8]);
  671|    202|   K9.store_le(&m_EK[4 * 9]);
  672|    202|   K10.store_le(&m_EK[4 * 10]);
  673|    202|   K11.store_le(&m_EK[4 * 11]);
  674|    202|   K12.store_le(&m_EK[4 * 12]);
  675|    202|   K13.store_le(&m_EK[4 * 13]);
  676|    202|   K14.store_le(&m_EK[4 * 14]);
  677|       |
  678|    202|   K14.store_le(&m_DK[4 * 0]);
  679|    202|   aesimc(K13).store_le(&m_DK[4 * 1]);
  680|    202|   aesimc(K12).store_le(&m_DK[4 * 2]);
  681|    202|   aesimc(K11).store_le(&m_DK[4 * 3]);
  682|    202|   aesimc(K10).store_le(&m_DK[4 * 4]);
  683|    202|   aesimc(K9).store_le(&m_DK[4 * 5]);
  684|    202|   aesimc(K8).store_le(&m_DK[4 * 6]);
  685|    202|   aesimc(K7).store_le(&m_DK[4 * 7]);
  686|    202|   aesimc(K6).store_le(&m_DK[4 * 8]);
  687|    202|   aesimc(K5).store_le(&m_DK[4 * 9]);
  688|    202|   aesimc(K4).store_le(&m_DK[4 * 10]);
  689|    202|   aesimc(K3).store_le(&m_DK[4 * 11]);
  690|    202|   aesimc(K2).store_le(&m_DK[4 * 12]);
  691|    202|   aesimc(K1).store_le(&m_DK[4 * 13]);
  692|    202|   K0.store_le(&m_DK[4 * 14]);
  693|    202|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_16keyxorENS_9SIMD_4x32ERS1_S2_S2_S2_:
   69|  3.43k|   SIMD_4x32 K, SIMD_4x32& B0, SIMD_4x32& B1, SIMD_4x32& B2, SIMD_4x32& B3) {
   70|  3.43k|   B0 ^= K;
   71|  3.43k|   B1 ^= K;
   72|  3.43k|   B2 ^= K;
   73|  3.43k|   B3 ^= K;
   74|  3.43k|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_16aesencENS_9SIMD_4x32ERS1_S2_S2_S2_:
   81|  18.6k|   SIMD_4x32 K, SIMD_4x32& B0, SIMD_4x32& B1, SIMD_4x32& B2, SIMD_4x32& B3) {
   82|  18.6k|   B0 = SIMD_4x32(_mm_aesenc_si128(B0.raw(), K.raw()));
   83|  18.6k|   B1 = SIMD_4x32(_mm_aesenc_si128(B1.raw(), K.raw()));
   84|  18.6k|   B2 = SIMD_4x32(_mm_aesenc_si128(B2.raw(), K.raw()));
   85|  18.6k|   B3 = SIMD_4x32(_mm_aesenc_si128(B3.raw(), K.raw()));
   86|  18.6k|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_110aesenclastENS_9SIMD_4x32ERS1_S2_S2_S2_:
   93|  1.59k|   SIMD_4x32 K, SIMD_4x32& B0, SIMD_4x32& B1, SIMD_4x32& B2, SIMD_4x32& B3) {
   94|  1.59k|   B0 = SIMD_4x32(_mm_aesenclast_si128(B0.raw(), K.raw()));
   95|  1.59k|   B1 = SIMD_4x32(_mm_aesenclast_si128(B1.raw(), K.raw()));
   96|  1.59k|   B2 = SIMD_4x32(_mm_aesenclast_si128(B2.raw(), K.raw()));
   97|  1.59k|   B3 = SIMD_4x32(_mm_aesenclast_si128(B3.raw(), K.raw()));
   98|  1.59k|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_16aesencENS_9SIMD_4x32ERS1_:
   76|  37.4k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_AESNI void aesenc(SIMD_4x32 K, SIMD_4x32& B) {
   77|  37.4k|   B = SIMD_4x32(_mm_aesenc_si128(B.raw(), K.raw()));
   78|  37.4k|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_110aesenclastENS_9SIMD_4x32ERS1_:
   88|  3.85k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_AESNI void aesenclast(SIMD_4x32 K, SIMD_4x32& B) {
   89|  3.85k|   B = SIMD_4x32(_mm_aesenclast_si128(B.raw(), K.raw()));
   90|  3.85k|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_16aesdecENS_9SIMD_4x32ERS1_S2_S2_S2_:
  105|  22.3k|   SIMD_4x32 K, SIMD_4x32& B0, SIMD_4x32& B1, SIMD_4x32& B2, SIMD_4x32& B3) {
  106|  22.3k|   B0 = SIMD_4x32(_mm_aesdec_si128(B0.raw(), K.raw()));
  107|  22.3k|   B1 = SIMD_4x32(_mm_aesdec_si128(B1.raw(), K.raw()));
  108|  22.3k|   B2 = SIMD_4x32(_mm_aesdec_si128(B2.raw(), K.raw()));
  109|  22.3k|   B3 = SIMD_4x32(_mm_aesdec_si128(B3.raw(), K.raw()));
  110|  22.3k|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_110aesdeclastENS_9SIMD_4x32ERS1_S2_S2_S2_:
  117|  1.83k|   SIMD_4x32 K, SIMD_4x32& B0, SIMD_4x32& B1, SIMD_4x32& B2, SIMD_4x32& B3) {
  118|  1.83k|   B0 = SIMD_4x32(_mm_aesdeclast_si128(B0.raw(), K.raw()));
  119|  1.83k|   B1 = SIMD_4x32(_mm_aesdeclast_si128(B1.raw(), K.raw()));
  120|  1.83k|   B2 = SIMD_4x32(_mm_aesdeclast_si128(B2.raw(), K.raw()));
  121|  1.83k|   B3 = SIMD_4x32(_mm_aesdeclast_si128(B3.raw(), K.raw()));
  122|  1.83k|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_16aesdecENS_9SIMD_4x32ERS1_:
  100|  1.56k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_AESNI void aesdec(SIMD_4x32 K, SIMD_4x32& B) {
  101|  1.56k|   B = SIMD_4x32(_mm_aesdec_si128(B.raw(), K.raw()));
  102|  1.56k|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_110aesdeclastENS_9SIMD_4x32ERS1_:
  112|    128|BOTAN_FORCE_INLINE BOTAN_FN_ISA_AESNI void aesdeclast(SIMD_4x32 K, SIMD_4x32& B) {
  113|    128|   B = SIMD_4x32(_mm_aesdeclast_si128(B.raw(), K.raw()));
  114|    128|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_16aesimcENS_9SIMD_4x32E:
  124|  3.60k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_AESNI SIMD_4x32 aesimc(SIMD_4x32 B) {
  125|  3.60k|   return SIMD_4x32(_mm_aesimc_si128(B.raw()));
  126|  3.60k|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_121aes_256_key_expansionENS_9SIMD_4x32ES1_:
   57|  1.21k|BOTAN_FN_ISA_AESNI SIMD_4x32 aes_256_key_expansion(SIMD_4x32 key, SIMD_4x32 key2) {
   58|  1.21k|   __m128i key_with_rcon = _mm_aeskeygenassist_si128(key2.raw(), 0x00);
   59|  1.21k|   key_with_rcon = _mm_shuffle_epi32(key_with_rcon, _MM_SHUFFLE(2, 2, 2, 2));
   60|       |
   61|  1.21k|   key ^= key.shift_elems_left<1>();
   62|  1.21k|   key ^= key.shift_elems_left<1>();
   63|  1.21k|   key ^= key.shift_elems_left<1>();
   64|  1.21k|   key ^= SIMD_4x32(key_with_rcon);
   65|  1.21k|   return key;
   66|  1.21k|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_121aes_128_key_expansionILh1EEENS_9SIMD_4x32ES2_S2_:
   22|    311|BOTAN_FN_ISA_AESNI inline SIMD_4x32 aes_128_key_expansion(SIMD_4x32 key, SIMD_4x32 key_getting_rcon) {
   23|    311|   __m128i key_with_rcon = _mm_aeskeygenassist_si128(key_getting_rcon.raw(), RC);
   24|       |   key_with_rcon = _mm_shuffle_epi32(key_with_rcon, _MM_SHUFFLE(3, 3, 3, 3));
   25|    311|   key ^= key.shift_elems_left<1>();
   26|    311|   key ^= key.shift_elems_left<1>();
   27|    311|   key ^= key.shift_elems_left<1>();
   28|    311|   key ^= SIMD_4x32(key_with_rcon);
   29|    311|   return key;
   30|    311|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_121aes_128_key_expansionILh2EEENS_9SIMD_4x32ES2_S2_:
   22|    311|BOTAN_FN_ISA_AESNI inline SIMD_4x32 aes_128_key_expansion(SIMD_4x32 key, SIMD_4x32 key_getting_rcon) {
   23|    311|   __m128i key_with_rcon = _mm_aeskeygenassist_si128(key_getting_rcon.raw(), RC);
   24|       |   key_with_rcon = _mm_shuffle_epi32(key_with_rcon, _MM_SHUFFLE(3, 3, 3, 3));
   25|    311|   key ^= key.shift_elems_left<1>();
   26|    311|   key ^= key.shift_elems_left<1>();
   27|    311|   key ^= key.shift_elems_left<1>();
   28|    311|   key ^= SIMD_4x32(key_with_rcon);
   29|    311|   return key;
   30|    311|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_121aes_128_key_expansionILh4EEENS_9SIMD_4x32ES2_S2_:
   22|    311|BOTAN_FN_ISA_AESNI inline SIMD_4x32 aes_128_key_expansion(SIMD_4x32 key, SIMD_4x32 key_getting_rcon) {
   23|    311|   __m128i key_with_rcon = _mm_aeskeygenassist_si128(key_getting_rcon.raw(), RC);
   24|       |   key_with_rcon = _mm_shuffle_epi32(key_with_rcon, _MM_SHUFFLE(3, 3, 3, 3));
   25|    311|   key ^= key.shift_elems_left<1>();
   26|    311|   key ^= key.shift_elems_left<1>();
   27|    311|   key ^= key.shift_elems_left<1>();
   28|    311|   key ^= SIMD_4x32(key_with_rcon);
   29|    311|   return key;
   30|    311|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_121aes_128_key_expansionILh8EEENS_9SIMD_4x32ES2_S2_:
   22|    311|BOTAN_FN_ISA_AESNI inline SIMD_4x32 aes_128_key_expansion(SIMD_4x32 key, SIMD_4x32 key_getting_rcon) {
   23|    311|   __m128i key_with_rcon = _mm_aeskeygenassist_si128(key_getting_rcon.raw(), RC);
   24|       |   key_with_rcon = _mm_shuffle_epi32(key_with_rcon, _MM_SHUFFLE(3, 3, 3, 3));
   25|    311|   key ^= key.shift_elems_left<1>();
   26|    311|   key ^= key.shift_elems_left<1>();
   27|    311|   key ^= key.shift_elems_left<1>();
   28|    311|   key ^= SIMD_4x32(key_with_rcon);
   29|    311|   return key;
   30|    311|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_121aes_128_key_expansionILh16EEENS_9SIMD_4x32ES2_S2_:
   22|    311|BOTAN_FN_ISA_AESNI inline SIMD_4x32 aes_128_key_expansion(SIMD_4x32 key, SIMD_4x32 key_getting_rcon) {
   23|    311|   __m128i key_with_rcon = _mm_aeskeygenassist_si128(key_getting_rcon.raw(), RC);
   24|       |   key_with_rcon = _mm_shuffle_epi32(key_with_rcon, _MM_SHUFFLE(3, 3, 3, 3));
   25|    311|   key ^= key.shift_elems_left<1>();
   26|    311|   key ^= key.shift_elems_left<1>();
   27|    311|   key ^= key.shift_elems_left<1>();
   28|    311|   key ^= SIMD_4x32(key_with_rcon);
   29|    311|   return key;
   30|    311|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_121aes_128_key_expansionILh32EEENS_9SIMD_4x32ES2_S2_:
   22|    311|BOTAN_FN_ISA_AESNI inline SIMD_4x32 aes_128_key_expansion(SIMD_4x32 key, SIMD_4x32 key_getting_rcon) {
   23|    311|   __m128i key_with_rcon = _mm_aeskeygenassist_si128(key_getting_rcon.raw(), RC);
   24|       |   key_with_rcon = _mm_shuffle_epi32(key_with_rcon, _MM_SHUFFLE(3, 3, 3, 3));
   25|    311|   key ^= key.shift_elems_left<1>();
   26|    311|   key ^= key.shift_elems_left<1>();
   27|    311|   key ^= key.shift_elems_left<1>();
   28|    311|   key ^= SIMD_4x32(key_with_rcon);
   29|    311|   return key;
   30|    311|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_121aes_128_key_expansionILh64EEENS_9SIMD_4x32ES2_S2_:
   22|    311|BOTAN_FN_ISA_AESNI inline SIMD_4x32 aes_128_key_expansion(SIMD_4x32 key, SIMD_4x32 key_getting_rcon) {
   23|    311|   __m128i key_with_rcon = _mm_aeskeygenassist_si128(key_getting_rcon.raw(), RC);
   24|       |   key_with_rcon = _mm_shuffle_epi32(key_with_rcon, _MM_SHUFFLE(3, 3, 3, 3));
   25|    311|   key ^= key.shift_elems_left<1>();
   26|    311|   key ^= key.shift_elems_left<1>();
   27|    311|   key ^= key.shift_elems_left<1>();
   28|    311|   key ^= SIMD_4x32(key_with_rcon);
   29|    311|   return key;
   30|    311|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_121aes_128_key_expansionILh128EEENS_9SIMD_4x32ES2_S2_:
   22|    109|BOTAN_FN_ISA_AESNI inline SIMD_4x32 aes_128_key_expansion(SIMD_4x32 key, SIMD_4x32 key_getting_rcon) {
   23|    109|   __m128i key_with_rcon = _mm_aeskeygenassist_si128(key_getting_rcon.raw(), RC);
   24|       |   key_with_rcon = _mm_shuffle_epi32(key_with_rcon, _MM_SHUFFLE(3, 3, 3, 3));
   25|    109|   key ^= key.shift_elems_left<1>();
   26|    109|   key ^= key.shift_elems_left<1>();
   27|    109|   key ^= key.shift_elems_left<1>();
   28|    109|   key ^= SIMD_4x32(key_with_rcon);
   29|    109|   return key;
   30|    109|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_121aes_128_key_expansionILh27EEENS_9SIMD_4x32ES2_S2_:
   22|    109|BOTAN_FN_ISA_AESNI inline SIMD_4x32 aes_128_key_expansion(SIMD_4x32 key, SIMD_4x32 key_getting_rcon) {
   23|    109|   __m128i key_with_rcon = _mm_aeskeygenassist_si128(key_getting_rcon.raw(), RC);
   24|       |   key_with_rcon = _mm_shuffle_epi32(key_with_rcon, _MM_SHUFFLE(3, 3, 3, 3));
   25|    109|   key ^= key.shift_elems_left<1>();
   26|    109|   key ^= key.shift_elems_left<1>();
   27|    109|   key ^= key.shift_elems_left<1>();
   28|    109|   key ^= SIMD_4x32(key_with_rcon);
   29|    109|   return key;
   30|    109|}
aes_ni.cpp:_ZN5Botan12_GLOBAL__N_121aes_128_key_expansionILh54EEENS_9SIMD_4x32ES2_S2_:
   22|    109|BOTAN_FN_ISA_AESNI inline SIMD_4x32 aes_128_key_expansion(SIMD_4x32 key, SIMD_4x32 key_getting_rcon) {
   23|    109|   __m128i key_with_rcon = _mm_aeskeygenassist_si128(key_getting_rcon.raw(), RC);
   24|       |   key_with_rcon = _mm_shuffle_epi32(key_with_rcon, _MM_SHUFFLE(3, 3, 3, 3));
   25|    109|   key ^= key.shift_elems_left<1>();
   26|    109|   key ^= key.shift_elems_left<1>();
   27|    109|   key ^= key.shift_elems_left<1>();
   28|    109|   key ^= SIMD_4x32(key_with_rcon);
   29|    109|   return key;
   30|    109|}

_ZNK5Botan8ARIA_1289encrypt_nEPKhPhm:
  372|     27|void ARIA_128::encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const {
  373|     27|   assert_key_material_set();
  374|       |
  375|     27|#if defined(BOTAN_HAS_ARIA_AVX512_GFNI)
  376|     27|   if(CPUID::has(CPUID::Feature::AVX512, CPUID::Feature::GFNI)) {
  ------------------
  |  Branch (376:7): [True: 0, False: 27]
  ------------------
  377|      0|      return aria_avx512_gfni_encrypt(in, out, blocks);
  378|      0|   }
  379|     27|#endif
  380|       |
  381|     27|#if defined(BOTAN_HAS_ARIA_HWAES)
  382|     27|   if(CPUID::has(CPUID::Feature::HW_AES)) {
  ------------------
  |  Branch (382:7): [True: 27, False: 0]
  ------------------
  383|     27|      return aria_hwaes_encrypt(in, out, blocks);
  384|     27|   }
  385|      0|#endif
  386|       |
  387|      0|   ARIA_F::transform(in, out, blocks, m_ERK);
  388|      0|}
_ZNK5Botan8ARIA_2569encrypt_nEPKhPhm:
  408|     41|void ARIA_256::encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const {
  409|     41|   assert_key_material_set();
  410|       |
  411|     41|#if defined(BOTAN_HAS_ARIA_AVX512_GFNI)
  412|     41|   if(CPUID::has(CPUID::Feature::AVX512, CPUID::Feature::GFNI)) {
  ------------------
  |  Branch (412:7): [True: 0, False: 41]
  ------------------
  413|      0|      return aria_avx512_gfni_encrypt(in, out, blocks);
  414|      0|   }
  415|     41|#endif
  416|       |
  417|     41|#if defined(BOTAN_HAS_ARIA_HWAES)
  418|     41|   if(CPUID::has(CPUID::Feature::HW_AES)) {
  ------------------
  |  Branch (418:7): [True: 41, False: 0]
  ------------------
  419|     41|      return aria_hwaes_encrypt(in, out, blocks);
  420|     41|   }
  421|      0|#endif
  422|       |
  423|      0|   ARIA_F::transform(in, out, blocks, m_ERK);
  424|      0|}
_ZNK5Botan8ARIA_12819has_keying_materialEv:
  480|     69|bool ARIA_128::has_keying_material() const {
  481|     69|   return !m_ERK.empty();
  482|     69|}
_ZNK5Botan8ARIA_25619has_keying_materialEv:
  488|     95|bool ARIA_256::has_keying_material() const {
  489|     95|   return !m_ERK.empty();
  490|     95|}
_ZNK5Botan8ARIA_12811parallelismEv:
  528|     16|size_t ARIA_128::parallelism() const {
  529|     16|   return aria_parallelism();
  530|     16|}
_ZNK5Botan8ARIA_25611parallelismEv:
  544|     20|size_t ARIA_256::parallelism() const {
  545|     20|   return aria_parallelism();
  546|     20|}
_ZN5Botan8ARIA_12812key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
  552|      8|void ARIA_128::key_schedule(std::span<const uint8_t> key) {
  553|      8|   ARIA_F::key_schedule(m_ERK, m_DRK, key);
  554|      8|}
_ZN5Botan8ARIA_25612key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
  560|     10|void ARIA_256::key_schedule(std::span<const uint8_t> key) {
  561|     10|   ARIA_F::key_schedule(m_ERK, m_DRK, key);
  562|     10|}
aria.cpp:_ZN5Botan12_GLOBAL__N_16ARIA_F7ARIA_FOERjS2_S2_S2_:
  118|     36|inline void ARIA_FO(uint32_t& T0, uint32_t& T1, uint32_t& T2, uint32_t& T3) {
  119|     36|   T0 = ARIA_F1(T0);
  120|     36|   T1 = ARIA_F1(T1);
  121|     36|   T2 = ARIA_F1(T2);
  122|     36|   T3 = ARIA_F1(T3);
  123|       |
  124|     36|   T1 ^= T2;
  125|     36|   T2 ^= T3;
  126|     36|   T0 ^= T1;
  127|     36|   T3 ^= T1;
  128|     36|   T2 ^= T0;
  129|     36|   T1 ^= T2;
  130|       |
  131|     36|   T1 = ((T1 << 8) & 0xFF00FF00) | ((T1 >> 8) & 0x00FF00FF);
  132|     36|   T2 = rotr<16>(T2);
  133|     36|   T3 = reverse_bytes(T3);
  134|       |
  135|     36|   T1 ^= T2;
  136|     36|   T2 ^= T3;
  137|     36|   T0 ^= T1;
  138|     36|   T3 ^= T1;
  139|     36|   T2 ^= T0;
  140|     36|   T1 ^= T2;
  141|     36|}
aria.cpp:_ZN5Botan12_GLOBAL__N_16ARIA_F7ARIA_F1Ej:
  100|    144|inline uint32_t ARIA_F1(uint32_t X) {
  101|    144|   const uint32_t M1 = 0x00010101;
  102|    144|   const uint32_t M2 = 0x01000101;
  103|    144|   const uint32_t M3 = 0x01010001;
  104|    144|   const uint32_t M4 = 0x01010100;
  105|       |
  106|    144|   return (S1[get_byte<0>(X)] * M1) ^ (S2[get_byte<1>(X)] * M2) ^ (X1[get_byte<2>(X)] * M3) ^ (X2[get_byte<3>(X)] * M4);
  107|    144|}
aria.cpp:_ZN5Botan12_GLOBAL__N_16ARIA_F7ARIA_FEERjS2_S2_S2_:
  143|     18|inline void ARIA_FE(uint32_t& T0, uint32_t& T1, uint32_t& T2, uint32_t& T3) {
  144|     18|   T0 = ARIA_F2(T0);
  145|     18|   T1 = ARIA_F2(T1);
  146|     18|   T2 = ARIA_F2(T2);
  147|     18|   T3 = ARIA_F2(T3);
  148|       |
  149|     18|   T1 ^= T2;
  150|     18|   T2 ^= T3;
  151|     18|   T0 ^= T1;
  152|     18|   T3 ^= T1;
  153|     18|   T2 ^= T0;
  154|     18|   T1 ^= T2;
  155|       |
  156|     18|   T3 = ((T3 << 8) & 0xFF00FF00) | ((T3 >> 8) & 0x00FF00FF);
  157|     18|   T0 = rotr<16>(T0);
  158|     18|   T1 = reverse_bytes(T1);
  159|       |
  160|     18|   T1 ^= T2;
  161|     18|   T2 ^= T3;
  162|     18|   T0 ^= T1;
  163|     18|   T3 ^= T1;
  164|     18|   T2 ^= T0;
  165|     18|   T1 ^= T2;
  166|     18|}
aria.cpp:_ZN5Botan12_GLOBAL__N_16ARIA_F7ARIA_F2Ej:
  109|     72|inline uint32_t ARIA_F2(uint32_t X) {
  110|     72|   const uint32_t M1 = 0x00010101;
  111|     72|   const uint32_t M2 = 0x01000101;
  112|     72|   const uint32_t M3 = 0x01010001;
  113|     72|   const uint32_t M4 = 0x01010100;
  114|       |
  115|     72|   return (X1[get_byte<0>(X)] * M3) ^ (X2[get_byte<1>(X)] * M4) ^ (S1[get_byte<2>(X)] * M1) ^ (S2[get_byte<3>(X)] * M2);
  116|     72|}
aria.cpp:_ZN5Botan12_GLOBAL__N_116aria_parallelismEv:
  494|     36|size_t aria_parallelism() {
  495|     36|#if defined(BOTAN_HAS_ARIA_AVX512_GFNI)
  496|     36|   if(CPUID::has(CPUID::Feature::AVX512, CPUID::Feature::GFNI)) {
  ------------------
  |  Branch (496:7): [True: 0, False: 36]
  ------------------
  497|      0|      return 16;
  498|      0|   }
  499|     36|#endif
  500|       |
  501|     36|#if defined(BOTAN_HAS_ARIA_HWAES)
  502|     36|   if(CPUID::has(CPUID::Feature::HW_AES)) {
  ------------------
  |  Branch (502:7): [True: 36, False: 0]
  ------------------
  503|     36|      return 4;
  504|     36|   }
  505|      0|#endif
  506|       |
  507|      0|   return 1;
  508|     36|}
aria.cpp:_ZN5Botan12_GLOBAL__N_16ARIA_F12key_scheduleERNSt3__16vectorIjNS_16secure_allocatorIjEEEES7_NS2_4spanIKhLm18446744073709551615EEE:
  260|     18|void key_schedule(secure_vector<uint32_t>& ERK, secure_vector<uint32_t>& DRK, std::span<const uint8_t> key) {
  261|     18|   prefetch_arrays(S1, S2, X1, X2);
  262|       |
  263|     18|   const uint32_t KRK[3][4] = {{0x517cc1b7, 0x27220a94, 0xfe13abe8, 0xfa9a6ee0},
  264|     18|                               {0x6db14acc, 0x9e21c820, 0xff28b1d5, 0xef5de2b0},
  265|     18|                               {0xdb92371d, 0x2126e970, 0x03249775, 0x04e8c90e}};
  266|       |
  267|     18|   const size_t CK0 = (key.size() / 8) - 2;
  268|     18|   const size_t CK1 = (CK0 + 1) % 3;
  269|     18|   const size_t CK2 = (CK1 + 1) % 3;
  270|       |
  271|     18|   uint32_t w0[4];
  272|     18|   uint32_t w1[4];
  273|     18|   uint32_t w2[4];
  274|     18|   uint32_t w3[4];
  275|       |
  276|     18|   w0[0] = load_be<uint32_t>(key.data(), 0);
  277|     18|   w0[1] = load_be<uint32_t>(key.data(), 1);
  278|     18|   w0[2] = load_be<uint32_t>(key.data(), 2);
  279|     18|   w0[3] = load_be<uint32_t>(key.data(), 3);
  280|       |
  281|     18|   w1[0] = w0[0] ^ KRK[CK0][0];
  282|     18|   w1[1] = w0[1] ^ KRK[CK0][1];
  283|     18|   w1[2] = w0[2] ^ KRK[CK0][2];
  284|     18|   w1[3] = w0[3] ^ KRK[CK0][3];
  285|       |
  286|     18|   ARIA_FO(w1[0], w1[1], w1[2], w1[3]);
  287|       |
  288|     18|   if(key.size() == 24 || key.size() == 32) {
  ------------------
  |  Branch (288:7): [True: 0, False: 18]
  |  Branch (288:27): [True: 10, False: 8]
  ------------------
  289|     10|      w1[0] ^= load_be<uint32_t>(key.data(), 4);
  290|     10|      w1[1] ^= load_be<uint32_t>(key.data(), 5);
  291|     10|   }
  292|     18|   if(key.size() == 32) {
  ------------------
  |  Branch (292:7): [True: 10, False: 8]
  ------------------
  293|     10|      w1[2] ^= load_be<uint32_t>(key.data(), 6);
  294|     10|      w1[3] ^= load_be<uint32_t>(key.data(), 7);
  295|     10|   }
  296|       |
  297|     18|   w2[0] = w1[0] ^ KRK[CK1][0];
  298|     18|   w2[1] = w1[1] ^ KRK[CK1][1];
  299|     18|   w2[2] = w1[2] ^ KRK[CK1][2];
  300|     18|   w2[3] = w1[3] ^ KRK[CK1][3];
  301|       |
  302|     18|   ARIA_FE(w2[0], w2[1], w2[2], w2[3]);
  303|       |
  304|     18|   w2[0] ^= w0[0];
  305|     18|   w2[1] ^= w0[1];
  306|     18|   w2[2] ^= w0[2];
  307|     18|   w2[3] ^= w0[3];
  308|       |
  309|     18|   w3[0] = w2[0] ^ KRK[CK2][0];
  310|     18|   w3[1] = w2[1] ^ KRK[CK2][1];
  311|     18|   w3[2] = w2[2] ^ KRK[CK2][2];
  312|     18|   w3[3] = w2[3] ^ KRK[CK2][3];
  313|       |
  314|     18|   ARIA_FO(w3[0], w3[1], w3[2], w3[3]);
  315|       |
  316|     18|   w3[0] ^= w1[0];
  317|     18|   w3[1] ^= w1[1];
  318|     18|   w3[2] ^= w1[2];
  319|     18|   w3[3] ^= w1[3];
  320|       |
  321|     18|   if(key.size() == 16) {
  ------------------
  |  Branch (321:7): [True: 8, False: 10]
  ------------------
  322|      8|      ERK.resize(4 * 13);
  323|     10|   } else if(key.size() == 24) {
  ------------------
  |  Branch (323:14): [True: 0, False: 10]
  ------------------
  324|      0|      ERK.resize(4 * 15);
  325|     10|   } else if(key.size() == 32) {
  ------------------
  |  Branch (325:14): [True: 10, False: 0]
  ------------------
  326|     10|      ERK.resize(4 * 17);
  327|     10|   }
  328|       |
  329|     18|   ARIA_ROL128<19>(w0, w1, &ERK[0]);  // NOLINT(*-container-data-pointer)
  330|     18|   ARIA_ROL128<19>(w1, w2, &ERK[4]);
  331|     18|   ARIA_ROL128<19>(w2, w3, &ERK[8]);
  332|     18|   ARIA_ROL128<19>(w3, w0, &ERK[12]);
  333|     18|   ARIA_ROL128<31>(w0, w1, &ERK[16]);
  334|     18|   ARIA_ROL128<31>(w1, w2, &ERK[20]);
  335|     18|   ARIA_ROL128<31>(w2, w3, &ERK[24]);
  336|     18|   ARIA_ROL128<31>(w3, w0, &ERK[28]);
  337|     18|   ARIA_ROL128<67>(w0, w1, &ERK[32]);
  338|     18|   ARIA_ROL128<67>(w1, w2, &ERK[36]);
  339|     18|   ARIA_ROL128<67>(w2, w3, &ERK[40]);
  340|     18|   ARIA_ROL128<67>(w3, w0, &ERK[44]);
  341|     18|   ARIA_ROL128<97>(w0, w1, &ERK[48]);
  342|       |
  343|     18|   if(key.size() == 24 || key.size() == 32) {
  ------------------
  |  Branch (343:7): [True: 0, False: 18]
  |  Branch (343:27): [True: 10, False: 8]
  ------------------
  344|     10|      ARIA_ROL128<97>(w1, w2, &ERK[52]);
  345|     10|      ARIA_ROL128<97>(w2, w3, &ERK[56]);
  346|       |
  347|     10|      if(key.size() == 32) {
  ------------------
  |  Branch (347:10): [True: 10, False: 0]
  ------------------
  348|     10|         ARIA_ROL128<97>(w3, w0, &ERK[60]);
  349|     10|         ARIA_ROL128<109>(w0, w1, &ERK[64]);
  350|     10|      }
  351|     10|   }
  352|       |
  353|       |   // Now create the decryption key schedule
  354|     18|   DRK.resize(ERK.size());
  355|       |
  356|    292|   for(size_t i = 0; i != DRK.size(); i += 4) {
  ------------------
  |  Branch (356:22): [True: 274, False: 18]
  ------------------
  357|    274|      DRK[i] = ERK[ERK.size() - 4 - i];
  358|    274|      DRK[i + 1] = ERK[ERK.size() - 3 - i];
  359|    274|      DRK[i + 2] = ERK[ERK.size() - 2 - i];
  360|    274|      DRK[i + 3] = ERK[ERK.size() - 1 - i];
  361|    274|   }
  362|       |
  363|    256|   for(size_t i = 4; i != DRK.size() - 4; i += 4) {
  ------------------
  |  Branch (363:22): [True: 238, False: 18]
  ------------------
  364|    238|      aria_ks_dk_transform(DRK[i + 0], DRK[i + 1], DRK[i + 2], DRK[i + 3]);
  365|    238|   }
  366|     18|}
aria.cpp:_ZN5Botan12_GLOBAL__N_16ARIA_F11ARIA_ROL128ILm19EEEvPKjS4_Pj:
  221|     72|inline void ARIA_ROL128(const uint32_t X[4], const uint32_t Y[4], uint32_t KS[4]) {
  222|       |   // MSVC is not generating a "rotate immediate". Constify to help it along.
  223|     72|   static const size_t Q = 4 - (N / 32);
  224|     72|   static const size_t R = N % 32;
  225|     72|   static_assert(R > 0 && R < 32, "Rotation in range for type");
  226|     72|   KS[0] = (X[0]) ^ ((Y[(Q) % 4]) >> R) ^ ((Y[(Q + 3) % 4]) << (32 - R));
  227|     72|   KS[1] = (X[1]) ^ ((Y[(Q + 1) % 4]) >> R) ^ ((Y[(Q) % 4]) << (32 - R));
  228|     72|   KS[2] = (X[2]) ^ ((Y[(Q + 2) % 4]) >> R) ^ ((Y[(Q + 1) % 4]) << (32 - R));
  229|     72|   KS[3] = (X[3]) ^ ((Y[(Q + 3) % 4]) >> R) ^ ((Y[(Q + 2) % 4]) << (32 - R));
  230|     72|}
aria.cpp:_ZN5Botan12_GLOBAL__N_16ARIA_F11ARIA_ROL128ILm31EEEvPKjS4_Pj:
  221|     72|inline void ARIA_ROL128(const uint32_t X[4], const uint32_t Y[4], uint32_t KS[4]) {
  222|       |   // MSVC is not generating a "rotate immediate". Constify to help it along.
  223|     72|   static const size_t Q = 4 - (N / 32);
  224|     72|   static const size_t R = N % 32;
  225|     72|   static_assert(R > 0 && R < 32, "Rotation in range for type");
  226|     72|   KS[0] = (X[0]) ^ ((Y[(Q) % 4]) >> R) ^ ((Y[(Q + 3) % 4]) << (32 - R));
  227|     72|   KS[1] = (X[1]) ^ ((Y[(Q + 1) % 4]) >> R) ^ ((Y[(Q) % 4]) << (32 - R));
  228|     72|   KS[2] = (X[2]) ^ ((Y[(Q + 2) % 4]) >> R) ^ ((Y[(Q + 1) % 4]) << (32 - R));
  229|     72|   KS[3] = (X[3]) ^ ((Y[(Q + 3) % 4]) >> R) ^ ((Y[(Q + 2) % 4]) << (32 - R));
  230|     72|}
aria.cpp:_ZN5Botan12_GLOBAL__N_16ARIA_F11ARIA_ROL128ILm67EEEvPKjS4_Pj:
  221|     72|inline void ARIA_ROL128(const uint32_t X[4], const uint32_t Y[4], uint32_t KS[4]) {
  222|       |   // MSVC is not generating a "rotate immediate". Constify to help it along.
  223|     72|   static const size_t Q = 4 - (N / 32);
  224|     72|   static const size_t R = N % 32;
  225|     72|   static_assert(R > 0 && R < 32, "Rotation in range for type");
  226|     72|   KS[0] = (X[0]) ^ ((Y[(Q) % 4]) >> R) ^ ((Y[(Q + 3) % 4]) << (32 - R));
  227|     72|   KS[1] = (X[1]) ^ ((Y[(Q + 1) % 4]) >> R) ^ ((Y[(Q) % 4]) << (32 - R));
  228|     72|   KS[2] = (X[2]) ^ ((Y[(Q + 2) % 4]) >> R) ^ ((Y[(Q + 1) % 4]) << (32 - R));
  229|     72|   KS[3] = (X[3]) ^ ((Y[(Q + 3) % 4]) >> R) ^ ((Y[(Q + 2) % 4]) << (32 - R));
  230|     72|}
aria.cpp:_ZN5Botan12_GLOBAL__N_16ARIA_F11ARIA_ROL128ILm97EEEvPKjS4_Pj:
  221|     48|inline void ARIA_ROL128(const uint32_t X[4], const uint32_t Y[4], uint32_t KS[4]) {
  222|       |   // MSVC is not generating a "rotate immediate". Constify to help it along.
  223|     48|   static const size_t Q = 4 - (N / 32);
  224|     48|   static const size_t R = N % 32;
  225|     48|   static_assert(R > 0 && R < 32, "Rotation in range for type");
  226|     48|   KS[0] = (X[0]) ^ ((Y[(Q) % 4]) >> R) ^ ((Y[(Q + 3) % 4]) << (32 - R));
  227|     48|   KS[1] = (X[1]) ^ ((Y[(Q + 1) % 4]) >> R) ^ ((Y[(Q) % 4]) << (32 - R));
  228|     48|   KS[2] = (X[2]) ^ ((Y[(Q + 2) % 4]) >> R) ^ ((Y[(Q + 1) % 4]) << (32 - R));
  229|     48|   KS[3] = (X[3]) ^ ((Y[(Q + 3) % 4]) >> R) ^ ((Y[(Q + 2) % 4]) << (32 - R));
  230|     48|}
aria.cpp:_ZN5Botan12_GLOBAL__N_16ARIA_F11ARIA_ROL128ILm109EEEvPKjS4_Pj:
  221|     10|inline void ARIA_ROL128(const uint32_t X[4], const uint32_t Y[4], uint32_t KS[4]) {
  222|       |   // MSVC is not generating a "rotate immediate". Constify to help it along.
  223|     10|   static const size_t Q = 4 - (N / 32);
  224|     10|   static const size_t R = N % 32;
  225|     10|   static_assert(R > 0 && R < 32, "Rotation in range for type");
  226|     10|   KS[0] = (X[0]) ^ ((Y[(Q) % 4]) >> R) ^ ((Y[(Q + 3) % 4]) << (32 - R));
  227|     10|   KS[1] = (X[1]) ^ ((Y[(Q + 1) % 4]) >> R) ^ ((Y[(Q) % 4]) << (32 - R));
  228|     10|   KS[2] = (X[2]) ^ ((Y[(Q + 2) % 4]) >> R) ^ ((Y[(Q + 1) % 4]) << (32 - R));
  229|     10|   KS[3] = (X[3]) ^ ((Y[(Q + 3) % 4]) >> R) ^ ((Y[(Q + 2) % 4]) << (32 - R));
  230|     10|}
aria.cpp:_ZN5Botan12_GLOBAL__N_16ARIA_F20aria_ks_dk_transformERjS2_S2_S2_:
  232|    238|void aria_ks_dk_transform(uint32_t& K0, uint32_t& K1, uint32_t& K2, uint32_t& K3) {
  233|    238|   K0 = rotr<8>(K0) ^ rotr<16>(K0) ^ rotr<24>(K0);
  234|    238|   K1 = rotr<8>(K1) ^ rotr<16>(K1) ^ rotr<24>(K1);
  235|    238|   K2 = rotr<8>(K2) ^ rotr<16>(K2) ^ rotr<24>(K2);
  236|    238|   K3 = rotr<8>(K3) ^ rotr<16>(K3) ^ rotr<24>(K3);
  237|       |
  238|    238|   K1 ^= K2;
  239|    238|   K2 ^= K3;
  240|    238|   K0 ^= K1;
  241|    238|   K3 ^= K1;
  242|    238|   K2 ^= K0;
  243|    238|   K1 ^= K2;
  244|       |
  245|    238|   K1 = ((K1 << 8) & 0xFF00FF00) | ((K1 >> 8) & 0x00FF00FF);
  246|    238|   K2 = rotr<16>(K2);
  247|    238|   K3 = reverse_bytes(K3);
  248|       |
  249|    238|   K1 ^= K2;
  250|    238|   K2 ^= K3;
  251|    238|   K0 ^= K1;
  252|    238|   K3 ^= K1;
  253|    238|   K2 ^= K0;
  254|    238|   K1 ^= K2;
  255|    238|}

_ZNK5Botan8ARIA_12818aria_hwaes_encryptEPKhPhm:
  224|     27|void BOTAN_FN_ISA_HWAES ARIA_128::aria_hwaes_encrypt(const uint8_t in[], uint8_t out[], size_t blocks) const {
  225|     27|   ARIA_HWAES::aria_transform(in, out, blocks, m_ERK);
  226|     27|}
_ZNK5Botan8ARIA_25618aria_hwaes_encryptEPKhPhm:
  240|     41|void BOTAN_FN_ISA_HWAES ARIA_256::aria_hwaes_encrypt(const uint8_t in[], uint8_t out[], size_t blocks) const {
  241|     41|   ARIA_HWAES::aria_transform(in, out, blocks, m_ERK);
  242|     41|}
aria_hwaes.cpp:_ZN5Botan10ARIA_HWAES12_GLOBAL__N_114aria_transformEPKhPhmNSt3__14spanIKjLm18446744073709551615EEE:
  203|     68|void BOTAN_FN_ISA_HWAES aria_transform(const uint8_t in[], uint8_t out[], size_t blocks, std::span<const uint32_t> KS) {
  204|    340|   while(blocks >= 4) {
  ------------------
  |  Branch (204:10): [True: 272, False: 68]
  ------------------
  205|    272|      transform_4(in, out, KS);
  206|    272|      in += 4 * 16;
  207|    272|      out += 4 * 16;
  208|    272|      blocks -= 4;
  209|    272|   }
  210|       |
  211|     68|   if(blocks > 0) {
  ------------------
  |  Branch (211:7): [True: 0, False: 68]
  ------------------
  212|      0|      uint8_t ibuf[4 * 16] = {0};
  213|      0|      uint8_t obuf[4 * 16] = {0};
  214|      0|      copy_mem(ibuf, in, blocks * 16);
  215|      0|      transform_4(ibuf, obuf, KS);
  216|      0|      copy_mem(out, obuf, blocks * 16);
  217|      0|   }
  218|     68|}
aria_hwaes.cpp:_ZN5Botan10ARIA_HWAES12_GLOBAL__N_111transform_4EPKhPhNSt3__14spanIKjLm18446744073709551615EEE:
  159|    272|BOTAN_FN_ISA_HWAES void transform_4(const uint8_t in[], uint8_t out[], std::span<const uint32_t> KS) {
  160|    272|   const size_t ROUNDS = (KS.size() / 4) - 1;
  161|       |
  162|    272|   auto B0 = SIMD_4x32::load_be(in);
  163|    272|   auto B1 = SIMD_4x32::load_be(in + 16);
  164|    272|   auto B2 = SIMD_4x32::load_be(in + 32);
  165|    272|   auto B3 = SIMD_4x32::load_be(in + 48);
  166|       |
  167|    272|   SIMD_4x32::transpose(B0, B1, B2, B3);
  168|       |
  169|  2.23k|   for(size_t r = 0; r != ROUNDS; r += 2) {
  ------------------
  |  Branch (169:22): [True: 1.96k, False: 272]
  ------------------
  170|  1.96k|      B0 ^= SIMD_4x32::splat(KS[4 * r]);
  171|  1.96k|      B1 ^= SIMD_4x32::splat(KS[4 * r + 1]);
  172|  1.96k|      B2 ^= SIMD_4x32::splat(KS[4 * r + 2]);
  173|  1.96k|      B3 ^= SIMD_4x32::splat(KS[4 * r + 3]);
  174|       |
  175|  1.96k|      aria_fo(B0, B1, B2, B3);
  176|       |
  177|  1.96k|      B0 ^= SIMD_4x32::splat(KS[4 * r + 4]);
  178|  1.96k|      B1 ^= SIMD_4x32::splat(KS[4 * r + 5]);
  179|  1.96k|      B2 ^= SIMD_4x32::splat(KS[4 * r + 6]);
  180|  1.96k|      B3 ^= SIMD_4x32::splat(KS[4 * r + 7]);
  181|       |
  182|  1.96k|      if(r != ROUNDS - 2) {
  ------------------
  |  Branch (182:10): [True: 1.68k, False: 272]
  ------------------
  183|  1.68k|         aria_fe(B0, B1, B2, B3);
  184|  1.68k|      }
  185|  1.96k|   }
  186|       |
  187|       |   // Last half-round: FE sbox only
  188|    272|   aria_fe_sbox(B0, B1, B2, B3);
  189|       |
  190|    272|   B0 ^= SIMD_4x32::splat(KS[4 * ROUNDS]);
  191|    272|   B1 ^= SIMD_4x32::splat(KS[4 * ROUNDS + 1]);
  192|    272|   B2 ^= SIMD_4x32::splat(KS[4 * ROUNDS + 2]);
  193|    272|   B3 ^= SIMD_4x32::splat(KS[4 * ROUNDS + 3]);
  194|       |
  195|    272|   SIMD_4x32::transpose(B0, B1, B2, B3);
  196|       |
  197|    272|   B0.store_be(out);
  198|    272|   B1.store_be(out + 16);
  199|    272|   B2.store_be(out + 32);
  200|    272|   B3.store_be(out + 48);
  201|    272|}
aria_hwaes.cpp:_ZN5Botan10ARIA_HWAES12_GLOBAL__N_17aria_foERNS_9SIMD_4x32ES3_S3_S3_:
  125|  1.96k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES void aria_fo(SIMD_4x32& B0, SIMD_4x32& B1, SIMD_4x32& B2, SIMD_4x32& B3) {
  126|  1.96k|   aria_fo_sbox(B0, B1, B2, B3);
  127|       |
  128|  1.96k|   B0 = aria_fo_m(B0);
  129|  1.96k|   B1 = aria_fo_m(B1);
  130|  1.96k|   B2 = aria_fo_m(B2);
  131|  1.96k|   B3 = aria_fo_m(B3);
  132|       |
  133|  1.96k|   aria_mix(B0, B1, B2, B3);
  134|       |
  135|  1.96k|   B1 = swap_abcd_badc(B1);
  136|  1.96k|   B2 = B2.rotl<16>();
  137|  1.96k|   B3 = B3.bswap();
  138|       |
  139|  1.96k|   aria_mix(B0, B1, B2, B3);
  140|  1.96k|}
aria_hwaes.cpp:_ZN5Botan10ARIA_HWAES12_GLOBAL__N_112aria_fo_sboxERNS_9SIMD_4x32ES3_S3_S3_:
   87|  1.96k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES void aria_fo_sbox(SIMD_4x32& B0, SIMD_4x32& B1, SIMD_4x32& B2, SIMD_4x32& B3) {
   88|  1.96k|   B0 = byte_transpose(B0);
   89|  1.96k|   B1 = byte_transpose(B1);
   90|  1.96k|   B2 = byte_transpose(B2);
   91|  1.96k|   B3 = byte_transpose(B3);
   92|  1.96k|   SIMD_4x32::transpose(B0, B1, B2, B3);
   93|       |
   94|  1.96k|   B3 = aria_s1(B3);
   95|  1.96k|   B2 = aria_s2(B2);
   96|  1.96k|   B1 = aria_x1(B1);
   97|  1.96k|   B0 = aria_x2(B0);
   98|       |
   99|  1.96k|   SIMD_4x32::transpose(B0, B1, B2, B3);
  100|  1.96k|   B0 = byte_transpose(B0);
  101|  1.96k|   B1 = byte_transpose(B1);
  102|  1.96k|   B2 = byte_transpose(B2);
  103|  1.96k|   B3 = byte_transpose(B3);
  104|  1.96k|}
aria_hwaes.cpp:_ZN5Botan10ARIA_HWAES12_GLOBAL__N_114byte_transposeENS_9SIMD_4x32E:
   82|  31.3k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES SIMD_4x32 byte_transpose(SIMD_4x32 v) {
   83|  31.3k|   const SIMD_4x32 tbl(0x0C080400, 0x0D090501, 0x0E0A0602, 0x0F0B0703);
   84|  31.3k|   return SIMD_4x32::byte_shuffle(v, tbl);
   85|  31.3k|}
aria_hwaes.cpp:_ZN5Botan10ARIA_HWAES12_GLOBAL__N_17aria_s1ENS_9SIMD_4x32E:
   21|  3.92k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES SIMD_4x32 aria_s1(SIMD_4x32 v) {
   22|  3.92k|   return hw_aes_sbox(v);
   23|  3.92k|}
aria_hwaes.cpp:_ZN5Botan10ARIA_HWAES12_GLOBAL__N_17aria_s2ENS_9SIMD_4x32E:
   25|  3.92k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES SIMD_4x32 aria_s2(SIMD_4x32 v) {
   26|  3.92k|   constexpr uint64_t AFF_S2 = gfni_matrix(R"(
   27|  3.92k|      0 1 0 1 0 1 1 1
   28|  3.92k|      0 0 1 1 1 1 1 1
   29|  3.92k|      1 1 1 0 1 1 0 1
   30|  3.92k|      1 1 0 0 0 0 1 1
   31|  3.92k|      0 1 0 0 0 0 1 1
   32|  3.92k|      1 1 0 0 1 1 1 0
   33|  3.92k|      0 1 1 0 0 0 1 1
   34|  3.92k|      1 1 1 1 0 1 1 0)");
   35|       |
   36|  3.92k|   constexpr auto POST_S2 = Gf2AffineTransformation::post_sbox(AFF_S2, 0xE2);
   37|  3.92k|   return POST_S2.affine_transform(hw_aes_sbox(v));
   38|  3.92k|}
aria_hwaes.cpp:_ZN5Botan10ARIA_HWAES12_GLOBAL__N_17aria_x1ENS_9SIMD_4x32E:
   41|  3.92k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES SIMD_4x32 aria_x1(SIMD_4x32 v) {
   42|  3.92k|   return hw_aes_inv_sbox(v);
   43|  3.92k|}
aria_hwaes.cpp:_ZN5Botan10ARIA_HWAES12_GLOBAL__N_17aria_x2ENS_9SIMD_4x32E:
   45|  3.92k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES SIMD_4x32 aria_x2(SIMD_4x32 v) {
   46|  3.92k|   constexpr uint64_t AFF_X2 = gfni_matrix(R"(
   47|  3.92k|      0 0 0 1 1 0 0 0
   48|  3.92k|      0 0 1 0 0 1 1 0
   49|  3.92k|      0 0 0 0 1 0 1 0
   50|  3.92k|      1 1 1 0 0 0 1 1
   51|  3.92k|      1 1 1 0 1 1 0 0
   52|  3.92k|      0 1 1 0 1 0 1 1
   53|  3.92k|      1 0 1 1 1 1 0 1
   54|  3.92k|      1 0 0 1 0 0 1 1)");
   55|  3.92k|   constexpr auto PRE_X2D = Gf2AffineTransformation::post_inv_sbox(AFF_X2, 0x2C);
   56|       |
   57|  3.92k|   return hw_aes_inv_sbox(PRE_X2D.affine_transform(v));
   58|  3.92k|}
aria_hwaes.cpp:_ZN5Botan10ARIA_HWAES12_GLOBAL__N_19aria_fo_mENS_9SIMD_4x32E:
   60|  7.84k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES SIMD_4x32 aria_fo_m(SIMD_4x32 x) {
   61|  7.84k|   return x.rotl<8>() ^ x.rotl<16>() ^ x.rotl<24>();
   62|  7.84k|}
aria_hwaes.cpp:_ZN5Botan10ARIA_HWAES12_GLOBAL__N_18aria_mixERNS_9SIMD_4x32ES3_S3_S3_:
   68|  7.29k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES void aria_mix(SIMD_4x32& B0, SIMD_4x32& B1, SIMD_4x32& B2, SIMD_4x32& B3) {
   69|  7.29k|   B1 ^= B2;
   70|  7.29k|   B2 ^= B3;
   71|  7.29k|   B0 ^= B1;
   72|  7.29k|   B3 ^= B1;
   73|  7.29k|   B2 ^= B0;
   74|  7.29k|   B1 ^= B2;
   75|  7.29k|}
aria_hwaes.cpp:_ZN5Botan10ARIA_HWAES12_GLOBAL__N_114swap_abcd_badcENS_9SIMD_4x32E:
   77|  3.64k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES SIMD_4x32 swap_abcd_badc(SIMD_4x32 x) {
   78|  3.64k|   const auto shuf = SIMD_4x32(0x02030001, 0x06070405, 0x0A0B0809, 0x0E0F0C0D);
   79|  3.64k|   return SIMD_4x32::byte_shuffle(x, shuf);
   80|  3.64k|}
aria_hwaes.cpp:_ZN5Botan10ARIA_HWAES12_GLOBAL__N_17aria_feERNS_9SIMD_4x32ES3_S3_S3_:
  142|  1.68k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES void aria_fe(SIMD_4x32& B0, SIMD_4x32& B1, SIMD_4x32& B2, SIMD_4x32& B3) {
  143|  1.68k|   aria_fe_sbox(B0, B1, B2, B3);
  144|       |
  145|  1.68k|   B0 = aria_fe_m(B0);
  146|  1.68k|   B1 = aria_fe_m(B1);
  147|  1.68k|   B2 = aria_fe_m(B2);
  148|  1.68k|   B3 = aria_fe_m(B3);
  149|       |
  150|  1.68k|   aria_mix(B0, B1, B2, B3);
  151|       |
  152|  1.68k|   B3 = swap_abcd_badc(B3);
  153|  1.68k|   B0 = B0.rotl<16>();
  154|  1.68k|   B1 = B1.bswap();
  155|       |
  156|  1.68k|   aria_mix(B0, B1, B2, B3);
  157|  1.68k|}
aria_hwaes.cpp:_ZN5Botan10ARIA_HWAES12_GLOBAL__N_19aria_fe_mENS_9SIMD_4x32E:
   64|  6.75k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES SIMD_4x32 aria_fe_m(SIMD_4x32 x) {
   65|  6.75k|   return x ^ x.rotl<8>() ^ x.rotl<24>();
   66|  6.75k|}
aria_hwaes.cpp:_ZN5Botan10ARIA_HWAES12_GLOBAL__N_112aria_fe_sboxERNS_9SIMD_4x32ES3_S3_S3_:
  106|  1.96k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES void aria_fe_sbox(SIMD_4x32& B0, SIMD_4x32& B1, SIMD_4x32& B2, SIMD_4x32& B3) {
  107|  1.96k|   B0 = byte_transpose(B0);
  108|  1.96k|   B1 = byte_transpose(B1);
  109|  1.96k|   B2 = byte_transpose(B2);
  110|  1.96k|   B3 = byte_transpose(B3);
  111|  1.96k|   SIMD_4x32::transpose(B0, B1, B2, B3);
  112|       |
  113|  1.96k|   B3 = aria_x1(B3);
  114|  1.96k|   B2 = aria_x2(B2);
  115|  1.96k|   B1 = aria_s1(B1);
  116|  1.96k|   B0 = aria_s2(B0);
  117|       |
  118|  1.96k|   SIMD_4x32::transpose(B0, B1, B2, B3);
  119|  1.96k|   B0 = byte_transpose(B0);
  120|  1.96k|   B1 = byte_transpose(B1);
  121|  1.96k|   B2 = byte_transpose(B2);
  122|  1.96k|   B3 = byte_transpose(B3);
  123|  1.96k|}

_ZN5Botan11BlockCipher6createENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
   96|    456|std::unique_ptr<BlockCipher> BlockCipher::create(std::string_view algo, std::string_view provider) {
   97|       |#if defined(BOTAN_HAS_COMMONCRYPTO)
   98|       |   if(provider.empty() || provider == "commoncrypto") {
   99|       |      if(auto bc = make_commoncrypto_block_cipher(algo))
  100|       |         return bc;
  101|       |
  102|       |      if(!provider.empty())
  103|       |         return nullptr;
  104|       |   }
  105|       |#endif
  106|       |
  107|       |   // TODO: CryptoAPI
  108|       |   // TODO: /dev/crypto
  109|       |
  110|       |   // Only base providers from here on out
  111|    456|   if(provider.empty() == false && provider != "base") {
  ------------------
  |  Branch (111:7): [True: 0, False: 456]
  |  Branch (111:36): [True: 0, False: 0]
  ------------------
  112|      0|      return nullptr;
  113|      0|   }
  114|       |
  115|    456|#if defined(BOTAN_HAS_AES)
  116|    456|   if(algo == "AES-128") {
  ------------------
  |  Branch (116:7): [True: 109, False: 347]
  ------------------
  117|    109|      return std::make_unique<AES_128>();
  118|    109|   }
  119|       |
  120|    347|   if(algo == "AES-192") {
  ------------------
  |  Branch (120:7): [True: 0, False: 347]
  ------------------
  121|      0|      return std::make_unique<AES_192>();
  122|      0|   }
  123|       |
  124|    347|   if(algo == "AES-256") {
  ------------------
  |  Branch (124:7): [True: 202, False: 145]
  ------------------
  125|    202|      return std::make_unique<AES_256>();
  126|    202|   }
  127|    145|#endif
  128|       |
  129|    145|#if defined(BOTAN_HAS_ARIA)
  130|    145|   if(algo == "ARIA-128") {
  ------------------
  |  Branch (130:7): [True: 8, False: 137]
  ------------------
  131|      8|      return std::make_unique<ARIA_128>();
  132|      8|   }
  133|       |
  134|    137|   if(algo == "ARIA-192") {
  ------------------
  |  Branch (134:7): [True: 0, False: 137]
  ------------------
  135|      0|      return std::make_unique<ARIA_192>();
  136|      0|   }
  137|       |
  138|    137|   if(algo == "ARIA-256") {
  ------------------
  |  Branch (138:7): [True: 10, False: 127]
  ------------------
  139|     10|      return std::make_unique<ARIA_256>();
  140|     10|   }
  141|    127|#endif
  142|       |
  143|    127|#if defined(BOTAN_HAS_SERPENT)
  144|    127|   if(algo == "Serpent") {
  ------------------
  |  Branch (144:7): [True: 0, False: 127]
  ------------------
  145|      0|      return std::make_unique<Serpent>();
  146|      0|   }
  147|    127|#endif
  148|       |
  149|    127|#if defined(BOTAN_HAS_SHACAL2)
  150|    127|   if(algo == "SHACAL2") {
  ------------------
  |  Branch (150:7): [True: 0, False: 127]
  ------------------
  151|      0|      return std::make_unique<SHACAL2>();
  152|      0|   }
  153|    127|#endif
  154|       |
  155|    127|#if defined(BOTAN_HAS_TWOFISH)
  156|    127|   if(algo == "Twofish") {
  ------------------
  |  Branch (156:7): [True: 0, False: 127]
  ------------------
  157|      0|      return std::make_unique<Twofish>();
  158|      0|   }
  159|    127|#endif
  160|       |
  161|    127|#if defined(BOTAN_HAS_THREEFISH_512)
  162|    127|   if(algo == "Threefish-512") {
  ------------------
  |  Branch (162:7): [True: 0, False: 127]
  ------------------
  163|      0|      return std::make_unique<Threefish_512>();
  164|      0|   }
  165|    127|#endif
  166|       |
  167|    127|#if defined(BOTAN_HAS_BLOWFISH)
  168|    127|   if(algo == "Blowfish") {
  ------------------
  |  Branch (168:7): [True: 0, False: 127]
  ------------------
  169|      0|      return std::make_unique<Blowfish>();
  170|      0|   }
  171|    127|#endif
  172|       |
  173|    127|#if defined(BOTAN_HAS_CAMELLIA)
  174|    127|   if(algo == "Camellia-128") {
  ------------------
  |  Branch (174:7): [True: 16, False: 111]
  ------------------
  175|     16|      return std::make_unique<Camellia_128>();
  176|     16|   }
  177|       |
  178|    111|   if(algo == "Camellia-192") {
  ------------------
  |  Branch (178:7): [True: 0, False: 111]
  ------------------
  179|      0|      return std::make_unique<Camellia_192>();
  180|      0|   }
  181|       |
  182|    111|   if(algo == "Camellia-256") {
  ------------------
  |  Branch (182:7): [True: 25, False: 86]
  ------------------
  183|     25|      return std::make_unique<Camellia_256>();
  184|     25|   }
  185|     86|#endif
  186|       |
  187|     86|#if defined(BOTAN_HAS_DES)
  188|     86|   if(algo == "DES") {
  ------------------
  |  Branch (188:7): [True: 0, False: 86]
  ------------------
  189|      0|      return std::make_unique<DES>();
  190|      0|   }
  191|       |
  192|     86|   if(algo == "TripleDES" || algo == "3DES" || algo == "DES-EDE") {
  ------------------
  |  Branch (192:7): [True: 0, False: 86]
  |  Branch (192:30): [True: 86, False: 0]
  |  Branch (192:48): [True: 0, False: 0]
  ------------------
  193|     86|      return std::make_unique<TripleDES>();
  194|     86|   }
  195|      0|#endif
  196|       |
  197|      0|#if defined(BOTAN_HAS_NOEKEON)
  198|      0|   if(algo == "Noekeon") {
  ------------------
  |  Branch (198:7): [True: 0, False: 0]
  ------------------
  199|      0|      return std::make_unique<Noekeon>();
  200|      0|   }
  201|      0|#endif
  202|       |
  203|      0|#if defined(BOTAN_HAS_CAST_128)
  204|      0|   if(algo == "CAST-128" || algo == "CAST5") {
  ------------------
  |  Branch (204:7): [True: 0, False: 0]
  |  Branch (204:29): [True: 0, False: 0]
  ------------------
  205|      0|      return std::make_unique<CAST_128>();
  206|      0|   }
  207|      0|#endif
  208|       |
  209|      0|#if defined(BOTAN_HAS_IDEA)
  210|      0|   if(algo == "IDEA") {
  ------------------
  |  Branch (210:7): [True: 0, False: 0]
  ------------------
  211|      0|      return std::make_unique<IDEA>();
  212|      0|   }
  213|      0|#endif
  214|       |
  215|      0|#if defined(BOTAN_HAS_KUZNYECHIK)
  216|      0|   if(algo == "Kuznyechik") {
  ------------------
  |  Branch (216:7): [True: 0, False: 0]
  ------------------
  217|      0|      return std::make_unique<Kuznyechik>();
  218|      0|   }
  219|      0|#endif
  220|       |
  221|      0|#if defined(BOTAN_HAS_SEED)
  222|      0|   if(algo == "SEED") {
  ------------------
  |  Branch (222:7): [True: 0, False: 0]
  ------------------
  223|      0|      return std::make_unique<SEED>();
  224|      0|   }
  225|      0|#endif
  226|       |
  227|      0|#if defined(BOTAN_HAS_SM4)
  228|      0|   if(algo == "SM4") {
  ------------------
  |  Branch (228:7): [True: 0, False: 0]
  ------------------
  229|      0|      return std::make_unique<SM4>();
  230|      0|   }
  231|      0|#endif
  232|       |
  233|      0|   const SCAN_Name req(algo);
  234|       |
  235|      0|#if defined(BOTAN_HAS_GOST_28147_89)
  236|      0|   if(req.algo_name() == "GOST-28147-89") {
  ------------------
  |  Branch (236:7): [True: 0, False: 0]
  ------------------
  237|      0|      return std::make_unique<GOST_28147_89>(req.arg(0, "R3411_94_TestParam"));
  238|      0|   }
  239|      0|#endif
  240|       |
  241|      0|#if defined(BOTAN_HAS_CASCADE)
  242|      0|   if(req.algo_name() == "Cascade" && req.arg_count() == 2) {
  ------------------
  |  Branch (242:7): [True: 0, False: 0]
  |  Branch (242:39): [True: 0, False: 0]
  ------------------
  243|      0|      auto c1 = BlockCipher::create(req.arg(0));
  244|      0|      auto c2 = BlockCipher::create(req.arg(1));
  245|       |
  246|      0|      if(c1 && c2) {
  ------------------
  |  Branch (246:10): [True: 0, False: 0]
  |  Branch (246:16): [True: 0, False: 0]
  ------------------
  247|      0|         return std::make_unique<Cascade_Cipher>(std::move(c1), std::move(c2));
  248|      0|      }
  249|      0|   }
  250|      0|#endif
  251|       |
  252|      0|#if defined(BOTAN_HAS_LION)
  253|      0|   if(req.algo_name() == "Lion" && req.arg_count_between(2, 3)) {
  ------------------
  |  Branch (253:7): [True: 0, False: 0]
  |  Branch (253:36): [True: 0, False: 0]
  ------------------
  254|      0|      auto hash = HashFunction::create(req.arg(0));
  255|      0|      auto stream = StreamCipher::create(req.arg(1));
  256|       |
  257|      0|      if(hash && stream) {
  ------------------
  |  Branch (257:10): [True: 0, False: 0]
  |  Branch (257:18): [True: 0, False: 0]
  ------------------
  258|      0|         const size_t block_size = req.arg_as_integer(2, 1024);
  259|      0|         return std::make_unique<Lion>(std::move(hash), std::move(stream), block_size);
  260|      0|      }
  261|      0|   }
  262|      0|#endif
  263|       |
  264|      0|   BOTAN_UNUSED(req);
  ------------------
  |  |  151|      0|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  265|      0|   BOTAN_UNUSED(provider);
  ------------------
  |  |  151|      0|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  266|       |
  267|      0|   return nullptr;
  268|      0|}
_ZN5Botan11BlockCipher15create_or_throwENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
  271|    207|std::unique_ptr<BlockCipher> BlockCipher::create_or_throw(std::string_view algo, std::string_view provider) {
  272|    207|   if(auto bc = BlockCipher::create(algo, provider)) {
  ------------------
  |  Branch (272:12): [True: 207, False: 0]
  ------------------
  273|    207|      return bc;
  274|    207|   }
  275|      0|   throw Lookup_Error("Block cipher", algo, provider);
  276|    207|}

_ZNK5Botan12Camellia_1289encrypt_nEPKhPhm:
  431|    199|void Camellia_128::encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const {
  432|    199|   assert_key_material_set();
  433|       |
  434|    199|#if defined(BOTAN_HAS_CAMELLIA_AVX512_GFNI)
  435|    199|   if(CPUID::has(CPUID::Feature::AVX512, CPUID::Feature::GFNI)) {
  ------------------
  |  Branch (435:7): [True: 0, False: 199]
  ------------------
  436|      0|      return avx512_gfni_encrypt(in, out, blocks, m_SK);
  437|      0|   }
  438|    199|#endif
  439|       |
  440|    199|#if defined(BOTAN_HAS_CAMELLIA_AVX2_GFNI)
  441|    199|   if(CPUID::has(CPUID::Feature::GFNI)) {
  ------------------
  |  Branch (441:7): [True: 0, False: 199]
  ------------------
  442|      0|      return avx2_gfni_encrypt(in, out, blocks, m_SK);
  443|      0|   }
  444|    199|#endif
  445|       |
  446|    199|#if defined(BOTAN_HAS_CAMELLIA_HWAES)
  447|    199|   if(CPUID::has(CPUID::Feature::HW_AES)) {
  ------------------
  |  Branch (447:7): [True: 199, False: 0]
  ------------------
  448|    199|      return hwaes_encrypt(in, out, blocks, m_SK);
  449|    199|   }
  450|      0|#endif
  451|       |
  452|      0|   Camellia_F::encrypt(in, out, blocks, m_SK, 9);
  453|      0|}
_ZNK5Botan12Camellia_2569encrypt_nEPKhPhm:
  479|    288|void Camellia_256::encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const {
  480|    288|   assert_key_material_set();
  481|       |
  482|    288|#if defined(BOTAN_HAS_CAMELLIA_AVX512_GFNI)
  483|    288|   if(CPUID::has(CPUID::Feature::AVX512, CPUID::Feature::GFNI)) {
  ------------------
  |  Branch (483:7): [True: 0, False: 288]
  ------------------
  484|      0|      return avx512_gfni_encrypt(in, out, blocks, m_SK);
  485|      0|   }
  486|    288|#endif
  487|       |
  488|    288|#if defined(BOTAN_HAS_CAMELLIA_AVX2_GFNI)
  489|    288|   if(CPUID::has(CPUID::Feature::GFNI)) {
  ------------------
  |  Branch (489:7): [True: 0, False: 288]
  ------------------
  490|      0|      return avx2_gfni_encrypt(in, out, blocks, m_SK);
  491|      0|   }
  492|    288|#endif
  493|       |
  494|    288|#if defined(BOTAN_HAS_CAMELLIA_HWAES)
  495|    288|   if(CPUID::has(CPUID::Feature::HW_AES)) {
  ------------------
  |  Branch (495:7): [True: 288, False: 0]
  ------------------
  496|    288|      return hwaes_encrypt(in, out, blocks, m_SK);
  497|    288|   }
  498|      0|#endif
  499|       |
  500|      0|   Camellia_F::encrypt(in, out, blocks, m_SK, 12);
  501|      0|}
_ZNK5Botan12Camellia_12819has_keying_materialEv:
  575|    286|bool Camellia_128::has_keying_material() const {
  576|    286|   return !m_SK.empty();
  577|    286|}
_ZNK5Botan12Camellia_25619has_keying_materialEv:
  583|    425|bool Camellia_256::has_keying_material() const {
  584|    425|   return !m_SK.empty();
  585|    425|}
_ZN5Botan12Camellia_12812key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
  587|     16|void Camellia_128::key_schedule(std::span<const uint8_t> key) {
  588|     16|   Camellia_F::key_schedule(m_SK, key);
  589|     16|}
_ZN5Botan12Camellia_25612key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
  595|     25|void Camellia_256::key_schedule(std::span<const uint8_t> key) {
  596|     25|   Camellia_F::key_schedule(m_SK, key);
  597|     25|}
_ZNK5Botan12Camellia_12811parallelismEv:
  623|     32|size_t Camellia_128::parallelism() const {
  624|     32|   return Camellia_F::parallelism();
  625|     32|}
_ZNK5Botan12Camellia_25611parallelismEv:
  631|     50|size_t Camellia_256::parallelism() const {
  632|     50|   return Camellia_F::parallelism();
  633|     50|}
camellia.cpp:_ZN5Botan12_GLOBAL__N_110Camellia_F1PEhhhhhhhh:
   96|    246|inline uint64_t P(uint8_t z1, uint8_t z2, uint8_t z3, uint8_t z4, uint8_t z5, uint8_t z6, uint8_t z7, uint8_t z8) {
   97|    246|   constexpr uint64_t M1 = 0x0101010001000001;
   98|    246|   constexpr uint64_t M2 = 0x0001010101010000;
   99|    246|   constexpr uint64_t M3 = 0x0100010100010100;
  100|    246|   constexpr uint64_t M4 = 0x0101000100000101;
  101|    246|   constexpr uint64_t M5 = 0x0001010100010101;
  102|    246|   constexpr uint64_t M6 = 0x0100010101000101;
  103|    246|   constexpr uint64_t M7 = 0x0101000101010001;
  104|    246|   constexpr uint64_t M8 = 0x0101010001010100;
  105|       |
  106|    246|   const uint64_t Z1 = M1 * z1;
  107|    246|   const uint64_t Z2 = M2 * z2;
  108|    246|   const uint64_t Z3 = M3 * z3;
  109|    246|   const uint64_t Z4 = M4 * z4;
  110|    246|   const uint64_t Z5 = M5 * z5;
  111|    246|   const uint64_t Z6 = M6 * z6;
  112|    246|   const uint64_t Z7 = M7 * z7;
  113|    246|   const uint64_t Z8 = M8 * z8;
  114|       |
  115|    246|   return Z1 ^ Z2 ^ Z3 ^ Z4 ^ Z5 ^ Z6 ^ Z7 ^ Z8;
  116|    246|}
camellia.cpp:_ZN5Botan12_GLOBAL__N_110Camellia_F12key_scheduleERNSt3__16vectorImNS_16secure_allocatorImEEEENS2_4spanIKhLm18446744073709551615EEE:
  263|     41|void key_schedule(secure_vector<uint64_t>& SK, std::span<const uint8_t> key) {
  264|     41|   prefetch_arrays(SBOX1);
  265|       |
  266|     41|   constexpr uint64_t Sigma1 = 0xA09E667F3BCC908B;
  267|     41|   constexpr uint64_t Sigma2 = 0xB67AE8584CAA73B2;
  268|     41|   constexpr uint64_t Sigma3 = 0xC6EF372FE94F82BE;
  269|     41|   constexpr uint64_t Sigma4 = 0x54FF53A5F1D36F1C;
  270|     41|   constexpr uint64_t Sigma5 = 0x10E527FADE682D1D;
  271|     41|   constexpr uint64_t Sigma6 = 0xB05688C2B3E6C1FD;
  272|       |
  273|     41|   const uint64_t KL_H = load_be<uint64_t>(key.data(), 0);
  274|     41|   const uint64_t KL_L = load_be<uint64_t>(key.data(), 1);
  275|       |
  276|     41|   const uint64_t KR_H = (key.size() >= 24) ? load_be<uint64_t>(key.data(), 2) : 0;
  ------------------
  |  Branch (276:26): [True: 25, False: 16]
  ------------------
  277|       |
  278|     41|   const uint64_t KR_L = [&]() -> uint64_t {
  279|     41|      if(key.size() == 32) {
  280|     41|         return load_be<uint64_t>(key.data(), 3);
  281|     41|      } else if(key.size() == 24) {
  282|     41|         return ~KR_H;
  283|     41|      } else {
  284|     41|         return 0;
  285|     41|      }
  286|     41|   }();
  287|       |
  288|     41|   uint64_t D1 = KL_H ^ KR_H;
  289|     41|   uint64_t D2 = KL_L ^ KR_L;
  290|     41|   D2 ^= F_1tab(D1, Sigma1);
  291|     41|   D1 ^= F_1tab(D2, Sigma2);
  292|     41|   D1 ^= KL_H;
  293|     41|   D2 ^= KL_L;
  294|     41|   D2 ^= F_1tab(D1, Sigma3);
  295|     41|   D1 ^= F_1tab(D2, Sigma4);
  296|       |
  297|     41|   const uint64_t KA_H = D1;
  298|     41|   const uint64_t KA_L = D2;
  299|       |
  300|     41|   D1 = KA_H ^ KR_H;
  301|     41|   D2 = KA_L ^ KR_L;
  302|     41|   D2 ^= F_1tab(D1, Sigma5);
  303|     41|   D1 ^= F_1tab(D2, Sigma6);
  304|       |
  305|     41|   const uint64_t KB_H = D1;
  306|     41|   const uint64_t KB_L = D2;
  307|       |
  308|     41|   if(key.size() == 16) {
  ------------------
  |  Branch (308:7): [True: 16, False: 25]
  ------------------
  309|     16|      SK.resize(26);
  310|       |
  311|     16|      SK[0] = KL_H;
  312|     16|      SK[1] = KL_L;
  313|     16|      SK[2] = KA_H;
  314|     16|      SK[3] = KA_L;
  315|     16|      SK[4] = left_rot_hi(KL_H, KL_L, 15);
  316|     16|      SK[5] = left_rot_lo(KL_H, KL_L, 15);
  317|     16|      SK[6] = left_rot_hi(KA_H, KA_L, 15);
  318|     16|      SK[7] = left_rot_lo(KA_H, KA_L, 15);
  319|     16|      SK[8] = left_rot_hi(KA_H, KA_L, 30);
  320|     16|      SK[9] = left_rot_lo(KA_H, KA_L, 30);
  321|     16|      SK[10] = left_rot_hi(KL_H, KL_L, 45);
  322|     16|      SK[11] = left_rot_lo(KL_H, KL_L, 45);
  323|     16|      SK[12] = left_rot_hi(KA_H, KA_L, 45);
  324|     16|      SK[13] = left_rot_lo(KL_H, KL_L, 60);
  325|     16|      SK[14] = left_rot_hi(KA_H, KA_L, 60);
  326|     16|      SK[15] = left_rot_lo(KA_H, KA_L, 60);
  327|     16|      SK[16] = left_rot_lo(KL_H, KL_L, 77);
  328|     16|      SK[17] = left_rot_hi(KL_H, KL_L, 77);
  329|     16|      SK[18] = left_rot_lo(KL_H, KL_L, 94);
  330|     16|      SK[19] = left_rot_hi(KL_H, KL_L, 94);
  331|     16|      SK[20] = left_rot_lo(KA_H, KA_L, 94);
  332|     16|      SK[21] = left_rot_hi(KA_H, KA_L, 94);
  333|     16|      SK[22] = left_rot_lo(KL_H, KL_L, 111);
  334|     16|      SK[23] = left_rot_hi(KL_H, KL_L, 111);
  335|     16|      SK[24] = left_rot_lo(KA_H, KA_L, 111);
  336|     16|      SK[25] = left_rot_hi(KA_H, KA_L, 111);
  337|     25|   } else {
  338|     25|      SK.resize(34);
  339|       |
  340|     25|      SK[0] = KL_H;
  341|     25|      SK[1] = KL_L;
  342|     25|      SK[2] = KB_H;
  343|     25|      SK[3] = KB_L;
  344|       |
  345|     25|      SK[4] = left_rot_hi(KR_H, KR_L, 15);
  346|     25|      SK[5] = left_rot_lo(KR_H, KR_L, 15);
  347|     25|      SK[6] = left_rot_hi(KA_H, KA_L, 15);
  348|     25|      SK[7] = left_rot_lo(KA_H, KA_L, 15);
  349|       |
  350|     25|      SK[8] = left_rot_hi(KR_H, KR_L, 30);
  351|     25|      SK[9] = left_rot_lo(KR_H, KR_L, 30);
  352|     25|      SK[10] = left_rot_hi(KB_H, KB_L, 30);
  353|     25|      SK[11] = left_rot_lo(KB_H, KB_L, 30);
  354|       |
  355|     25|      SK[12] = left_rot_hi(KL_H, KL_L, 45);
  356|     25|      SK[13] = left_rot_lo(KL_H, KL_L, 45);
  357|     25|      SK[14] = left_rot_hi(KA_H, KA_L, 45);
  358|     25|      SK[15] = left_rot_lo(KA_H, KA_L, 45);
  359|       |
  360|     25|      SK[16] = left_rot_hi(KL_H, KL_L, 60);
  361|     25|      SK[17] = left_rot_lo(KL_H, KL_L, 60);
  362|     25|      SK[18] = left_rot_hi(KR_H, KR_L, 60);
  363|     25|      SK[19] = left_rot_lo(KR_H, KR_L, 60);
  364|     25|      SK[20] = left_rot_hi(KB_H, KB_L, 60);
  365|     25|      SK[21] = left_rot_lo(KB_H, KB_L, 60);
  366|       |
  367|     25|      SK[22] = left_rot_lo(KL_H, KL_L, 77);
  368|     25|      SK[23] = left_rot_hi(KL_H, KL_L, 77);
  369|     25|      SK[24] = left_rot_lo(KA_H, KA_L, 77);
  370|     25|      SK[25] = left_rot_hi(KA_H, KA_L, 77);
  371|       |
  372|     25|      SK[26] = left_rot_lo(KR_H, KR_L, 94);
  373|     25|      SK[27] = left_rot_hi(KR_H, KR_L, 94);
  374|     25|      SK[28] = left_rot_lo(KA_H, KA_L, 94);
  375|     25|      SK[29] = left_rot_hi(KA_H, KA_L, 94);
  376|     25|      SK[30] = left_rot_lo(KL_H, KL_L, 111);
  377|     25|      SK[31] = left_rot_hi(KL_H, KL_L, 111);
  378|     25|      SK[32] = left_rot_lo(KB_H, KB_L, 111);
  379|     25|      SK[33] = left_rot_hi(KB_H, KB_L, 111);
  380|     25|   }
  381|     41|}
camellia.cpp:_ZZN5Botan12_GLOBAL__N_110Camellia_F12key_scheduleERNSt3__16vectorImNS_16secure_allocatorImEEEENS2_4spanIKhLm18446744073709551615EEEENK3$_0clEv:
  278|     41|   const uint64_t KR_L = [&]() -> uint64_t {
  279|     41|      if(key.size() == 32) {
  ------------------
  |  Branch (279:10): [True: 25, False: 16]
  ------------------
  280|     25|         return load_be<uint64_t>(key.data(), 3);
  281|     25|      } else if(key.size() == 24) {
  ------------------
  |  Branch (281:17): [True: 0, False: 16]
  ------------------
  282|      0|         return ~KR_H;
  283|     16|      } else {
  284|     16|         return 0;
  285|     16|      }
  286|     41|   }();
camellia.cpp:_ZN5Botan12_GLOBAL__N_110Camellia_F6F_1tabEmm:
  131|    246|uint64_t F_1tab(uint64_t v, uint64_t K) {
  132|    246|   const uint64_t x = v ^ K;
  133|       |
  134|    246|   return P(SBOX1[get_byte<0>(x)],
  135|    246|            rotl<1>(SBOX1[get_byte<1>(x)]),
  136|    246|            rotl<7>(SBOX1[get_byte<2>(x)]),
  137|    246|            SBOX1[rotl<1>(get_byte<3>(x))],
  138|    246|            rotl<1>(SBOX1[get_byte<4>(x)]),
  139|    246|            rotl<7>(SBOX1[get_byte<5>(x)]),
  140|    246|            SBOX1[rotl<1>(get_byte<6>(x))],
  141|    246|            SBOX1[get_byte<7>(x)]);
  142|    246|}
camellia.cpp:_ZN5Botan12_GLOBAL__N_110Camellia_F11left_rot_hiEmmm:
  246|    551|inline uint64_t left_rot_hi(uint64_t h, uint64_t l, size_t shift) {
  247|    551|   if(shift >= 64) {
  ------------------
  |  Branch (247:7): [True: 230, False: 321]
  ------------------
  248|    230|      shift -= 64;
  249|    230|   }
  250|    551|   return (h << shift) | (l >> (64 - shift));
  251|    551|}
camellia.cpp:_ZN5Botan12_GLOBAL__N_110Camellia_F11left_rot_loEmmm:
  253|    551|inline uint64_t left_rot_lo(uint64_t h, uint64_t l, size_t shift) {
  254|    551|   if(shift >= 64) {
  ------------------
  |  Branch (254:7): [True: 230, False: 321]
  ------------------
  255|    230|      shift -= 64;
  256|    230|   }
  257|    551|   return (h >> (64 - shift)) | (l << shift);
  258|    551|}
camellia.cpp:_ZN5Botan12_GLOBAL__N_110Camellia_F11parallelismEv:
  405|     82|size_t parallelism() {
  406|     82|#if defined(BOTAN_HAS_CAMELLIA_AVX512_GFNI)
  407|     82|   if(CPUID::has(CPUID::Feature::AVX512, CPUID::Feature::GFNI)) {
  ------------------
  |  Branch (407:7): [True: 0, False: 82]
  ------------------
  408|      0|      return 16;
  409|      0|   }
  410|     82|#endif
  411|       |
  412|     82|#if defined(BOTAN_HAS_CAMELLIA_AVX2_GFNI)
  413|     82|   if(CPUID::has(CPUID::Feature::GFNI)) {
  ------------------
  |  Branch (413:7): [True: 0, False: 82]
  ------------------
  414|      0|      return 4;
  415|      0|   }
  416|     82|#endif
  417|       |
  418|     82|#if defined(BOTAN_HAS_CAMELLIA_HWAES)
  419|     82|   if(CPUID::has(CPUID::Feature::HW_AES)) {
  ------------------
  |  Branch (419:7): [True: 82, False: 0]
  ------------------
  420|     82|      return 2;
  421|     82|   }
  422|      0|#endif
  423|       |
  424|      0|   return 1;
  425|     82|}

_ZN5Botan12Camellia_12813hwaes_encryptEPKhPhmNSt3__14spanIKmLm18446744073709551615EEE:
  315|    199|                                                    std::span<const uint64_t> SK) {
  316|    995|   while(blocks >= 2) {
  ------------------
  |  Branch (316:10): [True: 796, False: 199]
  ------------------
  317|    796|      Camellia_HWAES::camellia_encrypt_x2_18r(in, out, SK);
  318|    796|      in += 2 * 16;
  319|    796|      out += 2 * 16;
  320|    796|      blocks -= 2;
  321|    796|   }
  322|       |
  323|    199|   if(blocks > 0) {
  ------------------
  |  Branch (323:7): [True: 0, False: 199]
  ------------------
  324|      0|      uint8_t ibuf[2 * 16] = {0};
  325|      0|      uint8_t obuf[2 * 16] = {0};
  326|      0|      copy_mem(ibuf, in, 16);
  327|      0|      Camellia_HWAES::camellia_encrypt_x2_18r(ibuf, obuf, SK);
  328|      0|      copy_mem(out, obuf, 16);
  329|      0|   }
  330|    199|}
_ZN5Botan12Camellia_25613hwaes_encryptEPKhPhmNSt3__14spanIKmLm18446744073709551615EEE:
  399|    288|                                                    std::span<const uint64_t> SK) {
  400|  1.44k|   while(blocks >= 2) {
  ------------------
  |  Branch (400:10): [True: 1.15k, False: 288]
  ------------------
  401|  1.15k|      Camellia_HWAES::camellia_encrypt_x2_24r(in, out, SK);
  402|  1.15k|      in += 2 * 16;
  403|  1.15k|      out += 2 * 16;
  404|  1.15k|      blocks -= 2;
  405|  1.15k|   }
  406|       |
  407|    288|   if(blocks > 0) {
  ------------------
  |  Branch (407:7): [True: 0, False: 288]
  ------------------
  408|      0|      uint8_t ibuf[2 * 16] = {0};
  409|      0|      uint8_t obuf[2 * 16] = {0};
  410|      0|      copy_mem(ibuf, in, 16);
  411|      0|      Camellia_HWAES::camellia_encrypt_x2_24r(ibuf, obuf, SK);
  412|      0|      copy_mem(out, obuf, 16);
  413|      0|   }
  414|    288|}
camellia_hwaes.cpp:_ZN5Botan14Camellia_HWAES12_GLOBAL__N_123camellia_encrypt_x2_18rEPKhPhNSt3__14spanIKmLm18446744073709551615EEE:
  213|    796|BOTAN_FN_ISA_HWAES void camellia_encrypt_x2_18r(const uint8_t in[], uint8_t out[], std::span<const uint64_t> SK) {
  214|    796|   SIMD_4x32 L;
  215|    796|   SIMD_4x32 R;
  216|    796|   load_and_deinterleave(in, L, R);
  217|       |
  218|    796|   L ^= splat64(SK[0]);
  219|    796|   R ^= splat64(SK[1]);
  220|       |
  221|    796|   six_e_rounds(L, R, &SK[2]);
  222|    796|   L = FL_2(L, SK[8]);
  223|    796|   R = FLINV_2(R, SK[9]);
  224|    796|   six_e_rounds(L, R, &SK[10]);
  225|    796|   L = FL_2(L, SK[16]);
  226|    796|   R = FLINV_2(R, SK[17]);
  227|    796|   six_e_rounds(L, R, &SK[18]);
  228|       |
  229|    796|   R ^= splat64(SK[24]);
  230|    796|   L ^= splat64(SK[25]);
  231|       |
  232|    796|   interleave_and_store(out, L, R);
  233|    796|}
camellia_hwaes.cpp:_ZN5Botan14Camellia_HWAES12_GLOBAL__N_121load_and_deinterleaveEPKhRNS_9SIMD_4x32ES5_:
  178|  1.94k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES void load_and_deinterleave(const uint8_t in[], SIMD_4x32& L, SIMD_4x32& R) {
  179|  1.94k|   auto A = load_be64(in);       // block 0: [L0, R0]
  180|  1.94k|   auto B = load_be64(in + 16);  // block 1: [L1, R1]
  181|  1.94k|   const auto mask_upper = SIMD_4x32(0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF);
  182|  1.94k|   L = SIMD_4x32::byte_blend(mask_upper, B.swap_halves(), A);  // [L0, L1]
  183|  1.94k|   R = SIMD_4x32::byte_blend(mask_upper, B, A.swap_halves());  // [R0, R1]
  184|  1.94k|}
camellia_hwaes.cpp:_ZN5Botan14Camellia_HWAES12_GLOBAL__N_19load_be64EPKh:
   20|  3.89k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES SIMD_4x32 load_be64(const uint8_t* in) {
   21|  3.89k|   const auto bswap64 = SIMD_4x32(0x04050607, 0x00010203, 0x0C0D0E0F, 0x08090A0B);
   22|  3.89k|   return SIMD_4x32::byte_shuffle(SIMD_4x32::load_le(in), bswap64);
   23|  3.89k|}
camellia_hwaes.cpp:_ZN5Botan14Camellia_HWAES12_GLOBAL__N_17splat64Em:
   30|  49.7k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES SIMD_4x32 splat64(uint64_t v) {
   31|  49.7k|   const uint32_t lo = static_cast<uint32_t>(v);
   32|  49.7k|   const uint32_t hi = static_cast<uint32_t>(v >> 32);
   33|  49.7k|   return SIMD_4x32(lo, hi, lo, hi);
   34|  49.7k|}
camellia_hwaes.cpp:_ZN5Botan14Camellia_HWAES12_GLOBAL__N_112six_e_roundsERNS_9SIMD_4x32ES3_PKm:
  195|  6.99k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES void six_e_rounds(SIMD_4x32& L, SIMD_4x32& R, const uint64_t SK[]) {
  196|  6.99k|   R ^= camellia_f(L ^ splat64(SK[0]));
  197|  6.99k|   L ^= camellia_f(R ^ splat64(SK[1]));
  198|  6.99k|   R ^= camellia_f(L ^ splat64(SK[2]));
  199|  6.99k|   L ^= camellia_f(R ^ splat64(SK[3]));
  200|  6.99k|   R ^= camellia_f(L ^ splat64(SK[4]));
  201|  6.99k|   L ^= camellia_f(R ^ splat64(SK[5]));
  202|  6.99k|}
camellia_hwaes.cpp:_ZN5Botan14Camellia_HWAES12_GLOBAL__N_110camellia_fENS_9SIMD_4x32E:
   37|  41.9k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES SIMD_4x32 camellia_f(SIMD_4x32 x) {
   38|       |   // Pre-affine shared by S1/S2/S3
   39|  41.9k|   constexpr uint64_t pre123_a = gfni_matrix(R"(
   40|  41.9k|      1 1 1 0 1 1 0 1
   41|  41.9k|      0 0 1 1 0 0 1 0
   42|  41.9k|      1 1 0 1 0 0 0 0
   43|  41.9k|      1 0 1 1 0 0 1 1
   44|  41.9k|      0 0 0 0 1 1 0 0
   45|  41.9k|      1 0 1 0 0 1 0 0
   46|  41.9k|      0 0 1 0 1 1 0 0
   47|  41.9k|      1 0 0 0 0 1 1 0)");
   48|       |
   49|       |   // Pre-affine for S4
   50|  41.9k|   constexpr uint64_t pre4_a = gfni_matrix(R"(
   51|  41.9k|      1 1 0 1 1 0 1 1
   52|  41.9k|      0 1 1 0 0 1 0 0
   53|  41.9k|      1 0 1 0 0 0 0 1
   54|  41.9k|      0 1 1 0 0 1 1 1
   55|  41.9k|      0 0 0 1 1 0 0 0
   56|  41.9k|      0 1 0 0 1 0 0 1
   57|  41.9k|      0 1 0 1 1 0 0 0
   58|  41.9k|      0 0 0 0 1 1 0 1)");
   59|       |
   60|  41.9k|   constexpr uint8_t pre_c = 0x45;
   61|       |
   62|       |   // Post-affine for S1 and S4
   63|  41.9k|   constexpr uint64_t post14_a = gfni_matrix(R"(
   64|  41.9k|      0 0 0 0 0 0 0 1
   65|  41.9k|      0 1 1 0 0 1 1 0
   66|  41.9k|      1 0 1 1 1 1 1 0
   67|  41.9k|      0 0 0 1 1 0 1 1
   68|  41.9k|      1 0 0 0 1 1 1 0
   69|  41.9k|      0 1 0 1 1 1 1 0
   70|  41.9k|      0 1 1 1 1 1 1 1
   71|  41.9k|      0 0 0 1 1 1 0 0)");
   72|  41.9k|   constexpr uint8_t post14_c = 0x6E;
   73|       |
   74|       |   // Post-affine for S2
   75|  41.9k|   constexpr uint64_t post2_a = gfni_matrix(R"(
   76|  41.9k|      0 0 0 1 1 1 0 0
   77|  41.9k|      0 0 0 0 0 0 0 1
   78|  41.9k|      0 1 1 0 0 1 1 0
   79|  41.9k|      1 0 1 1 1 1 1 0
   80|  41.9k|      0 0 0 1 1 0 1 1
   81|  41.9k|      1 0 0 0 1 1 1 0
   82|  41.9k|      0 1 0 1 1 1 1 0
   83|  41.9k|      0 1 1 1 1 1 1 1)");
   84|  41.9k|   constexpr uint8_t post2_c = 0xDC;
   85|       |
   86|       |   // Post-affine for S3
   87|  41.9k|   constexpr uint64_t post3_a = gfni_matrix(R"(
   88|  41.9k|      0 1 1 0 0 1 1 0
   89|  41.9k|      1 0 1 1 1 1 1 0
   90|  41.9k|      0 0 0 1 1 0 1 1
   91|  41.9k|      1 0 0 0 1 1 1 0
   92|  41.9k|      0 1 0 1 1 1 1 0
   93|  41.9k|      0 1 1 1 1 1 1 1
   94|  41.9k|      0 0 0 1 1 1 0 0
   95|  41.9k|      0 0 0 0 0 0 0 1)");
   96|  41.9k|   constexpr uint8_t post3_c = 0x37;
   97|       |
   98|  41.9k|   constexpr auto PRE123 = Gf2AffineTransformation(pre123_a, pre_c);
   99|  41.9k|   constexpr auto PRE4 = Gf2AffineTransformation(pre4_a, pre_c);
  100|  41.9k|   constexpr auto POST14 = Gf2AffineTransformation::post_sbox(post14_a, post14_c);
  101|  41.9k|   constexpr auto POST2 = Gf2AffineTransformation::post_sbox(post2_a, post2_c);
  102|  41.9k|   constexpr auto POST3 = Gf2AffineTransformation::post_sbox(post3_a, post3_c);
  103|       |
  104|  41.9k|   const auto mask_s2 = SIMD_4x32(0xFF000000, 0x00FF0000, 0xFF000000, 0x00FF0000);
  105|  41.9k|   const auto mask_s3 = SIMD_4x32(0x00FF0000, 0x0000FF00, 0x00FF0000, 0x0000FF00);
  106|  41.9k|   const auto mask_s4 = SIMD_4x32(0x0000FF00, 0x000000FF, 0x0000FF00, 0x000000FF);
  107|       |
  108|  41.9k|   const auto pre123 = PRE123.affine_transform(x);
  109|  41.9k|   const auto pre4 = PRE4.affine_transform(x);
  110|       |
  111|  41.9k|   const auto sub = hw_aes_sbox(SIMD_4x32::byte_blend(mask_s4, pre4, pre123));
  112|       |
  113|  41.9k|   const auto s14 = POST14.affine_transform(sub);
  114|  41.9k|   const auto s2 = POST2.affine_transform(sub);
  115|  41.9k|   const auto s3 = POST3.affine_transform(sub);
  116|       |
  117|       |   // Final merged Sbox output for all bytes
  118|  41.9k|   const auto sbox = SIMD_4x32::byte_blend(mask_s3, s3, SIMD_4x32::byte_blend(mask_s2, s2, s14));
  119|       |
  120|       |   // The linear mixing step
  121|  41.9k|   const auto P1 = SIMD_4x32(0x00000001, 0x00000001, 0x08080809, 0x08080809);
  122|  41.9k|   const auto P2 = SIMD_4x32(0x01010202, 0x01010202, 0x09090A0A, 0x09090A0A);
  123|  41.9k|   const auto P3 = SIMD_4x32(0x02030303, 0x02030303, 0x0A0B0B0B, 0x0A0B0B0B);
  124|  41.9k|   const auto P4 = SIMD_4x32(0x06050404, 0x04040504, 0x0E0D0C0C, 0x0C0C0D0C);
  125|  41.9k|   const auto P5 = SIMD_4x32(0x07060507, 0x05060605, 0x0F0E0D0F, 0x0D0E0E0D);
  126|  41.9k|   const auto P6 = SIMD_4x32(0xFFFFFFFF, 0x07070706, 0xFFFFFFFF, 0x0F0F0F0E);
  127|       |
  128|  41.9k|   const auto sxp1 = SIMD_4x32::byte_shuffle(sbox, P1);
  129|  41.9k|   const auto sxp2 = SIMD_4x32::byte_shuffle(sbox, P2);
  130|  41.9k|   const auto sxp3 = SIMD_4x32::byte_shuffle(sbox, P3);
  131|  41.9k|   const auto sxp4 = SIMD_4x32::byte_shuffle(sbox, P4);
  132|  41.9k|   const auto sxp5 = SIMD_4x32::byte_shuffle(sbox, P5);
  133|  41.9k|   const auto sxp6 = SIMD_4x32::byte_shuffle(sbox, P6);
  134|       |
  135|  41.9k|   return (sxp1 ^ sxp2 ^ sxp3 ^ sxp4 ^ sxp5 ^ sxp6);
  136|  41.9k|}
camellia_hwaes.cpp:_ZN5Botan14Camellia_HWAES12_GLOBAL__N_14FL_2ENS_9SIMD_4x32Em:
  142|  5.04k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES SIMD_4x32 FL_2(SIMD_4x32 v, uint64_t K) {
  143|  5.04k|   const uint32_t k1 = static_cast<uint32_t>(K >> 32);
  144|  5.04k|   const uint32_t k2 = static_cast<uint32_t>(K);
  145|       |
  146|       |   // Broadcast upper/lower 32-bit halves of each 64-bit element
  147|  5.04k|   const auto shuf_hi = SIMD_4x32(0x07060504, 0x07060504, 0x0F0E0D0C, 0x0F0E0D0C);
  148|  5.04k|   const auto shuf_lo = SIMD_4x32(0x03020100, 0x03020100, 0x0B0A0908, 0x0B0A0908);
  149|       |
  150|  5.04k|   auto x1 = SIMD_4x32::byte_shuffle(v, shuf_hi);
  151|  5.04k|   auto x2 = SIMD_4x32::byte_shuffle(v, shuf_lo);
  152|       |
  153|  5.04k|   x2 ^= (x1 & SIMD_4x32::splat(k1)).rotl<1>();
  154|  5.04k|   x1 ^= x2 | SIMD_4x32::splat(k2);
  155|       |
  156|       |   // Recombine: lo from x2, hi from x1
  157|  5.04k|   const auto mask_hi = SIMD_4x32(0x00000000, 0xFFFFFFFF, 0x00000000, 0xFFFFFFFF);
  158|  5.04k|   return SIMD_4x32::byte_blend(mask_hi, x1, x2);
  159|  5.04k|}
camellia_hwaes.cpp:_ZN5Botan14Camellia_HWAES12_GLOBAL__N_17FLINV_2ENS_9SIMD_4x32Em:
  161|  5.04k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES SIMD_4x32 FLINV_2(SIMD_4x32 v, uint64_t K) {
  162|  5.04k|   const uint32_t k1 = static_cast<uint32_t>(K >> 32);
  163|  5.04k|   const uint32_t k2 = static_cast<uint32_t>(K);
  164|       |
  165|  5.04k|   const auto shuf_hi = SIMD_4x32(0x07060504, 0x07060504, 0x0F0E0D0C, 0x0F0E0D0C);
  166|  5.04k|   const auto shuf_lo = SIMD_4x32(0x03020100, 0x03020100, 0x0B0A0908, 0x0B0A0908);
  167|       |
  168|  5.04k|   auto x1 = SIMD_4x32::byte_shuffle(v, shuf_hi);
  169|  5.04k|   auto x2 = SIMD_4x32::byte_shuffle(v, shuf_lo);
  170|       |
  171|  5.04k|   x1 ^= x2 | SIMD_4x32::splat(k2);
  172|  5.04k|   x2 ^= (x1 & SIMD_4x32::splat(k1)).rotl<1>();
  173|       |
  174|  5.04k|   const auto mask_hi = SIMD_4x32(0x00000000, 0xFFFFFFFF, 0x00000000, 0xFFFFFFFF);
  175|  5.04k|   return SIMD_4x32::byte_blend(mask_hi, x1, x2);
  176|  5.04k|}
camellia_hwaes.cpp:_ZN5Botan14Camellia_HWAES12_GLOBAL__N_120interleave_and_storeEPhNS_9SIMD_4x32ES3_:
  186|  1.94k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES void interleave_and_store(uint8_t out[], SIMD_4x32 L, SIMD_4x32 R) {
  187|       |   // Camellia output swaps L and R
  188|  1.94k|   const auto mask_upper = SIMD_4x32(0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF);
  189|  1.94k|   auto A = SIMD_4x32::byte_blend(mask_upper, L.swap_halves(), R);  // [R0, L0]
  190|  1.94k|   auto B = SIMD_4x32::byte_blend(mask_upper, L, R.swap_halves());  // [R1, L1]
  191|  1.94k|   store_be64(out, A);
  192|  1.94k|   store_be64(out + 16, B);
  193|  1.94k|}
camellia_hwaes.cpp:_ZN5Botan14Camellia_HWAES12_GLOBAL__N_110store_be64EPhNS_9SIMD_4x32E:
   25|  3.89k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_HWAES void store_be64(uint8_t* out, SIMD_4x32 v) {
   26|  3.89k|   const auto bswap64 = SIMD_4x32(0x04050607, 0x00010203, 0x0C0D0E0F, 0x08090A0B);
   27|  3.89k|   SIMD_4x32::byte_shuffle(v, bswap64).store_le(out);
   28|  3.89k|}
camellia_hwaes.cpp:_ZN5Botan14Camellia_HWAES12_GLOBAL__N_123camellia_encrypt_x2_24rEPKhPhNSt3__14spanIKmLm18446744073709551615EEE:
  257|  1.15k|BOTAN_FN_ISA_HWAES void camellia_encrypt_x2_24r(const uint8_t in[], uint8_t out[], std::span<const uint64_t> SK) {
  258|  1.15k|   SIMD_4x32 L;
  259|  1.15k|   SIMD_4x32 R;
  260|  1.15k|   load_and_deinterleave(in, L, R);
  261|       |
  262|  1.15k|   L ^= splat64(SK[0]);
  263|  1.15k|   R ^= splat64(SK[1]);
  264|       |
  265|  1.15k|   six_e_rounds(L, R, &SK[2]);
  266|  1.15k|   L = FL_2(L, SK[8]);
  267|  1.15k|   R = FLINV_2(R, SK[9]);
  268|  1.15k|   six_e_rounds(L, R, &SK[10]);
  269|  1.15k|   L = FL_2(L, SK[16]);
  270|  1.15k|   R = FLINV_2(R, SK[17]);
  271|  1.15k|   six_e_rounds(L, R, &SK[18]);
  272|  1.15k|   L = FL_2(L, SK[24]);
  273|  1.15k|   R = FLINV_2(R, SK[25]);
  274|  1.15k|   six_e_rounds(L, R, &SK[26]);
  275|       |
  276|  1.15k|   R ^= splat64(SK[32]);
  277|  1.15k|   L ^= splat64(SK[33]);
  278|       |
  279|  1.15k|   interleave_and_store(out, L, R);
  280|  1.15k|}

_ZNK5Botan9TripleDES9encrypt_nEPKhPhm:
  769|    150|void TripleDES::encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const {
  770|    150|   assert_key_material_set();
  771|       |
  772|    150|   const uint32_t* k1 = m_round_key.data();
  773|    150|   const uint32_t* k2 = k1 + 16 * 48;
  774|    150|   const uint32_t* k3 = k2 + 16 * 48;
  775|       |
  776|    150|   uint32_t B[64];
  777|       |
  778|    150|   while(blocks >= 32) {
  ------------------
  |  Branch (778:10): [True: 0, False: 150]
  ------------------
  779|      0|      transpose_in(B, in, 32);
  780|      0|      des_encrypt(&B[0], &B[32], k1);
  781|      0|      des_decrypt(&B[32], &B[0], k2);
  782|      0|      des_encrypt(&B[0], &B[32], k3);
  783|      0|      transpose_out(out, B, 32);
  784|       |
  785|      0|      in += 32 * BLOCK_SIZE;
  786|      0|      out += 32 * BLOCK_SIZE;
  787|      0|      blocks -= 32;
  788|      0|   }
  789|       |
  790|    150|   if(blocks > 0) {
  ------------------
  |  Branch (790:7): [True: 150, False: 0]
  ------------------
  791|    150|      transpose_in(B, in, blocks);
  792|    150|      des_encrypt(&B[0], &B[32], k1);
  793|    150|      des_decrypt(&B[32], &B[0], k2);
  794|    150|      des_encrypt(&B[0], &B[32], k3);
  795|    150|      transpose_out(out, B, blocks);
  796|    150|   }
  797|    150|}
_ZNK5Botan9TripleDES9decrypt_nEPKhPhm:
  802|    115|void TripleDES::decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const {
  803|    115|   assert_key_material_set();
  804|       |
  805|    115|   const uint32_t* k1 = m_round_key.data();
  806|    115|   const uint32_t* k2 = k1 + 16 * 48;
  807|    115|   const uint32_t* k3 = k2 + 16 * 48;
  808|       |
  809|    115|   uint32_t B[64];
  810|       |
  811|    439|   while(blocks >= 32) {
  ------------------
  |  Branch (811:10): [True: 324, False: 115]
  ------------------
  812|    324|      transpose_in(B, in, 32);
  813|    324|      des_decrypt(&B[0], &B[32], k3);
  814|    324|      des_encrypt(&B[32], &B[0], k2);
  815|    324|      des_decrypt(&B[0], &B[32], k1);
  816|    324|      transpose_out(out, B, 32);
  817|       |
  818|    324|      in += 32 * BLOCK_SIZE;
  819|    324|      out += 32 * BLOCK_SIZE;
  820|    324|      blocks -= 32;
  821|    324|   }
  822|       |
  823|    115|   if(blocks > 0) {
  ------------------
  |  Branch (823:7): [True: 45, False: 70]
  ------------------
  824|     45|      transpose_in(B, in, blocks);
  825|     45|      des_decrypt(&B[0], &B[32], k3);
  826|     45|      des_encrypt(&B[32], &B[0], k2);
  827|     45|      des_decrypt(&B[0], &B[32], k1);
  828|     45|      transpose_out(out, B, blocks);
  829|     45|   }
  830|    115|}
_ZNK5Botan9TripleDES19has_keying_materialEv:
  832|    265|bool TripleDES::has_keying_material() const {
  833|    265|   return !m_round_key.empty();
  834|    265|}
_ZN5Botan9TripleDES12key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
  839|     86|void TripleDES::key_schedule(std::span<const uint8_t> key) {
  840|     86|   m_round_key.resize(3 * 16 * 48);
  841|     86|   des_key_schedule(m_round_key.data(), key.first(8).data());
  842|     86|   des_key_schedule(m_round_key.data() + 16 * 48, key.subspan(8, 8).data());
  843|       |
  844|     86|   if(key.size() == 24) {
  ------------------
  |  Branch (844:7): [True: 86, False: 0]
  ------------------
  845|     86|      des_key_schedule(m_round_key.data() + 2 * 16 * 48, key.last(8).data());
  846|     86|   } else {
  847|      0|      copy_mem(m_round_key.data() + 2 * 16 * 48, m_round_key.data(), 16 * 48);
  848|      0|   }
  849|     86|}
des.cpp:_ZN5Botan12_GLOBAL__N_112transpose_inEPjPKhm:
  537|    519|void transpose_in(uint32_t B[64], const uint8_t in[], size_t n_blocks) {
  538|    519|   uint64_t M[32] = {};
  539|       |
  540|    519|   load_be<uint64_t>(M, in, n_blocks);
  541|       |
  542|    519|   des_transpose(M);
  543|       |
  544|       |   // clang-format off
  545|    519|   static constexpr uint8_t IP[64] = {
  546|    519|      57, 49, 41, 33, 25, 17, 9,  1,
  547|    519|      59, 51, 43, 35, 27, 19, 11, 3,
  548|    519|      61, 53, 45, 37, 29, 21, 13, 5,
  549|    519|      63, 55, 47, 39, 31, 23, 15, 7,
  550|    519|      56, 48, 40, 32, 24, 16, 8,  0,
  551|    519|      58, 50, 42, 34, 26, 18, 10, 2,
  552|    519|      60, 52, 44, 36, 28, 20, 12, 4,
  553|    519|      62, 54, 46, 38, 30, 22, 14, 6
  554|    519|   };
  555|       |   // clang-format on
  556|       |
  557|  33.7k|   for(size_t i = 0; i < 64; ++i) {
  ------------------
  |  Branch (557:22): [True: 33.2k, False: 519]
  ------------------
  558|  33.2k|      const uint8_t src = IP[i];
  559|  33.2k|      if(src < 32) {
  ------------------
  |  Branch (559:10): [True: 16.6k, False: 16.6k]
  ------------------
  560|  16.6k|         B[i] = static_cast<uint32_t>(M[31 - src] >> 32);
  561|  16.6k|      } else {
  562|  16.6k|         B[i] = static_cast<uint32_t>(M[63 - src]);
  563|  16.6k|      }
  564|  33.2k|   }
  565|    519|}
des.cpp:_ZN5Botan12_GLOBAL__N_113des_transposeEPm:
  509|  1.03k|void des_transpose(uint64_t M[32]) {
  510|  17.6k|   for(size_t i = 0; i != 16; ++i) {
  ------------------
  |  Branch (510:22): [True: 16.6k, False: 1.03k]
  ------------------
  511|  16.6k|      swap_bits<uint64_t>(M[i], M[i + 16], 0x0000FFFF0000FFFF, 16);
  512|  16.6k|   }
  513|       |
  514|  3.11k|   for(size_t i = 0; i != 32; i += 16) {
  ------------------
  |  Branch (514:22): [True: 2.07k, False: 1.03k]
  ------------------
  515|  18.6k|      for(size_t j = 0; j != 8; ++j) {
  ------------------
  |  Branch (515:25): [True: 16.6k, False: 2.07k]
  ------------------
  516|  16.6k|         swap_bits<uint64_t>(M[i + j], M[i + j + 8], 0x00FF00FF00FF00FF, 8);
  517|  16.6k|      }
  518|  2.07k|   }
  519|       |
  520|  5.19k|   for(size_t i = 0; i != 32; i += 8) {
  ------------------
  |  Branch (520:22): [True: 4.15k, False: 1.03k]
  ------------------
  521|  20.7k|      for(size_t j = 0; j != 4; ++j) {
  ------------------
  |  Branch (521:25): [True: 16.6k, False: 4.15k]
  ------------------
  522|  16.6k|         swap_bits<uint64_t>(M[i + j + 0], M[i + j + 4], 0x0F0F0F0F0F0F0F0F, 4);
  523|  16.6k|      }
  524|  4.15k|   }
  525|       |
  526|  9.34k|   for(size_t i = 0; i != 32; i += 4) {
  ------------------
  |  Branch (526:22): [True: 8.30k, False: 1.03k]
  ------------------
  527|  24.9k|      for(size_t j = 0; j != 2; ++j) {
  ------------------
  |  Branch (527:25): [True: 16.6k, False: 8.30k]
  ------------------
  528|  16.6k|         swap_bits<uint64_t>(M[i + j + 0], M[i + j + 2], 0x3333333333333333, 2);
  529|  16.6k|      }
  530|  8.30k|   }
  531|       |
  532|  17.6k|   for(size_t i = 0; i != 32; i += 2) {
  ------------------
  |  Branch (532:22): [True: 16.6k, False: 1.03k]
  ------------------
  533|  16.6k|      swap_bits<uint64_t>(M[i], M[i + 1], 0x5555555555555555, 1);
  534|  16.6k|   }
  535|  1.03k|}
des.cpp:_ZN5Botan12_GLOBAL__N_111des_encryptEPjS1_PKj:
  638|    669|void des_encrypt(uint32_t L[32], uint32_t R[32], const uint32_t round_key[]) {
  639|  6.02k|   for(size_t round = 0; round < 16; round += 2) {
  ------------------
  |  Branch (639:26): [True: 5.35k, False: 669]
  ------------------
  640|  5.35k|      des_round(L, R, &round_key[round * 48]);
  641|  5.35k|      des_round(R, L, &round_key[(round + 1) * 48]);
  642|  5.35k|   }
  643|    669|}
des.cpp:_ZN5Botan12_GLOBAL__N_19des_roundEPjPKjS3_:
  602|  24.9k|void des_round(uint32_t L[32], const uint32_t R[32], const uint32_t RK[48]) {
  603|       |   // clang-format off
  604|  24.9k|   SBox1(R[31] ^ RK[ 0], R[ 0] ^ RK[ 1], R[ 1] ^ RK[ 2],
  605|  24.9k|         R[ 2] ^ RK[ 3], R[ 3] ^ RK[ 4], R[ 4] ^ RK[ 5],
  606|  24.9k|         L[ 8], L[16], L[22], L[30]);
  607|       |
  608|  24.9k|   SBox2(R[ 3] ^ RK[ 6], R[ 4] ^ RK[ 7], R[ 5] ^ RK[ 8],
  609|  24.9k|         R[ 6] ^ RK[ 9], R[ 7] ^ RK[10], R[ 8] ^ RK[11],
  610|  24.9k|         L[12], L[27], L[ 1], L[17]);
  611|       |
  612|  24.9k|   SBox3(R[ 7] ^ RK[12], R[ 8] ^ RK[13], R[ 9] ^ RK[14],
  613|  24.9k|         R[10] ^ RK[15], R[11] ^ RK[16], R[12] ^ RK[17],
  614|  24.9k|         L[23], L[15], L[29], L[ 5]);
  615|       |
  616|  24.9k|   SBox4(R[11] ^ RK[18], R[12] ^ RK[19], R[13] ^ RK[20],
  617|  24.9k|         R[14] ^ RK[21], R[15] ^ RK[22], R[16] ^ RK[23],
  618|  24.9k|         L[25], L[19], L[ 9], L[ 0]);
  619|       |
  620|  24.9k|   SBox5(R[15] ^ RK[24], R[16] ^ RK[25], R[17] ^ RK[26],
  621|  24.9k|         R[18] ^ RK[27], R[19] ^ RK[28], R[20] ^ RK[29],
  622|  24.9k|         L[ 7], L[13], L[24], L[ 2]);
  623|       |
  624|  24.9k|   SBox6(R[19] ^ RK[30], R[20] ^ RK[31], R[21] ^ RK[32],
  625|  24.9k|         R[22] ^ RK[33], R[23] ^ RK[34], R[24] ^ RK[35],
  626|  24.9k|         L[ 3], L[28], L[10], L[18]);
  627|       |
  628|  24.9k|   SBox7(R[23] ^ RK[36], R[24] ^ RK[37], R[25] ^ RK[38],
  629|  24.9k|         R[26] ^ RK[39], R[27] ^ RK[40], R[28] ^ RK[41],
  630|  24.9k|         L[31], L[11], L[21], L[ 6]);
  631|       |
  632|  24.9k|   SBox8(R[27] ^ RK[42], R[28] ^ RK[43], R[29] ^ RK[44],
  633|  24.9k|         R[30] ^ RK[45], R[31] ^ RK[46], R[ 0] ^ RK[47],
  634|  24.9k|         L[ 4], L[26], L[14], L[20]);
  635|       |   // clang-format on
  636|  24.9k|}
des.cpp:_ZN5Botan12_GLOBAL__N_15SBox1ITkNS0_9BitsliceTEjEEvT_S2_S2_S2_S2_S2_RS2_S3_S3_S3_:
   38|  24.9k|BOTAN_FORCE_INLINE void SBox1(T a1, T a2, T a3, T a4, T a5, T a6, T& out1, T& out2, T& out3, T& out4) {
   39|  24.9k|   const T x1 = a1 & ~a5;
   40|  24.9k|   const T x2 = a4 ^ x1;
   41|  24.9k|   const T x3 = a3 | a6;
   42|  24.9k|   const T x4 = a1 ^ a3;
   43|  24.9k|   const T x5 = x3 & x4;
   44|  24.9k|   const T x6 = a4 ^ x5;
   45|  24.9k|   const T x7 = x6 & ~x2;
   46|       |
   47|  24.9k|   const T x8 = a5 ^ a6;
   48|  24.9k|   const T x9 = a3 ^ x8;
   49|  24.9k|   const T x10 = x2 & ~x9;
   50|  24.9k|   const T x11 = a6 | x5;
   51|  24.9k|   const T x12 = x10 ^ x11;
   52|  24.9k|   const T x13 = x12 & ~x7;
   53|       |
   54|  24.9k|   const T x14 = a1 | a6;
   55|  24.9k|   const T x15 = x12 | x14;
   56|  24.9k|   const T x16 = a5 & ~x6;
   57|  24.9k|   const T x17 = x15 ^ x16;
   58|       |
   59|  24.9k|   const T x18 = a4 & ~x14;
   60|  24.9k|   const T x19 = x16 ^ x18;
   61|  24.9k|   const T x20 = x8 & ~x4;
   62|  24.9k|   const T x21 = x19 | x20;
   63|       |
   64|  24.9k|   const T x22 = a3 & ~x1;
   65|  24.9k|   const T x23 = x2 ^ x15;
   66|  24.9k|   const T x24 = x23 & ~x22;
   67|  24.9k|   const T x25 = ~x24;
   68|  24.9k|   const T x26 = x3 & x12;
   69|  24.9k|   const T x27 = x25 ^ x26;
   70|  24.9k|   const T x28 = x17 & ~a2;
   71|  24.9k|   const T x29 = x28 ^ x27;
   72|  24.9k|   out3 ^= x29;
   73|       |
   74|  24.9k|   const T x30 = x8 ^ x24;
   75|  24.9k|   const T x31 = x16 | x30;
   76|  24.9k|   const T x32 = x3 ^ x31;
   77|  24.9k|   const T x33 = a1 ^ x32;
   78|  24.9k|   const T x34 = x27 ^ x33;
   79|  24.9k|   const T x35 = x7 | a2;
   80|  24.9k|   const T x36 = x35 ^ x34;
   81|  24.9k|   out1 ^= x36;
   82|       |
   83|  24.9k|   const T x37 = x2 & ~x21;
   84|  24.9k|   const T x38 = x30 ^ x37;
   85|  24.9k|   const T x39 = x16 ^ x32;
   86|  24.9k|   const T x40 = x34 & ~x39;
   87|  24.9k|   const T x41 = x38 ^ x40;
   88|  24.9k|   const T x42 = a2 & ~x13;
   89|  24.9k|   const T x43 = x42 ^ x41;
   90|  24.9k|   out2 ^= x43;
   91|       |
   92|  24.9k|   const T x44 = x9 ^ x20;
   93|  24.9k|   const T x45 = x14 ^ x40;
   94|  24.9k|   const T x46 = x45 & ~x44;
   95|  24.9k|   const T x47 = x41 ^ x46;
   96|  24.9k|   const T x48 = x47 | a2;
   97|  24.9k|   const T x49 = x48 ^ x21;
   98|  24.9k|   out4 ^= x49;
   99|  24.9k|}
des.cpp:_ZN5Botan12_GLOBAL__N_15SBox2ITkNS0_9BitsliceTEjEEvT_S2_S2_S2_S2_S2_RS2_S3_S3_S3_:
  102|  24.9k|BOTAN_FORCE_INLINE void SBox2(T a1, T a2, T a3, T a4, T a5, T a6, T& out1, T& out2, T& out3, T& out4) {
  103|  24.9k|   const T x1 = a2 ^ a5;
  104|       |
  105|  24.9k|   const T x2 = a1 & ~a6;
  106|  24.9k|   const T x3 = a5 & ~x2;
  107|  24.9k|   const T x4 = a2 | x3;
  108|       |
  109|  24.9k|   const T x5 = x1 & ~a6;
  110|  24.9k|   const T x6 = a1 & x1;
  111|  24.9k|   const T x7 = a5 ^ x6;
  112|  24.9k|   const T x8 = x7 & ~x5;
  113|       |
  114|  24.9k|   const T x9 = a3 & a6;
  115|  24.9k|   const T x10 = x3 ^ x5;
  116|  24.9k|   const T x11 = x4 & x10;
  117|  24.9k|   const T x12 = x11 & ~x9;
  118|       |
  119|  24.9k|   const T x13 = a3 & x11;
  120|  24.9k|   const T x14 = ~a1;
  121|  24.9k|   const T x15 = x13 ^ x14;
  122|  24.9k|   const T x16 = a6 ^ x1;
  123|  24.9k|   const T x17 = x16 & ~x9;
  124|  24.9k|   const T x18 = x15 ^ x17;
  125|  24.9k|   const T x19 = a4 & ~x12;
  126|  24.9k|   const T x20 = x19 ^ x18;
  127|  24.9k|   out2 ^= x20;
  128|       |
  129|  24.9k|   const T x21 = a2 & ~x17;
  130|  24.9k|   const T x22 = x7 ^ x21;
  131|  24.9k|   const T x23 = x15 & ~x22;
  132|  24.9k|   const T x24 = a3 ^ x16;
  133|  24.9k|   const T x25 = x23 ^ x24;
  134|  24.9k|   const T x26 = x4 & ~a4;
  135|  24.9k|   const T x27 = x26 ^ x25;
  136|  24.9k|   out1 ^= x27;
  137|       |
  138|  24.9k|   const T x28 = a2 & ~x9;
  139|  24.9k|   const T x29 = x24 | x28;
  140|  24.9k|   const T x30 = x4 ^ x18;
  141|  24.9k|   const T x31 = x9 | x30;
  142|  24.9k|   const T x32 = x29 ^ x31;
  143|       |
  144|  24.9k|   const T x33 = x11 ^ x18;
  145|  24.9k|   const T x34 = x25 ^ x33;
  146|  24.9k|   const T x35 = x31 & x34;
  147|  24.9k|   const T x36 = x1 & x29;
  148|  24.9k|   const T x37 = x35 ^ x36;
  149|  24.9k|   const T x38 = x37 | a4;
  150|  24.9k|   const T x39 = x38 ^ x32;
  151|  24.9k|   out3 ^= x39;
  152|       |
  153|  24.9k|   const T x40 = x37 & ~x22;
  154|  24.9k|   const T x41 = x16 | x30;
  155|  24.9k|   const T x42 = x40 ^ x41;
  156|  24.9k|   const T x43 = x8 | a4;
  157|  24.9k|   const T x44 = x43 ^ x42;
  158|  24.9k|   out4 ^= x44;
  159|  24.9k|}
des.cpp:_ZN5Botan12_GLOBAL__N_15SBox3ITkNS0_9BitsliceTEjEEvT_S2_S2_S2_S2_S2_RS2_S3_S3_S3_:
  162|  24.9k|BOTAN_FORCE_INLINE void SBox3(T a1, T a2, T a3, T a4, T a5, T a6, T& out1, T& out2, T& out3, T& out4) {
  163|  24.9k|   const T x1 = a1 & ~a2;
  164|  24.9k|   const T x2 = a3 ^ a6;
  165|  24.9k|   const T x3 = x1 | x2;
  166|  24.9k|   const T x4 = a4 ^ a6;
  167|  24.9k|   const T x5 = x4 & ~a1;
  168|  24.9k|   const T x6 = x3 ^ x5;
  169|       |
  170|  24.9k|   const T x7 = a2 ^ x2;
  171|  24.9k|   const T x8 = x7 & ~a6;
  172|  24.9k|   const T x9 = x3 ^ x8;
  173|  24.9k|   const T x10 = x6 & ~x9;
  174|       |
  175|  24.9k|   const T x11 = a6 & x6;
  176|  24.9k|   const T x12 = a4 | x11;
  177|  24.9k|   const T x13 = a1 & x12;
  178|  24.9k|   const T x14 = x7 ^ x13;
  179|  24.9k|   const T x15 = x6 & ~a5;
  180|  24.9k|   const T x16 = x15 ^ x14;
  181|  24.9k|   out4 ^= x16;
  182|       |
  183|  24.9k|   const T x17 = x2 & x4;
  184|  24.9k|   const T x18 = a1 ^ a4;
  185|  24.9k|   const T x19 = x9 ^ x18;
  186|  24.9k|   const T x20 = a3 | x19;
  187|  24.9k|   const T x21 = x20 & ~x17;
  188|       |
  189|  24.9k|   const T x22 = x5 | x18;
  190|  24.9k|   const T x23 = x14 & ~x22;
  191|  24.9k|   const T x24 = a4 & a6;
  192|  24.9k|   const T x25 = x24 & ~a2;
  193|  24.9k|   const T x26 = x23 ^ x25;
  194|       |
  195|  24.9k|   const T x27 = x9 & x26;
  196|  24.9k|   const T x28 = x7 | x24;
  197|  24.9k|   const T x29 = x28 & ~x27;
  198|  24.9k|   const T x30 = a1 ^ x29;
  199|  24.9k|   const T x31 = x21 & a5;
  200|  24.9k|   const T x32 = x31 ^ x30;
  201|  24.9k|   out2 ^= x32;
  202|       |
  203|  24.9k|   const T x33 = x6 & ~a2;
  204|  24.9k|   const T x34 = x33 & ~a3;
  205|  24.9k|   const T x35 = ~x7;
  206|  24.9k|   const T x36 = x22 ^ x35;
  207|  24.9k|   const T x37 = x34 ^ x36;
  208|  24.9k|   const T x38 = a5 & ~x10;
  209|  24.9k|   const T x39 = x38 ^ x37;
  210|  24.9k|   out1 ^= x39;
  211|       |
  212|  24.9k|   const T x40 = x34 | x36;
  213|  24.9k|   const T x41 = x5 | x33;
  214|  24.9k|   const T x42 = x40 ^ x41;
  215|  24.9k|   const T x43 = a4 & ~x6;
  216|  24.9k|   const T x44 = x42 | x43;
  217|  24.9k|   const T x45 = a5 & ~x26;
  218|  24.9k|   const T x46 = x45 ^ x44;
  219|  24.9k|   out3 ^= x46;
  220|  24.9k|}
des.cpp:_ZN5Botan12_GLOBAL__N_15SBox4ITkNS0_9BitsliceTEjEEvT_S2_S2_S2_S2_S2_RS2_S3_S3_S3_:
  223|  24.9k|BOTAN_FORCE_INLINE void SBox4(T a1, T a2, T a3, T a4, T a5, T a6, T& out1, T& out2, T& out3, T& out4) {
  224|  24.9k|   const T x1 = a1 ^ a3;
  225|  24.9k|   const T x2 = a3 ^ a5;
  226|  24.9k|   const T x3 = a2 | a4;
  227|  24.9k|   const T x4 = a5 ^ x3;
  228|  24.9k|   const T x5 = x2 & ~x4;
  229|  24.9k|   const T x6 = x2 & ~a2;
  230|  24.9k|   const T x7 = a4 ^ x6;
  231|  24.9k|   const T x8 = x1 | x7;
  232|  24.9k|   const T x9 = x8 & ~x5;
  233|  24.9k|   const T x10 = a2 ^ x9;
  234|       |
  235|  24.9k|   const T x11 = x7 & x10;
  236|  24.9k|   const T x12 = x2 & ~x11;
  237|  24.9k|   const T x13 = x1 ^ x10;
  238|  24.9k|   const T x14 = x13 & ~x12;
  239|  24.9k|   const T x15 = x5 ^ x14;
  240|       |
  241|  24.9k|   const T x16 = a2 ^ a4;
  242|  24.9k|   const T x17 = a5 | x6;
  243|  24.9k|   const T x18 = x13 ^ x17;
  244|  24.9k|   const T x19 = x18 & ~x16;
  245|  24.9k|   const T x20 = x9 ^ x19;
  246|  24.9k|   const T x21 = a6 & ~x15;
  247|  24.9k|   const T x22 = x21 ^ x20;
  248|  24.9k|   out1 ^= x22;
  249|       |
  250|  24.9k|   const T x23 = ~x20;
  251|  24.9k|   const T x24 = x15 & ~a6;
  252|  24.9k|   const T x25 = x24 ^ x23;
  253|  24.9k|   out2 ^= x25;
  254|       |
  255|  24.9k|   const T x26 = x15 ^ x23;
  256|  24.9k|   const T x27 = x26 & ~x16;
  257|  24.9k|   const T x28 = x11 | x27;
  258|  24.9k|   const T x29 = x18 ^ x28;
  259|  24.9k|   const T x30 = x10 | a6;
  260|  24.9k|   const T x31 = x30 ^ x29;
  261|  24.9k|   out3 ^= x31;
  262|       |
  263|  24.9k|   const T x32 = a6 & x10;
  264|  24.9k|   const T x33 = x32 ^ x29;
  265|  24.9k|   out4 ^= x33;
  266|  24.9k|}
des.cpp:_ZN5Botan12_GLOBAL__N_15SBox5ITkNS0_9BitsliceTEjEEvT_S2_S2_S2_S2_S2_RS2_S3_S3_S3_:
  269|  24.9k|BOTAN_FORCE_INLINE void SBox5(T a1, T a2, T a3, T a4, T a5, T a6, T& out1, T& out2, T& out3, T& out4) {
  270|  24.9k|   const T x1 = a1 | a3;
  271|  24.9k|   const T x2 = x1 & ~a6;
  272|  24.9k|   const T x3 = a1 ^ x2;
  273|  24.9k|   const T x4 = a3 ^ x3;
  274|  24.9k|   const T x5 = a4 | x4;
  275|       |
  276|  24.9k|   const T x6 = x2 & ~a4;
  277|  24.9k|   const T x7 = a3 ^ x6;
  278|  24.9k|   const T x8 = a5 & x7;
  279|  24.9k|   const T x9 = a1 | x4;
  280|  24.9k|   const T x10 = x8 ^ x9;
  281|  24.9k|   const T x11 = a4 ^ x10;
  282|       |
  283|  24.9k|   const T x12 = a6 ^ x11;
  284|  24.9k|   const T x13 = x3 | x12;
  285|  24.9k|   const T x14 = a5 & x13;
  286|  24.9k|   const T x15 = x3 ^ x14;
  287|  24.9k|   const T x16 = a4 & x9;
  288|  24.9k|   const T x17 = x15 ^ x16;
  289|       |
  290|  24.9k|   const T x18 = x13 & ~a1;
  291|  24.9k|   const T x19 = x7 ^ x18;
  292|  24.9k|   const T x20 = a5 ^ x5;
  293|  24.9k|   const T x21 = x20 & ~x19;
  294|  24.9k|   const T x22 = ~x21;
  295|  24.9k|   const T x23 = x22 & ~a2;
  296|  24.9k|   const T x24 = x23 ^ x11;
  297|  24.9k|   out3 ^= x24;
  298|       |
  299|  24.9k|   const T x25 = x7 & ~x14;
  300|  24.9k|   const T x26 = x18 ^ x20;
  301|  24.9k|   const T x27 = x17 | x26;
  302|  24.9k|   const T x28 = x27 & ~x25;
  303|  24.9k|   const T x29 = x5 & ~x28;
  304|       |
  305|  24.9k|   const T x30 = x12 & x28;
  306|  24.9k|   const T x31 = x20 ^ x30;
  307|  24.9k|   const T x32 = x7 & x9;
  308|  24.9k|   const T x33 = x31 | x32;
  309|  24.9k|   const T x34 = x14 ^ x33;
  310|  24.9k|   const T x35 = x34 & a2;
  311|  24.9k|   const T x36 = x35 ^ x17;
  312|  24.9k|   out4 ^= x36;
  313|       |
  314|  24.9k|   const T x37 = x1 ^ x28;
  315|  24.9k|   const T x38 = a1 ^ x37;
  316|  24.9k|   const T x39 = a4 & x31;
  317|  24.9k|   const T x40 = x38 ^ x39;
  318|  24.9k|   const T x41 = x29 | a2;
  319|  24.9k|   const T x42 = x41 ^ x40;
  320|  24.9k|   out1 ^= x42;
  321|       |
  322|  24.9k|   const T x43 = x5 ^ x7;
  323|  24.9k|   const T x44 = x43 & ~x40;
  324|  24.9k|   const T x45 = x3 ^ x31;
  325|  24.9k|   const T x46 = x44 ^ x45;
  326|  24.9k|   const T x47 = x5 & a2;
  327|  24.9k|   const T x48 = x47 ^ x46;
  328|  24.9k|   out2 ^= x48;
  329|  24.9k|}
des.cpp:_ZN5Botan12_GLOBAL__N_15SBox6ITkNS0_9BitsliceTEjEEvT_S2_S2_S2_S2_S2_RS2_S3_S3_S3_:
  332|  24.9k|BOTAN_FORCE_INLINE void SBox6(T a1, T a2, T a3, T a4, T a5, T a6, T& out1, T& out2, T& out3, T& out4) {
  333|  24.9k|   const T x1 = a2 ^ a5;
  334|       |
  335|  24.9k|   const T x2 = a2 | a6;
  336|  24.9k|   const T x3 = a1 & x2;
  337|  24.9k|   const T x4 = x1 ^ x3;
  338|  24.9k|   const T x5 = a6 ^ x4;
  339|  24.9k|   const T x6 = a5 & ~x5;
  340|       |
  341|  24.9k|   const T x7 = a1 & x5;
  342|  24.9k|   const T x8 = a2 ^ x7;
  343|  24.9k|   const T x9 = a1 ^ a3;
  344|  24.9k|   const T x10 = x8 | x9;
  345|  24.9k|   const T x11 = x4 ^ x10;
  346|       |
  347|  24.9k|   const T x12 = a3 & x11;
  348|  24.9k|   const T x13 = x12 & ~a6;
  349|  24.9k|   const T x14 = x6 | x8;
  350|  24.9k|   const T x15 = x13 ^ x14;
  351|  24.9k|   const T x16 = x15 & a4;
  352|  24.9k|   const T x17 = x16 ^ x11;
  353|  24.9k|   out4 ^= x17;
  354|       |
  355|  24.9k|   const T x18 = a2 ^ x10;
  356|  24.9k|   const T x19 = a6 & ~x18;
  357|  24.9k|   const T x20 = a3 ^ x19;
  358|  24.9k|   const T x21 = a5 & ~x12;
  359|  24.9k|   const T x22 = x20 | x21;
  360|       |
  361|  24.9k|   const T x23 = a2 | x9;
  362|  24.9k|   const T x24 = x15 ^ x23;
  363|  24.9k|   const T x25 = x3 | x22;
  364|  24.9k|   const T x26 = x24 ^ x25;
  365|       |
  366|  24.9k|   const T x27 = a1 | x11;
  367|  24.9k|   const T x28 = x14 & x27;
  368|  24.9k|   const T x29 = x20 ^ x28;
  369|  24.9k|   const T x30 = x29 & ~x13;
  370|  24.9k|   const T x31 = x6 | a4;
  371|  24.9k|   const T x32 = x31 ^ x30;
  372|  24.9k|   out3 ^= x32;
  373|       |
  374|  24.9k|   const T x33 = x4 ^ x29;
  375|  24.9k|   const T x34 = a5 & ~x33;
  376|  24.9k|   const T x35 = ~x23;
  377|  24.9k|   const T x36 = x18 ^ x35;
  378|  24.9k|   const T x37 = x34 ^ x36;
  379|  24.9k|   const T x38 = x37 & ~a4;
  380|  24.9k|   const T x39 = x38 ^ x26;
  381|  24.9k|   out2 ^= x39;
  382|       |
  383|  24.9k|   const T x40 = a6 ^ x7;
  384|  24.9k|   const T x41 = a1 ^ x20;
  385|  24.9k|   const T x42 = x40 & x41;
  386|  24.9k|   const T x43 = x12 ^ x36;
  387|  24.9k|   const T x44 = x42 ^ x43;
  388|  24.9k|   const T x45 = x22 & ~a4;
  389|  24.9k|   const T x46 = x45 ^ x44;
  390|  24.9k|   out1 ^= x46;
  391|  24.9k|}
des.cpp:_ZN5Botan12_GLOBAL__N_15SBox7ITkNS0_9BitsliceTEjEEvT_S2_S2_S2_S2_S2_RS2_S3_S3_S3_:
  394|  24.9k|BOTAN_FORCE_INLINE void SBox7(T a1, T a2, T a3, T a4, T a5, T a6, T& out1, T& out2, T& out3, T& out4) {
  395|  24.9k|   const T x1 = a4 ^ a5;
  396|  24.9k|   const T x2 = a3 ^ x1;
  397|  24.9k|   const T x3 = a6 & x2;
  398|  24.9k|   const T x4 = a4 & x1;
  399|  24.9k|   const T x5 = a2 ^ x4;
  400|  24.9k|   const T x6 = x3 & x5;
  401|       |
  402|  24.9k|   const T x7 = a6 & x4;
  403|  24.9k|   const T x8 = a3 ^ x7;
  404|  24.9k|   const T x9 = x5 | x8;
  405|  24.9k|   const T x10 = a6 ^ x1;
  406|  24.9k|   const T x11 = x9 ^ x10;
  407|  24.9k|   const T x12 = a1 & ~x6;
  408|  24.9k|   const T x13 = x12 ^ x11;
  409|  24.9k|   out4 ^= x13;
  410|       |
  411|  24.9k|   const T x14 = a5 & ~x2;
  412|  24.9k|   const T x15 = x5 | x14;
  413|  24.9k|   const T x16 = x3 ^ x8;
  414|  24.9k|   const T x17 = x15 ^ x16;
  415|       |
  416|  24.9k|   const T x18 = x3 ^ x10;
  417|  24.9k|   const T x19 = a4 & ~x18;
  418|  24.9k|   const T x20 = x5 & ~x19;
  419|  24.9k|   const T x21 = a5 ^ x16;
  420|  24.9k|   const T x22 = x20 ^ x21;
  421|       |
  422|  24.9k|   const T x23 = x18 & ~x7;
  423|  24.9k|   const T x24 = x19 | x23;
  424|  24.9k|   const T x25 = a2 ^ x9;
  425|  24.9k|   const T x26 = x22 & x25;
  426|  24.9k|   const T x27 = x24 ^ x26;
  427|  24.9k|   const T x28 = x27 & a1;
  428|  24.9k|   const T x29 = x28 ^ x22;
  429|  24.9k|   out3 ^= x29;
  430|       |
  431|  24.9k|   const T x30 = x5 & ~a3;
  432|  24.9k|   const T x31 = x23 | x30;
  433|  24.9k|   const T x32 = x4 | x22;
  434|  24.9k|   const T x33 = x31 & x32;
  435|  24.9k|   const T x34 = x27 ^ x33;
  436|       |
  437|  24.9k|   const T x35 = x17 | x24;
  438|  24.9k|   const T x36 = x14 ^ x35;
  439|  24.9k|   const T x37 = a6 & x36;
  440|  24.9k|   const T x38 = x33 ^ x37;
  441|  24.9k|   const T x39 = x38 & ~a1;
  442|  24.9k|   const T x40 = x39 ^ x17;
  443|  24.9k|   out1 ^= x40;
  444|       |
  445|  24.9k|   const T x41 = ~x37;
  446|  24.9k|   const T x42 = a2 | x41;
  447|  24.9k|   const T x43 = x17 ^ x33;
  448|  24.9k|   const T x44 = x42 ^ x43;
  449|  24.9k|   const T x45 = x34 | a1;
  450|  24.9k|   const T x46 = x45 ^ x44;
  451|  24.9k|   out2 ^= x46;
  452|  24.9k|}
des.cpp:_ZN5Botan12_GLOBAL__N_15SBox8ITkNS0_9BitsliceTEjEEvT_S2_S2_S2_S2_S2_RS2_S3_S3_S3_:
  455|  24.9k|BOTAN_FORCE_INLINE void SBox8(T a1, T a2, T a3, T a4, T a5, T a6, T& out1, T& out2, T& out3, T& out4) {
  456|  24.9k|   const T x1 = a3 & ~a2;
  457|  24.9k|   const T x2 = a5 & ~a3;
  458|  24.9k|   const T x3 = a4 ^ x2;
  459|  24.9k|   const T x4 = a1 & x3;
  460|  24.9k|   const T x5 = x4 & ~x1;
  461|       |
  462|  24.9k|   const T x6 = a2 & ~x3;
  463|  24.9k|   const T x7 = a1 | x6;
  464|  24.9k|   const T x8 = a2 & ~a3;
  465|  24.9k|   const T x9 = a5 ^ x8;
  466|  24.9k|   const T x10 = x7 & x9;
  467|  24.9k|   const T x11 = x4 | x10;
  468|       |
  469|  24.9k|   const T x12 = ~x3;
  470|  24.9k|   const T x13 = x10 ^ x12;
  471|  24.9k|   const T x14 = a3 & ~x7;
  472|  24.9k|   const T x15 = x13 ^ x14;
  473|  24.9k|   const T x16 = x1 ^ x15;
  474|  24.9k|   const T x17 = x5 | a6;
  475|  24.9k|   const T x18 = x17 ^ x16;
  476|  24.9k|   out2 ^= x18;
  477|       |
  478|  24.9k|   const T x19 = a1 ^ x16;
  479|  24.9k|   const T x20 = a5 & x19;
  480|  24.9k|   const T x21 = a2 ^ x15;
  481|  24.9k|   const T x22 = x20 ^ x21;
  482|  24.9k|   const T x23 = x6 ^ x22;
  483|       |
  484|  24.9k|   const T x24 = x11 ^ x22;
  485|  24.9k|   const T x25 = a2 | x24;
  486|  24.9k|   const T x26 = a5 ^ x19;
  487|  24.9k|   const T x27 = x25 ^ x26;
  488|  24.9k|   const T x28 = x11 & a6;
  489|  24.9k|   const T x29 = x28 ^ x27;
  490|  24.9k|   out3 ^= x29;
  491|       |
  492|  24.9k|   const T x30 = x9 ^ x23;
  493|  24.9k|   const T x31 = a4 | x21;
  494|  24.9k|   const T x32 = x30 ^ x31;
  495|  24.9k|   const T x33 = a1 ^ x32;
  496|  24.9k|   const T x34 = x33 & a6;
  497|  24.9k|   const T x35 = x34 ^ x23;
  498|  24.9k|   out4 ^= x35;
  499|       |
  500|  24.9k|   const T x36 = x30 & ~a4;
  501|  24.9k|   const T x37 = x27 & x36;
  502|  24.9k|   const T x38 = x5 ^ x32;
  503|  24.9k|   const T x39 = x37 ^ x38;
  504|  24.9k|   const T x40 = x39 | a6;
  505|  24.9k|   const T x41 = x40 ^ x23;
  506|  24.9k|   out1 ^= x41;
  507|  24.9k|}
des.cpp:_ZN5Botan12_GLOBAL__N_113transpose_outEPhPKjm:
  567|    519|void transpose_out(uint8_t out[], const uint32_t B[64], size_t n_blocks) {
  568|       |   // clang-format off
  569|    519|   static constexpr uint8_t FP[64] = {
  570|    519|      39, 7, 47, 15, 55, 23, 63, 31,
  571|    519|      38, 6, 46, 14, 54, 22, 62, 30,
  572|    519|      37, 5, 45, 13, 53, 21, 61, 29,
  573|    519|      36, 4, 44, 12, 52, 20, 60, 28,
  574|    519|      35, 3, 43, 11, 51, 19, 59, 27,
  575|    519|      34, 2, 42, 10, 50, 18, 58, 26,
  576|    519|      33, 1, 41,  9, 49, 17, 57, 25,
  577|    519|      32, 0, 40,  8, 48, 16, 56, 24
  578|    519|   };
  579|       |   // clang-format on
  580|       |
  581|    519|   uint64_t M[32];
  582|  17.1k|   for(size_t i = 0; i != 32; ++i) {
  ------------------
  |  Branch (582:22): [True: 16.6k, False: 519]
  ------------------
  583|       |      // XOR with 32 here absorbs the DES output swap into the FP
  584|  16.6k|      M[i] = (static_cast<uint64_t>(B[FP[31 - i] ^ 32]) << 32) | B[FP[63 - i] ^ 32];
  585|  16.6k|   }
  586|       |
  587|    519|   des_transpose(M);
  588|       |
  589|  11.4k|   for(size_t i = 0; i != n_blocks; ++i) {
  ------------------
  |  Branch (589:22): [True: 10.9k, False: 519]
  ------------------
  590|  10.9k|      store_be(out + i * 8, M[i]);
  591|  10.9k|   }
  592|    519|}
des.cpp:_ZN5Botan12_GLOBAL__N_111des_decryptEPjS1_PKj:
  645|    888|void des_decrypt(uint32_t L[32], uint32_t R[32], const uint32_t round_key[]) {
  646|  7.99k|   for(size_t round = 16; round > 0; round -= 2) {
  ------------------
  |  Branch (646:27): [True: 7.10k, False: 888]
  ------------------
  647|  7.10k|      des_round(L, R, &round_key[(round - 1) * 48]);
  648|  7.10k|      des_round(R, L, &round_key[(round - 2) * 48]);
  649|  7.10k|   }
  650|    888|}
des.cpp:_ZN5Botan12_GLOBAL__N_116des_key_scheduleEPjPKh:
  656|    258|void des_key_schedule(uint32_t round_key[], const uint8_t key[8]) {
  657|    258|   static const uint8_t ROT[16] = {1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1};
  658|       |
  659|    258|   uint32_t C = ((key[7] & 0x80) << 20) | ((key[6] & 0x80) << 19) | ((key[5] & 0x80) << 18) | ((key[4] & 0x80) << 17) |
  660|    258|                ((key[3] & 0x80) << 16) | ((key[2] & 0x80) << 15) | ((key[1] & 0x80) << 14) | ((key[0] & 0x80) << 13) |
  661|    258|                ((key[7] & 0x40) << 13) | ((key[6] & 0x40) << 12) | ((key[5] & 0x40) << 11) | ((key[4] & 0x40) << 10) |
  662|    258|                ((key[3] & 0x40) << 9) | ((key[2] & 0x40) << 8) | ((key[1] & 0x40) << 7) | ((key[0] & 0x40) << 6) |
  663|    258|                ((key[7] & 0x20) << 6) | ((key[6] & 0x20) << 5) | ((key[5] & 0x20) << 4) | ((key[4] & 0x20) << 3) |
  664|    258|                ((key[3] & 0x20) << 2) | ((key[2] & 0x20) << 1) | ((key[1] & 0x20)) | ((key[0] & 0x20) >> 1) |
  665|    258|                ((key[7] & 0x10) >> 1) | ((key[6] & 0x10) >> 2) | ((key[5] & 0x10) >> 3) | ((key[4] & 0x10) >> 4);
  666|    258|   uint32_t D = ((key[7] & 0x02) << 26) | ((key[6] & 0x02) << 25) | ((key[5] & 0x02) << 24) | ((key[4] & 0x02) << 23) |
  667|    258|                ((key[3] & 0x02) << 22) | ((key[2] & 0x02) << 21) | ((key[1] & 0x02) << 20) | ((key[0] & 0x02) << 19) |
  668|    258|                ((key[7] & 0x04) << 17) | ((key[6] & 0x04) << 16) | ((key[5] & 0x04) << 15) | ((key[4] & 0x04) << 14) |
  669|    258|                ((key[3] & 0x04) << 13) | ((key[2] & 0x04) << 12) | ((key[1] & 0x04) << 11) | ((key[0] & 0x04) << 10) |
  670|    258|                ((key[7] & 0x08) << 8) | ((key[6] & 0x08) << 7) | ((key[5] & 0x08) << 6) | ((key[4] & 0x08) << 5) |
  671|    258|                ((key[3] & 0x08) << 4) | ((key[2] & 0x08) << 3) | ((key[1] & 0x08) << 2) | ((key[0] & 0x08) << 1) |
  672|    258|                ((key[3] & 0x10) >> 1) | ((key[2] & 0x10) >> 2) | ((key[1] & 0x10) >> 3) | ((key[0] & 0x10) >> 4);
  673|       |
  674|    258|   static const uint8_t PC2_C[24] = {13, 16, 10, 23, 0,  4, 2,  27, 14, 5,  20, 9,
  675|    258|                                     22, 18, 11, 3,  25, 7, 15, 6,  26, 19, 12, 1};
  676|       |
  677|    258|   static const uint8_t PC2_D[24] = {12, 23, 2,  8,  18, 26, 1,  11, 22, 16, 4, 19,
  678|    258|                                     15, 20, 10, 27, 5,  24, 17, 13, 21, 7,  0, 3};
  679|       |
  680|  4.38k|   for(size_t i = 0; i != 16; ++i) {
  ------------------
  |  Branch (680:22): [True: 4.12k, False: 258]
  ------------------
  681|  4.12k|      C = ((C << ROT[i]) | (C >> (28 - ROT[i]))) & 0x0FFFFFFF;
  682|  4.12k|      D = ((D << ROT[i]) | (D >> (28 - ROT[i]))) & 0x0FFFFFFF;
  683|       |
  684|  4.12k|      uint32_t* rk = &round_key[i * 48];
  685|       |
  686|   103k|      for(size_t j = 0; j < 24; ++j) {
  ------------------
  |  Branch (686:25): [True: 99.0k, False: 4.12k]
  ------------------
  687|  99.0k|         const uint32_t bit = (C >> (27 - PC2_C[j])) & 1;
  688|  99.0k|         rk[j] = static_cast<uint32_t>(0) - bit;
  689|  99.0k|      }
  690|       |
  691|   103k|      for(size_t j = 0; j < 24; ++j) {
  ------------------
  |  Branch (691:25): [True: 99.0k, False: 4.12k]
  ------------------
  692|  99.0k|         const uint32_t bit = (D >> (27 - PC2_D[j])) & 1;
  693|  99.0k|         rk[24 + j] = static_cast<uint32_t>(0) - bit;
  694|  99.0k|      }
  695|  4.12k|   }
  696|    258|}

_ZN5Botan13base64_decodeEPKcmb:
  189|  12.9k|secure_vector<uint8_t> base64_decode(const char input[], size_t input_length, bool ignore_ws) {
  190|  12.9k|   return base_decode_to_vec<secure_vector<uint8_t>>(Base64(), input, input_length, ignore_ws);
  191|  12.9k|}
base64.cpp:_ZN5Botan12_GLOBAL__N_16Base6417decode_max_outputEm:
   43|  25.9k|      static constexpr size_t decode_max_output(size_t input_length) {
   44|       |         // Divide before multiply to avoid overflow; round_up makes the division exact.
   45|  25.9k|         return (round_up(input_length, m_encoding_bytes_out) / m_encoding_bytes_out) * m_encoding_bytes_in;
   46|  25.9k|      }
base64.cpp:_ZN5Botan12_GLOBAL__N_16Base6413bits_consumedEv:
   34|  12.9k|      static constexpr size_t bits_consumed() noexcept { return m_encoding_bits; }
base64.cpp:_ZN5Botan12_GLOBAL__N_16Base6419lookup_binary_valueEc:
  112|  5.36M|uint8_t Base64::lookup_binary_value(char input) noexcept {
  113|  5.36M|   auto has_zero_byte = [](uint64_t v) { return ((v - 0x0101010101010101) & ~(v) & 0x8080808080808080); };
  114|       |
  115|       |   // Assumes each byte is either 0x00 or 0x80
  116|  5.36M|   auto index_of_first_set_byte = [](uint64_t v) {
  117|  5.36M|      return ((((v - 1) & 0x0101010101010101) * 0x0101010101010101) >> 56) - 1;
  118|  5.36M|   };
  119|       |
  120|  5.36M|   constexpr uint64_t lo = 0x0101010101010101;
  121|       |
  122|  5.36M|   const uint8_t x = static_cast<uint8_t>(input);
  123|       |
  124|  5.36M|   const uint64_t x8 = x * lo;
  125|       |
  126|       |   // Defines the valid ASCII ranges of base64, except the special chars (below)
  127|  5.36M|   constexpr uint64_t val_l = make_uint64(0, 0, 0, 0, 0, 'A', 'a', '0');
  128|  5.36M|   constexpr uint64_t val_u = make_uint64(0, 0, 0, 0, 0, 26, 26, 10);
  129|       |
  130|       |   // If x is in one of the ranges return a mask. Otherwise we xor in at the
  131|       |   // high word which will be our invalid marker
  132|  5.36M|   auto v_mask = swar_in_range<uint64_t>(x8, val_l, val_u) ^ 0x80000000;
  133|       |
  134|       |   // This is the offset added to x to get the value
  135|  5.36M|   const uint64_t val_v = 0xbfb904 ^ (0xFF000000 - (x << 24));
  136|       |
  137|  5.36M|   const uint8_t z = x + static_cast<uint8_t>(val_v >> (8 * index_of_first_set_byte(v_mask)));
  138|       |
  139|       |   // Valid base64 special characters, and some whitespace chars
  140|  5.36M|   constexpr uint64_t specials_i = make_uint64(0, '+', '/', '=', ' ', '\n', '\t', '\r');
  141|       |
  142|  5.36M|   const uint64_t specials_v = 0x3e3f8180808080 ^ (static_cast<uint64_t>(z) << 56);
  143|       |
  144|  5.36M|   const uint64_t smask = has_zero_byte(x8 ^ specials_i) ^ 0x8000000000000000;
  145|       |
  146|  5.36M|   return static_cast<uint8_t>(specials_v >> (8 * index_of_first_set_byte(smask)));
  147|  5.36M|}
base64.cpp:_ZZN5Botan12_GLOBAL__N_16Base6419lookup_binary_valueEcENK3$_0clEm:
  116|  10.7M|   auto index_of_first_set_byte = [](uint64_t v) {
  117|  10.7M|      return ((((v - 1) & 0x0101010101010101) * 0x0101010101010101) >> 56) - 1;
  118|  10.7M|   };
base64.cpp:_ZZN5Botan12_GLOBAL__N_16Base6419lookup_binary_valueEcENK3$_1clEm:
  113|  5.36M|   auto has_zero_byte = [](uint64_t v) { return ((v - 0x0101010101010101) & ~(v) & 0x8080808080808080); };
base64.cpp:_ZN5Botan12_GLOBAL__N_16Base6414check_bad_charEhcb:
  150|  5.36M|bool Base64::check_bad_char(uint8_t bin, char input, bool ignore_ws) {
  151|  5.36M|   if(bin <= 0x3F) {
  ------------------
  |  Branch (151:7): [True: 5.36M, False: 0]
  ------------------
  152|  5.36M|      return true;
  153|  5.36M|   } else if(!(bin == 0x81 || (bin == 0x80 && ignore_ws))) {
  ------------------
  |  Branch (153:16): [True: 0, False: 0]
  |  Branch (153:32): [True: 0, False: 0]
  |  Branch (153:47): [True: 0, False: 0]
  ------------------
  154|      0|      throw Invalid_Argument(fmt("base64_decode: invalid character '{}'", format_char_for_display(input)));
  155|      0|   }
  156|      0|   return false;
  157|  5.36M|}
base64.cpp:_ZN5Botan12_GLOBAL__N_16Base646decodeEPhPKh:
   54|  1.34M|      static void decode(uint8_t* out_ptr, const uint8_t decode_buf[4]) {
   55|  1.34M|         out_ptr[0] = (decode_buf[0] << 2) | (decode_buf[1] >> 4);
   56|  1.34M|         out_ptr[1] = (decode_buf[1] << 4) | (decode_buf[2] >> 2);
   57|  1.34M|         out_ptr[2] = (decode_buf[2] << 6) | decode_buf[3];
   58|  1.34M|      }
base64.cpp:_ZN5Botan12_GLOBAL__N_16Base6415bytes_to_removeEm:
   60|  12.9k|      static size_t bytes_to_remove(size_t final_truncate) { return final_truncate; }

_ZN5Botan10hex_encodeEPcPKhmb:
   34|  12.9k|void hex_encode(char output[], const uint8_t input[], size_t input_length, bool uppercase) {
   35|   350k|   for(size_t i = 0; i != input_length; ++i) {
  ------------------
  |  Branch (35:22): [True: 337k, False: 12.9k]
  ------------------
   36|   337k|      const uint16_t h = hex_encode_2nibble(input[i], uppercase);
   37|   337k|      output[2 * i] = get_byte<0>(h);
   38|   337k|      output[2 * i + 1] = get_byte<1>(h);
   39|   337k|   }
   40|  12.9k|}
_ZN5Botan10hex_encodeEPKhmb:
   42|  12.9k|std::string hex_encode(const uint8_t input[], size_t input_length, bool uppercase) {
   43|  12.9k|   const size_t output_length = mul_or_throw<size_t>(2, input_length, "Input too large to hex encode");
   44|  12.9k|   std::string output(output_length, 0);
   45|       |
   46|  12.9k|   if(input_length > 0) {
  ------------------
  |  Branch (46:7): [True: 12.9k, False: 0]
  ------------------
   47|  12.9k|      hex_encode(&output.front(), input, input_length, uppercase);
   48|  12.9k|   }
   49|       |
   50|  12.9k|   return output;
   51|  12.9k|}
_ZN5Botan10hex_decodeEPhPKcmRmb:
   75|  2.92k|size_t hex_decode(uint8_t output[], const char input[], size_t input_length, size_t& input_consumed, bool ignore_ws) {
   76|  2.92k|   uint8_t* out_ptr = output;
   77|  2.92k|   bool top_nibble = true;
   78|  2.92k|   uint8_t next = 0;
   79|       |
   80|  2.92k|   input_consumed = 0;
   81|       |
   82|  2.92k|   clear_mem(output, input_length / 2);
   83|       |
   84|  98.6k|   for(size_t i = 0; i != input_length; ++i) {
  ------------------
  |  Branch (84:22): [True: 95.7k, False: 2.92k]
  ------------------
   85|  95.7k|      const uint8_t bin = hex_char_to_bin(input[i]);
   86|       |
   87|  95.7k|      if(bin >= 0x10) {
  ------------------
  |  Branch (87:10): [True: 0, False: 95.7k]
  ------------------
   88|      0|         if(bin == 0x80 && ignore_ws) {
  ------------------
  |  Branch (88:13): [True: 0, False: 0]
  |  Branch (88:28): [True: 0, False: 0]
  ------------------
   89|      0|            continue;
   90|      0|         }
   91|       |
   92|      0|         throw Invalid_Argument(fmt("hex_decode: invalid character '{}'", format_char_for_display(input[i])));
   93|      0|      }
   94|       |
   95|  95.7k|      if(top_nibble) {
  ------------------
  |  Branch (95:10): [True: 47.8k, False: 47.8k]
  ------------------
   96|  47.8k|         next = bin << 4;
   97|  47.8k|      } else {
   98|  47.8k|         next |= bin;
   99|  47.8k|         *out_ptr = next;
  100|  47.8k|      }
  101|       |
  102|  95.7k|      top_nibble = !top_nibble;
  103|  95.7k|      if(top_nibble) {
  ------------------
  |  Branch (103:10): [True: 47.8k, False: 47.8k]
  ------------------
  104|  47.8k|         ++out_ptr;
  105|  47.8k|         input_consumed = i + 1;
  106|  47.8k|      }
  107|  95.7k|   }
  108|       |
  109|       |   /*
  110|       |   * Consume trailing whitespace following the last full byte; a leftover
  111|       |   * unpaired nibble (if any) stops the scan and is left unconsumed.
  112|       |   */
  113|  2.92k|   while(input_consumed < input_length && hex_char_to_bin(input[input_consumed]) == 0x80) {
  ------------------
  |  Branch (113:10): [True: 0, False: 2.92k]
  |  Branch (113:43): [True: 0, False: 0]
  ------------------
  114|      0|      ++input_consumed;
  115|      0|   }
  116|       |
  117|  2.92k|   return (out_ptr - output);
  118|  2.92k|}
_ZN5Botan10hex_decodeEPhPKcmb:
  120|  2.92k|size_t hex_decode(uint8_t output[], const char input[], size_t input_length, bool ignore_ws) {
  121|  2.92k|   size_t consumed = 0;
  122|  2.92k|   const size_t written = hex_decode(output, input, input_length, consumed, ignore_ws);
  123|       |
  124|  2.92k|   if(consumed != input_length) {
  ------------------
  |  Branch (124:7): [True: 0, False: 2.92k]
  ------------------
  125|      0|      throw Invalid_Argument("hex_decode: input did not have full bytes");
  126|      0|   }
  127|       |
  128|  2.92k|   return written;
  129|  2.92k|}
_ZN5Botan17hex_decode_lockedEPKcmb:
  142|  2.92k|secure_vector<uint8_t> hex_decode_locked(const char input[], size_t input_length, bool ignore_ws) {
  143|  2.92k|   secure_vector<uint8_t> bin(1 + input_length / 2);
  144|       |
  145|  2.92k|   const size_t written = hex_decode(bin.data(), input, input_length, ignore_ws);
  146|       |
  147|  2.92k|   bin.resize(written);
  148|  2.92k|   return bin;
  149|  2.92k|}
_ZN5Botan17hex_decode_lockedENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEEb:
  151|  2.91k|secure_vector<uint8_t> hex_decode_locked(std::string_view input, bool ignore_ws) {
  152|  2.91k|   return hex_decode_locked(input.data(), input.size(), ignore_ws);
  153|  2.91k|}
hex.cpp:_ZN5Botan12_GLOBAL__N_118hex_encode_2nibbleEhb:
   21|   337k|uint16_t hex_encode_2nibble(uint8_t n8, bool uppercase) {
   22|       |   // Offset for upper or lower case 'a' resp
   23|   337k|   const uint16_t a_mask = uppercase ? 0x0707 : 0x2727;
  ------------------
  |  Branch (23:28): [True: 337k, False: 0]
  ------------------
   24|       |
   25|   337k|   const uint16_t n = (static_cast<uint16_t>(n8 & 0xF0) << 4) | (n8 & 0x0F);
   26|       |   // n >= 10? If so add offset
   27|   337k|   const uint16_t diff = swar_lt<uint16_t>(0x0909, n) & a_mask;
   28|       |   // Can't overflow between bytes, so don't need explicit SWAR addition:
   29|   337k|   return n + 0x3030 + diff;
   30|   337k|}
hex.cpp:_ZN5Botan12_GLOBAL__N_115hex_char_to_binEc:
   55|  95.7k|uint8_t hex_char_to_bin(char input) {
   56|       |   // Starts of valid value ranges (v_lo) and their lengths (v_range)
   57|  95.7k|   constexpr uint64_t v_lo = make_uint64(0, '0', 'a', 'A', ' ', '\n', '\t', '\r');
   58|  95.7k|   constexpr uint64_t v_range = make_uint64(0, 10, 6, 6, 1, 1, 1, 1);
   59|  95.7k|   constexpr uint64_t expand8 = 0x0101010101010101;
   60|  95.7k|   constexpr uint64_t top64 = 0x8000000000000000;
   61|       |
   62|  95.7k|   const uint8_t x = static_cast<uint8_t>(input);
   63|  95.7k|   const uint64_t x8 = x * expand8;
   64|       |
   65|  95.7k|   const uint64_t v_mask = swar_in_range<uint64_t>(x8, v_lo, v_range) ^ top64;
   66|       |
   67|       |   // This is the offset added to x to get the value we need
   68|  95.7k|   const uint64_t val_v = 0xd0a9c960767773 ^ static_cast<uint64_t>(0xFF - x) << 56;
   69|       |
   70|  95.7k|   return x + static_cast<uint8_t>(val_v >> (8 * index_of_first_set_byte(v_mask)));
   71|  95.7k|}

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

_ZN5Botan5SHA_110compress_nERNSt3__16vectorIjNS_16secure_allocatorIjEEEENS1_4spanIKhLm18446744073709551615EEEm:
   24|  52.5k|void SHA_1::compress_n(digest_type& digest, std::span<const uint8_t> input, size_t blocks) {
   25|  52.5k|   using namespace SHA1_F;
   26|       |
   27|  52.5k|#if defined(BOTAN_HAS_SHA1_X86_SHA_NI)
   28|  52.5k|   if(CPUID::has(CPUID::Feature::SHA)) {
  ------------------
  |  Branch (28:7): [True: 52.5k, False: 0]
  ------------------
   29|  52.5k|      return sha1_compress_x86(digest, input, blocks);
   30|  52.5k|   }
   31|      0|#endif
   32|       |
   33|       |#if defined(BOTAN_HAS_SHA1_ARMV8)
   34|       |   if(CPUID::has(CPUID::Feature::SHA1)) {
   35|       |      return sha1_armv8_compress_n(digest, input, blocks);
   36|       |   }
   37|       |#endif
   38|       |
   39|      0|#if defined(BOTAN_HAS_SHA1_AVX2)
   40|      0|   if(CPUID::has(CPUID::Feature::AVX2, CPUID::Feature::BMI)) {
  ------------------
  |  Branch (40:7): [True: 0, False: 0]
  ------------------
   41|      0|      return avx2_compress_n(digest, input, blocks);
   42|      0|   }
   43|      0|#endif
   44|       |
   45|      0|#if defined(BOTAN_HAS_SHA1_SIMD_4X32)
   46|      0|   if(CPUID::has(CPUID::Feature::SIMD_4X32)) {
  ------------------
  |  Branch (46:7): [True: 0, False: 0]
  ------------------
   47|      0|      return simd_compress_n(digest, input, blocks);
   48|      0|   }
   49|      0|#endif
   50|       |
   51|      0|   uint32_t A = digest[0];
   52|      0|   uint32_t B = digest[1];
   53|      0|   uint32_t C = digest[2];
   54|      0|   uint32_t D = digest[3];
   55|      0|   uint32_t E = digest[4];
   56|      0|   std::array<uint32_t, 80> W{};
   57|      0|   auto W_in = std::span{W}.first<block_bytes / sizeof(uint32_t)>();
   58|       |
   59|      0|   BufferSlicer in(input);
   60|       |
   61|      0|   for(size_t i = 0; i != blocks; ++i) {
  ------------------
  |  Branch (61:22): [True: 0, False: 0]
  ------------------
   62|      0|      load_be(W_in, in.take<block_bytes>());
   63|       |
   64|       |      // clang-format off
   65|       |
   66|      0|      for(size_t j = 16; j != 80; j += 8) {
  ------------------
  |  Branch (66:26): [True: 0, False: 0]
  ------------------
   67|      0|         W[j + 0] = rotl<1>(W[j - 3] ^ W[j - 8] ^ W[j - 14] ^ W[j - 16]);
   68|      0|         W[j + 1] = rotl<1>(W[j - 2] ^ W[j - 7] ^ W[j - 13] ^ W[j - 15]);
   69|      0|         W[j + 2] = rotl<1>(W[j - 1] ^ W[j - 6] ^ W[j - 12] ^ W[j - 14]);
   70|      0|         W[j + 3] = rotl<1>(W[j    ] ^ W[j - 5] ^ W[j - 11] ^ W[j - 13]);
   71|      0|         W[j + 4] = rotl<1>(W[j + 1] ^ W[j - 4] ^ W[j - 10] ^ W[j - 12]);
   72|      0|         W[j + 5] = rotl<1>(W[j + 2] ^ W[j - 3] ^ W[j -  9] ^ W[j - 11]);
   73|      0|         W[j + 6] = rotl<1>(W[j + 3] ^ W[j - 2] ^ W[j -  8] ^ W[j - 10]);
   74|      0|         W[j + 7] = rotl<1>(W[j + 4] ^ W[j - 1] ^ W[j -  7] ^ W[j -  9]);
   75|      0|      }
   76|       |
   77|       |      // clang-format on
   78|       |
   79|      0|      F1(A, B, C, D, E, W[0] + K1);
   80|      0|      F1(E, A, B, C, D, W[1] + K1);
   81|      0|      F1(D, E, A, B, C, W[2] + K1);
   82|      0|      F1(C, D, E, A, B, W[3] + K1);
   83|      0|      F1(B, C, D, E, A, W[4] + K1);
   84|      0|      F1(A, B, C, D, E, W[5] + K1);
   85|      0|      F1(E, A, B, C, D, W[6] + K1);
   86|      0|      F1(D, E, A, B, C, W[7] + K1);
   87|      0|      F1(C, D, E, A, B, W[8] + K1);
   88|      0|      F1(B, C, D, E, A, W[9] + K1);
   89|      0|      F1(A, B, C, D, E, W[10] + K1);
   90|      0|      F1(E, A, B, C, D, W[11] + K1);
   91|      0|      F1(D, E, A, B, C, W[12] + K1);
   92|      0|      F1(C, D, E, A, B, W[13] + K1);
   93|      0|      F1(B, C, D, E, A, W[14] + K1);
   94|      0|      F1(A, B, C, D, E, W[15] + K1);
   95|      0|      F1(E, A, B, C, D, W[16] + K1);
   96|      0|      F1(D, E, A, B, C, W[17] + K1);
   97|      0|      F1(C, D, E, A, B, W[18] + K1);
   98|      0|      F1(B, C, D, E, A, W[19] + K1);
   99|       |
  100|      0|      F2(A, B, C, D, E, W[20] + K2);
  101|      0|      F2(E, A, B, C, D, W[21] + K2);
  102|      0|      F2(D, E, A, B, C, W[22] + K2);
  103|      0|      F2(C, D, E, A, B, W[23] + K2);
  104|      0|      F2(B, C, D, E, A, W[24] + K2);
  105|      0|      F2(A, B, C, D, E, W[25] + K2);
  106|      0|      F2(E, A, B, C, D, W[26] + K2);
  107|      0|      F2(D, E, A, B, C, W[27] + K2);
  108|      0|      F2(C, D, E, A, B, W[28] + K2);
  109|      0|      F2(B, C, D, E, A, W[29] + K2);
  110|      0|      F2(A, B, C, D, E, W[30] + K2);
  111|      0|      F2(E, A, B, C, D, W[31] + K2);
  112|      0|      F2(D, E, A, B, C, W[32] + K2);
  113|      0|      F2(C, D, E, A, B, W[33] + K2);
  114|      0|      F2(B, C, D, E, A, W[34] + K2);
  115|      0|      F2(A, B, C, D, E, W[35] + K2);
  116|      0|      F2(E, A, B, C, D, W[36] + K2);
  117|      0|      F2(D, E, A, B, C, W[37] + K2);
  118|      0|      F2(C, D, E, A, B, W[38] + K2);
  119|      0|      F2(B, C, D, E, A, W[39] + K2);
  120|       |
  121|      0|      F3(A, B, C, D, E, W[40] + K3);
  122|      0|      F3(E, A, B, C, D, W[41] + K3);
  123|      0|      F3(D, E, A, B, C, W[42] + K3);
  124|      0|      F3(C, D, E, A, B, W[43] + K3);
  125|      0|      F3(B, C, D, E, A, W[44] + K3);
  126|      0|      F3(A, B, C, D, E, W[45] + K3);
  127|      0|      F3(E, A, B, C, D, W[46] + K3);
  128|      0|      F3(D, E, A, B, C, W[47] + K3);
  129|      0|      F3(C, D, E, A, B, W[48] + K3);
  130|      0|      F3(B, C, D, E, A, W[49] + K3);
  131|      0|      F3(A, B, C, D, E, W[50] + K3);
  132|      0|      F3(E, A, B, C, D, W[51] + K3);
  133|      0|      F3(D, E, A, B, C, W[52] + K3);
  134|      0|      F3(C, D, E, A, B, W[53] + K3);
  135|      0|      F3(B, C, D, E, A, W[54] + K3);
  136|      0|      F3(A, B, C, D, E, W[55] + K3);
  137|      0|      F3(E, A, B, C, D, W[56] + K3);
  138|      0|      F3(D, E, A, B, C, W[57] + K3);
  139|      0|      F3(C, D, E, A, B, W[58] + K3);
  140|      0|      F3(B, C, D, E, A, W[59] + K3);
  141|       |
  142|      0|      F4(A, B, C, D, E, W[60] + K4);
  143|      0|      F4(E, A, B, C, D, W[61] + K4);
  144|      0|      F4(D, E, A, B, C, W[62] + K4);
  145|      0|      F4(C, D, E, A, B, W[63] + K4);
  146|      0|      F4(B, C, D, E, A, W[64] + K4);
  147|      0|      F4(A, B, C, D, E, W[65] + K4);
  148|      0|      F4(E, A, B, C, D, W[66] + K4);
  149|      0|      F4(D, E, A, B, C, W[67] + K4);
  150|      0|      F4(C, D, E, A, B, W[68] + K4);
  151|      0|      F4(B, C, D, E, A, W[69] + K4);
  152|      0|      F4(A, B, C, D, E, W[70] + K4);
  153|      0|      F4(E, A, B, C, D, W[71] + K4);
  154|      0|      F4(D, E, A, B, C, W[72] + K4);
  155|      0|      F4(C, D, E, A, B, W[73] + K4);
  156|      0|      F4(B, C, D, E, A, W[74] + K4);
  157|      0|      F4(A, B, C, D, E, W[75] + K4);
  158|      0|      F4(E, A, B, C, D, W[76] + K4);
  159|      0|      F4(D, E, A, B, C, W[77] + K4);
  160|      0|      F4(C, D, E, A, B, W[78] + K4);
  161|      0|      F4(B, C, D, E, A, W[79] + K4);
  162|       |
  163|      0|      A = (digest[0] += A);
  164|      0|      B = (digest[1] += B);
  165|      0|      C = (digest[2] += C);
  166|      0|      D = (digest[3] += D);
  167|      0|      E = (digest[4] += E);
  168|      0|   }
  169|      0|}
_ZN5Botan5SHA_14initERNSt3__16vectorIjNS_16secure_allocatorIjEEEE:
  174|  32.8k|void SHA_1::init(digest_type& digest) {
  175|  32.8k|   digest.assign({0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0});
  176|  32.8k|}
_ZN5Botan5SHA_18add_dataENSt3__14spanIKhLm18446744073709551615EEE:
  214|  26.7k|void SHA_1::add_data(std::span<const uint8_t> input) {
  215|  26.7k|   m_md.update(input);
  216|  26.7k|}
_ZN5Botan5SHA_112final_resultENSt3__14spanIhLm18446744073709551615EEE:
  218|  26.1k|void SHA_1::final_result(std::span<uint8_t> output) {
  219|  26.1k|   m_md.final(output);
  220|  26.1k|}

_ZN5Botan5SHA_117sha1_compress_x86ERNSt3__16vectorIjNS_16secure_allocatorIjEEEENS1_4spanIKhLm18446744073709551615EEEm:
   76|  52.5k|                                                 size_t blocks) {
   77|  52.5k|   const uint8_t* input = input_span.data();
   78|       |
   79|  52.5k|   SIMD_4x32 ABCD = rev_words(SIMD_4x32::load_le(&digest[0]));  // NOLINT(*-container-data-pointer)
   80|  52.5k|   SIMD_4x32 E0 = SIMD_4x32(0, 0, 0, digest[4]);
   81|       |
   82|   145k|   while(blocks > 0) {
  ------------------
  |  Branch (82:10): [True: 92.8k, False: 52.5k]
  ------------------
   83|       |      // Save current hash
   84|  92.8k|      const auto ABCD_SAVE = ABCD;
   85|  92.8k|      const auto E0_SAVE = E0;
   86|       |
   87|  92.8k|      auto W0 = rev_words(SIMD_4x32::load_be(input));
   88|  92.8k|      auto W1 = rev_words(SIMD_4x32::load_be(input + 16));
   89|  92.8k|      auto W2 = rev_words(SIMD_4x32::load_be(input + 32));
   90|  92.8k|      auto W3 = rev_words(SIMD_4x32::load_be(input + 48));
   91|       |
   92|  92.8k|      sha1_x86_first8<0>(ABCD, E0, W0, W1);
   93|  92.8k|      sha1_x86_rnds8<0>(ABCD, E0, W2, W3);
   94|       |
   95|  92.8k|      W0 = sha1_x86_msg1(W0, W1);
   96|  92.8k|      W1 = sha1_x86_msg1(W1, W2);
   97|  92.8k|      W0 ^= W2;
   98|       |
   99|  92.8k|      sha1_x86_next_msg(W3, W0, W1, W2);
  100|  92.8k|      sha1_x86_next_msg(W0, W1, W2, W3);
  101|  92.8k|      sha1_x86_rnds8<0, 1>(ABCD, E0, W0, W1);
  102|       |
  103|  92.8k|      sha1_x86_next_msg(W1, W2, W3, W0);
  104|  92.8k|      sha1_x86_next_msg(W2, W3, W0, W1);
  105|  92.8k|      sha1_x86_rnds8<1>(ABCD, E0, W2, W3);
  106|       |
  107|  92.8k|      sha1_x86_next_msg(W3, W0, W1, W2);
  108|  92.8k|      sha1_x86_next_msg(W0, W1, W2, W3);
  109|  92.8k|      sha1_x86_rnds8<1>(ABCD, E0, W0, W1);
  110|       |
  111|  92.8k|      sha1_x86_next_msg(W1, W2, W3, W0);
  112|  92.8k|      sha1_x86_next_msg(W2, W3, W0, W1);
  113|  92.8k|      sha1_x86_rnds8<2>(ABCD, E0, W2, W3);
  114|       |
  115|  92.8k|      sha1_x86_next_msg(W3, W0, W1, W2);
  116|  92.8k|      sha1_x86_next_msg(W0, W1, W2, W3);
  117|  92.8k|      sha1_x86_rnds8<2>(ABCD, E0, W0, W1);
  118|       |
  119|  92.8k|      sha1_x86_next_msg(W1, W2, W3, W0);
  120|  92.8k|      sha1_x86_next_msg(W2, W3, W0, W1);
  121|  92.8k|      sha1_x86_rnds8<2, 3>(ABCD, E0, W2, W3);
  122|       |
  123|  92.8k|      sha1_x86_next_msg(W3, W0, W1, W2);
  124|  92.8k|      sha1_x86_next_msg(W0, W1, W2, W3);
  125|  92.8k|      sha1_x86_rnds8<3>(ABCD, E0, W0, W1);
  126|       |
  127|  92.8k|      sha1_x86_next_msg(W1, W2, W3, W0);
  128|  92.8k|      sha1_x86_next_msg(W2, W3, W0, W1);
  129|  92.8k|      sha1_x86_rnds8<3>(ABCD, E0, W2, W3);
  130|       |
  131|  92.8k|      ABCD += ABCD_SAVE;
  132|  92.8k|      E0 = sha1_x86_nexte(E0, E0_SAVE);
  133|       |
  134|  92.8k|      input += 64;
  135|  92.8k|      blocks--;
  136|  92.8k|   }
  137|       |
  138|  52.5k|   rev_words(ABCD).store_le(&digest[0]);  // NOLINT(*-container-data-pointer)
  139|  52.5k|   digest[4] = E0.extract_word<3>();
  140|  52.5k|}
sha1_x86.cpp:_ZN5Botan12_GLOBAL__N_19rev_wordsERKNS_9SIMD_4x32E:
   66|   476k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_SHANI SIMD_4x32 rev_words(const SIMD_4x32& v) {
   67|       |   return SIMD_4x32(_mm_shuffle_epi32(v.raw(), 0b00011011));
   68|   476k|}
sha1_x86.cpp:_ZN5Botan12_GLOBAL__N_113sha1_x86_msg1ERKNS_9SIMD_4x32ES3_:
   29|   185k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_SHANI SIMD_4x32 sha1_x86_msg1(const SIMD_4x32& W0, const SIMD_4x32& W1) {
   30|   185k|   return SIMD_4x32(_mm_sha1msg1_epu32(W0.raw(), W1.raw()));
   31|   185k|}
sha1_x86.cpp:_ZN5Botan12_GLOBAL__N_117sha1_x86_next_msgERKNS_9SIMD_4x32ERS1_S4_S4_:
   36|  1.48M|                                                             SIMD_4x32& W3) {
   37|  1.48M|   W3 = SIMD_4x32(_mm_sha1msg1_epu32(W3.raw(), W0.raw()));
   38|  1.48M|   W1 = SIMD_4x32(_mm_sha1msg2_epu32(W1.raw(), W0.raw()));
   39|  1.48M|   W2 ^= W0;
   40|  1.48M|}
sha1_x86.cpp:_ZN5Botan12_GLOBAL__N_114sha1_x86_nexteERKNS_9SIMD_4x32ES3_:
   25|  1.85M|BOTAN_FORCE_INLINE BOTAN_FN_ISA_SHANI SIMD_4x32 sha1_x86_nexte(const SIMD_4x32& x, const SIMD_4x32& y) {
   26|  1.85M|   return SIMD_4x32(_mm_sha1nexte_epu32(x.raw(), y.raw()));
   27|  1.85M|}
sha1_x86.cpp:_ZN5Botan12_GLOBAL__N_115sha1_x86_first8ILh0ELh0EEEvRNS_9SIMD_4x32ES3_RKS2_S5_:
   46|  92.8k|                                                           const SIMD_4x32& W1) {
   47|  92.8k|   auto TE = ABCD;
   48|  92.8k|   ABCD = SIMD_4x32(_mm_sha1rnds4_epu32(ABCD.raw(), (E + W0).raw(), R1));
   49|       |
   50|  92.8k|   E = ABCD;
   51|       |   ABCD = SIMD_4x32(_mm_sha1rnds4_epu32(ABCD.raw(), sha1_x86_nexte(TE, W1).raw(), R2));
   52|  92.8k|}
sha1_x86.cpp:_ZN5Botan12_GLOBAL__N_114sha1_x86_rnds8ILh0ELh0EEEvRNS_9SIMD_4x32ES3_RKS2_S5_:
   58|  92.8k|                                                          const SIMD_4x32& W1) {
   59|  92.8k|   auto TE = ABCD;
   60|  92.8k|   ABCD = SIMD_4x32(_mm_sha1rnds4_epu32(ABCD.raw(), sha1_x86_nexte(E, W0).raw(), R1));
   61|       |
   62|  92.8k|   E = ABCD;
   63|       |   ABCD = SIMD_4x32(_mm_sha1rnds4_epu32(ABCD.raw(), sha1_x86_nexte(TE, W1).raw(), R2));
   64|  92.8k|}
sha1_x86.cpp:_ZN5Botan12_GLOBAL__N_114sha1_x86_rnds8ILh0ELh1EEEvRNS_9SIMD_4x32ES3_RKS2_S5_:
   58|  92.8k|                                                          const SIMD_4x32& W1) {
   59|  92.8k|   auto TE = ABCD;
   60|  92.8k|   ABCD = SIMD_4x32(_mm_sha1rnds4_epu32(ABCD.raw(), sha1_x86_nexte(E, W0).raw(), R1));
   61|       |
   62|  92.8k|   E = ABCD;
   63|       |   ABCD = SIMD_4x32(_mm_sha1rnds4_epu32(ABCD.raw(), sha1_x86_nexte(TE, W1).raw(), R2));
   64|  92.8k|}
sha1_x86.cpp:_ZN5Botan12_GLOBAL__N_114sha1_x86_rnds8ILh1ELh1EEEvRNS_9SIMD_4x32ES3_RKS2_S5_:
   58|   185k|                                                          const SIMD_4x32& W1) {
   59|   185k|   auto TE = ABCD;
   60|   185k|   ABCD = SIMD_4x32(_mm_sha1rnds4_epu32(ABCD.raw(), sha1_x86_nexte(E, W0).raw(), R1));
   61|       |
   62|   185k|   E = ABCD;
   63|       |   ABCD = SIMD_4x32(_mm_sha1rnds4_epu32(ABCD.raw(), sha1_x86_nexte(TE, W1).raw(), R2));
   64|   185k|}
sha1_x86.cpp:_ZN5Botan12_GLOBAL__N_114sha1_x86_rnds8ILh2ELh2EEEvRNS_9SIMD_4x32ES3_RKS2_S5_:
   58|   185k|                                                          const SIMD_4x32& W1) {
   59|   185k|   auto TE = ABCD;
   60|   185k|   ABCD = SIMD_4x32(_mm_sha1rnds4_epu32(ABCD.raw(), sha1_x86_nexte(E, W0).raw(), R1));
   61|       |
   62|   185k|   E = ABCD;
   63|       |   ABCD = SIMD_4x32(_mm_sha1rnds4_epu32(ABCD.raw(), sha1_x86_nexte(TE, W1).raw(), R2));
   64|   185k|}
sha1_x86.cpp:_ZN5Botan12_GLOBAL__N_114sha1_x86_rnds8ILh2ELh3EEEvRNS_9SIMD_4x32ES3_RKS2_S5_:
   58|  92.8k|                                                          const SIMD_4x32& W1) {
   59|  92.8k|   auto TE = ABCD;
   60|  92.8k|   ABCD = SIMD_4x32(_mm_sha1rnds4_epu32(ABCD.raw(), sha1_x86_nexte(E, W0).raw(), R1));
   61|       |
   62|  92.8k|   E = ABCD;
   63|       |   ABCD = SIMD_4x32(_mm_sha1rnds4_epu32(ABCD.raw(), sha1_x86_nexte(TE, W1).raw(), R2));
   64|  92.8k|}
sha1_x86.cpp:_ZN5Botan12_GLOBAL__N_114sha1_x86_rnds8ILh3ELh3EEEvRNS_9SIMD_4x32ES3_RKS2_S5_:
   58|   185k|                                                          const SIMD_4x32& W1) {
   59|   185k|   auto TE = ABCD;
   60|   185k|   ABCD = SIMD_4x32(_mm_sha1rnds4_epu32(ABCD.raw(), sha1_x86_nexte(E, W0).raw(), R1));
   61|       |
   62|   185k|   E = ABCD;
   63|       |   ABCD = SIMD_4x32(_mm_sha1rnds4_epu32(ABCD.raw(), sha1_x86_nexte(TE, W1).raw(), R2));
   64|   185k|}

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

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

_ZN5Botan7SHA_51215compress_digestERNSt3__16vectorImNS_16secure_allocatorImEEEENS1_4spanIKhLm18446744073709551615EEEm:
   56|  15.2k|void SHA_512::compress_digest(digest_type& digest, std::span<const uint8_t> input, size_t blocks) {
   57|  15.2k|#if defined(BOTAN_HAS_SHA2_64_X86)
   58|  15.2k|   if(CPUID::has(CPUID::Feature::SHA512)) {
  ------------------
  |  Branch (58:7): [True: 0, False: 15.2k]
  ------------------
   59|      0|      return compress_digest_x86(digest, input, blocks);
   60|      0|   }
   61|  15.2k|#endif
   62|       |
   63|       |#if defined(BOTAN_HAS_SHA2_64_ARMV8)
   64|       |   if(CPUID::has(CPUID::Feature::SHA2_512)) {
   65|       |      return compress_digest_armv8(digest, input, blocks);
   66|       |   }
   67|       |#endif
   68|       |
   69|  15.2k|#if defined(BOTAN_HAS_SHA2_64_X86_AVX512)
   70|  15.2k|   if(CPUID::has(CPUID::Feature::AVX512, CPUID::Feature::BMI)) {
  ------------------
  |  Branch (70:7): [True: 0, False: 15.2k]
  ------------------
   71|      0|      return compress_digest_x86_avx512(digest, input, blocks);
   72|      0|   }
   73|  15.2k|#endif
   74|       |
   75|  15.2k|#if defined(BOTAN_HAS_SHA2_64_X86_AVX2)
   76|  15.2k|   if(CPUID::has(CPUID::Feature::AVX2, CPUID::Feature::BMI)) {
  ------------------
  |  Branch (76:7): [True: 15.2k, False: 0]
  ------------------
   77|  15.2k|      return compress_digest_x86_avx2(digest, input, blocks);
   78|  15.2k|   }
   79|      0|#endif
   80|       |
   81|      0|   uint64_t A = digest[0];
   82|      0|   uint64_t B = digest[1];
   83|      0|   uint64_t C = digest[2];
   84|      0|   uint64_t D = digest[3];
   85|      0|   uint64_t E = digest[4];
   86|      0|   uint64_t F = digest[5];
   87|      0|   uint64_t G = digest[6];
   88|      0|   uint64_t H = digest[7];
   89|       |
   90|      0|   std::array<uint64_t, 16> W{};
   91|       |
   92|      0|   BufferSlicer in(input);
   93|       |
   94|      0|   for(size_t i = 0; i != blocks; ++i) {
  ------------------
  |  Branch (94:22): [True: 0, False: 0]
  ------------------
   95|      0|      load_be(W, in.take<block_bytes>());
   96|       |
   97|       |      // clang-format off
   98|       |
   99|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], SHA512_K[ 0]);
  100|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], SHA512_K[ 1]);
  101|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], SHA512_K[ 2]);
  102|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], SHA512_K[ 3]);
  103|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], SHA512_K[ 4]);
  104|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], SHA512_K[ 5]);
  105|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], SHA512_K[ 6]);
  106|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], SHA512_K[ 7]);
  107|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], SHA512_K[ 8]);
  108|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], SHA512_K[ 9]);
  109|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], SHA512_K[10]);
  110|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], SHA512_K[11]);
  111|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], SHA512_K[12]);
  112|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], SHA512_K[13]);
  113|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], SHA512_K[14]);
  114|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], SHA512_K[15]);
  115|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], SHA512_K[16]);
  116|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], SHA512_K[17]);
  117|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], SHA512_K[18]);
  118|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], SHA512_K[19]);
  119|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], SHA512_K[20]);
  120|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], SHA512_K[21]);
  121|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], SHA512_K[22]);
  122|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], SHA512_K[23]);
  123|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], SHA512_K[24]);
  124|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], SHA512_K[25]);
  125|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], SHA512_K[26]);
  126|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], SHA512_K[27]);
  127|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], SHA512_K[28]);
  128|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], SHA512_K[29]);
  129|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], SHA512_K[30]);
  130|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], SHA512_K[31]);
  131|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], SHA512_K[32]);
  132|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], SHA512_K[33]);
  133|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], SHA512_K[34]);
  134|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], SHA512_K[35]);
  135|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], SHA512_K[36]);
  136|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], SHA512_K[37]);
  137|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], SHA512_K[38]);
  138|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], SHA512_K[39]);
  139|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], SHA512_K[40]);
  140|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], SHA512_K[41]);
  141|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], SHA512_K[42]);
  142|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], SHA512_K[43]);
  143|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], SHA512_K[44]);
  144|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], SHA512_K[45]);
  145|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], SHA512_K[46]);
  146|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], SHA512_K[47]);
  147|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], SHA512_K[48]);
  148|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], SHA512_K[49]);
  149|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], SHA512_K[50]);
  150|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], SHA512_K[51]);
  151|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], SHA512_K[52]);
  152|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], SHA512_K[53]);
  153|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], SHA512_K[54]);
  154|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], SHA512_K[55]);
  155|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], SHA512_K[56]);
  156|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], SHA512_K[57]);
  157|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], SHA512_K[58]);
  158|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], SHA512_K[59]);
  159|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], SHA512_K[60]);
  160|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], SHA512_K[61]);
  161|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], SHA512_K[62]);
  162|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], SHA512_K[63]);
  163|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], SHA512_K[64]);
  164|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], SHA512_K[65]);
  165|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], SHA512_K[66]);
  166|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], SHA512_K[67]);
  167|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], SHA512_K[68]);
  168|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], SHA512_K[69]);
  169|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], SHA512_K[70]);
  170|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], SHA512_K[71]);
  171|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], SHA512_K[72]);
  172|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], SHA512_K[73]);
  173|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], SHA512_K[74]);
  174|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], SHA512_K[75]);
  175|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], SHA512_K[76]);
  176|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], SHA512_K[77]);
  177|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], SHA512_K[78]);
  178|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], SHA512_K[79]);
  179|       |
  180|       |      // clang-format on
  181|       |
  182|      0|      A = (digest[0] += A);
  183|      0|      B = (digest[1] += B);
  184|      0|      C = (digest[2] += C);
  185|      0|      D = (digest[3] += D);
  186|      0|      E = (digest[4] += E);
  187|      0|      F = (digest[5] += F);
  188|      0|      G = (digest[6] += G);
  189|      0|      H = (digest[7] += H);
  190|      0|   }
  191|      0|}
_ZN5Botan7SHA_38410compress_nERNSt3__16vectorImNS_16secure_allocatorImEEEENS1_4spanIKhLm18446744073709551615EEEm:
  209|  15.2k|void SHA_384::compress_n(digest_type& digest, std::span<const uint8_t> input, size_t blocks) {
  210|  15.2k|   SHA_512::compress_digest(digest, input, blocks);
  211|  15.2k|}
_ZN5Botan7SHA_3844initERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  228|  8.02k|void SHA_384::init(digest_type& digest) {
  229|  8.02k|   digest.assign({0xCBBB9D5DC1059ED8,
  230|  8.02k|                  0x629A292A367CD507,
  231|  8.02k|                  0x9159015A3070DD17,
  232|  8.02k|                  0x152FECD8F70E5939,
  233|  8.02k|                  0x67332667FFC00B31,
  234|  8.02k|                  0x8EB44A8768581511,
  235|  8.02k|                  0xDB0C2E0D64F98FA7,
  236|  8.02k|                  0x47B5481DBEFA4FA4});
  237|  8.02k|}
_ZN5Botan7SHA_3848add_dataENSt3__14spanIKhLm18446744073709551615EEE:
  274|  16.3k|void SHA_384::add_data(std::span<const uint8_t> input) {
  275|  16.3k|   m_md.update(input);
  276|  16.3k|}
_ZN5Botan7SHA_38412final_resultENSt3__14spanIhLm18446744073709551615EEE:
  286|  6.44k|void SHA_384::final_result(std::span<uint8_t> output) {
  287|  6.44k|   m_md.final(output);
  288|  6.44k|}

_ZN5Botan7SHA_51224compress_digest_x86_avx2ERNSt3__16vectorImNS_16secure_allocatorImEEEENS1_4spanIKhLm18446744073709551615EEEm:
   44|  15.2k|                                                              size_t blocks) {
   45|  15.2k|   alignas(64) uint64_t W[16] = {0};
   46|  15.2k|   alignas(64) uint64_t W2[80];
   47|       |
   48|  15.2k|   uint64_t A = digest[0];
   49|  15.2k|   uint64_t B = digest[1];
   50|  15.2k|   uint64_t C = digest[2];
   51|  15.2k|   uint64_t D = digest[3];
   52|  15.2k|   uint64_t E = digest[4];
   53|  15.2k|   uint64_t F = digest[5];
   54|  15.2k|   uint64_t G = digest[6];
   55|  15.2k|   uint64_t H = digest[7];
   56|       |
   57|  15.2k|   const uint8_t* data = input.data();
   58|       |
   59|  15.7k|   while(blocks >= 2) {
  ------------------
  |  Branch (59:10): [True: 538, False: 15.2k]
  ------------------
   60|    538|      SIMD_4x64 WS[8];
   61|       |
   62|  4.84k|      for(size_t i = 0; i < 8; i++) {
  ------------------
  |  Branch (62:25): [True: 4.30k, False: 538]
  ------------------
   63|  4.30k|         WS[i] = SIMD_4x64::load_be2(&data[16 * i], &data[128 + 16 * i]);
   64|  4.30k|         auto WK = WS[i] + SIMD_4x64::broadcast_2x64(&SHA512_K[2 * i]);
   65|  4.30k|         WK.store_le2(&W[2 * i], &W2[2 * i]);
   66|  4.30k|      }
   67|       |
   68|    538|      data += 2 * 128;
   69|    538|      blocks -= 2;
   70|       |
   71|       |      // First 64 rounds of SHA-512
   72|  2.69k|      for(size_t r = 0; r != 64; r += 16) {
  ------------------
  |  Branch (72:25): [True: 2.15k, False: 538]
  ------------------
   73|  2.15k|         auto w = sha512_next_w(WS) + SIMD_4x64::broadcast_2x64(&SHA512_K[r + 16]);
   74|  2.15k|         SHA2_64_F(A, B, C, D, E, F, G, H, W[0]);
   75|  2.15k|         SHA2_64_F(H, A, B, C, D, E, F, G, W[1]);
   76|  2.15k|         w.store_le2(&W[0], &W2[r + 16]);
   77|       |
   78|  2.15k|         w = sha512_next_w(WS) + SIMD_4x64::broadcast_2x64(&SHA512_K[r + 18]);
   79|  2.15k|         SHA2_64_F(G, H, A, B, C, D, E, F, W[2]);
   80|  2.15k|         SHA2_64_F(F, G, H, A, B, C, D, E, W[3]);
   81|  2.15k|         w.store_le2(&W[2], &W2[r + 18]);
   82|       |
   83|  2.15k|         w = sha512_next_w(WS) + SIMD_4x64::broadcast_2x64(&SHA512_K[r + 20]);
   84|  2.15k|         SHA2_64_F(E, F, G, H, A, B, C, D, W[4]);
   85|  2.15k|         SHA2_64_F(D, E, F, G, H, A, B, C, W[5]);
   86|  2.15k|         w.store_le2(&W[4], &W2[r + 20]);
   87|       |
   88|  2.15k|         w = sha512_next_w(WS) + SIMD_4x64::broadcast_2x64(&SHA512_K[r + 22]);
   89|  2.15k|         SHA2_64_F(C, D, E, F, G, H, A, B, W[6]);
   90|  2.15k|         SHA2_64_F(B, C, D, E, F, G, H, A, W[7]);
   91|  2.15k|         w.store_le2(&W[6], &W2[r + 22]);
   92|       |
   93|  2.15k|         w = sha512_next_w(WS) + SIMD_4x64::broadcast_2x64(&SHA512_K[r + 24]);
   94|  2.15k|         SHA2_64_F(A, B, C, D, E, F, G, H, W[8]);
   95|  2.15k|         SHA2_64_F(H, A, B, C, D, E, F, G, W[9]);
   96|  2.15k|         w.store_le2(&W[8], &W2[r + 24]);
   97|       |
   98|  2.15k|         w = sha512_next_w(WS) + SIMD_4x64::broadcast_2x64(&SHA512_K[r + 26]);
   99|  2.15k|         SHA2_64_F(G, H, A, B, C, D, E, F, W[10]);
  100|  2.15k|         SHA2_64_F(F, G, H, A, B, C, D, E, W[11]);
  101|  2.15k|         w.store_le2(&W[10], &W2[r + 26]);
  102|       |
  103|  2.15k|         w = sha512_next_w(WS) + SIMD_4x64::broadcast_2x64(&SHA512_K[r + 28]);
  104|  2.15k|         SHA2_64_F(E, F, G, H, A, B, C, D, W[12]);
  105|  2.15k|         SHA2_64_F(D, E, F, G, H, A, B, C, W[13]);
  106|  2.15k|         w.store_le2(&W[12], &W2[r + 28]);
  107|       |
  108|  2.15k|         w = sha512_next_w(WS) + SIMD_4x64::broadcast_2x64(&SHA512_K[r + 30]);
  109|  2.15k|         SHA2_64_F(C, D, E, F, G, H, A, B, W[14]);
  110|  2.15k|         SHA2_64_F(B, C, D, E, F, G, H, A, W[15]);
  111|  2.15k|         w.store_le2(&W[14], &W2[r + 30]);
  112|  2.15k|      }
  113|       |
  114|       |      // Final 16 rounds of SHA-512
  115|    538|      SHA2_64_F(A, B, C, D, E, F, G, H, W[0]);
  116|    538|      SHA2_64_F(H, A, B, C, D, E, F, G, W[1]);
  117|    538|      SHA2_64_F(G, H, A, B, C, D, E, F, W[2]);
  118|    538|      SHA2_64_F(F, G, H, A, B, C, D, E, W[3]);
  119|    538|      SHA2_64_F(E, F, G, H, A, B, C, D, W[4]);
  120|    538|      SHA2_64_F(D, E, F, G, H, A, B, C, W[5]);
  121|    538|      SHA2_64_F(C, D, E, F, G, H, A, B, W[6]);
  122|    538|      SHA2_64_F(B, C, D, E, F, G, H, A, W[7]);
  123|    538|      SHA2_64_F(A, B, C, D, E, F, G, H, W[8]);
  124|    538|      SHA2_64_F(H, A, B, C, D, E, F, G, W[9]);
  125|    538|      SHA2_64_F(G, H, A, B, C, D, E, F, W[10]);
  126|    538|      SHA2_64_F(F, G, H, A, B, C, D, E, W[11]);
  127|    538|      SHA2_64_F(E, F, G, H, A, B, C, D, W[12]);
  128|    538|      SHA2_64_F(D, E, F, G, H, A, B, C, W[13]);
  129|    538|      SHA2_64_F(C, D, E, F, G, H, A, B, W[14]);
  130|    538|      SHA2_64_F(B, C, D, E, F, G, H, A, W[15]);
  131|       |
  132|    538|      A = (digest[0] += A);
  133|    538|      B = (digest[1] += B);
  134|    538|      C = (digest[2] += C);
  135|    538|      D = (digest[3] += D);
  136|    538|      E = (digest[4] += E);
  137|    538|      F = (digest[5] += F);
  138|    538|      G = (digest[6] += G);
  139|    538|      H = (digest[7] += H);
  140|       |
  141|       |      // Second block of SHA-512 compression, with pre-expanded message
  142|    538|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[0]);
  143|    538|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[1]);
  144|    538|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[2]);
  145|    538|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[3]);
  146|    538|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[4]);
  147|    538|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[5]);
  148|    538|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[6]);
  149|    538|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[7]);
  150|    538|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[8]);
  151|    538|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[9]);
  152|    538|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[10]);
  153|    538|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[11]);
  154|    538|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[12]);
  155|    538|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[13]);
  156|    538|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[14]);
  157|    538|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[15]);
  158|       |
  159|    538|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[16]);
  160|    538|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[17]);
  161|    538|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[18]);
  162|    538|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[19]);
  163|    538|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[20]);
  164|    538|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[21]);
  165|    538|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[22]);
  166|    538|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[23]);
  167|    538|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[24]);
  168|    538|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[25]);
  169|    538|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[26]);
  170|    538|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[27]);
  171|    538|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[28]);
  172|    538|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[29]);
  173|    538|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[30]);
  174|    538|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[31]);
  175|       |
  176|    538|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[32]);
  177|    538|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[33]);
  178|    538|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[34]);
  179|    538|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[35]);
  180|    538|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[36]);
  181|    538|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[37]);
  182|    538|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[38]);
  183|    538|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[39]);
  184|    538|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[40]);
  185|    538|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[41]);
  186|    538|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[42]);
  187|    538|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[43]);
  188|    538|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[44]);
  189|    538|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[45]);
  190|    538|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[46]);
  191|    538|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[47]);
  192|       |
  193|    538|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[48]);
  194|    538|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[49]);
  195|    538|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[50]);
  196|    538|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[51]);
  197|    538|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[52]);
  198|    538|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[53]);
  199|    538|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[54]);
  200|    538|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[55]);
  201|    538|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[56]);
  202|    538|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[57]);
  203|    538|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[58]);
  204|    538|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[59]);
  205|    538|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[60]);
  206|    538|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[61]);
  207|    538|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[62]);
  208|    538|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[63]);
  209|       |
  210|    538|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[64]);
  211|    538|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[65]);
  212|    538|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[66]);
  213|    538|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[67]);
  214|    538|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[68]);
  215|    538|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[69]);
  216|    538|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[70]);
  217|    538|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[71]);
  218|    538|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[72]);
  219|    538|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[73]);
  220|    538|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[74]);
  221|    538|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[75]);
  222|    538|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[76]);
  223|    538|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[77]);
  224|    538|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[78]);
  225|    538|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[79]);
  226|       |
  227|    538|      A = (digest[0] += A);
  228|    538|      B = (digest[1] += B);
  229|    538|      C = (digest[2] += C);
  230|    538|      D = (digest[3] += D);
  231|    538|      E = (digest[4] += E);
  232|    538|      F = (digest[5] += F);
  233|    538|      G = (digest[6] += G);
  234|    538|      H = (digest[7] += H);
  235|    538|   }
  236|       |
  237|  30.1k|   while(blocks > 0) {
  ------------------
  |  Branch (237:10): [True: 14.9k, False: 15.2k]
  ------------------
  238|  14.9k|      SIMD_2x64 WS[8];
  239|       |
  240|   134k|      for(size_t i = 0; i < 8; i++) {
  ------------------
  |  Branch (240:25): [True: 119k, False: 14.9k]
  ------------------
  241|   119k|         WS[i] = SIMD_2x64::load_be(&data[16 * i]);
  242|   119k|         auto WK = WS[i] + SIMD_2x64::load_le(&SHA512_K[2 * i]);
  243|   119k|         WK.store_le(&W[2 * i]);
  244|   119k|      }
  245|       |
  246|  14.9k|      data += 128;
  247|  14.9k|      blocks -= 1;
  248|       |
  249|       |      // First 64 rounds of SHA-512
  250|  74.9k|      for(size_t r = 0; r != 64; r += 16) {
  ------------------
  |  Branch (250:25): [True: 59.9k, False: 14.9k]
  ------------------
  251|  59.9k|         auto w = sha512_next_w(WS) + SIMD_2x64::load_le(&SHA512_K[r + 16]);
  252|  59.9k|         SHA2_64_F(A, B, C, D, E, F, G, H, W[0]);
  253|  59.9k|         SHA2_64_F(H, A, B, C, D, E, F, G, W[1]);
  254|  59.9k|         w.store_le(&W[0]);
  255|       |
  256|  59.9k|         w = sha512_next_w(WS) + SIMD_2x64::load_le(&SHA512_K[r + 18]);
  257|  59.9k|         SHA2_64_F(G, H, A, B, C, D, E, F, W[2]);
  258|  59.9k|         SHA2_64_F(F, G, H, A, B, C, D, E, W[3]);
  259|  59.9k|         w.store_le(&W[2]);
  260|       |
  261|  59.9k|         w = sha512_next_w(WS) + SIMD_2x64::load_le(&SHA512_K[r + 20]);
  262|  59.9k|         SHA2_64_F(E, F, G, H, A, B, C, D, W[4]);
  263|  59.9k|         SHA2_64_F(D, E, F, G, H, A, B, C, W[5]);
  264|  59.9k|         w.store_le(&W[4]);
  265|       |
  266|  59.9k|         w = sha512_next_w(WS) + SIMD_2x64::load_le(&SHA512_K[r + 22]);
  267|  59.9k|         SHA2_64_F(C, D, E, F, G, H, A, B, W[6]);
  268|  59.9k|         SHA2_64_F(B, C, D, E, F, G, H, A, W[7]);
  269|  59.9k|         w.store_le(&W[6]);
  270|       |
  271|  59.9k|         w = sha512_next_w(WS) + SIMD_2x64::load_le(&SHA512_K[r + 24]);
  272|  59.9k|         SHA2_64_F(A, B, C, D, E, F, G, H, W[8]);
  273|  59.9k|         SHA2_64_F(H, A, B, C, D, E, F, G, W[9]);
  274|  59.9k|         w.store_le(&W[8]);
  275|       |
  276|  59.9k|         w = sha512_next_w(WS) + SIMD_2x64::load_le(&SHA512_K[r + 26]);
  277|  59.9k|         SHA2_64_F(G, H, A, B, C, D, E, F, W[10]);
  278|  59.9k|         SHA2_64_F(F, G, H, A, B, C, D, E, W[11]);
  279|  59.9k|         w.store_le(&W[10]);
  280|       |
  281|  59.9k|         w = sha512_next_w(WS) + SIMD_2x64::load_le(&SHA512_K[r + 28]);
  282|  59.9k|         SHA2_64_F(E, F, G, H, A, B, C, D, W[12]);
  283|  59.9k|         SHA2_64_F(D, E, F, G, H, A, B, C, W[13]);
  284|  59.9k|         w.store_le(&W[12]);
  285|       |
  286|  59.9k|         w = sha512_next_w(WS) + SIMD_2x64::load_le(&SHA512_K[r + 30]);
  287|  59.9k|         SHA2_64_F(C, D, E, F, G, H, A, B, W[14]);
  288|  59.9k|         SHA2_64_F(B, C, D, E, F, G, H, A, W[15]);
  289|  59.9k|         w.store_le(&W[14]);
  290|  59.9k|      }
  291|       |
  292|       |      // Final 16 rounds of SHA-512
  293|  14.9k|      SHA2_64_F(A, B, C, D, E, F, G, H, W[0]);
  294|  14.9k|      SHA2_64_F(H, A, B, C, D, E, F, G, W[1]);
  295|  14.9k|      SHA2_64_F(G, H, A, B, C, D, E, F, W[2]);
  296|  14.9k|      SHA2_64_F(F, G, H, A, B, C, D, E, W[3]);
  297|  14.9k|      SHA2_64_F(E, F, G, H, A, B, C, D, W[4]);
  298|  14.9k|      SHA2_64_F(D, E, F, G, H, A, B, C, W[5]);
  299|  14.9k|      SHA2_64_F(C, D, E, F, G, H, A, B, W[6]);
  300|  14.9k|      SHA2_64_F(B, C, D, E, F, G, H, A, W[7]);
  301|  14.9k|      SHA2_64_F(A, B, C, D, E, F, G, H, W[8]);
  302|  14.9k|      SHA2_64_F(H, A, B, C, D, E, F, G, W[9]);
  303|  14.9k|      SHA2_64_F(G, H, A, B, C, D, E, F, W[10]);
  304|  14.9k|      SHA2_64_F(F, G, H, A, B, C, D, E, W[11]);
  305|  14.9k|      SHA2_64_F(E, F, G, H, A, B, C, D, W[12]);
  306|  14.9k|      SHA2_64_F(D, E, F, G, H, A, B, C, W[13]);
  307|  14.9k|      SHA2_64_F(C, D, E, F, G, H, A, B, W[14]);
  308|  14.9k|      SHA2_64_F(B, C, D, E, F, G, H, A, W[15]);
  309|       |
  310|  14.9k|      A = (digest[0] += A);
  311|  14.9k|      B = (digest[1] += B);
  312|  14.9k|      C = (digest[2] += C);
  313|  14.9k|      D = (digest[3] += D);
  314|  14.9k|      E = (digest[4] += E);
  315|  14.9k|      F = (digest[5] += F);
  316|  14.9k|      G = (digest[6] += G);
  317|  14.9k|      H = (digest[7] += H);
  318|  14.9k|   }
  319|  15.2k|}
sha2_64_avx2.cpp:_ZN5Botan12_GLOBAL__N_113sha512_next_wINS_9SIMD_4x64EEET_PS3_:
   19|  17.2k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_AVX2_BMI2 SIMD_T sha512_next_w(SIMD_T x[8]) {
   20|  17.2k|   auto t0 = SIMD_T::alignr8(x[1], x[0]);
   21|  17.2k|   auto t1 = SIMD_T::alignr8(x[5], x[4]);
   22|       |
   23|  17.2k|   auto s0 = t0.template rotr<1>() ^ t0.template rotr<8>() ^ t0.template shr<7>();
   24|  17.2k|   auto s1 = x[7].template rotr<19>() ^ x[7].template rotr<61>() ^ x[7].template shr<6>();
   25|       |
   26|  17.2k|   auto nx = x[0] + s0 + s1 + t1;
   27|       |
   28|  17.2k|   x[0] = x[1];
   29|  17.2k|   x[1] = x[2];
   30|  17.2k|   x[2] = x[3];
   31|  17.2k|   x[3] = x[4];
   32|  17.2k|   x[4] = x[5];
   33|  17.2k|   x[5] = x[6];
   34|  17.2k|   x[6] = x[7];
   35|  17.2k|   x[7] = nx;
   36|       |
   37|  17.2k|   return x[7];
   38|  17.2k|}
sha2_64_avx2.cpp:_ZN5Botan12_GLOBAL__N_113sha512_next_wINS_9SIMD_2x64EEET_PS3_:
   19|   479k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_AVX2_BMI2 SIMD_T sha512_next_w(SIMD_T x[8]) {
   20|   479k|   auto t0 = SIMD_T::alignr8(x[1], x[0]);
   21|   479k|   auto t1 = SIMD_T::alignr8(x[5], x[4]);
   22|       |
   23|   479k|   auto s0 = t0.template rotr<1>() ^ t0.template rotr<8>() ^ t0.template shr<7>();
   24|   479k|   auto s1 = x[7].template rotr<19>() ^ x[7].template rotr<61>() ^ x[7].template shr<6>();
   25|       |
   26|   479k|   auto nx = x[0] + s0 + s1 + t1;
   27|       |
   28|   479k|   x[0] = x[1];
   29|   479k|   x[1] = x[2];
   30|   479k|   x[2] = x[3];
   31|   479k|   x[3] = x[4];
   32|   479k|   x[4] = x[5];
   33|   479k|   x[5] = x[6];
   34|   479k|   x[6] = x[7];
   35|   479k|   x[7] = nx;
   36|       |
   37|   479k|   return x[7];
   38|   479k|}

_ZN5Botan3KDF6createENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
   73|  1.63k|std::unique_ptr<KDF> KDF::create(std::string_view algo_spec, std::string_view provider) {
   74|  1.63k|   const SCAN_Name req(algo_spec);
   75|       |
   76|  1.63k|#if defined(BOTAN_HAS_HKDF)
   77|  1.63k|   if(req.algo_name() == "HKDF" && req.arg_count() == 1) {
  ------------------
  |  Branch (77:7): [True: 0, False: 1.63k]
  |  Branch (77:36): [True: 0, False: 0]
  ------------------
   78|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (78:10): [True: 0, False: 0]
  |  Branch (78:30): [True: 0, False: 0]
  ------------------
   79|      0|         return kdf_create_mac_or_hash<HKDF>(req.arg(0));
   80|      0|      }
   81|      0|   }
   82|       |
   83|  1.63k|   if(req.algo_name() == "HKDF-Extract" && req.arg_count() == 1) {
  ------------------
  |  Branch (83:7): [True: 0, False: 1.63k]
  |  Branch (83:44): [True: 0, False: 0]
  ------------------
   84|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (84:10): [True: 0, False: 0]
  |  Branch (84:30): [True: 0, False: 0]
  ------------------
   85|      0|         return kdf_create_mac_or_hash<HKDF_Extract>(req.arg(0));
   86|      0|      }
   87|      0|   }
   88|       |
   89|  1.63k|   if(req.algo_name() == "HKDF-Expand" && req.arg_count() == 1) {
  ------------------
  |  Branch (89:7): [True: 0, False: 1.63k]
  |  Branch (89:43): [True: 0, False: 0]
  ------------------
   90|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (90:10): [True: 0, False: 0]
  |  Branch (90:30): [True: 0, False: 0]
  ------------------
   91|      0|         return kdf_create_mac_or_hash<HKDF_Expand>(req.arg(0));
   92|      0|      }
   93|      0|   }
   94|  1.63k|#endif
   95|       |
   96|  1.63k|#if defined(BOTAN_HAS_KDF2)
   97|  1.63k|   if(req.algo_name() == "KDF2" && req.arg_count() == 1) {
  ------------------
  |  Branch (97:7): [True: 0, False: 1.63k]
  |  Branch (97:36): [True: 0, False: 0]
  ------------------
   98|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (98:10): [True: 0, False: 0]
  |  Branch (98:30): [True: 0, False: 0]
  ------------------
   99|      0|         if(auto hash = HashFunction::create(req.arg(0))) {
  ------------------
  |  Branch (99:18): [True: 0, False: 0]
  ------------------
  100|      0|            return std::make_unique<KDF2>(std::move(hash));
  101|      0|         }
  102|      0|      }
  103|      0|   }
  104|  1.63k|#endif
  105|       |
  106|  1.63k|#if defined(BOTAN_HAS_KDF1_18033)
  107|  1.63k|   if(req.algo_name() == "KDF1-18033" && req.arg_count() == 1) {
  ------------------
  |  Branch (107:7): [True: 0, False: 1.63k]
  |  Branch (107:42): [True: 0, False: 0]
  ------------------
  108|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (108:10): [True: 0, False: 0]
  |  Branch (108:30): [True: 0, False: 0]
  ------------------
  109|      0|         if(auto hash = HashFunction::create(req.arg(0))) {
  ------------------
  |  Branch (109:18): [True: 0, False: 0]
  ------------------
  110|      0|            return std::make_unique<KDF1_18033>(std::move(hash));
  111|      0|         }
  112|      0|      }
  113|      0|   }
  114|  1.63k|#endif
  115|       |
  116|  1.63k|#if defined(BOTAN_HAS_KDF1)
  117|  1.63k|   if(req.algo_name() == "KDF1" && req.arg_count() == 1) {
  ------------------
  |  Branch (117:7): [True: 0, False: 1.63k]
  |  Branch (117:36): [True: 0, False: 0]
  ------------------
  118|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (118:10): [True: 0, False: 0]
  |  Branch (118:30): [True: 0, False: 0]
  ------------------
  119|      0|         if(auto hash = HashFunction::create(req.arg(0))) {
  ------------------
  |  Branch (119:18): [True: 0, False: 0]
  ------------------
  120|      0|            return std::make_unique<KDF1>(std::move(hash));
  121|      0|         }
  122|      0|      }
  123|      0|   }
  124|  1.63k|#endif
  125|       |
  126|  1.63k|#if defined(BOTAN_HAS_TLS_V12_PRF)
  127|  1.63k|   if(req.algo_name() == "TLS-12-PRF" && req.arg_count() == 1) {
  ------------------
  |  Branch (127:7): [True: 1.63k, False: 0]
  |  Branch (127:42): [True: 1.63k, False: 0]
  ------------------
  128|  1.63k|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (128:10): [True: 1.63k, False: 0]
  |  Branch (128:30): [True: 0, False: 0]
  ------------------
  129|  1.63k|         return kdf_create_mac_or_hash<TLS_12_PRF>(req.arg(0));
  130|  1.63k|      }
  131|  1.63k|   }
  132|      0|#endif
  133|       |
  134|      0|#if defined(BOTAN_HAS_X942_PRF)
  135|      0|   if(req.algo_name() == "X9.42-PRF" && req.arg_count() == 1) {
  ------------------
  |  Branch (135:7): [True: 0, False: 0]
  |  Branch (135:41): [True: 0, False: 0]
  ------------------
  136|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (136:10): [True: 0, False: 0]
  |  Branch (136:30): [True: 0, False: 0]
  ------------------
  137|      0|         return std::make_unique<X942_PRF>(req.arg(0));
  138|      0|      }
  139|      0|   }
  140|      0|#endif
  141|       |
  142|      0|#if defined(BOTAN_HAS_SP800_108)
  143|      0|   if(req.algo_name() == "SP800-108-Counter" && req.arg_count_between(1, 3)) {
  ------------------
  |  Branch (143:7): [True: 0, False: 0]
  |  Branch (143:49): [True: 0, False: 0]
  ------------------
  144|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (144:10): [True: 0, False: 0]
  |  Branch (144:30): [True: 0, False: 0]
  ------------------
  145|      0|         return kdf_create_mac_or_hash<SP800_108_Counter>(
  146|      0|            req.arg(0), req.arg_as_integer(1, 32), req.arg_as_integer(2, 32));
  147|      0|      }
  148|      0|   }
  149|       |
  150|      0|   if(req.algo_name() == "SP800-108-Feedback" && req.arg_count_between(1, 3)) {
  ------------------
  |  Branch (150:7): [True: 0, False: 0]
  |  Branch (150:50): [True: 0, False: 0]
  ------------------
  151|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (151:10): [True: 0, False: 0]
  |  Branch (151:30): [True: 0, False: 0]
  ------------------
  152|      0|         return kdf_create_mac_or_hash<SP800_108_Feedback>(
  153|      0|            req.arg(0), req.arg_as_integer(1, 32), req.arg_as_integer(2, 32));
  154|      0|      }
  155|      0|   }
  156|       |
  157|      0|   if(req.algo_name() == "SP800-108-Pipeline" && req.arg_count_between(1, 3)) {
  ------------------
  |  Branch (157:7): [True: 0, False: 0]
  |  Branch (157:50): [True: 0, False: 0]
  ------------------
  158|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (158:10): [True: 0, False: 0]
  |  Branch (158:30): [True: 0, False: 0]
  ------------------
  159|      0|         return kdf_create_mac_or_hash<SP800_108_Pipeline>(
  160|      0|            req.arg(0), req.arg_as_integer(1, 32), req.arg_as_integer(2, 32));
  161|      0|      }
  162|      0|   }
  163|      0|#endif
  164|       |
  165|      0|#if defined(BOTAN_HAS_SP800_56A)
  166|      0|   if(req.algo_name() == "SP800-56A" && req.arg_count() == 1) {
  ------------------
  |  Branch (166:7): [True: 0, False: 0]
  |  Branch (166:41): [True: 0, False: 0]
  ------------------
  167|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (167:10): [True: 0, False: 0]
  |  Branch (167:30): [True: 0, False: 0]
  ------------------
  168|      0|         if(auto hash = HashFunction::create(req.arg(0))) {
  ------------------
  |  Branch (168:18): [True: 0, False: 0]
  ------------------
  169|      0|            return std::make_unique<SP800_56C_One_Step_Hash>(std::move(hash));
  170|      0|         }
  171|      0|         if(req.arg(0) == "KMAC-128") {
  ------------------
  |  Branch (171:13): [True: 0, False: 0]
  ------------------
  172|      0|            return std::make_unique<SP800_56C_One_Step_KMAC128>();
  173|      0|         }
  174|      0|         if(req.arg(0) == "KMAC-256") {
  ------------------
  |  Branch (174:13): [True: 0, False: 0]
  ------------------
  175|      0|            return std::make_unique<SP800_56C_One_Step_KMAC256>();
  176|      0|         }
  177|      0|         if(auto mac = MessageAuthenticationCode::create(req.arg(0))) {
  ------------------
  |  Branch (177:18): [True: 0, False: 0]
  ------------------
  178|      0|            return std::make_unique<SP800_56C_One_Step_HMAC>(std::move(mac));
  179|      0|         }
  180|      0|      }
  181|      0|   }
  182|      0|#endif
  183|       |
  184|      0|#if defined(BOTAN_HAS_SP800_56C)
  185|      0|   if(req.algo_name() == "SP800-56C" && req.arg_count() == 1) {
  ------------------
  |  Branch (185:7): [True: 0, False: 0]
  |  Branch (185:41): [True: 0, False: 0]
  ------------------
  186|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (186:10): [True: 0, False: 0]
  |  Branch (186:30): [True: 0, False: 0]
  ------------------
  187|      0|         std::unique_ptr<KDF> exp(kdf_create_mac_or_hash<SP800_108_Feedback>(req.arg(0), 32, 32));
  188|      0|         if(exp) {
  ------------------
  |  Branch (188:13): [True: 0, False: 0]
  ------------------
  189|      0|            if(auto mac = MessageAuthenticationCode::create(fmt("HMAC({})", req.arg(0)))) {
  ------------------
  |  Branch (189:21): [True: 0, False: 0]
  ------------------
  190|      0|               return std::make_unique<SP800_56C_Two_Step>(std::move(mac), std::move(exp));
  191|      0|            }
  192|       |
  193|      0|            if(auto mac = MessageAuthenticationCode::create(req.arg(0))) {
  ------------------
  |  Branch (193:21): [True: 0, False: 0]
  ------------------
  194|      0|               return std::make_unique<SP800_56C_Two_Step>(std::move(mac), std::move(exp));
  195|      0|            }
  196|      0|         }
  197|      0|      }
  198|      0|   }
  199|      0|#endif
  200|       |
  201|      0|   BOTAN_UNUSED(req);
  ------------------
  |  |  151|      0|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  202|      0|   BOTAN_UNUSED(provider);
  ------------------
  |  |  151|      0|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  203|       |
  204|      0|   return nullptr;
  205|      0|}
_ZN5Botan3KDF15create_or_throwENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
  208|  1.63k|std::unique_ptr<KDF> KDF::create_or_throw(std::string_view algo, std::string_view provider) {
  209|  1.63k|   if(auto kdf = KDF::create(algo, provider)) {
  ------------------
  |  Branch (209:12): [True: 1.63k, False: 0]
  ------------------
  210|  1.63k|      return kdf;
  211|  1.63k|   }
  212|      0|   throw Lookup_Error("KDF", algo, provider);
  213|  1.63k|}
kdf.cpp:_ZN5Botan12_GLOBAL__N_122kdf_create_mac_or_hashINS_10TLS_12_PRFEJEEENSt3__110unique_ptrINS_3KDFENS3_14default_deleteIS5_EEEENS3_17basic_string_viewIcNS3_11char_traitsIcEEEEDpOT0_:
   59|  1.63k|std::unique_ptr<KDF> kdf_create_mac_or_hash(std::string_view nm, ParamTs&&... params) {
   60|  1.63k|   if(auto mac = MessageAuthenticationCode::create(fmt("HMAC({})", nm))) {
  ------------------
  |  Branch (60:12): [True: 1.63k, False: 0]
  ------------------
   61|  1.63k|      return std::make_unique<KDF_Type>(std::move(mac), std::forward<ParamTs>(params)...);
   62|  1.63k|   }
   63|       |
   64|      0|   if(auto mac = MessageAuthenticationCode::create(nm)) {
  ------------------
  |  Branch (64:12): [True: 0, False: 0]
  ------------------
   65|      0|      return std::make_unique<KDF_Type>(std::move(mac), std::forward<ParamTs>(params)...);
   66|      0|   }
   67|       |
   68|      0|   return nullptr;
   69|      0|}

_ZNK5Botan10TLS_12_PRF11perform_kdfENSt3__14spanIhLm18446744073709551615EEENS2_IKhLm18446744073709551615EEES5_S5_:
   24|  3.10k|                             std::span<const uint8_t> label) const {
   25|  3.10k|   try {
   26|  3.10k|      m_mac->set_key(secret);
   27|  3.10k|   } catch(Invalid_Key_Length&) {
   28|      0|      throw Internal_Error(fmt("The premaster secret of {} bytes is too long for TLS-PRF", secret.size()));
   29|      0|   }
   30|       |
   31|  3.10k|   auto A = concat<secure_vector<uint8_t>>(label, salt);
   32|  3.10k|   secure_vector<uint8_t> h;
   33|       |
   34|  3.10k|   BufferStuffer o(key);
   35|  10.4k|   while(!o.full()) {
  ------------------
  |  Branch (35:10): [True: 7.30k, False: 3.10k]
  ------------------
   36|  7.30k|      A = m_mac->process(A);
   37|       |
   38|  7.30k|      m_mac->update(A);
   39|  7.30k|      m_mac->update(label);
   40|  7.30k|      m_mac->update(salt);
   41|  7.30k|      m_mac->final(h);
   42|       |
   43|  7.30k|      const size_t writing = std::min(h.size(), o.remaining_capacity());
   44|  7.30k|      o.append(std::span{h}.first(writing));
   45|  7.30k|   }
   46|  3.10k|}

_ZN5Botan4HMAC8add_dataENSt3__14spanIKhLm18446744073709551615EEE:
   21|  29.7k|void HMAC::add_data(std::span<const uint8_t> input) {
   22|  29.7k|   assert_key_material_set();
   23|  29.7k|   m_hash->update(input);
   24|  29.7k|}
_ZN5Botan4HMAC12final_resultENSt3__14spanIhLm18446744073709551615EEE:
   29|  14.8k|void HMAC::final_result(std::span<uint8_t> mac) {
   30|  14.8k|   assert_key_material_set();
   31|  14.8k|   m_hash->final(mac);
   32|  14.8k|   m_hash->update(m_okey);
   33|  14.8k|   m_hash->update(mac.first(m_hash_output_length));
   34|  14.8k|   m_hash->final(mac);
   35|  14.8k|   m_hash->update(m_ikey);
   36|  14.8k|}
_ZNK5Botan4HMAC8key_specEv:
   48|  3.51k|Key_Length_Specification HMAC::key_spec() const {
   49|       |   // Support very long lengths for things like PBKDF2 and the TLS PRF
   50|  3.51k|   return Key_Length_Specification(0, 8192);
   51|  3.51k|}
_ZNK5Botan4HMAC13output_lengthEv:
   53|  15.0k|size_t HMAC::output_length() const {
   54|  15.0k|   return m_hash_output_length;
   55|  15.0k|}
_ZNK5Botan4HMAC19has_keying_materialEv:
   57|  44.5k|bool HMAC::has_keying_material() const {
   58|  44.5k|   return !m_okey.empty();
   59|  44.5k|}
_ZN5Botan4HMAC12key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
   64|  3.31k|void HMAC::key_schedule(std::span<const uint8_t> key) {
   65|  3.31k|   const uint8_t ipad = 0x36;
   66|  3.31k|   const uint8_t opad = 0x5C;
   67|       |
   68|  3.31k|   m_hash->clear();
   69|       |
   70|  3.31k|   m_ikey.resize(m_hash_block_size);
   71|  3.31k|   m_okey.resize(m_hash_block_size);
   72|       |
   73|  3.31k|   clear_mem(m_ikey.data(), m_ikey.size());
   74|  3.31k|   clear_mem(m_okey.data(), m_okey.size());
   75|       |
   76|       |   /*
   77|       |   * Sometimes the HMAC key length itself is sensitive, as with PBKDF2 where it
   78|       |   * reveals the length of the passphrase. Make some attempt to hide this to
   79|       |   * side channels. Clearly if the secret is longer than the block size then the
   80|       |   * branch to hash first reveals that. In addition, counting the number of
   81|       |   * compression functions executed reveals the size at the granularity of the
   82|       |   * hash function's block size.
   83|       |   *
   84|       |   * The greater concern is for smaller keys; being able to detect when a
   85|       |   * passphrase is say 4 bytes may assist choosing weaker targets. Even though
   86|       |   * the loop bounds are constant, we can only actually read key[0..length] so
   87|       |   * it doesn't seem possible to make this computation truly constant time.
   88|       |   *
   89|       |   * We don't mind leaking if the length is exactly zero since that's
   90|       |   * trivial to simply check.
   91|       |   */
   92|       |
   93|  3.31k|   if(key.size() > m_hash_block_size) {
  ------------------
  |  Branch (93:7): [True: 459, False: 2.85k]
  ------------------
   94|    459|      m_hash->update(key);
   95|    459|      m_hash->final(m_ikey.data());
   96|  2.85k|   } else if(key.size() >= 20) {
  ------------------
  |  Branch (96:14): [True: 2.85k, False: 0]
  ------------------
   97|       |      // For long keys we just leak the length either it is a cryptovariable
   98|       |      // or a long enough password that just the length is not a useful signal
   99|  2.85k|      copy_mem(std::span{m_ikey}.first(key.size()), key);
  100|  2.85k|   } else if(!key.empty()) {
  ------------------
  |  Branch (100:14): [True: 0, False: 0]
  ------------------
  101|      0|      for(size_t i = 0, i_mod_length = 0; i != m_hash_block_size; ++i) {
  ------------------
  |  Branch (101:43): [True: 0, False: 0]
  ------------------
  102|       |         /*
  103|       |         access key[i % length] but avoiding division due to variable
  104|       |         time computation on some processors.
  105|       |         */
  106|      0|         auto needs_reduction = CT::Mask<size_t>::is_lte(key.size(), i_mod_length);
  107|      0|         i_mod_length = needs_reduction.select(0, i_mod_length);
  108|      0|         const uint8_t kb = key[i_mod_length];
  109|       |
  110|      0|         auto in_range = CT::Mask<size_t>::is_lt(i, key.size());
  111|      0|         m_ikey[i] = static_cast<uint8_t>(in_range.if_set_return(kb));
  112|      0|         i_mod_length += 1;
  113|      0|      }
  114|      0|   }
  115|       |
  116|   263k|   for(size_t i = 0; i != m_hash_block_size; ++i) {
  ------------------
  |  Branch (116:22): [True: 260k, False: 3.31k]
  ------------------
  117|   260k|      m_ikey[i] ^= ipad;
  118|   260k|      m_okey[i] = m_ikey[i] ^ ipad ^ opad;
  119|   260k|   }
  120|       |
  121|  3.31k|   m_hash->update(m_ikey);
  122|  3.31k|}
_ZNK5Botan4HMAC4nameEv:
  136|    314|std::string HMAC::name() const {
  137|    314|   return fmt("HMAC({})", m_hash->name());
  138|    314|}
_ZN5Botan4HMACC2ENSt3__110unique_ptrINS_12HashFunctionENS1_14default_deleteIS3_EEEE:
  151|  1.83k|      m_hash(std::move(hash)),
  152|  1.83k|      m_hash_output_length(m_hash->output_length()),
  153|  1.83k|      m_hash_block_size(m_hash->hash_block_size()) {
  154|  1.83k|   BOTAN_ARG_CHECK(m_hash_output_length >= 8, "HMAC is not compatible with this hash function");
  ------------------
  |  |   35|  1.83k|   do {                                                          \
  |  |   36|  1.83k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  1.83k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 1.83k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.83k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.83k]
  |  |  ------------------
  ------------------
  155|  1.83k|   BOTAN_ARG_CHECK(m_hash_block_size >= m_hash_output_length, "HMAC is not compatible with this hash function");
  ------------------
  |  |   35|  1.83k|   do {                                                          \
  |  |   36|  1.83k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  1.83k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 1.83k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.83k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.83k]
  |  |  ------------------
  ------------------
  156|  1.83k|}

_ZN5Botan25MessageAuthenticationCode6createENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
   51|  1.83k|                                                                             std::string_view provider) {
   52|  1.83k|   const SCAN_Name req(algo_spec);
   53|       |
   54|  1.83k|#if defined(BOTAN_HAS_BLAKE2BMAC)
   55|  1.83k|   if(req.algo_name() == "Blake2b" || req.algo_name() == "BLAKE2b") {
  ------------------
  |  Branch (55:7): [True: 0, False: 1.83k]
  |  Branch (55:39): [True: 0, False: 1.83k]
  ------------------
   56|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (56:10): [True: 0, False: 0]
  |  Branch (56:30): [True: 0, False: 0]
  ------------------
   57|      0|         return std::make_unique<BLAKE2bMAC>(req.arg_as_integer(0, 512));
   58|      0|      }
   59|      0|   }
   60|  1.83k|#endif
   61|       |
   62|  1.83k|#if defined(BOTAN_HAS_GMAC)
   63|  1.83k|   if(req.algo_name() == "GMAC" && req.arg_count() == 1) {
  ------------------
  |  Branch (63:7): [True: 0, False: 1.83k]
  |  Branch (63:36): [True: 0, False: 0]
  ------------------
   64|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (64:10): [True: 0, False: 0]
  |  Branch (64:30): [True: 0, False: 0]
  ------------------
   65|      0|         if(auto bc = BlockCipher::create(req.arg(0))) {
  ------------------
  |  Branch (65:18): [True: 0, False: 0]
  ------------------
   66|      0|            return std::make_unique<GMAC>(std::move(bc));
   67|      0|         }
   68|      0|      }
   69|      0|   }
   70|  1.83k|#endif
   71|       |
   72|  1.83k|#if defined(BOTAN_HAS_HMAC)
   73|  1.83k|   if(req.algo_name() == "HMAC" && req.arg_count() == 1) {
  ------------------
  |  Branch (73:7): [True: 1.83k, False: 0]
  |  Branch (73:36): [True: 1.83k, False: 0]
  ------------------
   74|  1.83k|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (74:10): [True: 1.83k, False: 0]
  |  Branch (74:30): [True: 0, False: 0]
  ------------------
   75|  1.83k|         if(auto hash = HashFunction::create(req.arg(0))) {
  ------------------
  |  Branch (75:18): [True: 1.83k, False: 0]
  ------------------
   76|  1.83k|            return std::make_unique<HMAC>(std::move(hash));
   77|  1.83k|         }
   78|  1.83k|      }
   79|  1.83k|   }
   80|      0|#endif
   81|       |
   82|      0|#if defined(BOTAN_HAS_POLY1305)
   83|      0|   if(req.algo_name() == "Poly1305" && req.arg_count() == 0) {
  ------------------
  |  Branch (83:7): [True: 0, False: 0]
  |  Branch (83:40): [True: 0, False: 0]
  ------------------
   84|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (84:10): [True: 0, False: 0]
  |  Branch (84:30): [True: 0, False: 0]
  ------------------
   85|      0|         return std::make_unique<Poly1305>();
   86|      0|      }
   87|      0|   }
   88|      0|#endif
   89|       |
   90|      0|#if defined(BOTAN_HAS_SIPHASH)
   91|      0|   if(req.algo_name() == "SipHash") {
  ------------------
  |  Branch (91:7): [True: 0, False: 0]
  ------------------
   92|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (92:10): [True: 0, False: 0]
  |  Branch (92:30): [True: 0, False: 0]
  ------------------
   93|      0|         return std::make_unique<SipHash>(req.arg_as_integer(0, 2), req.arg_as_integer(1, 4));
   94|      0|      }
   95|      0|   }
   96|      0|#endif
   97|       |
   98|      0|#if defined(BOTAN_HAS_CMAC)
   99|      0|   if((req.algo_name() == "CMAC" || req.algo_name() == "OMAC") && req.arg_count() == 1) {
  ------------------
  |  Branch (99:8): [True: 0, False: 0]
  |  Branch (99:37): [True: 0, False: 0]
  |  Branch (99:67): [True: 0, False: 0]
  ------------------
  100|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (100:10): [True: 0, False: 0]
  |  Branch (100:30): [True: 0, False: 0]
  ------------------
  101|      0|         if(auto bc = BlockCipher::create(req.arg(0))) {
  ------------------
  |  Branch (101:18): [True: 0, False: 0]
  ------------------
  102|      0|            return std::make_unique<CMAC>(std::move(bc));
  103|      0|         }
  104|      0|      }
  105|      0|   }
  106|      0|#endif
  107|       |
  108|      0|#if defined(BOTAN_HAS_ANSI_X919_MAC)
  109|      0|   if(req.algo_name() == "X9.19-MAC") {
  ------------------
  |  Branch (109:7): [True: 0, False: 0]
  ------------------
  110|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (110:10): [True: 0, False: 0]
  |  Branch (110:30): [True: 0, False: 0]
  ------------------
  111|      0|         return std::make_unique<ANSI_X919_MAC>();
  112|      0|      }
  113|      0|   }
  114|      0|#endif
  115|       |
  116|      0|#if defined(BOTAN_HAS_KMAC)
  117|      0|   if(req.algo_name() == "KMAC-128") {
  ------------------
  |  Branch (117:7): [True: 0, False: 0]
  ------------------
  118|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (118:10): [True: 0, False: 0]
  |  Branch (118:30): [True: 0, False: 0]
  ------------------
  119|      0|         if(req.arg_count() != 1) {
  ------------------
  |  Branch (119:13): [True: 0, False: 0]
  ------------------
  120|      0|            throw Invalid_Argument(
  121|      0|               "invalid algorithm specification for KMAC-128: need exactly one argument for output bit length");
  122|      0|         }
  123|      0|         return std::make_unique<KMAC128>(req.arg_as_integer(0));
  124|      0|      }
  125|      0|   }
  126|       |
  127|      0|   if(req.algo_name() == "KMAC-256") {
  ------------------
  |  Branch (127:7): [True: 0, False: 0]
  ------------------
  128|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (128:10): [True: 0, False: 0]
  |  Branch (128:30): [True: 0, False: 0]
  ------------------
  129|      0|         if(req.arg_count() != 1) {
  ------------------
  |  Branch (129:13): [True: 0, False: 0]
  ------------------
  130|      0|            throw Invalid_Argument(
  131|      0|               "invalid algorithm specification for KMAC-256: need exactly one argument for output bit length");
  132|      0|         }
  133|      0|         return std::make_unique<KMAC256>(req.arg_as_integer(0));
  134|      0|      }
  135|      0|   }
  136|      0|#endif
  137|       |
  138|      0|   BOTAN_UNUSED(req);
  ------------------
  |  |  151|      0|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  139|      0|   BOTAN_UNUSED(provider);
  ------------------
  |  |  151|      0|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  140|       |
  141|      0|   return nullptr;
  142|      0|}
_ZN5Botan25MessageAuthenticationCode15create_or_throwENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
  150|    208|                                                                                      std::string_view provider) {
  151|    208|   if(auto mac = MessageAuthenticationCode::create(algo, provider)) {
  ------------------
  |  Branch (151:12): [True: 208, False: 0]
  ------------------
  152|    208|      return mac;
  153|    208|   }
  154|      0|   throw Lookup_Error("MAC", algo, provider);
  155|    208|}

_ZN5Botan6BigInt17from_radix_digitsENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEm:
  125|     36|BigInt BigInt::from_radix_digits(std::string_view digits, size_t radix) {
  126|     36|   if(radix == 16) {
  ------------------
  |  Branch (126:7): [True: 36, False: 0]
  ------------------
  127|     36|      secure_vector<uint8_t> binary;
  128|       |
  129|     36|      if(digits.size() % 2 == 1) {
  ------------------
  |  Branch (129:10): [True: 5, False: 31]
  ------------------
  130|       |         // Handle lack of leading 0
  131|      5|         const char buf0_with_leading_0[2] = {'0', digits[0]};
  132|       |
  133|      5|         binary = hex_decode_locked(buf0_with_leading_0, 2);
  134|       |
  135|      5|         if(digits.size() > 1) {
  ------------------
  |  Branch (135:13): [True: 5, False: 0]
  ------------------
  136|      5|            binary += hex_decode_locked(&digits[1], digits.size() - 1, false);
  137|      5|         }
  138|     31|      } else {
  139|     31|         binary = hex_decode_locked(digits, false);
  140|     31|      }
  141|       |
  142|     36|      return BigInt::from_bytes(binary);
  143|     36|   } else if(radix == 10) {
  ------------------
  |  Branch (143:14): [True: 0, False: 0]
  ------------------
  144|       |      // Use the largest power of 10 that fits in a word, accumulating
  145|       |      // groups of digits into word-sized chunks to minimize the number
  146|       |      // of multiprecision multiplications.
  147|      0|      constexpr word conversion_radix = decimal_conversion_radix();
  148|      0|      constexpr size_t radix_digits = decimal_conversion_radix_digits();
  149|       |
  150|      0|      BigInt r;
  151|       |
  152|       |      // Handle the initial partial block (if digit count is not a multiple of radix_digits)
  153|      0|      const size_t partial_block = digits.size() % radix_digits;
  154|       |
  155|      0|      if(partial_block > 0) {
  ------------------
  |  Branch (155:10): [True: 0, False: 0]
  ------------------
  156|      0|         word acc = 0;
  157|      0|         for(size_t i = 0; i < partial_block; ++i) {
  ------------------
  |  Branch (157:28): [True: 0, False: 0]
  ------------------
  158|      0|            const char c = digits[i];
  159|      0|            BOTAN_ARG_CHECK(c >= '0' && c <= '9', "Invalid decimal character");
  ------------------
  |  |   35|      0|   do {                                                          \
  |  |   36|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|      0|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 0, False: 0]
  |  |  |  Branch (37:12): [True: 0, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  160|      0|            acc = acc * 10 + static_cast<word>(c - '0');
  161|      0|         }
  162|      0|         r += acc;
  163|      0|      }
  164|       |
  165|       |      // Process full blocks of radix_digits
  166|      0|      for(size_t i = partial_block; i != digits.size(); i += radix_digits) {
  ------------------
  |  Branch (166:37): [True: 0, False: 0]
  ------------------
  167|      0|         word acc = 0;
  168|      0|         for(size_t j = 0; j < radix_digits; ++j) {
  ------------------
  |  Branch (168:28): [True: 0, False: 0]
  ------------------
  169|      0|            const char c = digits[i + j];
  170|      0|            BOTAN_ARG_CHECK(c >= '0' && c <= '9', "Invalid decimal character");
  ------------------
  |  |   35|      0|   do {                                                          \
  |  |   36|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|      0|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 0, False: 0]
  |  |  |  Branch (37:12): [True: 0, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  171|      0|            acc = acc * 10 + static_cast<word>(c - '0');
  172|      0|         }
  173|      0|         r *= conversion_radix;
  174|      0|         r += acc;
  175|      0|      }
  176|       |
  177|      0|      return r;
  178|      0|   } else {
  179|      0|      throw Invalid_Argument("BigInt::from_radix_digits unknown radix");
  180|      0|   }
  181|     36|}

_ZN5Botan6BigInt4add2ERKS0_PKmmNS0_4SignE:
   20|     18|BigInt BigInt::add2(const BigInt& x, const word y[], size_t y_size, BigInt::Sign y_sign) {
   21|     18|   const size_t x_sw = x.sig_words();
   22|       |
   23|     18|   BigInt z = BigInt::with_capacity(std::max(x_sw, y_size) + 1);
   24|       |
   25|     18|   if(x.sign() == y_sign) {
  ------------------
  |  Branch (25:7): [True: 12, False: 6]
  ------------------
   26|     12|      const word carry = bigint_add3(z.mutable_data(), x._data(), x_sw, y, y_size);
   27|     12|      z.mutable_data()[std::max(x_sw, y_size)] += carry;
   28|     12|      z.set_sign(x.sign());
   29|     12|   } else {
   30|      6|      const int32_t relative_size = bigint_cmp(x.data(), x_sw, y, y_size);
   31|       |
   32|      6|      if(relative_size < 0) {
  ------------------
  |  Branch (32:10): [True: 0, False: 6]
  ------------------
   33|       |         // x < y so z = abs(y - x)
   34|       |         // NOLINTNEXTLINE(*-suspicious-call-argument) intentionally swapping x and y here
   35|      0|         bigint_sub3(z.mutable_data(), y, y_size, x.data(), x_sw);
   36|      0|         z.set_sign(y_sign);
   37|      6|      } else if(relative_size == 0) {
  ------------------
  |  Branch (37:17): [True: 0, False: 6]
  ------------------
   38|       |         // Positive zero (nothing to do in this case)
   39|      6|      } else {
   40|       |         /*
   41|       |         * We know at this point that x >= y so if y_size is larger than
   42|       |         * x_sw, we are guaranteed they are just leading zeros which can
   43|       |         * be ignored
   44|       |         */
   45|      6|         y_size = std::min(x_sw, y_size);
   46|      6|         bigint_sub3(z.mutable_data(), x.data(), x_sw, y, y_size);
   47|      6|         z.set_sign(x.sign());
   48|      6|      }
   49|      6|   }
   50|       |
   51|     18|   return z;
   52|     18|}

_ZN5Botan6BigIntC2Em:
   19|  11.9k|BigInt::BigInt(uint64_t n) {
   20|  11.9k|   if constexpr(sizeof(word) == 8) {
   21|  11.9k|      m_data.set_word_at(0, static_cast<word>(n));
   22|       |   } else {
   23|       |      m_data.set_word_at(1, static_cast<word>(n >> 32));
   24|       |      m_data.set_word_at(0, static_cast<word>(n));
   25|       |   }
   26|  11.9k|}
_ZN5Botan6BigInt8from_u64Em:
   29|  11.9k|BigInt BigInt::from_u64(uint64_t n) {
   30|  11.9k|   return BigInt(n);
   31|  11.9k|}
_ZN5Botan6BigInt13with_capacityEm:
   50|     30|BigInt BigInt::with_capacity(size_t size) {
   51|     30|   BigInt bn;
   52|     30|   bn.grow_to(size);
   53|     30|   return bn;
   54|     30|}
_ZN5Botan6BigInt11from_stringENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   56|     36|BigInt BigInt::from_string(std::string_view str) {
   57|     36|   size_t prefix_bytes = 0;
   58|     36|   bool negative = false;
   59|     36|   size_t radix = 10;
   60|       |
   61|     36|   if(!str.empty() && str[0] == '-') {
  ------------------
  |  Branch (61:7): [True: 36, False: 0]
  |  Branch (61:23): [True: 0, False: 36]
  ------------------
   62|      0|      prefix_bytes += 1;
   63|      0|      negative = true;
   64|      0|   }
   65|       |
   66|     36|   if(str.length() > prefix_bytes + 2 && str[prefix_bytes] == '0' && str[prefix_bytes + 1] == 'x') {
  ------------------
  |  Branch (66:7): [True: 36, False: 0]
  |  Branch (66:42): [True: 36, False: 0]
  |  Branch (66:70): [True: 36, False: 0]
  ------------------
   67|     36|      prefix_bytes += 2;
   68|     36|      radix = 16;
   69|     36|   }
   70|       |
   71|     36|   BigInt r = BigInt::from_radix_digits(str.substr(prefix_bytes), radix);
   72|       |
   73|     36|   if(negative) {
  ------------------
  |  Branch (73:7): [True: 0, False: 36]
  ------------------
   74|      0|      r.set_sign(Negative);
   75|     36|   } else {
   76|     36|      r.set_sign(Positive);
   77|     36|   }
   78|       |
   79|     36|   return r;
   80|     36|}
_ZN5Botan6BigInt10from_bytesENSt3__14spanIKhLm18446744073709551615EEE:
   82|  30.4k|BigInt BigInt::from_bytes(std::span<const uint8_t> input) {
   83|  30.4k|   BigInt r;
   84|  30.4k|   r.assign_from_bytes(input);
   85|  30.4k|   return r;
   86|  30.4k|}
_ZNK5Botan6BigInt7byte_atEm:
  117|  77.8k|uint8_t BigInt::byte_at(size_t n) const {
  118|  77.8k|   return get_byte_var(sizeof(word) - (n % sizeof(word)) - 1, word_at(n / sizeof(word)));
  119|  77.8k|}
_ZNK5Botan6BigInt8cmp_wordEm:
  121|  39.8k|int32_t BigInt::cmp_word(word other) const {
  122|  39.8k|   if(signum() < 0) {
  ------------------
  |  Branch (122:7): [True: 19, False: 39.8k]
  ------------------
  123|     19|      return -1;  // other is positive ...
  124|     19|   }
  125|       |
  126|  39.8k|   const size_t sw = this->sig_words();
  127|  39.8k|   if(sw > 1) {
  ------------------
  |  Branch (127:7): [True: 27.8k, False: 12.0k]
  ------------------
  128|  27.8k|      return 1;  // must be larger since other is just one word ...
  129|  27.8k|   }
  130|       |
  131|  12.0k|   return bigint_cmp(this->_data(), sw, &other, 1);
  132|  39.8k|}
_ZNK5Botan6BigInt3cmpERKS0_b:
  137|  21.3k|int32_t BigInt::cmp(const BigInt& other, bool check_signs) const {
  138|  21.3k|   if(check_signs) {
  ------------------
  |  Branch (138:7): [True: 21.3k, False: 0]
  ------------------
  139|  21.3k|      if(other.signum() >= 0 && this->signum() < 0) {
  ------------------
  |  Branch (139:10): [True: 21.3k, False: 0]
  |  Branch (139:33): [True: 0, False: 21.3k]
  ------------------
  140|      0|         return -1;
  141|      0|      }
  142|       |
  143|  21.3k|      if(other.signum() < 0 && this->signum() >= 0) {
  ------------------
  |  Branch (143:10): [True: 0, False: 21.3k]
  |  Branch (143:32): [True: 0, False: 0]
  ------------------
  144|      0|         return 1;
  145|      0|      }
  146|       |
  147|  21.3k|      if(other.signum() < 0 && this->signum() < 0) {
  ------------------
  |  Branch (147:10): [True: 0, False: 21.3k]
  |  Branch (147:32): [True: 0, False: 0]
  ------------------
  148|      0|         return (-bigint_cmp(this->_data(), this->size(), other._data(), other.size()));
  149|      0|      }
  150|  21.3k|   }
  151|       |
  152|  21.3k|   return bigint_cmp(this->_data(), this->size(), other._data(), other.size());
  153|  21.3k|}
_ZNK5Botan6BigInt8is_equalERKS0_:
  155|     12|bool BigInt::is_equal(const BigInt& other) const {
  156|     12|   if(this->sign() != other.sign()) {
  ------------------
  |  Branch (156:7): [True: 0, False: 12]
  ------------------
  157|      0|      return false;
  158|      0|   }
  159|       |
  160|     12|   return bigint_ct_is_eq(this->_data(), this->size(), other._data(), other.size()).as_bool();
  161|     12|}
_ZNK5Botan6BigInt12is_less_thanERKS0_:
  163|      6|bool BigInt::is_less_than(const BigInt& other) const {
  164|      6|   if(this->signum() < 0 && other.signum() >= 0) {
  ------------------
  |  Branch (164:7): [True: 0, False: 6]
  |  Branch (164:29): [True: 0, False: 0]
  ------------------
  165|      0|      return true;
  166|      0|   }
  167|       |
  168|      6|   if(this->signum() >= 0 && other.signum() < 0) {
  ------------------
  |  Branch (168:7): [True: 6, False: 0]
  |  Branch (168:30): [True: 0, False: 6]
  ------------------
  169|      0|      return false;
  170|      0|   }
  171|       |
  172|      6|   if(other.signum() < 0 && this->signum() < 0) {
  ------------------
  |  Branch (172:7): [True: 0, False: 6]
  |  Branch (172:29): [True: 0, False: 0]
  ------------------
  173|      0|      return bigint_ct_is_lt(other._data(), other.size(), this->_data(), this->size()).as_bool();
  174|      0|   }
  175|       |
  176|      6|   return bigint_ct_is_lt(this->_data(), this->size(), other._data(), other.size()).as_bool();
  177|      6|}
_ZN5Botan6BigInt4Data11set_to_zeroEv:
  190|  56.4k|void BigInt::Data::set_to_zero() {
  191|  56.4k|   m_reg.resize(m_reg.capacity());
  192|  56.4k|   clear_mem(m_reg.data(), m_reg.size());
  193|  56.4k|   m_sig_words = 0;
  194|  56.4k|}
_ZNK5Botan6BigInt4Data14calc_sig_wordsEv:
  214|  59.4k|size_t BigInt::Data::calc_sig_words() const {
  215|  59.4k|   const size_t sz = m_reg.size();
  216|  59.4k|   size_t sig = sz;
  217|       |
  218|  59.4k|   word sub = 1;
  219|       |
  220|   547k|   for(size_t i = 0; i != sz; ++i) {
  ------------------
  |  Branch (220:22): [True: 488k, False: 59.4k]
  ------------------
  221|   488k|      const word w = m_reg[sz - i - 1];
  222|   488k|      sub &= ct_is_zero(w);
  223|   488k|      sig -= sub;
  224|   488k|   }
  225|       |
  226|       |   /*
  227|       |   * This depends on the data so is poisoned, but unpoison it here as
  228|       |   * later conditionals are made on the size.
  229|       |   */
  230|  59.4k|   CT::unpoison(sig);
  231|       |
  232|  59.4k|   return sig;
  233|  59.4k|}
_ZNK5Botan6BigInt5bytesEv:
  293|  36.9k|size_t BigInt::bytes() const {
  294|  36.9k|   return round_up(bits(), 8) / 8;
  295|  36.9k|}
_ZNK5Botan6BigInt13top_bits_freeEv:
  297|  49.9k|size_t BigInt::top_bits_free() const {
  298|  49.9k|   const size_t words = sig_words();
  299|       |
  300|  49.9k|   const word top_word = word_at(words - 1);
  301|  49.9k|   const size_t bits_used = high_bit(CT::value_barrier(top_word));
  302|  49.9k|   CT::unpoison(bits_used);
  303|  49.9k|   return WordInfo<word>::bits - bits_used;
  304|  49.9k|}
_ZNK5Botan6BigInt4bitsEv:
  306|  56.4k|size_t BigInt::bits() const {
  307|  56.4k|   const size_t words = sig_words();
  308|       |
  309|  56.4k|   if(words == 0) {
  ------------------
  |  Branch (309:7): [True: 6.48k, False: 49.9k]
  ------------------
  310|  6.48k|      return 0;
  311|  6.48k|   }
  312|       |
  313|  49.9k|   const size_t full_words = (words - 1) * WordInfo<word>::bits;
  314|  49.9k|   const size_t top_bits = WordInfo<word>::bits - top_bits_free();
  315|       |
  316|  49.9k|   return full_words + top_bits;
  317|  56.4k|}
_ZNK5Botan6BigInt12serialize_toENSt3__14spanIhLm18446744073709551615EEE:
  394|  18.4k|void BigInt::serialize_to(std::span<uint8_t> output) const {
  395|  18.4k|   BOTAN_ARG_CHECK(this->bytes() <= output.size(), "Insufficient output space");
  ------------------
  |  |   35|  18.4k|   do {                                                          \
  |  |   36|  18.4k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  18.4k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 18.4k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  18.4k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 18.4k]
  |  |  ------------------
  ------------------
  396|       |
  397|  18.4k|   this->binary_encode(output.data(), output.size());
  398|  18.4k|}
_ZNK5Botan6BigInt13binary_encodeEPhm:
  403|  18.4k|void BigInt::binary_encode(uint8_t output[], size_t len) const {
  404|  18.4k|   const size_t full_words = len / sizeof(word);
  405|  18.4k|   const size_t extra_bytes = len % sizeof(word);
  406|       |
  407|  31.4k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (407:22): [True: 12.9k, False: 18.4k]
  ------------------
  408|  12.9k|      const word w = word_at(i);
  409|  12.9k|      store_be(w, output + (len - (i + 1) * sizeof(word)));
  410|  12.9k|   }
  411|       |
  412|  18.4k|   if(extra_bytes > 0) {
  ------------------
  |  Branch (412:7): [True: 18.4k, False: 0]
  ------------------
  413|  18.4k|      const word w = word_at(full_words);
  414|       |
  415|  49.1k|      for(size_t i = 0; i != extra_bytes; ++i) {
  ------------------
  |  Branch (415:25): [True: 30.6k, False: 18.4k]
  ------------------
  416|  30.6k|         output[extra_bytes - i - 1] = get_byte_var(sizeof(word) - i - 1, w);
  417|  30.6k|      }
  418|  18.4k|   }
  419|  18.4k|}
_ZN5Botan6BigInt17assign_from_bytesENSt3__14spanIKhLm18446744073709551615EEE:
  424|  56.4k|void BigInt::assign_from_bytes(std::span<const uint8_t> bytes) {
  425|  56.4k|   clear();
  426|       |
  427|  56.4k|   const size_t length = bytes.size();
  428|  56.4k|   const size_t full_words = length / sizeof(word);
  429|  56.4k|   const size_t extra_bytes = length % sizeof(word);
  430|       |
  431|  56.4k|   secure_vector<word> reg((round_up(full_words + (extra_bytes > 0 ? 1 : 0), 8)));
  ------------------
  |  Branch (431:52): [True: 27.9k, False: 28.5k]
  ------------------
  432|       |
  433|   210k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (433:22): [True: 154k, False: 56.4k]
  ------------------
  434|   154k|      reg[i] = load_be<word>(bytes.last<sizeof(word)>());
  435|   154k|      bytes = bytes.first(bytes.size() - sizeof(word));
  436|   154k|   }
  437|       |
  438|  56.4k|   if(!bytes.empty()) {
  ------------------
  |  Branch (438:7): [True: 27.9k, False: 28.5k]
  ------------------
  439|  27.9k|      BOTAN_ASSERT_NOMSG(extra_bytes == bytes.size());
  ------------------
  |  |   84|  27.9k|   do {                                                                     \
  |  |   85|  27.9k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  27.9k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 27.9k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  27.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 27.9k]
  |  |  ------------------
  ------------------
  440|  27.9k|      std::array<uint8_t, sizeof(word)> last_partial_word = {0};
  441|  27.9k|      copy_mem(std::span{last_partial_word}.last(extra_bytes), bytes);
  442|  27.9k|      reg[full_words] = load_be<word>(last_partial_word);
  443|  27.9k|   }
  444|       |
  445|  56.4k|   m_data.swap(reg);
  446|  56.4k|}
_ZNK5Botan6BigInt20_const_time_unpoisonEv:
  558|   158k|void BigInt::_const_time_unpoison() const {
  559|   158k|   CT::unpoison(m_data.const_data(), m_data.size());
  560|   158k|}

_ZN5Botan15ct_divide_pow2kEmRKNS_6BigIntE:
  194|     18|BigInt ct_divide_pow2k(size_t k, const BigInt& y) {
  195|     18|   BOTAN_ARG_CHECK(y.signum() != 0, "Cannot divide by zero");
  ------------------
  |  |   35|     18|   do {                                                          \
  |  |   36|     18|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     18|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 18]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     18|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 18]
  |  |  ------------------
  ------------------
  196|     18|   BOTAN_ARG_CHECK(y.signum() >= 0, "Negative divisor not supported");
  ------------------
  |  |   35|     18|   do {                                                          \
  |  |   36|     18|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     18|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 18]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     18|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 18]
  |  |  ------------------
  ------------------
  197|     18|   BOTAN_ARG_CHECK(k > 1, "Invalid k");
  ------------------
  |  |   35|     18|   do {                                                          \
  |  |   36|     18|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     18|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 18]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     18|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 18]
  |  |  ------------------
  ------------------
  198|       |
  199|     18|   BigInt q;
  200|     18|   BigInt r;
  201|     18|   ct_divide_impl(q, r, BigInt::power_of_2(k), y);
  202|     18|   return q;
  203|     18|}
divide.cpp:_ZN5Botan12_GLOBAL__N_114ct_divide_implERNS_6BigIntES2_RKS1_S4_:
   66|     18|void ct_divide_impl(BigInt& q_out, BigInt& r_out, const BigInt& x, const BigInt& y) {
   67|     18|   constexpr size_t WB = WordInfo<word>::bits;
   68|       |
   69|     18|   const size_t x_words = x.sig_words();
   70|     18|   const size_t y_words = y.sig_words();
   71|     18|   BOTAN_ASSERT_NOMSG(y_words > 0);
  ------------------
  |  |   84|     18|   do {                                                                     \
  |  |   85|     18|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     18|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 18]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     18|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 18]
  |  |  ------------------
  ------------------
   72|       |
   73|     18|   if(x_words < y_words) {
  ------------------
  |  Branch (73:7): [True: 0, False: 18]
  ------------------
   74|       |      // Here |x| < |y| so q = 0 and r = |x|
   75|      0|      r_out = x.abs();
   76|      0|      q_out = BigInt::zero();
   77|      0|      return;
   78|      0|   }
   79|       |
   80|     18|   const size_t r_words = x_words + 1;
   81|     18|   const size_t q_words = x_words - y_words + 1;
   82|       |
   83|       |   // The number of leading zero bits of y, in [0,WB)
   84|     18|   const word s = static_cast<word>(WB) - static_cast<word>(high_bit(CT::value_barrier(y._data()[y_words - 1])));
   85|     18|   const auto s_mask = CT::Mask<word>::expand(s);
   86|     18|   const word s_comp = s_mask.if_set_return(static_cast<word>(WB) - s);
   87|       |
   88|     18|   secure_vector<word> yn(y_words);
   89|     18|   secure_vector<word> rw(r_words);
   90|     18|   secure_vector<word> qw(q_words);
   91|       |
   92|       |   // Normalize: yn = |y| << s (which sets the top bit of yn) and rw = |x| << s;
   93|       |   // shifting y stays within y_words words, shifting x adds at most one word
   94|     18|   word carry = 0;
   95|    129|   for(size_t i = 0; i != y_words; ++i) {
  ------------------
  |  Branch (95:22): [True: 111, False: 18]
  ------------------
   96|    111|      const word w = y._data()[i];
   97|    111|      yn[i] = (w << s) | carry;
   98|    111|      carry = s_mask.if_set_return(w >> s_comp);
   99|    111|   }
  100|       |
  101|     18|   carry = 0;
  102|    258|   for(size_t i = 0; i != x_words; ++i) {
  ------------------
  |  Branch (102:22): [True: 240, False: 18]
  ------------------
  103|    240|      const word w = x._data()[i];
  104|    240|      rw[i] = (w << s) | carry;
  105|    240|      carry = s_mask.if_set_return(w >> s_comp);
  106|    240|   }
  107|     18|   rw[x_words] = carry;
  108|       |
  109|     18|   const auto div_by_yn = divide_precomp<word>::setup(CT::value_barrier(yn[y_words - 1]));
  110|       |
  111|     18|   if(y_words == 1) {
  ------------------
  |  Branch (111:7): [True: 0, False: 18]
  ------------------
  112|       |      /*
  113|       |      * 2/1 word-serial division. The initial remainder is the shift-out
  114|       |      * carry, which is less than 2^s and so less than the divisor.
  115|       |      */
  116|      0|      word r = rw[x_words];
  117|      0|      for(size_t i = x_words; i > 0; --i) {
  ------------------
  |  Branch (117:31): [True: 0, False: 0]
  ------------------
  118|      0|         const auto [qi, ri] = div_by_yn.divmod_2to1_ct(r, rw[i - 1]);
  119|      0|         qw[i - 1] = qi;
  120|      0|         r = ri;
  121|      0|      }
  122|       |
  123|      0|      rw[0] = r >> s;
  124|     18|   } else {
  125|     18|      const word yn1 = yn[y_words - 1];
  126|     18|      const word yn2 = yn[y_words - 2];
  127|       |
  128|    165|      for(size_t i = q_words; i > 0; --i) {
  ------------------
  |  Branch (128:31): [True: 147, False: 18]
  ------------------
  129|    147|         const size_t j = i - 1;  // current window is rw[j ... j + y_words]
  130|       |
  131|    147|         const word u2 = rw[j + y_words];
  132|    147|         const word u1 = rw[j + y_words - 1];
  133|    147|         const word u0 = rw[j + y_words - 2];
  134|       |
  135|       |         /*
  136|       |         * Estimate the quotient digit from the top two words of the window.
  137|       |         * The window invariant gives u2 <= yn1; if u2 == yn1 the 2/1
  138|       |         * division precondition does not hold, and instead the digit
  139|       |         * estimate is the maximum word value.
  140|       |         */
  141|    147|         const auto top_eq = CT::Mask<word>::is_equal(u2, yn1);
  142|    147|         const word q_est = div_by_yn.divmod_2to1_ct(u2, u1).first;
  143|    147|         word qhat = top_eq.select(WordInfo<word>::max, q_est);
  144|       |
  145|       |         // Per HAC 14.23, this correction is required at most twice
  146|    147|         qhat -= division_check_ct(qhat, yn1, yn2, u2, u1, u0).if_set_return(1);
  147|    147|         qhat -= division_check_ct(qhat, yn1, yn2, u2, u1, u0).if_set_return(1);
  148|       |
  149|       |         // Subtract qhat * yn from the window
  150|    147|         const word bw = bigint_submul(&rw[j], yn.data(), y_words, qhat);
  151|    147|         word borrow = 0;
  152|    147|         rw[j + y_words] = word_sub(u2, bw, &borrow);
  153|       |
  154|       |         // If the digit was still one too large, the subtraction
  155|       |         // underflowed; add back and decrement the digit
  156|    147|         const word cb = bigint_cnd_add(borrow, &rw[j], yn.data(), y_words);
  157|    147|         rw[j + y_words] += cb;
  158|    147|         qhat -= borrow;
  159|       |
  160|    147|         qw[j] = qhat;
  161|    147|      }
  162|       |
  163|       |      // The remainder is in rw[0:y_words], still shifted left by s, and
  164|       |      // rw[y_words] is zero
  165|    129|      for(size_t i = 0; i != y_words; ++i) {
  ------------------
  |  Branch (165:25): [True: 111, False: 18]
  ------------------
  166|    111|         rw[i] = (rw[i] >> s) | s_mask.if_set_return(CT::value_barrier(rw[i + 1]) << s_comp);
  167|    111|      }
  168|     18|   }
  169|       |
  170|     18|   BigInt q = BigInt::_from_words(qw);
  171|     18|   rw.resize(y_words);
  172|     18|   BigInt r = BigInt::_from_words(rw);
  173|       |
  174|     18|   r_out = std::move(r);
  175|     18|   q_out = std::move(q);
  176|     18|}
divide.cpp:_ZN5Botan12_GLOBAL__N_117division_check_ctEmmmmmm:
   39|    294|inline CT::Mask<word> division_check_ct(word q, word y2, word y1, word x3, word x2, word x1) {
   40|    294|   word y3 = 0;
   41|    294|   y1 = word_madd2(q, y1, &y3);
   42|    294|   y2 = word_madd2(q, y2, &y3);
   43|       |
   44|    294|   const auto gt3 = CT::Mask<word>::is_gt(y3, x3);
   45|    294|   const auto eq3 = CT::Mask<word>::is_equal(y3, x3);
   46|    294|   const auto gt2 = CT::Mask<word>::is_gt(y2, x2);
   47|    294|   const auto eq2 = CT::Mask<word>::is_equal(y2, x2);
   48|    294|   const auto gt1 = CT::Mask<word>::is_gt(y1, x1);
   49|       |
   50|    294|   return gt3 | (eq3 & (gt2 | (eq2 & gt1)));
   51|    294|}

_ZN5Botan17bigint_comba_sqr4EPmPKm:
   17|  2.18M|void bigint_comba_sqr4(word z[8], const word x[4]) {
   18|  2.18M|   word3<word> accum;
   19|       |
   20|  2.18M|   accum.mul(x[0], x[0]);
   21|  2.18M|   z[0] = accum.extract();
   22|  2.18M|   accum.mul_x2(x[0], x[1]);
   23|  2.18M|   z[1] = accum.extract();
   24|  2.18M|   accum.mul_x2(x[0], x[2]);
   25|  2.18M|   accum.mul(x[1], x[1]);
   26|  2.18M|   z[2] = accum.extract();
   27|  2.18M|   accum.mul_x2(x[0], x[3]);
   28|  2.18M|   accum.mul_x2(x[1], x[2]);
   29|  2.18M|   z[3] = accum.extract();
   30|  2.18M|   accum.mul_x2(x[1], x[3]);
   31|  2.18M|   accum.mul(x[2], x[2]);
   32|  2.18M|   z[4] = accum.extract();
   33|  2.18M|   accum.mul_x2(x[2], x[3]);
   34|  2.18M|   z[5] = accum.extract();
   35|  2.18M|   accum.mul(x[3], x[3]);
   36|  2.18M|   z[6] = accum.extract();
   37|  2.18M|   z[7] = accum.extract();
   38|  2.18M|}
_ZN5Botan17bigint_comba_mul4EPmPKmS2_:
   43|  1.98M|void bigint_comba_mul4(word z[8], const word x[4], const word y[4]) {
   44|  1.98M|   word3<word> accum;
   45|       |
   46|  1.98M|   accum.mul(x[0], y[0]);
   47|  1.98M|   z[0] = accum.extract();
   48|  1.98M|   accum.mul(x[0], y[1]);
   49|  1.98M|   accum.mul(x[1], y[0]);
   50|  1.98M|   z[1] = accum.extract();
   51|  1.98M|   accum.mul(x[0], y[2]);
   52|  1.98M|   accum.mul(x[1], y[1]);
   53|  1.98M|   accum.mul(x[2], y[0]);
   54|  1.98M|   z[2] = accum.extract();
   55|  1.98M|   accum.mul(x[0], y[3]);
   56|  1.98M|   accum.mul(x[1], y[2]);
   57|  1.98M|   accum.mul(x[2], y[1]);
   58|  1.98M|   accum.mul(x[3], y[0]);
   59|  1.98M|   z[3] = accum.extract();
   60|  1.98M|   accum.mul(x[1], y[3]);
   61|  1.98M|   accum.mul(x[2], y[2]);
   62|  1.98M|   accum.mul(x[3], y[1]);
   63|  1.98M|   z[4] = accum.extract();
   64|  1.98M|   accum.mul(x[2], y[3]);
   65|  1.98M|   accum.mul(x[3], y[2]);
   66|  1.98M|   z[5] = accum.extract();
   67|  1.98M|   accum.mul(x[3], y[3]);
   68|  1.98M|   z[6] = accum.extract();
   69|  1.98M|   z[7] = accum.extract();
   70|  1.98M|}
_ZN5Botan17bigint_comba_sqr6EPmPKm:
   75|  1.60M|void bigint_comba_sqr6(word z[12], const word x[6]) {
   76|  1.60M|   word3<word> accum;
   77|       |
   78|  1.60M|   accum.mul(x[0], x[0]);
   79|  1.60M|   z[0] = accum.extract();
   80|  1.60M|   accum.mul_x2(x[0], x[1]);
   81|  1.60M|   z[1] = accum.extract();
   82|  1.60M|   accum.mul_x2(x[0], x[2]);
   83|  1.60M|   accum.mul(x[1], x[1]);
   84|  1.60M|   z[2] = accum.extract();
   85|  1.60M|   accum.mul_x2(x[0], x[3]);
   86|  1.60M|   accum.mul_x2(x[1], x[2]);
   87|  1.60M|   z[3] = accum.extract();
   88|  1.60M|   accum.mul_x2(x[0], x[4]);
   89|  1.60M|   accum.mul_x2(x[1], x[3]);
   90|  1.60M|   accum.mul(x[2], x[2]);
   91|  1.60M|   z[4] = accum.extract();
   92|  1.60M|   accum.mul_x2(x[0], x[5]);
   93|  1.60M|   accum.mul_x2(x[1], x[4]);
   94|  1.60M|   accum.mul_x2(x[2], x[3]);
   95|  1.60M|   z[5] = accum.extract();
   96|  1.60M|   accum.mul_x2(x[1], x[5]);
   97|  1.60M|   accum.mul_x2(x[2], x[4]);
   98|  1.60M|   accum.mul(x[3], x[3]);
   99|  1.60M|   z[6] = accum.extract();
  100|  1.60M|   accum.mul_x2(x[2], x[5]);
  101|  1.60M|   accum.mul_x2(x[3], x[4]);
  102|  1.60M|   z[7] = accum.extract();
  103|  1.60M|   accum.mul_x2(x[3], x[5]);
  104|  1.60M|   accum.mul(x[4], x[4]);
  105|  1.60M|   z[8] = accum.extract();
  106|  1.60M|   accum.mul_x2(x[4], x[5]);
  107|  1.60M|   z[9] = accum.extract();
  108|  1.60M|   accum.mul(x[5], x[5]);
  109|  1.60M|   z[10] = accum.extract();
  110|  1.60M|   z[11] = accum.extract();
  111|  1.60M|}
_ZN5Botan17bigint_comba_mul6EPmPKmS2_:
  116|  1.41M|void bigint_comba_mul6(word z[12], const word x[6], const word y[6]) {
  117|  1.41M|   word3<word> accum;
  118|       |
  119|  1.41M|   accum.mul(x[0], y[0]);
  120|  1.41M|   z[0] = accum.extract();
  121|  1.41M|   accum.mul(x[0], y[1]);
  122|  1.41M|   accum.mul(x[1], y[0]);
  123|  1.41M|   z[1] = accum.extract();
  124|  1.41M|   accum.mul(x[0], y[2]);
  125|  1.41M|   accum.mul(x[1], y[1]);
  126|  1.41M|   accum.mul(x[2], y[0]);
  127|  1.41M|   z[2] = accum.extract();
  128|  1.41M|   accum.mul(x[0], y[3]);
  129|  1.41M|   accum.mul(x[1], y[2]);
  130|  1.41M|   accum.mul(x[2], y[1]);
  131|  1.41M|   accum.mul(x[3], y[0]);
  132|  1.41M|   z[3] = accum.extract();
  133|  1.41M|   accum.mul(x[0], y[4]);
  134|  1.41M|   accum.mul(x[1], y[3]);
  135|  1.41M|   accum.mul(x[2], y[2]);
  136|  1.41M|   accum.mul(x[3], y[1]);
  137|  1.41M|   accum.mul(x[4], y[0]);
  138|  1.41M|   z[4] = accum.extract();
  139|  1.41M|   accum.mul(x[0], y[5]);
  140|  1.41M|   accum.mul(x[1], y[4]);
  141|  1.41M|   accum.mul(x[2], y[3]);
  142|  1.41M|   accum.mul(x[3], y[2]);
  143|  1.41M|   accum.mul(x[4], y[1]);
  144|  1.41M|   accum.mul(x[5], y[0]);
  145|  1.41M|   z[5] = accum.extract();
  146|  1.41M|   accum.mul(x[1], y[5]);
  147|  1.41M|   accum.mul(x[2], y[4]);
  148|  1.41M|   accum.mul(x[3], y[3]);
  149|  1.41M|   accum.mul(x[4], y[2]);
  150|  1.41M|   accum.mul(x[5], y[1]);
  151|  1.41M|   z[6] = accum.extract();
  152|  1.41M|   accum.mul(x[2], y[5]);
  153|  1.41M|   accum.mul(x[3], y[4]);
  154|  1.41M|   accum.mul(x[4], y[3]);
  155|  1.41M|   accum.mul(x[5], y[2]);
  156|  1.41M|   z[7] = accum.extract();
  157|  1.41M|   accum.mul(x[3], y[5]);
  158|  1.41M|   accum.mul(x[4], y[4]);
  159|  1.41M|   accum.mul(x[5], y[3]);
  160|  1.41M|   z[8] = accum.extract();
  161|  1.41M|   accum.mul(x[4], y[5]);
  162|  1.41M|   accum.mul(x[5], y[4]);
  163|  1.41M|   z[9] = accum.extract();
  164|  1.41M|   accum.mul(x[5], y[5]);
  165|  1.41M|   z[10] = accum.extract();
  166|  1.41M|   z[11] = accum.extract();
  167|  1.41M|}
_ZN5Botan17bigint_comba_sqr7EPmPKm:
  172|  38.0k|void bigint_comba_sqr7(word z[14], const word x[7]) {
  173|  38.0k|   word3<word> accum;
  174|       |
  175|  38.0k|   accum.mul(x[0], x[0]);
  176|  38.0k|   z[0] = accum.extract();
  177|  38.0k|   accum.mul_x2(x[0], x[1]);
  178|  38.0k|   z[1] = accum.extract();
  179|  38.0k|   accum.mul_x2(x[0], x[2]);
  180|  38.0k|   accum.mul(x[1], x[1]);
  181|  38.0k|   z[2] = accum.extract();
  182|  38.0k|   accum.mul_x2(x[0], x[3]);
  183|  38.0k|   accum.mul_x2(x[1], x[2]);
  184|  38.0k|   z[3] = accum.extract();
  185|  38.0k|   accum.mul_x2(x[0], x[4]);
  186|  38.0k|   accum.mul_x2(x[1], x[3]);
  187|  38.0k|   accum.mul(x[2], x[2]);
  188|  38.0k|   z[4] = accum.extract();
  189|  38.0k|   accum.mul_x2(x[0], x[5]);
  190|  38.0k|   accum.mul_x2(x[1], x[4]);
  191|  38.0k|   accum.mul_x2(x[2], x[3]);
  192|  38.0k|   z[5] = accum.extract();
  193|  38.0k|   accum.mul_x2(x[0], x[6]);
  194|  38.0k|   accum.mul_x2(x[1], x[5]);
  195|  38.0k|   accum.mul_x2(x[2], x[4]);
  196|  38.0k|   accum.mul(x[3], x[3]);
  197|  38.0k|   z[6] = accum.extract();
  198|  38.0k|   accum.mul_x2(x[1], x[6]);
  199|  38.0k|   accum.mul_x2(x[2], x[5]);
  200|  38.0k|   accum.mul_x2(x[3], x[4]);
  201|  38.0k|   z[7] = accum.extract();
  202|  38.0k|   accum.mul_x2(x[2], x[6]);
  203|  38.0k|   accum.mul_x2(x[3], x[5]);
  204|  38.0k|   accum.mul(x[4], x[4]);
  205|  38.0k|   z[8] = accum.extract();
  206|  38.0k|   accum.mul_x2(x[3], x[6]);
  207|  38.0k|   accum.mul_x2(x[4], x[5]);
  208|  38.0k|   z[9] = accum.extract();
  209|  38.0k|   accum.mul_x2(x[4], x[6]);
  210|  38.0k|   accum.mul(x[5], x[5]);
  211|  38.0k|   z[10] = accum.extract();
  212|  38.0k|   accum.mul_x2(x[5], x[6]);
  213|  38.0k|   z[11] = accum.extract();
  214|  38.0k|   accum.mul(x[6], x[6]);
  215|  38.0k|   z[12] = accum.extract();
  216|  38.0k|   z[13] = accum.extract();
  217|  38.0k|}
_ZN5Botan17bigint_comba_mul7EPmPKmS2_:
  222|  38.3k|void bigint_comba_mul7(word z[14], const word x[7], const word y[7]) {
  223|  38.3k|   word3<word> accum;
  224|       |
  225|  38.3k|   accum.mul(x[0], y[0]);
  226|  38.3k|   z[0] = accum.extract();
  227|  38.3k|   accum.mul(x[0], y[1]);
  228|  38.3k|   accum.mul(x[1], y[0]);
  229|  38.3k|   z[1] = accum.extract();
  230|  38.3k|   accum.mul(x[0], y[2]);
  231|  38.3k|   accum.mul(x[1], y[1]);
  232|  38.3k|   accum.mul(x[2], y[0]);
  233|  38.3k|   z[2] = accum.extract();
  234|  38.3k|   accum.mul(x[0], y[3]);
  235|  38.3k|   accum.mul(x[1], y[2]);
  236|  38.3k|   accum.mul(x[2], y[1]);
  237|  38.3k|   accum.mul(x[3], y[0]);
  238|  38.3k|   z[3] = accum.extract();
  239|  38.3k|   accum.mul(x[0], y[4]);
  240|  38.3k|   accum.mul(x[1], y[3]);
  241|  38.3k|   accum.mul(x[2], y[2]);
  242|  38.3k|   accum.mul(x[3], y[1]);
  243|  38.3k|   accum.mul(x[4], y[0]);
  244|  38.3k|   z[4] = accum.extract();
  245|  38.3k|   accum.mul(x[0], y[5]);
  246|  38.3k|   accum.mul(x[1], y[4]);
  247|  38.3k|   accum.mul(x[2], y[3]);
  248|  38.3k|   accum.mul(x[3], y[2]);
  249|  38.3k|   accum.mul(x[4], y[1]);
  250|  38.3k|   accum.mul(x[5], y[0]);
  251|  38.3k|   z[5] = accum.extract();
  252|  38.3k|   accum.mul(x[0], y[6]);
  253|  38.3k|   accum.mul(x[1], y[5]);
  254|  38.3k|   accum.mul(x[2], y[4]);
  255|  38.3k|   accum.mul(x[3], y[3]);
  256|  38.3k|   accum.mul(x[4], y[2]);
  257|  38.3k|   accum.mul(x[5], y[1]);
  258|  38.3k|   accum.mul(x[6], y[0]);
  259|  38.3k|   z[6] = accum.extract();
  260|  38.3k|   accum.mul(x[1], y[6]);
  261|  38.3k|   accum.mul(x[2], y[5]);
  262|  38.3k|   accum.mul(x[3], y[4]);
  263|  38.3k|   accum.mul(x[4], y[3]);
  264|  38.3k|   accum.mul(x[5], y[2]);
  265|  38.3k|   accum.mul(x[6], y[1]);
  266|  38.3k|   z[7] = accum.extract();
  267|  38.3k|   accum.mul(x[2], y[6]);
  268|  38.3k|   accum.mul(x[3], y[5]);
  269|  38.3k|   accum.mul(x[4], y[4]);
  270|  38.3k|   accum.mul(x[5], y[3]);
  271|  38.3k|   accum.mul(x[6], y[2]);
  272|  38.3k|   z[8] = accum.extract();
  273|  38.3k|   accum.mul(x[3], y[6]);
  274|  38.3k|   accum.mul(x[4], y[5]);
  275|  38.3k|   accum.mul(x[5], y[4]);
  276|  38.3k|   accum.mul(x[6], y[3]);
  277|  38.3k|   z[9] = accum.extract();
  278|  38.3k|   accum.mul(x[4], y[6]);
  279|  38.3k|   accum.mul(x[5], y[5]);
  280|  38.3k|   accum.mul(x[6], y[4]);
  281|  38.3k|   z[10] = accum.extract();
  282|  38.3k|   accum.mul(x[5], y[6]);
  283|  38.3k|   accum.mul(x[6], y[5]);
  284|  38.3k|   z[11] = accum.extract();
  285|  38.3k|   accum.mul(x[6], y[6]);
  286|  38.3k|   z[12] = accum.extract();
  287|  38.3k|   z[13] = accum.extract();
  288|  38.3k|}
_ZN5Botan17bigint_comba_sqr8EPmPKm:
  293|  1.28M|void bigint_comba_sqr8(word z[16], const word x[8]) {
  294|  1.28M|   word3<word> accum;
  295|       |
  296|  1.28M|   accum.mul(x[0], x[0]);
  297|  1.28M|   z[0] = accum.extract();
  298|  1.28M|   accum.mul_x2(x[0], x[1]);
  299|  1.28M|   z[1] = accum.extract();
  300|  1.28M|   accum.mul_x2(x[0], x[2]);
  301|  1.28M|   accum.mul(x[1], x[1]);
  302|  1.28M|   z[2] = accum.extract();
  303|  1.28M|   accum.mul_x2(x[0], x[3]);
  304|  1.28M|   accum.mul_x2(x[1], x[2]);
  305|  1.28M|   z[3] = accum.extract();
  306|  1.28M|   accum.mul_x2(x[0], x[4]);
  307|  1.28M|   accum.mul_x2(x[1], x[3]);
  308|  1.28M|   accum.mul(x[2], x[2]);
  309|  1.28M|   z[4] = accum.extract();
  310|  1.28M|   accum.mul_x2(x[0], x[5]);
  311|  1.28M|   accum.mul_x2(x[1], x[4]);
  312|  1.28M|   accum.mul_x2(x[2], x[3]);
  313|  1.28M|   z[5] = accum.extract();
  314|  1.28M|   accum.mul_x2(x[0], x[6]);
  315|  1.28M|   accum.mul_x2(x[1], x[5]);
  316|  1.28M|   accum.mul_x2(x[2], x[4]);
  317|  1.28M|   accum.mul(x[3], x[3]);
  318|  1.28M|   z[6] = accum.extract();
  319|  1.28M|   accum.mul_x2(x[0], x[7]);
  320|  1.28M|   accum.mul_x2(x[1], x[6]);
  321|  1.28M|   accum.mul_x2(x[2], x[5]);
  322|  1.28M|   accum.mul_x2(x[3], x[4]);
  323|  1.28M|   z[7] = accum.extract();
  324|  1.28M|   accum.mul_x2(x[1], x[7]);
  325|  1.28M|   accum.mul_x2(x[2], x[6]);
  326|  1.28M|   accum.mul_x2(x[3], x[5]);
  327|  1.28M|   accum.mul(x[4], x[4]);
  328|  1.28M|   z[8] = accum.extract();
  329|  1.28M|   accum.mul_x2(x[2], x[7]);
  330|  1.28M|   accum.mul_x2(x[3], x[6]);
  331|  1.28M|   accum.mul_x2(x[4], x[5]);
  332|  1.28M|   z[9] = accum.extract();
  333|  1.28M|   accum.mul_x2(x[3], x[7]);
  334|  1.28M|   accum.mul_x2(x[4], x[6]);
  335|  1.28M|   accum.mul(x[5], x[5]);
  336|  1.28M|   z[10] = accum.extract();
  337|  1.28M|   accum.mul_x2(x[4], x[7]);
  338|  1.28M|   accum.mul_x2(x[5], x[6]);
  339|  1.28M|   z[11] = accum.extract();
  340|  1.28M|   accum.mul_x2(x[5], x[7]);
  341|  1.28M|   accum.mul(x[6], x[6]);
  342|  1.28M|   z[12] = accum.extract();
  343|  1.28M|   accum.mul_x2(x[6], x[7]);
  344|  1.28M|   z[13] = accum.extract();
  345|  1.28M|   accum.mul(x[7], x[7]);
  346|  1.28M|   z[14] = accum.extract();
  347|  1.28M|   z[15] = accum.extract();
  348|  1.28M|}
_ZN5Botan17bigint_comba_mul8EPmPKmS2_:
  353|  1.17M|void bigint_comba_mul8(word z[16], const word x[8], const word y[8]) {
  354|  1.17M|   word3<word> accum;
  355|       |
  356|  1.17M|   accum.mul(x[0], y[0]);
  357|  1.17M|   z[0] = accum.extract();
  358|  1.17M|   accum.mul(x[0], y[1]);
  359|  1.17M|   accum.mul(x[1], y[0]);
  360|  1.17M|   z[1] = accum.extract();
  361|  1.17M|   accum.mul(x[0], y[2]);
  362|  1.17M|   accum.mul(x[1], y[1]);
  363|  1.17M|   accum.mul(x[2], y[0]);
  364|  1.17M|   z[2] = accum.extract();
  365|  1.17M|   accum.mul(x[0], y[3]);
  366|  1.17M|   accum.mul(x[1], y[2]);
  367|  1.17M|   accum.mul(x[2], y[1]);
  368|  1.17M|   accum.mul(x[3], y[0]);
  369|  1.17M|   z[3] = accum.extract();
  370|  1.17M|   accum.mul(x[0], y[4]);
  371|  1.17M|   accum.mul(x[1], y[3]);
  372|  1.17M|   accum.mul(x[2], y[2]);
  373|  1.17M|   accum.mul(x[3], y[1]);
  374|  1.17M|   accum.mul(x[4], y[0]);
  375|  1.17M|   z[4] = accum.extract();
  376|  1.17M|   accum.mul(x[0], y[5]);
  377|  1.17M|   accum.mul(x[1], y[4]);
  378|  1.17M|   accum.mul(x[2], y[3]);
  379|  1.17M|   accum.mul(x[3], y[2]);
  380|  1.17M|   accum.mul(x[4], y[1]);
  381|  1.17M|   accum.mul(x[5], y[0]);
  382|  1.17M|   z[5] = accum.extract();
  383|  1.17M|   accum.mul(x[0], y[6]);
  384|  1.17M|   accum.mul(x[1], y[5]);
  385|  1.17M|   accum.mul(x[2], y[4]);
  386|  1.17M|   accum.mul(x[3], y[3]);
  387|  1.17M|   accum.mul(x[4], y[2]);
  388|  1.17M|   accum.mul(x[5], y[1]);
  389|  1.17M|   accum.mul(x[6], y[0]);
  390|  1.17M|   z[6] = accum.extract();
  391|  1.17M|   accum.mul(x[0], y[7]);
  392|  1.17M|   accum.mul(x[1], y[6]);
  393|  1.17M|   accum.mul(x[2], y[5]);
  394|  1.17M|   accum.mul(x[3], y[4]);
  395|  1.17M|   accum.mul(x[4], y[3]);
  396|  1.17M|   accum.mul(x[5], y[2]);
  397|  1.17M|   accum.mul(x[6], y[1]);
  398|  1.17M|   accum.mul(x[7], y[0]);
  399|  1.17M|   z[7] = accum.extract();
  400|  1.17M|   accum.mul(x[1], y[7]);
  401|  1.17M|   accum.mul(x[2], y[6]);
  402|  1.17M|   accum.mul(x[3], y[5]);
  403|  1.17M|   accum.mul(x[4], y[4]);
  404|  1.17M|   accum.mul(x[5], y[3]);
  405|  1.17M|   accum.mul(x[6], y[2]);
  406|  1.17M|   accum.mul(x[7], y[1]);
  407|  1.17M|   z[8] = accum.extract();
  408|  1.17M|   accum.mul(x[2], y[7]);
  409|  1.17M|   accum.mul(x[3], y[6]);
  410|  1.17M|   accum.mul(x[4], y[5]);
  411|  1.17M|   accum.mul(x[5], y[4]);
  412|  1.17M|   accum.mul(x[6], y[3]);
  413|  1.17M|   accum.mul(x[7], y[2]);
  414|  1.17M|   z[9] = accum.extract();
  415|  1.17M|   accum.mul(x[3], y[7]);
  416|  1.17M|   accum.mul(x[4], y[6]);
  417|  1.17M|   accum.mul(x[5], y[5]);
  418|  1.17M|   accum.mul(x[6], y[4]);
  419|  1.17M|   accum.mul(x[7], y[3]);
  420|  1.17M|   z[10] = accum.extract();
  421|  1.17M|   accum.mul(x[4], y[7]);
  422|  1.17M|   accum.mul(x[5], y[6]);
  423|  1.17M|   accum.mul(x[6], y[5]);
  424|  1.17M|   accum.mul(x[7], y[4]);
  425|  1.17M|   z[11] = accum.extract();
  426|  1.17M|   accum.mul(x[5], y[7]);
  427|  1.17M|   accum.mul(x[6], y[6]);
  428|  1.17M|   accum.mul(x[7], y[5]);
  429|  1.17M|   z[12] = accum.extract();
  430|  1.17M|   accum.mul(x[6], y[7]);
  431|  1.17M|   accum.mul(x[7], y[6]);
  432|  1.17M|   z[13] = accum.extract();
  433|  1.17M|   accum.mul(x[7], y[7]);
  434|  1.17M|   z[14] = accum.extract();
  435|  1.17M|   z[15] = accum.extract();
  436|  1.17M|}
_ZN5Botan17bigint_comba_sqr9EPmPKm:
  441|  1.84M|void bigint_comba_sqr9(word z[18], const word x[9]) {
  442|  1.84M|   word3<word> accum;
  443|       |
  444|  1.84M|   accum.mul(x[0], x[0]);
  445|  1.84M|   z[0] = accum.extract();
  446|  1.84M|   accum.mul_x2(x[0], x[1]);
  447|  1.84M|   z[1] = accum.extract();
  448|  1.84M|   accum.mul_x2(x[0], x[2]);
  449|  1.84M|   accum.mul(x[1], x[1]);
  450|  1.84M|   z[2] = accum.extract();
  451|  1.84M|   accum.mul_x2(x[0], x[3]);
  452|  1.84M|   accum.mul_x2(x[1], x[2]);
  453|  1.84M|   z[3] = accum.extract();
  454|  1.84M|   accum.mul_x2(x[0], x[4]);
  455|  1.84M|   accum.mul_x2(x[1], x[3]);
  456|  1.84M|   accum.mul(x[2], x[2]);
  457|  1.84M|   z[4] = accum.extract();
  458|  1.84M|   accum.mul_x2(x[0], x[5]);
  459|  1.84M|   accum.mul_x2(x[1], x[4]);
  460|  1.84M|   accum.mul_x2(x[2], x[3]);
  461|  1.84M|   z[5] = accum.extract();
  462|  1.84M|   accum.mul_x2(x[0], x[6]);
  463|  1.84M|   accum.mul_x2(x[1], x[5]);
  464|  1.84M|   accum.mul_x2(x[2], x[4]);
  465|  1.84M|   accum.mul(x[3], x[3]);
  466|  1.84M|   z[6] = accum.extract();
  467|  1.84M|   accum.mul_x2(x[0], x[7]);
  468|  1.84M|   accum.mul_x2(x[1], x[6]);
  469|  1.84M|   accum.mul_x2(x[2], x[5]);
  470|  1.84M|   accum.mul_x2(x[3], x[4]);
  471|  1.84M|   z[7] = accum.extract();
  472|  1.84M|   accum.mul_x2(x[0], x[8]);
  473|  1.84M|   accum.mul_x2(x[1], x[7]);
  474|  1.84M|   accum.mul_x2(x[2], x[6]);
  475|  1.84M|   accum.mul_x2(x[3], x[5]);
  476|  1.84M|   accum.mul(x[4], x[4]);
  477|  1.84M|   z[8] = accum.extract();
  478|  1.84M|   accum.mul_x2(x[1], x[8]);
  479|  1.84M|   accum.mul_x2(x[2], x[7]);
  480|  1.84M|   accum.mul_x2(x[3], x[6]);
  481|  1.84M|   accum.mul_x2(x[4], x[5]);
  482|  1.84M|   z[9] = accum.extract();
  483|  1.84M|   accum.mul_x2(x[2], x[8]);
  484|  1.84M|   accum.mul_x2(x[3], x[7]);
  485|  1.84M|   accum.mul_x2(x[4], x[6]);
  486|  1.84M|   accum.mul(x[5], x[5]);
  487|  1.84M|   z[10] = accum.extract();
  488|  1.84M|   accum.mul_x2(x[3], x[8]);
  489|  1.84M|   accum.mul_x2(x[4], x[7]);
  490|  1.84M|   accum.mul_x2(x[5], x[6]);
  491|  1.84M|   z[11] = accum.extract();
  492|  1.84M|   accum.mul_x2(x[4], x[8]);
  493|  1.84M|   accum.mul_x2(x[5], x[7]);
  494|  1.84M|   accum.mul(x[6], x[6]);
  495|  1.84M|   z[12] = accum.extract();
  496|  1.84M|   accum.mul_x2(x[5], x[8]);
  497|  1.84M|   accum.mul_x2(x[6], x[7]);
  498|  1.84M|   z[13] = accum.extract();
  499|  1.84M|   accum.mul_x2(x[6], x[8]);
  500|  1.84M|   accum.mul(x[7], x[7]);
  501|  1.84M|   z[14] = accum.extract();
  502|  1.84M|   accum.mul_x2(x[7], x[8]);
  503|  1.84M|   z[15] = accum.extract();
  504|  1.84M|   accum.mul(x[8], x[8]);
  505|  1.84M|   z[16] = accum.extract();
  506|  1.84M|   z[17] = accum.extract();
  507|  1.84M|}
_ZN5Botan17bigint_comba_mul9EPmPKmS2_:
  512|  1.48M|void bigint_comba_mul9(word z[18], const word x[9], const word y[9]) {
  513|  1.48M|   word3<word> accum;
  514|       |
  515|  1.48M|   accum.mul(x[0], y[0]);
  516|  1.48M|   z[0] = accum.extract();
  517|  1.48M|   accum.mul(x[0], y[1]);
  518|  1.48M|   accum.mul(x[1], y[0]);
  519|  1.48M|   z[1] = accum.extract();
  520|  1.48M|   accum.mul(x[0], y[2]);
  521|  1.48M|   accum.mul(x[1], y[1]);
  522|  1.48M|   accum.mul(x[2], y[0]);
  523|  1.48M|   z[2] = accum.extract();
  524|  1.48M|   accum.mul(x[0], y[3]);
  525|  1.48M|   accum.mul(x[1], y[2]);
  526|  1.48M|   accum.mul(x[2], y[1]);
  527|  1.48M|   accum.mul(x[3], y[0]);
  528|  1.48M|   z[3] = accum.extract();
  529|  1.48M|   accum.mul(x[0], y[4]);
  530|  1.48M|   accum.mul(x[1], y[3]);
  531|  1.48M|   accum.mul(x[2], y[2]);
  532|  1.48M|   accum.mul(x[3], y[1]);
  533|  1.48M|   accum.mul(x[4], y[0]);
  534|  1.48M|   z[4] = accum.extract();
  535|  1.48M|   accum.mul(x[0], y[5]);
  536|  1.48M|   accum.mul(x[1], y[4]);
  537|  1.48M|   accum.mul(x[2], y[3]);
  538|  1.48M|   accum.mul(x[3], y[2]);
  539|  1.48M|   accum.mul(x[4], y[1]);
  540|  1.48M|   accum.mul(x[5], y[0]);
  541|  1.48M|   z[5] = accum.extract();
  542|  1.48M|   accum.mul(x[0], y[6]);
  543|  1.48M|   accum.mul(x[1], y[5]);
  544|  1.48M|   accum.mul(x[2], y[4]);
  545|  1.48M|   accum.mul(x[3], y[3]);
  546|  1.48M|   accum.mul(x[4], y[2]);
  547|  1.48M|   accum.mul(x[5], y[1]);
  548|  1.48M|   accum.mul(x[6], y[0]);
  549|  1.48M|   z[6] = accum.extract();
  550|  1.48M|   accum.mul(x[0], y[7]);
  551|  1.48M|   accum.mul(x[1], y[6]);
  552|  1.48M|   accum.mul(x[2], y[5]);
  553|  1.48M|   accum.mul(x[3], y[4]);
  554|  1.48M|   accum.mul(x[4], y[3]);
  555|  1.48M|   accum.mul(x[5], y[2]);
  556|  1.48M|   accum.mul(x[6], y[1]);
  557|  1.48M|   accum.mul(x[7], y[0]);
  558|  1.48M|   z[7] = accum.extract();
  559|  1.48M|   accum.mul(x[0], y[8]);
  560|  1.48M|   accum.mul(x[1], y[7]);
  561|  1.48M|   accum.mul(x[2], y[6]);
  562|  1.48M|   accum.mul(x[3], y[5]);
  563|  1.48M|   accum.mul(x[4], y[4]);
  564|  1.48M|   accum.mul(x[5], y[3]);
  565|  1.48M|   accum.mul(x[6], y[2]);
  566|  1.48M|   accum.mul(x[7], y[1]);
  567|  1.48M|   accum.mul(x[8], y[0]);
  568|  1.48M|   z[8] = accum.extract();
  569|  1.48M|   accum.mul(x[1], y[8]);
  570|  1.48M|   accum.mul(x[2], y[7]);
  571|  1.48M|   accum.mul(x[3], y[6]);
  572|  1.48M|   accum.mul(x[4], y[5]);
  573|  1.48M|   accum.mul(x[5], y[4]);
  574|  1.48M|   accum.mul(x[6], y[3]);
  575|  1.48M|   accum.mul(x[7], y[2]);
  576|  1.48M|   accum.mul(x[8], y[1]);
  577|  1.48M|   z[9] = accum.extract();
  578|  1.48M|   accum.mul(x[2], y[8]);
  579|  1.48M|   accum.mul(x[3], y[7]);
  580|  1.48M|   accum.mul(x[4], y[6]);
  581|  1.48M|   accum.mul(x[5], y[5]);
  582|  1.48M|   accum.mul(x[6], y[4]);
  583|  1.48M|   accum.mul(x[7], y[3]);
  584|  1.48M|   accum.mul(x[8], y[2]);
  585|  1.48M|   z[10] = accum.extract();
  586|  1.48M|   accum.mul(x[3], y[8]);
  587|  1.48M|   accum.mul(x[4], y[7]);
  588|  1.48M|   accum.mul(x[5], y[6]);
  589|  1.48M|   accum.mul(x[6], y[5]);
  590|  1.48M|   accum.mul(x[7], y[4]);
  591|  1.48M|   accum.mul(x[8], y[3]);
  592|  1.48M|   z[11] = accum.extract();
  593|  1.48M|   accum.mul(x[4], y[8]);
  594|  1.48M|   accum.mul(x[5], y[7]);
  595|  1.48M|   accum.mul(x[6], y[6]);
  596|  1.48M|   accum.mul(x[7], y[5]);
  597|  1.48M|   accum.mul(x[8], y[4]);
  598|  1.48M|   z[12] = accum.extract();
  599|  1.48M|   accum.mul(x[5], y[8]);
  600|  1.48M|   accum.mul(x[6], y[7]);
  601|  1.48M|   accum.mul(x[7], y[6]);
  602|  1.48M|   accum.mul(x[8], y[5]);
  603|  1.48M|   z[13] = accum.extract();
  604|  1.48M|   accum.mul(x[6], y[8]);
  605|  1.48M|   accum.mul(x[7], y[7]);
  606|  1.48M|   accum.mul(x[8], y[6]);
  607|  1.48M|   z[14] = accum.extract();
  608|  1.48M|   accum.mul(x[7], y[8]);
  609|  1.48M|   accum.mul(x[8], y[7]);
  610|  1.48M|   z[15] = accum.extract();
  611|  1.48M|   accum.mul(x[8], y[8]);
  612|  1.48M|   z[16] = accum.extract();
  613|  1.48M|   z[17] = accum.extract();
  614|  1.48M|}

_ZN5Botan12basecase_mulEPmmPKmmS2_m:
   20|     16|void basecase_mul(word z[], size_t z_size, const word x[], size_t x_size, const word y[], size_t y_size) {
   21|     16|   if(z_size < x_size + y_size) {
  ------------------
  |  Branch (21:7): [True: 0, False: 16]
  ------------------
   22|      0|      throw Invalid_Argument("basecase_mul z_size too small");
   23|      0|   }
   24|       |
   25|     16|   const size_t x_size_8 = x_size - (x_size % 8);
   26|       |
   27|     16|   zeroize_buffer(z, z_size);
   28|       |
   29|    168|   for(size_t i = 0; i != y_size; ++i) {
  ------------------
  |  Branch (29:22): [True: 152, False: 16]
  ------------------
   30|    152|      const word y_i = y[i];
   31|       |
   32|    152|      word carry = 0;
   33|       |
   34|    304|      for(size_t j = 0; j != x_size_8; j += 8) {
  ------------------
  |  Branch (34:25): [True: 152, False: 152]
  ------------------
   35|    152|         carry = word8_madd3(z + i + j, x + j, y_i, carry);
   36|    152|      }
   37|       |
   38|    456|      for(size_t j = x_size_8; j != x_size; ++j) {
  ------------------
  |  Branch (38:32): [True: 304, False: 152]
  ------------------
   39|    304|         z[i + j] = word_madd3(x[j], y_i, z[i + j], &carry);
   40|    304|      }
   41|       |
   42|    152|      z[x_size + i] = carry;
   43|    152|   }
   44|     16|}
_ZN5Botan10bigint_mulEPmmPKmmmS2_mmS0_m:
  292|  21.5k|                size_t ws_size) {
  293|  21.5k|   zeroize_buffer(z, z_size);
  294|       |
  295|  21.5k|   if(x_sw == 1) {
  ------------------
  |  Branch (295:7): [True: 0, False: 21.5k]
  ------------------
  296|      0|      bigint_linmul3(z, y, y_sw, x[0]);
  297|  21.5k|   } else if(y_sw == 1) {
  ------------------
  |  Branch (297:14): [True: 0, False: 21.5k]
  ------------------
  298|      0|      bigint_linmul3(z, x, x_sw, y[0]);
  299|  21.5k|   } else if(sized_for_comba_mul<4>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (299:14): [True: 16.7k, False: 4.76k]
  ------------------
  300|  16.7k|      bigint_comba_mul4(z, x, y);
  301|  16.7k|   } else if(sized_for_comba_mul<6>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (301:14): [True: 2.00k, False: 2.76k]
  ------------------
  302|  2.00k|      bigint_comba_mul6(z, x, y);
  303|  2.76k|   } else if(sized_for_comba_mul<8>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (303:14): [True: 1.18k, False: 1.57k]
  ------------------
  304|  1.18k|      bigint_comba_mul8(z, x, y);
  305|  1.57k|   } else if(sized_for_comba_mul<9>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (305:14): [True: 1.56k, False: 16]
  ------------------
  306|  1.56k|      bigint_comba_mul9(z, x, y);
  307|  1.56k|   } else if(sized_for_comba_mul<16>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (307:14): [True: 0, False: 16]
  ------------------
  308|      0|      bigint_comba_mul16(z, x, y);
  309|     16|   } else if(sized_for_comba_mul<24>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (309:14): [True: 0, False: 16]
  ------------------
  310|      0|      bigint_comba_mul24(z, x, y);
  311|     16|   } else if(x_sw < KARATSUBA_MULTIPLY_THRESHOLD || y_sw < KARATSUBA_MULTIPLY_THRESHOLD || workspace == nullptr) {
  ------------------
  |  Branch (311:14): [True: 16, False: 0]
  |  Branch (311:53): [True: 0, False: 0]
  |  Branch (311:92): [True: 0, False: 0]
  ------------------
  312|     16|      basecase_mul(z, z_size, x, x_sw, y, y_sw);
  313|     16|   } else {
  314|      0|      const size_t N = karatsuba_size(z_size, x_size, x_sw, y_size, y_sw);
  315|       |
  316|      0|      if(N > 0 && z_size >= 2 * N && ws_size >= 2 * N) {
  ------------------
  |  Branch (316:10): [True: 0, False: 0]
  |  Branch (316:19): [True: 0, False: 0]
  |  Branch (316:38): [True: 0, False: 0]
  ------------------
  317|      0|         karatsuba_mul(z, x, y, N, workspace);
  318|      0|      } else {
  319|      0|         basecase_mul(z, z_size, x, x_sw, y, y_sw);
  320|      0|      }
  321|      0|   }
  322|  21.5k|}
_ZN5Botan10bigint_sqrEPmmPKmmmS0_m:
  327|     18|void bigint_sqr(word z[], size_t z_size, const word x[], size_t x_size, size_t x_sw, word workspace[], size_t ws_size) {
  328|     18|   zeroize_buffer(z, z_size);
  329|       |
  330|     18|   BOTAN_ASSERT(z_size / 2 >= x_sw, "Output size is sufficient");
  ------------------
  |  |   71|     18|   do {                                                                                 \
  |  |   72|     18|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|     18|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 18]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|     18|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 18]
  |  |  ------------------
  ------------------
  331|       |
  332|     18|   if(x_sw == 1) {
  ------------------
  |  Branch (332:7): [True: 0, False: 18]
  ------------------
  333|      0|      bigint_linmul3(z, x, x_sw, x[0]);
  334|     18|   } else if(sized_for_comba_sqr<4>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (334:14): [True: 6, False: 12]
  ------------------
  335|      6|      bigint_comba_sqr4(z, x);
  336|     12|   } else if(sized_for_comba_sqr<6>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (336:14): [True: 6, False: 6]
  ------------------
  337|      6|      bigint_comba_sqr6(z, x);
  338|      6|   } else if(sized_for_comba_sqr<8>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (338:14): [True: 3, False: 3]
  ------------------
  339|      3|      bigint_comba_sqr8(z, x);
  340|      3|   } else if(sized_for_comba_sqr<9>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (340:14): [True: 3, False: 0]
  ------------------
  341|      3|      bigint_comba_sqr9(z, x);
  342|      3|   } else if(sized_for_comba_sqr<16>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (342:14): [True: 0, False: 0]
  ------------------
  343|      0|      bigint_comba_sqr16(z, x);
  344|      0|   } else if(sized_for_comba_sqr<24>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (344:14): [True: 0, False: 0]
  ------------------
  345|      0|      bigint_comba_sqr24(z, x);
  346|      0|   } else if(x_size < KARATSUBA_SQUARE_THRESHOLD || workspace == nullptr) {
  ------------------
  |  Branch (346:14): [True: 0, False: 0]
  |  Branch (346:53): [True: 0, False: 0]
  ------------------
  347|      0|      basecase_sqr(z, z_size, x, x_sw);
  348|      0|   } else {
  349|      0|      const size_t N = karatsuba_size(z_size, x_size, x_sw);
  350|       |
  351|      0|      if(N > 0 && z_size >= 2 * N && ws_size >= 2 * N) {
  ------------------
  |  Branch (351:10): [True: 0, False: 0]
  |  Branch (351:19): [True: 0, False: 0]
  |  Branch (351:38): [True: 0, False: 0]
  ------------------
  352|      0|         karatsuba_sqr(z, x, N, workspace);
  353|      0|      } else {
  354|      0|         basecase_sqr(z, z_size, x, x_sw);
  355|      0|      }
  356|      0|   }
  357|     18|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm4EEEbmmmmm:
  272|  21.5k|inline bool sized_for_comba_mul(size_t x_sw, size_t x_size, size_t y_sw, size_t y_size, size_t z_size) {
  273|  21.5k|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (273:12): [True: 16.7k, False: 4.76k]
  |  Branch (273:26): [True: 16.7k, False: 0]
  |  Branch (273:42): [True: 16.7k, False: 0]
  |  Branch (273:56): [True: 16.7k, False: 0]
  |  Branch (273:72): [True: 16.7k, False: 0]
  ------------------
  274|  21.5k|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm6EEEbmmmmm:
  272|  4.76k|inline bool sized_for_comba_mul(size_t x_sw, size_t x_size, size_t y_sw, size_t y_size, size_t z_size) {
  273|  4.76k|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (273:12): [True: 2.00k, False: 2.76k]
  |  Branch (273:26): [True: 2.00k, False: 0]
  |  Branch (273:42): [True: 2.00k, False: 0]
  |  Branch (273:56): [True: 2.00k, False: 0]
  |  Branch (273:72): [True: 2.00k, False: 0]
  ------------------
  274|  4.76k|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm8EEEbmmmmm:
  272|  2.76k|inline bool sized_for_comba_mul(size_t x_sw, size_t x_size, size_t y_sw, size_t y_size, size_t z_size) {
  273|  2.76k|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (273:12): [True: 1.18k, False: 1.57k]
  |  Branch (273:26): [True: 1.18k, False: 0]
  |  Branch (273:42): [True: 1.18k, False: 0]
  |  Branch (273:56): [True: 1.18k, False: 0]
  |  Branch (273:72): [True: 1.18k, False: 0]
  ------------------
  274|  2.76k|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm9EEEbmmmmm:
  272|  1.57k|inline bool sized_for_comba_mul(size_t x_sw, size_t x_size, size_t y_sw, size_t y_size, size_t z_size) {
  273|  1.57k|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (273:12): [True: 1.56k, False: 16]
  |  Branch (273:26): [True: 1.56k, False: 0]
  |  Branch (273:42): [True: 1.56k, False: 0]
  |  Branch (273:56): [True: 1.56k, False: 0]
  |  Branch (273:72): [True: 1.56k, False: 0]
  ------------------
  274|  1.57k|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm16EEEbmmmmm:
  272|     16|inline bool sized_for_comba_mul(size_t x_sw, size_t x_size, size_t y_sw, size_t y_size, size_t z_size) {
  273|     16|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (273:12): [True: 16, False: 0]
  |  Branch (273:26): [True: 8, False: 8]
  |  Branch (273:42): [True: 8, False: 0]
  |  Branch (273:56): [True: 8, False: 0]
  |  Branch (273:72): [True: 0, False: 8]
  ------------------
  274|     16|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm24EEEbmmmmm:
  272|     16|inline bool sized_for_comba_mul(size_t x_sw, size_t x_size, size_t y_sw, size_t y_size, size_t z_size) {
  273|     16|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (273:12): [True: 16, False: 0]
  |  Branch (273:26): [True: 0, False: 16]
  |  Branch (273:42): [True: 0, False: 0]
  |  Branch (273:56): [True: 0, False: 0]
  |  Branch (273:72): [True: 0, False: 0]
  ------------------
  274|     16|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_sqrILm4EEEbmmm:
  277|     18|inline bool sized_for_comba_sqr(size_t x_sw, size_t x_size, size_t z_size) {
  278|     18|   return (x_sw <= SZ && x_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (278:12): [True: 6, False: 12]
  |  Branch (278:26): [True: 6, False: 0]
  |  Branch (278:42): [True: 6, False: 0]
  ------------------
  279|     18|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_sqrILm6EEEbmmm:
  277|     12|inline bool sized_for_comba_sqr(size_t x_sw, size_t x_size, size_t z_size) {
  278|     12|   return (x_sw <= SZ && x_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (278:12): [True: 6, False: 6]
  |  Branch (278:26): [True: 6, False: 0]
  |  Branch (278:42): [True: 6, False: 0]
  ------------------
  279|     12|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_sqrILm8EEEbmmm:
  277|      6|inline bool sized_for_comba_sqr(size_t x_sw, size_t x_size, size_t z_size) {
  278|      6|   return (x_sw <= SZ && x_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (278:12): [True: 3, False: 3]
  |  Branch (278:26): [True: 3, False: 0]
  |  Branch (278:42): [True: 3, False: 0]
  ------------------
  279|      6|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_sqrILm9EEEbmmm:
  277|      3|inline bool sized_for_comba_sqr(size_t x_sw, size_t x_size, size_t z_size) {
  278|      3|   return (x_sw <= SZ && x_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (278:12): [True: 3, False: 0]
  |  Branch (278:26): [True: 3, False: 0]
  |  Branch (278:42): [True: 3, False: 0]
  ------------------
  279|      3|}

_ZN5Botan25bigint_monty_redc_genericEPmPKmmS2_mmS0_:
   91|  1.54k|   word r[], const word z[], size_t z_size, const word p[], size_t p_size, word p_dash, word ws[]) {
   92|  1.54k|   BOTAN_ARG_CHECK(z_size >= 2 * p_size && p_size > 0, "Invalid sizes for bigint_monty_redc_generic");
  ------------------
  |  |   35|  1.54k|   do {                                                          \
  |  |   36|  1.54k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  3.08k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 1.54k, False: 0]
  |  |  |  Branch (37:12): [True: 1.54k, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.54k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.54k]
  |  |  ------------------
  ------------------
   93|       |
   94|  1.54k|   word3<word> accum;
   95|       |
   96|  1.54k|   accum.add(z[0]);
   97|       |
   98|  1.54k|   ws[0] = accum.monty_step(p[0], p_dash);
   99|       |
  100|  13.8k|   for(size_t i = 1; i != p_size; ++i) {
  ------------------
  |  Branch (100:22): [True: 12.3k, False: 1.54k]
  ------------------
  101|  12.3k|      mul_rev_range(accum, ws, p, i);
  102|  12.3k|      accum.add(z[i]);
  103|  12.3k|      ws[i] = accum.monty_step(p[0], p_dash);
  104|  12.3k|   }
  105|       |
  106|  13.8k|   for(size_t i = 0; i != p_size - 1; ++i) {
  ------------------
  |  Branch (106:22): [True: 12.3k, False: 1.54k]
  ------------------
  107|  12.3k|      mul_rev_range(accum, &ws[i + 1], &p[i], p_size - (i + 1));
  108|  12.3k|      accum.add(z[p_size + i]);
  109|  12.3k|      ws[i] = accum.extract();
  110|  12.3k|   }
  111|       |
  112|  1.54k|   accum.add(z[2 * p_size - 1]);
  113|       |
  114|  1.54k|   ws[p_size - 1] = accum.extract();
  115|       |   // w1 is the final part, which is not stored in the workspace
  116|  1.54k|   const word w1 = accum.extract();
  117|       |
  118|       |   /*
  119|       |   * The result might need to be reduced mod p. To avoid a timing
  120|       |   * channel, always perform the subtraction. If in the computation
  121|       |   * of x - p a borrow is required then x was already < p.
  122|       |   *
  123|       |   * x starts at ws[0] and is p_size bytes long plus a possible high
  124|       |   * digit left over in w1.
  125|       |   *
  126|       |   * x - p starts at z[0] and is also p_size bytes long
  127|       |   *
  128|       |   * If borrow was set after the subtraction, then x was already less
  129|       |   * than p and the subtraction was not needed. In that case overwrite
  130|       |   * z[0:p_size] with the original x in ws[0:p_size].
  131|       |   *
  132|       |   * We only copy out p_size in the final step because we know
  133|       |   * the Montgomery result is < P
  134|       |   */
  135|       |
  136|  1.54k|   bigint_monty_maybe_sub(p_size, r, w1, ws, p);
  137|  1.54k|}
mp_monty.cpp:_ZN5Botan12_GLOBAL__N_113mul_rev_rangeERNS_5word3ImEEPKmS5_m:
   18|  24.7k|BOTAN_FORCE_INLINE void mul_rev_range(word3<word>& accum, const word ws[], const word p[], size_t bound) {
   19|       |   /*
   20|       |   Unrolled version of:
   21|       |
   22|       |   for(size_t i = 0; i < bound; ++i) {
   23|       |      accum.mul(ws[i], p[bound - i]);
   24|       |   }
   25|       |   */
   26|       |
   27|  24.7k|   size_t lower = 0;
   28|  64.8k|   while(lower < bound) {
  ------------------
  |  Branch (28:10): [True: 40.1k, False: 24.7k]
  ------------------
   29|  40.1k|      const size_t upper = bound - lower;
   30|       |
   31|  40.1k|      if(upper >= 16) {
  ------------------
  |  Branch (31:10): [True: 0, False: 40.1k]
  ------------------
   32|      0|         accum.mul(ws[lower], p[upper]);
   33|      0|         accum.mul(ws[lower + 1], p[upper - 1]);
   34|      0|         accum.mul(ws[lower + 2], p[upper - 2]);
   35|      0|         accum.mul(ws[lower + 3], p[upper - 3]);
   36|      0|         accum.mul(ws[lower + 4], p[upper - 4]);
   37|      0|         accum.mul(ws[lower + 5], p[upper - 5]);
   38|      0|         accum.mul(ws[lower + 6], p[upper - 6]);
   39|      0|         accum.mul(ws[lower + 7], p[upper - 7]);
   40|      0|         accum.mul(ws[lower + 8], p[upper - 8]);
   41|      0|         accum.mul(ws[lower + 9], p[upper - 9]);
   42|      0|         accum.mul(ws[lower + 10], p[upper - 10]);
   43|      0|         accum.mul(ws[lower + 11], p[upper - 11]);
   44|      0|         accum.mul(ws[lower + 12], p[upper - 12]);
   45|      0|         accum.mul(ws[lower + 13], p[upper - 13]);
   46|      0|         accum.mul(ws[lower + 14], p[upper - 14]);
   47|      0|         accum.mul(ws[lower + 15], p[upper - 15]);
   48|      0|         lower += 16;
   49|  40.1k|      } else if(upper >= 8) {
  ------------------
  |  Branch (49:17): [True: 3.08k, False: 37.0k]
  ------------------
   50|  3.08k|         accum.mul(ws[lower], p[upper]);
   51|  3.08k|         accum.mul(ws[lower + 1], p[upper - 1]);
   52|  3.08k|         accum.mul(ws[lower + 2], p[upper - 2]);
   53|  3.08k|         accum.mul(ws[lower + 3], p[upper - 3]);
   54|  3.08k|         accum.mul(ws[lower + 4], p[upper - 4]);
   55|  3.08k|         accum.mul(ws[lower + 5], p[upper - 5]);
   56|  3.08k|         accum.mul(ws[lower + 6], p[upper - 6]);
   57|  3.08k|         accum.mul(ws[lower + 7], p[upper - 7]);
   58|  3.08k|         lower += 8;
   59|  37.0k|      } else if(upper >= 4) {
  ------------------
  |  Branch (59:17): [True: 12.3k, False: 24.7k]
  ------------------
   60|  12.3k|         accum.mul(ws[lower], p[upper]);
   61|  12.3k|         accum.mul(ws[lower + 1], p[upper - 1]);
   62|  12.3k|         accum.mul(ws[lower + 2], p[upper - 2]);
   63|  12.3k|         accum.mul(ws[lower + 3], p[upper - 3]);
   64|  12.3k|         lower += 4;
   65|  24.7k|      } else if(upper >= 2) {
  ------------------
  |  Branch (65:17): [True: 12.3k, False: 12.3k]
  ------------------
   66|  12.3k|         accum.mul(ws[lower], p[upper]);
   67|  12.3k|         accum.mul(ws[lower + 1], p[upper - 1]);
   68|  12.3k|         lower += 2;
   69|  12.3k|      } else {
   70|  12.3k|         accum.mul(ws[lower], p[upper]);
   71|  12.3k|         lower += 1;
   72|  12.3k|      }
   73|  40.1k|   }
   74|  24.7k|}

_ZN5Botan19bigint_monty_redc_4EPmPKmS2_mS0_:
   12|  2.47M|void bigint_monty_redc_4(word r[4], const word z[8], const word p[4], word p_dash, word ws[4]) {
   13|  2.47M|   word3<word> accum;
   14|  2.47M|   accum.add(z[0]);
   15|  2.47M|   ws[0] = accum.monty_step(p[0], p_dash);
   16|  2.47M|   accum.mul(ws[0], p[1]);
   17|  2.47M|   accum.add(z[1]);
   18|  2.47M|   ws[1] = accum.monty_step(p[0], p_dash);
   19|  2.47M|   accum.mul(ws[0], p[2]);
   20|  2.47M|   accum.mul(ws[1], p[1]);
   21|  2.47M|   accum.add(z[2]);
   22|  2.47M|   ws[2] = accum.monty_step(p[0], p_dash);
   23|  2.47M|   accum.mul(ws[0], p[3]);
   24|  2.47M|   accum.mul(ws[1], p[2]);
   25|  2.47M|   accum.mul(ws[2], p[1]);
   26|  2.47M|   accum.add(z[3]);
   27|  2.47M|   ws[3] = accum.monty_step(p[0], p_dash);
   28|  2.47M|   accum.mul(ws[1], p[3]);
   29|  2.47M|   accum.mul(ws[2], p[2]);
   30|  2.47M|   accum.mul(ws[3], p[1]);
   31|  2.47M|   accum.add(z[4]);
   32|  2.47M|   ws[0] = accum.extract();
   33|  2.47M|   accum.mul(ws[2], p[3]);
   34|  2.47M|   accum.mul(ws[3], p[2]);
   35|  2.47M|   accum.add(z[5]);
   36|  2.47M|   ws[1] = accum.extract();
   37|  2.47M|   accum.mul(ws[3], p[3]);
   38|  2.47M|   accum.add(z[6]);
   39|  2.47M|   ws[2] = accum.extract();
   40|  2.47M|   accum.add(z[7]);
   41|  2.47M|   ws[3] = accum.extract();
   42|  2.47M|   const word w1 = accum.extract();
   43|  2.47M|   bigint_monty_maybe_sub<4>(r, w1, ws, p);
   44|  2.47M|}
_ZN5Botan19bigint_monty_redc_6EPmPKmS2_mS0_:
   46|  1.47M|void bigint_monty_redc_6(word r[6], const word z[12], const word p[6], word p_dash, word ws[6]) {
   47|  1.47M|   word3<word> accum;
   48|  1.47M|   accum.add(z[0]);
   49|  1.47M|   ws[0] = accum.monty_step(p[0], p_dash);
   50|  1.47M|   accum.mul(ws[0], p[1]);
   51|  1.47M|   accum.add(z[1]);
   52|  1.47M|   ws[1] = accum.monty_step(p[0], p_dash);
   53|  1.47M|   accum.mul(ws[0], p[2]);
   54|  1.47M|   accum.mul(ws[1], p[1]);
   55|  1.47M|   accum.add(z[2]);
   56|  1.47M|   ws[2] = accum.monty_step(p[0], p_dash);
   57|  1.47M|   accum.mul(ws[0], p[3]);
   58|  1.47M|   accum.mul(ws[1], p[2]);
   59|  1.47M|   accum.mul(ws[2], p[1]);
   60|  1.47M|   accum.add(z[3]);
   61|  1.47M|   ws[3] = accum.monty_step(p[0], p_dash);
   62|  1.47M|   accum.mul(ws[0], p[4]);
   63|  1.47M|   accum.mul(ws[1], p[3]);
   64|  1.47M|   accum.mul(ws[2], p[2]);
   65|  1.47M|   accum.mul(ws[3], p[1]);
   66|  1.47M|   accum.add(z[4]);
   67|  1.47M|   ws[4] = accum.monty_step(p[0], p_dash);
   68|  1.47M|   accum.mul(ws[0], p[5]);
   69|  1.47M|   accum.mul(ws[1], p[4]);
   70|  1.47M|   accum.mul(ws[2], p[3]);
   71|  1.47M|   accum.mul(ws[3], p[2]);
   72|  1.47M|   accum.mul(ws[4], p[1]);
   73|  1.47M|   accum.add(z[5]);
   74|  1.47M|   ws[5] = accum.monty_step(p[0], p_dash);
   75|  1.47M|   accum.mul(ws[1], p[5]);
   76|  1.47M|   accum.mul(ws[2], p[4]);
   77|  1.47M|   accum.mul(ws[3], p[3]);
   78|  1.47M|   accum.mul(ws[4], p[2]);
   79|  1.47M|   accum.mul(ws[5], p[1]);
   80|  1.47M|   accum.add(z[6]);
   81|  1.47M|   ws[0] = accum.extract();
   82|  1.47M|   accum.mul(ws[2], p[5]);
   83|  1.47M|   accum.mul(ws[3], p[4]);
   84|  1.47M|   accum.mul(ws[4], p[3]);
   85|  1.47M|   accum.mul(ws[5], p[2]);
   86|  1.47M|   accum.add(z[7]);
   87|  1.47M|   ws[1] = accum.extract();
   88|  1.47M|   accum.mul(ws[3], p[5]);
   89|  1.47M|   accum.mul(ws[4], p[4]);
   90|  1.47M|   accum.mul(ws[5], p[3]);
   91|  1.47M|   accum.add(z[8]);
   92|  1.47M|   ws[2] = accum.extract();
   93|  1.47M|   accum.mul(ws[4], p[5]);
   94|  1.47M|   accum.mul(ws[5], p[4]);
   95|  1.47M|   accum.add(z[9]);
   96|  1.47M|   ws[3] = accum.extract();
   97|  1.47M|   accum.mul(ws[5], p[5]);
   98|  1.47M|   accum.add(z[10]);
   99|  1.47M|   ws[4] = accum.extract();
  100|  1.47M|   accum.add(z[11]);
  101|  1.47M|   ws[5] = accum.extract();
  102|  1.47M|   const word w1 = accum.extract();
  103|  1.47M|   bigint_monty_maybe_sub<6>(r, w1, ws, p);
  104|  1.47M|}
_ZN5Botan19bigint_monty_redc_8EPmPKmS2_mS0_:
  106|  2.45M|void bigint_monty_redc_8(word r[8], const word z[16], const word p[8], word p_dash, word ws[8]) {
  107|  2.45M|   word3<word> accum;
  108|  2.45M|   accum.add(z[0]);
  109|  2.45M|   ws[0] = accum.monty_step(p[0], p_dash);
  110|  2.45M|   accum.mul(ws[0], p[1]);
  111|  2.45M|   accum.add(z[1]);
  112|  2.45M|   ws[1] = accum.monty_step(p[0], p_dash);
  113|  2.45M|   accum.mul(ws[0], p[2]);
  114|  2.45M|   accum.mul(ws[1], p[1]);
  115|  2.45M|   accum.add(z[2]);
  116|  2.45M|   ws[2] = accum.monty_step(p[0], p_dash);
  117|  2.45M|   accum.mul(ws[0], p[3]);
  118|  2.45M|   accum.mul(ws[1], p[2]);
  119|  2.45M|   accum.mul(ws[2], p[1]);
  120|  2.45M|   accum.add(z[3]);
  121|  2.45M|   ws[3] = accum.monty_step(p[0], p_dash);
  122|  2.45M|   accum.mul(ws[0], p[4]);
  123|  2.45M|   accum.mul(ws[1], p[3]);
  124|  2.45M|   accum.mul(ws[2], p[2]);
  125|  2.45M|   accum.mul(ws[3], p[1]);
  126|  2.45M|   accum.add(z[4]);
  127|  2.45M|   ws[4] = accum.monty_step(p[0], p_dash);
  128|  2.45M|   accum.mul(ws[0], p[5]);
  129|  2.45M|   accum.mul(ws[1], p[4]);
  130|  2.45M|   accum.mul(ws[2], p[3]);
  131|  2.45M|   accum.mul(ws[3], p[2]);
  132|  2.45M|   accum.mul(ws[4], p[1]);
  133|  2.45M|   accum.add(z[5]);
  134|  2.45M|   ws[5] = accum.monty_step(p[0], p_dash);
  135|  2.45M|   accum.mul(ws[0], p[6]);
  136|  2.45M|   accum.mul(ws[1], p[5]);
  137|  2.45M|   accum.mul(ws[2], p[4]);
  138|  2.45M|   accum.mul(ws[3], p[3]);
  139|  2.45M|   accum.mul(ws[4], p[2]);
  140|  2.45M|   accum.mul(ws[5], p[1]);
  141|  2.45M|   accum.add(z[6]);
  142|  2.45M|   ws[6] = accum.monty_step(p[0], p_dash);
  143|  2.45M|   accum.mul(ws[0], p[7]);
  144|  2.45M|   accum.mul(ws[1], p[6]);
  145|  2.45M|   accum.mul(ws[2], p[5]);
  146|  2.45M|   accum.mul(ws[3], p[4]);
  147|  2.45M|   accum.mul(ws[4], p[3]);
  148|  2.45M|   accum.mul(ws[5], p[2]);
  149|  2.45M|   accum.mul(ws[6], p[1]);
  150|  2.45M|   accum.add(z[7]);
  151|  2.45M|   ws[7] = accum.monty_step(p[0], p_dash);
  152|  2.45M|   accum.mul(ws[1], p[7]);
  153|  2.45M|   accum.mul(ws[2], p[6]);
  154|  2.45M|   accum.mul(ws[3], p[5]);
  155|  2.45M|   accum.mul(ws[4], p[4]);
  156|  2.45M|   accum.mul(ws[5], p[3]);
  157|  2.45M|   accum.mul(ws[6], p[2]);
  158|  2.45M|   accum.mul(ws[7], p[1]);
  159|  2.45M|   accum.add(z[8]);
  160|  2.45M|   ws[0] = accum.extract();
  161|  2.45M|   accum.mul(ws[2], p[7]);
  162|  2.45M|   accum.mul(ws[3], p[6]);
  163|  2.45M|   accum.mul(ws[4], p[5]);
  164|  2.45M|   accum.mul(ws[5], p[4]);
  165|  2.45M|   accum.mul(ws[6], p[3]);
  166|  2.45M|   accum.mul(ws[7], p[2]);
  167|  2.45M|   accum.add(z[9]);
  168|  2.45M|   ws[1] = accum.extract();
  169|  2.45M|   accum.mul(ws[3], p[7]);
  170|  2.45M|   accum.mul(ws[4], p[6]);
  171|  2.45M|   accum.mul(ws[5], p[5]);
  172|  2.45M|   accum.mul(ws[6], p[4]);
  173|  2.45M|   accum.mul(ws[7], p[3]);
  174|  2.45M|   accum.add(z[10]);
  175|  2.45M|   ws[2] = accum.extract();
  176|  2.45M|   accum.mul(ws[4], p[7]);
  177|  2.45M|   accum.mul(ws[5], p[6]);
  178|  2.45M|   accum.mul(ws[6], p[5]);
  179|  2.45M|   accum.mul(ws[7], p[4]);
  180|  2.45M|   accum.add(z[11]);
  181|  2.45M|   ws[3] = accum.extract();
  182|  2.45M|   accum.mul(ws[5], p[7]);
  183|  2.45M|   accum.mul(ws[6], p[6]);
  184|  2.45M|   accum.mul(ws[7], p[5]);
  185|  2.45M|   accum.add(z[12]);
  186|  2.45M|   ws[4] = accum.extract();
  187|  2.45M|   accum.mul(ws[6], p[7]);
  188|  2.45M|   accum.mul(ws[7], p[6]);
  189|  2.45M|   accum.add(z[13]);
  190|  2.45M|   ws[5] = accum.extract();
  191|  2.45M|   accum.mul(ws[7], p[7]);
  192|  2.45M|   accum.add(z[14]);
  193|  2.45M|   ws[6] = accum.extract();
  194|  2.45M|   accum.add(z[15]);
  195|  2.45M|   ws[7] = accum.extract();
  196|  2.45M|   const word w1 = accum.extract();
  197|  2.45M|   bigint_monty_maybe_sub<8>(r, w1, ws, p);
  198|  2.45M|}

_ZN5Botan17Barrett_ReductionC2ERKNS_6BigIntES1_m:
   17|     18|      m_modulus(m), m_mu(std::move(mu)), m_mod_words(mw), m_modulus_bits(m.bits()) {
   18|       |   // Give some extra space for Karatsuba
   19|     18|   m_modulus.grow_to(m_mod_words + 8);
   20|     18|   m_mu.grow_to(m_mod_words + 8);
   21|     18|}
_ZN5Botan17Barrett_Reduction18for_secret_modulusERKNS_6BigIntE:
   23|     18|Barrett_Reduction Barrett_Reduction::for_secret_modulus(const BigInt& mod) {
   24|     18|   BOTAN_ARG_CHECK(mod.signum() > 0, "Modulus must be positive");
  ------------------
  |  |   35|     18|   do {                                                          \
  |  |   36|     18|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     18|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 18]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     18|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 18]
  |  |  ------------------
  ------------------
   25|       |
   26|     18|   const size_t mod_words = mod.sig_words();
   27|       |
   28|       |   // Compute mu = floor(2^{2k} / m)
   29|     18|   const size_t mu_bits = 2 * WordInfo<word>::bits * mod_words;
   30|     18|   return Barrett_Reduction(mod, ct_divide_pow2k(mu_bits, mod), mod_words);
   31|     18|}
_ZN5Botan17Barrett_Reduction18for_public_modulusERKNS_6BigIntE:
   33|     18|Barrett_Reduction Barrett_Reduction::for_public_modulus(const BigInt& mod) {
   34|     18|   return Barrett_Reduction::for_secret_modulus(mod);
   35|     18|}
_ZNK5Botan17Barrett_Reduction8multiplyERKNS_6BigIntES3_:
  153|     18|BigInt Barrett_Reduction::multiply(const BigInt& x, const BigInt& y) const {
  154|     18|   BOTAN_ARG_CHECK(acceptable_barrett_input(x, m_modulus).as_bool(), "Invalid x param for Barrett multiply");
  ------------------
  |  |   35|     18|   do {                                                          \
  |  |   36|     18|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     18|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 18]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     18|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 18]
  |  |  ------------------
  ------------------
  155|     18|   BOTAN_ARG_CHECK(acceptable_barrett_input(y, m_modulus).as_bool(), "Invalid y param for Barrett multiply");
  ------------------
  |  |   35|     18|   do {                                                          \
  |  |   36|     18|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     18|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 18]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     18|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 18]
  |  |  ------------------
  ------------------
  156|       |
  157|     18|   secure_vector<word> ws(2 * (m_mod_words + 2));
  158|     18|   secure_vector<word> xy(2 * m_mod_words);
  159|       |
  160|     18|   bigint_mul(xy.data(),
  161|     18|              xy.size(),
  162|     18|              x._data(),
  163|     18|              x.size(),
  164|     18|              std::min(x.size(), m_mod_words),
  165|     18|              y._data(),
  166|     18|              y.size(),
  167|     18|              std::min(y.size(), m_mod_words),
  168|     18|              ws.data(),
  169|     18|              ws.size());
  170|       |
  171|     18|   return barrett_reduce(m_mod_words, m_modulus, m_mu, xy, ws);
  172|     18|}
_ZNK5Botan17Barrett_Reduction6squareERKNS_6BigIntE:
  174|     18|BigInt Barrett_Reduction::square(const BigInt& x) const {
  175|     18|   BOTAN_ARG_CHECK(acceptable_barrett_input(x, m_modulus).as_bool(), "Invalid x param for Barrett square");
  ------------------
  |  |   35|     18|   do {                                                          \
  |  |   36|     18|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     18|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 18]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     18|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 18]
  |  |  ------------------
  ------------------
  176|       |
  177|     18|   secure_vector<word> ws(2 * (m_mod_words + 2));
  178|     18|   secure_vector<word> x2(2 * m_mod_words);
  179|       |
  180|     18|   bigint_sqr(x2.data(), x2.size(), x._data(), x.size(), std::min(x.size(), m_mod_words), ws.data(), ws.size());
  181|       |
  182|     18|   return barrett_reduce(m_mod_words, m_modulus, m_mu, x2, ws);
  183|     18|}
_ZNK5Botan17Barrett_Reduction6reduceERKNS_6BigIntE:
  185|     12|BigInt Barrett_Reduction::reduce(const BigInt& x) const {
  186|     12|   BOTAN_ARG_CHECK(x.signum() >= 0, "Argument must be non-negative");
  ------------------
  |  |   35|     12|   do {                                                          \
  |  |   36|     12|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     12|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 12]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     12|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 12]
  |  |  ------------------
  ------------------
  187|       |
  188|     12|   const size_t x_sw = x.sig_words();
  189|     12|   BOTAN_ARG_CHECK(x_sw <= 2 * m_mod_words, "Argument is too large for Barrett reduction");
  ------------------
  |  |   35|     12|   do {                                                          \
  |  |   36|     12|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     12|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 12]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     12|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 12]
  |  |  ------------------
  ------------------
  190|       |
  191|     12|   x.grow_to(2 * m_mod_words);
  192|       |
  193|     12|   secure_vector<word> ws;
  194|     12|   return barrett_reduce(m_mod_words, m_modulus, m_mu, x._as_span(), ws);
  195|     12|}
barrett.cpp:_ZN5Botan12_GLOBAL__N_124acceptable_barrett_inputERKNS_6BigIntES3_:
  145|     54|CT::Choice acceptable_barrett_input(const BigInt& x, const BigInt& modulus) {
  146|     54|   auto x_is_positive = CT::Choice::from_int(static_cast<uint32_t>(x.signum() >= 0));
  147|     54|   auto x_lt_mod = bigint_ct_is_lt(x._data(), x.size(), modulus._data(), modulus.sig_words()).as_choice();
  148|     54|   return x_is_positive && x_lt_mod;
  149|     54|}
barrett.cpp:_ZN5Botan12_GLOBAL__N_114barrett_reduceEmRKNS_6BigIntES3_NSt3__14spanIKmLm18446744073709551615EEERNS4_6vectorImNS_16secure_allocatorImEEEE:
   48|     48|   size_t mod_words, const BigInt& modulus, const BigInt& mu, std::span<const word> x_words, secure_vector<word>& ws) {
   49|     48|   BOTAN_ASSERT_NOMSG(modulus.sig_words() == mod_words);
  ------------------
  |  |   84|     48|   do {                                                                     \
  |  |   85|     48|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     48|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 48]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     48|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 48]
  |  |  ------------------
  ------------------
   50|       |
   51|       |   // Caller must expand input to be at least this size
   52|     48|   BOTAN_ASSERT_NOMSG(x_words.size() >= 2 * mod_words);
  ------------------
  |  |   84|     48|   do {                                                                     \
  |  |   85|     48|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     48|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 48]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     48|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 48]
  |  |  ------------------
  ------------------
   53|       |
   54|       |   // Normally mod_words + 1 but can be + 2 if the modulus is a power of 2
   55|     48|   const size_t mu_words = mu.sig_words();
   56|     48|   BOTAN_ASSERT_NOMSG(mu_words <= mod_words + 2);
  ------------------
  |  |   84|     48|   do {                                                                     \
  |  |   85|     48|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     48|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 48]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     48|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 48]
  |  |  ------------------
  ------------------
   57|       |
   58|     48|   if(ws.size() < 2 * (mod_words + 2)) {
  ------------------
  |  Branch (58:7): [True: 12, False: 36]
  ------------------
   59|     12|      ws.resize(2 * (mod_words + 2));
   60|     12|   }
   61|       |
   62|     48|   CT::poison(x_words);
   63|       |
   64|       |   /*
   65|       |   * Following the notation of Handbook of Applied Cryptography
   66|       |   * Algorithm 14.42 "Barrett modular reduction", page 604
   67|       |   * <https://cacr.uwaterloo.ca/hac/about/chap14.pdf>
   68|       |   *
   69|       |   * Using `mu` for μ in the code
   70|       |   */
   71|       |
   72|       |   // Compute q1 = floor(x / 2^(k - 1)) which is equivalent to ignoring the low (k-1) words
   73|       |
   74|       |   // 2 * mod_words + 1 is sufficient, extra is to enable Karatsuba
   75|     48|   secure_vector<word> r(2 * mu_words + 2);
   76|       |
   77|     48|   copy_mem(r.data(), x_words.data() + (mod_words - 1), mod_words + 1);
   78|       |
   79|       |   // Now compute q2 = q1 * μ
   80|       |
   81|       |   // We allocate more size than required since this allows Karatsuba more often;
   82|       |   // just `mu_words + (mod_words + 1)` is sufficient
   83|     48|   const size_t q2_size = 2 * mu_words + 2;
   84|       |
   85|     48|   secure_vector<word> q2(q2_size);
   86|       |
   87|     48|   bigint_mul(
   88|     48|      q2.data(), q2.size(), r.data(), r.size(), mod_words + 1, mu._data(), mu.size(), mu_words, ws.data(), ws.size());
   89|       |
   90|       |   // Compute r2 = (floor(q2 / b^(k+1)) * m) mod 2^(k+1)
   91|       |   // The division/floor is again effected by just ignoring the low k + 1 words
   92|     48|   bigint_mul(r.data(),
   93|     48|              r.size(),
   94|     48|              &q2[mod_words + 1],  // ignoring the low mod_words + 1 words of the first product
   95|     48|              q2.size() - (mod_words + 1),
   96|     48|              mod_words + 1,
   97|     48|              modulus._data(),
   98|     48|              modulus.size(),
   99|     48|              mod_words,
  100|     48|              ws.data(),
  101|     48|              ws.size());
  102|       |
  103|       |   // Clear the high words of the product, equivalent to computing mod 2^(k+1)
  104|       |   // TODO add masked mul to avoid computing high bits at all
  105|     48|   clear_mem(std::span{r}.subspan(mod_words + 1));
  106|       |
  107|       |   // Compute r = r1 - r2
  108|       |
  109|       |   // The return value of bigint_sub_abs isn't quite right for what we need here so first compare
  110|     48|   const int32_t relative_size = bigint_cmp(r.data(), mod_words + 1, x_words.data(), mod_words + 1);
  111|       |
  112|     48|   bigint_sub_abs(r.data(), r.data(), x_words.data(), mod_words + 1, ws.data());
  113|       |
  114|       |   /*
  115|       |   If r is negative then we have to set r to r + 2^(k+1)
  116|       |
  117|       |   However for r negative computing this sum is equivalent to computing 2^(k+1) - abs(r)
  118|       |   */
  119|     48|   clear_mem(ws.data(), mod_words + 2);
  120|     48|   ws[mod_words + 1] = 1;
  121|     48|   bigint_sub2(ws.data(), mod_words + 2, r.data(), mod_words + 2);
  122|       |
  123|       |   // If relative_size > 0 then assign r to 2^(k+1) - r
  124|     48|   CT::Mask<word>::is_equal(static_cast<word>(relative_size), 1).select_n(r.data(), ws.data(), r.data(), mod_words + 2);
  125|       |
  126|       |   /*
  127|       |   * Per HAC Note 14.44 (ii) "step 4 is repeated at most twice since 0 ≤ r < 3m"
  128|       |   */
  129|     48|   const size_t bound = 2;
  130|       |
  131|     48|   BOTAN_ASSERT_NOMSG(r.size() >= mod_words + 1);
  ------------------
  |  |   84|     48|   do {                                                                     \
  |  |   85|     48|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     48|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 48]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     48|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 48]
  |  |  ------------------
  ------------------
  132|    144|   for(size_t i = 0; i != bound; ++i) {
  ------------------
  |  Branch (132:22): [True: 96, False: 48]
  ------------------
  133|     96|      const word borrow = bigint_sub3(ws.data(), r.data(), mod_words + 1, modulus._data(), mod_words);
  134|     96|      CT::Mask<word>::is_zero(borrow).select_n(r.data(), ws.data(), r.data(), mod_words + 1);
  135|     96|   }
  136|       |
  137|     48|   CT::unpoison(q2);
  138|     48|   CT::unpoison(r);
  139|     48|   CT::unpoison(ws);
  140|     48|   CT::unpoison(x_words);
  141|       |
  142|     48|   return BigInt::_from_words(r);
  143|     48|}

_ZN5Botan17Montgomery_Params4DataC2ERKNS_6BigIntERKNS_17Barrett_ReductionE:
   40|      6|Montgomery_Params::Data::Data(const BigInt& p, const Barrett_Reduction& mod_p) {
   41|      6|   if(p.is_even() || p < 3) {
  ------------------
  |  Branch (41:7): [True: 0, False: 6]
  |  Branch (41:22): [True: 0, False: 6]
  ------------------
   42|      0|      throw Invalid_Argument("Montgomery_Params invalid modulus");
   43|      0|   }
   44|       |
   45|      6|   m_p = p;
   46|      6|   m_p_words = m_p.sig_words();
   47|      6|   m_p_dash = monty_inverse(m_p.word_at(0));
   48|       |
   49|      6|   const BigInt r = BigInt::power_of_2(m_p_words * WordInfo<word>::bits);
   50|       |
   51|      6|   m_r1 = mod_p.reduce(r);
   52|      6|   m_r2 = mod_p.square(m_r1);
   53|      6|   m_r3 = mod_p.multiply(m_r1, m_r2);
   54|       |
   55|       |   // Barrett should be at least zero prefixing up to modulus size
   56|      6|   BOTAN_ASSERT_NOMSG(m_r1.size() >= m_p_words);
  ------------------
  |  |   84|      6|   do {                                                                     \
  |  |   85|      6|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|      6|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 6]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|      6|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 6]
  |  |  ------------------
  ------------------
   57|      6|   BOTAN_ASSERT_NOMSG(m_r2.size() >= m_p_words);
  ------------------
  |  |   84|      6|   do {                                                                     \
  |  |   85|      6|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|      6|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 6]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|      6|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 6]
  |  |  ------------------
  ------------------
   58|      6|   BOTAN_ASSERT_NOMSG(m_r3.size() >= m_p_words);
  ------------------
  |  |   84|      6|   do {                                                                     \
  |  |   85|      6|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|      6|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 6]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|      6|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 6]
  |  |  ------------------
  ------------------
   59|      6|}
_ZN5Botan17Montgomery_ParamsC2ERKNS_6BigIntERKNS_17Barrett_ReductionE:
   62|      6|      m_data(std::make_shared<Data>(p, mod_p)) {}
_ZNK5Botan17Montgomery_Params3mulERKNS_6BigIntES3_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   90|     12|BigInt Montgomery_Params::mul(const BigInt& x, const BigInt& y, secure_vector<word>& ws) const {
   91|     12|   const size_t p_size = this->p_words();
   92|     12|   BigInt z = BigInt::with_capacity(2 * p_size);
   93|     12|   this->mul(z, x, y, ws);
   94|     12|   return z;
   95|     12|}
_ZNK5Botan17Montgomery_Params3mulERNS_6BigIntERKS1_S4_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   97|     12|void Montgomery_Params::mul(BigInt& z, const BigInt& x, const BigInt& y, secure_vector<word>& ws) const {
   98|     12|   BOTAN_ARG_CHECK(&z != &x && &z != &y, "Montgomery_Params::mul output must not alias inputs");
  ------------------
  |  |   35|     12|   do {                                                          \
  |  |   36|     12|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     24|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 12, False: 0]
  |  |  |  Branch (37:12): [True: 12, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     12|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 12]
  |  |  ------------------
  ------------------
   99|       |
  100|     12|   const size_t p_size = this->p_words();
  101|       |
  102|     12|   if(ws.size() < 2 * p_size) {
  ------------------
  |  Branch (102:7): [True: 6, False: 6]
  ------------------
  103|      6|      ws.resize(2 * p_size);
  104|      6|   }
  105|       |
  106|     12|   BOTAN_DEBUG_ASSERT(x.sig_words() <= p_size);
  ------------------
  |  |  137|     12|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|     12|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 12]
  |  |  ------------------
  ------------------
  107|     12|   BOTAN_DEBUG_ASSERT(y.sig_words() <= p_size);
  ------------------
  |  |  137|     12|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|     12|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 12]
  |  |  ------------------
  ------------------
  108|       |
  109|     12|   if(z.size() < 2 * p_size) {
  ------------------
  |  Branch (109:7): [True: 0, False: 12]
  ------------------
  110|      0|      z.grow_to(2 * p_size);
  111|      0|   }
  112|       |
  113|     12|   bigint_mul(z.mutable_data(),
  114|     12|              z.size(),
  115|     12|              x._data(),
  116|     12|              x.size(),
  117|     12|              std::min(p_size, x.size()),
  118|     12|              y._data(),
  119|     12|              y.size(),
  120|     12|              std::min(p_size, y.size()),
  121|     12|              ws.data(),
  122|     12|              ws.size());
  123|       |
  124|     12|   bigint_monty_redc_inplace(z.mutable_data(), this->p()._data(), p_size, this->p_dash(), ws.data(), ws.size());
  125|     12|}
_ZNK5Botan17Montgomery_Params6mul_byERNS_6BigIntERKS1_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  157|  21.3k|void Montgomery_Params::mul_by(BigInt& x, const BigInt& y, secure_vector<word>& ws) const {
  158|  21.3k|   const size_t p_size = this->p_words();
  159|       |
  160|  21.3k|   if(ws.size() < 4 * p_size) {
  ------------------
  |  Branch (160:7): [True: 10.6k, False: 10.6k]
  ------------------
  161|  10.6k|      ws.resize(4 * p_size);
  162|  10.6k|   }
  163|       |
  164|  21.3k|   word* z_data = ws.data();
  165|  21.3k|   word* ws_data = &ws[2 * p_size];
  166|       |
  167|  21.3k|   BOTAN_DEBUG_ASSERT(x.sig_words() <= p_size);
  ------------------
  |  |  137|  21.3k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  21.3k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 21.3k]
  |  |  ------------------
  ------------------
  168|       |
  169|  21.3k|   bigint_mul(z_data,
  170|  21.3k|              2 * p_size,
  171|  21.3k|              x._data(),
  172|  21.3k|              x.size(),
  173|  21.3k|              std::min(p_size, x.size()),
  174|  21.3k|              y._data(),
  175|  21.3k|              y.size(),
  176|  21.3k|              std::min(p_size, y.size()),
  177|  21.3k|              ws_data,
  178|  21.3k|              2 * p_size);
  179|       |
  180|  21.3k|   bigint_monty_redc_inplace(z_data, this->p()._data(), p_size, this->p_dash(), ws_data, 2 * p_size);
  181|       |
  182|  21.3k|   if(x.size() < 2 * p_size) {
  ------------------
  |  Branch (182:7): [True: 4.65k, False: 16.7k]
  ------------------
  183|  4.65k|      x.grow_to(2 * p_size);
  184|  4.65k|   }
  185|  21.3k|   copy_mem(x.mutable_data(), z_data, 2 * p_size);
  186|  21.3k|}

_ZN5Botan6PCurve15PrimeOrderCurve6Scalar8_zeroizeEv:
   16|  58.9k|void PrimeOrderCurve::Scalar::_zeroize() {
   17|  58.9k|   secure_zeroize_buffer(m_value.data(), m_value.size() * sizeof(word));
   18|  58.9k|}
_ZN5Botan6PCurve15PrimeOrderCurve15for_named_curveENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   32|      6|std::shared_ptr<const PrimeOrderCurve> PrimeOrderCurve::for_named_curve(std::string_view name) {
   33|      6|#if defined(BOTAN_HAS_PCURVES_SECP256R1)
   34|      6|   if(name == "secp256r1") {
  ------------------
  |  Branch (34:7): [True: 1, False: 5]
  ------------------
   35|      1|      return PCurveInstance::secp256r1();
   36|      1|   }
   37|      5|#endif
   38|       |
   39|      5|#if defined(BOTAN_HAS_PCURVES_SECP384R1)
   40|      5|   if(name == "secp384r1") {
  ------------------
  |  Branch (40:7): [True: 1, False: 4]
  ------------------
   41|      1|      return PCurveInstance::secp384r1();
   42|      1|   }
   43|      4|#endif
   44|       |
   45|      4|#if defined(BOTAN_HAS_PCURVES_SECP521R1)
   46|      4|   if(name == "secp521r1") {
  ------------------
  |  Branch (46:7): [True: 1, False: 3]
  ------------------
   47|      1|      return PCurveInstance::secp521r1();
   48|      1|   }
   49|      3|#endif
   50|       |
   51|      3|#if defined(BOTAN_HAS_PCURVES_BRAINPOOL256R1)
   52|      3|   if(name == "brainpool256r1") {
  ------------------
  |  Branch (52:7): [True: 1, False: 2]
  ------------------
   53|      1|      return PCurveInstance::brainpool256r1();
   54|      1|   }
   55|      2|#endif
   56|       |
   57|      2|#if defined(BOTAN_HAS_PCURVES_BRAINPOOL384R1)
   58|      2|   if(name == "brainpool384r1") {
  ------------------
  |  Branch (58:7): [True: 1, False: 1]
  ------------------
   59|      1|      return PCurveInstance::brainpool384r1();
   60|      1|   }
   61|      1|#endif
   62|       |
   63|      1|#if defined(BOTAN_HAS_PCURVES_BRAINPOOL512R1)
   64|      1|   if(name == "brainpool512r1") {
  ------------------
  |  Branch (64:7): [True: 1, False: 0]
  ------------------
   65|      1|      return PCurveInstance::brainpool512r1();
   66|      1|   }
   67|      0|#endif
   68|       |
   69|      0|#if defined(BOTAN_HAS_PCURVES_FRP256V1)
   70|      0|   if(name == "frp256v1") {
  ------------------
  |  Branch (70:7): [True: 0, False: 0]
  ------------------
   71|      0|      return PCurveInstance::frp256v1();
   72|      0|   }
   73|      0|#endif
   74|       |
   75|      0|#if defined(BOTAN_HAS_PCURVES_SECP192R1)
   76|      0|   if(name == "secp192r1") {
  ------------------
  |  Branch (76:7): [True: 0, False: 0]
  ------------------
   77|      0|      return PCurveInstance::secp192r1();
   78|      0|   }
   79|      0|#endif
   80|       |
   81|      0|#if defined(BOTAN_HAS_PCURVES_SECP224R1)
   82|      0|   if(name == "secp224r1") {
  ------------------
  |  Branch (82:7): [True: 0, False: 0]
  ------------------
   83|      0|      return PCurveInstance::secp224r1();
   84|      0|   }
   85|      0|#endif
   86|       |
   87|      0|#if defined(BOTAN_HAS_PCURVES_SECP256K1)
   88|      0|   if(name == "secp256k1") {
  ------------------
  |  Branch (88:7): [True: 0, False: 0]
  ------------------
   89|      0|      return PCurveInstance::secp256k1();
   90|      0|   }
   91|      0|#endif
   92|       |
   93|      0|#if defined(BOTAN_HAS_PCURVES_SM2P256V1)
   94|      0|   if(name == "sm2p256v1") {
  ------------------
  |  Branch (94:7): [True: 0, False: 0]
  ------------------
   95|      0|      return PCurveInstance::sm2p256v1();
   96|      0|   }
   97|      0|#endif
   98|       |
   99|      0|#if defined(BOTAN_HAS_PCURVES_NUMSP512D1)
  100|      0|   if(name == "numsp512d1") {
  ------------------
  |  Branch (100:7): [True: 0, False: 0]
  ------------------
  101|      0|      return PCurveInstance::numsp512d1();
  102|      0|   }
  103|      0|#endif
  104|       |
  105|      0|   BOTAN_UNUSED(name);
  ------------------
  |  |  151|      0|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  106|      0|   return {};
  107|      0|}

_ZN5Botan6PCurve14PCurveInstance14brainpool256r1Ev:
   37|      1|std::shared_ptr<const PrimeOrderCurve> PCurveInstance::brainpool256r1() {
   38|      1|   return PrimeOrderCurveImpl<brainpool256r1::Curve>::instance();
   39|      1|}

_ZN5Botan6PCurve14PCurveInstance14brainpool384r1Ev:
   37|      1|std::shared_ptr<const PrimeOrderCurve> PCurveInstance::brainpool384r1() {
   38|      1|   return PrimeOrderCurveImpl<brainpool384r1::Curve>::instance();
   39|      1|}

_ZN5Botan6PCurve14PCurveInstance14brainpool512r1Ev:
   37|      1|std::shared_ptr<const PrimeOrderCurve> PCurveInstance::brainpool512r1() {
   38|      1|   return PrimeOrderCurveImpl<brainpool512r1::Curve>::instance();
   39|      1|}

_ZN5Botan6PCurve14PCurveInstance9secp256r1Ev:
  268|      1|std::shared_ptr<const PrimeOrderCurve> PCurveInstance::secp256r1() {
  269|      1|   return PrimeOrderCurveImpl<secp256r1::Curve>::instance();
  270|      1|}
pcurves_secp256r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS1_9secp256r16ParamsES2_E11FieldParamsEE3oneEv:
   77|  43.7k|      constexpr static std::array<W, N> one() { return std::array<W, N>{1}; }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS1_9secp256r16ParamsES2_E11FieldParamsEE4redcERKNSt3__15arrayImLm8EEE:
   27|  1.70M|      constexpr static std::array<W, N> redc(const std::array<W, 2 * N>& z) {
   28|  1.70M|         const int64_t X00 = get_uint32(z.data(), 0);
   29|  1.70M|         const int64_t X01 = get_uint32(z.data(), 1);
   30|  1.70M|         const int64_t X02 = get_uint32(z.data(), 2);
   31|  1.70M|         const int64_t X03 = get_uint32(z.data(), 3);
   32|  1.70M|         const int64_t X04 = get_uint32(z.data(), 4);
   33|  1.70M|         const int64_t X05 = get_uint32(z.data(), 5);
   34|  1.70M|         const int64_t X06 = get_uint32(z.data(), 6);
   35|  1.70M|         const int64_t X07 = get_uint32(z.data(), 7);
   36|  1.70M|         const int64_t X08 = get_uint32(z.data(), 8);
   37|  1.70M|         const int64_t X09 = get_uint32(z.data(), 9);
   38|  1.70M|         const int64_t X10 = get_uint32(z.data(), 10);
   39|  1.70M|         const int64_t X11 = get_uint32(z.data(), 11);
   40|  1.70M|         const int64_t X12 = get_uint32(z.data(), 12);
   41|  1.70M|         const int64_t X13 = get_uint32(z.data(), 13);
   42|  1.70M|         const int64_t X14 = get_uint32(z.data(), 14);
   43|  1.70M|         const int64_t X15 = get_uint32(z.data(), 15);
   44|       |
   45|       |         // See SP 800-186 section G.1.2
   46|  1.70M|         const int64_t S0 = P256_4[0] + X00 + X08 + X09 - (X11 + X12 + X13 + X14);
   47|  1.70M|         const int64_t S1 = P256_4[1] + X01 + X09 + X10 - (X12 + X13 + X14 + X15);
   48|  1.70M|         const int64_t S2 = P256_4[2] + X02 + X10 + X11 - (X13 + X14 + X15);
   49|  1.70M|         const int64_t S3 = P256_4[3] + X03 + 2 * (X11 + X12) + X13 - (X15 + X08 + X09);
   50|  1.70M|         const int64_t S4 = P256_4[4] + X04 + 2 * (X12 + X13) + X14 - (X09 + X10);
   51|  1.70M|         const int64_t S5 = P256_4[5] + X05 + 2 * (X13 + X14) + X15 - (X10 + X11);
   52|  1.70M|         const int64_t S6 = P256_4[6] + X06 + X13 + X14 * 3 + X15 * 2 - (X08 + X09);
   53|  1.70M|         const int64_t S7 = P256_4[7] + X07 + X15 * 3 + X08 - (X10 + X11 + X12 + X13);
   54|  1.70M|         const int64_t S8 = P256_4[8];
   55|       |
   56|  1.70M|         std::array<W, N> r = {};
   57|       |
   58|  1.70M|         SolinasAccum sum(r);
   59|       |
   60|  1.70M|         sum.accum(S0);
   61|  1.70M|         sum.accum(S1);
   62|  1.70M|         sum.accum(S2);
   63|  1.70M|         sum.accum(S3);
   64|  1.70M|         sum.accum(S4);
   65|  1.70M|         sum.accum(S5);
   66|  1.70M|         sum.accum(S6);
   67|  1.70M|         sum.accum(S7);
   68|  1.70M|         const auto S = sum.final_carry(S8);
   69|       |
   70|  1.70M|         BOTAN_DEBUG_ASSERT(S <= 8);
  ------------------
  |  |  137|  1.70M|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  1.70M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 1.70M]
  |  |  ------------------
  ------------------
   71|       |
   72|  1.70M|         solinas_correct_redc<N>(r, P, p256_mul_mod_256(S));
   73|       |
   74|  1.70M|         return r;
   75|  1.70M|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS1_9secp256r16ParamsES2_E11FieldParamsEE16p256_mul_mod_256Em:
   89|  1.70M|      constexpr static std::array<W, N> p256_mul_mod_256(W i) {
   90|  1.70M|         static_assert(WordInfo<W>::bits == 32 || WordInfo<W>::bits == 64);
   91|       |
   92|       |         // For small i, multiples of P-256 have a simple structure so it's faster to
   93|       |         // compute the value directly vs a (constant time) table lookup
   94|       |
   95|  1.70M|         auto r = P;
   96|       |         if constexpr(WordInfo<W>::bits == 32) {
   97|       |            r[7] -= i;
   98|       |            r[6] += i;
   99|       |            r[3] += i;
  100|       |            r[0] -= i;
  101|  1.70M|         } else {
  102|  1.70M|            const uint64_t i32 = static_cast<uint64_t>(i) << 32;
  103|  1.70M|            r[3] -= i32;
  104|  1.70M|            r[3] += i;
  105|  1.70M|            r[1] += i32;
  106|  1.70M|            r[0] -= i;
  107|  1.70M|         }
  108|  1.70M|         return r;
  109|  1.70M|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp256r15Curve10fe_invert2ERKNS_6IntModINS1_12Secp256r1RepINS_13EllipticCurveINS2_6ParamsES5_E11FieldParamsEEEEE:
  131|  1.09k|      static constexpr FieldElement fe_invert2(const FieldElement& x) {
  132|       |         // Generated using https://github.com/mmcloughlin/addchain
  133|       |
  134|  1.09k|         auto z = x.square();
  135|  1.09k|         z *= x;
  136|  1.09k|         z = z.square();
  137|  1.09k|         z *= x;
  138|  1.09k|         auto t0 = z;
  139|  1.09k|         t0.square_n(3);
  140|  1.09k|         t0 *= z;
  141|  1.09k|         auto t1 = t0;
  142|  1.09k|         t1.square_n(6);
  143|  1.09k|         t0 *= t1;
  144|  1.09k|         t0.square_n(3);
  145|  1.09k|         z *= t0;
  146|  1.09k|         t0 = z.square();
  147|  1.09k|         t0 *= x;
  148|  1.09k|         t1 = t0;
  149|  1.09k|         t1.square_n(16);
  150|  1.09k|         t0 *= t1;
  151|  1.09k|         t0.square_n(15);
  152|  1.09k|         z *= t0;
  153|  1.09k|         t0.square_n(17);
  154|  1.09k|         t0 *= x;
  155|  1.09k|         t0.square_n(143);
  156|  1.09k|         t0 *= z;
  157|  1.09k|         t0.square_n(47);
  158|  1.09k|         z *= t0;
  159|  1.09k|         z.square_n(2);
  160|       |
  161|  1.09k|         return z;
  162|  1.09k|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS1_9secp256r16ParamsES2_E11FieldParamsEE8from_repERKNSt3__15arrayImLm4EEE:
   83|  17.0k|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) { return z; }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS1_9secp256r16ParamsES2_E11FieldParamsEE6to_repERKNSt3__15arrayImLm4EEE:
   79|  17.0k|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) { return x; }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp256r15Curve7fe_sqrtERKNS_6IntModINS1_12Secp256r1RepINS_13EllipticCurveINS2_6ParamsES5_E11FieldParamsEEEEE:
  165|    319|      static constexpr FieldElement fe_sqrt(const FieldElement& x) {
  166|       |         // Generated using addchain
  167|    319|         auto z = x.square();
  168|    319|         z *= x;
  169|    319|         auto t0 = z;
  170|    319|         t0.square_n(2);
  171|    319|         z *= t0;
  172|    319|         t0 = z;
  173|    319|         t0.square_n(4);
  174|    319|         z *= t0;
  175|    319|         t0 = z;
  176|    319|         t0.square_n(8);
  177|    319|         z *= t0;
  178|    319|         t0 = z;
  179|    319|         t0.square_n(16);
  180|    319|         z *= t0;
  181|    319|         z.square_n(32);
  182|    319|         z *= x;
  183|    319|         z.square_n(96);
  184|    319|         z *= x;
  185|    319|         z.square_n(94);
  186|    319|         return z;
  187|    319|      }

_ZN5Botan6PCurve14PCurveInstance9secp384r1Ev:
  343|      1|std::shared_ptr<const PrimeOrderCurve> PCurveInstance::secp384r1() {
  344|      1|   return PrimeOrderCurveImpl<secp384r1::Curve>::instance();
  345|      1|}
pcurves_secp384r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS1_9secp384r16ParamsES2_E11FieldParamsEE3oneEv:
   88|  39.7k|      constexpr static std::array<W, N> one() { return std::array<W, N>{1}; }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS1_9secp384r16ParamsES2_E11FieldParamsEE4redcERKNSt3__15arrayImLm12EEE:
   23|  1.55M|      constexpr static std::array<W, N> redc(const std::array<W, 2 * N>& z) {
   24|  1.55M|         const int64_t X00 = get_uint32(z.data(), 0);
   25|  1.55M|         const int64_t X01 = get_uint32(z.data(), 1);
   26|  1.55M|         const int64_t X02 = get_uint32(z.data(), 2);
   27|  1.55M|         const int64_t X03 = get_uint32(z.data(), 3);
   28|  1.55M|         const int64_t X04 = get_uint32(z.data(), 4);
   29|  1.55M|         const int64_t X05 = get_uint32(z.data(), 5);
   30|  1.55M|         const int64_t X06 = get_uint32(z.data(), 6);
   31|  1.55M|         const int64_t X07 = get_uint32(z.data(), 7);
   32|  1.55M|         const int64_t X08 = get_uint32(z.data(), 8);
   33|  1.55M|         const int64_t X09 = get_uint32(z.data(), 9);
   34|  1.55M|         const int64_t X10 = get_uint32(z.data(), 10);
   35|  1.55M|         const int64_t X11 = get_uint32(z.data(), 11);
   36|  1.55M|         const int64_t X12 = get_uint32(z.data(), 12);
   37|  1.55M|         const int64_t X13 = get_uint32(z.data(), 13);
   38|  1.55M|         const int64_t X14 = get_uint32(z.data(), 14);
   39|  1.55M|         const int64_t X15 = get_uint32(z.data(), 15);
   40|  1.55M|         const int64_t X16 = get_uint32(z.data(), 16);
   41|  1.55M|         const int64_t X17 = get_uint32(z.data(), 17);
   42|  1.55M|         const int64_t X18 = get_uint32(z.data(), 18);
   43|  1.55M|         const int64_t X19 = get_uint32(z.data(), 19);
   44|  1.55M|         const int64_t X20 = get_uint32(z.data(), 20);
   45|  1.55M|         const int64_t X21 = get_uint32(z.data(), 21);
   46|  1.55M|         const int64_t X22 = get_uint32(z.data(), 22);
   47|  1.55M|         const int64_t X23 = get_uint32(z.data(), 23);
   48|       |
   49|       |         // One copy of P-384 is added to prevent underflow
   50|  1.55M|         const int64_t S0 = 0xFFFFFFFF + X00 + X12 + X20 + X21 - X23;
   51|  1.55M|         const int64_t S1 = 0x00000000 + X01 + X13 + X22 + X23 - X12 - X20;
   52|  1.55M|         const int64_t S2 = 0x00000000 + X02 + X14 + X23 - X13 - X21;
   53|  1.55M|         const int64_t S3 = 0xFFFFFFFF + X03 + X12 + X15 + X20 + X21 - X14 - X22 - X23;
   54|  1.55M|         const int64_t S4 = 0xFFFFFFFE + X04 + X12 + X13 + X16 + X20 + X21 * 2 + X22 - X15 - X23 * 2;
   55|  1.55M|         const int64_t S5 = 0xFFFFFFFF + X05 + X13 + X14 + X17 + X21 + X22 * 2 + X23 - X16;
   56|  1.55M|         const int64_t S6 = 0xFFFFFFFF + X06 + X14 + X15 + X18 + X22 + X23 * 2 - X17;
   57|  1.55M|         const int64_t S7 = 0xFFFFFFFF + X07 + X15 + X16 + X19 + X23 - X18;
   58|  1.55M|         const int64_t S8 = 0xFFFFFFFF + X08 + X16 + X17 + X20 - X19;
   59|  1.55M|         const int64_t S9 = 0xFFFFFFFF + X09 + X17 + X18 + X21 - X20;
   60|  1.55M|         const int64_t SA = 0xFFFFFFFF + X10 + X18 + X19 + X22 - X21;
   61|  1.55M|         const int64_t SB = 0xFFFFFFFF + X11 + X19 + X20 + X23 - X22;
   62|       |
   63|  1.55M|         std::array<W, N> r = {};
   64|       |
   65|  1.55M|         SolinasAccum sum(r);
   66|       |
   67|  1.55M|         sum.accum(S0);
   68|  1.55M|         sum.accum(S1);
   69|  1.55M|         sum.accum(S2);
   70|  1.55M|         sum.accum(S3);
   71|  1.55M|         sum.accum(S4);
   72|  1.55M|         sum.accum(S5);
   73|  1.55M|         sum.accum(S6);
   74|  1.55M|         sum.accum(S7);
   75|  1.55M|         sum.accum(S8);
   76|  1.55M|         sum.accum(S9);
   77|  1.55M|         sum.accum(SA);
   78|  1.55M|         sum.accum(SB);
   79|  1.55M|         const auto S = sum.final_carry(0);
   80|       |
   81|  1.55M|         BOTAN_DEBUG_ASSERT(S <= 4);
  ------------------
  |  |  137|  1.55M|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  1.55M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 1.55M]
  |  |  ------------------
  ------------------
   82|       |
   83|  1.55M|         solinas_correct_redc<N>(r, P, p384_mul_mod_384(S));
   84|       |
   85|  1.55M|         return r;
   86|  1.55M|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS1_9secp384r16ParamsES2_E11FieldParamsEE16p384_mul_mod_384Em:
  100|  1.55M|      constexpr static std::array<W, N> p384_mul_mod_384(W i) {
  101|  1.55M|         static_assert(WordInfo<W>::bits == 32 || WordInfo<W>::bits == 64);
  102|       |
  103|       |         // For small i, multiples of P-384 have a simple structure so it's faster to
  104|       |         // compute the value directly vs a (constant time) table lookup
  105|       |
  106|  1.55M|         auto r = P;
  107|       |         if constexpr(WordInfo<W>::bits == 32) {
  108|       |            r[4] -= i;
  109|       |            r[3] -= i;
  110|       |            r[1] += i;
  111|       |            r[0] -= i;
  112|  1.55M|         } else {
  113|  1.55M|            const uint64_t i32 = static_cast<uint64_t>(i) << 32;
  114|  1.55M|            r[2] -= i;
  115|  1.55M|            r[1] -= i32;
  116|  1.55M|            r[0] += i32;
  117|  1.55M|            r[0] -= i;
  118|  1.55M|         }
  119|  1.55M|         return r;
  120|  1.55M|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp384r15Curve10fe_invert2ERKNS_6IntModINS1_12Secp384r1RepINS_13EllipticCurveINS2_6ParamsES5_E11FieldParamsEEEEE:
  142|    679|      static constexpr FieldElement fe_invert2(const FieldElement& x) {
  143|       |         // From https://briansmith.org/ecc-inversion-addition-chains-01
  144|       |
  145|    679|         FieldElement r = x.square();
  146|    679|         r *= x;
  147|    679|         const auto x2 = r;
  148|    679|         r = r.square();
  149|    679|         r *= x;
  150|    679|         const auto x3 = r;
  151|    679|         r.square_n(3);
  152|    679|         r *= x3;
  153|    679|         auto rl = r;
  154|    679|         r.square_n(6);
  155|    679|         r *= rl;
  156|    679|         r.square_n(3);
  157|    679|         r *= x3;
  158|    679|         const auto x15 = r;
  159|    679|         r.square_n(15);
  160|    679|         r *= x15;
  161|    679|         const auto x30 = r;
  162|    679|         r.square_n(30);
  163|    679|         r *= x30;
  164|    679|         rl = r;
  165|    679|         r.square_n(60);
  166|    679|         r *= rl;
  167|    679|         rl = r;
  168|    679|         r.square_n(120);
  169|    679|         r *= rl;
  170|    679|         r.square_n(15);
  171|    679|         r *= x15;
  172|    679|         r.square_n(31);
  173|    679|         r *= x30;
  174|    679|         r.square_n(2);
  175|    679|         r *= x2;
  176|    679|         r.square_n(94);
  177|    679|         r *= x30;
  178|    679|         r.square_n(2);
  179|       |
  180|    679|         return r;
  181|    679|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS1_9secp384r16ParamsES2_E11FieldParamsEE8from_repERKNSt3__15arrayImLm6EEE:
   94|  2.53k|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) { return z; }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS1_9secp384r16ParamsES2_E11FieldParamsEE6to_repERKNSt3__15arrayImLm6EEE:
   90|  2.52k|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) { return x; }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp384r15Curve7fe_sqrtERKNS_6IntModINS1_12Secp384r1RepINS_13EllipticCurveINS2_6ParamsES5_E11FieldParamsEEEEE:
  183|    198|      static constexpr FieldElement fe_sqrt(const FieldElement& x) {
  184|       |         // Generated using https://github.com/mmcloughlin/addchain
  185|       |
  186|    198|         auto z = x.square();
  187|    198|         z *= x;
  188|    198|         z = z.square();
  189|    198|         auto t0 = x * z;
  190|    198|         z = t0;
  191|    198|         z.square_n(3);
  192|    198|         auto t1 = t0 * z;
  193|    198|         auto t2 = t1.square();
  194|    198|         z = t2 * x;
  195|    198|         t2.square_n(5);
  196|    198|         t1 *= t2;
  197|    198|         t2 = t1;
  198|    198|         t2.square_n(12);
  199|    198|         t1 *= t2;
  200|    198|         t1.square_n(7);
  201|    198|         t1 *= z;
  202|    198|         z = t1.square();
  203|    198|         z *= x;
  204|    198|         t2 = z;
  205|    198|         t2.square_n(31);
  206|    198|         t1 *= t2;
  207|    198|         t2 = t1;
  208|    198|         t2.square_n(63);
  209|    198|         t1 *= t2;
  210|    198|         t2 = t1;
  211|    198|         t2.square_n(126);
  212|    198|         t1 *= t2;
  213|    198|         t1.square_n(3);
  214|    198|         t0 *= t1;
  215|    198|         t0.square_n(33);
  216|    198|         z *= t0;
  217|    198|         z.square_n(64);
  218|    198|         z *= x;
  219|    198|         z.square_n(30);
  220|    198|         return z;
  221|    198|      }

_ZN5Botan6PCurve14PCurveInstance9secp521r1Ev:
  291|      1|std::shared_ptr<const PrimeOrderCurve> PCurveInstance::secp521r1() {
  292|      1|   return PrimeOrderCurveImpl<secp521r1::Curve>::instance();
  293|      1|}
pcurves_secp521r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS2_6ParamsES3_E11FieldParamsEE3oneEv:
   24|  83.7k|      constexpr static std::array<W, N> one() { return std::array<W, N>{1}; }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS2_6ParamsES3_E11FieldParamsEE4redcERKNSt3__15arrayImLm18EEE:
   26|  3.33M|      constexpr static std::array<W, N> redc(const std::array<W, 2 * N>& z) {
   27|       |         // Regardless of word size (32 or 64) the top word is 9 bits long
   28|  3.33M|         constexpr W TOP_BITS = static_cast<W>(0x1FF);
   29|       |         // The 23 or 55 bits that should be cleared in the top word
   30|  3.33M|         constexpr W CLEARED_TOP_BITS = WordInfo<W>::max ^ TOP_BITS;
   31|       |
   32|       |         /*
   33|       |         * Extract the high part of z (z >> 521)
   34|       |         */
   35|  3.33M|         std::array<W, N> t;  // NOLINT(*-member-init)
   36|       |
   37|  33.3M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (37:28): [True: 29.9M, False: 3.33M]
  ------------------
   38|  29.9M|            t[i] = z[(N - 1) + i] >> 9;
   39|  29.9M|         }
   40|       |
   41|  29.9M|         for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (41:28): [True: 26.6M, False: 3.33M]
  ------------------
   42|  26.6M|            t[i] |= z[(N - 1) + i + 1] << (WordInfo<W>::bits - 9);
   43|  26.6M|         }
   44|       |
   45|       |         // Now t += z & (2**521-1)
   46|  3.33M|         W carry = 0;
   47|  29.9M|         for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (47:28): [True: 26.6M, False: 3.33M]
  ------------------
   48|  26.6M|            t[i] = word_add(t[i], z[i], &carry);
   49|  26.6M|         }
   50|       |
   51|       |         // Now add the (partial) top words; this can't carry out
   52|       |         // since both inputs are at most 2**9-1
   53|  3.33M|         t[N - 1] += (z[N - 1] & TOP_BITS) + carry;
   54|       |
   55|       |         /*
   56|       |         Since the modulus P is exactly 2**521 - 1 the only way the computed
   57|       |         result can be larger than P is if the top word is larger than TOP_BITS
   58|       |
   59|       |         Since TOP_BITS has the low 9 bits set, we can check if t[N - 1] > TOP_BITS
   60|       |         by checking if t[N - 1] >> 9 has any bits set. Doing it this way is
   61|       |         faster than a standard comparison since CT::Mask::is_gt requires
   62|       |         several bit operations.
   63|       |         */
   64|       |
   65|  3.33M|         const W is_over_p521 = ~CT::Mask<W>::is_zero(t[N - 1] >> 9).value();
   66|       |
   67|       |         /*
   68|       |         * Also must detect/handle x == P
   69|       |         */
   70|  3.33M|         const W is_eq_p521 = [&]() {
   71|  3.33M|            W sum = WordInfo<W>::max;
   72|  3.33M|            for(size_t i = 0; i != N - 1; ++i) {
   73|  3.33M|               sum &= t[i];
   74|  3.33M|            }
   75|  3.33M|            sum &= (CLEARED_TOP_BITS | t[N - 1]);
   76|       |
   77|  3.33M|            return CT::Mask<W>::is_zero(sum ^ WordInfo<W>::max).value();
   78|  3.33M|         }();
   79|       |
   80|  3.33M|         const W need_sub = is_over_p521 | is_eq_p521;
   81|       |
   82|  3.33M|         W borrow = 0;
   83|  29.9M|         for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (83:28): [True: 26.6M, False: 3.33M]
  ------------------
   84|  26.6M|            t[i] = word_sub(t[i], need_sub & WordInfo<W>::max, &borrow);
   85|  26.6M|         }
   86|  3.33M|         t[N - 1] = word_sub(t[N - 1], need_sub & TOP_BITS, &borrow);
   87|       |
   88|  3.33M|         return t;
   89|  3.33M|      }
pcurves_secp521r1.cpp:_ZZN5Botan6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS2_6ParamsES3_E11FieldParamsEE4redcERKNSt3__15arrayImLm18EEEENKUlvE_clEv:
   70|  3.33M|         const W is_eq_p521 = [&]() {
   71|  3.33M|            W sum = WordInfo<W>::max;
   72|  29.9M|            for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (72:31): [True: 26.6M, False: 3.33M]
  ------------------
   73|  26.6M|               sum &= t[i];
   74|  26.6M|            }
   75|  3.33M|            sum &= (CLEARED_TOP_BITS | t[N - 1]);
   76|       |
   77|  3.33M|            return CT::Mask<W>::is_zero(sum ^ WordInfo<W>::max).value();
   78|  3.33M|         }();
pcurves_secp521r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp521r15Curve10fe_invert2ERKNS_6IntModINS2_7P521RepINS_13EllipticCurveINS2_6ParamsES5_E11FieldParamsEEEEE:
  115|  1.09k|      static constexpr FieldElement fe_invert2(const FieldElement& x) {
  116|       |         // Addition chain from https://eprint.iacr.org/2014/852.pdf page 6
  117|       |
  118|  1.09k|         FieldElement r = x.square();
  119|  1.09k|         r *= x;
  120|  1.09k|         r = r.square();
  121|  1.09k|         r *= x;
  122|  1.09k|         FieldElement rl = r;
  123|  1.09k|         r.square_n(3);
  124|  1.09k|         r *= rl;
  125|  1.09k|         r.square_n(1);
  126|  1.09k|         r *= x;
  127|  1.09k|         const auto a7 = r;
  128|  1.09k|         r.square_n(1);
  129|  1.09k|         r *= x;
  130|  1.09k|         rl = r;
  131|  1.09k|         r.square_n(8);
  132|  1.09k|         r *= rl;
  133|  1.09k|         rl = r;
  134|  1.09k|         r.square_n(16);
  135|  1.09k|         r *= rl;
  136|  1.09k|         rl = r;
  137|  1.09k|         r.square_n(32);
  138|  1.09k|         r *= rl;
  139|  1.09k|         rl = r;
  140|  1.09k|         r.square_n(64);
  141|  1.09k|         r *= rl;
  142|  1.09k|         rl = r;
  143|  1.09k|         r.square_n(128);
  144|  1.09k|         r *= rl;
  145|  1.09k|         rl = r;
  146|  1.09k|         r.square_n(256);
  147|  1.09k|         r *= rl;
  148|  1.09k|         r.square_n(7);
  149|  1.09k|         r *= a7;
  150|  1.09k|         r.square_n(2);
  151|       |
  152|  1.09k|         return r;
  153|  1.09k|      }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS2_6ParamsES3_E11FieldParamsEE8from_repERKNSt3__15arrayImLm9EEE:
   95|  4.14k|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) { return z; }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS2_6ParamsES3_E11FieldParamsEE6to_repERKNSt3__15arrayImLm9EEE:
   91|  4.15k|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) { return x; }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp521r15Curve7fe_sqrtERKNS_6IntModINS2_7P521RepINS_13EllipticCurveINS2_6ParamsES5_E11FieldParamsEEEEE:
  155|    335|      static constexpr FieldElement fe_sqrt(const FieldElement& x) {
  156|    335|         auto z = x;
  157|    335|         z.square_n(519);
  158|    335|         return z;
  159|    335|      }

_ZN5Botan9AEAD_Mode15create_or_throwENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS_10Cipher_DirES5_:
   55|    249|                                                      std::string_view provider) {
   56|    249|   if(auto aead = AEAD_Mode::create(algo, dir, provider)) {
  ------------------
  |  Branch (56:12): [True: 249, False: 0]
  ------------------
   57|    249|      return aead;
   58|    249|   }
   59|       |
   60|      0|   throw Lookup_Error("AEAD", algo, provider);
   61|    249|}
_ZN5Botan9AEAD_Mode6createENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS_10Cipher_DirES5_:
   63|    498|std::unique_ptr<AEAD_Mode> AEAD_Mode::create(std::string_view algo, Cipher_Dir dir, std::string_view provider) {
   64|    498|   BOTAN_UNUSED(provider);
  ------------------
  |  |  151|    498|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   65|    498|#if defined(BOTAN_HAS_AEAD_CHACHA20_POLY1305)
   66|    498|   if(algo == "ChaCha20Poly1305") {
  ------------------
  |  Branch (66:7): [True: 0, False: 498]
  ------------------
   67|      0|      if(dir == Cipher_Dir::Encryption) {
  ------------------
  |  Branch (67:10): [True: 0, False: 0]
  ------------------
   68|      0|         return std::make_unique<ChaCha20Poly1305_Encryption>();
   69|      0|      } else {
   70|      0|         return std::make_unique<ChaCha20Poly1305_Decryption>();
   71|      0|      }
   72|      0|   }
   73|    498|#endif
   74|       |
   75|    498|#if defined(BOTAN_HAS_ASCON_AEAD128)
   76|    498|   if(algo == "Ascon-AEAD128") {
  ------------------
  |  Branch (76:7): [True: 0, False: 498]
  ------------------
   77|      0|      if(dir == Cipher_Dir::Encryption) {
  ------------------
  |  Branch (77:10): [True: 0, False: 0]
  ------------------
   78|      0|         return std::make_unique<Ascon_AEAD128_Encryption>();
   79|      0|      } else {
   80|      0|         return std::make_unique<Ascon_AEAD128_Decryption>();
   81|      0|      }
   82|      0|   }
   83|    498|#endif
   84|       |
   85|    498|   if(algo.find('/') != std::string::npos) {
  ------------------
  |  Branch (85:7): [True: 249, False: 249]
  ------------------
   86|    249|      const std::vector<std::string> algo_parts = split_on(algo, '/');
   87|    249|      if(algo_parts.size() < 2) {
  ------------------
  |  Branch (87:10): [True: 0, False: 249]
  ------------------
   88|      0|         return std::unique_ptr<AEAD_Mode>();
   89|      0|      }
   90|    249|      const std::string_view cipher_name = algo_parts[0];
   91|    249|      const std::vector<std::string> mode_info = parse_algorithm_name(algo_parts[1]);
   92|       |
   93|    249|      if(mode_info.empty()) {
  ------------------
  |  Branch (93:10): [True: 0, False: 249]
  ------------------
   94|      0|         return std::unique_ptr<AEAD_Mode>();
   95|      0|      }
   96|       |
   97|    249|      std::ostringstream mode_name;
   98|       |
   99|    249|      mode_name << mode_info[0] << '(' << cipher_name;
  100|    353|      for(size_t i = 1; i < mode_info.size(); ++i) {
  ------------------
  |  Branch (100:25): [True: 104, False: 249]
  ------------------
  101|    104|         mode_name << ',' << mode_info[i];
  102|    104|      }
  103|    249|      for(size_t i = 2; i < algo_parts.size(); ++i) {
  ------------------
  |  Branch (103:25): [True: 0, False: 249]
  ------------------
  104|      0|         mode_name << ',' << algo_parts[i];
  105|      0|      }
  106|    249|      mode_name << ')';
  107|       |
  108|    249|      return AEAD_Mode::create(mode_name.str(), dir);
  109|    249|   }
  110|       |
  111|    249|#if defined(BOTAN_HAS_BLOCK_CIPHER)
  112|       |
  113|    249|   const SCAN_Name req(algo);
  114|       |
  115|    249|   if(req.arg_count() == 0) {
  ------------------
  |  Branch (115:7): [True: 0, False: 249]
  ------------------
  116|      0|      return std::unique_ptr<AEAD_Mode>();
  117|      0|   }
  118|       |
  119|    249|   auto bc = BlockCipher::create(req.arg(0), provider);
  120|       |
  121|    249|   if(!bc) {
  ------------------
  |  Branch (121:7): [True: 0, False: 249]
  ------------------
  122|      0|      return std::unique_ptr<AEAD_Mode>();
  123|      0|   }
  124|       |
  125|    249|   #if defined(BOTAN_HAS_AEAD_CCM)
  126|    249|   if(req.algo_name() == "CCM") {
  ------------------
  |  Branch (126:7): [True: 46, False: 203]
  ------------------
  127|     46|      const size_t tag_len = req.arg_as_integer(1, 16);
  128|     46|      const size_t L_len = req.arg_as_integer(2, 3);
  129|     46|      if(dir == Cipher_Dir::Encryption) {
  ------------------
  |  Branch (129:10): [True: 3, False: 43]
  ------------------
  130|      3|         return std::make_unique<CCM_Encryption>(std::move(bc), tag_len, L_len);
  131|     43|      } else {
  132|     43|         return std::make_unique<CCM_Decryption>(std::move(bc), tag_len, L_len);
  133|     43|      }
  134|     46|   }
  135|    203|   #endif
  136|       |
  137|    203|   #if defined(BOTAN_HAS_AEAD_GCM)
  138|    203|   if(req.algo_name() == "GCM") {
  ------------------
  |  Branch (138:7): [True: 134, False: 69]
  ------------------
  139|    134|      const size_t tag_len = req.arg_as_integer(1, 16);
  140|    134|      if(dir == Cipher_Dir::Encryption) {
  ------------------
  |  Branch (140:10): [True: 17, False: 117]
  ------------------
  141|     17|         return std::make_unique<GCM_Encryption>(std::move(bc), tag_len);
  142|    117|      } else {
  143|    117|         return std::make_unique<GCM_Decryption>(std::move(bc), tag_len);
  144|    117|      }
  145|    134|   }
  146|     69|   #endif
  147|       |
  148|     69|   #if defined(BOTAN_HAS_AEAD_GCM_SIV)
  149|     69|   if(req.algo_name() == "GCM-SIV") {
  ------------------
  |  Branch (149:7): [True: 0, False: 69]
  ------------------
  150|       |      // Unlike GCM the tag length is fixed, so reject eg "AES-128/GCM-SIV(12)"
  151|      0|      if(req.arg_count() != 1) {
  ------------------
  |  Branch (151:10): [True: 0, False: 0]
  ------------------
  152|      0|         return std::unique_ptr<AEAD_Mode>();
  153|      0|      }
  154|      0|      if(dir == Cipher_Dir::Encryption) {
  ------------------
  |  Branch (154:10): [True: 0, False: 0]
  ------------------
  155|      0|         return std::make_unique<GCM_SIV_Encryption>(std::move(bc));
  156|      0|      } else {
  157|      0|         return std::make_unique<GCM_SIV_Decryption>(std::move(bc));
  158|      0|      }
  159|      0|   }
  160|     69|   #endif
  161|       |
  162|     69|   #if defined(BOTAN_HAS_AEAD_OCB)
  163|     69|   if(req.algo_name() == "OCB") {
  ------------------
  |  Branch (163:7): [True: 69, False: 0]
  ------------------
  164|     69|      const size_t tag_len = req.arg_as_integer(1, 16);
  165|     69|      if(dir == Cipher_Dir::Encryption) {
  ------------------
  |  Branch (165:10): [True: 9, False: 60]
  ------------------
  166|      9|         return std::make_unique<OCB_Encryption>(std::move(bc), tag_len);
  167|     60|      } else {
  168|     60|         return std::make_unique<OCB_Decryption>(std::move(bc), tag_len);
  169|     60|      }
  170|     69|   }
  171|      0|   #endif
  172|       |
  173|      0|   #if defined(BOTAN_HAS_AEAD_EAX)
  174|      0|   if(req.algo_name() == "EAX") {
  ------------------
  |  Branch (174:7): [True: 0, False: 0]
  ------------------
  175|      0|      const size_t tag_len = req.arg_as_integer(1, bc->block_size());
  176|      0|      if(dir == Cipher_Dir::Encryption) {
  ------------------
  |  Branch (176:10): [True: 0, False: 0]
  ------------------
  177|      0|         return std::make_unique<EAX_Encryption>(std::move(bc), tag_len);
  178|      0|      } else {
  179|      0|         return std::make_unique<EAX_Decryption>(std::move(bc), tag_len);
  180|      0|      }
  181|      0|   }
  182|      0|   #endif
  183|       |
  184|      0|   #if defined(BOTAN_HAS_AEAD_SIV)
  185|      0|   if(req.algo_name() == "SIV") {
  ------------------
  |  Branch (185:7): [True: 0, False: 0]
  ------------------
  186|      0|      if(dir == Cipher_Dir::Encryption) {
  ------------------
  |  Branch (186:10): [True: 0, False: 0]
  ------------------
  187|      0|         return std::make_unique<SIV_Encryption>(std::move(bc));
  188|      0|      } else {
  189|      0|         return std::make_unique<SIV_Decryption>(std::move(bc));
  190|      0|      }
  191|      0|   }
  192|      0|   #endif
  193|       |
  194|      0|#endif
  195|       |
  196|      0|   return std::unique_ptr<AEAD_Mode>();
  197|      0|}

_ZN5Botan8CCM_ModeC2ENSt3__110unique_ptrINS_11BlockCipherENS1_14default_deleteIS3_EEEEmm:
   27|     46|      m_tag_size(tag_size), m_L(L), m_cipher(std::move(cipher)) {
   28|     46|   if(m_cipher->block_size() != CCM_BS) {
  ------------------
  |  Branch (28:7): [True: 0, False: 46]
  ------------------
   29|      0|      throw Invalid_Argument(m_cipher->name() + " cannot be used with CCM mode");
   30|      0|   }
   31|       |
   32|     46|   if(L < 2 || L > 8) {
  ------------------
  |  Branch (32:7): [True: 0, False: 46]
  |  Branch (32:16): [True: 0, False: 46]
  ------------------
   33|      0|      throw Invalid_Argument(fmt("Invalid CCM L value {}", L));
   34|      0|   }
   35|       |
   36|     46|   if(tag_size < 4 || tag_size > 16 || tag_size % 2 != 0) {
  ------------------
  |  Branch (36:7): [True: 0, False: 46]
  |  Branch (36:23): [True: 0, False: 46]
  |  Branch (36:40): [True: 0, False: 46]
  ------------------
   37|      0|      throw Invalid_Argument(fmt("Invalid CCM tag length {}", tag_size));
   38|      0|   }
   39|     46|}
_ZN5Botan8CCM_Mode5resetEv:
   47|     87|void CCM_Mode::reset() {
   48|     87|   m_nonce.clear();
   49|     87|   m_msg_buf.clear();
   50|     87|}
_ZNK5Botan8CCM_Mode18valid_nonce_lengthEm:
   56|     41|bool CCM_Mode::valid_nonce_length(size_t length) const {
   57|     41|   return (length == (15 - L()));
   58|     41|}
_ZNK5Botan8CCM_Mode8key_specEv:
   77|     46|Key_Length_Specification CCM_Mode::key_spec() const {
   78|     46|   return m_cipher->key_spec();
   79|     46|}
_ZN5Botan8CCM_Mode12key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
   85|     46|void CCM_Mode::key_schedule(std::span<const uint8_t> key) {
   86|     46|   m_cipher->set_key(key);
   87|       |   // Clear any per-message state; AD is preserved per AEAD contract
   88|       |   // (CCM advertises associated_data_requires_key() == false).
   89|     46|   reset();
   90|     46|}
_ZN5Botan8CCM_Mode21set_associated_data_nEmNSt3__14spanIKhLm18446744073709551615EEE:
   92|     41|void CCM_Mode::set_associated_data_n(size_t idx, std::span<const uint8_t> ad) {
   93|     41|   BOTAN_ARG_CHECK(idx == 0, "CCM: cannot handle non-zero index in set_associated_data_n");
  ------------------
  |  |   35|     41|   do {                                                          \
  |  |   36|     41|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     41|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 41]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     41|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 41]
  |  |  ------------------
  ------------------
   94|     41|   BOTAN_STATE_CHECK(m_nonce.empty());
  ------------------
  |  |   51|     41|   do {                                                         \
  |  |   52|     41|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|     41|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 41]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|     41|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 41]
  |  |  ------------------
  ------------------
   95|       |
   96|     41|   m_ad_buf.clear();
   97|       |
   98|     41|   if(!ad.empty()) {
  ------------------
  |  Branch (98:7): [True: 41, False: 0]
  ------------------
   99|       |      // FIXME: support larger AD using length encoding rules
  100|     41|      BOTAN_ARG_CHECK(ad.size() < (0xFFFF - 0xFF), "Supported CCM AD length");
  ------------------
  |  |   35|     41|   do {                                                          \
  |  |   36|     41|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     41|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 41]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     41|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 41]
  |  |  ------------------
  ------------------
  101|       |
  102|     41|      m_ad_buf.push_back(get_byte<0>(static_cast<uint16_t>(ad.size())));
  103|     41|      m_ad_buf.push_back(get_byte<1>(static_cast<uint16_t>(ad.size())));
  104|     41|      m_ad_buf.insert(m_ad_buf.end(), ad.begin(), ad.end());
  105|     82|      while(m_ad_buf.size() % CCM_BS != 0) {
  ------------------
  |  Branch (105:13): [True: 41, False: 41]
  ------------------
  106|     41|         m_ad_buf.push_back(0);  // pad with zeros to full block size
  107|     41|      }
  108|     41|   }
  109|     41|}
_ZN5Botan8CCM_Mode9start_msgEPKhm:
  111|     41|void CCM_Mode::start_msg(const uint8_t nonce[], size_t nonce_len) {
  112|     41|   BOTAN_STATE_CHECK(m_nonce.empty());
  ------------------
  |  |   51|     41|   do {                                                         \
  |  |   52|     41|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|     41|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 41]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|     41|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 41]
  |  |  ------------------
  ------------------
  113|       |
  114|     41|   if(!valid_nonce_length(nonce_len)) {
  ------------------
  |  Branch (114:7): [True: 0, False: 41]
  ------------------
  115|      0|      throw Invalid_IV_Length(name(), nonce_len);
  116|      0|   }
  117|       |
  118|     41|   m_nonce.assign(nonce, nonce + nonce_len);
  119|     41|   m_msg_buf.clear();
  120|     41|}
_ZN5Botan8CCM_Mode13encode_lengthEmPh:
  137|     41|void CCM_Mode::encode_length(uint64_t len, uint8_t out[]) {
  138|     41|   const size_t len_bytes = L();
  139|       |
  140|     41|   BOTAN_ASSERT_NOMSG(len_bytes >= 2 && len_bytes <= 8);
  ------------------
  |  |   84|     41|   do {                                                                     \
  |  |   85|     41|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     82|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:12): [True: 41, False: 0]
  |  |  |  Branch (86:12): [True: 41, False: 0]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     41|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 41]
  |  |  ------------------
  ------------------
  141|       |
  142|    164|   for(size_t i = 0; i != len_bytes; ++i) {
  ------------------
  |  Branch (142:22): [True: 123, False: 41]
  ------------------
  143|    123|      out[len_bytes - 1 - i] = get_byte_var(sizeof(uint64_t) - 1 - i, len);
  144|    123|   }
  145|       |
  146|     41|   if(len_bytes < 8 && (len >> (len_bytes * 8)) > 0) {
  ------------------
  |  Branch (146:7): [True: 41, False: 0]
  |  Branch (146:24): [True: 0, False: 41]
  ------------------
  147|      0|      throw Encoding_Error("CCM message length too long to encode in L field");
  148|      0|   }
  149|     41|}
_ZN5Botan8CCM_Mode3incERNSt3__16vectorIhNS_16secure_allocatorIhEEEE:
  151|  1.64k|void CCM_Mode::inc(secure_vector<uint8_t>& C) {
  152|  1.64k|   for(size_t i = 0; i != C.size(); ++i) {
  ------------------
  |  Branch (152:22): [True: 1.64k, False: 0]
  ------------------
  153|  1.64k|      uint8_t& b = C[C.size() - i - 1];
  154|  1.64k|      b += 1;
  155|  1.64k|      if(b > 0) {
  ------------------
  |  Branch (155:10): [True: 1.64k, False: 2]
  ------------------
  156|  1.64k|         break;
  157|  1.64k|      }
  158|  1.64k|   }
  159|  1.64k|}
_ZN5Botan8CCM_Mode9format_b0Em:
  161|     41|secure_vector<uint8_t> CCM_Mode::format_b0(size_t sz) {
  162|     41|   if(m_nonce.size() != 15 - L()) {
  ------------------
  |  Branch (162:7): [True: 0, False: 41]
  ------------------
  163|      0|      throw Invalid_State("CCM mode must set nonce");
  164|      0|   }
  165|     41|   secure_vector<uint8_t> B0(CCM_BS);
  166|       |
  167|     41|   const uint8_t b_flags =
  168|     41|      static_cast<uint8_t>((!m_ad_buf.empty() ? 64 : 0) + (((tag_size() / 2) - 1) << 3) + (L() - 1));
  ------------------
  |  Branch (168:29): [True: 41, False: 0]
  ------------------
  169|       |
  170|     41|   B0[0] = b_flags;
  171|     41|   copy_mem(&B0[1], m_nonce.data(), m_nonce.size());
  172|     41|   encode_length(sz, &B0[m_nonce.size() + 1]);
  173|       |
  174|     41|   return B0;
  175|     41|}
_ZN5Botan8CCM_Mode9format_c0Ev:
  177|     41|secure_vector<uint8_t> CCM_Mode::format_c0() {
  178|     41|   if(m_nonce.size() != 15 - L()) {
  ------------------
  |  Branch (178:7): [True: 0, False: 41]
  ------------------
  179|      0|      throw Invalid_State("CCM mode must set nonce");
  180|      0|   }
  181|     41|   secure_vector<uint8_t> C(CCM_BS);
  182|       |
  183|     41|   const uint8_t a_flags = static_cast<uint8_t>(L() - 1);
  184|       |
  185|     41|   C[0] = a_flags;
  186|     41|   copy_mem(&C[1], m_nonce.data(), m_nonce.size());
  187|       |
  188|     41|   return C;
  189|     41|}
_ZNK5Botan14CCM_Encryption13output_lengthEm:
  191|      5|size_t CCM_Encryption::output_length(size_t input_length) const {
  192|      5|   return add_or_throw(input_length, tag_size(), "CCM input too large");
  193|      5|}
_ZN5Botan14CCM_Encryption10finish_msgERNSt3__16vectorIhNS_16secure_allocatorIhEEEEm:
  195|      5|void CCM_Encryption::finish_msg(secure_vector<uint8_t>& buffer, size_t offset) {
  196|      5|   BOTAN_ARG_CHECK(buffer.size() >= offset, "Offset is out of range");
  ------------------
  |  |   35|      5|   do {                                                          \
  |  |   36|      5|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|      5|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 5]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|      5|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 5]
  |  |  ------------------
  ------------------
  197|       |
  198|      5|   buffer.insert(buffer.begin() + offset, msg_buf().begin(), msg_buf().end());
  199|       |
  200|      5|   const size_t sz = buffer.size() - offset;
  201|      5|   uint8_t* buf = buffer.data() + offset;
  202|       |
  203|      5|   const secure_vector<uint8_t>& ad = ad_buf();
  204|      5|   BOTAN_ARG_CHECK(ad.size() % CCM_BS == 0, "AD is block size multiple");
  ------------------
  |  |   35|      5|   do {                                                          \
  |  |   36|      5|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|      5|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 5]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|      5|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 5]
  |  |  ------------------
  ------------------
  205|       |
  206|      5|   const BlockCipher& E = cipher();
  207|       |
  208|      5|   secure_vector<uint8_t> T(CCM_BS);
  209|      5|   E.encrypt(format_b0(sz), T);
  210|       |
  211|     10|   for(size_t i = 0; i != ad.size(); i += CCM_BS) {
  ------------------
  |  Branch (211:22): [True: 5, False: 5]
  ------------------
  212|      5|      xor_buf(T.data(), &ad[i], CCM_BS);
  213|      5|      E.encrypt(T);
  214|      5|   }
  215|       |
  216|      5|   secure_vector<uint8_t> C = format_c0();
  217|      5|   secure_vector<uint8_t> S0(CCM_BS);
  218|      5|   E.encrypt(C, S0);
  219|      5|   inc(C);
  220|       |
  221|      5|   secure_vector<uint8_t> X(CCM_BS);
  222|       |
  223|      5|   const uint8_t* buf_end = &buf[sz];
  224|       |
  225|     10|   while(buf != buf_end) {
  ------------------
  |  Branch (225:10): [True: 5, False: 5]
  ------------------
  226|      5|      const size_t to_proc = std::min<size_t>(CCM_BS, buf_end - buf);
  227|       |
  228|      5|      xor_buf(T.data(), buf, to_proc);
  229|      5|      E.encrypt(T);
  230|       |
  231|      5|      E.encrypt(C, X);
  232|      5|      xor_buf(buf, X.data(), to_proc);
  233|      5|      inc(C);
  234|       |
  235|      5|      buf += to_proc;
  236|      5|   }
  237|       |
  238|      5|   T ^= S0;
  239|       |
  240|      5|   buffer += std::make_pair(T.data(), tag_size());
  241|       |
  242|      5|   reset();
  243|      5|}
_ZNK5Botan14CCM_Decryption13output_lengthEm:
  245|     36|size_t CCM_Decryption::output_length(size_t input_length) const {
  246|     36|   BOTAN_ARG_CHECK(input_length >= tag_size(), "Message too short to be valid");
  ------------------
  |  |   35|     36|   do {                                                          \
  |  |   36|     36|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     36|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 36]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     36|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 36]
  |  |  ------------------
  ------------------
  247|     36|   return input_length - tag_size();
  248|     36|}
_ZN5Botan14CCM_Decryption10finish_msgERNSt3__16vectorIhNS_16secure_allocatorIhEEEEm:
  250|     36|void CCM_Decryption::finish_msg(secure_vector<uint8_t>& buffer, size_t offset) {
  251|     36|   BOTAN_ARG_CHECK(buffer.size() >= offset, "Offset is out of range");
  ------------------
  |  |   35|     36|   do {                                                          \
  |  |   36|     36|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     36|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 36]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     36|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 36]
  |  |  ------------------
  ------------------
  252|       |
  253|     36|   buffer.insert(buffer.begin() + offset, msg_buf().begin(), msg_buf().end());
  254|       |
  255|     36|   const size_t sz = buffer.size() - offset;
  256|     36|   uint8_t* buf = buffer.data() + offset;
  257|       |
  258|     36|   BOTAN_ARG_CHECK(sz >= tag_size(), "input did not include the tag");
  ------------------
  |  |   35|     36|   do {                                                          \
  |  |   36|     36|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     36|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 36]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     36|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 36]
  |  |  ------------------
  ------------------
  259|       |
  260|     36|   const secure_vector<uint8_t>& ad = ad_buf();
  261|     36|   BOTAN_ARG_CHECK(ad.size() % CCM_BS == 0, "AD is block size multiple");
  ------------------
  |  |   35|     36|   do {                                                          \
  |  |   36|     36|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     36|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 36]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     36|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 36]
  |  |  ------------------
  ------------------
  262|       |
  263|     36|   const BlockCipher& E = cipher();
  264|       |
  265|     36|   secure_vector<uint8_t> T(CCM_BS);
  266|     36|   E.encrypt(format_b0(sz - tag_size()), T);
  267|       |
  268|     72|   for(size_t i = 0; i != ad.size(); i += CCM_BS) {
  ------------------
  |  Branch (268:22): [True: 36, False: 36]
  ------------------
  269|     36|      xor_buf(T.data(), &ad[i], CCM_BS);
  270|     36|      E.encrypt(T);
  271|     36|   }
  272|       |
  273|     36|   secure_vector<uint8_t> C = format_c0();
  274|       |
  275|     36|   secure_vector<uint8_t> S0(CCM_BS);
  276|     36|   E.encrypt(C, S0);
  277|     36|   inc(C);
  278|       |
  279|     36|   secure_vector<uint8_t> X(CCM_BS);
  280|       |
  281|     36|   const uint8_t* buf_end = &buf[sz - tag_size()];
  282|       |
  283|  1.63k|   while(buf != buf_end) {
  ------------------
  |  Branch (283:10): [True: 1.60k, False: 36]
  ------------------
  284|  1.60k|      const size_t to_proc = std::min<size_t>(CCM_BS, buf_end - buf);
  285|       |
  286|  1.60k|      E.encrypt(C, X);
  287|  1.60k|      xor_buf(buf, X.data(), to_proc);
  288|  1.60k|      inc(C);
  289|       |
  290|  1.60k|      xor_buf(T.data(), buf, to_proc);
  291|  1.60k|      E.encrypt(T);
  292|       |
  293|  1.60k|      buf += to_proc;
  294|  1.60k|   }
  295|       |
  296|     36|   T ^= S0;
  297|       |
  298|     36|   if(!CT::is_equal(T.data(), buf_end, tag_size()).as_bool()) {
  ------------------
  |  Branch (298:7): [True: 36, False: 0]
  ------------------
  299|     36|      clear_mem(std::span{buffer}.subspan(offset, sz - tag_size()));
  300|       |      // Reset on the failure path too, matching GCM/SIV/ChaCha20Poly1305, so a
  301|       |      // failed decryptor is reusable rather than stuck in a partial state.
  302|     36|      reset();
  303|     36|      throw Invalid_Authentication_Tag("CCM tag check failed");
  304|     36|   }
  305|       |
  306|      0|   buffer.resize(buffer.size() - tag_size());
  307|       |
  308|      0|   reset();
  309|      0|}

_ZN5Botan8GCM_ModeC2ENSt3__110unique_ptrINS_11BlockCipherENS1_14default_deleteIS3_EEEEm:
   27|    134|      m_tag_size(tag_size), m_cipher_name(cipher->name()) {
   28|    134|   if(cipher->block_size() != GCM_BS) {
  ------------------
  |  Branch (28:7): [True: 0, False: 134]
  ------------------
   29|      0|      throw Invalid_Argument("Invalid block cipher for GCM");
   30|      0|   }
   31|       |
   32|       |   /* We allow any of the values 128, 120, 112, 104, or 96 bits as a tag size */
   33|       |   /* 64 bit tag is still supported but deprecated and will be removed in the future */
   34|    134|   if(m_tag_size != 8 && (m_tag_size < 12 || m_tag_size > 16)) {
  ------------------
  |  Branch (34:7): [True: 134, False: 0]
  |  Branch (34:27): [True: 0, False: 134]
  |  Branch (34:46): [True: 0, False: 134]
  ------------------
   35|      0|      throw Invalid_Argument(fmt("{} cannot use a tag of {} bytes", name(), m_tag_size));
   36|      0|   }
   37|       |
   38|    134|   m_ctr = std::make_unique<CTR_BE>(std::move(cipher), 4);
   39|    134|   m_ghash = std::make_unique<GHASH>();
   40|    134|}
_ZN5Botan8GCM_ModeD2Ev:
   42|    134|GCM_Mode::~GCM_Mode() = default;
_ZN5Botan8GCM_Mode5resetEv:
   50|    134|void GCM_Mode::reset() {
   51|    134|   m_ghash->reset_state();
   52|    134|   m_in_msg = false;
   53|    134|}
_ZNK5Botan8GCM_Mode18valid_nonce_lengthEm:
   71|    114|bool GCM_Mode::valid_nonce_length(size_t len) const {
   72|       |   // GCM does not support empty nonces
   73|    114|   return (len > 0);
   74|    114|}
_ZNK5Botan8GCM_Mode8key_specEv:
   76|    134|Key_Length_Specification GCM_Mode::key_spec() const {
   77|    134|   return m_ctr->key_spec();
   78|    134|}
_ZN5Botan8GCM_Mode12key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
   84|    134|void GCM_Mode::key_schedule(std::span<const uint8_t> key) {
   85|    134|   reset();
   86|    134|   m_ctr->set_key(key);
   87|       |
   88|    134|   std::array<uint8_t, GCM_BS> zeros{};
   89|    134|   m_ctr->set_iv(zeros);
   90|       |
   91|    134|   uint8_t H[GCM_BS] = {0};
   92|    134|   m_ctr->encipher(H);
   93|    134|   m_ghash->set_key(H);
   94|    134|}
_ZN5Botan8GCM_Mode21set_associated_data_nEmNSt3__14spanIKhLm18446744073709551615EEE:
   96|    114|void GCM_Mode::set_associated_data_n(size_t idx, std::span<const uint8_t> ad) {
   97|    114|   BOTAN_ARG_CHECK(idx == 0, "GCM: cannot handle non-zero index in set_associated_data_n");
  ------------------
  |  |   35|    114|   do {                                                          \
  |  |   36|    114|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    114|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 114]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    114|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 114]
  |  |  ------------------
  ------------------
   98|    114|   m_ghash->set_associated_data(ad);
   99|    114|}
_ZN5Botan8GCM_Mode9start_msgEPKhm:
  101|    114|void GCM_Mode::start_msg(const uint8_t nonce[], size_t nonce_len) {
  102|    114|   BOTAN_STATE_CHECK(!m_in_msg);
  ------------------
  |  |   51|    114|   do {                                                         \
  |  |   52|    114|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    114|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 114]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    114|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 114]
  |  |  ------------------
  ------------------
  103|       |
  104|    114|   if(!valid_nonce_length(nonce_len)) {
  ------------------
  |  Branch (104:7): [True: 0, False: 114]
  ------------------
  105|      0|      throw Invalid_IV_Length(name(), nonce_len);
  106|      0|   }
  107|       |
  108|    114|   std::array<uint8_t, GCM_BS> y0 = {};
  109|       |
  110|    114|   if(nonce_len == 12) {
  ------------------
  |  Branch (110:7): [True: 114, False: 0]
  ------------------
  111|    114|      copy_mem(y0.data(), nonce, nonce_len);
  112|    114|      y0[15] = 1;
  113|    114|   } else {
  114|      0|      m_ghash->nonce_hash(std::span<uint8_t, GCM_BS>(y0), {nonce, nonce_len});
  115|      0|   }
  116|       |
  117|    114|   m_ctr->set_iv(y0.data(), y0.size());
  118|       |
  119|    114|   clear_mem(y0.data(), y0.size());
  120|    114|   m_ctr->encipher(y0);
  121|       |
  122|    114|   m_ghash->start(y0);
  123|    114|   secure_scrub_memory(y0);
  124|    114|   m_in_msg = true;
  125|    114|}
_ZNK5Botan14GCM_Encryption13output_lengthEm:
  127|     28|size_t GCM_Encryption::output_length(size_t input_length) const {
  128|     28|   return add_or_throw(input_length, tag_size(), "GCM input too large");
  129|     28|}
_ZN5Botan14GCM_Encryption10finish_msgERNSt3__16vectorIhNS_16secure_allocatorIhEEEEm:
  139|     28|void GCM_Encryption::finish_msg(secure_vector<uint8_t>& buffer, size_t offset) {
  140|     28|   BOTAN_STATE_CHECK(m_in_msg);
  ------------------
  |  |   51|     28|   do {                                                         \
  |  |   52|     28|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|     28|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 28]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|     28|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 28]
  |  |  ------------------
  ------------------
  141|     28|   BOTAN_ARG_CHECK(offset <= buffer.size(), "Invalid offset");
  ------------------
  |  |   35|     28|   do {                                                          \
  |  |   36|     28|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     28|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 28]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     28|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 28]
  |  |  ------------------
  ------------------
  142|     28|   const size_t sz = buffer.size() - offset;
  143|     28|   uint8_t* buf = buffer.data() + offset;
  144|       |
  145|     28|   m_ctr->cipher(buf, buf, sz);
  146|     28|   m_ghash->update({buf, sz});
  147|       |
  148|     28|   std::array<uint8_t, 16> mac = {0};
  149|     28|   m_ghash->final(std::span(mac).first(tag_size()));
  150|     28|   buffer += std::make_pair(mac.data(), tag_size());
  151|     28|   m_in_msg = false;
  152|     28|}
_ZNK5Botan14GCM_Decryption13output_lengthEm:
  154|     86|size_t GCM_Decryption::output_length(size_t input_length) const {
  155|     86|   BOTAN_ARG_CHECK(input_length >= tag_size(), "Message too short to be valid");
  ------------------
  |  |   35|     86|   do {                                                          \
  |  |   36|     86|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     86|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 86]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     86|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 86]
  |  |  ------------------
  ------------------
  156|     86|   return input_length - tag_size();
  157|     86|}
_ZN5Botan14GCM_Decryption10finish_msgERNSt3__16vectorIhNS_16secure_allocatorIhEEEEm:
  167|     86|void GCM_Decryption::finish_msg(secure_vector<uint8_t>& buffer, size_t offset) {
  168|     86|   BOTAN_STATE_CHECK(m_in_msg);
  ------------------
  |  |   51|     86|   do {                                                         \
  |  |   52|     86|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|     86|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 86]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|     86|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 86]
  |  |  ------------------
  ------------------
  169|     86|   BOTAN_ARG_CHECK(offset <= buffer.size(), "Invalid offset");
  ------------------
  |  |   35|     86|   do {                                                          \
  |  |   36|     86|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     86|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 86]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     86|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 86]
  |  |  ------------------
  ------------------
  170|     86|   const size_t sz = buffer.size() - offset;
  171|     86|   uint8_t* buf = buffer.data() + offset;
  172|       |
  173|     86|   BOTAN_ARG_CHECK(sz >= tag_size(), "input did not include the tag");
  ------------------
  |  |   35|     86|   do {                                                          \
  |  |   36|     86|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     86|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 86]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     86|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 86]
  |  |  ------------------
  ------------------
  174|       |
  175|     86|   const size_t remaining = sz - tag_size();
  176|       |
  177|       |   // handle any final input before the tag
  178|     86|   if(remaining > 0) {
  ------------------
  |  Branch (178:7): [True: 85, False: 1]
  ------------------
  179|     85|      m_ghash->update({buf, remaining});
  180|     85|      m_ctr->cipher(buf, buf, remaining);
  181|     85|   }
  182|       |
  183|     86|   std::array<uint8_t, 16> mac = {0};
  184|     86|   m_ghash->final(std::span(mac).first(tag_size()));
  185|       |
  186|     86|   const uint8_t* included_tag = &buffer[remaining + offset];
  187|       |
  188|     86|   m_in_msg = false;
  189|       |
  190|     86|   if(!CT::is_equal(mac.data(), included_tag, tag_size()).as_bool()) {
  ------------------
  |  Branch (190:7): [True: 86, False: 0]
  ------------------
  191|     86|      clear_mem(std::span{buffer}.subspan(offset, remaining));
  192|     86|      throw Invalid_Authentication_Tag("GCM tag check failed");
  193|     86|   }
  194|       |
  195|      0|   buffer.resize(offset + remaining);
  196|      0|}

_ZN5Botan8OCB_ModeC2ENSt3__110unique_ptrINS_11BlockCipherENS1_14default_deleteIS3_EEEEm:
  166|     69|      m_cipher(std::move(cipher)),
  167|     69|      m_checksum(m_cipher->parallel_bytes()),
  168|     69|      m_ad_hash(m_cipher->block_size()),
  169|     69|      m_tag_size(tag_size),
  170|     69|      m_block_size(m_cipher->block_size()),
  171|     69|      m_par_blocks(m_cipher->parallel_bytes() / m_block_size) {
  172|     69|   const size_t BS = block_size();
  173|       |
  174|       |   /*
  175|       |   * draft-krovetz-ocb-wide-d1 specifies OCB for several other block
  176|       |   * sizes but only 128, 192, 256 and 512 bit are currently supported
  177|       |   * by this implementation.
  178|       |   */
  179|     69|   BOTAN_ARG_CHECK(BS == 16 || BS == 24 || BS == 32 || BS == 64, "Invalid block size for OCB");
  ------------------
  |  |   35|     69|   do {                                                          \
  |  |   36|     69|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    207|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 69, False: 0]
  |  |  |  Branch (37:12): [True: 0, False: 0]
  |  |  |  Branch (37:12): [True: 0, False: 0]
  |  |  |  Branch (37:12): [True: 0, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     69|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 69]
  |  |  ------------------
  ------------------
  180|       |
  181|     69|   BOTAN_ARG_CHECK(m_tag_size % 4 == 0 && m_tag_size >= 8 && m_tag_size <= BS && m_tag_size <= 32,
  ------------------
  |  |   35|     69|   do {                                                          \
  |  |   36|     69|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    414|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 69, False: 0]
  |  |  |  Branch (37:12): [True: 69, False: 0]
  |  |  |  Branch (37:12): [True: 69, False: 0]
  |  |  |  Branch (37:12): [True: 69, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     69|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 69]
  |  |  ------------------
  ------------------
  182|     69|                   "Invalid OCB tag length");
  183|     69|}
_ZN5Botan8OCB_ModeD2Ev:
  185|     69|OCB_Mode::~OCB_Mode() = default;
_ZN5Botan8OCB_Mode5resetEv:
  194|    140|void OCB_Mode::reset() {
  195|    140|   m_block_index = 0;
  196|    140|   zeroise(m_checksum);
  197|    140|   m_last_nonce.clear();
  198|    140|   m_stretch.clear();
  199|    140|   zeroise(m_nonce_buf);
  200|    140|   zeroise(m_offset);
  201|    140|   if(m_L) {
  ------------------
  |  Branch (201:7): [True: 140, False: 0]
  ------------------
  202|    140|      m_L->reset();  // NOLINT(*-ambiguous-smartptr-reset-call)
  203|    140|   }
  204|    140|}
_ZNK5Botan8OCB_Mode18valid_nonce_lengthEm:
  206|     71|bool OCB_Mode::valid_nonce_length(size_t length) const {
  207|     71|   if(length == 0) {
  ------------------
  |  Branch (207:7): [True: 0, False: 71]
  ------------------
  208|      0|      return false;
  209|      0|   }
  210|     71|   if(block_size() == 16) {
  ------------------
  |  Branch (210:7): [True: 71, False: 0]
  ------------------
  211|     71|      return length < 16;
  212|     71|   } else {
  213|      0|      return length < (block_size() - 1);
  214|      0|   }
  215|     71|}
_ZNK5Botan8OCB_Mode8key_specEv:
  229|     69|Key_Length_Specification OCB_Mode::key_spec() const {
  230|     69|   return m_cipher->key_spec();
  231|     69|}
_ZNK5Botan8OCB_Mode19has_keying_materialEv:
  233|    282|bool OCB_Mode::has_keying_material() const {
  234|    282|   return m_cipher->has_keying_material();
  235|    282|}
_ZN5Botan8OCB_Mode12key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
  237|     69|void OCB_Mode::key_schedule(std::span<const uint8_t> key) {
  238|     69|   m_cipher->set_key(key);
  239|     69|   m_L = std::make_unique<L_computer>(*m_cipher);
  240|       |
  241|       |   // Drop all key-dependent per-message state: m_last_nonce/m_stretch are
  242|       |   // cached for the update_nonce() fast path and would otherwise allow a
  243|       |   // start_msg() with a same-valued nonce under the new key to silently
  244|       |   // reuse the stretch computed under the previous key.
  245|     69|   reset();
  246|       |
  247|       |   // m_ad_hash was precomputed against the previous L values and cipher
  248|       |   // key. Re-keying invalidates it; AD must be re-set after set_key.
  249|     69|   zeroise(m_ad_hash);
  250|     69|}
_ZN5Botan8OCB_Mode21set_associated_data_nEmNSt3__14spanIKhLm18446744073709551615EEE:
  252|     71|void OCB_Mode::set_associated_data_n(size_t idx, std::span<const uint8_t> ad) {
  253|     71|   BOTAN_ARG_CHECK(idx == 0, "OCB: cannot handle non-zero index in set_associated_data_n");
  ------------------
  |  |   35|     71|   do {                                                          \
  |  |   36|     71|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     71|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 71]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     71|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 71]
  |  |  ------------------
  ------------------
  254|     71|   assert_key_material_set();
  255|     71|   BOTAN_STATE_CHECK(!m_L->initialized());
  ------------------
  |  |   51|     71|   do {                                                         \
  |  |   52|     71|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|     71|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 71]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|     71|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 71]
  |  |  ------------------
  ------------------
  256|     71|   m_ad_hash = ocb_hash(*m_L, *m_cipher, ad.data(), ad.size());
  257|     71|}
_ZN5Botan8OCB_Mode12update_nonceEPKhm:
  259|     71|const secure_vector<uint8_t>& OCB_Mode::update_nonce(const uint8_t nonce[], size_t nonce_len) {
  260|     71|   const size_t BS = block_size();
  261|       |
  262|     71|   BOTAN_ASSERT(BS == 16 || BS == 24 || BS == 32 || BS == 64, "OCB block size is supported");
  ------------------
  |  |   71|     71|   do {                                                                                 \
  |  |   72|     71|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|    213|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:12): [True: 71, False: 0]
  |  |  |  Branch (73:12): [True: 0, False: 0]
  |  |  |  Branch (73:12): [True: 0, False: 0]
  |  |  |  Branch (73:12): [True: 0, False: 0]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|     71|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 71]
  |  |  ------------------
  ------------------
  263|       |
  264|       |   // NOLINTNEXTLINE(readability-avoid-nested-conditional-operator)
  265|     71|   const size_t MASKLEN = (BS == 16 ? 6 : ((BS == 24) ? 7 : 8));
  ------------------
  |  Branch (265:28): [True: 71, False: 0]
  |  Branch (265:44): [True: 0, False: 0]
  ------------------
  266|       |
  267|     71|   const uint8_t BOTTOM_MASK = static_cast<uint8_t>((static_cast<uint16_t>(1) << MASKLEN) - 1);
  268|       |
  269|     71|   m_nonce_buf.resize(BS);
  270|     71|   clear_mem(m_nonce_buf.data(), m_nonce_buf.size());
  271|       |
  272|     71|   copy_mem(&m_nonce_buf[BS - nonce_len], nonce, nonce_len);
  273|     71|   m_nonce_buf[0] = static_cast<uint8_t>(((tag_size() * 8) % (BS * 8)) << (BS <= 16 ? 1 : 0));
  ------------------
  |  Branch (273:76): [True: 71, False: 0]
  ------------------
  274|       |
  275|     71|   m_nonce_buf[BS - nonce_len - 1] ^= 1;
  276|       |
  277|     71|   const uint8_t bottom = m_nonce_buf[BS - 1] & BOTTOM_MASK;
  278|     71|   m_nonce_buf[BS - 1] &= ~BOTTOM_MASK;
  279|       |
  280|     71|   const bool need_new_stretch = (m_last_nonce != m_nonce_buf);
  281|       |
  282|     71|   if(need_new_stretch) {
  ------------------
  |  Branch (282:7): [True: 71, False: 0]
  ------------------
  283|     71|      m_last_nonce = m_nonce_buf;
  284|       |
  285|     71|      m_cipher->encrypt(m_nonce_buf);
  286|       |
  287|       |      /*
  288|       |      The loop bounds (BS vs BS/2) are derived from the relation
  289|       |      between the block size and the MASKLEN. Using the terminology
  290|       |      of draft-krovetz-ocb-wide, we have to derive enough bits in
  291|       |      ShiftedKtop to read up to BLOCKLEN+bottom bits from Stretch.
  292|       |
  293|       |                 +----------+---------+-------+---------+
  294|       |                 | BLOCKLEN | RESIDUE | SHIFT | MASKLEN |
  295|       |                 +----------+---------+-------+---------+
  296|       |                 |       32 |     141 |    17 |    4    |
  297|       |                 |       64 |      27 |    25 |    5    |
  298|       |                 |       96 |    1601 |    33 |    6    |
  299|       |                 |      128 |     135 |     8 |    6    |
  300|       |                 |      192 |     135 |    40 |    7    |
  301|       |                 |      256 |    1061 |     1 |    8    |
  302|       |                 |      384 |    4109 |    80 |    8    |
  303|       |                 |      512 |     293 |   176 |    8    |
  304|       |                 |     1024 |  524355 |   352 |    9    |
  305|       |                 +----------+---------+-------+---------+
  306|       |      */
  307|     71|      if(BS == 16) {
  ------------------
  |  Branch (307:10): [True: 71, False: 0]
  ------------------
  308|    639|         for(size_t i = 0; i != BS / 2; ++i) {
  ------------------
  |  Branch (308:28): [True: 568, False: 71]
  ------------------
  309|    568|            m_nonce_buf.push_back(m_nonce_buf[i] ^ m_nonce_buf[i + 1]);
  310|    568|         }
  311|     71|      } else if(BS == 24) {
  ------------------
  |  Branch (311:17): [True: 0, False: 0]
  ------------------
  312|      0|         for(size_t i = 0; i != 16; ++i) {
  ------------------
  |  Branch (312:28): [True: 0, False: 0]
  ------------------
  313|      0|            m_nonce_buf.push_back(m_nonce_buf[i] ^ m_nonce_buf[i + 5]);
  314|      0|         }
  315|      0|      } else if(BS == 32) {
  ------------------
  |  Branch (315:17): [True: 0, False: 0]
  ------------------
  316|      0|         for(size_t i = 0; i != BS; ++i) {
  ------------------
  |  Branch (316:28): [True: 0, False: 0]
  ------------------
  317|      0|            m_nonce_buf.push_back(m_nonce_buf[i] ^ (m_nonce_buf[i] << 1) ^ (m_nonce_buf[i + 1] >> 7));
  318|      0|         }
  319|      0|      } else if(BS == 64) {
  ------------------
  |  Branch (319:17): [True: 0, False: 0]
  ------------------
  320|      0|         for(size_t i = 0; i != BS / 2; ++i) {
  ------------------
  |  Branch (320:28): [True: 0, False: 0]
  ------------------
  321|      0|            m_nonce_buf.push_back(m_nonce_buf[i] ^ m_nonce_buf[i + 22]);
  322|      0|         }
  323|      0|      }
  324|       |
  325|     71|      m_stretch = m_nonce_buf;
  326|     71|   }
  327|       |
  328|       |   // now set the offset from stretch and bottom
  329|     71|   const size_t shift_bytes = bottom / 8;
  330|     71|   const size_t shift_bits = bottom % 8;
  331|       |
  332|     71|   BOTAN_ASSERT(m_stretch.size() >= BS + shift_bytes + 1, "Size ok");
  ------------------
  |  |   71|     71|   do {                                                                                 \
  |  |   72|     71|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|     71|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 71]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|     71|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 71]
  |  |  ------------------
  ------------------
  333|       |
  334|     71|   m_offset.resize(BS);
  335|  1.20k|   for(size_t i = 0; i != BS; ++i) {
  ------------------
  |  Branch (335:22): [True: 1.13k, False: 71]
  ------------------
  336|  1.13k|      m_offset[i] = (m_stretch[i + shift_bytes] << shift_bits);
  337|  1.13k|      m_offset[i] |= (m_stretch[i + shift_bytes + 1] >> (8 - shift_bits));
  338|  1.13k|   }
  339|       |
  340|     71|   return m_offset;
  341|     71|}
_ZN5Botan8OCB_Mode9start_msgEPKhm:
  343|     71|void OCB_Mode::start_msg(const uint8_t nonce[], size_t nonce_len) {
  344|     71|   if(!valid_nonce_length(nonce_len)) {
  ------------------
  |  Branch (344:7): [True: 0, False: 71]
  ------------------
  345|      0|      throw Invalid_IV_Length(name(), nonce_len);
  346|      0|   }
  347|       |
  348|     71|   assert_key_material_set();
  349|     71|   BOTAN_STATE_CHECK(!m_L->initialized());
  ------------------
  |  |   51|     71|   do {                                                         \
  |  |   52|     71|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|     71|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 71]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|     71|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 71]
  |  |  ------------------
  ------------------
  350|       |
  351|     71|   m_L->init(update_nonce(nonce, nonce_len));
  352|     71|   zeroise(m_checksum);
  353|     71|   m_block_index = 0;
  354|     71|}
_ZNK5Botan14OCB_Encryption13output_lengthEm:
  356|     17|size_t OCB_Encryption::output_length(size_t input_length) const {
  357|     17|   return add_or_throw(input_length, tag_size(), "OCB input too large");
  358|     17|}
_ZN5Botan14OCB_Encryption7encryptEPhm:
  360|     17|void OCB_Encryption::encrypt(uint8_t buffer[], size_t blocks) {
  361|     17|   assert_key_material_set();
  362|     17|   BOTAN_STATE_CHECK(m_L->initialized());
  ------------------
  |  |   51|     17|   do {                                                         \
  |  |   52|     17|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|     17|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 17]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|     17|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 17]
  |  |  ------------------
  ------------------
  363|       |
  364|     17|   const size_t BS = block_size();
  365|       |
  366|     26|   while(blocks > 0) {
  ------------------
  |  Branch (366:10): [True: 9, False: 17]
  ------------------
  367|      9|      const size_t proc_blocks = std::min(blocks, par_blocks());
  368|      9|      const size_t proc_bytes = proc_blocks * BS;
  369|       |
  370|      9|      const uint8_t* offsets = m_L->compute_offsets(m_block_index, proc_blocks);
  371|       |
  372|      9|      xor_buf(m_checksum.data(), buffer, proc_bytes);
  373|       |
  374|      9|      xor_buf(buffer, offsets, proc_bytes);
  375|      9|      m_cipher->encrypt_n(buffer, buffer, proc_blocks);
  376|      9|      xor_buf(buffer, offsets, proc_bytes);
  377|       |
  378|      9|      buffer += proc_bytes;
  379|      9|      blocks -= proc_blocks;
  380|      9|      m_block_index += proc_blocks;
  381|      9|   }
  382|     17|}
_ZN5Botan14OCB_Encryption10finish_msgERNSt3__16vectorIhNS_16secure_allocatorIhEEEEm:
  390|     17|void OCB_Encryption::finish_msg(secure_vector<uint8_t>& buffer, size_t offset) {
  391|     17|   assert_key_material_set();
  392|     17|   BOTAN_STATE_CHECK(m_L->initialized());
  ------------------
  |  |   51|     17|   do {                                                         \
  |  |   52|     17|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|     17|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 17]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|     17|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 17]
  |  |  ------------------
  ------------------
  393|       |
  394|     17|   const size_t BS = block_size();
  395|       |
  396|     17|   BOTAN_ARG_CHECK(buffer.size() >= offset, "Offset is out of range");
  ------------------
  |  |   35|     17|   do {                                                          \
  |  |   36|     17|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     17|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 17]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     17|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 17]
  |  |  ------------------
  ------------------
  397|     17|   const size_t sz = buffer.size() - offset;
  398|     17|   uint8_t* buf = buffer.data() + offset;
  399|       |
  400|     17|   secure_vector<uint8_t> mac(BS);
  401|       |
  402|     17|   if(sz > 0) {
  ------------------
  |  Branch (402:7): [True: 17, False: 0]
  ------------------
  403|     17|      const size_t final_full_blocks = sz / BS;
  404|     17|      const size_t remainder_bytes = sz - (final_full_blocks * BS);
  405|       |
  406|     17|      encrypt(buf, final_full_blocks);
  407|     17|      mac = m_L->offset();
  408|       |
  409|     17|      if(remainder_bytes > 0) {
  ------------------
  |  Branch (409:10): [True: 8, False: 9]
  ------------------
  410|      8|         BOTAN_ASSERT(remainder_bytes < BS, "Only a partial block left");
  ------------------
  |  |   71|      8|   do {                                                                                 \
  |  |   72|      8|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|      8|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 8]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|      8|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 8]
  |  |  ------------------
  ------------------
  411|      8|         uint8_t* remainder = &buf[sz - remainder_bytes];
  412|       |
  413|      8|         xor_buf(m_checksum.data(), remainder, remainder_bytes);
  414|      8|         m_checksum[remainder_bytes] ^= 0x80;
  415|       |
  416|       |         // Offset_*
  417|      8|         mac ^= m_L->star();
  418|       |
  419|      8|         secure_vector<uint8_t> pad(BS);
  420|      8|         m_cipher->encrypt(mac, pad);
  421|      8|         xor_buf(remainder, pad.data(), remainder_bytes);
  422|      8|      }
  423|     17|   } else {
  424|      0|      mac = m_L->offset();
  425|      0|   }
  426|       |
  427|       |   // now compute the tag
  428|       |
  429|       |   // fold checksum
  430|    289|   for(size_t i = 0; i != m_checksum.size(); i += BS) {
  ------------------
  |  Branch (430:22): [True: 272, False: 17]
  ------------------
  431|    272|      xor_buf(mac.data(), m_checksum.data() + i, BS);
  432|    272|   }
  433|       |
  434|     17|   xor_buf(mac.data(), m_L->dollar().data(), BS);
  435|     17|   m_cipher->encrypt(mac);
  436|     17|   xor_buf(mac.data(), m_ad_hash.data(), BS);
  437|       |
  438|     17|   buffer += std::make_pair(mac.data(), tag_size());
  439|       |
  440|     17|   reset();
  441|     17|}
_ZNK5Botan14OCB_Decryption13output_lengthEm:
  443|     54|size_t OCB_Decryption::output_length(size_t input_length) const {
  444|     54|   BOTAN_ARG_CHECK(input_length >= tag_size(), "Message too short to be valid");
  ------------------
  |  |   35|     54|   do {                                                          \
  |  |   36|     54|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     54|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 54]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     54|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 54]
  |  |  ------------------
  ------------------
  445|     54|   return input_length - tag_size();
  446|     54|}
_ZN5Botan14OCB_Decryption7decryptEPhm:
  448|     52|void OCB_Decryption::decrypt(uint8_t buffer[], size_t blocks) {
  449|     52|   assert_key_material_set();
  450|     52|   BOTAN_STATE_CHECK(m_L->initialized());
  ------------------
  |  |   51|     52|   do {                                                         \
  |  |   52|     52|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|     52|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 52]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|     52|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 52]
  |  |  ------------------
  ------------------
  451|       |
  452|     52|   const size_t BS = block_size();
  453|       |
  454|    261|   while(blocks > 0) {
  ------------------
  |  Branch (454:10): [True: 209, False: 52]
  ------------------
  455|    209|      const size_t proc_blocks = std::min(blocks, par_blocks());
  456|    209|      const size_t proc_bytes = proc_blocks * BS;
  457|       |
  458|    209|      const uint8_t* offsets = m_L->compute_offsets(m_block_index, proc_blocks);
  459|       |
  460|    209|      xor_buf(buffer, offsets, proc_bytes);
  461|    209|      m_cipher->decrypt_n(buffer, buffer, proc_blocks);
  462|    209|      xor_buf(buffer, offsets, proc_bytes);
  463|       |
  464|    209|      xor_buf(m_checksum.data(), buffer, proc_bytes);
  465|       |
  466|    209|      buffer += proc_bytes;
  467|    209|      blocks -= proc_blocks;
  468|    209|      m_block_index += proc_blocks;
  469|    209|   }
  470|     52|}
_ZN5Botan14OCB_Decryption10finish_msgERNSt3__16vectorIhNS_16secure_allocatorIhEEEEm:
  478|     54|void OCB_Decryption::finish_msg(secure_vector<uint8_t>& buffer, size_t offset) {
  479|     54|   assert_key_material_set();
  480|     54|   BOTAN_STATE_CHECK(m_L->initialized());
  ------------------
  |  |   51|     54|   do {                                                         \
  |  |   52|     54|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|     54|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 54]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|     54|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 54]
  |  |  ------------------
  ------------------
  481|       |
  482|     54|   const size_t BS = block_size();
  483|       |
  484|     54|   BOTAN_ARG_CHECK(buffer.size() >= offset, "Offset is out of range");
  ------------------
  |  |   35|     54|   do {                                                          \
  |  |   36|     54|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     54|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 54]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     54|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 54]
  |  |  ------------------
  ------------------
  485|     54|   const size_t sz = buffer.size() - offset;
  486|     54|   uint8_t* buf = buffer.data() + offset;
  487|       |
  488|     54|   BOTAN_ARG_CHECK(sz >= tag_size(), "input did not include the tag");
  ------------------
  |  |   35|     54|   do {                                                          \
  |  |   36|     54|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     54|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 54]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     54|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 54]
  |  |  ------------------
  ------------------
  489|       |
  490|     54|   const size_t remaining = sz - tag_size();
  491|       |
  492|     54|   secure_vector<uint8_t> mac(BS);
  493|       |
  494|     54|   if(remaining > 0) {
  ------------------
  |  Branch (494:7): [True: 52, False: 2]
  ------------------
  495|     52|      const size_t final_full_blocks = remaining / BS;
  496|     52|      const size_t final_bytes = remaining - (final_full_blocks * BS);
  497|       |
  498|     52|      decrypt(buf, final_full_blocks);
  499|     52|      mac ^= m_L->offset();
  500|       |
  501|     52|      if(final_bytes > 0) {
  ------------------
  |  Branch (501:10): [True: 49, False: 3]
  ------------------
  502|     49|         BOTAN_ASSERT(final_bytes < BS, "Only a partial block left");
  ------------------
  |  |   71|     49|   do {                                                                                 \
  |  |   72|     49|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|     49|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 49]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|     49|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 49]
  |  |  ------------------
  ------------------
  503|       |
  504|     49|         uint8_t* remainder = &buf[remaining - final_bytes];
  505|       |
  506|     49|         mac ^= m_L->star();
  507|     49|         secure_vector<uint8_t> pad(BS);
  508|     49|         m_cipher->encrypt(mac, pad);  // P_*
  509|     49|         xor_buf(remainder, pad.data(), final_bytes);
  510|       |
  511|     49|         xor_buf(m_checksum.data(), remainder, final_bytes);
  512|     49|         m_checksum[final_bytes] ^= 0x80;
  513|     49|      }
  514|     52|   } else {
  515|      2|      mac = m_L->offset();
  516|      2|   }
  517|       |
  518|       |   // compute the mac
  519|       |
  520|       |   // fold checksum
  521|    918|   for(size_t i = 0; i != m_checksum.size(); i += BS) {
  ------------------
  |  Branch (521:22): [True: 864, False: 54]
  ------------------
  522|    864|      xor_buf(mac.data(), m_checksum.data() + i, BS);
  523|    864|   }
  524|       |
  525|     54|   mac ^= m_L->dollar();
  526|     54|   m_cipher->encrypt(mac);
  527|     54|   mac ^= m_ad_hash;
  528|       |
  529|     54|   reset();
  530|       |
  531|       |   // compare mac
  532|     54|   const uint8_t* included_tag = &buf[remaining];
  533|       |
  534|     54|   if(!CT::is_equal(mac.data(), included_tag, tag_size()).as_bool()) {
  ------------------
  |  Branch (534:7): [True: 54, False: 0]
  ------------------
  535|     54|      clear_mem(std::span{buffer}.subspan(offset, remaining));
  536|     54|      throw Invalid_Authentication_Tag("OCB tag check failed");
  537|     54|   }
  538|       |
  539|       |   // remove tag from end of message
  540|      0|   buffer.resize(remaining + offset);
  541|      0|}
_ZN5Botan10L_computer5resetEv:
   51|    140|      void reset() { m_offset.clear(); }
_ZNK5Botan10L_computer11initializedEv:
   53|    282|      bool initialized() const { return !m_offset.empty(); }
ocb.cpp:_ZN5Botan12_GLOBAL__N_18ocb_hashERKNS_10L_computerERKNS_11BlockCipherEPKhm:
  132|     71|secure_vector<uint8_t> ocb_hash(const L_computer& L, const BlockCipher& cipher, const uint8_t ad[], size_t ad_len) {
  133|     71|   const size_t BS = cipher.block_size();
  134|     71|   secure_vector<uint8_t> sum(BS);
  135|     71|   secure_vector<uint8_t> offset(BS);
  136|       |
  137|     71|   secure_vector<uint8_t> buf(BS);
  138|       |
  139|     71|   const size_t ad_blocks = (ad_len / BS);
  140|     71|   const size_t ad_remainder = (ad_len % BS);
  141|       |
  142|     71|   for(size_t i = 0; i != ad_blocks; ++i) {
  ------------------
  |  Branch (142:22): [True: 0, False: 71]
  ------------------
  143|       |      // this loop could run in parallel
  144|      0|      offset ^= L.get(var_ctz64(i + 1));
  145|      0|      buf = offset;
  146|      0|      xor_buf(buf.data(), &ad[BS * i], BS);
  147|      0|      cipher.encrypt(buf);
  148|      0|      sum ^= buf;
  149|      0|   }
  150|       |
  151|     71|   if(ad_remainder > 0) {
  ------------------
  |  Branch (151:7): [True: 71, False: 0]
  ------------------
  152|     71|      offset ^= L.star();
  153|     71|      buf = offset;
  154|     71|      xor_buf(buf.data(), &ad[BS * ad_blocks], ad_remainder);
  155|     71|      buf[ad_remainder] ^= 0x80;
  156|     71|      cipher.encrypt(buf);
  157|     71|      sum ^= buf;
  158|     71|   }
  159|       |
  160|     71|   return sum;
  161|     71|}
_ZNK5Botan10L_computer3getEm:
   61|  1.23k|      const secure_vector<uint8_t>& get(size_t i) const {
   62|  1.24k|         while(m_L.size() <= i) {
  ------------------
  |  Branch (62:16): [True: 2, False: 1.23k]
  ------------------
   63|      2|            m_L.push_back(poly_double(m_L.back()));
   64|      2|         }
   65|       |
   66|  1.23k|         return m_L[i];
   67|  1.23k|      }
_ZN5Botan10L_computer11poly_doubleERKNSt3__16vectorIhNS_16secure_allocatorIhEEEE:
  114|    623|      static secure_vector<uint8_t> poly_double(const secure_vector<uint8_t>& in) {
  115|    623|         secure_vector<uint8_t> out(in.size());
  116|    623|         poly_double_n(out.data(), in.data(), out.size());
  117|    623|         return out;
  118|    623|      }
_ZN5Botan10L_computer4initERKNSt3__16vectorIhNS_16secure_allocatorIhEEEE:
   49|     71|      void init(const secure_vector<uint8_t>& offset) { m_offset = offset; }
_ZN5Botan10L_computer15compute_offsetsEmm:
   69|    218|      const uint8_t* compute_offsets(uint64_t block_index, size_t blocks) {
   70|    218|         BOTAN_ASSERT(blocks <= m_max_blocks, "OCB offsets");
  ------------------
  |  |   71|    218|   do {                                                                                 \
  |  |   72|    218|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|    218|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 218]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|    218|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 218]
  |  |  ------------------
  ------------------
   71|       |
   72|    218|         uint8_t* offsets = m_offset_buf.data();
   73|       |
   74|    218|         if(block_index % 4 == 0) {
  ------------------
  |  Branch (74:13): [True: 218, False: 0]
  ------------------
   75|    218|            const secure_vector<uint8_t>& L0 = get(0);
   76|    218|            const secure_vector<uint8_t>& L1 = get(1);
   77|       |
   78|    938|            while(blocks >= 4) {
  ------------------
  |  Branch (78:19): [True: 720, False: 218]
  ------------------
   79|       |               // ntz(4*i+1) == 0
   80|       |               // ntz(4*i+2) == 1
   81|       |               // ntz(4*i+3) == 0
   82|    720|               block_index += 4;
   83|    720|               const size_t ntz4 = var_ctz64(block_index);
   84|       |
   85|    720|               xor_buf(offsets, m_offset.data(), L0.data(), m_BS);
   86|    720|               offsets += m_BS;
   87|       |
   88|    720|               xor_buf(offsets, offsets - m_BS, L1.data(), m_BS);
   89|    720|               offsets += m_BS;
   90|       |
   91|    720|               xor_buf(m_offset.data(), L1.data(), m_BS);
   92|    720|               copy_mem(offsets, m_offset.data(), m_BS);
   93|    720|               offsets += m_BS;
   94|       |
   95|    720|               xor_buf(m_offset.data(), get(ntz4).data(), m_BS);
   96|    720|               copy_mem(offsets, m_offset.data(), m_BS);
   97|    720|               offsets += m_BS;
   98|       |
   99|    720|               blocks -= 4;
  100|    720|            }
  101|    218|         }
  102|       |
  103|    301|         for(size_t i = 0; i != blocks; ++i) {  // could be done in parallel
  ------------------
  |  Branch (103:28): [True: 83, False: 218]
  ------------------
  104|     83|            const size_t ntz = var_ctz64(block_index + i + 1);
  105|     83|            xor_buf(m_offset.data(), get(ntz).data(), m_BS);
  106|     83|            copy_mem(offsets, m_offset.data(), m_BS);
  107|     83|            offsets += m_BS;
  108|     83|         }
  109|       |
  110|    218|         return m_offset_buf.data();
  111|    218|      }
_ZNK5Botan10L_computer6offsetEv:
   59|     71|      const secure_vector<uint8_t>& offset() const { return m_offset; }
_ZNK5Botan10L_computer4starEv:
   55|    197|      const secure_vector<uint8_t>& star() const { return m_L_star; }
_ZNK5Botan10L_computer6dollarEv:
   57|    140|      const secure_vector<uint8_t>& dollar() const { return m_L_dollar; }
_ZN5Botan10L_computerC2ERKNS_11BlockCipherE:
   25|     69|            m_BS(cipher.block_size()), m_max_blocks(cipher.parallel_bytes() / m_BS) {
   26|     69|         m_L_star.resize(m_BS);
   27|     69|         cipher.encrypt(m_L_star);
   28|     69|         m_L_dollar = poly_double(star());
   29|       |
   30|       |         // Preallocate the m_L vector to the maximum expected size to avoid
   31|       |         // re-allocations during runtime. This had caused a use-after-free in
   32|       |         // earlier versions, due to references into this buffer becoming stale
   33|       |         // in `compute_offset()`, after calling `get()` in the hot path.
   34|       |         //
   35|       |         // Note, that the list member won't be pre-allocated, so the expected
   36|       |         // memory overhead is negligible.
   37|       |         //
   38|       |         // See also https://github.com/randombit/botan/issues/3812
   39|     69|         m_L.reserve(65);
   40|     69|         m_L.push_back(poly_double(dollar()));
   41|       |
   42|    552|         while(m_L.size() < 8) {
  ------------------
  |  Branch (42:16): [True: 483, False: 69]
  ------------------
   43|    483|            m_L.push_back(poly_double(m_L.back()));
   44|    483|         }
   45|       |
   46|     69|         m_offset_buf.resize(m_BS * m_max_blocks);
   47|     69|      }

_ZN5Botan8CBC_ModeC2ENSt3__110unique_ptrINS_11BlockCipherENS1_14default_deleteIS3_EEEENS2_INS_28BlockCipherModePaddingMethodENS4_IS7_EEEE:
   21|    207|      m_cipher(std::move(cipher)), m_padding(std::move(padding)), m_block_size(m_cipher->block_size()) {
   22|    207|   if(m_padding && !m_padding->valid_blocksize(m_block_size)) {
  ------------------
  |  Branch (22:7): [True: 207, False: 0]
  |  Branch (22:20): [True: 0, False: 207]
  ------------------
   23|      0|      throw Invalid_Argument(fmt("Padding {} cannot be used with {} in CBC mode", m_padding->name(), m_cipher->name()));
   24|      0|   }
   25|    207|}
_ZNK5Botan8CBC_Mode17ideal_granularityEv:
   48|    157|size_t CBC_Mode::ideal_granularity() const {
   49|    157|   return cipher().parallel_bytes();
   50|    157|}
_ZNK5Botan8CBC_Mode8key_specEv:
   52|    207|Key_Length_Specification CBC_Mode::key_spec() const {
   53|    207|   return cipher().key_spec();
   54|    207|}
_ZNK5Botan8CBC_Mode18valid_nonce_lengthEm:
   60|    192|bool CBC_Mode::valid_nonce_length(size_t n) const {
   61|    192|   return (n == 0 || n == block_size());
  ------------------
  |  Branch (61:12): [True: 0, False: 192]
  |  Branch (61:22): [True: 192, False: 0]
  ------------------
   62|    192|}
_ZN5Botan8CBC_Mode12key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
   68|    207|void CBC_Mode::key_schedule(std::span<const uint8_t> key) {
   69|    207|   m_cipher->set_key(key);
   70|    207|   m_state.clear();
   71|    207|}
_ZN5Botan8CBC_Mode9start_msgEPKhm:
   73|    192|void CBC_Mode::start_msg(const uint8_t nonce[], size_t nonce_len) {
   74|    192|   if(!valid_nonce_length(nonce_len)) {
  ------------------
  |  Branch (74:7): [True: 0, False: 192]
  ------------------
   75|      0|      throw Invalid_IV_Length(name(), nonce_len);
   76|      0|   }
   77|       |
   78|       |   /*
   79|       |   * A nonce of zero length means carry the last ciphertext value over
   80|       |   * as the new IV, as unfortunately some protocols require this. If
   81|       |   * this is the first message then we use an IV of all zeros.
   82|       |   */
   83|    192|   if(nonce_len > 0) {
  ------------------
  |  Branch (83:7): [True: 192, False: 0]
  ------------------
   84|    192|      m_state.assign(nonce, nonce + nonce_len);
   85|    192|   } else if(m_state.empty()) {
  ------------------
  |  Branch (85:14): [True: 0, False: 0]
  ------------------
   86|      0|      m_state.resize(m_cipher->block_size());
   87|      0|   }
   88|       |   // else leave the state alone
   89|    192|}
_ZN5Botan14CBC_Encryption11process_msgEPhm:
   99|     85|size_t CBC_Encryption::process_msg(uint8_t buf[], size_t sz) {
  100|     85|   BOTAN_STATE_CHECK(state().empty() == false);
  ------------------
  |  |   51|     85|   do {                                                         \
  |  |   52|     85|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|     85|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 85]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|     85|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 85]
  |  |  ------------------
  ------------------
  101|     85|   const size_t BS = block_size();
  102|       |
  103|     85|   BOTAN_ARG_CHECK(sz % BS == 0, "CBC input is not full blocks");
  ------------------
  |  |   35|     85|   do {                                                          \
  |  |   36|     85|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     85|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 85]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     85|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 85]
  |  |  ------------------
  ------------------
  104|     85|   const size_t blocks = sz / BS;
  105|       |
  106|     85|   if(blocks > 0) {
  ------------------
  |  Branch (106:7): [True: 85, False: 0]
  ------------------
  107|     85|      xor_buf(&buf[0], state_ptr(), BS);
  108|     85|      cipher().encrypt(&buf[0]);
  109|       |
  110|    318|      for(size_t i = 1; i != blocks; ++i) {
  ------------------
  |  Branch (110:25): [True: 233, False: 85]
  ------------------
  111|    233|         xor_buf(&buf[BS * i], &buf[BS * (i - 1)], BS);
  112|    233|         cipher().encrypt(&buf[BS * i]);
  113|    233|      }
  114|       |
  115|     85|      state().assign(&buf[BS * (blocks - 1)], &buf[BS * blocks]);
  116|     85|   }
  117|       |
  118|     85|   return sz;
  119|     85|}
_ZN5Botan14CBC_Decryption11process_msgEPhm:
  202|    107|size_t CBC_Decryption::process_msg(uint8_t buf[], size_t sz) {
  203|    107|   BOTAN_STATE_CHECK(state().empty() == false);
  ------------------
  |  |   51|    107|   do {                                                         \
  |  |   52|    107|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    107|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 107]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    107|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 107]
  |  |  ------------------
  ------------------
  204|       |
  205|    107|   const size_t BS = block_size();
  206|       |
  207|    107|   BOTAN_ARG_CHECK(sz % BS == 0, "Input is not full blocks");
  ------------------
  |  |   35|    107|   do {                                                          \
  |  |   36|    107|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    107|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 107]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    107|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 107]
  |  |  ------------------
  ------------------
  208|    107|   size_t blocks = sz / BS;
  209|       |
  210|    538|   while(blocks > 0) {
  ------------------
  |  Branch (210:10): [True: 431, False: 107]
  ------------------
  211|    431|      const size_t to_proc = std::min(BS * blocks, m_tempbuf.size());
  212|       |
  213|    431|      cipher().decrypt_n(buf, m_tempbuf.data(), to_proc / BS);
  214|       |
  215|    431|      xor_buf(m_tempbuf.data(), state_ptr(), BS);
  216|    431|      xor_buf(&m_tempbuf[BS], buf, to_proc - BS);
  217|    431|      copy_mem(state_ptr(), buf + (to_proc - BS), BS);
  218|       |
  219|    431|      copy_mem(buf, m_tempbuf.data(), to_proc);
  220|       |
  221|    431|      buf += to_proc;
  222|    431|      blocks -= to_proc / BS;
  223|    431|   }
  224|       |
  225|    107|   return sz;
  226|    107|}

_ZN5Botan9Gf448ElemC2ENSt3__14spanIKhLm56EEE:
  356|     34|Gf448Elem::Gf448Elem(std::span<const uint8_t, BYTES_448> x) /* NOLINT(*-member-init) */ {
  357|     34|   load_le(m_x, x);
  358|     34|}
_ZN5Botan9Gf448ElemC2Em:
  360|   137k|Gf448Elem::Gf448Elem(uint64_t least_sig_word) /* NOLINT(*-member-init) */ {
  361|   137k|   clear_mem(m_x);
  362|   137k|   m_x[0] = least_sig_word;
  363|   137k|}
_ZNK5Botan9Gf448Elem8to_bytesENSt3__14spanIhLm56EEE:
  365|     17|void Gf448Elem::to_bytes(std::span<uint8_t, BYTES_448> out) const {
  366|     17|   store_le(out, to_canonical(m_x));
  367|     17|}
_ZNK5Botan9Gf448Elem8to_bytesEv:
  369|     17|std::array<uint8_t, BYTES_448> Gf448Elem::to_bytes() const {
  370|     17|   std::array<uint8_t, BYTES_448> bytes{};
  371|     17|   to_bytes(bytes);
  372|     17|   return bytes;
  373|     17|}
_ZN5Botan9Gf448Elem12ct_cond_swapENS_2CT4MaskImEERS0_:
  375|  15.2k|void Gf448Elem::ct_cond_swap(CT::Mask<uint64_t> mask, Gf448Elem& other) {
  376|   122k|   for(size_t i = 0; i < WORDS_448; ++i) {
  ------------------
  |  Branch (376:22): [True: 106k, False: 15.2k]
  ------------------
  377|   106k|      mask.conditional_swap(m_x[i], other.m_x[i]);
  378|   106k|   }
  379|  15.2k|}
_ZNK5Botan9Gf448ElemplERKS0_:
  385|  30.4k|Gf448Elem Gf448Elem::operator+(const Gf448Elem& other) const {
  386|  30.4k|   Gf448Elem res(0);
  387|  30.4k|   gf_add(res.m_x, m_x, other.m_x);
  388|  30.4k|   return res;
  389|  30.4k|}
_ZNK5Botan9Gf448ElemmiERKS0_:
  391|  30.4k|Gf448Elem Gf448Elem::operator-(const Gf448Elem& other) const {
  392|  30.4k|   Gf448Elem res(0);
  393|  30.4k|   gf_sub(res.m_x, m_x, other.m_x);
  394|  30.4k|   return res;
  395|  30.4k|}
_ZNK5Botan9Gf448ElemmlERKS0_:
  403|  38.0k|Gf448Elem Gf448Elem::operator*(const Gf448Elem& other) const {
  404|  38.0k|   Gf448Elem res(0);
  405|  38.0k|   gf_mul(res.m_x, m_x, other.m_x);
  406|  38.0k|   return res;
  407|  38.0k|}
_ZNK5Botan9Gf448ElemdvERKS0_:
  409|     17|Gf448Elem Gf448Elem::operator/(const Gf448Elem& other) const {
  410|     17|   Gf448Elem res(0);
  411|     17|   gf_inv(res.m_x, other.m_x);
  412|     17|   gf_mul(res.m_x, m_x, res.m_x);
  413|     17|   return res;
  414|     17|}
_ZN5Botan7mul_a24ERKNS_9Gf448ElemE:
  439|  7.61k|Gf448Elem mul_a24(const Gf448Elem& a) {
  440|  7.61k|   Gf448Elem res(0);
  441|  7.61k|   gf_mul_a24(res.words(), a.words());
  442|  7.61k|   return res;
  443|  7.61k|}
_ZN5Botan6squareERKNS_9Gf448ElemE:
  445|  30.4k|Gf448Elem square(const Gf448Elem& elem) {
  446|  30.4k|   Gf448Elem res(0);
  447|  30.4k|   gf_square(res.words(), elem.words());
  448|  30.4k|   return res;
  449|  30.4k|}
curve448_gf.cpp:_ZN5Botan12_GLOBAL__N_112to_canonicalENSt3__14spanIKmLm7EEE:
  335|     17|std::array<uint64_t, WORDS_448> to_canonical(std::span<const uint64_t, WORDS_448> in) {
  336|     17|   const std::array<uint64_t, WORDS_448> p = {0xffffffffffffffff,
  337|     17|                                              0xffffffffffffffff,
  338|     17|                                              0xffffffffffffffff,
  339|     17|                                              0xfffffffeffffffff,
  340|     17|                                              0xffffffffffffffff,
  341|     17|                                              0xffffffffffffffff,
  342|     17|                                              0xffffffffffffffff};
  343|       |
  344|     17|   std::array<uint64_t, WORDS_448> in_minus_p;  // NOLINT(*-member-init)
  345|     17|   uint64_t borrow = 0;
  346|    136|   for(size_t i = 0; i < WORDS_448; ++i) {
  ------------------
  |  Branch (346:22): [True: 119, False: 17]
  ------------------
  347|    119|      in_minus_p[i] = word_sub(in[i], p[i], &borrow);
  348|    119|   }
  349|     17|   std::array<uint64_t, WORDS_448> out;  // NOLINT(*-member-init)
  350|     17|   CT::Mask<uint64_t>::expand(borrow).select_n(out.data(), in.data(), in_minus_p.data(), WORDS_448);
  351|     17|   return out;
  352|     17|}
curve448_gf.cpp:_ZN5Botan12_GLOBAL__N_16gf_addENSt3__14spanImLm7EEENS2_IKmLm7EEES5_:
  155|  30.4k|            std::span<const uint64_t, WORDS_448> b) {
  156|  30.4k|   std::array<uint64_t, WORDS_448 + 1> ws;  // NOLINT(*-member-init)
  157|       |
  158|  30.4k|   uint64_t carry = 0;
  159|  30.4k|   ws[0] = word_add(a[0], b[0], &carry);
  160|  30.4k|   ws[1] = word_add(a[1], b[1], &carry);
  161|  30.4k|   ws[2] = word_add(a[2], b[2], &carry);
  162|  30.4k|   ws[3] = word_add(a[3], b[3], &carry);
  163|  30.4k|   ws[4] = word_add(a[4], b[4], &carry);
  164|  30.4k|   ws[5] = word_add(a[5], b[5], &carry);
  165|  30.4k|   ws[6] = word_add(a[6], b[6], &carry);
  166|  30.4k|   ws[7] = carry;
  167|       |
  168|  30.4k|   reduce_after_add(out, ws);
  169|  30.4k|}
curve448_gf.cpp:_ZN5Botan12_GLOBAL__N_116reduce_after_addENSt3__14spanImLm7EEENS2_IKmLm8EEE:
   27|   114k|void reduce_after_add(std::span<uint64_t, WORDS_448> h_3, std::span<const uint64_t, 8> h_1) {
   28|   114k|   std::array<uint64_t, 8> h_2; /* NOLINT(*-member-init) */
   29|   114k|   uint64_t carry = 0;
   30|       |
   31|   114k|   constexpr uint64_t zero = 0;
   32|       |
   33|       |   // Line 27+ (of the paper's algorithm 1)
   34|   114k|   h_2[0] = word_add(h_1[0], h_1[7], &carry);
   35|   114k|   h_2[1] = word_add(h_1[1], zero, &carry);
   36|   114k|   h_2[2] = word_add(h_1[2], zero, &carry);
   37|       |
   38|       |   // Line 30
   39|   114k|   h_2[3] = word_add(h_1[3], h_1[7] << 32, &carry);
   40|       |
   41|       |   // Line 31+
   42|   114k|   h_2[4] = word_add(h_1[4], zero, &carry);
   43|   114k|   h_2[5] = word_add(h_1[5], zero, &carry);
   44|   114k|   h_2[6] = word_add(h_1[6], zero, &carry);
   45|       |
   46|   114k|   h_2[7] = carry;
   47|       |
   48|   114k|   carry = 0;
   49|   114k|   h_3[0] = word_add(h_2[0], h_2[7], &carry);
   50|   114k|   h_3[1] = word_add(h_2[1], zero, &carry);
   51|   114k|   h_3[2] = word_add(h_2[2], zero, &carry);
   52|       |   // Line 37
   53|   114k|   h_3[3] = h_2[3] + (h_2[7] << 32) + carry;
   54|       |
   55|       |   // Line 38
   56|   114k|   h_3[4] = h_2[4];
   57|   114k|   h_3[5] = h_2[5];
   58|   114k|   h_3[6] = h_2[6];
   59|   114k|}
curve448_gf.cpp:_ZN5Botan12_GLOBAL__N_16gf_subENSt3__14spanImLm7EEENS2_IKmLm7EEES5_:
  178|  30.4k|            std::span<const uint64_t, WORDS_448> b) {
  179|  30.4k|   std::array<uint64_t, WORDS_448> h_0;  // NOLINT(*-member-init)
  180|  30.4k|   std::array<uint64_t, WORDS_448> h_1;  // NOLINT(*-member-init)
  181|       |
  182|  30.4k|   uint64_t borrow = 0;
  183|  30.4k|   h_0[0] = word_sub(a[0], b[0], &borrow);
  184|  30.4k|   h_0[1] = word_sub(a[1], b[1], &borrow);
  185|  30.4k|   h_0[2] = word_sub(a[2], b[2], &borrow);
  186|  30.4k|   h_0[3] = word_sub(a[3], b[3], &borrow);
  187|  30.4k|   h_0[4] = word_sub(a[4], b[4], &borrow);
  188|  30.4k|   h_0[5] = word_sub(a[5], b[5], &borrow);
  189|  30.4k|   h_0[6] = word_sub(a[6], b[6], &borrow);
  190|  30.4k|   uint64_t delta = borrow;
  191|  30.4k|   uint64_t delta_p = delta << 32;
  192|  30.4k|   borrow = 0;
  193|       |
  194|  30.4k|   constexpr uint64_t zero = 0;
  195|       |
  196|  30.4k|   h_1[0] = word_sub(h_0[0], delta, &borrow);
  197|  30.4k|   h_1[1] = word_sub(h_0[1], zero, &borrow);
  198|  30.4k|   h_1[2] = word_sub(h_0[2], zero, &borrow);
  199|  30.4k|   h_1[3] = word_sub(h_0[3], delta_p, &borrow);
  200|  30.4k|   h_1[4] = word_sub(h_0[4], zero, &borrow);
  201|  30.4k|   h_1[5] = word_sub(h_0[5], zero, &borrow);
  202|  30.4k|   h_1[6] = word_sub(h_0[6], zero, &borrow);
  203|       |
  204|  30.4k|   delta = borrow;
  205|  30.4k|   delta_p = delta << 32;
  206|  30.4k|   borrow = 0;
  207|       |
  208|  30.4k|   out[0] = word_sub(h_1[0], delta, &borrow);
  209|  30.4k|   out[1] = word_sub(h_1[1], zero, &borrow);
  210|  30.4k|   out[2] = word_sub(h_1[2], zero, &borrow);
  211|  30.4k|   out[3] = word_sub(h_1[3], delta_p, &borrow);
  212|  30.4k|   out[4] = h_1[4];
  213|  30.4k|   out[5] = h_1[5];
  214|  30.4k|   out[6] = h_1[6];
  215|  30.4k|}
curve448_gf.cpp:_ZN5Botan12_GLOBAL__N_16gf_mulENSt3__14spanImLm7EEENS2_IKmLm7EEES5_:
  141|  38.3k|            std::span<const uint64_t, WORDS_448> b) {
  142|  38.3k|   std::array<uint64_t, 14> ws;  // NOLINT(*-member-init)
  143|  38.3k|   comba_mul<7>(ws.data(), a.data(), b.data());
  144|  38.3k|   reduce_after_mul(out, ws);
  145|  38.3k|}
curve448_gf.cpp:_ZN5Botan12_GLOBAL__N_116reduce_after_mulENSt3__14spanImLm7EEENS2_IKmLm14EEE:
   66|  76.3k|void reduce_after_mul(std::span<uint64_t, WORDS_448> out, std::span<const uint64_t, 14> in) {
   67|  76.3k|   std::array<uint64_t, 8> r;    // NOLINT(*-member-init)
   68|  76.3k|   std::array<uint64_t, 8> s;    // NOLINT(*-member-init)
   69|  76.3k|   std::array<uint64_t, 8> t_0;  // NOLINT(*-member-init)
   70|  76.3k|   std::array<uint64_t, 8> h_1;  // NOLINT(*-member-init)
   71|       |
   72|  76.3k|   uint64_t carry = 0;
   73|       |
   74|       |   // Line 4 (of the paper's algorithm 1)
   75|  76.3k|   r[0] = word_add(in[0], in[7], &carry);
   76|       |
   77|       |   // Line 5-7
   78|  76.3k|   r[1] = word_add(in[1], in[1 + 7], &carry);
   79|  76.3k|   r[2] = word_add(in[2], in[2 + 7], &carry);
   80|  76.3k|   r[3] = word_add(in[3], in[3 + 7], &carry);
   81|  76.3k|   r[4] = word_add(in[4], in[4 + 7], &carry);
   82|  76.3k|   r[5] = word_add(in[5], in[5 + 7], &carry);
   83|  76.3k|   r[6] = word_add(in[6], in[6 + 7], &carry);
   84|  76.3k|   r[7] = carry;
   85|  76.3k|   s[0] = r[0];
   86|  76.3k|   s[1] = r[1];
   87|  76.3k|   s[2] = r[2];
   88|       |   // Line 10
   89|  76.3k|   carry = 0;
   90|  76.3k|   s[3] = word_add(r[3], in[10] & 0xFFFFFFFF00000000, &carry);
   91|       |   // Line 11-13
   92|  76.3k|   s[4] = word_add(r[4], in[4 + 7], &carry);
   93|  76.3k|   s[5] = word_add(r[5], in[5 + 7], &carry);
   94|  76.3k|   s[6] = word_add(r[6], in[6 + 7], &carry);
   95|  76.3k|   s[7] = r[7] + carry;
   96|       |
   97|       |   // Line 15-17
   98|  76.3k|   t_0[0] = (in[0 + 11] << 32) | (in[0 + 10] >> 32);
   99|  76.3k|   t_0[1] = (in[1 + 11] << 32) | (in[1 + 10] >> 32);
  100|  76.3k|   t_0[2] = (in[2 + 11] << 32) | (in[2 + 10] >> 32);
  101|       |   // Line 18
  102|  76.3k|   t_0[3] = (in[7] << 32) | (in[13] >> 32);
  103|       |   // Line 19-21
  104|  76.3k|   t_0[4] = (in[4 + 4] << 32) | (in[4 + 3] >> 32);
  105|  76.3k|   t_0[5] = (in[5 + 4] << 32) | (in[5 + 3] >> 32);
  106|  76.3k|   t_0[6] = (in[6 + 4] << 32) | (in[6 + 3] >> 32);
  107|  76.3k|   carry = 0;
  108|       |   // Line 23-25
  109|  76.3k|   h_1[0] = word_add(s[0], t_0[0], &carry);
  110|  76.3k|   h_1[1] = word_add(s[1], t_0[1], &carry);
  111|  76.3k|   h_1[2] = word_add(s[2], t_0[2], &carry);
  112|  76.3k|   h_1[3] = word_add(s[3], t_0[3], &carry);
  113|  76.3k|   h_1[4] = word_add(s[4], t_0[4], &carry);
  114|  76.3k|   h_1[5] = word_add(s[5], t_0[5], &carry);
  115|  76.3k|   h_1[6] = word_add(s[6], t_0[6], &carry);
  116|  76.3k|   h_1[7] = s[7] + carry;
  117|       |
  118|  76.3k|   reduce_after_add(out, h_1);
  119|  76.3k|}
curve448_gf.cpp:_ZN5Botan12_GLOBAL__N_16gf_invENSt3__14spanImLm7EEENS2_IKmLm7EEE:
  316|     17|void gf_inv(std::span<uint64_t, WORDS_448> out, std::span<const uint64_t, WORDS_448> a) {
  317|     17|   std::array<uint64_t, WORDS_448> x222;  // NOLINT(*-member-init)
  318|     17|   std::array<uint64_t, WORDS_448> x223;  // NOLINT(*-member-init)
  319|     17|   gf_pow_2_222m1(x222, x223, a);
  320|       |
  321|       |   // (x223 << 223 + x222) << 2 + 1
  322|     17|   std::array<uint64_t, WORDS_448> t;  // NOLINT(*-member-init)
  323|     17|   gf_sqr_n(t, x223, 223);
  324|     17|   gf_mul(t, t, x222);
  325|     17|   gf_sqr_n(t, t, 2);
  326|     17|   gf_mul(out, t, a);
  327|     17|}
curve448_gf.cpp:_ZN5Botan12_GLOBAL__N_110gf_mul_a24ENSt3__14spanImLm7EEENS2_IKmLm7EEE:
  124|  7.61k|void gf_mul_a24(std::span<uint64_t, WORDS_448> out, std::span<const uint64_t, WORDS_448> a) {
  125|  7.61k|   constexpr uint64_t A24 = 39081;
  126|  7.61k|   std::array<uint64_t, 8> ws;  // NOLINT(*-member-init)
  127|  7.61k|   uint64_t carry = 0;
  128|  7.61k|   ws[0] = word_madd2(a[0], A24, &carry);
  129|  7.61k|   ws[1] = word_madd2(a[1], A24, &carry);
  130|  7.61k|   ws[2] = word_madd2(a[2], A24, &carry);
  131|  7.61k|   ws[3] = word_madd2(a[3], A24, &carry);
  132|  7.61k|   ws[4] = word_madd2(a[4], A24, &carry);
  133|  7.61k|   ws[5] = word_madd2(a[5], A24, &carry);
  134|  7.61k|   ws[6] = word_madd2(a[6], A24, &carry);
  135|  7.61k|   ws[7] = carry;
  136|  7.61k|   reduce_after_add(out, ws);
  137|  7.61k|}
curve448_gf.cpp:_ZN5Botan12_GLOBAL__N_19gf_squareENSt3__14spanImLm7EEENS2_IKmLm7EEE:
  147|  38.0k|void gf_square(std::span<uint64_t, WORDS_448> out, std::span<const uint64_t, WORDS_448> a) {
  148|  38.0k|   std::array<uint64_t, 14> ws;  // NOLINT(*-member-init)
  149|  38.0k|   comba_sqr<7>(ws.data(), a.data());
  150|  38.0k|   reduce_after_mul(out, ws);
  151|  38.0k|}
curve448_gf.cpp:_ZN5Botan12_GLOBAL__N_114gf_pow_2_222m1ENSt3__14spanImLm7EEES3_NS2_IKmLm7EEE:
  245|     17|                    std::span<const uint64_t, WORDS_448> a) {
  246|     17|   std::array<uint64_t, WORDS_448> t;  // NOLINT(*-member-init)
  247|       |
  248|       |   // _10 = a^2
  249|     17|   std::array<uint64_t, WORDS_448> a2;  // NOLINT(*-member-init)
  250|     17|   gf_square(a2, a);
  251|       |
  252|       |   // _11 = a^3
  253|     17|   std::array<uint64_t, WORDS_448> a3;  // NOLINT(*-member-init)
  254|     17|   gf_mul(a3, a, a2);
  255|       |
  256|       |   // _111 = a^7
  257|     17|   std::array<uint64_t, WORDS_448> a7;  // NOLINT(*-member-init)
  258|     17|   gf_square(t, a3);
  259|     17|   gf_mul(a7, a, t);
  260|       |
  261|       |   // _111111 = a^63
  262|     17|   std::array<uint64_t, WORDS_448> a63;  // NOLINT(*-member-init)
  263|     17|   gf_sqr_n(t, a7, 3);
  264|     17|   gf_mul(a63, a7, t);
  265|       |
  266|       |   // x12 = a^(2^12 - 1)
  267|     17|   std::array<uint64_t, WORDS_448> x12;  // NOLINT(*-member-init)
  268|     17|   gf_sqr_n(t, a63, 6);
  269|     17|   gf_mul(x12, a63, t);
  270|       |
  271|       |   // x24 = a^(2^24 - 1)
  272|     17|   std::array<uint64_t, WORDS_448> x24;  // NOLINT(*-member-init)
  273|     17|   gf_sqr_n(t, x12, 12);
  274|     17|   gf_mul(x24, x12, t);
  275|       |
  276|       |   // i34 = x24 << 6 = a^((2^24 - 1) * 2^6)
  277|     17|   std::array<uint64_t, WORDS_448> i34;  // NOLINT(*-member-init)
  278|     17|   gf_sqr_n(i34, x24, 6);
  279|       |
  280|       |   // x30 = a^(2^30 - 1)
  281|     17|   std::array<uint64_t, WORDS_448> x30;  // NOLINT(*-member-init)
  282|     17|   gf_mul(x30, a63, i34);
  283|       |
  284|       |   // x48 = a^(2^48 - 1)
  285|     17|   std::array<uint64_t, WORDS_448> x48;  // NOLINT(*-member-init)
  286|     17|   gf_sqr_n(t, i34, 18);
  287|     17|   gf_mul(x48, x24, t);
  288|       |
  289|       |   // x96 = a^(2^96 - 1)
  290|     17|   std::array<uint64_t, WORDS_448> x96;  // NOLINT(*-member-init)
  291|     17|   gf_sqr_n(t, x48, 48);
  292|     17|   gf_mul(x96, x48, t);
  293|       |
  294|       |   // x192 = a^(2^192 - 1)
  295|     17|   std::array<uint64_t, WORDS_448> x192;  // NOLINT(*-member-init)
  296|     17|   gf_sqr_n(t, x96, 96);
  297|     17|   gf_mul(x192, x96, t);
  298|       |
  299|       |   // x222 = a^(2^222 - 1)
  300|     17|   gf_sqr_n(t, x192, 30);
  301|     17|   gf_mul(x222, x30, t);
  302|       |
  303|       |   // x223 = a^(2^223 - 1)
  304|     17|   gf_square(t, x222);
  305|     17|   gf_mul(x223, a, t);
  306|     17|}
curve448_gf.cpp:_ZN5Botan12_GLOBAL__N_18gf_sqr_nENSt3__14spanImLm7EEENS2_IKmLm7EEEm:
  218|    170|void gf_sqr_n(std::span<uint64_t, WORDS_448> out, std::span<const uint64_t, WORDS_448> a, size_t n) {
  219|    170|   gf_square(out, a);
  220|  7.54k|   for(size_t i = 1; i < n; ++i) {
  ------------------
  |  Branch (220:22): [True: 7.37k, False: 170]
  ------------------
  221|  7.37k|      gf_square(out, out);
  222|  7.37k|   }
  223|    170|}

_ZNK5Botan14X448_PublicKey19raw_public_key_bitsEv:
   88|     17|std::vector<uint8_t> X448_PublicKey::raw_public_key_bits() const {
   89|     17|   const auto& pub = m_public->key();
   90|     17|   return {pub.begin(), pub.end()};
   91|     17|}
_ZN5Botan14X448_PublicKeyC1ENSt3__14spanIKhLm18446744073709551615EEE:
  109|      3|X448_PublicKey::X448_PublicKey(std::span<const uint8_t> pub) {
  110|      3|   BOTAN_ARG_CHECK(pub.size() == X448_LEN, "Invalid size for X448 public key");
  ------------------
  |  |   35|      3|   do {                                                          \
  |  |   36|      3|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|      3|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 1, False: 2]
  |  |  ------------------
  |  |   38|      1|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      1|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      1|      }                                                          \
  |  |   41|      3|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 3]
  |  |  ------------------
  ------------------
  111|      3|   std::array<uint8_t, X448_LEN> pub_arr{};
  112|      3|   copy_mem(pub_arr, pub);
  113|      3|   m_public = std::make_shared<const X448_PublicKey_Data>(pub_arr);
  114|      3|}
_ZN5Botan15X448_PrivateKeyC1ENSt3__14spanIKhLm18446744073709551615EEE:
  124|     15|X448_PrivateKey::X448_PrivateKey(std::span<const uint8_t> secret_key) {
  125|     15|   BOTAN_ARG_CHECK(secret_key.size() == X448_LEN, "Invalid size for X448 private key");
  ------------------
  |  |   35|     15|   do {                                                          \
  |  |   36|     15|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     15|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 15]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     15|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
  126|     15|   load_x448_keypair(secure_vector<uint8_t>(secret_key.begin(), secret_key.end()), m_public, m_private);
  127|     15|}
_ZN5Botan15X448_PrivateKeyC1ERNS_21RandomNumberGeneratorE:
  129|     15|X448_PrivateKey::X448_PrivateKey(RandomNumberGenerator& rng) : X448_PrivateKey(rng.random_vec(X448_LEN)) {}
_ZNK5Botan15X448_PrivateKey23create_key_agreement_opERNS_21RandomNumberGeneratorENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEES7_:
  201|      2|                                                                                std::string_view provider) const {
  202|      2|   if(provider == "base" || provider.empty()) {
  ------------------
  |  Branch (202:7): [True: 0, False: 2]
  |  Branch (202:29): [True: 2, False: 0]
  ------------------
  203|      2|      return std::make_unique<X448_KA_Operation>(m_private, params);
  204|      2|   }
  205|      0|   throw Provider_Not_Found(algo_name(), provider);
  206|      2|}
_ZNK5Botan20X448_PrivateKey_Data3keyEv:
   35|      2|      const secure_vector<uint8_t>& key() const { return m_key; }
_ZNK5Botan19X448_PublicKey_Data3keyEv:
   25|     17|      const std::array<uint8_t, X448_LEN>& key() const { return m_key; }
x448.cpp:_ZN5Botan12_GLOBAL__N_117load_x448_keypairENSt3__16vectorIhNS_16secure_allocatorIhEEEERNS1_10shared_ptrIKNS_19X448_PublicKey_DataEEERNS6_IKNS_20X448_PrivateKey_DataEEE:
   66|     15|                       std::shared_ptr<const X448_PrivateKey_Data>& sk_out) {
   67|     15|   BOTAN_ASSERT_NOMSG(secret.size() == X448_LEN);
  ------------------
  |  |   84|     15|   do {                                                                     \
  |  |   85|     15|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     15|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 15]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     15|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
   68|     15|   std::array<uint8_t, X448_LEN> pub{};
   69|     15|   {
   70|     15|      auto scope = CT::scoped_poison(secret);
   71|     15|      x448_basepoint_from_data(pub, std::span(secret).first<X448_LEN>());
   72|     15|      CT::unpoison(pub);
   73|     15|   }
   74|     15|   pk_out = std::make_shared<const X448_PublicKey_Data>(pub);
   75|     15|   sk_out = std::make_shared<const X448_PrivateKey_Data>(std::move(secret));
   76|     15|}
_ZN5Botan20X448_PrivateKey_DataC2ENSt3__16vectorIhNS_16secure_allocatorIhEEEE:
   33|     15|      explicit X448_PrivateKey_Data(secure_vector<uint8_t> key) : m_key(std::move(key)) {}
x448.cpp:_ZN5Botan12_GLOBAL__N_124x448_basepoint_from_dataENSt3__14spanIhLm56EEENS2_IKhLm56EEE:
   47|     15|void x448_basepoint_from_data(std::span<uint8_t, X448_LEN> mypublic, std::span<const uint8_t, X448_LEN> secret) {
   48|     15|   auto bp = x448_basepoint(decode_scalar(secret));
   49|     15|   auto bp_bytes = encode_point(bp);
   50|     15|   copy_mem(mypublic, bp_bytes);
   51|     15|}
_ZN5Botan19X448_PublicKey_DataC2ENSt3__15arrayIhLm56EEE:
   23|     17|      explicit X448_PublicKey_Data(std::array<uint8_t, X448_LEN> key) : m_key(key) {}
x448.cpp:_ZN5Botan12_GLOBAL__N_117X448_KA_OperationC2ENSt3__110shared_ptrIKNS_20X448_PrivateKey_DataEEENS2_17basic_string_viewIcNS2_11char_traitsIcEEEE:
  157|      2|            PK_Ops::Key_Agreement_with_KDF(kdf), m_key(std::move(key)) {}
x448.cpp:_ZN5Botan12_GLOBAL__N_117X448_KA_Operation9raw_agreeEPKhm:
  161|      2|      secure_vector<uint8_t> raw_agree(const uint8_t w_data[], size_t w_len) override {
  162|      2|         const auto& sk = m_key->key();
  163|      2|         BOTAN_ASSERT_NOMSG(sk.size() == X448_LEN);
  ------------------
  |  |   84|      2|   do {                                                                     \
  |  |   85|      2|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|      2|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 2]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|      2|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  164|      2|         auto scope = CT::scoped_poison(sk);
  165|       |
  166|      2|         const std::span<const uint8_t> w(w_data, w_len);
  167|      2|         if(w.size() != X448_LEN) {
  ------------------
  |  Branch (167:13): [True: 0, False: 2]
  ------------------
  168|      0|            throw Decoding_Error("Invalid size for X448 public key");
  169|      0|         }
  170|      2|         const auto k = decode_scalar(sk);
  171|      2|         const auto u = decode_point(w);
  172|       |
  173|      2|         auto shared_secret = encode_point(x448(k, u));
  174|      2|         CT::unpoison(shared_secret);
  175|       |
  176|       |         // RFC 7748 Section 6.2
  177|       |         //    As with X25519, both sides MAY check, without leaking extra
  178|       |         //    information about the value of K, whether the resulting shared K
  179|       |         //    is the all-zero value and abort if so.
  180|       |         //
  181|       |         // TODO: once the generic Key Agreement operation creation is equipped
  182|       |         //       with a more flexible parameterization, this check could be
  183|       |         //       made optional.
  184|       |         //       For instance: `sk->agree().with_optional_sanity_checks(true)`.
  185|       |         //       See also:     https://github.com/randombit/botan/pull/4318
  186|      2|         if(CT::all_zeros(shared_secret.data(), shared_secret.size()).as_bool()) {
  ------------------
  |  Branch (186:13): [True: 1, False: 1]
  ------------------
  187|      1|            throw Invalid_Argument("X448 public point appears to be of low order");
  188|      1|         }
  189|       |
  190|      1|         return shared_secret;
  191|      2|      }

_ZN5Botan12encode_pointERKNS_6StrongINSt3__15arrayIhLm56EEENS_9Point448_EJEEE:
   21|     17|secure_vector<uint8_t> encode_point(const Point448& p) {
   22|     17|   return {p.begin(), p.end()};
   23|     17|}
_ZN5Botan12decode_pointENSt3__14spanIKhLm18446744073709551615EEE:
   25|      2|Point448 decode_point(std::span<const uint8_t> p_bytes) {
   26|      2|   BOTAN_ARG_CHECK(p_bytes.size() == X448_LEN, "Invalid size for X448 point");
  ------------------
  |  |   35|      2|   do {                                                          \
  |  |   36|      2|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|      2|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 2]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|      2|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
   27|      2|   return typecast_copy<Point448>(p_bytes);
   28|      2|}
_ZN5Botan13decode_scalarENSt3__14spanIKhLm18446744073709551615EEE:
   30|     17|ScalarX448 decode_scalar(std::span<const uint8_t> scalar_bytes) {
   31|     17|   BOTAN_ARG_CHECK(scalar_bytes.size() == X448_LEN, "Invalid size for X448 scalar");
  ------------------
  |  |   35|     17|   do {                                                          \
  |  |   36|     17|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     17|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 17]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     17|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 17]
  |  |  ------------------
  ------------------
   32|     17|   auto buf = typecast_copy<ScalarX448>(scalar_bytes);
   33|       |
   34|     17|   buf[0] &= 0xfc;
   35|     17|   buf[55] |= 0x80;
   36|       |
   37|     17|   return buf;
   38|     17|}
_ZN5Botan14x448_basepointERKNS_6StrongINSt3__15arrayIhLm56EEENS_11ScalarX448_EJEEE:
   41|     15|Point448 x448_basepoint(const ScalarX448& k) {
   42|     15|   const Point448 u({5});
   43|     15|   return x448(k, u);
   44|     15|}
_ZN5Botan4x448ERKNS_6StrongINSt3__15arrayIhLm56EEENS_11ScalarX448_EJEEERKNS0_IS3_NS_9Point448_EJEEE:
   48|     17|Point448 x448(const ScalarX448& k, const Point448& u) {
   49|     17|   const Gf448Elem x_1 = Gf448Elem(u.get());
   50|     17|   Gf448Elem x_2 = Gf448Elem::one();
   51|     17|   Gf448Elem z_2 = Gf448Elem::zero();
   52|     17|   Gf448Elem x_3 = Gf448Elem(u.get());
   53|     17|   Gf448Elem z_3 = Gf448Elem::one();
   54|     17|   auto swap = CT::Mask<uint64_t>::cleared();
   55|       |
   56|  7.63k|   for(int16_t t = 448 - 1; t >= 0; --t) {
  ------------------
  |  Branch (56:29): [True: 7.61k, False: 17]
  ------------------
   57|  7.61k|      auto k_t = CT::Mask<uint64_t>::expand(get_bit(k, t));
   58|  7.61k|      swap ^= k_t;
   59|       |
   60|  7.61k|      x_2.ct_cond_swap(swap, x_3);
   61|  7.61k|      z_2.ct_cond_swap(swap, z_3);
   62|  7.61k|      swap = k_t;
   63|       |
   64|  7.61k|      const auto A = x_2 + z_2;
   65|  7.61k|      const auto AA = square(A);
   66|  7.61k|      const auto B = x_2 - z_2;
   67|  7.61k|      const auto BB = square(B);
   68|  7.61k|      const auto E = AA - BB;
   69|  7.61k|      const auto C = x_3 + z_3;
   70|  7.61k|      const auto D = x_3 - z_3;
   71|  7.61k|      const auto DA = D * A;
   72|  7.61k|      const auto CB = C * B;
   73|  7.61k|      x_3 = square(DA + CB);
   74|  7.61k|      z_3 = x_1 * square(DA - CB);
   75|  7.61k|      x_2 = AA * BB;
   76|  7.61k|      z_2 = E * (AA + mul_a24(E));
   77|  7.61k|   }
   78|       |
   79|     17|   x_2.ct_cond_swap(swap, x_3);
   80|     17|   z_2.ct_cond_swap(swap, z_3);
   81|       |
   82|     17|   const auto res = x_2 / z_2;
   83|       |
   84|     17|   return Point448(res.to_bytes());
   85|     17|}
x448_internal.cpp:_ZN5Botan12_GLOBAL__N_17get_bitERKNS_6StrongINSt3__15arrayIhLm56EEENS_11ScalarX448_EJEEEm:
   16|  7.61k|uint64_t get_bit(const ScalarX448& scalar, size_t bit) {
   17|  7.61k|   return (scalar[bit / 8] >> (bit % 8)) & 1;
   18|  7.61k|}

_ZN5Botan14EC_AffinePointC2ENSt3__110unique_ptrINS_19EC_AffinePoint_DataENS1_14default_deleteIS3_EEEE:
   16|  12.3k|EC_AffinePoint::EC_AffinePoint(std::unique_ptr<EC_AffinePoint_Data> point) : m_point(std::move(point)) {
   17|  12.3k|   BOTAN_ASSERT_NONNULL(m_point);
  ------------------
  |  |  123|  12.3k|   do {                                                                                   \
  |  |  124|  12.3k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 12.3k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  12.3k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 12.3k]
  |  |  ------------------
  ------------------
   18|  12.3k|}
_ZN5Botan14EC_AffinePointC2ERKS0_:
   20|  3.22k|EC_AffinePoint::EC_AffinePoint(const EC_AffinePoint& other) : m_point(other.inner().clone()) {}
_ZN5Botan14EC_AffinePointC2EOS0_:
   22|  31.0k|EC_AffinePoint::EC_AffinePoint(EC_AffinePoint&& other) noexcept : m_point(std::move(other.m_point)) {}
_ZNK5Botan14EC_AffinePoint15to_legacy_pointEv:
   46|  10.6k|EC_Point EC_AffinePoint::to_legacy_point() const {
   47|  10.6k|   return m_point->to_legacy_point();
   48|  10.6k|}
_ZNK5Botan14EC_AffinePoint19field_element_bytesEv:
  110|  4.20k|size_t EC_AffinePoint::field_element_bytes() const {
  111|  4.20k|   return inner().field_element_bytes();
  112|  4.20k|}
_ZNK5Botan14EC_AffinePoint11is_identityEv:
  114|  16.5k|bool EC_AffinePoint::is_identity() const {
  115|  16.5k|   return inner().is_identity();
  116|  16.5k|}
_ZN5Botan14EC_AffinePointD2Ev:
  148|  46.6k|EC_AffinePoint::~EC_AffinePoint() = default;
_ZN5Botan14EC_AffinePoint11deserializeERKNS_8EC_GroupENSt3__14spanIKhLm18446744073709551615EEE:
  150|  1.61k|std::optional<EC_AffinePoint> EC_AffinePoint::deserialize(const EC_Group& group, std::span<const uint8_t> bytes) {
  151|  1.61k|   if(bytes.empty()) {
  ------------------
  |  Branch (151:7): [True: 0, False: 1.61k]
  ------------------
  152|      0|      return {};
  153|      0|   }
  154|       |
  155|  1.61k|   switch(bytes[0]) {
  156|      0|      case 0x00:
  ------------------
  |  Branch (156:7): [True: 0, False: 1.61k]
  ------------------
  157|       |         // The identity element (see SEC1 section 2.3.4)
  158|       |         // TODO(Botan4) remove this - we should reject the identity encoding
  159|      0|         if(bytes.size() == 1) {
  ------------------
  |  Branch (159:13): [True: 0, False: 0]
  ------------------
  160|      0|            return EC_AffinePoint::identity(group);
  161|      0|         } else {
  162|      0|            return {};
  163|      0|         }
  164|      0|      case 0x02:
  ------------------
  |  Branch (164:7): [True: 0, False: 1.61k]
  ------------------
  165|      0|      case 0x03:
  ------------------
  |  Branch (165:7): [True: 0, False: 1.61k]
  ------------------
  166|      0|         return EC_AffinePoint::deserialize_compressed(group, bytes);
  167|  1.61k|      case 0x04:
  ------------------
  |  Branch (167:7): [True: 1.61k, False: 0]
  ------------------
  168|  1.61k|         return EC_AffinePoint::deserialize_uncompressed(group, bytes);
  169|      0|      case 0x06:
  ------------------
  |  Branch (169:7): [True: 0, False: 1.61k]
  ------------------
  170|      0|      case 0x07: {
  ------------------
  |  Branch (170:7): [True: 0, False: 1.61k]
  ------------------
  171|       |         // The deprecated "hybrid" point format
  172|       |         // TODO(Botan4) remove this
  173|      0|         const bool hdr_y_is_even = bytes[0] == 0x06;
  174|      0|         const bool y_is_even = (bytes.back() & 0x01) == 0;
  175|      0|         const size_t expected_len = 1 + 2 * group.get_p_bytes();
  176|       |
  177|      0|         if(hdr_y_is_even == y_is_even && bytes.size() == expected_len) {
  ------------------
  |  Branch (177:13): [True: 0, False: 0]
  |  Branch (177:43): [True: 0, False: 0]
  ------------------
  178|      0|            std::vector<uint8_t> sec1(bytes.begin(), bytes.end());
  179|      0|            sec1[0] = 0x04;
  180|      0|            return EC_AffinePoint::deserialize_uncompressed(group, sec1);
  181|      0|         } else {
  182|      0|            return {};
  183|      0|         }
  184|      0|      }
  185|      0|      default:
  ------------------
  |  Branch (185:7): [True: 0, False: 1.61k]
  ------------------
  186|      0|         return {};
  187|  1.61k|   }
  188|  1.61k|}
_ZN5Botan14EC_AffinePoint22deserialize_compressedERKNS_8EC_GroupENSt3__14spanIKhLm18446744073709551615EEE:
  191|  1.99k|                                                                     std::span<const uint8_t> bytes) {
  192|  1.99k|   if(auto pt = group._data()->point_deserialize_compressed(bytes)) {
  ------------------
  |  Branch (192:12): [True: 1.61k, False: 386]
  ------------------
  193|  1.61k|      return EC_AffinePoint(std::move(pt));
  194|  1.61k|   } else {
  195|    386|      return {};
  196|    386|   }
  197|  1.99k|}
_ZN5Botan14EC_AffinePoint24deserialize_uncompressedERKNS_8EC_GroupENSt3__14spanIKhLm18446744073709551615EEE:
  200|  10.0k|                                                                       std::span<const uint8_t> bytes) {
  201|  10.0k|   if(auto pt = group._data()->point_deserialize_uncompressed(bytes)) {
  ------------------
  |  Branch (201:12): [True: 8.09k, False: 1.99k]
  ------------------
  202|  8.09k|      return EC_AffinePoint(std::move(pt));
  203|  8.09k|   } else {
  204|  1.99k|      return {};
  205|  1.99k|   }
  206|  10.0k|}
_ZN5Botan14EC_AffinePoint5g_mulERKNS_9EC_ScalarERNS_21RandomNumberGeneratorE:
  208|  2.59k|EC_AffinePoint EC_AffinePoint::g_mul(const EC_Scalar& scalar, RandomNumberGenerator& rng) {
  209|  2.59k|   auto pt = scalar._inner().group()->point_g_mul(scalar.inner(), rng);
  210|  2.59k|   return EC_AffinePoint(std::move(pt));
  211|  2.59k|}
_ZNK5Botan14EC_AffinePoint10mul_x_onlyERKNS_9EC_ScalarERNS_21RandomNumberGeneratorE:
  217|  1.61k|secure_vector<uint8_t> EC_AffinePoint::mul_x_only(const EC_Scalar& scalar, RandomNumberGenerator& rng) const {
  218|  1.61k|   return inner().mul_x_only(scalar._inner(), rng);
  219|  1.61k|}
_ZNK5Botan14EC_AffinePoint9serializeENS_15EC_Point_FormatE:
  244|  4.20k|std::vector<uint8_t> EC_AffinePoint::serialize(EC_Point_Format format) const {
  245|  4.20k|   if(format == EC_Point_Format::Compressed) {
  ------------------
  |  Branch (245:7): [True: 66, False: 4.13k]
  ------------------
  246|     66|      return this->serialize_compressed();
  247|  4.13k|   } else if(format == EC_Point_Format::Uncompressed) {
  ------------------
  |  Branch (247:14): [True: 4.13k, False: 0]
  ------------------
  248|  4.13k|      return this->serialize_uncompressed();
  249|  4.13k|   } else {
  250|       |      // The deprecated "hybrid" point encoding
  251|       |      // TODO(Botan4) Remove this
  252|      0|      auto enc = this->serialize_uncompressed();
  253|      0|      const bool y_is_odd = (enc[enc.size() - 1] & 0x01) == 0x01;
  254|      0|      enc.front() = y_is_odd ? 0x07 : 0x06;
  ------------------
  |  Branch (254:21): [True: 0, False: 0]
  ------------------
  255|      0|      return enc;
  256|      0|   }
  257|  4.20k|}
_ZNK5Botan14EC_AffinePoint23serialize_compressed_toENSt3__14spanIhLm18446744073709551615EEE:
  274|     66|void EC_AffinePoint::serialize_compressed_to(std::span<uint8_t> bytes) const {
  275|     66|   BOTAN_STATE_CHECK(!this->is_identity());
  ------------------
  |  |   51|     66|   do {                                                         \
  |  |   52|     66|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|     66|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 66]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|     66|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 66]
  |  |  ------------------
  ------------------
  276|     66|   m_point->serialize_compressed_to(bytes);
  277|     66|}
_ZNK5Botan14EC_AffinePoint25serialize_uncompressed_toENSt3__14spanIhLm18446744073709551615EEE:
  279|  4.13k|void EC_AffinePoint::serialize_uncompressed_to(std::span<uint8_t> bytes) const {
  280|  4.13k|   BOTAN_STATE_CHECK(!this->is_identity());
  ------------------
  |  |   51|  4.13k|   do {                                                         \
  |  |   52|  4.13k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  4.13k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 4.13k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  4.13k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 4.13k]
  |  |  ------------------
  ------------------
  281|  4.13k|   m_point->serialize_uncompressed_to(bytes);
  282|  4.13k|}

_ZN5Botan8EC_Group13ec_group_dataEv:
  240|  11.0k|EC_Group_Data_Map& EC_Group::ec_group_data() {
  241|       |   /*
  242|       |   * This exists purely to ensure the allocator is constructed before g_ec_data,
  243|       |   * which ensures that its destructor runs after ~g_ec_data is complete.
  244|       |   */
  245|       |
  246|  11.0k|   static const Allocator_Initializer g_init_allocator;
  247|  11.0k|   static EC_Group_Data_Map g_ec_data;
  248|  11.0k|   return g_ec_data;
  249|  11.0k|}
_ZN5Botan8EC_Group18load_EC_group_infoEPKcS2_S2_S2_S2_S2_RKNS_3OIDE:
  263|      6|                                                            const OID& oid) {
  264|      6|   BOTAN_ARG_CHECK(oid.has_value(), "EC_Group::load_EC_group_info OID must be set");
  ------------------
  |  |   35|      6|   do {                                                          \
  |  |   36|      6|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|      6|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 6]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|      6|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 6]
  |  |  ------------------
  ------------------
  265|       |
  266|      6|   const BigInt p(p_str);
  267|      6|   const BigInt a(a_str);
  268|      6|   const BigInt b(b_str);
  269|      6|   const BigInt g_x(g_x_str);
  270|      6|   const BigInt g_y(g_y_str);
  271|      6|   const BigInt order(order_str);
  272|      6|   const BigInt cofactor(1);  // implicit
  273|       |
  274|      6|   return EC_Group_Data::create(p, a, b, g_x, g_y, order, cofactor, oid, EC_Group_Source::Builtin);
  275|      6|}
_ZN5Botan8EC_Group19DER_decode_EC_groupENSt3__14spanIKhLm18446744073709551615EEENS_15EC_Group_SourceE:
  279|  6.48k|                                                                              EC_Group_Source source) {
  280|  6.48k|   BER_Decoder dec(der, BER_Decoder::Limits::DER());
  281|       |
  282|  6.48k|   auto next_obj_type = dec.peek_next_object().type_tag();
  283|       |
  284|  6.48k|   if(next_obj_type == ASN1_Type::ObjectId) {
  ------------------
  |  Branch (284:7): [True: 6.48k, False: 0]
  ------------------
  285|  6.48k|      OID oid;
  286|  6.48k|      dec.decode(oid).verify_end();
  287|       |
  288|  6.48k|      auto data = ec_group_data().lookup(oid);
  289|  6.48k|      if(!data) {
  ------------------
  |  Branch (289:10): [True: 0, False: 6.48k]
  ------------------
  290|      0|         throw Decoding_Error(fmt("Unknown namedCurve OID '{}'", oid.to_string()));
  291|      0|      }
  292|       |
  293|  6.48k|      return std::make_pair(data, false);
  294|  6.48k|   } else if(next_obj_type == ASN1_Type::Sequence) {
  ------------------
  |  Branch (294:14): [True: 0, False: 0]
  ------------------
  295|      0|      BigInt p;
  296|      0|      BigInt a;
  297|      0|      BigInt b;
  298|      0|      BigInt order;
  299|      0|      BigInt cofactor;
  300|      0|      std::vector<uint8_t> base_pt;
  301|      0|      std::vector<uint8_t> seed;
  302|       |
  303|      0|      dec.start_sequence()
  304|      0|         .decode_and_check<size_t>(1, "Unknown ECC param version code")
  305|      0|         .start_sequence()
  306|      0|         .decode_and_check(OID({1, 2, 840, 10045, 1, 1}), "Only prime ECC fields supported")
  307|      0|         .decode(p)
  308|      0|         .end_cons()
  309|      0|         .start_sequence()
  310|      0|         .decode_octet_string_bigint(a)
  311|      0|         .decode_octet_string_bigint(b)
  312|      0|         .decode_optional_string(seed, ASN1_Type::BitString, ASN1_Type::BitString, ASN1_Class::Universal)
  313|      0|         .end_cons()
  314|      0|         .decode(base_pt, ASN1_Type::OctetString)
  315|      0|         .decode(order)
  316|      0|         .decode(cofactor)
  317|      0|         .end_cons()
  318|      0|         .verify_end();
  319|       |
  320|       |      // TODO(Botan4) Require cofactor == 1
  321|      0|      if(cofactor <= 0 || cofactor >= 16) {
  ------------------
  |  Branch (321:10): [True: 0, False: 0]
  |  Branch (321:27): [True: 0, False: 0]
  ------------------
  322|      0|         throw Decoding_Error("Invalid ECC cofactor parameter");
  323|      0|      }
  324|       |
  325|      0|      if(p.bits() < 112 || p.bits() > 521 || p.signum() < 0) {
  ------------------
  |  Branch (325:10): [True: 0, False: 0]
  |  Branch (325:28): [True: 0, False: 0]
  |  Branch (325:46): [True: 0, False: 0]
  ------------------
  326|      0|         throw Decoding_Error("ECC p parameter is invalid size");
  327|      0|      }
  328|       |
  329|       |      // A can be zero
  330|      0|      if(a.signum() < 0 || a >= p) {
  ------------------
  |  Branch (330:10): [True: 0, False: 0]
  |  Branch (330:28): [True: 0, False: 0]
  ------------------
  331|      0|         throw Decoding_Error("Invalid ECC a parameter");
  332|      0|      }
  333|       |
  334|       |      // B must be > 0
  335|       |      //
  336|       |      // Technically this is not true but we have historically rejected this and
  337|       |      // nobody has noted it as an issue, so it is retained.
  338|      0|      if(b.signum() <= 0 || b >= p) {
  ------------------
  |  Branch (338:10): [True: 0, False: 0]
  |  Branch (338:29): [True: 0, False: 0]
  ------------------
  339|      0|         throw Decoding_Error("Invalid ECC b parameter");
  340|      0|      }
  341|       |
  342|      0|      if(order.signum() <= 0 || order >= 2 * p) {
  ------------------
  |  Branch (342:10): [True: 0, False: 0]
  |  Branch (342:10): [True: 0, False: 0]
  |  Branch (342:33): [True: 0, False: 0]
  ------------------
  343|      0|         throw Decoding_Error("Invalid ECC group order");
  344|      0|      }
  345|       |
  346|      0|      if(p == order) {
  ------------------
  |  Branch (346:10): [True: 0, False: 0]
  ------------------
  347|      0|         throw Decoding_Error("Anomalous elliptic curves are not supported");
  348|      0|      }
  349|       |
  350|      0|      if(auto data = ec_group_data().lookup_from_params(p, a, b, base_pt, order, cofactor)) {
  ------------------
  |  Branch (350:15): [True: 0, False: 0]
  ------------------
  351|      0|         return std::make_pair(data, true);
  352|      0|      }
  353|       |
  354|       |      /*
  355|       |      TODO(Botan4) the remaining code is used only to handle the case of decoding an EC_Group
  356|       |      which is neither a builtin group nor a group that was registered by the application.
  357|       |      It can all be removed and replaced with a throw
  358|       |      */
  359|       |
  360|      0|      auto mod_p = Barrett_Reduction::for_public_modulus(p);
  361|      0|      if(!is_bailie_psw_probable_prime(p, mod_p)) {
  ------------------
  |  Branch (361:10): [True: 0, False: 0]
  ------------------
  362|      0|         throw Decoding_Error("ECC p parameter is not a prime");
  363|      0|      }
  364|       |
  365|      0|      auto mod_order = Barrett_Reduction::for_public_modulus(order);
  366|      0|      if(!is_bailie_psw_probable_prime(order, mod_order)) {
  ------------------
  |  Branch (366:10): [True: 0, False: 0]
  ------------------
  367|      0|         throw Decoding_Error("Invalid ECC order parameter");
  368|      0|      }
  369|       |
  370|      0|      if((p - cofactor * order).abs().bits() > (p.bits() / 2) + 1) {
  ------------------
  |  Branch (370:10): [True: 0, False: 0]
  ------------------
  371|      0|         throw Decoding_Error("Invalid ECC Hasse bound");
  372|      0|      }
  373|       |
  374|      0|      const auto discriminant = mod_p.reduce(mod_p.multiply(BigInt::from_s32(4), mod_p.cube(a)) +
  375|      0|                                             mod_p.multiply(BigInt::from_s32(27), mod_p.square(b)));
  376|      0|      if(discriminant == 0) {
  ------------------
  |  Branch (376:10): [True: 0, False: 0]
  ------------------
  377|      0|         throw Decoding_Error("Invalid ECC curve discriminant");
  378|      0|      }
  379|       |
  380|      0|      const size_t p_bytes = p.bytes();
  381|      0|      if(base_pt.size() != 1 + p_bytes && base_pt.size() != 1 + 2 * p_bytes) {
  ------------------
  |  Branch (381:10): [True: 0, False: 0]
  |  Branch (381:43): [True: 0, False: 0]
  ------------------
  382|      0|         throw Decoding_Error("Invalid ECC base point encoding");
  383|      0|      }
  384|       |
  385|      0|      auto [g_x, g_y] = [&]() {
  386|      0|         const uint8_t hdr = base_pt[0];
  387|       |
  388|      0|         if(hdr == 0x04 && base_pt.size() == 1 + 2 * p_bytes) {
  389|      0|            const BigInt x = BigInt::from_bytes(std::span{base_pt}.subspan(1, p_bytes));
  390|      0|            const BigInt y = BigInt::from_bytes(std::span{base_pt}.subspan(1 + p_bytes, p_bytes));
  391|       |
  392|      0|            if(x < p && y < p) {
  393|      0|               return std::make_pair(x, y);
  394|      0|            }
  395|      0|         } else if((hdr == 0x02 || hdr == 0x03) && base_pt.size() == 1 + p_bytes) {
  396|       |            // TODO(Botan4) remove this branch; we won't support compressed points
  397|      0|            const BigInt x = BigInt::from_bytes(std::span{base_pt}.subspan(1, p_bytes));
  398|      0|            BigInt y = sqrt_modulo_prime(((x * x + a) * x + b) % p, p);
  399|       |
  400|      0|            if(x < p && y >= 0) {
  401|      0|               const bool y_mod_2 = (hdr & 0x01) == 1;
  402|      0|               if(y.get_bit(0) != y_mod_2) {
  403|      0|                  y = p - y;
  404|      0|               }
  405|       |
  406|      0|               return std::make_pair(x, y);
  407|      0|            }
  408|      0|         }
  409|       |
  410|      0|         throw Decoding_Error("Invalid ECC base point encoding");
  411|      0|      }();
  412|       |
  413|       |      // TODO(Botan4) we can remove this check since we'll only accept pre-registered groups
  414|      0|      auto y2 = mod_p.square(g_y);
  415|      0|      auto x3_ax_b = mod_p.reduce(mod_p.cube(g_x) + mod_p.multiply(a, g_x) + b);
  416|      0|      if(y2 != x3_ax_b) {
  ------------------
  |  Branch (416:10): [True: 0, False: 0]
  ------------------
  417|      0|         throw Decoding_Error("Invalid ECC base point");
  418|      0|      }
  419|       |
  420|       |      /*
  421|       |      * Create the group data without registering it in the global map.
  422|       |      *
  423|       |      * Applications that need persistent custom groups should register them
  424|       |      * via the relevant EC_Group constructor
  425|       |      */
  426|      0|      auto data = EC_Group_Data::create(p, a, b, g_x, g_y, order, cofactor, OID(), source);
  427|       |
  428|      0|      if(!EC_Group::verify_generator_order(data)) {
  ------------------
  |  Branch (428:10): [True: 0, False: 0]
  ------------------
  429|      0|         throw Decoding_Error("ECC generator does not have the claimed order");
  430|      0|      }
  431|       |
  432|      0|      return std::make_pair(data, true);
  433|      0|   } else if(next_obj_type == ASN1_Type::Null) {
  ------------------
  |  Branch (433:14): [True: 0, False: 0]
  ------------------
  434|      0|      throw Decoding_Error("Decoding ImplicitCA ECC parameters is not supported");
  435|      0|   } else {
  436|      0|      throw Decoding_Error(
  437|      0|         fmt("Unexpected tag {} while decoding ECC domain params", asn1_tag_to_string(next_obj_type)));
  438|      0|   }
  439|  6.48k|}
_ZN5Botan8EC_GroupD2Ev:
  443|  52.2k|EC_Group::~EC_Group() = default;
_ZN5Botan8EC_GroupC2ERKS0_:
  445|  21.3k|EC_Group::EC_Group(const EC_Group&) = default;
_ZN5Botan8EC_GroupC2EONSt3__110shared_ptrINS_13EC_Group_DataEEE:
  450|  4.59k|EC_Group::EC_Group(std::shared_ptr<EC_Group_Data>&& data) : m_data(std::move(data)) {}
_ZN5Botan8EC_Group9from_nameENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  530|  4.59k|EC_Group EC_Group::from_name(std::string_view name) {
  531|  4.59k|   std::shared_ptr<EC_Group_Data> data;
  532|       |
  533|  4.59k|   if(auto oid = OID::from_name(name)) {
  ------------------
  |  Branch (533:12): [True: 4.59k, False: 0]
  ------------------
  534|  4.59k|      data = ec_group_data().lookup(oid.value());
  535|  4.59k|   }
  536|       |
  537|  4.59k|   if(!data) {
  ------------------
  |  Branch (537:7): [True: 0, False: 4.59k]
  ------------------
  538|      0|      throw Invalid_Argument(fmt("Unknown EC_Group '{}'", name));
  539|      0|   }
  540|       |
  541|  4.59k|   return EC_Group(std::move(data));
  542|  4.59k|}
_ZN5Botan8EC_GroupC2ENSt3__14spanIKhLm18446744073709551615EEE:
  706|  6.48k|EC_Group::EC_Group(std::span<const uint8_t> der) {
  707|  6.48k|   auto data = DER_decode_EC_group(der, EC_Group_Source::ExternalSource);
  708|  6.48k|   m_data = data.first;
  709|  6.48k|   m_explicit_encoding = data.second;
  710|  6.48k|}
_ZNK5Botan8EC_Group4dataEv:
  717|  22.0k|const EC_Group_Data& EC_Group::data() const {
  718|  22.0k|   if(m_data == nullptr) {
  ------------------
  |  Branch (718:7): [True: 0, False: 22.0k]
  ------------------
  719|      0|      throw Invalid_State("EC_Group uninitialized");
  720|      0|   }
  721|  22.0k|   return *m_data;
  722|  22.0k|}
_ZNK5Botan8EC_Group10get_p_bitsEv:
  724|  1.61k|size_t EC_Group::get_p_bits() const {
  725|  1.61k|   return data().p_bits();
  726|  1.61k|}
_ZNK5Botan8EC_Group15get_order_bytesEv:
  736|  6.48k|size_t EC_Group::get_order_bytes() const {
  737|  6.48k|   return data().order_bytes();
  738|  6.48k|}
_ZNK5Botan8EC_Group12has_cofactorEv:
  804|  3.22k|bool EC_Group::has_cofactor() const {
  805|  3.22k|   return data().has_cofactor();
  806|  3.22k|}
_ZNK5Botan8EC_Group13get_curve_oidEv:
  808|  10.6k|const OID& EC_Group::get_curve_oid() const {
  809|  10.6k|   return data().oid();
  810|  10.6k|}
_ZN5Botan17EC_Group_Data_Map6lookupERKNS_3OIDE:
   54|  11.0k|      std::shared_ptr<EC_Group_Data> lookup(const OID& oid) {
   55|  11.0k|         const lock_guard_type<mutex_type> lock(m_mutex);
   56|       |
   57|  23.1k|         for(auto i : m_registered_curves) {
  ------------------
  |  Branch (57:21): [True: 23.1k, False: 6]
  ------------------
   58|  23.1k|            if(i->oid() == oid) {
  ------------------
  |  Branch (58:16): [True: 11.0k, False: 12.0k]
  ------------------
   59|  11.0k|               return i;
   60|  11.0k|            }
   61|  23.1k|         }
   62|       |
   63|       |         // Not found, check hardcoded data
   64|      6|         std::shared_ptr<EC_Group_Data> data = EC_Group::EC_group_info(oid);
   65|       |
   66|      6|         if(data) {
  ------------------
  |  Branch (66:13): [True: 6, False: 0]
  ------------------
   67|       |            // The requested OID may be an alias for a curve whose canonical OID differs
   68|       |            // TODO(Botan4) remove this once we require exactly one canonical OID per curve
   69|      6|            if(data->oid() != oid) {
  ------------------
  |  Branch (69:16): [True: 0, False: 6]
  ------------------
   70|      0|               for(const auto& i : m_registered_curves) {
  ------------------
  |  Branch (70:34): [True: 0, False: 0]
  ------------------
   71|      0|                  if(i->oid() == data->oid()) {
  ------------------
  |  Branch (71:22): [True: 0, False: 0]
  ------------------
   72|      0|                     return i;
   73|      0|                  }
   74|      0|               }
   75|      0|            }
   76|       |
   77|      6|            m_registered_curves.push_back(data);
   78|      6|            return data;
   79|      6|         }
   80|       |
   81|       |         // Nope, unknown curve
   82|      0|         return std::shared_ptr<EC_Group_Data>();
   83|      6|      }

_ZN5Botan13EC_Group_DataD2Ev:
   28|      6|EC_Group_Data::~EC_Group_Data() = default;
_ZN5Botan13EC_Group_DataC2ERKNS_6BigIntES3_S3_S3_S3_S3_S3_RKNS_3OIDENS_15EC_Group_SourceE:
   40|      6|      m_p(p),
   41|      6|      m_a(a),
   42|      6|      m_b(b),
   43|      6|      m_g_x(g_x),
   44|      6|      m_g_y(g_y),
   45|      6|      m_order(order),
   46|      6|      m_cofactor(cofactor),
   47|       |#if defined(BOTAN_HAS_LEGACY_EC_POINT)
   48|      6|      m_mod_field(Barrett_Reduction::for_public_modulus(p)),
   49|      6|      m_mod_order(Barrett_Reduction::for_public_modulus(order)),
   50|      6|      m_monty(m_p, m_mod_field),
   51|       |#endif
   52|      6|      m_oid(oid),
   53|      6|      m_p_words(p.sig_words()),
   54|      6|      m_p_bits(p.bits()),
   55|      6|      m_order_bits(order.bits()),
   56|      6|      m_order_bytes((m_order_bits + 7) / 8),
   57|      6|      m_a_is_minus_3(a == p - 3),
   58|      6|      m_a_is_zero(a.is_zero()),
   59|      6|      m_has_cofactor(m_cofactor != 1),
   60|      6|      m_order_is_less_than_p(m_order < p),
   61|      6|      m_source(source) {
   62|       |   // Verify the generator (x, y) satisfies y^2 = x^3 + a*x + b (mod p)
   63|      6|   auto mod_p = Barrett_Reduction::for_public_modulus(p);
   64|      6|   const BigInt y2 = mod_p.square(g_y);
   65|      6|   const BigInt x3_ax_b = mod_p.reduce(mod_p.cube(g_x) + mod_p.multiply(a, g_x) + b);
   66|      6|   if(y2 != x3_ax_b) {
  ------------------
  |  Branch (66:7): [True: 0, False: 6]
  ------------------
   67|      0|      throw Invalid_Argument("EC_Group generator is not on the curve");
   68|      0|   }
   69|       |
   70|       |   // TODO(Botan4) we can assume/assert the OID is set
   71|      6|   if(!m_oid.empty()) {
  ------------------
  |  Branch (71:7): [True: 6, False: 0]
  ------------------
   72|      6|      DER_Encoder der(m_der_named_curve);
   73|      6|      der.encode(m_oid);
   74|       |
   75|      6|      if(const auto name = m_oid.registered_name()) {
  ------------------
  |  Branch (75:21): [True: 6, False: 0]
  ------------------
   76|      6|         if(auto pcurve = PCurve::PrimeOrderCurve::for_named_curve(*name)) {
  ------------------
  |  Branch (76:18): [True: 6, False: 0]
  ------------------
   77|      6|            const bool same_params = [&]() {
   78|      6|               if(m_source == EC_Group_Source::Builtin) {
   79|      6|                  return true;
   80|      6|               }
   81|       |
   82|      6|               if(const auto group_oid = OID::from_name(*name)) {
   83|      6|                  if(const auto group_info = EC_Group::EC_group_info(*group_oid)) {
   84|      6|                     return group_info->params_match(p, a, b, g_x, g_y, order, cofactor);
   85|      6|                  }
   86|      6|               }
   87|       |
   88|      6|               return false;
   89|      6|            }();
   90|       |
   91|      6|            if(same_params) {
  ------------------
  |  Branch (91:16): [True: 6, False: 0]
  ------------------
   92|      6|               m_pcurve = std::move(pcurve);
   93|      6|            }
   94|      6|         }
   95|      6|      }
   96|      6|      if(m_pcurve) {
  ------------------
  |  Branch (96:10): [True: 6, False: 0]
  ------------------
   97|      6|         m_engine = EC_Group_Engine::Optimized;
   98|      6|      }
   99|      6|   }
  100|       |
  101|       |   // Try a generic pcurves instance
  102|      6|   if(!m_pcurve && !m_has_cofactor) {
  ------------------
  |  Branch (102:7): [True: 0, False: 6]
  |  Branch (102:20): [True: 0, False: 0]
  ------------------
  103|      0|      m_pcurve = PCurve::PrimeOrderCurve::from_params(p, a, b, g_x, g_y, order);
  104|      0|      if(m_pcurve) {
  ------------------
  |  Branch (104:10): [True: 0, False: 0]
  ------------------
  105|      0|         m_engine = EC_Group_Engine::Generic;
  106|      0|      }
  107|       |      // possibly still null here, if parameters unsuitable or if the
  108|       |      // pcurves_generic module wasn't included in the build
  109|      0|   }
  110|       |
  111|      6|#if defined(BOTAN_HAS_LEGACY_EC_POINT)
  112|      6|   secure_vector<word> ws;
  113|      6|   m_a_r = m_monty.mul(a, m_monty.R2(), ws);
  114|      6|   m_b_r = m_monty.mul(b, m_monty.R2(), ws);
  115|      6|   if(!m_pcurve) {
  ------------------
  |  Branch (115:7): [True: 0, False: 6]
  ------------------
  116|      0|      m_engine = EC_Group_Engine::Legacy;
  117|      0|   }
  118|       |#else
  119|       |   if(!m_pcurve) {
  120|       |      if(m_oid.empty()) {
  121|       |         throw Not_Implemented("EC_Group this group is not supported in this build configuration");
  122|       |      } else {
  123|       |         throw Not_Implemented(
  124|       |            fmt("EC_Group the group {} is not supported in this build configuration", oid.to_string()));
  125|       |      }
  126|       |   }
  127|       |#endif
  128|      6|}
_ZN5Botan13EC_Group_Data6createERKNS_6BigIntES3_S3_S3_S3_S3_S3_RKNS_3OIDENS_15EC_Group_SourceE:
  138|      6|                                                     EC_Group_Source source) {
  139|      6|   auto group = std::make_shared<EC_Group_Data>(p, a, b, g_x, g_y, order, cofactor, oid, source);
  140|       |
  141|      6|#if defined(BOTAN_HAS_LEGACY_EC_POINT)
  142|      6|   group->m_curve = CurveGFp(group.get());
  143|      6|   group->m_base_point = EC_Point(group->m_curve, g_x, g_y);
  144|      6|   if(!group->m_pcurve) {
  ------------------
  |  Branch (144:7): [True: 0, False: 6]
  ------------------
  145|      0|      group->m_base_mult = std::make_unique<EC_Point_Base_Point_Precompute>(group->m_base_point, group->m_mod_order);
  146|      0|   }
  147|      6|#endif
  148|       |
  149|      6|   return group;
  150|      6|}
_ZNK5Botan13EC_Group_Data13scalar_randomERNS_21RandomNumberGeneratorE:
  310|  2.59k|std::unique_ptr<EC_Scalar_Data> EC_Group_Data::scalar_random(RandomNumberGenerator& rng) const {
  311|  2.59k|   if(m_pcurve) {
  ------------------
  |  Branch (311:7): [True: 2.59k, False: 0]
  ------------------
  312|  2.59k|      return std::make_unique<EC_Scalar_Data_PC>(shared_from_this(), m_pcurve->random_scalar(rng));
  313|  2.59k|   } else {
  314|      0|#if defined(BOTAN_HAS_LEGACY_EC_POINT)
  315|      0|      return std::make_unique<EC_Scalar_Data_BN>(shared_from_this(),
  316|      0|                                                 BigInt::random_integer(rng, BigInt::one(), m_order));
  317|       |#else
  318|       |      throw Not_Implemented("Legacy EC interfaces disabled in this build configuration");
  319|       |#endif
  320|      0|   }
  321|  2.59k|}
_ZNK5Botan13EC_Group_Data18scalar_deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  375|  6.48k|std::unique_ptr<EC_Scalar_Data> EC_Group_Data::scalar_deserialize(std::span<const uint8_t> bytes) const {
  376|  6.48k|   if(bytes.size() != m_order_bytes) {
  ------------------
  |  Branch (376:7): [True: 0, False: 6.48k]
  ------------------
  377|      0|      return nullptr;
  378|      0|   }
  379|       |
  380|  6.48k|   if(m_pcurve) {
  ------------------
  |  Branch (380:7): [True: 6.48k, False: 0]
  ------------------
  381|  6.48k|      if(auto s = m_pcurve->deserialize_scalar(bytes)) {
  ------------------
  |  Branch (381:15): [True: 6.48k, False: 0]
  ------------------
  382|  6.48k|         return std::make_unique<EC_Scalar_Data_PC>(shared_from_this(), *s);
  383|  6.48k|      } else {
  384|      0|         return nullptr;
  385|      0|      }
  386|  6.48k|   } else {
  387|      0|#if defined(BOTAN_HAS_LEGACY_EC_POINT)
  388|      0|      BigInt r(bytes);
  389|       |
  390|      0|      if(r.is_zero() || r >= m_order) {
  ------------------
  |  Branch (390:10): [True: 0, False: 0]
  |  Branch (390:25): [True: 0, False: 0]
  ------------------
  391|      0|         return nullptr;
  392|      0|      }
  393|       |
  394|      0|      return std::make_unique<EC_Scalar_Data_BN>(shared_from_this(), std::move(r));
  395|       |#else
  396|       |      throw Not_Implemented("Legacy EC interfaces disabled in this build configuration");
  397|       |#endif
  398|      0|   }
  399|  6.48k|}
_ZNK5Botan13EC_Group_Data30point_deserialize_uncompressedENSt3__14spanIKhLm18446744073709551615EEE:
  402|  10.0k|   std::span<const uint8_t> bytes) const {
  403|  10.0k|   if(bytes.size() != 1 + 2 * p_bytes() || bytes[0] != 0x04) {
  ------------------
  |  Branch (403:7): [True: 1.79k, False: 8.29k]
  |  Branch (403:44): [True: 3, False: 8.29k]
  ------------------
  404|  1.79k|      return {};
  405|  1.79k|   }
  406|       |
  407|  8.29k|   if(m_pcurve) {
  ------------------
  |  Branch (407:7): [True: 8.29k, False: 0]
  ------------------
  408|  8.29k|      if(auto pt = m_pcurve->deserialize_point_uncompressed(bytes)) {
  ------------------
  |  Branch (408:15): [True: 8.09k, False: 200]
  ------------------
  409|  8.09k|         return std::make_unique<EC_AffinePoint_Data_PC>(shared_from_this(), std::move(*pt));
  410|  8.09k|      } else {
  411|    200|         return {};
  412|    200|      }
  413|  8.29k|   } else {
  414|      0|#if defined(BOTAN_HAS_LEGACY_EC_POINT)
  415|      0|      try {
  416|      0|         auto pt = Botan::OS2ECP(bytes, m_curve);
  417|      0|         return std::make_unique<EC_AffinePoint_Data_BN>(shared_from_this(), std::move(pt));
  418|      0|      } catch(...) {
  419|      0|         return {};
  420|      0|      }
  421|       |#else
  422|       |      throw Not_Implemented("Legacy EC interfaces disabled in this build configuration");
  423|       |#endif
  424|      0|   }
  425|  8.29k|}
_ZNK5Botan13EC_Group_Data28point_deserialize_compressedENSt3__14spanIKhLm18446744073709551615EEE:
  427|  1.99k|std::unique_ptr<EC_AffinePoint_Data> EC_Group_Data::point_deserialize_compressed(std::span<const uint8_t> bytes) const {
  428|  1.99k|   if(bytes.size() != 1 + p_bytes() || (bytes[0] != 0x02 && bytes[0] != 0x03)) {
  ------------------
  |  Branch (428:7): [True: 229, False: 1.76k]
  |  Branch (428:41): [True: 1.02k, False: 741]
  |  Branch (428:61): [True: 5, False: 1.02k]
  ------------------
  429|    234|      return {};
  430|    234|   }
  431|       |
  432|  1.76k|   if(m_pcurve) {
  ------------------
  |  Branch (432:7): [True: 1.76k, False: 0]
  ------------------
  433|  1.76k|      if(auto pt = m_pcurve->deserialize_point_compressed(bytes)) {
  ------------------
  |  Branch (433:15): [True: 1.61k, False: 152]
  ------------------
  434|  1.61k|         return std::make_unique<EC_AffinePoint_Data_PC>(shared_from_this(), std::move(*pt));
  435|  1.61k|      } else {
  436|    152|         return {};
  437|    152|      }
  438|  1.76k|   } else {
  439|      0|#if defined(BOTAN_HAS_LEGACY_EC_POINT)
  440|      0|      try {
  441|      0|         auto pt = Botan::OS2ECP(bytes, m_curve);
  442|      0|         return std::make_unique<EC_AffinePoint_Data_BN>(shared_from_this(), std::move(pt));
  443|      0|      } catch(...) {
  444|      0|         return {};
  445|      0|      }
  446|       |#else
  447|       |      throw Not_Implemented("Legacy EC interfaces disabled in this build configuration");
  448|       |#endif
  449|      0|   }
  450|  1.76k|}
_ZNK5Botan13EC_Group_Data11point_g_mulERKNS_14EC_Scalar_DataERNS_21RandomNumberGeneratorE:
  556|  2.59k|                                                                RandomNumberGenerator& rng) const {
  557|  2.59k|   if(m_pcurve) {
  ------------------
  |  Branch (557:7): [True: 2.59k, False: 0]
  ------------------
  558|  2.59k|      const auto& k = EC_Scalar_Data_PC::checked_ref(scalar);
  559|  2.59k|      auto pt = m_pcurve->point_to_affine(m_pcurve->mul_by_g(k.value(), rng));
  560|  2.59k|      return std::make_unique<EC_AffinePoint_Data_PC>(shared_from_this(), std::move(pt));
  561|  2.59k|   } else {
  562|      0|#if defined(BOTAN_HAS_LEGACY_EC_POINT)
  563|      0|      const auto& group = scalar.group();
  564|      0|      const auto& bn = EC_Scalar_Data_BN::checked_ref(scalar);
  565|       |
  566|      0|      BOTAN_STATE_CHECK(group->m_base_mult != nullptr);
  ------------------
  |  |   51|      0|   do {                                                         \
  |  |   52|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|      0|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  567|      0|      std::vector<BigInt> ws;
  568|      0|      auto pt = group->m_base_mult->mul(bn.value(), rng, m_order, ws);
  569|      0|      return std::make_unique<EC_AffinePoint_Data_BN>(shared_from_this(), std::move(pt));
  570|       |#else
  571|       |      throw Not_Implemented("Legacy EC interfaces disabled in this build configuration");
  572|       |#endif
  573|      0|   }
  574|  2.59k|}
ec_inner_data.cpp:_ZZN5Botan13EC_Group_DataC1ERKNS_6BigIntES3_S3_S3_S3_S3_S3_RKNS_3OIDENS_15EC_Group_SourceEENK3$_0clEv:
   77|      6|            const bool same_params = [&]() {
   78|      6|               if(m_source == EC_Group_Source::Builtin) {
  ------------------
  |  Branch (78:19): [True: 6, False: 0]
  ------------------
   79|      6|                  return true;
   80|      6|               }
   81|       |
   82|      0|               if(const auto group_oid = OID::from_name(*name)) {
  ------------------
  |  Branch (82:30): [True: 0, False: 0]
  ------------------
   83|      0|                  if(const auto group_info = EC_Group::EC_group_info(*group_oid)) {
  ------------------
  |  Branch (83:33): [True: 0, False: 0]
  ------------------
   84|      0|                     return group_info->params_match(p, a, b, g_x, g_y, order, cofactor);
   85|      0|                  }
   86|      0|               }
   87|       |
   88|      0|               return false;
   89|      0|            }();

_ZN5Botan17EC_Scalar_Data_PC11checked_refERKNS_14EC_Scalar_DataE:
   14|  4.20k|const EC_Scalar_Data_PC& EC_Scalar_Data_PC::checked_ref(const EC_Scalar_Data& data) {
   15|  4.20k|   const auto* p = dynamic_cast<const EC_Scalar_Data_PC*>(&data);
   16|  4.20k|   if(p == nullptr) {
  ------------------
  |  Branch (16:7): [True: 0, False: 4.20k]
  ------------------
   17|      0|      throw Invalid_State("Failed conversion to EC_Scalar_Data_PC");
   18|      0|   }
   19|  4.20k|   return *p;
   20|  4.20k|}
_ZNK5Botan17EC_Scalar_Data_PC5groupEv:
   22|  30.4k|const std::shared_ptr<const EC_Group_Data>& EC_Scalar_Data_PC::group() const {
   23|  30.4k|   return m_group;
   24|  30.4k|}
_ZNK5Botan17EC_Scalar_Data_PC5bytesEv:
   26|  9.07k|size_t EC_Scalar_Data_PC::bytes() const {
   27|  9.07k|   return this->group()->order_bytes();
   28|  9.07k|}
_ZNK5Botan17EC_Scalar_Data_PC5cloneEv:
   30|  8.09k|std::unique_ptr<EC_Scalar_Data> EC_Scalar_Data_PC::clone() const {
   31|  8.09k|   return std::make_unique<EC_Scalar_Data_PC>(this->group(), this->value());
   32|  8.09k|}
_ZNK5Botan17EC_Scalar_Data_PC7is_zeroEv:
   34|  9.07k|bool EC_Scalar_Data_PC::is_zero() const {
   35|  9.07k|   const auto& pcurve = this->group()->pcurve();
   36|  9.07k|   return pcurve.scalar_is_zero(m_v);
   37|  9.07k|}
_ZN5Botan17EC_Scalar_Data_PC7zeroizeEv:
   49|  9.07k|void EC_Scalar_Data_PC::zeroize() {
   50|  9.07k|   m_v._zeroize();
   51|  9.07k|}
_ZNK5Botan17EC_Scalar_Data_PC12serialize_toENSt3__14spanIhLm18446744073709551615EEE:
   82|  9.07k|void EC_Scalar_Data_PC::serialize_to(std::span<uint8_t> bytes) const {
   83|  9.07k|   BOTAN_ARG_CHECK(bytes.size() == m_group->order_bytes(), "Invalid output length");
  ------------------
  |  |   35|  9.07k|   do {                                                          \
  |  |   36|  9.07k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  9.07k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 9.07k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  9.07k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 9.07k]
  |  |  ------------------
  ------------------
   84|  9.07k|   m_group->pcurve().serialize_scalar(bytes, m_v);
   85|  9.07k|}
_ZN5Botan22EC_AffinePoint_Data_PCC2ENSt3__110shared_ptrIKNS_13EC_Group_DataEEENS_6PCurve15PrimeOrderCurve11AffinePointE:
   89|  15.5k|      m_group(std::move(group)), m_pt(std::move(pt)) {
   90|  15.5k|   const auto& pcurve = m_group->pcurve();
   91|       |
   92|  15.5k|   if(!pcurve.affine_point_is_identity(m_pt)) {
  ------------------
  |  Branch (92:7): [True: 15.5k, False: 0]
  ------------------
   93|  15.5k|      m_xy.resize(1 + 2 * field_element_bytes());
   94|  15.5k|      pcurve.serialize_point(m_xy, m_pt);
   95|  15.5k|   }
   96|  15.5k|}
_ZNK5Botan22EC_AffinePoint_Data_PC5cloneEv:
  106|  3.22k|std::unique_ptr<EC_AffinePoint_Data> EC_AffinePoint_Data_PC::clone() const {
  107|  3.22k|   return std::make_unique<EC_AffinePoint_Data_PC>(m_group, m_pt);
  108|  3.22k|}
_ZNK5Botan22EC_AffinePoint_Data_PC10mul_x_onlyERKNS_14EC_Scalar_DataERNS_21RandomNumberGeneratorE:
  124|  1.61k|                                                          RandomNumberGenerator& rng) const {
  125|  1.61k|   BOTAN_ARG_CHECK(scalar.group() == m_group, "Curve mismatch");
  ------------------
  |  |   35|  1.61k|   do {                                                          \
  |  |   36|  1.61k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  1.61k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 1.61k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.61k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.61k]
  |  |  ------------------
  ------------------
  126|  1.61k|   const auto& k = EC_Scalar_Data_PC::checked_ref(scalar).value();
  127|  1.61k|   return m_group->pcurve().mul_x_only(m_pt, k, rng);
  128|  1.61k|}
_ZNK5Botan22EC_AffinePoint_Data_PC19field_element_bytesEv:
  130|  34.6k|size_t EC_AffinePoint_Data_PC::field_element_bytes() const {
  131|  34.6k|   return m_group->pcurve().field_element_bytes();
  132|  34.6k|}
_ZNK5Botan22EC_AffinePoint_Data_PC11is_identityEv:
  134|  31.4k|bool EC_AffinePoint_Data_PC::is_identity() const {
  135|  31.4k|   return m_xy.empty();
  136|  31.4k|}
_ZNK5Botan22EC_AffinePoint_Data_PC14serialize_x_toENSt3__14spanIhLm18446744073709551615EEE:
  138|     66|void EC_AffinePoint_Data_PC::serialize_x_to(std::span<uint8_t> bytes) const {
  139|     66|   BOTAN_STATE_CHECK(!this->is_identity());
  ------------------
  |  |   51|     66|   do {                                                         \
  |  |   52|     66|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|     66|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 66]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|     66|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 66]
  |  |  ------------------
  ------------------
  140|     66|   const size_t fe_bytes = this->field_element_bytes();
  141|     66|   BOTAN_ARG_CHECK(bytes.size() == fe_bytes, "Invalid output size");
  ------------------
  |  |   35|     66|   do {                                                          \
  |  |   36|     66|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     66|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 66]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     66|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 66]
  |  |  ------------------
  ------------------
  142|     66|   copy_mem(bytes, std::span{m_xy}.subspan(1, fe_bytes));
  143|     66|}
_ZNK5Botan22EC_AffinePoint_Data_PC23serialize_compressed_toENSt3__14spanIhLm18446744073709551615EEE:
  159|     66|void EC_AffinePoint_Data_PC::serialize_compressed_to(std::span<uint8_t> bytes) const {
  160|     66|   BOTAN_STATE_CHECK(!this->is_identity());
  ------------------
  |  |   51|     66|   do {                                                         \
  |  |   52|     66|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|     66|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 66]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|     66|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 66]
  |  |  ------------------
  ------------------
  161|     66|   const size_t fe_bytes = this->field_element_bytes();
  162|     66|   BOTAN_ARG_CHECK(bytes.size() == 1 + fe_bytes, "Invalid output size");
  ------------------
  |  |   35|     66|   do {                                                          \
  |  |   36|     66|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     66|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 66]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     66|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 66]
  |  |  ------------------
  ------------------
  163|     66|   const bool y_is_odd = (m_xy.back() & 0x01) == 0x01;
  164|       |
  165|     66|   BufferStuffer stuffer(bytes);
  166|     66|   stuffer.append(y_is_odd ? 0x03 : 0x02);
  ------------------
  |  Branch (166:19): [True: 37, False: 29]
  ------------------
  167|     66|   this->serialize_x_to(stuffer.next(fe_bytes));
  168|     66|}
_ZNK5Botan22EC_AffinePoint_Data_PC25serialize_uncompressed_toENSt3__14spanIhLm18446744073709551615EEE:
  170|  4.13k|void EC_AffinePoint_Data_PC::serialize_uncompressed_to(std::span<uint8_t> bytes) const {
  171|  4.13k|   BOTAN_STATE_CHECK(!this->is_identity());
  ------------------
  |  |   51|  4.13k|   do {                                                         \
  |  |   52|  4.13k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  4.13k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 4.13k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  4.13k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 4.13k]
  |  |  ------------------
  ------------------
  172|  4.13k|   const size_t fe_bytes = this->field_element_bytes();
  173|  4.13k|   BOTAN_ARG_CHECK(bytes.size() == 1 + 2 * fe_bytes, "Invalid output size");
  ------------------
  |  |   35|  4.13k|   do {                                                          \
  |  |   36|  4.13k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  4.13k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 4.13k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  4.13k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 4.13k]
  |  |  ------------------
  ------------------
  174|  4.13k|   copy_mem(bytes, m_xy);
  175|  4.13k|}
_ZNK5Botan22EC_AffinePoint_Data_PC15to_legacy_pointEv:
  178|  10.6k|EC_Point EC_AffinePoint_Data_PC::to_legacy_point() const {
  179|  10.6k|   if(this->is_identity()) {
  ------------------
  |  Branch (179:7): [True: 0, False: 10.6k]
  ------------------
  180|      0|      return EC_Point(m_group->curve());
  181|  10.6k|   } else {
  182|  10.6k|      const size_t fe_bytes = this->field_element_bytes();
  183|  10.6k|      return EC_Point(m_group->curve(),
  184|  10.6k|                      BigInt::from_bytes(std::span{m_xy}.subspan(1, fe_bytes)),
  185|  10.6k|                      BigInt::from_bytes(std::span{m_xy}.last(fe_bytes)));
  186|  10.6k|   }
  187|  10.6k|}

_ZN5Botan8EC_Group13EC_group_infoERKNS_3OIDE:
   16|      6|std::shared_ptr<EC_Group_Data> EC_Group::EC_group_info(const OID& oid) {
   17|       |   // secp256r1
   18|      6|   if(oid == OID{1, 2, 840, 10045, 3, 1, 7}) {
  ------------------
  |  Branch (18:7): [True: 1, False: 5]
  ------------------
   19|      1|      return load_EC_group_info(
   20|      1|         "0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF",
   21|      1|         "0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC",
   22|      1|         "0x5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B",
   23|      1|         "0x6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296",
   24|      1|         "0x4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",
   25|      1|         "0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551",
   26|      1|         oid);
   27|      1|   }
   28|       |
   29|       |   // secp384r1
   30|      5|   if(oid == OID{1, 3, 132, 0, 34}) {
  ------------------
  |  Branch (30:7): [True: 1, False: 4]
  ------------------
   31|      1|      return load_EC_group_info(
   32|      1|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF",
   33|      1|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC",
   34|      1|         "0xB3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF",
   35|      1|         "0xAA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7",
   36|      1|         "0x3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F",
   37|      1|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973",
   38|      1|         oid);
   39|      1|   }
   40|       |
   41|       |   // secp521r1
   42|      4|   if(oid == OID{1, 3, 132, 0, 35}) {
  ------------------
  |  Branch (42:7): [True: 1, False: 3]
  ------------------
   43|      1|      return load_EC_group_info(
   44|      1|         "0x1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
   45|      1|         "0x1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC",
   46|      1|         "0x51953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00",
   47|      1|         "0xC6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66",
   48|      1|         "0x11839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650",
   49|      1|         "0x1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409",
   50|      1|         oid);
   51|      1|   }
   52|       |
   53|       |   // brainpool160r1
   54|      3|   if(oid == OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 1}) {
  ------------------
  |  Branch (54:7): [True: 0, False: 3]
  ------------------
   55|      0|      return load_EC_group_info(
   56|      0|         "0xE95E4A5F737059DC60DFC7AD95B3D8139515620F",
   57|      0|         "0x340E7BE2A280EB74E2BE61BADA745D97E8F7C300",
   58|      0|         "0x1E589A8595423412134FAA2DBDEC95C8D8675E58",
   59|      0|         "0xBED5AF16EA3F6A4F62938C4631EB5AF7BDBCDBC3",
   60|      0|         "0x1667CB477A1A8EC338F94741669C976316DA6321",
   61|      0|         "0xE95E4A5F737059DC60DF5991D45029409E60FC09",
   62|      0|         oid);
   63|      0|   }
   64|       |
   65|       |   // brainpool192r1
   66|      3|   if(oid == OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 3}) {
  ------------------
  |  Branch (66:7): [True: 0, False: 3]
  ------------------
   67|      0|      return load_EC_group_info(
   68|      0|         "0xC302F41D932A36CDA7A3463093D18DB78FCE476DE1A86297",
   69|      0|         "0x6A91174076B1E0E19C39C031FE8685C1CAE040E5C69A28EF",
   70|      0|         "0x469A28EF7C28CCA3DC721D044F4496BCCA7EF4146FBF25C9",
   71|      0|         "0xC0A0647EAAB6A48753B033C56CB0F0900A2F5C4853375FD6",
   72|      0|         "0x14B690866ABD5BB88B5F4828C1490002E6773FA2FA299B8F",
   73|      0|         "0xC302F41D932A36CDA7A3462F9E9E916B5BE8F1029AC4ACC1",
   74|      0|         oid);
   75|      0|   }
   76|       |
   77|       |   // brainpool224r1
   78|      3|   if(oid == OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 5}) {
  ------------------
  |  Branch (78:7): [True: 0, False: 3]
  ------------------
   79|      0|      return load_EC_group_info(
   80|      0|         "0xD7C134AA264366862A18302575D1D787B09F075797DA89F57EC8C0FF",
   81|      0|         "0x68A5E62CA9CE6C1C299803A6C1530B514E182AD8B0042A59CAD29F43",
   82|      0|         "0x2580F63CCFE44138870713B1A92369E33E2135D266DBB372386C400B",
   83|      0|         "0xD9029AD2C7E5CF4340823B2A87DC68C9E4CE3174C1E6EFDEE12C07D",
   84|      0|         "0x58AA56F772C0726F24C6B89E4ECDAC24354B9E99CAA3F6D3761402CD",
   85|      0|         "0xD7C134AA264366862A18302575D0FB98D116BC4B6DDEBCA3A5A7939F",
   86|      0|         oid);
   87|      0|   }
   88|       |
   89|       |   // brainpool256r1
   90|      3|   if(oid == OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 7}) {
  ------------------
  |  Branch (90:7): [True: 1, False: 2]
  ------------------
   91|      1|      return load_EC_group_info(
   92|      1|         "0xA9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5377",
   93|      1|         "0x7D5A0975FC2C3057EEF67530417AFFE7FB8055C126DC5C6CE94A4B44F330B5D9",
   94|      1|         "0x26DC5C6CE94A4B44F330B5D9BBD77CBF958416295CF7E1CE6BCCDC18FF8C07B6",
   95|      1|         "0x8BD2AEB9CB7E57CB2C4B482FFC81B7AFB9DE27E1E3BD23C23A4453BD9ACE3262",
   96|      1|         "0x547EF835C3DAC4FD97F8461A14611DC9C27745132DED8E545C1D54C72F046997",
   97|      1|         "0xA9FB57DBA1EEA9BC3E660A909D838D718C397AA3B561A6F7901E0E82974856A7",
   98|      1|         oid);
   99|      1|   }
  100|       |
  101|       |   // brainpool320r1
  102|      2|   if(oid == OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 9}) {
  ------------------
  |  Branch (102:7): [True: 0, False: 2]
  ------------------
  103|      0|      return load_EC_group_info(
  104|      0|         "0xD35E472036BC4FB7E13C785ED201E065F98FCFA6F6F40DEF4F92B9EC7893EC28FCD412B1F1B32E27",
  105|      0|         "0x3EE30B568FBAB0F883CCEBD46D3F3BB8A2A73513F5EB79DA66190EB085FFA9F492F375A97D860EB4",
  106|      0|         "0x520883949DFDBC42D3AD198640688A6FE13F41349554B49ACC31DCCD884539816F5EB4AC8FB1F1A6",
  107|      0|         "0x43BD7E9AFB53D8B85289BCC48EE5BFE6F20137D10A087EB6E7871E2A10A599C710AF8D0D39E20611",
  108|      0|         "0x14FDD05545EC1CC8AB4093247F77275E0743FFED117182EAA9C77877AAAC6AC7D35245D1692E8EE1",
  109|      0|         "0xD35E472036BC4FB7E13C785ED201E065F98FCFA5B68F12A32D482EC7EE8658E98691555B44C59311",
  110|      0|         oid);
  111|      0|   }
  112|       |
  113|       |   // brainpool384r1
  114|      2|   if(oid == OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 11}) {
  ------------------
  |  Branch (114:7): [True: 1, False: 1]
  ------------------
  115|      1|      return load_EC_group_info(
  116|      1|         "0x8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123ACD3A729901D1A71874700133107EC53",
  117|      1|         "0x7BC382C63D8C150C3C72080ACE05AFA0C2BEA28E4FB22787139165EFBA91F90F8AA5814A503AD4EB04A8C7DD22CE2826",
  118|      1|         "0x4A8C7DD22CE28268B39B55416F0447C2FB77DE107DCD2A62E880EA53EEB62D57CB4390295DBC9943AB78696FA504C11",
  119|      1|         "0x1D1C64F068CF45FFA2A63A81B7C13F6B8847A3E77EF14FE3DB7FCAFE0CBD10E8E826E03436D646AAEF87B2E247D4AF1E",
  120|      1|         "0x8ABE1D7520F9C2A45CB1EB8E95CFD55262B70B29FEEC5864E19C054FF99129280E4646217791811142820341263C5315",
  121|      1|         "0x8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B31F166E6CAC0425A7CF3AB6AF6B7FC3103B883202E9046565",
  122|      1|         oid);
  123|      1|   }
  124|       |
  125|       |   // brainpool512r1
  126|      1|   if(oid == OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 13}) {
  ------------------
  |  Branch (126:7): [True: 1, False: 0]
  ------------------
  127|      1|      return load_EC_group_info(
  128|      1|         "0xAADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA703308717D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F3",
  129|      1|         "0x7830A3318B603B89E2327145AC234CC594CBDD8D3DF91610A83441CAEA9863BC2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A72BF2C7B9E7C1AC4D77FC94CA",
  130|      1|         "0x3DF91610A83441CAEA9863BC2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A72BF2C7B9E7C1AC4D77FC94CADC083E67984050B75EBAE5DD2809BD638016F723",
  131|      1|         "0x81AEE4BDD82ED9645A21322E9C4C6A9385ED9F70B5D916C1B43B62EEF4D0098EFF3B1F78E2D0D48D50D1687B93B97D5F7C6D5047406A5E688B352209BCB9F822",
  132|      1|         "0x7DDE385D566332ECC0EABFA9CF7822FDF209F70024A57B1AA000C55B881F8111B2DCDE494A5F485E5BCA4BD88A2763AED1CA2B2FA8F0540678CD1E0F3AD80892",
  133|      1|         "0xAADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330870553E5C414CA92619418661197FAC10471DB1D381085DDADDB58796829CA90069",
  134|      1|         oid);
  135|      1|   }
  136|       |
  137|       |   // frp256v1
  138|      0|   if(oid == OID{1, 2, 250, 1, 223, 101, 256, 1}) {
  ------------------
  |  Branch (138:7): [True: 0, False: 0]
  ------------------
  139|      0|      return load_EC_group_info(
  140|      0|         "0xF1FD178C0B3AD58F10126DE8CE42435B3961ADBCABC8CA6DE8FCF353D86E9C03",
  141|      0|         "0xF1FD178C0B3AD58F10126DE8CE42435B3961ADBCABC8CA6DE8FCF353D86E9C00",
  142|      0|         "0xEE353FCA5428A9300D4ABA754A44C00FDFEC0C9AE4B1A1803075ED967B7BB73F",
  143|      0|         "0xB6B3D4C356C139EB31183D4749D423958C27D2DCAF98B70164C97A2DD98F5CFF",
  144|      0|         "0x6142E0F7C8B204911F9271F0F3ECEF8C2701C307E8E4C9E183115A1554062CFB",
  145|      0|         "0xF1FD178C0B3AD58F10126DE8CE42435B53DC67E140D2BF941FFDD459C6D655E1",
  146|      0|         oid);
  147|      0|   }
  148|       |
  149|       |   // gost_256A
  150|      0|   if(oid == OID{1, 2, 643, 7, 1, 2, 1, 1, 1} || oid == OID{1, 2, 643, 2, 2, 35, 1} || oid == OID{1, 2, 643, 2, 2, 36, 0}) {
  ------------------
  |  Branch (150:7): [True: 0, False: 0]
  |  Branch (150:7): [True: 0, False: 0]
  |  Branch (150:50): [True: 0, False: 0]
  |  Branch (150:88): [True: 0, False: 0]
  ------------------
  151|      0|      return load_EC_group_info(
  152|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD97",
  153|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD94",
  154|      0|         "0xA6",
  155|      0|         "0x1",
  156|      0|         "0x8D91E471E0989CDA27DF505A453F2B7635294F2DDF23E3B122ACC99C9E9F1E14",
  157|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6C611070995AD10045841B09B761B893",
  158|      0|         OID{1, 2, 643, 7, 1, 2, 1, 1, 1});
  159|      0|   }
  160|       |
  161|       |   // gost_512A
  162|      0|   if(oid == OID{1, 2, 643, 7, 1, 2, 1, 2, 1}) {
  ------------------
  |  Branch (162:7): [True: 0, False: 0]
  ------------------
  163|      0|      return load_EC_group_info(
  164|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDC7",
  165|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDC4",
  166|      0|         "0xE8C2505DEDFC86DDC1BD0B2B6667F1DA34B82574761CB0E879BD081CFD0B6265EE3CB090F30D27614CB4574010DA90DD862EF9D4EBEE4761503190785A71C760",
  167|      0|         "0x3",
  168|      0|         "0x7503CFE87A836AE3A61B8816E25450E6CE5E1C93ACF1ABC1778064FDCBEFA921DF1626BE4FD036E93D75E6A50E3A41E98028FE5FC235F5B889A589CB5215F2A4",
  169|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF27E69532F48D89116FF22B8D4E0560609B4B38ABFAD2B85DCACDB1411F10B275",
  170|      0|         oid);
  171|      0|   }
  172|       |
  173|       |   // secp160k1
  174|      0|   if(oid == OID{1, 3, 132, 0, 9}) {
  ------------------
  |  Branch (174:7): [True: 0, False: 0]
  ------------------
  175|      0|      return load_EC_group_info(
  176|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73",
  177|      0|         "0x0",
  178|      0|         "0x7",
  179|      0|         "0x3B4C382CE37AA192A4019E763036F4F5DD4D7EBB",
  180|      0|         "0x938CF935318FDCED6BC28286531733C3F03C4FEE",
  181|      0|         "0x100000000000000000001B8FA16DFAB9ACA16B6B3",
  182|      0|         oid);
  183|      0|   }
  184|       |
  185|       |   // secp160r1
  186|      0|   if(oid == OID{1, 3, 132, 0, 8}) {
  ------------------
  |  Branch (186:7): [True: 0, False: 0]
  ------------------
  187|      0|      return load_EC_group_info(
  188|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF",
  189|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC",
  190|      0|         "0x1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45",
  191|      0|         "0x4A96B5688EF573284664698968C38BB913CBFC82",
  192|      0|         "0x23A628553168947D59DCC912042351377AC5FB32",
  193|      0|         "0x100000000000000000001F4C8F927AED3CA752257",
  194|      0|         oid);
  195|      0|   }
  196|       |
  197|       |   // secp160r2
  198|      0|   if(oid == OID{1, 3, 132, 0, 30}) {
  ------------------
  |  Branch (198:7): [True: 0, False: 0]
  ------------------
  199|      0|      return load_EC_group_info(
  200|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73",
  201|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC70",
  202|      0|         "0xB4E134D3FB59EB8BAB57274904664D5AF50388BA",
  203|      0|         "0x52DCB034293A117E1F4FF11B30F7199D3144CE6D",
  204|      0|         "0xFEAFFEF2E331F296E071FA0DF9982CFEA7D43F2E",
  205|      0|         "0x100000000000000000000351EE786A818F3A1A16B",
  206|      0|         oid);
  207|      0|   }
  208|       |
  209|       |   // secp192k1
  210|      0|   if(oid == OID{1, 3, 132, 0, 31}) {
  ------------------
  |  Branch (210:7): [True: 0, False: 0]
  ------------------
  211|      0|      return load_EC_group_info(
  212|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37",
  213|      0|         "0x0",
  214|      0|         "0x3",
  215|      0|         "0xDB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D",
  216|      0|         "0x9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D",
  217|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D",
  218|      0|         oid);
  219|      0|   }
  220|       |
  221|       |   // secp192r1
  222|      0|   if(oid == OID{1, 2, 840, 10045, 3, 1, 1}) {
  ------------------
  |  Branch (222:7): [True: 0, False: 0]
  ------------------
  223|      0|      return load_EC_group_info(
  224|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
  225|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
  226|      0|         "0x64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1",
  227|      0|         "0x188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012",
  228|      0|         "0x7192B95FFC8DA78631011ED6B24CDD573F977A11E794811",
  229|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831",
  230|      0|         oid);
  231|      0|   }
  232|       |
  233|       |   // secp224k1
  234|      0|   if(oid == OID{1, 3, 132, 0, 32}) {
  ------------------
  |  Branch (234:7): [True: 0, False: 0]
  ------------------
  235|      0|      return load_EC_group_info(
  236|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D",
  237|      0|         "0x0",
  238|      0|         "0x5",
  239|      0|         "0xA1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C",
  240|      0|         "0x7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5",
  241|      0|         "0x10000000000000000000000000001DCE8D2EC6184CAF0A971769FB1F7",
  242|      0|         oid);
  243|      0|   }
  244|       |
  245|       |   // secp224r1
  246|      0|   if(oid == OID{1, 3, 132, 0, 33}) {
  ------------------
  |  Branch (246:7): [True: 0, False: 0]
  ------------------
  247|      0|      return load_EC_group_info(
  248|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001",
  249|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE",
  250|      0|         "0xB4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4",
  251|      0|         "0xB70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21",
  252|      0|         "0xBD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34",
  253|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D",
  254|      0|         oid);
  255|      0|   }
  256|       |
  257|       |   // secp256k1
  258|      0|   if(oid == OID{1, 3, 132, 0, 10}) {
  ------------------
  |  Branch (258:7): [True: 0, False: 0]
  ------------------
  259|      0|      return load_EC_group_info(
  260|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F",
  261|      0|         "0x0",
  262|      0|         "0x7",
  263|      0|         "0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798",
  264|      0|         "0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8",
  265|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141",
  266|      0|         oid);
  267|      0|   }
  268|       |
  269|       |   // sm2p256v1
  270|      0|   if(oid == OID{1, 2, 156, 10197, 1, 301}) {
  ------------------
  |  Branch (270:7): [True: 0, False: 0]
  ------------------
  271|      0|      return load_EC_group_info(
  272|      0|         "0xFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF",
  273|      0|         "0xFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC",
  274|      0|         "0x28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93",
  275|      0|         "0x32C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7",
  276|      0|         "0xBC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0",
  277|      0|         "0xFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123",
  278|      0|         oid);
  279|      0|   }
  280|       |
  281|       |   // x962_p192v2
  282|      0|   if(oid == OID{1, 2, 840, 10045, 3, 1, 2}) {
  ------------------
  |  Branch (282:7): [True: 0, False: 0]
  ------------------
  283|      0|      return load_EC_group_info(
  284|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
  285|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
  286|      0|         "0xCC22D6DFB95C6B25E49C0D6364A4E5980C393AA21668D953",
  287|      0|         "0xEEA2BAE7E1497842F2DE7769CFE9C989C072AD696F48034A",
  288|      0|         "0x6574D11D69B6EC7A672BB82A083DF2F2B0847DE970B2DE15",
  289|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFE5FB1A724DC80418648D8DD31",
  290|      0|         oid);
  291|      0|   }
  292|       |
  293|       |   // x962_p192v3
  294|      0|   if(oid == OID{1, 2, 840, 10045, 3, 1, 3}) {
  ------------------
  |  Branch (294:7): [True: 0, False: 0]
  ------------------
  295|      0|      return load_EC_group_info(
  296|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
  297|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
  298|      0|         "0x22123DC2395A05CAA7423DAECCC94760A7D462256BD56916",
  299|      0|         "0x7D29778100C65A1DA1783716588DCE2B8B4AEE8E228F1896",
  300|      0|         "0x38A90F22637337334B49DCB66A6DC8F9978ACA7648A943B0",
  301|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFF7A62D031C83F4294F640EC13",
  302|      0|         oid);
  303|      0|   }
  304|       |
  305|       |   // x962_p239v1
  306|      0|   if(oid == OID{1, 2, 840, 10045, 3, 1, 4}) {
  ------------------
  |  Branch (306:7): [True: 0, False: 0]
  ------------------
  307|      0|      return load_EC_group_info(
  308|      0|         "0x7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
  309|      0|         "0x7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
  310|      0|         "0x6B016C3BDCF18941D0D654921475CA71A9DB2FB27D1D37796185C2942C0A",
  311|      0|         "0xFFA963CDCA8816CCC33B8642BEDF905C3D358573D3F27FBBD3B3CB9AAAF",
  312|      0|         "0x7DEBE8E4E90A5DAE6E4054CA530BA04654B36818CE226B39FCCB7B02F1AE",
  313|      0|         "0x7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF9E5E9A9F5D9071FBD1522688909D0B",
  314|      0|         oid);
  315|      0|   }
  316|       |
  317|       |   // x962_p239v2
  318|      0|   if(oid == OID{1, 2, 840, 10045, 3, 1, 5}) {
  ------------------
  |  Branch (318:7): [True: 0, False: 0]
  ------------------
  319|      0|      return load_EC_group_info(
  320|      0|         "0x7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
  321|      0|         "0x7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
  322|      0|         "0x617FAB6832576CBBFED50D99F0249C3FEE58B94BA0038C7AE84C8C832F2C",
  323|      0|         "0x38AF09D98727705120C921BB5E9E26296A3CDCF2F35757A0EAFD87B830E7",
  324|      0|         "0x5B0125E4DBEA0EC7206DA0FC01D9B081329FB555DE6EF460237DFF8BE4BA",
  325|      0|         "0x7FFFFFFFFFFFFFFFFFFFFFFF800000CFA7E8594377D414C03821BC582063",
  326|      0|         oid);
  327|      0|   }
  328|       |
  329|       |   // x962_p239v3
  330|      0|   if(oid == OID{1, 2, 840, 10045, 3, 1, 6}) {
  ------------------
  |  Branch (330:7): [True: 0, False: 0]
  ------------------
  331|      0|      return load_EC_group_info(
  332|      0|         "0x7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
  333|      0|         "0x7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
  334|      0|         "0x255705FA2A306654B1F4CB03D6A750A30C250102D4988717D9BA15AB6D3E",
  335|      0|         "0x6768AE8E18BB92CFCF005C949AA2C6D94853D0E660BBF854B1C9505FE95A",
  336|      0|         "0x1607E6898F390C06BC1D552BAD226F3B6FCFE48B6E818499AF18E3ED6CF3",
  337|      0|         "0x7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF975DEB41B3A6057C3C432146526551",
  338|      0|         oid);
  339|      0|   }
  340|       |
  341|       |   // numsp512d1
  342|      0|   if(oid == OID{1, 3, 6, 1, 4, 1, 25258, 4, 3}) {
  ------------------
  |  Branch (342:7): [True: 0, False: 0]
  ------------------
  343|      0|      return load_EC_group_info(
  344|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDC7",
  345|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDC4",
  346|      0|         "0x1D99B",
  347|      0|         "0x2",
  348|      0|         "0x1C282EB23327F9711952C250EA61AD53FCC13031CF6DD336E0B9328433AFBDD8CC5A1C1F0C716FDC724DDE537C2B0ADB00BB3D08DC83755B205CC30D7F83CF28",
  349|      0|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5B3CA4FB94E7831B4FC258ED97D0BDC63B568B36607CD243CE153F390433555D",
  350|      0|         oid);
  351|      0|   }
  352|       |
  353|      0|   return std::shared_ptr<EC_Group_Data>();
  354|      0|}

_ZN5Botan9EC_ScalarC2ENSt3__110unique_ptrINS_14EC_Scalar_DataENS1_14default_deleteIS3_EEEE:
   19|  9.07k|EC_Scalar::EC_Scalar(std::unique_ptr<EC_Scalar_Data> scalar) : m_scalar(std::move(scalar)) {
   20|  9.07k|   BOTAN_ASSERT_NONNULL(m_scalar);
  ------------------
  |  |  123|  9.07k|   do {                                                                                   \
  |  |  124|  9.07k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 9.07k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  9.07k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 9.07k]
  |  |  ------------------
  ------------------
   21|  9.07k|}
_ZN5Botan9EC_ScalarC2ERKS0_:
   23|  8.09k|EC_Scalar::EC_Scalar(const EC_Scalar& other) : m_scalar(other.inner().clone()) {}
_ZN5Botan9EC_ScalarC2EOS0_:
   25|  18.1k|EC_Scalar::EC_Scalar(EC_Scalar&& other) noexcept : m_scalar(std::move(other.m_scalar)) {}
_ZN5Botan9EC_ScalarD2Ev:
   46|  35.3k|EC_Scalar::~EC_Scalar() = default;
_ZN5Botan9EC_Scalar6randomERKNS_8EC_GroupERNS_21RandomNumberGeneratorE:
   64|  2.59k|EC_Scalar EC_Scalar::random(const EC_Group& group, RandomNumberGenerator& rng) {
   65|  2.59k|   return EC_Scalar(group._data()->scalar_random(rng));
   66|  2.59k|}
_ZNK5Botan9EC_Scalar9to_bigintEv:
   80|  9.07k|BigInt EC_Scalar::to_bigint() const {
   81|  9.07k|   secure_vector<uint8_t> bytes(m_scalar->bytes());
   82|  9.07k|   m_scalar->serialize_to(bytes);
   83|  9.07k|   return BigInt::from_bytes(bytes);
   84|  9.07k|}
_ZN5Botan9EC_Scalar11deserializeERKNS_8EC_GroupENSt3__14spanIKhLm18446744073709551615EEE:
  122|  6.48k|std::optional<EC_Scalar> EC_Scalar::deserialize(const EC_Group& group, std::span<const uint8_t> bytes) {
  123|  6.48k|   if(auto v = group._data()->scalar_deserialize(bytes)) {
  ------------------
  |  Branch (123:12): [True: 6.48k, False: 0]
  ------------------
  124|  6.48k|      return EC_Scalar(std::move(v));
  125|  6.48k|   } else {
  126|      0|      return {};
  127|      0|   }
  128|  6.48k|}
_ZNK5Botan9EC_Scalar7is_zeroEv:
  137|  9.07k|bool EC_Scalar::is_zero() const {
  138|  9.07k|   return inner().is_zero();
  139|  9.07k|}
_ZN5Botan9EC_Scalar7zeroizeEv:
  182|  9.07k|void EC_Scalar::zeroize() {
  183|  9.07k|   m_scalar->zeroize();
  184|  9.07k|}

_ZN5Botan8CurveGFpC2EPKNS_13EC_Group_DataE:
   28|      6|CurveGFp::CurveGFp(const EC_Group_Data* group) : m_group(group) {
   29|      6|   BOTAN_ASSERT_NONNULL(m_group);
  ------------------
  |  |  123|      6|   do {                                                                                   \
  |  |  124|      6|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 6]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|      6|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 6]
  |  |  ------------------
  ------------------
   30|      6|}
_ZNK5Botan8CurveGFp5groupEv:
   32|  21.3k|const EC_Group_Data& CurveGFp::group() const {
   33|  21.3k|   BOTAN_ASSERT_NONNULL(m_group);
  ------------------
  |  |  123|  21.3k|   do {                                                                                   \
  |  |  124|  21.3k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 21.3k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  21.3k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 21.3k]
  |  |  ------------------
  ------------------
   34|  21.3k|   return *m_group;
   35|  21.3k|}
_ZN5Botan8EC_PointC2ERKNS_8CurveGFpENS_6BigIntES4_:
  115|  10.6k|      m_curve(curve), m_x(std::move(x)), m_y(std::move(y)), m_z(m_curve.group().monty().R1()) {
  116|  10.6k|   const auto& group = m_curve.group();
  117|       |
  118|  10.6k|   if(m_x < 0 || m_x >= group.p()) {
  ------------------
  |  Branch (118:7): [True: 0, False: 10.6k]
  |  Branch (118:18): [True: 0, False: 10.6k]
  ------------------
  119|      0|      throw Invalid_Argument("Invalid EC_Point affine x");
  120|      0|   }
  121|  10.6k|   if(m_y < 0 || m_y >= group.p()) {
  ------------------
  |  Branch (121:7): [True: 0, False: 10.6k]
  |  Branch (121:18): [True: 0, False: 10.6k]
  ------------------
  122|      0|      throw Invalid_Argument("Invalid EC_Point affine y");
  123|      0|   }
  124|       |
  125|  10.6k|   secure_vector<word> monty_ws(monty_ws_size(group));
  126|       |
  127|  10.6k|   to_rep(group, m_x, monty_ws);
  128|  10.6k|   to_rep(group, m_y, monty_ws);
  129|  10.6k|}
_ZN5Botan8EC_Point4swapERS0_:
  792|  10.6k|void EC_Point::swap(EC_Point& other) noexcept {
  793|  10.6k|   m_curve.swap(other.m_curve);
  794|  10.6k|   m_x.swap(other.m_x);
  795|  10.6k|   m_y.swap(other.m_y);
  796|  10.6k|   m_z.swap(other.m_z);
  797|  10.6k|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_113monty_ws_sizeERKNS_13EC_Group_DataE:
  102|  10.6k|size_t monty_ws_size(const EC_Group_Data& group) {
  103|  10.6k|   return 2 * group.p_words();
  104|  10.6k|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_16to_repERKNS_13EC_Group_DataERNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
   55|  21.3k|void to_rep(const EC_Group_Data& group, BigInt& x, secure_vector<word>& ws) {
   56|  21.3k|   group.monty().mul_by(x, group.monty().R2(), ws);
   57|  21.3k|}

_ZN5Botan17EC_PublicKey_DataC2ERKNS_8EC_GroupENSt3__14spanIKhLm18446744073709551615EEE:
   38|  6.48k|      EC_PublicKey_Data(group, decode_ec_public_key_point(group, bytes)) {}
_ZN5Botan17EC_PublicKey_DataC2ENS_8EC_GroupENS_14EC_AffinePointE:
   41|  10.6k|      m_group(std::move(group)), m_point(std::move(pt)) {
   42|  10.6k|#if defined(BOTAN_HAS_LEGACY_EC_POINT)
   43|  10.6k|   m_legacy_point = m_point.to_legacy_point();
   44|  10.6k|#endif
   45|       |
   46|       |   // Checking that the point lies on the curve is done in the deserialization
   47|       |   // of EC_AffinePoint.
   48|  10.6k|   BOTAN_ARG_CHECK(!m_point.is_identity(), "ECC public key cannot be point at infinity");
  ------------------
  |  |   35|  10.6k|   do {                                                          \
  |  |   36|  10.6k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  10.6k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 10.6k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  10.6k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 10.6k]
  |  |  ------------------
  ------------------
   49|  10.6k|}
_ZN5Botan18EC_PrivateKey_DataC2ENS_8EC_GroupENS_9EC_ScalarE:
   52|  9.07k|      m_group(std::move(group)), m_scalar(std::move(x)), m_legacy_x(m_scalar.to_bigint()) {
   53|       |   // Checking that the scalar is lower than the group order is ensured in the
   54|       |   // deserialization of the EC_Scalar or during the random generation respectively.
   55|  9.07k|   BOTAN_ARG_CHECK(m_scalar.is_nonzero(), "ECC private key cannot be zero");
  ------------------
  |  |   35|  9.07k|   do {                                                          \
  |  |   36|  9.07k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  9.07k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 9.07k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  9.07k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 9.07k]
  |  |  ------------------
  ------------------
   56|  9.07k|}
_ZN5Botan18EC_PrivateKey_DataC2ERKNS_8EC_GroupENSt3__14spanIKhLm18446744073709551615EEE:
   88|  6.48k|      Botan::EC_PrivateKey_Data(group, decode_ec_secret_key_scalar(group, bytes)) {}
_ZN5Botan18EC_PrivateKey_DataD2Ev:
   90|  9.07k|EC_PrivateKey_Data::~EC_PrivateKey_Data() {
   91|  9.07k|   m_scalar.zeroize();
   92|  9.07k|}
_ZNK5Botan18EC_PrivateKey_Data10public_keyERNS_21RandomNumberGeneratorEb:
   95|  2.59k|                                                                  bool with_modular_inverse) const {
   96|  2.59k|   auto public_point = [&] {
   97|  2.59k|      if(with_modular_inverse) {
   98|  2.59k|         return EC_AffinePoint::g_mul(m_scalar.invert(), rng);
   99|  2.59k|      } else {
  100|  2.59k|         return EC_AffinePoint::g_mul(m_scalar, rng);
  101|  2.59k|      }
  102|  2.59k|   };
  103|       |
  104|  2.59k|   return std::make_shared<EC_PublicKey_Data>(m_group, public_point());
  105|  2.59k|}
ec_key_data.cpp:_ZN5Botan12_GLOBAL__N_126decode_ec_public_key_pointERKNS_8EC_GroupENSt3__14spanIKhLm18446744073709551615EEE:
   17|  6.48k|EC_AffinePoint decode_ec_public_key_point(const EC_Group& group, std::span<const uint8_t> bytes) {
   18|       |   /*
   19|       |   * RFC 5480 section 2.2:
   20|       |   *    The first octet of the OCTET STRING indicates whether the key is
   21|       |   *    compressed or uncompressed.  The uncompressed form is indicated
   22|       |   *    by 0x04 and the compressed form is indicated by either 0x02 or
   23|       |   *    0x03 (see 2.3.3 in [SEC1]).  The public key MUST be rejected if
   24|       |   *    any other value is included in the first octet.
   25|       |   */
   26|  6.48k|   if(auto pt_uncompressed = EC_AffinePoint::deserialize_uncompressed(group, bytes)) {
  ------------------
  |  Branch (26:12): [True: 6.48k, False: 0]
  ------------------
   27|  6.48k|      return std::move(pt_uncompressed).value();
   28|  6.48k|   } else if(auto pt_compressed = EC_AffinePoint::deserialize_compressed(group, bytes)) {
  ------------------
  |  Branch (28:19): [True: 0, False: 0]
  ------------------
   29|      0|      return std::move(pt_compressed).value();
   30|      0|   } else {
   31|      0|      throw Decoding_Error("Failed to deserialize elliptic curve point");
   32|      0|   }
   33|  6.48k|}
ec_key_data.cpp:_ZN5Botan12_GLOBAL__N_127decode_ec_secret_key_scalarERKNS_8EC_GroupENSt3__14spanIKhLm18446744073709551615EEE:
   60|  6.48k|EC_Scalar decode_ec_secret_key_scalar(const EC_Group& group, std::span<const uint8_t> bytes) {
   61|  6.48k|   const size_t order_bytes = group.get_order_bytes();
   62|       |
   63|  6.48k|   if(bytes.size() < order_bytes) {
  ------------------
  |  Branch (63:7): [True: 0, False: 6.48k]
  ------------------
   64|       |      /*
   65|       |      * Older versions had a bug which caused secret keys to not be encoded to
   66|       |      * the full byte length of the order if there were leading zero bytes. This
   67|       |      * was particularly a problem for P-521, where on average half of keys do
   68|       |      * not have their high bit set and so can be encoded in 65 bytes, vs 66
   69|       |      * bytes for the full order.
   70|       |      *
   71|       |      * To accommodate this, zero prefix the key if we see such a short input
   72|       |      */
   73|      0|      secure_vector<uint8_t> padded_sk(order_bytes);
   74|      0|      copy_mem(std::span{padded_sk}.last(bytes.size()), bytes);
   75|      0|      return decode_ec_secret_key_scalar(group, padded_sk);
   76|      0|   }
   77|       |
   78|  6.48k|   if(auto s = EC_Scalar::deserialize(group, bytes)) {
  ------------------
  |  Branch (78:12): [True: 6.48k, False: 0]
  ------------------
   79|  6.48k|      return s.value();
   80|  6.48k|   } else {
   81|      0|      throw Decoding_Error("EC private key is invalid for this group");
   82|      0|   }
   83|  6.48k|}
ec_key_data.cpp:_ZZNK5Botan18EC_PrivateKey_Data10public_keyERNS_21RandomNumberGeneratorEbENK3$_0clEv:
   96|  2.59k|   auto public_point = [&] {
   97|  2.59k|      if(with_modular_inverse) {
  ------------------
  |  Branch (97:10): [True: 0, False: 2.59k]
  ------------------
   98|      0|         return EC_AffinePoint::g_mul(m_scalar.invert(), rng);
   99|  2.59k|      } else {
  100|  2.59k|         return EC_AffinePoint::g_mul(m_scalar, rng);
  101|  2.59k|      }
  102|  2.59k|   };

_ZNK5Botan12EC_PublicKey10key_lengthEv:
   28|  1.61k|size_t EC_PublicKey::key_length() const {
   29|  1.61k|   return domain().get_p_bits();
   30|  1.61k|}
_ZN5Botan12EC_PublicKey27assert_algorithm_identifierERKNS_19AlgorithmIdentifierENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEE:
   49|  6.48k|                                                                     std::string_view alg_name) {
   50|  6.48k|   if(alg_id.oid() != OID::from_string(alg_name)) {
  ------------------
  |  Branch (50:7): [True: 0, False: 6.48k]
  ------------------
   51|      0|      throw Decoding_Error(
   52|      0|         fmt("Unexpected AlgorithmIdentifier OID {} in association with {} key", alg_id.oid(), alg_name));
   53|      0|   }
   54|       |
   55|  6.48k|   return alg_id;  // NOLINT(*-return-const-ref-from-parameter)
   56|  6.48k|}
_ZN5Botan12EC_PublicKeyC2ERKNS_8EC_GroupERKNS_14EC_AffinePointE:
   66|  1.61k|EC_PublicKey::EC_PublicKey(const EC_Group& group, const EC_AffinePoint& pub_point) {
   67|  1.61k|   m_public_key = std::make_shared<const EC_PublicKey_Data>(group, pub_point);
   68|  1.61k|   m_domain_encoding = default_encoding_for(domain());  // NOLINT(*-prefer-member-initializer)
   69|  1.61k|}
_ZNK5Botan12EC_PublicKey6domainEv:
   76|  13.9k|const EC_Group& EC_PublicKey::domain() const {
   77|  13.9k|   BOTAN_STATE_CHECK(m_public_key != nullptr);
  ------------------
  |  |   51|  13.9k|   do {                                                         \
  |  |   52|  13.9k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  13.9k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 13.9k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  13.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 13.9k]
  |  |  ------------------
  ------------------
   78|  13.9k|   return m_public_key->group();
   79|  13.9k|}
_ZNK5Botan12EC_PublicKey16_public_ec_pointEv:
   88|  4.20k|const EC_AffinePoint& EC_PublicKey::_public_ec_point() const {
   89|  4.20k|   BOTAN_STATE_CHECK(m_public_key != nullptr);
  ------------------
  |  |   51|  4.20k|   do {                                                         \
  |  |   52|  4.20k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  4.20k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 4.20k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  4.20k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 4.20k]
  |  |  ------------------
  ------------------
   90|  4.20k|   return m_public_key->public_key();
   91|  4.20k|}
_ZNK5Botan12EC_PublicKey19raw_public_key_bitsEv:
  102|  4.20k|std::vector<uint8_t> EC_PublicKey::raw_public_key_bits() const {
  103|  4.20k|   return _public_ec_point().serialize(point_encoding());
  104|  4.20k|}
_ZN5Botan12EC_PublicKey18set_point_encodingENS_15EC_Point_FormatE:
  114|  5.18k|void EC_PublicKey::set_point_encoding(EC_Point_Format enc) {
  115|  5.18k|   if(enc != EC_Point_Format::Compressed && enc != EC_Point_Format::Uncompressed && enc != EC_Point_Format::Hybrid) {
  ------------------
  |  Branch (115:7): [True: 5.12k, False: 66]
  |  Branch (115:45): [True: 0, False: 5.12k]
  |  Branch (115:85): [True: 0, False: 0]
  ------------------
  116|      0|      throw Invalid_Argument("Invalid point encoding for EC_PublicKey");
  117|      0|   }
  118|       |
  119|  5.18k|   m_point_encoding = enc;
  120|  5.18k|}
_ZNK5Botan13EC_PrivateKey12_private_keyEv:
  135|  1.61k|const EC_Scalar& EC_PrivateKey::_private_key() const {
  136|  1.61k|   BOTAN_STATE_CHECK(m_private_key != nullptr);
  ------------------
  |  |   51|  1.61k|   do {                                                         \
  |  |   52|  1.61k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  1.61k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 1.61k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  1.61k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 1.61k]
  |  |  ------------------
  ------------------
  137|  1.61k|   return m_private_key->private_key();
  138|  1.61k|}
_ZN5Botan13EC_PrivateKeyC2ERNS_21RandomNumberGeneratorERKNS_8EC_GroupEb:
  155|  2.59k|      m_with_modular_inverse(with_modular_inverse) {
  156|  2.59k|   auto scalar = EC_Scalar::random(ec_group, rng);
  157|  2.59k|   m_private_key = std::make_shared<EC_PrivateKey_Data>(ec_group, std::move(scalar));
  158|  2.59k|   m_public_key = m_private_key->public_key(rng, with_modular_inverse);
  159|  2.59k|   m_domain_encoding = default_encoding_for(domain());
  160|  2.59k|}
_ZN5Botan13EC_PrivateKeyC2ERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEEb:
  191|  6.48k|      m_with_modular_inverse(with_modular_inverse) {
  192|  6.48k|   OID key_parameters;
  193|  6.48k|   secure_vector<uint8_t> private_key_bits;
  194|  6.48k|   secure_vector<uint8_t> public_key_bits;
  195|       |
  196|  6.48k|   BER_Decoder(key_bits, BER_Decoder::Limits::DER())
  197|  6.48k|      .start_sequence()
  198|  6.48k|      .decode_and_check<size_t>(1, "Unknown version code for ECC key")
  199|  6.48k|      .decode(private_key_bits, ASN1_Type::OctetString)
  200|  6.48k|      .decode_optional(key_parameters, ASN1_Type(0), ASN1_Class::ExplicitContextSpecific)
  201|  6.48k|      .decode_optional_octet_aligned_bitstring(public_key_bits, 1, ASN1_Class::ExplicitContextSpecific)
  202|  6.48k|      .end_cons()
  203|  6.48k|      .verify_end();
  204|       |
  205|  6.48k|   std::unique_ptr<EC_Group> group;
  206|       |
  207|  6.48k|   if(!alg_id.parameters_are_empty()) {
  ------------------
  |  Branch (207:7): [True: 6.48k, False: 0]
  ------------------
  208|  6.48k|      group = std::make_unique<EC_Group>(alg_id.parameters());
  209|  6.48k|   }
  210|  6.48k|   if(!key_parameters.empty()) {
  ------------------
  |  Branch (210:7): [True: 0, False: 6.48k]
  ------------------
  211|      0|      if(group) {
  ------------------
  |  Branch (211:10): [True: 0, False: 0]
  ------------------
  212|      0|         if(EC_Group(key_parameters) != *group) {
  ------------------
  |  Branch (212:13): [True: 0, False: 0]
  ------------------
  213|      0|            throw Invalid_Argument(
  214|      0|               "Domain parameters supplied AlgorithmIdentifier does not match the ECC private key's domain parameters in EC_PrivateKey construction");
  215|      0|         }
  216|      0|      } else {
  217|      0|         group = std::make_unique<EC_Group>(key_parameters);
  218|      0|      }
  219|      0|   }
  220|  6.48k|   if(!group) {
  ------------------
  |  Branch (220:7): [True: 0, False: 6.48k]
  ------------------
  221|      0|      throw Invalid_Argument("Domain parameters are not supplied in EC_PrivateKey construction");
  222|      0|   }
  223|       |
  224|  6.48k|   m_private_key = std::make_shared<EC_PrivateKey_Data>(*group, private_key_bits);
  225|       |
  226|  6.48k|   if(public_key_bits.empty()) {
  ------------------
  |  Branch (226:7): [True: 0, False: 6.48k]
  ------------------
  227|      0|      m_public_key = m_private_key->public_key(with_modular_inverse);
  228|  6.48k|   } else {
  229|  6.48k|      m_public_key = std::make_shared<EC_PublicKey_Data>(*group, public_key_bits);
  230|  6.48k|   }
  231|       |
  232|  6.48k|   m_domain_encoding = default_encoding_for(domain());
  233|  6.48k|}
ecc_key.cpp:_ZN5Botan12_GLOBAL__N_120default_encoding_forERKNS_8EC_GroupE:
   38|  10.6k|EC_Group_Encoding default_encoding_for(const EC_Group& group) {
   39|  10.6k|   if(group.get_curve_oid().empty()) {
  ------------------
  |  Branch (39:7): [True: 0, False: 10.6k]
  ------------------
   40|      0|      return EC_Group_Encoding::Explicit;
   41|  10.6k|   } else {
   42|  10.6k|      return EC_Group_Encoding::NamedCurve;
   43|  10.6k|   }
   44|  10.6k|}

_ZNK5Botan15ECDH_PrivateKey23create_key_agreement_opERNS_21RandomNumberGeneratorENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEES7_:
   97|  1.61k|                                                                                std::string_view provider) const {
   98|  1.61k|   if(provider == "base" || provider.empty()) {
  ------------------
  |  Branch (98:7): [True: 0, False: 1.61k]
  |  Branch (98:29): [True: 1.61k, False: 0]
  ------------------
   99|  1.61k|      return std::make_unique<ECDH_KA_Operation>(*this, params, rng);
  100|  1.61k|   }
  101|       |
  102|      0|   throw Provider_Not_Found(algo_name(), provider);
  103|  1.61k|}
ecdh.cpp:_ZN5Botan12_GLOBAL__N_117ECDH_KA_OperationC2ERKNS_15ECDH_PrivateKeyENSt3__117basic_string_viewIcNS5_11char_traitsIcEEEERNS_21RandomNumberGeneratorE:
   30|  1.61k|            PK_Ops::Key_Agreement_with_KDF(kdf),
   31|  1.61k|            m_group(key.domain()),
   32|  1.61k|            m_l_times_priv(mul_cofactor_inv(m_group, key._private_key())),
   33|  1.61k|            m_rng(rng) {}
ecdh.cpp:_ZN5Botan12_GLOBAL__N_117ECDH_KA_Operation16mul_cofactor_invERKNS_8EC_GroupERKNS_9EC_ScalarE:
   68|  1.61k|      static EC_Scalar mul_cofactor_inv(const EC_Group& group, const EC_Scalar& x) {
   69|       |         // We implement BSI TR-03111 ECKAEG which only matters in the (rare/deprecated)
   70|       |         // case of a curve with cofactor.
   71|       |
   72|  1.61k|         if(group.has_cofactor()) {
  ------------------
  |  Branch (72:13): [True: 0, False: 1.61k]
  ------------------
   73|       |            // We could precompute this but cofactors are rare
   74|      0|            return x * EC_Scalar::from_bigint(group, group.get_cofactor()).invert_vartime();
   75|  1.61k|         } else {
   76|  1.61k|            return x;
   77|  1.61k|         }
   78|  1.61k|      }
ecdh.cpp:_ZN5Botan12_GLOBAL__N_117ECDH_KA_Operation9raw_agreeEPKhm:
   37|  1.61k|      secure_vector<uint8_t> raw_agree(const uint8_t w[], size_t w_len) override {
   38|  1.61k|         const auto input_point = [&] {
   39|  1.61k|            if(m_group.has_cofactor()) {
   40|  1.61k|#if defined(BOTAN_HAS_LEGACY_EC_POINT)
   41|  1.61k|               return EC_AffinePoint(m_group, m_group.get_cofactor() * m_group.OS2ECP(w, w_len));
   42|       |#else
   43|       |               throw Not_Implemented(
   44|       |                  "Support for DH with cofactor adjustment not available in this build configuration");
   45|       |#endif
   46|  1.61k|            } else {
   47|  1.61k|               if(auto point = EC_AffinePoint::deserialize(m_group, {w, w_len})) {
   48|  1.61k|                  return *point;
   49|  1.61k|               } else {
   50|  1.61k|                  throw Decoding_Error("ECDH - Invalid elliptic curve point: not on curve");
   51|  1.61k|               }
   52|  1.61k|            }
   53|  1.61k|         }();
   54|       |
   55|       |         // Typical specs (such as BSI's TR-03111 Section 4.3.1) require that
   56|       |         // we check the resulting point of the multiplication to not be the
   57|       |         // point at infinity. However, since we ensure that our ECC private
   58|       |         // scalar can never be zero, checking the peer's input point is
   59|       |         // equivalent.
   60|  1.61k|         if(input_point.is_identity()) {
  ------------------
  |  Branch (60:13): [True: 0, False: 1.61k]
  ------------------
   61|      0|            throw Decoding_Error("ECDH - Invalid elliptic curve point: identity");
   62|      0|         }
   63|       |
   64|  1.61k|         return input_point.mul_x_only(m_l_times_priv, m_rng);
   65|  1.61k|      }
ecdh.cpp:_ZZN5Botan12_GLOBAL__N_117ECDH_KA_Operation9raw_agreeEPKhmENKUlvE_clEv:
   38|  1.61k|         const auto input_point = [&] {
   39|  1.61k|            if(m_group.has_cofactor()) {
  ------------------
  |  Branch (39:16): [True: 0, False: 1.61k]
  ------------------
   40|      0|#if defined(BOTAN_HAS_LEGACY_EC_POINT)
   41|      0|               return EC_AffinePoint(m_group, m_group.get_cofactor() * m_group.OS2ECP(w, w_len));
   42|       |#else
   43|       |               throw Not_Implemented(
   44|       |                  "Support for DH with cofactor adjustment not available in this build configuration");
   45|       |#endif
   46|  1.61k|            } else {
   47|  1.61k|               if(auto point = EC_AffinePoint::deserialize(m_group, {w, w_len})) {
  ------------------
  |  Branch (47:24): [True: 1.61k, False: 0]
  ------------------
   48|  1.61k|                  return *point;
   49|  1.61k|               } else {
   50|      0|                  throw Decoding_Error("ECDH - Invalid elliptic curve point: not on curve");
   51|      0|               }
   52|  1.61k|            }
   53|  1.61k|         }();

_ZN5Botan8PEM_Code6decodeERNS_10DataSourceERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
   64|  13.0k|secure_vector<uint8_t> decode(DataSource& source, std::string& label) {
   65|  13.0k|   const size_t RANDOM_CHAR_LIMIT = 8;
   66|       |
   67|  13.0k|   label.clear();
   68|       |
   69|  13.0k|   const std::string PEM_HEADER1 = "-----BEGIN ";
   70|  13.0k|   const std::string PEM_HEADER2 = "-----";
   71|  13.0k|   size_t position = 0;
   72|       |
   73|   159k|   while(position != PEM_HEADER1.length()) {
  ------------------
  |  Branch (73:10): [True: 146k, False: 12.9k]
  ------------------
   74|   146k|      auto b = source.read_byte();
   75|       |
   76|   146k|      if(!b) {
  ------------------
  |  Branch (76:10): [True: 37, False: 146k]
  ------------------
   77|     37|         throw Decoding_Error("PEM: No PEM header found");
   78|     37|      }
   79|   146k|      if(static_cast<char>(*b) == PEM_HEADER1[position]) {
  ------------------
  |  Branch (79:10): [True: 142k, False: 3.12k]
  ------------------
   80|   142k|         ++position;
   81|   142k|      } else if(position >= RANDOM_CHAR_LIMIT) {
  ------------------
  |  Branch (81:17): [True: 1, False: 3.11k]
  ------------------
   82|      1|         throw Decoding_Error("PEM: Malformed PEM header");
   83|  3.11k|      } else {
   84|  3.11k|         position = 0;
   85|  3.11k|      }
   86|   146k|   }
   87|  12.9k|   position = 0;
   88|   220k|   while(position != PEM_HEADER2.length()) {
  ------------------
  |  Branch (88:10): [True: 207k, False: 12.9k]
  ------------------
   89|   207k|      auto b = source.read_byte();
   90|       |
   91|   207k|      if(!b) {
  ------------------
  |  Branch (91:10): [True: 0, False: 207k]
  ------------------
   92|      0|         throw Decoding_Error("PEM: No PEM header found");
   93|      0|      }
   94|   207k|      if(static_cast<char>(*b) == PEM_HEADER2[position]) {
  ------------------
  |  Branch (94:10): [True: 64.8k, False: 142k]
  ------------------
   95|  64.8k|         ++position;
   96|   142k|      } else if(position > 0) {
  ------------------
  |  Branch (96:17): [True: 0, False: 142k]
  ------------------
   97|      0|         throw Decoding_Error("PEM: Malformed PEM header");
   98|      0|      }
   99|       |
  100|   207k|      if(position == 0) {
  ------------------
  |  Branch (100:10): [True: 142k, False: 64.8k]
  ------------------
  101|   142k|         if(label.size() >= 128) {
  ------------------
  |  Branch (101:13): [True: 0, False: 142k]
  ------------------
  102|      0|            throw Decoding_Error("PEM: Label too long");
  103|      0|         }
  104|   142k|         label += static_cast<char>(*b);
  105|   142k|      }
  106|   207k|   }
  107|       |
  108|  12.9k|   std::vector<char> b64;
  109|       |
  110|  12.9k|   const std::string PEM_TRAILER = fmt("-----END {}-----", label);
  111|  12.9k|   position = 0;
  112|  5.70M|   while(position != PEM_TRAILER.length()) {
  ------------------
  |  Branch (112:10): [True: 5.69M, False: 12.9k]
  ------------------
  113|  5.69M|      auto b = source.read_byte();
  114|       |
  115|  5.69M|      if(!b) {
  ------------------
  |  Branch (115:10): [True: 0, False: 5.69M]
  ------------------
  116|      0|         throw Decoding_Error("PEM: No PEM trailer found");
  117|      0|      }
  118|  5.69M|      if(static_cast<char>(*b) == PEM_TRAILER[position]) {
  ------------------
  |  Branch (118:10): [True: 324k, False: 5.36M]
  ------------------
  119|   324k|         ++position;
  120|  5.36M|      } else if(position > 0) {
  ------------------
  |  Branch (120:17): [True: 0, False: 5.36M]
  ------------------
  121|      0|         throw Decoding_Error("PEM: Malformed PEM trailer");
  122|      0|      }
  123|       |
  124|  5.69M|      if(position == 0) {
  ------------------
  |  Branch (124:10): [True: 5.36M, False: 324k]
  ------------------
  125|  5.36M|         b64.push_back(*b);
  126|  5.36M|      }
  127|  5.69M|   }
  128|       |
  129|  12.9k|   return base64_decode(b64.data(), b64.size());
  130|  12.9k|}
_ZN5Botan8PEM_Code7matchesERNS_10DataSourceENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEm:
  145|    407|bool matches(DataSource& source, std::string_view extra, size_t search_range) {
  146|    407|   const std::string PEM_HEADER = fmt("-----BEGIN {}", extra);
  147|       |
  148|    407|   std::array<uint8_t, 4096> stack_buf{};
  149|    407|   std::vector<uint8_t> heap_buf;
  150|    407|   uint8_t* search_buf = stack_buf.data();
  151|    407|   if(search_range > stack_buf.size()) {
  ------------------
  |  Branch (151:7): [True: 0, False: 407]
  ------------------
  152|      0|      heap_buf.resize(search_range);
  153|      0|      search_buf = heap_buf.data();
  154|      0|   }
  155|       |
  156|    407|   const size_t got = source.peek(search_buf, search_range, 0);
  157|       |
  158|    407|   if(got < PEM_HEADER.length()) {
  ------------------
  |  Branch (158:7): [True: 80, False: 327]
  ------------------
  159|     80|      return false;
  160|     80|   }
  161|       |
  162|    327|   return std::search(search_buf, search_buf + got, PEM_HEADER.begin(), PEM_HEADER.end()) != search_buf + got;
  163|    407|}

_ZN5Botan16load_private_keyERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEE:
  298|  6.48k|                                              [[maybe_unused]] std::span<const uint8_t> key_bits) {
  299|  6.48k|   const std::string alg_name = [&]() -> std::string {
  300|  6.48k|      if(const auto name = alg_id.oid().registered_name()) {
  301|  6.48k|         const std::vector<std::string> alg_info = split_on(*name, '/');
  302|  6.48k|         if(!alg_info.empty()) {
  303|  6.48k|            return alg_info[0];
  304|  6.48k|         }
  305|  6.48k|      }
  306|       |
  307|  6.48k|      throw Decoding_Error(
  308|  6.48k|         fmt("Private key decoding failed, no algorithm associated with {}", alg_id.oid().to_string()));
  309|  6.48k|   }();
  310|       |
  311|  6.48k|#if defined(BOTAN_HAS_RSA)
  312|  6.48k|   if(alg_name == "RSA") {
  ------------------
  |  Branch (312:7): [True: 0, False: 6.48k]
  ------------------
  313|      0|      return std::make_unique<RSA_PrivateKey>(alg_id, key_bits);
  314|      0|   }
  315|  6.48k|#endif
  316|       |
  317|  6.48k|#if defined(BOTAN_HAS_X25519)
  318|  6.48k|   if(alg_name == "X25519" || alg_name == "Curve25519") {
  ------------------
  |  Branch (318:7): [True: 0, False: 6.48k]
  |  Branch (318:31): [True: 0, False: 6.48k]
  ------------------
  319|      0|      return std::make_unique<X25519_PrivateKey>(alg_id, key_bits);
  320|      0|   }
  321|  6.48k|#endif
  322|       |
  323|  6.48k|#if defined(BOTAN_HAS_X448)
  324|  6.48k|   if(alg_name == "X448") {
  ------------------
  |  Branch (324:7): [True: 0, False: 6.48k]
  ------------------
  325|      0|      return std::make_unique<X448_PrivateKey>(alg_id, key_bits);
  326|      0|   }
  327|  6.48k|#endif
  328|       |
  329|  6.48k|#if defined(BOTAN_HAS_ECDSA)
  330|  6.48k|   if(alg_name == "ECDSA") {
  ------------------
  |  Branch (330:7): [True: 6.48k, False: 0]
  ------------------
  331|  6.48k|      return std::make_unique<ECDSA_PrivateKey>(alg_id, key_bits);
  332|  6.48k|   }
  333|      0|#endif
  334|       |
  335|      0|#if defined(BOTAN_HAS_ECDH)
  336|      0|   if(alg_name == "ECDH") {
  ------------------
  |  Branch (336:7): [True: 0, False: 0]
  ------------------
  337|      0|      return std::make_unique<ECDH_PrivateKey>(alg_id, key_bits);
  338|      0|   }
  339|      0|#endif
  340|       |
  341|      0|#if defined(BOTAN_HAS_DIFFIE_HELLMAN)
  342|      0|   if(alg_name == "DH") {
  ------------------
  |  Branch (342:7): [True: 0, False: 0]
  ------------------
  343|      0|      return std::make_unique<DH_PrivateKey>(alg_id, key_bits);
  344|      0|   }
  345|      0|#endif
  346|       |
  347|      0|#if defined(BOTAN_HAS_DSA)
  348|      0|   if(alg_name == "DSA") {
  ------------------
  |  Branch (348:7): [True: 0, False: 0]
  ------------------
  349|      0|      return std::make_unique<DSA_PrivateKey>(alg_id, key_bits);
  350|      0|   }
  351|      0|#endif
  352|       |
  353|      0|#if defined(BOTAN_HAS_FRODOKEM)
  354|      0|   if(alg_name == "FrodoKEM" || alg_name.starts_with("FrodoKEM-") || alg_name.starts_with("eFrodoKEM-")) {
  ------------------
  |  Branch (354:7): [True: 0, False: 0]
  |  Branch (354:33): [True: 0, False: 0]
  |  Branch (354:70): [True: 0, False: 0]
  ------------------
  355|      0|      return std::make_unique<FrodoKEM_PrivateKey>(alg_id, key_bits);
  356|      0|   }
  357|      0|#endif
  358|       |
  359|      0|#if defined(BOTAN_HAS_KYBER) || defined(BOTAN_HAS_KYBER_90S)
  360|      0|   if(alg_name == "Kyber" || alg_name.starts_with("Kyber-")) {
  ------------------
  |  Branch (360:7): [True: 0, False: 0]
  |  Branch (360:30): [True: 0, False: 0]
  ------------------
  361|      0|      return std::make_unique<Kyber_PrivateKey>(alg_id, key_bits);
  362|      0|   }
  363|      0|#endif
  364|       |
  365|      0|#if defined(BOTAN_HAS_ML_KEM)
  366|      0|   if(alg_name.starts_with("ML-KEM-")) {
  ------------------
  |  Branch (366:7): [True: 0, False: 0]
  ------------------
  367|      0|      return std::make_unique<ML_KEM_PrivateKey>(alg_id, key_bits);
  368|      0|   }
  369|      0|#endif
  370|       |
  371|      0|#if defined(BOTAN_HAS_MCELIECE)
  372|      0|   if(alg_name == "McEliece") {
  ------------------
  |  Branch (372:7): [True: 0, False: 0]
  ------------------
  373|      0|      return std::make_unique<McEliece_PrivateKey>(alg_id, key_bits);
  374|      0|   }
  375|      0|#endif
  376|       |
  377|      0|#if defined(BOTAN_HAS_ECGDSA)
  378|      0|   if(alg_name == "ECGDSA") {
  ------------------
  |  Branch (378:7): [True: 0, False: 0]
  ------------------
  379|      0|      return std::make_unique<ECGDSA_PrivateKey>(alg_id, key_bits);
  380|      0|   }
  381|      0|#endif
  382|       |
  383|      0|#if defined(BOTAN_HAS_ECKCDSA)
  384|      0|   if(alg_name == "ECKCDSA") {
  ------------------
  |  Branch (384:7): [True: 0, False: 0]
  ------------------
  385|      0|      return std::make_unique<ECKCDSA_PrivateKey>(alg_id, key_bits);
  386|      0|   }
  387|      0|#endif
  388|       |
  389|      0|#if defined(BOTAN_HAS_ED25519)
  390|      0|   if(alg_name == "Ed25519") {
  ------------------
  |  Branch (390:7): [True: 0, False: 0]
  ------------------
  391|      0|      return std::make_unique<Ed25519_PrivateKey>(alg_id, key_bits);
  392|      0|   }
  393|      0|#endif
  394|       |
  395|      0|#if defined(BOTAN_HAS_ED448)
  396|      0|   if(alg_name == "Ed448") {
  ------------------
  |  Branch (396:7): [True: 0, False: 0]
  ------------------
  397|      0|      return std::make_unique<Ed448_PrivateKey>(alg_id, key_bits);
  398|      0|   }
  399|      0|#endif
  400|       |
  401|      0|#if defined(BOTAN_HAS_GOST_34_10_2001)
  402|      0|   if(alg_name == "GOST-34.10" || alg_name == "GOST-34.10-2012-256" || alg_name == "GOST-34.10-2012-512") {
  ------------------
  |  Branch (402:7): [True: 0, False: 0]
  |  Branch (402:35): [True: 0, False: 0]
  |  Branch (402:72): [True: 0, False: 0]
  ------------------
  403|      0|      return std::make_unique<GOST_3410_PrivateKey>(alg_id, key_bits);
  404|      0|   }
  405|      0|#endif
  406|       |
  407|      0|#if defined(BOTAN_HAS_SM2)
  408|      0|   if(alg_name == "SM2" || alg_name == "SM2_Sig" || alg_name == "SM2_Enc") {
  ------------------
  |  Branch (408:7): [True: 0, False: 0]
  |  Branch (408:28): [True: 0, False: 0]
  |  Branch (408:53): [True: 0, False: 0]
  ------------------
  409|      0|      return std::make_unique<SM2_PrivateKey>(alg_id, key_bits);
  410|      0|   }
  411|      0|#endif
  412|       |
  413|      0|#if defined(BOTAN_HAS_ELGAMAL)
  414|      0|   if(alg_name == "ElGamal") {
  ------------------
  |  Branch (414:7): [True: 0, False: 0]
  ------------------
  415|      0|      return std::make_unique<ElGamal_PrivateKey>(alg_id, key_bits);
  416|      0|   }
  417|      0|#endif
  418|       |
  419|      0|#if defined(BOTAN_HAS_XMSS_RFC8391)
  420|      0|   if(alg_name == "XMSS") {
  ------------------
  |  Branch (420:7): [True: 0, False: 0]
  ------------------
  421|      0|      return std::make_unique<XMSS_PrivateKey>(alg_id, key_bits);
  422|      0|   }
  423|      0|#endif
  424|       |
  425|      0|#if defined(BOTAN_HAS_DILITHIUM) || defined(BOTAN_HAS_DILITHIUM_AES)
  426|      0|   if(alg_name == "Dilithium" || alg_name.starts_with("Dilithium-")) {
  ------------------
  |  Branch (426:7): [True: 0, False: 0]
  |  Branch (426:34): [True: 0, False: 0]
  ------------------
  427|      0|      return std::make_unique<Dilithium_PrivateKey>(alg_id, key_bits);
  428|      0|   }
  429|      0|#endif
  430|       |
  431|      0|#if defined(BOTAN_HAS_ML_DSA)
  432|      0|   if(alg_name.starts_with("ML-DSA-")) {
  ------------------
  |  Branch (432:7): [True: 0, False: 0]
  ------------------
  433|      0|      return std::make_unique<ML_DSA_PrivateKey>(alg_id, key_bits);
  434|      0|   }
  435|      0|#endif
  436|       |
  437|      0|#if defined(BOTAN_HAS_HSS_LMS)
  438|      0|   if(alg_name == "HSS-LMS-Private-Key") {
  ------------------
  |  Branch (438:7): [True: 0, False: 0]
  ------------------
  439|      0|      return std::make_unique<HSS_LMS_PrivateKey>(alg_id, key_bits);
  440|      0|   }
  441|      0|#endif
  442|       |
  443|      0|#if defined(BOTAN_HAS_SPHINCS_PLUS_WITH_SHA2) || defined(BOTAN_HAS_SPHINCS_PLUS_WITH_SHAKE)
  444|      0|   if(alg_name == "SPHINCS+" || alg_name.starts_with("SphincsPlus-")) {
  ------------------
  |  Branch (444:7): [True: 0, False: 0]
  |  Branch (444:33): [True: 0, False: 0]
  ------------------
  445|      0|      return std::make_unique<SphincsPlus_PrivateKey>(alg_id, key_bits);
  446|      0|   }
  447|      0|#endif
  448|       |
  449|      0|#if defined(BOTAN_HAS_SLH_DSA_WITH_SHA2) || defined(BOTAN_HAS_SLH_DSA_WITH_SHAKE)
  450|      0|   if(alg_name.starts_with("SLH-DSA-") || alg_name.starts_with("Hash-SLH-DSA-")) {
  ------------------
  |  Branch (450:7): [True: 0, False: 0]
  |  Branch (450:43): [True: 0, False: 0]
  ------------------
  451|      0|      return std::make_unique<SLH_DSA_PrivateKey>(alg_id, key_bits);
  452|      0|   }
  453|      0|#endif
  454|       |
  455|      0|#if defined(BOTAN_HAS_CLASSICMCELIECE)
  456|      0|   if(alg_name.starts_with("ClassicMcEliece")) {
  ------------------
  |  Branch (456:7): [True: 0, False: 0]
  ------------------
  457|      0|      return std::make_unique<Classic_McEliece_PrivateKey>(alg_id, key_bits);
  458|      0|   }
  459|      0|#endif
  460|       |
  461|      0|   throw Decoding_Error(fmt("Unknown or unavailable public key algorithm '{}'", alg_name));
  462|      0|}
pk_algs.cpp:_ZZN5Botan16load_private_keyERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEEENK3$_0clEv:
  299|  6.48k|   const std::string alg_name = [&]() -> std::string {
  300|  6.48k|      if(const auto name = alg_id.oid().registered_name()) {
  ------------------
  |  Branch (300:21): [True: 6.48k, False: 0]
  ------------------
  301|  6.48k|         const std::vector<std::string> alg_info = split_on(*name, '/');
  302|  6.48k|         if(!alg_info.empty()) {
  ------------------
  |  Branch (302:13): [True: 6.48k, False: 0]
  ------------------
  303|  6.48k|            return alg_info[0];
  304|  6.48k|         }
  305|  6.48k|      }
  306|       |
  307|      0|      throw Decoding_Error(
  308|      0|         fmt("Private key decoding failed, no algorithm associated with {}", alg_id.oid().to_string()));
  309|  6.48k|   }();

_ZN5Botan22format_hex_fingerprintENSt3__14spanIKhLm18446744073709551615EEE:
   47|  12.9k|std::string format_hex_fingerprint(std::span<const uint8_t> bits) {
   48|  12.9k|   const std::string hex = hex_encode(bits);
   49|       |
   50|  12.9k|   std::string fprint;
   51|  12.9k|   fprint.reserve(3 * bits.size());
   52|       |
   53|   350k|   for(size_t i = 0; i != hex.size(); i += 2) {
  ------------------
  |  Branch (53:22): [True: 337k, False: 12.9k]
  ------------------
   54|   337k|      if(i != 0) {
  ------------------
  |  Branch (54:10): [True: 324k, False: 12.9k]
  ------------------
   55|   324k|         fprint.push_back(':');
   56|   324k|      }
   57|       |
   58|   337k|      fprint.push_back(hex[i]);
   59|   337k|      fprint.push_back(hex[i + 1]);
   60|   337k|   }
   61|       |
   62|  12.9k|   return fprint;
   63|  12.9k|}

_ZN5Botan6PK_Ops22Key_Agreement_with_KDFC2ENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   77|  1.61k|PK_Ops::Key_Agreement_with_KDF::Key_Agreement_with_KDF(std::string_view kdf) {
   78|  1.61k|   if(kdf != "Raw") {
  ------------------
  |  Branch (78:7): [True: 0, False: 1.61k]
  ------------------
   79|      0|      m_kdf = KDF::create_or_throw(kdf);
   80|      0|   }
   81|  1.61k|}
_ZN5Botan6PK_Ops22Key_Agreement_with_KDFD2Ev:
   83|  1.61k|PK_Ops::Key_Agreement_with_KDF::~Key_Agreement_with_KDF() = default;
_ZN5Botan6PK_Ops22Key_Agreement_with_KDF5agreeEmNSt3__14spanIKhLm18446744073709551615EEES5_:
   87|  1.61k|                                                             std::span<const uint8_t> salt) {
   88|  1.61k|   if(!salt.empty() && m_kdf == nullptr) {
  ------------------
  |  Branch (88:7): [True: 0, False: 1.61k]
  |  Branch (88:24): [True: 0, False: 0]
  ------------------
   89|      0|      throw Invalid_Argument("PK_Key_Agreement::derive_key requires a KDF to use a salt");
   90|      0|   }
   91|       |
   92|  1.61k|   secure_vector<uint8_t> z = raw_agree(other_key.data(), other_key.size());
   93|  1.61k|   if(m_kdf) {
  ------------------
  |  Branch (93:7): [True: 0, False: 1.61k]
  ------------------
   94|      0|      return m_kdf->derive_key(key_len, z, salt.data(), salt.size());
   95|      0|   }
   96|  1.61k|   return z;
   97|  1.61k|}

_ZN5Botan5PKCS88load_keyERNS_10DataSourceE:
  350|  6.48k|std::unique_ptr<Private_Key> load_key(DataSource& source) {
  351|  6.48k|   auto fail_fn = []() -> std::string {
  352|  6.48k|      throw PKCS8_Exception("Internal error: Attempt to read password for unencrypted key");
  353|  6.48k|   };
  354|       |
  355|  6.48k|   return load_key(source, fail_fn, false);
  356|  6.48k|}
pkcs8.cpp:_ZN5Botan5PKCS812_GLOBAL__N_18load_keyERNS_10DataSourceERKNSt3__18functionIFNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEvEEEb:
  303|  6.48k|                                      bool is_encrypted) {
  304|  6.48k|   AlgorithmIdentifier alg_id;
  305|  6.48k|   secure_vector<uint8_t> pkcs8_key = PKCS8_decode(source, get_pass, alg_id, is_encrypted);
  306|       |
  307|  6.48k|   if(const auto alg_name = alg_id.oid().registered_name()) {
  ------------------
  |  Branch (307:18): [True: 6.48k, False: 0]
  ------------------
  308|  6.48k|      return load_private_key(alg_id, pkcs8_key);
  309|  6.48k|   } else {
  310|      0|      throw PKCS8_Exception(fmt("Unknown algorithm OID {}", alg_id.oid()));
  311|      0|   }
  312|  6.48k|}
pkcs8.cpp:_ZN5Botan5PKCS812_GLOBAL__N_112PKCS8_decodeERNS_10DataSourceERKNSt3__18functionIFNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEvEEERNS_19AlgorithmIdentifierEb:
   50|  6.48k|                                    bool is_encrypted) {
   51|  6.48k|   AlgorithmIdentifier pbe_alg_id;
   52|  6.48k|   secure_vector<uint8_t> key_data;
   53|  6.48k|   secure_vector<uint8_t> key;
   54|       |
   55|  6.48k|   try {
   56|  6.48k|      if(ASN1::maybe_BER(source) && !PEM_Code::matches(source)) {
  ------------------
  |  Branch (56:10): [True: 0, False: 6.48k]
  |  Branch (56:37): [True: 0, False: 0]
  ------------------
   57|      0|         if(is_encrypted) {
  ------------------
  |  Branch (57:13): [True: 0, False: 0]
  ------------------
   58|      0|            key_data = PKCS8_extract(source, pbe_alg_id);
   59|      0|         } else {
   60|       |            // todo read more efficiently
   61|      0|            while(auto b = source.read_byte()) {
  ------------------
  |  Branch (61:24): [True: 0, False: 0]
  ------------------
   62|      0|               key_data.push_back(*b);
   63|      0|            }
   64|      0|         }
   65|  6.48k|      } else {
   66|  6.48k|         std::string label;
   67|  6.48k|         key_data = PEM_Code::decode(source, label);
   68|       |
   69|       |         // todo remove autodetect for pem as well?
   70|  6.48k|         if(label == "PRIVATE KEY") {
  ------------------
  |  Branch (70:13): [True: 6.48k, False: 0]
  ------------------
   71|  6.48k|            is_encrypted = false;
   72|  6.48k|         } else if(label == "ENCRYPTED PRIVATE KEY") {
  ------------------
  |  Branch (72:20): [True: 0, False: 0]
  ------------------
   73|      0|            DataSource_Memory key_source(key_data);
   74|      0|            key_data = PKCS8_extract(key_source, pbe_alg_id);
   75|      0|         } else {
   76|      0|            throw PKCS8_Exception(fmt("Unknown PEM label '{}'", label));
   77|      0|         }
   78|  6.48k|      }
   79|       |
   80|  6.48k|      if(key_data.empty()) {
  ------------------
  |  Branch (80:10): [True: 0, False: 6.48k]
  ------------------
   81|      0|         throw PKCS8_Exception("No key data found");
   82|      0|      }
   83|  6.48k|   } catch(Decoding_Error& e) {
   84|      0|      throw Decoding_Error("PKCS #8 private key decoding", e);
   85|      0|   }
   86|       |
   87|  6.48k|   try {
   88|  6.48k|      if(is_encrypted) {
  ------------------
  |  Branch (88:10): [True: 0, False: 6.48k]
  ------------------
   89|      0|         if(pbe_alg_id.oid().registered_name() != "PBE-PKCS5v20") {
  ------------------
  |  Branch (89:13): [True: 0, False: 0]
  ------------------
   90|      0|            throw PKCS8_Exception(fmt("Unknown PBE type {}", pbe_alg_id.oid()));
   91|      0|         }
   92|       |
   93|      0|#if defined(BOTAN_HAS_PKCS5_PBES2)
   94|      0|         key = pbes2_decrypt(key_data, get_passphrase(), pbe_alg_id.parameters());
   95|       |#else
   96|       |         BOTAN_UNUSED(get_passphrase);
   97|       |         throw Decoding_Error("Private key is encrypted but PBES2 was disabled in build");
   98|       |#endif
   99|  6.48k|      } else {
  100|  6.48k|         key = key_data;
  101|  6.48k|      }
  102|       |
  103|  6.48k|      BER_Decoder(key, BER_Decoder::Limits::DER())
  104|  6.48k|         .start_sequence()
  105|  6.48k|         .decode_and_check<size_t>(0, "Unknown PKCS #8 version number")
  106|  6.48k|         .decode(pk_alg_id)
  107|  6.48k|         .decode(key, ASN1_Type::OctetString)
  108|  6.48k|         .discard_remaining()
  109|  6.48k|         .end_cons()
  110|  6.48k|         .verify_end();
  111|  6.48k|   } catch(std::exception& e) {
  112|      0|      throw Decoding_Error("PKCS #8 private key decoding", e);
  113|      0|   }
  114|  6.48k|   return key;
  115|  6.48k|}

_ZN5Botan16PK_Key_AgreementC2ERKNS_11Private_KeyERNS_21RandomNumberGeneratorENSt3__117basic_string_viewIcNS6_11char_traitsIcEEEESA_:
  222|  1.61k|                                   std::string_view provider) {
  223|  1.61k|   m_op = key.create_key_agreement_op(rng, kdf, provider);
  224|  1.61k|   if(!m_op) {
  ------------------
  |  Branch (224:7): [True: 0, False: 1.61k]
  ------------------
  225|      0|      throw Invalid_Argument(fmt("Key type {} does not support key agreement", key.algo_name()));
  226|      0|   }
  227|  1.61k|}
_ZN5Botan16PK_Key_AgreementD2Ev:
  229|  1.61k|PK_Key_Agreement::~PK_Key_Agreement() = default;
_ZNK5Botan16PK_Key_Agreement10derive_keyEmNSt3__14spanIKhLm18446744073709551615EEENS1_17basic_string_viewIcNS1_11char_traitsIcEEEE:
  247|  1.61k|                                          std::string_view salt) const {
  248|  1.61k|   return this->derive_key(key_len, peer_key, as_span_of_bytes(salt));
  249|  1.61k|}
_ZNK5Botan16PK_Key_Agreement10derive_keyEmNSt3__14spanIKhLm18446744073709551615EEES4_:
  253|  1.61k|                                          std::span<const uint8_t> salt) const {
  254|  1.61k|   return SymmetricKey(m_op->agree(key_len, peer_key, salt));
  255|  1.61k|}

_ZN5Botan16curve25519_donnaEPhPKhS2_:
  453|     13|void curve25519_donna(uint8_t mypublic[32], const uint8_t secret[32], const uint8_t basepoint[32]) {
  454|     13|   CT::poison(secret, 32);
  455|     13|   CT::poison(basepoint, 32);
  456|       |
  457|     13|   uint64_t bp[5];
  458|     13|   uint64_t x[5];
  459|     13|   uint64_t z[5];
  460|     13|   uint64_t zmone[5];
  461|     13|   uint8_t e[32];
  462|       |
  463|     13|   copy_mem(e, secret, 32);
  464|     13|   e[0] &= 248;
  465|     13|   e[31] &= 127;
  466|     13|   e[31] |= 64;
  467|       |
  468|     13|   fexpand(bp, basepoint);
  469|     13|   cmult(x, z, e, bp);
  470|     13|   crecip(zmone, z);
  471|     13|   fmul(z, x, zmone);
  472|     13|   fcontract(mypublic, z);
  473|       |
  474|     13|   CT::unpoison(secret, 32);
  475|     13|   CT::unpoison(basepoint, 32);
  476|     13|   CT::unpoison(mypublic, 32);
  477|     13|}
donna.cpp:_ZN5Botan12_GLOBAL__N_17fexpandEPmPKh:
  217|     13|inline void fexpand(uint64_t* out, const uint8_t* in) {
  218|     13|   out[0] = load_le<uint64_t>(in, 0) & MASK_63;
  219|     13|   out[1] = (load_le<uint64_t>(in + 6, 0) >> 3) & MASK_63;
  220|     13|   out[2] = (load_le<uint64_t>(in + 12, 0) >> 6) & MASK_63;
  221|     13|   out[3] = (load_le<uint64_t>(in + 19, 0) >> 1) & MASK_63;
  222|     13|   out[4] = (load_le<uint64_t>(in + 24, 0) >> 12) & MASK_63;
  223|     13|}
donna.cpp:_ZN5Botan12_GLOBAL__N_15cmultEPmS1_PKhPKm:
  364|     13|void cmult(uint64_t resultx[5], uint64_t resultz[5], const uint8_t n[32], const uint64_t q[5]) {
  365|     13|   uint64_t a[5] = {0};  // nqpqx
  366|     13|   uint64_t b[5] = {1};  // npqpz
  367|     13|   uint64_t c[5] = {1};  // nqx
  368|     13|   uint64_t d[5] = {0};  // nqz
  369|     13|   uint64_t e[5] = {0};  // npqqx2
  370|     13|   uint64_t f[5] = {1};  // npqqz2
  371|     13|   uint64_t g[5] = {0};  // nqx2
  372|     13|   uint64_t h[5] = {1};  // nqz2
  373|       |
  374|     13|   copy_mem(a, q, 5);
  375|       |
  376|    429|   for(size_t i = 0; i < 32; ++i) {
  ------------------
  |  Branch (376:22): [True: 416, False: 13]
  ------------------
  377|    416|      const uint64_t si = n[31 - i];
  378|    416|      const auto bit0 = CT::Mask<uint64_t>::expand_bit(si, 7);
  379|    416|      const auto bit1 = CT::Mask<uint64_t>::expand_bit(si, 6);
  380|    416|      const auto bit2 = CT::Mask<uint64_t>::expand_bit(si, 5);
  381|    416|      const auto bit3 = CT::Mask<uint64_t>::expand_bit(si, 4);
  382|    416|      const auto bit4 = CT::Mask<uint64_t>::expand_bit(si, 3);
  383|    416|      const auto bit5 = CT::Mask<uint64_t>::expand_bit(si, 2);
  384|    416|      const auto bit6 = CT::Mask<uint64_t>::expand_bit(si, 1);
  385|    416|      const auto bit7 = CT::Mask<uint64_t>::expand_bit(si, 0);
  386|       |
  387|    416|      swap_conditional(c, a, d, b, bit0);
  388|    416|      fmonty(g, h, e, f, c, d, a, b, q);
  389|       |
  390|    416|      swap_conditional(g, e, h, f, bit0 ^ bit1);
  391|    416|      fmonty(c, d, a, b, g, h, e, f, q);
  392|       |
  393|    416|      swap_conditional(c, a, d, b, bit1 ^ bit2);
  394|    416|      fmonty(g, h, e, f, c, d, a, b, q);
  395|       |
  396|    416|      swap_conditional(g, e, h, f, bit2 ^ bit3);
  397|    416|      fmonty(c, d, a, b, g, h, e, f, q);
  398|       |
  399|    416|      swap_conditional(c, a, d, b, bit3 ^ bit4);
  400|    416|      fmonty(g, h, e, f, c, d, a, b, q);
  401|       |
  402|    416|      swap_conditional(g, e, h, f, bit4 ^ bit5);
  403|    416|      fmonty(c, d, a, b, g, h, e, f, q);
  404|       |
  405|    416|      swap_conditional(c, a, d, b, bit5 ^ bit6);
  406|    416|      fmonty(g, h, e, f, c, d, a, b, q);
  407|       |
  408|    416|      swap_conditional(g, e, h, f, bit6 ^ bit7);
  409|    416|      fmonty(c, d, a, b, g, h, e, f, q);
  410|       |
  411|    416|      swap_conditional(c, a, d, b, bit7);
  412|    416|   }
  413|       |
  414|     13|   copy_mem(resultx, c, 5);
  415|     13|   copy_mem(resultz, d, 5);
  416|     13|}
donna.cpp:_ZN5Botan12_GLOBAL__N_116swap_conditionalEPmS1_S1_S1_NS_2CT4MaskImEE:
  346|  3.74k|inline void swap_conditional(uint64_t a[5], uint64_t b[5], uint64_t c[5], uint64_t d[5], CT::Mask<uint64_t> swap) {
  347|  22.4k|   for(size_t i = 0; i < 5; ++i) {
  ------------------
  |  Branch (347:22): [True: 18.7k, False: 3.74k]
  ------------------
  348|  18.7k|      const uint64_t x0 = swap.if_set_return(a[i] ^ b[i]);
  349|  18.7k|      a[i] ^= x0;
  350|  18.7k|      b[i] ^= x0;
  351|       |
  352|  18.7k|      const uint64_t x1 = swap.if_set_return(c[i] ^ d[i]);
  353|  18.7k|      c[i] ^= x1;
  354|  18.7k|      d[i] ^= x1;
  355|  18.7k|   }
  356|  3.74k|}
donna.cpp:_ZN5Botan12_GLOBAL__N_16fmontyEPmS1_S1_S1_S1_S1_S1_S1_PKm:
  308|  3.32k|            const uint64_t q_minus_q_dash[5]) {
  309|  3.32k|   uint64_t zzz[5];
  310|  3.32k|   uint64_t xx[5];
  311|  3.32k|   uint64_t zz[5];
  312|  3.32k|   uint64_t xxprime[5];
  313|  3.32k|   uint64_t zzprime[5];
  314|  3.32k|   uint64_t zzzprime[5];
  315|       |
  316|  3.32k|   fadd_sub(in_q_z, in_q_x);
  317|  3.32k|   fadd_sub(in_q_dash_z, in_q_dash_x);
  318|       |
  319|  3.32k|   fmul(xxprime, in_q_dash_x, in_q_z);
  320|  3.32k|   fmul(zzprime, in_q_dash_z, in_q_x);
  321|       |
  322|  3.32k|   fadd_sub(zzprime, xxprime);
  323|       |
  324|  3.32k|   fsquare(result_q_plus_q_dash_x, xxprime);
  325|  3.32k|   fsquare(zzzprime, zzprime);
  326|  3.32k|   fmul(result_q_plus_q_dash_z, zzzprime, q_minus_q_dash);
  327|       |
  328|  3.32k|   fsquare(xx, in_q_x);
  329|  3.32k|   fsquare(zz, in_q_z);
  330|  3.32k|   fmul(result_two_q_x, xx, zz);
  331|       |
  332|  3.32k|   fdifference_backwards(zz, xx);  // does zz = xx - zz
  333|  3.32k|   fscalar_product(zzz, zz, 121665);
  334|  3.32k|   fsum(zzz, xx);
  335|       |
  336|  3.32k|   fmul(result_two_q_z, zz, zzz);
  337|  3.32k|}
donna.cpp:_ZN5Botan12_GLOBAL__N_18fadd_subEPmS1_:
   76|  9.98k|inline void fadd_sub(uint64_t x[5], uint64_t y[5]) {
   77|       |   // TODO merge these and avoid the tmp array
   78|  9.98k|   uint64_t tmp[5];
   79|  9.98k|   copy_mem(tmp, y, 5);
   80|  9.98k|   fsum(y, x);
   81|  9.98k|   fdifference_backwards(x, tmp);  // does x - z
   82|  9.98k|}
donna.cpp:_ZN5Botan12_GLOBAL__N_17fsquareEPmPKmm:
  169|  13.4k|inline void fsquare(uint64_t out[5], const uint64_t in[5], size_t count = 1) {
  170|  13.4k|   uint64_t r0 = in[0];
  171|  13.4k|   uint64_t r1 = in[1];
  172|  13.4k|   uint64_t r2 = in[2];
  173|  13.4k|   uint64_t r3 = in[3];
  174|  13.4k|   uint64_t r4 = in[4];
  175|       |
  176|  30.0k|   for(size_t i = 0; i != count; ++i) {
  ------------------
  |  Branch (176:22): [True: 16.6k, False: 13.4k]
  ------------------
  177|  16.6k|      const uint64_t d0 = r0 * 2;
  178|  16.6k|      const uint64_t d1 = r1 * 2;
  179|  16.6k|      const uint64_t d2 = r2 * 2 * 19;
  180|  16.6k|      const uint64_t d419 = r4 * 19;
  181|  16.6k|      const uint64_t d4 = d419 * 2;
  182|       |
  183|  16.6k|      const uint128_t t0 = uint128_t(r0) * r0 + uint128_t(d4) * r1 + uint128_t(d2) * (r3);
  184|  16.6k|      uint128_t t1 = uint128_t(d0) * r1 + uint128_t(d4) * r2 + uint128_t(r3) * (r3 * 19);
  185|  16.6k|      uint128_t t2 = uint128_t(d0) * r2 + uint128_t(r1) * r1 + uint128_t(d4) * (r3);
  186|  16.6k|      uint128_t t3 = uint128_t(d0) * r3 + uint128_t(d1) * r2 + uint128_t(r4) * (d419);
  187|  16.6k|      uint128_t t4 = uint128_t(d0) * r4 + uint128_t(d1) * r3 + uint128_t(r2) * (r2);
  188|       |
  189|  16.6k|      r0 = t0 & MASK_63;
  190|  16.6k|      t1 += carry_shift(t0, 51);
  191|  16.6k|      r1 = t1 & MASK_63;
  192|  16.6k|      t2 += carry_shift(t1, 51);
  193|  16.6k|      r2 = t2 & MASK_63;
  194|  16.6k|      t3 += carry_shift(t2, 51);
  195|  16.6k|      r3 = t3 & MASK_63;
  196|  16.6k|      t4 += carry_shift(t3, 51);
  197|  16.6k|      r4 = t4 & MASK_63;
  198|  16.6k|      uint64_t c = carry_shift(t4, 51);
  199|       |
  200|  16.6k|      r0 += c * 19;
  201|  16.6k|      c = r0 >> 51U;
  202|  16.6k|      r0 = r0 & MASK_63;
  203|  16.6k|      r1 += c;
  204|  16.6k|      c = r1 >> 51U;
  205|  16.6k|      r1 = r1 & MASK_63;
  206|  16.6k|      r2 += c;
  207|  16.6k|   }
  208|       |
  209|  13.4k|   out[0] = r0;
  210|  13.4k|   out[1] = r1;
  211|  13.4k|   out[2] = r2;
  212|  13.4k|   out[3] = r3;
  213|  13.4k|   out[4] = r4;
  214|  13.4k|}
donna.cpp:_ZN5Botan12_GLOBAL__N_121fdifference_backwardsEPmPKm:
   64|  13.3k|inline void fdifference_backwards(uint64_t out[5], const uint64_t in[5]) {
   65|       |   /* 152 is 19 << 3 */
   66|  13.3k|   const uint64_t two54m152 = (static_cast<uint64_t>(1) << 54) - 152;
   67|  13.3k|   const uint64_t two54m8 = (static_cast<uint64_t>(1) << 54) - 8;
   68|       |
   69|  13.3k|   out[0] = in[0] + two54m152 - out[0];
   70|  13.3k|   out[1] = in[1] + two54m8 - out[1];
   71|  13.3k|   out[2] = in[2] + two54m8 - out[2];
   72|  13.3k|   out[3] = in[3] + two54m8 - out[3];
   73|  13.3k|   out[4] = in[4] + two54m8 - out[4];
   74|  13.3k|}
donna.cpp:_ZN5Botan12_GLOBAL__N_115fscalar_productEPmPKmm:
   87|  3.32k|inline void fscalar_product(uint64_t out[5], const uint64_t in[5], const uint64_t scalar) {
   88|  3.32k|   uint128_t a = uint128_t(in[0]) * scalar;
   89|  3.32k|   out[0] = a & MASK_63;
   90|       |
   91|  3.32k|   a = uint128_t(in[1]) * scalar + carry_shift(a, 51);
   92|  3.32k|   out[1] = a & MASK_63;
   93|       |
   94|  3.32k|   a = uint128_t(in[2]) * scalar + carry_shift(a, 51);
   95|  3.32k|   out[2] = a & MASK_63;
   96|       |
   97|  3.32k|   a = uint128_t(in[3]) * scalar + carry_shift(a, 51);
   98|  3.32k|   out[3] = a & MASK_63;
   99|       |
  100|  3.32k|   a = uint128_t(in[4]) * scalar + carry_shift(a, 51);
  101|  3.32k|   out[4] = a & MASK_63;
  102|       |
  103|  3.32k|   out[0] += carry_shift(a, 51) * 19;
  104|  3.32k|}
donna.cpp:_ZN5Botan12_GLOBAL__N_14fsumEPmPKm:
   50|  13.3k|inline void fsum(uint64_t out[5], const uint64_t in[5]) {
   51|  13.3k|   out[0] += in[0];
   52|  13.3k|   out[1] += in[1];
   53|  13.3k|   out[2] += in[2];
   54|  13.3k|   out[3] += in[3];
   55|  13.3k|   out[4] += in[4];
   56|  13.3k|}
donna.cpp:_ZN5Botan12_GLOBAL__N_16crecipEPmPKm:
  421|     13|void crecip(uint64_t out[5], const uint64_t z[5]) {
  422|     13|   uint64_t a[5];
  423|     13|   uint64_t b[5];
  424|     13|   uint64_t c[5];
  425|     13|   uint64_t t0[5];
  426|       |
  427|     13|   fsquare(a, z);        // 2
  428|     13|   fsquare(t0, a, 2);    // 8
  429|     13|   fmul(b, t0, z);       // 9
  430|     13|   fmul(a, b, a);        // 11
  431|     13|   fsquare(t0, a);       // 22
  432|     13|   fmul(b, t0, b);       // 2^5 - 2^0 = 31
  433|     13|   fsquare(t0, b, 5);    // 2^10 - 2^5
  434|     13|   fmul(b, t0, b);       // 2^10 - 2^0
  435|     13|   fsquare(t0, b, 10);   // 2^20 - 2^10
  436|     13|   fmul(c, t0, b);       // 2^20 - 2^0
  437|     13|   fsquare(t0, c, 20);   // 2^40 - 2^20
  438|     13|   fmul(t0, t0, c);      // 2^40 - 2^0
  439|     13|   fsquare(t0, t0, 10);  // 2^50 - 2^10
  440|     13|   fmul(b, t0, b);       // 2^50 - 2^0
  441|     13|   fsquare(t0, b, 50);   // 2^100 - 2^50
  442|     13|   fmul(c, t0, b);       // 2^100 - 2^0
  443|     13|   fsquare(t0, c, 100);  // 2^200 - 2^100
  444|     13|   fmul(t0, t0, c);      // 2^200 - 2^0
  445|     13|   fsquare(t0, t0, 50);  // 2^250 - 2^50
  446|     13|   fmul(t0, t0, b);      // 2^250 - 2^0
  447|     13|   fsquare(t0, t0, 5);   // 2^255 - 2^5
  448|     13|   fmul(out, t0, a);     // 2^255 - 21
  449|     13|}
donna.cpp:_ZN5Botan12_GLOBAL__N_14fmulEPmPKmS3_:
  114|  16.7k|inline void fmul(uint64_t out[5], const uint64_t in[5], const uint64_t in2[5]) {
  115|  16.7k|   const auto s0 = uint128_t(in2[0]);
  116|  16.7k|   const auto s1 = uint128_t(in2[1]);
  117|  16.7k|   const auto s2 = uint128_t(in2[2]);
  118|  16.7k|   const auto s3 = uint128_t(in2[3]);
  119|  16.7k|   const auto s4 = uint128_t(in2[4]);
  120|       |
  121|  16.7k|   uint64_t r0 = in[0];
  122|  16.7k|   uint64_t r1 = in[1];
  123|  16.7k|   uint64_t r2 = in[2];
  124|  16.7k|   uint64_t r3 = in[3];
  125|  16.7k|   uint64_t r4 = in[4];
  126|       |
  127|  16.7k|   uint128_t t0 = r0 * s0;
  128|  16.7k|   uint128_t t1 = r0 * s1 + r1 * s0;
  129|  16.7k|   uint128_t t2 = r0 * s2 + r2 * s0 + r1 * s1;
  130|  16.7k|   uint128_t t3 = r0 * s3 + r3 * s0 + r1 * s2 + r2 * s1;
  131|  16.7k|   uint128_t t4 = r0 * s4 + r4 * s0 + r3 * s1 + r1 * s3 + r2 * s2;
  132|       |
  133|  16.7k|   r4 *= 19;
  134|  16.7k|   r1 *= 19;
  135|  16.7k|   r2 *= 19;
  136|  16.7k|   r3 *= 19;
  137|       |
  138|  16.7k|   t0 += r4 * s1 + r1 * s4 + r2 * s3 + r3 * s2;
  139|  16.7k|   t1 += r4 * s2 + r2 * s4 + r3 * s3;
  140|  16.7k|   t2 += r4 * s3 + r3 * s4;
  141|  16.7k|   t3 += r4 * s4;
  142|       |
  143|  16.7k|   r0 = t0 & MASK_63;
  144|  16.7k|   t1 += carry_shift(t0, 51);
  145|  16.7k|   r1 = t1 & MASK_63;
  146|  16.7k|   t2 += carry_shift(t1, 51);
  147|  16.7k|   r2 = t2 & MASK_63;
  148|  16.7k|   t3 += carry_shift(t2, 51);
  149|  16.7k|   r3 = t3 & MASK_63;
  150|  16.7k|   t4 += carry_shift(t3, 51);
  151|  16.7k|   r4 = t4 & MASK_63;
  152|  16.7k|   uint64_t c = carry_shift(t4, 51);
  153|       |
  154|  16.7k|   r0 += c * 19;
  155|  16.7k|   c = r0 >> 51U;
  156|  16.7k|   r0 = r0 & MASK_63;
  157|  16.7k|   r1 += c;
  158|  16.7k|   c = r1 >> 51U;
  159|  16.7k|   r1 = r1 & MASK_63;
  160|  16.7k|   r2 += c;
  161|       |
  162|  16.7k|   out[0] = r0;
  163|  16.7k|   out[1] = r1;
  164|  16.7k|   out[2] = r2;
  165|  16.7k|   out[3] = r3;
  166|  16.7k|   out[4] = r4;
  167|  16.7k|}
donna.cpp:_ZN5Botan12_GLOBAL__N_19fcontractEPhPKm:
  228|     13|inline void fcontract(uint8_t* out, const uint64_t input[5]) {
  229|     13|   auto t0 = uint128_t(input[0]);
  230|     13|   auto t1 = uint128_t(input[1]);
  231|     13|   auto t2 = uint128_t(input[2]);
  232|     13|   auto t3 = uint128_t(input[3]);
  233|     13|   auto t4 = uint128_t(input[4]);
  234|       |
  235|     39|   for(size_t i = 0; i != 2; ++i) {
  ------------------
  |  Branch (235:22): [True: 26, False: 13]
  ------------------
  236|     26|      t1 += t0 >> 51U;
  237|     26|      t0 &= MASK_63;
  238|     26|      t2 += t1 >> 51U;
  239|     26|      t1 &= MASK_63;
  240|     26|      t3 += t2 >> 51U;
  241|     26|      t2 &= MASK_63;
  242|     26|      t4 += t3 >> 51U;
  243|     26|      t3 &= MASK_63;
  244|     26|      t0 += (t4 >> 51U) * 19;
  245|     26|      t4 &= MASK_63;
  246|     26|   }
  247|       |
  248|       |   /* now t is between 0 and 2^255-1, properly carried. */
  249|       |   /* case 1: between 0 and 2^255-20. case 2: between 2^255-19 and 2^255-1. */
  250|       |
  251|     13|   t0 += 19;
  252|       |
  253|     13|   t1 += t0 >> 51U;
  254|     13|   t0 &= MASK_63;
  255|     13|   t2 += t1 >> 51U;
  256|     13|   t1 &= MASK_63;
  257|     13|   t3 += t2 >> 51U;
  258|     13|   t2 &= MASK_63;
  259|     13|   t4 += t3 >> 51U;
  260|     13|   t3 &= MASK_63;
  261|     13|   t0 += (t4 >> 51U) * 19;
  262|     13|   t4 &= MASK_63;
  263|       |
  264|       |   /* now between 19 and 2^255-1 in both cases, and offset by 19. */
  265|       |
  266|     13|   t0 += 0x8000000000000 - 19;
  267|     13|   t1 += 0x8000000000000 - 1;
  268|     13|   t2 += 0x8000000000000 - 1;
  269|     13|   t3 += 0x8000000000000 - 1;
  270|     13|   t4 += 0x8000000000000 - 1;
  271|       |
  272|       |   /* now between 2^255 and 2^256-20, and offset by 2^255. */
  273|       |
  274|     13|   t1 += t0 >> 51U;
  275|     13|   t0 &= MASK_63;
  276|     13|   t2 += t1 >> 51U;
  277|     13|   t1 &= MASK_63;
  278|     13|   t3 += t2 >> 51U;
  279|     13|   t2 &= MASK_63;
  280|     13|   t4 += t3 >> 51U;
  281|     13|   t3 &= MASK_63;
  282|     13|   t4 &= MASK_63;
  283|       |
  284|     13|   store_le(out,
  285|     13|            combine_lower(t0, 0, t1, 51),
  286|     13|            combine_lower(t1, 13, t2, 38),
  287|     13|            combine_lower(t2, 26, t3, 25),
  288|     13|            combine_lower(t3, 39, t4, 12));
  289|     13|}

_ZN5Botan20curve25519_basepointEPhPKh:
   47|     10|void curve25519_basepoint(uint8_t mypublic[32], const uint8_t secret[32]) {
   48|     10|   const uint8_t basepoint[32] = {9};
   49|     10|   curve25519_donna(mypublic, secret, basepoint);
   50|     10|}
_ZN5Botan16X25519_PublicKeyC1ENSt3__14spanIKhLm18446744073709551615EEE:
   96|      7|X25519_PublicKey::X25519_PublicKey(std::span<const uint8_t> pub) {
   97|      7|   size_check(pub.size(), "public key");
   98|      7|   m_public = std::make_shared<const X25519_PublicKey_Data>(std::vector<uint8_t>(pub.begin(), pub.end()));
   99|      7|}
_ZNK5Botan16X25519_PublicKey19raw_public_key_bitsEv:
  101|     13|std::vector<uint8_t> X25519_PublicKey::raw_public_key_bits() const {
  102|     13|   return m_public->key();
  103|     13|}
_ZN5Botan17X25519_PrivateKeyC1ERNS_21RandomNumberGeneratorE:
  121|     10|X25519_PrivateKey::X25519_PrivateKey(RandomNumberGenerator& rng) {
  122|     10|   load_x25519_keypair(rng.random_vec(32), m_public, m_private);
  123|     10|}
_ZNK5Botan17X25519_PrivateKey23create_key_agreement_opERNS_21RandomNumberGeneratorENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEES7_:
  197|      3|                                                                                  std::string_view provider) const {
  198|      3|   if(provider == "base" || provider.empty()) {
  ------------------
  |  Branch (198:7): [True: 0, False: 3]
  |  Branch (198:29): [True: 3, False: 0]
  ------------------
  199|      3|      return std::make_unique<X25519_KA_Operation>(m_private, params);
  200|      3|   }
  201|      0|   throw Provider_Not_Found(algo_name(), provider);
  202|      3|}
_ZNK5Botan22X25519_PrivateKey_Data3keyEv:
   33|      3|      const secure_vector<uint8_t>& key() const { return m_key; }
x25519.cpp:_ZN5Botan12_GLOBAL__N_110size_checkEmPKc:
   54|     10|void size_check(size_t size, const char* thing) {
   55|     10|   if(size != 32) {
  ------------------
  |  Branch (55:7): [True: 4, False: 6]
  ------------------
   56|      4|      throw Decoding_Error(fmt("Invalid size {} for X25519 {}", size, thing));
   57|      4|   }
   58|     10|}
_ZNK5Botan21X25519_PublicKey_Data3keyEv:
   23|     13|      const std::vector<uint8_t>& key() const { return m_key; }
x25519.cpp:_ZN5Botan12_GLOBAL__N_119load_x25519_keypairENSt3__16vectorIhNS_16secure_allocatorIhEEEERNS1_10shared_ptrIKNS_21X25519_PublicKey_DataEEERNS6_IKNS_22X25519_PrivateKey_DataEEE:
   70|     10|                         std::shared_ptr<const X25519_PrivateKey_Data>& sk_out) {
   71|     10|   BOTAN_ASSERT_NOMSG(secret.size() == 32);
  ------------------
  |  |   84|     10|   do {                                                                     \
  |  |   85|     10|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     10|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 10]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     10|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 10]
  |  |  ------------------
  ------------------
   72|     10|   std::vector<uint8_t> pub(32);
   73|     10|   curve25519_basepoint(pub.data(), secret.data());
   74|     10|   pk_out = std::make_shared<const X25519_PublicKey_Data>(std::move(pub));
   75|     10|   sk_out = std::make_shared<const X25519_PrivateKey_Data>(std::move(secret));
   76|     10|}
_ZN5Botan22X25519_PrivateKey_DataC2ENSt3__16vectorIhNS_16secure_allocatorIhEEEE:
   31|     10|      explicit X25519_PrivateKey_Data(secure_vector<uint8_t> key) : m_key(std::move(key)) {}
x25519.cpp:_ZN5Botan12_GLOBAL__N_110curve25519ERKNSt3__16vectorIhNS_16secure_allocatorIhEEEEPKh:
   60|      3|secure_vector<uint8_t> curve25519(const secure_vector<uint8_t>& secret, const uint8_t pubval[32]) {
   61|      3|   secure_vector<uint8_t> out(32);
   62|      3|   curve25519_donna(out.data(), secret.data(), pubval);
   63|      3|   return out;
   64|      3|}
_ZN5Botan21X25519_PublicKey_DataC2ENSt3__16vectorIhNS1_9allocatorIhEEEE:
   21|     13|      explicit X25519_PublicKey_Data(std::vector<uint8_t> key) : m_key(std::move(key)) {}
x25519.cpp:_ZN5Botan12_GLOBAL__N_119X25519_KA_OperationC2ENSt3__110shared_ptrIKNS_22X25519_PrivateKey_DataEEENS2_17basic_string_viewIcNS2_11char_traitsIcEEEE:
  165|      3|            PK_Ops::Key_Agreement_with_KDF(kdf), m_key(std::move(key)) {}
x25519.cpp:_ZN5Botan12_GLOBAL__N_119X25519_KA_Operation9raw_agreeEPKhm:
  169|      3|      secure_vector<uint8_t> raw_agree(const uint8_t w[], size_t w_len) override {
  170|      3|         size_check(w_len, "public value");
  171|      3|         auto shared_key = curve25519(m_key->key(), w);
  172|       |
  173|       |         // RFC 7748 Section 6.1
  174|       |         //    Both [parties] MAY check, without leaking extra information about
  175|       |         //    the value of K, whether K is the all-zero value and abort if so.
  176|       |         //
  177|       |         // TODO: once the generic Key Agreement operation creation is equipped
  178|       |         //       with a more flexible parameterization, this check could be
  179|       |         //       made optional.
  180|       |         //       For instance: `sk->agree().with_optional_sanity_checks(true)`.
  181|       |         //       See also:     https://github.com/randombit/botan/pull/4318
  182|      3|         if(CT::all_zeros(shared_key.data(), shared_key.size()).as_bool()) {
  ------------------
  |  Branch (182:13): [True: 1, False: 2]
  ------------------
  183|      1|            throw Invalid_Argument("X25519 public point appears to be of low order");
  184|      1|         }
  185|       |
  186|      2|         return shared_key;
  187|      3|      }

_ZN5Botan10ChaCha_RNGC2ENSt3__14spanIKhLm18446744073709551615EEE:
   20|      1|ChaCha_RNG::ChaCha_RNG(std::span<const uint8_t> seed) {
   21|      1|   m_hmac = MessageAuthenticationCode::create_or_throw("HMAC(SHA-256)");
   22|      1|   m_chacha = StreamCipher::create_or_throw("ChaCha(20)");
   23|      1|   clear();
   24|      1|   add_entropy(seed);
   25|      1|}
_ZN5Botan10ChaCha_RNG11clear_stateEv:
   50|      1|void ChaCha_RNG::clear_state() {
   51|      1|   m_hmac->set_key(std::vector<uint8_t>(m_hmac->output_length(), 0x00));
   52|      1|   m_chacha->set_key(m_hmac->final());
   53|      1|}
_ZN5Botan10ChaCha_RNG15generate_outputENSt3__14spanIhLm18446744073709551615EEENS2_IKhLm18446744073709551615EEE:
   55|  35.3k|void ChaCha_RNG::generate_output(std::span<uint8_t> output, std::span<const uint8_t> input) {
   56|  35.3k|   BOTAN_ASSERT_NOMSG(!output.empty());
  ------------------
  |  |   84|  35.3k|   do {                                                                     \
  |  |   85|  35.3k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  35.3k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 35.3k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  35.3k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 35.3k]
  |  |  ------------------
  ------------------
   57|       |
   58|  35.3k|   if(!input.empty()) {
  ------------------
  |  Branch (58:7): [True: 0, False: 35.3k]
  ------------------
   59|      0|      update(input);
   60|      0|   }
   61|       |
   62|  35.3k|   m_chacha->write_keystream(output);
   63|  35.3k|}
_ZN5Botan10ChaCha_RNG6updateENSt3__14spanIKhLm18446744073709551615EEE:
   65|      1|void ChaCha_RNG::update(std::span<const uint8_t> input) {
   66|      1|   m_hmac->update(input);
   67|      1|   m_chacha->set_key(m_hmac->final());
   68|      1|   const auto mac_key = m_chacha->keystream_bytes(m_hmac->output_length());
   69|      1|   m_hmac->set_key(mac_key);
   70|      1|}
_ZNK5Botan10ChaCha_RNG14security_levelEv:
   72|      1|size_t ChaCha_RNG::security_level() const {
   73|      1|   return 256;
   74|      1|}

_ZN5Botan12Stateful_RNG5clearEv:
   15|      1|void Stateful_RNG::clear() {
   16|      1|   const lock_guard_type<recursive_mutex_type> lock(m_mutex);
   17|      1|   m_reseed_counter = 0;
   18|      1|   m_last_pid = 0;
   19|      1|   clear_state();
   20|      1|}
_ZNK5Botan12Stateful_RNG9is_seededEv:
   27|  56.3k|bool Stateful_RNG::is_seeded() const {
   28|  56.3k|   const lock_guard_type<recursive_mutex_type> lock(m_mutex);
   29|  56.3k|   return m_reseed_counter > 0;
   30|  56.3k|}
_ZN5Botan12Stateful_RNG23generate_batched_outputENSt3__14spanIhLm18446744073709551615EEENS2_IKhLm18446744073709551615EEE:
   39|  35.3k|void Stateful_RNG::generate_batched_output(std::span<uint8_t> output, std::span<const uint8_t> input) {
   40|  35.3k|   BOTAN_ASSERT_NOMSG(!output.empty());
  ------------------
  |  |   84|  35.3k|   do {                                                                     \
  |  |   85|  35.3k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  35.3k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 35.3k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  35.3k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 35.3k]
  |  |  ------------------
  ------------------
   41|       |
   42|  35.3k|   const size_t max_per_request = max_number_of_bytes_per_request();
   43|       |
   44|  35.3k|   if(max_per_request == 0) {
  ------------------
  |  Branch (44:7): [True: 35.3k, False: 0]
  ------------------
   45|       |      // no limit
   46|  35.3k|      reseed_check();
   47|  35.3k|      this->generate_output(output, input);
   48|  35.3k|   } else {
   49|      0|      while(!output.empty()) {
  ------------------
  |  Branch (49:13): [True: 0, False: 0]
  ------------------
   50|      0|         const size_t this_req = std::min(max_per_request, output.size());
   51|       |
   52|      0|         reseed_check();
   53|      0|         this->generate_output(output.subspan(0, this_req), input);
   54|       |
   55|       |         // only include the input for the first iteration
   56|      0|         input = {};
   57|       |
   58|      0|         output = output.subspan(this_req);
   59|      0|      }
   60|      0|   }
   61|  35.3k|}
_ZN5Botan12Stateful_RNG21fill_bytes_with_inputENSt3__14spanIhLm18446744073709551615EEENS2_IKhLm18446744073709551615EEE:
   63|  35.3k|void Stateful_RNG::fill_bytes_with_input(std::span<uint8_t> output, std::span<const uint8_t> input) {
   64|  35.3k|   const lock_guard_type<recursive_mutex_type> lock(m_mutex);
   65|       |
   66|  35.3k|   if(output.empty()) {
  ------------------
  |  Branch (66:7): [True: 1, False: 35.3k]
  ------------------
   67|       |      // Special case for exclusively adding entropy to the stateful RNG.
   68|      1|      this->update(input);
   69|       |
   70|      1|      if(8 * input.size() >= security_level()) {
  ------------------
  |  Branch (70:10): [True: 1, False: 0]
  ------------------
   71|      1|         reset_reseed_counter();
   72|      1|      }
   73|  35.3k|   } else {
   74|  35.3k|      generate_batched_output(output, input);
   75|  35.3k|   }
   76|  35.3k|}
_ZN5Botan12Stateful_RNG20reset_reseed_counterEv:
  100|      1|void Stateful_RNG::reset_reseed_counter() {
  101|       |   // Lock is held whenever this function is called
  102|      1|   m_reseed_counter = 1;
  103|      1|   m_last_pid = OS::get_process_id();
  104|      1|}
_ZN5Botan12Stateful_RNG12reseed_checkEv:
  106|  35.3k|void Stateful_RNG::reseed_check() {
  107|       |   // Lock is held whenever this function is called
  108|       |
  109|  35.3k|   const uint32_t cur_pid = OS::get_process_id();
  110|       |
  111|  35.3k|   const bool fork_detected = (m_last_pid > 0) && (cur_pid != m_last_pid);
  ------------------
  |  Branch (111:31): [True: 35.3k, False: 0]
  |  Branch (111:51): [True: 0, False: 35.3k]
  ------------------
  112|       |
  113|  35.3k|   if(is_seeded() == false || fork_detected || (m_reseed_interval > 0 && m_reseed_counter >= m_reseed_interval)) {
  ------------------
  |  Branch (113:7): [True: 0, False: 35.3k]
  |  Branch (113:31): [True: 0, False: 35.3k]
  |  Branch (113:49): [True: 0, False: 35.3k]
  |  Branch (113:74): [True: 0, False: 0]
  ------------------
  114|      0|      m_reseed_counter = 0;
  115|      0|      m_last_pid = cur_pid;
  116|       |
  117|      0|      if(m_underlying_rng != nullptr) {
  ------------------
  |  Branch (117:10): [True: 0, False: 0]
  ------------------
  118|      0|         reseed_from_rng(*m_underlying_rng, security_level());
  119|      0|      }
  120|       |
  121|      0|      if(m_entropy_sources != nullptr) {
  ------------------
  |  Branch (121:10): [True: 0, False: 0]
  ------------------
  122|      0|         reseed_from_sources(*m_entropy_sources, security_level());
  123|      0|      }
  124|       |
  125|      0|      if(!is_seeded()) {
  ------------------
  |  Branch (125:10): [True: 0, False: 0]
  ------------------
  126|      0|         if(fork_detected) {
  ------------------
  |  Branch (126:13): [True: 0, False: 0]
  ------------------
  127|      0|            throw Invalid_State("Detected use of fork but cannot reseed DRBG");
  128|      0|         } else {
  129|      0|            throw PRNG_Unseeded(name());
  130|      0|         }
  131|      0|      }
  132|  35.3k|   } else {
  133|  35.3k|      BOTAN_ASSERT(m_reseed_counter != 0, "RNG is seeded");
  ------------------
  |  |   71|  35.3k|   do {                                                                                 \
  |  |   72|  35.3k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|  35.3k|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 35.3k]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|  35.3k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 35.3k]
  |  |  ------------------
  ------------------
  134|  35.3k|      m_reseed_counter += 1;
  135|  35.3k|   }
  136|  35.3k|}

_ZN5Botan6ChaChaC2Em:
   92|      1|ChaCha::ChaCha(size_t rounds) : m_rounds(rounds) {
   93|      1|   BOTAN_ARG_CHECK(m_rounds == 8 || m_rounds == 12 || m_rounds == 20, "ChaCha only supports 8, 12 or 20 rounds");
  ------------------
  |  |   35|      1|   do {                                                          \
  |  |   36|      1|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|      4|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 0, False: 1]
  |  |  |  Branch (37:12): [True: 0, False: 1]
  |  |  |  Branch (37:12): [True: 1, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|      1|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1]
  |  |  ------------------
  ------------------
   94|      1|}
_ZN5Botan6ChaCha11parallelismEv:
   96|      2|size_t ChaCha::parallelism() {
   97|      2|#if defined(BOTAN_HAS_CHACHA_AVX512)
   98|      2|   if(CPUID::has(CPUID::Feature::AVX512)) {
  ------------------
  |  Branch (98:7): [True: 0, False: 2]
  ------------------
   99|      0|      return 16;
  100|      0|   }
  101|      2|#endif
  102|       |
  103|      2|#if defined(BOTAN_HAS_CHACHA_SIMD8X32)
  104|      2|   if(CPUID::has(CPUID::Feature::SIMD_8X32)) {
  ------------------
  |  Branch (104:7): [True: 2, False: 0]
  ------------------
  105|      2|      return 8;
  106|      2|   }
  107|      0|#endif
  108|       |
  109|      0|   return 4;
  110|      2|}
_ZN5Botan6ChaCha6chachaEPhmPjm:
  134|  2.69k|void ChaCha::chacha(uint8_t output[], size_t output_blocks, uint32_t state[16], size_t rounds) {
  135|  2.69k|   BOTAN_ASSERT(rounds % 2 == 0, "Valid rounds");
  ------------------
  |  |   71|  2.69k|   do {                                                                                 \
  |  |   72|  2.69k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|  2.69k|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 2.69k]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|  2.69k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 2.69k]
  |  |  ------------------
  ------------------
  136|       |
  137|  2.69k|#if defined(BOTAN_HAS_CHACHA_AVX512)
  138|  2.69k|   if(CPUID::has(CPUID::Feature::AVX512)) {
  ------------------
  |  Branch (138:7): [True: 0, False: 2.69k]
  ------------------
  139|      0|      while(output_blocks >= 16) {
  ------------------
  |  Branch (139:13): [True: 0, False: 0]
  ------------------
  140|      0|         ChaCha::chacha_avx512_x16(output, state, rounds);
  141|      0|         output += 16 * 64;
  142|      0|         output_blocks -= 16;
  143|      0|      }
  144|      0|   }
  145|  2.69k|#endif
  146|       |
  147|  2.69k|#if defined(BOTAN_HAS_CHACHA_SIMD8X32)
  148|  2.69k|   if(CPUID::has(CPUID::Feature::SIMD_8X32)) {
  ------------------
  |  Branch (148:7): [True: 2.69k, False: 0]
  ------------------
  149|  5.39k|      while(output_blocks >= 8) {
  ------------------
  |  Branch (149:13): [True: 2.69k, False: 2.69k]
  ------------------
  150|  2.69k|         ChaCha::chacha_simd8x32_x8(output, state, rounds);
  151|  2.69k|         output += 8 * 64;
  152|  2.69k|         output_blocks -= 8;
  153|  2.69k|      }
  154|  2.69k|   }
  155|  2.69k|#endif
  156|       |
  157|  2.69k|#if defined(BOTAN_HAS_CHACHA_SIMD32)
  158|  2.69k|   if(CPUID::has(CPUID::Feature::SIMD_4X32)) {
  ------------------
  |  Branch (158:7): [True: 2.69k, False: 0]
  ------------------
  159|  2.69k|      while(output_blocks >= 4) {
  ------------------
  |  Branch (159:13): [True: 0, False: 2.69k]
  ------------------
  160|      0|         ChaCha::chacha_simd32_x4(output, state, rounds);
  161|      0|         output += 4 * 64;
  162|      0|         output_blocks -= 4;
  163|      0|      }
  164|  2.69k|   }
  165|  2.69k|#endif
  166|       |
  167|       |   // TODO interleave rounds
  168|  2.69k|   for(size_t i = 0; i != output_blocks; ++i) {
  ------------------
  |  Branch (168:22): [True: 0, False: 2.69k]
  ------------------
  169|      0|      uint32_t x00 = state[0];
  170|      0|      uint32_t x01 = state[1];
  171|      0|      uint32_t x02 = state[2];
  172|      0|      uint32_t x03 = state[3];
  173|      0|      uint32_t x04 = state[4];
  174|      0|      uint32_t x05 = state[5];
  175|      0|      uint32_t x06 = state[6];
  176|      0|      uint32_t x07 = state[7];
  177|      0|      uint32_t x08 = state[8];
  178|      0|      uint32_t x09 = state[9];
  179|      0|      uint32_t x10 = state[10];
  180|      0|      uint32_t x11 = state[11];
  181|      0|      uint32_t x12 = state[12];
  182|      0|      uint32_t x13 = state[13];
  183|      0|      uint32_t x14 = state[14];
  184|      0|      uint32_t x15 = state[15];
  185|       |
  186|      0|      for(size_t r = 0; r != rounds / 2; ++r) {
  ------------------
  |  Branch (186:25): [True: 0, False: 0]
  ------------------
  187|      0|         chacha_quarter_round(x00, x04, x08, x12);
  188|      0|         chacha_quarter_round(x01, x05, x09, x13);
  189|      0|         chacha_quarter_round(x02, x06, x10, x14);
  190|      0|         chacha_quarter_round(x03, x07, x11, x15);
  191|       |
  192|      0|         chacha_quarter_round(x00, x05, x10, x15);
  193|      0|         chacha_quarter_round(x01, x06, x11, x12);
  194|      0|         chacha_quarter_round(x02, x07, x08, x13);
  195|      0|         chacha_quarter_round(x03, x04, x09, x14);
  196|      0|      }
  197|       |
  198|      0|      x00 += state[0];
  199|      0|      x01 += state[1];
  200|      0|      x02 += state[2];
  201|      0|      x03 += state[3];
  202|      0|      x04 += state[4];
  203|      0|      x05 += state[5];
  204|      0|      x06 += state[6];
  205|      0|      x07 += state[7];
  206|      0|      x08 += state[8];
  207|      0|      x09 += state[9];
  208|      0|      x10 += state[10];
  209|      0|      x11 += state[11];
  210|      0|      x12 += state[12];
  211|      0|      x13 += state[13];
  212|      0|      x14 += state[14];
  213|      0|      x15 += state[15];
  214|       |
  215|      0|      store_le(x00, output + 64 * i + 4 * 0);
  216|      0|      store_le(x01, output + 64 * i + 4 * 1);
  217|      0|      store_le(x02, output + 64 * i + 4 * 2);
  218|      0|      store_le(x03, output + 64 * i + 4 * 3);
  219|      0|      store_le(x04, output + 64 * i + 4 * 4);
  220|      0|      store_le(x05, output + 64 * i + 4 * 5);
  221|      0|      store_le(x06, output + 64 * i + 4 * 6);
  222|      0|      store_le(x07, output + 64 * i + 4 * 7);
  223|      0|      store_le(x08, output + 64 * i + 4 * 8);
  224|      0|      store_le(x09, output + 64 * i + 4 * 9);
  225|      0|      store_le(x10, output + 64 * i + 4 * 10);
  226|      0|      store_le(x11, output + 64 * i + 4 * 11);
  227|      0|      store_le(x12, output + 64 * i + 4 * 12);
  228|      0|      store_le(x13, output + 64 * i + 4 * 13);
  229|      0|      store_le(x14, output + 64 * i + 4 * 14);
  230|      0|      store_le(x15, output + 64 * i + 4 * 15);
  231|       |
  232|      0|      state[12]++;
  233|      0|      if(state[12] == 0) {
  ------------------
  |  Branch (233:10): [True: 0, False: 0]
  ------------------
  234|      0|         state[13] += 1;
  235|      0|      }
  236|      0|   }
  237|  2.69k|}
_ZN5Botan6ChaCha18generate_keystreamEPhm:
  269|  35.3k|void ChaCha::generate_keystream(uint8_t out[], size_t length) {
  270|  35.3k|   assert_key_material_set();
  271|       |
  272|  35.3k|   if(m_iv_length == 12) {
  ------------------
  |  Branch (272:7): [True: 0, False: 35.3k]
  ------------------
  273|      0|      if(length > m_bytes_remaining) {
  ------------------
  |  Branch (273:10): [True: 0, False: 0]
  ------------------
  274|      0|         throw Invalid_State("ChaCha 96-bit nonce keystream exhausted");
  275|      0|      }
  276|      0|      m_bytes_remaining -= length;
  277|      0|   }
  278|       |
  279|  38.0k|   while(length >= m_buffer.size() - m_position) {
  ------------------
  |  Branch (279:10): [True: 2.69k, False: 35.3k]
  ------------------
  280|  2.69k|      const size_t available = m_buffer.size() - m_position;
  281|       |
  282|       |      // TODO: this could write directly to the output buffer
  283|       |      // instead of bouncing it through m_buffer first
  284|  2.69k|      copy_mem(out, &m_buffer[m_position], available);
  285|  2.69k|      chacha(m_buffer.data(), m_buffer.size() / 64, m_state.data(), m_rounds);
  286|       |
  287|  2.69k|      length -= available;
  288|  2.69k|      out += available;
  289|  2.69k|      m_position = 0;
  290|  2.69k|   }
  291|       |
  292|  35.3k|   copy_mem(out, &m_buffer[m_position], length);
  293|       |
  294|  35.3k|   m_position += length;
  295|  35.3k|}
_ZN5Botan6ChaCha16initialize_stateEv:
  297|      2|void ChaCha::initialize_state() {
  298|      2|   static const uint32_t TAU[] = {0x61707865, 0x3120646e, 0x79622d36, 0x6b206574};
  299|       |
  300|      2|   static const uint32_t SIGMA[] = {0x61707865, 0x3320646e, 0x79622d32, 0x6b206574};
  301|       |
  302|      2|   m_state[4] = m_key[0];
  303|      2|   m_state[5] = m_key[1];
  304|      2|   m_state[6] = m_key[2];
  305|      2|   m_state[7] = m_key[3];
  306|       |
  307|      2|   if(m_key.size() == 4) {
  ------------------
  |  Branch (307:7): [True: 0, False: 2]
  ------------------
  308|      0|      m_state[0] = TAU[0];
  309|      0|      m_state[1] = TAU[1];
  310|      0|      m_state[2] = TAU[2];
  311|      0|      m_state[3] = TAU[3];
  312|       |
  313|      0|      m_state[8] = m_key[0];
  314|      0|      m_state[9] = m_key[1];
  315|      0|      m_state[10] = m_key[2];
  316|      0|      m_state[11] = m_key[3];
  317|      2|   } else {
  318|      2|      m_state[0] = SIGMA[0];
  319|      2|      m_state[1] = SIGMA[1];
  320|      2|      m_state[2] = SIGMA[2];
  321|      2|      m_state[3] = SIGMA[3];
  322|       |
  323|      2|      m_state[8] = m_key[4];
  324|      2|      m_state[9] = m_key[5];
  325|      2|      m_state[10] = m_key[6];
  326|      2|      m_state[11] = m_key[7];
  327|      2|   }
  328|       |
  329|      2|   m_state[12] = 0;
  330|      2|   m_state[13] = 0;
  331|      2|   m_state[14] = 0;
  332|      2|   m_state[15] = 0;
  333|       |
  334|      2|   m_position = 0;
  335|      2|}
_ZNK5Botan6ChaCha19has_keying_materialEv:
  337|  35.3k|bool ChaCha::has_keying_material() const {
  338|  35.3k|   return !m_state.empty();
  339|  35.3k|}
_ZN5Botan6ChaCha12key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
  348|      2|void ChaCha::key_schedule(std::span<const uint8_t> key) {
  349|      2|   m_key.resize(key.size() / 4);
  350|      2|   load_le<uint32_t>(m_key.data(), key.data(), m_key.size());
  351|       |
  352|      2|   m_state.resize(16);
  353|       |
  354|      2|   const size_t chacha_block = 64;
  355|      2|   m_buffer.resize(parallelism() * chacha_block);
  356|       |
  357|      2|   set_iv(nullptr, 0);
  358|      2|}
_ZNK5Botan6ChaCha8key_specEv:
  364|      2|Key_Length_Specification ChaCha::key_spec() const {
  365|      2|   return Key_Length_Specification(16, 32, 16);
  366|      2|}
_ZNK5Botan6ChaCha15valid_iv_lengthEm:
  372|      2|bool ChaCha::valid_iv_length(size_t iv_len) const {
  373|      2|   return (iv_len == 0 || iv_len == 8 || iv_len == 12 || iv_len == 24);
  ------------------
  |  Branch (373:12): [True: 2, False: 0]
  |  Branch (373:27): [True: 0, False: 0]
  |  Branch (373:42): [True: 0, False: 0]
  |  Branch (373:58): [True: 0, False: 0]
  ------------------
  374|      2|}
_ZN5Botan6ChaCha12set_iv_bytesEPKhm:
  376|      2|void ChaCha::set_iv_bytes(const uint8_t iv[], size_t length) {
  377|      2|   assert_key_material_set();
  378|       |
  379|      2|   if(!valid_iv_length(length)) {
  ------------------
  |  Branch (379:7): [True: 0, False: 2]
  ------------------
  380|      0|      throw Invalid_IV_Length(name(), length);
  381|      0|   }
  382|       |
  383|      2|   initialize_state();
  384|       |
  385|      2|   if(length == 0) {
  ------------------
  |  Branch (385:7): [True: 2, False: 0]
  ------------------
  386|       |      // Treat zero length IV same as an all-zero IV
  387|      2|      m_state[14] = 0;
  388|      2|      m_state[15] = 0;
  389|      2|   } else if(length == 8) {
  ------------------
  |  Branch (389:14): [True: 0, False: 0]
  ------------------
  390|      0|      m_state[14] = load_le<uint32_t>(iv, 0);
  391|      0|      m_state[15] = load_le<uint32_t>(iv, 1);
  392|      0|   } else if(length == 12) {
  ------------------
  |  Branch (392:14): [True: 0, False: 0]
  ------------------
  393|      0|      m_state[13] = load_le<uint32_t>(iv, 0);
  394|      0|      m_state[14] = load_le<uint32_t>(iv, 1);
  395|      0|      m_state[15] = load_le<uint32_t>(iv, 2);
  396|      0|   } else if(length == 24) {
  ------------------
  |  Branch (396:14): [True: 0, False: 0]
  ------------------
  397|      0|      m_state[12] = load_le<uint32_t>(iv, 0);
  398|      0|      m_state[13] = load_le<uint32_t>(iv, 1);
  399|      0|      m_state[14] = load_le<uint32_t>(iv, 2);
  400|      0|      m_state[15] = load_le<uint32_t>(iv, 3);
  401|       |
  402|      0|      secure_vector<uint32_t> hc(8);
  403|      0|      hchacha(hc.data(), m_state.data(), m_rounds);
  404|       |
  405|      0|      m_state[4] = hc[0];
  406|      0|      m_state[5] = hc[1];
  407|      0|      m_state[6] = hc[2];
  408|      0|      m_state[7] = hc[3];
  409|      0|      m_state[8] = hc[4];
  410|      0|      m_state[9] = hc[5];
  411|      0|      m_state[10] = hc[6];
  412|      0|      m_state[11] = hc[7];
  413|      0|      m_state[12] = 0;
  414|      0|      m_state[13] = 0;
  415|      0|      m_state[14] = load_le<uint32_t>(iv, 4);
  416|      0|      m_state[15] = load_le<uint32_t>(iv, 5);
  417|      0|   }
  418|       |
  419|      2|   m_iv_length = length;
  420|      2|   m_state13_post_iv = m_state[13];
  421|      2|   if(length == 12) {
  ------------------
  |  Branch (421:7): [True: 0, False: 2]
  ------------------
  422|      0|      m_bytes_remaining = chacha_96bit_nonce_cap;
  423|      0|   }
  424|       |
  425|      2|   chacha(m_buffer.data(), m_buffer.size() / 64, m_state.data(), m_rounds);
  426|      2|   m_position = 0;
  427|      2|}

_ZN5Botan6ChaCha18chacha_simd8x32_x8EPhPjm:
   15|  2.69k|void BOTAN_FN_ISA_SIMD_8X32 ChaCha::chacha_simd8x32_x8(uint8_t output[64 * 8], uint32_t state[16], size_t rounds) {
   16|  2.69k|   SIMD_8x32::reset_registers();
   17|       |
   18|  2.69k|   BOTAN_ASSERT(rounds % 2 == 0, "Valid rounds");
  ------------------
  |  |   71|  2.69k|   do {                                                                                 \
  |  |   72|  2.69k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|  2.69k|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 2.69k]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|  2.69k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 2.69k]
  |  |  ------------------
  ------------------
   19|       |
   20|  2.69k|   const SIMD_8x32 CTR_LO = SIMD_8x32::splat(state[12]) + SIMD_8x32(0, 1, 2, 3, 4, 5, 6, 7);
   21|       |   // Carry into the high counter word for lanes whose low word wrapped
   22|  2.69k|   const SIMD_8x32 CTR_HI = SIMD_8x32::splat(state[13]) - CTR_LO.unsigned_lt(SIMD_8x32::splat(state[12]));
   23|       |
   24|  2.69k|   SIMD_8x32 R00 = SIMD_8x32::splat(state[0]);
   25|  2.69k|   SIMD_8x32 R01 = SIMD_8x32::splat(state[1]);
   26|  2.69k|   SIMD_8x32 R02 = SIMD_8x32::splat(state[2]);
   27|  2.69k|   SIMD_8x32 R03 = SIMD_8x32::splat(state[3]);
   28|  2.69k|   SIMD_8x32 R04 = SIMD_8x32::splat(state[4]);
   29|  2.69k|   SIMD_8x32 R05 = SIMD_8x32::splat(state[5]);
   30|  2.69k|   SIMD_8x32 R06 = SIMD_8x32::splat(state[6]);
   31|  2.69k|   SIMD_8x32 R07 = SIMD_8x32::splat(state[7]);
   32|  2.69k|   SIMD_8x32 R08 = SIMD_8x32::splat(state[8]);
   33|  2.69k|   SIMD_8x32 R09 = SIMD_8x32::splat(state[9]);
   34|  2.69k|   SIMD_8x32 R10 = SIMD_8x32::splat(state[10]);
   35|  2.69k|   SIMD_8x32 R11 = SIMD_8x32::splat(state[11]);
   36|  2.69k|   SIMD_8x32 R12 = CTR_LO;
   37|  2.69k|   SIMD_8x32 R13 = CTR_HI;
   38|  2.69k|   SIMD_8x32 R14 = SIMD_8x32::splat(state[14]);
   39|  2.69k|   SIMD_8x32 R15 = SIMD_8x32::splat(state[15]);
   40|       |
   41|  29.6k|   for(size_t r = 0; r != rounds / 2; ++r) {
  ------------------
  |  Branch (41:22): [True: 26.9k, False: 2.69k]
  ------------------
   42|  26.9k|      R00 += R04;
   43|  26.9k|      R01 += R05;
   44|  26.9k|      R02 += R06;
   45|  26.9k|      R03 += R07;
   46|       |
   47|  26.9k|      R12 ^= R00;
   48|  26.9k|      R13 ^= R01;
   49|  26.9k|      R14 ^= R02;
   50|  26.9k|      R15 ^= R03;
   51|       |
   52|  26.9k|      R12 = R12.rotl<16>();
   53|  26.9k|      R13 = R13.rotl<16>();
   54|  26.9k|      R14 = R14.rotl<16>();
   55|  26.9k|      R15 = R15.rotl<16>();
   56|       |
   57|  26.9k|      R08 += R12;
   58|  26.9k|      R09 += R13;
   59|  26.9k|      R10 += R14;
   60|  26.9k|      R11 += R15;
   61|       |
   62|  26.9k|      R04 ^= R08;
   63|  26.9k|      R05 ^= R09;
   64|  26.9k|      R06 ^= R10;
   65|  26.9k|      R07 ^= R11;
   66|       |
   67|  26.9k|      R04 = R04.rotl<12>();
   68|  26.9k|      R05 = R05.rotl<12>();
   69|  26.9k|      R06 = R06.rotl<12>();
   70|  26.9k|      R07 = R07.rotl<12>();
   71|       |
   72|  26.9k|      R00 += R04;
   73|  26.9k|      R01 += R05;
   74|  26.9k|      R02 += R06;
   75|  26.9k|      R03 += R07;
   76|       |
   77|  26.9k|      R12 ^= R00;
   78|  26.9k|      R13 ^= R01;
   79|  26.9k|      R14 ^= R02;
   80|  26.9k|      R15 ^= R03;
   81|       |
   82|  26.9k|      R12 = R12.rotl<8>();
   83|  26.9k|      R13 = R13.rotl<8>();
   84|  26.9k|      R14 = R14.rotl<8>();
   85|  26.9k|      R15 = R15.rotl<8>();
   86|       |
   87|  26.9k|      R08 += R12;
   88|  26.9k|      R09 += R13;
   89|  26.9k|      R10 += R14;
   90|  26.9k|      R11 += R15;
   91|       |
   92|  26.9k|      R04 ^= R08;
   93|  26.9k|      R05 ^= R09;
   94|  26.9k|      R06 ^= R10;
   95|  26.9k|      R07 ^= R11;
   96|       |
   97|  26.9k|      R04 = R04.rotl<7>();
   98|  26.9k|      R05 = R05.rotl<7>();
   99|  26.9k|      R06 = R06.rotl<7>();
  100|  26.9k|      R07 = R07.rotl<7>();
  101|       |
  102|  26.9k|      R00 += R05;
  103|  26.9k|      R01 += R06;
  104|  26.9k|      R02 += R07;
  105|  26.9k|      R03 += R04;
  106|       |
  107|  26.9k|      R15 ^= R00;
  108|  26.9k|      R12 ^= R01;
  109|  26.9k|      R13 ^= R02;
  110|  26.9k|      R14 ^= R03;
  111|       |
  112|  26.9k|      R15 = R15.rotl<16>();
  113|  26.9k|      R12 = R12.rotl<16>();
  114|  26.9k|      R13 = R13.rotl<16>();
  115|  26.9k|      R14 = R14.rotl<16>();
  116|       |
  117|  26.9k|      R10 += R15;
  118|  26.9k|      R11 += R12;
  119|  26.9k|      R08 += R13;
  120|  26.9k|      R09 += R14;
  121|       |
  122|  26.9k|      R05 ^= R10;
  123|  26.9k|      R06 ^= R11;
  124|  26.9k|      R07 ^= R08;
  125|  26.9k|      R04 ^= R09;
  126|       |
  127|  26.9k|      R05 = R05.rotl<12>();
  128|  26.9k|      R06 = R06.rotl<12>();
  129|  26.9k|      R07 = R07.rotl<12>();
  130|  26.9k|      R04 = R04.rotl<12>();
  131|       |
  132|  26.9k|      R00 += R05;
  133|  26.9k|      R01 += R06;
  134|  26.9k|      R02 += R07;
  135|  26.9k|      R03 += R04;
  136|       |
  137|  26.9k|      R15 ^= R00;
  138|  26.9k|      R12 ^= R01;
  139|  26.9k|      R13 ^= R02;
  140|  26.9k|      R14 ^= R03;
  141|       |
  142|  26.9k|      R15 = R15.rotl<8>();
  143|  26.9k|      R12 = R12.rotl<8>();
  144|  26.9k|      R13 = R13.rotl<8>();
  145|  26.9k|      R14 = R14.rotl<8>();
  146|       |
  147|  26.9k|      R10 += R15;
  148|  26.9k|      R11 += R12;
  149|  26.9k|      R08 += R13;
  150|  26.9k|      R09 += R14;
  151|       |
  152|  26.9k|      R05 ^= R10;
  153|  26.9k|      R06 ^= R11;
  154|  26.9k|      R07 ^= R08;
  155|  26.9k|      R04 ^= R09;
  156|       |
  157|  26.9k|      R05 = R05.rotl<7>();
  158|  26.9k|      R06 = R06.rotl<7>();
  159|  26.9k|      R07 = R07.rotl<7>();
  160|  26.9k|      R04 = R04.rotl<7>();
  161|  26.9k|   }
  162|       |
  163|  2.69k|   R00 += SIMD_8x32::splat(state[0]);
  164|  2.69k|   R01 += SIMD_8x32::splat(state[1]);
  165|  2.69k|   R02 += SIMD_8x32::splat(state[2]);
  166|  2.69k|   R03 += SIMD_8x32::splat(state[3]);
  167|  2.69k|   R04 += SIMD_8x32::splat(state[4]);
  168|  2.69k|   R05 += SIMD_8x32::splat(state[5]);
  169|  2.69k|   R06 += SIMD_8x32::splat(state[6]);
  170|  2.69k|   R07 += SIMD_8x32::splat(state[7]);
  171|  2.69k|   R08 += SIMD_8x32::splat(state[8]);
  172|  2.69k|   R09 += SIMD_8x32::splat(state[9]);
  173|  2.69k|   R10 += SIMD_8x32::splat(state[10]);
  174|  2.69k|   R11 += SIMD_8x32::splat(state[11]);
  175|  2.69k|   R12 += CTR_LO;
  176|  2.69k|   R13 += CTR_HI;
  177|  2.69k|   R14 += SIMD_8x32::splat(state[14]);
  178|  2.69k|   R15 += SIMD_8x32::splat(state[15]);
  179|       |
  180|  2.69k|   SIMD_8x32::transpose(R00, R01, R02, R03, R04, R05, R06, R07);
  181|  2.69k|   SIMD_8x32::transpose(R08, R09, R10, R11, R12, R13, R14, R15);
  182|       |
  183|  2.69k|   R00.store_le(output);
  184|  2.69k|   R08.store_le(output + 32 * 1);
  185|  2.69k|   R01.store_le(output + 32 * 2);
  186|  2.69k|   R09.store_le(output + 32 * 3);
  187|  2.69k|   R02.store_le(output + 32 * 4);
  188|  2.69k|   R10.store_le(output + 32 * 5);
  189|  2.69k|   R03.store_le(output + 32 * 6);
  190|  2.69k|   R11.store_le(output + 32 * 7);
  191|  2.69k|   R04.store_le(output + 32 * 8);
  192|  2.69k|   R12.store_le(output + 32 * 9);
  193|  2.69k|   R05.store_le(output + 32 * 10);
  194|  2.69k|   R13.store_le(output + 32 * 11);
  195|  2.69k|   R06.store_le(output + 32 * 12);
  196|  2.69k|   R14.store_le(output + 32 * 13);
  197|  2.69k|   R07.store_le(output + 32 * 14);
  198|  2.69k|   R15.store_le(output + 32 * 15);
  199|       |
  200|  2.69k|   SIMD_8x32::zero_registers();
  201|       |
  202|  2.69k|   state[12] += 8;
  203|  2.69k|   if(state[12] < 8) {
  ------------------
  |  Branch (203:7): [True: 0, False: 2.69k]
  ------------------
  204|      0|      state[13]++;
  205|      0|   }
  206|  2.69k|}

_ZN5Botan6CTR_BEC2ENSt3__110unique_ptrINS_11BlockCipherENS1_14default_deleteIS3_EEEEm:
   31|    134|      m_cipher(std::move(cipher)),
   32|    134|      m_block_size(m_cipher->block_size()),
   33|    134|      m_ctr_size(ctr_size),
   34|    134|      m_ctr_blocks(m_cipher->parallel_bytes() / m_block_size),
   35|    134|      m_counter(m_cipher->parallel_bytes()),
   36|    134|      m_pad(m_counter.size()),
   37|    134|      m_pad_pos(0) {
   38|    134|   BOTAN_ARG_CHECK(m_ctr_size >= 4 && m_ctr_size <= m_block_size, "Invalid CTR-BE counter size");
  ------------------
  |  |   35|    134|   do {                                                          \
  |  |   36|    134|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    268|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 134, False: 0]
  |  |  |  Branch (37:12): [True: 134, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    134|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 134]
  |  |  ------------------
  ------------------
   39|    134|}
_ZNK5Botan6CTR_BE15valid_iv_lengthEm:
   61|    382|bool CTR_BE::valid_iv_length(size_t iv_len) const {
   62|    382|   return (iv_len <= m_block_size);
   63|    382|}
_ZNK5Botan6CTR_BE8key_specEv:
   69|    268|Key_Length_Specification CTR_BE::key_spec() const {
   70|    268|   return m_cipher->key_spec();
   71|    268|}
_ZNK5Botan6CTR_BE19has_keying_materialEv:
   77|    743|bool CTR_BE::has_keying_material() const {
   78|    743|   return m_cipher->has_keying_material();
   79|    743|}
_ZN5Botan6CTR_BE12key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
   81|    134|void CTR_BE::key_schedule(std::span<const uint8_t> key) {
   82|    134|   m_cipher->set_key(key);
   83|       |
   84|       |   // Set a default all-zeros IV
   85|    134|   set_iv(nullptr, 0);
   86|    134|}
_ZN5Botan6CTR_BE12cipher_bytesEPKhPhm:
   96|    361|void CTR_BE::cipher_bytes(const uint8_t in[], uint8_t out[], size_t length) {
   97|    361|   assert_key_material_set();
   98|       |
   99|    361|   if(m_ctr_size < sizeof(uint64_t)) {
  ------------------
  |  Branch (99:7): [True: 361, False: 0]
  ------------------
  100|    361|      if(length > m_bytes_remaining) {
  ------------------
  |  Branch (100:10): [True: 0, False: 361]
  ------------------
  101|      0|         throw Invalid_State(fmt("CTR_BE with {}-byte counter has exhausted its keystream", m_ctr_size));
  102|      0|      }
  103|    361|      m_bytes_remaining -= length;
  104|    361|   }
  105|       |
  106|    361|   const uint8_t* pad_bits = m_pad.data();
  107|    361|   const size_t pad_size = m_pad.size();
  108|       |
  109|       |   /* Consume any already computed keystream in m_pad */
  110|       |
  111|    361|   if(m_pad_pos > 0) {
  ------------------
  |  Branch (111:7): [True: 113, False: 248]
  ------------------
  112|    113|      const size_t avail = pad_size - m_pad_pos;
  113|    113|      const size_t take = std::min(length, avail);
  114|    113|      xor_buf(out, in, pad_bits + m_pad_pos, take);
  115|    113|      length -= take;
  116|    113|      in += take;
  117|    113|      out += take;
  118|    113|      m_pad_pos += take;
  119|       |
  120|    113|      if(take == avail) {
  ------------------
  |  Branch (120:10): [True: 57, False: 56]
  ------------------
  121|     57|         add_counter(m_ctr_blocks);
  122|     57|         m_cipher->encrypt_n(m_counter.data(), m_pad.data(), m_ctr_blocks);
  123|     57|         m_pad_pos = 0;
  124|     57|      }
  125|    113|   }
  126|       |
  127|       |   /* Bulk processing */
  128|       |
  129|    361|   [[maybe_unused]] const bool can_use_bs16_ctr4_fastpath = m_block_size == 16 && m_ctr_size == 4 && pad_size % 64 == 0;
  ------------------
  |  Branch (129:61): [True: 361, False: 0]
  |  Branch (129:83): [True: 361, False: 0]
  |  Branch (129:102): [True: 361, False: 0]
  ------------------
  130|       |
  131|    361|#if defined(BOTAN_HAS_CTR_BE_SIMD8X32)
  132|    361|   if(length >= pad_size && can_use_bs16_ctr4_fastpath && CPUID::has(CPUID::Feature::SIMD_8X32)) {
  ------------------
  |  Branch (132:7): [True: 44, False: 317]
  |  Branch (132:29): [True: 44, False: 0]
  |  Branch (132:59): [True: 44, False: 0]
  ------------------
  133|     44|      const size_t consumed = ctr_proc_bs16_ctr4_simd8x32(in, out, length);
  134|     44|      in += consumed;
  135|     44|      out += consumed;
  136|     44|      length -= consumed;
  137|     44|   }
  138|    361|#endif
  139|       |
  140|    361|#if defined(BOTAN_HAS_CTR_BE_SIMD32)
  141|    361|   if(length >= pad_size && can_use_bs16_ctr4_fastpath && CPUID::has(CPUID::Feature::SIMD_4X32)) {
  ------------------
  |  Branch (141:7): [True: 0, False: 361]
  |  Branch (141:29): [True: 0, False: 0]
  |  Branch (141:59): [True: 0, False: 0]
  ------------------
  142|      0|      const size_t consumed = ctr_proc_bs16_ctr4_simd32(in, out, length);
  143|      0|      in += consumed;
  144|      0|      out += consumed;
  145|      0|      length -= consumed;
  146|      0|   }
  147|    361|#endif
  148|       |
  149|    361|   while(length >= pad_size) {
  ------------------
  |  Branch (149:10): [True: 0, False: 361]
  ------------------
  150|      0|      xor_buf(out, in, pad_bits, pad_size);
  151|      0|      length -= pad_size;
  152|      0|      in += pad_size;
  153|      0|      out += pad_size;
  154|       |
  155|      0|      add_counter(m_ctr_blocks);
  156|      0|      m_cipher->encrypt_n(m_counter.data(), m_pad.data(), m_ctr_blocks);
  157|      0|   }
  158|       |
  159|       |   /* Now if length > 0 then we have some remaining text, and m_pad is full - consume as required */
  160|    361|   if(length > 0) {
  ------------------
  |  Branch (160:7): [True: 302, False: 59]
  ------------------
  161|    302|      xor_buf(out, in, pad_bits, length);
  162|    302|      m_pad_pos = length;
  163|    302|   }
  164|    361|}
_ZN5Botan6CTR_BE12set_iv_bytesEPKhm:
  202|    382|void CTR_BE::set_iv_bytes(const uint8_t iv[], size_t iv_len) {
  203|    382|   if(!valid_iv_length(iv_len)) {
  ------------------
  |  Branch (203:7): [True: 0, False: 382]
  ------------------
  204|      0|      throw Invalid_IV_Length(name(), iv_len);
  205|      0|   }
  206|       |
  207|    382|   m_iv.resize(m_block_size);
  208|    382|   zeroise(m_iv);
  209|    382|   copy_mem(m_iv.data(), iv, iv_len);
  210|       |
  211|    382|   seek(0);
  212|    382|}
_ZN5Botan6CTR_BE11add_counterEm:
  214|     57|void CTR_BE::add_counter(const uint64_t counter) {
  215|     57|   const size_t ctr_size = m_ctr_size;
  216|     57|   const size_t ctr_blocks = m_ctr_blocks;
  217|     57|   const size_t BS = m_block_size;
  218|       |
  219|     57|   if(ctr_size == 4) {
  ------------------
  |  Branch (219:7): [True: 57, False: 0]
  ------------------
  220|     57|      const size_t off = (BS - 4);
  221|     57|      const uint32_t low32 = static_cast<uint32_t>(counter + load_be<uint32_t>(&m_counter[off], 0));
  222|       |
  223|    753|      for(size_t i = 0; i != ctr_blocks; ++i) {
  ------------------
  |  Branch (223:25): [True: 696, False: 57]
  ------------------
  224|    696|         store_be(uint32_t(low32 + i), &m_counter[i * BS + off]);
  225|    696|      }
  226|     57|   } else if(ctr_size == 8) {
  ------------------
  |  Branch (226:14): [True: 0, False: 0]
  ------------------
  227|      0|      const size_t off = (BS - 8);
  228|      0|      const uint64_t low64 = counter + load_be<uint64_t>(&m_counter[off], 0);
  229|       |
  230|      0|      for(size_t i = 0; i != ctr_blocks; ++i) {
  ------------------
  |  Branch (230:25): [True: 0, False: 0]
  ------------------
  231|      0|         store_be(uint64_t(low64 + i), &m_counter[i * BS + off]);
  232|      0|      }
  233|      0|   } else if(ctr_size == 16) {
  ------------------
  |  Branch (233:14): [True: 0, False: 0]
  ------------------
  234|      0|      const size_t off = (BS - 16);
  235|      0|      uint64_t b0 = load_be<uint64_t>(&m_counter[off], 0);
  236|      0|      uint64_t b1 = load_be<uint64_t>(&m_counter[off], 1);
  237|      0|      b1 += counter;
  238|      0|      b0 += (b1 < counter) ? 1 : 0;  // carry
  ------------------
  |  Branch (238:13): [True: 0, False: 0]
  ------------------
  239|       |
  240|      0|      for(size_t i = 0; i != ctr_blocks; ++i) {
  ------------------
  |  Branch (240:25): [True: 0, False: 0]
  ------------------
  241|      0|         store_be(b0, &m_counter[i * BS + off]);
  242|      0|         store_be(b1, &m_counter[i * BS + off + 8]);
  243|      0|         b1 += 1;
  244|      0|         if(b1 == 0) {
  ------------------
  |  Branch (244:13): [True: 0, False: 0]
  ------------------
  245|      0|            b0 += 1;  // carry
  246|      0|         }
  247|      0|      }
  248|      0|   } else {
  249|      0|      for(size_t i = 0; i != ctr_blocks; ++i) {
  ------------------
  |  Branch (249:25): [True: 0, False: 0]
  ------------------
  250|      0|         uint64_t local_counter = counter;
  251|      0|         uint16_t carry = static_cast<uint8_t>(local_counter);
  252|      0|         for(size_t j = 0; (carry > 0 || local_counter > 0) && j != ctr_size; ++j) {
  ------------------
  |  Branch (252:29): [True: 0, False: 0]
  |  Branch (252:42): [True: 0, False: 0]
  |  Branch (252:64): [True: 0, False: 0]
  ------------------
  253|      0|            const size_t off = i * BS + (BS - 1 - j);
  254|      0|            const uint16_t cnt = static_cast<uint16_t>(m_counter[off]) + carry;
  255|      0|            m_counter[off] = static_cast<uint8_t>(cnt);
  256|      0|            local_counter = (local_counter >> 8);
  257|      0|            carry = (cnt >> 8) + static_cast<uint8_t>(local_counter);
  258|      0|         }
  259|      0|      }
  260|      0|   }
  261|     57|}
_ZN5Botan6CTR_BE4seekEm:
  263|    382|void CTR_BE::seek(uint64_t offset) {
  264|    382|   assert_key_material_set();
  265|       |
  266|    382|   if(m_ctr_size < sizeof(uint64_t)) {
  ------------------
  |  Branch (266:7): [True: 382, False: 0]
  ------------------
  267|    382|      const uint64_t requested_block = offset / m_block_size;
  268|    382|      const uint64_t max_blocks = uint64_t{1} << (8 * m_ctr_size);
  269|    382|      if(requested_block >= max_blocks) {
  ------------------
  |  Branch (269:10): [True: 0, False: 382]
  ------------------
  270|      0|         throw Invalid_Argument(fmt("CTR_BE::seek offset {} exceeds {}-byte counter range", offset, m_ctr_size));
  271|      0|      }
  272|       |
  273|    382|      m_bytes_remaining = max_blocks * m_block_size - offset;
  274|    382|   }
  275|       |
  276|    382|   const uint64_t base_counter = m_ctr_blocks * (offset / m_counter.size());
  277|       |
  278|    382|   zeroise(m_counter);
  279|    382|   BOTAN_ASSERT_NOMSG(m_counter.size() >= m_iv.size());
  ------------------
  |  |   84|    382|   do {                                                                     \
  |  |   85|    382|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    382|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 382]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    382|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 382]
  |  |  ------------------
  ------------------
  280|    382|   copy_mem(m_counter.data(), m_iv.data(), m_iv.size());
  281|       |
  282|    382|   const size_t BS = m_block_size;
  283|       |
  284|       |   // Set m_counter blocks to IV, IV + 1, ... IV + n
  285|       |
  286|    382|   if(m_ctr_size == 4 && BS >= 8) {
  ------------------
  |  Branch (286:7): [True: 382, False: 0]
  |  Branch (286:26): [True: 382, False: 0]
  ------------------
  287|    382|      const uint32_t low32 = load_be<uint32_t>(&m_counter[BS - 4], 0);
  288|       |
  289|    382|      if(m_ctr_blocks >= 4 && is_power_of_2(m_ctr_blocks)) {
  ------------------
  |  Branch (289:10): [True: 382, False: 0]
  |  Branch (289:31): [True: 382, False: 0]
  ------------------
  290|    382|         size_t written = 1;
  291|  1.79k|         while(written < m_ctr_blocks) {
  ------------------
  |  Branch (291:16): [True: 1.41k, False: 382]
  ------------------
  292|  1.41k|            copy_mem(&m_counter[written * BS], &m_counter[0], BS * written);  // NOLINT(*container-data-pointer)
  293|  1.41k|            written *= 2;
  294|  1.41k|         }
  295|    382|      } else {
  296|      0|         for(size_t i = 1; i != m_ctr_blocks; ++i) {
  ------------------
  |  Branch (296:28): [True: 0, False: 0]
  ------------------
  297|      0|            copy_mem(&m_counter[i * BS], &m_counter[0], BS - 4);  // NOLINT(*container-data-pointer)
  298|      0|         }
  299|      0|      }
  300|       |
  301|  5.18k|      for(size_t i = 1; i != m_ctr_blocks; ++i) {
  ------------------
  |  Branch (301:25): [True: 4.80k, False: 382]
  ------------------
  302|  4.80k|         const uint32_t c = static_cast<uint32_t>(low32 + i);
  303|  4.80k|         store_be(c, &m_counter[(BS - 4) + i * BS]);
  304|  4.80k|      }
  305|    382|   } else {
  306|       |      // do everything sequentially:
  307|      0|      for(size_t i = 1; i != m_ctr_blocks; ++i) {
  ------------------
  |  Branch (307:25): [True: 0, False: 0]
  ------------------
  308|      0|         copy_mem(&m_counter[i * BS], &m_counter[(i - 1) * BS], BS);
  309|       |
  310|      0|         for(size_t j = 0; j != m_ctr_size; ++j) {
  ------------------
  |  Branch (310:28): [True: 0, False: 0]
  ------------------
  311|      0|            uint8_t& c = m_counter[i * BS + (BS - 1 - j)];
  312|      0|            c += 1;
  313|      0|            if(c > 0) {
  ------------------
  |  Branch (313:16): [True: 0, False: 0]
  ------------------
  314|      0|               break;
  315|      0|            }
  316|      0|         }
  317|      0|      }
  318|      0|   }
  319|       |
  320|    382|   if(base_counter > 0) {
  ------------------
  |  Branch (320:7): [True: 0, False: 382]
  ------------------
  321|      0|      add_counter(base_counter);
  322|      0|   }
  323|       |
  324|    382|   m_cipher->encrypt_n(m_counter.data(), m_pad.data(), m_ctr_blocks);
  325|    382|   m_pad_pos = offset % m_counter.size();
  326|    382|}

_ZN5Botan6CTR_BE27ctr_proc_bs16_ctr4_simd8x32EPKhPhm:
   15|     44|size_t CTR_BE::ctr_proc_bs16_ctr4_simd8x32(const uint8_t* in, uint8_t* out, size_t length) {
   16|     44|   BOTAN_ASSERT_NOMSG(m_pad.size() % 64 == 0);
  ------------------
  |  |   84|     44|   do {                                                                     \
  |  |   85|     44|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     44|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 44]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     44|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 44]
  |  |  ------------------
  ------------------
   17|     44|   BOTAN_DEBUG_ASSERT(m_counter.size() == m_pad.size());
  ------------------
  |  |  137|     44|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|     44|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 44]
  |  |  ------------------
  ------------------
   18|       |
   19|     44|   const size_t pad_size = m_pad.size();
   20|     44|   if(length < pad_size) {
  ------------------
  |  Branch (20:7): [True: 0, False: 44]
  ------------------
   21|      0|      return 0;
   22|      0|   }
   23|       |
   24|     44|   const size_t ctr_blocks = m_ctr_blocks;
   25|       |
   26|       |   /*
   27|       |   * Byte swap table that swaps only the counter bytes and not the nonce bytes
   28|       |   */
   29|     44|   const SIMD_8x32 bswap_ctr(
   30|     44|      0x03020100, 0x07060504, 0x0B0A0908, 0x0C0D0E0F, 0x03020100, 0x07060504, 0x0B0A0908, 0x0C0D0E0F);
   31|       |
   32|       |   // Load the starting counter value, bswap the counter field itself so we can add
   33|     44|   const SIMD_8x32 starting_ctr = SIMD_8x32::byte_shuffle(SIMD_8x32::load_le128(m_counter.data()), bswap_ctr);
   34|       |
   35|       |   // Counter is incremented 4 blocks at a time (2 per register, 2 registers)
   36|     44|   const SIMD_8x32 inc4(0, 0, 0, 4);
   37|       |
   38|     44|   const uint32_t N = static_cast<uint32_t>(ctr_blocks);
   39|     44|   SIMD_8x32 batch_ctr0 = starting_ctr + SIMD_8x32(0, 0, 0, N, 0, 0, 0, N + 1);
   40|     44|   SIMD_8x32 batch_ctr1 = starting_ctr + SIMD_8x32(0, 0, 0, N + 2, 0, 0, 0, N + 3);
   41|     44|   const uint8_t* pad_buf = m_pad.data();
   42|     44|   uint8_t* ctr_buf = m_counter.data();
   43|       |
   44|     44|   const size_t ctr_block_quads = ctr_blocks / 4;
   45|       |
   46|     44|   size_t processed = 0;
   47|       |
   48|    558|   while(length >= pad_size) {
  ------------------
  |  Branch (48:10): [True: 514, False: 44]
  ------------------
   49|  1.88k|      for(size_t i = 0; i != ctr_block_quads; ++i) {
  ------------------
  |  Branch (49:25): [True: 1.36k, False: 514]
  ------------------
   50|  1.36k|         const size_t off = i * 64;
   51|       |
   52|       |         // Store and update the counters
   53|  1.36k|         SIMD_8x32::byte_shuffle(batch_ctr0, bswap_ctr).store_le(ctr_buf + off);
   54|  1.36k|         SIMD_8x32::byte_shuffle(batch_ctr1, bswap_ctr).store_le(ctr_buf + off + 32);
   55|  1.36k|         batch_ctr0 += inc4;
   56|  1.36k|         batch_ctr1 += inc4;
   57|       |
   58|  1.36k|         const auto p0 = SIMD_8x32::load_le(pad_buf + off);
   59|  1.36k|         const auto p1 = SIMD_8x32::load_le(pad_buf + off + 32);
   60|       |
   61|  1.36k|         auto i0 = SIMD_8x32::load_le(in + off);
   62|  1.36k|         auto i1 = SIMD_8x32::load_le(in + off + 32);
   63|       |
   64|  1.36k|         i0 ^= p0;
   65|  1.36k|         i1 ^= p1;
   66|       |
   67|  1.36k|         i0.store_le(out + off);
   68|  1.36k|         i1.store_le(out + off + 32);
   69|  1.36k|      }
   70|       |
   71|    514|      in += pad_size;
   72|    514|      out += pad_size;
   73|    514|      length -= pad_size;
   74|    514|      processed += pad_size;
   75|       |
   76|       |      // Regenerate the pad buffer
   77|    514|      m_cipher->encrypt_n(m_counter.data(), m_pad.data(), ctr_blocks);
   78|    514|   }
   79|       |
   80|     44|   return processed;
   81|     44|}

_ZN5Botan12StreamCipher6createENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
   40|      1|std::unique_ptr<StreamCipher> StreamCipher::create(std::string_view algo_spec, std::string_view provider) {
   41|      1|#if defined(BOTAN_HAS_SHAKE_CIPHER)
   42|      1|   if(algo_spec == "SHAKE-128" || algo_spec == "SHAKE-128-XOF") {
  ------------------
  |  Branch (42:7): [True: 0, False: 1]
  |  Branch (42:35): [True: 0, False: 1]
  ------------------
   43|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (43:10): [True: 0, False: 0]
  |  Branch (43:30): [True: 0, False: 0]
  ------------------
   44|      0|         return std::make_unique<SHAKE_128_Cipher>();
   45|      0|      }
   46|      0|   }
   47|       |
   48|      1|   if(algo_spec == "SHAKE-256" || algo_spec == "SHAKE-256-XOF") {
  ------------------
  |  Branch (48:7): [True: 0, False: 1]
  |  Branch (48:35): [True: 0, False: 1]
  ------------------
   49|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (49:10): [True: 0, False: 0]
  |  Branch (49:30): [True: 0, False: 0]
  ------------------
   50|      0|         return std::make_unique<SHAKE_256_Cipher>();
   51|      0|      }
   52|      0|   }
   53|      1|#endif
   54|       |
   55|      1|#if defined(BOTAN_HAS_CHACHA)
   56|      1|   if(algo_spec == "ChaCha20") {
  ------------------
  |  Branch (56:7): [True: 0, False: 1]
  ------------------
   57|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (57:10): [True: 0, False: 0]
  |  Branch (57:30): [True: 0, False: 0]
  ------------------
   58|      0|         return std::make_unique<ChaCha>(20);
   59|      0|      }
   60|      0|   }
   61|      1|#endif
   62|       |
   63|      1|#if defined(BOTAN_HAS_SALSA20)
   64|      1|   if(algo_spec == "Salsa20") {
  ------------------
  |  Branch (64:7): [True: 0, False: 1]
  ------------------
   65|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (65:10): [True: 0, False: 0]
  |  Branch (65:30): [True: 0, False: 0]
  ------------------
   66|      0|         return std::make_unique<Salsa20>();
   67|      0|      }
   68|      0|   }
   69|      1|#endif
   70|       |
   71|      1|   const SCAN_Name req(algo_spec);
   72|       |
   73|      1|#if defined(BOTAN_HAS_CTR_BE)
   74|      1|   if((req.algo_name() == "CTR-BE" || req.algo_name() == "CTR") && req.arg_count_between(1, 2)) {
  ------------------
  |  Branch (74:8): [True: 0, False: 1]
  |  Branch (74:39): [True: 0, False: 1]
  |  Branch (74:68): [True: 0, False: 0]
  ------------------
   75|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (75:10): [True: 0, False: 0]
  |  Branch (75:30): [True: 0, False: 0]
  ------------------
   76|      0|         auto cipher = BlockCipher::create(req.arg(0));
   77|      0|         if(cipher) {
  ------------------
  |  Branch (77:13): [True: 0, False: 0]
  ------------------
   78|      0|            const size_t ctr_size = req.arg_as_integer(1, cipher->block_size());
   79|      0|            return std::make_unique<CTR_BE>(std::move(cipher), ctr_size);
   80|      0|         }
   81|      0|      }
   82|      0|   }
   83|      1|#endif
   84|       |
   85|      1|#if defined(BOTAN_HAS_CHACHA)
   86|      1|   if(req.algo_name() == "ChaCha") {
  ------------------
  |  Branch (86:7): [True: 1, False: 0]
  ------------------
   87|      1|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (87:10): [True: 1, False: 0]
  |  Branch (87:30): [True: 0, False: 0]
  ------------------
   88|      1|         return std::make_unique<ChaCha>(req.arg_as_integer(0, 20));
   89|      1|      }
   90|      1|   }
   91|      0|#endif
   92|       |
   93|      0|#if defined(BOTAN_HAS_OFB)
   94|      0|   if(req.algo_name() == "OFB" && req.arg_count() == 1) {
  ------------------
  |  Branch (94:7): [True: 0, False: 0]
  |  Branch (94:35): [True: 0, False: 0]
  ------------------
   95|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (95:10): [True: 0, False: 0]
  |  Branch (95:30): [True: 0, False: 0]
  ------------------
   96|      0|         if(auto cipher = BlockCipher::create(req.arg(0))) {
  ------------------
  |  Branch (96:18): [True: 0, False: 0]
  ------------------
   97|      0|            return std::make_unique<OFB>(std::move(cipher));
   98|      0|         }
   99|      0|      }
  100|      0|   }
  101|      0|#endif
  102|       |
  103|      0|#if defined(BOTAN_HAS_RC4)
  104|       |
  105|      0|   if(req.algo_name() == "RC4" || req.algo_name() == "ARC4" || req.algo_name() == "MARK-4") {
  ------------------
  |  Branch (105:7): [True: 0, False: 0]
  |  Branch (105:35): [True: 0, False: 0]
  |  Branch (105:64): [True: 0, False: 0]
  ------------------
  106|      0|      const size_t skip = (req.algo_name() == "MARK-4") ? 256 : req.arg_as_integer(0, 0);
  ------------------
  |  Branch (106:27): [True: 0, False: 0]
  ------------------
  107|       |
  108|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (108:10): [True: 0, False: 0]
  |  Branch (108:30): [True: 0, False: 0]
  ------------------
  109|      0|         return std::make_unique<RC4>(skip);
  110|      0|      }
  111|      0|   }
  112|       |
  113|      0|#endif
  114|       |
  115|      0|   BOTAN_UNUSED(req);
  ------------------
  |  |  151|      0|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  116|      0|   BOTAN_UNUSED(provider);
  ------------------
  |  |  151|      0|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  117|       |
  118|      0|   return nullptr;
  119|      0|}
_ZN5Botan12StreamCipher15create_or_throwENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
  122|      1|std::unique_ptr<StreamCipher> StreamCipher::create_or_throw(std::string_view algo, std::string_view provider) {
  123|      1|   if(auto sc = StreamCipher::create(algo, provider)) {
  ------------------
  |  Branch (123:12): [True: 1, False: 0]
  ------------------
  124|      1|      return sc;
  125|      1|   }
  126|      0|   throw Lookup_Error("Stream cipher", algo, provider);
  127|      1|}

_ZN5Botan19Credentials_Manager3pskERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_S9_:
   29|  2.90k|                                      const std::string& identity) {
   30|  2.90k|   auto side = [&] {
   31|  2.90k|      if(type == "tls-client") {
   32|  2.90k|         return TLS::Connection_Side::Client;
   33|  2.90k|      } else if(type == "tls-server") {
   34|  2.90k|         return TLS::Connection_Side::Server;
   35|  2.90k|      } else {
   36|  2.90k|         throw Internal_Error(fmt("No PSK set for type {}", type));
   37|  2.90k|      }
   38|  2.90k|   }();
   39|       |
   40|       |   // New applications should use the appropriate credentials methods. This is a
   41|       |   // retrofit of the behaviour before Botan 3.2.0 and will be removed in a
   42|       |   // future major release.
   43|       |   //
   44|       |   // TODO: deprecate `psk("...", "session-ticket" | "dtls-cookie-secret")`
   45|  2.90k|   if(side == TLS::Connection_Side::Server && context == "session-ticket") {
  ------------------
  |  Branch (45:7): [True: 2.90k, False: 0]
  |  Branch (45:47): [True: 0, False: 2.90k]
  ------------------
   46|      0|      if(auto key = session_ticket_key(); !key.empty()) {
  ------------------
  |  Branch (46:43): [True: 0, False: 0]
  ------------------
   47|      0|         return SymmetricKey(std::move(key));
   48|      0|      }
   49|  2.90k|   } else if(side == TLS::Connection_Side::Server && context == "dtls-cookie-secret") {
  ------------------
  |  Branch (49:14): [True: 2.90k, False: 0]
  |  Branch (49:54): [True: 789, False: 2.11k]
  ------------------
   50|    789|      if(auto key = dtls_cookie_secret(); !key.empty()) {
  ------------------
  |  Branch (50:43): [True: 789, False: 0]
  ------------------
   51|    789|         return SymmetricKey(std::move(key));
   52|    789|      }
   53|  2.11k|   } else /* context is a host name */ {
   54|       |      // Assuming that find_preshared_keys returns _exactly_ one or no keys when
   55|       |      // searching for a single specific identity.
   56|  2.11k|      if(auto psks = find_preshared_keys(context, side, {identity}); psks.size() == 1) {
  ------------------
  |  Branch (56:70): [True: 2.09k, False: 22]
  ------------------
   57|  2.09k|         return SymmetricKey(psks.front().extract_master_secret());
   58|  2.09k|      }
   59|  2.11k|   }
   60|       |
   61|     22|   throw Internal_Error(fmt("No PSK set for identity {}", identity));
   62|  2.90k|}
_ZN5Botan19Credentials_Manager19find_preshared_keysENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS_3TLS15Connection_SideERKNS1_6vectorINS1_12basic_stringIcS4_NS1_9allocatorIcEEEENSA_ISC_EEEERKNS1_8optionalISC_EE:
   67|     22|                                                                       const std::optional<std::string>& /* prf */) {
   68|     22|   return {};
   69|     22|}
_ZN5Botan19Credentials_Manager15find_cert_chainERKNSt3__16vectorINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS6_IS8_EEEERKNS2_INS_19AlgorithmIdentifierENS6_ISD_EEEERKNS2_INS_7X509_DNENS6_ISI_EEEERKS8_SO_:
   88|  6.07k|   const std::string& context) {
   89|  6.07k|   return cert_chain(key_types, cert_signature_schemes, type, context);
   90|  6.07k|}
_ZN5Botan19Credentials_Manager22cert_chain_single_typeERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_6vectorINS_19AlgorithmIdentifierENS5_ISB_EEEES9_S9_:
  109|  6.07k|   const std::string& context) {
  110|  6.07k|   return find_cert_chain({cert_key_type}, cert_signature_schemes, std::vector<X509_DN>(), type, context);
  111|  6.07k|}
_ZN5Botan19Credentials_Manager31trusted_certificate_authoritiesERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
  134|  2.81k|                                                                                     const std::string& /*unused*/) {
  135|  2.81k|   return std::vector<Certificate_Store*>();
  136|  2.81k|}
credentials_manager.cpp:_ZZN5Botan19Credentials_Manager3pskERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_S9_ENK3$_0clEv:
   30|  2.90k|   auto side = [&] {
   31|  2.90k|      if(type == "tls-client") {
  ------------------
  |  Branch (31:10): [True: 0, False: 2.90k]
  ------------------
   32|      0|         return TLS::Connection_Side::Client;
   33|  2.90k|      } else if(type == "tls-server") {
  ------------------
  |  Branch (33:17): [True: 2.90k, False: 0]
  ------------------
   34|  2.90k|         return TLS::Connection_Side::Server;
   35|  2.90k|      } else {
   36|      0|         throw Internal_Error(fmt("No PSK set for type {}", type));
   37|      0|      }
   38|  2.90k|   }();

_ZN5Botan3TLS18Certificate_VerifyC2ENSt3__14spanIKhLm18446744073709551615EEE:
   20|     63|Certificate_Verify::Certificate_Verify(std::span<const uint8_t> buf) {
   21|     63|   TLS_Data_Reader reader("CertificateVerify", buf);
   22|       |
   23|     63|   m_scheme = Signature_Scheme(reader.get_uint16_t());
   24|       |   // Somewhat oddly, the signature really is allowed to be empty in a CertificateVerify
   25|     63|   m_signature = reader.get_range<uint8_t>(2, 0, 65535);
   26|     63|   reader.assert_done();
   27|       |
   28|     63|   if(!m_scheme.is_set()) {
  ------------------
  |  Branch (28:7): [True: 1, False: 62]
  ------------------
   29|      1|      throw Decoding_Error("Counterparty did not send hash/sig IDS");
   30|      1|   }
   31|     63|}

_ZN5Botan3TLS17make_hello_randomERNS_21RandomNumberGeneratorERNS0_9CallbacksERKNS0_6PolicyE:
   25|  5.63k|std::vector<uint8_t> make_hello_random(RandomNumberGenerator& rng, Callbacks& cb, const Policy& policy) {
   26|  5.63k|   auto buf = rng.random_vec<std::vector<uint8_t>>(32);
   27|       |
   28|  5.63k|   if(policy.hash_hello_random()) {
  ------------------
  |  Branch (28:7): [True: 5.63k, False: 0]
  ------------------
   29|  5.63k|      auto sha256 = HashFunction::create_or_throw("SHA-256");
   30|  5.63k|      sha256->update(buf);
   31|  5.63k|      sha256->final(buf);
   32|  5.63k|   }
   33|       |
   34|       |   // TLS 1.3 does not require the insertion of a timestamp in the client hello
   35|       |   // random. When offering both TLS 1.2 and 1.3 we nevertheless comply with the
   36|       |   // legacy specification.
   37|  5.63k|   if(policy.include_time_in_hello_random() && (policy.allow_tls12() || policy.allow_dtls12())) {
  ------------------
  |  Branch (37:7): [True: 5.63k, False: 0]
  |  Branch (37:49): [True: 5.63k, False: 0]
  |  Branch (37:73): [True: 0, False: 0]
  ------------------
   38|  5.63k|      const uint32_t time32 = static_cast<uint32_t>(std::chrono::system_clock::to_time_t(cb.tls_current_timestamp()));
   39|       |
   40|  5.63k|      store_be(time32, buf.data());
   41|  5.63k|   }
   42|       |
   43|  5.63k|   return buf;
   44|  5.63k|}
_ZN5Botan3TLS21Client_Hello_InternalC2ENSt3__14spanIKhLm18446744073709551615EEE:
   46|  7.25k|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|  7.25k|   constexpr size_t MinimumClientHelloBytes = 2 + 32 + 1 + 2 + 2 + 1 + 1;
   60|  7.25k|   if(buf.size() < MinimumClientHelloBytes) {
  ------------------
  |  Branch (60:7): [True: 18, False: 7.23k]
  ------------------
   61|     18|      throw Decoding_Error("Client_Hello: Packet corrupted");
   62|     18|   }
   63|       |
   64|  7.23k|   TLS_Data_Reader reader("ClientHello", buf);
   65|       |
   66|  7.23k|   const uint8_t major_version = reader.get_byte();
   67|  7.23k|   const uint8_t minor_version = reader.get_byte();
   68|       |
   69|  7.23k|   m_legacy_version = Protocol_Version(major_version, minor_version);
   70|       |
   71|       |   // DTLS has an additional 1 byte cookie length field
   72|  7.23k|   if(m_legacy_version.is_datagram_protocol() && buf.size() < MinimumClientHelloBytes + 1) {
  ------------------
  |  Branch (72:7): [True: 151, False: 7.08k]
  |  Branch (72:50): [True: 1, False: 150]
  ------------------
   73|      1|      throw Decoding_Error("Client_Hello: DTLS packet corrupted");
   74|      1|   }
   75|       |
   76|  7.23k|   m_random = reader.get_fixed<uint8_t>(32);
   77|  7.23k|   m_session_id = Session_ID(reader.get_range<uint8_t>(1, 0, 32));
   78|       |
   79|  7.23k|   if(m_legacy_version.is_datagram_protocol()) {
  ------------------
  |  Branch (79:7): [True: 150, False: 7.08k]
  ------------------
   80|    150|      auto sha256 = HashFunction::create_or_throw("SHA-256");
   81|    150|      sha256->update(reader.get_data_read_so_far());
   82|       |
   83|    150|      m_hello_cookie = reader.get_range<uint8_t>(1, 0, 255);
   84|       |
   85|    150|      sha256->update(reader.get_remaining());
   86|    150|      m_cookie_input_bits = sha256->final_stdvec();
   87|    150|   }
   88|       |
   89|  7.23k|   m_suites = reader.get_range_vector<uint16_t>(2, 1, 32767);
   90|  7.23k|   m_comp_methods = reader.get_range_vector<uint8_t>(1, 1, 255);
   91|       |
   92|  7.23k|   m_extensions.deserialize(reader, Connection_Side::Client, Handshake_Type::ClientHello);
   93|  7.23k|}
_ZNK5Botan3TLS21Client_Hello_Internal7versionEv:
   95|  3.25k|Protocol_Version Client_Hello_Internal::version() const {
   96|       |   // RFC 8446 4.2.1
   97|       |   //    If [the "supported_versions"] extension is not present, servers
   98|       |   //    which are compliant with this specification and which also support
   99|       |   //    TLS 1.2 MUST negotiate TLS 1.2 or prior as specified in [RFC5246],
  100|       |   //    even if ClientHello.legacy_version is 0x0304 or later.
  101|       |   //
  102|       |   // RFC 8446 4.2.1
  103|       |   //    Servers MUST be prepared to receive ClientHellos that include
  104|       |   //    [the supported_versions] extension but do not include 0x0304 in
  105|       |   //    the list of versions.
  106|       |   //
  107|       |   // RFC 8446 4.1.2
  108|       |   //    TLS 1.3 ClientHellos are identified as having a legacy_version of
  109|       |   //    0x0303 and a supported_versions extension present with 0x0304 as
  110|       |   //    the highest version indicated therein.
  111|  3.25k|   if(!extensions().has<Supported_Versions>() ||
  ------------------
  |  Branch (111:7): [True: 3.18k, False: 66]
  ------------------
  112|  3.22k|      !extensions().get<Supported_Versions>()->supports(Protocol_Version::TLS_V13)) {
  ------------------
  |  Branch (112:7): [True: 32, False: 34]
  ------------------
  113|       |      // The exact legacy_version is ignored we just inspect it to
  114|       |      // distinguish TLS and DTLS.
  115|  3.22k|      return (m_legacy_version.is_datagram_protocol()) ? Protocol_Version::DTLS_V12 : Protocol_Version::TLS_V12;
  ------------------
  |  Branch (115:14): [True: 53, False: 3.16k]
  ------------------
  116|  3.22k|   }
  117|       |
  118|       |   // Note: The Client_Hello_13 class will make sure that legacy_version
  119|       |   //       is exactly 0x0303 (aka ossified TLS 1.2)
  120|     34|   return Protocol_Version::TLS_V13;
  121|  3.25k|}
_ZN5Botan3TLS12Client_HelloC2EOS1_:
  123|  28.9k|Client_Hello::Client_Hello(Client_Hello&&) noexcept = default;
_ZN5Botan3TLS12Client_HelloD2Ev:
  126|  35.4k|Client_Hello::~Client_Hello() = default;
_ZN5Botan3TLS12Client_HelloC2ENSt3__110unique_ptrINS0_21Client_Hello_InternalENS2_14default_deleteIS4_EEEE:
  133|  6.46k|Client_Hello::Client_Hello(std::unique_ptr<Client_Hello_Internal> data) : m_data(std::move(data)) {
  134|  6.46k|   BOTAN_ASSERT_NONNULL(m_data);
  ------------------
  |  |  123|  6.46k|   do {                                                                                   \
  |  |  124|  6.46k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 6.46k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  6.46k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 6.46k]
  |  |  ------------------
  ------------------
  135|  6.46k|}
_ZNK5Botan3TLS12Client_Hello4typeEv:
  137|  3.21k|Handshake_Type Client_Hello::type() const {
  138|  3.21k|   return Handshake_Type::ClientHello;
  139|  3.21k|}
_ZNK5Botan3TLS12Client_Hello14legacy_versionEv:
  141|  3.21k|Protocol_Version Client_Hello::legacy_version() const {
  142|  3.21k|   return m_data->legacy_version();
  143|  3.21k|}
_ZNK5Botan3TLS12Client_Hello6randomEv:
  145|  1.55k|const std::vector<uint8_t>& Client_Hello::random() const {
  146|  1.55k|   return m_data->random();
  147|  1.55k|}
_ZNK5Botan3TLS12Client_Hello10session_idEv:
  149|  3.00k|const Session_ID& Client_Hello::session_id() const {
  150|  3.00k|   return m_data->session_id();
  151|  3.00k|}
_ZNK5Botan3TLS12Client_Hello19compression_methodsEv:
  153|  3.17k|const std::vector<uint8_t>& Client_Hello::compression_methods() const {
  154|  3.17k|   return m_data->comp_methods();
  155|  3.17k|}
_ZNK5Botan3TLS12Client_Hello12ciphersuitesEv:
  157|  3.03k|const std::vector<uint16_t>& Client_Hello::ciphersuites() const {
  158|  3.03k|   return m_data->ciphersuites();
  159|  3.03k|}
_ZNK5Botan3TLS12Client_Hello15extension_typesEv:
  161|  2.62k|std::set<Extension_Code> Client_Hello::extension_types() const {
  162|  2.62k|   return m_data->extensions().extension_types();
  163|  2.62k|}
_ZNK5Botan3TLS12Client_Hello10extensionsEv:
  165|  3.04k|const Extensions& Client_Hello::extensions() const {
  166|  3.04k|   return m_data->extensions();
  167|  3.04k|}
_ZNK5Botan3TLS12Client_Hello13offered_suiteEt:
  209|  3.21k|bool Client_Hello::offered_suite(uint16_t ciphersuite) const {
  210|  3.21k|   return std::find(m_data->ciphersuites().cbegin(), m_data->ciphersuites().cend(), ciphersuite) !=
  211|  3.21k|          m_data->ciphersuites().cend();
  212|  3.21k|}
_ZNK5Botan3TLS12Client_Hello17signature_schemesEv:
  214|  6.06k|std::vector<Signature_Scheme> Client_Hello::signature_schemes() const {
  215|  6.06k|   if(const Signature_Algorithms* sigs = m_data->extensions().get<Signature_Algorithms>()) {
  ------------------
  |  Branch (215:35): [True: 335, False: 5.73k]
  ------------------
  216|    335|      return sigs->supported_schemes();
  217|    335|   }
  218|  5.73k|   return {};
  219|  6.06k|}
_ZNK5Botan3TLS12Client_Hello29certificate_signature_schemesEv:
  221|  3.03k|std::vector<Signature_Scheme> Client_Hello::certificate_signature_schemes() const {
  222|       |   // RFC 8446 4.2.3
  223|       |   //   If no "signature_algorithms_cert" extension is present, then the
  224|       |   //   "signature_algorithms" extension also applies to signatures appearing
  225|       |   //   in certificates.
  226|  3.03k|   if(const Signature_Algorithms_Cert* sigs = m_data->extensions().get<Signature_Algorithms_Cert>()) {
  ------------------
  |  Branch (226:40): [True: 5, False: 3.03k]
  ------------------
  227|      5|      return sigs->supported_schemes();
  228|  3.03k|   } else {
  229|  3.03k|      return signature_schemes();
  230|  3.03k|   }
  231|  3.03k|}
_ZNK5Botan3TLS12Client_Hello20supported_ecc_curvesEv:
  233|  5.65k|std::vector<Group_Params> Client_Hello::supported_ecc_curves() const {
  234|  5.65k|   if(const Supported_Groups* groups = m_data->extensions().get<Supported_Groups>()) {
  ------------------
  |  Branch (234:31): [True: 5.30k, False: 355]
  ------------------
  235|  5.30k|      return groups->ec_groups();
  236|  5.30k|   }
  237|    355|   return {};
  238|  5.65k|}
_ZNK5Botan3TLS12Client_Hello19supported_dh_groupsEv:
  240|  6.07k|std::vector<Group_Params> Client_Hello::supported_dh_groups() const {
  241|  6.07k|   if(const Supported_Groups* groups = m_data->extensions().get<Supported_Groups>()) {
  ------------------
  |  Branch (241:31): [True: 5.36k, False: 710]
  ------------------
  242|  5.36k|      return groups->dh_groups();
  243|  5.36k|   }
  244|    710|   return std::vector<Group_Params>();
  245|  6.07k|}
_ZNK5Botan3TLS12Client_Hello12sni_hostnameEv:
  247|  8.04k|std::string Client_Hello::sni_hostname() const {
  248|  8.04k|   if(const Server_Name_Indicator* sni = m_data->extensions().get<Server_Name_Indicator>()) {
  ------------------
  |  Branch (248:36): [True: 16, False: 8.02k]
  ------------------
  249|     16|      return sni->host_name();
  250|     16|   }
  251|  8.02k|   return "";
  252|  8.04k|}
_ZNK5Botan3TLS12Client_Hello18supported_versionsEv:
  254|  3.19k|std::vector<Protocol_Version> Client_Hello::supported_versions() const {
  255|  3.19k|   if(const Supported_Versions* versions = m_data->extensions().get<Supported_Versions>()) {
  ------------------
  |  Branch (255:33): [True: 28, False: 3.16k]
  ------------------
  256|     28|      return versions->versions();
  257|     28|   }
  258|  3.16k|   return {};
  259|  3.19k|}
_ZNK5Botan3TLS12Client_Hello13supports_alpnEv:
  261|  3.06k|bool Client_Hello::supports_alpn() const {
  262|  3.06k|   return m_data->extensions().has<Application_Layer_Protocol_Notification>();
  263|  3.06k|}
_ZNK5Botan3TLS12Client_Hello14next_protocolsEv:
  269|     32|std::vector<std::string> Client_Hello::next_protocols() const {
  270|     32|   if(auto* alpn = m_data->extensions().get<Application_Layer_Protocol_Notification>()) {
  ------------------
  |  Branch (270:13): [True: 32, False: 0]
  ------------------
  271|     32|      return alpn->protocols();
  272|     32|   }
  273|      0|   return {};
  274|     32|}
_ZN5Botan3TLS20Client_Hello_12_ShimC2ENSt3__110unique_ptrINS0_21Client_Hello_InternalENS2_14default_deleteIS4_EEEE:
  288|  6.43k|      Client_Hello(std::move(data)) {}

_ZN5Botan3TLS24make_server_hello_randomERNS_21RandomNumberGeneratorENS0_16Protocol_VersionERNS0_9CallbacksERKNS0_6PolicyE:
   27|  2.81k|                                              const Policy& policy) {
   28|  2.81k|   auto random = make_hello_random(rng, cb, policy);
   29|       |
   30|       |   // RFC 8446 4.1.3
   31|       |   //    TLS 1.3 has a downgrade protection mechanism embedded in the server's
   32|       |   //    random value. TLS 1.3 servers which negotiate TLS 1.2 or below in
   33|       |   //    response to a ClientHello MUST set the last 8 bytes of their Random
   34|       |   //    value specially in their ServerHello.
   35|       |   //
   36|       |   //    If negotiating TLS 1.2, TLS 1.3 servers MUST set the last 8 bytes of
   37|       |   //    their Random value to the bytes: [DOWNGRADE_TLS12]
   38|  2.81k|   if(offered_version.is_pre_tls_13() && policy.allow_tls13()) {
  ------------------
  |  Branch (38:7): [True: 2.81k, False: 0]
  |  Branch (38:42): [True: 2.81k, False: 0]
  ------------------
   39|  2.81k|      constexpr size_t downgrade_signal_length = sizeof(DOWNGRADE_TLS12);
   40|  2.81k|      BOTAN_ASSERT_NOMSG(random.size() >= downgrade_signal_length);
  ------------------
  |  |   84|  2.81k|   do {                                                                     \
  |  |   85|  2.81k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  2.81k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 2.81k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  2.81k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 2.81k]
  |  |  ------------------
  ------------------
   41|  2.81k|      const auto lastbytes = std::span{random}.last(downgrade_signal_length);
   42|  2.81k|      store_be(DOWNGRADE_TLS12, lastbytes);
   43|  2.81k|   }
   44|       |
   45|  2.81k|   return random;
   46|  2.81k|}
_ZN5Botan3TLS21Server_Hello_InternalC2ENSt3__14spanIKhLm18446744073709551615EEE:
   48|     92|Server_Hello_Internal::Server_Hello_Internal(std::span<const uint8_t> buf) {
   49|     92|   if(buf.size() < 38) {
  ------------------
  |  Branch (49:7): [True: 1, False: 91]
  ------------------
   50|      1|      throw Decoding_Error("Server_Hello: Packet corrupted");
   51|      1|   }
   52|       |
   53|     91|   TLS_Data_Reader reader("ServerHello", buf);
   54|       |
   55|     91|   const uint8_t major_version = reader.get_byte();
   56|     91|   const uint8_t minor_version = reader.get_byte();
   57|       |
   58|     91|   m_legacy_version = Protocol_Version(major_version, minor_version);
   59|       |
   60|       |   // RFC 8446 4.1.3
   61|       |   //    Upon receiving a message with type server_hello, implementations MUST
   62|       |   //    first examine the Random value and, if it matches this value, process
   63|       |   //    it as described in Section 4.1.4 [Hello Retry Request]).
   64|     91|   m_random = reader.get_fixed<uint8_t>(32);
   65|     91|   m_is_hello_retry_request = CT::is_equal<uint8_t>(m_random, HELLO_RETRY_REQUEST_MARKER).as_bool();
   66|       |
   67|     91|   m_session_id = Session_ID(reader.get_range<uint8_t>(1, 0, 32));
   68|     91|   m_ciphersuite = reader.get_uint16_t();
   69|     91|   m_comp_method = reader.get_byte();
   70|       |
   71|       |   // Note that this code path might parse a TLS 1.2 (or older) server hello message that
   72|       |   // is nevertheless marked as being a 'hello retry request' (potentially maliciously).
   73|       |   // Extension parsing will however not be affected by the associated flag.
   74|       |   // Only after parsing the extensions will the upstream code be able to decide
   75|       |   // whether we're dealing with TLS 1.3 or older.
   76|     91|   m_extensions.deserialize(reader,
   77|     91|                            Connection_Side::Server,
   78|     91|                            m_is_hello_retry_request ? Handshake_Type::HelloRetryRequest : Handshake_Type::ServerHello);
  ------------------
  |  Branch (78:29): [True: 0, False: 91]
  ------------------
   79|     91|}
_ZNK5Botan3TLS21Server_Hello_Internal7versionEv:
   81|  2.92k|Protocol_Version Server_Hello_Internal::version() const {
   82|       |   // RFC 8446 4.2.1
   83|       |   //    A server which negotiates a version of TLS prior to TLS 1.3 MUST set
   84|       |   //    ServerHello.version and MUST NOT send the "supported_versions"
   85|       |   //    extension.  A server which negotiates TLS 1.3 MUST respond by sending
   86|       |   //    a "supported_versions" extension containing the selected version
   87|       |   //    value (0x0304).
   88|       |   //
   89|       |   // Note: Here we just take a message parsing decision, further validation of
   90|       |   //       the extension's contents is done later.
   91|  2.92k|   return (extensions().has<Supported_Versions>()) ? Protocol_Version::TLS_V13 : m_legacy_version;
  ------------------
  |  Branch (91:11): [True: 34, False: 2.89k]
  ------------------
   92|  2.92k|}
_ZN5Botan3TLS12Server_HelloC2ENSt3__110unique_ptrINS0_21Server_Hello_InternalENS2_14default_deleteIS4_EEEE:
   94|  2.85k|Server_Hello::Server_Hello(std::unique_ptr<Server_Hello_Internal> data) : m_data(std::move(data)) {}
_ZN5Botan3TLS12Server_HelloC2EOS1_:
   96|     95|Server_Hello::Server_Hello(Server_Hello&&) noexcept = default;
_ZN5Botan3TLS12Server_HelloD2Ev:
   99|  2.94k|Server_Hello::~Server_Hello() = default;
_ZNK5Botan3TLS12Server_Hello9serializeEv:
  104|  2.81k|std::vector<uint8_t> Server_Hello::serialize() const {
  105|  2.81k|   std::vector<uint8_t> buf;
  106|  2.81k|   buf.reserve(1024);  // working around GCC warning
  107|       |
  108|  2.81k|   buf.push_back(m_data->legacy_version().major_version());
  109|  2.81k|   buf.push_back(m_data->legacy_version().minor_version());
  110|  2.81k|   buf += m_data->random();
  111|       |
  112|  2.81k|   append_tls_length_value(buf, m_data->session_id().get(), 1);
  113|       |
  114|  2.81k|   buf.push_back(get_byte<0>(m_data->ciphersuite()));
  115|  2.81k|   buf.push_back(get_byte<1>(m_data->ciphersuite()));
  116|       |
  117|  2.81k|   buf.push_back(m_data->comp_method());
  118|       |
  119|  2.81k|   buf += m_data->extensions().serialize(Connection_Side::Server);
  120|       |
  121|  2.81k|   return buf;
  122|  2.81k|}
_ZNK5Botan3TLS12Server_Hello4typeEv:
  124|  8.46k|Handshake_Type Server_Hello::type() const {
  125|  8.46k|   return Handshake_Type::ServerHello;
  126|  8.46k|}
_ZNK5Botan3TLS12Server_Hello14legacy_versionEv:
  128|    106|Protocol_Version Server_Hello::legacy_version() const {
  129|    106|   return m_data->legacy_version();
  130|    106|}
_ZNK5Botan3TLS12Server_Hello6randomEv:
  132|  1.55k|const std::vector<uint8_t>& Server_Hello::random() const {
  133|  1.55k|   return m_data->random();
  134|  1.55k|}
_ZNK5Botan3TLS12Server_Hello18compression_methodEv:
  136|    467|uint8_t Server_Hello::compression_method() const {
  137|    467|   return m_data->comp_method();
  138|    467|}
_ZNK5Botan3TLS12Server_Hello10session_idEv:
  140|    237|const Session_ID& Server_Hello::session_id() const {
  141|    237|   return m_data->session_id();
  142|    237|}
_ZNK5Botan3TLS12Server_Hello11ciphersuiteEv:
  144|  2.97k|uint16_t Server_Hello::ciphersuite() const {
  145|  2.97k|   return m_data->ciphersuite();
  146|  2.97k|}
_ZNK5Botan3TLS12Server_Hello10extensionsEv:
  152|     11|const Extensions& Server_Hello::extensions() const {
  153|     11|   return m_data->extensions();
  154|     11|}
_ZN5Botan3TLS20Server_Hello_12_ShimC2ENSt3__110unique_ptrINS0_21Server_Hello_InternalENS2_14default_deleteIS4_EEEE:
  160|  2.83k|      Server_Hello(std::move(data)) {
  161|  2.83k|   if(!m_data->version().is_pre_tls_13()) {
  ------------------
  |  Branch (161:7): [True: 0, False: 2.83k]
  ------------------
  162|      0|      throw TLS_Exception(Alert::ProtocolVersion, "Expected server hello of (D)TLS 1.2 or lower");
  163|      0|   }
  164|  2.83k|}

_ZN5Botan3TLS14Certificate_12D2Ev:
   22|      4|Certificate_12::~Certificate_12() = default;
_ZN5Botan3TLS14Certificate_12C2ERNS0_12Handshake_IOERNS0_14Handshake_HashENSt3__16vectorINS_16X509_CertificateENS6_9allocatorIS8_EEEE:
   28|      4|      m_certs(std::move(cert_list)) {
   29|      4|   hash.update(io.send(*this));
   30|      4|}
_ZNK5Botan3TLS14Certificate_129serializeEv:
   90|      4|std::vector<uint8_t> Certificate_12::serialize() const {
   91|      4|   std::vector<uint8_t> buf(3);
   92|       |
   93|      4|   for(const auto& cert : m_certs) {
  ------------------
  |  Branch (93:25): [True: 4, False: 4]
  ------------------
   94|      4|      const auto raw_cert = cert.BER_encode();
   95|      4|      const size_t cert_size = raw_cert.size();
   96|     16|      for(size_t j = 0; j != 3; ++j) {
  ------------------
  |  Branch (96:25): [True: 12, False: 4]
  ------------------
   97|     12|         buf.push_back(get_byte_var(j + 1, static_cast<uint32_t>(cert_size)));
   98|     12|      }
   99|      4|      buf += raw_cert;
  100|      4|   }
  101|       |
  102|      4|   const size_t buf_size = buf.size() - 3;
  103|     16|   for(size_t i = 0; i != 3; ++i) {
  ------------------
  |  Branch (103:22): [True: 12, False: 4]
  ------------------
  104|     12|      buf[i] = get_byte_var(i + 1, static_cast<uint32_t>(buf_size));
  105|     12|   }
  106|       |
  107|      4|   return buf;
  108|      4|}

_ZNK5Botan3TLS15Client_Hello_1228prefers_compressed_ec_pointsEv:
   29|  2.59k|bool Client_Hello_12::prefers_compressed_ec_points() const {
   30|  2.59k|   if(const Supported_Point_Formats* ecc_formats = m_data->extensions().get<Supported_Point_Formats>()) {
  ------------------
  |  Branch (30:38): [True: 107, False: 2.48k]
  ------------------
   31|    107|      return ecc_formats->prefers_compressed();
   32|    107|   }
   33|  2.48k|   return false;
   34|  2.59k|}
_ZNK5Botan3TLS15Client_Hello_1220secure_renegotiationEv:
   36|  5.99k|bool Client_Hello_12::secure_renegotiation() const {
   37|  5.99k|   return m_data->extensions().has<Renegotiation_Extension>();
   38|  5.99k|}
_ZNK5Botan3TLS15Client_Hello_1218renegotiation_infoEv:
   40|    250|std::vector<uint8_t> Client_Hello_12::renegotiation_info() const {
   41|    250|   if(const Renegotiation_Extension* reneg = m_data->extensions().get<Renegotiation_Extension>()) {
  ------------------
  |  Branch (41:38): [True: 250, False: 0]
  ------------------
   42|    250|      return reneg->renegotiation_info();
   43|    250|   }
   44|      0|   return {};
   45|    250|}
_ZNK5Botan3TLS15Client_Hello_1223supports_session_ticketEv:
   47|  2.81k|bool Client_Hello_12::supports_session_ticket() const {
   48|  2.81k|   return m_data->extensions().has<Session_Ticket_Extension>();
   49|  2.81k|}
_ZNK5Botan3TLS15Client_Hello_1214session_ticketEv:
   51|  3.03k|Session_Ticket Client_Hello_12::session_ticket() const {
   52|  3.03k|   if(auto* ticket = m_data->extensions().get<Session_Ticket_Extension>()) {
  ------------------
  |  Branch (52:13): [True: 37, False: 3.00k]
  ------------------
   53|     37|      return ticket->contents();
   54|     37|   }
   55|  3.00k|   return {};
   56|  3.03k|}
_ZNK5Botan3TLS15Client_Hello_1214session_handleEv:
   58|  3.03k|std::optional<Session_Handle> Client_Hello_12::session_handle() const {
   59|       |   // RFC 5077 3.4
   60|       |   //    If a ticket is presented by the client, the server MUST NOT attempt
   61|       |   //    to use the Session ID in the ClientHello for stateful session
   62|       |   //    resumption.
   63|  3.03k|   if(auto ticket = session_ticket(); !ticket.empty()) {
  ------------------
  |  Branch (63:39): [True: 35, False: 3.00k]
  ------------------
   64|     35|      return Session_Handle(ticket);
   65|  3.00k|   } else if(const auto& id = session_id(); !id.empty()) {
  ------------------
  |  Branch (65:45): [True: 6, False: 2.99k]
  ------------------
   66|      6|      return Session_Handle(id);
   67|  2.99k|   } else {
   68|  2.99k|      return std::nullopt;
   69|  2.99k|   }
   70|  3.03k|}
_ZNK5Botan3TLS15Client_Hello_1231supports_extended_master_secretEv:
   72|  5.91k|bool Client_Hello_12::supports_extended_master_secret() const {
   73|  5.91k|   return m_data->extensions().has<Extended_Master_Secret>();
   74|  5.91k|}
_ZNK5Botan3TLS15Client_Hello_1228supports_cert_status_messageEv:
   76|  2.81k|bool Client_Hello_12::supports_cert_status_message() const {
   77|  2.81k|   return m_data->extensions().has<Certificate_Status_Request>();
   78|  2.81k|}
_ZNK5Botan3TLS15Client_Hello_1225supports_encrypt_then_macEv:
   80|  1.53k|bool Client_Hello_12::supports_encrypt_then_mac() const {
   81|  1.53k|   return m_data->extensions().has<Encrypt_then_MAC>();
   82|  1.53k|}
_ZN5Botan3TLS15Client_Hello_12C2ENSt3__14spanIKhLm18446744073709551615EEE:
  274|  3.22k|      Client_Hello_12(std::make_unique<Client_Hello_Internal>(buf)) {}
_ZN5Botan3TLS15Client_Hello_12C2ENSt3__110unique_ptrINS0_21Client_Hello_InternalENS2_14default_deleteIS4_EEEE:
  285|  3.21k|Client_Hello_12::Client_Hello_12(std::unique_ptr<Client_Hello_Internal> data) : Client_Hello_12_Shim(std::move(data)) {
  286|  3.21k|   const uint16_t TLS_EMPTY_RENEGOTIATION_INFO_SCSV = 0x00FF;
  287|       |
  288|  3.21k|   if(offered_suite(static_cast<uint16_t>(TLS_EMPTY_RENEGOTIATION_INFO_SCSV))) {
  ------------------
  |  Branch (288:7): [True: 258, False: 2.95k]
  ------------------
  289|    258|      if(const Renegotiation_Extension* reneg = m_data->extensions().get<Renegotiation_Extension>()) {
  ------------------
  |  Branch (289:41): [True: 2, False: 256]
  ------------------
  290|      2|         if(!reneg->renegotiation_info().empty()) {
  ------------------
  |  Branch (290:13): [True: 1, False: 1]
  ------------------
  291|      1|            throw TLS_Exception(Alert::HandshakeFailure, "Client sent renegotiation SCSV and non-empty extension");
  292|      1|         }
  293|    256|      } else {
  294|       |         // add fake extension
  295|    256|         m_data->extensions().add(new Renegotiation_Extension());  // NOLINT(*-owning-memory)
  296|    256|      }
  297|    258|   }
  298|  3.21k|}

_ZN5Botan3TLS19Client_Key_ExchangeC2ENSt3__14spanIKhLm18446744073709551615EEERKNS0_15Handshake_StateEPKNS_11Private_KeyERNS_19Credentials_ManagerERKNS0_6PolicyERNS_21RandomNumberGeneratorE:
  244|  2.13k|                                         RandomNumberGenerator& rng) {
  245|  2.13k|   const Kex_Algo kex_algo = state.ciphersuite().kex_method();
  246|       |
  247|  2.13k|   if(kex_algo == Kex_Algo::STATIC_RSA) {
  ------------------
  |  Branch (247:7): [True: 0, False: 2.13k]
  ------------------
  248|      0|      BOTAN_ASSERT(state.server_certs() && !state.server_certs()->cert_chain().empty(),
  ------------------
  |  |   71|      0|   do {                                                                                 \
  |  |   72|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|      0|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:12): [True: 0, False: 0]
  |  |  |  Branch (73:12): [True: 0, False: 0]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  249|      0|                   "RSA key exchange negotiated so server sent a certificate");
  250|       |
  251|      0|      if(server_rsa_kex_key == nullptr) {
  ------------------
  |  Branch (251:10): [True: 0, False: 0]
  ------------------
  252|      0|         throw Internal_Error("Expected RSA kex but no server kex key set");
  253|      0|      }
  254|       |
  255|      0|      if(server_rsa_kex_key->algo_name() != "RSA") {
  ------------------
  |  Branch (255:10): [True: 0, False: 0]
  ------------------
  256|      0|         throw Internal_Error("Expected RSA key but got " + server_rsa_kex_key->algo_name());
  257|      0|      }
  258|       |
  259|      0|      TLS_Data_Reader reader("ClientKeyExchange", contents);
  260|       |      // RFC 5246 7.4.7.1: encrypted_pre_master_secret<1..2^16-1>.
  261|      0|      const std::vector<uint8_t> encrypted_pre_master = reader.get_range<uint8_t>(2, 1, 65535);
  262|      0|      reader.assert_done();
  263|       |
  264|      0|      const PK_Decryptor_EME decryptor(*server_rsa_kex_key, rng, "PKCS1v15");
  265|       |
  266|      0|      const uint8_t client_major = state.client_hello()->legacy_version().major_version();
  267|      0|      const uint8_t client_minor = state.client_hello()->legacy_version().minor_version();
  268|       |
  269|       |      /*
  270|       |      * PK_Decryptor::decrypt_or_random will return a random value if
  271|       |      * either the length does not match the expected value or if the
  272|       |      * version number embedded in the PMS does not match the one sent
  273|       |      * in the client hello.
  274|       |      */
  275|      0|      const size_t expected_plaintext_size = 48;
  276|      0|      const size_t expected_content_size = 2;
  277|      0|      const uint8_t expected_content_bytes[expected_content_size] = {client_major, client_minor};
  278|      0|      const uint8_t expected_content_pos[expected_content_size] = {0, 1};
  279|       |
  280|      0|      m_pre_master = decryptor.decrypt_or_random(encrypted_pre_master.data(),
  281|      0|                                                 encrypted_pre_master.size(),
  282|      0|                                                 expected_plaintext_size,
  283|      0|                                                 rng,
  284|      0|                                                 expected_content_bytes,
  285|      0|                                                 expected_content_pos,
  286|      0|                                                 expected_content_size);
  287|  2.13k|   } else {
  288|  2.13k|      TLS_Data_Reader reader("ClientKeyExchange", contents);
  289|       |
  290|  2.13k|      SymmetricKey psk;
  291|       |
  292|  2.13k|      if(key_exchange_is_psk(kex_algo)) {
  ------------------
  |  Branch (292:10): [True: 2.13k, False: 0]
  ------------------
  293|  2.13k|         m_psk_identity = reader.get_string(2, 0, 65535);
  294|       |
  295|  2.13k|         try {
  296|  2.13k|            psk = creds.psk("tls-server", state.client_hello()->sni_hostname(), m_psk_identity.value());
  297|  2.13k|         } catch(...) {
  298|       |            // Treat any lookup failure for the identity sent by the client as
  299|       |            // "no PSK for this identity" and let the logic below handle it
  300|     22|         }
  301|       |
  302|  2.13k|         if(psk.empty()) {
  ------------------
  |  Branch (302:13): [True: 22, False: 2.09k]
  ------------------
  303|     22|            if(policy.hide_unknown_users()) {
  ------------------
  |  Branch (303:16): [True: 0, False: 22]
  ------------------
  304|      0|               psk = SymmetricKey(rng, 16);
  305|     22|            } else {
  306|     22|               throw TLS_Exception(Alert::UnknownPSKIdentity, "No PSK for identifier " + m_psk_identity.value());
  307|     22|            }
  308|     22|         }
  309|  2.11k|      }
  310|       |
  311|  2.09k|      if(kex_algo == Kex_Algo::PSK) {
  ------------------
  |  Branch (311:10): [True: 81, False: 2.01k]
  ------------------
  312|     81|         reader.assert_done();
  313|     81|         const std::vector<uint8_t> zeros(psk.length());
  314|     81|         append_tls_length_value(m_pre_master, zeros, 2);
  315|     81|         append_tls_length_value(m_pre_master, psk.bits_of(), 2);
  316|  2.01k|      } else if(kex_algo == Kex_Algo::DH || kex_algo == Kex_Algo::ECDH || kex_algo == Kex_Algo::ECDHE_PSK) {
  ------------------
  |  Branch (316:17): [True: 0, False: 2.01k]
  |  Branch (316:45): [True: 0, False: 2.01k]
  |  Branch (316:75): [True: 2.01k, False: 0]
  ------------------
  317|  2.01k|         const PK_Key_Agreement_Key& ka_key = state.server_kex()->server_kex_key();
  318|       |
  319|  2.01k|         const std::vector<uint8_t> client_pubkey = (ka_key.algo_name() == "DH")
  ------------------
  |  Branch (319:53): [True: 0, False: 2.01k]
  ------------------
  320|  2.01k|                                                       ? reader.get_range<uint8_t>(2, 1, 65535)
  321|  2.01k|                                                       : reader.get_range<uint8_t>(1, 1, 255);
  322|       |
  323|  2.01k|         const auto shared_group = state.server_kex()->shared_group();
  324|  2.01k|         BOTAN_STATE_CHECK(shared_group && shared_group.value() != Group_Params::NONE);
  ------------------
  |  |   51|  2.01k|   do {                                                         \
  |  |   52|  2.01k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  4.02k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:12): [True: 2.00k, False: 4]
  |  |  |  Branch (53:12): [True: 2.00k, False: 0]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  2.01k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 2.01k]
  |  |  ------------------
  ------------------
  325|       |
  326|  2.01k|         try {
  327|  2.01k|            auto shared_secret =
  328|  2.01k|               state.callbacks().tls_ephemeral_key_agreement(shared_group.value(), ka_key, client_pubkey, rng, policy);
  329|       |
  330|  2.01k|            if(ka_key.algo_name() == "DH") {
  ------------------
  |  Branch (330:16): [True: 0, False: 2.01k]
  ------------------
  331|      0|               shared_secret = CT::strip_leading_zeros(shared_secret);
  332|      0|            }
  333|       |
  334|  2.01k|            if(kex_algo == Kex_Algo::ECDHE_PSK) {
  ------------------
  |  Branch (334:16): [True: 1.61k, False: 397]
  ------------------
  335|  1.61k|               append_tls_length_value(m_pre_master, shared_secret, 2);
  336|  1.61k|               append_tls_length_value(m_pre_master, psk.bits_of(), 2);
  337|  1.61k|            } else {
  338|    397|               m_pre_master = shared_secret;
  339|    397|            }
  340|  2.01k|         } catch(Invalid_Argument& e) {
  341|      0|            throw TLS_Exception(Alert::IllegalParameter, e.what());
  342|    393|         } catch(TLS_Exception&) {
  343|    393|            throw;  // rethrow
  344|    393|         } catch(std::exception&) {
  345|       |            /*
  346|       |            * Something failed in the DH/ECDH computation. To avoid possible
  347|       |            * attacks which are based on triggering and detecting some edge
  348|       |            * failure condition, randomize the pre-master output and carry on,
  349|       |            * allowing the protocol to fail later in the finished checks.
  350|       |            */
  351|      0|            rng.random_vec(m_pre_master, ka_key.public_value().size());
  352|      0|         }
  353|       |
  354|  1.61k|         reader.assert_done();
  355|  1.61k|      } else {
  356|      0|         throw Internal_Error("Client_Key_Exchange: Unknown key exchange negotiated");
  357|      0|      }
  358|  2.09k|   }
  359|  2.13k|}

_ZN5Botan3TLS11Finished_12C2ERNS0_12Handshake_IOERNS0_15Handshake_StateENS0_15Connection_SideE:
   44|     79|Finished_12::Finished_12(Handshake_IO& io, Handshake_State& state, Connection_Side side) {
   45|     79|   m_verification_data = finished_compute_verify_12(state, side);
   46|     79|   state.hash().update(io.send(*this));
   47|     79|}
_ZNK5Botan3TLS11Finished_126verifyERKNS0_15Handshake_StateENS0_15Connection_SideE:
   49|     79|bool Finished_12::verify(const Handshake_State& state, Connection_Side side) const {
   50|     79|   std::vector<uint8_t> computed_verify = finished_compute_verify_12(state, side);
   51|       |
   52|     79|#if defined(BOTAN_UNSAFE_FUZZER_MODE)
   53|     79|   return true;
   54|       |#else
   55|       |   return CT::is_equal<uint8_t>(m_verification_data, computed_verify).as_bool();
   56|       |#endif
   57|     79|}
msg_finished_12.cpp:_ZN5Botan3TLS12_GLOBAL__N_126finished_compute_verify_12ERKNS0_15Handshake_StateENS0_15Connection_SideE:
   23|    158|std::vector<uint8_t> finished_compute_verify_12(const Handshake_State& state, Connection_Side side) {
   24|    158|   const uint8_t TLS_CLIENT_LABEL[] = {
   25|    158|      0x63, 0x6C, 0x69, 0x65, 0x6E, 0x74, 0x20, 0x66, 0x69, 0x6E, 0x69, 0x73, 0x68, 0x65, 0x64};
   26|       |
   27|    158|   const uint8_t TLS_SERVER_LABEL[] = {
   28|    158|      0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x66, 0x69, 0x6E, 0x69, 0x73, 0x68, 0x65, 0x64};
   29|       |
   30|    158|   auto prf = state.protocol_specific_prf();
   31|       |
   32|    158|   std::vector<uint8_t> input;
   33|    158|   std::vector<uint8_t> label;
   34|    158|   label += (side == Connection_Side::Client) ? std::make_pair(TLS_CLIENT_LABEL, sizeof(TLS_CLIENT_LABEL))
  ------------------
  |  Branch (34:13): [True: 79, False: 79]
  ------------------
   35|    158|                                              : std::make_pair(TLS_SERVER_LABEL, sizeof(TLS_SERVER_LABEL));
   36|       |
   37|    158|   input += state.hash().final(state.ciphersuite().prf_algo());
   38|       |
   39|    158|   return unlock(prf->derive_key(12, state.session_keys().master_secret(), input, label));
   40|    158|}

_ZN5Botan3TLS15Server_Hello_12C2ERNS0_12Handshake_IOERNS0_14Handshake_HashERKNS0_6PolicyERNS0_9CallbacksERNS_21RandomNumberGeneratorENSt3__16vectorIhNSD_9allocatorIhEEEERKNS0_15Client_Hello_12ERKNS1_8SettingsENSD_17basic_string_viewIcNSD_11char_traitsIcEEEE:
   32|  2.81k|      Server_Hello_12(std::make_unique<Server_Hello_Internal>(
   33|  2.81k|         server_settings.protocol_version(),
   34|  2.81k|         server_settings.session_id(),
   35|  2.81k|         make_server_hello_random(rng, server_settings.protocol_version(), cb, policy),
   36|  2.81k|         server_settings.ciphersuite(),
   37|  2.81k|         uint8_t(0))) {
   38|       |   // NOLINTBEGIN(*-owning-memory)
   39|  2.81k|   if(client_hello.supports_extended_master_secret()) {
  ------------------
  |  Branch (39:7): [True: 2.81k, False: 0]
  ------------------
   40|  2.81k|      m_data->extensions().add(new Extended_Master_Secret);
   41|  2.81k|   }
   42|       |
   43|       |   // Sending the extension back does not commit us to sending a stapled response
   44|  2.81k|   if(client_hello.supports_cert_status_message() && policy.support_cert_status_message()) {
  ------------------
  |  Branch (44:7): [True: 183, False: 2.63k]
  |  Branch (44:54): [True: 183, False: 0]
  ------------------
   45|    183|      m_data->extensions().add(new Certificate_Status_Request);
   46|    183|   }
   47|       |
   48|  2.81k|   if(!next_protocol.empty() && client_hello.supports_alpn()) {
  ------------------
  |  Branch (48:7): [True: 25, False: 2.79k]
  |  Branch (48:33): [True: 25, False: 0]
  ------------------
   49|     25|      m_data->extensions().add(new Application_Layer_Protocol_Notification(next_protocol));
   50|     25|   }
   51|       |
   52|  2.81k|   const auto c = Ciphersuite::by_id(m_data->ciphersuite());
   53|       |
   54|  2.81k|   if(c && c->cbc_ciphersuite() && client_hello.supports_encrypt_then_mac() && policy.negotiate_encrypt_then_mac()) {
  ------------------
  |  Branch (54:7): [True: 2.81k, False: 0]
  |  Branch (54:12): [True: 1.53k, False: 1.27k]
  |  Branch (54:36): [True: 112, False: 1.42k]
  |  Branch (54:80): [True: 112, False: 0]
  ------------------
   55|    112|      m_data->extensions().add(new Encrypt_then_MAC);
   56|    112|   }
   57|       |
   58|  2.81k|   if(c && c->ecc_ciphersuite() && client_hello.extension_types().contains(Extension_Code::EcPointFormats)) {
  ------------------
  |  Branch (58:7): [True: 2.81k, False: 0]
  |  Branch (58:7): [True: 107, False: 2.70k]
  |  Branch (58:12): [True: 2.62k, False: 193]
  |  Branch (58:36): [True: 107, False: 2.51k]
  ------------------
   59|    107|      m_data->extensions().add(new Supported_Point_Formats(policy.use_ecc_point_compression()));
   60|    107|   }
   61|       |
   62|  2.81k|   if(client_hello.secure_renegotiation()) {
  ------------------
  |  Branch (62:7): [True: 170, False: 2.64k]
  ------------------
   63|    170|      m_data->extensions().add(new Renegotiation_Extension(std::move(reneg_info)));
   64|    170|   }
   65|       |
   66|  2.81k|   if(client_hello.supports_session_ticket() && server_settings.offer_session_ticket()) {
  ------------------
  |  Branch (66:7): [True: 30, False: 2.78k]
  |  Branch (66:49): [True: 0, False: 30]
  ------------------
   67|      0|      m_data->extensions().add(new Session_Ticket_Extension());
   68|      0|   }
   69|       |
   70|  2.81k|   if(m_data->legacy_version().is_datagram_protocol()) {
  ------------------
  |  Branch (70:7): [True: 0, False: 2.81k]
  ------------------
   71|      0|      const std::vector<uint16_t> server_srtp = policy.srtp_profiles();
   72|      0|      const std::vector<uint16_t> client_srtp = client_hello.srtp_profiles();
   73|       |
   74|      0|      if(!server_srtp.empty() && !client_srtp.empty()) {
  ------------------
  |  Branch (74:10): [True: 0, False: 0]
  |  Branch (74:34): [True: 0, False: 0]
  ------------------
   75|      0|         uint16_t shared = 0;
   76|       |         // always using server preferences for now
   77|      0|         for(auto s_srtp : server_srtp) {
  ------------------
  |  Branch (77:26): [True: 0, False: 0]
  ------------------
   78|      0|            for(auto c_srtp : client_srtp) {
  ------------------
  |  Branch (78:29): [True: 0, False: 0]
  ------------------
   79|      0|               if(shared == 0 && s_srtp == c_srtp) {
  ------------------
  |  Branch (79:19): [True: 0, False: 0]
  |  Branch (79:34): [True: 0, False: 0]
  ------------------
   80|      0|                  shared = s_srtp;
   81|      0|               }
   82|      0|            }
   83|      0|         }
   84|       |
   85|      0|         if(shared != 0) {
  ------------------
  |  Branch (85:13): [True: 0, False: 0]
  ------------------
   86|      0|            m_data->extensions().add(new SRTP_Protection_Profiles(shared));
   87|      0|         }
   88|      0|      }
   89|      0|   }
   90|       |   // NOLINTEND(*-owning-memory)
   91|       |
   92|  2.81k|   cb.tls_modify_extensions(m_data->extensions(), Connection_Side::Server, type());
   93|       |
   94|  2.81k|   hash.update(io.send(*this));
   95|  2.81k|}
_ZN5Botan3TLS15Server_Hello_12C2ENSt3__110unique_ptrINS0_21Server_Hello_InternalENS2_14default_deleteIS4_EEEE:
  159|  2.81k|Server_Hello_12::Server_Hello_12(std::unique_ptr<Server_Hello_Internal> data) : Server_Hello_12_Shim(std::move(data)) {}
_ZNK5Botan3TLS15Server_Hello_1220secure_renegotiationEv:
  161|  2.89k|bool Server_Hello_12::secure_renegotiation() const {
  162|  2.89k|   return m_data->extensions().has<Renegotiation_Extension>();
  163|  2.89k|}
_ZNK5Botan3TLS15Server_Hello_1218renegotiation_infoEv:
  165|    170|std::vector<uint8_t> Server_Hello_12::renegotiation_info() const {
  166|    170|   if(const Renegotiation_Extension* reneg = m_data->extensions().get<Renegotiation_Extension>()) {
  ------------------
  |  Branch (166:38): [True: 170, False: 0]
  ------------------
  167|    170|      return reneg->renegotiation_info();
  168|    170|   }
  169|      0|   return std::vector<uint8_t>();
  170|    170|}
_ZNK5Botan3TLS15Server_Hello_1231supports_extended_master_secretEv:
  172|  1.63k|bool Server_Hello_12::supports_extended_master_secret() const {
  173|  1.63k|   return m_data->extensions().has<Extended_Master_Secret>();
  174|  1.63k|}
_ZNK5Botan3TLS15Server_Hello_1225supports_encrypt_then_macEv:
  176|    535|bool Server_Hello_12::supports_encrypt_then_mac() const {
  177|    535|   return m_data->extensions().has<Encrypt_then_MAC>();
  178|    535|}
_ZNK5Botan3TLS15Server_Hello_1223supports_session_ticketEv:
  184|    237|bool Server_Hello_12::supports_session_ticket() const {
  185|    237|   return m_data->extensions().has<Session_Ticket_Extension>();
  186|    237|}
_ZNK5Botan3TLS15Server_Hello_1212srtp_profileEv:
  188|     79|uint16_t Server_Hello_12::srtp_profile() const {
  189|     79|   if(auto* srtp = m_data->extensions().get<SRTP_Protection_Profiles>()) {
  ------------------
  |  Branch (189:13): [True: 0, False: 79]
  ------------------
  190|      0|      auto prof = srtp->profiles();
  191|      0|      if(prof.size() != 1 || prof[0] == 0) {
  ------------------
  |  Branch (191:10): [True: 0, False: 0]
  |  Branch (191:30): [True: 0, False: 0]
  ------------------
  192|      0|         throw Decoding_Error("Server sent malformed DTLS-SRTP extension");
  193|      0|      }
  194|      0|      return prof[0];
  195|      0|   }
  196|       |
  197|     79|   return 0;
  198|     79|}
_ZN5Botan3TLS17Server_Hello_DoneC2ERNS0_12Handshake_IOERNS0_14Handshake_HashE:
  217|  2.81k|Server_Hello_Done::Server_Hello_Done(Handshake_IO& io, Handshake_Hash& hash) {
  218|  2.81k|   hash.update(io.send(*this));
  219|  2.81k|}
_ZNK5Botan3TLS17Server_Hello_Done9serializeEv:
  233|  2.81k|std::vector<uint8_t> Server_Hello_Done::serialize() const {
  234|  2.81k|   return std::vector<uint8_t>();
  235|  2.81k|}

_ZN5Botan3TLS19Server_Key_ExchangeD2Ev:
   26|  2.81k|Server_Key_Exchange::~Server_Key_Exchange() = default;
_ZN5Botan3TLS19Server_Key_ExchangeC2ERNS0_12Handshake_IOERNS0_15Handshake_StateERKNS0_6PolicyERNS_19Credentials_ManagerERNS_21RandomNumberGeneratorEPKNS_11Private_KeyE:
   36|  2.81k|                                         const Private_Key* signing_key) {
   37|  2.81k|   const std::string hostname = state.client_hello()->sni_hostname();
   38|  2.81k|   const Kex_Algo kex_algo = state.ciphersuite().kex_method();
   39|       |
   40|  2.81k|   if(kex_algo == Kex_Algo::PSK || kex_algo == Kex_Algo::ECDHE_PSK) {
  ------------------
  |  Branch (40:7): [True: 193, False: 2.61k]
  |  Branch (40:36): [True: 2.61k, False: 0]
  ------------------
   41|  2.81k|      const std::string identity_hint = creds.psk_identity_hint("tls-server", hostname);
   42|       |
   43|  2.81k|      append_tls_length_value(m_params, identity_hint, 2);
   44|  2.81k|   }
   45|       |
   46|  2.81k|   if(kex_algo == Kex_Algo::DH) {
  ------------------
  |  Branch (46:7): [True: 0, False: 2.81k]
  ------------------
   47|      0|      const std::vector<Group_Params> dh_groups = state.client_hello()->supported_dh_groups();
   48|       |
   49|      0|      m_shared_group = Group_Params::NONE;
   50|       |
   51|       |      /*
   52|       |      RFC 7919 requires that if the client sends any groups in the FFDHE
   53|       |      range, that we must select one of these. If this is not possible,
   54|       |      then we are required to reject the connection.
   55|       |
   56|       |      If the client did not send any DH groups, but did offer DH ciphersuites
   57|       |      and we selected one, then consult the policy for which DH group to pick.
   58|       |      */
   59|       |
   60|      0|      if(dh_groups.empty()) {
  ------------------
  |  Branch (60:10): [True: 0, False: 0]
  ------------------
   61|      0|         m_shared_group = policy.default_dh_group();
   62|      0|      } else {
   63|      0|         m_shared_group = policy.choose_key_exchange_group(dh_groups, {});
   64|      0|      }
   65|       |
   66|      0|      if(m_shared_group.value() == Group_Params::NONE) {
  ------------------
  |  Branch (66:10): [True: 0, False: 0]
  ------------------
   67|      0|         throw TLS_Exception(Alert::HandshakeFailure, "Could not agree on a DH group with the client");
   68|      0|      }
   69|       |
   70|       |      // The policy had better return a group we know about:
   71|      0|      BOTAN_ASSERT(m_shared_group.value().is_dh_named_group(), "DH ciphersuite is using a known finite field group");
  ------------------
  |  |   71|      0|   do {                                                                                 \
  |  |   72|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|      0|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
   72|       |
   73|       |      // Note: TLS 1.2 allows defining and using arbitrary DH groups (additional
   74|       |      //       to the named and standardized ones). This API doesn't allow the
   75|       |      //       server to make use of that at the moment. TLS 1.3 does not
   76|       |      //       provide this flexibility!
   77|       |      //
   78|       |      // A possible implementation strategy in case one would ever need that:
   79|       |      // `Policy::default_dh_group()` could return a `std::variant<Group_Params,
   80|       |      // DL_Group>`, allowing it to define arbitrary groups.
   81|      0|      m_kex_key = state.callbacks().tls_generate_ephemeral_key(m_shared_group.value(), rng);
   82|      0|      auto* dh = dynamic_cast<DH_PrivateKey*>(m_kex_key.get());
   83|      0|      if(dh == nullptr) {
  ------------------
  |  Branch (83:10): [True: 0, False: 0]
  ------------------
   84|      0|         throw TLS_Exception(Alert::InternalError, "Application did not provide a Diffie-Hellman key");
   85|      0|      }
   86|       |
   87|      0|      append_tls_length_value(m_params, dh->get_int_field("p").serialize(), 2);
   88|      0|      append_tls_length_value(m_params, dh->get_int_field("g").serialize(), 2);
   89|      0|      append_tls_length_value(m_params, dh->public_value(), 2);
   90|  2.81k|   } else if(kex_algo == Kex_Algo::ECDH || kex_algo == Kex_Algo::ECDHE_PSK) {
  ------------------
  |  Branch (90:14): [True: 0, False: 2.81k]
  |  Branch (90:44): [True: 2.61k, False: 193]
  ------------------
   91|  2.61k|      const std::vector<Group_Params> ec_groups = state.client_hello()->supported_ecc_curves();
   92|       |
   93|  2.61k|      if(ec_groups.empty()) {
  ------------------
  |  Branch (93:10): [True: 0, False: 2.61k]
  ------------------
   94|      0|         throw Internal_Error("Client sent no ECC extension but we negotiated ECDH");
   95|      0|      }
   96|       |
   97|  2.61k|      m_shared_group = policy.choose_key_exchange_group(ec_groups, {});
   98|       |
   99|  2.61k|      if(m_shared_group.value() == Group_Params::NONE) {
  ------------------
  |  Branch (99:10): [True: 0, False: 2.61k]
  ------------------
  100|      0|         throw TLS_Exception(Alert::HandshakeFailure, "No shared ECC group with client");
  101|      0|      }
  102|       |
  103|  2.61k|      m_kex_key = [&] {
  104|  2.61k|         if(m_shared_group->is_ecdh_named_curve()) {
  105|  2.61k|            const auto pubkey_point_format = state.client_hello()->prefers_compressed_ec_points()
  106|  2.61k|                                                ? EC_Point_Format::Compressed
  107|  2.61k|                                                : EC_Point_Format::Uncompressed;
  108|  2.61k|            return state.callbacks().tls12_generate_ephemeral_ecdh_key(*m_shared_group, rng, pubkey_point_format);
  109|  2.61k|         } else {
  110|  2.61k|            return state.callbacks().tls_generate_ephemeral_key(*m_shared_group, rng);
  111|  2.61k|         }
  112|  2.61k|      }();
  113|       |
  114|  2.61k|      if(!m_kex_key) {
  ------------------
  |  Branch (114:10): [True: 0, False: 2.61k]
  ------------------
  115|      0|         throw TLS_Exception(Alert::InternalError, "Application did not provide an EC key");
  116|      0|      }
  117|       |
  118|  2.61k|      const uint16_t named_curve_id = m_shared_group.value().wire_code();
  119|  2.61k|      m_params.push_back(3);  // named curve
  120|  2.61k|      m_params.push_back(get_byte<0>(named_curve_id));
  121|  2.61k|      m_params.push_back(get_byte<1>(named_curve_id));
  122|       |
  123|       |      // Note: In contrast to public_value(), raw_public_key_bits() takes the
  124|       |      // point format (compressed vs. uncompressed) into account that was set
  125|       |      // in its construction within tls_generate_ephemeral_key().
  126|  2.61k|      append_tls_length_value(m_params, m_kex_key->raw_public_key_bits(), 1);
  127|  2.61k|   } else if(kex_algo != Kex_Algo::PSK) {
  ------------------
  |  Branch (127:14): [True: 0, False: 193]
  ------------------
  128|      0|      throw Internal_Error("Server_Key_Exchange: Unknown kex type " + kex_method_to_string(kex_algo));
  129|      0|   }
  130|       |
  131|  2.81k|   if(state.ciphersuite().signature_used()) {
  ------------------
  |  Branch (131:7): [True: 0, False: 2.81k]
  ------------------
  132|      0|      BOTAN_ASSERT(signing_key, "Signing key was set");
  ------------------
  |  |   71|      0|   do {                                                                                 \
  |  |   72|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|      0|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  133|       |
  134|      0|      const std::pair<std::string, Signature_Format> format =
  135|      0|         state.choose_sig_format(*signing_key, m_scheme, false, policy);
  136|       |
  137|      0|      std::vector<uint8_t> buf = state.client_hello()->random();
  138|       |
  139|      0|      buf += state.server_hello()->random();
  140|      0|      buf += params();
  141|       |
  142|      0|      m_signature = state.callbacks().tls_sign_message(*signing_key, rng, format.first, format.second, buf);
  143|      0|   }
  144|       |
  145|  2.81k|   state.hash().update(io.send(*this));
  146|  2.81k|}
_ZNK5Botan3TLS19Server_Key_Exchange9serializeEv:
  197|  2.81k|std::vector<uint8_t> Server_Key_Exchange::serialize() const {
  198|  2.81k|   std::vector<uint8_t> buf = params();
  199|       |
  200|  2.81k|   if(!m_signature.empty()) {
  ------------------
  |  Branch (200:7): [True: 0, False: 2.81k]
  ------------------
  201|      0|      if(m_scheme.is_set()) {
  ------------------
  |  Branch (201:10): [True: 0, False: 0]
  ------------------
  202|      0|         buf.push_back(get_byte<0>(m_scheme.wire_code()));
  203|      0|         buf.push_back(get_byte<1>(m_scheme.wire_code()));
  204|      0|      }
  205|       |
  206|      0|      append_tls_length_value(buf, m_signature, 2);
  207|      0|   }
  208|       |
  209|  2.81k|   return buf;
  210|  2.81k|}
_ZNK5Botan3TLS19Server_Key_Exchange14server_kex_keyEv:
  239|  2.01k|const PK_Key_Agreement_Key& Server_Key_Exchange::server_kex_key() const {
  240|  2.01k|   BOTAN_ASSERT_NONNULL(m_kex_key);
  ------------------
  |  |  123|  2.01k|   do {                                                                                   \
  |  |  124|  2.01k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 2.01k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  2.01k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 2.01k]
  |  |  ------------------
  ------------------
  241|  2.01k|   return *m_kex_key;
  242|  2.01k|}
msg_server_kex.cpp:_ZZN5Botan3TLS19Server_Key_ExchangeC1ERNS0_12Handshake_IOERNS0_15Handshake_StateERKNS0_6PolicyERNS_19Credentials_ManagerERNS_21RandomNumberGeneratorEPKNS_11Private_KeyEENK3$_0clEv:
  103|  2.61k|      m_kex_key = [&] {
  104|  2.61k|         if(m_shared_group->is_ecdh_named_curve()) {
  ------------------
  |  Branch (104:13): [True: 2.59k, False: 25]
  ------------------
  105|  2.59k|            const auto pubkey_point_format = state.client_hello()->prefers_compressed_ec_points()
  ------------------
  |  Branch (105:46): [True: 66, False: 2.52k]
  ------------------
  106|  2.59k|                                                ? EC_Point_Format::Compressed
  107|  2.59k|                                                : EC_Point_Format::Uncompressed;
  108|  2.59k|            return state.callbacks().tls12_generate_ephemeral_ecdh_key(*m_shared_group, rng, pubkey_point_format);
  109|  2.59k|         } else {
  110|     25|            return state.callbacks().tls_generate_ephemeral_key(*m_shared_group, rng);
  111|     25|         }
  112|  2.61k|      }();

_ZN5Botan3TLS22TLS_CBC_HMAC_AEAD_ModeD2Ev:
   26|    207|TLS_CBC_HMAC_AEAD_Mode::~TLS_CBC_HMAC_AEAD_Mode() = default;
_ZN5Botan3TLS22TLS_CBC_HMAC_AEAD_ModeC2ENS_10Cipher_DirENSt3__110unique_ptrINS_11BlockCipherENS3_14default_deleteIS5_EEEENS4_INS_25MessageAuthenticationCodeENS6_IS9_EEEEmmRKNS0_16Protocol_VersionEb:
   38|    207|      m_mac(std::move(mac)),
   39|    207|      m_cipher_name(cipher->name()),
   40|    207|      m_mac_name(m_mac->name()),
   41|    207|      m_cipher_keylen(cipher_keylen),
   42|    207|      m_block_size(cipher->block_size()),
   43|    207|      m_iv_size(m_block_size),
   44|    207|      m_mac_keylen(mac_keylen),
   45|    207|      m_tag_size(m_mac->output_length()),
   46|    207|      m_use_encrypt_then_mac(use_encrypt_then_mac),
   47|    207|      m_is_datagram(version.is_datagram_protocol()) {
   48|    207|   BOTAN_ASSERT_NOMSG(m_mac->valid_keylength(m_mac_keylen));
  ------------------
  |  |   84|    207|   do {                                                                     \
  |  |   85|    207|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    207|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 207]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    207|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 207]
  |  |  ------------------
  ------------------
   49|    207|   BOTAN_ASSERT_NOMSG(cipher->valid_keylength(m_cipher_keylen));
  ------------------
  |  |   84|    207|   do {                                                                     \
  |  |   85|    207|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    207|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 207]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    207|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 207]
  |  |  ------------------
  ------------------
   50|       |
   51|    207|   auto null_padding = std::make_unique<Null_Padding>();
   52|    207|   if(dir == Cipher_Dir::Encryption) {
  ------------------
  |  Branch (52:7): [True: 50, False: 157]
  ------------------
   53|     50|      m_cbc = std::make_unique<CBC_Encryption>(std::move(cipher), std::move(null_padding));
   54|    157|   } else {
   55|    157|      m_cbc = std::make_unique<CBC_Decryption>(std::move(cipher), std::move(null_padding));
   56|    157|   }
   57|    207|}
_ZNK5Botan3TLS22TLS_CBC_HMAC_AEAD_Mode18valid_nonce_lengthEm:
   83|    211|bool TLS_CBC_HMAC_AEAD_Mode::valid_nonce_length(size_t nl) const {
   84|    211|   if(m_cbc_state.empty()) {
  ------------------
  |  Branch (84:7): [True: 176, False: 35]
  ------------------
   85|    176|      return nl == block_size();
   86|    176|   }
   87|     35|   return nl == iv_size();
   88|    211|}
_ZNK5Botan3TLS22TLS_CBC_HMAC_AEAD_Mode8key_specEv:
   90|    207|Key_Length_Specification TLS_CBC_HMAC_AEAD_Mode::key_spec() const {
   91|    207|   return Key_Length_Specification(m_cipher_keylen + m_mac_keylen);
   92|    207|}
_ZN5Botan3TLS22TLS_CBC_HMAC_AEAD_Mode12key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
   98|    207|void TLS_CBC_HMAC_AEAD_Mode::key_schedule(std::span<const uint8_t> key) {
   99|       |   // Both keys are of fixed length specified by the ciphersuite
  100|       |
  101|    207|   if(key.size() != m_cipher_keylen + m_mac_keylen) {
  ------------------
  |  Branch (101:7): [True: 0, False: 207]
  ------------------
  102|      0|      throw Invalid_Key_Length(name(), key.size());
  103|      0|   }
  104|       |
  105|    207|   mac().set_key(key.first(m_mac_keylen));
  106|    207|   cbc().set_key(key.subspan(m_mac_keylen, m_cipher_keylen));
  107|    207|}
_ZN5Botan3TLS22TLS_CBC_HMAC_AEAD_Mode9start_msgEPKhm:
  109|    211|void TLS_CBC_HMAC_AEAD_Mode::start_msg(const uint8_t nonce[], size_t nonce_len) {
  110|    211|   if(!valid_nonce_length(nonce_len)) {
  ------------------
  |  Branch (110:7): [True: 0, False: 211]
  ------------------
  111|      0|      throw Invalid_IV_Length(name(), nonce_len);
  112|      0|   }
  113|       |
  114|    211|   m_msg.clear();
  115|       |
  116|    211|   if(nonce_len > 0) {
  ------------------
  |  Branch (116:7): [True: 211, False: 0]
  ------------------
  117|    211|      m_cbc_state.assign(nonce, nonce + nonce_len);
  118|    211|   }
  119|    211|}
_ZN5Botan3TLS22TLS_CBC_HMAC_AEAD_Mode11process_msgEPhm:
  121|    211|size_t TLS_CBC_HMAC_AEAD_Mode::process_msg(uint8_t buf[], size_t sz) {
  122|    211|   m_msg.insert(m_msg.end(), buf, buf + sz);
  123|    211|   return 0;
  124|    211|}
_ZN5Botan3TLS22TLS_CBC_HMAC_AEAD_Mode19assoc_data_with_lenEt:
  126|    115|std::vector<uint8_t> TLS_CBC_HMAC_AEAD_Mode::assoc_data_with_len(uint16_t len) {
  127|    115|   std::vector<uint8_t> ad = m_ad;
  128|    115|   BOTAN_ASSERT(ad.size() == 13, "Expected AAD size");
  ------------------
  |  |   71|    115|   do {                                                                                 \
  |  |   72|    115|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|    115|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 115]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|    115|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 115]
  |  |  ------------------
  ------------------
  129|    115|   ad[11] = get_byte<0>(len);
  130|    115|   ad[12] = get_byte<1>(len);
  131|    115|   return ad;
  132|    115|}
_ZN5Botan3TLS22TLS_CBC_HMAC_AEAD_Mode21set_associated_data_nEmNSt3__14spanIKhLm18446744073709551615EEE:
  134|    211|void TLS_CBC_HMAC_AEAD_Mode::set_associated_data_n(size_t idx, std::span<const uint8_t> ad) {
  135|    211|   BOTAN_ARG_CHECK(idx == 0, "TLS 1.2 CBC/HMAC: cannot handle non-zero index in set_associated_data_n");
  ------------------
  |  |   35|    211|   do {                                                          \
  |  |   36|    211|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    211|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 211]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    211|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 211]
  |  |  ------------------
  ------------------
  136|    211|   if(ad.size() != 13) {
  ------------------
  |  Branch (136:7): [True: 0, False: 211]
  ------------------
  137|      0|      throw Invalid_Argument("Invalid TLS AEAD associated data length");
  138|      0|   }
  139|    211|   m_ad.assign(ad.begin(), ad.end());
  140|    211|}
_ZN5Botan3TLS28TLS_CBC_HMAC_AEAD_EncryptionC2ENSt3__110unique_ptrINS_11BlockCipherENS2_14default_deleteIS4_EEEENS3_INS_25MessageAuthenticationCodeENS5_IS8_EEEEmmRKNS0_16Protocol_VersionEb:
  148|     50|      TLS_CBC_HMAC_AEAD_Mode(Cipher_Dir::Encryption,
  149|     50|                             std::move(cipher),
  150|     50|                             std::move(mac),
  151|     50|                             cipher_keylen,
  152|     50|                             mac_keylen,
  153|     50|                             version,
  154|     50|                             use_encrypt_then_mac) {}
_ZN5Botan3TLS28TLS_CBC_HMAC_AEAD_Encryption21set_associated_data_nEmNSt3__14spanIKhLm18446744073709551615EEE:
  156|     85|void TLS_CBC_HMAC_AEAD_Encryption::set_associated_data_n(size_t idx, std::span<const uint8_t> ad) {
  157|     85|   TLS_CBC_HMAC_AEAD_Mode::set_associated_data_n(idx, ad);
  158|       |
  159|     85|   if(use_encrypt_then_mac()) {
  ------------------
  |  Branch (159:7): [True: 16, False: 69]
  ------------------
  160|       |      // AAD hack for EtM
  161|       |      // EtM uses ciphertext size instead of plaintext size for AEAD input
  162|     16|      const uint16_t pt_size = make_uint16(assoc_data()[11], assoc_data()[12]);
  163|     16|      const uint16_t enc_size = static_cast<uint16_t>(round_up(iv_size() + pt_size + 1, block_size()));
  164|     16|      assoc_data()[11] = get_byte<0, uint16_t>(enc_size);
  165|     16|      assoc_data()[12] = get_byte<1, uint16_t>(enc_size);
  166|     16|   }
  167|     85|}
_ZN5Botan3TLS28TLS_CBC_HMAC_AEAD_Encryption18cbc_encrypt_recordERNSt3__16vectorIhNS_16secure_allocatorIhEEEEmm:
  171|     85|                                                      size_t padding_length) {
  172|       |   // We always do short padding:
  173|     85|   BOTAN_ASSERT_NOMSG(padding_length <= 16);
  ------------------
  |  |   84|     85|   do {                                                                     \
  |  |   85|     85|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     85|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 85]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     85|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 85]
  |  |  ------------------
  ------------------
  174|       |
  175|     85|   const size_t buf_with_padding = add_or_throw(buffer.size(), padding_length, "TLS CBC input too large");
  176|     85|   buffer.resize(buf_with_padding);
  177|       |
  178|     85|   const uint8_t padding_val = static_cast<uint8_t>(padding_length - 1);
  179|       |
  180|     85|   CT::poison(&padding_val, 1);
  181|     85|   CT::poison(&padding_length, 1);
  182|     85|   CT::poison(buffer.data(), buffer.size());
  183|       |
  184|     85|   const size_t last_block_starts = buffer.size() - block_size();
  185|     85|   const size_t padding_starts = buffer.size() - padding_length;
  186|  1.15k|   for(size_t i = last_block_starts; i != buffer.size(); ++i) {
  ------------------
  |  Branch (186:38): [True: 1.07k, False: 85]
  ------------------
  187|  1.07k|      auto add_padding = CT::Mask<uint8_t>(CT::Mask<size_t>::is_gte(i, padding_starts));
  188|  1.07k|      buffer[i] = add_padding.select(padding_val, buffer[i]);
  189|  1.07k|   }
  190|       |
  191|     85|   CT::unpoison(padding_val);
  192|     85|   CT::unpoison(padding_length);
  193|     85|   CT::unpoison(buffer.data(), buffer.size());
  194|       |
  195|     85|   cbc().start(cbc_state());
  196|     85|   cbc().process(&buffer[offset], buffer.size() - offset);
  197|       |
  198|     85|   cbc_state().assign(buffer.data() + (buffer.size() - block_size()), buffer.data() + buffer.size());
  199|     85|}
_ZNK5Botan3TLS28TLS_CBC_HMAC_AEAD_Encryption13output_lengthEm:
  201|     85|size_t TLS_CBC_HMAC_AEAD_Encryption::output_length(size_t input_length) const {
  202|     85|   const size_t mac_in_plaintext = use_encrypt_then_mac() ? 0 : tag_size();
  ------------------
  |  Branch (202:36): [True: 16, False: 69]
  ------------------
  203|     85|   const size_t mac_appended = use_encrypt_then_mac() ? tag_size() : 0;
  ------------------
  |  Branch (203:32): [True: 16, False: 69]
  ------------------
  204|       |
  205|       |   // round_up() checks its own addition for overflow, but the addition feeding
  206|       |   // it and the trailing MAC must be checked separately. mac_in_plaintext + 1
  207|       |   // cannot overflow as the MAC length is small.
  208|     85|   const size_t input_size = add_or_throw(input_length, mac_in_plaintext + 1, "TLS CBC input too large");
  209|     85|   return add_or_throw(round_up(input_size, block_size()), mac_appended, "TLS CBC input too large");
  210|     85|}
_ZN5Botan3TLS28TLS_CBC_HMAC_AEAD_Encryption10finish_msgERNSt3__16vectorIhNS_16secure_allocatorIhEEEEm:
  212|     85|void TLS_CBC_HMAC_AEAD_Encryption::finish_msg(secure_vector<uint8_t>& buffer, size_t offset) {
  213|     85|   update(buffer, offset);
  214|       |
  215|     85|   const size_t msg_size = msg().size();
  216|       |
  217|     85|   const size_t input_size =
  218|     85|      add_or_throw(msg_size, (use_encrypt_then_mac() ? 0 : tag_size()) + 1, "TLS CBC input too large");
  ------------------
  |  Branch (218:31): [True: 16, False: 69]
  ------------------
  219|     85|   const size_t enc_size = round_up(input_size, block_size());
  220|     85|   BOTAN_DEBUG_ASSERT(enc_size % block_size() == 0);
  ------------------
  |  |  137|     85|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|     85|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 85]
  |  |  ------------------
  ------------------
  221|       |
  222|     85|   const uint8_t padding_val = static_cast<uint8_t>(enc_size - input_size);
  223|     85|   const size_t padding_length = static_cast<size_t>(padding_val) + 1;
  224|       |
  225|     85|   const size_t output_size = add_or_throw(offset, msg_size, "TLS CBC input too large");
  226|     85|   buffer.reserve(add_or_throw(output_size, padding_length + tag_size(), "TLS CBC input too large"));
  227|     85|   buffer.resize(output_size);
  228|     85|   if(msg_size > 0) {
  ------------------
  |  Branch (228:7): [True: 85, False: 0]
  ------------------
  229|     85|      copy_mem(&buffer[offset], msg().data(), msg_size);
  230|     85|   }
  231|       |
  232|     85|   mac().update(assoc_data());
  233|       |
  234|     85|   if(use_encrypt_then_mac()) {
  ------------------
  |  Branch (234:7): [True: 16, False: 69]
  ------------------
  235|     16|      if(iv_size() > 0) {
  ------------------
  |  Branch (235:10): [True: 16, False: 0]
  ------------------
  236|     16|         mac().update(cbc_state());
  237|     16|      }
  238|       |
  239|     16|      cbc_encrypt_record(buffer, offset, padding_length);
  240|     16|      mac().update(&buffer[offset], enc_size);
  241|     16|      buffer.resize(add_or_throw(buffer.size(), tag_size(), "TLS CBC input too large"));
  242|     16|      mac().final(&buffer[buffer.size() - tag_size()]);
  243|     69|   } else {
  244|     69|      if(msg_size > 0) {
  ------------------
  |  Branch (244:10): [True: 69, False: 0]
  ------------------
  245|     69|         mac().update(&buffer[offset], msg_size);
  246|     69|      }
  247|     69|      buffer.resize(add_or_throw(buffer.size(), tag_size(), "TLS CBC input too large"));
  248|     69|      mac().final(&buffer[buffer.size() - tag_size()]);
  249|     69|      cbc_encrypt_record(buffer, offset, padding_length);
  250|     69|   }
  251|     85|}
_ZN5Botan3TLS21check_tls_cbc_paddingEPKhm:
  264|    107|uint16_t check_tls_cbc_padding(const uint8_t record[], size_t record_len) {
  265|    107|   if(record_len == 0 || record_len > 0xFFFF) {
  ------------------
  |  Branch (265:7): [True: 0, False: 107]
  |  Branch (265:26): [True: 0, False: 107]
  ------------------
  266|      0|      return 0;
  267|      0|   }
  268|       |
  269|    107|   const uint16_t rec16 = static_cast<uint16_t>(record_len);
  270|       |
  271|       |   /*
  272|       |   * TLS v1.0 and up require all the padding bytes be the same value
  273|       |   * and allows up to 255 bytes.
  274|       |   */
  275|       |
  276|    107|   const uint16_t to_check = std::min<uint16_t>(256, static_cast<uint16_t>(record_len));
  277|    107|   const uint8_t pad_byte = record[record_len - 1];
  278|    107|   const uint16_t pad_bytes = 1 + pad_byte;
  279|       |
  280|    107|   auto pad_invalid = CT::Mask<uint16_t>::is_lt(rec16, pad_bytes);
  281|       |
  282|  23.5k|   for(uint16_t i = rec16 - to_check; i != rec16; ++i) {
  ------------------
  |  Branch (282:39): [True: 23.4k, False: 107]
  ------------------
  283|  23.4k|      const uint16_t offset = rec16 - i;
  284|  23.4k|      const auto in_pad_range = CT::Mask<uint16_t>::is_lte(offset, pad_bytes);
  285|  23.4k|      const auto pad_correct = CT::Mask<uint16_t>::is_equal(record[i], pad_byte);
  286|  23.4k|      pad_invalid |= in_pad_range & ~pad_correct;
  287|  23.4k|   }
  288|       |
  289|    107|   return pad_invalid.if_not_set_return(pad_bytes);
  290|    107|}
_ZN5Botan3TLS28TLS_CBC_HMAC_AEAD_DecryptionC2ENSt3__110unique_ptrINS_11BlockCipherENS2_14default_deleteIS4_EEEENS3_INS_25MessageAuthenticationCodeENS5_IS8_EEEEmmRKNS0_16Protocol_VersionEb:
  298|    157|      TLS_CBC_HMAC_AEAD_Mode(Cipher_Dir::Decryption,
  299|    157|                             std::move(cipher),
  300|    157|                             std::move(mac),
  301|    157|                             cipher_keylen,
  302|    157|                             mac_keylen,
  303|    157|                             version,
  304|    157|                             use_encrypt_then_mac) {}
_ZN5Botan3TLS28TLS_CBC_HMAC_AEAD_Decryption18cbc_decrypt_recordEPhm:
  306|    107|void TLS_CBC_HMAC_AEAD_Decryption::cbc_decrypt_record(uint8_t record_contents[], size_t record_len) {
  307|    107|   if(record_len == 0 || record_len % block_size() != 0) {
  ------------------
  |  Branch (307:7): [True: 0, False: 107]
  |  Branch (307:26): [True: 0, False: 107]
  ------------------
  308|      0|      throw Decoding_Error("Received TLS CBC ciphertext with invalid length");
  309|      0|   }
  310|       |
  311|    107|   cbc().start(cbc_state());
  312|    107|   cbc_state().assign(record_contents + record_len - block_size(), record_contents + record_len);
  313|       |
  314|    107|   cbc().process(record_contents, record_len);
  315|    107|}
_ZNK5Botan3TLS28TLS_CBC_HMAC_AEAD_Decryption13output_lengthEm:
  317|    126|size_t TLS_CBC_HMAC_AEAD_Decryption::output_length(size_t /*input_length*/) const {
  318|       |   /*
  319|       |   * We don't know this because the padding is arbitrary
  320|       |   */
  321|    126|   return 0;
  322|    126|}
_ZN5Botan3TLS28TLS_CBC_HMAC_AEAD_Decryption31perform_additional_compressionsEmm:
  366|    107|void TLS_CBC_HMAC_AEAD_Decryption::perform_additional_compressions(size_t plen, size_t padlen) {
  367|    107|   const bool is_sha384 = mac().name() == "HMAC(SHA-384)";
  368|    107|   const uint16_t block_size = is_sha384 ? 128 : 64;
  ------------------
  |  Branch (368:32): [True: 26, False: 81]
  ------------------
  369|    107|   const uint16_t max_bytes_in_first_block = is_sha384 ? 111 : 55;
  ------------------
  |  Branch (369:46): [True: 26, False: 81]
  ------------------
  370|       |
  371|       |   // number of maximum MACed bytes
  372|    107|   const uint16_t L1 = static_cast<uint16_t>(13 + plen - tag_size());
  373|       |   // number of current MACed bytes (L1 - padlen)
  374|       |   // Here the Lucky 13 paper is different because the padlen length in the paper
  375|       |   // does not count the last message byte.
  376|    107|   const uint16_t L2 = static_cast<uint16_t>(13 + plen - padlen - tag_size());
  377|       |   // From the paper, for SHA-256/SHA-1 compute: ceil((L1-55)/64) and ceil((L2-55)/64)
  378|       |   // ceil((L1-55)/64) = floor((L1+64-1-55)/64)
  379|       |   // Here we compute number of compressions for SHA-* in general
  380|    107|   const uint16_t max_compresssions = ((L1 + block_size - 1 - max_bytes_in_first_block) / block_size);
  381|    107|   const uint16_t current_compressions = ((L2 + block_size - 1 - max_bytes_in_first_block) / block_size);
  382|       |   // number of additional compressions we have to perform
  383|    107|   const uint16_t add_compressions = max_compresssions - current_compressions;
  384|    107|   const uint16_t equal = CT::Mask<uint16_t>::is_equal(max_compresssions, current_compressions).if_set_return(1);
  385|       |   // We compute the data length we need to achieve the number of compressions.
  386|       |   // If there are no compressions, we just add 55/111 dummy bytes so that no
  387|       |   // compression is performed.
  388|    107|   const uint16_t data_len = block_size * add_compressions + equal * max_bytes_in_first_block;
  389|    107|   std::vector<uint8_t> data(data_len);
  390|    107|   mac().update(data);
  391|       |   // we do not need to clear the MAC since the connection is broken anyway
  392|    107|}
_ZN5Botan3TLS28TLS_CBC_HMAC_AEAD_Decryption10finish_msgERNSt3__16vectorIhNS_16secure_allocatorIhEEEEm:
  394|    126|void TLS_CBC_HMAC_AEAD_Decryption::finish_msg(secure_vector<uint8_t>& buffer, size_t offset) {
  395|    126|   update(buffer, offset);
  396|    126|   buffer.resize(offset);
  397|       |
  398|    126|   const size_t record_len = msg().size();
  399|    126|   uint8_t* record_contents = msg().data();
  400|       |
  401|       |   // This early exit does not leak info because all the values compared are public
  402|    126|   if(record_len < tag_size() || (record_len - (use_encrypt_then_mac() ? tag_size() : 0)) % block_size() != 0) {
  ------------------
  |  Branch (402:7): [True: 0, False: 126]
  |  Branch (402:34): [True: 11, False: 115]
  |  Branch (402:49): [True: 10, False: 116]
  ------------------
  403|     11|      throw TLS_Exception(Alert::BadRecordMac, "Message authentication failure");
  404|     11|   }
  405|       |
  406|    115|   if(use_encrypt_then_mac()) {
  ------------------
  |  Branch (406:7): [True: 8, False: 107]
  ------------------
  407|      8|      const size_t enc_size = record_len - tag_size();
  408|      8|      const size_t enc_iv_size = enc_size + iv_size();
  409|       |
  410|      8|      BOTAN_ASSERT_NOMSG(enc_iv_size <= 0xFFFF);
  ------------------
  |  |   84|      8|   do {                                                                     \
  |  |   85|      8|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|      8|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 8]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|      8|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 8]
  |  |  ------------------
  ------------------
  411|       |
  412|      8|      mac().update(assoc_data_with_len(static_cast<uint16_t>(enc_iv_size)));
  413|      8|      if(iv_size() > 0) {
  ------------------
  |  Branch (413:10): [True: 8, False: 0]
  ------------------
  414|      8|         mac().update(cbc_state());
  415|      8|      }
  416|      8|      mac().update(record_contents, enc_size);
  417|       |
  418|      8|      std::vector<uint8_t> mac_buf(tag_size());
  419|      8|      mac().final(mac_buf.data());
  420|       |
  421|      8|      const size_t mac_offset = enc_size;
  422|       |
  423|      8|      const auto mac_ok = CT::is_equal(&record_contents[mac_offset], mac_buf.data(), tag_size());
  424|       |
  425|      8|      if(!mac_ok.as_bool()) {
  ------------------
  |  Branch (425:10): [True: 8, False: 0]
  ------------------
  426|      8|         throw TLS_Exception(Alert::BadRecordMac, "Message authentication failure");
  427|      8|      }
  428|       |
  429|      0|      cbc_decrypt_record(record_contents, enc_size);
  430|       |
  431|       |      // 0 if padding was invalid, otherwise 1 + padding_bytes
  432|      0|      const uint16_t pad_size = check_tls_cbc_padding(record_contents, enc_size);
  433|       |
  434|       |      // No oracle here, whoever sent us this had the key since MAC check passed
  435|      0|      if(pad_size == 0) {
  ------------------
  |  Branch (435:10): [True: 0, False: 0]
  ------------------
  436|      0|         throw TLS_Exception(Alert::BadRecordMac, "Message authentication failure");
  437|      0|      }
  438|       |
  439|      0|      const uint8_t* plaintext_block = &record_contents[0];
  440|      0|      const size_t plaintext_length = enc_size - pad_size;
  441|       |
  442|      0|      buffer.insert(buffer.end(), plaintext_block, plaintext_block + plaintext_length);
  443|    107|   } else {
  444|    107|      cbc_decrypt_record(record_contents, record_len);
  445|       |
  446|    107|      CT::poison(record_contents, record_len);
  447|       |
  448|       |      // 0 if padding was invalid, otherwise 1 + padding_bytes
  449|    107|      uint16_t pad_size = check_tls_cbc_padding(record_contents, record_len);
  450|       |
  451|       |      /*
  452|       |      This mask is zero if there is not enough room in the packet to get a valid MAC.
  453|       |
  454|       |      We have to accept empty packets, since otherwise we are not compatible
  455|       |      with how OpenSSL's countermeasure for fixing BEAST in TLS 1.0 CBC works
  456|       |      (sending empty records, instead of 1/(n-1) splitting)
  457|       |      */
  458|       |
  459|       |      // We know the cast cannot overflow as pad_size <= 256 && tag_size <= 32
  460|    107|      const auto size_ok_mask =
  461|    107|         CT::Mask<uint16_t>::is_lte(static_cast<uint16_t>(tag_size() + pad_size), static_cast<uint16_t>(record_len));
  462|       |
  463|    107|      pad_size = size_ok_mask.if_set_return(pad_size);
  464|       |
  465|    107|      CT::unpoison(record_contents, record_len);
  466|       |
  467|       |      /*
  468|       |      This is unpoisoned sooner than it should. The pad_size leaks to plaintext_length and
  469|       |      then to the timing channel in the MAC computation described in the Lucky 13 paper.
  470|       |      */
  471|    107|      CT::unpoison(pad_size);
  472|       |
  473|    107|      const uint8_t* plaintext_block = &record_contents[0];
  474|    107|      const uint16_t plaintext_length = static_cast<uint16_t>(record_len - tag_size() - pad_size);
  475|       |
  476|    107|      mac().update(assoc_data_with_len(plaintext_length));
  477|    107|      mac().update(plaintext_block, plaintext_length);
  478|       |
  479|    107|      std::vector<uint8_t> mac_buf(tag_size());
  480|    107|      mac().final(mac_buf.data());
  481|       |
  482|    107|      const size_t mac_offset = record_len - (tag_size() + pad_size);
  483|       |
  484|    107|      const auto mac_ok = CT::is_equal(&record_contents[mac_offset], mac_buf.data(), tag_size());
  485|       |
  486|    107|      const auto ok_mask = size_ok_mask & CT::Mask<uint16_t>::expand(mac_ok) & CT::Mask<uint16_t>::expand(pad_size);
  487|       |
  488|    107|      CT::unpoison(ok_mask);
  489|       |
  490|    107|      if(ok_mask.as_bool()) {
  ------------------
  |  Branch (490:10): [True: 0, False: 107]
  ------------------
  491|      0|         buffer.insert(buffer.end(), plaintext_block, plaintext_block + plaintext_length);
  492|    107|      } else {
  493|    107|         perform_additional_compressions(record_len, pad_size);
  494|       |
  495|       |         /*
  496|       |         * In DTLS case we have to finish computing the MAC since we require the
  497|       |         * MAC state be reset for future packets. This extra timing channel may
  498|       |         * be exploitable in a Lucky13 variant.
  499|       |         */
  500|    107|         if(is_datagram_protocol()) {
  ------------------
  |  Branch (500:13): [True: 0, False: 107]
  ------------------
  501|      0|            mac().final(mac_buf);
  502|      0|         }
  503|    107|         throw TLS_Exception(Alert::BadRecordMac, "Message authentication failure");
  504|    107|      }
  505|    107|   }
  506|    115|}

_ZN5Botan3TLS15Channel_Impl_12C2ERKNSt3__110shared_ptrINS0_9CallbacksEEERKNS3_INS0_15Session_ManagerEEERKNS3_INS_21RandomNumberGeneratorEEERKNS3_IKNS0_6PolicyEEEbbm:
   97|  3.98k|      m_is_server(is_server),
   98|  3.98k|      m_is_datagram(is_datagram),
   99|  3.98k|      m_callbacks(callbacks),
  100|  3.98k|      m_session_manager(session_manager),
  101|  3.98k|      m_policy(policy),
  102|  3.98k|      m_rng(rng),
  103|  3.98k|      m_has_been_closed(false) {
  104|  3.98k|   BOTAN_ASSERT_NONNULL(m_callbacks);
  ------------------
  |  |  123|  3.98k|   do {                                                                                   \
  |  |  124|  3.98k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 3.98k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  3.98k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 3.98k]
  |  |  ------------------
  ------------------
  105|  3.98k|   BOTAN_ASSERT_NONNULL(m_session_manager);
  ------------------
  |  |  123|  3.98k|   do {                                                                                   \
  |  |  124|  3.98k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 3.98k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  3.98k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 3.98k]
  |  |  ------------------
  ------------------
  106|  3.98k|   BOTAN_ASSERT_NONNULL(m_rng);
  ------------------
  |  |  123|  3.98k|   do {                                                                                   \
  |  |  124|  3.98k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 3.98k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  3.98k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 3.98k]
  |  |  ------------------
  ------------------
  107|  3.98k|   BOTAN_ASSERT_NONNULL(m_policy);
  ------------------
  |  |  123|  3.98k|   do {                                                                                   \
  |  |  124|  3.98k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 3.98k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  3.98k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 3.98k]
  |  |  ------------------
  ------------------
  108|       |
  109|       |   /* epoch 0 is plaintext, thus null cipher state */
  110|  3.98k|   m_write_cipher_states[0] = nullptr;
  111|  3.98k|   m_read_cipher_states[0] = {};
  112|       |
  113|  3.98k|   m_writebuf.reserve(reserved_io_buffer_size);
  114|  3.98k|   m_readbuf.reserve(reserved_io_buffer_size);
  115|  3.98k|}
_ZN5Botan3TLS15Channel_Impl_1211reset_stateEv:
  117|  2.00k|void Channel_Impl_12::reset_state() {
  118|  2.00k|   m_active_state.reset();
  119|  2.00k|   m_pending_state.reset();
  120|  2.00k|   m_epochs_before_latest_renegotiation.reset();
  121|  2.00k|   m_resumption_handle.reset();
  122|  2.00k|   m_readbuf.clear();
  123|  2.00k|   m_write_cipher_states.clear();
  124|  2.00k|   m_read_cipher_states.clear();
  125|  2.00k|}
_ZN5Botan3TLS15Channel_Impl_1222note_resumption_handleENSt3__18optionalINS0_14Session_HandleEEE:
  127|     79|void Channel_Impl_12::note_resumption_handle(std::optional<Session_Handle> handle) {
  128|     79|   m_resumption_handle = std::move(handle);
  129|     79|}
_ZN5Botan3TLS15Channel_Impl_1227take_sessions_to_invalidateEv:
  131|  2.00k|std::vector<Session_Handle> Channel_Impl_12::take_sessions_to_invalidate() {
  132|       |   // A ticket-backed session is not cached under the ServerHello session ID, so
  133|       |   // both handles have to be collected.
  134|  2.00k|   std::vector<Session_Handle> handles;
  135|       |
  136|  2.00k|   if(m_resumption_handle.has_value()) {
  ------------------
  |  Branch (136:7): [True: 0, False: 2.00k]
  ------------------
  137|      0|      handles.push_back(m_resumption_handle.value());
  138|      0|      m_resumption_handle.reset();
  139|      0|   }
  140|       |
  141|  2.00k|   if(m_active_state.has_value()) {
  ------------------
  |  Branch (141:7): [True: 56, False: 1.95k]
  ------------------
  142|     56|      const auto& sid = m_active_state->session_id();
  143|     56|      if(!sid.empty()) {
  ------------------
  |  Branch (143:10): [True: 56, False: 0]
  ------------------
  144|     56|         handles.emplace_back(sid);
  145|     56|      }
  146|     56|   }
  147|       |
  148|  2.00k|   return handles;
  149|  2.00k|}
_ZN5Botan3TLS15Channel_Impl_1219invalidate_sessionsERKNSt3__16vectorINS0_14Session_HandleENS2_9allocatorIS4_EEEE:
  151|  2.00k|void Channel_Impl_12::invalidate_sessions(const std::vector<Session_Handle>& handles) {
  152|       |   // RFC 5246 7.2.2: "Servers and clients MUST forget any session-identifiers,
  153|       |   // keys, and secrets associated with a failed connection.  Thus, any
  154|       |   // connection terminated with a fatal alert MUST NOT be resumed."
  155|       |   //
  156|       |   // Best effort, and deliberately last: remove() reaches application-supplied
  157|       |   // storage and can throw, and by then the keys are already gone. Letting a
  158|       |   // failed cache eviction abort the teardown would leave the channel usable
  159|       |   // after a security-fatal event, which is the worse of the two outcomes. A
  160|       |   // stateless ticket issuer has nothing to remove and cannot revoke what it
  161|       |   // already handed out.
  162|  2.00k|   for(const auto& handle : handles) {
  ------------------
  |  Branch (162:27): [True: 56, False: 2.00k]
  ------------------
  163|     56|      try {
  164|     56|         session_manager().remove(handle);
  165|     56|      } catch(...) {}
  166|     56|   }
  167|  2.00k|}
_ZN5Botan3TLS15Channel_Impl_12D2Ev:
  184|  3.98k|Channel_Impl_12::~Channel_Impl_12() = default;
_ZNK5Botan3TLS15Channel_Impl_1216sequence_numbersEv:
  186|  30.4k|Connection_Sequence_Numbers& Channel_Impl_12::sequence_numbers() const {
  187|  30.4k|   BOTAN_ASSERT(m_sequence_numbers, "Have a sequence numbers object");
  ------------------
  |  |   71|  30.4k|   do {                                                                                 \
  |  |   72|  30.4k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|  30.4k|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 30.4k]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|  30.4k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 30.4k]
  |  |  ------------------
  ------------------
  188|  30.4k|   return *m_sequence_numbers;
  189|  30.4k|}
_ZNK5Botan3TLS15Channel_Impl_1223read_cipher_state_epochEt:
  191|    358|std::shared_ptr<Connection_Cipher_State> Channel_Impl_12::read_cipher_state_epoch(uint16_t epoch) const {
  192|    358|   auto i = m_read_cipher_states.find(epoch);
  193|    358|   if(i == m_read_cipher_states.end()) {
  ------------------
  |  Branch (193:7): [True: 44, False: 314]
  ------------------
  194|     44|      throw Internal_Error("TLS::Channel_Impl_12 No read cipherstate for epoch " + std::to_string(epoch));
  195|     44|   }
  196|       |
  197|       |   // RFC 6347 4.1: "In general, implementations SHOULD discard packets from
  198|       |   // earlier epochs, but if packet loss causes noticeable problems they MAY
  199|       |   // choose to retain keying material from previous epochs for up to the
  200|       |   // default MSL specified for TCP [TCP] to allow for packet reordering."
  201|       |   // read_dtls_record drops the record when this throws.
  202|    314|   if(const auto& retired_at = i->second.retired_at; retired_at.has_value()) {
  ------------------
  |  Branch (202:54): [True: 0, False: 314]
  ------------------
  203|      0|      const auto now = callbacks().tls_current_monotonic_clock_ms();
  204|      0|      const auto retired = retired_at.value();
  205|      0|      BOTAN_ASSERT_NOMSG(now >= retired);
  ------------------
  |  |   84|      0|   do {                                                                     \
  |  |   85|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|      0|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  206|      0|      if(now - retired > TCP_MSL_MS) {
  ------------------
  |  Branch (206:10): [True: 0, False: 0]
  ------------------
  207|      0|         throw Invalid_State("TLS::Channel_Impl_12 Read cipherstate for epoch " + std::to_string(epoch) +
  208|      0|                             " is past its retention window");
  209|      0|      }
  210|      0|   }
  211|       |
  212|    314|   return i->second.state;
  213|    314|}
_ZNK5Botan3TLS15Channel_Impl_1224write_cipher_state_epochEt:
  215|  10.5k|std::shared_ptr<Connection_Cipher_State> Channel_Impl_12::write_cipher_state_epoch(uint16_t epoch) const {
  216|  10.5k|   auto i = m_write_cipher_states.find(epoch);
  217|  10.5k|   if(i == m_write_cipher_states.end()) {
  ------------------
  |  Branch (217:7): [True: 0, False: 10.5k]
  ------------------
  218|      0|      throw Internal_Error("TLS::Channel_Impl_12 No write cipherstate for epoch " + std::to_string(epoch));
  219|      0|   }
  220|  10.5k|   return i->second;
  221|  10.5k|}
_ZN5Botan3TLS15Channel_Impl_1222create_handshake_stateENS0_16Protocol_VersionEb:
  240|  3.83k|Handshake_State& Channel_Impl_12::create_handshake_state(Protocol_Version version, bool epoch0_restart) {
  241|  3.83k|   if(pending_state() != nullptr) {
  ------------------
  |  Branch (241:7): [True: 0, False: 3.83k]
  ------------------
  242|      0|      throw Internal_Error("create_handshake_state called during handshake");
  243|      0|   }
  244|       |
  245|  3.83k|   if(m_active_state.has_value()) {
  ------------------
  |  Branch (245:7): [True: 0, False: 3.83k]
  ------------------
  246|      0|      const Protocol_Version active_version = m_active_state->version();
  247|       |
  248|      0|      if(active_version.is_datagram_protocol() != version.is_datagram_protocol()) {
  ------------------
  |  Branch (248:10): [True: 0, False: 0]
  ------------------
  249|      0|         throw TLS_Exception(Alert::ProtocolVersion,
  250|      0|                             "Active state using version " + active_version.to_string() + " cannot change to " +
  251|      0|                                version.to_string() + " in pending");
  252|      0|      }
  253|      0|   }
  254|       |
  255|  3.83k|   if(!m_sequence_numbers) {
  ------------------
  |  Branch (255:7): [True: 3.83k, False: 0]
  ------------------
  256|  3.83k|      if(version.is_datagram_protocol()) {
  ------------------
  |  Branch (256:10): [True: 619, False: 3.21k]
  ------------------
  257|    619|         m_sequence_numbers = std::make_unique<Datagram_Sequence_Numbers>();
  258|  3.21k|      } else {
  259|  3.21k|         m_sequence_numbers = std::make_unique<Stream_Sequence_Numbers>();
  260|  3.21k|      }
  261|  3.83k|   }
  262|       |
  263|       |   // Read epochs at or below this one belong to the association already in place,
  264|       |   // so application data under them stays deliverable while this handshake runs.
  265|       |   // Anything above it is this handshake's own, unauthenticated until its
  266|       |   // Finished. See the application-data gate in from_peer.
  267|  3.83k|   m_epochs_before_latest_renegotiation = Epochs_Before_Latest_Renegotiation{sequence_numbers().current_read_epoch(),
  268|  3.83k|                                                                             sequence_numbers().current_write_epoch()};
  269|       |
  270|       |   // Floor for the pending handshake's reassembly: a delayed record from the
  271|       |   // handshake arrives under a lower epoch and must be rejected. It would
  272|       |   // otherwise take the sequence slot the real message needs.
  273|       |   //
  274|       |   // Zero on an epoch-zero restart, because there the peer legitimately
  275|       |   // begins again at epoch zero and the floor would reject it. This is keyed
  276|       |   // on the restart actually occurring, not on the policy allowing it: an
  277|       |   // ordinary renegotiation needs the floor either way.
  278|  3.83k|   const uint16_t initial_epoch = epoch0_restart ? 0 : m_epochs_before_latest_renegotiation->read_epoch;
  ------------------
  |  Branch (278:35): [True: 0, False: 3.83k]
  ------------------
  279|       |
  280|  3.83k|   using namespace std::placeholders;
  281|       |
  282|  3.83k|   std::unique_ptr<Handshake_IO> io;
  283|  3.83k|   if(version.is_datagram_protocol()) {
  ------------------
  |  Branch (283:7): [True: 619, False: 3.21k]
  ------------------
  284|    619|      const uint16_t mtu = static_cast<uint16_t>(policy().dtls_default_mtu());
  285|    619|      const size_t initial_timeout_ms = policy().dtls_initial_timeout();
  286|    619|      const size_t max_timeout_ms = policy().dtls_maximum_timeout();
  287|    619|      const std::optional<size_t> max_retransmissions = policy().dtls_maximum_retransmissions();
  288|       |
  289|    619|      auto send_record_f = [this](uint16_t epoch, Record_Type record_type, const std::vector<uint8_t>& record) {
  290|    619|         send_record_under_epoch(epoch, record_type, record);
  291|    619|      };
  292|    619|      auto clock_f = [this]() { return callbacks().tls_current_monotonic_clock_ms(); };
  293|    619|      io = std::make_unique<Datagram_Handshake_IO>(send_record_f,
  294|    619|                                                   clock_f,
  295|    619|                                                   sequence_numbers(),
  296|    619|                                                   mtu,
  297|    619|                                                   initial_timeout_ms,
  298|    619|                                                   max_timeout_ms,
  299|    619|                                                   max_retransmissions,
  300|    619|                                                   policy().maximum_handshake_message_size(),
  301|    619|                                                   initial_epoch);
  302|  3.21k|   } else {
  303|  3.21k|      auto send_record_f = [this](Record_Type rec_type, const std::vector<uint8_t>& record) {
  304|  3.21k|         send_record(rec_type, record);
  305|  3.21k|      };
  306|  3.21k|      io = std::make_unique<Stream_Handshake_IO>(send_record_f);
  307|  3.21k|   }
  308|       |
  309|  3.83k|   m_pending_state = new_handshake_state(std::move(io));
  310|       |
  311|  3.83k|   if(m_active_state.has_value()) {
  ------------------
  |  Branch (311:7): [True: 0, False: 3.83k]
  ------------------
  312|      0|      m_pending_state->set_version(m_active_state->version());
  313|      0|   }
  314|       |
  315|  3.83k|   return *m_pending_state;
  316|  3.83k|}
_ZN5Botan3TLS15Channel_Impl_1229clear_pending_handshake_stateEv:
  331|     79|void Channel_Impl_12::clear_pending_handshake_state() {
  332|     79|   m_pending_state.reset();
  333|     79|   m_epochs_before_latest_renegotiation.reset();
  334|     79|}
_ZN5Botan3TLS15Channel_Impl_1225change_cipher_spec_readerENS0_15Connection_SideE:
  401|    377|void Channel_Impl_12::change_cipher_spec_reader(Connection_Side side) {
  402|    377|   const auto* pending = pending_state();
  403|       |
  404|    377|   BOTAN_ASSERT(pending && pending->server_hello(), "Have received server hello");
  ------------------
  |  |   71|    377|   do {                                                                                 \
  |  |   72|    377|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|    754|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:12): [True: 377, False: 0]
  |  |  |  Branch (73:12): [True: 377, False: 0]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|    377|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 377]
  |  |  ------------------
  ------------------
  405|       |
  406|    377|   if(pending->server_hello()->compression_method() != 0) {
  ------------------
  |  Branch (406:7): [True: 0, False: 377]
  ------------------
  407|      0|      throw Internal_Error("Negotiated unknown compression algorithm");
  408|      0|   }
  409|       |
  410|    377|   sequence_numbers().new_read_cipher_state();
  411|       |
  412|    377|   const uint16_t epoch = sequence_numbers().current_read_epoch();
  413|       |
  414|    377|   BOTAN_ASSERT(!m_read_cipher_states.contains(epoch), "No read cipher state currently set for next epoch");
  ------------------
  |  |   71|    377|   do {                                                                                 \
  |  |   72|    377|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|    377|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 377]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|    377|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 377]
  |  |  ------------------
  ------------------
  415|       |
  416|       |   // flip side as we are reading
  417|    377|   auto read_state = std::make_shared<Connection_Cipher_State>(
  418|    377|      pending->version(),
  419|    377|      (side == Connection_Side::Client) ? Connection_Side::Server : Connection_Side::Client,
  ------------------
  |  Branch (419:7): [True: 0, False: 377]
  ------------------
  420|    377|      false,
  421|    377|      pending->ciphersuite(),
  422|    377|      pending->session_keys(),
  423|    377|      pending->server_hello()->supports_encrypt_then_mac());
  424|       |
  425|       |   // The epoch we just left is retained only to absorb reordering, so start its
  426|       |   // clock now (see read_cipher_state_epoch). Epoch 0 is the plaintext
  427|       |   // placeholder and holds no keys, so the window does not apply to it.
  428|    377|   if(m_is_datagram && epoch > 1) {
  ------------------
  |  Branch (428:7): [True: 0, False: 377]
  |  Branch (428:24): [True: 0, False: 0]
  ------------------
  429|      0|      if(auto prev = m_read_cipher_states.find(static_cast<uint16_t>(epoch - 1)); prev != m_read_cipher_states.end()) {
  ------------------
  |  Branch (429:83): [True: 0, False: 0]
  ------------------
  430|      0|         prev->second.retired_at = callbacks().tls_current_monotonic_clock_ms();
  431|      0|      }
  432|      0|   }
  433|       |
  434|    377|   m_read_cipher_states[epoch] = Retained_Read_Cipher_State{.state = read_state, .retired_at = std::nullopt};
  435|    377|   prune_old_cipher_states(m_read_cipher_states);
  436|    377|}
_ZN5Botan3TLS15Channel_Impl_1225change_cipher_spec_writerENS0_15Connection_SideE:
  438|     79|void Channel_Impl_12::change_cipher_spec_writer(Connection_Side side) {
  439|     79|   const auto* pending = pending_state();
  440|       |
  441|     79|   BOTAN_ASSERT(pending && pending->server_hello(), "Have received server hello");
  ------------------
  |  |   71|     79|   do {                                                                                 \
  |  |   72|     79|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|    158|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:12): [True: 79, False: 0]
  |  |  |  Branch (73:12): [True: 79, False: 0]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|     79|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 79]
  |  |  ------------------
  ------------------
  442|       |
  443|     79|   if(pending->server_hello()->compression_method() != 0) {
  ------------------
  |  Branch (443:7): [True: 0, False: 79]
  ------------------
  444|      0|      throw Internal_Error("Negotiated unknown compression algorithm");
  445|      0|   }
  446|       |
  447|     79|   sequence_numbers().new_write_cipher_state();
  448|       |
  449|     79|   const uint16_t epoch = sequence_numbers().current_write_epoch();
  450|       |
  451|     79|   BOTAN_ASSERT(!m_write_cipher_states.contains(epoch), "No write cipher state currently set for next epoch");
  ------------------
  |  |   71|     79|   do {                                                                                 \
  |  |   72|     79|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|     79|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 79]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|     79|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 79]
  |  |  ------------------
  ------------------
  452|       |
  453|     79|   auto write_state = std::make_shared<Connection_Cipher_State>(pending->version(),
  454|     79|                                                                side,
  455|     79|                                                                true,
  456|     79|                                                                pending->ciphersuite(),
  457|     79|                                                                pending->session_keys(),
  458|     79|                                                                pending->server_hello()->supports_encrypt_then_mac());
  459|       |
  460|     79|   m_write_cipher_states[epoch] = write_state;
  461|     79|   prune_old_cipher_states(m_write_cipher_states);
  462|     79|}
_ZNK5Botan3TLS15Channel_Impl_129is_closedEv:
  480|  2.23k|bool Channel_Impl_12::is_closed() const {
  481|  2.23k|   return m_has_been_closed;
  482|  2.23k|}
_ZN5Botan3TLS15Channel_Impl_1216activate_sessionEv:
  484|     79|void Channel_Impl_12::activate_session() {
  485|     79|   BOTAN_ASSERT_NONNULL(m_pending_state);
  ------------------
  |  |  123|     79|   do {                                                                                   \
  |  |  124|     79|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 79]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|     79|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 79]
  |  |  ------------------
  ------------------
  486|       |
  487|     79|   const auto& state = *m_pending_state;
  488|       |
  489|     79|   if(!state.version().is_datagram_protocol()) {
  ------------------
  |  Branch (489:7): [True: 79, False: 0]
  ------------------
  490|       |      // TLS is easy just remove all but the current state
  491|     79|      const uint16_t current_epoch = sequence_numbers().current_write_epoch();
  492|       |
  493|     79|      const auto not_current_epoch = [current_epoch](uint16_t epoch) { return (epoch != current_epoch); };
  494|       |
  495|     79|      map_remove_if(not_current_epoch, m_write_cipher_states);
  496|     79|      map_remove_if(not_current_epoch, m_read_cipher_states);
  497|     79|   }
  498|       |
  499|       |   // RFC 6347 4.2.4: "the node that transmits the last flight (the server in an
  500|       |   // ordinary handshake or the client in a resumed handshake) MUST respond to a
  501|       |   // retransmit of the peer's last flight with a retransmit of the last
  502|       |   // flight." Both endpoints retain handshake sequence state, but only that
  503|       |   // node replays its outgoing flight.
  504|     79|   const bool sent_terminal_dtls_flight = m_is_datagram && (m_is_server == (state.server_hello_done() != nullptr));
  ------------------
  |  Branch (504:43): [True: 0, False: 79]
  |  Branch (504:60): [True: 0, False: 0]
  ------------------
  505|       |
  506|     79|   if(m_is_datagram) {
  ------------------
  |  Branch (506:7): [True: 0, False: 79]
  ------------------
  507|      0|      m_active_state = Active_Connection_State_12(state, application_protocol(), m_pending_state->take_handshake_io());
  508|      0|      if(auto* dtls_io = m_active_state->dtls_handshake_io()) {
  ------------------
  |  Branch (508:16): [True: 0, False: 0]
  ------------------
  509|       |         // Retain receive sequence state on both endpoints to distinguish a
  510|       |         // retransmission from an unexpected new handshake message. Only the
  511|       |         // terminal-flight sender responds by replaying its final flight.
  512|      0|         dtls_io->finalize_handshake(sent_terminal_dtls_flight);
  513|      0|      }
  514|     79|   } else {
  515|     79|      m_active_state = Active_Connection_State_12(state, application_protocol());
  516|     79|   }
  517|       |
  518|     79|   clear_pending_handshake_state();
  519|       |
  520|     79|   callbacks().tls_session_activated();
  521|     79|}
_ZN5Botan3TLS15Channel_Impl_129from_peerENSt3__14spanIKhLm18446744073709551615EEE:
  523|  3.98k|size_t Channel_Impl_12::from_peer(std::span<const uint8_t> data) {
  524|  3.98k|   const bool allow_epoch0_restart = m_is_datagram && m_is_server && policy().allow_dtls_epoch0_restart();
  ------------------
  |  Branch (524:38): [True: 767, False: 3.21k]
  |  Branch (524:55): [True: 767, False: 0]
  |  Branch (524:70): [True: 0, False: 767]
  ------------------
  525|       |
  526|  3.98k|   const auto* input = data.data();
  527|  3.98k|   auto input_size = data.size();
  528|       |
  529|  3.98k|   try {
  530|  14.3k|      while(input_size > 0) {
  ------------------
  |  Branch (530:13): [True: 11.1k, False: 3.25k]
  ------------------
  531|       |         // A fatal alert destroys the cipher states, so nothing further can even
  532|       |         // be decrypted. Closure by close_notify is different: the responding
  533|       |         // close_notify still has to be read, so those records keep flowing
  534|       |         // through the loop and are filtered per record type below.
  535|  11.1k|         if(m_had_fatal_alert) {
  ------------------
  |  Branch (535:13): [True: 2, False: 11.1k]
  ------------------
  536|      2|            return 0;
  537|      2|         }
  538|       |
  539|  11.1k|         size_t consumed = 0;
  540|       |
  541|  11.1k|         auto get_epoch = [this](uint16_t epoch) { return read_cipher_state_epoch(epoch); };
  542|       |
  543|  11.1k|         const Record_Header record = read_record(m_is_datagram,
  544|  11.1k|                                                  m_readbuf,
  545|  11.1k|                                                  input,
  546|  11.1k|                                                  input_size,
  547|  11.1k|                                                  consumed,
  548|  11.1k|                                                  m_record_buf,
  549|  11.1k|                                                  m_sequence_numbers.get(),
  550|  11.1k|                                                  get_epoch,
  551|  11.1k|                                                  allow_epoch0_restart);
  552|       |
  553|  11.1k|         const size_t needed = record.needed();
  554|       |
  555|  11.1k|         BOTAN_ASSERT(consumed > 0, "Got to eat something");
  ------------------
  |  |   71|  11.1k|   do {                                                                                 \
  |  |   72|  11.1k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|  11.1k|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 11.1k]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|  11.1k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
  556|       |
  557|  11.1k|         BOTAN_ASSERT(consumed <= input_size, "Record reader consumed sane amount");
  ------------------
  |  |   71|  11.1k|   do {                                                                                 \
  |  |   72|  11.1k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|  11.1k|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 11.1k]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|  11.1k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
  558|       |
  559|  11.1k|         input += consumed;
  560|  11.1k|         input_size -= consumed;
  561|       |
  562|  11.1k|         BOTAN_ASSERT(input_size == 0 || needed == 0, "Got a full record or consumed all input");
  ------------------
  |  |   71|  11.1k|   do {                                                                                 \
  |  |   72|  11.1k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|  18.6k|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:12): [True: 3.59k, False: 7.54k]
  |  |  |  Branch (73:12): [True: 7.54k, False: 0]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|  11.1k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
  563|       |
  564|  11.1k|         if(input_size == 0 && needed != 0) {
  ------------------
  |  Branch (564:13): [True: 3.28k, False: 7.85k]
  |  Branch (564:32): [True: 424, False: 2.85k]
  ------------------
  565|    424|            return needed;  // need more data to complete record
  566|    424|         }
  567|       |
  568|       |         // Ignore invalid records in DTLS
  569|  10.7k|         if(m_is_datagram && record.type() == Record_Type::Invalid) {
  ------------------
  |  Branch (569:13): [True: 3.91k, False: 6.79k]
  |  Branch (569:30): [True: 177, False: 3.74k]
  ------------------
  570|    177|            return 0;
  571|    177|         }
  572|       |
  573|  10.5k|         const bool old_unprotected_record = m_is_datagram && record.epoch() == 0 && m_active_state.has_value() &&
  ------------------
  |  Branch (573:46): [True: 3.74k, False: 6.79k]
  |  Branch (573:63): [True: 3.74k, False: 0]
  |  Branch (573:86): [True: 0, False: 3.74k]
  ------------------
  574|      0|                                             sequence_numbers().current_read_epoch() > 0;
  ------------------
  |  Branch (574:46): [True: 0, False: 0]
  ------------------
  575|       |
  576|       |         // Once encrypted traffic is expected, epoch-zero records are
  577|       |         // unauthenticated. Only handshake records can be useful as part of a
  578|       |         // retransmitted flight or an explicitly allowed association restart.
  579|  10.5k|         if(old_unprotected_record && record.type() != Record_Type::Handshake &&
  ------------------
  |  Branch (579:13): [True: 0, False: 10.5k]
  |  Branch (579:39): [True: 0, False: 0]
  ------------------
  580|      0|            record.type() != Record_Type::ChangeCipherSpec) {
  ------------------
  |  Branch (580:13): [True: 0, False: 0]
  ------------------
  581|      0|            continue;
  582|      0|         }
  583|       |
  584|  10.5k|         if(m_record_buf.size() > MAX_PLAINTEXT_SIZE) {
  ------------------
  |  Branch (584:13): [True: 0, False: 10.5k]
  ------------------
  585|      0|            if(old_unprotected_record) {
  ------------------
  |  Branch (585:16): [True: 0, False: 0]
  ------------------
  586|      0|               continue;
  587|      0|            }
  588|       |
  589|      0|            throw TLS_Exception(Alert::RecordOverflow, "TLS plaintext record is larger than allowed maximum");
  590|      0|         }
  591|       |
  592|  10.5k|         const bool epoch0_restart = allow_epoch0_restart && record.epoch() == 0 && m_active_state.has_value();
  ------------------
  |  Branch (592:38): [True: 0, False: 10.5k]
  |  Branch (592:62): [True: 0, False: 0]
  |  Branch (592:85): [True: 0, False: 0]
  ------------------
  593|  10.5k|         BOTAN_ASSERT_IMPLICATION(epoch0_restart, allow_epoch0_restart, "Allowed state");
  ------------------
  |  |  110|  10.5k|   do {                                                                                          \
  |  |  111|  10.5k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                              \
  |  |  112|  10.5k|      if((expr1) && !(expr2)) {                                                                  \
  |  |  ------------------
  |  |  |  Branch (112:10): [True: 0, False: 10.5k]
  |  |  |  Branch (112:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  113|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                     \
  |  |  114|      0|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |  115|      0|      }                                                                                          \
  |  |  116|  10.5k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (116:12): [Folded, False: 10.5k]
  |  |  ------------------
  ------------------
  594|       |
  595|  10.5k|         const bool initial_record = epoch0_restart || (pending_state() == nullptr && !m_active_state.has_value());
  ------------------
  |  Branch (595:38): [True: 314, False: 10.2k]
  |  Branch (595:57): [True: 4.57k, False: 5.64k]
  |  Branch (595:87): [True: 4.57k, False: 0]
  ------------------
  596|  10.5k|         bool initial_handshake_message = false;
  597|  10.5k|         if(record.type() == Record_Type::Handshake && !m_record_buf.empty()) {
  ------------------
  |  Branch (597:13): [True: 8.89k, False: 1.64k]
  |  Branch (597:56): [True: 8.23k, False: 658]
  ------------------
  598|  8.23k|            const Handshake_Type type = static_cast<Handshake_Type>(m_record_buf[0]);
  599|  8.23k|            initial_handshake_message = (type == Handshake_Type::ClientHello);
  600|  8.23k|         }
  601|       |
  602|  10.5k|         if(record.type() != Record_Type::Alert && !old_unprotected_record) {
  ------------------
  |  Branch (602:13): [True: 9.57k, False: 966]
  |  Branch (602:52): [True: 9.57k, False: 0]
  ------------------
  603|  9.57k|            if(initial_record) {
  ------------------
  |  Branch (603:16): [True: 3.93k, False: 5.63k]
  ------------------
  604|       |               // For initial records just check for basic sanity
  605|  3.93k|               if(record.version().major_version() != 3 && record.version().major_version() != 0xFE) {
  ------------------
  |  Branch (605:19): [True: 721, False: 3.21k]
  |  Branch (605:19): [True: 7, False: 3.92k]
  |  Branch (605:60): [True: 7, False: 714]
  ------------------
  606|      7|                  throw TLS_Exception(Alert::ProtocolVersion, "Received unexpected record version in initial record");
  607|      7|               }
  608|  5.63k|            } else if(const auto* pending = pending_state()) {
  ------------------
  |  Branch (608:35): [True: 5.63k, False: 0]
  ------------------
  609|  5.63k|               if(pending->server_hello() != nullptr && !initial_handshake_message &&
  ------------------
  |  Branch (609:19): [True: 2.91k, False: 2.72k]
  |  Branch (609:19): [True: 9, False: 5.62k]
  |  Branch (609:57): [True: 2.79k, False: 117]
  ------------------
  610|  2.79k|                  record.version() != pending->version()) {
  ------------------
  |  Branch (610:19): [True: 9, False: 2.78k]
  ------------------
  611|      9|                  throw TLS_Exception(Alert::ProtocolVersion, "Received unexpected record version");
  612|      9|               }
  613|  5.63k|            } else if(m_active_state.has_value()) {
  ------------------
  |  Branch (613:23): [True: 0, False: 0]
  ------------------
  614|      0|               if(record.version() != m_active_state->version() && !initial_handshake_message) {
  ------------------
  |  Branch (614:19): [True: 0, False: 0]
  |  Branch (614:19): [True: 0, False: 0]
  |  Branch (614:68): [True: 0, False: 0]
  ------------------
  615|      0|                  throw TLS_Exception(Alert::ProtocolVersion, "Received unexpected record version");
  616|      0|               }
  617|      0|            }
  618|  9.57k|         }
  619|       |
  620|       |         // RFC 5246 7.2.1: "Any data received after a closure alert is ignored."
  621|       |         // This is about a closure alert the peer sent us. A peer that keeps
  622|       |         // talking after *our* close_notify is a different case, kept as an
  623|       |         // error below; BoGo's Shutdown-Shim-ApplicationData requires it.
  624|  10.5k|         if(m_peer_closed_connection && record.type() != Record_Type::Alert) {
  ------------------
  |  Branch (624:13): [True: 306, False: 10.2k]
  |  Branch (624:41): [True: 83, False: 223]
  ------------------
  625|     83|            continue;
  626|     83|         }
  627|       |
  628|  10.4k|         if(record.type() == Record_Type::Handshake || record.type() == Record_Type::ChangeCipherSpec) {
  ------------------
  |  Branch (628:13): [True: 9.19k, False: 1.23k]
  |  Branch (628:56): [True: 479, False: 760]
  ------------------
  629|  9.36k|            if(m_has_been_closed) {
  ------------------
  |  Branch (629:16): [True: 0, False: 9.36k]
  ------------------
  630|      0|               throw TLS_Exception(Alert::UnexpectedMessage, "Received handshake data after connection closure");
  631|      0|            }
  632|  9.36k|            process_handshake_ccs(m_record_buf, record.sequence(), record.type(), record.version(), epoch0_restart);
  633|  9.36k|         } else if(record.type() == Record_Type::ApplicationData) {
  ------------------
  |  Branch (633:20): [True: 80, False: 994]
  ------------------
  634|     80|            if(m_has_been_closed) {
  ------------------
  |  Branch (634:16): [True: 0, False: 80]
  ------------------
  635|      0|               throw TLS_Exception(Alert::UnexpectedMessage, "Received application data after connection closure");
  636|      0|            }
  637|     80|            if(pending_state() != nullptr) {
  ------------------
  |  Branch (637:16): [True: 79, False: 1]
  ------------------
  638|       |               /*
  639|       |               What matters is which epoch the record belongs to, not which role we
  640|       |               are playing.
  641|       |
  642|       |               RFC 6347 4.2.4: "Implementations MUST either discard or buffer all
  643|       |               application data packets for the new epoch until they have received
  644|       |               the Finished message for that epoch." Data under the epoch this
  645|       |               handshake installed is not authenticated until its Finished, so it
  646|       |               must not reach the application; equally it is not an error, because
  647|       |               ordinary reordering produces it whenever a peer writes immediately
  648|       |               after activating.
  649|       |
  650|       |               Data under an epoch the established association owns stays valid
  651|       |               while a renegotiation is in flight, per 4.1.
  652|       |
  653|       |               Epoch zero is neither: application data there is plaintext, so it is
  654|       |               never legitimate and no association is at stake.
  655|       |               */
  656|     79|               if(m_is_datagram && record.epoch() > 0) {
  ------------------
  |  Branch (656:19): [True: 78, False: 1]
  |  Branch (656:36): [True: 0, False: 78]
  ------------------
  657|      0|                  const uint16_t active_epoch =
  658|      0|                     m_epochs_before_latest_renegotiation ? m_epochs_before_latest_renegotiation->read_epoch : 0;
  ------------------
  |  Branch (658:22): [True: 0, False: 0]
  ------------------
  659|       |
  660|      0|                  if(!m_active_state.has_value() || record.epoch() > active_epoch) {
  ------------------
  |  Branch (660:22): [True: 0, False: 0]
  |  Branch (660:53): [True: 0, False: 0]
  ------------------
  661|      0|                     continue;  // this handshake's epoch, still unauthenticated
  662|      0|                  }
  663|     79|               } else {
  664|     79|                  throw TLS_Exception(Alert::UnexpectedMessage, "Can't interleave application and handshake data");
  665|     79|               }
  666|     79|            }
  667|      1|            process_application_data(record.sequence(), m_record_buf);
  668|    994|         } else if(record.type() == Record_Type::Alert) {
  ------------------
  |  Branch (668:20): [True: 652, False: 342]
  ------------------
  669|    652|            process_alert(m_record_buf);
  670|    652|         } else if(record.type() != Record_Type::Invalid) {
  ------------------
  |  Branch (670:20): [True: 28, False: 314]
  ------------------
  671|     28|            throw Unexpected_Message("Unexpected record type " + std::to_string(static_cast<size_t>(record.type())) +
  672|     28|                                     " from counterparty");
  673|     28|         }
  674|  10.4k|      }
  675|       |
  676|  3.25k|      return 0;  // on a record boundary
  677|  3.98k|   } catch(TLS_Exception& e) {
  678|  1.36k|      send_fatal_alert(e.type());
  679|  1.36k|      throw;
  680|  1.36k|   } catch(Invalid_Authentication_Tag&) {
  681|    176|      send_fatal_alert(Alert::BadRecordMac);
  682|    176|      throw;
  683|    431|   } catch(Decoding_Error&) {
  684|    431|      send_fatal_alert(Alert::DecodeError);
  685|    431|      throw;
  686|    431|   } catch(...) {
  687|     26|      send_fatal_alert(Alert::InternalError);
  688|     26|      throw;
  689|     26|   }
  690|  3.98k|}
_ZN5Botan3TLS15Channel_Impl_1221process_handshake_ccsERKNSt3__16vectorIhNS_16secure_allocatorIhEEEEmNS0_11Record_TypeENS0_16Protocol_VersionEb:
  696|  9.36k|                                            bool epoch0_restart) {
  697|  9.36k|   const auto process_retransmitted_record = [&] {
  698|  9.36k|      BOTAN_ASSERT(m_active_state.has_value(), "Have active DTLS association for retransmission");
  699|  9.36k|      BOTAN_ASSERT_NONNULL(m_active_state->dtls_handshake_io());
  700|       |      // Epoch-zero records are unauthenticated and may be spoofed, so a
  701|       |      // malformed one must not tear down an established association.
  702|  9.36k|      const bool unauthenticated = (record_sequence >> 48) == 0;
  703|       |
  704|  9.36k|      absorb_malformed_input_errors(unauthenticated, [&] {
  705|  9.36k|         m_active_state->dtls_handshake_io()->add_retransmitted_record(
  706|  9.36k|            record.data(), record.size(), record_type, record_sequence);
  707|  9.36k|      });
  708|  9.36k|   };
  709|       |
  710|  9.36k|   if(!m_pending_state) {
  ------------------
  |  Branch (710:7): [True: 3.83k, False: 5.53k]
  ------------------
  711|       |      // With no pending handshake this is either a new handshake attempt or a
  712|       |      // DTLS retransmission from the previous handshake. The latter must not
  713|       |      // create fresh pending state; it only asks us to replay our last flight.
  714|  3.83k|      if(epoch0_restart && m_sequence_numbers && m_active_state.has_value()) {
  ------------------
  |  Branch (714:10): [True: 0, False: 3.83k]
  |  Branch (714:28): [True: 0, False: 0]
  |  Branch (714:50): [True: 0, False: 0]
  ------------------
  715|      0|         const bool starts_new_handshake = is_new_dtls_association_client_hello(record, record_type);
  716|       |
  717|      0|         if(!starts_new_handshake) {
  ------------------
  |  Branch (717:13): [True: 0, False: 0]
  ------------------
  718|      0|            process_retransmitted_record();
  719|      0|            return;
  720|      0|         }
  721|      0|      }
  722|       |
  723|  3.83k|      if(m_is_datagram && !epoch0_restart) {
  ------------------
  |  Branch (723:10): [True: 619, False: 3.21k]
  |  Branch (723:27): [True: 619, False: 0]
  ------------------
  724|    619|         if(m_sequence_numbers) {
  ------------------
  |  Branch (724:13): [True: 0, False: 619]
  ------------------
  725|      0|            const uint16_t epoch = record_sequence >> 48;
  726|      0|            const uint16_t current_epoch = sequence_numbers().current_read_epoch();
  727|      0|            if(epoch == current_epoch) {
  ------------------
  |  Branch (727:16): [True: 0, False: 0]
  ------------------
  728|       |               // Either endpoint can initiate renegotiation from FINISHED:
  729|       |               // clients send ClientHello, servers send HelloRequest.
  730|      0|               const bool starts_new_handshake =
  731|      0|                  (record_type == Record_Type::Handshake && !record.empty() &&
  ------------------
  |  Branch (731:20): [True: 0, False: 0]
  |  Branch (731:61): [True: 0, False: 0]
  ------------------
  732|      0|                   (static_cast<Handshake_Type>(record[0]) == Handshake_Type::ClientHello ||
  ------------------
  |  Branch (732:21): [True: 0, False: 0]
  ------------------
  733|      0|                    static_cast<Handshake_Type>(record[0]) == Handshake_Type::HelloRequest));
  ------------------
  |  Branch (733:21): [True: 0, False: 0]
  ------------------
  734|       |
  735|      0|               if(m_active_state.has_value() && !starts_new_handshake) {
  ------------------
  |  Branch (735:19): [True: 0, False: 0]
  |  Branch (735:49): [True: 0, False: 0]
  ------------------
  736|      0|                  process_retransmitted_record();
  737|      0|               } else {
  738|      0|                  create_handshake_state(record_version, epoch0_restart);
  739|      0|               }
  740|      0|            } else if(current_epoch > 0 && epoch == current_epoch - 1) {
  ------------------
  |  Branch (740:23): [True: 0, False: 0]
  |  Branch (740:44): [True: 0, False: 0]
  ------------------
  741|      0|               process_retransmitted_record();
  742|      0|            }
  743|    619|         } else {
  744|    619|            create_handshake_state(record_version, epoch0_restart);
  745|    619|         }
  746|  3.21k|      } else {
  747|  3.21k|         create_handshake_state(record_version, epoch0_restart);
  748|  3.21k|      }
  749|  3.83k|   }
  750|       |
  751|       |   // May have been created in above conditional
  752|  9.36k|   if(m_pending_state) {
  ------------------
  |  Branch (752:7): [True: 9.36k, False: 0]
  ------------------
  753|       |      // An epoch-zero record is unauthenticated. Once an association is
  754|       |      // established, one arriving during a pending renegotiation must not be
  755|       |      // able to destroy it, exactly as for the no-pending-handshake path above.
  756|       |      // Without this a single forged CCS or handshake fragment tore down the
  757|       |      // active association and the renegotiation along with it.
  758|       |      //
  759|       |      // Delivery is inside the guard as well as reassembly. A bare 12-byte
  760|       |      // header declaring a zero-length message reassembles cleanly and only
  761|       |      // fails when the message itself is parsed or dispatched, which reaches
  762|       |      // the same teardown by a later route.
  763|  9.36k|      const bool unauthenticated_against_active_association =
  764|  9.36k|         m_is_datagram && (record_sequence >> 48) == 0 && m_active_state.has_value();
  ------------------
  |  Branch (764:10): [True: 3.24k, False: 6.11k]
  |  Branch (764:27): [True: 3.24k, False: 0]
  |  Branch (764:59): [True: 0, False: 3.24k]
  ------------------
  765|       |
  766|  9.36k|      absorb_malformed_input_errors(unauthenticated_against_active_association, [&] {
  767|  9.36k|         m_pending_state->handshake_io().add_record(record.data(), record.size(), record_type, record_sequence);
  768|       |
  769|  9.36k|         while(auto* pending = m_pending_state.get()) {
  770|  9.36k|            auto msg = pending->get_next_handshake_msg(policy().maximum_handshake_message_size());
  771|       |
  772|  9.36k|            if(msg.first == Handshake_Type::None) {  // no full handshake yet
  773|  9.36k|               break;
  774|  9.36k|            }
  775|       |
  776|  9.36k|            process_handshake_msg(*pending, msg.first, msg.second, epoch0_restart);
  777|       |
  778|  9.36k|            if(!m_pending_state) {
  779|  9.36k|               break;
  780|  9.36k|            }
  781|  9.36k|         }
  782|  9.36k|      });
  783|  9.36k|   }
  784|  9.36k|}
_ZN5Botan3TLS15Channel_Impl_1224process_application_dataEmRKNSt3__16vectorIhNS_16secure_allocatorIhEEEE:
  786|      1|void Channel_Impl_12::process_application_data(uint64_t seq_no, const secure_vector<uint8_t>& record) {
  787|      1|   if(!m_active_state.has_value()) {
  ------------------
  |  Branch (787:7): [True: 1, False: 0]
  ------------------
  788|      1|      throw Unexpected_Message("Application data before handshake done");
  789|      1|   }
  790|       |
  791|       |   // ApplicationData must arrive under a non-zero read epoch
  792|      0|   const uint16_t read_epoch =
  793|      0|      m_is_datagram ? static_cast<uint16_t>(seq_no >> 48) : sequence_numbers().current_read_epoch();
  ------------------
  |  Branch (793:7): [True: 0, False: 0]
  ------------------
  794|      0|   if(read_epoch == 0) {
  ------------------
  |  Branch (794:7): [True: 0, False: 0]
  ------------------
  795|      0|      throw Unexpected_Message("Application data received in unexpected read epoch");
  796|      0|   }
  797|       |
  798|      0|   callbacks().tls_record_received(seq_no, record);
  799|      0|}
_ZN5Botan3TLS15Channel_Impl_1213process_alertERKNSt3__16vectorIhNS_16secure_allocatorIhEEEE:
  801|    652|void Channel_Impl_12::process_alert(const secure_vector<uint8_t>& record) {
  802|    652|   const Alert alert_msg(record);
  803|       |
  804|       |   // RFC 5246 7.2.2:
  805|       |   //    no_renegotiation
  806|       |   //       Sent by the client in response to a hello request or by the
  807|       |   //       server in response to a client hello after initial handshaking.
  808|       |   //
  809|       |   // Both of those precede any ChangeCipherSpec from the refusing side, so a
  810|       |   // refusal arriving after one means the peer both refused the handshake and
  811|       |   // proceeded with it. Discarding the pending state is what implements the
  812|       |   // refusal, but past a CCS that state is the only thing keeping application
  813|       |   // data under the new, un-Finished keys from being delivered, and there is no
  814|       |   // rollback that would leave keys, identity and exporter describing the same
  815|       |   // handshake. End the association rather than open that gate.
  816|    652|   if(alert_msg.type() == Alert::NoRenegotiation && m_active_state.has_value()) {
  ------------------
  |  Branch (816:7): [True: 34, False: 618]
  |  Branch (816:53): [True: 0, False: 34]
  ------------------
  817|      0|      if(!pending_handshake_epochs_unmoved()) {
  ------------------
  |  Branch (817:10): [True: 0, False: 0]
  ------------------
  818|      0|         throw TLS_Exception(Alert::UnexpectedMessage, "Received no_renegotiation after ChangeCipherSpec");
  819|      0|      }
  820|       |
  821|      0|      clear_pending_handshake_state();
  822|      0|   }
  823|       |
  824|    652|   if(alert_msg.is_fatal()) {
  ------------------
  |  Branch (824:7): [True: 6, False: 646]
  ------------------
  825|       |      // RFC 5246 7.2.2: "Upon transmission or receipt of a fatal alert message,
  826|       |      // both parties immediately close the connection."
  827|       |      //
  828|       |      // The teardown completes before the application hears about the alert, so
  829|       |      // the callback cannot reach the connection or its secrets. Same order as
  830|       |      // the TLS 1.3 channel.
  831|      6|      m_has_been_closed = true;
  832|      6|      m_had_fatal_alert = true;
  833|      6|      const auto invalidated = take_sessions_to_invalidate();
  834|      6|      reset_state();
  835|      6|      invalidate_sessions(invalidated);
  836|      6|   }
  837|       |
  838|    652|   callbacks().tls_alert(alert_msg);
  839|       |
  840|    652|   if(alert_msg.type() == Alert::CloseNotify) {
  ------------------
  |  Branch (840:7): [True: 231, False: 421]
  ------------------
  841|    231|      m_peer_closed_connection = true;
  842|       |
  843|       |      // TLS 1.2 requires us to immediately react with our "close_notify",
  844|       |      // the return value of the application's callback has no effect on that.
  845|    231|      callbacks().tls_peer_closed_connection();
  846|    231|      send_warning_alert(Alert::CloseNotify);  // reply in kind
  847|    231|   }
  848|       |
  849|    652|   if(alert_msg.type() == Alert::CloseNotify || alert_msg.is_fatal()) {
  ------------------
  |  Branch (849:7): [True: 245, False: 407]
  |  Branch (849:49): [True: 5, False: 402]
  ------------------
  850|    236|      m_has_been_closed = true;
  851|    236|   }
  852|    652|}
_ZN5Botan3TLS15Channel_Impl_1212write_recordEPNS0_23Connection_Cipher_StateEtNS0_11Record_TypeEPKhm:
  858|  10.5k|                                   size_t length) {
  859|  10.5k|   BOTAN_ASSERT(m_pending_state || m_active_state.has_value(), "Some connection state exists");
  ------------------
  |  |   71|  10.5k|   do {                                                                                 \
  |  |   72|  10.5k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|  10.6k|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:12): [True: 10.5k, False: 56]
  |  |  |  Branch (73:12): [True: 56, False: 0]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|  10.5k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 10.5k]
  |  |  ------------------
  ------------------
  860|       |
  861|  10.5k|   const Protocol_Version record_version = (m_pending_state) ? (m_pending_state->version()) : m_active_state->version();
  ------------------
  |  Branch (861:44): [True: 10.5k, False: 56]
  ------------------
  862|       |
  863|  10.5k|   const uint64_t next_seq = sequence_numbers().next_write_sequence(epoch);
  864|       |
  865|  10.5k|   if(cipher_state == nullptr) {
  ------------------
  |  Branch (865:7): [True: 10.4k, False: 135]
  ------------------
  866|  10.4k|      TLS::write_unencrypted_record(m_writebuf, record_type, record_version, next_seq, input, length);
  867|  10.4k|   } else {
  868|    135|      TLS::write_record(m_writebuf, record_type, record_version, next_seq, input, length, *cipher_state, rng());
  869|    135|   }
  870|       |
  871|  10.5k|   callbacks().tls_emit_data(m_writebuf);
  872|  10.5k|}
_ZN5Botan3TLS15Channel_Impl_1217send_record_arrayEtNS0_11Record_TypeEPKhm:
  874|  10.5k|void Channel_Impl_12::send_record_array(uint16_t epoch, Record_Type type, const uint8_t input[], size_t length) {
  875|  10.5k|   if(length == 0) {
  ------------------
  |  Branch (875:7): [True: 0, False: 10.5k]
  ------------------
  876|      0|      return;
  877|      0|   }
  878|       |
  879|  10.5k|   auto cipher_state = write_cipher_state_epoch(epoch);
  880|       |
  881|  21.1k|   while(length > 0) {
  ------------------
  |  Branch (881:10): [True: 10.5k, False: 10.5k]
  ------------------
  882|  10.5k|      const size_t sending = std::min<size_t>(length, MAX_PLAINTEXT_SIZE);
  883|  10.5k|      write_record(cipher_state.get(), epoch, type, input, sending);
  884|       |
  885|  10.5k|      input += sending;
  886|  10.5k|      length -= sending;
  887|  10.5k|   }
  888|  10.5k|}
_ZN5Botan3TLS15Channel_Impl_1211send_recordENS0_11Record_TypeERKNSt3__16vectorIhNS3_9allocatorIhEEEE:
  890|  10.5k|void Channel_Impl_12::send_record(Record_Type record_type, const std::vector<uint8_t>& record) {
  891|  10.5k|   send_record_array(sequence_numbers().current_write_epoch(), record_type, record.data(), record.size());
  892|  10.5k|}
_ZN5Botan3TLS15Channel_Impl_1210send_alertERKNS0_5AlertE:
  908|  2.23k|void Channel_Impl_12::send_alert(const Alert& alert) {
  909|  2.23k|   const bool ready_to_send_anything = !is_closed() && m_sequence_numbers;
  ------------------
  |  Branch (909:40): [True: 2.01k, False: 215]
  |  Branch (909:56): [True: 1.97k, False: 44]
  ------------------
  910|  2.23k|   if(alert.is_valid() && ready_to_send_anything) {
  ------------------
  |  Branch (910:7): [True: 2.23k, False: 0]
  |  Branch (910:27): [True: 1.97k, False: 259]
  ------------------
  911|  1.97k|      try {
  912|  1.97k|         send_record(Record_Type::Alert, alert.serialize());
  913|  1.97k|      } catch(...) { /* swallow it */
  914|      0|      }
  915|  1.97k|   }
  916|       |
  917|       |   // RFC 5246 7.2.2:
  918|       |   //    no_renegotiation
  919|       |   //       Sent by the client in response to a hello request or by the
  920|       |   //       server in response to a client hello after initial handshaking.
  921|       |   //
  922|       |   // In this case we are the peer sending the refusal, so there is no reason
  923|       |   // for our epochs to have moved. If they somehow did, clear the pending
  924|       |   // state. A strictly better approach here would be to simply throw
  925|       |   // Internal_Error, but send_alert is called from within catch handlers
  926|       |   // so this is not currently viable.
  927|  2.23k|   if(alert.type() == Alert::NoRenegotiation && m_active_state.has_value()) {
  ------------------
  |  Branch (927:7): [True: 0, False: 2.23k]
  |  Branch (927:49): [True: 0, False: 0]
  ------------------
  928|      0|      if(pending_handshake_epochs_unmoved()) {
  ------------------
  |  Branch (928:10): [True: 0, False: 0]
  ------------------
  929|      0|         clear_pending_handshake_state();
  930|      0|      }
  931|      0|   }
  932|       |
  933|  2.23k|   if(alert.is_fatal()) {
  ------------------
  |  Branch (933:7): [True: 2.00k, False: 231]
  ------------------
  934|       |      // Order matters: the channel is made unusable and its secrets destroyed
  935|       |      // before any application-supplied storage is touched, so a throwing
  936|       |      // session manager cannot leave is_active() true with live keys.
  937|  2.00k|      m_had_fatal_alert = true;
  938|  2.00k|      m_has_been_closed = true;
  939|       |
  940|       |      // Alert::None is the local teardown that is never sent to the peer, used
  941|       |      // where the trigger was unauthenticated input or a local timeout. Evicting
  942|       |      // the resumption state on that basis would hand anyone able to reach the
  943|       |      // address the ability to destroy it, which is what keeping the teardown
  944|       |      // local exists to prevent.
  945|  2.00k|      const auto invalidated =
  946|  2.00k|         (alert.type() == Alert::None) ? std::vector<Session_Handle>() : take_sessions_to_invalidate();
  ------------------
  |  Branch (946:10): [True: 0, False: 2.00k]
  ------------------
  947|       |
  948|  2.00k|      reset_state();
  949|  2.00k|      invalidate_sessions(invalidated);
  950|  2.00k|   }
  951|       |
  952|  2.23k|   if(alert.type() == Alert::CloseNotify || alert.is_fatal()) {
  ------------------
  |  Branch (952:7): [True: 231, False: 2.00k]
  |  Branch (952:45): [True: 2.00k, False: 0]
  ------------------
  953|  2.23k|      m_has_been_closed = true;
  954|  2.23k|   }
  955|  2.23k|}
_ZN5Botan3TLS15Channel_Impl_1226secure_renegotiation_checkEPKNS0_15Client_Hello_12E:
  957|  3.10k|void Channel_Impl_12::secure_renegotiation_check(const Client_Hello_12* client_hello) {
  958|  3.10k|   BOTAN_ASSERT_NONNULL(client_hello);
  ------------------
  |  |  123|  3.10k|   do {                                                                                   \
  |  |  124|  3.10k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 3.10k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  3.10k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 3.10k]
  |  |  ------------------
  ------------------
  959|  3.10k|   const bool secure_renegotiation = client_hello->secure_renegotiation();
  960|       |
  961|  3.10k|   if(m_active_state && m_active_state->client_supports_secure_renegotiation() != secure_renegotiation) {
  ------------------
  |  Branch (961:7): [True: 0, False: 3.10k]
  |  Branch (961:25): [True: 0, False: 0]
  ------------------
  962|      0|      throw TLS_Exception(Alert::HandshakeFailure, "Client changed its mind about secure renegotiation");
  963|      0|   }
  964|       |
  965|  3.10k|   if(secure_renegotiation) {
  ------------------
  |  Branch (965:7): [True: 250, False: 2.85k]
  ------------------
  966|    250|      const std::vector<uint8_t>& data = client_hello->renegotiation_info();
  967|       |
  968|    250|      const auto expected = secure_renegotiation_data_for_client_hello();
  969|    250|      if(!CT::is_equal<uint8_t>(data, expected).as_bool()) {
  ------------------
  |  Branch (969:10): [True: 2, False: 248]
  ------------------
  970|      2|         throw TLS_Exception(Alert::HandshakeFailure, "Client sent bad values for secure renegotiation");
  971|      2|      }
  972|    250|   }
  973|  3.10k|}
_ZN5Botan3TLS15Channel_Impl_1226secure_renegotiation_checkEPKNS0_15Server_Hello_12E:
  975|  2.81k|void Channel_Impl_12::secure_renegotiation_check(const Server_Hello_12* server_hello) {
  976|  2.81k|   BOTAN_ASSERT_NONNULL(server_hello);
  ------------------
  |  |  123|  2.81k|   do {                                                                                   \
  |  |  124|  2.81k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 2.81k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  2.81k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 2.81k]
  |  |  ------------------
  ------------------
  977|  2.81k|   const bool secure_renegotiation = server_hello->secure_renegotiation();
  978|       |
  979|  2.81k|   if(m_active_state && m_active_state->server_supports_secure_renegotiation() != secure_renegotiation) {
  ------------------
  |  Branch (979:7): [True: 0, False: 2.81k]
  |  Branch (979:25): [True: 0, False: 0]
  ------------------
  980|      0|      throw TLS_Exception(Alert::HandshakeFailure, "Server changed its mind about secure renegotiation");
  981|      0|   }
  982|       |
  983|  2.81k|   if(secure_renegotiation) {
  ------------------
  |  Branch (983:7): [True: 170, False: 2.64k]
  ------------------
  984|    170|      const std::vector<uint8_t>& data = server_hello->renegotiation_info();
  985|       |
  986|    170|      const auto expected = secure_renegotiation_data_for_server_hello();
  987|    170|      if(!CT::is_equal<uint8_t>(data, expected).as_bool()) {
  ------------------
  |  Branch (987:10): [True: 0, False: 170]
  ------------------
  988|      0|         throw TLS_Exception(Alert::HandshakeFailure, "Server sent bad values for secure renegotiation");
  989|      0|      }
  990|    170|   }
  991|  2.81k|}
_ZNK5Botan3TLS15Channel_Impl_1242secure_renegotiation_data_for_client_helloEv:
  993|    250|std::vector<uint8_t> Channel_Impl_12::secure_renegotiation_data_for_client_hello() const {
  994|    250|   if(m_active_state.has_value()) {
  ------------------
  |  Branch (994:7): [True: 0, False: 250]
  ------------------
  995|      0|      return m_active_state->client_finished_verify_data();
  996|      0|   }
  997|    250|   return std::vector<uint8_t>();
  998|    250|}
_ZNK5Botan3TLS15Channel_Impl_1242secure_renegotiation_data_for_server_helloEv:
 1000|  2.98k|std::vector<uint8_t> Channel_Impl_12::secure_renegotiation_data_for_server_hello() const {
 1001|  2.98k|   if(m_active_state.has_value()) {
  ------------------
  |  Branch (1001:7): [True: 0, False: 2.98k]
  ------------------
 1002|      0|      return concat(m_active_state->client_finished_verify_data(), m_active_state->server_finished_verify_data());
 1003|  2.98k|   } else {
 1004|  2.98k|      return {};
 1005|  2.98k|   }
 1006|  2.98k|}
tls_channel_impl_12.cpp:_ZZN5Botan3TLS15Channel_Impl_1222create_handshake_stateENS0_16Protocol_VersionEbENK3$_2clENS0_11Record_TypeERKNSt3__16vectorIhNS5_9allocatorIhEEEE:
  303|  8.59k|      auto send_record_f = [this](Record_Type rec_type, const std::vector<uint8_t>& record) {
  304|  8.59k|         send_record(rec_type, record);
  305|  8.59k|      };
tls_channel_impl_12.cpp:_ZN5Botan3TLS12_GLOBAL__N_123prune_old_cipher_statesINS0_15Channel_Impl_1226Retained_Read_Cipher_StateEEEvRNSt3__13mapItT_NS5_4lessItEENS5_9allocatorINS5_4pairIKtS7_EEEEEE:
   55|    377|void prune_old_cipher_states(std::map<uint16_t, T>& states) {
   56|       |   // std::map iterates in ascending key order. Drop the lowest non-zero
   57|       |   // entries until at most TLS_RETAINED_CIPHERSTATES remain. The newly
   58|       |   // installed epoch is the highest key, so it is preserved.
   59|    377|   size_t non_zero = states.size() - states.count(0);
   60|    377|   auto it = states.lower_bound(1);
   61|    377|   while(non_zero > TLS_RETAINED_CIPHERSTATES) {
  ------------------
  |  Branch (61:10): [True: 0, False: 377]
  ------------------
   62|      0|      it = states.erase(it);
   63|      0|      --non_zero;
   64|      0|   }
   65|    377|}
tls_channel_impl_12.cpp:_ZN5Botan3TLS12_GLOBAL__N_123prune_old_cipher_statesINSt3__110shared_ptrINS0_23Connection_Cipher_StateEEEEEvRNS3_3mapItT_NS3_4lessItEENS3_9allocatorINS3_4pairIKtS8_EEEEEE:
   55|     79|void prune_old_cipher_states(std::map<uint16_t, T>& states) {
   56|       |   // std::map iterates in ascending key order. Drop the lowest non-zero
   57|       |   // entries until at most TLS_RETAINED_CIPHERSTATES remain. The newly
   58|       |   // installed epoch is the highest key, so it is preserved.
   59|     79|   size_t non_zero = states.size() - states.count(0);
   60|     79|   auto it = states.lower_bound(1);
   61|     79|   while(non_zero > TLS_RETAINED_CIPHERSTATES) {
  ------------------
  |  Branch (61:10): [True: 0, False: 79]
  ------------------
   62|      0|      it = states.erase(it);
   63|      0|      --non_zero;
   64|      0|   }
   65|     79|}
tls_channel_impl_12.cpp:_ZZN5Botan3TLS15Channel_Impl_1216activate_sessionEvENK3$_0clEt:
  493|    316|      const auto not_current_epoch = [current_epoch](uint16_t epoch) { return (epoch != current_epoch); };
tls_channel_impl_12.cpp:_ZZN5Botan3TLS15Channel_Impl_129from_peerENSt3__14spanIKhLm18446744073709551615EEEENK3$_0clEt:
  541|    358|         auto get_epoch = [this](uint16_t epoch) { return read_cipher_state_epoch(epoch); };
tls_channel_impl_12.cpp:_ZN5Botan3TLS12_GLOBAL__N_129absorb_malformed_input_errorsIZNS0_15Channel_Impl_1221process_handshake_ccsERKNSt3__16vectorIhNS_16secure_allocatorIhEEEEmNS0_11Record_TypeENS0_16Protocol_VersionEbE3$_1EEvbT_:
   74|  9.36k|void absorb_malformed_input_errors(bool absorb, F fn) {
   75|  9.36k|   try {
   76|  9.36k|      fn();
   77|  9.36k|   } catch(const TLS_Exception&) {
   78|  1.10k|      if(!absorb) {
  ------------------
  |  Branch (78:10): [True: 1.10k, False: 0]
  ------------------
   79|  1.10k|         throw;
   80|  1.10k|      }
   81|  1.10k|   } catch(const Decoding_Error&) {
   82|    414|      if(!absorb) {
  ------------------
  |  Branch (82:10): [True: 414, False: 0]
  ------------------
   83|    414|         throw;
   84|    414|      }
   85|    414|   }
   86|  9.36k|}
tls_channel_impl_12.cpp:_ZZN5Botan3TLS15Channel_Impl_1221process_handshake_ccsERKNSt3__16vectorIhNS_16secure_allocatorIhEEEEmNS0_11Record_TypeENS0_16Protocol_VersionEbENK3$_1clEv:
  766|  9.36k|      absorb_malformed_input_errors(unauthenticated_against_active_association, [&] {
  767|  9.36k|         m_pending_state->handshake_io().add_record(record.data(), record.size(), record_type, record_sequence);
  768|       |
  769|  15.3k|         while(auto* pending = m_pending_state.get()) {
  ------------------
  |  Branch (769:22): [True: 13.8k, False: 1.54k]
  ------------------
  770|  13.8k|            auto msg = pending->get_next_handshake_msg(policy().maximum_handshake_message_size());
  771|       |
  772|  13.8k|            if(msg.first == Handshake_Type::None) {  // no full handshake yet
  ------------------
  |  Branch (772:16): [True: 7.73k, False: 6.08k]
  ------------------
  773|  7.73k|               break;
  774|  7.73k|            }
  775|       |
  776|  6.08k|            process_handshake_msg(*pending, msg.first, msg.second, epoch0_restart);
  777|       |
  778|  6.08k|            if(!m_pending_state) {
  ------------------
  |  Branch (778:16): [True: 79, False: 6.00k]
  ------------------
  779|     79|               break;
  780|     79|            }
  781|  6.08k|         }
  782|  9.36k|      });

_ZN5Botan3TLS26Active_Connection_State_12D2Ev:
   15|    158|Active_Connection_State_12::~Active_Connection_State_12() = default;
_ZN5Botan3TLS26Active_Connection_State_12C2EOS1_:
   16|     79|Active_Connection_State_12::Active_Connection_State_12(Active_Connection_State_12&&) noexcept = default;
_ZN5Botan3TLS26Active_Connection_State_12C2ERKNS0_15Handshake_StateENSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE:
   20|     79|      m_version(state.version()),
   21|     79|      m_ciphersuite_code(state.server_hello()->ciphersuite()),
   22|     79|      m_application_protocol(std::move(application_protocol)),
   23|     79|      m_peer_certs(state.peer_cert_chain()),
   24|     79|      m_client_random(state.client_hello()->random()),
   25|     79|      m_psk_identity(state.psk_identity()),
   26|     79|      m_server_random(state.server_hello()->random()),
   27|     79|      m_session_id(state.server_hello()->session_id()),
   28|     79|      m_master_secret(state.session_keys().master_secret()),
   29|     79|      m_prf_algo(state.ciphersuite().prf_algo()),
   30|     79|      m_client_supports_secure_renegotiation(state.client_hello()->secure_renegotiation()),
   31|     79|      m_server_supports_secure_renegotiation(state.server_hello()->secure_renegotiation()),
   32|     79|      m_client_finished_verify_data(state.client_finished()->verify_data()),
   33|     79|      m_server_finished_verify_data(state.server_finished()->verify_data()),
   34|     79|      m_supports_extended_master_secret(state.server_hello()->supports_extended_master_secret()) {}

_ZN5Botan3TLS23Renegotiation_ExtensionC2ERNS0_15TLS_Data_ReaderEt:
   24|     27|      m_reneg_data(reader.get_range<uint8_t>(1, 0, 255)) {
   25|     27|   if(m_reneg_data.size() + 1 != extension_size) {
  ------------------
  |  Branch (25:7): [True: 8, False: 19]
  ------------------
   26|      8|      throw Decoding_Error("Bad encoding for secure renegotiation extn");
   27|      8|   }
   28|     27|}
_ZNK5Botan3TLS23Renegotiation_Extension9serializeENS0_15Connection_SideE:
   30|    170|std::vector<uint8_t> Renegotiation_Extension::serialize(Connection_Side /*whoami*/) const {
   31|    170|   std::vector<uint8_t> buf;
   32|    170|   append_tls_length_value(buf, m_reneg_data, 1);
   33|    170|   return buf;
   34|    170|}
_ZNK5Botan3TLS23Supported_Point_Formats9serializeENS0_15Connection_SideE:
   36|    107|std::vector<uint8_t> Supported_Point_Formats::serialize(Connection_Side /*whoami*/) const {
   37|       |   // if this extension is sent, it MUST include uncompressed (RFC 4492, section 5.1)
   38|    107|   if(m_prefers_compressed) {
  ------------------
  |  Branch (38:7): [True: 0, False: 107]
  ------------------
   39|      0|      return std::vector<uint8_t>{2, ANSIX962_COMPRESSED_PRIME, UNCOMPRESSED};
   40|    107|   } else {
   41|    107|      return std::vector<uint8_t>{1, UNCOMPRESSED};
   42|    107|   }
   43|    107|}
_ZN5Botan3TLS23Supported_Point_FormatsC2ERNS0_15TLS_Data_ReaderEt:
   45|    253|Supported_Point_Formats::Supported_Point_Formats(TLS_Data_Reader& reader, uint16_t extension_size) {
   46|    253|   const uint8_t len = reader.get_byte();
   47|       |
   48|    253|   if(len + 1 != extension_size) {
  ------------------
  |  Branch (48:7): [True: 6, False: 247]
  ------------------
   49|      6|      throw Decoding_Error("Inconsistent length field in supported point formats list");
   50|      6|   }
   51|       |
   52|    247|   bool includes_uncompressed = false;
   53|  1.89k|   for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (53:22): [True: 1.88k, False: 8]
  ------------------
   54|  1.88k|      const uint8_t format = reader.get_byte();
   55|       |
   56|  1.88k|      if(static_cast<ECPointFormat>(format) == UNCOMPRESSED) {
  ------------------
  |  Branch (56:10): [True: 86, False: 1.80k]
  ------------------
   57|     86|         m_prefers_compressed = false;
   58|     86|         reader.discard_next(len - i - 1);
   59|     86|         return;
   60|  1.80k|      } else if(static_cast<ECPointFormat>(format) == ANSIX962_COMPRESSED_PRIME) {
  ------------------
  |  Branch (60:17): [True: 153, False: 1.64k]
  ------------------
   61|    153|         m_prefers_compressed = true;
   62|    153|         std::vector<uint8_t> remaining_formats = reader.get_fixed<uint8_t>(len - i - 1);
   63|    153|         includes_uncompressed =
   64|    153|            std::any_of(std::begin(remaining_formats), std::end(remaining_formats), [](uint8_t remaining_format) {
   65|    153|               return static_cast<ECPointFormat>(remaining_format) == UNCOMPRESSED;
   66|    153|            });
   67|    153|         break;
   68|    153|      }
   69|       |
   70|       |      // ignore ANSIX962_COMPRESSED_CHAR2, we don't support these curves
   71|  1.88k|   }
   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|    161|   if(!includes_uncompressed) {
  ------------------
  |  Branch (79:7): [True: 16, False: 145]
  ------------------
   80|     16|      throw TLS_Exception(Alert::IllegalParameter,
   81|     16|                          "Supported Point Formats Extension must contain the uncompressed point format");
   82|     16|   }
   83|    161|}
_ZN5Botan3TLS24Session_Ticket_ExtensionC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
   87|    115|                                                   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|    115|   if(from == Connection_Side::Server && extension_size != 0) {
  ------------------
  |  Branch (92:7): [True: 8, False: 107]
  |  Branch (92:42): [True: 1, False: 7]
  ------------------
   93|      1|      throw Decoding_Error("Server sent a non-empty SessionTicket extension");
   94|      1|   }
   95|    114|   m_ticket = Session_Ticket(reader.get_elem<uint8_t, std::vector<uint8_t>>(extension_size));
   96|    114|}
_ZN5Botan3TLS22Extended_Master_SecretC2ERNS0_15TLS_Data_ReaderEt:
   98|  6.11k|Extended_Master_Secret::Extended_Master_Secret(TLS_Data_Reader& /*unused*/, uint16_t extension_size) {
   99|  6.11k|   if(extension_size != 0) {
  ------------------
  |  Branch (99:7): [True: 1, False: 6.11k]
  ------------------
  100|      1|      throw Decoding_Error("Invalid extended_master_secret extension");
  101|      1|   }
  102|  6.11k|}
_ZNK5Botan3TLS22Extended_Master_Secret9serializeENS0_15Connection_SideE:
  104|  2.81k|std::vector<uint8_t> Extended_Master_Secret::serialize(Connection_Side /*whoami*/) const {
  105|  2.81k|   return std::vector<uint8_t>();
  106|  2.81k|}
_ZN5Botan3TLS16Encrypt_then_MACC2ERNS0_15TLS_Data_ReaderEt:
  108|    369|Encrypt_then_MAC::Encrypt_then_MAC(TLS_Data_Reader& /*unused*/, uint16_t extension_size) {
  109|    369|   if(extension_size != 0) {
  ------------------
  |  Branch (109:7): [True: 1, False: 368]
  ------------------
  110|      1|      throw Decoding_Error("Invalid encrypt_then_mac extension");
  111|      1|   }
  112|    369|}
_ZNK5Botan3TLS16Encrypt_then_MAC9serializeENS0_15Connection_SideE:
  114|    112|std::vector<uint8_t> Encrypt_then_MAC::serialize(Connection_Side /*whoami*/) const {
  115|    112|   return std::vector<uint8_t>();
  116|    112|}
tls_extensions_12.cpp:_ZZN5Botan3TLS23Supported_Point_FormatsC1ERNS0_15TLS_Data_ReaderEtENK3$_0clEh:
   64|    875|            std::any_of(std::begin(remaining_formats), std::end(remaining_formats), [](uint8_t remaining_format) {
   65|    875|               return static_cast<ECPointFormat>(remaining_format) == UNCOMPRESSED;
   66|    875|            });

_ZNK5Botan3TLS14Handshake_Hash5finalENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   17|  1.63k|secure_vector<uint8_t> Handshake_Hash::final(std::string_view mac_algo) const {
   18|  1.63k|   std::string hash_algo(mac_algo);
   19|  1.63k|   if(hash_algo == "SHA-1") {
  ------------------
  |  Branch (19:7): [True: 365, False: 1.26k]
  ------------------
   20|    365|      hash_algo = "SHA-256";
   21|    365|   }
   22|       |
   23|  1.63k|   auto hash = HashFunction::create_or_throw(hash_algo);
   24|  1.63k|   hash->update(m_data);
   25|  1.63k|   return hash->final();
   26|  1.63k|}

_ZNK5Botan3TLS19Stream_Handshake_IO22initial_record_versionEv:
   53|  3.21k|Protocol_Version Stream_Handshake_IO::initial_record_version() const {
   54|  3.21k|   return Protocol_Version::TLS_V12;
   55|  3.21k|}
_ZN5Botan3TLS19Stream_Handshake_IO10add_recordEPKhmNS0_11Record_TypeEm:
   60|  6.11k|                                     uint64_t /*sequence_number*/) {
   61|  6.11k|   if(record_type == Record_Type::Handshake) {
  ------------------
  |  Branch (61:7): [True: 6.01k, False: 104]
  ------------------
   62|  6.01k|      m_queue.insert(m_queue.end(), record, record + record_len);
   63|  6.01k|   } else if(record_type == Record_Type::ChangeCipherSpec) {
  ------------------
  |  Branch (63:14): [True: 104, False: 0]
  ------------------
   64|    104|      if(record_len != 1 || record[0] != 1) {
  ------------------
  |  Branch (64:10): [True: 1, False: 103]
  |  Branch (64:29): [True: 2, False: 101]
  ------------------
   65|      3|         throw Decoding_Error("Invalid ChangeCipherSpec");
   66|      3|      }
   67|       |
   68|       |      // Pretend it's a regular handshake message of zero length
   69|    101|      const uint8_t ccs_hs[] = {static_cast<uint8_t>(Handshake_Type::HandshakeCCS), 0, 0, 0};
   70|    101|      m_queue.insert(m_queue.end(), ccs_hs, ccs_hs + sizeof(ccs_hs));
   71|    101|   } else {
   72|      0|      throw Decoding_Error("Unknown message type " + std::to_string(static_cast<size_t>(record_type)) +
   73|      0|                           " in handshake processing");
   74|      0|   }
   75|  6.11k|}
_ZN5Botan3TLS19Stream_Handshake_IO15get_next_recordEbm:
   78|  10.7k|                                                                                     size_t max_message_size) {
   79|  10.7k|   if(m_queue.size() >= 4) {
  ------------------
  |  Branch (79:7): [True: 6.89k, False: 3.87k]
  ------------------
   80|  6.89k|      const Handshake_Type type = static_cast<Handshake_Type>(m_queue[0]);
   81|       |
   82|  6.89k|      const size_t rec_length = make_uint32(0, m_queue[1], m_queue[2], m_queue[3]);
   83|       |
   84|       |      // If we are expecting a CCS but the next queued message is not a CCS,
   85|       |      // the peer has skipped the CCS message. This can happen when the peer
   86|       |      // sends an encrypted Finished without the preceding CCS, in which case
   87|       |      // the encrypted bytes are misinterpreted as a handshake message.
   88|  6.89k|      if(expecting_ccs) {
  ------------------
  |  Branch (88:10): [True: 535, False: 6.36k]
  ------------------
   89|    535|         const bool is_ccs = (type == Handshake_Type::HandshakeCCS && rec_length == 0);
  ------------------
  |  Branch (89:31): [True: 379, False: 156]
  |  Branch (89:71): [True: 377, False: 2]
  ------------------
   90|    535|         if(!is_ccs) {
  ------------------
  |  Branch (90:13): [True: 158, False: 377]
  ------------------
   91|    158|            throw TLS_Exception(Alert::UnexpectedMessage, "Expected ChangeCipherSpec but got a handshake message");
   92|    158|         }
   93|  6.36k|      } else {
   94|  6.36k|         verify_is_expected_wire_handshake_type(type);
   95|       |
   96|  6.36k|         if(max_message_size > 0 && rec_length > max_message_size) {
  ------------------
  |  Branch (96:13): [True: 6.35k, False: 4]
  |  Branch (96:37): [True: 32, False: 6.32k]
  ------------------
   97|     32|            throw TLS_Exception(
   98|     32|               Alert::HandshakeFailure,
   99|     32|               Botan::fmt("Handshake message is {} bytes, policy maximum is {}", rec_length, max_message_size));
  100|     32|         }
  101|  6.36k|      }
  102|       |
  103|  6.70k|      const size_t length = 4 + rec_length;
  104|       |
  105|  6.70k|      if(m_queue.size() >= length) {
  ------------------
  |  Branch (105:10): [True: 5.82k, False: 885]
  ------------------
  106|  5.82k|         const std::vector<uint8_t> contents(m_queue.begin() + 4, m_queue.begin() + length);
  107|       |
  108|  5.82k|         m_queue.erase(m_queue.begin(), m_queue.begin() + length);
  109|       |
  110|  5.82k|         return std::make_pair(type, contents);
  111|  5.82k|      }
  112|  6.70k|   }
  113|       |
  114|  4.76k|   return std::make_pair(Handshake_Type::None, std::vector<uint8_t>());
  115|  10.7k|}
_ZNK5Botan3TLS19Stream_Handshake_IO6formatERKNSt3__16vectorIhNS2_9allocatorIhEEEENS0_14Handshake_TypeE:
  117|  13.9k|std::vector<uint8_t> Stream_Handshake_IO::format(const std::vector<uint8_t>& msg, Handshake_Type type) const {
  118|  13.9k|   std::vector<uint8_t> send_buf(4 + msg.size());
  119|       |
  120|  13.9k|   const size_t buf_size = msg.size();
  121|       |
  122|  13.9k|   send_buf[0] = static_cast<uint8_t>(type);
  123|       |
  124|  13.9k|   store_be24(&send_buf[1], buf_size);
  125|       |
  126|  13.9k|   if(!msg.empty()) {
  ------------------
  |  Branch (126:7): [True: 11.1k, False: 2.81k]
  ------------------
  127|  11.1k|      copy_mem(&send_buf[4], msg.data(), msg.size());
  128|  11.1k|   }
  129|       |
  130|  13.9k|   return send_buf;
  131|  13.9k|}
_ZN5Botan3TLS19Stream_Handshake_IO4sendERKNS0_17Handshake_MessageE:
  137|  8.59k|std::vector<uint8_t> Stream_Handshake_IO::send(const Handshake_Message& msg) {
  138|  8.59k|   const std::vector<uint8_t> msg_bits = msg.serialize();
  139|       |
  140|  8.59k|   if(msg.type() == Handshake_Type::HandshakeCCS) {
  ------------------
  |  Branch (140:7): [True: 79, False: 8.52k]
  ------------------
  141|     79|      m_send_hs(Record_Type::ChangeCipherSpec, msg_bits);
  142|     79|      return std::vector<uint8_t>();  // not included in handshake hashes
  143|     79|   }
  144|       |
  145|  8.52k|   auto buf = format(msg_bits, msg.wire_type());
  146|  8.52k|   m_send_hs(Record_Type::Handshake, buf);
  147|  8.52k|   return buf;
  148|  8.59k|}
_ZN5Botan3TLS21Datagram_Handshake_IOC2ENSt3__18functionIFvtNS0_11Record_TypeERKNS2_6vectorIhNS2_9allocatorIhEEEEEEENS3_IFmvEEERNS0_27Connection_Sequence_NumbersEtmmNS2_8optionalImEEmt:
  202|    619|      m_seqs(seq),
  203|    619|      m_flights(1),
  204|    619|      m_flight_ccs(1),
  205|    619|      m_initial_timeout(initial_timeout_ms),
  206|    619|      m_max_timeout(max_timeout_ms),
  207|    619|      m_max_retransmissions(max_retransmissions),
  208|    619|      m_initial_epoch(initial_epoch),
  209|    619|      m_last_delivered_epoch(initial_epoch),
  210|    619|      m_send_hs(std::move(writer)),
  211|    619|      m_steady_clock_ms(std::move(steady_clock_ms)),
  212|    619|      m_mtu(mtu),
  213|    619|      m_max_handshake_msg_size(max_handshake_msg_size),
  214|    619|      m_max_pending_reassembly(max_pending_reassembly(m_max_handshake_msg_size)) {}
_ZNK5Botan3TLS21Datagram_Handshake_IO22initial_record_versionEv:
  216|    619|Protocol_Version Datagram_Handshake_IO::initial_record_version() const {
  217|    619|   return Protocol_Version::DTLS_V12;
  218|    619|}
_ZNK5Botan3TLS21Datagram_Handshake_IO14have_more_dataEv:
  299|     16|bool Datagram_Handshake_IO::have_more_data() const {
  300|       |   // Future or incomplete fragments remain buffered, but only a complete
  301|       |   // next-in-sequence message is trailing handshake data.
  302|     16|   const auto next = m_messages.find(m_in_message_seq);
  303|     16|   return next != m_messages.end() && next->second.complete();
  ------------------
  |  Branch (303:11): [True: 8, False: 8]
  |  Branch (303:39): [True: 3, False: 5]
  ------------------
  304|     16|}
_ZN5Botan3TLS21Datagram_Handshake_IO10add_recordEPKhmNS0_11Record_TypeEm:
  377|  3.24k|                                       uint64_t record_sequence) {
  378|  3.24k|   add_record(record, record_len, record_type, record_sequence, false);
  379|  3.24k|}
_ZN5Botan3TLS21Datagram_Handshake_IO20charged_add_fragmentERNS1_20Handshake_ReassemblyEmPKhmmtNS0_14Handshake_TypeEm:
  433|  1.50k|                                                 size_t msg_length) {
  434|       |   // We allocate the entire block on the first fragment, so charge it against
  435|       |   // the bound at that point. Later fragments must agree with the declared
  436|       |   // length, so admission is decided once per slot and retransmissions are
  437|       |   // never re-charged.
  438|  1.50k|   if(!reassembly.initialized()) {
  ------------------
  |  Branch (438:7): [True: 835, False: 668]
  ------------------
  439|    835|      if(m_pending_reassembly_bytes + msg_length > ceiling) {
  ------------------
  |  Branch (439:10): [True: 383, False: 452]
  ------------------
  440|    383|         return false;
  441|    383|      }
  442|    452|      m_pending_reassembly_bytes += msg_length;
  443|    452|   }
  444|       |
  445|  1.12k|   reassembly.add_fragment(fragment, fragment_length, fragment_offset, epoch, msg_type, msg_length);
  446|  1.12k|   return true;
  447|  1.50k|}
_ZN5Botan3TLS21Datagram_Handshake_IO24release_reassembly_bytesERKNS1_20Handshake_ReassemblyE:
  449|     66|void Datagram_Handshake_IO::release_reassembly_bytes(const Handshake_Reassembly& reassembly) {
  450|     66|   BOTAN_ASSERT_NOMSG(m_pending_reassembly_bytes >= reassembly.msg_length());
  ------------------
  |  |   84|     66|   do {                                                                     \
  |  |   85|     66|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     66|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 66]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     66|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 66]
  |  |  ------------------
  ------------------
  451|     66|   m_pending_reassembly_bytes -= reassembly.msg_length();
  452|     66|}
_ZN5Botan3TLS21Datagram_Handshake_IO10add_recordEPKhmNS0_11Record_TypeEmb:
  548|  3.24k|                                       bool retransmitted_flight) {
  549|  3.24k|   const uint16_t epoch = static_cast<uint16_t>(record_sequence >> 48);
  550|       |
  551|       |   // A record under a non-zero epoch authenticated at the record layer, so the
  552|       |   // peer is live and is who it claims to be. Restore the peer-cued replay
  553|       |   // budget: RFC 6347 4.2.4 requires the terminal-flight sender to answer a
  554|       |   // retransmit of the peer's last flight for as long as the association lasts,
  555|       |   // and the retained IO never sends a new flight to reset the count otherwise.
  556|       |   //
  557|       |   // Only once our handshake has finished, though. While it is still pending,
  558|       |   // forward progress already resets the count in send_under_epoch, so
  559|       |   // restoring it here as well would let a peer alternate a cheap out-of-window
  560|       |   // protected record with an epoch-zero cue to draw the pending flight without
  561|       |   // bound.
  562|  3.24k|   if(epoch > 0 && m_finished) {
  ------------------
  |  Branch (562:7): [True: 0, False: 3.24k]
  |  Branch (562:20): [True: 0, False: 0]
  ------------------
  563|      0|      m_peer_replay_count = 0;
  564|      0|   }
  565|       |
  566|  3.24k|   if(record_type == Record_Type::ChangeCipherSpec) {
  ------------------
  |  Branch (566:7): [True: 375, False: 2.87k]
  ------------------
  567|    375|      if(record_len != 1 || record[0] != 1) {
  ------------------
  |  Branch (567:10): [True: 26, False: 349]
  |  Branch (567:29): [True: 6, False: 343]
  ------------------
  568|     32|         throw Decoding_Error("Invalid ChangeCipherSpec");
  569|     32|      }
  570|       |
  571|       |      // TODO: check this is otherwise empty
  572|    343|      m_ccs_epochs.insert(epoch);
  573|    343|      if(retransmitted_flight) {
  ------------------
  |  Branch (573:10): [True: 0, False: 343]
  ------------------
  574|       |         // Retransmitted final flights cross the epoch boundary: CCS is sent
  575|       |         // under the previous epoch and Finished under the newly activated one.
  576|       |         // Keep both observations because their datagrams may arrive reordered.
  577|      0|         const uint16_t finished_epoch = static_cast<uint16_t>(epoch + 1);
  578|      0|         if(m_retransmitted_finished_epoch == finished_epoch) {
  ------------------
  |  Branch (578:13): [True: 0, False: 0]
  ------------------
  579|      0|            m_retransmitted_finished_epoch.reset();
  580|      0|            if(m_retransmit_terminal_flight) {
  ------------------
  |  Branch (580:16): [True: 0, False: 0]
  ------------------
  581|      0|               replay_last_flight_for_peer();
  582|      0|            }
  583|      0|         } else {
  584|      0|            m_retransmitted_finished_epoch.reset();
  585|      0|            m_retransmitted_ccs_epoch = finished_epoch;
  586|      0|         }
  587|      0|      }
  588|    343|      return;
  589|    375|   }
  590|       |
  591|  2.87k|   bool retransmit_response = false;
  592|       |
  593|  5.01k|   while(record_len > 0) {
  ------------------
  |  Branch (593:10): [True: 3.73k, False: 1.28k]
  ------------------
  594|  3.73k|      if(record_len < DTLS_HANDSHAKE_HEADER_SIZE) {
  ------------------
  |  Branch (594:10): [True: 1.51k, False: 2.22k]
  ------------------
  595|  1.51k|         return;  // completely bogus? at least degenerate/weird
  596|  1.51k|      }
  597|       |
  598|  2.22k|      const Handshake_Type msg_type = static_cast<Handshake_Type>(record[0]);
  599|       |
  600|  2.22k|      verify_is_expected_wire_handshake_type(msg_type);
  601|       |
  602|  2.22k|      const size_t msg_len = load_be24(&record[1]);
  603|       |
  604|  2.22k|      if(m_max_handshake_msg_size > 0 && msg_len > m_max_handshake_msg_size) {
  ------------------
  |  Branch (604:10): [True: 2.21k, False: 6]
  |  Branch (604:42): [True: 44, False: 2.17k]
  ------------------
  605|     44|         throw TLS_Exception(
  606|     44|            Alert::HandshakeFailure,
  607|     44|            Botan::fmt("Handshake message is {} bytes, policy maximum is {}", msg_len, m_max_handshake_msg_size));
  608|     44|      }
  609|       |
  610|  2.17k|      const uint16_t message_seq = load_be<uint16_t>(&record[4], 0);
  611|  2.17k|      const size_t fragment_offset = load_be24(&record[6]);
  612|  2.17k|      const size_t fragment_length = load_be24(&record[9]);
  613|       |
  614|  2.17k|      const size_t total_size = DTLS_HANDSHAKE_HEADER_SIZE + fragment_length;
  615|       |
  616|  2.17k|      if(record_len < total_size) {
  ------------------
  |  Branch (616:10): [True: 31, False: 2.14k]
  ------------------
  617|     31|         throw Decoding_Error("Bad lengths in DTLS header");
  618|     31|      }
  619|       |
  620|       |      // Bound the out-of-order reassembly window.
  621|  2.14k|      constexpr uint16_t reassembly_window = 16;
  622|       |
  623|  2.14k|      if(message_seq >= m_in_message_seq && (message_seq - m_in_message_seq) < reassembly_window) {
  ------------------
  |  Branch (623:10): [True: 2.14k, False: 6]
  |  Branch (623:45): [True: 1.66k, False: 477]
  ------------------
  624|       |         // A wrapped counter would alias new messages onto long-delivered
  625|       |         // sequence numbers. No legitimate handshake gets here, so go quiet.
  626|  1.66k|         if(m_in_message_seq_wrapped) {
  ------------------
  |  Branch (626:13): [True: 0, False: 1.66k]
  ------------------
  627|      0|            record += total_size;
  628|      0|            record_len -= total_size;
  629|      0|            continue;
  630|      0|         }
  631|       |
  632|       |         // Epochs never decrease within a handshake, so a fragment carrying an
  633|       |         // older epoch belongs to an earlier handshake whose records were
  634|       |         // delayed into this one. Renegotiation restarts message_seq at zero,
  635|       |         // so without this such a record can occupy a slot the current
  636|       |         // handshake still needs.
  637|  1.66k|         if(epoch < m_last_delivered_epoch) {
  ------------------
  |  Branch (637:13): [True: 0, False: 1.66k]
  ------------------
  638|      0|            record += total_size;
  639|      0|            record_len -= total_size;
  640|      0|            continue;
  641|      0|         }
  642|       |
  643|       |         /*
  644|       |         RFC 6347 4.2.2 keeps message_seq across a retransmission but gives the
  645|       |         record a new sequence number, and a rehandshake restarts message_seq at
  646|       |         zero. A delayed Finished from the previous handshake therefore arrives
  647|       |         with a plausible sequence number and, before this handshake's own
  648|       |         ChangeCipherSpec, the same epoch as its pre-CCS records, so neither the
  649|       |         sequence nor the epoch floor tells it apart. It cannot be genuine
  650|       |         though: a Finished is sent under the epoch its own ChangeCipherSpec
  651|       |         installed, which is always above the one this handshake began in.
  652|       |
  653|       |         Left in, it takes the slot the real Finished needs, and a complete slot
  654|       |         is never replaced, so verification fails against the wrong transcript.
  655|       |         */
  656|  1.66k|         if(msg_type == Handshake_Type::Finished && epoch <= m_initial_epoch) {
  ------------------
  |  Branch (656:13): [True: 18, False: 1.64k]
  |  Branch (656:53): [True: 18, False: 0]
  ------------------
  657|     18|            record += total_size;
  658|     18|            record_len -= total_size;
  659|     18|            continue;
  660|     18|         }
  661|       |
  662|  1.64k|         if(retransmitted_flight) {
  ------------------
  |  Branch (662:13): [True: 0, False: 1.64k]
  ------------------
  663|      0|            if(fragment_length == 0) {
  ------------------
  |  Branch (663:16): [True: 0, False: 0]
  ------------------
  664|      0|               record += total_size;
  665|      0|               record_len -= total_size;
  666|      0|               continue;
  667|      0|            }
  668|       |
  669|      0|            throw TLS_Exception(Alert::UnexpectedMessage, "Unexpected new DTLS handshake message");
  670|      0|         }
  671|       |
  672|       |         // An empty fragment for a non-empty message is garbage; drop it
  673|       |         // before it can create and charge a reassembly slot.
  674|  1.64k|         if(fragment_length == 0 && msg_len > 0) {
  ------------------
  |  Branch (674:13): [True: 612, False: 1.03k]
  |  Branch (674:37): [True: 143, False: 469]
  ------------------
  675|    143|            record += total_size;
  676|    143|            record_len -= total_size;
  677|    143|            continue;
  678|    143|         }
  679|       |
  680|       |         // Reserve headroom for the message actually being waited on. Otherwise
  681|       |         // fragments for the fifteen slots beyond it can consume the whole
  682|       |         // budget, after which every fragment of the expected message is
  683|       |         // silently dropped and the handshake cannot proceed.
  684|  1.50k|         const size_t ceiling =
  685|  1.50k|            (message_seq == m_in_message_seq) ? m_max_pending_reassembly : m_max_pending_reassembly / 2;
  ------------------
  |  Branch (685:13): [True: 578, False: 925]
  ------------------
  686|       |
  687|  1.50k|         auto [it, inserted] = m_messages.try_emplace(message_seq);
  688|       |
  689|  1.50k|         const bool accepted = charged_add_fragment(it->second,
  690|  1.50k|                                                    ceiling,
  691|  1.50k|                                                    &record[DTLS_HANDSHAKE_HEADER_SIZE],
  692|  1.50k|                                                    fragment_length,
  693|  1.50k|                                                    fragment_offset,
  694|  1.50k|                                                    epoch,
  695|  1.50k|                                                    msg_type,
  696|  1.50k|                                                    msg_len);
  697|  1.50k|         if(!accepted && inserted) {
  ------------------
  |  Branch (697:13): [True: 383, False: 1.12k]
  |  Branch (697:26): [True: 383, False: 0]
  ------------------
  698|    383|            m_messages.erase(it);
  699|    383|         }
  700|  1.50k|      } else if(message_seq < m_in_message_seq) {
  ------------------
  |  Branch (700:17): [True: 0, False: 483]
  ------------------
  701|      0|         retransmit_response |= process_previous_handshake_fragment(&record[DTLS_HANDSHAKE_HEADER_SIZE],
  702|      0|                                                                    fragment_length,
  703|      0|                                                                    fragment_offset,
  704|      0|                                                                    epoch,
  705|      0|                                                                    msg_type,
  706|      0|                                                                    msg_len,
  707|      0|                                                                    message_seq,
  708|      0|                                                                    retransmitted_flight);
  709|      0|      }
  710|       |      // else: beyond the reassembly window is not a retransmission of anything
  711|       |      // we have seen, so it must not be able to pull a flight replay out of
  712|       |      // us. Drop it silently: the sender has proven nothing at this point.
  713|       |
  714|  1.98k|      record += total_size;
  715|  1.98k|      record_len -= total_size;
  716|  1.98k|   }
  717|       |
  718|  1.28k|   if(retransmit_response && (!m_finished || m_retransmit_terminal_flight)) {
  ------------------
  |  Branch (718:7): [True: 0, False: 1.28k]
  |  Branch (718:31): [True: 0, False: 0]
  |  Branch (718:46): [True: 0, False: 0]
  ------------------
  719|      0|      replay_last_flight_for_peer();
  720|      0|   }
  721|  1.28k|}
_ZN5Botan3TLS21Datagram_Handshake_IO15get_next_recordEbm:
  735|  3.04k|                                                                                       size_t /*max_message_size*/) {
  736|       |   // Expecting a message means the last flight is concluded
  737|  3.04k|   if(!m_flights.rbegin()->empty()) {
  ------------------
  |  Branch (737:7): [True: 0, False: 3.04k]
  ------------------
  738|      0|      m_flights.emplace_back();
  739|      0|      m_flight_ccs.emplace_back();
  740|      0|   }
  741|       |
  742|  3.04k|   if(expecting_ccs) {
  ------------------
  |  Branch (742:7): [True: 0, False: 3.04k]
  ------------------
  743|       |      // CCS is expected under the epoch the peer's handshake messages have
  744|       |      // been arriving on, and always follows at least one delivered message.
  745|      0|      if(m_first_delivered_epoch.has_value() && m_ccs_epochs.contains(*m_first_delivered_epoch)) {
  ------------------
  |  Branch (745:10): [True: 0, False: 0]
  |  Branch (745:49): [True: 0, False: 0]
  ------------------
  746|      0|         return std::make_pair(Handshake_Type::HandshakeCCS, std::vector<uint8_t>());
  747|      0|      }
  748|      0|      return std::make_pair(Handshake_Type::None, std::vector<uint8_t>());
  749|      0|   }
  750|       |
  751|  3.04k|   if(m_retransmitted_client_hello.has_value() && m_retransmitted_client_hello->second.complete()) {
  ------------------
  |  Branch (751:7): [True: 0, False: 3.04k]
  |  Branch (751:51): [True: 0, False: 0]
  ------------------
  752|      0|      auto result = m_retransmitted_client_hello->second.message();
  753|      0|      release_reassembly_bytes(m_retransmitted_client_hello->second);
  754|      0|      m_retransmitted_client_hello.reset();
  755|      0|      m_recreating_hello_verify_request = true;
  756|      0|      return result;
  757|      0|   }
  758|       |
  759|  3.04k|   auto i = m_messages.find(m_in_message_seq);
  760|       |
  761|  3.04k|   if(i == m_messages.end() || !i->second.complete()) {
  ------------------
  |  Branch (761:7): [True: 1.98k, False: 1.05k]
  |  Branch (761:7): [True: 2.97k, False: 66]
  |  Branch (761:32): [True: 993, False: 66]
  ------------------
  762|  2.97k|      return std::make_pair(Handshake_Type::None, std::vector<uint8_t>());
  763|  2.97k|   }
  764|       |
  765|     66|   m_in_message_seq += 1;
  766|     66|   if(m_in_message_seq == 0) {
  ------------------
  |  Branch (766:7): [True: 0, False: 66]
  ------------------
  767|      0|      m_in_message_seq_wrapped = true;
  768|      0|   }
  769|       |
  770|     66|   if(!m_first_delivered_epoch.has_value()) {
  ------------------
  |  Branch (770:7): [True: 66, False: 0]
  ------------------
  771|     66|      m_first_delivered_epoch = i->second.epoch();
  772|     66|   }
  773|       |
  774|     66|   auto result = i->second.message();
  775|       |
  776|     66|   if(result.first == Handshake_Type::ClientHello) {
  ------------------
  |  Branch (776:7): [True: 16, False: 50]
  ------------------
  777|     16|      m_awaiting_cookie_client_hello = false;
  778|     16|   }
  779|       |
  780|     66|   const uint16_t delivered_epoch = i->second.epoch();
  781|       |
  782|     66|   release_reassembly_bytes(i->second);
  783|     66|   m_messages.erase(i);
  784|       |
  785|     66|   if(delivered_epoch > m_last_delivered_epoch) {
  ------------------
  |  Branch (785:7): [True: 0, False: 66]
  ------------------
  786|      0|      m_last_delivered_epoch = delivered_epoch;
  787|      0|      discard_stale_epoch_messages();
  788|      0|   }
  789|       |
  790|     66|   return result;
  791|  3.04k|}
_ZN5Botan3TLS21Datagram_Handshake_IO20Handshake_Reassembly12add_fragmentEPKhmmtNS0_14Handshake_TypeEm:
  798|  1.12k|                                                               size_t msg_length) {
  799|  1.12k|   if(m_msg_type == Handshake_Type::None) {
  ------------------
  |  Branch (799:7): [True: 452, False: 668]
  ------------------
  800|       |      // First fragment for this message_seq
  801|    452|      m_epoch = epoch;
  802|    452|      m_msg_type = msg_type;
  803|    452|      m_msg_length = msg_length;
  804|    452|      m_message.resize(msg_length);
  805|    452|      m_received_mask.assign(msg_length, 0);
  806|    668|   } else {
  807|    668|      if(complete()) {
  ------------------
  |  Branch (807:10): [True: 294, False: 374]
  ------------------
  808|       |         // Ignore even if the header fields disagree: a stray or forged
  809|       |         // retransmission must not tear down the connection once the
  810|       |         // message has already been fully received.
  811|    294|         return;
  812|    294|      }
  813|       |
  814|    374|      if(msg_type != m_msg_type || msg_length != m_msg_length || epoch != m_epoch) {
  ------------------
  |  Branch (814:10): [True: 12, False: 362]
  |  Branch (814:36): [True: 26, False: 336]
  |  Branch (814:66): [True: 0, False: 336]
  ------------------
  815|     38|         throw Decoding_Error("Inconsistent values in fragmented DTLS handshake header");
  816|     38|      }
  817|    374|   }
  818|       |
  819|    788|   if(fragment_offset > m_msg_length) {
  ------------------
  |  Branch (819:7): [True: 33, False: 755]
  ------------------
  820|     33|      throw Decoding_Error("Fragment offset past end of message");
  821|     33|   }
  822|       |
  823|    755|   if(fragment_offset + fragment_length > m_msg_length) {
  ------------------
  |  Branch (823:7): [True: 7, False: 748]
  ------------------
  824|      7|      throw Decoding_Error("Fragment overlaps past end of message");
  825|      7|   }
  826|       |
  827|    748|   BOTAN_ASSERT_NOMSG(m_received_mask.size() == m_msg_length);
  ------------------
  |  |   84|    748|   do {                                                                     \
  |  |   85|    748|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    748|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 748]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    748|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 748]
  |  |  ------------------
  ------------------
  828|       |
  829|  2.85k|   for(size_t i = 0; i != fragment_length; ++i) {
  ------------------
  |  Branch (829:22): [True: 2.11k, False: 734]
  ------------------
  830|  2.11k|      const size_t off = fragment_offset + i;
  831|  2.11k|      if(m_received_mask[off] != 0) {
  ------------------
  |  Branch (831:10): [True: 535, False: 1.58k]
  ------------------
  832|       |         // RFC 6347 4.2.3 permits overlapping retransmissions, but the
  833|       |         // overlapping bytes must agree.
  834|    535|         if(m_message[off] != fragment[i]) {
  ------------------
  |  Branch (834:13): [True: 14, False: 521]
  ------------------
  835|     14|            throw Decoding_Error("Inconsistent overlapping DTLS handshake fragment");
  836|     14|         }
  837|  1.58k|      } else {
  838|  1.58k|         m_message[off] = fragment[i];
  839|  1.58k|         m_received_mask[off] = 1;
  840|  1.58k|         ++m_bytes_received;
  841|  1.58k|      }
  842|  2.11k|   }
  843|    748|}
_ZNK5Botan3TLS21Datagram_Handshake_IO20Handshake_Reassembly8completeEv:
  845|  1.80k|bool Datagram_Handshake_IO::Handshake_Reassembly::complete() const {
  846|  1.80k|   return (m_msg_type != Handshake_Type::None && m_bytes_received == m_msg_length);
  ------------------
  |  Branch (846:12): [True: 1.80k, False: 0]
  |  Branch (846:50): [True: 429, False: 1.37k]
  ------------------
  847|  1.80k|}
_ZNK5Botan3TLS21Datagram_Handshake_IO20Handshake_Reassembly7messageEv:
  849|     66|std::pair<Handshake_Type, std::vector<uint8_t>> Datagram_Handshake_IO::Handshake_Reassembly::message() const {
  850|     66|   if(!complete()) {
  ------------------
  |  Branch (850:7): [True: 0, False: 66]
  ------------------
  851|      0|      throw Internal_Error("Datagram_Handshake_IO - message not complete");
  852|      0|   }
  853|       |
  854|     66|   return std::make_pair(m_msg_type, m_message);
  855|     66|}
_ZNK5Botan3TLS21Datagram_Handshake_IO15format_fragmentEPKhmjjNS0_14Handshake_TypeEt:
  862|     16|                                                            uint16_t msg_sequence) const {
  863|     16|   std::vector<uint8_t> send_buf(12 + frag_len);
  864|       |
  865|     16|   send_buf[0] = static_cast<uint8_t>(type);
  866|       |
  867|     16|   store_be24(&send_buf[1], msg_len);
  868|       |
  869|     16|   store_be(msg_sequence, &send_buf[4]);
  870|       |
  871|     16|   store_be24(&send_buf[6], frag_offset);
  872|     16|   store_be24(&send_buf[9], frag_len);
  873|       |
  874|     16|   if(frag_len > 0) {
  ------------------
  |  Branch (874:7): [True: 1, False: 15]
  ------------------
  875|      1|      copy_mem(&send_buf[12], fragment, frag_len);
  876|      1|   }
  877|       |
  878|     16|   return send_buf;
  879|     16|}
_ZNK5Botan3TLS21Datagram_Handshake_IO12format_w_seqERKNSt3__16vectorIhNS2_9allocatorIhEEEENS0_14Handshake_TypeEt:
  883|     16|                                                         uint16_t msg_sequence) const {
  884|     16|   return format_fragment(msg.data(), msg.size(), 0, static_cast<uint32_t>(msg.size()), type, msg_sequence);
  885|     16|}
_ZNK5Botan3TLS21Datagram_Handshake_IO6formatERKNSt3__16vectorIhNS2_9allocatorIhEEEENS0_14Handshake_TypeE:
  887|     16|std::vector<uint8_t> Datagram_Handshake_IO::format(const std::vector<uint8_t>& msg, Handshake_Type type) const {
  888|       |   // Formats the message just delivered, so the guard is that one exists, not
  889|       |   // that the counter is non-zero. Those differ once m_in_message_seq wraps,
  890|       |   // where the subtraction wraps to 65535 of its own accord, which is the
  891|       |   // right sequence number for that message.
  892|     16|   BOTAN_ASSERT_NOMSG(m_first_delivered_epoch.has_value());
  ------------------
  |  |   84|     16|   do {                                                                     \
  |  |   85|     16|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     16|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 16]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     16|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 16]
  |  |  ------------------
  ------------------
  893|     16|   return format_w_seq(msg, type, static_cast<uint16_t>(m_in_message_seq - 1));
  894|     16|}
tls_handshake_io.cpp:_ZN5Botan3TLS12_GLOBAL__N_138verify_is_expected_wire_handshake_typeENS0_14Handshake_TypeE:
   34|  8.58k|void verify_is_expected_wire_handshake_type(Handshake_Type type) {
   35|  8.58k|   switch(type) {
   36|      0|      case Handshake_Type::HelloRetryRequest:
  ------------------
  |  Branch (36:7): [True: 0, False: 8.58k]
  ------------------
   37|      2|      case Handshake_Type::HandshakeCCS:
  ------------------
  |  Branch (37:7): [True: 2, False: 8.58k]
  ------------------
   38|     10|      case Handshake_Type::None:
  ------------------
  |  Branch (38:7): [True: 8, False: 8.57k]
  ------------------
   39|     10|         throw TLS_Exception(Alert::UnexpectedMessage, "Invalid handshake message type");
   40|  8.57k|      default:
  ------------------
  |  Branch (40:7): [True: 8.57k, False: 10]
  ------------------
   41|  8.57k|         break;
   42|  8.58k|   }
   43|  8.58k|}
tls_handshake_io.cpp:_ZN5Botan3TLS12_GLOBAL__N_110store_be24EPhm:
   45|  13.9k|void store_be24(uint8_t out[3], size_t val) {
   46|  13.9k|   out[0] = get_byte<1>(static_cast<uint32_t>(val));
   47|  13.9k|   out[1] = get_byte<2>(static_cast<uint32_t>(val));
   48|  13.9k|   out[2] = get_byte<3>(static_cast<uint32_t>(val));
   49|  13.9k|}
tls_handshake_io.cpp:_ZN5Botan3TLS12_GLOBAL__N_122max_pending_reassemblyEm:
  166|    619|size_t max_pending_reassembly(size_t policy_hs_max) {
  167|       |   /*
  168|       |   * Here we set arbitrary but probably more than sufficient bounds on the *overall*
  169|       |   * allocation that is allowed across the entire handshake.
  170|       |   *
  171|       |   * If the policy set a limit on individual handshake message sizes, accept up to 4
  172|       |   * times that for the whole handshake. This is more than generous considering most
  173|       |   * handshake messages are fixed length or are relatively tightly bounded. The default
  174|       |   * per-handshake message bound is 64 KiB so without application intervention this will
  175|       |   * top out at 256 KiB for a handshake.
  176|       |   *
  177|       |   * If the application explicitly disables the per handshake message bound, still apply
  178|       |   * an arbitrary upper bound of 16 MiB for the handshake.
  179|       |   */
  180|    619|   constexpr size_t overall_cap = 16 * 1024 * 1024;
  181|       |
  182|    619|   if(policy_hs_max == 0 || policy_hs_max >= overall_cap / 4) {
  ------------------
  |  Branch (182:7): [True: 0, False: 619]
  |  Branch (182:29): [True: 0, False: 619]
  ------------------
  183|       |      // If disabled or huge just take our max
  184|      0|      return overall_cap;
  185|    619|   } else {
  186|       |      // Otherwise 4x the per-message max
  187|    619|      return policy_hs_max * 4;
  188|    619|   }
  189|    619|}
tls_handshake_io.cpp:_ZN5Botan3TLS12_GLOBAL__N_19load_be24EPKh:
   29|  6.56k|inline size_t load_be24(const uint8_t q[3]) {
   30|  6.56k|   return make_uint32(0, q[0], q[1], q[2]);
   31|  6.56k|}

_ZN5Botan3TLS15Handshake_StateD2Ev:
   28|  3.83k|Handshake_State::~Handshake_State() = default;
_ZN5Botan3TLS15Handshake_StateC2ENSt3__110unique_ptrINS0_12Handshake_IOENS2_14default_deleteIS4_EEEERNS0_9CallbacksE:
   31|  3.83k|      m_callbacks(cb), m_handshake_io(std::move(io)), m_version(m_handshake_io->initial_record_version()) {}
_ZN5Botan3TLS15Handshake_State12note_messageERKNS0_17Handshake_MessageE:
   33|  13.2k|void Handshake_State::note_message(const Handshake_Message& msg) {
   34|  13.2k|   m_callbacks.tls_inspect_handshake_msg(msg);
   35|  13.2k|}
_ZN5Botan3TLS15Handshake_State12client_helloENSt3__110unique_ptrINS0_15Client_Hello_12ENS2_14default_deleteIS4_EEEE:
   47|  3.21k|void Handshake_State::client_hello(std::unique_ptr<Client_Hello_12> client_hello) {
   48|       |   // Legacy behavior (exception to the rule): Allow client_hello to be nullptr to reset state.
   49|  3.21k|   if(client_hello == nullptr) {
  ------------------
  |  Branch (49:7): [True: 0, False: 3.21k]
  ------------------
   50|      0|      m_client_hello.reset();
   51|      0|      hash().reset();
   52|  3.21k|   } else {
   53|  3.21k|      m_client_hello = std::move(client_hello);
   54|  3.21k|      note_message(*m_client_hello);
   55|  3.21k|   }
   56|  3.21k|}
_ZN5Botan3TLS15Handshake_State12server_helloENSt3__110unique_ptrINS0_15Server_Hello_12ENS2_14default_deleteIS4_EEEE:
   58|  2.81k|void Handshake_State::server_hello(std::unique_ptr<Server_Hello_12> server_hello) {
   59|  2.81k|   BOTAN_ASSERT_NONNULL(server_hello);
  ------------------
  |  |  123|  2.81k|   do {                                                                                   \
  |  |  124|  2.81k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 2.81k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  2.81k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 2.81k]
  |  |  ------------------
  ------------------
   60|  2.81k|   m_server_hello = std::move(server_hello);
   61|  2.81k|   m_ciphersuite = Ciphersuite::by_id(m_server_hello->ciphersuite());
   62|  2.81k|   note_message(*m_server_hello);
   63|  2.81k|}
_ZN5Botan3TLS15Handshake_State12server_certsENSt3__110unique_ptrINS0_14Certificate_12ENS2_14default_deleteIS4_EEEE:
   65|      4|void Handshake_State::server_certs(std::unique_ptr<Certificate_12> server_certs) {
   66|      4|   BOTAN_ASSERT_NONNULL(server_certs);
  ------------------
  |  |  123|      4|   do {                                                                                   \
  |  |  124|      4|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 4]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|      4|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 4]
  |  |  ------------------
  ------------------
   67|      4|   m_server_certs = std::move(server_certs);
   68|      4|   note_message(*m_server_certs);
   69|      4|}
_ZN5Botan3TLS15Handshake_State10server_kexENSt3__110unique_ptrINS0_19Server_Key_ExchangeENS2_14default_deleteIS4_EEEE:
   77|  2.81k|void Handshake_State::server_kex(std::unique_ptr<Server_Key_Exchange> server_kex) {
   78|  2.81k|   BOTAN_ASSERT_NONNULL(server_kex);
  ------------------
  |  |  123|  2.81k|   do {                                                                                   \
  |  |  124|  2.81k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 2.81k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  2.81k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 2.81k]
  |  |  ------------------
  ------------------
   79|  2.81k|   m_server_kex = std::move(server_kex);
   80|  2.81k|   note_message(*m_server_kex);
   81|  2.81k|}
_ZN5Botan3TLS15Handshake_State17server_hello_doneENSt3__110unique_ptrINS0_17Server_Hello_DoneENS2_14default_deleteIS4_EEEE:
   89|  2.81k|void Handshake_State::server_hello_done(std::unique_ptr<Server_Hello_Done> server_hello_done) {
   90|  2.81k|   BOTAN_ASSERT_NONNULL(server_hello_done);
  ------------------
  |  |  123|  2.81k|   do {                                                                                   \
  |  |  124|  2.81k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 2.81k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  2.81k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 2.81k]
  |  |  ------------------
  ------------------
   91|  2.81k|   m_server_hello_done = std::move(server_hello_done);
   92|  2.81k|   note_message(*m_server_hello_done);
   93|  2.81k|}
_ZN5Botan3TLS15Handshake_State10client_kexENSt3__110unique_ptrINS0_19Client_Key_ExchangeENS2_14default_deleteIS4_EEEE:
  101|  1.47k|void Handshake_State::client_kex(std::unique_ptr<Client_Key_Exchange> client_kex) {
  102|  1.47k|   BOTAN_ASSERT_NONNULL(client_kex);
  ------------------
  |  |  123|  1.47k|   do {                                                                                   \
  |  |  124|  1.47k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 1.47k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  1.47k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 1.47k]
  |  |  ------------------
  ------------------
  103|  1.47k|   m_client_kex = std::move(client_kex);
  104|  1.47k|   note_message(*m_client_kex);
  105|  1.47k|}
_ZN5Botan3TLS15Handshake_State15server_finishedENSt3__110unique_ptrINS0_11Finished_12ENS2_14default_deleteIS4_EEEE:
  125|     79|void Handshake_State::server_finished(std::unique_ptr<Finished_12> server_finished) {
  126|     79|   BOTAN_ASSERT_NONNULL(server_finished);
  ------------------
  |  |  123|     79|   do {                                                                                   \
  |  |  124|     79|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 79]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|     79|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 79]
  |  |  ------------------
  ------------------
  127|     79|   m_server_finished = std::move(server_finished);
  128|     79|   note_message(*m_server_finished);
  129|     79|}
_ZN5Botan3TLS15Handshake_State15client_finishedENSt3__110unique_ptrINS0_11Finished_12ENS2_14default_deleteIS4_EEEE:
  131|     79|void Handshake_State::client_finished(std::unique_ptr<Finished_12> client_finished) {
  132|     79|   BOTAN_ASSERT_NONNULL(client_finished);
  ------------------
  |  |  123|     79|   do {                                                                                   \
  |  |  124|     79|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 79]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|     79|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 79]
  |  |  ------------------
  ------------------
  133|     79|   m_client_finished = std::move(client_finished);
  134|     79|   note_message(*m_client_finished);
  135|     79|}
_ZNK5Botan3TLS15Handshake_State11ciphersuiteEv:
  137|  14.3k|const Ciphersuite& Handshake_State::ciphersuite() const {
  138|  14.3k|   if(!m_ciphersuite.has_value()) {
  ------------------
  |  Branch (138:7): [True: 0, False: 14.3k]
  ------------------
  139|      0|      throw Invalid_State("Cipher suite is not set");
  140|      0|   }
  141|  14.3k|   return m_ciphersuite.value();
  142|  14.3k|}
_ZNK5Botan3TLS15Handshake_State12psk_identityEv:
  144|    158|std::optional<std::string> Handshake_State::psk_identity() const {
  145|    158|   if(!m_client_kex) {
  ------------------
  |  Branch (145:7): [True: 0, False: 158]
  ------------------
  146|      0|      return std::nullopt;
  147|      0|   }
  148|    158|   return m_client_kex->psk_identity();
  149|    158|}
_ZN5Botan3TLS15Handshake_State11set_versionERKNS0_16Protocol_VersionE:
  151|  3.17k|void Handshake_State::set_version(const Protocol_Version& version) {
  152|  3.17k|   m_version = version;
  153|  3.17k|}
_ZN5Botan3TLS15Handshake_State20compute_session_keysEv:
  155|  1.47k|void Handshake_State::compute_session_keys() {
  156|  1.47k|   BOTAN_ASSERT_NONNULL(client_kex());
  ------------------
  |  |  123|  1.47k|   do {                                                                                   \
  |  |  124|  1.47k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 1.47k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  1.47k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 1.47k]
  |  |  ------------------
  ------------------
  157|  1.47k|   m_session_keys = Session_Keys(this, client_kex()->pre_master_secret(), false);
  158|  1.47k|}
_ZN5Botan3TLS15Handshake_State21confirm_transition_toENS0_14Handshake_TypeE:
  164|  5.88k|void Handshake_State::confirm_transition_to(Handshake_Type handshake_msg) {
  165|  5.88k|   m_transitions.confirm_transition_to(handshake_msg);
  166|  5.88k|}
_ZN5Botan3TLS15Handshake_State17set_expected_nextENS0_14Handshake_TypeE:
  168|  9.23k|void Handshake_State::set_expected_next(Handshake_Type handshake_msg) {
  169|  9.23k|   m_transitions.set_expected_next(handshake_msg);
  170|  9.23k|}
_ZNK5Botan3TLS15Handshake_State22received_handshake_msgENS0_14Handshake_TypeE:
  172|  2.13k|bool Handshake_State::received_handshake_msg(Handshake_Type handshake_msg) const {
  173|  2.13k|   return m_transitions.received_handshake_msg(handshake_msg);
  174|  2.13k|}
_ZN5Botan3TLS15Handshake_State22get_next_handshake_msgEm:
  176|  13.8k|std::pair<Handshake_Type, std::vector<uint8_t>> Handshake_State::get_next_handshake_msg(size_t max_handshake_msg_size) {
  177|  13.8k|   return m_handshake_io->get_next_record(m_transitions.change_cipher_spec_expected(), max_handshake_msg_size);
  178|  13.8k|}
_ZNK5Botan3TLS15Handshake_State21protocol_specific_prfEv:
  192|  1.63k|std::unique_ptr<KDF> Handshake_State::protocol_specific_prf() const {
  193|  1.63k|   return m_callbacks.tls12_protocol_specific_kdf(ciphersuite().prf_algo());
  194|  1.63k|}

_ZN5Botan3TLS23Connection_Cipher_StateD2Ev:
   33|    456|Connection_Cipher_State::~Connection_Cipher_State() = default;
_ZN5Botan3TLS23Connection_Cipher_StateC2ENS0_16Protocol_VersionENS0_15Connection_SideEbRKNS0_11CiphersuiteERKNS0_12Session_KeysEb:
   40|    456|                                                 bool uses_encrypt_then_mac) {
   41|       |   // NOLINTBEGIN(*-prefer-member-initializer)
   42|    456|   m_nonce_format = suite.nonce_format();
   43|    456|   m_nonce_bytes_from_record = suite.nonce_bytes_from_record(version);
   44|    456|   m_nonce_bytes_from_handshake = suite.nonce_bytes_from_handshake();
   45|       |
   46|    456|   const secure_vector<uint8_t>& aead_key = keys.aead_key(side);
   47|    456|   m_nonce = keys.nonce(side);
   48|       |   // NOLINTEND(*-prefer-member-initializer)
   49|       |
   50|    456|   BOTAN_ASSERT_NOMSG(m_nonce.size() == m_nonce_bytes_from_handshake);
  ------------------
  |  |   84|    456|   do {                                                                     \
  |  |   85|    456|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    456|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 456]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    456|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 456]
  |  |  ------------------
  ------------------
   51|       |
   52|    456|   if(nonce_format() == Nonce_Format::CBC_MODE) {
  ------------------
  |  Branch (52:7): [True: 207, False: 249]
  ------------------
   53|    207|#if defined(BOTAN_HAS_TLS_CBC)
   54|       |      // legacy CBC+HMAC mode
   55|    207|      auto mac = MessageAuthenticationCode::create_or_throw(fmt("HMAC({})", suite.mac_algo()));
   56|    207|      auto cipher = BlockCipher::create_or_throw(suite.cipher_algo());
   57|       |
   58|    207|      if(our_side) {
  ------------------
  |  Branch (58:10): [True: 50, False: 157]
  ------------------
   59|     50|         m_aead = std::make_unique<TLS_CBC_HMAC_AEAD_Encryption>(std::move(cipher),
   60|     50|                                                                 std::move(mac),
   61|     50|                                                                 suite.cipher_keylen(),
   62|     50|                                                                 suite.mac_keylen(),
   63|     50|                                                                 version,
   64|     50|                                                                 uses_encrypt_then_mac);
   65|    157|      } else {
   66|    157|         m_aead = std::make_unique<TLS_CBC_HMAC_AEAD_Decryption>(std::move(cipher),
   67|    157|                                                                 std::move(mac),
   68|    157|                                                                 suite.cipher_keylen(),
   69|    157|                                                                 suite.mac_keylen(),
   70|    157|                                                                 version,
   71|    157|                                                                 uses_encrypt_then_mac);
   72|    157|      }
   73|       |
   74|       |#else
   75|       |      BOTAN_UNUSED(uses_encrypt_then_mac);
   76|       |      throw Internal_Error("Negotiated disabled TLS CBC+HMAC ciphersuite");
   77|       |#endif
   78|    249|   } else if(nonce_format() == Nonce_Format::NULL_CIPHER) {
  ------------------
  |  Branch (78:14): [True: 0, False: 249]
  ------------------
   79|       |#if defined(BOTAN_HAS_TLS_NULL)
   80|       |      auto mac = MessageAuthenticationCode::create_or_throw(fmt("HMAC({})", suite.mac_algo()));
   81|       |
   82|       |      if(our_side) {
   83|       |         m_aead = std::make_unique<TLS_NULL_HMAC_AEAD_Encryption>(std::move(mac), suite.mac_keylen());
   84|       |      } else {
   85|       |         m_aead = std::make_unique<TLS_NULL_HMAC_AEAD_Decryption>(std::move(mac), suite.mac_keylen());
   86|       |      }
   87|       |#else
   88|      0|      throw Internal_Error("Negotiated disabled TLS NULL ciphersuite");
   89|      0|#endif
   90|    249|   } else {
   91|    249|      m_aead =
   92|    249|         AEAD_Mode::create_or_throw(suite.cipher_algo(), our_side ? Cipher_Dir::Encryption : Cipher_Dir::Decryption);
  ------------------
  |  Branch (92:58): [True: 29, False: 220]
  ------------------
   93|    249|   }
   94|       |
   95|    456|   m_aead->set_key(aead_key);
   96|    456|}
_ZN5Botan3TLS23Connection_Cipher_State10aead_nonceEmRNS_21RandomNumberGeneratorE:
   98|    135|std::vector<uint8_t> Connection_Cipher_State::aead_nonce(uint64_t seq, RandomNumberGenerator& rng) {
   99|    135|   switch(m_nonce_format) {
  ------------------
  |  Branch (99:11): [True: 135, False: 0]
  ------------------
  100|      0|      case Nonce_Format::NULL_CIPHER: {
  ------------------
  |  Branch (100:7): [True: 0, False: 135]
  ------------------
  101|      0|         return std::vector<uint8_t>{};
  102|      0|      }
  103|     85|      case Nonce_Format::CBC_MODE: {
  ------------------
  |  Branch (103:7): [True: 85, False: 50]
  ------------------
  104|     85|         std::vector<uint8_t> nonce(nonce_bytes_from_record());
  105|     85|         rng.randomize(nonce.data(), nonce.size());
  106|     85|         return nonce;
  107|      0|      }
  108|     17|      case Nonce_Format::AEAD_XOR_12: {
  ------------------
  |  Branch (108:7): [True: 17, False: 118]
  ------------------
  109|     17|         BOTAN_ASSERT_NOMSG(m_nonce.size() == 12);
  ------------------
  |  |   84|     17|   do {                                                                     \
  |  |   85|     17|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     17|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 17]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     17|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 17]
  |  |  ------------------
  ------------------
  110|     17|         std::vector<uint8_t> nonce(12);
  111|     17|         store_be(seq, nonce.data() + 4);
  112|     17|         xor_buf(nonce, m_nonce.data(), m_nonce.size());
  113|     17|         return nonce;
  114|      0|      }
  115|     33|      case Nonce_Format::AEAD_IMPLICIT_4: {
  ------------------
  |  Branch (115:7): [True: 33, False: 102]
  ------------------
  116|     33|         BOTAN_ASSERT_NOMSG(m_nonce.size() == 4);
  ------------------
  |  |   84|     33|   do {                                                                     \
  |  |   85|     33|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     33|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 33]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     33|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 33]
  |  |  ------------------
  ------------------
  117|     33|         std::vector<uint8_t> nonce(12);
  118|     33|         copy_mem(&nonce[0], m_nonce.data(), 4);  // NOLINT(*container-data-pointer)
  119|     33|         store_be(seq, &nonce[nonce_bytes_from_handshake()]);
  120|     33|         return nonce;
  121|      0|      }
  122|    135|   }
  123|       |
  124|      0|   throw Invalid_State("Unknown nonce format specified");
  125|    135|}
_ZN5Botan3TLS23Connection_Cipher_State10aead_nonceEPKhmm:
  127|    314|std::vector<uint8_t> Connection_Cipher_State::aead_nonce(const uint8_t record[], size_t record_len, uint64_t seq) {
  128|    314|   switch(m_nonce_format) {
  ------------------
  |  Branch (128:11): [True: 314, False: 0]
  ------------------
  129|      0|      case Nonce_Format::NULL_CIPHER: {
  ------------------
  |  Branch (129:7): [True: 0, False: 314]
  ------------------
  130|      0|         return std::vector<uint8_t>{};
  131|      0|      }
  132|    130|      case Nonce_Format::CBC_MODE: {
  ------------------
  |  Branch (132:7): [True: 130, False: 184]
  ------------------
  133|    130|         if(record_len < nonce_bytes_from_record()) {
  ------------------
  |  Branch (133:13): [True: 1, False: 129]
  ------------------
  134|      1|            throw Decoding_Error("Invalid CBC packet too short to be valid");
  135|      1|         }
  136|    129|         std::vector<uint8_t> nonce(record, record + nonce_bytes_from_record());
  137|    129|         return nonce;
  138|    130|      }
  139|     56|      case Nonce_Format::AEAD_XOR_12: {
  ------------------
  |  Branch (139:7): [True: 56, False: 258]
  ------------------
  140|     56|         BOTAN_ASSERT_NOMSG(m_nonce.size() == 12);
  ------------------
  |  |   84|     56|   do {                                                                     \
  |  |   85|     56|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     56|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 56]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     56|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 56]
  |  |  ------------------
  ------------------
  141|     56|         std::vector<uint8_t> nonce(12);
  142|     56|         store_be(seq, nonce.data() + 4);
  143|     56|         xor_buf(nonce, m_nonce.data(), m_nonce.size());
  144|     56|         return nonce;
  145|    130|      }
  146|    128|      case Nonce_Format::AEAD_IMPLICIT_4: {
  ------------------
  |  Branch (146:7): [True: 128, False: 186]
  ------------------
  147|    128|         BOTAN_ASSERT_NOMSG(m_nonce.size() == 4);
  ------------------
  |  |   84|    128|   do {                                                                     \
  |  |   85|    128|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    128|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 128]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    128|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 128]
  |  |  ------------------
  ------------------
  148|    128|         if(record_len < nonce_bytes_from_record()) {
  ------------------
  |  Branch (148:13): [True: 3, False: 125]
  ------------------
  149|      3|            throw Decoding_Error("Invalid AEAD packet too short to be valid");
  150|      3|         }
  151|    125|         std::vector<uint8_t> nonce(12);
  152|    125|         copy_mem(&nonce[0], m_nonce.data(), 4);  // NOLINT(*container-data-pointer)
  153|    125|         copy_mem(&nonce[nonce_bytes_from_handshake()], record, nonce_bytes_from_record());
  154|    125|         return nonce;
  155|    128|      }
  156|    314|   }
  157|       |
  158|      0|   throw Invalid_State("Unknown nonce format specified");
  159|    314|}
_ZN5Botan3TLS23Connection_Cipher_State9format_adEmNS0_11Record_TypeENS0_16Protocol_VersionEt:
  164|    437|                                                        uint16_t msg_length) {
  165|    437|   std::vector<uint8_t> ad(13);
  166|       |
  167|    437|   store_be(msg_sequence, &ad[0]);  // NOLINT(*container-data-pointer)
  168|    437|   ad[8] = static_cast<uint8_t>(msg_type);
  169|    437|   ad[9] = version.major_version();
  170|    437|   ad[10] = version.minor_version();
  171|    437|   ad[11] = get_byte<0>(msg_length);
  172|    437|   ad[12] = get_byte<1>(msg_length);
  173|       |
  174|    437|   return ad;
  175|    437|}
_ZN5Botan3TLS24write_unencrypted_recordERNSt3__16vectorIhNS_16secure_allocatorIhEEEENS0_11Record_TypeENS0_16Protocol_VersionEmPKhm:
  210|  10.4k|                              size_t message_len) {
  211|  10.4k|   if(record_type == Record_Type::ApplicationData) {
  ------------------
  |  Branch (211:7): [True: 0, False: 10.4k]
  ------------------
  212|      0|      throw Internal_Error("Writing an unencrypted TLS application data record");
  213|      0|   }
  214|  10.4k|   write_record_header(output, record_type, version, record_sequence);
  215|  10.4k|   append_u16_len(output, message_len);
  216|  10.4k|   output.insert(output.end(), message, message + message_len);
  217|  10.4k|}
_ZN5Botan3TLS12write_recordERNSt3__16vectorIhNS_16secure_allocatorIhEEEENS0_11Record_TypeENS0_16Protocol_VersionEmPKhmRNS0_23Connection_Cipher_StateERNS_21RandomNumberGeneratorE:
  226|    135|                  RandomNumberGenerator& rng) {
  227|    135|   write_record_header(output, record_type, version, record_sequence);
  228|       |
  229|    135|   AEAD_Mode& aead = cs.aead();
  230|    135|   std::vector<uint8_t> aad = cs.format_ad(record_sequence, record_type, version, static_cast<uint16_t>(message_len));
  231|       |
  232|    135|   const size_t ctext_size = aead.output_length(message_len);
  233|       |
  234|    135|   const size_t rec_size = ctext_size + cs.nonce_bytes_from_record();
  235|       |
  236|    135|   aead.set_associated_data(aad);
  237|       |
  238|    135|   const std::vector<uint8_t> nonce = cs.aead_nonce(record_sequence, rng);
  239|       |
  240|    135|   append_u16_len(output, rec_size);
  241|       |
  242|    135|   if(cs.nonce_bytes_from_record() > 0) {
  ------------------
  |  Branch (242:7): [True: 118, False: 17]
  ------------------
  243|    118|      if(cs.nonce_format() == Nonce_Format::CBC_MODE) {
  ------------------
  |  Branch (243:10): [True: 85, False: 33]
  ------------------
  244|     85|         output += nonce;
  245|     85|      } else {
  246|     33|         output += std::make_pair(&nonce[cs.nonce_bytes_from_handshake()], cs.nonce_bytes_from_record());
  247|     33|      }
  248|    118|   }
  249|       |
  250|    135|   const size_t header_size = output.size();
  251|    135|   output += std::make_pair(message, message_len);
  252|       |
  253|    135|   aead.start(nonce);
  254|    135|   aead.finish(output, header_size);
  255|       |
  256|    135|   BOTAN_ASSERT(output.size() < MAX_CIPHERTEXT_SIZE, "Produced ciphertext larger than protocol allows");
  ------------------
  |  |   71|    135|   do {                                                                                 \
  |  |   72|    135|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|    135|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 135]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|    135|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 135]
  |  |  ------------------
  ------------------
  257|    135|}
_ZN5Botan3TLS11read_recordEbRNSt3__16vectorIhNS_16secure_allocatorIhEEEEPKhmRmS6_PNS0_27Connection_Sequence_NumbersERKNS1_8functionIFNS1_10shared_ptrINS0_23Connection_Cipher_StateEEEtEEEb:
  518|  11.1k|                          bool allow_epoch0_restart) {
  519|  11.1k|   if(is_datagram) {
  ------------------
  |  Branch (519:7): [True: 3.91k, False: 7.21k]
  ------------------
  520|  3.91k|      return read_dtls_record(
  521|  3.91k|         readbuf, input, input_len, consumed, recbuf, sequence_numbers, get_cipherstate, allow_epoch0_restart);
  522|  7.21k|   } else {
  523|  7.21k|      return read_tls_record(readbuf, input, input_len, consumed, recbuf, sequence_numbers, get_cipherstate);
  524|  7.21k|   }
  525|  11.1k|}
tls_record.cpp:_ZN5Botan3TLS12_GLOBAL__N_119write_record_headerERNSt3__16vectorIhNS_16secure_allocatorIhEEEENS0_11Record_TypeENS0_16Protocol_VersionEm:
  189|  10.5k|                         uint64_t record_sequence) {
  190|  10.5k|   output.clear();
  191|       |
  192|  10.5k|   output.push_back(static_cast<uint8_t>(record_type));
  193|  10.5k|   output.push_back(version.major_version());
  194|  10.5k|   output.push_back(version.minor_version());
  195|       |
  196|  10.5k|   if(version.is_datagram_protocol()) {
  ------------------
  |  Branch (196:7): [True: 407, False: 10.1k]
  ------------------
  197|  3.66k|      for(size_t i = 0; i != 8; ++i) {
  ------------------
  |  Branch (197:25): [True: 3.25k, False: 407]
  ------------------
  198|  3.25k|         output.push_back(get_byte_var(i, record_sequence));
  199|  3.25k|      }
  200|    407|   }
  201|  10.5k|}
tls_record.cpp:_ZN5Botan3TLS12_GLOBAL__N_114append_u16_lenERNSt3__16vectorIhNS_16secure_allocatorIhEEEEm:
  179|  10.5k|inline void append_u16_len(secure_vector<uint8_t>& output, size_t len_field) {
  180|  10.5k|   const uint16_t len16 = static_cast<uint16_t>(len_field);
  181|  10.5k|   BOTAN_ASSERT_EQUAL(len_field, len16, "No truncation");
  ------------------
  |  |   97|  10.5k|   do {                                                                                                \
  |  |   98|  10.5k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                                    \
  |  |   99|  10.5k|      if((expr1) != (expr2)) {                                                                         \
  |  |  ------------------
  |  |  |  Branch (99:10): [True: 0, False: 10.5k]
  |  |  ------------------
  |  |  100|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                           \
  |  |  101|      0|         Botan::assertion_failure(#expr1 " == " #expr2, assertion_made, __func__, __FILE__, __LINE__); \
  |  |  102|      0|      }                                                                                                \
  |  |  103|  10.5k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (103:12): [Folded, False: 10.5k]
  |  |  ------------------
  ------------------
  182|  10.5k|   output.push_back(get_byte<0>(len16));
  183|  10.5k|   output.push_back(get_byte<1>(len16));
  184|  10.5k|}
tls_record.cpp:_ZN5Botan3TLS12_GLOBAL__N_116read_dtls_recordERNSt3__16vectorIhNS_16secure_allocatorIhEEEEPKhmRmS7_PNS0_27Connection_Sequence_NumbersERKNS2_8functionIFNS2_10shared_ptrINS0_23Connection_Cipher_StateEEEtEEEb:
  432|  3.91k|                               bool allow_epoch0_restart) {
  433|  3.91k|   if(readbuf.size() < DTLS_HEADER_SIZE) {
  ------------------
  |  Branch (433:7): [True: 3.91k, False: 0]
  ------------------
  434|       |      // header incomplete
  435|  3.91k|      if(fill_buffer_to(readbuf, input, input_len, consumed, DTLS_HEADER_SIZE) != 0) {
  ------------------
  |  Branch (435:10): [True: 59, False: 3.86k]
  ------------------
  436|     59|         readbuf.clear();
  437|     59|         return Record_Header(0);
  438|     59|      }
  439|       |
  440|  3.86k|      BOTAN_ASSERT_EQUAL(readbuf.size(), DTLS_HEADER_SIZE, "Have an entire header");
  ------------------
  |  |   97|  3.86k|   do {                                                                                                \
  |  |   98|  3.86k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                                    \
  |  |   99|  3.86k|      if((expr1) != (expr2)) {                                                                         \
  |  |  ------------------
  |  |  |  Branch (99:10): [True: 0, False: 3.86k]
  |  |  ------------------
  |  |  100|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                           \
  |  |  101|      0|         Botan::assertion_failure(#expr1 " == " #expr2, assertion_made, __func__, __FILE__, __LINE__); \
  |  |  102|      0|      }                                                                                                \
  |  |  103|  3.86k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (103:12): [Folded, False: 3.86k]
  |  |  ------------------
  ------------------
  441|  3.86k|   }
  442|       |
  443|  3.86k|   const Protocol_Version version(readbuf[1], readbuf[2]);
  444|       |
  445|  3.86k|   if(version.is_datagram_protocol() == false) {
  ------------------
  |  Branch (445:7): [True: 24, False: 3.83k]
  ------------------
  446|     24|      readbuf.clear();
  447|     24|      return Record_Header(0);
  448|     24|   }
  449|       |
  450|  3.83k|   const size_t record_size = make_uint16(readbuf[DTLS_HEADER_SIZE - 2], readbuf[DTLS_HEADER_SIZE - 1]);
  451|       |
  452|  3.83k|   if(record_size > MAX_CIPHERTEXT_SIZE) {
  ------------------
  |  Branch (452:7): [True: 7, False: 3.82k]
  ------------------
  453|       |      // Too large to be valid, ignore it
  454|      7|      readbuf.clear();
  455|      7|      return Record_Header(0);
  456|      7|   }
  457|       |
  458|  3.82k|   if(fill_buffer_to(readbuf, input, input_len, consumed, DTLS_HEADER_SIZE + record_size) != 0) {
  ------------------
  |  Branch (458:7): [True: 39, False: 3.79k]
  ------------------
  459|       |      // Truncated packet?
  460|     39|      readbuf.clear();
  461|     39|      return Record_Header(0);
  462|     39|   }
  463|       |
  464|  3.79k|   BOTAN_ASSERT_EQUAL(static_cast<size_t>(DTLS_HEADER_SIZE) + record_size, readbuf.size(), "Have the full record");
  ------------------
  |  |   97|  3.79k|   do {                                                                                                \
  |  |   98|  3.79k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                                    \
  |  |   99|  3.79k|      if((expr1) != (expr2)) {                                                                         \
  |  |  ------------------
  |  |  |  Branch (99:10): [True: 0, False: 3.79k]
  |  |  ------------------
  |  |  100|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                           \
  |  |  101|      0|         Botan::assertion_failure(#expr1 " == " #expr2, assertion_made, __func__, __FILE__, __LINE__); \
  |  |  102|      0|      }                                                                                                \
  |  |  103|  3.79k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (103:12): [Folded, False: 3.79k]
  |  |  ------------------
  ------------------
  465|       |
  466|  3.79k|   const Record_Type type = static_cast<Record_Type>(readbuf[0]);
  467|       |
  468|  3.79k|   const uint64_t sequence = load_be<uint64_t>(&readbuf[3], 0);
  469|  3.79k|   const uint16_t epoch = (sequence >> 48);
  470|       |
  471|  3.79k|   const bool already_seen = sequence_numbers != nullptr && sequence_numbers->already_seen(sequence);
  ------------------
  |  Branch (471:30): [True: 2.75k, False: 1.03k]
  |  Branch (471:61): [True: 0, False: 2.75k]
  ------------------
  472|       |
  473|  3.79k|   if(already_seen && !(epoch == 0 && allow_epoch0_restart)) {
  ------------------
  |  Branch (473:7): [True: 0, False: 3.79k]
  |  Branch (473:25): [True: 0, False: 0]
  |  Branch (473:39): [True: 0, False: 0]
  ------------------
  474|      0|      readbuf.clear();
  475|      0|      return Record_Header(0);
  476|      0|   }
  477|       |
  478|  3.79k|   if(epoch == 0) {
  ------------------
  |  Branch (478:7): [True: 3.74k, False: 44]
  ------------------
  479|       |      // Unencrypted initial handshake. Epoch-0 records are unauthenticated and
  480|       |      // deliberately do not advance the replay window: one spoofed record with a
  481|       |      // high sequence number would otherwise silently drop every later record
  482|       |      // from the real peer. Duplicates are filtered by handshake reassembly.
  483|  3.74k|      recbuf.assign(readbuf.begin() + DTLS_HEADER_SIZE, readbuf.begin() + DTLS_HEADER_SIZE + record_size);
  484|  3.74k|      readbuf.clear();
  485|  3.74k|      return Record_Header(sequence, version, type);
  486|  3.74k|   }
  487|       |
  488|     44|   try {
  489|       |      // Otherwise, decrypt, check MAC, return plaintext
  490|     44|      auto cs = get_cipherstate(epoch);
  491|       |
  492|     44|      BOTAN_ASSERT(cs, "Have cipherstate for this epoch");
  ------------------
  |  |   71|     44|   do {                                                                                 \
  |  |   72|     44|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|     44|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 44]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|     44|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 44]
  |  |  ------------------
  ------------------
  493|       |
  494|     44|      decrypt_record(recbuf, &readbuf[DTLS_HEADER_SIZE], record_size, sequence, version, type, *cs);
  495|     44|   } catch(std::exception&) {
  496|     44|      readbuf.clear();
  497|     44|      return Record_Header(0);
  498|     44|   }
  499|       |
  500|      0|   if(sequence_numbers != nullptr) {
  ------------------
  |  Branch (500:7): [True: 0, False: 0]
  ------------------
  501|      0|      sequence_numbers->read_accept(sequence);
  502|      0|   }
  503|       |
  504|      0|   readbuf.clear();
  505|      0|   return Record_Header(sequence, version, type);
  506|     44|}
tls_record.cpp:_ZN5Botan3TLS12_GLOBAL__N_114fill_buffer_toERNSt3__16vectorIhNS_16secure_allocatorIhEEEERPKhRmSB_m:
  262|  21.8k|   secure_vector<uint8_t>& readbuf, const uint8_t*& input, size_t& input_size, size_t& input_consumed, size_t desired) {
  263|  21.8k|   if(readbuf.size() >= desired) {
  ------------------
  |  Branch (263:7): [True: 850, False: 21.0k]
  ------------------
  264|    850|      return 0;  // already have it
  265|    850|   }
  266|       |
  267|  21.0k|   const size_t taken = std::min(input_size, desired - readbuf.size());
  268|       |
  269|  21.0k|   readbuf.insert(readbuf.end(), input, input + taken);
  270|  21.0k|   input_consumed += taken;
  271|  21.0k|   input_size -= taken;
  272|  21.0k|   input += taken;
  273|       |
  274|  21.0k|   return (desired - readbuf.size());  // how many bytes do we still need?
  275|  21.8k|}
tls_record.cpp:_ZN5Botan3TLS12_GLOBAL__N_114decrypt_recordERNSt3__16vectorIhNS_16secure_allocatorIhEEEEPhmmNS0_16Protocol_VersionENS0_11Record_TypeERNS0_23Connection_Cipher_StateE:
  283|    314|                    Connection_Cipher_State& cs) {
  284|    314|   AEAD_Mode& aead = cs.aead();
  285|       |
  286|    314|   const std::vector<uint8_t> nonce = cs.aead_nonce(record_contents, record_len, record_sequence);
  287|    314|   const size_t nonce_from_record = cs.nonce_bytes_from_record();
  288|    314|   if(record_len <= nonce_from_record) {
  ------------------
  |  Branch (288:7): [True: 2, False: 312]
  ------------------
  289|      2|      throw TLS_Exception(Alert::BadRecordMac, "AEAD packet too short to be valid");
  290|      2|   }
  291|    312|   const uint8_t* msg = &record_contents[nonce_from_record];
  292|    312|   const size_t msg_length = record_len - nonce_from_record;
  293|       |
  294|       |   /*
  295|       |   * This early rejection is based just on public information (length of the
  296|       |   * encrypted packet) and so does not leak any information. We used to use
  297|       |   * decode_error here which really is more appropriate, but that confuses some
  298|       |   * tools which are attempting automated detection of padding oracles,
  299|       |   * including older versions of TLS-Attacker.
  300|       |   */
  301|    312|   if(msg_length < aead.minimum_final_size()) {
  ------------------
  |  Branch (301:7): [True: 6, False: 306]
  ------------------
  302|      6|      throw TLS_Exception(Alert::BadRecordMac, "AEAD packet is shorter than the tag");
  303|      6|   }
  304|       |
  305|    306|   const size_t ptext_size = aead.output_length(msg_length);
  306|       |
  307|    306|   aead.set_associated_data(
  308|    306|      cs.format_ad(record_sequence, record_type, record_version, static_cast<uint16_t>(ptext_size)));
  309|       |
  310|    306|   aead.start(nonce);
  311|       |
  312|    306|   output.assign(msg, msg + msg_length);
  313|    306|   aead.finish(output, 0);
  314|    306|}
tls_record.cpp:_ZN5Botan3TLS12_GLOBAL__N_115read_tls_recordERNSt3__16vectorIhNS_16secure_allocatorIhEEEEPKhmRmS7_PNS0_27Connection_Sequence_NumbersERKNS2_8functionIFNS2_10shared_ptrINS0_23Connection_Cipher_StateEEEtEEE:
  322|  7.21k|                              const get_cipherstate_fn& get_cipherstate) {
  323|  7.21k|   if(readbuf.size() < TLS_HEADER_SIZE) {
  ------------------
  |  Branch (323:7): [True: 7.21k, False: 0]
  ------------------
  324|       |      // header incomplete
  325|  7.21k|      if(const size_t needed = fill_buffer_to(readbuf, input, input_len, consumed, TLS_HEADER_SIZE)) {
  ------------------
  |  Branch (325:23): [True: 298, False: 6.92k]
  ------------------
  326|    298|         return Record_Header(needed);
  327|    298|      }
  328|       |
  329|  6.92k|      BOTAN_ASSERT_EQUAL(readbuf.size(), TLS_HEADER_SIZE, "Have an entire header");
  ------------------
  |  |   97|  6.92k|   do {                                                                                                \
  |  |   98|  6.92k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                                    \
  |  |   99|  6.92k|      if((expr1) != (expr2)) {                                                                         \
  |  |  ------------------
  |  |  |  Branch (99:10): [True: 0, False: 6.92k]
  |  |  ------------------
  |  |  100|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                           \
  |  |  101|      0|         Botan::assertion_failure(#expr1 " == " #expr2, assertion_made, __func__, __FILE__, __LINE__); \
  |  |  102|      0|      }                                                                                                \
  |  |  103|  6.92k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (103:12): [Folded, False: 6.92k]
  |  |  ------------------
  ------------------
  330|  6.92k|   }
  331|       |
  332|       |   /*
  333|       |   Verify that the record type and record version are within some expected
  334|       |   range, so we can quickly reject totally invalid packets.
  335|       |
  336|       |   Unfortunately we cannot be more strict about the record number than just
  337|       |   checking the major version, at least at this level, due to this requirement
  338|       |   in RFC 7568
  339|       |
  340|       |      TLS servers MUST accept any value {03,XX} (including {03,00}) as
  341|       |      the record layer version number for ClientHello
  342|       |   */
  343|  6.92k|   const bool bad_record_type = readbuf[0] < 20 || readbuf[0] > 23;
  ------------------
  |  Branch (343:33): [True: 0, False: 6.92k]
  |  Branch (343:52): [True: 0, False: 6.92k]
  ------------------
  344|  6.92k|   const bool bad_record_version = readbuf[1] != 3;
  345|       |
  346|  6.92k|   if(bad_record_type || bad_record_version) {
  ------------------
  |  Branch (346:7): [True: 0, False: 6.92k]
  |  Branch (346:26): [True: 0, False: 6.92k]
  ------------------
  347|       |      // We know we read up to at least the 5 byte TLS header
  348|      0|      const std::string first5 = std::string(reinterpret_cast<const char*>(readbuf.data()), 5);
  349|       |
  350|      0|      if(first5 == "GET /" || first5 == "PUT /" || first5 == "POST " || first5 == "HEAD ") {
  ------------------
  |  Branch (350:10): [True: 0, False: 0]
  |  Branch (350:31): [True: 0, False: 0]
  |  Branch (350:52): [True: 0, False: 0]
  |  Branch (350:73): [True: 0, False: 0]
  ------------------
  351|      0|         throw TLS_Exception(Alert::ProtocolVersion, "Client sent plaintext HTTP request instead of TLS handshake");
  352|      0|      }
  353|       |
  354|      0|      if(first5 == "CONNE") {
  ------------------
  |  Branch (354:10): [True: 0, False: 0]
  ------------------
  355|      0|         throw TLS_Exception(Alert::ProtocolVersion,
  356|      0|                             "Client sent plaintext HTTP proxy CONNECT request instead of TLS handshake");
  357|      0|      }
  358|       |
  359|      0|      if(bad_record_type) {
  ------------------
  |  Branch (359:10): [True: 0, False: 0]
  ------------------
  360|       |         // RFC 5246 Section 6.
  361|       |         //   If a TLS implementation receives an unexpected record type, it MUST
  362|       |         //   send an unexpected_message alert.
  363|      0|         throw TLS_Exception(Alert::UnexpectedMessage, "TLS record type had unexpected value");
  364|      0|      }
  365|      0|      throw TLS_Exception(Alert::ProtocolVersion, "TLS record version had unexpected value");
  366|      0|   }
  367|       |
  368|  6.92k|   const Protocol_Version version(readbuf[1], readbuf[2]);
  369|       |
  370|  6.92k|   if(version.is_datagram_protocol()) {
  ------------------
  |  Branch (370:7): [True: 0, False: 6.92k]
  ------------------
  371|      0|      throw TLS_Exception(Alert::ProtocolVersion, "Expected TLS but got a record with DTLS version");
  372|      0|   }
  373|       |
  374|  6.92k|   const size_t record_size = make_uint16(readbuf[TLS_HEADER_SIZE - 2], readbuf[TLS_HEADER_SIZE - 1]);
  375|       |
  376|  6.92k|   if(record_size > MAX_CIPHERTEXT_SIZE) {
  ------------------
  |  Branch (376:7): [True: 0, False: 6.92k]
  ------------------
  377|      0|      throw TLS_Exception(Alert::RecordOverflow, "Received a record that exceeds maximum size");
  378|      0|   }
  379|       |
  380|  6.92k|   if(record_size == 0) {
  ------------------
  |  Branch (380:7): [True: 0, False: 6.92k]
  ------------------
  381|      0|      throw TLS_Exception(Alert::DecodeError, "Received a completely empty record");
  382|      0|   }
  383|       |
  384|  6.92k|   if(const size_t needed = fill_buffer_to(readbuf, input, input_len, consumed, TLS_HEADER_SIZE + record_size)) {
  ------------------
  |  Branch (384:20): [True: 126, False: 6.79k]
  ------------------
  385|    126|      return Record_Header(needed);
  386|    126|   }
  387|       |
  388|  6.79k|   BOTAN_ASSERT_EQUAL(static_cast<size_t>(TLS_HEADER_SIZE) + record_size, readbuf.size(), "Have the full record");
  ------------------
  |  |   97|  6.79k|   do {                                                                                                \
  |  |   98|  6.79k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                                    \
  |  |   99|  6.79k|      if((expr1) != (expr2)) {                                                                         \
  |  |  ------------------
  |  |  |  Branch (99:10): [True: 0, False: 6.79k]
  |  |  ------------------
  |  |  100|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                           \
  |  |  101|      0|         Botan::assertion_failure(#expr1 " == " #expr2, assertion_made, __func__, __FILE__, __LINE__); \
  |  |  102|      0|      }                                                                                                \
  |  |  103|  6.79k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (103:12): [Folded, False: 6.79k]
  |  |  ------------------
  ------------------
  389|       |
  390|  6.79k|   const Record_Type type = static_cast<Record_Type>(readbuf[0]);
  391|       |
  392|  6.79k|   uint16_t epoch = 0;
  393|       |
  394|  6.79k|   uint64_t sequence = 0;
  395|  6.79k|   if(sequence_numbers != nullptr) {
  ------------------
  |  Branch (395:7): [True: 3.22k, False: 3.56k]
  ------------------
  396|  3.22k|      sequence = sequence_numbers->next_read_sequence();
  397|  3.22k|      epoch = sequence_numbers->current_read_epoch();
  398|  3.56k|   } else {
  399|       |      // server initial handshake case
  400|  3.56k|      epoch = 0;
  401|  3.56k|   }
  402|       |
  403|  6.79k|   if(epoch == 0) {
  ------------------
  |  Branch (403:7): [True: 6.48k, False: 314]
  ------------------
  404|       |      // Unencrypted initial handshake
  405|  6.48k|      recbuf.assign(readbuf.begin() + TLS_HEADER_SIZE, readbuf.begin() + TLS_HEADER_SIZE + record_size);
  406|  6.48k|      readbuf.clear();
  407|  6.48k|      return Record_Header(sequence, version, type);
  408|  6.48k|   }
  409|       |
  410|       |   // Otherwise, decrypt, check MAC, return plaintext
  411|    314|   auto cs = get_cipherstate(epoch);
  412|       |
  413|    314|   BOTAN_ASSERT(cs, "Have cipherstate for this epoch");
  ------------------
  |  |   71|    314|   do {                                                                                 \
  |  |   72|    314|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|    314|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 314]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|    314|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 314]
  |  |  ------------------
  ------------------
  414|       |
  415|    314|   decrypt_record(recbuf, &readbuf[TLS_HEADER_SIZE], record_size, sequence, version, type, *cs);
  416|       |
  417|    314|   if(sequence_numbers != nullptr) {
  ------------------
  |  Branch (417:7): [True: 0, False: 314]
  ------------------
  418|      0|      sequence_numbers->read_accept(sequence);
  419|      0|   }
  420|       |
  421|    314|   readbuf.clear();
  422|    314|   return Record_Header(sequence, version, type);
  423|  6.79k|}

_ZN5Botan3TLS14Server_Impl_126createERKNSt3__110shared_ptrINS0_9CallbacksEEERKNS3_INS0_15Session_ManagerEEERKNS3_INS_19Credentials_ManagerEEERKNS3_IKNS0_6PolicyEEERKNS3_INS_21RandomNumberGeneratorEEEbm:
  293|    767|{
  294|    767|   auto self = std::make_shared<Server_Impl_12>(
  295|    767|      Private{}, callbacks, session_manager, creds, policy, rng, is_datagram, reserved_io_buffer_size);
  296|    767|   BOTAN_ASSERT_NONNULL(self->m_creds);
  ------------------
  |  |  123|    767|   do {                                                                                   \
  |  |  124|    767|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 767]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|    767|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 767]
  |  |  ------------------
  ------------------
  297|       |
  298|       |   // Try to load the cookie secret on initialization, rather than waiting to fail
  299|       |   // until the first client connects.
  300|    767|   if(is_datagram && policy->dtls_server_require_cookie_exchange()) {
  ------------------
  |  Branch (300:7): [True: 767, False: 0]
  |  Branch (300:22): [True: 767, False: 0]
  ------------------
  301|    767|      load_dtls_cookie_secret(*self->m_creds);
  302|    767|   }
  303|       |
  304|    767|   return self;
  305|    767|}
_ZN5Botan3TLS14Server_Impl_1219new_handshake_stateENSt3__110unique_ptrINS0_12Handshake_IOENS2_14default_deleteIS4_EEEE:
  307|  3.83k|std::unique_ptr<Handshake_State> Server_Impl_12::new_handshake_state(std::unique_ptr<Handshake_IO> io) {
  308|  3.83k|   auto state = std::make_unique<Server_Handshake_State>(std::move(io), callbacks());
  309|  3.83k|   state->set_expected_next(Handshake_Type::ClientHello);
  310|  3.83k|   return state;
  311|  3.83k|}
_ZN5Botan3TLS14Server_Impl_1224process_client_hello_msgERNS0_22Server_Handshake_StateERKNSt3__16vectorIhNS4_9allocatorIhEEEEb:
  382|  3.22k|                                              bool epoch0_restart) {
  383|  3.22k|   BOTAN_ASSERT_IMPLICATION(epoch0_restart, active_state().has_value(), "Can't restart with a dead connection");
  ------------------
  |  |  110|  3.22k|   do {                                                                                          \
  |  |  111|  3.22k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                              \
  |  |  112|  3.22k|      if((expr1) && !(expr2)) {                                                                  \
  |  |  ------------------
  |  |  |  Branch (112:10): [True: 0, False: 3.22k]
  |  |  |  Branch (112:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  113|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                     \
  |  |  114|      0|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |  115|      0|      }                                                                                          \
  |  |  116|  3.22k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (116:12): [Folded, False: 3.22k]
  |  |  ------------------
  ------------------
  384|       |
  385|  3.22k|   const bool initial_handshake = epoch0_restart || !active_state().has_value();
  ------------------
  |  Branch (385:35): [True: 0, False: 3.22k]
  |  Branch (385:53): [True: 3.22k, False: 0]
  ------------------
  386|       |
  387|  3.22k|   if(initial_handshake == false && policy().allow_client_initiated_renegotiation() == false) {
  ------------------
  |  Branch (387:7): [True: 0, False: 3.22k]
  |  Branch (387:37): [True: 0, False: 0]
  ------------------
  388|      0|      if(policy().abort_connection_on_undesired_renegotiation()) {
  ------------------
  |  Branch (388:10): [True: 0, False: 0]
  ------------------
  389|      0|         throw TLS_Exception(Alert::NoRenegotiation, "Server policy prohibits renegotiation");
  390|      0|      } else {
  391|      0|         send_warning_alert(Alert::NoRenegotiation);
  392|      0|      }
  393|      0|      return;
  394|      0|   }
  395|       |
  396|  3.22k|   if(!policy().allow_insecure_renegotiation() && !(initial_handshake || secure_renegotiation_supported())) {
  ------------------
  |  Branch (396:7): [True: 3.22k, False: 0]
  |  Branch (396:53): [True: 3.22k, False: 0]
  |  Branch (396:74): [True: 0, False: 0]
  ------------------
  397|      0|      send_warning_alert(Alert::NoRenegotiation);
  398|      0|      return;
  399|      0|   }
  400|       |
  401|  3.22k|   if(pending_state.handshake_io().have_more_data()) {
  ------------------
  |  Branch (401:7): [True: 3, False: 3.22k]
  ------------------
  402|      3|      throw TLS_Exception(Alert::UnexpectedMessage, "Have data remaining in buffer after ClientHello");
  403|      3|   }
  404|       |
  405|  3.22k|   pending_state.client_hello(std::make_unique<Client_Hello_12>(contents));
  406|  3.22k|   const Protocol_Version client_offer = pending_state.client_hello()->legacy_version();
  407|  3.22k|   const bool datagram = client_offer.is_datagram_protocol();
  408|       |
  409|  3.22k|   if(datagram) {
  ------------------
  |  Branch (409:7): [True: 49, False: 3.17k]
  ------------------
  410|     49|      if(client_offer.major_version() == 0xFF) {
  ------------------
  |  Branch (410:10): [True: 3, False: 46]
  ------------------
  411|      3|         throw TLS_Exception(Alert::ProtocolVersion, "Client offered DTLS version with major version 0xFF");
  412|      3|      }
  413|  3.17k|   } else {
  414|  3.17k|      if(client_offer.major_version() < 3) {
  ------------------
  |  Branch (414:10): [True: 12, False: 3.16k]
  ------------------
  415|     12|         throw TLS_Exception(Alert::ProtocolVersion, "Client offered TLS version with major version under 3");
  416|     12|      }
  417|  3.16k|      if(client_offer.major_version() == 3 && client_offer.minor_version() == 0) {
  ------------------
  |  Branch (417:10): [True: 22, False: 3.14k]
  |  Branch (417:47): [True: 2, False: 20]
  ------------------
  418|      2|         throw TLS_Exception(Alert::ProtocolVersion, "Client offered SSLv3 which is not supported");
  419|      2|      }
  420|  3.16k|   }
  421|       |
  422|       |   /*
  423|       |   * BoGo test suite expects that we will send the hello verify with a record
  424|       |   * version matching the version that is eventually negotiated. This is wrong
  425|       |   * but harmless, so go with it. Also doing the version negotiation step first
  426|       |   * allows to immediately close the connection with an alert if the client has
  427|       |   * offered a version that we are not going to negotiate anyway, instead of
  428|       |   * making them first do the cookie exchange and then telling them no.
  429|       |   *
  430|       |   * There is no issue with amplification here, since the alert is just 2 bytes.
  431|       |   */
  432|  3.20k|   const Protocol_Version negotiated_version =
  433|  3.20k|      select_version(policy(),
  434|  3.20k|                     client_offer,
  435|  3.20k|                     active_state().has_value() ? active_state()->version() : Protocol_Version(),
  ------------------
  |  Branch (435:22): [True: 0, False: 3.20k]
  ------------------
  436|  3.20k|                     pending_state.client_hello()->supported_versions());
  437|       |
  438|  3.20k|   pending_state.set_version(negotiated_version);
  439|       |
  440|  3.20k|   const auto compression_methods = pending_state.client_hello()->compression_methods();
  441|  3.20k|   if(!value_exists(compression_methods, uint8_t(0))) {
  ------------------
  |  Branch (441:7): [True: 46, False: 3.16k]
  ------------------
  442|     46|      throw TLS_Exception(Alert::IllegalParameter, "Client did not offer NULL compression");
  443|     46|   }
  444|       |
  445|  3.16k|   if(initial_handshake && datagram && policy().dtls_server_require_cookie_exchange()) {
  ------------------
  |  Branch (445:7): [True: 3.12k, False: 36]
  |  Branch (445:28): [True: 22, False: 3.10k]
  |  Branch (445:40): [True: 22, False: 0]
  ------------------
  446|       |      // The cookie secret is read each time to allow for refreshing the key
  447|     22|      const auto cookie_secret = load_dtls_cookie_secret(*m_creds);
  448|       |
  449|     22|      const std::string client_identity = callbacks().tls_peer_network_identity();
  450|     22|      if(client_identity.empty()) {
  ------------------
  |  Branch (450:10): [True: 22, False: 0]
  ------------------
  451|       |         // RFC 9147 Section 11: the cookie MUST depend on the client's address
  452|       |         //
  453|       |         // Without an application-supplied identity the cookie is reusable from
  454|       |         // any source address, defeating the whole point of the cookie exchange.
  455|       |         //
  456|       |         // TODO(Botan4): Remove the version hint about the breaking change.
  457|     22|         throw Invalid_State(
  458|     22|            "Since Botan 3.13 DTLS server requires tls_peer_network_identity() return a non-empty value");
  459|     22|      }
  460|      0|      const Hello_Verify_Request verify(
  461|      0|         pending_state.client_hello()->cookie_input_data(), client_identity, cookie_secret);
  462|       |
  463|      0|      if(!CT::is_equal<uint8_t>(pending_state.client_hello()->cookie(), verify.cookie()).as_bool()) {
  ------------------
  |  Branch (463:10): [True: 0, False: 0]
  ------------------
  464|      0|         if(epoch0_restart) {
  ------------------
  |  Branch (464:13): [True: 0, False: 0]
  ------------------
  465|      0|            pending_state.handshake_io().send_under_epoch(verify, 0);
  466|      0|         } else {
  467|      0|            pending_state.handshake_io().send(verify);
  468|      0|         }
  469|       |
  470|      0|         pending_state.client_hello(nullptr);
  471|      0|         pending_state.set_expected_next(Handshake_Type::ClientHello);
  472|      0|         return;
  473|      0|      }
  474|      0|   }
  475|       |
  476|  3.14k|   if(epoch0_restart) {
  ------------------
  |  Branch (476:7): [True: 0, False: 3.14k]
  ------------------
  477|       |      // If we reached here then we were able to verify the cookie
  478|      0|      reset_active_association_state();
  479|      0|   }
  480|       |
  481|  3.14k|   secure_renegotiation_check(pending_state.client_hello());
  482|       |
  483|       |   // RFC 7627 / RFC 9325 4.4: optionally require Extended Master Secret
  484|  3.14k|   if(policy().require_extended_master_secret() && !pending_state.client_hello()->supports_extended_master_secret()) {
  ------------------
  |  Branch (484:7): [True: 3.10k, False: 38]
  |  Branch (484:52): [True: 64, False: 3.03k]
  ------------------
  485|     64|      throw TLS_Exception(Alert::HandshakeFailure,
  486|     64|                          "Policy requires the Extended Master Secret extension but the client did not send it");
  487|     64|   }
  488|       |
  489|       |   // RFC 7627 5.3 has an explicit MUST regarding EMS mismatch on resumption
  490|       |   //
  491|       |   //    "If the original session used the 'extended_master_secret'
  492|       |   //     extension but the new ClientHello does not contain it, the
  493|       |   //     server MUST abort the abbreviated handshake."
  494|       |   //
  495|       |   // There is apparently no RFC requirement that a client must not drop EMS between the
  496|       |   // initial negotiation and a renegotiation... but there is also no RFC requirement
  497|       |   // that we must accept it. So we don't.
  498|  3.07k|   if(const auto& active = active_state()) {
  ------------------
  |  Branch (498:19): [True: 0, False: 3.07k]
  ------------------
  499|      0|      const bool ems_pending = pending_state.client_hello()->supports_extended_master_secret();
  500|      0|      if(active->supports_extended_master_secret() == true && ems_pending == false) {
  ------------------
  |  Branch (500:10): [True: 0, False: 0]
  |  Branch (500:63): [True: 0, False: 0]
  ------------------
  501|      0|         throw TLS_Exception(Alert::HandshakeFailure,
  502|      0|                             "Renegotiation ClientHello dropped the Extended Master Secret extension");
  503|      0|      }
  504|      0|   }
  505|       |
  506|  3.07k|   callbacks().tls_examine_extensions(
  507|  3.07k|      pending_state.client_hello()->extensions(), Connection_Side::Client, Handshake_Type::ClientHello);
  508|       |
  509|  3.07k|   const auto session_handle = pending_state.client_hello()->session_handle();
  510|       |
  511|  3.07k|   std::optional<Session> session_info;
  512|  3.07k|   if(pending_state.allow_session_resumption() && session_handle.has_value()) {
  ------------------
  |  Branch (512:7): [True: 3.03k, False: 38]
  |  Branch (512:51): [True: 41, False: 2.99k]
  ------------------
  513|     41|      session_info = check_for_resume(
  514|     41|         session_handle.value(), session_manager(), callbacks(), policy(), pending_state.client_hello());
  515|     41|   }
  516|       |
  517|  3.07k|   m_next_protocol = "";
  518|  3.07k|   if(pending_state.client_hello()->supports_alpn()) {
  ------------------
  |  Branch (518:7): [True: 32, False: 3.04k]
  ------------------
  519|     32|      const auto offered = pending_state.client_hello()->next_protocols();
  520|     32|      m_next_protocol = callbacks().tls_server_choose_app_protocol(offered);
  521|       |      // RFC 7301 3.2: if a protocol is selected, the server MUST select one
  522|       |      // of the protocols advertised by the client. An empty return signals
  523|       |      // "no ALPN" and is allowed.
  524|     32|      if(!m_next_protocol.empty() && !value_exists(offered, m_next_protocol)) {
  ------------------
  |  Branch (524:10): [True: 32, False: 0]
  |  Branch (524:38): [True: 2, False: 30]
  ------------------
  525|      2|         throw TLS_Exception(Alert::InternalError, "Application chose an ALPN protocol that the client did not offer");
  526|      2|      }
  527|     32|   }
  528|       |
  529|  3.07k|   if(session_info.has_value()) {
  ------------------
  |  Branch (529:7): [True: 0, False: 3.07k]
  ------------------
  530|      0|      this->session_resume(pending_state, {session_info.value(), session_handle.value()});
  531|  3.07k|   } else {
  532|       |      // new session
  533|  3.07k|      this->session_create(pending_state);
  534|  3.07k|   }
  535|  3.07k|}
_ZN5Botan3TLS14Server_Impl_1231process_client_key_exchange_msgERNS0_22Server_Handshake_StateERKNSt3__16vectorIhNS4_9allocatorIhEEEE:
  550|  2.13k|                                                     const std::vector<uint8_t>& contents) {
  551|  2.13k|   if(pending_state.received_handshake_msg(Handshake_Type::Certificate) && !pending_state.client_certs()->empty()) {
  ------------------
  |  Branch (551:7): [True: 0, False: 2.13k]
  |  Branch (551:76): [True: 0, False: 0]
  ------------------
  552|      0|      pending_state.set_expected_next(Handshake_Type::CertificateVerify);
  553|  2.13k|   } else {
  554|  2.13k|      pending_state.set_expected_next(Handshake_Type::HandshakeCCS);
  555|  2.13k|   }
  556|       |
  557|  2.13k|   pending_state.client_kex(std::make_unique<Client_Key_Exchange>(
  558|  2.13k|      contents, pending_state, pending_state.server_rsa_kex_key(), *m_creds, policy(), rng()));
  559|       |
  560|  2.13k|   pending_state.compute_session_keys();
  561|  2.13k|   if(policy().allow_ssl_key_log_file()) {
  ------------------
  |  Branch (561:7): [True: 0, False: 2.13k]
  ------------------
  562|       |      // draft-thomson-tls-keylogfile-00 Section 3.2
  563|       |      //    An implementation of TLS 1.2 (and also earlier versions) use
  564|       |      //    the label "CLIENT_RANDOM" to identify the "master" secret for
  565|       |      //    the connection.
  566|      0|      callbacks().tls_ssl_key_log_data(
  567|      0|         "CLIENT_RANDOM", pending_state.client_hello()->random(), pending_state.session_keys().master_secret());
  568|      0|   }
  569|  2.13k|}
_ZN5Botan3TLS14Server_Impl_1230process_change_cipher_spec_msgERNS0_22Server_Handshake_StateE:
  571|    377|void Server_Impl_12::process_change_cipher_spec_msg(Server_Handshake_State& pending_state) {
  572|    377|   pending_state.set_expected_next(Handshake_Type::Finished);
  573|    377|   change_cipher_spec_reader(Connection_Side::Server);
  574|    377|}
_ZN5Botan3TLS14Server_Impl_1220process_finished_msgERNS0_22Server_Handshake_StateENS0_14Handshake_TypeERKNSt3__16vectorIhNS5_9allocatorIhEEEE:
  626|     85|                                          const std::vector<uint8_t>& contents) {
  627|     85|   pending_state.set_expected_next(Handshake_Type::None);
  628|       |
  629|     85|   if(pending_state.handshake_io().have_more_data()) {
  ------------------
  |  Branch (629:7): [True: 6, False: 79]
  ------------------
  630|      6|      throw TLS_Exception(Alert::UnexpectedMessage, "Have data remaining in buffer after Finished");
  631|      6|   }
  632|       |
  633|     79|   pending_state.client_finished(std::make_unique<Finished_12>(contents));
  634|       |
  635|     79|   if(!pending_state.client_finished()->verify(pending_state, Connection_Side::Client)) {
  ------------------
  |  Branch (635:7): [True: 0, False: 79]
  ------------------
  636|      0|      throw TLS_Exception(Alert::DecryptError, "Finished message didn't verify");
  637|      0|   }
  638|       |
  639|     79|   if(pending_state.server_finished() == nullptr) {
  ------------------
  |  Branch (639:7): [True: 79, False: 0]
  ------------------
  640|       |      // already sent finished if resuming, so this is a new session
  641|       |
  642|     79|      pending_state.hash().update(pending_state.handshake_io().format(contents, type));
  643|       |
  644|     79|      Session session_info(pending_state.session_keys().master_secret(),
  645|     79|                           pending_state.server_hello()->legacy_version(),
  646|     79|                           pending_state.server_hello()->ciphersuite(),
  647|     79|                           Connection_Side::Server,
  648|     79|                           pending_state.server_hello()->supports_extended_master_secret(),
  649|     79|                           pending_state.server_hello()->supports_encrypt_then_mac(),
  650|     79|                           pending_state.peer_cert_chain(),
  651|     79|                           Server_Information(pending_state.client_hello()->sni_hostname()),
  652|     79|                           pending_state.server_hello()->srtp_profile(),
  653|     79|                           callbacks().tls_current_timestamp());
  654|       |
  655|       |      // Give the application a chance for a final veto before fully
  656|       |      // establishing the connection.
  657|     79|      callbacks().tls_session_established([&] {
  658|     79|         Session_Summary summary(session_info, pending_state.is_a_resumption(), pending_state.psk_identity());
  659|     79|         summary.set_session_id(pending_state.server_hello()->session_id());
  660|     79|         return summary;
  661|     79|      }());
  662|       |
  663|     79|      if(callbacks().tls_should_persist_resumption_information(session_info)) {
  ------------------
  |  Branch (663:10): [True: 79, False: 0]
  ------------------
  664|     79|         auto handle = session_manager().establish(session_info,
  665|     79|                                                   pending_state.server_hello()->session_id(),
  666|     79|                                                   !pending_state.server_hello()->supports_session_ticket());
  667|       |
  668|     79|         if(pending_state.server_hello()->supports_session_ticket() && handle.has_value() && handle->is_ticket()) {
  ------------------
  |  Branch (668:13): [True: 0, False: 79]
  |  Branch (668:72): [True: 0, False: 0]
  |  Branch (668:94): [True: 0, False: 0]
  ------------------
  669|      0|            pending_state.new_session_ticket(std::make_unique<New_Session_Ticket_12>(
  670|      0|               pending_state.handshake_io(),
  671|      0|               pending_state.hash(),
  672|      0|               handle->ticket().value(),
  673|      0|               static_cast<uint32_t>(policy().session_ticket_lifetime().count())));
  674|      0|         }
  675|       |
  676|     79|         note_resumption_handle(handle);
  677|     79|      }
  678|       |
  679|     79|      if(pending_state.new_session_ticket() == nullptr && pending_state.server_hello()->supports_session_ticket()) {
  ------------------
  |  Branch (679:10): [True: 79, False: 0]
  |  Branch (679:59): [True: 0, False: 79]
  ------------------
  680|      0|         pending_state.new_session_ticket(
  681|      0|            std::make_unique<New_Session_Ticket_12>(pending_state.handshake_io(), pending_state.hash()));
  682|      0|      }
  683|       |
  684|     79|      pending_state.handshake_io().send(Change_Cipher_Spec());
  685|       |
  686|     79|      change_cipher_spec_writer(Connection_Side::Server);
  687|       |
  688|     79|      pending_state.server_finished(
  689|     79|         std::make_unique<Finished_12>(pending_state.handshake_io(), pending_state, Connection_Side::Server));
  690|     79|   }
  691|       |
  692|     79|   activate_session();
  693|     79|}
_ZN5Botan3TLS14Server_Impl_1221process_handshake_msgERNS0_15Handshake_StateENS0_14Handshake_TypeERKNSt3__16vectorIhNS5_9allocatorIhEEEEb:
  701|  5.88k|                                           bool epoch0_restart) {
  702|  5.88k|   Server_Handshake_State& state = dynamic_cast<Server_Handshake_State&>(state_base);
  703|  5.88k|   state.confirm_transition_to(type);
  704|       |
  705|       |   /*
  706|       |   * The change cipher spec message isn't technically a handshake
  707|       |   * message so it's not included in the hash. The finished and
  708|       |   * certificate verify messages are verified based on the current
  709|       |   * state of the hash *before* this message so we delay adding them
  710|       |   * to the hash computation until we've processed them below.
  711|       |   */
  712|  5.88k|   if(type != Handshake_Type::HandshakeCCS && type != Handshake_Type::Finished &&
  ------------------
  |  Branch (712:7): [True: 5.44k, False: 442]
  |  Branch (712:47): [True: 5.35k, False: 85]
  ------------------
  713|  5.35k|      type != Handshake_Type::CertificateVerify) {
  ------------------
  |  Branch (713:7): [True: 5.35k, False: 0]
  ------------------
  714|  5.35k|      state.hash().update(state.handshake_io().format(contents, type));
  715|  5.35k|   }
  716|       |
  717|  5.88k|   switch(type) {
  718|  3.22k|      case Handshake_Type::ClientHello:
  ------------------
  |  Branch (718:7): [True: 3.22k, False: 2.65k]
  ------------------
  719|  3.22k|         return this->process_client_hello_msg(state, contents, epoch0_restart);
  720|       |
  721|      0|      case Handshake_Type::Certificate:
  ------------------
  |  Branch (721:7): [True: 0, False: 5.88k]
  ------------------
  722|      0|         return this->process_certificate_msg(state, contents);
  723|       |
  724|  2.13k|      case Handshake_Type::ClientKeyExchange:
  ------------------
  |  Branch (724:7): [True: 2.13k, False: 3.75k]
  ------------------
  725|  2.13k|         return this->process_client_key_exchange_msg(state, contents);
  726|       |
  727|      0|      case Handshake_Type::CertificateVerify:
  ------------------
  |  Branch (727:7): [True: 0, False: 5.88k]
  ------------------
  728|      0|         return this->process_certificate_verify_msg(state, type, contents);
  729|       |
  730|    377|      case Handshake_Type::HandshakeCCS:
  ------------------
  |  Branch (730:7): [True: 377, False: 5.50k]
  ------------------
  731|    377|         return this->process_change_cipher_spec_msg(state);
  732|       |
  733|     85|      case Handshake_Type::Finished:
  ------------------
  |  Branch (733:7): [True: 85, False: 5.80k]
  ------------------
  734|     85|         return this->process_finished_msg(state, type, contents);
  735|       |
  736|      0|      default:
  ------------------
  |  Branch (736:7): [True: 0, False: 5.88k]
  ------------------
  737|      0|         throw Unexpected_Message("Unknown handshake message received");
  738|  5.88k|   }
  739|  5.88k|}
_ZN5Botan3TLS14Server_Impl_1214session_createERNS0_22Server_Handshake_StateE:
  816|  3.03k|void Server_Impl_12::session_create(Server_Handshake_State& pending_state) {
  817|  3.03k|   std::map<std::string, std::vector<X509_Certificate>> cert_chains;
  818|       |
  819|  3.03k|   const std::string sni_hostname = pending_state.client_hello()->sni_hostname();
  820|       |
  821|       |   // RFC 8446 1.3
  822|       |   //    The "signature_algorithms_cert" extension allows a client to indicate
  823|       |   //    which signature algorithms it can validate in X.509 certificates.
  824|       |   //
  825|       |   // RFC 8446 4.2.3
  826|       |   //     TLS 1.2 implementations SHOULD also process this extension.
  827|  3.03k|   const auto cert_signature_schemes = pending_state.client_hello()->certificate_signature_schemes();
  828|  3.03k|   cert_chains = get_server_certs(sni_hostname, cert_signature_schemes, *m_creds);
  829|       |
  830|  3.03k|   if(!sni_hostname.empty() && cert_chains.empty()) {
  ------------------
  |  Branch (830:7): [True: 6, False: 3.03k]
  |  Branch (830:32): [True: 0, False: 6]
  ------------------
  831|      0|      cert_chains = get_server_certs("", cert_signature_schemes, *m_creds);
  832|       |
  833|       |      /*
  834|       |      * Only send the unrecognized_name alert if we couldn't
  835|       |      * find any certs for the requested name but did find at
  836|       |      * least one cert to use in general. That avoids sending an
  837|       |      * unrecognized_name when a server is configured for purely
  838|       |      * anonymous/PSK operation.
  839|       |      */
  840|      0|      if(!cert_chains.empty()) {
  ------------------
  |  Branch (840:10): [True: 0, False: 0]
  ------------------
  841|      0|         send_warning_alert(Alert::UnrecognizedName);
  842|      0|      }
  843|      0|   }
  844|       |
  845|  3.03k|   const uint16_t ciphersuite =
  846|  3.03k|      choose_ciphersuite(policy(), pending_state.version(), cert_chains, *pending_state.client_hello());
  847|       |
  848|  3.03k|   const Server_Hello_12::Settings srv_settings(Session_ID(make_hello_random(rng(), callbacks(), policy())),
  849|  3.03k|                                                pending_state.version(),
  850|  3.03k|                                                ciphersuite,
  851|  3.03k|                                                session_manager().emits_session_tickets());
  852|       |
  853|  3.03k|   pending_state.server_hello(std::make_unique<Server_Hello_12>(pending_state.handshake_io(),
  854|  3.03k|                                                                pending_state.hash(),
  855|  3.03k|                                                                policy(),
  856|  3.03k|                                                                callbacks(),
  857|  3.03k|                                                                rng(),
  858|  3.03k|                                                                secure_renegotiation_data_for_server_hello(),
  859|  3.03k|                                                                *pending_state.client_hello(),
  860|  3.03k|                                                                srv_settings,
  861|  3.03k|                                                                m_next_protocol));
  862|       |
  863|  3.03k|   secure_renegotiation_check(pending_state.server_hello());
  864|       |
  865|  3.03k|   const Ciphersuite& pending_suite = pending_state.ciphersuite();
  866|       |
  867|  3.03k|   std::shared_ptr<Private_Key> private_key;
  868|       |
  869|  3.03k|   if(pending_suite.is_certificate_required()) {
  ------------------
  |  Branch (869:7): [True: 4, False: 3.03k]
  ------------------
  870|      4|      const std::string algo_used = pending_suite.signature_used() ? pending_suite.sig_algo() : "RSA";
  ------------------
  |  Branch (870:37): [True: 4, False: 0]
  ------------------
  871|       |
  872|      4|      BOTAN_ASSERT(!cert_chains[algo_used].empty(), "Attempting to send empty certificate chain");
  ------------------
  |  |   71|      4|   do {                                                                                 \
  |  |   72|      4|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|      4|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, False: 4]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|      4|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 4]
  |  |  ------------------
  ------------------
  873|       |
  874|      4|      pending_state.server_certs(
  875|      4|         std::make_unique<Certificate_12>(pending_state.handshake_io(), pending_state.hash(), cert_chains[algo_used]));
  876|       |
  877|      4|      if(pending_state.client_hello()->supports_cert_status_message() && pending_state.is_a_resumption() == false) {
  ------------------
  |  Branch (877:10): [True: 1, False: 3]
  |  Branch (877:74): [True: 1, False: 0]
  ------------------
  878|      1|         auto* csr = pending_state.client_hello()->extensions().get<Certificate_Status_Request>();
  879|       |         // csr is non-null if client_hello()->supports_cert_status_message()
  880|      1|         BOTAN_ASSERT_NOMSG(csr != nullptr);
  ------------------
  |  |   84|      1|   do {                                                                     \
  |  |   85|      1|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|      1|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 1]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|      1|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 1]
  |  |  ------------------
  ------------------
  881|      1|         const auto resp_bytes = callbacks().tls_provide_cert_status(cert_chains[algo_used], *csr);
  882|      1|         if(!resp_bytes.empty()) {
  ------------------
  |  Branch (882:13): [True: 0, False: 1]
  ------------------
  883|      0|            pending_state.server_cert_status(
  884|      0|               std::make_unique<Certificate_Status_12>(pending_state.handshake_io(), pending_state.hash(), resp_bytes));
  885|      0|         }
  886|      1|      }
  887|       |
  888|      4|      private_key = m_creds->private_key_for(pending_state.server_certs()->cert_chain()[0], "tls-server", sni_hostname);
  889|       |
  890|      4|      if(!private_key) {
  ------------------
  |  Branch (890:10): [True: 4, False: 0]
  ------------------
  891|      4|         throw Internal_Error("No private key located for associated server cert");
  892|      4|      }
  893|      4|   }
  894|       |
  895|  3.03k|   if(pending_suite.kex_method() == Kex_Algo::STATIC_RSA) {
  ------------------
  |  Branch (895:7): [True: 0, False: 3.03k]
  ------------------
  896|      0|      pending_state.set_server_rsa_kex_key(private_key);
  897|  3.03k|   } else {
  898|  3.03k|      pending_state.server_kex(std::make_unique<Server_Key_Exchange>(
  899|  3.03k|         pending_state.handshake_io(), pending_state, policy(), *m_creds, rng(), private_key.get()));
  900|  3.03k|   }
  901|       |
  902|  3.03k|   auto trusted_CAs = m_creds->trusted_certificate_authorities("tls-server", sni_hostname);
  903|       |
  904|  3.03k|   std::vector<X509_DN> client_auth_CAs;
  905|       |
  906|  3.03k|   for(auto* store : trusted_CAs) {
  ------------------
  |  Branch (906:20): [True: 0, False: 3.03k]
  ------------------
  907|      0|      auto subjects = store->all_subjects();
  908|      0|      client_auth_CAs.insert(client_auth_CAs.end(), subjects.begin(), subjects.end());
  909|      0|   }
  910|       |
  911|  3.03k|   const bool request_cert = (client_auth_CAs.empty() == false) || policy().request_client_certificate_authentication();
  ------------------
  |  Branch (911:30): [True: 222, False: 2.81k]
  |  Branch (911:68): [True: 0, False: 2.81k]
  ------------------
  912|       |
  913|       |   // RFC 5246 7.4.4: supported_signature_algorithms<2..2^16-2>
  914|       |   // Without at least one acceptable scheme we cannot construct a valid
  915|       |   // CertificateRequest, so client cert auth is unreachable regardless.
  916|  3.03k|   const bool can_request_cert = !policy().acceptable_signature_schemes().empty();
  917|       |
  918|  3.03k|   if(request_cert && can_request_cert && pending_state.ciphersuite().is_certificate_required()) {
  ------------------
  |  Branch (918:7): [True: 0, False: 3.03k]
  |  Branch (918:23): [True: 0, False: 0]
  |  Branch (918:43): [True: 0, False: 0]
  ------------------
  919|      0|      pending_state.cert_req(std::make_unique<Certificate_Request_12>(
  920|      0|         pending_state.handshake_io(), pending_state.hash(), policy(), client_auth_CAs));
  921|       |
  922|       |      /*
  923|       |      SSLv3 allowed clients to skip the Certificate message entirely
  924|       |      if they wanted. In TLS v1.0 and later clients must send a
  925|       |      (possibly empty) Certificate message
  926|       |      */
  927|      0|      pending_state.set_expected_next(Handshake_Type::Certificate);
  928|  3.03k|   } else {
  929|  3.03k|      pending_state.set_expected_next(Handshake_Type::ClientKeyExchange);
  930|  3.03k|   }
  931|       |
  932|  3.03k|   pending_state.server_hello_done(
  933|  3.03k|      std::make_unique<Server_Hello_Done>(pending_state.handshake_io(), pending_state.hash()));
  934|  3.03k|}
tls_server_impl_12.cpp:_ZN5Botan3TLS12_GLOBAL__N_123load_dtls_cookie_secretERNS_19Credentials_ManagerE:
  262|    789|secure_vector<uint8_t> load_dtls_cookie_secret(Credentials_Manager& creds) {
  263|    789|   auto cookie_secret = [&]() -> secure_vector<uint8_t> {
  264|    789|      try {
  265|    789|         return creds.psk("tls-server", "dtls-cookie-secret", "").bits_of();
  266|    789|      } catch(...) {
  267|    789|         return {};
  268|    789|      }
  269|    789|   }();
  270|       |
  271|    789|   if(cookie_secret.empty()) {
  ------------------
  |  Branch (271:7): [True: 0, False: 789]
  ------------------
  272|       |      // TODO(Botan4): Simplify this error message that was meant to ease the
  273|       |      //               burden on users running into a deliberate semver violation.
  274|      0|      throw Invalid_State(
  275|      0|         "Since Botan 3.13 DTLS server requires setting a non-empty cookie secret. "
  276|      0|         "Either override Credentials_Manager::dtls_cookie_secret() or disable the "
  277|      0|         "cookie exchange using TLS::Policy::dtls_server_require_cookie_exchange(), "
  278|      0|         "if you understand the security implications of doing so.");
  279|      0|   }
  280|       |
  281|    789|   return cookie_secret;
  282|    789|}
tls_server_impl_12.cpp:_ZZN5Botan3TLS12_GLOBAL__N_123load_dtls_cookie_secretERNS_19Credentials_ManagerEENK3$_0clEv:
  263|    789|   auto cookie_secret = [&]() -> secure_vector<uint8_t> {
  264|    789|      try {
  265|    789|         return creds.psk("tls-server", "dtls-cookie-secret", "").bits_of();
  266|    789|      } catch(...) {
  267|      0|         return {};
  268|      0|      }
  269|    789|   }();
tls_server_impl_12.cpp:_ZN5Botan3TLS12_GLOBAL__N_114select_versionERKNS0_6PolicyENS0_16Protocol_VersionES5_RKNSt3__16vectorIS5_NS6_9allocatorIS5_EEEE:
  327|  3.19k|                                const std::vector<Protocol_Version>& supported_versions) {
  328|  3.19k|   const bool is_datagram = client_offer.is_datagram_protocol();
  329|  3.19k|   const bool initial_handshake = (active_version.valid() == false);
  330|       |
  331|  3.19k|   if(!supported_versions.empty()) {
  ------------------
  |  Branch (331:7): [True: 28, False: 3.16k]
  ------------------
  332|     28|      if(is_datagram) {
  ------------------
  |  Branch (332:10): [True: 9, False: 19]
  ------------------
  333|      9|         if(policy.allow_dtls12() && value_exists(supported_versions, Protocol_Version(Protocol_Version::DTLS_V12))) {
  ------------------
  |  Branch (333:13): [True: 9, False: 0]
  |  Branch (333:13): [True: 1, False: 8]
  |  Branch (333:38): [True: 1, False: 8]
  ------------------
  334|      1|            return Protocol_Version::DTLS_V12;
  335|      1|         }
  336|      8|         throw TLS_Exception(Alert::ProtocolVersion, "No shared DTLS version");
  337|     19|      } else {
  338|     19|         if(policy.allow_tls12() && value_exists(supported_versions, Protocol_Version(Protocol_Version::TLS_V12))) {
  ------------------
  |  Branch (338:13): [True: 19, False: 0]
  |  Branch (338:13): [True: 7, False: 12]
  |  Branch (338:37): [True: 7, False: 12]
  ------------------
  339|      7|            return Protocol_Version::TLS_V12;
  340|      7|         }
  341|     12|         throw TLS_Exception(Alert::ProtocolVersion, "No shared TLS version");
  342|     19|      }
  343|     28|   }
  344|       |
  345|  3.16k|   if(!initial_handshake) {
  ------------------
  |  Branch (345:7): [True: 0, False: 3.16k]
  ------------------
  346|       |      /*
  347|       |      * If this is a renegotiation, and the client has offered a
  348|       |      * later version than what it initially negotiated, negotiate
  349|       |      * the old version. This matches OpenSSL's behavior. If the
  350|       |      * client is offering a version earlier than what it initially
  351|       |      * negotiated, reject as a probable attack.
  352|       |      */
  353|      0|      if(active_version > client_offer) {
  ------------------
  |  Branch (353:10): [True: 0, False: 0]
  ------------------
  354|      0|         throw TLS_Exception(
  355|      0|            Alert::ProtocolVersion,
  356|      0|            "Client negotiated " + active_version.to_string() + " then renegotiated with " + client_offer.to_string());
  357|      0|      } else {
  358|      0|         return active_version;
  359|      0|      }
  360|      0|   }
  361|       |
  362|  3.16k|   if(is_datagram) {
  ------------------
  |  Branch (362:7): [True: 37, False: 3.13k]
  ------------------
  363|     37|      if(policy.allow_dtls12() && client_offer >= Protocol_Version::DTLS_V12) {
  ------------------
  |  Branch (363:10): [True: 37, False: 0]
  |  Branch (363:10): [True: 36, False: 1]
  |  Branch (363:35): [True: 36, False: 1]
  ------------------
  364|     36|         return Protocol_Version::DTLS_V12;
  365|     36|      }
  366|  3.13k|   } else {
  367|  3.13k|      if(policy.allow_tls12() && client_offer >= Protocol_Version::TLS_V12) {
  ------------------
  |  Branch (367:10): [True: 3.13k, False: 0]
  |  Branch (367:10): [True: 3.12k, False: 1]
  |  Branch (367:34): [True: 3.12k, False: 1]
  ------------------
  368|  3.12k|         return Protocol_Version::TLS_V12;
  369|  3.12k|      }
  370|  3.13k|   }
  371|       |
  372|      2|   throw TLS_Exception(Alert::ProtocolVersion,
  373|      2|                       "Client version " + client_offer.to_string() + " is unacceptable by policy");
  374|  3.16k|}
_ZNK5Botan3TLS22Server_Handshake_State24allow_session_resumptionEv:
   34|  3.03k|      bool allow_session_resumption() const { return m_allow_session_resumption; }
tls_server_impl_12.cpp:_ZN5Botan3TLS12_GLOBAL__N_116check_for_resumeERKNS0_14Session_HandleERNS0_15Session_ManagerERNS0_9CallbacksERKNS0_6PolicyEPKNS0_15Client_Hello_12E:
   79|     41|                                        const Client_Hello_12* client_hello) {
   80|     41|   auto session = session_manager.retrieve(handle_to_resume, cb, policy);
   81|     41|   if(!session.has_value()) {
  ------------------
  |  Branch (81:7): [True: 41, False: 0]
  ------------------
   82|     41|      return std::nullopt;
   83|     41|   }
   84|       |
   85|       |   // wrong version
   86|      0|   if(client_hello->legacy_version() != session->version()) {
  ------------------
  |  Branch (86:7): [True: 0, False: 0]
  ------------------
   87|      0|      return std::nullopt;
   88|      0|   }
   89|       |
   90|       |   // client didn't send original ciphersuite
   91|      0|   if(!value_exists(client_hello->ciphersuites(), session->ciphersuite_code())) {
  ------------------
  |  Branch (91:7): [True: 0, False: 0]
  ------------------
   92|      0|      return std::nullopt;
   93|      0|   }
   94|       |
   95|       |   // client sent a different SNI hostname
   96|      0|   if(!client_hello->sni_hostname().empty() && client_hello->sni_hostname() != session->server_info().hostname()) {
  ------------------
  |  Branch (96:7): [True: 0, False: 0]
  |  Branch (96:7): [True: 0, False: 0]
  |  Branch (96:48): [True: 0, False: 0]
  ------------------
   97|      0|      return std::nullopt;
   98|      0|   }
   99|       |
  100|       |   // Checking extended_master_secret on resume (RFC 7627 section 5.3)
  101|      0|   if(client_hello->supports_extended_master_secret() != session->supports_extended_master_secret()) {
  ------------------
  |  Branch (101:7): [True: 0, False: 0]
  ------------------
  102|      0|      if(!session->supports_extended_master_secret()) {
  ------------------
  |  Branch (102:10): [True: 0, False: 0]
  ------------------
  103|      0|         return std::nullopt;  // force new handshake with extended master secret
  104|      0|      } else {
  105|       |         /*
  106|       |         Client previously negotiated session with extended master secret,
  107|       |         but has now attempted to resume without the extension: abort
  108|       |         */
  109|      0|         throw TLS_Exception(Alert::HandshakeFailure, "Client resumed extended ms session without sending extension");
  110|      0|      }
  111|      0|   }
  112|       |
  113|       |   // Checking encrypt_then_mac on resume (RFC 7366 section 3.1)
  114|      0|   if(!client_hello->supports_encrypt_then_mac() && session->supports_encrypt_then_mac()) {
  ------------------
  |  Branch (114:7): [True: 0, False: 0]
  |  Branch (114:53): [True: 0, False: 0]
  ------------------
  115|       |      /*
  116|       |      Client previously negotiated session with Encrypt-then-MAC,
  117|       |      but has now attempted to resume without the extension: abort
  118|       |      */
  119|      0|      throw TLS_Exception(Alert::HandshakeFailure, "Client resumed Encrypt-then-MAC session without sending extension");
  120|      0|   }
  121|       |
  122|      0|   return session;
  123|      0|}
_ZN5Botan3TLS22Server_Handshake_State18server_rsa_kex_keyEv:
   30|  2.13k|      Private_Key* server_rsa_kex_key() { return m_server_rsa_kex_key.get(); }
_ZNK5Botan3TLS22Server_Handshake_State15peer_cert_chainEv:
   48|    158|      std::vector<X509_Certificate> peer_cert_chain() const override {
   49|    158|         if(!m_resume_peer_certs.empty()) {
  ------------------
  |  Branch (49:13): [True: 0, False: 158]
  ------------------
   50|      0|            return m_resume_peer_certs;
   51|      0|         }
   52|    158|         if(client_certs() != nullptr) {
  ------------------
  |  Branch (52:13): [True: 0, False: 158]
  ------------------
   53|      0|            return client_certs()->cert_chain();
   54|      0|         }
   55|    158|         return {};
   56|    158|      }
tls_server_impl_12.cpp:_ZZN5Botan3TLS14Server_Impl_1220process_finished_msgERNS0_22Server_Handshake_StateENS0_14Handshake_TypeERKNSt3__16vectorIhNS5_9allocatorIhEEEEENK3$_0clEv:
  657|     79|      callbacks().tls_session_established([&] {
  658|     79|         Session_Summary summary(session_info, pending_state.is_a_resumption(), pending_state.psk_identity());
  659|     79|         summary.set_session_id(pending_state.server_hello()->session_id());
  660|     79|         return summary;
  661|     79|      }());
tls_server_impl_12.cpp:_ZN5Botan3TLS12_GLOBAL__N_116get_server_certsENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEERKNS2_6vectorINS0_16Signature_SchemeENS2_9allocatorIS8_EEEERNS_19Credentials_ManagerE:
  245|  3.03k|   std::string_view hostname, const std::vector<Signature_Scheme>& cert_sig_schemes, Credentials_Manager& creds) {
  246|  3.03k|   const std::vector<std::string> cert_types = {"RSA", "ECDSA"};
  247|       |
  248|  3.03k|   std::map<std::string, std::vector<X509_Certificate>> cert_chains;
  249|       |
  250|  6.07k|   for(const auto& cert_type : cert_types) {
  ------------------
  |  Branch (250:30): [True: 6.07k, False: 3.03k]
  ------------------
  251|  6.07k|      const std::vector<X509_Certificate> certs = creds.cert_chain_single_type(
  252|  6.07k|         cert_type, to_algorithm_identifiers(cert_sig_schemes), "tls-server", std::string(hostname));
  253|       |
  254|  6.07k|      if(!certs.empty()) {
  ------------------
  |  Branch (254:10): [True: 3.03k, False: 3.03k]
  ------------------
  255|  3.03k|         cert_chains[cert_type] = certs;
  256|  3.03k|      }
  257|  6.07k|   }
  258|       |
  259|  3.03k|   return cert_chains;
  260|  3.03k|}
tls_server_impl_12.cpp:_ZN5Botan3TLS12_GLOBAL__N_118choose_ciphersuiteERKNS0_6PolicyENS0_16Protocol_VersionERKNSt3__13mapINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEENS6_6vectorINS_16X509_CertificateENSB_ISF_EEEENS6_4lessISD_EENSB_INS6_4pairIKSD_SH_EEEEEERKNS0_15Client_Hello_12E:
  131|  3.03k|                            const Client_Hello_12& client_hello) {
  132|  3.03k|   const bool our_choice = policy.server_uses_own_ciphersuite_preferences();
  133|  3.03k|   const std::vector<uint16_t>& client_suites = client_hello.ciphersuites();
  134|  3.03k|   const std::vector<uint16_t> server_suites = policy.ciphersuite_list(version);
  135|       |
  136|  3.03k|   if(server_suites.empty()) {
  ------------------
  |  Branch (136:7): [True: 0, False: 3.03k]
  ------------------
  137|      0|      throw TLS_Exception(Alert::HandshakeFailure, "Policy forbids us from negotiating any ciphersuite");
  138|      0|   }
  139|       |
  140|  3.03k|   const bool have_shared_ecc_curve =
  141|  3.03k|      (policy.choose_key_exchange_group(client_hello.supported_ecc_curves(), {}) != Group_Params::NONE);
  142|       |
  143|  3.03k|   const bool client_supports_ffdhe_groups = !client_hello.supported_dh_groups().empty();
  144|       |
  145|  3.03k|   const bool have_shared_dh_group =
  146|  3.03k|      (policy.choose_key_exchange_group(client_hello.supported_dh_groups(), {}) != Group_Params::NONE);
  147|       |
  148|  3.03k|   const std::unordered_set<uint16_t> client_suite_set(client_suites.begin(), client_suites.end());
  149|       |
  150|  3.03k|   const std::vector<Signature_Scheme> allowed_sig_schemes = policy.allowed_signature_schemes();
  151|  3.03k|   const std::vector<Signature_Scheme> client_sig_methods = client_hello.signature_schemes();
  152|       |
  153|       |   // Algorithm names (eg "RSA", "ECDSA") for which the client offered at least
  154|       |   // one signature_scheme that is available, is in our policy, and uses a hash we accept.
  155|  3.03k|   const std::unordered_set<std::string> client_sig_algs = [&] {
  156|  3.03k|      std::unordered_set<uint16_t> allowed_codes;
  157|  3.03k|      allowed_codes.reserve(allowed_sig_schemes.size());
  158|  3.03k|      for(auto s : allowed_sig_schemes) {
  159|  3.03k|         allowed_codes.insert(static_cast<uint16_t>(s.wire_code()));
  160|  3.03k|      }
  161|  3.03k|      std::unordered_set<std::string> result;
  162|  3.03k|      for(const Signature_Scheme scheme : client_sig_methods) {
  163|  3.03k|         if(!scheme.is_available()) {
  164|  3.03k|            continue;
  165|  3.03k|         }
  166|  3.03k|         if(!allowed_codes.contains(static_cast<uint16_t>(scheme.wire_code()))) {
  167|  3.03k|            continue;
  168|  3.03k|         }
  169|  3.03k|         if(!policy.allowed_signature_hash(scheme.hash_function_name())) {
  170|  3.03k|            continue;
  171|  3.03k|         }
  172|  3.03k|         result.insert(scheme.algorithm_name());
  173|  3.03k|      }
  174|  3.03k|      return result;
  175|  3.03k|   }();
  176|       |
  177|       |   /*
  178|       |   Walk down one list in preference order
  179|       |   */
  180|  3.03k|   const std::vector<uint16_t>& pref_list = our_choice ? server_suites : client_suites;
  ------------------
  |  Branch (180:45): [True: 3.03k, False: 0]
  ------------------
  181|       |
  182|  3.03k|   auto in_other_list = [&](uint16_t suite_id) {
  183|       |      // server_suites is small and policy-controlled
  184|  3.03k|      return our_choice ? client_suite_set.contains(suite_id) : value_exists(server_suites, suite_id);
  185|  3.03k|   };
  186|       |
  187|   184k|   for(auto suite_id : pref_list) {
  ------------------
  |  Branch (187:22): [True: 184k, False: 222]
  ------------------
  188|   184k|      if(!in_other_list(suite_id)) {
  ------------------
  |  Branch (188:10): [True: 181k, False: 3.26k]
  ------------------
  189|   181k|         continue;
  190|   181k|      }
  191|       |
  192|  3.26k|      const auto suite = Ciphersuite::by_id(suite_id);
  193|       |
  194|  3.26k|      if(!suite.has_value() || !suite->valid()) {
  ------------------
  |  Branch (194:10): [True: 0, False: 3.26k]
  |  Branch (194:32): [True: 0, False: 3.26k]
  ------------------
  195|      0|         continue;
  196|      0|      }
  197|       |
  198|  3.26k|      if(have_shared_ecc_curve == false && suite->ecc_ciphersuite()) {
  ------------------
  |  Branch (198:10): [True: 387, False: 2.87k]
  |  Branch (198:44): [True: 57, False: 330]
  ------------------
  199|     57|         continue;
  200|     57|      }
  201|       |
  202|  3.20k|      if(suite->kex_method() == Kex_Algo::DH && client_supports_ffdhe_groups && !have_shared_dh_group) {
  ------------------
  |  Branch (202:10): [True: 120, False: 3.08k]
  |  Branch (202:49): [True: 21, False: 99]
  |  Branch (202:81): [True: 21, False: 0]
  ------------------
  203|     21|         continue;
  204|     21|      }
  205|       |
  206|       |      // For non-anon ciphersuites
  207|  3.18k|      if(suite->is_certificate_required()) {
  ------------------
  |  Branch (207:10): [True: 376, False: 2.81k]
  ------------------
  208|    376|         const std::string cert_algo = suite->signature_used() ? suite->sig_algo() : "RSA";
  ------------------
  |  Branch (208:40): [True: 255, False: 121]
  ------------------
  209|       |
  210|       |         // Do we have any certificates for this sig?
  211|    376|         if(!cert_chains.contains(cert_algo)) {
  ------------------
  |  Branch (211:13): [True: 296, False: 80]
  ------------------
  212|    296|            continue;
  213|    296|         }
  214|    376|      }
  215|       |
  216|  2.89k|      if(suite->signature_used()) {
  ------------------
  |  Branch (216:10): [True: 80, False: 2.81k]
  ------------------
  217|       |         // The client's signature_algorithms list might not include a scheme
  218|       |         // matching this suite's sig_algo (e.g. the client offered ECDSA
  219|       |         // schemes but we're considering an RSA suite). That's just a
  220|       |         // mismatch on this candidate, not a handshake-fatal condition - try
  221|       |         // the next suite. The final "Can't agree on a ciphersuite" throw
  222|       |         // below fires only if no candidate works.
  223|     80|         if(!client_sig_algs.contains(suite->sig_algo())) {
  ------------------
  |  Branch (223:13): [True: 76, False: 4]
  ------------------
  224|     76|            continue;
  225|     76|         }
  226|     80|      }
  227|       |
  228|  2.81k|      return suite_id;
  229|  2.89k|   }
  230|       |
  231|       |   // RFC 7919 Section 4.
  232|       |   //   If the [Supported Groups] extension is present
  233|       |   //   with FFDHE groups, none of the client’s offered groups are acceptable
  234|       |   //   by the server, and none of the client’s proposed non-FFDHE cipher
  235|       |   //   suites are acceptable to the server, the server MUST end the
  236|       |   //   connection with a fatal TLS alert of type insufficient_security(71).
  237|    222|   if(client_supports_ffdhe_groups && !have_shared_dh_group) {
  ------------------
  |  Branch (237:7): [True: 23, False: 199]
  |  Branch (237:39): [True: 23, False: 0]
  ------------------
  238|     23|      throw TLS_Exception(Alert::InsufficientSecurity, "Can't agree on a sufficiently strong ciphersuite with client");
  239|     23|   }
  240|       |
  241|    199|   throw TLS_Exception(Alert::HandshakeFailure, "Can't agree on a ciphersuite with client");
  242|    222|}
tls_server_impl_12.cpp:_ZZN5Botan3TLS12_GLOBAL__N_118choose_ciphersuiteERKNS0_6PolicyENS0_16Protocol_VersionERKNSt3__13mapINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEENS6_6vectorINS_16X509_CertificateENSB_ISF_EEEENS6_4lessISD_EENSB_INS6_4pairIKSD_SH_EEEEEERKNS0_15Client_Hello_12EENK3$_0clEv:
  155|  3.03k|   const std::unordered_set<std::string> client_sig_algs = [&] {
  156|  3.03k|      std::unordered_set<uint16_t> allowed_codes;
  157|  3.03k|      allowed_codes.reserve(allowed_sig_schemes.size());
  158|  36.4k|      for(auto s : allowed_sig_schemes) {
  ------------------
  |  Branch (158:18): [True: 36.4k, False: 3.03k]
  ------------------
  159|  36.4k|         allowed_codes.insert(static_cast<uint16_t>(s.wire_code()));
  160|  36.4k|      }
  161|  3.03k|      std::unordered_set<std::string> result;
  162|  14.6k|      for(const Signature_Scheme scheme : client_sig_methods) {
  ------------------
  |  Branch (162:41): [True: 14.6k, False: 3.03k]
  ------------------
  163|  14.6k|         if(!scheme.is_available()) {
  ------------------
  |  Branch (163:13): [True: 8.25k, False: 6.42k]
  ------------------
  164|  8.25k|            continue;
  165|  8.25k|         }
  166|  6.42k|         if(!allowed_codes.contains(static_cast<uint16_t>(scheme.wire_code()))) {
  ------------------
  |  Branch (166:13): [True: 0, False: 6.42k]
  ------------------
  167|      0|            continue;
  168|      0|         }
  169|  6.42k|         if(!policy.allowed_signature_hash(scheme.hash_function_name())) {
  ------------------
  |  Branch (169:13): [True: 0, False: 6.42k]
  ------------------
  170|      0|            continue;
  171|      0|         }
  172|  6.42k|         result.insert(scheme.algorithm_name());
  173|  6.42k|      }
  174|  3.03k|      return result;
  175|  3.03k|   }();
tls_server_impl_12.cpp:_ZZN5Botan3TLS12_GLOBAL__N_118choose_ciphersuiteERKNS0_6PolicyENS0_16Protocol_VersionERKNSt3__13mapINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEENS6_6vectorINS_16X509_CertificateENSB_ISF_EEEENS6_4lessISD_EENSB_INS6_4pairIKSD_SH_EEEEEERKNS0_15Client_Hello_12EENK3$_1clEt:
  182|   184k|   auto in_other_list = [&](uint16_t suite_id) {
  183|       |      // server_suites is small and policy-controlled
  184|   184k|      return our_choice ? client_suite_set.contains(suite_id) : value_exists(server_suites, suite_id);
  ------------------
  |  Branch (184:14): [True: 184k, False: 0]
  ------------------
  185|   184k|   };
_ZNK5Botan3TLS22Server_Handshake_State15is_a_resumptionEv:
   46|     80|      bool is_a_resumption() const { return m_is_a_resumption; }
_ZN5Botan3TLS22Server_Handshake_StateC2ENSt3__110unique_ptrINS0_12Handshake_IOENS2_14default_deleteIS4_EEEERNS0_9CallbacksE:
   28|  3.83k|      Server_Handshake_State(std::unique_ptr<Handshake_IO> io, Callbacks& cb) : Handshake_State(std::move(io), cb) {}

_ZN5Botan3TLS12Session_KeysC2EPKNS0_15Handshake_StateERKNSt3__16vectorIhNS_16secure_allocatorIhEEEEb:
   22|  1.47k|                           bool resuming) {
   23|  1.47k|   BOTAN_ASSERT_NONNULL(state);
  ------------------
  |  |  123|  1.47k|   do {                                                                                   \
  |  |  124|  1.47k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 1.47k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  1.47k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 1.47k]
  |  |  ------------------
  ------------------
   24|  1.47k|   BOTAN_ASSERT_NONNULL(state->client_hello());
  ------------------
  |  |  123|  1.47k|   do {                                                                                   \
  |  |  124|  1.47k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 1.47k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  1.47k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 1.47k]
  |  |  ------------------
  ------------------
   25|  1.47k|   BOTAN_ASSERT_NONNULL(state->server_hello());
  ------------------
  |  |  123|  1.47k|   do {                                                                                   \
  |  |  124|  1.47k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 1.47k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  1.47k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 1.47k]
  |  |  ------------------
  ------------------
   26|       |
   27|  1.47k|   const auto& suite = state->ciphersuite();
   28|  1.47k|   BOTAN_STATE_CHECK(suite.valid());
  ------------------
  |  |   51|  1.47k|   do {                                                         \
  |  |   52|  1.47k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  1.47k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 1.47k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  1.47k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 1.47k]
  |  |  ------------------
  ------------------
   29|       |
   30|  1.47k|   const size_t cipher_keylen = suite.cipher_keylen();
   31|  1.47k|   const size_t mac_keylen = suite.mac_keylen();
   32|  1.47k|   const size_t cipher_nonce_bytes = suite.nonce_bytes_from_handshake();
   33|       |
   34|  1.47k|   const bool extended_master_secret = state->server_hello()->supports_extended_master_secret();
   35|       |
   36|  1.47k|   const size_t prf_gen = 2 * (mac_keylen + cipher_keylen + cipher_nonce_bytes);
   37|       |
   38|  1.47k|   const uint8_t MASTER_SECRET_MAGIC[] = {0x6D, 0x61, 0x73, 0x74, 0x65, 0x72, 0x20, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74};
   39|       |
   40|  1.47k|   const uint8_t EXT_MASTER_SECRET_MAGIC[] = {0x65, 0x78, 0x74, 0x65, 0x6E, 0x64, 0x65, 0x64, 0x20, 0x6D, 0x61,
   41|  1.47k|                                              0x73, 0x74, 0x65, 0x72, 0x20, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74};
   42|       |
   43|  1.47k|   const uint8_t KEY_GEN_MAGIC[] = {0x6B, 0x65, 0x79, 0x20, 0x65, 0x78, 0x70, 0x61, 0x6E, 0x73, 0x69, 0x6F, 0x6E};
   44|       |
   45|  1.47k|   auto prf = state->protocol_specific_prf();
   46|       |
   47|  1.47k|   if(resuming) {
  ------------------
  |  Branch (47:7): [True: 0, False: 1.47k]
  ------------------
   48|       |      // This is actually the master secret saved as part of the session
   49|      0|      m_master_sec = pre_master_secret;
   50|  1.47k|   } else {
   51|  1.47k|      std::vector<uint8_t> salt;
   52|  1.47k|      std::vector<uint8_t> label;
   53|  1.47k|      if(extended_master_secret) {
  ------------------
  |  Branch (53:10): [True: 1.47k, False: 0]
  ------------------
   54|  1.47k|         label.assign(EXT_MASTER_SECRET_MAGIC, EXT_MASTER_SECRET_MAGIC + sizeof(EXT_MASTER_SECRET_MAGIC));
   55|  1.47k|         salt += state->hash().final(suite.prf_algo());
   56|  1.47k|      } else {
   57|      0|         label.assign(MASTER_SECRET_MAGIC, MASTER_SECRET_MAGIC + sizeof(MASTER_SECRET_MAGIC));
   58|      0|         salt += state->client_hello()->random();
   59|      0|         salt += state->server_hello()->random();
   60|      0|      }
   61|       |
   62|  1.47k|      m_master_sec = prf->derive_key(48, pre_master_secret, salt, label);
   63|  1.47k|   }
   64|       |
   65|  1.47k|   std::vector<uint8_t> salt;
   66|  1.47k|   std::vector<uint8_t> label;
   67|  1.47k|   label.assign(KEY_GEN_MAGIC, KEY_GEN_MAGIC + sizeof(KEY_GEN_MAGIC));
   68|  1.47k|   salt += state->server_hello()->random();
   69|  1.47k|   salt += state->client_hello()->random();
   70|       |
   71|  1.47k|   const secure_vector<uint8_t> prf_output = prf->derive_key(
   72|  1.47k|      prf_gen, m_master_sec.data(), m_master_sec.size(), salt.data(), salt.size(), label.data(), label.size());
   73|       |
   74|  1.47k|   const uint8_t* key_data = prf_output.data();
   75|       |
   76|  1.47k|   m_c_aead.resize(mac_keylen + cipher_keylen);
   77|  1.47k|   m_s_aead.resize(mac_keylen + cipher_keylen);
   78|       |
   79|       |   // NOLINTBEGIN(readability-container-data-pointer)
   80|  1.47k|   copy_mem(&m_c_aead[0], key_data, mac_keylen);
   81|  1.47k|   copy_mem(&m_s_aead[0], key_data + mac_keylen, mac_keylen);
   82|       |   // NOLINTEND(readability-container-data-pointer)
   83|       |
   84|       |   // Key is not used for NULL suites
   85|  1.47k|   if(cipher_keylen > 0) {
  ------------------
  |  Branch (85:7): [True: 1.47k, False: 0]
  ------------------
   86|  1.47k|      copy_mem(&m_c_aead[mac_keylen], key_data + 2 * mac_keylen, cipher_keylen);
   87|  1.47k|      copy_mem(&m_s_aead[mac_keylen], key_data + 2 * mac_keylen + cipher_keylen, cipher_keylen);
   88|  1.47k|   } else {
   89|      0|      BOTAN_STATE_CHECK(suite.null_ciphersuite());
  ------------------
  |  |   51|      0|   do {                                                         \
  |  |   52|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|      0|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
   90|      0|   }
   91|       |
   92|  1.47k|   if(cipher_nonce_bytes > 0) {
  ------------------
  |  Branch (92:7): [True: 839, False: 633]
  ------------------
   93|    839|      const uint8_t* c_nonce_bytes = key_data + 2 * (mac_keylen + cipher_keylen);
   94|    839|      m_c_nonce.assign(c_nonce_bytes, c_nonce_bytes + cipher_nonce_bytes);
   95|       |
   96|    839|      const uint8_t* s_nonce_bytes = key_data + 2 * (mac_keylen + cipher_keylen) + cipher_nonce_bytes;
   97|    839|      m_s_nonce.assign(s_nonce_bytes, s_nonce_bytes + cipher_nonce_bytes);
   98|    839|   }
   99|  1.47k|}

_ZN5Botan3TLS21Certificate_Verify_13C2ENSt3__14spanIKhLm18446744073709551615EEENS0_15Connection_SideE:
   87|     63|      Certificate_Verify(buf), m_side(side) {
   88|     63|   if(!m_scheme.is_available()) {
  ------------------
  |  Branch (88:7): [True: 38, False: 25]
  ------------------
   89|     38|      throw TLS_Exception(Alert::IllegalParameter, "Peer sent unknown signature scheme");
   90|     38|   }
   91|       |
   92|     25|   if(!m_scheme.is_compatible_with(Protocol_Version::TLS_V13)) {
  ------------------
  |  Branch (92:7): [True: 3, False: 22]
  ------------------
   93|      3|      throw TLS_Exception(Alert::IllegalParameter, "Peer sent signature algorithm that is not suitable for TLS 1.3");
   94|      3|   }
   95|     25|}

_ZN5Botan3TLS14Certificate_1317Certificate_EntryC2ERNS0_15TLS_Data_ReaderENS0_15Connection_SideENS0_16Certificate_TypeE:
  265|    458|                                                     Certificate_Type cert_type) {
  266|    458|   if(cert_type == Certificate_Type::X509) {
  ------------------
  |  Branch (266:7): [True: 458, False: 0]
  ------------------
  267|       |      // RFC 8446 4.2.2
  268|       |      //    [...] each CertificateEntry contains a DER-encoded X.509
  269|       |      //    certificate.
  270|    458|      const auto cert_bytes = reader.get_tls_length_value(3);
  271|    458|      try {
  272|    458|         m_certificate = std::make_unique<X509_Certificate>(cert_bytes);
  273|    458|         m_raw_public_key = m_certificate->subject_public_key();
  274|    458|      } catch(Exception& e) {
  275|       |         // bad_certificate would make more sense but BoGo expects decoding_error
  276|    446|         throw TLS_Exception(Alert::DecodeError, e.what());
  277|    446|      }
  278|    458|   } else if(cert_type == Certificate_Type::RawPublicKey) {
  ------------------
  |  Branch (278:14): [True: 0, False: 0]
  ------------------
  279|       |      // RFC 7250 3.
  280|       |      //    This specification uses raw public keys whereby the already
  281|       |      //    available encoding used in a PKIX certificate in the form of a
  282|       |      //    SubjectPublicKeyInfo structure is reused.
  283|      0|      try {
  284|      0|         m_raw_public_key = X509::load_key(reader.get_tls_length_value(3));
  285|      0|      } catch(Exception& e) {
  286|      0|         throw TLS_Exception(Alert::DecodeError, e.what());
  287|      0|      }
  288|      0|   } else {
  289|      0|      throw TLS_Exception(Alert::InternalError, "Unknown certificate type");
  290|      0|   }
  291|       |
  292|       |   // Extensions are simply tacked at the end of the certificate entry. This
  293|       |   // is a departure from the typical "tag-length-value" in a sense that the
  294|       |   // Extensions deserializer needs the length value of the extensions.
  295|      0|   const size_t extensions_length = reader.peek_uint16_t();
  296|      0|   const auto exts_buf = reader.get_fixed<uint8_t>(extensions_length + 2);
  297|      0|   TLS_Data_Reader exts_reader("extensions reader", exts_buf);
  298|      0|   m_extensions.deserialize(exts_reader, side, Handshake_Type::Certificate);
  299|       |
  300|      0|   if(cert_type == Certificate_Type::X509) {
  ------------------
  |  Branch (300:7): [True: 0, False: 0]
  ------------------
  301|       |      // RFC 8446 4.4.2
  302|       |      //    Valid extensions for server certificates at present include the
  303|       |      //    OCSP Status extension [RFC6066] and the SignedCertificateTimestamp
  304|       |      //    extension [RFC6962]; future extensions may be defined for this
  305|       |      //    message as well.
  306|       |      //
  307|       |      // RFC 8446 4.4.2.1
  308|       |      //    A server MAY request that a client present an OCSP response with its
  309|       |      //    certificate by sending an empty "status_request" extension in its
  310|       |      //    CertificateRequest message.
  311|      0|      if(m_extensions.contains_implemented_extensions_other_than({
  ------------------
  |  Branch (311:10): [True: 0, False: 0]
  ------------------
  312|      0|            Extension_Code::CertificateStatusRequest,
  313|       |            // Extension_Code::SignedCertificateTimestamp
  314|      0|         })) {
  315|      0|         throw TLS_Exception(Alert::IllegalParameter, "Certificate Entry contained an extension that is not allowed");
  316|      0|      }
  317|      0|   } else if(m_extensions.contains_implemented_extensions_other_than({})) {
  ------------------
  |  Branch (317:14): [True: 0, False: 0]
  ------------------
  318|      0|      throw TLS_Exception(
  319|      0|         Alert::IllegalParameter,
  320|      0|         "Certificate Entry holding something else than a certificate contained unexpected extensions");
  321|      0|   }
  322|      0|}
_ZN5Botan3TLS14Certificate_13C2ENSt3__14spanIKhLm18446744073709551615EEERKNS0_6PolicyENS0_15Connection_SideENS0_16Certificate_TypeE:
  359|    494|      m_side(side) {
  360|    494|   TLS_Data_Reader reader("cert message reader", buf);
  361|       |
  362|    494|   m_request_context = reader.get_range<uint8_t>(1, 0, 255);
  363|       |
  364|       |   // RFC 8446 4.4.2
  365|       |   //    [...] in the case of server authentication, this field SHALL be zero length.
  366|    494|   if(m_side == Connection_Side::Server && !m_request_context.empty()) {
  ------------------
  |  Branch (366:7): [True: 0, False: 494]
  |  Branch (366:44): [True: 0, False: 0]
  ------------------
  367|      0|      throw TLS_Exception(Alert::IllegalParameter, "Server Certificate message must not contain a request context");
  368|      0|   }
  369|       |
  370|    494|   const auto cert_entries_len = reader.get_uint24_t();
  371|       |
  372|    494|   if(reader.remaining_bytes() != cert_entries_len) {
  ------------------
  |  Branch (372:7): [True: 22, False: 472]
  ------------------
  373|     22|      throw TLS_Exception(Alert::DecodeError, "Certificate: Message malformed");
  374|     22|   }
  375|       |
  376|    472|   const size_t max_size = policy.maximum_certificate_chain_size();
  377|    472|   if(max_size > 0 && cert_entries_len > max_size) {
  ------------------
  |  Branch (377:7): [True: 461, False: 11]
  |  Branch (377:23): [True: 0, False: 461]
  ------------------
  378|      0|      throw Decoding_Error("Certificate chain exceeds policy specified maximum size");
  379|      0|   }
  380|       |
  381|    930|   while(reader.has_remaining()) {
  ------------------
  |  Branch (381:10): [True: 458, False: 472]
  ------------------
  382|    458|      m_entries.emplace_back(reader, side, cert_type);
  383|    458|   }
  384|       |
  385|       |   // RFC 8446 4.4.2
  386|       |   //    The server's certificate_list MUST always be non-empty.  A client
  387|       |   //    will send an empty certificate_list if it does not have an
  388|       |   //    appropriate certificate to send in response to the server's
  389|       |   //    authentication request.
  390|    472|   if(m_entries.empty()) {
  ------------------
  |  Branch (390:7): [True: 3, False: 469]
  ------------------
  391|       |      // RFC 8446 4.4.2.4
  392|       |      //    If the server supplies an empty Certificate message, the client MUST
  393|       |      //    abort the handshake with a "decode_error" alert.
  394|      3|      if(m_side == Connection_Side::Server) {
  ------------------
  |  Branch (394:10): [True: 0, False: 3]
  ------------------
  395|      0|         throw TLS_Exception(Alert::DecodeError, "No certificates sent by server");
  396|      0|      }
  397|       |
  398|      3|      return;
  399|      3|   }
  400|       |
  401|    469|   BOTAN_ASSERT_NOMSG(!m_entries.empty());
  ------------------
  |  |   84|    469|   do {                                                                     \
  |  |   85|    469|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    469|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 469]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    469|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 469]
  |  |  ------------------
  ------------------
  402|       |
  403|       |   // RFC 8446 4.4.2.2
  404|       |   //    The certificate type MUST be X.509v3 [RFC5280], unless explicitly
  405|       |   //    negotiated otherwise (e.g., [RFC7250]).
  406|       |   //
  407|       |   // TLS 1.0 through 1.3 all seem to require that the certificate be
  408|       |   // precisely a v3 certificate. In fact the strict wording would seem
  409|       |   // to require that every certificate in the chain be v3. But often
  410|       |   // the intermediates are outside of the control of the server.
  411|       |   // But, require that the leaf certificate be v3.
  412|    469|   if(cert_type == Certificate_Type::X509 && m_entries.front().certificate().x509_version() != 3) {
  ------------------
  |  Branch (412:7): [True: 0, False: 469]
  |  Branch (412:46): [True: 0, False: 0]
  ------------------
  413|      0|      throw TLS_Exception(Alert::BadCertificate, "The leaf certificate must be v3");
  414|      0|   }
  415|       |
  416|       |   // RFC 8446 4.4.2
  417|       |   //    If the RawPublicKey certificate type was negotiated, then the
  418|       |   //    certificate_list MUST contain no more than one CertificateEntry.
  419|    469|   if(cert_type == Certificate_Type::RawPublicKey && m_entries.size() != 1) {
  ------------------
  |  Branch (419:7): [True: 0, False: 469]
  |  Branch (419:54): [True: 0, False: 0]
  ------------------
  420|      0|      throw TLS_Exception(Alert::IllegalParameter, "Certificate message contained more than one RawPublicKey");
  421|      0|   }
  422|       |
  423|       |   // Validate the provided (certificate) public key against our policy
  424|    469|   auto pubkey = public_key();
  425|    469|   policy.check_peer_key_acceptable(*pubkey);
  426|       |
  427|    469|   if(!policy.allowed_signature_method(pubkey->algo_name())) {
  ------------------
  |  Branch (427:7): [True: 0, False: 469]
  ------------------
  428|      0|      throw TLS_Exception(Alert::HandshakeFailure, "Rejecting " + pubkey->algo_name() + " signature");
  429|      0|   }
  430|    469|}

_ZN5Botan3TLS22Certificate_Request_13C2ENSt3__14spanIKhLm18446744073709551615EEENS0_15Connection_SideE:
   25|      2|Certificate_Request_13::Certificate_Request_13(std::span<const uint8_t> buf, const Connection_Side side) {
   26|      2|   TLS_Data_Reader reader("Certificate_Request_13", buf);
   27|       |
   28|       |   // RFC 8446 4.3.2
   29|       |   //    A server which is authenticating with a certificate MAY optionally
   30|       |   //    request a certificate from the client.
   31|      2|   if(side != Connection_Side::Server) {
  ------------------
  |  Branch (31:7): [True: 2, False: 0]
  ------------------
   32|      2|      throw TLS_Exception(Alert::UnexpectedMessage, "Received a Certificate_Request message from a client");
   33|      2|   }
   34|       |
   35|      0|   m_context = reader.get_tls_length_value(1);
   36|      0|   m_extensions.deserialize(reader, side, type());
   37|       |
   38|       |   // RFC 8446 4.3.2
   39|       |   //    The "signature_algorithms" extension MUST be specified, and other
   40|       |   //    extensions may optionally be included if defined for this message.
   41|       |   //    Clients MUST ignore unrecognized extensions.
   42|       |
   43|      0|   if(!m_extensions.has<Signature_Algorithms>()) {
  ------------------
  |  Branch (43:7): [True: 0, False: 0]
  ------------------
   44|      0|      throw TLS_Exception(Alert::MissingExtension,
   45|      0|                          "Certificate_Request message did not provide a signature_algorithms extension");
   46|      0|   }
   47|       |
   48|       |   // RFC 8446 4.2.
   49|       |   //    The table below indicates the messages where a given extension may
   50|       |   //    appear [...].  If an implementation receives an extension which it
   51|       |   //    recognizes and which is not specified for the message in which it
   52|       |   //    appears, it MUST abort the handshake with an "illegal_parameter" alert.
   53|       |   //
   54|       |   // For Certificate Request said table states:
   55|       |   //    "status_request", "signature_algorithms", "signed_certificate_timestamp",
   56|       |   //     "certificate_authorities", "oid_filters", "signature_algorithms_cert",
   57|      0|   const std::set<Extension_Code> allowed_extensions = {
   58|      0|      Extension_Code::CertificateStatusRequest,
   59|      0|      Extension_Code::SignatureAlgorithms,
   60|       |      // Extension_Code::SignedCertificateTimestamp,  // NYI
   61|      0|      Extension_Code::CertificateAuthorities,
   62|       |      // Extension_Code::OidFilters,                   // NYI
   63|      0|      Extension_Code::CertSignatureAlgorithms,
   64|      0|   };
   65|       |
   66|      0|   if(m_extensions.contains_implemented_extensions_other_than(allowed_extensions)) {
  ------------------
  |  Branch (66:7): [True: 0, False: 0]
  ------------------
   67|      0|      throw TLS_Exception(Alert::IllegalParameter, "Certificate Request contained an extension that is not allowed");
   68|      0|   }
   69|       |
   70|      0|   reader.assert_done();
   71|      0|}

_ZN5Botan3TLS15Client_Hello_13C2ENSt3__110unique_ptrINS0_21Client_Hello_InternalENS2_14default_deleteIS4_EEEE:
   30|     34|Client_Hello_13::Client_Hello_13(std::unique_ptr<Client_Hello_Internal> data) : Client_Hello(std::move(data)) {
   31|     34|   const auto& exts = m_data->extensions();
   32|       |
   33|       |   // RFC 8446 4.1.2
   34|       |   //    TLS 1.3 ClientHellos are identified as having a legacy_version of
   35|       |   //    0x0303 and a "supported_versions" extension present with 0x0304 as the
   36|       |   //    highest version indicated therein.
   37|       |   //
   38|       |   // Note that we already checked for "supported_versions" before entering this
   39|       |   // c'tor in `Client_Hello_13::parse()`. This is just to be doubly sure.
   40|     34|   BOTAN_ASSERT_NOMSG(exts.has<Supported_Versions>());
  ------------------
  |  |   84|     34|   do {                                                                     \
  |  |   85|     34|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     34|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 34]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     34|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 34]
  |  |  ------------------
  ------------------
   41|       |
   42|       |   // RFC 8446 4.2.1
   43|       |   //    Servers MAY abort the handshake upon receiving a ClientHello with
   44|       |   //    legacy_version 0x0304 or later.
   45|     34|   if(m_data->legacy_version().is_tls_13_or_later()) {
  ------------------
  |  Branch (45:7): [True: 18, False: 16]
  ------------------
   46|     18|      throw TLS_Exception(Alert::DecodeError, "TLS 1.3 Client Hello has invalid legacy_version");
   47|     18|   }
   48|       |
   49|       |   // RFC 8446 D.5
   50|       |   //    Any endpoint receiving a Hello message with ClientHello.legacy_version [...]
   51|       |   //    set to 0x0300 MUST abort the handshake with a "protocol_version" alert.
   52|     16|   if(m_data->legacy_version().major_version() == 3 && m_data->legacy_version().minor_version() == 0) {
  ------------------
  |  Branch (52:7): [True: 1, False: 15]
  |  Branch (52:7): [True: 1, False: 15]
  |  Branch (52:56): [True: 1, False: 0]
  ------------------
   53|      1|      throw TLS_Exception(Alert::ProtocolVersion, "TLS 1.3 Client Hello has invalid legacy_version");
   54|      1|   }
   55|       |
   56|       |   // RFC 8446 4.1.2
   57|       |   //    For every TLS 1.3 ClientHello, [the compression method] MUST contain
   58|       |   //    exactly one byte, set to zero, [...].  If a TLS 1.3 ClientHello is
   59|       |   //    received with any other value in this field, the server MUST abort the
   60|       |   //    handshake with an "illegal_parameter" alert.
   61|     15|   if(m_data->comp_methods().size() != 1 || m_data->comp_methods().front() != 0) {
  ------------------
  |  Branch (61:7): [True: 9, False: 6]
  |  Branch (61:45): [True: 3, False: 3]
  ------------------
   62|     12|      throw TLS_Exception(Alert::IllegalParameter, "Client did not offer NULL compression");
   63|     12|   }
   64|       |
   65|       |   // RFC 8446 4.2.9
   66|       |   //    A client MUST provide a "psk_key_exchange_modes" extension if it
   67|       |   //    offers a "pre_shared_key" extension. If clients offer "pre_shared_key"
   68|       |   //    without a "psk_key_exchange_modes" extension, servers MUST abort
   69|       |   //    the handshake.
   70|      3|   if(exts.has<PSK>()) {
  ------------------
  |  Branch (70:7): [True: 0, False: 3]
  ------------------
   71|      0|      if(!exts.has<PSK_Key_Exchange_Modes>()) {
  ------------------
  |  Branch (71:10): [True: 0, False: 0]
  ------------------
   72|      0|         throw TLS_Exception(Alert::MissingExtension,
   73|      0|                             "Client Hello offered a PSK without a psk_key_exchange_modes extension");
   74|      0|      }
   75|       |
   76|       |      // RFC 8446 4.2.11
   77|       |      //     The "pre_shared_key" extension MUST be the last extension in the
   78|       |      //     ClientHello [...]. Servers MUST check that it is the last extension
   79|       |      //     and otherwise fail the handshake with an "illegal_parameter" alert.
   80|      0|      if(exts.last_added() != Extension_Code::PresharedKey) {
  ------------------
  |  Branch (80:10): [True: 0, False: 0]
  ------------------
   81|      0|         throw TLS_Exception(Alert::IllegalParameter, "PSK extension was not at the very end of the Client Hello");
   82|      0|      }
   83|      0|   }
   84|       |
   85|       |   // RFC 8446 9.2
   86|       |   //    [A TLS 1.3 ClientHello] message MUST meet the following requirements:
   87|       |   //
   88|       |   //     -  If not containing a "pre_shared_key" extension, it MUST contain
   89|       |   //        both a "signature_algorithms" extension and a "supported_groups"
   90|       |   //        extension.
   91|       |   //
   92|       |   //     -  If containing a "supported_groups" extension, it MUST also contain
   93|       |   //        a "key_share" extension, and vice versa.  An empty
   94|       |   //        KeyShare.client_shares vector is permitted.
   95|       |   //
   96|       |   //    Servers receiving a ClientHello which does not conform to these
   97|       |   //    requirements MUST abort the handshake with a "missing_extension"
   98|       |   //    alert.
   99|      3|   if(!exts.has<PSK>()) {
  ------------------
  |  Branch (99:7): [True: 3, False: 0]
  ------------------
  100|      3|      if(!exts.has<Supported_Groups>() || !exts.has<Signature_Algorithms>()) {
  ------------------
  |  Branch (100:10): [True: 1, False: 2]
  |  Branch (100:43): [True: 1, False: 1]
  ------------------
  101|      2|         throw TLS_Exception(
  102|      2|            Alert::MissingExtension,
  103|      2|            "Non-PSK Client Hello did not contain supported_groups and signature_algorithms extensions");
  104|      2|      }
  105|      3|   }
  106|      1|   if(exts.has<Supported_Groups>() != exts.has<Key_Share>()) {
  ------------------
  |  Branch (106:7): [True: 1, False: 0]
  ------------------
  107|      1|      throw TLS_Exception(Alert::MissingExtension,
  108|      1|                          "Client Hello must either contain both key_share and supported_groups extensions or neither");
  109|      1|   }
  110|       |
  111|      0|   if(exts.has<Key_Share>()) {
  ------------------
  |  Branch (111:7): [True: 0, False: 0]
  ------------------
  112|      0|      auto* const supported_ext = exts.get<Supported_Groups>();
  113|      0|      BOTAN_ASSERT_NONNULL(supported_ext);
  ------------------
  |  |  123|      0|   do {                                                                                   \
  |  |  124|      0|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  114|      0|      const auto supports = supported_ext->groups();
  115|      0|      const auto offers = exts.get<Key_Share>()->offered_groups();
  116|       |
  117|       |      // RFC 8446 4.2.8
  118|       |      //    Each KeyShareEntry value MUST correspond to a group offered in the
  119|       |      //    "supported_groups" extension and MUST appear in the same order.
  120|       |      //    [...]
  121|       |      //    Clients MUST NOT offer any KeyShareEntry values for groups not
  122|       |      //    listed in the client's "supported_groups" extension.
  123|       |      //
  124|       |      //    Servers MAY check for violations of these rules and abort the
  125|       |      //    handshake with an "illegal_parameter" alert if one is violated.
  126|       |      //
  127|       |      // Note: We can assume that both `offers` and `supports` are unique lists
  128|       |      //       as this is ensured in the parsing code of the extensions.
  129|       |      //
  130|       |      // Since offers must appear in the same order as supports, a single
  131|       |      // forward sweep of `supports` suffices: after finding each offered group
  132|       |      // we advance past its position so the next offered group is searched for
  133|       |      // only in the remaining suffix.
  134|      0|      auto supports_it = supports.begin();
  135|      0|      for(const auto offered : offers) {
  ------------------
  |  Branch (135:30): [True: 0, False: 0]
  ------------------
  136|      0|         supports_it = std::find(supports_it, supports.end(), offered);
  137|      0|         if(supports_it == supports.end()) {
  ------------------
  |  Branch (137:13): [True: 0, False: 0]
  ------------------
  138|      0|            throw TLS_Exception(Alert::IllegalParameter,
  139|      0|                                "Offered key exchange groups do not align with claimed supported groups");
  140|      0|         }
  141|      0|         ++supports_it;
  142|      0|      }
  143|      0|   }
  144|       |
  145|       |   // TODO: Reject oid_filters extension if found (which is the only known extension that
  146|       |   //       must not occur in the TLS 1.3 client hello.
  147|       |   // RFC 8446 4.2.5
  148|       |   //    [The oid_filters extension] MUST only be sent in the CertificateRequest message.
  149|      0|}
_ZN5Botan3TLS15Client_Hello_135parseENSt3__14spanIKhLm18446744073709551615EEE:
  286|  4.02k|std::variant<Client_Hello_13, Client_Hello_12_Shim> Client_Hello_13::parse(std::span<const uint8_t> buf) {
  287|  4.02k|   auto data = std::make_unique<Client_Hello_Internal>(buf);
  288|  4.02k|   const auto version = data->version();
  289|       |
  290|  4.02k|   if(version.is_pre_tls_13()) {
  ------------------
  |  Branch (290:7): [True: 3.22k, False: 804]
  ------------------
  291|  3.22k|      return Client_Hello_12_Shim(std::move(data));
  292|  3.22k|   } else {
  293|    804|      return Client_Hello_13(std::move(data));
  294|    804|   }
  295|  4.02k|}

_ZN5Botan3TLS20Encrypted_ExtensionsC2ENSt3__14spanIKhLm18446744073709551615EEE:
  134|    632|Encrypted_Extensions::Encrypted_Extensions(std::span<const uint8_t> buf) {
  135|    632|   TLS_Data_Reader reader("encrypted extensions reader", buf);
  136|       |
  137|       |   // Encrypted Extensions contains a list of extensions. This list may legally
  138|       |   // be empty. However, in that case we should at least see a two-byte length
  139|       |   // field that reads 0x00 0x00.
  140|    632|   if(buf.size() < 2) {
  ------------------
  |  Branch (140:7): [True: 4, False: 628]
  ------------------
  141|      4|      throw TLS_Exception(Alert::DecodeError, "Server sent an empty Encrypted Extensions message");
  142|      4|   }
  143|       |
  144|    628|   m_extensions.deserialize(reader, Connection_Side::Server, type());
  145|       |
  146|       |   // RFC 8446 4.2
  147|       |   //    If an implementation receives an extension which it recognizes and
  148|       |   //    which is not specified for the message in which it appears, it MUST
  149|       |   //    abort the handshake with an "illegal_parameter" alert.
  150|       |   //
  151|       |   // Note that we cannot encounter any extensions that we don't recognize here,
  152|       |   // since only extensions we previously offered are allowed in EE.
  153|    628|   const auto allowed_exts = std::set<Extension_Code>{
  154|       |      // Allowed extensions listed in RFC 8446 and implemented in Botan
  155|    628|      Extension_Code::ServerNameIndication,
  156|       |      // MAX_FRAGMENT_LENGTH
  157|    628|      Extension_Code::SupportedGroups,
  158|    628|      Extension_Code::UseSrtp,
  159|       |      // HEARTBEAT
  160|    628|      Extension_Code::ApplicationLayerProtocolNegotiation,
  161|       |      // RFC 7250
  162|    628|      Extension_Code::ClientCertificateType,
  163|    628|      Extension_Code::ServerCertificateType,
  164|       |      // EARLY_DATA
  165|       |
  166|       |      // Allowed extensions not listed in RFC 8446 but acceptable as Botan implements them
  167|    628|      Extension_Code::RecordSizeLimit,
  168|    628|   };
  169|    628|   if(m_extensions.contains_implemented_extensions_other_than(allowed_exts)) {
  ------------------
  |  Branch (169:7): [True: 56, False: 572]
  ------------------
  170|     56|      throw TLS_Exception(Alert::IllegalParameter, "Encrypted Extensions contained an extension that is not allowed");
  171|     56|   }
  172|       |
  173|    572|   reader.assert_done();
  174|    572|}

_ZN5Botan3TLS15Server_Hello_135parseENSt3__14spanIKhLm18446744073709551615EEE:
   85|     92|   std::span<const uint8_t> buf) {
   86|     92|   auto data = std::make_unique<Server_Hello_Internal>(buf);
   87|     92|   const auto version = data->version();
   88|       |
   89|       |   // server hello that appears to be pre-TLS 1.3, takes precedence over...
   90|     92|   if(version.is_pre_tls_13()) {
  ------------------
  |  Branch (90:7): [True: 19, False: 73]
  ------------------
   91|     19|      return Server_Hello_12_Shim(std::move(data));
   92|     19|   }
   93|       |
   94|       |   // ... the TLS 1.3 "special case" aka. Hello_Retry_Request
   95|     73|   if(version == Protocol_Version::TLS_V13) {
  ------------------
  |  Branch (95:7): [True: 19, False: 54]
  ------------------
   96|     19|      if(data->is_hello_retry_request()) {
  ------------------
  |  Branch (96:10): [True: 0, False: 19]
  ------------------
   97|      0|         return Hello_Retry_Request(std::move(data));
   98|      0|      }
   99|       |
  100|     19|      return Server_Hello_13(std::move(data));
  101|     19|   }
  102|       |
  103|     54|   throw TLS_Exception(Alert::ProtocolVersion, "unexpected server hello version: " + version.to_string());
  104|     73|}
_ZNK5Botan3TLS15Server_Hello_1316basic_validationEv:
  109|     19|void Server_Hello_13::basic_validation() const {
  110|     19|   BOTAN_ASSERT_NOMSG(m_data->version() == Protocol_Version::TLS_V13);
  ------------------
  |  |   84|     19|   do {                                                                     \
  |  |   85|     19|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     19|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 19]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     19|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 19]
  |  |  ------------------
  ------------------
  111|       |
  112|       |   // Note: checks that cannot be performed without contextual information
  113|       |   //       are done in the specific TLS client implementation.
  114|       |   // Note: The Supported_Version extension makes sure internally that
  115|       |   //       exactly one entry is provided.
  116|       |
  117|       |   // Note: Hello Retry Request basic validation is equivalent with the
  118|       |   //       basic validations required for Server Hello
  119|       |   //
  120|       |   // RFC 8446 4.1.4
  121|       |   //    Upon receipt of a HelloRetryRequest, the client MUST check the
  122|       |   //    legacy_version, [...], and legacy_compression_method as specified in
  123|       |   //    Section 4.1.3 and then process the extensions, starting with determining
  124|       |   //    the version using "supported_versions".
  125|       |
  126|       |   // RFC 8446 4.1.3
  127|       |   //    In TLS 1.3, [...] the legacy_version field MUST be set to 0x0303
  128|     19|   if(legacy_version() != Protocol_Version::TLS_V12) {
  ------------------
  |  Branch (128:7): [True: 8, False: 11]
  ------------------
  129|      8|      throw TLS_Exception(Alert::ProtocolVersion,
  130|      8|                          "legacy_version '" + legacy_version().to_string() + "' is not allowed");
  131|      8|   }
  132|       |
  133|       |   // RFC 8446 4.1.3
  134|       |   //    legacy_compression_method:  A single byte which MUST have the value 0.
  135|     11|   if(compression_method() != 0x00) {
  ------------------
  |  Branch (135:7): [True: 1, False: 10]
  ------------------
  136|      1|      throw TLS_Exception(Alert::DecodeError, "compression is not supported in TLS 1.3");
  137|      1|   }
  138|       |
  139|       |   // RFC 8446 4.1.3
  140|       |   //    All TLS 1.3 ServerHello messages MUST contain the "supported_versions" extension.
  141|     10|   if(!extensions().has<Supported_Versions>()) {
  ------------------
  |  Branch (141:7): [True: 0, False: 10]
  ------------------
  142|      0|      throw TLS_Exception(Alert::MissingExtension, "server hello did not contain 'supported version' extension");
  143|      0|   }
  144|       |
  145|       |   // RFC 8446 4.2.1
  146|       |   //    A server which negotiates TLS 1.3 MUST respond by sending
  147|       |   //    a "supported_versions" extension containing the selected version
  148|       |   //    value (0x0304).
  149|     10|   if(selected_version() != Protocol_Version::TLS_V13) {
  ------------------
  |  Branch (149:7): [True: 9, False: 1]
  ------------------
  150|      9|      throw TLS_Exception(Alert::IllegalParameter, "TLS 1.3 Server Hello selected a different version");
  151|      9|   }
  152|     10|}
_ZN5Botan3TLS15Server_Hello_13C2ENSt3__110unique_ptrINS0_21Server_Hello_InternalENS2_14default_deleteIS4_EEEENS1_16Server_Hello_TagE:
  156|     19|      Server_Hello(std::move(data)) {
  157|     19|   BOTAN_ASSERT_NOMSG(!m_data->is_hello_retry_request());
  ------------------
  |  |   84|     19|   do {                                                                     \
  |  |   85|     19|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     19|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 19]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     19|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 19]
  |  |  ------------------
  ------------------
  158|     19|   basic_validation();
  159|       |
  160|     19|   const auto& exts = extensions();
  161|       |
  162|       |   // RFC 8446 4.1.3
  163|       |   //    The ServerHello MUST only include extensions which are required to
  164|       |   //    establish the cryptographic context and negotiate the protocol version.
  165|       |   //    [...]
  166|       |   //    Other extensions (see Section 4.2) are sent separately in the
  167|       |   //    EncryptedExtensions message.
  168|       |   //
  169|       |   // Note that further validation dependent on the client hello is done in the
  170|       |   // TLS client implementation.
  171|     19|   const std::set<Extension_Code> allowed = {
  172|     19|      Extension_Code::KeyShare,
  173|     19|      Extension_Code::SupportedVersions,
  174|     19|      Extension_Code::PresharedKey,
  175|     19|   };
  176|       |
  177|       |   // As the ServerHello shall only contain essential extensions, we don't give
  178|       |   // any slack for extensions not implemented by Botan here.
  179|     19|   if(exts.contains_other_than(allowed)) {
  ------------------
  |  Branch (179:7): [True: 1, False: 18]
  ------------------
  180|      1|      throw TLS_Exception(Alert::UnsupportedExtension, "Server Hello contained an extension that is not allowed");
  181|      1|   }
  182|       |
  183|       |   // RFC 8446 4.1.3
  184|       |   //    Current ServerHello messages additionally contain
  185|       |   //    either the "pre_shared_key" extension or the "key_share"
  186|       |   //    extension, or both [...].
  187|     18|   if(!exts.has<Key_Share>() && !exts.has<PSK>()) {
  ------------------
  |  Branch (187:7): [True: 0, False: 18]
  |  Branch (187:33): [True: 0, False: 0]
  ------------------
  188|      0|      throw TLS_Exception(Alert::MissingExtension, "server hello must contain key exchange information");
  189|      0|   }
  190|     18|}
_ZNK5Botan3TLS15Server_Hello_1316selected_versionEv:
  353|     10|Protocol_Version Server_Hello_13::selected_version() const {
  354|     10|   auto* const versions_ext = m_data->extensions().get<Supported_Versions>();
  355|     10|   BOTAN_ASSERT_NOMSG(versions_ext);
  ------------------
  |  |   84|     10|   do {                                                                     \
  |  |   85|     10|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     10|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 10]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     10|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 10]
  |  |  ------------------
  ------------------
  356|     10|   const auto& versions = versions_ext->versions();
  357|     10|   BOTAN_ASSERT_NOMSG(versions.size() == 1);
  ------------------
  |  |   84|     10|   do {                                                                     \
  |  |   85|     10|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     10|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 10]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     10|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 10]
  |  |  ------------------
  ------------------
  358|     10|   return versions.front();
  359|     10|}

_ZN5Botan3TLS15Channel_Impl_13C2ERKNSt3__110shared_ptrINS0_9CallbacksEEERKNS3_INS0_15Session_ManagerEEERKNS3_INS_19Credentials_ManagerEEERKNS3_INS_21RandomNumberGeneratorEEERKNS3_IKNS0_6PolicyEEEb:
   42|  5.71k|      m_side(is_server ? Connection_Side::Server : Connection_Side::Client),
  ------------------
  |  Branch (42:14): [True: 5.71k, False: 0]
  ------------------
   43|  5.71k|      m_callbacks(callbacks),
   44|  5.71k|      m_session_manager(session_manager),
   45|  5.71k|      m_credentials_manager(credentials_manager),
   46|  5.71k|      m_rng(rng),
   47|  5.71k|      m_policy(policy),
   48|  5.71k|      m_record_layer(m_side, m_policy),
   49|  5.71k|      m_handshake_layer(m_side),
   50|  5.71k|      m_can_read(true),
   51|  5.71k|      m_can_write(true),
   52|  5.71k|      m_opportunistic_key_update(false),
   53|  5.71k|      m_key_update_requested(false),
   54|  5.71k|      m_first_message_sent(false),
   55|  5.71k|      m_first_message_received(false) {
   56|  5.71k|   BOTAN_ASSERT_NONNULL(m_callbacks);
  ------------------
  |  |  123|  5.71k|   do {                                                                                   \
  |  |  124|  5.71k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 5.71k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  5.71k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 5.71k]
  |  |  ------------------
  ------------------
   57|  5.71k|   BOTAN_ASSERT_NONNULL(m_session_manager);
  ------------------
  |  |  123|  5.71k|   do {                                                                                   \
  |  |  124|  5.71k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 5.71k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  5.71k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 5.71k]
  |  |  ------------------
  ------------------
   58|  5.71k|   BOTAN_ASSERT_NONNULL(m_credentials_manager);
  ------------------
  |  |  123|  5.71k|   do {                                                                                   \
  |  |  124|  5.71k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 5.71k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  5.71k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 5.71k]
  |  |  ------------------
  ------------------
   59|  5.71k|   BOTAN_ASSERT_NONNULL(m_rng);
  ------------------
  |  |  123|  5.71k|   do {                                                                                   \
  |  |  124|  5.71k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 5.71k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  5.71k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 5.71k]
  |  |  ------------------
  ------------------
   60|  5.71k|   BOTAN_ASSERT_NONNULL(m_policy);
  ------------------
  |  |  123|  5.71k|   do {                                                                                   \
  |  |  124|  5.71k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 5.71k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  5.71k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 5.71k]
  |  |  ------------------
  ------------------
   61|  5.71k|}
_ZN5Botan3TLS15Channel_Impl_13D2Ev:
   63|  5.71k|Channel_Impl_13::~Channel_Impl_13() = default;
_ZN5Botan3TLS15Channel_Impl_139from_peerENSt3__14spanIKhLm18446744073709551615EEE:
   65|  5.71k|size_t Channel_Impl_13::from_peer(std::span<const uint8_t> data) {
   66|  5.71k|   BOTAN_STATE_CHECK(!is_downgrading());
  ------------------
  |  |   51|  5.71k|   do {                                                         \
  |  |   52|  5.71k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  5.71k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 5.71k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  5.71k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 5.71k]
  |  |  ------------------
  ------------------
   67|       |
   68|       |   // RFC 8446 6.1
   69|       |   //    Any data received after a closure alert has been received MUST be ignored.
   70|  5.71k|   if(!m_can_read) {
  ------------------
  |  Branch (70:7): [True: 0, False: 5.71k]
  ------------------
   71|      0|      return 0;
   72|      0|   }
   73|       |
   74|  5.71k|   try {
   75|  5.71k|#if defined(BOTAN_HAS_TLS_DOWNGRADE_SUPPORT)
   76|  5.71k|      if(expects_downgrade()) {
  ------------------
  |  Branch (76:10): [True: 5.71k, False: 0]
  ------------------
   77|  5.71k|         preserve_peer_transcript(data);
   78|  5.71k|      }
   79|  5.71k|#endif
   80|       |
   81|  5.71k|      m_record_layer.copy_data(data);
   82|       |
   83|  24.0k|      while(true) {
  ------------------
  |  Branch (83:13): [True: 21.7k, Folded]
  ------------------
   84|       |         // RFC 8446 6.1
   85|       |         //    Any data received after a closure alert has been received MUST be ignored.
   86|       |         //
   87|       |         // ... this data might already be in the record layer's read buffer.
   88|  21.7k|         if(!m_can_read) {
  ------------------
  |  Branch (88:13): [True: 12, False: 21.7k]
  ------------------
   89|     12|            return 0;
   90|     12|         }
   91|       |
   92|  21.7k|         auto result = m_record_layer.next_record(m_cipher_state.get());
   93|       |
   94|  21.7k|         if(std::holds_alternative<BytesNeeded>(result)) {
  ------------------
  |  Branch (94:13): [True: 209, False: 21.5k]
  ------------------
   95|    209|            return std::get<BytesNeeded>(result);
   96|    209|         }
   97|       |
   98|  21.5k|         const auto& record = std::get<Record_Content>(result);
   99|       |
  100|       |         // RFC 8446 5.1
  101|       |         //   Handshake messages MUST NOT be interleaved with other record types.
  102|  21.5k|         if(record.type != Record_Type::Handshake && m_handshake_layer.has_pending_data()) {
  ------------------
  |  Branch (102:13): [True: 814, False: 20.7k]
  |  Branch (102:54): [True: 12, False: 802]
  ------------------
  103|     12|            throw Unexpected_Message("Expected remainder of a handshake message");
  104|     12|         }
  105|       |
  106|  21.5k|         if(record.type == Record_Type::Handshake) {
  ------------------
  |  Branch (106:13): [True: 20.7k, False: 832]
  ------------------
  107|  20.7k|            m_handshake_layer.copy_data(record.payload);
  108|       |
  109|  20.7k|            if(!is_handshake_complete()) {
  ------------------
  |  Branch (109:16): [True: 20.7k, False: 0]
  ------------------
  110|  20.9k|               while(auto handshake_msg = m_handshake_layer.next_message(policy(), m_transcript_hash)) {
  ------------------
  |  Branch (110:27): [True: 3.42k, False: 17.4k]
  ------------------
  111|       |                  // RFC 8446 5.1
  112|       |                  //    Handshake messages MUST NOT span key changes.  Implementations
  113|       |                  //    MUST verify that all messages immediately preceding a key change
  114|       |                  //    align with a record boundary; if not, then they MUST terminate the
  115|       |                  //    connection with an "unexpected_message" alert.  Because the
  116|       |                  //    ClientHello, EndOfEarlyData, ServerHello, Finished, and KeyUpdate
  117|       |                  //    messages can immediately precede a key change, implementations
  118|       |                  //    MUST send these messages in alignment with a record boundary.
  119|       |                  //
  120|       |                  // Note: Hello_Retry_Request was added to the list below although it cannot immediately precede a key change.
  121|       |                  //       However, there cannot be any further sensible messages in the record after HRR.
  122|       |                  //
  123|       |                  // Note: Server_Hello_12 was deliberately not included in the check below because in TLS 1.2 Server Hello and
  124|       |                  //       other handshake messages can be legally coalesced in a single record.
  125|       |                  //
  126|  3.42k|                  if(holds_any_of<Client_Hello_12_Shim,
  ------------------
  |  Branch (126:22): [True: 3.23k, False: 193]
  ------------------
  127|  3.42k|                                  Client_Hello_13 /*, EndOfEarlyData,*/,
  128|  3.42k|                                  Server_Hello_13,
  129|  3.42k|                                  Hello_Retry_Request,
  130|  3.42k|                                  Finished_13>(handshake_msg.value()) &&
  131|  3.23k|                     m_handshake_layer.has_pending_data()) {
  ------------------
  |  Branch (131:22): [True: 14, False: 3.21k]
  ------------------
  132|     14|                     throw Unexpected_Message("Unexpected additional handshake message data found in record");
  133|     14|                  }
  134|       |
  135|  3.40k|                  process_handshake_msg(std::move(handshake_msg.value()));
  136|       |
  137|  3.40k|#if defined(BOTAN_HAS_TLS_DOWNGRADE_SUPPORT)
  138|  3.40k|                  if(is_downgrading()) {
  ------------------
  |  Branch (138:22): [True: 3.21k, False: 196]
  ------------------
  139|       |                     // Downgrade to TLS 1.2 was detected. Stop everything we do and await being replaced by a 1.2 implementation.
  140|  3.21k|                     return 0;
  141|  3.21k|                  } else if(m_downgrade_info != nullptr) {
  ------------------
  |  Branch (141:29): [True: 0, False: 196]
  ------------------
  142|       |                     // We received a TLS 1.3 error alert that could have been a TLS 1.2 warning alert.
  143|       |                     // Now that we know that we are talking to a TLS 1.3 server, shut down.
  144|      0|                     if(m_downgrade_info->received_tls_13_error_alert) {
  ------------------
  |  Branch (144:25): [True: 0, False: 0]
  ------------------
  145|      0|                        shutdown();
  146|      0|                     }
  147|       |
  148|       |                     // Downgrade can only be indicated in the first received peer message. This was not the case.
  149|      0|                     m_downgrade_info.reset();
  150|      0|                  }
  151|    196|#endif
  152|       |
  153|       |                  // After the initial handshake message is received, the record
  154|       |                  // layer must be more restrictive.
  155|       |                  // See RFC 8446 5.1 regarding "legacy_record_version"
  156|    196|                  if(!m_first_message_received) {
  ------------------
  |  Branch (156:22): [True: 0, False: 196]
  ------------------
  157|      0|                     m_record_layer.disable_receiving_compat_mode();
  158|      0|                     m_first_message_received = true;
  159|      0|                  }
  160|    196|               }
  161|  20.7k|            } else {
  162|      0|               while(auto handshake_msg = m_handshake_layer.next_post_handshake_message(policy())) {
  ------------------
  |  Branch (162:27): [True: 0, False: 0]
  ------------------
  163|      0|                  process_post_handshake_msg(std::move(handshake_msg.value()));
  164|      0|               }
  165|      0|            }
  166|  20.7k|         } else if(record.type == Record_Type::ChangeCipherSpec) {
  ------------------
  |  Branch (166:20): [True: 2, False: 830]
  ------------------
  167|      2|            process_dummy_change_cipher_spec();
  168|    830|         } else if(record.type == Record_Type::ApplicationData) {
  ------------------
  |  Branch (168:20): [True: 0, False: 830]
  ------------------
  169|      0|            BOTAN_ASSERT_NONNULL(m_cipher_state);
  ------------------
  |  |  123|      0|   do {                                                                                   \
  |  |  124|      0|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  170|      0|            if(!m_cipher_state->can_decrypt_application_traffic()) {
  ------------------
  |  Branch (170:16): [True: 0, False: 0]
  ------------------
  171|      0|               throw Unexpected_Message("Application data received before handshake completion");
  172|      0|            }
  173|       |            /*
  174|       |            The record sequence number is set in Record_Layer::next_record only when
  175|       |            the record contents are decrypted under the current set of traffic keys
  176|       |            */
  177|      0|            if(!record.sequence_number.has_value()) {
  ------------------
  |  Branch (177:16): [True: 0, False: 0]
  ------------------
  178|      0|               throw Unexpected_Message("Application data must have a sequence number");
  179|      0|            }
  180|      0|            callbacks().tls_record_received(record.sequence_number.value(), record.payload);
  181|    830|         } else if(record.type == Record_Type::Alert) {
  ------------------
  |  Branch (181:20): [True: 800, False: 30]
  ------------------
  182|    800|            process_alert(record.payload);
  183|    800|         } else {
  184|     30|            throw Unexpected_Message("Unexpected record type " + std::to_string(static_cast<size_t>(record.type)) +
  185|     30|                                     " from counterparty");
  186|     30|         }
  187|  21.5k|      }
  188|  5.71k|   } catch(TLS_Exception& e) {
  189|  1.13k|      send_fatal_alert(e.type());
  190|  1.13k|      throw;
  191|  1.13k|   } catch(Invalid_Authentication_Tag&) {
  192|       |      // RFC 8446 5.2
  193|       |      //    If the decryption fails, the receiver MUST terminate the connection
  194|       |      //    with a "bad_record_mac" alert.
  195|      0|      send_fatal_alert(Alert::BadRecordMac);
  196|      0|      throw;
  197|  1.14k|   } catch(Decoding_Error&) {
  198|  1.14k|      send_fatal_alert(Alert::DecodeError);
  199|  1.14k|      throw;
  200|  1.14k|   } catch(...) {
  201|      3|      send_fatal_alert(Alert::InternalError);
  202|      3|      throw;
  203|      3|   }
  204|  5.71k|}
_ZN5Botan3TLS15Channel_Impl_1310send_alertERKNS0_5AlertE:
  356|  2.29k|void Channel_Impl_13::send_alert(const Alert& alert) {
  357|  2.29k|   if(alert.is_valid() && m_can_write) {
  ------------------
  |  Branch (357:7): [True: 2.29k, False: 0]
  |  Branch (357:27): [True: 2.28k, False: 1]
  ------------------
  358|  2.28k|      try {
  359|  2.28k|         maybe_handle_compatibility_mode(Compat_Mode_Situation::BeforeSendingAlert);
  360|  2.28k|         send_record(Record_Type::Alert, alert.serialize());
  361|  2.28k|      } catch(...) { /* swallow it */
  362|      0|      }
  363|  2.28k|   }
  364|       |
  365|       |   // Note: In TLS 1.3 sending a CloseNotify must not immediately lead to closing the reading end.
  366|       |   // RFC 8446 6.1
  367|       |   //    Each party MUST send a "close_notify" alert before closing its write
  368|       |   //    side of the connection, unless it has already sent some error alert.
  369|       |   //    This does not have any effect on its read side of the connection.
  370|  2.29k|   if(is_close_notify_alert(alert) && m_can_write) {
  ------------------
  |  Branch (370:7): [True: 7, False: 2.28k]
  |  Branch (370:39): [True: 6, False: 1]
  ------------------
  371|      6|      m_can_write = false;
  372|      6|      if(m_cipher_state) {
  ------------------
  |  Branch (372:10): [True: 0, False: 6]
  ------------------
  373|      0|         m_cipher_state->clear_write_keys();
  374|      0|      }
  375|      6|   }
  376|       |
  377|  2.29k|   if(is_error_alert(alert)) {
  ------------------
  |  Branch (377:7): [True: 2.28k, False: 7]
  ------------------
  378|  2.28k|      shutdown();
  379|  2.28k|   }
  380|  2.29k|}
_ZN5Botan3TLS15Channel_Impl_1311send_recordENS0_11Record_TypeERKNSt3__16vectorIhNS3_9allocatorIhEEEE:
  405|  2.28k|void Channel_Impl_13::send_record(Record_Type type, const std::vector<uint8_t>& record) {
  406|  2.28k|   BOTAN_STATE_CHECK(!is_downgrading());
  ------------------
  |  |   51|  2.28k|   do {                                                         \
  |  |   52|  2.28k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  2.28k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 2.28k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  2.28k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 2.28k]
  |  |  ------------------
  ------------------
  407|  2.28k|   BOTAN_STATE_CHECK(m_can_write);
  ------------------
  |  |   51|  2.28k|   do {                                                         \
  |  |   52|  2.28k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  2.28k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 2.28k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  2.28k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 2.28k]
  |  |  ------------------
  ------------------
  408|       |
  409|       |   // RFC 9846 5.
  410|       |   //    An implementation which [...] receives a protected change_cipher_spec
  411|       |   //    record MUST abort the handshake [...].
  412|       |   //
  413|       |   // I.e. Change Cipher Spec records must always be sent unprotected, even if
  414|       |   // the cipher state is already set up for handshake message encryption.
  415|  2.28k|   auto* cipher_state = (type != Record_Type::ChangeCipherSpec) ? m_cipher_state.get() : nullptr;
  ------------------
  |  Branch (415:25): [True: 2.28k, False: 0]
  ------------------
  416|       |
  417|  2.28k|   auto to_write = m_record_layer.prepare_records(type, record, cipher_state);
  418|       |
  419|       |   // After the initial handshake message is sent, the record layer must
  420|       |   // adhere to a more strict record specification. Note that for the
  421|       |   // server case this is a NOOP.
  422|       |   // See (RFC 8446 5.1. regarding "legacy_record_version")
  423|  2.28k|   if(!m_first_message_sent && type == Record_Type::Handshake) {
  ------------------
  |  Branch (423:7): [True: 2.28k, False: 0]
  |  Branch (423:32): [True: 0, False: 2.28k]
  ------------------
  424|      0|      m_record_layer.disable_sending_compat_mode();
  425|      0|      m_first_message_sent = true;
  426|      0|   }
  427|       |
  428|  2.28k|   callbacks().tls_emit_data(to_write);
  429|  2.28k|}
_ZN5Botan3TLS15Channel_Impl_1313process_alertERKNSt3__16vectorIhNS_16secure_allocatorIhEEEE:
  431|    800|void Channel_Impl_13::process_alert(const secure_vector<uint8_t>& record) {
  432|    800|   const Alert alert(record);
  433|       |
  434|    800|   if(is_close_notify_alert(alert)) {
  ------------------
  |  Branch (434:7): [True: 7, False: 793]
  ------------------
  435|      7|      m_can_read = false;
  436|      7|      if(m_cipher_state) {
  ------------------
  |  Branch (436:10): [True: 0, False: 7]
  ------------------
  437|      0|         m_cipher_state->clear_read_keys();
  438|      0|      }
  439|      7|      m_record_layer.clear_read_buffer();
  440|      7|   }
  441|       |
  442|       |   // user canceled alerts are ignored
  443|       |
  444|       |   // RFC 8446 5.
  445|       |   //    All the alerts listed in Section 6.2 MUST be sent with
  446|       |   //    AlertLevel=fatal and MUST be treated as error alerts when received
  447|       |   //    regardless of the AlertLevel in the message.  Unknown Alert types
  448|       |   //    MUST be treated as error alerts.
  449|    800|   if(is_error_alert(alert) && !alert.is_fatal()) {
  ------------------
  |  Branch (449:7): [True: 452, False: 348]
  |  Branch (449:32): [True: 448, False: 4]
  ------------------
  450|    448|      if(!expects_downgrade()) {
  ------------------
  |  Branch (450:10): [True: 0, False: 448]
  ------------------
  451|      0|         throw TLS_Exception(Alert::DecodeError, "Error alert not marked fatal");
  452|      0|      }
  453|       |
  454|    448|#if defined(BOTAN_HAS_TLS_DOWNGRADE_SUPPORT)
  455|    448|      BOTAN_DEBUG_ASSERT(expects_downgrade());
  ------------------
  |  |  137|    448|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|    448|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 448]
  |  |  ------------------
  ------------------
  456|       |
  457|       |      // In TLS 1.2 error alerts might be marked as 'warnings' and would not
  458|       |      // demand an immediate shutdown. Until we are sure to talk to a TLS 1.3
  459|       |      // peer we must defer the shutdown and refrain from raising a decode
  460|       |      // error.
  461|    448|      m_downgrade_info->received_tls_13_error_alert = true;
  462|    448|#endif
  463|    448|   }
  464|       |
  465|    800|   if(alert.is_fatal()) {
  ------------------
  |  Branch (465:7): [True: 6, False: 794]
  ------------------
  466|      6|      shutdown();
  467|      6|   }
  468|       |
  469|    800|   callbacks().tls_alert(alert);
  470|       |
  471|       |   // Respond with our "close_notify" if the application requests us to.
  472|    800|   if(is_close_notify_alert(alert) && callbacks().tls_peer_closed_connection()) {
  ------------------
  |  Branch (472:7): [True: 7, False: 793]
  |  Branch (472:39): [True: 7, False: 0]
  ------------------
  473|      7|      close();
  474|      7|   }
  475|    800|}
_ZN5Botan3TLS15Channel_Impl_138shutdownEv:
  477|  2.28k|void Channel_Impl_13::shutdown() {
  478|       |   // RFC 8446 6.2
  479|       |   //    Upon transmission or receipt of a fatal alert message, both
  480|       |   //    parties MUST immediately close the connection.
  481|  2.28k|   m_can_read = false;
  482|  2.28k|   m_can_write = false;
  483|  2.28k|   m_cipher_state.reset();
  484|  2.28k|   m_active_state.reset();
  485|  2.28k|}
_ZN5Botan3TLS15Channel_Impl_1316expect_downgradeERKNS0_18Server_InformationERKNSt3__16vectorINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEENSA_ISC_EEEE:
  490|  5.71k|                                       const std::vector<std::string>& next_protocols) {
  491|  5.71k|   Downgrade_Information di{
  492|  5.71k|      {},
  493|  5.71k|      {},
  494|  5.71k|      {},
  495|  5.71k|      server_info,
  496|  5.71k|      next_protocols,
  497|  5.71k|      Botan::TLS::Channel::IO_BUF_DEFAULT_SIZE,
  498|  5.71k|      m_callbacks,
  499|  5.71k|      m_session_manager,
  500|  5.71k|      m_credentials_manager,
  501|  5.71k|      m_rng,
  502|  5.71k|      m_policy,
  503|  5.71k|      false,  // received_tls_13_error_alert
  504|  5.71k|      false   // will_downgrade
  505|  5.71k|   };
  506|  5.71k|   m_downgrade_info = std::make_unique<Downgrade_Information>(std::move(di));
  507|  5.71k|}
tls_channel_impl_13.cpp:_ZN12_GLOBAL__N_121is_close_notify_alertERKN5Botan3TLS5AlertE:
   23|  6.92k|bool is_close_notify_alert(const Botan::TLS::Alert& alert) {
   24|  6.92k|   return alert.type() == Botan::TLS::Alert::CloseNotify;
   25|  6.92k|}
tls_channel_impl_13.cpp:_ZN12_GLOBAL__N_114is_error_alertERKN5Botan3TLS5AlertE:
   27|  3.07k|bool is_error_alert(const Botan::TLS::Alert& alert) {
   28|       |   // In TLS 1.3 all alerts except for closure alerts are considered error alerts.
   29|       |   // (RFC 8446 6.)
   30|  3.07k|   return !is_close_notify_alert(alert) && !is_user_canceled_alert(alert);
  ------------------
  |  Branch (30:11): [True: 3.05k, False: 14]
  |  Branch (30:44): [True: 2.73k, False: 324]
  ------------------
   31|  3.07k|}
tls_channel_impl_13.cpp:_ZN12_GLOBAL__N_122is_user_canceled_alertERKN5Botan3TLS5AlertE:
   19|  3.05k|bool is_user_canceled_alert(const Botan::TLS::Alert& alert) {
   20|  3.05k|   return alert.type() == Botan::TLS::Alert::UserCanceled;
   21|  3.05k|}

_ZN5Botan3TLS6CookieC2ERNS0_15TLS_Data_ReaderEt:
   26|     37|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|     37|   if(extension_size < 3) {
  ------------------
  |  Branch (34:7): [True: 1, False: 36]
  ------------------
   35|      1|      throw Decoding_Error("Empty cookie extension is illegal");
   36|      1|   }
   37|       |
   38|     36|   const uint16_t len = reader.get_uint16_t();
   39|       |
   40|     36|   if(static_cast<size_t>(len) + 2 != extension_size) {
  ------------------
  |  Branch (40:7): [True: 20, False: 16]
  ------------------
   41|     20|      throw Decoding_Error("Inconsistent length in cookie extension");
   42|     20|   }
   43|       |
   44|     16|   m_cookie = reader.get_fixed<uint8_t>(len);
   45|     16|}
_ZN5Botan3TLS22PSK_Key_Exchange_ModesC2ERNS0_15TLS_Data_ReaderEt:
   65|     55|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|     55|   if(extension_size < 2) {
  ------------------
  |  Branch (73:7): [True: 1, False: 54]
  ------------------
   74|      1|      throw Decoding_Error("Empty psk_key_exchange_modes extension is illegal");
   75|      1|   }
   76|       |
   77|     54|   const auto mode_count = reader.get_byte();
   78|     54|   if(static_cast<size_t>(mode_count) + 1 != extension_size) {
  ------------------
  |  Branch (78:7): [True: 1, False: 53]
  ------------------
   79|      1|      throw Decoding_Error("Inconsistent length in psk_key_exchange_modes extension");
   80|      1|   }
   81|       |
   82|  1.72k|   for(uint16_t i = 0; i < mode_count; ++i) {
  ------------------
  |  Branch (82:24): [True: 1.66k, False: 53]
  ------------------
   83|  1.66k|      const auto mode = static_cast<PSK_Key_Exchange_Mode>(reader.get_byte());
   84|  1.66k|      if(mode == PSK_Key_Exchange_Mode::PSK_KE || mode == PSK_Key_Exchange_Mode::PSK_DHE_KE) {
  ------------------
  |  Branch (84:10): [True: 563, False: 1.10k]
  |  Branch (84:51): [True: 363, False: 742]
  ------------------
   85|    926|         m_modes.push_back(mode);
   86|    926|      }
   87|  1.66k|   }
   88|     53|}
_ZN5Botan3TLS23Certificate_AuthoritiesC2ERNS0_15TLS_Data_ReaderEt:
  106|    649|Certificate_Authorities::Certificate_Authorities(TLS_Data_Reader& reader, uint16_t extension_size) {
  107|    649|   if(extension_size < 2) {
  ------------------
  |  Branch (107:7): [True: 2, False: 647]
  ------------------
  108|      2|      throw Decoding_Error("Empty certificate_authorities extension is illegal");
  109|      2|   }
  110|       |
  111|    647|   const uint16_t purported_size = reader.get_uint16_t();
  112|       |
  113|    647|   if(reader.remaining_bytes() != purported_size) {
  ------------------
  |  Branch (113:7): [True: 7, False: 640]
  ------------------
  114|      7|      throw Decoding_Error("Inconsistent length in certificate_authorities extension");
  115|      7|   }
  116|       |
  117|       |   // RFC 8446 4.2.4: DistinguishedName authorities<3..2^16-1>;
  118|    640|   if(purported_size < 3) {
  ------------------
  |  Branch (118:7): [True: 1, False: 639]
  ------------------
  119|      1|      throw Decoding_Error("Empty certificate_authorities list is illegal");
  120|      1|   }
  121|       |
  122|  1.31k|   while(reader.has_remaining()) {
  ------------------
  |  Branch (122:10): [True: 676, False: 639]
  ------------------
  123|       |      // RFC 8446 4.2.4: opaque DistinguishedName<1..2^16-1>
  124|    676|      const std::vector<uint8_t> name_bits = reader.get_range<uint8_t>(2, 1, 65535);
  125|       |
  126|    676|      BER_Decoder decoder(name_bits, BER_Decoder::Limits::DER());
  127|    676|      m_distinguished_names.emplace_back();
  128|    676|      decoder.decode(m_distinguished_names.back()).verify_end();
  129|    676|   }
  130|    639|}
_ZN5Botan3TLS19EarlyDataIndicationC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeE:
  149|     59|                                         Handshake_Type message_type) {
  150|     59|   if(message_type == Handshake_Type::NewSessionTicket) {
  ------------------
  |  Branch (150:7): [True: 0, False: 59]
  ------------------
  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|     59|   } else if(extension_size != 0) {
  ------------------
  |  Branch (158:14): [True: 3, False: 56]
  ------------------
  159|      3|      throw TLS_Exception(Alert::DecodeError,
  160|      3|                          "Received an early_data extension containing an unexpected data "
  161|      3|                          "size indication");
  162|      3|   }
  163|     59|}
_ZNK5Botan3TLS19EarlyDataIndication5emptyEv:
  165|     14|bool EarlyDataIndication::empty() const {
  166|       |   // This extension may be empty by definition but still carry information
  167|     14|   return false;
  168|     14|}

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

_ZN5Botan3TLS3PSKC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeE:
  142|     86|PSK::PSK(TLS_Data_Reader& reader, uint16_t extension_size, Handshake_Type message_type) {
  143|     86|   if(message_type == Handshake_Type::ServerHello) {
  ------------------
  |  Branch (143:7): [True: 3, False: 83]
  ------------------
  144|      3|      if(extension_size != 2) {
  ------------------
  |  Branch (144:10): [True: 1, False: 2]
  ------------------
  145|      1|         throw TLS_Exception(Alert::DecodeError, "Server provided a malformed PSK extension");
  146|      1|      }
  147|       |
  148|      2|      const uint16_t selected_id = reader.get_uint16_t();
  149|      2|      m_impl = std::make_unique<PSK_Internal>(Server_PSK(selected_id));
  150|     83|   } else if(message_type == Handshake_Type::ClientHello) {
  ------------------
  |  Branch (150:14): [True: 79, False: 4]
  ------------------
  151|     79|      const auto identities_length = reader.get_uint16_t();
  152|     79|      const auto identities_offset = reader.read_so_far();
  153|       |
  154|     79|      std::vector<PskIdentity> psk_identities;
  155|    638|      while(reader.has_remaining() && (reader.read_so_far() - identities_offset) < identities_length) {
  ------------------
  |  Branch (155:13): [True: 605, False: 33]
  |  Branch (155:39): [True: 559, False: 46]
  ------------------
  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|    559|         auto identity = reader.get_tls_length_value(2);
  168|    559|         const auto obfuscated_ticket_age = reader.get_uint32_t();
  169|    559|         psk_identities.emplace_back(std::move(identity), obfuscated_ticket_age);
  170|    559|      }
  171|       |
  172|     79|      if(psk_identities.empty()) {
  ------------------
  |  Branch (172:10): [True: 1, False: 78]
  ------------------
  173|      1|         throw TLS_Exception(Alert::DecodeError, "Empty PSK list");
  174|      1|      }
  175|       |
  176|     78|      if(reader.read_so_far() - identities_offset != identities_length) {
  ------------------
  |  Branch (176:10): [True: 19, False: 59]
  ------------------
  177|     19|         throw TLS_Exception(Alert::DecodeError, "Inconsistent PSK identity list");
  178|     19|      }
  179|       |
  180|     59|      const auto binders_length = reader.get_uint16_t();
  181|     59|      const auto binders_offset = reader.read_so_far();
  182|       |
  183|     59|      if(binders_length == 0) {
  ------------------
  |  Branch (183:10): [True: 1, False: 58]
  ------------------
  184|      1|         throw TLS_Exception(Alert::DecodeError, "Empty PSK binders list");
  185|      1|      }
  186|       |
  187|     58|      std::vector<Client_PSK> psks;
  188|    269|      for(auto& psk_identity : psk_identities) {
  ------------------
  |  Branch (188:30): [True: 269, False: 54]
  ------------------
  189|    269|         if(!reader.has_remaining() || reader.read_so_far() - binders_offset >= binders_length) {
  ------------------
  |  Branch (189:13): [True: 2, False: 267]
  |  Branch (189:40): [True: 2, False: 265]
  ------------------
  190|      4|            throw TLS_Exception(Alert::IllegalParameter, "Not enough PSK binders");
  191|      4|         }
  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|    265|         psks.emplace_back(std::move(psk_identity), reader.get_tls_length_value(1));
  199|    265|      }
  200|       |
  201|     54|      if(reader.read_so_far() - binders_offset != binders_length) {
  ------------------
  |  Branch (201:10): [True: 14, False: 40]
  ------------------
  202|     14|         throw TLS_Exception(Alert::IllegalParameter, "Too many PSK binders");
  203|     14|      }
  204|       |
  205|     40|      m_impl = std::make_unique<PSK_Internal>(std::move(psks));
  206|     40|   } else {
  207|      4|      throw TLS_Exception(Alert::DecodeError, "Found a PSK extension in an unexpected handshake message");
  208|      4|   }
  209|     86|}
_ZN5Botan3TLS3PSKD2Ev:
  231|     13|PSK::~PSK() = default;
tls_extensions_psk.cpp:_ZN5Botan3TLS12_GLOBAL__N_110Server_PSKC2Et:
  109|      2|      explicit Server_PSK(uint16_t id) : m_selected_identity(id), m_session_to_resume_or_psk(std::monostate()) {}
tls_extensions_psk.cpp:_ZN5Botan3TLS12_GLOBAL__N_110Client_PSKC2ENS0_11PskIdentityENSt3__16vectorIhNS4_9allocatorIhEEEE:
   56|    257|            m_identity(std::move(id)), m_binder(std::move(bndr)), m_is_resumption(false) {}
tls_extensions_psk.cpp:_ZN5Botan3TLS3PSK12PSK_InternalC2ENS0_12_GLOBAL__N_110Server_PSKE:
  134|      2|      explicit PSK_Internal(Server_PSK srv_psk) : psk(std::move(srv_psk)) {}
tls_extensions_psk.cpp:_ZN5Botan3TLS3PSK12PSK_InternalC2ENSt3__16vectorINS0_12_GLOBAL__N_110Client_PSKENS3_9allocatorIS6_EEEE:
  136|     11|      explicit PSK_Internal(std::vector<Client_PSK> clt_psks) : psk(std::move(clt_psks)) {}

_ZN5Botan3TLS15Handshake_Layer9copy_dataENSt3__14spanIKhLm18446744073709551615EEE:
   22|  20.7k|void Handshake_Layer::copy_data(std::span<const uint8_t> data_from_peer) {
   23|       |   // Compact consumed data before appending new data
   24|  20.7k|   BOTAN_ASSERT_NOMSG(m_read_offset <= m_read_buffer.size());
  ------------------
  |  |   84|  20.7k|   do {                                                                     \
  |  |   85|  20.7k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  20.7k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 20.7k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  20.7k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 20.7k]
  |  |  ------------------
  ------------------
   25|  20.7k|   if(m_read_offset > 0) {
  ------------------
  |  Branch (25:7): [True: 0, False: 20.7k]
  ------------------
   26|      0|      m_read_buffer.erase(m_read_buffer.begin(), m_read_buffer.begin() + m_read_offset);
   27|      0|      m_read_offset = 0;
   28|      0|   }
   29|       |
   30|  20.7k|   m_read_buffer.insert(m_read_buffer.end(), data_from_peer.begin(), data_from_peer.end());
   31|  20.7k|}
_ZN5Botan3TLS15Handshake_Layer12next_messageERKNS0_6PolicyERNS0_21Transcript_Hash_StateE:
  141|  20.7k|                                                                  Transcript_Hash_State& transcript_hash) {
  142|  20.7k|   BOTAN_ASSERT_NOMSG(m_read_offset <= m_read_buffer.size());
  ------------------
  |  |   84|  20.7k|   do {                                                                     \
  |  |   85|  20.7k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  20.7k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 20.7k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  20.7k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 20.7k]
  |  |  ------------------
  ------------------
  143|  20.7k|   auto pending = std::span<const uint8_t>{m_read_buffer}.subspan(m_read_offset);
  144|  20.7k|   TLS::TLS_Data_Reader reader("handshake message", pending);
  145|       |
  146|  20.7k|   auto msg = parse_message<Handshake_Message_13>(reader, policy, m_peer, m_certificate_type);
  147|  20.7k|   if(msg.has_value()) {
  ------------------
  |  Branch (147:7): [True: 3.42k, False: 17.2k]
  ------------------
  148|  3.42k|      transcript_hash.update(pending.first(reader.read_so_far()));
  149|  3.42k|      m_read_offset += reader.read_so_far();
  150|  3.42k|      BOTAN_ASSERT_NOMSG(m_read_offset <= m_read_buffer.size());
  ------------------
  |  |   84|  3.42k|   do {                                                                     \
  |  |   85|  3.42k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  3.42k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 3.42k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  3.42k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 3.42k]
  |  |  ------------------
  ------------------
  151|       |
  152|  3.42k|      if(m_read_offset == m_read_buffer.size()) {
  ------------------
  |  Branch (152:10): [True: 3.39k, False: 29]
  ------------------
  153|  3.39k|         m_read_buffer.clear();
  154|  3.39k|         m_read_offset = 0;
  155|  3.39k|      }
  156|  3.42k|   }
  157|       |
  158|  20.7k|   return msg;
  159|  20.7k|}
tls_handshake_layer_13.cpp:_ZN5Botan3TLS12_GLOBAL__N_113parse_messageINSt3__17variantIJNS0_15Client_Hello_13ENS0_20Client_Hello_12_ShimENS0_15Server_Hello_13ENS0_20Server_Hello_12_ShimENS0_19Hello_Retry_RequestENS0_20Encrypted_ExtensionsENS0_14Certificate_13ENS0_22Certificate_Request_13ENS0_21Certificate_Verify_13ENS0_11Finished_13EEEEEENS3_8optionalIT_EERNS0_15TLS_Data_ReaderERKNS0_6PolicyENS0_15Connection_SideENS0_16Certificate_TypeE:
   78|  20.7k|                                      const Certificate_Type cert_type) {
   79|       |   // read the message header
   80|  20.7k|   if(reader.remaining_bytes() < HEADER_LENGTH) {
  ------------------
  |  Branch (80:7): [True: 88, False: 20.6k]
  ------------------
   81|     88|      return std::nullopt;
   82|     88|   }
   83|       |
   84|  20.6k|   const Handshake_Type type = handshake_type_from_byte<Msg_Type>(reader.get_byte());
   85|       |
   86|       |   // make sure we have received the full message
   87|  20.6k|   const size_t msg_len = reader.get_uint24_t();
   88|       |
   89|       |   // TODO(Botan4) this is split out due to a GCC 11 ICE, can be inlined
   90|  20.6k|   verify_handshake_message_size(msg_len, policy.maximum_handshake_message_size());
   91|       |
   92|  20.6k|   if(reader.remaining_bytes() < msg_len) {
  ------------------
  |  Branch (92:7): [True: 15.2k, False: 5.36k]
  ------------------
   93|  15.2k|      return std::nullopt;
   94|  15.2k|   }
   95|       |
   96|       |   // create the message
   97|  5.36k|   const auto msg = reader.get_fixed<uint8_t>(msg_len);
   98|  5.36k|   if constexpr(std::is_same_v<Msg_Type, Handshake_Message_13>) {
   99|  5.36k|      switch(type) {
  100|       |         // Client Hello and Server Hello messages are ambiguous. Both may come
  101|       |         // from non-TLS 1.3 peers. Hence, their parsing is somewhat different.
  102|  4.02k|         case Handshake_Type::ClientHello:
  ------------------
  |  Branch (102:10): [True: 4.02k, False: 1.33k]
  ------------------
  103|       |            // ... might be TLS 1.2 Client Hello or TLS 1.3 Client Hello
  104|  4.02k|            return generalize_to<Handshake_Message_13>(Client_Hello_13::parse(msg));
  105|     92|         case Handshake_Type::ServerHello:
  ------------------
  |  Branch (105:10): [True: 92, False: 5.26k]
  ------------------
  106|       |            // ... might be TLS 1.2 Server Hello or TLS 1.3 Server Hello or
  107|       |            // a TLS 1.3 Hello Retry Request disguising as a Server Hello
  108|     92|            return generalize_to<Handshake_Message_13>(Server_Hello_13::parse(msg));
  109|       |         // case Handshake_Type::EndOfEarlyData:
  110|       |         //    return End_Of_Early_Data(msg);
  111|    632|         case Handshake_Type::EncryptedExtensions:
  ------------------
  |  Branch (111:10): [True: 632, False: 4.72k]
  ------------------
  112|    632|            return Encrypted_Extensions(msg);
  113|    494|         case Handshake_Type::Certificate:
  ------------------
  |  Branch (113:10): [True: 494, False: 4.86k]
  ------------------
  114|    494|            return Certificate_13(msg, policy, peer_side, cert_type);
  115|      2|         case Handshake_Type::CertificateRequest:
  ------------------
  |  Branch (115:10): [True: 2, False: 5.35k]
  ------------------
  116|      2|            return Certificate_Request_13(msg, peer_side);
  117|     63|         case Handshake_Type::CertificateVerify:
  ------------------
  |  Branch (117:10): [True: 63, False: 5.29k]
  ------------------
  118|     63|            return Certificate_Verify_13(msg, peer_side);
  119|     10|         case Handshake_Type::Finished:
  ------------------
  |  Branch (119:10): [True: 10, False: 5.35k]
  ------------------
  120|     10|            return Finished_13(msg);
  121|      0|         default:
  ------------------
  |  Branch (121:10): [True: 0, False: 5.36k]
  ------------------
  122|      0|            BOTAN_ASSERT(false, "cannot be reached");  // make sure to update handshake_type_from_byte
  ------------------
  |  |   71|      0|   do {                                                                                 \
  |  |   72|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|      0|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:10): [True: 0, Folded]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  123|  5.36k|      }
  124|       |   } else {
  125|       |      BOTAN_UNUSED(peer_side);
  126|       |
  127|       |      switch(type) {
  128|       |         case Handshake_Type::NewSessionTicket:
  129|       |            return New_Session_Ticket_13(msg, peer_side);
  130|       |         case Handshake_Type::KeyUpdate:
  131|       |            return Key_Update(msg);
  132|       |         default:
  133|       |            BOTAN_ASSERT(false, "cannot be reached");  // make sure to update handshake_type_from_byte
  134|       |      }
  135|       |   }
  136|  5.36k|}
tls_handshake_layer_13.cpp:_ZN5Botan3TLS12_GLOBAL__N_124handshake_type_from_byteINSt3__17variantIJNS0_15Client_Hello_13ENS0_20Client_Hello_12_ShimENS0_15Server_Hello_13ENS0_20Server_Hello_12_ShimENS0_19Hello_Retry_RequestENS0_20Encrypted_ExtensionsENS0_14Certificate_13ENS0_22Certificate_Request_13ENS0_21Certificate_Verify_13ENS0_11Finished_13EEEEEENS0_14Handshake_TypeEh:
   38|  20.6k|Handshake_Type handshake_type_from_byte(uint8_t byte_value) {
   39|  20.6k|   const auto type = static_cast<Handshake_Type>(byte_value);
   40|       |
   41|  20.6k|   if constexpr(std::is_same_v<Msg_Type, Handshake_Message_13>) {
   42|  20.6k|      switch(type) {
   43|  4.27k|         case Handshake_Type::ClientHello:
  ------------------
  |  Branch (43:10): [True: 4.27k, False: 16.3k]
  ------------------
   44|  4.55k|         case Handshake_Type::ServerHello:
  ------------------
  |  Branch (44:10): [True: 287, False: 20.3k]
  ------------------
   45|       |         // case Handshake_Type::EndOfEarlyData:  // NYI: needs PSK/resumption support -- won't be offered in Client Hello for now
   46|  5.41k|         case Handshake_Type::EncryptedExtensions:
  ------------------
  |  Branch (46:10): [True: 859, False: 19.7k]
  ------------------
   47|  6.34k|         case Handshake_Type::Certificate:
  ------------------
  |  Branch (47:10): [True: 930, False: 19.7k]
  ------------------
   48|  7.20k|         case Handshake_Type::CertificateRequest:
  ------------------
  |  Branch (48:10): [True: 857, False: 19.7k]
  ------------------
   49|  8.06k|         case Handshake_Type::CertificateVerify:
  ------------------
  |  Branch (49:10): [True: 857, False: 19.7k]
  ------------------
   50|  20.6k|         case Handshake_Type::Finished:
  ------------------
  |  Branch (50:10): [True: 12.5k, False: 8.07k]
  ------------------
   51|  20.6k|            return type;
   52|     10|         default:
  ------------------
  |  Branch (52:10): [True: 10, False: 20.6k]
  ------------------
   53|     10|            throw TLS_Exception(AlertType::UnexpectedMessage, "Unknown handshake message received");
   54|  20.6k|      }
   55|       |   } else {
   56|       |      switch(type) {
   57|       |         case Handshake_Type::NewSessionTicket:
   58|       |         case Handshake_Type::KeyUpdate:
   59|       |            // case Handshake_Type::CertificateRequest:  // NYI: post-handshake client auth (RFC 8446 4.6.2) -- won't be offered in Client Hello for now
   60|       |            return type;
   61|       |         default:
   62|       |            throw TLS_Exception(AlertType::UnexpectedMessage, "Unknown post-handshake message received");
   63|       |      }
   64|       |   }
   65|  20.6k|}
tls_handshake_layer_13.cpp:_ZN5Botan3TLS12_GLOBAL__N_129verify_handshake_message_sizeEmm:
   67|  20.6k|void verify_handshake_message_size(size_t msg_len, size_t max_size) {
   68|  20.6k|   if(max_size > 0 && msg_len > max_size) {
  ------------------
  |  Branch (68:7): [True: 20.6k, False: 0]
  |  Branch (68:23): [True: 33, False: 20.5k]
  ------------------
   69|     33|      throw TLS_Exception(Alert::HandshakeFailure,
   70|     33|                          Botan::fmt("Handshake message is {} bytes, policy maximum is {}", msg_len, max_size));
   71|     33|   }
   72|  20.6k|}

_ZN5Botan3TLS8Internal23Handshake_State_13_Base5storeENS0_20Client_Hello_12_ShimEb:
   26|  3.21k|Client_Hello_12_Shim& Handshake_State_13_Base::store(Client_Hello_12_Shim client_hello, const bool /*from_peer*/) {
   27|  3.21k|   BOTAN_STATE_CHECK(!m_client_hello_12.has_value());
  ------------------
  |  |   51|  3.21k|   do {                                                         \
  |  |   52|  3.21k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  3.21k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 3.21k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  3.21k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 3.21k]
  |  |  ------------------
  ------------------
   28|  3.21k|   m_client_hello_12 = std::move(client_hello);
   29|  3.21k|   return m_client_hello_12.value();
   30|  3.21k|}

_ZN5Botan3TLS10Record_TLS16serialize_headerENS0_11Record_TypeENS0_16Protocol_VersionEt:
   22|  2.28k|                                                                  uint16_t payload_length) {
   23|  2.28k|   return concat(store_be(to_underlying(type)),            //
   24|  2.28k|                 store_be(legacy_version.version_code()),  //
   25|  2.28k|                 store_be(payload_length));
   26|  2.28k|}
_ZN5Botan3TLS10Record_TLS6appendENSt3__14spanIKhLm18446744073709551615EEE:
   28|  36.0k|size_t Record_TLS::append(std::span<const uint8_t> bytes) {
   29|  36.0k|   BOTAN_STATE_CHECK(!complete());
  ------------------
  |  |   51|  36.0k|   do {                                                         \
  |  |   52|  36.0k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  36.0k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 36.0k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  36.0k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 36.0k]
  |  |  ------------------
  ------------------
   30|       |
   31|  36.0k|   BufferSlicer bs(bytes);
   32|       |
   33|  36.0k|   if(!header_complete()) {
  ------------------
  |  Branch (33:7): [True: 36.0k, False: 0]
  ------------------
   34|       |      // If we don't have the complete header yet, we have to first assemble
   35|       |      // that before we can know the amount of payload to store.
   36|       |
   37|  36.0k|      const auto remaining_header_portion = std::span{m_header}.subspan(m_header_bytes_stored);
   38|  36.0k|      const auto bytes_to_consume = std::min(remaining_header_portion.size(), bs.remaining());
   39|  36.0k|      bs.copy_into(remaining_header_portion.first(bytes_to_consume));
   40|  36.0k|      m_header_bytes_stored = static_cast<uint8_t>(m_header_bytes_stored + bytes_to_consume);
   41|  36.0k|   }
   42|       |
   43|  36.0k|   if(header_complete()) {
  ------------------
  |  Branch (43:7): [True: 35.3k, False: 762]
  ------------------
   44|       |      // Now we have the complete record header, we can look into the expected
   45|       |      // header information and start assembling the payload.
   46|       |
   47|       |      // The legacy major version is essentially ossified to 0x03 and anything
   48|       |      // else can be rejected right away.
   49|  35.3k|      if(legacy_version().major_version() != 0x03) {
  ------------------
  |  Branch (49:10): [True: 46, False: 35.2k]
  ------------------
   50|     46|         throw TLS_Exception(Alert::IllegalParameter, "Received unexpected record version");
   51|     46|      }
   52|       |
   53|       |      // RFC 9846 5.
   54|       |      //    Implementations MUST NOT send record types not defined in this
   55|       |      //    document unless negotiated by some extension. If a TLS
   56|       |      //    implementation receives an unexpected record type, it MUST terminate
   57|       |      //    the connection with an "unexpected_message" alert.
   58|       |      //
   59|       |      // RFC 9846 5.1
   60|       |      //    enum {
   61|       |      //        invalid(0),
   62|       |      //        change_cipher_spec(20),
   63|       |      //        alert(21),
   64|       |      //        handshake(22),
   65|       |      //        application_data(23),
   66|       |      //        (255)
   67|       |      //    } ContentType;
   68|  35.2k|      const auto record_type = type();
   69|  35.2k|      if(record_type != Record_Type::ApplicationData &&  //
  ------------------
  |  Branch (69:10): [True: 35.1k, False: 123]
  ------------------
   70|  35.1k|         record_type != Record_Type::Handshake &&        //
  ------------------
  |  Branch (70:10): [True: 1.45k, False: 33.6k]
  ------------------
   71|  1.45k|         record_type != Record_Type::Alert &&            //
  ------------------
  |  Branch (71:10): [True: 165, False: 1.29k]
  ------------------
   72|    165|         record_type != Record_Type::ChangeCipherSpec) {
  ------------------
  |  Branch (72:10): [True: 15, False: 150]
  ------------------
   73|     15|         throw TLS_Exception(Alert::UnexpectedMessage, "TLS record type had unexpected value");
   74|     15|      }
   75|       |
   76|  35.2k|      const size_t expected_payload_length = payload_length();
   77|       |
   78|       |      // RFC 9846 5.1
   79|       |      //    Implementations MUST NOT send zero-length fragments of Handshake
   80|       |      //    types, even if those fragments contain padding.
   81|       |      //
   82|       |      //    Zero-length fragments of Application Data MAY be sent, as they are
   83|       |      //    potentially useful as a traffic analysis countermeasure.
   84|       |      //
   85|       |      // Hence, the payload length must always be non-null. Even for application
   86|       |      // data, the protected payload would contain at least the authentication
   87|       |      // tag and won't ever be empty either.
   88|  35.2k|      if(expected_payload_length == 0) {
  ------------------
  |  Branch (88:10): [True: 3, False: 35.2k]
  ------------------
   89|      3|         throw TLS_Exception(Alert::DecodeError, "empty record received");
   90|      3|      }
   91|       |
   92|       |      // TODO: we could restrict the payload length sanity checks further based
   93|       |      //       on the record type: e.g. a reasonable unprotected alert record
   94|       |      //       should be much smaller than 2^14 bytes.
   95|  35.2k|      if(record_type != Record_Type::ApplicationData) {
  ------------------
  |  Branch (95:10): [True: 35.1k, False: 123]
  ------------------
   96|       |         // RFC 9846 5.1 "Record Layer"
   97|       |         //    The length MUST NOT exceed 2^14 bytes. An endpoint that receives
   98|       |         //    a record that exceeds this length MUST terminate the connection
   99|       |         //    with a "record_overflow" alert.
  100|  35.1k|         if(expected_payload_length > MAX_PLAINTEXT_SIZE) {
  ------------------
  |  Branch (100:13): [True: 6, False: 35.1k]
  ------------------
  101|      6|            throw TLS_Exception(Alert::RecordOverflow, "Received a record that exceeds maximum size");
  102|      6|         }
  103|  35.1k|      } else {
  104|       |         // RFC 9846 5.2 "Record Payload Protection"
  105|       |         //    The length MUST NOT exceed 2^14 + 256 bytes. An endpoint that
  106|       |         //    receives a record that exceeds this length MUST terminate the
  107|       |         //    connection with a "record_overflow" alert.
  108|       |         //
  109|       |         // Note: Limits imposed by a "record_size_limit" extension do not come
  110|       |         //       into play here, as those limits are on the plaintext _not_ the
  111|       |         //       encrypted data. Constricted devices must be able to deal with
  112|       |         //       data overhead inflicted by the AEAD.
  113|    123|         if(expected_payload_length > MAX_CIPHERTEXT_SIZE_TLS13) {
  ------------------
  |  Branch (113:13): [True: 5, False: 118]
  ------------------
  114|      5|            throw TLS_Exception(Alert::RecordOverflow, "Received a protected record that exceeds maximum size");
  115|      5|         }
  116|    123|      }
  117|       |
  118|       |      // We now know the expected size of the payload and we sanity-checked it
  119|       |      // against the protocol limits. We can reserve enough space to hold it.
  120|  35.2k|      m_payload.reserve(expected_payload_length);
  121|       |
  122|       |      // Append as many payload bytes as we can, but don't overshoot into any
  123|       |      // other records that may be present in the input buffer.
  124|  35.2k|      const size_t remaining_payload_bytes = expected_payload_length - m_payload.size();
  125|  35.2k|      const size_t bytes_to_consume = std::min(remaining_payload_bytes, bs.remaining());
  126|  35.2k|      const auto new_payload_fragment = bs.take(bytes_to_consume);
  127|  35.2k|      m_payload.insert(m_payload.end(), new_payload_fragment.begin(), new_payload_fragment.end());
  128|  35.2k|   }
  129|       |
  130|       |   // Calculate the number of bytes consumed from the input buffer.
  131|  36.0k|   return bytes.size() - bs.remaining();
  132|  36.0k|}
_ZNK5Botan3TLS10Record_TLS18missing_bytes_hintEv:
  134|   109k|size_t Record_TLS::missing_bytes_hint() const {
  135|       |   // If we don't even have the complete header, we need at least the remaining
  136|       |   // header bytes to know the entire length of the record.
  137|   109k|   if(!header_complete()) {
  ------------------
  |  Branch (137:7): [True: 36.1k, False: 73.6k]
  ------------------
  138|  36.1k|      return TLS_HEADER_SIZE - m_header_bytes_stored;
  139|  36.1k|   }
  140|       |
  141|       |   // If we have the header, we can determine the expected length of the
  142|       |   // payload and return the number of bytes still needed to complete it.
  143|  73.6k|   return payload_length() - m_payload.size();
  144|   109k|}
_ZNK5Botan3TLS10Record_TLS4typeEv:
  146|  99.9k|Record_Type Record_TLS::type() const {
  147|  99.9k|   BOTAN_STATE_CHECK(header_complete());
  ------------------
  |  |   51|  99.9k|   do {                                                         \
  |  |   52|  99.9k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  99.9k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 99.9k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  99.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 99.9k]
  |  |  ------------------
  ------------------
  148|  99.9k|   return static_cast<Record_Type>(m_header[0]);
  149|  99.9k|}
_ZNK5Botan3TLS10Record_TLS14legacy_versionEv:
  151|  35.3k|Protocol_Version Record_TLS::legacy_version() const {
  152|  35.3k|   BOTAN_STATE_CHECK(header_complete());
  ------------------
  |  |   51|  35.3k|   do {                                                         \
  |  |   52|  35.3k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  35.3k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 35.3k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  35.3k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 35.3k]
  |  |  ------------------
  ------------------
  153|  35.3k|   return Protocol_Version(load_be(std::span{m_header}.subspan<1, 2>()));
  154|  35.3k|}
_ZNK5Botan3TLS10Record_TLS14payload_lengthEv:
  156|   108k|uint16_t Record_TLS::payload_length() const {
  157|   108k|   BOTAN_STATE_CHECK(header_complete());
  ------------------
  |  |   51|   108k|   do {                                                         \
  |  |   52|   108k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|   108k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 108k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|   108k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 108k]
  |  |  ------------------
  ------------------
  158|   108k|   return load_be(std::span{m_header}.subspan<3, 2>());
  159|   108k|}
_ZNK5Botan3TLS10Record_TLS7payloadEv:
  171|     19|std::span<const uint8_t> Record_TLS::payload() const {
  172|     19|   BOTAN_STATE_CHECK(complete());
  ------------------
  |  |   51|     19|   do {                                                         \
  |  |   52|     19|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|     19|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 19]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|     19|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 19]
  |  |  ------------------
  ------------------
  173|     19|   return m_payload;
  174|     19|}
_ZN5Botan3TLS10Record_TLS12take_payloadEv:
  176|  21.5k|secure_vector<uint8_t> Record_TLS::take_payload() {
  177|  21.5k|   BOTAN_STATE_CHECK(complete());
  ------------------
  |  |   51|  21.5k|   do {                                                         \
  |  |   52|  21.5k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  21.5k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 21.5k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  21.5k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 21.5k]
  |  |  ------------------
  ------------------
  178|  21.5k|   return std::exchange(m_payload, {});
  179|  21.5k|}

_ZN5Botan3TLS12Record_LayerC2ENS0_15Connection_SideENSt3__110shared_ptrIKNS0_6PolicyEEE:
   41|  5.71k|      m_side(side),
   42|  5.71k|      m_policy(std::move(policy)),
   43|  5.71k|      m_outgoing_record_size_limit(MAX_PLAINTEXT_SIZE + 1 /* content type byte */),
   44|  5.71k|      m_incoming_record_size_limit(MAX_PLAINTEXT_SIZE + 1 /* content type byte */)
   45|       |
   46|       |      // RFC 8446 5.1
   47|       |      //    legacy_record_version: MUST be set to 0x0303 for all records
   48|       |      //       generated by a TLS 1.3 implementation other than an initial
   49|       |      //       ClientHello [...], where it MAY also be 0x0301 for compatibility
   50|       |      //       purposes.
   51|       |      //
   52|       |      // Additionally, older peers might send other values while requesting a
   53|       |      // protocol downgrade. I.e. we need to be able to tolerate/emit legacy
   54|       |      // values until we negotiated a TLS 1.3 compliant connection.
   55|       |      //
   56|       |      // As a client: we may initially emit the compatibility version and
   57|       |      //              accept a wider range of incoming legacy record versions.
   58|       |      // As a server: we start with emitting the specified legacy version of 0x0303
   59|       |      //              but must also allow a wider range of incoming legacy values.
   60|       |      //
   61|       |      // Once TLS 1.3 is negotiateed, the implementations will disable these
   62|       |      // compatibility modes accordingly or a protocol downgrade will transfer
   63|       |      // the marshalling responsibility to our TLS 1.2 implementation.
   64|       |      ,
   65|  5.71k|      m_sending_compat_mode(m_side == Connection_Side::Client),
   66|  5.71k|      m_receiving_compat_mode(true) {
   67|  5.71k|   BOTAN_ASSERT_NONNULL(m_policy);
  ------------------
  |  |  123|  5.71k|   do {                                                                                   \
  |  |  124|  5.71k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 5.71k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  5.71k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 5.71k]
  |  |  ------------------
  ------------------
   68|  5.71k|}
_ZN5Botan3TLS12Record_Layer9copy_dataENSt3__14spanIKhLm18446744073709551615EEE:
   70|  5.71k|void Record_Layer::copy_data(std::span<const uint8_t> data) {
   71|  41.7k|   while(!data.empty()) {
  ------------------
  |  Branch (71:10): [True: 36.0k, False: 5.71k]
  ------------------
   72|  36.0k|      auto& record = [&]() -> Record_TLS& {
   73|  36.0k|         if(m_incoming_records.empty() || m_incoming_records.back().complete()) {
   74|  36.0k|            return m_incoming_records.emplace_back();
   75|  36.0k|         } else {
   76|  36.0k|            return m_incoming_records.back();
   77|  36.0k|         }
   78|  36.0k|      }();
   79|       |
   80|  36.0k|      BOTAN_DEBUG_ASSERT(!record.complete());
  ------------------
  |  |  137|  36.0k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  36.0k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 36.0k]
  |  |  ------------------
  ------------------
   81|  36.0k|      const size_t consumed = record.append(data);
   82|  36.0k|      BOTAN_ASSERT_NOMSG(consumed <= data.size());
  ------------------
  |  |   84|  36.0k|   do {                                                                     \
  |  |   85|  36.0k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  36.0k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 36.0k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  36.0k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 36.0k]
  |  |  ------------------
  ------------------
   83|  36.0k|      data = data.subspan(consumed);
   84|  36.0k|   }
   85|  5.71k|}
_ZNK5Botan3TLS12Record_Layer15prepare_recordsENS0_11Record_TypeENSt3__14spanIKhLm18446744073709551615EEEPNS0_12Cipher_StateE:
   89|  2.28k|                                                   Cipher_State* cipher_state) const {
   90|       |   // RFC 8446 5.
   91|       |   //    Note that [change_cipher_spec records] may appear at a point at the
   92|       |   //    handshake where the implementation is expecting protected records.
   93|       |   //
   94|       |   // RFC 8446 5.
   95|       |   //    An implementation which receives [...] a protected change_cipher_spec
   96|       |   //    record MUST abort the handshake [...].
   97|       |   //
   98|       |   // ... hence, CHANGE_CIPHER_SPEC is never protected, even if a usable cipher
   99|       |   // state was passed to this method.
  100|  2.28k|   const bool protect = cipher_state != nullptr && type != Record_Type::ChangeCipherSpec;
  ------------------
  |  Branch (100:25): [True: 0, False: 2.28k]
  |  Branch (100:52): [True: 0, False: 0]
  ------------------
  101|       |
  102|       |   // RFC 8446 5.1
  103|  2.28k|   BOTAN_ASSERT(protect || type != Record_Type::ApplicationData,
  ------------------
  |  |   71|  2.28k|   do {                                                                                 \
  |  |   72|  2.28k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|  4.57k|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:12): [True: 0, False: 2.28k]
  |  |  |  Branch (73:12): [True: 2.28k, False: 0]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|  2.28k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 2.28k]
  |  |  ------------------
  ------------------
  104|  2.28k|                "Application Data records MUST NOT be written to the wire unprotected");
  105|       |
  106|       |   // RFC 8446 5.1
  107|       |   //   "MUST NOT sent zero-length fragments of Handshake types"
  108|       |   //   "a record with an Alert type MUST contain exactly one message" [of non-zero length]
  109|       |   //   "Zero-length fragments of Application Data MAY be sent"
  110|  2.28k|   BOTAN_ASSERT(!data.empty() || type == Record_Type::ApplicationData,
  ------------------
  |  |   71|  2.28k|   do {                                                                                 \
  |  |   72|  2.28k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   73|  2.28k|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (73:12): [True: 2.28k, False: 0]
  |  |  |  Branch (73:12): [True: 0, False: 0]
  |  |  ------------------
  |  |   74|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   75|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   76|      0|      }                                                                                 \
  |  |   77|  2.28k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 2.28k]
  |  |  ------------------
  ------------------
  111|  2.28k|                "zero-length fragments of types other than application data are not allowed");
  112|       |
  113|  2.28k|   if(type == Record_Type::ChangeCipherSpec && !verify_change_cipher_spec(data)) {
  ------------------
  |  Branch (113:7): [True: 0, False: 2.28k]
  |  Branch (113:48): [True: 0, False: 0]
  ------------------
  114|      0|      throw Invalid_Argument("TLS 1.3 deprecated CHANGE_CIPHER_SPEC");
  115|      0|   }
  116|       |
  117|  2.28k|   std::vector<uint8_t> output;
  118|       |
  119|       |   // RFC 8446 5.2
  120|       |   //    type:  The TLSPlaintext.type value containing the content type of the record.
  121|  2.28k|   constexpr size_t content_type_tag_length = 1;
  122|       |
  123|       |   // RFC 8449 4.
  124|       |   //    When the "record_size_limit" extension is negotiated, an endpoint
  125|       |   //    MUST NOT generate a protected record with plaintext that is larger
  126|       |   //    than the RecordSizeLimit value it receives from its peer.
  127|       |   //    Unprotected messages are not subject to this limit.
  128|  2.28k|   const size_t max_plaintext_size =
  129|  2.28k|      (protect) ? m_outgoing_record_size_limit - content_type_tag_length : static_cast<uint16_t>(MAX_PLAINTEXT_SIZE);
  ------------------
  |  Branch (129:7): [True: 0, False: 2.28k]
  ------------------
  130|       |
  131|  2.28k|   const auto records = std::max((data.size() + max_plaintext_size - 1) / max_plaintext_size, size_t(1));
  132|  2.28k|   auto output_length = records * TLS_HEADER_SIZE;
  133|       |
  134|       |   // Policy-requested padding (RFC 9846 5.4) is applied to the final record
  135|       |   // only; all preceding records are filled to the maximum plaintext size
  136|       |   // already, leaving no room for padding within the record size limit.
  137|  2.28k|   size_t final_record_padding = 0;
  138|       |
  139|  2.28k|   if(protect) {
  ------------------
  |  Branch (139:7): [True: 0, False: 2.28k]
  ------------------
  140|       |      // n-1 full records of size max_plaintext_size
  141|      0|      output_length +=
  142|      0|         (records - 1) * cipher_state->encrypt_output_length(max_plaintext_size + content_type_tag_length);
  143|       |      // last record with size of remaining data
  144|      0|      const auto remaining_bytes = data.size() - ((records - 1) * max_plaintext_size) + content_type_tag_length;
  145|      0|      final_record_padding = std::min<size_t>(m_policy->record_padding_bytes(remaining_bytes),
  146|      0|                                              m_outgoing_record_size_limit - remaining_bytes);
  147|      0|      output_length += cipher_state->encrypt_output_length(remaining_bytes + final_record_padding);
  148|  2.28k|   } else {
  149|  2.28k|      output_length += data.size();
  150|  2.28k|   }
  151|  2.28k|   output.reserve(output_length);
  152|       |
  153|  2.28k|   size_t pt_offset = 0;
  154|  2.28k|   size_t to_process = data.size();
  155|       |
  156|       |   // For protected records we need to write at least one encrypted fragment,
  157|       |   // even if the plaintext size is zero. This happens only for Application
  158|       |   // Data types.
  159|  2.28k|   BOTAN_ASSERT_NOMSG(to_process != 0 || protect);
  ------------------
  |  |   84|  2.28k|   do {                                                                     \
  |  |   85|  2.28k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  2.28k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:12): [True: 2.28k, False: 0]
  |  |  |  Branch (86:12): [True: 0, False: 0]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  2.28k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 2.28k]
  |  |  ------------------
  ------------------
  160|       |   // NOLINTNEXTLINE(*-avoid-do-while)
  161|  2.28k|   do {
  162|  2.28k|      const size_t pt_size = std::min<size_t>(to_process, max_plaintext_size);
  163|  2.28k|      const size_t pt_size_with_type = pt_size + content_type_tag_length;
  164|  2.28k|      const bool final_record = (pt_size == to_process);
  165|  2.28k|      const size_t pt_size_with_type_and_padding = pt_size_with_type + (final_record ? final_record_padding : 0);
  ------------------
  |  Branch (165:73): [True: 2.28k, False: 0]
  ------------------
  166|  2.28k|      BOTAN_ASSERT_IMPLICATION(protect,
  ------------------
  |  |  110|  2.28k|   do {                                                                                          \
  |  |  111|  2.28k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                              \
  |  |  112|  2.28k|      if((expr1) && !(expr2)) {                                                                  \
  |  |  ------------------
  |  |  |  Branch (112:10): [True: 0, False: 2.28k]
  |  |  |  Branch (112:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  113|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                     \
  |  |  114|      0|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |  115|      0|      }                                                                                          \
  |  |  116|  2.28k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (116:12): [Folded, False: 2.28k]
  |  |  ------------------
  ------------------
  167|  2.28k|                               pt_size_with_type_and_padding <= m_outgoing_record_size_limit,
  168|  2.28k|                               "Padded record size is within the negotiated record size limit");
  169|       |
  170|  2.28k|      const size_t ct_size = (!protect) ? pt_size : cipher_state->encrypt_output_length(pt_size_with_type_and_padding);
  ------------------
  |  Branch (170:30): [True: 2.28k, False: 0]
  ------------------
  171|       |
  172|  2.28k|      auto pt_fragment = data.subspan(pt_offset, pt_size);
  173|  2.28k|      if(protect) {
  ------------------
  |  Branch (173:10): [True: 0, False: 2.28k]
  ------------------
  174|      0|         const auto record =
  175|      0|            cipher_state->protect_record(type, pt_fragment, pt_size_with_type_and_padding - pt_size_with_type);
  176|      0|         BOTAN_ASSERT_NOMSG(record.size() == ct_size + TLS_HEADER_SIZE);
  ------------------
  |  |   84|      0|   do {                                                                     \
  |  |   85|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|      0|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  177|       |
  178|       |         // TODO: avoid this copy
  179|      0|         output.insert(output.end(), record.cbegin(), record.cend());
  180|  2.28k|      } else {
  181|       |         // RFC 9846 5.1
  182|       |         //    MUST be set to 0x0303 for all records generated by a TLS 1.3
  183|       |         //    implementation other than an initial ClientHello [...], where
  184|       |         //    it MAY also be 0x0301 for compatibility purposes.
  185|  2.28k|         const auto legacy_record_version = (m_sending_compat_mode) ? Protocol_Version::TLS_V10  //
  ------------------
  |  Branch (185:45): [True: 0, False: 2.28k]
  ------------------
  186|  2.28k|                                                                    : Protocol_Version::TLS_V12;
  187|       |
  188|       |         // RFC 9846 5.1
  189|       |         //    type:                  The higher-level protocol used to process
  190|       |         //                           the enclosed fragment.
  191|       |         //    legacy_record_version: [see above]
  192|       |         //    length:                The length (in bytes) of the following
  193|       |         //                           TLSPlaintext.fragment.
  194|  2.28k|         const auto header = Record_TLS::serialize_header(type,                   //
  195|  2.28k|                                                          legacy_record_version,  //
  196|  2.28k|                                                          checked_cast_to<uint16_t>(pt_fragment.size()));
  197|       |
  198|  2.28k|         output.insert(output.end(), header.begin(), header.end());
  199|  2.28k|         output.insert(output.end(), pt_fragment.begin(), pt_fragment.end());
  200|  2.28k|      }
  201|       |
  202|  2.28k|      pt_offset += pt_size;
  203|  2.28k|      to_process -= pt_size;
  204|  2.28k|   } while(to_process > 0);
  ------------------
  |  Branch (204:12): [True: 0, False: 2.28k]
  ------------------
  205|       |
  206|  2.28k|   BOTAN_ASSERT_NOMSG(output.size() == output_length);
  ------------------
  |  |   84|  2.28k|   do {                                                                     \
  |  |   85|  2.28k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  2.28k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 2.28k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  2.28k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 2.28k]
  |  |  ------------------
  ------------------
  207|  2.28k|   return output;
  208|  2.28k|}
_ZN5Botan3TLS12Record_Layer11next_recordEPNS0_12Cipher_StateE:
  210|  21.7k|Record_Layer::ReadResult<Record_Content> Record_Layer::next_record(Cipher_State* cipher_state) {
  211|       |   // Special case: on the record boundary we don't actually need any more data
  212|       |   // and we also don't want to be the know-it-all that now demands exactly
  213|       |   // enough bytes to start parsing the next record header.
  214|  21.7k|   if(m_incoming_records.empty()) {
  ------------------
  |  Branch (214:7): [True: 84, False: 21.6k]
  ------------------
  215|     84|      return BytesNeeded(0);
  216|     84|   }
  217|       |
  218|  21.6k|   if(!m_incoming_records.front().complete()) {
  ------------------
  |  Branch (218:7): [True: 125, False: 21.5k]
  ------------------
  219|    125|      return m_incoming_records.front().missing_bytes_hint();
  220|    125|   }
  221|       |
  222|  21.5k|   auto record = std::move(m_incoming_records.front());
  223|  21.5k|   m_incoming_records.pop_front();
  224|       |
  225|       |   // RFC 9846 Appendix E
  226|       |   //    Prior versions of TLS used the record layer version number [...] for
  227|       |   //    various purposes. As of TLS 1.3, this field is deprecated. The value
  228|       |   //    [...] MAY be validated to match the fixed constant value.
  229|       |   //
  230|       |   // RFC 9846 5.1
  231|       |   //    legacy_record_version:  MUST be set to 0x0303 for all records generated
  232|       |   //                            by a TLS 1.3 implementation.
  233|       |   //
  234|       |   // If `m_receiving_compat_mode` is true, we don't validate the legacy version
  235|       |   // and once it is disabled by the state-machine we enforce the specified
  236|       |   // fixed value of 0x0303 (TLS 1.2) for all incoming records.
  237|  21.5k|   if(!m_receiving_compat_mode && record.legacy_version() != Protocol_Version::TLS_V12) {
  ------------------
  |  Branch (237:7): [True: 0, False: 21.5k]
  |  Branch (237:7): [True: 0, False: 21.5k]
  |  Branch (237:35): [True: 0, False: 0]
  ------------------
  238|      0|      throw TLS_Exception(Alert::IllegalParameter, "Received unexpected record version");
  239|      0|   }
  240|       |
  241|       |   // After the key exchange phase of the handshake is completed and record protection is engaged,
  242|       |   // cipher_state is set. At this point, only protected traffic (and CCS) is allowed.
  243|       |   //
  244|       |   // RFC 9846 2.
  245|       |   //    -  Key Exchange: Establish shared keying material and select the
  246|       |   //       cryptographic parameters.  Everything after this phase is
  247|       |   //       encrypted.
  248|       |   // RFC 9846 5.
  249|       |   //    An implementation may receive an unencrypted [CCS] at any time
  250|  21.5k|   if(cipher_state != nullptr && record.type() != Record_Type::ApplicationData &&
  ------------------
  |  Branch (250:7): [True: 0, False: 21.5k]
  |  Branch (250:34): [True: 0, False: 0]
  ------------------
  251|      0|      record.type() != Record_Type::ChangeCipherSpec &&
  ------------------
  |  Branch (251:7): [True: 0, False: 0]
  ------------------
  252|      0|      (!cipher_state->must_expect_unprotected_alert_traffic() || record.type() != Record_Type::Alert)) {
  ------------------
  |  Branch (252:8): [True: 0, False: 0]
  |  Branch (252:66): [True: 0, False: 0]
  ------------------
  253|      0|      throw TLS_Exception(Alert::UnexpectedMessage, "unprotected record received where protected traffic was expected");
  254|      0|   }
  255|       |
  256|  21.5k|   if(record.type() == Record_Type::ChangeCipherSpec && !verify_change_cipher_spec(record.payload())) {
  ------------------
  |  Branch (256:7): [True: 19, False: 21.5k]
  |  Branch (256:57): [True: 15, False: 4]
  ------------------
  257|     15|      throw TLS_Exception(Alert::UnexpectedMessage, "malformed change cipher spec record received");
  258|     15|   }
  259|       |
  260|  21.5k|   if(record.type() != Record_Type::ApplicationData) {
  ------------------
  |  Branch (260:7): [True: 21.5k, False: 15]
  ------------------
  261|  21.5k|      return Record_Content{
  262|  21.5k|         .type = record.type(),
  263|  21.5k|         .sequence_number = std::nullopt,
  264|  21.5k|         .payload = record.take_payload(),
  265|  21.5k|      };
  266|  21.5k|   } else {
  267|     15|      if(cipher_state == nullptr) {
  ------------------
  |  Branch (267:10): [True: 15, False: 0]
  ------------------
  268|       |         // This could also mean a misuse of the interface, i.e. failing to
  269|       |         // provide a valid cipher_state to parse_records when receiving valid
  270|       |         // (encrypted) Application Data.
  271|     15|         throw TLS_Exception(Alert::UnexpectedMessage, "premature Application Data received");
  272|     15|      }
  273|       |
  274|      0|      return cipher_state->deprotect_record(std::move(record), m_incoming_record_size_limit);
  275|     15|   }
  276|  21.5k|}
tls_record_layer_13.cpp:_ZZN5Botan3TLS12Record_Layer9copy_dataENSt3__14spanIKhLm18446744073709551615EEEENK3$_0clEv:
   72|  36.0k|      auto& record = [&]() -> Record_TLS& {
   73|  36.0k|         if(m_incoming_records.empty() || m_incoming_records.back().complete()) {
  ------------------
  |  Branch (73:13): [True: 5.71k, False: 30.3k]
  |  Branch (73:43): [True: 30.3k, False: 0]
  ------------------
   74|  36.0k|            return m_incoming_records.emplace_back();
   75|  36.0k|         } else {
   76|      0|            return m_incoming_records.back();
   77|      0|         }
   78|  36.0k|      }();
tls_record_layer_13.cpp:_ZN5Botan3TLS12_GLOBAL__N_125verify_change_cipher_specENSt3__14spanIKhLm18446744073709551615EEE:
   26|     19|bool verify_change_cipher_spec(std::span<const uint8_t> data) {
   27|       |   // RFC 8446 5.
   28|       |   //    An implementation may receive an unencrypted record of type
   29|       |   //    change_cipher_spec consisting of the single byte value 0x01
   30|       |   //    at any time [...]. An implementation which receives any other
   31|       |   //    change_cipher_spec value or which receives a protected
   32|       |   //    change_cipher_spec record MUST abort the handshake [...].
   33|     19|   constexpr size_t expected_fragment_length = 1;
   34|     19|   constexpr uint8_t expected_fragment_byte = 0x01;
   35|     19|   return (data.size() == expected_fragment_length && data.front() == expected_fragment_byte);
  ------------------
  |  Branch (35:12): [True: 15, False: 4]
  |  Branch (35:55): [True: 4, False: 11]
  ------------------
   36|     19|}

_ZN5Botan3TLS14Server_Impl_136createERKNSt3__110shared_ptrINS0_9CallbacksEEERKNS3_INS0_15Session_ManagerEEERKNS3_INS_19Credentials_ManagerEEERKNS3_IKNS0_6PolicyEEERKNS3_INS_21RandomNumberGeneratorEEE:
   27|  5.71k|                                                       const std::shared_ptr<RandomNumberGenerator>& rng) {
   28|  5.71k|   auto self =
   29|  5.71k|      std::make_shared<Server_Impl_13>(Private{}, callbacks, session_manager, credentials_manager, policy, rng);
   30|       |
   31|  5.71k|#if defined(BOTAN_HAS_TLS_12)
   32|  5.71k|   if(policy->allow_tls12()) {
  ------------------
  |  Branch (32:7): [True: 5.71k, False: 0]
  ------------------
   33|  5.71k|      self->expect_downgrade({}, {});
   34|  5.71k|   }
   35|  5.71k|#endif
   36|       |
   37|  5.71k|   self->m_handshake->transitions.set_expected_next(Handshake_Type::ClientHello);
   38|       |
   39|  5.71k|   return self;
   40|  5.71k|}
_ZN5Botan3TLS14Server_Impl_1321process_handshake_msgENSt3__17variantIJNS0_15Client_Hello_13ENS0_20Client_Hello_12_ShimENS0_15Server_Hello_13ENS0_20Server_Hello_12_ShimENS0_19Hello_Retry_RequestENS0_20Encrypted_ExtensionsENS0_14Certificate_13ENS0_22Certificate_Request_13ENS0_21Certificate_Verify_13ENS0_11Finished_13EEEE:
  155|  3.40k|void Server_Impl_13::process_handshake_msg(Handshake_Message_13 message) {
  156|  3.40k|   BOTAN_STATE_CHECK(m_handshake != nullptr);
  ------------------
  |  |   51|  3.40k|   do {                                                         \
  |  |   52|  3.40k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  3.40k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 3.40k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  3.40k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 3.40k]
  |  |  ------------------
  ------------------
  157|       |
  158|       |   // first verify that the message was expected by the state machine
  159|       |   // (and only then store it in the handshake state)
  160|  3.40k|   m_handshake->transitions.confirm_transition_to(std::visit([](const auto& msg) { return msg.type(); }, message));
  161|       |
  162|  3.40k|   std::visit(
  163|  3.40k|      [&](auto msg) {
  164|       |         // ... then allow the library user to abort on their discretion
  165|  3.40k|         callbacks().tls_inspect_handshake_msg(msg.get());
  166|       |
  167|       |         // ... finally handle the message
  168|  3.40k|         handle(msg.get());
  169|  3.40k|      },
  170|  3.40k|      m_handshake->state.received(std::move(message)));
  171|  3.40k|}
_ZN5Botan3TLS14Server_Impl_1332process_dummy_change_cipher_specEv:
  184|      2|void Server_Impl_13::process_dummy_change_cipher_spec() {
  185|       |   // RFC 8446 5.
  186|       |   //    If an implementation detects a change_cipher_spec record received before
  187|       |   //    the first ClientHello message or after the peer's Finished message, it MUST be
  188|       |   //    treated as an unexpected record type [("unexpected_message" alert)].
  189|      2|   if(!m_handshake || !m_handshake->state.has_client_hello() || m_handshake->state.has_client_finished()) {
  ------------------
  |  Branch (189:7): [True: 0, False: 2]
  |  Branch (189:23): [True: 2, False: 0]
  |  Branch (189:65): [True: 0, False: 0]
  ------------------
  190|      2|      throw TLS_Exception(Alert::UnexpectedMessage, "Received an unexpected dummy Change Cipher Spec");
  191|      2|   }
  192|       |
  193|       |   // RFC 8446 5.
  194|       |   //    An implementation may receive an unencrypted record of type change_cipher_spec [...]
  195|       |   //    at any time after the first ClientHello message has been sent or received
  196|       |   //    and before the peer's Finished message has been received [...]
  197|       |   //    and MUST simply drop it without further processing.
  198|       |   //
  199|       |   // ... no further processing.
  200|      2|}
_ZNK5Botan3TLS14Server_Impl_1321is_handshake_completeEv:
  202|  20.7k|bool Server_Impl_13::is_handshake_complete() const {
  203|  20.7k|   return m_active_state.has_value() || (m_handshake != nullptr && m_handshake->state.handshake_finished());
  ------------------
  |  Branch (203:11): [True: 0, False: 20.7k]
  |  Branch (203:42): [True: 20.7k, False: 0]
  |  Branch (203:68): [True: 0, False: 20.7k]
  ------------------
  204|  20.7k|}
_ZN5Botan3TLS14Server_Impl_139downgradeEv:
  218|  3.21k|void Server_Impl_13::downgrade() {
  219|  3.21k|   BOTAN_ASSERT_NOMSG(expects_downgrade());
  ------------------
  |  |   84|  3.21k|   do {                                                                     \
  |  |   85|  3.21k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  3.21k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 3.21k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  3.21k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 3.21k]
  |  |  ------------------
  ------------------
  220|       |
  221|  3.21k|   request_downgrade();
  222|       |
  223|       |   // After this, no further messages are expected here because this instance
  224|       |   // will be replaced by a Server_Impl_12.
  225|  3.21k|   m_handshake->transitions.set_expected_next({});
  226|  3.21k|}
_ZN5Botan3TLS14Server_Impl_1331maybe_handle_compatibility_modeENS0_15Channel_Impl_1321Compat_Mode_SituationE:
  230|  2.28k|void Server_Impl_13::maybe_handle_compatibility_mode(Compat_Mode_Situation situation) {
  231|       |   // RFC 9846 E.4
  232|       |   //    This "compatibility mode" is partially negotiated: the client can opt
  233|       |   //    to provide a session ID or not, [...].
  234|       |   //
  235|       |   // I.e., before we received a ClientHello, we cannot know whether the client
  236|       |   // requested middlebox compatibility mode or not.
  237|  2.28k|   if(m_handshake == nullptr || !m_handshake->state.has_client_hello()) {
  ------------------
  |  Branch (237:7): [True: 0, False: 2.28k]
  |  Branch (237:33): [True: 2.28k, False: 0]
  ------------------
  238|  2.28k|      return;
  239|  2.28k|   }
  240|       |
  241|       |   // RFC 9846 E.4
  242|       |   //    This "compatibility mode" is partially negotiated: the client can opt
  243|       |   //    to provide a session ID or not, and the server has to echo it. Either
  244|       |   //    side can send change_cipher_spec at any time during the handshake, as
  245|       |   //    they must be ignored by the peer, but if the client sends a non-empty
  246|       |   //    session ID, the server MUST send the change_cipher_spec as described
  247|       |   //    [above].
  248|       |   //
  249|       |   // Technically, the usage of compatibility mode is fully up to the client
  250|       |   // sending a non-empty session ID. Nevertheless, when the policy requests
  251|       |   // it we send a CCS regardless. Note that this is perfectly legal and also
  252|       |   // satisfies some BoGo tests that expect this behaviour.
  253|      0|   const bool client_requested_compatibility_mode = !m_handshake->state.client_hello().session_id().empty();
  254|      0|   if(!policy().tls_13_middlebox_compatibility_mode() && !client_requested_compatibility_mode) {
  ------------------
  |  Branch (254:7): [True: 0, False: 0]
  |  Branch (254:58): [True: 0, False: 0]
  ------------------
  255|      0|      return;
  256|      0|   }
  257|       |
  258|      0|   switch(situation) {
  ------------------
  |  Branch (258:11): [True: 0, False: 0]
  ------------------
  259|      0|      case Compat_Mode_Situation::AfterSendingFirstServerHello:
  ------------------
  |  Branch (259:7): [True: 0, False: 0]
  ------------------
  260|      0|      case Compat_Mode_Situation::AfterSendingHelloRetryRequest:
  ------------------
  |  Branch (260:7): [True: 0, False: 0]
  ------------------
  261|       |         // RFC 9846 E.4
  262|       |         //    The server sends a dummy change_cipher_spec record immediately after
  263|       |         //    its first handshake message. This may either be after a ServerHello or
  264|       |         //    a HelloRetryRequest.
  265|      0|         send_dummy_change_cipher_spec();
  266|      0|         break;
  267|       |
  268|      0|      case Compat_Mode_Situation::BeforeSendingAlert:
  ------------------
  |  Branch (268:7): [True: 0, False: 0]
  ------------------
  269|       |         // RFC 9846 E.4
  270|       |         //    The server sends a dummy change_cipher_spec record immediately after
  271|       |         //    its first handshake message.
  272|       |         //
  273|       |         // The server cannot send an encrypted alert message as its first
  274|       |         // message. Hence, it won't ever need a dummy CCS before an alert.
  275|      0|         break;
  276|       |
  277|      0|      case Compat_Mode_Situation::AfterSendingFirstClientHello:
  ------------------
  |  Branch (277:7): [True: 0, False: 0]
  ------------------
  278|      0|      case Compat_Mode_Situation::BeforeSendingSecondClientHello:
  ------------------
  |  Branch (278:7): [True: 0, False: 0]
  ------------------
  279|      0|      case Compat_Mode_Situation::BeforeSendingEncryptedClientFlight:
  ------------------
  |  Branch (279:7): [True: 0, False: 0]
  ------------------
  280|      0|         BOTAN_ASSERT_UNREACHABLE();  // These situations occur on the client side.
  ------------------
  |  |  173|      0|#define BOTAN_ASSERT_UNREACHABLE() Botan::assert_unreachable(__FILE__, __LINE__)
  ------------------
  281|      0|   }
  282|      0|}
_ZN5Botan3TLS14Server_Impl_136handleERKNS0_20Client_Hello_12_ShimE:
  489|  3.21k|void Server_Impl_13::handle(const Client_Hello_12_Shim& ch) {
  490|       |   // The detailed handling of the TLS 1.2 compliant Client Hello is left to
  491|       |   // the TLS 1.2 server implementation.
  492|  3.21k|   BOTAN_UNUSED(ch);
  ------------------
  |  |  151|  3.21k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  493|  3.21k|   BOTAN_ASSERT_NONNULL(m_handshake);
  ------------------
  |  |  123|  3.21k|   do {                                                                                   \
  |  |  124|  3.21k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 3.21k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  3.21k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 3.21k]
  |  |  ------------------
  ------------------
  494|       |
  495|       |   // After we sent a Hello Retry Request we must not accept a downgrade.
  496|  3.21k|   if(m_handshake->state.has_hello_retry_request()) {
  ------------------
  |  Branch (496:7): [True: 0, False: 3.21k]
  ------------------
  497|      0|      throw TLS_Exception(Alert::UnexpectedMessage, "Received a TLS 1.2 Client Hello after Hello Retry Request");
  498|      0|   }
  499|       |
  500|       |#if !defined(BOTAN_HAS_TLS_DOWNGRADE_SUPPORT)
  501|       |   throw TLS_Exception(Alert::ProtocolVersion, "Received an unsupported Client Hello");
  502|       |#else
  503|       |
  504|       |   // RFC 8446 Appendix D.2
  505|       |   //    If the "supported_versions" extension is absent and the server only
  506|       |   //    supports versions greater than ClientHello.legacy_version, the server
  507|       |   //    MUST abort the handshake with a "protocol_version" alert.
  508|       |   //
  509|       |   // If we're not expecting a downgrade, we only support TLS 1.3.
  510|  3.21k|   if(!expects_downgrade()) {
  ------------------
  |  Branch (510:7): [True: 0, False: 3.21k]
  ------------------
  511|      0|      throw TLS_Exception(Alert::ProtocolVersion, "Received a legacy Client Hello");
  512|      0|   }
  513|       |
  514|  3.21k|   downgrade();
  515|  3.21k|#endif
  516|  3.21k|}
tls_server_impl_13.cpp:_ZZN5Botan3TLS14Server_Impl_1321process_handshake_msgENSt3__17variantIJNS0_15Client_Hello_13ENS0_20Client_Hello_12_ShimENS0_15Server_Hello_13ENS0_20Server_Hello_12_ShimENS0_19Hello_Retry_RequestENS0_20Encrypted_ExtensionsENS0_14Certificate_13ENS0_22Certificate_Request_13ENS0_21Certificate_Verify_13ENS0_11Finished_13EEEEENK3$_0clIS5_EEDaRKT_:
  160|  3.21k|   m_handshake->transitions.confirm_transition_to(std::visit([](const auto& msg) { return msg.type(); }, message));
tls_server_impl_13.cpp:_ZZN5Botan3TLS14Server_Impl_1321process_handshake_msgENSt3__17variantIJNS0_15Client_Hello_13ENS0_20Client_Hello_12_ShimENS0_15Server_Hello_13ENS0_20Server_Hello_12_ShimENS0_19Hello_Retry_RequestENS0_20Encrypted_ExtensionsENS0_14Certificate_13ENS0_22Certificate_Request_13ENS0_21Certificate_Verify_13ENS0_11Finished_13EEEEENK3$_0clIS7_EEDaRKT_:
  160|     19|   m_handshake->transitions.confirm_transition_to(std::visit([](const auto& msg) { return msg.type(); }, message));
tls_server_impl_13.cpp:_ZZN5Botan3TLS14Server_Impl_1321process_handshake_msgENSt3__17variantIJNS0_15Client_Hello_13ENS0_20Client_Hello_12_ShimENS0_15Server_Hello_13ENS0_20Server_Hello_12_ShimENS0_19Hello_Retry_RequestENS0_20Encrypted_ExtensionsENS0_14Certificate_13ENS0_22Certificate_Request_13ENS0_21Certificate_Verify_13ENS0_11Finished_13EEEEENK3$_0clIS9_EEDaRKT_:
  160|    163|   m_handshake->transitions.confirm_transition_to(std::visit([](const auto& msg) { return msg.type(); }, message));
tls_server_impl_13.cpp:_ZZN5Botan3TLS14Server_Impl_1321process_handshake_msgENSt3__17variantIJNS0_15Client_Hello_13ENS0_20Client_Hello_12_ShimENS0_15Server_Hello_13ENS0_20Server_Hello_12_ShimENS0_19Hello_Retry_RequestENS0_20Encrypted_ExtensionsENS0_14Certificate_13ENS0_22Certificate_Request_13ENS0_21Certificate_Verify_13ENS0_11Finished_13EEEEENK3$_0clISA_EEDaRKT_:
  160|      3|   m_handshake->transitions.confirm_transition_to(std::visit([](const auto& msg) { return msg.type(); }, message));
tls_server_impl_13.cpp:_ZZN5Botan3TLS14Server_Impl_1321process_handshake_msgENSt3__17variantIJNS0_15Client_Hello_13ENS0_20Client_Hello_12_ShimENS0_15Server_Hello_13ENS0_20Server_Hello_12_ShimENS0_19Hello_Retry_RequestENS0_20Encrypted_ExtensionsENS0_14Certificate_13ENS0_22Certificate_Request_13ENS0_21Certificate_Verify_13ENS0_11Finished_13EEEEENK3$_0clISC_EEDaRKT_:
  160|      8|   m_handshake->transitions.confirm_transition_to(std::visit([](const auto& msg) { return msg.type(); }, message));
tls_server_impl_13.cpp:_ZZN5Botan3TLS14Server_Impl_1321process_handshake_msgENSt3__17variantIJNS0_15Client_Hello_13ENS0_20Client_Hello_12_ShimENS0_15Server_Hello_13ENS0_20Server_Hello_12_ShimENS0_19Hello_Retry_RequestENS0_20Encrypted_ExtensionsENS0_14Certificate_13ENS0_22Certificate_Request_13ENS0_21Certificate_Verify_13ENS0_11Finished_13EEEEENK3$_0clISD_EEDaRKT_:
  160|      3|   m_handshake->transitions.confirm_transition_to(std::visit([](const auto& msg) { return msg.type(); }, message));
tls_server_impl_13.cpp:_ZZN5Botan3TLS14Server_Impl_1321process_handshake_msgENSt3__17variantIJNS0_15Client_Hello_13ENS0_20Client_Hello_12_ShimENS0_15Server_Hello_13ENS0_20Server_Hello_12_ShimENS0_19Hello_Retry_RequestENS0_20Encrypted_ExtensionsENS0_14Certificate_13ENS0_22Certificate_Request_13ENS0_21Certificate_Verify_13ENS0_11Finished_13EEEEENK3$_1clINS2_17reference_wrapperIS5_EEEEDaT_:
  163|  3.21k|      [&](auto msg) {
  164|       |         // ... then allow the library user to abort on their discretion
  165|  3.21k|         callbacks().tls_inspect_handshake_msg(msg.get());
  166|       |
  167|       |         // ... finally handle the message
  168|  3.21k|         handle(msg.get());
  169|  3.21k|      },

_ZN5Botan3TLS21Transcript_Hash_StateC2Ev:
   24|  5.71k|Transcript_Hash_State::Transcript_Hash_State() = default;
_ZN5Botan3TLS21Transcript_Hash_StateD2Ev:
   26|  5.71k|Transcript_Hash_State::~Transcript_Hash_State() = default;
_ZN5Botan3TLS21Transcript_Hash_State6updateENSt3__14spanIKhLm18446744073709551615EEE:
  155|  3.42k|void Transcript_Hash_State::update(std::span<const uint8_t> serialized_message_s) {
  156|  3.42k|   const auto* serialized_message = serialized_message_s.data();
  157|  3.42k|   auto serialized_message_length = serialized_message_s.size();
  158|  3.42k|   if(m_hash != nullptr) {
  ------------------
  |  Branch (158:7): [True: 0, False: 3.42k]
  ------------------
  159|      0|      auto truncation_mark = serialized_message_length;
  160|       |
  161|       |      // Check whether we should generate a truncated hash for supporting PSK
  162|       |      // binder calculation or verification. See RFC 8446 4.2.11.2.
  163|      0|      if(serialized_message_length > 0 && *serialized_message == static_cast<uint8_t>(Handshake_Type::ClientHello)) {
  ------------------
  |  Branch (163:10): [True: 0, False: 0]
  |  Branch (163:43): [True: 0, False: 0]
  ------------------
  164|      0|         truncation_mark = find_client_hello_truncation_mark(serialized_message_s);
  165|      0|      }
  166|       |
  167|      0|      if(truncation_mark < serialized_message_length) {
  ------------------
  |  Branch (167:10): [True: 0, False: 0]
  ------------------
  168|      0|         m_hash->update(serialized_message, truncation_mark);
  169|      0|         m_truncated = read_hash_state(m_hash);
  170|      0|         m_hash->update(serialized_message + truncation_mark, serialized_message_length - truncation_mark);
  171|      0|      } else {
  172|      0|         m_truncated.clear();
  173|      0|         m_hash->update(serialized_message, serialized_message_length);
  174|      0|      }
  175|       |
  176|      0|      m_previous = std::exchange(m_current, read_hash_state(m_hash));
  177|  3.42k|   } else {
  178|  3.42k|      m_unprocessed_transcript.push_back(
  179|  3.42k|         std::vector(serialized_message, serialized_message + serialized_message_length));
  180|  3.42k|   }
  181|  3.42k|}

_ZN5Botan3TLS5AlertC2ERKNSt3__16vectorIhNS_16secure_allocatorIhEEEE:
   14|  1.45k|Alert::Alert(const secure_vector<uint8_t>& buf) {
   15|  1.45k|   if(buf.size() != 2) {
  ------------------
  |  Branch (15:7): [True: 23, False: 1.42k]
  ------------------
   16|     23|      throw Decoding_Error("Bad size (" + std::to_string(buf.size()) + ") for TLS alert message");
   17|     23|   }
   18|       |
   19|  1.42k|   if(buf[0] == 1) {
  ------------------
  |  Branch (19:7): [True: 1.40k, False: 20]
  ------------------
   20|  1.40k|      m_fatal = false;
   21|  1.40k|   } else if(buf[0] == 2) {
  ------------------
  |  Branch (21:14): [True: 12, False: 8]
  ------------------
   22|     12|      m_fatal = true;
   23|     12|   } else {
   24|      8|      throw TLS_Exception(Alert::IllegalParameter, "Bad code for TLS alert level");
   25|      8|   }
   26|       |
   27|  1.42k|   const uint8_t dc = buf[1];
   28|       |
   29|  1.42k|   m_type_code = static_cast<Type>(dc);
   30|  1.42k|}
_ZNK5Botan3TLS5Alert9serializeEv:
   32|  4.26k|std::vector<uint8_t> Alert::serialize() const {
   33|  4.26k|   return std::vector<uint8_t>({static_cast<uint8_t>(is_fatal() ? 2 : 1), static_cast<uint8_t>(type())});
  ------------------
  |  Branch (33:54): [True: 4.25k, False: 7]
  ------------------
   34|  4.26k|}

_ZN5Botan3TLS18kdf_algo_to_stringENS0_8KDF_AlgoE:
   17|  3.33k|std::string kdf_algo_to_string(KDF_Algo algo) {
   18|  3.33k|   switch(algo) {
  ------------------
  |  Branch (18:11): [True: 3.33k, False: 0]
  ------------------
   19|    759|      case KDF_Algo::SHA_1:
  ------------------
  |  Branch (19:7): [True: 759, False: 2.58k]
  ------------------
   20|    759|         return "SHA-1";
   21|  1.79k|      case KDF_Algo::SHA_256:
  ------------------
  |  Branch (21:7): [True: 1.79k, False: 1.54k]
  ------------------
   22|  1.79k|         return "SHA-256";
   23|    784|      case KDF_Algo::SHA_384:
  ------------------
  |  Branch (23:7): [True: 784, False: 2.55k]
  ------------------
   24|    784|         return "SHA-384";
   25|  3.33k|   }
   26|       |
   27|      0|   throw Invalid_State("kdf_algo_to_string unknown enum value");
   28|  3.33k|}
_ZN5Botan3TLS20kex_method_to_stringENS0_8Kex_AlgoE:
   30|     79|std::string kex_method_to_string(Kex_Algo method) {
   31|     79|   switch(method) {
  ------------------
  |  Branch (31:11): [True: 79, False: 0]
  ------------------
   32|      0|      case Kex_Algo::STATIC_RSA:
  ------------------
  |  Branch (32:7): [True: 0, False: 79]
  ------------------
   33|      0|         return "RSA";
   34|      0|      case Kex_Algo::DH:
  ------------------
  |  Branch (34:7): [True: 0, False: 79]
  ------------------
   35|      0|         return "DH";
   36|      0|      case Kex_Algo::ECDH:
  ------------------
  |  Branch (36:7): [True: 0, False: 79]
  ------------------
   37|      0|         return "ECDH";
   38|      0|      case Kex_Algo::PSK:
  ------------------
  |  Branch (38:7): [True: 0, False: 79]
  ------------------
   39|      0|         return "PSK";
   40|     79|      case Kex_Algo::ECDHE_PSK:
  ------------------
  |  Branch (40:7): [True: 79, False: 0]
  ------------------
   41|     79|         return "ECDHE_PSK";
   42|      0|      case Kex_Algo::DHE_PSK:
  ------------------
  |  Branch (42:7): [True: 0, False: 79]
  ------------------
   43|      0|         return "DHE_PSK";
   44|      0|      case Kex_Algo::KEM:
  ------------------
  |  Branch (44:7): [True: 0, False: 79]
  ------------------
   45|      0|         return "KEM";
   46|      0|      case Kex_Algo::KEM_PSK:
  ------------------
  |  Branch (46:7): [True: 0, False: 79]
  ------------------
   47|      0|         return "KEM_PSK";
   48|      0|      case Kex_Algo::HYBRID:
  ------------------
  |  Branch (48:7): [True: 0, False: 79]
  ------------------
   49|      0|         return "HYBRID";
   50|      0|      case Kex_Algo::HYBRID_PSK:
  ------------------
  |  Branch (50:7): [True: 0, False: 79]
  ------------------
   51|      0|         return "HYBRID_PSK";
   52|      0|      case Kex_Algo::UNDEFINED:
  ------------------
  |  Branch (52:7): [True: 0, False: 79]
  ------------------
   53|      0|         return "UNDEFINED";
   54|     79|   }
   55|       |
   56|      0|   throw Invalid_State("kex_method_to_string unknown enum value");
   57|     79|}
_ZN5Botan3TLS21auth_method_to_stringENS0_11Auth_MethodE:
  107|    339|std::string auth_method_to_string(Auth_Method method) {
  108|    339|   switch(method) {
  ------------------
  |  Branch (108:11): [True: 339, False: 0]
  ------------------
  109|    175|      case Auth_Method::RSA:
  ------------------
  |  Branch (109:7): [True: 175, False: 164]
  ------------------
  110|    175|         return "RSA";
  111|    164|      case Auth_Method::ECDSA:
  ------------------
  |  Branch (111:7): [True: 164, False: 175]
  ------------------
  112|    164|         return "ECDSA";
  113|      0|      case Auth_Method::IMPLICIT:
  ------------------
  |  Branch (113:7): [True: 0, False: 339]
  ------------------
  114|      0|         return "IMPLICIT";
  115|      0|      case Auth_Method::UNDEFINED:
  ------------------
  |  Branch (115:7): [True: 0, False: 339]
  ------------------
  116|      0|         return "UNDEFINED";
  117|    339|   }
  118|       |
  119|      0|   throw Invalid_State("auth_method_to_string unknown enum value");
  120|    339|}
_ZNK5Botan3TLS12Group_Params9to_stringEv:
  402|  2.12k|std::optional<std::string> Group_Params::to_string() const {
  403|  2.12k|   switch(m_code) {
  404|    802|      case Group_Params::SECP256R1:
  ------------------
  |  Branch (404:7): [True: 802, False: 1.32k]
  ------------------
  405|    802|         return "secp256r1";
  406|    492|      case Group_Params::SECP384R1:
  ------------------
  |  Branch (406:7): [True: 492, False: 1.63k]
  ------------------
  407|    492|         return "secp384r1";
  408|    833|      case Group_Params::SECP521R1:
  ------------------
  |  Branch (408:7): [True: 833, False: 1.29k]
  ------------------
  409|    833|         return "secp521r1";
  410|      0|      case Group_Params::BRAINPOOL256R1:
  ------------------
  |  Branch (410:7): [True: 0, False: 2.12k]
  ------------------
  411|      0|         return "brainpool256r1";
  412|      0|      case Group_Params::BRAINPOOL384R1:
  ------------------
  |  Branch (412:7): [True: 0, False: 2.12k]
  ------------------
  413|      0|         return "brainpool384r1";
  414|      0|      case Group_Params::BRAINPOOL512R1:
  ------------------
  |  Branch (414:7): [True: 0, False: 2.12k]
  ------------------
  415|      0|         return "brainpool512r1";
  416|      0|      case Group_Params::X25519:
  ------------------
  |  Branch (416:7): [True: 0, False: 2.12k]
  ------------------
  417|      0|         return "x25519";
  418|      0|      case Group_Params::X448:
  ------------------
  |  Branch (418:7): [True: 0, False: 2.12k]
  ------------------
  419|      0|         return "x448";
  420|      0|      case Group_Params::BRAINPOOL256R1TLS13:
  ------------------
  |  Branch (420:7): [True: 0, False: 2.12k]
  ------------------
  421|      0|         return "brainpool256r1tls13";
  422|      0|      case Group_Params::BRAINPOOL384R1TLS13:
  ------------------
  |  Branch (422:7): [True: 0, False: 2.12k]
  ------------------
  423|      0|         return "brainpool384r1tls13";
  424|      0|      case Group_Params::BRAINPOOL512R1TLS13:
  ------------------
  |  Branch (424:7): [True: 0, False: 2.12k]
  ------------------
  425|      0|         return "brainpool512r1tls13";
  426|       |
  427|      0|      case Group_Params::FFDHE_2048:
  ------------------
  |  Branch (427:7): [True: 0, False: 2.12k]
  ------------------
  428|      0|         return "ffdhe/ietf/2048";
  429|      0|      case Group_Params::FFDHE_3072:
  ------------------
  |  Branch (429:7): [True: 0, False: 2.12k]
  ------------------
  430|      0|         return "ffdhe/ietf/3072";
  431|      0|      case Group_Params::FFDHE_4096:
  ------------------
  |  Branch (431:7): [True: 0, False: 2.12k]
  ------------------
  432|      0|         return "ffdhe/ietf/4096";
  433|      0|      case Group_Params::FFDHE_6144:
  ------------------
  |  Branch (433:7): [True: 0, False: 2.12k]
  ------------------
  434|      0|         return "ffdhe/ietf/6144";
  435|      0|      case Group_Params::FFDHE_8192:
  ------------------
  |  Branch (435:7): [True: 0, False: 2.12k]
  ------------------
  436|      0|         return "ffdhe/ietf/8192";
  437|       |
  438|      0|      case Group_Params::ML_KEM_512:
  ------------------
  |  Branch (438:7): [True: 0, False: 2.12k]
  ------------------
  439|      0|         return "ML-KEM-512";
  440|      0|      case Group_Params::ML_KEM_768:
  ------------------
  |  Branch (440:7): [True: 0, False: 2.12k]
  ------------------
  441|      0|         return "ML-KEM-768";
  442|      0|      case Group_Params::ML_KEM_1024:
  ------------------
  |  Branch (442:7): [True: 0, False: 2.12k]
  ------------------
  443|      0|         return "ML-KEM-1024";
  444|       |
  445|      0|      case Group_Params::eFRODOKEM_640_SHAKE_OQS:
  ------------------
  |  Branch (445:7): [True: 0, False: 2.12k]
  ------------------
  446|      0|         return "eFrodoKEM-640-SHAKE";
  447|      0|      case Group_Params::eFRODOKEM_976_SHAKE_OQS:
  ------------------
  |  Branch (447:7): [True: 0, False: 2.12k]
  ------------------
  448|      0|         return "eFrodoKEM-976-SHAKE";
  449|      0|      case Group_Params::eFRODOKEM_1344_SHAKE_OQS:
  ------------------
  |  Branch (449:7): [True: 0, False: 2.12k]
  ------------------
  450|      0|         return "eFrodoKEM-1344-SHAKE";
  451|      0|      case Group_Params::eFRODOKEM_640_AES_OQS:
  ------------------
  |  Branch (451:7): [True: 0, False: 2.12k]
  ------------------
  452|      0|         return "eFrodoKEM-640-AES";
  453|      0|      case Group_Params::eFRODOKEM_976_AES_OQS:
  ------------------
  |  Branch (453:7): [True: 0, False: 2.12k]
  ------------------
  454|      0|         return "eFrodoKEM-976-AES";
  455|      0|      case Group_Params::eFRODOKEM_1344_AES_OQS:
  ------------------
  |  Branch (455:7): [True: 0, False: 2.12k]
  ------------------
  456|      0|         return "eFrodoKEM-1344-AES";
  457|       |
  458|      0|      case Group_Params::HYBRID_X25519_eFRODOKEM_640_SHAKE_OQS:
  ------------------
  |  Branch (458:7): [True: 0, False: 2.12k]
  ------------------
  459|      0|         return "x25519/eFrodoKEM-640-SHAKE";
  460|      0|      case Group_Params::HYBRID_X25519_eFRODOKEM_640_AES_OQS:
  ------------------
  |  Branch (460:7): [True: 0, False: 2.12k]
  ------------------
  461|      0|         return "x25519/eFrodoKEM-640-AES";
  462|      0|      case Group_Params::HYBRID_X448_eFRODOKEM_976_SHAKE_OQS:
  ------------------
  |  Branch (462:7): [True: 0, False: 2.12k]
  ------------------
  463|      0|         return "x448/eFrodoKEM-976-SHAKE";
  464|      0|      case Group_Params::HYBRID_X448_eFRODOKEM_976_AES_OQS:
  ------------------
  |  Branch (464:7): [True: 0, False: 2.12k]
  ------------------
  465|      0|         return "x448/eFrodoKEM-976-AES";
  466|      0|      case Group_Params::HYBRID_SECP256R1_eFRODOKEM_640_SHAKE_OQS:
  ------------------
  |  Branch (466:7): [True: 0, False: 2.12k]
  ------------------
  467|      0|         return "secp256r1/eFrodoKEM-640-SHAKE";
  468|      0|      case Group_Params::HYBRID_SECP256R1_eFRODOKEM_640_AES_OQS:
  ------------------
  |  Branch (468:7): [True: 0, False: 2.12k]
  ------------------
  469|      0|         return "secp256r1/eFrodoKEM-640-AES";
  470|      0|      case Group_Params::HYBRID_SECP384R1_eFRODOKEM_976_SHAKE_OQS:
  ------------------
  |  Branch (470:7): [True: 0, False: 2.12k]
  ------------------
  471|      0|         return "secp384r1/eFrodoKEM-976-SHAKE";
  472|      0|      case Group_Params::HYBRID_SECP384R1_eFRODOKEM_976_AES_OQS:
  ------------------
  |  Branch (472:7): [True: 0, False: 2.12k]
  ------------------
  473|      0|         return "secp384r1/eFrodoKEM-976-AES";
  474|      0|      case Group_Params::HYBRID_SECP521R1_eFRODOKEM_1344_SHAKE_OQS:
  ------------------
  |  Branch (474:7): [True: 0, False: 2.12k]
  ------------------
  475|      0|         return "secp521r1/eFrodoKEM-1344-SHAKE";
  476|      0|      case Group_Params::HYBRID_SECP521R1_eFRODOKEM_1344_AES_OQS:
  ------------------
  |  Branch (476:7): [True: 0, False: 2.12k]
  ------------------
  477|      0|         return "secp521r1/eFrodoKEM-1344-AES";
  478|       |
  479|      0|      case Group_Params::HYBRID_X25519_ML_KEM_768:
  ------------------
  |  Branch (479:7): [True: 0, False: 2.12k]
  ------------------
  480|      0|         return "x25519/ML-KEM-768";
  481|      0|      case Group_Params::HYBRID_SECP256R1_ML_KEM_768:
  ------------------
  |  Branch (481:7): [True: 0, False: 2.12k]
  ------------------
  482|      0|         return "secp256r1/ML-KEM-768";
  483|      0|      case Group_Params::HYBRID_SECP384R1_ML_KEM_1024:
  ------------------
  |  Branch (483:7): [True: 0, False: 2.12k]
  ------------------
  484|      0|         return "secp384r1/ML-KEM-1024";
  485|       |
  486|      0|      default:
  ------------------
  |  Branch (486:7): [True: 0, False: 2.12k]
  ------------------
  487|      0|         return std::nullopt;
  488|  2.12k|   }
  489|  2.12k|}
_ZNK5Botan3TLS12Group_Params17to_algorithm_specEv:
  491|  4.59k|std::optional<std::string> Group_Params::to_algorithm_spec() const {
  492|  4.59k|   switch(m_code) {
  493|       |      // Brainpool curves have two sets of code points. See RFCs 7027 and 8734.
  494|  1.10k|      case Group_Params::BRAINPOOL256R1:
  ------------------
  |  Branch (494:7): [True: 1.10k, False: 3.48k]
  ------------------
  495|  1.25k|      case Group_Params::BRAINPOOL256R1TLS13:
  ------------------
  |  Branch (495:7): [True: 146, False: 4.44k]
  ------------------
  496|  1.25k|         return "brainpool256r1";
  497|    531|      case Group_Params::BRAINPOOL384R1:
  ------------------
  |  Branch (497:7): [True: 531, False: 4.06k]
  ------------------
  498|    569|      case Group_Params::BRAINPOOL384R1TLS13:
  ------------------
  |  Branch (498:7): [True: 38, False: 4.55k]
  ------------------
  499|    569|         return "brainpool384r1";
  500|    607|      case Group_Params::BRAINPOOL512R1:
  ------------------
  |  Branch (500:7): [True: 607, False: 3.98k]
  ------------------
  501|    643|      case Group_Params::BRAINPOOL512R1TLS13:
  ------------------
  |  Branch (501:7): [True: 36, False: 4.55k]
  ------------------
  502|    643|         return "brainpool512r1";
  503|       |
  504|  2.12k|      default:
  ------------------
  |  Branch (504:7): [True: 2.12k, False: 2.46k]
  ------------------
  505|  2.12k|         return to_string();
  506|  4.59k|   }
  507|  4.59k|}

_ZN5Botan3TLS9Callbacks25tls_inspect_handshake_msgERKNS0_17Handshake_MessageE:
   49|  16.4k|void TLS::Callbacks::tls_inspect_handshake_msg(const Handshake_Message& /*unused*/) {
   50|       |   // default is no op
   51|  16.4k|}
_ZN5Botan3TLS9Callbacks25tls_peer_network_identityEv:
   57|     22|std::string TLS::Callbacks::tls_peer_network_identity() {
   58|     22|   return "";
   59|     22|}
_ZN5Botan3TLS9Callbacks21tls_current_timestampEv:
   61|  5.70k|std::chrono::system_clock::time_point TLS::Callbacks::tls_current_timestamp() {
   62|  5.70k|   return std::chrono::system_clock::now();
   63|  5.70k|}
_ZN5Botan3TLS9Callbacks21tls_modify_extensionsERNS0_10ExtensionsENS0_15Connection_SideENS0_14Handshake_TypeE:
   72|  2.81k|                                           Handshake_Type /*unused*/) {}
_ZN5Botan3TLS9Callbacks22tls_examine_extensionsERKNS0_10ExtensionsENS0_15Connection_SideENS0_14Handshake_TypeE:
   76|  3.03k|                                            Handshake_Type /*unused*/) {}
_ZN5Botan3TLS9Callbacks41tls_should_persist_resumption_informationERKNS0_7SessionE:
   78|     79|bool TLS::Callbacks::tls_should_persist_resumption_information(const Session& session) {
   79|       |   // RFC 5077 3.3
   80|       |   //    The ticket_lifetime_hint field contains a hint from the server about
   81|       |   //    how long the ticket should be stored. A value of zero is reserved to
   82|       |   //    indicate that the lifetime of the ticket is unspecified.
   83|       |   //
   84|       |   // RFC 8446 4.6.1
   85|       |   //    [A ticket_lifetime] of zero indicates that the ticket should be discarded
   86|       |   //    immediately.
   87|       |   //
   88|       |   // By default we opt to keep all sessions, except for TLS 1.3 with a lifetime
   89|       |   // hint of zero.
   90|     79|   return session.lifetime_hint().count() > 0 || session.version().is_pre_tls_13();
  ------------------
  |  Branch (90:11): [True: 79, False: 0]
  |  Branch (90:50): [True: 0, False: 0]
  ------------------
   91|     79|}
_ZN5Botan3TLS9Callbacks31tls_deserialize_peer_public_keyERKNSt3__17variantIJNS0_12Group_ParamsENS_8DL_GroupEEEENS2_4spanIKhLm18446744073709551615EEE:
  197|  2.00k|   const std::variant<TLS::Group_Params, DL_Group>& group, std::span<const uint8_t> key_bits) {
  198|  2.00k|   if(is_dh_group(group)) {
  ------------------
  |  Branch (198:7): [True: 0, False: 2.00k]
  ------------------
  199|       |      // TLS 1.2 allows specifying arbitrary DL_Group parameters in-lieu of
  200|       |      // a standardized DH group identifier.
  201|      0|      const auto dl_group = get_dl_group(group);
  202|       |
  203|      0|      auto Y = BigInt::from_bytes(key_bits);
  204|       |
  205|       |      /*
  206|       |       * A basic check for key validity. As we do not know q here we
  207|       |       * cannot check that Y is in the right subgroup. However since
  208|       |       * our key is ephemeral there does not seem to be any
  209|       |       * advantage to bogus keys anyway.
  210|       |       */
  211|      0|      if(Y <= 1 || Y >= dl_group.get_p() - 1) {
  ------------------
  |  Branch (211:10): [True: 0, False: 0]
  |  Branch (211:10): [True: 0, False: 0]
  |  Branch (211:20): [True: 0, False: 0]
  ------------------
  212|      0|         throw Decoding_Error("Server sent bad DH key for DHE exchange");
  213|      0|      }
  214|       |
  215|      0|      return std::make_unique<DH_PublicKey>(dl_group, Y);
  216|      0|   }
  217|       |
  218|       |   // The special case for TLS 1.2 with an explicit DH group definition is
  219|       |   // handled above. All other cases are based on the opaque group definition.
  220|  2.00k|   BOTAN_ASSERT_NOMSG(std::holds_alternative<TLS::Group_Params>(group));
  ------------------
  |  |   84|  2.00k|   do {                                                                     \
  |  |   85|  2.00k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  2.00k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 2.00k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  2.00k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  221|  2.00k|   const auto group_params = std::get<TLS::Group_Params>(group);
  222|       |
  223|  2.00k|   if(group_params.is_ecdh_named_curve()) {
  ------------------
  |  Branch (223:7): [True: 1.99k, False: 10]
  ------------------
  224|  1.99k|      const auto ec_group = EC_Group::from_name(group_params.to_algorithm_spec().value());
  225|       |      // TLS 1.3 requires uncompressed points (checked when parsing the key
  226|       |      // share); TLS 1.2 may negotiate the compressed format. The deprecated
  227|       |      // hybrid encoding and the identity element are never accepted.
  228|       |
  229|  1.99k|      auto point = [&]() -> EC_AffinePoint {
  230|  1.99k|         if(auto pt_uncompressed = EC_AffinePoint::deserialize_uncompressed(ec_group, key_bits)) {
  231|  1.99k|            return std::move(pt_uncompressed).value();
  232|  1.99k|         } else if(auto pt_compressed = EC_AffinePoint::deserialize_compressed(ec_group, key_bits)) {
  233|  1.99k|            return std::move(pt_compressed).value();
  234|  1.99k|         } else {
  235|  1.99k|            throw Decoding_Error("Invalid ECDH public key encoding");
  236|  1.99k|         }
  237|  1.99k|      }();
  238|  1.99k|      return std::make_unique<ECDH_PublicKey>(ec_group, std::move(point));
  239|  1.99k|   }
  240|       |
  241|     10|#if defined(BOTAN_HAS_X25519)
  242|     10|   if(group_params.is_x25519()) {
  ------------------
  |  Branch (242:7): [True: 7, False: 3]
  ------------------
  243|      7|      return std::make_unique<X25519_PublicKey>(key_bits);
  244|      7|   }
  245|      3|#endif
  246|       |
  247|      3|#if defined(BOTAN_HAS_X448)
  248|      3|   if(group_params.is_x448()) {
  ------------------
  |  Branch (248:7): [True: 3, False: 0]
  ------------------
  249|      3|      return std::make_unique<X448_PublicKey>(key_bits);
  250|      3|   }
  251|      0|#endif
  252|       |
  253|      0|#if defined(BOTAN_HAS_TLS_13_PQC)
  254|      0|   if(group_params.is_pqc_hybrid()) {
  ------------------
  |  Branch (254:7): [True: 0, False: 0]
  ------------------
  255|      0|      return Hybrid_KEM_PublicKey::load_for_group(group_params, key_bits);
  256|      0|   }
  257|      0|#endif
  258|       |
  259|      0|#if defined(BOTAN_HAS_ML_KEM)
  260|      0|   if(group_params.is_pure_ml_kem()) {
  ------------------
  |  Branch (260:7): [True: 0, False: 0]
  ------------------
  261|      0|      return std::make_unique<ML_KEM_PublicKey>(key_bits, ML_KEM_Mode(group_params.to_algorithm_spec().value()));
  262|      0|   }
  263|      0|#endif
  264|       |
  265|      0|#if defined(BOTAN_HAS_FRODOKEM)
  266|      0|   if(group_params.is_pure_frodokem()) {
  ------------------
  |  Branch (266:7): [True: 0, False: 0]
  ------------------
  267|      0|      return std::make_unique<FrodoKEM_PublicKey>(key_bits, FrodoKEMMode(group_params.to_algorithm_spec().value()));
  268|      0|   }
  269|      0|#endif
  270|       |
  271|      0|   throw Decoding_Error("cannot create a key offering without a group definition");
  272|      0|}
_ZN5Botan3TLS9Callbacks26tls_generate_ephemeral_keyERKNSt3__17variantIJNS0_12Group_ParamsENS_8DL_GroupEEEERNS_21RandomNumberGeneratorE:
  362|  2.61k|   const std::variant<TLS::Group_Params, DL_Group>& group, RandomNumberGenerator& rng) {
  363|  2.61k|   if(is_dh_group(group)) {
  ------------------
  |  Branch (363:7): [True: 0, False: 2.61k]
  ------------------
  364|      0|      const DL_Group dl_group = get_dl_group(group);
  365|      0|      return std::make_unique<DH_PrivateKey>(rng, dl_group);
  366|      0|   }
  367|       |
  368|  2.61k|   BOTAN_ASSERT_NOMSG(std::holds_alternative<TLS::Group_Params>(group));
  ------------------
  |  |   84|  2.61k|   do {                                                                     \
  |  |   85|  2.61k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  2.61k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 2.61k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  2.61k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 2.61k]
  |  |  ------------------
  ------------------
  369|  2.61k|   const auto group_params = std::get<TLS::Group_Params>(group);
  370|       |
  371|  2.61k|   if(group_params.is_ecdh_named_curve()) {
  ------------------
  |  Branch (371:7): [True: 2.59k, False: 25]
  ------------------
  372|  2.59k|      const auto ec_group = EC_Group::from_name(group_params.to_algorithm_spec().value());
  373|  2.59k|      auto ecdh_key = std::make_unique<ECDH_PrivateKey>(rng, ec_group);
  374|       |
  375|       |      // RFC 8446 Ch. 4.2.8.2
  376|       |      //
  377|       |      //   Note: Versions of TLS prior to 1.3 permitted point format
  378|       |      //   negotiation; TLS 1.3 removes this feature in favor of a single point
  379|       |      //   format for each curve.
  380|       |      //
  381|       |      // Hence, TLS 1.3 won't take Policy::use_ecc_point_compression() or
  382|       |      // ClientHello::prefers_compressed_ec_points() into account but always use
  383|       |      // uncompressed point encoding. Note that TLS 1.2 uses the
  384|       |      // `tls12_generate_ephemeral_ecdh_key()` callback, which allows to specify
  385|       |      // the point encoding format.
  386|  2.59k|      ecdh_key->set_point_encoding(EC_Point_Format::Uncompressed);
  387|  2.59k|      return ecdh_key;
  388|  2.59k|   }
  389|       |
  390|     25|#if defined(BOTAN_HAS_X25519)
  391|     25|   if(group_params.is_x25519()) {
  ------------------
  |  Branch (391:7): [True: 10, False: 15]
  ------------------
  392|     10|      return std::make_unique<X25519_PrivateKey>(rng);
  393|     10|   }
  394|     15|#endif
  395|       |
  396|     15|#if defined(BOTAN_HAS_X448)
  397|     15|   if(group_params.is_x448()) {
  ------------------
  |  Branch (397:7): [True: 15, False: 0]
  ------------------
  398|     15|      return std::make_unique<X448_PrivateKey>(rng);
  399|     15|   }
  400|      0|#endif
  401|       |
  402|      0|   if(group_params.is_kem()) {
  ------------------
  |  Branch (402:7): [True: 0, False: 0]
  ------------------
  403|      0|      throw TLS_Exception(Alert::IllegalParameter, "cannot generate an ephemeral KEX key for a KEM");
  404|      0|   }
  405|       |
  406|      0|   throw TLS_Exception(Alert::DecodeError, "cannot create a key offering without a group definition");
  407|      0|}
_ZN5Botan3TLS9Callbacks33tls12_generate_ephemeral_ecdh_keyENS0_12Group_ParamsERNS_21RandomNumberGeneratorENS_15EC_Point_FormatE:
  410|  2.59k|   TLS::Group_Params group, RandomNumberGenerator& rng, EC_Point_Format tls12_ecc_pubkey_encoding_format) {
  411|       |   // Delegating to the "universal" callback to obtain an ECDH key pair
  412|  2.59k|   auto key = tls_generate_ephemeral_key(group, rng);
  413|       |
  414|       |   // For ordinary ECDH key pairs (that are derived from `ECDH_PublicKey`), we
  415|       |   // set the internal point encoding flag for the key before passing it on into
  416|       |   // the TLS 1.2 implementation. For user-defined keypair types (e.g. to
  417|       |   // offload to some crypto hardware) inheriting from Botan's `ECDH_PublicKey`
  418|       |   // might not be feasible. Such users should consider overriding this
  419|       |   // ECDH-specific callback and ensure that their custom class handles the
  420|       |   // public point encoding as requested by `tls12_ecc_pubkey_encoding_format`.
  421|  2.59k|   if(auto* ecc_key = dynamic_cast<ECDH_PublicKey*>(key.get())) {
  ------------------
  |  Branch (421:13): [True: 2.59k, False: 0]
  ------------------
  422|  2.59k|      ecc_key->set_point_encoding(tls12_ecc_pubkey_encoding_format);
  423|  2.59k|   }
  424|       |
  425|  2.59k|   return key;
  426|  2.59k|}
_ZN5Botan3TLS9Callbacks27tls_ephemeral_key_agreementERKNSt3__17variantIJNS0_12Group_ParamsENS_8DL_GroupEEEERKNS_20PK_Key_Agreement_KeyERKNS2_6vectorIhNS2_9allocatorIhEEEERNS_21RandomNumberGeneratorERKNS0_6PolicyE:
  433|  2.00k|   const Policy& policy) {
  434|  2.00k|   const auto kex_pub_key = [&]() {
  435|  2.00k|      try {
  436|  2.00k|         return tls_deserialize_peer_public_key(group, public_value);
  437|  2.00k|      } catch(const Decoding_Error& ex) {
  438|       |         // This exception means that the public key was invalid. However,
  439|       |         // TLS' DecodeError would imply that a protocol message was invalid.
  440|  2.00k|         throw TLS_Exception(Alert::IllegalParameter, ex.what());
  441|  2.00k|      } catch(const Invalid_Argument& ex) {
  442|  2.00k|         throw TLS_Exception(Alert::IllegalParameter, ex.what());
  443|  2.00k|      }
  444|  2.00k|   }();
  445|       |
  446|  2.00k|   BOTAN_ASSERT_NONNULL(kex_pub_key);
  ------------------
  |  |  123|  2.00k|   do {                                                                                   \
  |  |  124|  2.00k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 2.00k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  2.00k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  447|  2.00k|   policy.check_peer_key_acceptable(*kex_pub_key);
  448|       |
  449|       |   // RFC 8422 - 5.11.
  450|       |   //   With X25519 and X448, a receiving party MUST check whether the
  451|       |   //   computed premaster secret is the all-zero value and abort the
  452|       |   //   handshake if so, as described in Section 6 of [RFC7748].
  453|       |   //
  454|       |   // This is done within the key agreement operation and throws
  455|       |   // an Invalid_Argument exception if the shared secret is all-zero.
  456|  2.00k|   try {
  457|  2.00k|      const PK_Key_Agreement ka(private_key, rng, "Raw");
  458|  2.00k|      return ka.derive_key(0, kex_pub_key->raw_public_key_bits()).bits_of();
  459|  2.00k|   } catch(const Invalid_Argument& ex) {
  460|      2|      throw TLS_Exception(Alert::IllegalParameter, ex.what());
  461|      2|   }
  462|  2.00k|}
_ZN5Botan3TLS9Callbacks23tls_session_establishedERKNS0_15Session_SummaryE:
  464|     79|void TLS::Callbacks::tls_session_established(const Session_Summary& session) {
  465|     79|   BOTAN_UNUSED(session);
  ------------------
  |  |  151|     79|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  466|     79|}
_ZN5Botan3TLS9Callbacks23tls_provide_cert_statusERKNSt3__16vectorINS_16X509_CertificateENS2_9allocatorIS4_EEEERKNS0_26Certificate_Status_RequestE:
  469|      1|                                                             const Certificate_Status_Request& csr) {
  470|      1|   BOTAN_UNUSED(chain, csr);
  ------------------
  |  |  151|      1|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  471|      1|   return std::vector<uint8_t>();
  472|      1|}
_ZNK5Botan3TLS9Callbacks27tls12_protocol_specific_kdfENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  492|  1.63k|std::unique_ptr<KDF> TLS::Callbacks::tls12_protocol_specific_kdf(std::string_view prf_algo) const {
  493|  1.63k|   if(prf_algo == "MD5" || prf_algo == "SHA-1") {
  ------------------
  |  Branch (493:7): [True: 0, False: 1.63k]
  |  Branch (493:28): [True: 365, False: 1.26k]
  ------------------
  494|    365|      return KDF::create_or_throw("TLS-12-PRF(SHA-256)");
  495|    365|   }
  496|       |
  497|  1.26k|   return KDF::create_or_throw(Botan::fmt("TLS-12-PRF({})", prf_algo));
  498|  1.63k|}
tls_callbacks.cpp:_ZN5Botan12_GLOBAL__N_111is_dh_groupERKNSt3__17variantIJNS_3TLS12Group_ParamsENS_8DL_GroupEEEE:
  177|  4.62k|bool is_dh_group(const std::variant<TLS::Group_Params, DL_Group>& group) {
  178|  4.62k|   return std::holds_alternative<DL_Group>(group) || std::get<TLS::Group_Params>(group).is_dh_named_group();
  ------------------
  |  Branch (178:11): [True: 0, False: 4.62k]
  |  Branch (178:54): [True: 0, False: 4.62k]
  ------------------
  179|  4.62k|}
tls_callbacks.cpp:_ZZN5Botan3TLS9Callbacks31tls_deserialize_peer_public_keyERKNSt3__17variantIJNS0_12Group_ParamsENS_8DL_GroupEEEENS2_4spanIKhLm18446744073709551615EEEENK3$_0clEv:
  229|  1.99k|      auto point = [&]() -> EC_AffinePoint {
  230|  1.99k|         if(auto pt_uncompressed = EC_AffinePoint::deserialize_uncompressed(ec_group, key_bits)) {
  ------------------
  |  Branch (230:18): [True: 0, False: 1.99k]
  ------------------
  231|      0|            return std::move(pt_uncompressed).value();
  232|  1.99k|         } else if(auto pt_compressed = EC_AffinePoint::deserialize_compressed(ec_group, key_bits)) {
  ------------------
  |  Branch (232:25): [True: 1.61k, False: 386]
  ------------------
  233|  1.61k|            return std::move(pt_compressed).value();
  234|  1.61k|         } else {
  235|    386|            throw Decoding_Error("Invalid ECDH public key encoding");
  236|    386|         }
  237|  1.99k|      }();
tls_callbacks.cpp:_ZZN5Botan3TLS9Callbacks27tls_ephemeral_key_agreementERKNSt3__17variantIJNS0_12Group_ParamsENS_8DL_GroupEEEERKNS_20PK_Key_Agreement_KeyERKNS2_6vectorIhNS2_9allocatorIhEEEERNS_21RandomNumberGeneratorERKNS0_6PolicyEENK3$_0clEv:
  434|  2.00k|   const auto kex_pub_key = [&]() {
  435|  2.00k|      try {
  436|  2.00k|         return tls_deserialize_peer_public_key(group, public_value);
  437|  2.00k|      } catch(const Decoding_Error& ex) {
  438|       |         // This exception means that the public key was invalid. However,
  439|       |         // TLS' DecodeError would imply that a protocol message was invalid.
  440|    390|         throw TLS_Exception(Alert::IllegalParameter, ex.what());
  441|    390|      } catch(const Invalid_Argument& ex) {
  442|      1|         throw TLS_Exception(Alert::IllegalParameter, ex.what());
  443|      1|      }
  444|  2.00k|   }();

_ZNK5Botan3TLS11Ciphersuite26nonce_bytes_from_handshakeEv:
   16|  1.92k|size_t Ciphersuite::nonce_bytes_from_handshake() const {
   17|  1.92k|   switch(m_nonce_format) {
  ------------------
  |  Branch (17:11): [True: 1.92k, False: 0]
  ------------------
   18|    840|      case Nonce_Format::CBC_MODE:
  ------------------
  |  Branch (18:7): [True: 840, False: 1.08k]
  ------------------
   19|    840|         return 0;
   20|    407|      case Nonce_Format::AEAD_IMPLICIT_4:
  ------------------
  |  Branch (20:7): [True: 407, False: 1.52k]
  ------------------
   21|    407|         return 4;
   22|    681|      case Nonce_Format::AEAD_XOR_12:
  ------------------
  |  Branch (22:7): [True: 681, False: 1.24k]
  ------------------
   23|    681|         return 12;
   24|      0|      case Nonce_Format::NULL_CIPHER:
  ------------------
  |  Branch (24:7): [True: 0, False: 1.92k]
  ------------------
   25|      0|         return 0;
   26|  1.92k|   }
   27|       |
   28|      0|   throw Invalid_State("In Ciphersuite::nonce_bytes_from_handshake invalid enum value");
   29|  1.92k|}
_ZNK5Botan3TLS11Ciphersuite23nonce_bytes_from_recordENS0_16Protocol_VersionE:
   31|    456|size_t Ciphersuite::nonce_bytes_from_record(Protocol_Version version) const {
   32|    456|   BOTAN_UNUSED(version);
  ------------------
  |  |  151|    456|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   33|    456|   switch(m_nonce_format) {
  ------------------
  |  Branch (33:11): [True: 456, False: 0]
  ------------------
   34|    207|      case Nonce_Format::CBC_MODE:
  ------------------
  |  Branch (34:7): [True: 207, False: 249]
  ------------------
   35|    207|         return cipher_algo() == "3DES" ? 8 : 16;
  ------------------
  |  Branch (35:17): [True: 86, False: 121]
  ------------------
   36|    180|      case Nonce_Format::AEAD_IMPLICIT_4:
  ------------------
  |  Branch (36:7): [True: 180, False: 276]
  ------------------
   37|    180|         return 8;
   38|     69|      case Nonce_Format::AEAD_XOR_12:
  ------------------
  |  Branch (38:7): [True: 69, False: 387]
  ------------------
   39|     69|      case Nonce_Format::NULL_CIPHER:
  ------------------
  |  Branch (39:7): [True: 0, False: 456]
  ------------------
   40|     69|         return 0;
   41|    456|   }
   42|       |
   43|      0|   throw Invalid_State("In Ciphersuite::nonce_bytes_from_handshake invalid enum value");
   44|    456|}
_ZNK5Botan3TLS11Ciphersuite15ecc_ciphersuiteEv:
   73|  3.20k|bool Ciphersuite::ecc_ciphersuite() const {
   74|  3.20k|   return kex_method() == Kex_Algo::ECDH || kex_method() == Kex_Algo::ECDHE_PSK || auth_method() == Auth_Method::ECDSA;
  ------------------
  |  Branch (74:11): [True: 24, False: 3.17k]
  |  Branch (74:45): [True: 2.65k, False: 523]
  |  Branch (74:84): [True: 0, False: 523]
  ------------------
   75|  3.20k|}
_ZNK5Botan3TLS11Ciphersuite17usable_in_versionENS0_16Protocol_VersionE:
   77|   285k|bool Ciphersuite::usable_in_version(Protocol_Version version) const {
   78|       |   // RFC 8446 B.4.:
   79|       |   //   Although TLS 1.3 uses the same cipher suite space as previous
   80|       |   //   versions of TLS, TLS 1.3 cipher suites are defined differently, only
   81|       |   //   specifying the symmetric ciphers, and cannot be used for TLS 1.2.
   82|       |   //   Similarly, cipher suites for TLS 1.2 and lower cannot be used with
   83|       |   //   TLS 1.3.
   84|       |   //
   85|       |   // Currently cipher suite codes {0x13,0x01} through {0x13,0x05} are
   86|       |   // allowed for TLS 1.3. This may change in the future.
   87|   285k|   const auto is_legacy_suite = (ciphersuite_code() & 0xFF00) != 0x1300;
   88|   285k|   return version.is_pre_tls_13() == is_legacy_suite;
   89|   285k|}
_ZNK5Botan3TLS11Ciphersuite15cbc_ciphersuiteEv:
   91|  2.81k|bool Ciphersuite::cbc_ciphersuite() const {
   92|  2.81k|   return (mac_algo() != "AEAD" && cipher_algo() != "NULL");
  ------------------
  |  Branch (92:12): [True: 1.53k, False: 1.27k]
  |  Branch (92:36): [True: 1.53k, False: 0]
  ------------------
   93|  2.81k|}
_ZNK5Botan3TLS11Ciphersuite14signature_usedEv:
  108|  12.0k|bool Ciphersuite::signature_used() const {
  109|  12.0k|   return auth_method() != Auth_Method::IMPLICIT;
  110|  12.0k|}
_ZNK5Botan3TLS11Ciphersuite23is_certificate_requiredEv:
  112|  6.00k|bool Ciphersuite::is_certificate_required() const {
  113|  6.00k|   return signature_used() || kex_method() == Kex_Algo::STATIC_RSA;
  ------------------
  |  Branch (113:11): [True: 259, False: 5.74k]
  |  Branch (113:31): [True: 121, False: 5.62k]
  ------------------
  114|  6.00k|}
_ZN5Botan3TLS11Ciphersuite5by_idEt:
  116|  8.97k|std::optional<Ciphersuite> Ciphersuite::by_id(uint16_t suite) {
  117|  8.97k|   const std::vector<Ciphersuite>& all_suites = all_known_ciphersuites();
  118|  8.97k|   auto s = std::lower_bound(all_suites.begin(), all_suites.end(), suite);
  119|       |
  120|  8.97k|   if(s != all_suites.end() && s->ciphersuite_code() == suite) {
  ------------------
  |  Branch (120:7): [True: 8.97k, False: 0]
  |  Branch (120:7): [True: 8.97k, False: 0]
  |  Branch (120:32): [True: 8.97k, False: 0]
  ------------------
  121|  8.97k|      return *s;
  122|  8.97k|   }
  123|       |
  124|      0|   return std::nullopt;  // some unknown ciphersuite
  125|  8.97k|}

_ZN5Botan3TLS10ExtensionsD2Ev:
  140|  11.5k|Extensions::~Extensions() = default;
_ZNK5Botan3TLS10Extensions3hasENS0_14Extension_CodeE:
  142|  91.0k|bool Extensions::has(Extension_Code type) const {
  143|  91.0k|   return m_extensions.contains(type);
  144|  91.0k|}
_ZNK5Botan3TLS10Extensions3getENS0_14Extension_CodeE:
  146|  72.7k|Extension* Extensions::get(Extension_Code type) const {
  147|  72.7k|   const auto i = m_extensions.find(type);
  148|       |
  149|  72.7k|   if(i == m_extensions.end()) {
  ------------------
  |  Branch (149:7): [True: 51.8k, False: 20.8k]
  ------------------
  150|  51.8k|      return nullptr;
  151|  51.8k|   } else {
  152|  20.8k|      return i->second.get();
  153|  20.8k|   }
  154|  72.7k|}
_ZN5Botan3TLS10Extensions3addENSt3__110unique_ptrINS0_9ExtensionENS2_14default_deleteIS4_EEEE:
  156|  46.8k|void Extensions::add(std::unique_ptr<Extension> extn) {
  157|  46.8k|   const auto type = extn->type();
  158|  46.8k|   if(has(type)) {
  ------------------
  |  Branch (158:7): [True: 0, False: 46.8k]
  ------------------
  159|      0|      throw Invalid_Argument("cannot add the same extension twice: " + std::to_string(static_cast<uint16_t>(type)));
  160|      0|   }
  161|       |
  162|  46.8k|   m_extension_codes.push_back(type);
  163|  46.8k|   m_extensions.emplace(type, std::move(extn));
  164|  46.8k|}
_ZN5Botan3TLS10Extensions11deserializeERNS0_15TLS_Data_ReaderENS0_15Connection_SideENS0_14Handshake_TypeE:
  166|  7.88k|void Extensions::deserialize(TLS_Data_Reader& reader, const Connection_Side from, const Handshake_Type message_type) {
  167|  7.88k|   if(reader.has_remaining()) {
  ------------------
  |  Branch (167:7): [True: 7.70k, False: 179]
  ------------------
  168|  7.70k|      const uint16_t all_extn_size = reader.get_uint16_t();
  169|       |
  170|  7.70k|      if(reader.remaining_bytes() != all_extn_size) {
  ------------------
  |  Branch (170:10): [True: 32, False: 7.67k]
  ------------------
  171|     32|         throw Decoding_Error("Bad extension size");
  172|     32|      }
  173|       |
  174|  51.9k|      while(reader.has_remaining()) {
  ------------------
  |  Branch (174:13): [True: 44.2k, False: 7.67k]
  ------------------
  175|  44.2k|         const uint16_t extension_code = reader.get_uint16_t();
  176|  44.2k|         const uint16_t extension_size = reader.get_uint16_t();
  177|       |
  178|  44.2k|         const auto type = static_cast<Extension_Code>(extension_code);
  179|       |
  180|  44.2k|         if(this->has(type)) {
  ------------------
  |  Branch (180:13): [True: 4, False: 44.2k]
  ------------------
  181|      4|            throw TLS_Exception(TLS::Alert::DecodeError, "Peer sent duplicated extensions");
  182|      4|         }
  183|       |
  184|       |         // TODO offer a function on reader that returns a byte range as a reference
  185|       |         // to avoid this copy of the extension data
  186|  44.2k|         const std::vector<uint8_t> extn_data = reader.get_fixed<uint8_t>(extension_size);
  187|  44.2k|         m_raw_extension_data[type] = extn_data;
  188|  44.2k|         TLS_Data_Reader extn_reader("Extension", extn_data);
  189|  44.2k|         this->add(make_extension(extn_reader, type, from, message_type));
  190|  44.2k|         extn_reader.assert_done();
  191|  44.2k|      }
  192|  7.67k|   }
  193|  7.88k|}
_ZNK5Botan3TLS10Extensions19contains_other_thanERKNSt3__13setINS0_14Extension_CodeENS2_4lessIS4_EENS2_9allocatorIS4_EEEEb:
  196|    220|                                     const bool allow_unknown_extensions) const {
  197|    220|   const auto found = extension_types();
  198|       |
  199|    220|   std::vector<Extension_Code> diff;
  200|    220|   std::set_difference(
  201|    220|      found.cbegin(), found.end(), allowed_extensions.cbegin(), allowed_extensions.cend(), std::back_inserter(diff));
  202|       |
  203|    220|   if(allow_unknown_extensions) {
  ------------------
  |  Branch (203:7): [True: 219, False: 1]
  ------------------
  204|       |      // Go through the found unexpected extensions whether any of those
  205|       |      // is known to this TLS implementation.
  206|    219|      const auto itr = std::find_if(diff.cbegin(), diff.cend(), [this](const auto ext_type) {
  207|    219|         const auto ext = get(ext_type);
  208|    219|         return ext && ext->is_implemented();
  209|    219|      });
  210|       |
  211|       |      // ... if yes, `contains_other_than` is true
  212|    219|      return itr != diff.cend();
  213|    219|   }
  214|       |
  215|      1|   return !diff.empty();
  216|    220|}
_ZNK5Botan3TLS10Extensions9serializeENS0_15Connection_SideE:
  231|  2.81k|std::vector<uint8_t> Extensions::serialize(Connection_Side whoami) const {
  232|  2.81k|   std::vector<uint8_t> buf(2);  // 2 bytes for length field
  233|       |
  234|       |   // Serialize in the order extensions were added, which matters for TLS 1.3
  235|  3.41k|   for(const auto extn_type : m_extension_codes) {
  ------------------
  |  Branch (235:29): [True: 3.41k, False: 2.81k]
  ------------------
  236|  3.41k|      const auto& extn = m_extensions.at(extn_type);
  237|       |
  238|  3.41k|      if(extn->empty()) {
  ------------------
  |  Branch (238:10): [True: 0, False: 3.41k]
  ------------------
  239|      0|         continue;
  240|      0|      }
  241|       |
  242|  3.41k|      const uint16_t extn_code = static_cast<uint16_t>(extn_type);
  243|       |
  244|  3.41k|      const std::vector<uint8_t> extn_val = extn->serialize(whoami);
  245|       |
  246|       |      // Each extension carries a uint16 length prefix.
  247|  3.41k|      BOTAN_ASSERT_NOMSG(extn_val.size() <= 0xFFFF);
  ------------------
  |  |   84|  3.41k|   do {                                                                     \
  |  |   85|  3.41k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  3.41k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 3.41k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  3.41k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 3.41k]
  |  |  ------------------
  ------------------
  248|       |
  249|  3.41k|      buf.push_back(get_byte<0>(extn_code));
  250|  3.41k|      buf.push_back(get_byte<1>(extn_code));
  251|       |
  252|  3.41k|      buf.push_back(get_byte<0>(static_cast<uint16_t>(extn_val.size())));
  253|  3.41k|      buf.push_back(get_byte<1>(static_cast<uint16_t>(extn_val.size())));
  254|       |
  255|  3.41k|      buf += extn_val;
  256|  3.41k|   }
  257|       |
  258|       |   // The outer extensions block is itself uint16-length-prefixed.
  259|  2.81k|   BOTAN_ASSERT_NOMSG(buf.size() - 2 <= 0xFFFF);
  ------------------
  |  |   84|  2.81k|   do {                                                                     \
  |  |   85|  2.81k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  2.81k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 2.81k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  2.81k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 2.81k]
  |  |  ------------------
  ------------------
  260|  2.81k|   const uint16_t extn_size = static_cast<uint16_t>(buf.size() - 2);
  261|       |
  262|  2.81k|   buf[0] = get_byte<0>(extn_size);
  263|  2.81k|   buf[1] = get_byte<1>(extn_size);
  264|       |
  265|       |   // avoid sending a completely empty extensions block
  266|  2.81k|   if(buf.size() == 2) {
  ------------------
  |  Branch (266:7): [True: 0, False: 2.81k]
  ------------------
  267|      0|      return std::vector<uint8_t>();
  268|      0|   }
  269|       |
  270|  2.81k|   return buf;
  271|  2.81k|}
_ZNK5Botan3TLS10Extensions15extension_typesEv:
  273|  2.84k|std::set<Extension_Code> Extensions::extension_types() const {
  274|  2.84k|   std::set<Extension_Code> offers;
  275|  19.2k|   for(const auto& [extn_type, extn] : m_extensions) {
  ------------------
  |  Branch (275:38): [True: 19.2k, False: 2.84k]
  ------------------
  276|       |      // Consistent with serialize(): empty extensions are not placed on
  277|       |      // the wire so they must not appear in the "offered" set either.
  278|  19.2k|      if(!extn->empty()) {
  ------------------
  |  Branch (278:10): [True: 19.2k, False: 6]
  ------------------
  279|  19.2k|         offers.insert(extn_type);
  280|  19.2k|      }
  281|  19.2k|   }
  282|  2.84k|   return offers;
  283|  2.84k|}
_ZN5Botan3TLS17Unknown_ExtensionC2ENS0_14Extension_CodeERNS0_15TLS_Data_ReaderEt:
  313|  29.5k|      m_type(type), m_value(reader.get_fixed<uint8_t>(extension_size)) {}
_ZN5Botan3TLS21Server_Name_IndicatorC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  319|    104|Server_Name_Indicator::Server_Name_Indicator(TLS_Data_Reader& reader, uint16_t extension_size, Connection_Side from) {
  320|       |   /*
  321|       |   RFC 6066 Section 3
  322|       |
  323|       |      A server that receives a client hello containing the "server_name"
  324|       |      extension MAY use the information contained in the extension to guide
  325|       |      its selection of an appropriate certificate to return to the client,
  326|       |      and/or other aspects of security policy.  In this event, the server
  327|       |      SHALL include an extension of type "server_name" in the (extended)
  328|       |      server hello.  The "extension_data" field of this extension SHALL be
  329|       |      empty.
  330|       |   */
  331|    104|   if(from == Connection_Side::Server) {
  ------------------
  |  Branch (331:7): [True: 51, False: 53]
  ------------------
  332|     51|      if(extension_size != 0) {
  ------------------
  |  Branch (332:10): [True: 4, False: 47]
  ------------------
  333|      4|         throw TLS_Exception(Alert::IllegalParameter, "Server sent non-empty SNI extension");
  334|      4|      }
  335|     53|   } else {
  336|       |      // Clients are required to send at least one name in the SNI
  337|     53|      if(extension_size == 0) {
  ------------------
  |  Branch (337:10): [True: 3, False: 50]
  ------------------
  338|      3|         throw TLS_Exception(Alert::IllegalParameter, "Client sent empty SNI extension");
  339|      3|      }
  340|       |
  341|     50|      const uint16_t name_bytes = reader.get_uint16_t();
  342|       |
  343|       |      // RFC 6066 3: a ServerName carrying a host_name (the only NameType
  344|       |      // currently defined and the only one this implementation acts on)
  345|       |      // requires at least 1 byte name_type + 2 byte length + 1 byte HostName.
  346|     50|      if(name_bytes + 2 != extension_size || name_bytes < 4) {
  ------------------
  |  Branch (346:10): [True: 16, False: 34]
  |  Branch (346:46): [True: 1, False: 33]
  ------------------
  347|     17|         throw Decoding_Error("Bad encoding of SNI extension");
  348|     17|      }
  349|       |
  350|     33|      BOTAN_ASSERT_NOMSG(reader.remaining_bytes() == name_bytes);
  ------------------
  |  |   84|     33|   do {                                                                     \
  |  |   85|     33|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     33|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 33]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     33|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 33]
  |  |  ------------------
  ------------------
  351|       |
  352|    106|      while(reader.has_remaining()) {
  ------------------
  |  Branch (352:13): [True: 76, False: 30]
  ------------------
  353|     76|         const uint8_t name_type = reader.get_byte();
  354|       |
  355|     76|         if(name_type == 0) {
  ------------------
  |  Branch (355:13): [True: 26, False: 50]
  ------------------
  356|       |            /*
  357|       |            RFC 6066 Section 3
  358|       |               The ServerNameList MUST NOT contain more than one name of the same name_type.
  359|       |            */
  360|     26|            if(!m_sni_host_name.empty()) {
  ------------------
  |  Branch (360:16): [True: 3, False: 23]
  ------------------
  361|      3|               throw Decoding_Error("TLS ServerNameIndicator contains more than one host_name");
  362|      3|            }
  363|     23|            m_sni_host_name = reader.get_string(2, 1, 65535);
  364|     50|         } else {
  365|       |            /*
  366|       |            Unknown name type - skip its length-prefixed value and continue
  367|       |
  368|       |            RFC 6066 Section 3
  369|       |               For backward compatibility, all future data structures associated
  370|       |               with new NameTypes MUST begin with a 16-bit length field.
  371|       |            */
  372|     50|            const uint16_t unknown_name_len = reader.get_uint16_t();
  373|     50|            reader.discard_next(unknown_name_len);
  374|     50|         }
  375|     76|      }
  376|     33|   }
  377|    104|}
_ZN5Botan3TLS39Application_Layer_Protocol_NotificationC2ENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  431|     25|Application_Layer_Protocol_Notification::Application_Layer_Protocol_Notification(std::string_view protocol) {
  432|     25|   BOTAN_ARG_CHECK(!protocol.empty(), "ALPN protocol name must not be empty");
  ------------------
  |  |   35|     25|   do {                                                          \
  |  |   36|     25|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     25|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 25]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     25|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 25]
  |  |  ------------------
  ------------------
  433|     25|   BOTAN_ARG_CHECK(protocol.size() < 256, "ALPN protocol name too long");
  ------------------
  |  |   35|     25|   do {                                                          \
  |  |   36|     25|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     25|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 25]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     25|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 25]
  |  |  ------------------
  ------------------
  434|     25|   m_protocols.emplace_back(protocol);
  435|     25|}
_ZN5Botan3TLS39Application_Layer_Protocol_NotificationC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  447|    128|                                                                                 Connection_Side from) {
  448|    128|   if(extension_size < 2) {
  ------------------
  |  Branch (448:7): [True: 2, False: 126]
  ------------------
  449|      2|      throw Decoding_Error("ALPN extension cannot be empty");
  450|      2|   }
  451|       |
  452|    126|   const uint16_t name_bytes = reader.get_uint16_t();
  453|       |
  454|    126|   size_t bytes_remaining = extension_size - 2;
  455|       |
  456|    126|   if(name_bytes != bytes_remaining) {
  ------------------
  |  Branch (456:7): [True: 9, False: 117]
  ------------------
  457|      9|      throw Decoding_Error("Bad encoding of ALPN extension, bad length field");
  458|      9|   }
  459|       |
  460|       |   // RFC 7301 3.1: ProtocolName protocol_name_list<2..2^16-1>
  461|    117|   if(name_bytes == 0) {
  ------------------
  |  Branch (461:7): [True: 1, False: 116]
  ------------------
  462|      1|      throw Decoding_Error("Empty ALPN protocol_name_list not allowed");
  463|      1|   }
  464|       |
  465|  1.79k|   while(bytes_remaining > 0) {
  ------------------
  |  Branch (465:10): [True: 1.67k, False: 114]
  ------------------
  466|  1.67k|      const std::string p = reader.get_string(1, 0, 255);
  467|       |
  468|  1.67k|      if(bytes_remaining < p.size() + 1) {
  ------------------
  |  Branch (468:10): [True: 0, False: 1.67k]
  ------------------
  469|      0|         throw Decoding_Error("Bad encoding of ALPN, length field too long");
  470|      0|      }
  471|       |
  472|  1.67k|      if(p.empty()) {
  ------------------
  |  Branch (472:10): [True: 2, False: 1.67k]
  ------------------
  473|      2|         throw Decoding_Error("Empty ALPN protocol not allowed");
  474|      2|      }
  475|       |
  476|  1.67k|      bytes_remaining -= (p.size() + 1);
  477|       |
  478|  1.67k|      m_protocols.push_back(p);
  479|  1.67k|   }
  480|       |
  481|       |   // RFC 7301 3.1
  482|       |   //    The "extension_data" field of the [...] extension is structured the
  483|       |   //    same as described above for the client "extension_data", except that
  484|       |   //    the "ProtocolNameList" MUST contain exactly one "ProtocolName".
  485|    114|   if(from == Connection_Side::Server && m_protocols.size() != 1) {
  ------------------
  |  Branch (485:7): [True: 11, False: 103]
  |  Branch (485:42): [True: 8, False: 3]
  ------------------
  486|      8|      throw TLS_Exception(
  487|      8|         Alert::DecodeError,
  488|      8|         "Server sent " + std::to_string(m_protocols.size()) + " protocols in ALPN extension response");
  489|      8|   }
  490|    114|}
_ZNK5Botan3TLS39Application_Layer_Protocol_Notification9serializeENS0_15Connection_SideE:
  497|     25|std::vector<uint8_t> Application_Layer_Protocol_Notification::serialize(Connection_Side /*whoami*/) const {
  498|     25|   std::vector<uint8_t> buf(2);
  499|       |
  500|     25|   for(auto&& proto : m_protocols) {
  ------------------
  |  Branch (500:21): [True: 25, False: 25]
  ------------------
  501|     25|      if(proto.length() >= 256) {
  ------------------
  |  Branch (501:10): [True: 0, False: 25]
  ------------------
  502|      0|         throw TLS_Exception(Alert::InternalError, "ALPN name too long");
  503|      0|      }
  504|     25|      if(!proto.empty()) {
  ------------------
  |  Branch (504:10): [True: 25, False: 0]
  ------------------
  505|     25|         append_tls_length_value(buf, proto, 1);
  506|     25|      }
  507|     25|   }
  508|       |
  509|       |   // RFC 7301 3.1: ProtocolName protocol_name_list<2..2^16-1>;
  510|     25|   BOTAN_ASSERT_NOMSG(buf.size() - 2 <= 0xFFFF);
  ------------------
  |  |   84|     25|   do {                                                                     \
  |  |   85|     25|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|     25|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 25]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|     25|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 25]
  |  |  ------------------
  ------------------
  511|     25|   buf[0] = get_byte<0>(static_cast<uint16_t>(buf.size() - 2));
  512|     25|   buf[1] = get_byte<1>(static_cast<uint16_t>(buf.size() - 2));
  513|       |
  514|     25|   return buf;
  515|     25|}
_ZN5Botan3TLS21Certificate_Type_BaseC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  553|    106|      m_from(from) {
  554|    106|   if(extension_size == 0) {
  ------------------
  |  Branch (554:7): [True: 2, False: 104]
  ------------------
  555|      2|      throw Decoding_Error("Certificate type extension cannot be empty");
  556|      2|   }
  557|       |
  558|    104|   if(from == Connection_Side::Client) {
  ------------------
  |  Branch (558:7): [True: 88, False: 16]
  ------------------
  559|     88|      const auto type_bytes = reader.get_tls_length_value(1);
  560|     88|      if(static_cast<size_t>(extension_size) != type_bytes.size() + 1) {
  ------------------
  |  Branch (560:10): [True: 2, False: 86]
  ------------------
  561|      2|         throw Decoding_Error("certificate type extension had inconsistent length");
  562|      2|      }
  563|       |      // RFC 7250 4: {client,server}_certificate_types<1..2^8-1> so must be non-empty
  564|     86|      if(type_bytes.empty()) {
  ------------------
  |  Branch (564:10): [True: 1, False: 85]
  ------------------
  565|      1|         throw Decoding_Error("Certificate type extension contains no types");
  566|      1|      }
  567|     85|      std::transform(
  568|     85|         type_bytes.begin(), type_bytes.end(), std::back_inserter(m_certificate_types), [](const auto type_byte) {
  569|     85|            return static_cast<Certificate_Type>(type_byte);
  570|     85|         });
  571|     85|   } else {
  572|       |      // RFC 7250 4.2
  573|       |      //    Note that only a single value is permitted in the
  574|       |      //    server_certificate_type extension when carried in the server hello.
  575|     16|      if(extension_size != 1) {
  ------------------
  |  Branch (575:10): [True: 5, False: 11]
  ------------------
  576|      5|         throw Decoding_Error("Server's certificate type extension must be of length 1");
  577|      5|      }
  578|     11|      const auto type_byte = reader.get_byte();
  579|     11|      m_certificate_types.push_back(static_cast<Certificate_Type>(type_byte));
  580|     11|   }
  581|    104|}
_ZNK5Botan3TLS16Supported_Groups9ec_groupsEv:
  626|  5.30k|std::vector<Group_Params> Supported_Groups::ec_groups() const {
  627|  5.30k|   std::vector<Group_Params> ec;
  628|  23.8k|   for(auto g : m_groups) {
  ------------------
  |  Branch (628:15): [True: 23.8k, False: 5.30k]
  ------------------
  629|  23.8k|      if(g.is_pure_ecc_group()) {
  ------------------
  |  Branch (629:10): [True: 5.49k, False: 18.3k]
  ------------------
  630|  5.49k|         ec.push_back(g);
  631|  5.49k|      }
  632|  23.8k|   }
  633|  5.30k|   return ec;
  634|  5.30k|}
_ZNK5Botan3TLS16Supported_Groups9dh_groupsEv:
  636|  5.36k|std::vector<Group_Params> Supported_Groups::dh_groups() const {
  637|  5.36k|   std::vector<Group_Params> dh;
  638|  25.2k|   for(auto g : m_groups) {
  ------------------
  |  Branch (638:15): [True: 25.2k, False: 5.36k]
  ------------------
  639|  25.2k|      if(g.is_in_ffdhe_range()) {
  ------------------
  |  Branch (639:10): [True: 1.15k, False: 24.1k]
  ------------------
  640|  1.15k|         dh.push_back(g);
  641|  1.15k|      }
  642|  25.2k|   }
  643|  5.36k|   return dh;
  644|  5.36k|}
_ZN5Botan3TLS16Supported_GroupsC2ERNS0_15TLS_Data_ReaderEt:
  666|  5.49k|Supported_Groups::Supported_Groups(TLS_Data_Reader& reader, uint16_t extension_size) {
  667|  5.49k|   const uint16_t len = reader.get_uint16_t();
  668|       |
  669|  5.49k|   if(len + 2 != extension_size) {
  ------------------
  |  Branch (669:7): [True: 15, False: 5.47k]
  ------------------
  670|     15|      throw Decoding_Error("Inconsistent length field in supported groups list");
  671|     15|   }
  672|       |
  673|       |   // RFC 8446 4.2.7: NamedGroup named_group_list<2..2^16-1>;
  674|  5.47k|   if(len == 0) {
  ------------------
  |  Branch (674:7): [True: 1, False: 5.47k]
  ------------------
  675|      1|      throw Decoding_Error("Empty supported groups list");
  676|      1|   }
  677|       |
  678|  5.47k|   if(len % 2 == 1) {
  ------------------
  |  Branch (678:7): [True: 1, False: 5.47k]
  ------------------
  679|      1|      throw Decoding_Error("Supported groups list of strange size");
  680|      1|   }
  681|       |
  682|  5.47k|   const size_t elems = len / 2;
  683|       |
  684|  5.47k|   std::unordered_set<uint16_t> seen;
  685|  34.5k|   for(size_t i = 0; i != elems; ++i) {
  ------------------
  |  Branch (685:22): [True: 29.0k, False: 5.47k]
  ------------------
  686|  29.0k|      const auto group = static_cast<Group_Params>(reader.get_uint16_t());
  687|       |      // Note: RFC 8446 does not explicitly enforce that groups must be unique.
  688|  29.0k|      if(seen.insert(group.wire_code()).second) {
  ------------------
  |  Branch (688:10): [True: 26.2k, False: 2.80k]
  ------------------
  689|  26.2k|         m_groups.push_back(group);
  690|  26.2k|      }
  691|  29.0k|   }
  692|  5.47k|}
_ZN5Botan3TLS20Signature_AlgorithmsC2ERNS0_15TLS_Data_ReaderEt:
  738|    352|      m_schemes(parse_signature_algorithms(reader, extension_size)) {}
_ZN5Botan3TLS25Signature_Algorithms_CertC2ERNS0_15TLS_Data_ReaderEt:
  745|     28|      m_schemes(parse_signature_algorithms(reader, extension_size)) {}
_ZN5Botan3TLS24SRTP_Protection_ProfilesC2ERNS0_15TLS_Data_ReaderEt:
  747|     54|SRTP_Protection_Profiles::SRTP_Protection_Profiles(TLS_Data_Reader& reader, uint16_t extension_size) {
  748|       |   // RFC 5764 4.1.1: UseSRTPData consists of
  749|       |   //    SRTPProtectionProfile SRTPProtectionProfiles<2..2^16-1>;
  750|       |   //    opaque srtp_mki<0..255>;
  751|       |   // for a wire size of 2 (profiles len) + 2*N + 1 (mki len) + mki_bytes,
  752|       |   // with N >= 1.
  753|     54|   if(extension_size < 5) {
  ------------------
  |  Branch (753:7): [True: 4, False: 50]
  ------------------
  754|      4|      throw Decoding_Error("Truncated SRTP protection extension");
  755|      4|   }
  756|     50|   const size_t max_profile_pairs = (static_cast<size_t>(extension_size) - 3) / 2;
  757|     50|   m_pp = reader.get_range<uint16_t>(2, 1, max_profile_pairs);
  758|     50|   const std::vector<uint8_t> mki = reader.get_range<uint8_t>(1, 0, 255);
  759|       |
  760|     50|   if(m_pp.size() * 2 + mki.size() + 3 != extension_size) {
  ------------------
  |  Branch (760:7): [True: 10, False: 40]
  ------------------
  761|     10|      throw Decoding_Error("Bad encoding for SRTP protection extension");
  762|     10|   }
  763|       |
  764|       |   // Any srtp_mki the peer offers is ignored; serialize() always answers with an
  765|       |   // empty srtp_mki, per RFC 5764 4.1.3:
  766|       |   //    2.  return an empty "srtp_mki" value to indicate that it cannot make
  767|       |   //        use of the MKI.
  768|     50|}
_ZN5Botan3TLS18Supported_VersionsC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  843|    127|Supported_Versions::Supported_Versions(TLS_Data_Reader& reader, uint16_t extension_size, Connection_Side from) {
  844|    127|   if(from == Connection_Side::Server) {
  ------------------
  |  Branch (844:7): [True: 19, False: 108]
  ------------------
  845|     19|      if(extension_size != 2) {
  ------------------
  |  Branch (845:10): [True: 1, False: 18]
  ------------------
  846|      1|         throw Decoding_Error("Server sent invalid supported_versions extension");
  847|      1|      }
  848|     18|      m_versions.push_back(Protocol_Version(reader.get_uint16_t()));
  849|    108|   } else {
  850|    108|      auto versions = reader.get_range<uint16_t>(1, 1, 127);
  851|       |
  852|    879|      for(auto v : versions) {
  ------------------
  |  Branch (852:18): [True: 879, False: 108]
  ------------------
  853|    879|         m_versions.push_back(Protocol_Version(v));
  854|    879|      }
  855|       |
  856|    108|      if(extension_size != 1 + 2 * versions.size()) {
  ------------------
  |  Branch (856:10): [True: 8, False: 100]
  ------------------
  857|      8|         throw Decoding_Error("Client sent invalid supported_versions extension");
  858|      8|      }
  859|    108|   }
  860|    127|}
_ZNK5Botan3TLS18Supported_Versions8supportsENS0_16Protocol_VersionE:
  862|     66|bool Supported_Versions::supports(Protocol_Version version) const {
  863|    423|   for(auto v : m_versions) {
  ------------------
  |  Branch (863:15): [True: 423, False: 32]
  ------------------
  864|    423|      if(version == v) {
  ------------------
  |  Branch (864:10): [True: 34, False: 389]
  ------------------
  865|     34|         return true;
  866|     34|      }
  867|    423|   }
  868|     32|   return false;
  869|     66|}
_ZN5Botan3TLS17Record_Size_LimitC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  877|     35|Record_Size_Limit::Record_Size_Limit(TLS_Data_Reader& reader, uint16_t extension_size, Connection_Side from) {
  878|     35|   if(extension_size != 2) {
  ------------------
  |  Branch (878:7): [True: 2, False: 33]
  ------------------
  879|      2|      throw TLS_Exception(Alert::DecodeError, "invalid record_size_limit extension");
  880|      2|   }
  881|       |
  882|     33|   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|     33|   if(m_limit > MAX_PLAINTEXT_SIZE + 1 /* encrypted content type byte */ && from == Connection_Side::Server) {
  ------------------
  |  Branch (897:7): [True: 6, False: 27]
  |  Branch (897:77): [True: 2, False: 4]
  ------------------
  898|      2|      throw TLS_Exception(Alert::IllegalParameter,
  899|      2|                          "Server requested a record size limit larger than the protocol's maximum");
  900|      2|   }
  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|     31|   if(m_limit < 64) {
  ------------------
  |  Branch (906:7): [True: 4, False: 27]
  ------------------
  907|      4|      throw TLS_Exception(Alert::IllegalParameter, "Received a record size limit smaller than 64 bytes");
  908|      4|   }
  909|     31|}
tls_extensions.cpp:_ZN5Botan3TLS12_GLOBAL__N_114make_extensionERNS0_15TLS_Data_ReaderENS0_14Extension_CodeENS0_15Connection_SideENS0_14Handshake_TypeE:
   41|  44.1k|                                          const Handshake_Type message_type) {
   42|       |   // This cast is safe because we read exactly a 16 bit length field for
   43|       |   // the extension in Extensions::deserialize
   44|  44.1k|   const uint16_t size = static_cast<uint16_t>(reader.remaining_bytes());
   45|  44.1k|   switch(code) {
  ------------------
  |  Branch (45:11): [True: 14.6k, False: 29.4k]
  ------------------
   46|    104|      case Extension_Code::ServerNameIndication:
  ------------------
  |  Branch (46:7): [True: 104, False: 44.0k]
  ------------------
   47|    104|         return std::make_unique<Server_Name_Indicator>(reader, size, from);
   48|       |
   49|  5.49k|      case Extension_Code::SupportedGroups:
  ------------------
  |  Branch (49:7): [True: 5.49k, False: 38.7k]
  ------------------
   50|  5.49k|         return std::make_unique<Supported_Groups>(reader, size);
   51|       |
   52|    436|      case Extension_Code::CertificateStatusRequest:
  ------------------
  |  Branch (52:7): [True: 436, False: 43.7k]
  ------------------
   53|    436|         return std::make_unique<Certificate_Status_Request>(reader, size, message_type, from);
   54|       |
   55|    352|      case Extension_Code::SignatureAlgorithms:
  ------------------
  |  Branch (55:7): [True: 352, False: 43.8k]
  ------------------
   56|    352|         return std::make_unique<Signature_Algorithms>(reader, size);
   57|       |
   58|     28|      case Extension_Code::CertSignatureAlgorithms:
  ------------------
  |  Branch (58:7): [True: 28, False: 44.1k]
  ------------------
   59|     28|         return std::make_unique<Signature_Algorithms_Cert>(reader, size);
   60|       |
   61|     54|      case Extension_Code::UseSrtp:
  ------------------
  |  Branch (61:7): [True: 54, False: 44.1k]
  ------------------
   62|     54|         return std::make_unique<SRTP_Protection_Profiles>(reader, size);
   63|       |
   64|    128|      case Extension_Code::ApplicationLayerProtocolNegotiation:
  ------------------
  |  Branch (64:7): [True: 128, False: 44.0k]
  ------------------
   65|    128|         return std::make_unique<Application_Layer_Protocol_Notification>(reader, size, from);
   66|       |
   67|     18|      case Extension_Code::ClientCertificateType:
  ------------------
  |  Branch (67:7): [True: 18, False: 44.1k]
  ------------------
   68|     18|         return std::make_unique<Client_Certificate_Type>(reader, size, from);
   69|       |
   70|     88|      case Extension_Code::ServerCertificateType:
  ------------------
  |  Branch (70:7): [True: 88, False: 44.1k]
  ------------------
   71|     88|         return std::make_unique<Server_Certificate_Type>(reader, size, from);
   72|       |
   73|     35|      case Extension_Code::RecordSizeLimit:
  ------------------
  |  Branch (73:7): [True: 35, False: 44.1k]
  ------------------
   74|     35|         return std::make_unique<Record_Size_Limit>(reader, size, from);
   75|       |
   76|    127|      case Extension_Code::SupportedVersions:
  ------------------
  |  Branch (76:7): [True: 127, False: 44.0k]
  ------------------
   77|    127|         return std::make_unique<Supported_Versions>(reader, size, from);
   78|       |
   79|      6|      case Extension_Code::Padding:
  ------------------
  |  Branch (79:7): [True: 6, False: 44.1k]
  ------------------
   80|      6|         break;  // RFC 7685, recognized but not implemented; falls through to Unknown_Extension
   81|       |
   82|      0|#if defined(BOTAN_HAS_TLS_12)
   83|    253|      case Extension_Code::EcPointFormats:
  ------------------
  |  Branch (83:7): [True: 253, False: 43.9k]
  ------------------
   84|    253|         return std::make_unique<Supported_Point_Formats>(reader, size);
   85|       |
   86|     27|      case Extension_Code::SafeRenegotiation:
  ------------------
  |  Branch (86:7): [True: 27, False: 44.1k]
  ------------------
   87|     27|         return std::make_unique<Renegotiation_Extension>(reader, size);
   88|       |
   89|  6.11k|      case Extension_Code::ExtendedMasterSecret:
  ------------------
  |  Branch (89:7): [True: 6.11k, False: 38.0k]
  ------------------
   90|  6.11k|         return std::make_unique<Extended_Master_Secret>(reader, size);
   91|       |
   92|    369|      case Extension_Code::EncryptThenMac:
  ------------------
  |  Branch (92:7): [True: 369, False: 43.8k]
  ------------------
   93|    369|         return std::make_unique<Encrypt_then_MAC>(reader, size);
   94|       |
   95|    115|      case Extension_Code::SessionTicket:
  ------------------
  |  Branch (95:7): [True: 115, False: 44.0k]
  ------------------
   96|    115|         return std::make_unique<Session_Ticket_Extension>(reader, size, from);
   97|       |#else
   98|       |      case Extension_Code::EcPointFormats:
   99|       |      case Extension_Code::SafeRenegotiation:
  100|       |      case Extension_Code::ExtendedMasterSecret:
  101|       |      case Extension_Code::EncryptThenMac:
  102|       |      case Extension_Code::SessionTicket:
  103|       |         break;  // considered as 'unknown extension'
  104|       |#endif
  105|       |
  106|      0|#if defined(BOTAN_HAS_TLS_13)
  107|     86|      case Extension_Code::PresharedKey:
  ------------------
  |  Branch (107:7): [True: 86, False: 44.1k]
  ------------------
  108|     86|         return std::make_unique<PSK>(reader, size, message_type);
  109|       |
  110|     59|      case Extension_Code::EarlyData:
  ------------------
  |  Branch (110:7): [True: 59, False: 44.1k]
  ------------------
  111|     59|         return std::make_unique<EarlyDataIndication>(reader, size, message_type);
  112|       |
  113|     37|      case Extension_Code::Cookie:
  ------------------
  |  Branch (113:7): [True: 37, False: 44.1k]
  ------------------
  114|     37|         return std::make_unique<Cookie>(reader, size);
  115|       |
  116|     55|      case Extension_Code::PskKeyExchangeModes:
  ------------------
  |  Branch (116:7): [True: 55, False: 44.1k]
  ------------------
  117|     55|         return std::make_unique<PSK_Key_Exchange_Modes>(reader, size);
  118|       |
  119|    649|      case Extension_Code::CertificateAuthorities:
  ------------------
  |  Branch (119:7): [True: 649, False: 43.5k]
  ------------------
  120|    649|         return std::make_unique<Certificate_Authorities>(reader, size);
  121|       |
  122|     67|      case Extension_Code::KeyShare:
  ------------------
  |  Branch (122:7): [True: 67, False: 44.1k]
  ------------------
  123|     67|         return std::make_unique<Key_Share>(reader, size, message_type);
  124|       |#else
  125|       |      case Extension_Code::PresharedKey:
  126|       |      case Extension_Code::EarlyData:
  127|       |      case Extension_Code::Cookie:
  128|       |      case Extension_Code::PskKeyExchangeModes:
  129|       |      case Extension_Code::CertificateAuthorities:
  130|       |      case Extension_Code::KeyShare:
  131|       |         break;  // considered as 'unknown extension'
  132|       |#endif
  133|  44.1k|   }
  134|       |
  135|  29.5k|   return std::make_unique<Unknown_Extension>(code, reader, size);
  136|  44.1k|}
tls_extensions.cpp:_ZZNK5Botan3TLS10Extensions19contains_other_thanERKNSt3__13setINS0_14Extension_CodeENS2_4lessIS4_EENS2_9allocatorIS4_EEEEbENK3$_0clIS4_EEDaT_:
  206|    470|      const auto itr = std::find_if(diff.cbegin(), diff.cend(), [this](const auto ext_type) {
  207|    470|         const auto ext = get(ext_type);
  208|    470|         return ext && ext->is_implemented();
  ------------------
  |  Branch (208:17): [True: 470, False: 0]
  |  Branch (208:24): [True: 56, False: 414]
  ------------------
  209|    470|      });
tls_extensions.cpp:_ZZN5Botan3TLS21Certificate_Type_BaseC1ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideEENK3$_0clIhEEDaT_:
  568|  2.08k|         type_bytes.begin(), type_bytes.end(), std::back_inserter(m_certificate_types), [](const auto type_byte) {
  569|  2.08k|            return static_cast<Certificate_Type>(type_byte);
  570|  2.08k|         });
tls_extensions.cpp:_ZN5Botan3TLS12_GLOBAL__N_126parse_signature_algorithmsERNS0_15TLS_Data_ReaderEt:
  714|    380|std::vector<Signature_Scheme> parse_signature_algorithms(TLS_Data_Reader& reader, uint16_t extension_size) {
  715|    380|   uint16_t len = reader.get_uint16_t();
  716|       |
  717|    380|   if(len + 2 != extension_size || len % 2 == 1 || len == 0) {
  ------------------
  |  Branch (717:7): [True: 13, False: 367]
  |  Branch (717:36): [True: 1, False: 366]
  |  Branch (717:52): [True: 1, False: 365]
  ------------------
  718|     11|      throw Decoding_Error("Bad encoding on signature algorithms extension");
  719|     11|   }
  720|       |
  721|    369|   std::vector<Signature_Scheme> schemes;
  722|    369|   schemes.reserve(len / 2);
  723|  29.9k|   while(len > 0) {
  ------------------
  |  Branch (723:10): [True: 29.6k, False: 369]
  ------------------
  724|  29.6k|      schemes.emplace_back(reader.get_uint16_t());
  725|  29.6k|      len -= 2;
  726|  29.6k|   }
  727|       |
  728|    369|   return schemes;
  729|    380|}

_ZN5Botan3TLS26Certificate_Status_RequestC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeENS0_15Connection_SideE:
  104|    436|                                                       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|    436|   if(message_type == Handshake_Type::ClientHello) {
  ------------------
  |  Branch (123:7): [True: 432, False: 4]
  ------------------
  124|    432|      m_impl = std::make_unique<Certificate_Status_Request_Internal>(
  125|    432|         RFC6066_Certificate_Status_Request(reader, extension_size));
  126|    432|   }
  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|      4|   else if(message_type == Handshake_Type::ServerHello || message_type == Handshake_Type::CertificateRequest) {
  ------------------
  |  Branch (137:12): [True: 3, False: 1]
  |  Branch (137:59): [True: 0, False: 1]
  ------------------
  138|      3|      m_impl = std::make_unique<Certificate_Status_Request_Internal>(
  139|      3|         RFC6066_Empty_Certificate_Status_Request(extension_size));
  140|      3|   }
  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|      1|   else if(message_type == Handshake_Type::Certificate) {
  ------------------
  |  Branch (153:12): [True: 0, False: 1]
  ------------------
  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|      1|   else {
  160|      1|      throw TLS_Exception(Alert::UnsupportedExtension,
  161|      1|                          "Server sent a Certificate_Status_Request extension in an unsupported context");
  162|      1|   }
  163|    436|}
_ZN5Botan3TLS26Certificate_Status_RequestC2Ev:
  166|    183|      m_impl(std::make_unique<Certificate_Status_Request_Internal>(RFC6066_Empty_Certificate_Status_Request())) {}
_ZN5Botan3TLS26Certificate_Status_RequestD2Ev:
  176|    597|Certificate_Status_Request::~Certificate_Status_Request() = default;
_ZNK5Botan3TLS26Certificate_Status_Request9serializeENS0_15Connection_SideE:
  184|    183|std::vector<uint8_t> Certificate_Status_Request::serialize(Connection_Side /*side*/) const {
  185|    183|   BOTAN_ASSERT_NONNULL(m_impl);
  ------------------
  |  |  123|    183|   do {                                                                                   \
  |  |  124|    183|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 183]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|    183|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 183]
  |  |  ------------------
  ------------------
  186|    183|   return std::visit([](const auto& c) { return c.serialize(); }, m_impl->content);
  187|    183|}
tls_extensions_cert_status_req.cpp:_ZN5Botan3TLS12_GLOBAL__N_134RFC6066_Certificate_Status_RequestC2ERNS0_15TLS_Data_ReaderEt:
   38|    432|      RFC6066_Certificate_Status_Request(TLS_Data_Reader& reader, uint16_t extension_size) {
   39|    432|         if(extension_size == 0) {
  ------------------
  |  Branch (39:13): [True: 1, False: 431]
  ------------------
   40|      1|            throw Decoding_Error("Received an unexpectedly empty Certificate_Status_Request");
   41|      1|         }
   42|       |
   43|    431|         const uint8_t type = reader.get_byte();
   44|    431|         if(type == 1 /* ocsp */) {
  ------------------
  |  Branch (44:13): [True: 31, False: 400]
  ------------------
   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|     31|            if(extension_size < 5) {
  ------------------
  |  Branch (51:16): [True: 1, False: 30]
  ------------------
   52|      1|               throw Decoding_Error("Truncated OCSP CertificateStatusRequest");
   53|      1|            }
   54|     30|            const size_t len_resp_id_list = reader.get_uint16_t();
   55|     30|            if(len_resp_id_list > static_cast<size_t>(extension_size) - 5) {
  ------------------
  |  Branch (55:16): [True: 6, False: 24]
  ------------------
   56|      6|               throw Decoding_Error("Inconsistent length in OCSP CertificateStatusRequest");
   57|      6|            }
   58|     24|            ocsp_names = reader.get_fixed<uint8_t>(len_resp_id_list);
   59|     24|            const size_t len_requ_ext = reader.get_uint16_t();
   60|     24|            if(len_resp_id_list + len_requ_ext + 5 != extension_size) {
  ------------------
  |  Branch (60:16): [True: 12, False: 12]
  ------------------
   61|     12|               throw Decoding_Error("Inconsistent length in OCSP CertificateStatusRequest");
   62|     12|            }
   63|     12|            extension_bytes = reader.get_fixed<uint8_t>(len_requ_ext);
   64|    400|         } else {
   65|       |            // RFC 6066 does not specify anything but 'ocsp' and we
   66|       |            // don't support anything else either.
   67|    400|            reader.discard_next(extension_size - 1);
   68|    400|         }
   69|    431|      }
tls_extensions_cert_status_req.cpp:_ZN5Botan3TLS12_GLOBAL__N_140RFC6066_Empty_Certificate_Status_RequestC2Et:
   24|      3|      explicit RFC6066_Empty_Certificate_Status_Request(uint16_t extension_size) {
   25|      3|         if(extension_size != 0) {
  ------------------
  |  Branch (25:13): [True: 1, False: 2]
  ------------------
   26|      1|            throw Decoding_Error("Received an unexpectedly non-empty Certificate_Status_Request");
   27|      1|         }
   28|      3|      }
tls_extensions_cert_status_req.cpp:_ZZNK5Botan3TLS26Certificate_Status_Request9serializeENS0_15Connection_SideEENK3$_0clINS0_12_GLOBAL__N_140RFC6066_Empty_Certificate_Status_RequestEEEDaRKT_:
  186|    183|   return std::visit([](const auto& c) { return c.serialize(); }, m_impl->content);
tls_extensions_cert_status_req.cpp:_ZNK5Botan3TLS12_GLOBAL__N_140RFC6066_Empty_Certificate_Status_Request9serializeEv:
   30|    183|      std::vector<uint8_t> serialize() const { return {}; }
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|    597|      explicit Certificate_Status_Request_Internal(Contents c) : content(std::move(c)) {}

_ZN5Botan3TLS11ExternalPSK21extract_master_secretEv:
   16|  2.09k|secure_vector<uint8_t> ExternalPSK::extract_master_secret() {
   17|  2.09k|   BOTAN_STATE_CHECK(!m_master_secret.empty());
  ------------------
  |  |   51|  2.09k|   do {                                                         \
  |  |   52|  2.09k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  2.09k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 2.09k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  2.09k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 2.09k]
  |  |  ------------------
  ------------------
   18|  2.09k|   return std::exchange(m_master_secret, {});
   19|  2.09k|}

_ZNK5Botan3TLS21Handshake_Transitions22received_handshake_msgENS0_14Handshake_TypeE:
  125|  2.13k|bool Handshake_Transitions::received_handshake_msg(Handshake_Type msg_type) const {
  126|  2.13k|   const uint32_t mask = bitmask_for_handshake_type(msg_type);
  127|       |
  128|  2.13k|   return (m_hand_received_mask & mask) != 0;
  129|  2.13k|}
_ZN5Botan3TLS21Handshake_Transitions21confirm_transition_toENS0_14Handshake_TypeE:
  131|  9.29k|void Handshake_Transitions::confirm_transition_to(Handshake_Type msg_type) {
  132|  9.29k|   const uint32_t mask = bitmask_for_handshake_type(msg_type);
  133|       |
  134|  9.29k|   m_hand_received_mask |= mask;
  135|       |
  136|  9.29k|   const bool ok = (m_hand_expecting_mask & mask) != 0;  // overlap?
  137|       |
  138|  9.29k|   if(!ok) {
  ------------------
  |  Branch (138:7): [True: 235, False: 9.06k]
  ------------------
  139|    235|      const uint32_t seen_so_far = m_hand_received_mask & ~mask;
  140|       |
  141|    235|      std::ostringstream msg;
  142|       |
  143|    235|      msg << "Unexpected state transition in handshake got a " << handshake_type_to_string(msg_type);
  144|       |
  145|    235|      if(m_hand_expecting_mask == 0) {
  ------------------
  |  Branch (145:10): [True: 0, False: 235]
  ------------------
  146|      0|         msg << " not expecting messages";
  147|    235|      } else {
  148|    235|         msg << " expected " << handshake_mask_to_string(m_hand_expecting_mask, '|');
  149|    235|      }
  150|       |
  151|    235|      if(seen_so_far != 0) {
  ------------------
  |  Branch (151:10): [True: 8, False: 227]
  ------------------
  152|      8|         msg << " seen " << handshake_mask_to_string(seen_so_far, '+');
  153|      8|      }
  154|       |
  155|    235|      throw Unexpected_Message(msg.str());
  156|    235|   }
  157|       |
  158|       |   /* We don't know what to expect next, so force a call to
  159|       |      set_expected_next; if it doesn't happen, the next transition
  160|       |      check will always fail which is what we want.
  161|       |   */
  162|  9.06k|   m_hand_expecting_mask = 0;
  163|  9.06k|}
_ZN5Botan3TLS21Handshake_Transitions17set_expected_nextENS0_14Handshake_TypeE:
  165|  18.1k|void Handshake_Transitions::set_expected_next(Handshake_Type msg_type) {
  166|  18.1k|   m_hand_expecting_mask |= bitmask_for_handshake_type(msg_type);
  167|  18.1k|}
_ZNK5Botan3TLS21Handshake_Transitions27change_cipher_spec_expectedEv:
  175|  13.8k|bool Handshake_Transitions::change_cipher_spec_expected() const {
  176|  13.8k|   return (bitmask_for_handshake_type(Handshake_Type::HandshakeCCS) & m_hand_expecting_mask) != 0;
  177|  13.8k|}
tls_handshake_transitions.cpp:_ZN5Botan3TLS12_GLOBAL__N_126bitmask_for_handshake_typeENS0_14Handshake_TypeE:
   19|  47.7k|uint32_t bitmask_for_handshake_type(Handshake_Type type) {
   20|  47.7k|   switch(type) {
  ------------------
  |  Branch (20:11): [True: 47.7k, False: 26]
  ------------------
   21|    243|      case Handshake_Type::HelloVerifyRequest:
  ------------------
  |  Branch (21:7): [True: 243, False: 47.5k]
  ------------------
   22|    243|         return (1 << 0);
   23|       |
   24|  3.48k|      case Handshake_Type::HelloRequest:
  ------------------
  |  Branch (24:7): [True: 3.48k, False: 44.2k]
  ------------------
   25|  3.48k|         return (1 << 1);
   26|       |
   27|  16.2k|      case Handshake_Type::ClientHello:
  ------------------
  |  Branch (27:7): [True: 16.2k, False: 31.5k]
  ------------------
   28|  16.2k|         return (1 << 2);
   29|       |
   30|    262|      case Handshake_Type::ServerHello:
  ------------------
  |  Branch (30:7): [True: 262, False: 47.5k]
  ------------------
   31|    262|         return (1 << 3);
   32|       |
   33|  2.37k|      case Handshake_Type::Certificate:
  ------------------
  |  Branch (33:7): [True: 2.37k, False: 45.4k]
  ------------------
   34|  2.37k|         return (1 << 4);
   35|       |
   36|    243|      case Handshake_Type::CertificateUrl:
  ------------------
  |  Branch (36:7): [True: 243, False: 47.5k]
  ------------------
   37|    243|         return (1 << 5);
   38|       |
   39|    244|      case Handshake_Type::CertificateStatus:
  ------------------
  |  Branch (39:7): [True: 244, False: 47.5k]
  ------------------
   40|    244|         return (1 << 6);
   41|       |
   42|    245|      case Handshake_Type::ServerKeyExchange:
  ------------------
  |  Branch (42:7): [True: 245, False: 47.5k]
  ------------------
   43|    245|         return (1 << 7);
   44|       |
   45|    244|      case Handshake_Type::CertificateRequest:
  ------------------
  |  Branch (45:7): [True: 244, False: 47.5k]
  ------------------
   46|    244|         return (1 << 8);
   47|       |
   48|    244|      case Handshake_Type::ServerHelloDone:
  ------------------
  |  Branch (48:7): [True: 244, False: 47.5k]
  ------------------
   49|    244|         return (1 << 9);
   50|       |
   51|    251|      case Handshake_Type::CertificateVerify:
  ------------------
  |  Branch (51:7): [True: 251, False: 47.5k]
  ------------------
   52|    251|         return (1 << 10);
   53|       |
   54|  5.18k|      case Handshake_Type::ClientKeyExchange:
  ------------------
  |  Branch (54:7): [True: 5.18k, False: 42.5k]
  ------------------
   55|  5.18k|         return (1 << 11);
   56|       |
   57|    245|      case Handshake_Type::NewSessionTicket:
  ------------------
  |  Branch (57:7): [True: 245, False: 47.5k]
  ------------------
   58|    245|         return (1 << 12);
   59|       |
   60|  16.5k|      case Handshake_Type::HandshakeCCS:
  ------------------
  |  Branch (60:7): [True: 16.5k, False: 31.2k]
  ------------------
   61|  16.5k|         return (1 << 13);
   62|       |
   63|    708|      case Handshake_Type::Finished:
  ------------------
  |  Branch (63:7): [True: 708, False: 47.0k]
  ------------------
   64|    708|         return (1 << 14);
   65|       |
   66|    244|      case Handshake_Type::EndOfEarlyData:  // RFC 8446
  ------------------
  |  Branch (66:7): [True: 244, False: 47.5k]
  ------------------
   67|    244|         return (1 << 15);
   68|       |
   69|    407|      case Handshake_Type::EncryptedExtensions:  // RFC 8446
  ------------------
  |  Branch (69:7): [True: 407, False: 47.3k]
  ------------------
   70|    407|         return (1 << 16);
   71|       |
   72|    243|      case Handshake_Type::KeyUpdate:  // RFC 8446
  ------------------
  |  Branch (72:7): [True: 243, False: 47.5k]
  ------------------
   73|    243|         return (1 << 17);
   74|       |
   75|      0|      case Handshake_Type::HelloRetryRequest:  // RFC 8446
  ------------------
  |  Branch (75:7): [True: 0, False: 47.7k]
  ------------------
   76|      0|         return (1 << 18);
   77|       |
   78|       |      // allow explicitly disabling new handshakes
   79|     85|      case Handshake_Type::None:
  ------------------
  |  Branch (79:7): [True: 85, False: 47.6k]
  ------------------
   80|     85|         return 0;
   81|  47.7k|   }
   82|       |
   83|     26|   throw TLS_Exception(Alert::UnexpectedMessage,
   84|     26|                       "Unknown TLS handshake message type " + std::to_string(static_cast<size_t>(type)));
   85|  47.7k|}
tls_handshake_transitions.cpp:_ZN5Botan3TLS12_GLOBAL__N_124handshake_mask_to_stringEjc:
   87|    243|std::string handshake_mask_to_string(uint32_t mask, char combiner) {
   88|    243|   const Handshake_Type types[] = {Handshake_Type::HelloVerifyRequest,
   89|    243|                                   Handshake_Type::HelloRequest,
   90|    243|                                   Handshake_Type::ClientHello,
   91|    243|                                   Handshake_Type::ServerHello,
   92|    243|                                   Handshake_Type::Certificate,
   93|    243|                                   Handshake_Type::CertificateUrl,
   94|    243|                                   Handshake_Type::CertificateStatus,
   95|    243|                                   Handshake_Type::ServerKeyExchange,
   96|    243|                                   Handshake_Type::CertificateRequest,
   97|    243|                                   Handshake_Type::ServerHelloDone,
   98|    243|                                   Handshake_Type::CertificateVerify,
   99|    243|                                   Handshake_Type::ClientKeyExchange,
  100|    243|                                   Handshake_Type::NewSessionTicket,
  101|    243|                                   Handshake_Type::HandshakeCCS,
  102|    243|                                   Handshake_Type::Finished,
  103|    243|                                   Handshake_Type::EndOfEarlyData,
  104|    243|                                   Handshake_Type::EncryptedExtensions,
  105|    243|                                   Handshake_Type::KeyUpdate};
  106|       |
  107|    243|   std::ostringstream o;
  108|    243|   bool empty = true;
  109|       |
  110|  4.37k|   for(auto&& t : types) {
  ------------------
  |  Branch (110:17): [True: 4.37k, False: 243]
  ------------------
  111|  4.37k|      if((mask & bitmask_for_handshake_type(t)) != 0) {
  ------------------
  |  Branch (111:10): [True: 252, False: 4.12k]
  ------------------
  112|    252|         if(!empty) {
  ------------------
  |  Branch (112:13): [True: 9, False: 243]
  ------------------
  113|      9|            o << combiner;
  114|      9|         }
  115|    252|         o << handshake_type_to_string(t);
  116|    252|         empty = false;
  117|    252|      }
  118|  4.37k|   }
  119|       |
  120|    243|   return o.str();
  121|    243|}

_ZN5Botan3TLS24handshake_type_to_stringENS0_14Handshake_TypeE:
   15|    490|const char* handshake_type_to_string(Handshake_Type type) {
   16|    490|   switch(type) {
  ------------------
  |  Branch (16:11): [True: 490, False: 0]
  ------------------
   17|      0|      case Handshake_Type::HelloVerifyRequest:
  ------------------
  |  Branch (17:7): [True: 0, False: 490]
  ------------------
   18|      0|         return "hello_verify_request";
   19|       |
   20|     24|      case Handshake_Type::HelloRequest:
  ------------------
  |  Branch (20:7): [True: 24, False: 466]
  ------------------
   21|     24|         return "hello_request";
   22|       |
   23|    235|      case Handshake_Type::ClientHello:
  ------------------
  |  Branch (23:7): [True: 235, False: 255]
  ------------------
   24|    235|         return "client_hello";
   25|       |
   26|     19|      case Handshake_Type::ServerHello:
  ------------------
  |  Branch (26:7): [True: 19, False: 471]
  ------------------
   27|     19|         return "server_hello";
   28|       |
   29|      0|      case Handshake_Type::HelloRetryRequest:
  ------------------
  |  Branch (29:7): [True: 0, False: 490]
  ------------------
   30|      0|         return "hello_retry_request";
   31|       |
   32|      4|      case Handshake_Type::Certificate:
  ------------------
  |  Branch (32:7): [True: 4, False: 486]
  ------------------
   33|      4|         return "certificate";
   34|       |
   35|      0|      case Handshake_Type::CertificateUrl:
  ------------------
  |  Branch (35:7): [True: 0, False: 490]
  ------------------
   36|      0|         return "certificate_url";
   37|       |
   38|      1|      case Handshake_Type::CertificateStatus:
  ------------------
  |  Branch (38:7): [True: 1, False: 489]
  ------------------
   39|      1|         return "certificate_status";
   40|       |
   41|      2|      case Handshake_Type::ServerKeyExchange:
  ------------------
  |  Branch (41:7): [True: 2, False: 488]
  ------------------
   42|      2|         return "server_key_exchange";
   43|       |
   44|      1|      case Handshake_Type::CertificateRequest:
  ------------------
  |  Branch (44:7): [True: 1, False: 489]
  ------------------
   45|      1|         return "certificate_request";
   46|       |
   47|      1|      case Handshake_Type::ServerHelloDone:
  ------------------
  |  Branch (47:7): [True: 1, False: 489]
  ------------------
   48|      1|         return "server_hello_done";
   49|       |
   50|      8|      case Handshake_Type::CertificateVerify:
  ------------------
  |  Branch (50:7): [True: 8, False: 482]
  ------------------
   51|      8|         return "certificate_verify";
   52|       |
   53|     12|      case Handshake_Type::ClientKeyExchange:
  ------------------
  |  Branch (53:7): [True: 12, False: 478]
  ------------------
   54|     12|         return "client_key_exchange";
   55|       |
   56|      2|      case Handshake_Type::NewSessionTicket:
  ------------------
  |  Branch (56:7): [True: 2, False: 488]
  ------------------
   57|      2|         return "new_session_ticket";
   58|       |
   59|      5|      case Handshake_Type::HandshakeCCS:
  ------------------
  |  Branch (59:7): [True: 5, False: 485]
  ------------------
   60|      5|         return "change_cipher_spec";
   61|       |
   62|      8|      case Handshake_Type::Finished:
  ------------------
  |  Branch (62:7): [True: 8, False: 482]
  ------------------
   63|      8|         return "finished";
   64|       |
   65|      1|      case Handshake_Type::EndOfEarlyData:
  ------------------
  |  Branch (65:7): [True: 1, False: 489]
  ------------------
   66|      1|         return "end_of_early_data";
   67|       |
   68|    167|      case Handshake_Type::EncryptedExtensions:
  ------------------
  |  Branch (68:7): [True: 167, False: 323]
  ------------------
   69|    167|         return "encrypted_extensions";
   70|       |
   71|      0|      case Handshake_Type::KeyUpdate:
  ------------------
  |  Branch (71:7): [True: 0, False: 490]
  ------------------
   72|      0|         return "key_update";
   73|       |
   74|      0|      case Handshake_Type::None:
  ------------------
  |  Branch (74:7): [True: 0, False: 490]
  ------------------
   75|      0|         return "invalid";
   76|    490|   }
   77|       |
   78|      0|   throw TLS_Exception(Alert::UnexpectedMessage,
   79|      0|                       "Unknown TLS handshake message type " + std::to_string(static_cast<size_t>(type)));
   80|    490|}

_ZNK5Botan3TLS6Policy22allow_ssl_key_log_fileEv:
   25|  1.47k|bool Policy::allow_ssl_key_log_file() const {
   26|  1.47k|   return false;
   27|  1.47k|}
_ZNK5Botan3TLS6Policy25allowed_signature_schemesEv:
   29|  5.84k|std::vector<Signature_Scheme> Policy::allowed_signature_schemes() const {
   30|  5.84k|   std::vector<Signature_Scheme> schemes;
   31|       |
   32|  70.1k|   for(const Signature_Scheme scheme : Signature_Scheme::all_available_schemes()) {
  ------------------
  |  Branch (32:38): [True: 70.1k, False: 5.84k]
  ------------------
   33|  70.1k|      const bool sig_allowed = allowed_signature_method(scheme.algorithm_name());
   34|  70.1k|      const bool hash_allowed = allowed_signature_hash(scheme.hash_function_name());
   35|       |
   36|  70.1k|      if(sig_allowed && hash_allowed) {
  ------------------
  |  Branch (36:10): [True: 70.1k, False: 0]
  |  Branch (36:25): [True: 70.1k, False: 0]
  ------------------
   37|  70.1k|         schemes.push_back(scheme);
   38|  70.1k|      }
   39|  70.1k|   }
   40|       |
   41|  5.84k|   return schemes;
   42|  5.84k|}
_ZNK5Botan3TLS6Policy28acceptable_signature_schemesEv:
   44|  2.81k|std::vector<Signature_Scheme> Policy::acceptable_signature_schemes() const {
   45|  2.81k|   return this->allowed_signature_schemes();
   46|  2.81k|}
_ZNK5Botan3TLS6Policy24allowed_signature_hashesEv:
   73|  76.6k|std::vector<std::string> Policy::allowed_signature_hashes() const {
   74|  76.6k|   return {
   75|  76.6k|      "SHA-512",
   76|  76.6k|      "SHA-384",
   77|  76.6k|      "SHA-256",
   78|  76.6k|   };
   79|  76.6k|}
_ZNK5Botan3TLS6Policy25allowed_signature_methodsEv:
  105|  70.1k|std::vector<std::string> Policy::allowed_signature_methods() const {
  106|  70.1k|   return {
  107|  70.1k|      "ECDSA", "RSA",
  108|       |      //"IMPLICIT",
  109|  70.1k|   };
  110|  70.1k|}
_ZNK5Botan3TLS6Policy24allowed_signature_methodENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  112|  70.1k|bool Policy::allowed_signature_method(std::string_view sig_method) const {
  113|  70.1k|   return value_exists(allowed_signature_methods(), sig_method);
  114|  70.1k|}
_ZNK5Botan3TLS6Policy22allowed_signature_hashENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  116|  76.6k|bool Policy::allowed_signature_hash(std::string_view sig_hash) const {
  117|  76.6k|   return value_exists(allowed_signature_hashes(), sig_hash);
  118|  76.6k|}
_ZNK5Botan3TLS6Policy25use_ecc_point_compressionEv:
  120|    107|bool Policy::use_ecc_point_compression() const {
  121|    107|   return false;
  122|    107|}
_ZNK5Botan3TLS6Policy25choose_key_exchange_groupERKNSt3__16vectorINS0_12Group_ParamsENS2_9allocatorIS4_EEEES9_:
  125|  8.69k|                                               const std::vector<Group_Params>& offered_by_peer) const {
  126|  8.69k|   if(supported_by_peer.empty()) {
  ------------------
  |  Branch (126:7): [True: 3.02k, False: 5.66k]
  ------------------
  127|  3.02k|      return Group_Params::NONE;
  128|  3.02k|   }
  129|       |
  130|  5.66k|   const auto our_groups = key_exchange_groups();
  131|       |
  132|       |   // First check if the peer sent a PQ share of a group we also support
  133|  5.66k|   for(auto share : offered_by_peer) {
  ------------------
  |  Branch (133:19): [True: 0, False: 5.66k]
  ------------------
  134|      0|      if(share.is_post_quantum() && value_exists(our_groups, share)) {
  ------------------
  |  Branch (134:10): [True: 0, False: 0]
  |  Branch (134:37): [True: 0, False: 0]
  ------------------
  135|      0|         return share;
  136|      0|      }
  137|      0|   }
  138|       |
  139|       |   // Then check if the peer offered a PQ algo we also support
  140|  6.06k|   for(auto share : supported_by_peer) {
  ------------------
  |  Branch (140:19): [True: 6.06k, False: 5.66k]
  ------------------
  141|  6.06k|      if(share.is_post_quantum() && value_exists(our_groups, share)) {
  ------------------
  |  Branch (141:10): [True: 0, False: 6.06k]
  |  Branch (141:37): [True: 0, False: 0]
  ------------------
  142|      0|         return share;
  143|      0|      }
  144|  6.06k|   }
  145|       |
  146|       |   // Prefer groups that were offered by the peer for the sake of saving
  147|       |   // an additional round trip. For TLS 1.2, this won't be used.
  148|  5.66k|   for(auto g : offered_by_peer) {
  ------------------
  |  Branch (148:15): [True: 0, False: 5.66k]
  ------------------
  149|      0|      if(value_exists(our_groups, g)) {
  ------------------
  |  Branch (149:10): [True: 0, False: 0]
  ------------------
  150|      0|         return g;
  151|      0|      }
  152|      0|   }
  153|       |
  154|       |   // If no pre-offered groups fit our supported set, we prioritize our
  155|       |   // own preference.
  156|  48.7k|   for(auto g : our_groups) {
  ------------------
  |  Branch (156:15): [True: 48.7k, False: 396]
  ------------------
  157|  48.7k|      if(value_exists(supported_by_peer, g)) {
  ------------------
  |  Branch (157:10): [True: 5.27k, False: 43.5k]
  ------------------
  158|  5.27k|         return g;
  159|  5.27k|      }
  160|  48.7k|   }
  161|       |
  162|    396|   return Group_Params::NONE;
  163|  5.66k|}
_ZNK5Botan3TLS6Policy19key_exchange_groupsEv:
  178|  5.66k|std::vector<Group_Params> Policy::key_exchange_groups() const {
  179|  5.66k|   return {
  180|       |      // clang-format off
  181|  5.66k|#if defined(BOTAN_HAS_X25519)
  182|  5.66k|      Group_Params::X25519,
  183|  5.66k|#endif
  184|       |
  185|  5.66k|      Group_Params::SECP256R1,
  186|       |
  187|  5.66k|#if defined(BOTAN_HAS_ML_KEM) && defined(BOTAN_HAS_TLS_13_PQC)
  188|       |
  189|  5.66k|#if defined(BOTAN_HAS_X25519)
  190|  5.66k|      Group_Params_Code::HYBRID_X25519_ML_KEM_768,
  191|  5.66k|#endif
  192|       |
  193|  5.66k|      Group_Params_Code::HYBRID_SECP256R1_ML_KEM_768,
  194|  5.66k|      Group_Params_Code::HYBRID_SECP384R1_ML_KEM_1024,
  195|  5.66k|#endif
  196|       |
  197|  5.66k|#if defined(BOTAN_HAS_X448)
  198|  5.66k|      Group_Params::X448,
  199|  5.66k|#endif
  200|       |
  201|  5.66k|      Group_Params::SECP384R1,
  202|  5.66k|      Group_Params::SECP521R1,
  203|       |
  204|  5.66k|      Group_Params::BRAINPOOL256R1,
  205|  5.66k|      Group_Params::BRAINPOOL256R1TLS13,
  206|  5.66k|      Group_Params::BRAINPOOL384R1,
  207|  5.66k|      Group_Params::BRAINPOOL384R1TLS13,
  208|  5.66k|      Group_Params::BRAINPOOL512R1,
  209|  5.66k|      Group_Params::BRAINPOOL512R1TLS13,
  210|       |
  211|       |      // clang-format on
  212|  5.66k|   };
  213|  5.66k|}
_ZNK5Botan3TLS6Policy23minimum_ecdh_group_sizeEv:
  257|  1.61k|size_t Policy::minimum_ecdh_group_size() const {
  258|       |   // x25519 is smallest curve currently supported for TLS key exchange
  259|  1.61k|   return 255;
  260|  1.61k|}
_ZNK5Botan3TLS6Policy25check_peer_key_acceptableERKNS_10Public_KeyE:
  281|  1.61k|void Policy::check_peer_key_acceptable(const Public_Key& public_key) const {
  282|  1.61k|   const std::string algo_name = public_key.algo_name();
  283|       |
  284|  1.61k|   const size_t keylength = public_key.key_length();
  285|  1.61k|   size_t expected_keylength = 0;
  286|       |
  287|  1.61k|   if(algo_name == "RSA") {
  ------------------
  |  Branch (287:7): [True: 0, False: 1.61k]
  ------------------
  288|      0|      expected_keylength = minimum_rsa_bits();
  289|  1.61k|   } else if(algo_name == "DH") {
  ------------------
  |  Branch (289:14): [True: 0, False: 1.61k]
  ------------------
  290|      0|      expected_keylength = minimum_dh_group_size();
  291|  1.61k|   } else if(algo_name == "ECDH" || algo_name == "X25519" || algo_name == "X448") {
  ------------------
  |  Branch (291:14): [True: 1.61k, False: 5]
  |  Branch (291:37): [True: 3, False: 2]
  |  Branch (291:62): [True: 2, False: 0]
  ------------------
  292|  1.61k|      expected_keylength = minimum_ecdh_group_size();
  293|  1.61k|   } else if(algo_name == "ECDSA") {
  ------------------
  |  Branch (293:14): [True: 0, False: 0]
  ------------------
  294|      0|      expected_keylength = minimum_ecdsa_group_size();
  295|      0|   }
  296|       |   // else some other algo, so leave expected_keylength as zero and the check is a no-op
  297|       |
  298|  1.61k|   if(keylength < expected_keylength) {
  ------------------
  |  Branch (298:7): [True: 0, False: 1.61k]
  ------------------
  299|      0|      throw TLS_Exception(Alert::InsufficientSecurity,
  300|      0|                          "Peer sent " + std::to_string(keylength) + " bit " + algo_name +
  301|      0|                             " key"
  302|      0|                             ", policy requires at least " +
  303|      0|                             std::to_string(expected_keylength));
  304|      0|   }
  305|  1.61k|}
_ZNK5Botan3TLS6Policy27acceptable_protocol_versionENS0_16Protocol_VersionE:
  323|  6.48k|bool Policy::acceptable_protocol_version(Protocol_Version version) const {
  324|  6.48k|#if defined(BOTAN_HAS_TLS_13)
  325|  6.48k|   if(version == Protocol_Version::TLS_V13 && allow_tls13()) {
  ------------------
  |  Branch (325:7): [True: 5.71k, False: 767]
  |  Branch (325:7): [True: 5.71k, False: 767]
  |  Branch (325:47): [True: 5.71k, False: 0]
  ------------------
  326|  5.71k|      return true;
  327|  5.71k|   }
  328|    767|#endif
  329|       |
  330|    767|#if defined(BOTAN_HAS_TLS_12)
  331|    767|   if(version == Protocol_Version::TLS_V12 && allow_tls12()) {
  ------------------
  |  Branch (331:7): [True: 0, False: 767]
  |  Branch (331:7): [True: 0, False: 767]
  |  Branch (331:47): [True: 0, False: 0]
  ------------------
  332|      0|      return true;
  333|      0|   }
  334|       |
  335|    767|   if(version == Protocol_Version::DTLS_V12 && allow_dtls12()) {
  ------------------
  |  Branch (335:7): [True: 767, False: 0]
  |  Branch (335:7): [True: 767, False: 0]
  |  Branch (335:48): [True: 767, False: 0]
  ------------------
  336|    767|      return true;
  337|    767|   }
  338|      0|#endif
  339|       |
  340|      0|   BOTAN_UNUSED(version);
  ------------------
  |  |  151|      0|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  341|      0|   return false;
  342|    767|}
_ZNK5Botan3TLS6Policy24latest_supported_versionEb:
  344|  6.48k|Protocol_Version Policy::latest_supported_version(bool datagram) const {
  345|  6.48k|   if(datagram) {
  ------------------
  |  Branch (345:7): [True: 767, False: 5.71k]
  ------------------
  346|    767|      if(acceptable_protocol_version(Protocol_Version::DTLS_V12)) {
  ------------------
  |  Branch (346:10): [True: 767, False: 0]
  ------------------
  347|    767|         return Protocol_Version::DTLS_V12;
  348|    767|      }
  349|  5.71k|   } else {
  350|  5.71k|      if(acceptable_protocol_version(Protocol_Version::TLS_V13)) {
  ------------------
  |  Branch (350:10): [True: 5.71k, False: 0]
  ------------------
  351|  5.71k|         return Protocol_Version::TLS_V13;
  352|  5.71k|      }
  353|      0|      if(acceptable_protocol_version(Protocol_Version::TLS_V12)) {
  ------------------
  |  Branch (353:10): [True: 0, False: 0]
  ------------------
  354|      0|         return Protocol_Version::TLS_V12;
  355|      0|      }
  356|      0|   }
  357|       |
  358|      0|   throw Invalid_State("Policy forbids all available TLS version");
  359|  6.48k|}
_ZNK5Botan3TLS6Policy28allow_insecure_renegotiationEv:
  374|  3.22k|bool Policy::allow_insecure_renegotiation() const {
  375|  3.22k|   return false;
  376|  3.22k|}
_ZNK5Botan3TLS6Policy11allow_tls12Ev:
  378|  14.4k|bool Policy::allow_tls12() const {
  379|  14.4k|#if defined(BOTAN_HAS_TLS_12)
  380|  14.4k|   return true;
  381|       |#else
  382|       |   return false;
  383|       |#endif
  384|  14.4k|}
_ZNK5Botan3TLS6Policy11allow_tls13Ev:
  386|  8.53k|bool Policy::allow_tls13() const {
  387|  8.53k|#if defined(BOTAN_HAS_TLS_13)
  388|  8.53k|   return true;
  389|       |#else
  390|       |   return false;
  391|       |#endif
  392|  8.53k|}
_ZNK5Botan3TLS6Policy12allow_dtls12Ev:
  394|    813|bool Policy::allow_dtls12() const {
  395|    813|#if defined(BOTAN_HAS_TLS_12)
  396|    813|   return true;
  397|       |#else
  398|       |   return false;
  399|       |#endif
  400|    813|}
_ZNK5Botan3TLS6Policy28include_time_in_hello_randomEv:
  402|  5.63k|bool Policy::include_time_in_hello_random() const {
  403|  5.63k|   return true;
  404|  5.63k|}
_ZNK5Botan3TLS6Policy18hide_unknown_usersEv:
  406|     22|bool Policy::hide_unknown_users() const {
  407|     22|   return false;
  408|     22|}
_ZNK5Botan3TLS6Policy39server_uses_own_ciphersuite_preferencesEv:
  410|  3.03k|bool Policy::server_uses_own_ciphersuite_preferences() const {
  411|  3.03k|   return true;
  412|  3.03k|}
_ZNK5Botan3TLS6Policy26negotiate_encrypt_then_macEv:
  414|    112|bool Policy::negotiate_encrypt_then_mac() const {
  415|    112|   return true;
  416|    112|}
_ZNK5Botan3TLS6Policy30require_extended_master_secretEv:
  418|  3.10k|bool Policy::require_extended_master_secret() const {
  419|  3.10k|   return true;
  420|  3.10k|}
_ZNK5Botan3TLS6Policy27support_cert_status_messageEv:
  431|    183|bool Policy::support_cert_status_message() const {
  432|    183|   return true;
  433|    183|}
_ZNK5Botan3TLS6Policy17hash_hello_randomEv:
  443|  5.63k|bool Policy::hash_hello_random() const {
  444|  5.63k|   return true;
  445|  5.63k|}
_ZNK5Botan3TLS6Policy41require_client_certificate_authenticationEv:
  451|  2.81k|bool Policy::require_client_certificate_authentication() const {
  452|  2.81k|   return false;
  453|  2.81k|}
_ZNK5Botan3TLS6Policy41request_client_certificate_authenticationEv:
  455|  2.81k|bool Policy::request_client_certificate_authentication() const {
  456|  2.81k|   return require_client_certificate_authentication();
  457|  2.81k|}
_ZNK5Botan3TLS6Policy25allow_dtls_epoch0_restartEv:
  471|    767|bool Policy::allow_dtls_epoch0_restart() const {
  472|    767|   return false;
  473|    767|}
_ZNK5Botan3TLS6Policy35dtls_server_require_cookie_exchangeEv:
  475|    789|bool Policy::dtls_server_require_cookie_exchange() const {
  476|       |   /*
  477|       |   RFC 9147 Section 11 "Security Considerations":
  478|       |
  479|       |      The primary additional security consideration raised by DTLS is that of
  480|       |      denial of service by excessive resource consumption. DTLS includes a
  481|       |      cookie exchange designed to protect against denial of service. [...]
  482|       |      In particular, DTLS servers that do not use the cookie exchange may be
  483|       |      used as attack amplifiers even if they themselves are not experiencing
  484|       |      DoS. Therefore, DTLS servers SHOULD use the cookie exchange unless there
  485|       |      is good reason to believe that amplification is not a threat in their
  486|       |      environment.
  487|       |   */
  488|    789|   return true;
  489|    789|}
_ZNK5Botan3TLS6Policy30maximum_handshake_message_sizeEv:
  491|  35.0k|size_t Policy::maximum_handshake_message_size() const {
  492|  35.0k|   return 65536;
  493|  35.0k|}
_ZNK5Botan3TLS6Policy30maximum_certificate_chain_sizeEv:
  495|    461|size_t Policy::maximum_certificate_chain_size() const {
  496|    461|   return 65536;
  497|    461|}
_ZNK5Botan3TLS6Policy20dtls_initial_timeoutEv:
  522|    619|size_t Policy::dtls_initial_timeout() const {
  523|    619|   return 1 * 1000;
  524|    619|}
_ZNK5Botan3TLS6Policy20dtls_maximum_timeoutEv:
  526|    619|size_t Policy::dtls_maximum_timeout() const {
  527|    619|   return 60 * 1000;
  528|    619|}
_ZNK5Botan3TLS6Policy28dtls_maximum_retransmissionsEv:
  536|    619|std::optional<size_t> Policy::dtls_maximum_retransmissions() const {
  537|       |   // Matches BoringSSL's DTLS1_MAX_TIMEOUTS.
  538|       |   //
  539|       |   // With the default schedule of a 1 second initial timeout and 60
  540|       |   // second maximum, this gives up after roughly 8 minutes
  541|       |   // (1+2+4+8+16+32+7*60 s).
  542|       |
  543|    619|   return 12;
  544|    619|}
_ZNK5Botan3TLS6Policy16dtls_default_mtuEv:
  546|    619|size_t Policy::dtls_default_mtu() const {
  547|       |   // default MTU is IPv6 min MTU minus UDP/IP headers
  548|    619|   return 1280 - 40 - 8;
  549|    619|}

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

_ZN5Botan3TLS6ServerC2ERKNSt3__110shared_ptrINS0_9CallbacksEEERKNS3_INS0_15Session_ManagerEEERKNS3_INS_19Credentials_ManagerEEERKNS3_IKNS0_6PolicyEEERKNS3_INS_21RandomNumberGeneratorEEEbm:
   36|  6.48k|               size_t io_buf_sz) {
   37|  6.48k|   const auto max_version = policy->latest_supported_version(is_datagram);
   38|       |
   39|  6.48k|#if defined(BOTAN_HAS_TLS_13)
   40|  6.48k|   if(!max_version.is_pre_tls_13()) {
  ------------------
  |  Branch (40:7): [True: 5.71k, False: 767]
  ------------------
   41|  5.71k|      m_impl = Server_Impl_13::create(callbacks, session_manager, creds, policy, rng);
   42|       |
   43|  5.71k|   #if defined(BOTAN_HAS_TLS_DOWNGRADE_SUPPORT)
   44|  5.71k|      if(m_impl->expects_downgrade()) {
  ------------------
  |  Branch (44:10): [True: 5.71k, False: 0]
  ------------------
   45|  5.71k|         m_impl->set_io_buffer_size(io_buf_sz);
   46|  5.71k|      }
   47|  5.71k|   #endif
   48|       |
   49|  5.71k|      return;
   50|  5.71k|   }
   51|    767|#endif
   52|       |
   53|    767|#if defined(BOTAN_HAS_TLS_12)
   54|    767|   if(max_version.is_pre_tls_13()) {
  ------------------
  |  Branch (54:7): [True: 767, False: 0]
  ------------------
   55|    767|      m_impl = Server_Impl_12::create(callbacks, session_manager, creds, policy, rng, is_datagram, io_buf_sz);
   56|    767|      return;
   57|    767|   }
   58|      0|#endif
   59|       |
   60|      0|   BOTAN_UNUSED(max_version, callbacks, session_manager, creds, policy, rng, is_datagram, io_buf_sz);
  ------------------
  |  |  151|      0|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   61|      0|   throw Not_Implemented("Requested TLS server version is not available in this build");
   62|    767|}
_ZN5Botan3TLS6ServerD2Ev:
   64|  6.48k|Server::~Server() = default;
_ZN5Botan3TLS6Server9from_peerENSt3__14spanIKhLm18446744073709551615EEE:
   66|  6.48k|size_t Server::from_peer(std::span<const uint8_t> data) {
   67|  6.48k|   auto read = m_impl->from_peer(data);
   68|       |
   69|  6.48k|#if defined(BOTAN_HAS_TLS_DOWNGRADE_SUPPORT)
   70|       |   // If TLS 1.2 is not available, we will never downgrade, the downgrade info
   71|       |   // won't even be created and `is_downgrading()` would always return false.
   72|  6.48k|   if(m_impl->is_downgrading()) {
  ------------------
  |  Branch (72:7): [True: 3.21k, False: 3.27k]
  ------------------
   73|  3.21k|      auto info = m_impl->extract_downgrade_info();
   74|  3.21k|      m_impl = Server_Impl_12::create_for_downgrade(*info);
   75|       |
   76|       |      // replay peer data received so far
   77|  3.21k|      read = m_impl->from_peer(info->peer_transcript);
   78|  3.21k|   }
   79|  6.48k|#endif
   80|       |
   81|  6.48k|   return read;
   82|  6.48k|}

_ZNK5Botan3TLS14Session_Handle20validate_constraintsEv:
   34|     97|void Session_Handle::validate_constraints() const {
   35|     97|   std::visit(overloaded{
   36|     97|                 [](const Session_ID& id) {
   37|       |                    // RFC 5246 7.4.1.2
   38|       |                    //    opaque SessionID<0..32>;
   39|     97|                    BOTAN_ARG_CHECK(!id.empty(), "Session ID must not be empty");
   40|     97|                    BOTAN_ARG_CHECK(id.size() <= 32, "Session ID cannot be longer than 32 bytes");
   41|     97|                 },
   42|     97|                 [](const Session_Ticket& ticket) {
   43|     97|                    BOTAN_ARG_CHECK(!ticket.empty(), "Ticket most not be empty");
   44|     97|                    BOTAN_ARG_CHECK(ticket.size() <= std::numeric_limits<uint16_t>::max(),
   45|     97|                                    "Ticket cannot be longer than 64kB");
   46|     97|                 },
   47|     97|                 [](const Opaque_Session_Handle& handle) {
   48|       |                    // RFC 8446 4.6.1
   49|       |                    //    opaque ticket<1..2^16-1>;
   50|     97|                    BOTAN_ARG_CHECK(!handle.empty(), "Opaque session handle must not be empty");
   51|     97|                    BOTAN_ARG_CHECK(handle.size() <= std::numeric_limits<uint16_t>::max(),
   52|     97|                                    "Opaque session handle cannot be longer than 64kB");
   53|     97|                 },
   54|     97|              },
   55|     97|              m_handle);
   56|     97|}
_ZN5Botan3TLS12Session_BaseD2Ev:
   94|    158|Session_Base::~Session_Base() = default;
_ZN5Botan3TLS12Session_BaseC2ERKS1_:
   96|     79|Session_Base::Session_Base(const Session_Base& other) = default;
_ZN5Botan3TLS12Session_BaseC2ENSt3__16chrono10time_pointINS3_12system_clockENS3_8durationIxNS2_5ratioILl1ELl1000000EEEEEEENS0_16Protocol_VersionEtNS0_15Connection_SideEtbbRKNS2_6vectorINS_16X509_CertificateENS2_9allocatorISE_EEEENS2_10shared_ptrIKNS_10Public_KeyEEENS0_18Server_InformationE:
  112|     79|      m_start_time(start_time),
  113|     79|      m_version(version),
  114|     79|      m_ciphersuite(ciphersuite),
  115|     79|      m_connection_side(connection_side),
  116|     79|      m_srtp_profile(srtp_profile),
  117|     79|      m_extended_master_secret(extended_master_secret),
  118|     79|      m_encrypt_then_mac(encrypt_then_mac),
  119|     79|      m_peer_certs(peer_certs),
  120|     79|      m_peer_raw_public_key(std::move(peer_raw_public_key)),
  121|     79|      m_server_info(std::move(server_info)) {}
_ZNK5Botan3TLS12Session_Base11ciphersuiteEv:
  123|     79|Ciphersuite Session_Base::ciphersuite() const {
  124|     79|   auto suite = Ciphersuite::by_id(m_ciphersuite);
  125|     79|   if(!suite.has_value()) {
  ------------------
  |  Branch (125:7): [True: 0, False: 79]
  ------------------
  126|      0|      throw Decoding_Error("Failed to find cipher suite for ID " + std::to_string(m_ciphersuite));
  127|      0|   }
  128|     79|   return suite.value();
  129|     79|}
_ZN5Botan3TLS15Session_SummaryC2ERKNS0_12Session_BaseEbNSt3__18optionalINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEE:
  134|     79|      Session_Base(base), m_external_psk_identity(std::move(psk_identity)), m_was_resumption(was_resumption) {
  135|     79|   BOTAN_ARG_CHECK(version().is_pre_tls_13(), "Instantiated a TLS 1.2 session summary with an newer TLS version");
  ------------------
  |  |   35|     79|   do {                                                          \
  |  |   36|     79|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     79|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 79]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     79|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 79]
  |  |  ------------------
  ------------------
  136|       |
  137|     79|   const auto cs = ciphersuite();
  138|     79|   m_kex_algo = cs.kex_algo();
  139|     79|}
_ZN5Botan3TLS7SessionC2ERKNSt3__16vectorIhNS_16secure_allocatorIhEEEENS0_16Protocol_VersionEtNS0_15Connection_SideEbbRKNS3_INS_16X509_CertificateENS2_9allocatorISB_EEEERKNS0_18Server_InformationEtNS2_6chrono10time_pointINSK_12system_clockENSK_8durationIxNS2_5ratioILl1ELl1000000EEEEEEENSN_IxNSO_ILl1ELl1EEEEE:
  250|     79|      Session_Base(current_timestamp,
  251|     79|                   version,
  252|     79|                   ciphersuite,
  253|     79|                   side,
  254|     79|                   srtp_profile,
  255|     79|                   extended_master_secret,
  256|     79|                   encrypt_then_mac,
  257|     79|                   certs,
  258|     79|                   nullptr,  // RFC 7250 (raw public keys) is NYI for TLS 1.2
  259|     79|                   server_info),
  260|     79|      m_master_secret(master_secret),
  261|     79|      m_early_data_allowed(false),
  262|     79|      m_max_early_data_bytes(0),
  263|     79|      m_ticket_age_add(0),
  264|     79|      m_lifetime_hint(lifetime_hint) {
  265|     79|   BOTAN_ARG_CHECK(version.is_pre_tls_13(), "Instantiated a TLS 1.2 session object with a TLS version newer than 1.2");
  ------------------
  |  |   35|     79|   do {                                                          \
  |  |   36|     79|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     79|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 79]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     79|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 79]
  |  |  ------------------
  ------------------
  266|     79|}
tls_session.cpp:_ZZNK5Botan3TLS14Session_Handle20validate_constraintsEvENK3$_0clERKNS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS0_11Session_ID_EJEEE:
   36|     62|                 [](const Session_ID& id) {
   37|       |                    // RFC 5246 7.4.1.2
   38|       |                    //    opaque SessionID<0..32>;
   39|     62|                    BOTAN_ARG_CHECK(!id.empty(), "Session ID must not be empty");
  ------------------
  |  |   35|     62|   do {                                                          \
  |  |   36|     62|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     62|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 62]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     62|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 62]
  |  |  ------------------
  ------------------
   40|     62|                    BOTAN_ARG_CHECK(id.size() <= 32, "Session ID cannot be longer than 32 bytes");
  ------------------
  |  |   35|     62|   do {                                                          \
  |  |   36|     62|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     62|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 62]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     62|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 62]
  |  |  ------------------
  ------------------
   41|     62|                 },
tls_session.cpp:_ZZNK5Botan3TLS14Session_Handle20validate_constraintsEvENK3$_1clERKNS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS0_15Session_Ticket_EJEEE:
   42|     35|                 [](const Session_Ticket& ticket) {
   43|     35|                    BOTAN_ARG_CHECK(!ticket.empty(), "Ticket most not be empty");
  ------------------
  |  |   35|     35|   do {                                                          \
  |  |   36|     35|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     35|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 35]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     35|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 35]
  |  |  ------------------
  ------------------
   44|     35|                    BOTAN_ARG_CHECK(ticket.size() <= std::numeric_limits<uint16_t>::max(),
  ------------------
  |  |   35|     35|   do {                                                          \
  |  |   36|     35|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     35|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 35]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     35|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 35]
  |  |  ------------------
  ------------------
   45|     35|                                    "Ticket cannot be longer than 64kB");
   46|     35|                 },

_ZN5Botan3TLS15Session_ManagerC2ERKNSt3__110shared_ptrINS_21RandomNumberGeneratorEEE:
   24|  6.48k|Session_Manager::Session_Manager(const std::shared_ptr<RandomNumberGenerator>& rng) : m_rng(rng) {
   25|  6.48k|   BOTAN_ASSERT_NONNULL(m_rng);
  ------------------
  |  |  123|  6.48k|   do {                                                                                   \
  |  |  124|  6.48k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 6.48k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  6.48k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 6.48k]
  |  |  ------------------
  ------------------
   26|  6.48k|}
_ZN5Botan3TLS15Session_Manager8retrieveERKNS0_14Session_HandleERNS0_9CallbacksERKNS0_6PolicyE:
   45|     41|                                                 const Policy& policy) {
   46|       |   // Retrieving a session for a given handle does not require locking on this
   47|       |   // level. Concurrent threads might handle the removal of an expired ticket
   48|       |   // more than once, but removing an already removed ticket is a harmless NOOP.
   49|       |
   50|     41|   auto session = retrieve_one(handle);
   51|     41|   if(!session.has_value()) {
  ------------------
  |  Branch (51:7): [True: 41, False: 0]
  ------------------
   52|     41|      return std::nullopt;
   53|     41|   }
   54|       |
   55|       |   // A value of '0' means: No policy restrictions.
   56|      0|   const std::chrono::seconds policy_lifetime =
   57|      0|      (policy.session_ticket_lifetime().count() > 0) ? policy.session_ticket_lifetime() : std::chrono::seconds::max();
  ------------------
  |  Branch (57:7): [True: 0, False: 0]
  ------------------
   58|       |
   59|       |   // RFC 5077 3.3 -- "Old Session Tickets"
   60|       |   //    A server MAY treat a ticket as valid for a shorter or longer period of
   61|       |   //    time than what is stated in the ticket_lifetime_hint.
   62|       |   //
   63|       |   // RFC 5246 F.1.4 -- TLS 1.2
   64|       |   //    If either party suspects that the session may have been compromised, or
   65|       |   //    that certificates may have expired or been revoked, it should force a
   66|       |   //    full handshake.  An upper limit of 24 hours is suggested for session ID
   67|       |   //    lifetimes.
   68|       |   //
   69|       |   // RFC 8446 4.6.1 -- TLS 1.3
   70|       |   //    A server MAY treat a ticket as valid for a shorter period of time than
   71|       |   //    what is stated in the ticket_lifetime.
   72|       |   //
   73|       |   // Note: This disregards what is stored in the session (e.g. "lifetime_hint")
   74|       |   //       and only takes the local policy into account. The lifetime stored in
   75|       |   //       the sessions was taken from the same policy anyways and changes by
   76|       |   //       the application should have an immediate effect.
   77|      0|   const auto ticket_age =
   78|      0|      std::chrono::duration_cast<std::chrono::seconds>(callbacks.tls_current_timestamp() - session->start_time());
   79|      0|   const bool expired = ticket_age > policy_lifetime;
   80|       |
   81|      0|   if(expired) {
  ------------------
  |  Branch (81:7): [True: 0, False: 0]
  ------------------
   82|      0|      remove(handle);
   83|      0|      return std::nullopt;
   84|      0|   } else {
   85|      0|      return session;
   86|      0|   }
   87|      0|}

_ZN5Botan3TLS20Session_Manager_NoopC2Ev:
   16|  6.48k|Session_Manager_Noop::Session_Manager_Noop() : Session_Manager(std::make_shared<Null_RNG>()) {}
_ZN5Botan3TLS20Session_Manager_Noop9establishERKNS0_7SessionERKNSt3__18optionalINS_6StrongINS5_6vectorIhNS5_9allocatorIhEEEENS0_11Session_ID_EJEEEEEb:
   20|     79|                                                              bool /*tls12_no_ticket*/) {
   21|     79|   return {};
   22|     79|}
_ZN5Botan3TLS20Session_Manager_Noop12retrieve_oneERKNS0_14Session_HandleE:
   24|     41|std::optional<Session> Session_Manager_Noop::retrieve_one(const Session_Handle& /*handle*/) {
   25|     41|   return {};
   26|     41|}

_ZN5Botan3TLS16Signature_Scheme21all_available_schemesEv:
   21|  5.84k|const std::vector<Signature_Scheme>& Signature_Scheme::all_available_schemes() {
   22|       |   /*
   23|       |   * This is ordered in some approximate order of preference
   24|       |   */
   25|  5.84k|   static const std::vector<Signature_Scheme> all_schemes = {
   26|       |
   27|       |      // EdDSA 25519 is currently not supported as a signature scheme for certificates
   28|       |      // certificate authentication.
   29|       |      // See: https://github.com/randombit/botan/pull/2958#discussion_r851294715
   30|       |      //
   31|       |      // #if defined(BOTAN_HAS_ED25519)
   32|       |      //       EDDSA_25519,
   33|       |      // #endif
   34|       |
   35|  5.84k|      ECDSA_SECP384R1_TLS13_SHA384,
   36|  5.84k|      ECDSA_SECP521R1_TLS13_SHA512,
   37|  5.84k|      ECDSA_SECP256R1_TLS13_SHA256,
   38|       |
   39|  5.84k|      RSA_PSS_SHA384,
   40|  5.84k|      RSA_PSS_SHA256,
   41|  5.84k|      RSA_PSS_SHA512,
   42|       |
   43|  5.84k|      ECDSA_BRAINPOOL384R1_TLS13_SHA384,
   44|  5.84k|      ECDSA_BRAINPOOL256R1_TLS13_SHA256,
   45|  5.84k|      ECDSA_BRAINPOOL512R1_TLS13_SHA512,
   46|       |
   47|  5.84k|      RSA_PKCS1_SHA384,
   48|  5.84k|      RSA_PKCS1_SHA512,
   49|  5.84k|      RSA_PKCS1_SHA256,
   50|  5.84k|   };
   51|       |
   52|  5.84k|   return all_schemes;
   53|  5.84k|}
_ZN5Botan3TLS16Signature_SchemeC2Ev:
  116|  2.87k|Signature_Scheme::Signature_Scheme() : m_code(NONE) {}
_ZN5Botan3TLS16Signature_SchemeC2Et:
  118|  29.6k|Signature_Scheme::Signature_Scheme(uint16_t wire_code) : Signature_Scheme(Signature_Scheme::Code(wire_code)) {}
_ZN5Botan3TLS16Signature_SchemeC2ENS1_4CodeE:
  120|  29.6k|Signature_Scheme::Signature_Scheme(Signature_Scheme::Code wire_code) : m_code(wire_code) {}
_ZNK5Botan3TLS16Signature_Scheme12is_availableEv:
  122|  14.7k|bool Signature_Scheme::is_available() const noexcept {
  123|  14.7k|   switch(m_code) {
  124|  1.72k|      case RSA_PSS_SHA384:
  ------------------
  |  Branch (124:7): [True: 1.72k, False: 13.0k]
  ------------------
  125|  5.82k|      case RSA_PSS_SHA256:
  ------------------
  |  Branch (125:7): [True: 4.10k, False: 10.6k]
  ------------------
  126|  5.97k|      case RSA_PSS_SHA512:
  ------------------
  |  Branch (126:7): [True: 149, False: 14.5k]
  ------------------
  127|  6.03k|      case RSA_PKCS1_SHA384:
  ------------------
  |  Branch (127:7): [True: 64, False: 14.6k]
  ------------------
  128|  6.11k|      case RSA_PKCS1_SHA512:
  ------------------
  |  Branch (128:7): [True: 76, False: 14.6k]
  ------------------
  129|  6.16k|      case RSA_PKCS1_SHA256:
  ------------------
  |  Branch (129:7): [True: 56, False: 14.6k]
  ------------------
  130|  6.20k|      case ECDSA_BRAINPOOL384R1_TLS13_SHA384:
  ------------------
  |  Branch (130:7): [True: 35, False: 14.6k]
  ------------------
  131|  6.27k|      case ECDSA_BRAINPOOL256R1_TLS13_SHA256:
  ------------------
  |  Branch (131:7): [True: 69, False: 14.6k]
  ------------------
  132|  6.29k|      case ECDSA_BRAINPOOL512R1_TLS13_SHA512:
  ------------------
  |  Branch (132:7): [True: 24, False: 14.7k]
  ------------------
  133|  6.32k|      case ECDSA_SECP384R1_TLS13_SHA384:
  ------------------
  |  Branch (133:7): [True: 31, False: 14.7k]
  ------------------
  134|  6.39k|      case ECDSA_SECP521R1_TLS13_SHA512:
  ------------------
  |  Branch (134:7): [True: 68, False: 14.6k]
  ------------------
  135|  6.43k|      case ECDSA_SECP256R1_TLS13_SHA256:
  ------------------
  |  Branch (135:7): [True: 45, False: 14.6k]
  ------------------
  136|  6.43k|         return true;
  137|  8.29k|      default:
  ------------------
  |  Branch (137:7): [True: 8.29k, False: 6.43k]
  ------------------
  138|  8.29k|         return false;
  139|  14.7k|   }
  140|  14.7k|}
_ZNK5Botan3TLS16Signature_Scheme6is_setEv:
  142|     50|bool Signature_Scheme::is_set() const noexcept {
  143|     50|   return m_code != NONE;
  144|     50|}
_ZNK5Botan3TLS16Signature_Scheme18hash_function_nameEv:
  190|  76.6k|std::string Signature_Scheme::hash_function_name() const {
  191|  76.6k|   switch(m_code) {
  192|      0|      case RSA_PKCS1_SHA1:
  ------------------
  |  Branch (192:7): [True: 0, False: 76.6k]
  ------------------
  193|      0|      case ECDSA_SHA1:
  ------------------
  |  Branch (193:7): [True: 0, False: 76.6k]
  ------------------
  194|      0|         return "SHA-1";
  195|       |
  196|  5.89k|      case ECDSA_SECP256R1_TLS13_SHA256:
  ------------------
  |  Branch (196:7): [True: 5.89k, False: 70.7k]
  ------------------
  197|  11.7k|      case RSA_PKCS1_SHA256:
  ------------------
  |  Branch (197:7): [True: 5.90k, False: 70.7k]
  ------------------
  198|  21.7k|      case RSA_PSS_SHA256:
  ------------------
  |  Branch (198:7): [True: 9.94k, False: 66.6k]
  ------------------
  199|  27.6k|      case ECDSA_BRAINPOOL256R1_TLS13_SHA256:
  ------------------
  |  Branch (199:7): [True: 5.91k, False: 70.6k]
  ------------------
  200|  27.6k|         return "SHA-256";
  201|       |
  202|  5.87k|      case ECDSA_SECP384R1_TLS13_SHA384:
  ------------------
  |  Branch (202:7): [True: 5.87k, False: 70.7k]
  ------------------
  203|  11.7k|      case RSA_PKCS1_SHA384:
  ------------------
  |  Branch (203:7): [True: 5.91k, False: 70.6k]
  ------------------
  204|  19.3k|      case RSA_PSS_SHA384:
  ------------------
  |  Branch (204:7): [True: 7.56k, False: 69.0k]
  ------------------
  205|  25.2k|      case ECDSA_BRAINPOOL384R1_TLS13_SHA384:
  ------------------
  |  Branch (205:7): [True: 5.88k, False: 70.7k]
  ------------------
  206|  25.2k|         return "SHA-384";
  207|       |
  208|  5.91k|      case ECDSA_SECP521R1_TLS13_SHA512:
  ------------------
  |  Branch (208:7): [True: 5.91k, False: 70.6k]
  ------------------
  209|  11.8k|      case RSA_PKCS1_SHA512:
  ------------------
  |  Branch (209:7): [True: 5.92k, False: 70.6k]
  ------------------
  210|  17.8k|      case RSA_PSS_SHA512:
  ------------------
  |  Branch (210:7): [True: 5.99k, False: 70.6k]
  ------------------
  211|  23.7k|      case ECDSA_BRAINPOOL512R1_TLS13_SHA512:
  ------------------
  |  Branch (211:7): [True: 5.87k, False: 70.7k]
  ------------------
  212|  23.7k|         return "SHA-512";
  213|       |
  214|      0|      case EDDSA_25519:
  ------------------
  |  Branch (214:7): [True: 0, False: 76.6k]
  ------------------
  215|      0|      case EDDSA_448:
  ------------------
  |  Branch (215:7): [True: 0, False: 76.6k]
  ------------------
  216|      0|         return "Pure";
  217|       |
  218|      0|      default:
  ------------------
  |  Branch (218:7): [True: 0, False: 76.6k]
  ------------------
  219|      0|         return "Unknown hash function";
  220|  76.6k|   }
  221|  76.6k|}
_ZNK5Botan3TLS16Signature_Scheme14algorithm_nameEv:
  262|  76.6k|std::string Signature_Scheme::algorithm_name() const {
  263|  76.6k|   switch(m_code) {
  264|      0|      case RSA_PKCS1_SHA1:
  ------------------
  |  Branch (264:7): [True: 0, False: 76.6k]
  ------------------
  265|  5.90k|      case RSA_PKCS1_SHA256:
  ------------------
  |  Branch (265:7): [True: 5.90k, False: 70.7k]
  ------------------
  266|  11.8k|      case RSA_PKCS1_SHA384:
  ------------------
  |  Branch (266:7): [True: 5.91k, False: 70.6k]
  ------------------
  267|  17.7k|      case RSA_PKCS1_SHA512:
  ------------------
  |  Branch (267:7): [True: 5.92k, False: 70.6k]
  ------------------
  268|  27.6k|      case RSA_PSS_SHA256:
  ------------------
  |  Branch (268:7): [True: 9.94k, False: 66.6k]
  ------------------
  269|  35.2k|      case RSA_PSS_SHA384:
  ------------------
  |  Branch (269:7): [True: 7.56k, False: 69.0k]
  ------------------
  270|  41.2k|      case RSA_PSS_SHA512:
  ------------------
  |  Branch (270:7): [True: 5.99k, False: 70.6k]
  ------------------
  271|  41.2k|         return "RSA";
  272|       |
  273|      0|      case ECDSA_SHA1:
  ------------------
  |  Branch (273:7): [True: 0, False: 76.6k]
  ------------------
  274|  5.89k|      case ECDSA_SECP256R1_TLS13_SHA256:
  ------------------
  |  Branch (274:7): [True: 5.89k, False: 70.7k]
  ------------------
  275|  11.7k|      case ECDSA_SECP384R1_TLS13_SHA384:
  ------------------
  |  Branch (275:7): [True: 5.87k, False: 70.7k]
  ------------------
  276|  17.6k|      case ECDSA_SECP521R1_TLS13_SHA512:
  ------------------
  |  Branch (276:7): [True: 5.91k, False: 70.6k]
  ------------------
  277|  23.6k|      case ECDSA_BRAINPOOL256R1_TLS13_SHA256:
  ------------------
  |  Branch (277:7): [True: 5.91k, False: 70.6k]
  ------------------
  278|  29.4k|      case ECDSA_BRAINPOOL384R1_TLS13_SHA384:
  ------------------
  |  Branch (278:7): [True: 5.88k, False: 70.7k]
  ------------------
  279|  35.3k|      case ECDSA_BRAINPOOL512R1_TLS13_SHA512:
  ------------------
  |  Branch (279:7): [True: 5.87k, False: 70.7k]
  ------------------
  280|  35.3k|         return "ECDSA";
  281|       |
  282|      0|      case EDDSA_25519:
  ------------------
  |  Branch (282:7): [True: 0, False: 76.6k]
  ------------------
  283|      0|         return "Ed25519";
  284|       |
  285|      0|      case EDDSA_448:
  ------------------
  |  Branch (285:7): [True: 0, False: 76.6k]
  ------------------
  286|      0|         return "Ed448";
  287|       |
  288|      0|      default:
  ------------------
  |  Branch (288:7): [True: 0, False: 76.6k]
  ------------------
  289|      0|         return "Unknown algorithm";
  290|  76.6k|   }
  291|  76.6k|}
_ZNK5Botan3TLS16Signature_Scheme20algorithm_identifierEv:
  338|  29.5k|AlgorithmIdentifier Signature_Scheme::algorithm_identifier() const {
  339|  29.5k|   switch(m_code) {
  340|    124|      case RSA_PKCS1_SHA1:
  ------------------
  |  Branch (340:7): [True: 124, False: 29.4k]
  ------------------
  341|    124|         return AlgorithmIdentifier(OID::from_string("RSA/PKCS1v15(SHA-1)"), AlgorithmIdentifier::USE_NULL_PARAM);
  342|    110|      case RSA_PKCS1_SHA256:
  ------------------
  |  Branch (342:7): [True: 110, False: 29.4k]
  ------------------
  343|    110|         return AlgorithmIdentifier(OID::from_string("RSA/PKCS1v15(SHA-256)"), AlgorithmIdentifier::USE_NULL_PARAM);
  344|    126|      case RSA_PKCS1_SHA384:
  ------------------
  |  Branch (344:7): [True: 126, False: 29.4k]
  ------------------
  345|    126|         return AlgorithmIdentifier(OID::from_string("RSA/PKCS1v15(SHA-384)"), AlgorithmIdentifier::USE_NULL_PARAM);
  346|    150|      case RSA_PKCS1_SHA512:
  ------------------
  |  Branch (346:7): [True: 150, False: 29.3k]
  ------------------
  347|    150|         return AlgorithmIdentifier(OID::from_string("RSA/PKCS1v15(SHA-512)"), AlgorithmIdentifier::USE_NULL_PARAM);
  348|       |
  349|     42|      case ECDSA_SHA1:
  ------------------
  |  Branch (349:7): [True: 42, False: 29.5k]
  ------------------
  350|     42|         return AlgorithmIdentifier(OID::from_string("ECDSA/SHA-1"), AlgorithmIdentifier::USE_EMPTY_PARAM);
  351|     88|      case ECDSA_SECP256R1_TLS13_SHA256:
  ------------------
  |  Branch (351:7): [True: 88, False: 29.4k]
  ------------------
  352|    224|      case ECDSA_BRAINPOOL256R1_TLS13_SHA256:
  ------------------
  |  Branch (352:7): [True: 136, False: 29.4k]
  ------------------
  353|    224|         return AlgorithmIdentifier(OID::from_string("ECDSA/SHA-256"), AlgorithmIdentifier::USE_EMPTY_PARAM);
  354|     62|      case ECDSA_SECP384R1_TLS13_SHA384:
  ------------------
  |  Branch (354:7): [True: 62, False: 29.4k]
  ------------------
  355|    130|      case ECDSA_BRAINPOOL384R1_TLS13_SHA384:
  ------------------
  |  Branch (355:7): [True: 68, False: 29.4k]
  ------------------
  356|    130|         return AlgorithmIdentifier(OID::from_string("ECDSA/SHA-384"), AlgorithmIdentifier::USE_EMPTY_PARAM);
  357|    134|      case ECDSA_SECP521R1_TLS13_SHA512:
  ------------------
  |  Branch (357:7): [True: 134, False: 29.4k]
  ------------------
  358|    182|      case ECDSA_BRAINPOOL512R1_TLS13_SHA512:
  ------------------
  |  Branch (358:7): [True: 48, False: 29.4k]
  ------------------
  359|    182|         return AlgorithmIdentifier(OID::from_string("ECDSA/SHA-512"), AlgorithmIdentifier::USE_EMPTY_PARAM);
  360|       |
  361|  8.20k|      case RSA_PSS_SHA256:
  ------------------
  |  Branch (361:7): [True: 8.20k, False: 21.3k]
  ------------------
  362|  8.20k|         return AlgorithmIdentifier(OID::from_string("RSA/PSS"), PSS_Params("SHA-256", 32).serialize());
  363|  3.44k|      case RSA_PSS_SHA384:
  ------------------
  |  Branch (363:7): [True: 3.44k, False: 26.1k]
  ------------------
  364|  3.44k|         return AlgorithmIdentifier(OID::from_string("RSA/PSS"), PSS_Params("SHA-384", 48).serialize());
  365|    296|      case RSA_PSS_SHA512:
  ------------------
  |  Branch (365:7): [True: 296, False: 29.2k]
  ------------------
  366|    296|         return AlgorithmIdentifier(OID::from_string("RSA/PSS"), PSS_Params("SHA-512", 64).serialize());
  367|       |
  368|  16.5k|      default:
  ------------------
  |  Branch (368:7): [True: 16.5k, False: 13.0k]
  ------------------
  369|       |         // Note that Ed25519 and Ed448 end up here
  370|  16.5k|         return AlgorithmIdentifier();
  371|  29.5k|   }
  372|  29.5k|}
_ZNK5Botan3TLS16Signature_Scheme18is_compatible_withERKNS0_16Protocol_VersionE:
  401|     11|bool Signature_Scheme::is_compatible_with(const Protocol_Version& protocol_version) const noexcept {
  402|       |   // RFC 8446 4.4.3:
  403|       |   //   The SHA-1 algorithm MUST NOT be used in any signatures of
  404|       |   //   CertificateVerify messages.
  405|       |   //
  406|       |   // Note that Botan enforces that for TLS 1.2 as well.
  407|     11|   if(m_code == RSA_PKCS1_SHA1 || m_code == ECDSA_SHA1) {
  ------------------
  |  Branch (407:7): [True: 0, False: 11]
  |  Branch (407:35): [True: 0, False: 11]
  ------------------
  408|      0|      return false;
  409|      0|   }
  410|       |
  411|       |   // RFC 8446 4.4.3:
  412|       |   //   RSA signatures MUST use an RSASSA-PSS algorithm, regardless of whether
  413|       |   //   RSASSA-PKCS1-v1_5 algorithms appear in "signature_algorithms".
  414|       |   //
  415|       |   // Note that this is enforced for TLS 1.3 and above only.
  416|     11|   if(!protocol_version.is_pre_tls_13() && (m_code == RSA_PKCS1_SHA1 || m_code == RSA_PKCS1_SHA256 ||
  ------------------
  |  Branch (416:7): [True: 11, False: 0]
  |  Branch (416:45): [True: 0, False: 11]
  |  Branch (416:73): [True: 1, False: 10]
  ------------------
  417|     10|                                            m_code == RSA_PKCS1_SHA384 || m_code == RSA_PKCS1_SHA512)) {
  ------------------
  |  Branch (417:45): [True: 1, False: 9]
  |  Branch (417:75): [True: 1, False: 8]
  ------------------
  418|      3|      return false;
  419|      3|   }
  420|       |
  421|      8|   return true;
  422|     11|}
_ZN5Botan3TLS24to_algorithm_identifiersERKNSt3__16vectorINS0_16Signature_SchemeENS1_9allocatorIS3_EEEE:
  452|  6.07k|std::vector<AlgorithmIdentifier> to_algorithm_identifiers(const std::vector<Signature_Scheme>& schemes) {
  453|  6.07k|   std::vector<AlgorithmIdentifier> result;
  454|  6.07k|   result.reserve(schemes.size());
  455|  29.5k|   for(const auto& scheme : schemes) {
  ------------------
  |  Branch (455:27): [True: 29.5k, False: 6.07k]
  ------------------
  456|  29.5k|      result.push_back(scheme.algorithm_identifier());
  457|  29.5k|   }
  458|  6.07k|   return result;
  459|  6.07k|}

_ZN5Botan3TLS11Ciphersuite15is_known_usableEt:
  338|    102|bool Ciphersuite::is_known_usable(uint16_t code) {
  339|    102|   static constexpr auto codes = available_ciphersuites();
  340|    102|   return std::binary_search(codes.begin(), codes.end(), code);
  341|    102|}
_ZN5Botan3TLS11Ciphersuite22all_known_ciphersuitesEv:
  344|  12.0k|const std::vector<Ciphersuite>& Ciphersuite::all_known_ciphersuites() {
  345|       |   // clang-format off
  346|       |
  347|       |   // Note that this list of ciphersuites is ordered by id!
  348|  12.0k|   static const std::vector<Ciphersuite> g_ciphersuite_list = {
  349|  12.0k|      Ciphersuite(0x000A, "RSA_WITH_3DES_EDE_CBC_SHA", Auth_Method::IMPLICIT, Kex_Algo::STATIC_RSA, "3DES", 24, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  350|  12.0k|      Ciphersuite(0x0016, "DHE_RSA_WITH_3DES_EDE_CBC_SHA", Auth_Method::RSA, Kex_Algo::DH, "3DES", 24, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  351|  12.0k|      Ciphersuite(0x002C, "PSK_WITH_NULL_SHA", Auth_Method::IMPLICIT, Kex_Algo::PSK, "NULL", 0, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::NULL_CIPHER),
  352|  12.0k|      Ciphersuite(0x002F, "RSA_WITH_AES_128_CBC_SHA", Auth_Method::IMPLICIT, Kex_Algo::STATIC_RSA, "AES-128", 16, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  353|  12.0k|      Ciphersuite(0x0033, "DHE_RSA_WITH_AES_128_CBC_SHA", Auth_Method::RSA, Kex_Algo::DH, "AES-128", 16, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  354|  12.0k|      Ciphersuite(0x0035, "RSA_WITH_AES_256_CBC_SHA", Auth_Method::IMPLICIT, Kex_Algo::STATIC_RSA, "AES-256", 32, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  355|  12.0k|      Ciphersuite(0x0039, "DHE_RSA_WITH_AES_256_CBC_SHA", Auth_Method::RSA, Kex_Algo::DH, "AES-256", 32, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  356|  12.0k|      Ciphersuite(0x003C, "RSA_WITH_AES_128_CBC_SHA256", Auth_Method::IMPLICIT, Kex_Algo::STATIC_RSA, "AES-128", 16, "SHA-256", 32, KDF_Algo::SHA_256, Nonce_Format::CBC_MODE),
  357|  12.0k|      Ciphersuite(0x003D, "RSA_WITH_AES_256_CBC_SHA256", Auth_Method::IMPLICIT, Kex_Algo::STATIC_RSA, "AES-256", 32, "SHA-256", 32, KDF_Algo::SHA_256, Nonce_Format::CBC_MODE),
  358|  12.0k|      Ciphersuite(0x0067, "DHE_RSA_WITH_AES_128_CBC_SHA256", Auth_Method::RSA, Kex_Algo::DH, "AES-128", 16, "SHA-256", 32, KDF_Algo::SHA_256, Nonce_Format::CBC_MODE),
  359|  12.0k|      Ciphersuite(0x006B, "DHE_RSA_WITH_AES_256_CBC_SHA256", Auth_Method::RSA, Kex_Algo::DH, "AES-256", 32, "SHA-256", 32, KDF_Algo::SHA_256, Nonce_Format::CBC_MODE),
  360|  12.0k|      Ciphersuite(0x008B, "PSK_WITH_3DES_EDE_CBC_SHA", Auth_Method::IMPLICIT, Kex_Algo::PSK, "3DES", 24, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  361|  12.0k|      Ciphersuite(0x008C, "PSK_WITH_AES_128_CBC_SHA", Auth_Method::IMPLICIT, Kex_Algo::PSK, "AES-128", 16, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  362|  12.0k|      Ciphersuite(0x008D, "PSK_WITH_AES_256_CBC_SHA", Auth_Method::IMPLICIT, Kex_Algo::PSK, "AES-256", 32, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  363|  12.0k|      Ciphersuite(0x009C, "RSA_WITH_AES_128_GCM_SHA256", Auth_Method::IMPLICIT, Kex_Algo::STATIC_RSA, "AES-128/GCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  364|  12.0k|      Ciphersuite(0x009D, "RSA_WITH_AES_256_GCM_SHA384", Auth_Method::IMPLICIT, Kex_Algo::STATIC_RSA, "AES-256/GCM", 32, "AEAD", 0, KDF_Algo::SHA_384, Nonce_Format::AEAD_IMPLICIT_4),
  365|  12.0k|      Ciphersuite(0x009E, "DHE_RSA_WITH_AES_128_GCM_SHA256", Auth_Method::RSA, Kex_Algo::DH, "AES-128/GCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  366|  12.0k|      Ciphersuite(0x009F, "DHE_RSA_WITH_AES_256_GCM_SHA384", Auth_Method::RSA, Kex_Algo::DH, "AES-256/GCM", 32, "AEAD", 0, KDF_Algo::SHA_384, Nonce_Format::AEAD_IMPLICIT_4),
  367|  12.0k|      Ciphersuite(0x00A8, "PSK_WITH_AES_128_GCM_SHA256", Auth_Method::IMPLICIT, Kex_Algo::PSK, "AES-128/GCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  368|  12.0k|      Ciphersuite(0x00A9, "PSK_WITH_AES_256_GCM_SHA384", Auth_Method::IMPLICIT, Kex_Algo::PSK, "AES-256/GCM", 32, "AEAD", 0, KDF_Algo::SHA_384, Nonce_Format::AEAD_IMPLICIT_4),
  369|  12.0k|      Ciphersuite(0x00AE, "PSK_WITH_AES_128_CBC_SHA256", Auth_Method::IMPLICIT, Kex_Algo::PSK, "AES-128", 16, "SHA-256", 32, KDF_Algo::SHA_256, Nonce_Format::CBC_MODE),
  370|  12.0k|      Ciphersuite(0x00AF, "PSK_WITH_AES_256_CBC_SHA384", Auth_Method::IMPLICIT, Kex_Algo::PSK, "AES-256", 32, "SHA-384", 48, KDF_Algo::SHA_384, Nonce_Format::CBC_MODE),
  371|  12.0k|      Ciphersuite(0x00B0, "PSK_WITH_NULL_SHA256", Auth_Method::IMPLICIT, Kex_Algo::PSK, "NULL", 0, "SHA-256", 32, KDF_Algo::SHA_256, Nonce_Format::NULL_CIPHER),
  372|  12.0k|      Ciphersuite(0x00B1, "PSK_WITH_NULL_SHA384", Auth_Method::IMPLICIT, Kex_Algo::PSK, "NULL", 0, "SHA-384", 48, KDF_Algo::SHA_384, Nonce_Format::NULL_CIPHER),
  373|  12.0k|      Ciphersuite(0x1301, "AES_128_GCM_SHA256", Auth_Method::UNDEFINED, Kex_Algo::UNDEFINED, "AES-128/GCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  374|  12.0k|      Ciphersuite(0x1302, "AES_256_GCM_SHA384", Auth_Method::UNDEFINED, Kex_Algo::UNDEFINED, "AES-256/GCM", 32, "AEAD", 0, KDF_Algo::SHA_384, Nonce_Format::AEAD_IMPLICIT_4),
  375|  12.0k|      Ciphersuite(0x1303, "CHACHA20_POLY1305_SHA256", Auth_Method::UNDEFINED, Kex_Algo::UNDEFINED, "ChaCha20Poly1305", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_XOR_12),
  376|  12.0k|      Ciphersuite(0x1304, "AES_128_CCM_SHA256", Auth_Method::UNDEFINED, Kex_Algo::UNDEFINED, "AES-128/CCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  377|  12.0k|      Ciphersuite(0x1305, "AES_128_CCM_8_SHA256", Auth_Method::UNDEFINED, Kex_Algo::UNDEFINED, "AES-128/CCM(8)", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  378|  12.0k|      Ciphersuite(0xC006, "ECDHE_ECDSA_WITH_NULL_SHA", Auth_Method::ECDSA, Kex_Algo::ECDH, "NULL", 0, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::NULL_CIPHER),
  379|  12.0k|      Ciphersuite(0xC008, "ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA", Auth_Method::ECDSA, Kex_Algo::ECDH, "3DES", 24, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  380|  12.0k|      Ciphersuite(0xC009, "ECDHE_ECDSA_WITH_AES_128_CBC_SHA", Auth_Method::ECDSA, Kex_Algo::ECDH, "AES-128", 16, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  381|  12.0k|      Ciphersuite(0xC00A, "ECDHE_ECDSA_WITH_AES_256_CBC_SHA", Auth_Method::ECDSA, Kex_Algo::ECDH, "AES-256", 32, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  382|  12.0k|      Ciphersuite(0xC010, "ECDHE_RSA_WITH_NULL_SHA", Auth_Method::RSA, Kex_Algo::ECDH, "NULL", 0, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::NULL_CIPHER),
  383|  12.0k|      Ciphersuite(0xC012, "ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", Auth_Method::RSA, Kex_Algo::ECDH, "3DES", 24, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  384|  12.0k|      Ciphersuite(0xC013, "ECDHE_RSA_WITH_AES_128_CBC_SHA", Auth_Method::RSA, Kex_Algo::ECDH, "AES-128", 16, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  385|  12.0k|      Ciphersuite(0xC014, "ECDHE_RSA_WITH_AES_256_CBC_SHA", Auth_Method::RSA, Kex_Algo::ECDH, "AES-256", 32, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  386|  12.0k|      Ciphersuite(0xC023, "ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", Auth_Method::ECDSA, Kex_Algo::ECDH, "AES-128", 16, "SHA-256", 32, KDF_Algo::SHA_256, Nonce_Format::CBC_MODE),
  387|  12.0k|      Ciphersuite(0xC024, "ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", Auth_Method::ECDSA, Kex_Algo::ECDH, "AES-256", 32, "SHA-384", 48, KDF_Algo::SHA_384, Nonce_Format::CBC_MODE),
  388|  12.0k|      Ciphersuite(0xC027, "ECDHE_RSA_WITH_AES_128_CBC_SHA256", Auth_Method::RSA, Kex_Algo::ECDH, "AES-128", 16, "SHA-256", 32, KDF_Algo::SHA_256, Nonce_Format::CBC_MODE),
  389|  12.0k|      Ciphersuite(0xC028, "ECDHE_RSA_WITH_AES_256_CBC_SHA384", Auth_Method::RSA, Kex_Algo::ECDH, "AES-256", 32, "SHA-384", 48, KDF_Algo::SHA_384, Nonce_Format::CBC_MODE),
  390|  12.0k|      Ciphersuite(0xC02B, "ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", Auth_Method::ECDSA, Kex_Algo::ECDH, "AES-128/GCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  391|  12.0k|      Ciphersuite(0xC02C, "ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", Auth_Method::ECDSA, Kex_Algo::ECDH, "AES-256/GCM", 32, "AEAD", 0, KDF_Algo::SHA_384, Nonce_Format::AEAD_IMPLICIT_4),
  392|  12.0k|      Ciphersuite(0xC02F, "ECDHE_RSA_WITH_AES_128_GCM_SHA256", Auth_Method::RSA, Kex_Algo::ECDH, "AES-128/GCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  393|  12.0k|      Ciphersuite(0xC030, "ECDHE_RSA_WITH_AES_256_GCM_SHA384", Auth_Method::RSA, Kex_Algo::ECDH, "AES-256/GCM", 32, "AEAD", 0, KDF_Algo::SHA_384, Nonce_Format::AEAD_IMPLICIT_4),
  394|  12.0k|      Ciphersuite(0xC034, "ECDHE_PSK_WITH_3DES_EDE_CBC_SHA", Auth_Method::IMPLICIT, Kex_Algo::ECDHE_PSK, "3DES", 24, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  395|  12.0k|      Ciphersuite(0xC035, "ECDHE_PSK_WITH_AES_128_CBC_SHA", Auth_Method::IMPLICIT, Kex_Algo::ECDHE_PSK, "AES-128", 16, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  396|  12.0k|      Ciphersuite(0xC036, "ECDHE_PSK_WITH_AES_256_CBC_SHA", Auth_Method::IMPLICIT, Kex_Algo::ECDHE_PSK, "AES-256", 32, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::CBC_MODE),
  397|  12.0k|      Ciphersuite(0xC037, "ECDHE_PSK_WITH_AES_128_CBC_SHA256", Auth_Method::IMPLICIT, Kex_Algo::ECDHE_PSK, "AES-128", 16, "SHA-256", 32, KDF_Algo::SHA_256, Nonce_Format::CBC_MODE),
  398|  12.0k|      Ciphersuite(0xC038, "ECDHE_PSK_WITH_AES_256_CBC_SHA384", Auth_Method::IMPLICIT, Kex_Algo::ECDHE_PSK, "AES-256", 32, "SHA-384", 48, KDF_Algo::SHA_384, Nonce_Format::CBC_MODE),
  399|  12.0k|      Ciphersuite(0xC039, "ECDHE_PSK_WITH_NULL_SHA", Auth_Method::IMPLICIT, Kex_Algo::ECDHE_PSK, "NULL", 0, "SHA-1", 20, KDF_Algo::SHA_1, Nonce_Format::NULL_CIPHER),
  400|  12.0k|      Ciphersuite(0xC03A, "ECDHE_PSK_WITH_NULL_SHA256", Auth_Method::IMPLICIT, Kex_Algo::ECDHE_PSK, "NULL", 0, "SHA-256", 32, KDF_Algo::SHA_256, Nonce_Format::NULL_CIPHER),
  401|  12.0k|      Ciphersuite(0xC03B, "ECDHE_PSK_WITH_NULL_SHA384", Auth_Method::IMPLICIT, Kex_Algo::ECDHE_PSK, "NULL", 0, "SHA-384", 48, KDF_Algo::SHA_384, Nonce_Format::NULL_CIPHER),
  402|  12.0k|      Ciphersuite(0xC050, "RSA_WITH_ARIA_128_GCM_SHA256", Auth_Method::IMPLICIT, Kex_Algo::STATIC_RSA, "ARIA-128/GCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  403|  12.0k|      Ciphersuite(0xC051, "RSA_WITH_ARIA_256_GCM_SHA384", Auth_Method::IMPLICIT, Kex_Algo::STATIC_RSA, "ARIA-256/GCM", 32, "AEAD", 0, KDF_Algo::SHA_384, Nonce_Format::AEAD_IMPLICIT_4),
  404|  12.0k|      Ciphersuite(0xC052, "DHE_RSA_WITH_ARIA_128_GCM_SHA256", Auth_Method::RSA, Kex_Algo::DH, "ARIA-128/GCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  405|  12.0k|      Ciphersuite(0xC053, "DHE_RSA_WITH_ARIA_256_GCM_SHA384", Auth_Method::RSA, Kex_Algo::DH, "ARIA-256/GCM", 32, "AEAD", 0, KDF_Algo::SHA_384, Nonce_Format::AEAD_IMPLICIT_4),
  406|  12.0k|      Ciphersuite(0xC05C, "ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256", Auth_Method::ECDSA, Kex_Algo::ECDH, "ARIA-128/GCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  407|  12.0k|      Ciphersuite(0xC05D, "ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384", Auth_Method::ECDSA, Kex_Algo::ECDH, "ARIA-256/GCM", 32, "AEAD", 0, KDF_Algo::SHA_384, Nonce_Format::AEAD_IMPLICIT_4),
  408|  12.0k|      Ciphersuite(0xC060, "ECDHE_RSA_WITH_ARIA_128_GCM_SHA256", Auth_Method::RSA, Kex_Algo::ECDH, "ARIA-128/GCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  409|  12.0k|      Ciphersuite(0xC061, "ECDHE_RSA_WITH_ARIA_256_GCM_SHA384", Auth_Method::RSA, Kex_Algo::ECDH, "ARIA-256/GCM", 32, "AEAD", 0, KDF_Algo::SHA_384, Nonce_Format::AEAD_IMPLICIT_4),
  410|  12.0k|      Ciphersuite(0xC06A, "PSK_WITH_ARIA_128_GCM_SHA256", Auth_Method::IMPLICIT, Kex_Algo::PSK, "ARIA-128/GCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  411|  12.0k|      Ciphersuite(0xC06B, "PSK_WITH_ARIA_256_GCM_SHA384", Auth_Method::IMPLICIT, Kex_Algo::PSK, "ARIA-256/GCM", 32, "AEAD", 0, KDF_Algo::SHA_384, Nonce_Format::AEAD_IMPLICIT_4),
  412|  12.0k|      Ciphersuite(0xC07A, "RSA_WITH_CAMELLIA_128_GCM_SHA256", Auth_Method::IMPLICIT, Kex_Algo::STATIC_RSA, "Camellia-128/GCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  413|  12.0k|      Ciphersuite(0xC07B, "RSA_WITH_CAMELLIA_256_GCM_SHA384", Auth_Method::IMPLICIT, Kex_Algo::STATIC_RSA, "Camellia-256/GCM", 32, "AEAD", 0, KDF_Algo::SHA_384, Nonce_Format::AEAD_IMPLICIT_4),
  414|  12.0k|      Ciphersuite(0xC07C, "DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256", Auth_Method::RSA, Kex_Algo::DH, "Camellia-128/GCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  415|  12.0k|      Ciphersuite(0xC07D, "DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384", Auth_Method::RSA, Kex_Algo::DH, "Camellia-256/GCM", 32, "AEAD", 0, KDF_Algo::SHA_384, Nonce_Format::AEAD_IMPLICIT_4),
  416|  12.0k|      Ciphersuite(0xC086, "ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256", Auth_Method::ECDSA, Kex_Algo::ECDH, "Camellia-128/GCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  417|  12.0k|      Ciphersuite(0xC087, "ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384", Auth_Method::ECDSA, Kex_Algo::ECDH, "Camellia-256/GCM", 32, "AEAD", 0, KDF_Algo::SHA_384, Nonce_Format::AEAD_IMPLICIT_4),
  418|  12.0k|      Ciphersuite(0xC08A, "ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256", Auth_Method::RSA, Kex_Algo::ECDH, "Camellia-128/GCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  419|  12.0k|      Ciphersuite(0xC08B, "ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384", Auth_Method::RSA, Kex_Algo::ECDH, "Camellia-256/GCM", 32, "AEAD", 0, KDF_Algo::SHA_384, Nonce_Format::AEAD_IMPLICIT_4),
  420|  12.0k|      Ciphersuite(0xC08E, "PSK_WITH_CAMELLIA_128_GCM_SHA256", Auth_Method::IMPLICIT, Kex_Algo::PSK, "Camellia-128/GCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  421|  12.0k|      Ciphersuite(0xC08F, "PSK_WITH_CAMELLIA_256_GCM_SHA384", Auth_Method::IMPLICIT, Kex_Algo::PSK, "Camellia-256/GCM", 32, "AEAD", 0, KDF_Algo::SHA_384, Nonce_Format::AEAD_IMPLICIT_4),
  422|  12.0k|      Ciphersuite(0xC09C, "RSA_WITH_AES_128_CCM", Auth_Method::IMPLICIT, Kex_Algo::STATIC_RSA, "AES-128/CCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  423|  12.0k|      Ciphersuite(0xC09D, "RSA_WITH_AES_256_CCM", Auth_Method::IMPLICIT, Kex_Algo::STATIC_RSA, "AES-256/CCM", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  424|  12.0k|      Ciphersuite(0xC09E, "DHE_RSA_WITH_AES_128_CCM", Auth_Method::RSA, Kex_Algo::DH, "AES-128/CCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  425|  12.0k|      Ciphersuite(0xC09F, "DHE_RSA_WITH_AES_256_CCM", Auth_Method::RSA, Kex_Algo::DH, "AES-256/CCM", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  426|  12.0k|      Ciphersuite(0xC0A0, "RSA_WITH_AES_128_CCM_8", Auth_Method::IMPLICIT, Kex_Algo::STATIC_RSA, "AES-128/CCM(8)", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  427|  12.0k|      Ciphersuite(0xC0A1, "RSA_WITH_AES_256_CCM_8", Auth_Method::IMPLICIT, Kex_Algo::STATIC_RSA, "AES-256/CCM(8)", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  428|  12.0k|      Ciphersuite(0xC0A2, "DHE_RSA_WITH_AES_128_CCM_8", Auth_Method::RSA, Kex_Algo::DH, "AES-128/CCM(8)", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  429|  12.0k|      Ciphersuite(0xC0A3, "DHE_RSA_WITH_AES_256_CCM_8", Auth_Method::RSA, Kex_Algo::DH, "AES-256/CCM(8)", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  430|  12.0k|      Ciphersuite(0xC0A4, "PSK_WITH_AES_128_CCM", Auth_Method::IMPLICIT, Kex_Algo::PSK, "AES-128/CCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  431|  12.0k|      Ciphersuite(0xC0A5, "PSK_WITH_AES_256_CCM", Auth_Method::IMPLICIT, Kex_Algo::PSK, "AES-256/CCM", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  432|  12.0k|      Ciphersuite(0xC0A8, "PSK_WITH_AES_128_CCM_8", Auth_Method::IMPLICIT, Kex_Algo::PSK, "AES-128/CCM(8)", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  433|  12.0k|      Ciphersuite(0xC0A9, "PSK_WITH_AES_256_CCM_8", Auth_Method::IMPLICIT, Kex_Algo::PSK, "AES-256/CCM(8)", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  434|  12.0k|      Ciphersuite(0xC0AC, "ECDHE_ECDSA_WITH_AES_128_CCM", Auth_Method::ECDSA, Kex_Algo::ECDH, "AES-128/CCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  435|  12.0k|      Ciphersuite(0xC0AD, "ECDHE_ECDSA_WITH_AES_256_CCM", Auth_Method::ECDSA, Kex_Algo::ECDH, "AES-256/CCM", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  436|  12.0k|      Ciphersuite(0xC0AE, "ECDHE_ECDSA_WITH_AES_128_CCM_8", Auth_Method::ECDSA, Kex_Algo::ECDH, "AES-128/CCM(8)", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  437|  12.0k|      Ciphersuite(0xC0AF, "ECDHE_ECDSA_WITH_AES_256_CCM_8", Auth_Method::ECDSA, Kex_Algo::ECDH, "AES-256/CCM(8)", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  438|  12.0k|      Ciphersuite(0xCCA8, "ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", Auth_Method::RSA, Kex_Algo::ECDH, "ChaCha20Poly1305", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_XOR_12),
  439|  12.0k|      Ciphersuite(0xCCA9, "ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", Auth_Method::ECDSA, Kex_Algo::ECDH, "ChaCha20Poly1305", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_XOR_12),
  440|  12.0k|      Ciphersuite(0xCCAA, "DHE_RSA_WITH_CHACHA20_POLY1305_SHA256", Auth_Method::RSA, Kex_Algo::DH, "ChaCha20Poly1305", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_XOR_12),
  441|  12.0k|      Ciphersuite(0xCCAB, "PSK_WITH_CHACHA20_POLY1305_SHA256", Auth_Method::IMPLICIT, Kex_Algo::PSK, "ChaCha20Poly1305", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_XOR_12),
  442|  12.0k|      Ciphersuite(0xCCAC, "ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256", Auth_Method::IMPLICIT, Kex_Algo::ECDHE_PSK, "ChaCha20Poly1305", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_XOR_12),
  443|  12.0k|      Ciphersuite(0xD001, "ECDHE_PSK_WITH_AES_128_GCM_SHA256", Auth_Method::IMPLICIT, Kex_Algo::ECDHE_PSK, "AES-128/GCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  444|  12.0k|      Ciphersuite(0xD002, "ECDHE_PSK_WITH_AES_256_GCM_SHA384", Auth_Method::IMPLICIT, Kex_Algo::ECDHE_PSK, "AES-256/GCM", 32, "AEAD", 0, KDF_Algo::SHA_384, Nonce_Format::AEAD_IMPLICIT_4),
  445|  12.0k|      Ciphersuite(0xD003, "ECDHE_PSK_WITH_AES_128_CCM_8_SHA256", Auth_Method::IMPLICIT, Kex_Algo::ECDHE_PSK, "AES-128/CCM(8)", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  446|  12.0k|      Ciphersuite(0xD005, "ECDHE_PSK_WITH_AES_128_CCM_SHA256", Auth_Method::IMPLICIT, Kex_Algo::ECDHE_PSK, "AES-128/CCM", 16, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_IMPLICIT_4),
  447|  12.0k|      Ciphersuite(0xFFC3, "ECDHE_RSA_WITH_AES_256_OCB_SHA256", Auth_Method::RSA, Kex_Algo::ECDH, "AES-256/OCB(12)", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_XOR_12),
  448|  12.0k|      Ciphersuite(0xFFC5, "ECDHE_ECDSA_WITH_AES_256_OCB_SHA256", Auth_Method::ECDSA, Kex_Algo::ECDH, "AES-256/OCB(12)", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_XOR_12),
  449|  12.0k|      Ciphersuite(0xFFC7, "PSK_WITH_AES_256_OCB_SHA256", Auth_Method::IMPLICIT, Kex_Algo::PSK, "AES-256/OCB(12)", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_XOR_12),
  450|  12.0k|      Ciphersuite(0xFFCB, "ECDHE_PSK_WITH_AES_256_OCB_SHA256", Auth_Method::IMPLICIT, Kex_Algo::ECDHE_PSK, "AES-256/OCB(12)", 32, "AEAD", 0, KDF_Algo::SHA_256, Nonce_Format::AEAD_XOR_12),
  451|  12.0k|      };
  452|       |
  453|       |   // clang-format on
  454|       |
  455|  12.0k|   return g_ciphersuite_list;
  456|  12.0k|}

_ZNK5Botan3TLS16Protocol_Version9to_stringEv:
   34|     44|std::string Protocol_Version::to_string() const {
   35|     44|   const uint8_t maj = major_version();
   36|     44|   const uint8_t min = minor_version();
   37|       |
   38|     44|   if(maj == 3 && min == 0) {
  ------------------
  |  Branch (38:7): [True: 8, False: 36]
  |  Branch (38:19): [True: 1, False: 7]
  ------------------
   39|      1|      return "SSL v3";
   40|      1|   }
   41|       |
   42|     43|   if(maj == 3 && min >= 1) {  // TLS v1.x
  ------------------
  |  Branch (42:7): [True: 7, False: 36]
  |  Branch (42:19): [True: 7, False: 0]
  ------------------
   43|      7|      return "TLS v1." + std::to_string(min - 1);
   44|      7|   }
   45|       |
   46|     36|   if(maj == 254) {  // DTLS 1.x
  ------------------
  |  Branch (46:7): [True: 8, False: 28]
  ------------------
   47|      8|      return "DTLS v1." + std::to_string(255 - min);
   48|      8|   }
   49|       |
   50|       |   // Some very new or very old protocol (or bogus data)
   51|     28|   return "Unknown " + std::to_string(maj) + "." + std::to_string(min);
   52|     36|}
_ZNK5Botan3TLS16Protocol_Version20is_datagram_protocolEv:
   54|   392k|bool Protocol_Version::is_datagram_protocol() const {
   55|   392k|   return major_version() > 250;
   56|   392k|}
_ZNK5Botan3TLS16Protocol_Version13is_pre_tls_13Ev:
   58|   301k|bool Protocol_Version::is_pre_tls_13() const {
   59|   301k|   return (!is_datagram_protocol() && *this <= Protocol_Version::TLS_V12) ||
  ------------------
  |  Branch (59:12): [True: 300k, False: 1.61k]
  |  Branch (59:39): [True: 294k, False: 5.80k]
  ------------------
   60|  7.41k|          (is_datagram_protocol() && *this <= Protocol_Version::DTLS_V12);
  ------------------
  |  Branch (60:12): [True: 1.61k, False: 5.80k]
  |  Branch (60:38): [True: 1.60k, False: 11]
  ------------------
   61|   301k|}
_ZNK5Botan3TLS16Protocol_Version18is_tls_13_or_laterEv:
   63|     34|bool Protocol_Version::is_tls_13_or_later() const {
   64|     34|   return (!is_datagram_protocol() && *this >= Protocol_Version::TLS_V13) ||
  ------------------
  |  Branch (64:12): [True: 28, False: 6]
  |  Branch (64:39): [True: 12, False: 16]
  ------------------
   65|     22|          (is_datagram_protocol() && *this >= Protocol_Version::DTLS_V13);
  ------------------
  |  Branch (65:12): [True: 6, False: 16]
  |  Branch (65:38): [True: 6, False: 0]
  ------------------
   66|     34|}
_ZNK5Botan3TLS16Protocol_VersiongtERKS1_:
   68|  9.03k|bool Protocol_Version::operator>(const Protocol_Version& other) const {
   69|  9.03k|   if(this->is_datagram_protocol() != other.is_datagram_protocol()) {
  ------------------
  |  Branch (69:7): [True: 0, False: 9.03k]
  ------------------
   70|      0|      throw TLS_Exception(Alert::ProtocolVersion, "Version comparing " + to_string() + " with " + other.to_string());
   71|      0|   }
   72|       |
   73|  9.03k|   if(this->is_datagram_protocol()) {
  ------------------
  |  Branch (73:7): [True: 61, False: 8.97k]
  ------------------
   74|     61|      return m_version < other.m_version;  // goes backwards
   75|     61|   }
   76|       |
   77|  8.97k|   return m_version > other.m_version;
   78|  9.03k|}
_ZNK5Botan3TLS16Protocol_Version5validEv:
   80|  3.19k|bool Protocol_Version::valid() const {
   81|  3.19k|   const uint8_t maj = major_version();
   82|  3.19k|   const uint8_t min = minor_version();
   83|       |
   84|  3.19k|   if(maj == 3 && min <= 4) {
  ------------------
  |  Branch (84:7): [True: 0, False: 3.19k]
  |  Branch (84:19): [True: 0, False: 0]
  ------------------
   85|       |      // 3.0: SSLv3
   86|       |      // 3.1: TLS 1.0
   87|       |      // 3.2: TLS 1.1
   88|       |      // 3.3: TLS 1.2
   89|       |      // 3.4: TLS 1.3
   90|      0|      return true;
   91|      0|   }
   92|       |
   93|  3.19k|   if(maj == 254 && (min == 253 || min == 255)) {
  ------------------
  |  Branch (93:7): [True: 0, False: 3.19k]
  |  Branch (93:22): [True: 0, False: 0]
  |  Branch (93:36): [True: 0, False: 0]
  ------------------
   94|       |      // 254.253: DTLS 1.2
   95|       |      // 254.255: DTLS 1.0
   96|      0|      return true;
   97|      0|   }
   98|       |
   99|  3.19k|   return false;
  100|  3.19k|}

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

_ZN5Botan22throw_invalid_argumentEPKcS1_S1_:
   23|      1|void throw_invalid_argument(const char* message, const char* func, const char* file) {
   24|      1|   throw Invalid_Argument(fmt("{} in {}:{}", message, func, file));
   25|      1|}

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

_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|   536k|size_t DataSource::read_byte(uint8_t& out) {
   28|   536k|   return read(&out, 1);
   29|   536k|}
_ZN5Botan10DataSource9read_byteEv:
   34|  6.59M|std::optional<uint8_t> DataSource::read_byte() {
   35|  6.59M|   uint8_t b = 0;
   36|  6.59M|   if(this->read(&b, 1) == 1) {
  ------------------
  |  Branch (36:7): [True: 6.56M, False: 26.0k]
  ------------------
   37|  6.56M|      return b;
   38|  6.56M|   } else {
   39|  26.0k|      return {};
   40|  26.0k|   }
   41|  6.59M|}
_ZNK5Botan10DataSource9peek_byteERh:
   46|  13.4k|size_t DataSource::peek_byte(uint8_t& out) const {
   47|  13.4k|   return peek(&out, 1, 0);
   48|  13.4k|}
_ZN5Botan17DataSource_Memory4readEPhm:
   73|  6.59M|size_t DataSource_Memory::read(uint8_t out[], size_t length) {
   74|  6.59M|   const size_t got = std::min<size_t>(m_source.size() - m_offset, length);
   75|  6.59M|   copy_mem(out, m_source.data() + m_offset, got);
   76|  6.59M|   m_offset += got;
   77|  6.59M|   return got;
   78|  6.59M|}
_ZN5Botan17DataSource_Memory15check_availableEm:
   80|   176k|bool DataSource_Memory::check_available(size_t n) {
   81|   176k|   return (n <= (m_source.size() - m_offset));
   82|   176k|}
_ZNK5Botan17DataSource_Memory4peekEPhmm:
   87|  13.8k|size_t DataSource_Memory::peek(uint8_t out[], size_t length, size_t peek_offset) const {
   88|  13.8k|   const size_t bytes_left = m_source.size() - m_offset;
   89|  13.8k|   if(peek_offset >= bytes_left) {
  ------------------
  |  Branch (89:7): [True: 1, False: 13.8k]
  ------------------
   90|      1|      return 0;
   91|      1|   }
   92|       |
   93|  13.8k|   const size_t got = std::min(bytes_left - peek_offset, length);
   94|  13.8k|   copy_mem(out, &m_source[m_offset + peek_offset], got);
   95|  13.8k|   return got;
   96|  13.8k|}
_ZNK5Botan17DataSource_Memory11end_of_dataEv:
  101|   130k|bool DataSource_Memory::end_of_data() const {
  102|   130k|   return (m_offset == m_source.size());
  103|   130k|}
_ZN5Botan17DataSource_MemoryC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  108|  12.9k|DataSource_Memory::DataSource_Memory(std::string_view in) : DataSource_Memory(as_span_of_bytes(in)) {}

_ZN5Botan7DNSName15from_san_stringENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  147|  6.48k|std::optional<DNSName> DNSName::from_san_string(std::string_view name) {
  148|  6.48k|   if(auto canon = check_and_canonicalize_dns_name(name)) {
  ------------------
  |  Branch (148:12): [True: 6.48k, False: 0]
  ------------------
  149|       |      /*
  150|       |      Validate the wildcard shape: at most one "*", and if present it must be in
  151|       |      the leftmost label (no "." before it). This matches the RFC 6125 6.4.3
  152|       |      form that host_wildcard_match accepts and rejects eg "*.*.example.com" or
  153|       |      "foo.*.example.com"
  154|       |      */
  155|  6.48k|      const auto first_star = canon->find('*');
  156|  6.48k|      if(first_star != std::string::npos) {
  ------------------
  |  Branch (156:10): [True: 0, False: 6.48k]
  ------------------
  157|      0|         if(canon->find('*', first_star + 1) != std::string::npos) {
  ------------------
  |  Branch (157:13): [True: 0, False: 0]
  ------------------
  158|      0|            return std::nullopt;
  159|      0|         }
  160|      0|         const auto first_dot = canon->find('.');
  161|      0|         if(first_dot != std::string::npos && first_dot < first_star) {
  ------------------
  |  Branch (161:13): [True: 0, False: 0]
  |  Branch (161:47): [True: 0, False: 0]
  ------------------
  162|      0|            return std::nullopt;
  163|      0|         }
  164|       |         /*
  165|       |         RFC 6125 6.4.3: "the client SHOULD NOT attempt to match a presented
  166|       |         identifier where the wildcard character is embedded within an
  167|       |         A-label or U-label"
  168|       |         */
  169|      0|         if(canon->starts_with("xn--")) {
  ------------------
  |  Branch (169:13): [True: 0, False: 0]
  ------------------
  170|      0|            return std::nullopt;
  171|      0|         }
  172|       |         // A wildcard match requires at least three labels, so shorter
  173|       |         // patterns ("*", "*.com") could never match any host
  174|      0|         if(std::count(canon->begin(), canon->end(), '.') < 2) {
  ------------------
  |  Branch (174:13): [True: 0, False: 0]
  ------------------
  175|      0|            return std::nullopt;
  176|      0|         }
  177|      0|      }
  178|  6.48k|      return DNSName(std::move(*canon));
  179|  6.48k|   } else {
  180|      0|      return {};
  181|      0|   }
  182|  6.48k|}
dns_name.cpp:_ZN5Botan12_GLOBAL__N_131check_and_canonicalize_dns_nameENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   21|  6.48k|std::optional<std::string> check_and_canonicalize_dns_name(std::string_view name) {
   22|       |   /*
   23|       |   * RFC 1035 limits names to "255 octets or less", but that is in the wire
   24|       |   * encoding, which includes a length octet per label plus the root label.
   25|       |   * In presentation form (without a trailing dot) the limit is 253.
   26|       |   */
   27|  6.48k|   if(name.size() > 253) {
  ------------------
  |  Branch (27:7): [True: 0, False: 6.48k]
  ------------------
   28|      0|      return {};
   29|      0|   }
   30|       |
   31|       |   // DNS names are not empty
   32|  6.48k|   if(name.empty()) {
  ------------------
  |  Branch (32:7): [True: 0, False: 6.48k]
  ------------------
   33|      0|      return {};
   34|      0|   }
   35|       |
   36|       |   // DNS names do not start with or end with a dot
   37|  6.48k|   if(name.starts_with(".") || name.ends_with(".")) {
  ------------------
  |  Branch (37:7): [True: 0, False: 6.48k]
  |  Branch (37:32): [True: 0, False: 6.48k]
  ------------------
   38|      0|      return {};
   39|      0|   }
   40|       |
   41|       |   /*
   42|       |   * Table mapping uppercase to lowercase and only including values valid for
   43|       |   * DNS names: A-Z, a-z, 0-9, '-', '.', plus '*' for wildcarding (RFC 1035)
   44|       |   */
   45|       |   // clang-format off
   46|  6.48k|   constexpr uint8_t DNS_CHAR_MAPPING[128] = {
   47|  6.48k|      '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
   48|  6.48k|      '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
   49|  6.48k|      '\0', '\0', '\0', '\0',  '*', '\0', '\0',  '-',  '.', '\0',  '0',  '1',  '2',  '3',  '4',  '5',  '6',  '7',  '8',
   50|  6.48k|       '9', '\0', '\0', '\0', '\0', '\0', '\0', '\0',  'a',  'b',  'c',  'd',  'e',  'f',  'g',  'h',  'i',  'j',  'k',
   51|  6.48k|       'l',  'm',  'n',  'o',  'p',  'q',  'r',  's',  't',  'u',  'v',  'w',  'x',  'y',  'z', '\0', '\0', '\0', '\0',
   52|  6.48k|       '\0', '\0',  'a',  'b',  'c',  'd',  'e',  'f',  'g',  'h',  'i',  'j',  'k',  'l',  'm',  'n',  'o',  'p',  'q',
   53|  6.48k|       'r',  's',  't',  'u',  'v',  'w',  'x',  'y',  'z', '\0', '\0', '\0', '\0', '\0',
   54|  6.48k|   };
   55|       |   // clang-format on
   56|       |
   57|  6.48k|   std::string canon;
   58|  6.48k|   canon.reserve(name.size());
   59|       |
   60|       |   // RFC 1035: DNS labels must not exceed 63 characters
   61|  6.48k|   size_t current_label_length = 0;
   62|       |
   63|       |   // Tracks if the name consists only of digits and dots
   64|  6.48k|   bool all_numeric = true;
   65|       |
   66|  64.8k|   for(size_t i = 0; i != name.size(); ++i) {
  ------------------
  |  Branch (66:22): [True: 58.3k, False: 6.48k]
  ------------------
   67|  58.3k|      const char c = name[i];
   68|       |
   69|  58.3k|      if(c == '.') {
  ------------------
  |  Branch (69:10): [True: 0, False: 58.3k]
  ------------------
   70|       |         // Sequential dot (.) characters are not allowed
   71|      0|         if(i > 0 && name[i - 1] == '.') {
  ------------------
  |  Branch (71:13): [True: 0, False: 0]
  |  Branch (71:22): [True: 0, False: 0]
  ------------------
   72|      0|            return {};
   73|      0|         }
   74|       |
   75|       |         // Empty labels are not allowed
   76|      0|         if(current_label_length == 0) {
  ------------------
  |  Branch (76:13): [True: 0, False: 0]
  ------------------
   77|      0|            return {};
   78|      0|         }
   79|      0|         current_label_length = 0;  // Reset for next label
   80|  58.3k|      } else {
   81|  58.3k|         current_label_length++;
   82|       |
   83|       |         // Labels cannot exceed maximum DNS label length
   84|  58.3k|         if(current_label_length > 63) {
  ------------------
  |  Branch (84:13): [True: 0, False: 58.3k]
  ------------------
   85|      0|            return {};
   86|      0|         }
   87|  58.3k|      }
   88|       |
   89|  58.3k|      const uint8_t cu = static_cast<uint8_t>(c);
   90|       |      // DNS names are not allowed to include any high-bit set characters
   91|  58.3k|      if(cu >= 128) {
  ------------------
  |  Branch (91:10): [True: 0, False: 58.3k]
  ------------------
   92|      0|         return {};
   93|      0|      }
   94|  58.3k|      const uint8_t mapped = DNS_CHAR_MAPPING[cu];
   95|       |      // DNS names are from a restricted character set
   96|  58.3k|      if(mapped == 0) {
  ------------------
  |  Branch (96:10): [True: 0, False: 58.3k]
  ------------------
   97|      0|         return {};
   98|      0|      }
   99|       |
  100|  58.3k|      if(mapped != '.' && (mapped < '0' || mapped > '9')) {
  ------------------
  |  Branch (100:10): [True: 58.3k, False: 0]
  |  Branch (100:28): [True: 0, False: 58.3k]
  |  Branch (100:44): [True: 58.3k, False: 0]
  ------------------
  101|  58.3k|         all_numeric = false;
  102|  58.3k|      }
  103|       |
  104|  58.3k|      if(mapped == '-') {
  ------------------
  |  Branch (104:10): [True: 0, False: 58.3k]
  ------------------
  105|       |         // DNS labels are not allowed to include a leading or trailing hyphen
  106|      0|         if(i == 0 || (i > 0 && name[i - 1] == '.')) {
  ------------------
  |  Branch (106:13): [True: 0, False: 0]
  |  Branch (106:24): [True: 0, False: 0]
  |  Branch (106:33): [True: 0, False: 0]
  ------------------
  107|      0|            return {};  // leading hyphen
  108|      0|         }
  109|       |
  110|      0|         if(i == name.size() - 1 || (i < name.size() - 1 && name[i + 1] == '.')) {
  ------------------
  |  Branch (110:13): [True: 0, False: 0]
  |  Branch (110:38): [True: 0, False: 0]
  |  Branch (110:61): [True: 0, False: 0]
  ------------------
  111|      0|            return {};  // trailing hyphen
  112|      0|         }
  113|      0|      }
  114|  58.3k|      canon.push_back(static_cast<char>(mapped));
  115|  58.3k|   }
  116|       |
  117|       |   // This should never be hit, due to earlier validation steps
  118|  6.48k|   if(current_label_length == 0) {
  ------------------
  |  Branch (118:7): [True: 0, False: 6.48k]
  ------------------
  119|      0|      return {};
  120|      0|   }
  121|       |
  122|       |   // An entirely numeric name ("1.2.3.4") is either a misplaced IP address
  123|       |   // or an attempt at confusing some other system; reject outright
  124|  6.48k|   if(all_numeric) {
  ------------------
  |  Branch (124:7): [True: 0, False: 6.48k]
  ------------------
  125|      0|      return {};
  126|      0|   }
  127|       |
  128|  6.48k|   return canon;
  129|  6.48k|}

_ZN5Botan9ExceptionC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   71|  4.99k|Exception::Exception(std::string_view msg) : m_msg(msg) {}
_ZN5Botan9ExceptionC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEERKSt9exception:
   73|    445|Exception::Exception(std::string_view msg, const std::exception& e) : m_msg(fmt("{} failed with {}", msg, e.what())) {}
_ZN5Botan9ExceptionC2EPKcNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   75|    247|Exception::Exception(const char* prefix, std::string_view msg) : m_msg(fmt("{} {}", prefix, msg)) {}
_ZN5Botan16Invalid_ArgumentC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   77|      6|Invalid_Argument::Invalid_Argument(std::string_view msg) : Exception(msg) {}
_ZN5Botan14Internal_ErrorC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   99|     70|Internal_Error::Internal_Error(std::string_view err) : Exception("Internal error:", err) {}
_ZN5Botan14Decoding_ErrorC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  125|  2.46k|Decoding_Error::Decoding_Error(std::string_view name) : Exception(name) {}
_ZN5Botan14Decoding_ErrorC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEERKSt9exception:
  130|    445|Decoding_Error::Decoding_Error(std::string_view msg, const std::exception& e) : Exception(msg, e) {}
_ZN5Botan26Invalid_Authentication_TagC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  133|    176|      Exception("Invalid authentication tag:", msg) {}
_ZN5Botan15Stream_IO_ErrorC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  135|      1|Stream_IO_Error::Stream_IO_Error(std::string_view err) : Exception("I/O error:", err) {}

_ZN5Botan5GHASH14ghash_multiplyENSt3__14spanIhLm16EEENS2_IKhLm18446744073709551615EEEm:
   44|    408|void GHASH::ghash_multiply(std::span<uint8_t, GCM_BS> x, std::span<const uint8_t> input, size_t blocks) {
   45|    408|   BOTAN_ASSERT_NOMSG(input.size() % GCM_BS == 0);
  ------------------
  |  |   84|    408|   do {                                                                     \
  |  |   85|    408|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    408|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 408]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    408|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 408]
  |  |  ------------------
  ------------------
   46|       |
   47|    408|#if defined(BOTAN_HAS_GHASH_AVX512_CLMUL)
   48|    408|   if(CPUID::has(CPUID::Feature::AVX512_CLMUL)) {
  ------------------
  |  Branch (48:7): [True: 0, False: 408]
  ------------------
   49|      0|      BOTAN_ASSERT_NOMSG(!m_H_pow.empty());
  ------------------
  |  |   84|      0|   do {                                                                     \
  |  |   85|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|      0|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
   50|      0|      return ghash_multiply_avx512_clmul(x.data(), m_H_pow.data(), input.data(), blocks);
   51|      0|   }
   52|    408|#endif
   53|       |
   54|    408|#if defined(BOTAN_HAS_GHASH_CLMUL_CPU)
   55|    408|   if(CPUID::has(CPUID::Feature::HW_CLMUL)) {
  ------------------
  |  Branch (55:7): [True: 408, False: 0]
  ------------------
   56|    408|      BOTAN_ASSERT_NOMSG(!m_H_pow.empty());
  ------------------
  |  |   84|    408|   do {                                                                     \
  |  |   85|    408|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    408|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 408]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    408|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 408]
  |  |  ------------------
  ------------------
   57|    408|      return ghash_multiply_cpu(x.data(), m_H_pow, input.data(), blocks);
   58|    408|   }
   59|      0|#endif
   60|       |
   61|      0|#if defined(BOTAN_HAS_GHASH_CLMUL_VPERM)
   62|      0|   if(CPUID::has(CPUID::Feature::SIMD_2X64)) {
  ------------------
  |  Branch (62:7): [True: 0, False: 0]
  ------------------
   63|      0|      return ghash_multiply_vperm(x.data(), m_HM.data(), input.data(), blocks);
   64|      0|   }
   65|      0|#endif
   66|       |
   67|      0|   ghash_multiply_base(x, m_HM, input, blocks);
   68|      0|}
_ZNK5Botan5GHASH19has_keying_materialEv:
  107|    341|bool GHASH::has_keying_material() const {
  108|    341|   return !m_HM.empty() || !m_H_pow.empty();
  ------------------
  |  Branch (108:11): [True: 0, False: 341]
  |  Branch (108:28): [True: 341, False: 0]
  ------------------
  109|    341|}
_ZN5Botan5GHASH12key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
  111|    134|void GHASH::key_schedule(std::span<const uint8_t> key) {
  112|    134|   m_H_ad = {0};
  113|    134|   m_ad_len = 0;
  114|    134|   m_text_len = 0;
  115|       |
  116|    134|   BOTAN_ASSERT_NOMSG(key.size() == GCM_BS);
  ------------------
  |  |   84|    134|   do {                                                                     \
  |  |   85|    134|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    134|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 134]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    134|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 134]
  |  |  ------------------
  ------------------
  117|       |
  118|    134|#if defined(BOTAN_HAS_GHASH_AVX512_CLMUL)
  119|    134|   if(CPUID::has(CPUID::Feature::AVX512_CLMUL)) {
  ------------------
  |  Branch (119:7): [True: 0, False: 134]
  ------------------
  120|      0|      zap(m_HM);
  121|      0|      if(m_H_pow.size() != 32) {
  ------------------
  |  Branch (121:10): [True: 0, False: 0]
  ------------------
  122|      0|         m_H_pow.resize(32);
  123|      0|      }
  124|      0|      ghash_precompute_avx512_clmul(key.data(), m_H_pow.data());
  125|       |      // m_HM left empty
  126|      0|      return;
  127|      0|   }
  128|    134|#endif
  129|       |
  130|    134|#if defined(BOTAN_HAS_GHASH_CLMUL_CPU)
  131|    134|   if(CPUID::has(CPUID::Feature::HW_CLMUL)) {
  ------------------
  |  Branch (131:7): [True: 134, False: 0]
  ------------------
  132|    134|      zap(m_HM);
  133|    134|      ghash_precompute_cpu(key.data(), m_H_pow);
  134|       |      // m_HM left empty
  135|    134|      return;
  136|    134|   }
  137|      0|#endif
  138|       |
  139|      0|   ghash_precompute_base(key.first<GCM_BS>(), m_HM);
  140|      0|}
_ZN5Botan5GHASH5startENSt3__14spanIKhLm18446744073709551615EEE:
  169|    114|void GHASH::start(std::span<const uint8_t> nonce) {
  170|    114|   BOTAN_ARG_CHECK(nonce.size() == 16, "GHASH requires a 128-bit nonce");
  ------------------
  |  |   35|    114|   do {                                                          \
  |  |   36|    114|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    114|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 114]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    114|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 114]
  |  |  ------------------
  ------------------
  171|    114|   auto& n = m_nonce.emplace();
  172|    114|   copy_mem(n, nonce);
  173|    114|   copy_mem(m_ghash, m_H_ad);
  174|    114|   m_buffer.clear();
  175|    114|   m_text_len = 0;
  176|    114|}
_ZN5Botan5GHASH19set_associated_dataENSt3__14spanIKhLm18446744073709551615EEE:
  178|    114|void GHASH::set_associated_data(std::span<const uint8_t> input) {
  179|    114|   BOTAN_STATE_CHECK(!m_nonce);
  ------------------
  |  |   51|    114|   do {                                                         \
  |  |   52|    114|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    114|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 114]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    114|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 114]
  |  |  ------------------
  ------------------
  180|       |
  181|    114|   assert_key_material_set();
  182|    114|   m_H_ad = {0};
  183|    114|   ghash_update(m_H_ad, input);
  184|    114|   ghash_zeropad(m_H_ad);
  185|    114|   m_ad_len = input.size();
  186|    114|}
_ZN5Botan5GHASH6updateENSt3__14spanIKhLm18446744073709551615EEE:
  202|    113|void GHASH::update(std::span<const uint8_t> input) {
  203|    113|   assert_key_material_set();
  204|    113|   BOTAN_STATE_CHECK(m_nonce);
  ------------------
  |  |   51|    113|   do {                                                         \
  |  |   52|    113|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    113|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 113]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    113|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 113]
  |  |  ------------------
  ------------------
  205|    113|   ghash_update(m_ghash, input);
  206|    113|   m_text_len += input.size();
  207|       |
  208|       |   // NIST SP 800-38D limits plaintext/ciphertext to 2^39 - 256 bits
  209|    113|   constexpr uint64_t GHASH_MAX_BYTES = (((static_cast<uint64_t>(1) << 39)) - 256) / 8;
  210|    113|   if(m_text_len > GHASH_MAX_BYTES) {
  ------------------
  |  Branch (210:7): [True: 0, False: 113]
  ------------------
  211|      0|      throw Invalid_State("GCM message length limit exceeded");
  212|      0|   }
  213|    113|}
_ZN5Botan5GHASH5finalENSt3__14spanIhLm18446744073709551615EEE:
  215|    114|void GHASH::final(std::span<uint8_t> mac) {
  216|    114|   BOTAN_ARG_CHECK(!mac.empty() && mac.size() <= GCM_BS, "GHASH output length");
  ------------------
  |  |   35|    114|   do {                                                          \
  |  |   36|    114|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    228|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 114, False: 0]
  |  |  |  Branch (37:12): [True: 114, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    114|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 114]
  |  |  ------------------
  ------------------
  217|    114|   BOTAN_STATE_CHECK(m_nonce);
  ------------------
  |  |   51|    114|   do {                                                         \
  |  |   52|    114|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    114|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 114]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    114|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 114]
  |  |  ------------------
  ------------------
  218|    114|   assert_key_material_set();
  219|       |
  220|    114|   ghash_zeropad(m_ghash);
  221|    114|   ghash_final_block(m_ghash, m_ad_len, m_text_len);
  222|       |
  223|    114|   xor_buf(mac, std::span{m_ghash}.first(mac.size()), std::span{*m_nonce}.first(mac.size()));
  224|       |
  225|    114|   secure_scrub_memory(m_ghash);
  226|    114|   m_text_len = 0;
  227|    114|   m_nonce.reset();
  228|    114|}
_ZN5Botan5GHASH11reset_stateEv:
  247|    134|void GHASH::reset_state() {
  248|    134|   secure_scrub_memory(m_ghash);
  249|    134|   if(m_nonce) {
  ------------------
  |  Branch (249:7): [True: 0, False: 134]
  ------------------
  250|      0|      secure_scrub_memory(m_nonce.value());
  251|      0|      m_nonce.reset();
  252|      0|   }
  253|    134|   m_buffer.clear();
  254|    134|   m_text_len = 0;
  255|    134|}
_ZN5Botan5GHASH12ghash_updateENSt3__14spanIhLm16EEENS2_IKhLm18446744073709551615EEE:
  257|    227|void GHASH::ghash_update(std::span<uint8_t, GCM_BS> x, std::span<const uint8_t> input) {
  258|    227|   BufferSlicer in(input);
  259|    521|   while(!in.empty()) {
  ------------------
  |  Branch (259:10): [True: 294, False: 227]
  ------------------
  260|    294|      if(const auto one_block = m_buffer.handle_unaligned_data(in)) {
  ------------------
  |  Branch (260:21): [True: 0, False: 294]
  ------------------
  261|      0|         ghash_multiply(x, one_block.value(), 1);
  262|      0|      }
  263|       |
  264|    294|      if(m_buffer.in_alignment()) {
  ------------------
  |  Branch (264:10): [True: 93, False: 201]
  ------------------
  265|     93|         const auto [aligned_data, full_blocks] = m_buffer.aligned_data_to_process(in);
  266|     93|         if(full_blocks > 0) {
  ------------------
  |  Branch (266:13): [True: 93, False: 0]
  ------------------
  267|     93|            ghash_multiply(x, aligned_data, full_blocks);
  268|     93|         }
  269|     93|      }
  270|    294|   }
  271|    227|   BOTAN_ASSERT_NOMSG(in.empty());
  ------------------
  |  |   84|    227|   do {                                                                     \
  |  |   85|    227|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    227|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 227]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    227|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 227]
  |  |  ------------------
  ------------------
  272|    227|}
_ZN5Botan5GHASH13ghash_zeropadENSt3__14spanIhLm16EEE:
  274|    228|void GHASH::ghash_zeropad(std::span<uint8_t, GCM_BS> x) {
  275|    228|   if(!m_buffer.in_alignment()) {
  ------------------
  |  Branch (275:7): [True: 201, False: 27]
  ------------------
  276|    201|      m_buffer.fill_up_with_zeros();
  277|    201|      ghash_multiply(x, m_buffer.consume(), 1);
  278|    201|   }
  279|    228|}
_ZN5Botan5GHASH17ghash_final_blockENSt3__14spanIhLm16EEEmm:
  281|    114|void GHASH::ghash_final_block(std::span<uint8_t, GCM_BS> x, uint64_t ad_len, uint64_t text_len) {
  282|    114|   BOTAN_STATE_CHECK(m_buffer.in_alignment());
  ------------------
  |  |   51|    114|   do {                                                         \
  |  |   52|    114|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    114|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 114]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    114|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 114]
  |  |  ------------------
  ------------------
  283|    114|   const auto final_block = store_be(8 * ad_len, 8 * text_len);
  284|    114|   ghash_multiply(x, final_block, 1);
  285|    114|}

_ZN5Botan5GHASH20ghash_precompute_cpuEPKhRNSt3__16vectorImNS_16secure_allocatorImEEEE:
  175|    134|void BOTAN_FN_ISA_CLMUL GHASH::ghash_precompute_cpu(const uint8_t H_bytes[16], secure_vector<uint64_t>& H_pow) {
  176|    134|   precompute_clmul(mulx_polyval(reverse_vector(SIMD_4x32::load_le(H_bytes))), H_pow);
  177|    134|}
_ZN5Botan5GHASH18ghash_multiply_cpuEPhRNSt3__16vectorImNS_16secure_allocatorImEEEEPKhm:
  182|    408|                                                  size_t blocks) {
  183|    408|   multiply_clmul<true>(x, H_pow, input, blocks);
  184|    408|}
ghash_cpu.cpp:_ZN5Botan12_GLOBAL__N_116precompute_clmulERKNS_9SIMD_4x32ERNSt3__16vectorImNS_16secure_allocatorImEEEE:
   83|    134|void BOTAN_FN_ISA_CLMUL precompute_clmul(const SIMD_4x32& H1, secure_vector<uint64_t>& H_pow) {
   84|    134|   const SIMD_4x32 H2 = polyval_multiply(H1, H1);
   85|    134|   const SIMD_4x32 H3 = polyval_multiply(H1, H2);
   86|    134|   const SIMD_4x32 H4 = polyval_multiply(H2, H2);
   87|       |
   88|    134|   H_pow.reserve(2 * 8);
   89|    134|   H_pow.resize(2 * 4);
   90|    134|   H1.store_le(&H_pow[0]);  // NOLINT(*-container-data-pointer)
   91|    134|   H2.store_le(&H_pow[2]);
   92|    134|   H3.store_le(&H_pow[4]);
   93|    134|   H4.store_le(&H_pow[6]);
   94|    134|}
ghash_cpu.cpp:_ZN5Botan12_GLOBAL__N_114multiply_clmulILb1EEEvPhRNSt3__16vectorImNS_16secure_allocatorImEEEEPKhm:
   98|    408|multiply_clmul(uint8_t x[16], secure_vector<uint64_t>& H_pow, const uint8_t input[], size_t blocks) {
   99|    408|   BOTAN_ASSERT_NOMSG(H_pow.size() == 2 * 4 || H_pow.size() == 2 * 8);
  ------------------
  |  |   84|    408|   do {                                                                     \
  |  |   85|    408|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    523|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:12): [True: 293, False: 115]
  |  |  |  Branch (86:12): [True: 115, False: 0]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    408|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 408]
  |  |  ------------------
  ------------------
  100|       |
  101|    408|   const SIMD_4x32 H1 = SIMD_4x32::load_le(&H_pow[0]);  // NOLINT(*-container-data-pointer)
  102|       |
  103|    408|   SIMD_4x32 a = load_block<BSWAP>(x);
  104|       |
  105|    408|   if(blocks >= 8) {
  ------------------
  |  Branch (105:7): [True: 61, False: 347]
  ------------------
  106|     61|      const SIMD_4x32 H2 = SIMD_4x32::load_le(&H_pow[2]);
  107|     61|      const SIMD_4x32 H3 = SIMD_4x32::load_le(&H_pow[4]);
  108|     61|      const SIMD_4x32 H4 = SIMD_4x32::load_le(&H_pow[6]);
  109|       |
  110|     61|      if(H_pow.size() < 2 * 8) {
  ------------------
  |  Branch (110:10): [True: 61, False: 0]
  ------------------
  111|     61|         H_pow.resize(2 * 8);
  112|     61|         const SIMD_4x32 H5 = polyval_multiply(H4, H1);
  113|     61|         const SIMD_4x32 H6 = polyval_multiply(H4, H2);
  114|     61|         const SIMD_4x32 H7 = polyval_multiply(H4, H3);
  115|     61|         const SIMD_4x32 H8 = polyval_multiply(H4, H4);
  116|     61|         H5.store_le(&H_pow[8]);
  117|     61|         H6.store_le(&H_pow[10]);
  118|     61|         H7.store_le(&H_pow[12]);
  119|     61|         H8.store_le(&H_pow[14]);
  120|     61|      }
  121|       |
  122|     61|      const SIMD_4x32 H5 = SIMD_4x32::load_le(&H_pow[8]);
  123|     61|      const SIMD_4x32 H6 = SIMD_4x32::load_le(&H_pow[10]);
  124|     61|      const SIMD_4x32 H7 = SIMD_4x32::load_le(&H_pow[12]);
  125|     61|      const SIMD_4x32 H8 = SIMD_4x32::load_le(&H_pow[14]);
  126|       |
  127|    833|      while(blocks >= 8) {
  ------------------
  |  Branch (127:13): [True: 772, False: 61]
  ------------------
  128|    772|         const SIMD_4x32 m0 = load_block<BSWAP>(input);
  129|    772|         const SIMD_4x32 m1 = load_block<BSWAP>(input + 16 * 1);
  130|    772|         const SIMD_4x32 m2 = load_block<BSWAP>(input + 16 * 2);
  131|    772|         const SIMD_4x32 m3 = load_block<BSWAP>(input + 16 * 3);
  132|    772|         const SIMD_4x32 m4 = load_block<BSWAP>(input + 16 * 4);
  133|    772|         const SIMD_4x32 m5 = load_block<BSWAP>(input + 16 * 5);
  134|    772|         const SIMD_4x32 m6 = load_block<BSWAP>(input + 16 * 6);
  135|    772|         const SIMD_4x32 m7 = load_block<BSWAP>(input + 16 * 7);
  136|       |
  137|    772|         a = polyval_multiply_x8(H1, H2, H3, H4, H5, H6, H7, H8, m7, m6, m5, m4, m3, m2, m1, m0 ^ a);
  138|       |
  139|    772|         input += 8 * 16;
  140|    772|         blocks -= 8;
  141|    772|      }
  142|     61|   }
  143|       |
  144|    408|   if(blocks >= 4) {
  ------------------
  |  Branch (144:7): [True: 50, False: 358]
  ------------------
  145|     50|      const SIMD_4x32 H2 = SIMD_4x32::load_le(&H_pow[2]);
  146|     50|      const SIMD_4x32 H3 = SIMD_4x32::load_le(&H_pow[4]);
  147|     50|      const SIMD_4x32 H4 = SIMD_4x32::load_le(&H_pow[6]);
  148|       |
  149|    100|      while(blocks >= 4) {
  ------------------
  |  Branch (149:13): [True: 50, False: 50]
  ------------------
  150|     50|         const SIMD_4x32 m0 = load_block<BSWAP>(input);
  151|     50|         const SIMD_4x32 m1 = load_block<BSWAP>(input + 16 * 1);
  152|     50|         const SIMD_4x32 m2 = load_block<BSWAP>(input + 16 * 2);
  153|     50|         const SIMD_4x32 m3 = load_block<BSWAP>(input + 16 * 3);
  154|       |
  155|     50|         a ^= m0;
  156|     50|         a = polyval_multiply_x4(H1, H2, H3, H4, m3, m2, m1, a);
  157|       |
  158|     50|         input += 4 * 16;
  159|     50|         blocks -= 4;
  160|     50|      }
  161|     50|   }
  162|       |
  163|    882|   for(size_t i = 0; i != blocks; ++i) {
  ------------------
  |  Branch (163:22): [True: 474, False: 408]
  ------------------
  164|    474|      const SIMD_4x32 m = load_block<BSWAP>(input + 16 * i);
  165|       |
  166|    474|      a ^= m;
  167|    474|      a = polyval_multiply(H1, a);
  168|    474|   }
  169|       |
  170|    408|   store_block<BSWAP>(a, x);
  171|    408|}
ghash_cpu.cpp:_ZN5Botan12_GLOBAL__N_119polyval_multiply_x8ERKNS_9SIMD_4x32ES3_S3_S3_S3_S3_S3_S3_S3_S3_S3_S3_S3_S3_S3_S3_:
   60|    772|                                                        const SIMD_4x32& X8) {
   61|    772|   const SIMD_4x32 lo = clmul<0x00>(H1, X1) ^ clmul<0x00>(H2, X2) ^ clmul<0x00>(H3, X3) ^ clmul<0x00>(H4, X4) ^
   62|    772|                        clmul<0x00>(H5, X5) ^ clmul<0x00>(H6, X6) ^ clmul<0x00>(H7, X7) ^ clmul<0x00>(H8, X8);
   63|       |
   64|    772|   const SIMD_4x32 hi = clmul<0x11>(H1, X1) ^ clmul<0x11>(H2, X2) ^ clmul<0x11>(H3, X3) ^ clmul<0x11>(H4, X4) ^
   65|    772|                        clmul<0x11>(H5, X5) ^ clmul<0x11>(H6, X6) ^ clmul<0x11>(H7, X7) ^ clmul<0x11>(H8, X8);
   66|       |
   67|    772|   SIMD_4x32 mid;
   68|       |
   69|    772|   mid ^= clmul<0x00>(H1 ^ H1.shift_elems_right<2>(), X1 ^ X1.shift_elems_right<2>());
   70|    772|   mid ^= clmul<0x00>(H2 ^ H2.shift_elems_right<2>(), X2 ^ X2.shift_elems_right<2>());
   71|    772|   mid ^= clmul<0x00>(H3 ^ H3.shift_elems_right<2>(), X3 ^ X3.shift_elems_right<2>());
   72|    772|   mid ^= clmul<0x00>(H4 ^ H4.shift_elems_right<2>(), X4 ^ X4.shift_elems_right<2>());
   73|    772|   mid ^= clmul<0x00>(H5 ^ H5.shift_elems_right<2>(), X5 ^ X5.shift_elems_right<2>());
   74|    772|   mid ^= clmul<0x00>(H6 ^ H6.shift_elems_right<2>(), X6 ^ X6.shift_elems_right<2>());
   75|    772|   mid ^= clmul<0x00>(H7 ^ H7.shift_elems_right<2>(), X7 ^ X7.shift_elems_right<2>());
   76|    772|   mid ^= clmul<0x00>(H8 ^ H8.shift_elems_right<2>(), X8 ^ X8.shift_elems_right<2>());
   77|    772|   mid ^= lo;
   78|    772|   mid ^= hi;
   79|       |
   80|    772|   return polyval_reduce(hi ^ mid.shift_elems_right<2>(), lo ^ mid.shift_elems_left<2>());
   81|    772|}
ghash_cpu.cpp:_ZN5Botan12_GLOBAL__N_119polyval_multiply_x4ERKNS_9SIMD_4x32ES3_S3_S3_S3_S3_S3_S3_:
   29|     50|                                                        const SIMD_4x32& X4) {
   30|     50|   const SIMD_4x32 lo = (clmul<0x00>(H1, X1) ^ clmul<0x00>(H2, X2)) ^ (clmul<0x00>(H3, X3) ^ clmul<0x00>(H4, X4));
   31|     50|   const SIMD_4x32 hi = (clmul<0x11>(H1, X1) ^ clmul<0x11>(H2, X2)) ^ (clmul<0x11>(H3, X3) ^ clmul<0x11>(H4, X4));
   32|       |
   33|     50|   SIMD_4x32 mid;
   34|       |
   35|     50|   mid ^= clmul<0x00>(H1 ^ H1.shift_elems_right<2>(), X1 ^ X1.shift_elems_right<2>());
   36|     50|   mid ^= clmul<0x00>(H2 ^ H2.shift_elems_right<2>(), X2 ^ X2.shift_elems_right<2>());
   37|     50|   mid ^= clmul<0x00>(H3 ^ H3.shift_elems_right<2>(), X3 ^ X3.shift_elems_right<2>());
   38|     50|   mid ^= clmul<0x00>(H4 ^ H4.shift_elems_right<2>(), X4 ^ X4.shift_elems_right<2>());
   39|     50|   mid ^= lo;
   40|     50|   mid ^= hi;
   41|       |
   42|     50|   return polyval_reduce(hi ^ mid.shift_elems_right<2>(), lo ^ mid.shift_elems_left<2>());
   43|     50|}

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

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

_ZN5Botan9parse_u32ENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEEb:
   63|  77.9k|std::optional<uint32_t> parse_u32(std::string_view input, bool require_canonical) {
   64|  77.9k|   return parse_decimal_integer<uint32_t>(input, require_canonical);
   65|  77.9k|}
_ZN5Botan9to_u32bitENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
   75|  77.9k|uint32_t to_u32bit(std::string_view input) {
   76|  77.9k|   if(const auto parsed = parse_u32(input)) {
  ------------------
  |  Branch (76:18): [True: 77.9k, False: 0]
  ------------------
   77|  77.9k|      return *parsed;
   78|  77.9k|   } else {
   79|      0|      throw Invalid_Argument(fmt("Failed to parse input '{}' as a 32-bit integer", input));
   80|      0|   }
   81|  77.9k|}
_ZN5Botan20parse_algorithm_nameENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
   86|    249|std::vector<std::string> parse_algorithm_name(std::string_view scan_name) {
   87|    249|   if(scan_name.find('(') == std::string::npos && scan_name.find(')') == std::string::npos) {
  ------------------
  |  Branch (87:7): [True: 145, False: 104]
  |  Branch (87:51): [True: 145, False: 0]
  ------------------
   88|    145|      return {std::string(scan_name)};
   89|    145|   }
   90|       |
   91|    104|   std::string name(scan_name);
   92|    104|   std::string substring;
   93|    104|   std::vector<std::string> elems;
   94|    104|   size_t level = 0;
   95|       |
   96|    104|   elems.push_back(name.substr(0, name.find('(')));
   97|    104|   name = name.substr(name.find('('));
   98|       |
   99|    381|   for(auto i = name.begin(); i != name.end(); ++i) {
  ------------------
  |  Branch (99:31): [True: 381, False: 0]
  ------------------
  100|    381|      const char c = *i;
  101|       |
  102|    381|      if(c == '(') {
  ------------------
  |  Branch (102:10): [True: 104, False: 277]
  ------------------
  103|    104|         ++level;
  104|    104|      }
  105|    381|      if(c == ')') {
  ------------------
  |  Branch (105:10): [True: 104, False: 277]
  ------------------
  106|    104|         if(level == 1 && i == name.end() - 1) {
  ------------------
  |  Branch (106:13): [True: 104, False: 0]
  |  Branch (106:13): [True: 104, False: 0]
  |  Branch (106:27): [True: 104, False: 0]
  ------------------
  107|    104|            if(elems.size() == 1) {
  ------------------
  |  Branch (107:16): [True: 104, False: 0]
  ------------------
  108|    104|               elems.push_back(substring.substr(1));
  109|    104|            } else {
  110|      0|               elems.push_back(substring);
  111|      0|            }
  112|    104|            return elems;
  113|    104|         }
  114|       |
  115|      0|         if(level == 0 || (level == 1 && i != name.end() - 1)) {
  ------------------
  |  Branch (115:13): [True: 0, False: 0]
  |  Branch (115:13): [True: 0, False: 0]
  |  Branch (115:28): [True: 0, False: 0]
  |  Branch (115:42): [True: 0, False: 0]
  ------------------
  116|      0|            throw Invalid_Algorithm_Name(scan_name);
  117|      0|         }
  118|      0|         --level;
  119|      0|      }
  120|       |
  121|    277|      if(c == ',' && level == 1) {
  ------------------
  |  Branch (121:10): [True: 0, False: 277]
  |  Branch (121:22): [True: 0, False: 0]
  ------------------
  122|      0|         if(elems.size() == 1) {
  ------------------
  |  Branch (122:13): [True: 0, False: 0]
  ------------------
  123|      0|            elems.push_back(substring.substr(1));
  124|      0|         } else {
  125|      0|            elems.push_back(substring);
  126|      0|         }
  127|      0|         substring.clear();
  128|    277|      } else {
  129|    277|         substring += c;
  130|    277|      }
  131|    277|   }
  132|       |
  133|      0|   if(!substring.empty()) {
  ------------------
  |  Branch (133:7): [True: 0, False: 0]
  ------------------
  134|      0|      throw Invalid_Algorithm_Name(scan_name);
  135|      0|   }
  136|       |
  137|      0|   return elems;
  138|      0|}
_ZN5Botan8split_onENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEEc:
  140|  6.73k|std::vector<std::string> split_on(std::string_view str, char delim) {
  141|  6.73k|   std::vector<std::string> elems;
  142|  6.73k|   if(str.empty()) {
  ------------------
  |  Branch (142:7): [True: 0, False: 6.73k]
  ------------------
  143|      0|      return elems;
  144|      0|   }
  145|       |
  146|  6.73k|   std::string substr;
  147|  35.7k|   for(const char c : str) {
  ------------------
  |  Branch (147:21): [True: 35.7k, False: 6.73k]
  ------------------
  148|  35.7k|      if(c == delim) {
  ------------------
  |  Branch (148:10): [True: 249, False: 35.5k]
  ------------------
  149|    249|         if(!substr.empty()) {
  ------------------
  |  Branch (149:13): [True: 249, False: 0]
  ------------------
  150|    249|            elems.push_back(substr);
  151|    249|         }
  152|    249|         substr.clear();
  153|  35.5k|      } else {
  154|  35.5k|         substr += c;
  155|  35.5k|      }
  156|  35.7k|   }
  157|       |
  158|  6.73k|   if(substr.empty()) {
  ------------------
  |  Branch (158:7): [True: 0, False: 6.73k]
  ------------------
  159|      0|      throw Invalid_Argument(fmt("Unable to split string '{}", str));
  160|      0|   }
  161|  6.73k|   elems.push_back(substr);
  162|       |
  163|  6.73k|   return elems;
  164|  6.73k|}
parsing.cpp:_ZN5Botan12_GLOBAL__N_116digit_from_asciiEc:
   22|   155k|std::optional<size_t> digit_from_ascii(char c) {
   23|   155k|   if(c >= '0' && c <= '9') {
  ------------------
  |  Branch (23:7): [True: 155k, False: 0]
  |  Branch (23:19): [True: 155k, False: 0]
  ------------------
   24|   155k|      return c - '0';
   25|   155k|   } else {
   26|      0|      return {};
   27|      0|   }
   28|   155k|}
parsing.cpp:_ZN5Botan12_GLOBAL__N_121parse_decimal_integerITkNSt3__117unsigned_integralEjEENS2_8optionalIT_EENS2_17basic_string_viewIcNS2_11char_traitsIcEEEEb:
   31|  77.9k|std::optional<T> parse_decimal_integer(std::string_view input, bool require_canonical) {
   32|  77.9k|   if(input.empty() || input.size() > (std::numeric_limits<T>::digits10 + 1)) {
  ------------------
  |  Branch (32:7): [True: 0, False: 77.9k]
  |  Branch (32:24): [True: 0, False: 77.9k]
  ------------------
   33|      0|      return {};
   34|      0|   }
   35|       |
   36|       |   // The canonical encoding of zero is "0"; no other value starts with a zero
   37|  77.9k|   if(require_canonical && input.size() > 1 && input.front() == '0') {
  ------------------
  |  Branch (37:7): [True: 0, False: 77.9k]
  |  Branch (37:28): [True: 0, False: 0]
  |  Branch (37:48): [True: 0, False: 0]
  ------------------
   38|      0|      return {};
   39|      0|   }
   40|       |
   41|  77.9k|   T accum = 0;
   42|       |
   43|   155k|   for(const char c : input) {
  ------------------
  |  Branch (43:21): [True: 155k, False: 77.9k]
  ------------------
   44|   155k|      if(const auto digit = digit_from_ascii(c)) {
  ------------------
  |  Branch (44:21): [True: 155k, False: 0]
  ------------------
   45|   155k|         if(accum > (std::numeric_limits<T>::max() - static_cast<T>(*digit)) / 10) {
  ------------------
  |  Branch (45:13): [True: 0, False: 155k]
  ------------------
   46|      0|            return {};
   47|      0|         }
   48|   155k|         accum = accum * 10 + static_cast<T>(*digit);
   49|   155k|      } else {
   50|      0|         return {};
   51|      0|      }
   52|   155k|   }
   53|       |
   54|  77.9k|   return accum;
   55|  77.9k|}

_ZN5Botan13poly_double_nEPhPKhm:
   81|    623|void poly_double_n(uint8_t out[], const uint8_t in[], size_t n) {
   82|    623|   switch(n) {
   83|      0|      case 8:
  ------------------
  |  Branch (83:7): [True: 0, False: 623]
  ------------------
   84|      0|         return poly_double<1, MinWeightPolynomial::P64>(out, in);
   85|    623|      case 16:
  ------------------
  |  Branch (85:7): [True: 623, False: 0]
  ------------------
   86|    623|         return poly_double<2, MinWeightPolynomial::P128>(out, in);
   87|      0|      case 24:
  ------------------
  |  Branch (87:7): [True: 0, False: 623]
  ------------------
   88|      0|         return poly_double<3, MinWeightPolynomial::P192>(out, in);
   89|      0|      case 32:
  ------------------
  |  Branch (89:7): [True: 0, False: 623]
  ------------------
   90|      0|         return poly_double<4, MinWeightPolynomial::P256>(out, in);
   91|      0|      case 64:
  ------------------
  |  Branch (91:7): [True: 0, False: 623]
  ------------------
   92|      0|         return poly_double<8, MinWeightPolynomial::P512>(out, in);
   93|      0|      case 128:
  ------------------
  |  Branch (93:7): [True: 0, False: 623]
  ------------------
   94|      0|         return poly_double<16, MinWeightPolynomial::P1024>(out, in);
   95|      0|      default:
  ------------------
  |  Branch (95:7): [True: 0, False: 623]
  ------------------
   96|      0|         throw Invalid_Argument("Unsupported size for poly_double_n");
   97|    623|   }
   98|    623|}
poly_dbl.cpp:_ZN5Botan12_GLOBAL__N_111poly_doubleILm2ELNS0_19MinWeightPolynomialE135EEEvPhPKh:
   44|    623|void poly_double(uint8_t out[], const uint8_t in[]) {
   45|    623|   uint64_t W[LIMBS];
   46|    623|   load_be(W, in, LIMBS);
   47|       |
   48|    623|   const uint64_t carry = return_carry<P>(W[0]);
   49|       |
   50|    623|   if constexpr(LIMBS > 0) {
   51|  1.24k|      for(size_t i = 0; i != LIMBS - 1; ++i) {
  ------------------
  |  Branch (51:25): [True: 623, False: 623]
  ------------------
   52|    623|         W[i] = (W[i] << 1) ^ (W[i + 1] >> 63);
   53|    623|      }
   54|    623|   }
   55|       |
   56|    623|   W[LIMBS - 1] = (W[LIMBS - 1] << 1) ^ carry;
   57|       |
   58|    623|   copy_out_be(std::span(out, LIMBS * 8), W);
   59|    623|}
poly_dbl.cpp:_ZN5Botan12_GLOBAL__N_112return_carryILNS0_19MinWeightPolynomialE135EEEmm:
   39|    623|inline uint64_t return_carry(uint64_t c) {
   40|    623|   return CT::Mask<uint64_t>::expand_top_bit(c).if_set_return(static_cast<uint64_t>(P));
   41|    623|}

_ZN5Botan18prefetch_array_rawEmPKv:
   14|    113|uint64_t prefetch_array_raw(size_t bytes, const void* arrayv) noexcept {
   15|    113|#if defined(__cpp_lib_hardware_interference_size)
   16|    113|   constexpr size_t cache_line_size = std::hardware_destructive_interference_size;
   17|       |#else
   18|       |   // We arbitrarily use a 64 byte cache line, which is by far the most
   19|       |   // common size.
   20|       |   //
   21|       |   // Runtime detection adds too much overhead to this function.
   22|       |   constexpr size_t cache_line_size = 64;
   23|       |#endif
   24|       |
   25|    113|   const uint8_t* array = static_cast<const uint8_t*>(arrayv);
   26|       |
   27|    113|   volatile uint64_t combiner = 1;
   28|       |
   29|    565|   for(size_t idx = 0; idx < bytes; idx += cache_line_size) {
  ------------------
  |  Branch (29:24): [True: 452, False: 113]
  ------------------
   30|    452|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_prefetch)
   31|       |      // we have no way of knowing if the compiler will emit anything here
   32|    452|      __builtin_prefetch(&array[idx]);
   33|    452|#endif
   34|       |
   35|    452|      combiner = combiner | array[idx];
   36|    452|   }
   37|       |
   38|       |   /*
   39|       |   * The combiner variable is initialized with 1, and we accumulate using OR, so
   40|       |   * now combiner must be a value other than zero. This being the case we will
   41|       |   * always return zero here. Hopefully the compiler will not figure this out.
   42|       |   */
   43|    113|   return ct_is_zero(combiner);
   44|    113|}

_ZN5Botan9SCAN_NameC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   61|  3.71k|SCAN_Name::SCAN_Name(std::string_view algo_spec) : m_orig_algo_spec(algo_spec) {
   62|  3.71k|   if(algo_spec.empty()) {
  ------------------
  |  Branch (62:7): [True: 0, False: 3.71k]
  ------------------
   63|      0|      throw Invalid_Argument("Expected algorithm name, got empty string");
   64|      0|   }
   65|       |
   66|       |   // Fast path for a bare name with no arguments or modes (eg "SHA-256"),
   67|       |   // which is the common case. Equivalent to the general parse below, which
   68|       |   // for such input produces a single token and no args/modes.
   69|  3.71k|   if(algo_spec.find_first_of("(),/") == std::string_view::npos) {
  ------------------
  |  Branch (69:7): [True: 0, False: 3.71k]
  ------------------
   70|      0|      m_alg_name = std::string(algo_spec);
   71|      0|      return;
   72|      0|   }
   73|       |
   74|  3.71k|   std::vector<std::pair<size_t, std::string>> name;
   75|  3.71k|   size_t level = 0;
   76|  3.71k|   std::pair<size_t, std::string> accum = std::make_pair(level, "");
   77|       |
   78|  3.71k|   bool expect_token = true;
   79|       |
   80|  58.1k|   for(const char c : algo_spec) {
  ------------------
  |  Branch (80:21): [True: 58.1k, False: 3.71k]
  ------------------
   81|  58.1k|      if(c == '/' || c == ',' || c == '(' || c == ')') {
  ------------------
  |  Branch (81:10): [True: 0, False: 58.1k]
  |  Branch (81:22): [True: 104, False: 58.0k]
  |  Branch (81:34): [True: 3.71k, False: 54.3k]
  |  Branch (81:46): [True: 3.71k, False: 50.5k]
  ------------------
   82|  7.54k|         if(c == '(') {
  ------------------
  |  Branch (82:13): [True: 3.71k, False: 3.82k]
  ------------------
   83|  3.71k|            ++level;
   84|  3.82k|         } else if(c == ')') {
  ------------------
  |  Branch (84:20): [True: 3.71k, False: 104]
  ------------------
   85|  3.71k|            if(level == 0) {
  ------------------
  |  Branch (85:16): [True: 0, False: 3.71k]
  ------------------
   86|      0|               throw Invalid_Algorithm_Name(m_orig_algo_spec);
   87|      0|            }
   88|  3.71k|            --level;
   89|  3.71k|         }
   90|       |
   91|  7.54k|         if(c == '/' && level > 0) {
  ------------------
  |  Branch (91:13): [True: 0, False: 7.54k]
  |  Branch (91:25): [True: 0, False: 0]
  ------------------
   92|      0|            accum.second.push_back(c);
   93|      0|            expect_token = false;
   94|  7.54k|         } else {
   95|  7.54k|            if(expect_token) {
  ------------------
  |  Branch (95:16): [True: 0, False: 7.54k]
  ------------------
   96|      0|               throw Invalid_Algorithm_Name(m_orig_algo_spec);
   97|      0|            }
   98|  7.54k|            if(!accum.second.empty()) {
  ------------------
  |  Branch (98:16): [True: 7.54k, False: 0]
  ------------------
   99|  7.54k|               name.push_back(accum);
  100|  7.54k|            }
  101|  7.54k|            accum = std::make_pair(level, "");
  102|  7.54k|            expect_token = (c != ')');
  103|  7.54k|         }
  104|  50.5k|      } else {
  105|  50.5k|         accum.second.push_back(c);
  106|  50.5k|         expect_token = false;
  107|  50.5k|      }
  108|  58.1k|   }
  109|       |
  110|  3.71k|   if(!accum.second.empty()) {
  ------------------
  |  Branch (110:7): [True: 0, False: 3.71k]
  ------------------
  111|      0|      name.push_back(accum);
  112|      0|   }
  113|       |
  114|  3.71k|   if(level != 0) {
  ------------------
  |  Branch (114:7): [True: 0, False: 3.71k]
  ------------------
  115|      0|      throw Invalid_Algorithm_Name(m_orig_algo_spec);
  116|      0|   }
  117|       |
  118|  3.71k|   if(expect_token) {
  ------------------
  |  Branch (118:7): [True: 0, False: 3.71k]
  ------------------
  119|       |      // A trailing separator with no following token, eg "Foo/" or "Foo,"
  120|      0|      throw Invalid_Algorithm_Name(m_orig_algo_spec);
  121|      0|   }
  122|       |
  123|  3.71k|   if(name.empty()) {
  ------------------
  |  Branch (123:7): [True: 0, False: 3.71k]
  ------------------
  124|      0|      throw Invalid_Algorithm_Name(m_orig_algo_spec);
  125|      0|   }
  126|       |
  127|  3.71k|   m_alg_name = name[0].second;
  128|       |
  129|  3.71k|   bool in_modes = false;
  130|       |
  131|  7.54k|   for(size_t i = 1; i != name.size(); ++i) {
  ------------------
  |  Branch (131:22): [True: 3.82k, False: 3.71k]
  ------------------
  132|  3.82k|      if(name[i].first == 0) {
  ------------------
  |  Branch (132:10): [True: 0, False: 3.82k]
  ------------------
  133|      0|         m_mode_info.push_back(make_arg(name, i));
  134|      0|         in_modes = true;
  135|  3.82k|      } else if(name[i].first == 1 && !in_modes) {
  ------------------
  |  Branch (135:17): [True: 3.82k, False: 0]
  |  Branch (135:39): [True: 3.82k, False: 0]
  ------------------
  136|  3.82k|         m_args.push_back(make_arg(name, i));
  137|  3.82k|      }
  138|  3.82k|   }
  139|  3.71k|}
_ZNK5Botan9SCAN_Name3argEm:
  141|  3.71k|std::string SCAN_Name::arg(size_t i) const {
  142|  3.71k|   if(i >= arg_count()) {
  ------------------
  |  Branch (142:7): [True: 0, False: 3.71k]
  ------------------
  143|      0|      throw Invalid_Argument("SCAN_Name::arg " + std::to_string(i) + " out of range for '" + to_string() + "'");
  144|      0|   }
  145|  3.71k|   return m_args[i];
  146|  3.71k|}
_ZNK5Botan9SCAN_Name14arg_as_integerEmm:
  155|    296|size_t SCAN_Name::arg_as_integer(size_t i, size_t def_value) const {
  156|    296|   if(i >= arg_count()) {
  ------------------
  |  Branch (156:7): [True: 191, False: 105]
  ------------------
  157|    191|      return def_value;
  158|    191|   }
  159|    105|   return to_u32bit(m_args[i]);
  160|    296|}
scan_name.cpp:_ZN5Botan12_GLOBAL__N_18make_argERKNSt3__16vectorINS1_4pairImNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEENS7_ISA_EEEEm:
   18|  3.82k|std::string make_arg(const std::vector<std::pair<size_t, std::string>>& name, size_t start) {
   19|  3.82k|   std::string output = name[start].second;
   20|  3.82k|   size_t level = name[start].first;
   21|       |
   22|  3.82k|   size_t paren_depth = 0;
   23|       |
   24|  3.82k|   for(size_t i = start + 1; i != name.size(); ++i) {
  ------------------
  |  Branch (24:30): [True: 104, False: 3.71k]
  ------------------
   25|    104|      if(name[i].first <= name[start].first) {
  ------------------
  |  Branch (25:10): [True: 104, False: 0]
  ------------------
   26|    104|         break;
   27|    104|      }
   28|       |
   29|      0|      if(name[i].first > level) {
  ------------------
  |  Branch (29:10): [True: 0, False: 0]
  ------------------
   30|      0|         for(size_t j = level; j < name[i].first; j++) {
  ------------------
  |  Branch (30:32): [True: 0, False: 0]
  ------------------
   31|      0|            output += "(";
   32|      0|            ++paren_depth;
   33|      0|         }
   34|      0|         output += name[i].second;
   35|      0|      } else if(name[i].first < level) {
  ------------------
  |  Branch (35:17): [True: 0, False: 0]
  ------------------
   36|      0|         for(size_t j = name[i].first; j < level; j++) {
  ------------------
  |  Branch (36:40): [True: 0, False: 0]
  ------------------
   37|      0|            output += ")";
   38|      0|            BOTAN_ASSERT_NOMSG(paren_depth != 0);
  ------------------
  |  |   84|      0|   do {                                                                     \
  |  |   85|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|      0|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
   39|      0|            --paren_depth;
   40|      0|         }
   41|      0|         output += "," + name[i].second;
   42|      0|      } else {
   43|      0|         if(output[output.size() - 1] != '(') {
  ------------------
  |  Branch (43:13): [True: 0, False: 0]
  ------------------
   44|      0|            output += ",";
   45|      0|         }
   46|      0|         output += name[i].second;
   47|      0|      }
   48|       |
   49|      0|      level = name[i].first;
   50|      0|   }
   51|       |
   52|  3.82k|   for(size_t i = 0; i != paren_depth; ++i) {
  ------------------
  |  Branch (52:22): [True: 0, False: 3.82k]
  ------------------
   53|      0|      output += ")";
   54|      0|   }
   55|       |
   56|  3.82k|   return output;
   57|  3.82k|}

_ZN5Botan15AlternativeName7add_dnsENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   63|  6.48k|void AlternativeName::add_dns(std::string_view dns) {
   64|  6.48k|   if(dns.empty()) {
  ------------------
  |  Branch (64:7): [True: 0, False: 6.48k]
  ------------------
   65|      0|      return;
   66|      0|   }
   67|  6.48k|   if(auto parsed = DNSName::from_san_string(dns)) {
  ------------------
  |  Branch (67:12): [True: 6.48k, False: 0]
  ------------------
   68|  6.48k|      add_dns(std::move(*parsed));
   69|  6.48k|   } else {
   70|      0|      throw Decoding_Error("Invalid DNS name in SubjectAlternativeName");
   71|      0|   }
   72|  6.48k|}
_ZN5Botan15AlternativeName7add_dnsENS_7DNSNameE:
   74|  6.48k|void AlternativeName::add_dns(DNSName dns) {
   75|  6.48k|   m_dns.insert(std::move(dns));
   76|  6.48k|}
_ZNK5Botan15AlternativeName5countEv:
  113|  6.48k|size_t AlternativeName::count() const {
  114|  6.48k|   const auto sum = checked_add(m_dns.size(),
  115|  6.48k|                                m_uri.size(),
  116|  6.48k|                                m_email.size(),
  117|  6.48k|                                m_ipv4_addrs.size(),
  118|  6.48k|                                m_ipv6_addrs.size(),
  119|  6.48k|                                m_dn_names.size(),
  120|  6.48k|                                m_other_name_values.size(),
  121|  6.48k|                                m_registered_ids.size());
  122|       |
  123|  6.48k|   BOTAN_ASSERT_NOMSG(sum.has_value());
  ------------------
  |  |   84|  6.48k|   do {                                                                     \
  |  |   85|  6.48k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  6.48k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 6.48k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  6.48k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 6.48k]
  |  |  ------------------
  ------------------
  124|  6.48k|   return sum.value();
  125|  6.48k|}
_ZNK5Botan15AlternativeName9has_itemsEv:
  127|  6.48k|bool AlternativeName::has_items() const {
  128|  6.48k|   return this->count() > 0;
  129|  6.48k|}
_ZN5Botan15AlternativeName11decode_fromERNS_11BER_DecoderE:
  198|  6.48k|void AlternativeName::decode_from(BER_Decoder& source) {
  199|  6.48k|   BER_Decoder names = source.start_sequence();
  200|       |
  201|  12.9k|   while(names.more_items()) {
  ------------------
  |  Branch (201:10): [True: 6.48k, False: 6.48k]
  ------------------
  202|  6.48k|      const BER_Object obj = names.get_next_object();
  203|       |
  204|  6.48k|      if(obj.is_a(0, ASN1_Class::ExplicitContextSpecific)) {
  ------------------
  |  Branch (204:10): [True: 0, False: 6.48k]
  ------------------
  205|      0|         BER_Decoder othername(obj, names.limits());
  206|       |
  207|      0|         OID oid;
  208|      0|         othername.decode(oid);
  209|      0|         const BER_Object othername_value_outer = othername.get_next_object();
  210|      0|         othername.verify_end();
  211|       |
  212|      0|         if(!othername_value_outer.is_a(0, ASN1_Class::ExplicitContextSpecific)) {
  ------------------
  |  Branch (212:13): [True: 0, False: 0]
  ------------------
  213|      0|            throw Decoding_Error("Invalid tags on otherName value");
  214|      0|         }
  215|       |
  216|      0|         BER_Decoder othername_value_inner(othername_value_outer, names.limits());
  217|       |
  218|      0|         const BER_Object value = othername_value_inner.get_next_object();
  219|      0|         othername_value_inner.verify_end();
  220|       |
  221|       |         // Capture the inner ANY value verbatim so applications can retrieve
  222|       |         // it regardless of its ASN.1 form.
  223|      0|         std::vector<uint8_t> raw_value;
  224|      0|         DER_Encoder(raw_value).add_object(value.type_tag(), value.class_tag(), value.data());
  225|      0|         m_other_name_values.insert(OtherNameValue{oid, std::move(raw_value)});
  226|       |
  227|       |         // Populate old string view for compatibility
  228|      0|         if(ASN1_String::is_string_type(value.type()) && value.get_class() == ASN1_Class::Universal) {
  ------------------
  |  Branch (228:13): [True: 0, False: 0]
  |  Branch (228:58): [True: 0, False: 0]
  ------------------
  229|      0|            try {
  230|      0|               m_othernames.insert(std::make_pair(oid, ASN1_String(ASN1::to_string(value), value.type())));
  231|      0|            } catch(const Invalid_Argument&) {  // NOLINT(*-empty-catch)
  232|      0|            }
  233|      0|         }
  234|       |
  235|      0|         if(oid == OID::from_string("PKIX.SmtpUTF8Mailbox")) {
  ------------------
  |  Branch (235:13): [True: 0, False: 0]
  ------------------
  236|      0|            if(!value.is_a(ASN1_Type::Utf8String, ASN1_Class::Universal)) {
  ------------------
  |  Branch (236:16): [True: 0, False: 0]
  ------------------
  237|      0|               throw Decoding_Error("SmtpUTF8Mailbox otherName must contain a UTF8String");
  238|      0|            }
  239|      0|            auto parsed_mailbox = SmtpUtf8Mailbox::from_string(ASN1::to_string(value));
  240|      0|            if(!parsed_mailbox.has_value()) {
  ------------------
  |  Branch (240:16): [True: 0, False: 0]
  ------------------
  241|      0|               throw Decoding_Error("Invalid SmtpUTF8Mailbox encoding");
  242|      0|            }
  243|      0|            m_smtp_utf8_mailboxes.insert(std::move(*parsed_mailbox));
  244|      0|         }
  245|  6.48k|      } else if(obj.is_a(1, ASN1_Class::ContextSpecific)) {
  ------------------
  |  Branch (245:17): [True: 0, False: 6.48k]
  ------------------
  246|      0|         add_email(ASN1::to_string(obj));
  247|  6.48k|      } else if(obj.is_a(2, ASN1_Class::ContextSpecific)) {
  ------------------
  |  Branch (247:17): [True: 6.48k, False: 0]
  ------------------
  248|  6.48k|         add_dns(ASN1::to_string(obj));
  249|  6.48k|      } else if(obj.is_a(3, ASN1_Class::ContextSpecific | ASN1_Class::Constructed)) {
  ------------------
  |  Branch (249:17): [True: 0, False: 0]
  ------------------
  250|       |         // x400Address not supported but it is a SEQUENCE so we know it cannot be empty
  251|      0|         if(obj.length() == 0) {
  ------------------
  |  Branch (251:13): [True: 0, False: 0]
  ------------------
  252|      0|            throw Decoding_Error("Invalid x400Address field");
  253|      0|         }
  254|      0|      } else if(obj.is_a(4, ASN1_Class::ContextSpecific | ASN1_Class::Constructed)) {
  ------------------
  |  Branch (254:17): [True: 0, False: 0]
  ------------------
  255|      0|         BER_Decoder dec(obj, names.limits());
  256|      0|         X509_DN dn;
  257|      0|         dec.decode(dn).verify_end();
  258|      0|         this->add_dn(dn);
  259|      0|      } else if(obj.is_a(5, ASN1_Class::ContextSpecific | ASN1_Class::Constructed)) {
  ------------------
  |  Branch (259:17): [True: 0, False: 0]
  ------------------
  260|       |         // ediPartyName not supported but it is a SEQUENCE so we know it cannot be empty
  261|      0|         if(obj.length() == 0) {
  ------------------
  |  Branch (261:13): [True: 0, False: 0]
  ------------------
  262|      0|            throw Decoding_Error("Invalid ediPartyName field");
  263|      0|         }
  264|      0|      } else if(obj.is_a(6, ASN1_Class::ContextSpecific)) {
  ------------------
  |  Branch (264:17): [True: 0, False: 0]
  ------------------
  265|      0|         this->add_uri(ASN1::to_string(obj));
  266|      0|      } else if(obj.is_a(7, ASN1_Class::ContextSpecific)) {
  ------------------
  |  Branch (266:17): [True: 0, False: 0]
  ------------------
  267|      0|         if(obj.length() == 4) {
  ------------------
  |  Branch (267:13): [True: 0, False: 0]
  ------------------
  268|      0|            const uint32_t ip = load_be<uint32_t>(obj.bits(), 0);
  269|      0|            this->add_ipv4_address(ip);
  270|      0|         } else if(obj.length() == 16) {
  ------------------
  |  Branch (270:20): [True: 0, False: 0]
  ------------------
  271|      0|            const IPv6Address ip(std::span<const uint8_t, 16>{obj.bits(), 16});
  272|      0|            this->add_ipv6_address(ip);
  273|      0|         } else {
  274|      0|            throw Decoding_Error("Invalid IP constraint neither IPv4 or IPv6");
  275|      0|         }
  276|      0|      } else if(obj.is_a(8, ASN1_Class::ContextSpecific)) {
  ------------------
  |  Branch (276:17): [True: 0, False: 0]
  ------------------
  277|       |         // [8] registeredID is IMPLICIT OBJECT IDENTIFIER.
  278|      0|         OID oid;
  279|      0|         names.decode_implicit(obj, oid, ASN1_Type::ObjectId, ASN1_Class::Universal);
  280|      0|         this->add_registered_id(oid);
  281|      0|      } else {
  282|      0|         throw Decoding_Error(fmt("Unknown GeneralName tag {}/class {}",
  283|      0|                                  static_cast<uint32_t>(obj.type_tag()),
  284|      0|                                  static_cast<uint32_t>(obj.class_tag())));
  285|      0|      }
  286|  6.48k|   }
  287|  6.48k|}

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

_ZN5Botan10Extensions15create_extn_objERKNS_3OIDEbRKNSt3__16vectorIhNS4_9allocatorIhEEEENS4_8optionalINS_17Extension_ContextEEE:
  148|  25.9k|                                                                   std::optional<Extension_Context> context) {
  149|  25.9k|   auto extn = extension_from_oid(oid);
  150|       |
  151|  25.9k|   if(!extn) {
  ------------------
  |  Branch (151:7): [True: 0, False: 25.9k]
  ------------------
  152|       |      // some other unknown extension type
  153|      0|      extn = std::make_unique<Cert_Extension::Unknown_Extension>(oid, critical);
  154|  25.9k|   } else {
  155|  25.9k|      if(context.has_value() && !extn->is_appropriate_context(*context)) {
  ------------------
  |  Branch (155:10): [True: 25.9k, False: 0]
  |  Branch (155:33): [True: 0, False: 25.9k]
  ------------------
  156|      0|         throw Decoding_Error(fmt("Extension {} is not allowed in this context", extn->oid_name()));
  157|      0|      }
  158|       |
  159|  25.9k|      try {
  160|  25.9k|         extn->decode_inner(body);
  161|  25.9k|         return extn;
  162|  25.9k|      } catch(const Exception&) {
  163|       |         // OID was recognized but contents failed to decode
  164|      0|         extn = std::make_unique<Cert_Extension::Unknown_Extension>(oid, critical, /*failed_to_decode=*/true);
  165|      0|      }
  166|  25.9k|   }
  167|       |
  168|       |   // This is always Unknown_Extension:
  169|      0|   extn->decode_inner(body);
  170|      0|   return extn;
  171|  25.9k|}
_ZNK5Botan10Extensions15Extensions_Info3objEv:
  173|  25.9k|const Certificate_Extension& Extensions::Extensions_Info::obj() const {
  174|  25.9k|   BOTAN_ASSERT_NONNULL(m_obj.get());
  ------------------
  |  |  123|  25.9k|   do {                                                                                   \
  |  |  124|  25.9k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 25.9k]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|  25.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 25.9k]
  |  |  ------------------
  ------------------
  175|  25.9k|   return *m_obj;
  176|  25.9k|}
_ZNK5Botan10Extensions13extension_setERKNS_3OIDE:
  235|  19.4k|bool Extensions::extension_set(const OID& oid) const {
  236|  19.4k|   return m_extension_info.contains(oid);
  237|  19.4k|}
_ZNK5Botan10Extensions20get_extension_objectERKNS_3OIDE:
  256|  71.3k|const Certificate_Extension* Extensions::get_extension_object(const OID& oid) const {
  257|  71.3k|   auto extn = m_extension_info.find(oid);
  258|  71.3k|   if(extn == m_extension_info.end()) {
  ------------------
  |  Branch (258:7): [True: 45.3k, False: 25.9k]
  ------------------
  259|  45.3k|      return nullptr;
  260|  45.3k|   }
  261|       |
  262|  25.9k|   return &extn->second.obj();
  263|  71.3k|}
_ZN5Botan10Extensions11decode_fromERNS_11BER_DecoderENSt3__18optionalINS_17Extension_ContextEEE:
  326|  6.48k|void Extensions::decode_from(BER_Decoder& from_source, std::optional<Extension_Context> context) {
  327|  6.48k|   m_extension_oids.clear();
  328|  6.48k|   m_extension_info.clear();
  329|  6.48k|   m_has_unknown_critical_extension = false;
  330|       |
  331|  6.48k|   BER_Decoder sequence = from_source.start_sequence();
  332|       |
  333|  32.4k|   while(sequence.more_items()) {
  ------------------
  |  Branch (333:10): [True: 25.9k, False: 6.48k]
  ------------------
  334|  25.9k|      OID oid;
  335|  25.9k|      bool critical = false;
  336|  25.9k|      std::vector<uint8_t> bits;
  337|       |
  338|  25.9k|      sequence.start_sequence()
  339|  25.9k|         .decode(oid)
  340|  25.9k|         .decode_optional(critical, ASN1_Type::Boolean, ASN1_Class::Universal, false)
  341|  25.9k|         .decode(bits, ASN1_Type::OctetString)
  342|  25.9k|         .end_cons();
  343|       |
  344|  25.9k|      auto obj = create_extn_obj(oid, critical, bits, context);
  345|       |      // Unknown_Extension is the only Certificate_Extension with an empty oid_name
  346|  25.9k|      if(critical && obj->oid_name().empty()) {
  ------------------
  |  Branch (346:10): [True: 6.48k, False: 19.4k]
  |  Branch (346:10): [True: 0, False: 25.9k]
  |  Branch (346:22): [True: 0, False: 6.48k]
  ------------------
  347|      0|         m_has_unknown_critical_extension = true;
  348|      0|      }
  349|  25.9k|      Extensions_Info info(critical, std::move(bits), std::move(obj));
  350|       |
  351|  25.9k|      m_extension_oids.push_back(oid);
  352|       |
  353|       |      // RFC 5280 4.2: "A certificate MUST NOT include more than one
  354|       |      // instance of a particular extension."
  355|  25.9k|      if(!m_extension_info.emplace(std::move(oid), std::move(info)).second) {
  ------------------
  |  Branch (355:10): [True: 0, False: 25.9k]
  ------------------
  356|      0|         throw Decoding_Error("Duplicate certificate extension encountered");
  357|      0|      }
  358|  25.9k|   }
  359|  6.48k|   sequence.verify_end();
  360|  6.48k|}
_ZNK5Botan14Cert_Extension17Basic_Constraints22is_appropriate_contextENS_17Extension_ContextE:
  364|  6.48k|bool Basic_Constraints::is_appropriate_context(Extension_Context context) const {
  365|  6.48k|   return context == Extension_Context::Certificate;
  366|  6.48k|}
_ZNK5Botan14Cert_Extension14Subject_Key_ID22is_appropriate_contextENS_17Extension_ContextE:
  372|  6.48k|bool Subject_Key_ID::is_appropriate_context(Extension_Context context) const {
  373|  6.48k|   return context == Extension_Context::Certificate;
  374|  6.48k|}
_ZNK5Botan14Cert_Extension16Authority_Key_ID22is_appropriate_contextENS_17Extension_ContextE:
  376|  6.48k|bool Authority_Key_ID::is_appropriate_context(Extension_Context context) const {
  377|  6.48k|   return context == Extension_Context::Certificate || context == Extension_Context::CRL;
  ------------------
  |  Branch (377:11): [True: 6.48k, False: 0]
  |  Branch (377:56): [True: 0, False: 0]
  ------------------
  378|  6.48k|}
_ZNK5Botan14Cert_Extension24Subject_Alternative_Name22is_appropriate_contextENS_17Extension_ContextE:
  380|  6.48k|bool Subject_Alternative_Name::is_appropriate_context(Extension_Context context) const {
  381|  6.48k|   return context == Extension_Context::Certificate;
  382|  6.48k|}
_ZN5Botan14Cert_Extension17Basic_ConstraintsC2Ebm:
  447|  6.48k|      Basic_Constraints(is_ca, is_ca ? std::optional<size_t>(path_length_constraint) : std::nullopt) {}
  ------------------
  |  Branch (447:32): [True: 0, False: 6.48k]
  ------------------
_ZN5Botan14Cert_Extension17Basic_ConstraintsC2EbNSt3__18optionalImEE:
  450|  6.48k|      m_is_ca(is_ca), m_path_length_constraint(path_length_constraint) {
  451|  6.48k|   if(!m_is_ca && m_path_length_constraint.has_value()) {
  ------------------
  |  Branch (451:7): [True: 6.48k, False: 0]
  |  Branch (451:19): [True: 0, False: 6.48k]
  ------------------
  452|       |      // RFC 5280 Sec 4.2.1.9 "CAs MUST NOT include the pathLenConstraint field unless the cA boolean is asserted"
  453|      0|      throw Invalid_Argument(
  454|      0|         "Basic_Constraints nonsensical to set a path length constraint for a non-CA basicConstraints");
  455|      0|   }
  456|  6.48k|}
_ZN5Botan14Cert_Extension17Basic_Constraints12decode_innerERKNSt3__16vectorIhNS2_9allocatorIhEEEE:
  487|  6.48k|void Basic_Constraints::decode_inner(const std::vector<uint8_t>& in) {
  488|       |   /*
  489|       |   * RFC 5280 Section 4.2.1.9
  490|       |   *
  491|       |   * BasicConstraints ::= SEQUENCE {
  492|       |   *    cA                      BOOLEAN DEFAULT FALSE,
  493|       |   *    pathLenConstraint       INTEGER (0..MAX) OPTIONAL }
  494|       |   */
  495|  6.48k|   BER_Decoder(in, BER_Decoder::Limits::DER())
  496|  6.48k|      .start_sequence()
  497|  6.48k|      .decode_optional(m_is_ca, ASN1_Type::Boolean, ASN1_Class::Universal, false)
  498|  6.48k|      .decode_optional(m_path_length_constraint, ASN1_Type::Integer, ASN1_Class::Universal)
  499|  6.48k|      .end_cons()
  500|  6.48k|      .verify_end();
  501|       |
  502|       |   /* RFC 5280 Section 4.2.1.9:
  503|       |   *  "CAs MUST NOT include the pathLenConstraint field unless the cA boolean
  504|       |   *  is asserted and the key usage extension asserts the keyCertSign bit" */
  505|  6.48k|   if(!m_is_ca && m_path_length_constraint.has_value()) {
  ------------------
  |  Branch (505:7): [True: 6.48k, False: 0]
  |  Branch (505:19): [True: 0, False: 6.48k]
  ------------------
  506|      0|      throw Decoding_Error("BasicConstraints pathLenConstraint must not be present when cA is FALSE");
  507|      0|   }
  508|  6.48k|}
_ZN5Botan14Cert_Extension14Subject_Key_ID12decode_innerERKNSt3__16vectorIhNS2_9allocatorIhEEEE:
  555|  6.48k|void Subject_Key_ID::decode_inner(const std::vector<uint8_t>& in) {
  556|       |   /* RFC 5280 Section 4.2.1.2 - SubjectKeyIdentifier ::= KeyIdentifier */
  557|  6.48k|   BER_Decoder(in, BER_Decoder::Limits::DER()).decode(m_key_id, ASN1_Type::OctetString).verify_end();
  558|       |
  559|  6.48k|   if(m_key_id.empty()) {
  ------------------
  |  Branch (559:7): [True: 0, False: 6.48k]
  ------------------
  560|      0|      throw Decoding_Error("SubjectKeyIdentifier must not be empty");
  561|      0|   }
  562|  6.48k|   if(m_key_id.size() > MaximumKeyIdentifierLength) {
  ------------------
  |  Branch (562:7): [True: 0, False: 6.48k]
  ------------------
  563|      0|      throw Decoding_Error(
  564|      0|         fmt("SubjectKeyIdentifier length {} exceeds limit of {} bytes", m_key_id.size(), MaximumKeyIdentifierLength));
  565|      0|   }
  566|  6.48k|}
_ZN5Botan14Cert_Extension16Authority_Key_ID12decode_innerERKNSt3__16vectorIhNS2_9allocatorIhEEEE:
  625|  6.48k|void Authority_Key_ID::decode_inner(const std::vector<uint8_t>& in) {
  626|       |   /*
  627|       |   * RFC 5280 Section 4.2.1.1
  628|       |   *
  629|       |   * AuthorityKeyIdentifier ::= SEQUENCE {
  630|       |   *    keyIdentifier             [0] KeyIdentifier           OPTIONAL,
  631|       |   *    authorityCertIssuer       [1] GeneralNames            OPTIONAL,
  632|       |   *    authorityCertSerialNumber [2] CertificateSerialNumber OPTIONAL }
  633|       |   */
  634|  6.48k|   BER_Decoder ber(in, BER_Decoder::Limits::DER());
  635|  6.48k|   BER_Decoder seq = ber.start_sequence();
  636|       |
  637|  6.48k|   m_key_id.clear();
  638|  6.48k|   m_authority_cert.reset();
  639|       |
  640|  6.48k|   bool key_id_present = false;
  641|  6.48k|   std::optional<AlternativeName> authority_cert_issuer;
  642|  6.48k|   std::optional<X509_Serial_Number> authority_cert_serial;
  643|       |
  644|  6.48k|   seq.decode_optional_field(0,
  645|  6.48k|                             ASN1_Class::ContextSpecific,
  646|  6.48k|                             [&](BER_Decoder& d) {
  647|  6.48k|                                d.decode(m_key_id, ASN1_Type::OctetString, ASN1_Type(0), ASN1_Class::ContextSpecific);
  648|  6.48k|                                key_id_present = true;
  649|  6.48k|                             })
  650|  6.48k|      .decode_optional_field(1,
  651|  6.48k|                             ASN1_Class::ContextSpecific | ASN1_Class::Constructed,
  652|  6.48k|                             [&](BER_Decoder& d) {
  653|  6.48k|                                AlternativeName names;
  654|  6.48k|                                d.decode_implicit(names,
  655|  6.48k|                                                  ASN1_Type(1),
  656|  6.48k|                                                  ASN1_Class::ContextSpecific | ASN1_Class::Constructed,
  657|  6.48k|                                                  ASN1_Type::Sequence,
  658|  6.48k|                                                  ASN1_Class::Constructed);
  659|  6.48k|                                authority_cert_issuer = std::move(names);
  660|  6.48k|                             })
  661|  6.48k|      .decode_optional_field(2, ASN1_Class::ContextSpecific, [&](BER_Decoder& d) {
  662|  6.48k|         X509_Serial_Number serial;
  663|  6.48k|         d.decode_implicit(
  664|  6.48k|            serial, ASN1_Type(2), ASN1_Class::ContextSpecific, ASN1_Type::Integer, ASN1_Class::Universal);
  665|  6.48k|         authority_cert_serial = std::move(serial);
  666|  6.48k|      });
  667|       |
  668|  6.48k|   seq.end_cons();
  669|  6.48k|   ber.verify_end();
  670|       |
  671|  6.48k|   if(key_id_present) {
  ------------------
  |  Branch (671:7): [True: 6.48k, False: 0]
  ------------------
  672|  6.48k|      if(m_key_id.empty()) {
  ------------------
  |  Branch (672:10): [True: 0, False: 6.48k]
  ------------------
  673|      0|         throw Decoding_Error("AuthorityKeyIdentifier keyIdentifier must not be empty");
  674|      0|      }
  675|  6.48k|      if(m_key_id.size() > MaximumKeyIdentifierLength) {
  ------------------
  |  Branch (675:10): [True: 0, False: 6.48k]
  ------------------
  676|      0|         throw Decoding_Error(fmt("AuthorityKeyIdentifier keyIdentifier length {} exceeds limit of {} bytes",
  677|      0|                                  m_key_id.size(),
  678|      0|                                  MaximumKeyIdentifierLength));
  679|      0|      }
  680|  6.48k|   }
  681|       |
  682|       |   // RFC 5280 4.2.1.6: GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
  683|  6.48k|   if(authority_cert_issuer.has_value() && authority_cert_issuer->is_empty()) {
  ------------------
  |  Branch (683:7): [True: 0, False: 6.48k]
  |  Branch (683:44): [True: 0, False: 0]
  ------------------
  684|      0|      throw Decoding_Error("AuthorityKeyIdentifier authorityCertIssuer must contain at least one GeneralName");
  685|      0|   }
  686|       |
  687|       |   /*
  688|       |   * RFC 5280 Appendix A.2:
  689|       |   *
  690|       |   *    authorityCertIssuer and authorityCertSerialNumber MUST both be
  691|       |   *    present or both be absent
  692|       |   */
  693|  6.48k|   if(authority_cert_issuer.has_value() != authority_cert_serial.has_value()) {
  ------------------
  |  Branch (693:7): [True: 0, False: 6.48k]
  ------------------
  694|      0|      throw Decoding_Error(
  695|      0|         "AuthorityKeyIdentifier authorityCertIssuer and authorityCertSerialNumber must both be present or absent");
  696|      0|   }
  697|       |
  698|  6.48k|   if(authority_cert_issuer.has_value()) {
  ------------------
  |  Branch (698:7): [True: 0, False: 6.48k]
  ------------------
  699|      0|      m_authority_cert =
  700|      0|         Authority_Cert_Identifier{std::move(*authority_cert_issuer), std::move(*authority_cert_serial)};
  701|      0|   }
  702|  6.48k|}
_ZN5Botan14Cert_Extension24Subject_Alternative_Name12decode_innerERKNSt3__16vectorIhNS2_9allocatorIhEEEE:
  725|  6.48k|void Subject_Alternative_Name::decode_inner(const std::vector<uint8_t>& in) {
  726|       |   /* RFC 5280 Section 4.2.1.6 - SubjectAltName ::= GeneralNames
  727|       |   *  GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName */
  728|  6.48k|   BER_Decoder(in, BER_Decoder::Limits::DER()).decode(m_alt_name).verify_end();
  729|  6.48k|   if(!m_alt_name.has_items()) {
  ------------------
  |  Branch (729:7): [True: 0, False: 6.48k]
  ------------------
  730|      0|      throw Decoding_Error("SubjectAlternativeName extension must contain at least one GeneralName");
  731|      0|   }
  732|  6.48k|}
x509_ext.cpp:_ZN5Botan12_GLOBAL__N_118extension_from_oidERKNS_3OIDE:
   55|  25.9k|std::unique_ptr<Certificate_Extension> extension_from_oid(const OID& oid) {
   56|  25.9k|   if(auto iso_ext = is_sub_element_of(oid, {2, 5, 29})) {
  ------------------
  |  Branch (56:12): [True: 25.9k, False: 0]
  ------------------
   57|       |      // NOLINTNEXTLINE(*-switch-missing-default-case)
   58|  25.9k|      switch(*iso_ext) {
  ------------------
  |  Branch (58:14): [True: 25.9k, False: 0]
  ------------------
   59|  6.48k|         case 14:
  ------------------
  |  Branch (59:10): [True: 6.48k, False: 19.4k]
  ------------------
   60|  6.48k|            return make_extension<Cert_Extension::Subject_Key_ID>(oid);
   61|      0|         case 15:
  ------------------
  |  Branch (61:10): [True: 0, False: 25.9k]
  ------------------
   62|      0|            return make_extension<Cert_Extension::Key_Usage>(oid);
   63|  6.48k|         case 17:
  ------------------
  |  Branch (63:10): [True: 6.48k, False: 19.4k]
  ------------------
   64|  6.48k|            return make_extension<Cert_Extension::Subject_Alternative_Name>(oid);
   65|      0|         case 18:
  ------------------
  |  Branch (65:10): [True: 0, False: 25.9k]
  ------------------
   66|      0|            return make_extension<Cert_Extension::Issuer_Alternative_Name>(oid);
   67|  6.48k|         case 19:
  ------------------
  |  Branch (67:10): [True: 6.48k, False: 19.4k]
  ------------------
   68|  6.48k|            return make_extension<Cert_Extension::Basic_Constraints>(oid);
   69|      0|         case 20:
  ------------------
  |  Branch (69:10): [True: 0, False: 25.9k]
  ------------------
   70|      0|            return make_extension<Cert_Extension::CRL_Number>(oid);
   71|      0|         case 21:
  ------------------
  |  Branch (71:10): [True: 0, False: 25.9k]
  ------------------
   72|      0|            return make_extension<Cert_Extension::CRL_ReasonCode>(oid);
   73|      0|         case 28:
  ------------------
  |  Branch (73:10): [True: 0, False: 25.9k]
  ------------------
   74|      0|            return make_extension<Cert_Extension::CRL_Issuing_Distribution_Point>(oid);
   75|      0|         case 30:
  ------------------
  |  Branch (75:10): [True: 0, False: 25.9k]
  ------------------
   76|      0|            return make_extension<Cert_Extension::Name_Constraints>(oid);
   77|      0|         case 31:
  ------------------
  |  Branch (77:10): [True: 0, False: 25.9k]
  ------------------
   78|      0|            return make_extension<Cert_Extension::CRL_Distribution_Points>(oid);
   79|      0|         case 32:
  ------------------
  |  Branch (79:10): [True: 0, False: 25.9k]
  ------------------
   80|      0|            return make_extension<Cert_Extension::Certificate_Policies>(oid);
   81|  6.48k|         case 35:
  ------------------
  |  Branch (81:10): [True: 6.48k, False: 19.4k]
  ------------------
   82|  6.48k|            return make_extension<Cert_Extension::Authority_Key_ID>(oid);
   83|      0|         case 37:
  ------------------
  |  Branch (83:10): [True: 0, False: 25.9k]
  ------------------
   84|      0|            return make_extension<Cert_Extension::Extended_Key_Usage>(oid);
   85|      0|         case 56:
  ------------------
  |  Branch (85:10): [True: 0, False: 25.9k]
  ------------------
   86|      0|            return make_extension<Cert_Extension::NoRevocationAvailable>(oid);
   87|  25.9k|      }
   88|  25.9k|   }
   89|       |
   90|      0|   if(auto pkix_ext = is_sub_element_of(oid, {1, 3, 6, 1, 5, 5, 7, 1})) {
  ------------------
  |  Branch (90:12): [True: 0, False: 0]
  ------------------
   91|       |      // NOLINTNEXTLINE(*-switch-missing-default-case)
   92|      0|      switch(*pkix_ext) {
  ------------------
  |  Branch (92:14): [True: 0, False: 0]
  ------------------
   93|      0|         case 1:
  ------------------
  |  Branch (93:10): [True: 0, False: 0]
  ------------------
   94|      0|            return make_extension<Cert_Extension::Authority_Information_Access>(oid);
   95|      0|         case 7:
  ------------------
  |  Branch (95:10): [True: 0, False: 0]
  ------------------
   96|      0|            return make_extension<Cert_Extension::IPAddressBlocks>(oid);
   97|      0|         case 8:
  ------------------
  |  Branch (97:10): [True: 0, False: 0]
  ------------------
   98|      0|            return make_extension<Cert_Extension::ASBlocks>(oid);
   99|      0|         case 26:
  ------------------
  |  Branch (99:10): [True: 0, False: 0]
  ------------------
  100|      0|            return make_extension<Cert_Extension::TNAuthList>(oid);
  101|      0|      }
  102|      0|   }
  103|       |
  104|      0|   if(oid == Cert_Extension::OCSP_NoCheck::static_oid()) {
  ------------------
  |  Branch (104:7): [True: 0, False: 0]
  ------------------
  105|      0|      return make_extension<Cert_Extension::OCSP_NoCheck>(oid);
  106|      0|   }
  107|       |
  108|      0|   return nullptr;  // unknown
  109|      0|}
x509_ext.cpp:_ZN5Botan12_GLOBAL__N_114make_extensionITkNSt3__112derived_fromINS_21Certificate_ExtensionEEENS_14Cert_Extension14Subject_Key_IDEEEDaRKNS_3OIDE:
   50|  6.48k|auto make_extension([[maybe_unused]] const OID& oid) {
   51|  6.48k|   BOTAN_DEBUG_ASSERT(oid == T::static_oid());
  ------------------
  |  |  137|  6.48k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  6.48k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 6.48k]
  |  |  ------------------
  ------------------
   52|  6.48k|   return std::make_unique<T>();
   53|  6.48k|}
x509_ext.cpp:_ZN5Botan12_GLOBAL__N_114make_extensionITkNSt3__112derived_fromINS_21Certificate_ExtensionEEENS_14Cert_Extension24Subject_Alternative_NameEEEDaRKNS_3OIDE:
   50|  6.48k|auto make_extension([[maybe_unused]] const OID& oid) {
   51|  6.48k|   BOTAN_DEBUG_ASSERT(oid == T::static_oid());
  ------------------
  |  |  137|  6.48k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  6.48k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 6.48k]
  |  |  ------------------
  ------------------
   52|  6.48k|   return std::make_unique<T>();
   53|  6.48k|}
x509_ext.cpp:_ZN5Botan12_GLOBAL__N_114make_extensionITkNSt3__112derived_fromINS_21Certificate_ExtensionEEENS_14Cert_Extension17Basic_ConstraintsEEEDaRKNS_3OIDE:
   50|  6.48k|auto make_extension([[maybe_unused]] const OID& oid) {
   51|  6.48k|   BOTAN_DEBUG_ASSERT(oid == T::static_oid());
  ------------------
  |  |  137|  6.48k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  6.48k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 6.48k]
  |  |  ------------------
  ------------------
   52|  6.48k|   return std::make_unique<T>();
   53|  6.48k|}
x509_ext.cpp:_ZN5Botan12_GLOBAL__N_114make_extensionITkNSt3__112derived_fromINS_21Certificate_ExtensionEEENS_14Cert_Extension16Authority_Key_IDEEEDaRKNS_3OIDE:
   50|  6.48k|auto make_extension([[maybe_unused]] const OID& oid) {
   51|  6.48k|   BOTAN_DEBUG_ASSERT(oid == T::static_oid());
  ------------------
  |  |  137|  6.48k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  138|  6.48k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (138:15): [Folded, False: 6.48k]
  |  |  ------------------
  ------------------
   52|  6.48k|   return std::make_unique<T>();
   53|  6.48k|}
x509_ext.cpp:_ZZN5Botan14Cert_Extension16Authority_Key_ID12decode_innerERKNSt3__16vectorIhNS2_9allocatorIhEEEEENK3$_0clERNS_11BER_DecoderE:
  646|  6.48k|                             [&](BER_Decoder& d) {
  647|  6.48k|                                d.decode(m_key_id, ASN1_Type::OctetString, ASN1_Type(0), ASN1_Class::ContextSpecific);
  648|  6.48k|                                key_id_present = true;
  649|  6.48k|                             })

_ZN5Botan11X509_Object9load_dataERNS_10DataSourceE:
   24|  6.93k|void X509_Object::load_data(DataSource& in) {
   25|  6.93k|   try {
   26|  6.93k|      if(ASN1::maybe_BER(in) && !PEM_Code::matches(in)) {
  ------------------
  |  Branch (26:10): [True: 407, False: 6.52k]
  |  Branch (26:33): [True: 407, False: 0]
  ------------------
   27|    407|         BER_Decoder dec(in, BER_Decoder::Limits::DER());
   28|    407|         decode_from(dec);
   29|       |         // Call to verify_end omitted here since we have to sometimes decode
   30|       |         // multiple certificates encoded sequentially in a DataSource
   31|  6.52k|      } else {
   32|  6.52k|         std::string got_label;
   33|  6.52k|         DataSource_Memory ber(PEM_Code::decode(in, got_label));
   34|       |
   35|  6.52k|         if(got_label != PEM_label()) {
  ------------------
  |  Branch (35:13): [True: 0, False: 6.52k]
  ------------------
   36|      0|            bool is_alternate = false;
   37|      0|            for(const std::string_view alt_label : alternate_PEM_labels()) {
  ------------------
  |  Branch (37:50): [True: 0, False: 0]
  ------------------
   38|      0|               if(got_label == alt_label) {
  ------------------
  |  Branch (38:19): [True: 0, False: 0]
  ------------------
   39|      0|                  is_alternate = true;
   40|      0|                  break;
   41|      0|               }
   42|      0|            }
   43|       |
   44|      0|            if(!is_alternate) {
  ------------------
  |  Branch (44:16): [True: 0, False: 0]
  ------------------
   45|      0|               throw Decoding_Error("Unexpected PEM label for " + PEM_label() + " of " + got_label);
   46|      0|            }
   47|      0|         }
   48|       |
   49|  6.52k|         BER_Decoder dec(ber, BER_Decoder::Limits::DER());
   50|  6.52k|         decode_from(dec);
   51|       |         // Call to verify_end omitted here since we have to sometimes decode
   52|       |         // multiple certificates encoded sequentially in a DataSource
   53|  6.52k|      }
   54|  6.93k|   } catch(Decoding_Error& e) {
   55|    445|      throw Decoding_Error(PEM_label() + " decoding", e);
   56|    445|   }
   57|  6.93k|}
_ZNK5Botan11X509_Object9signatureEv:
   59|  6.48k|const std::vector<uint8_t>& X509_Object::signature() const {
   60|  6.48k|   if(!m_signed_data) {
  ------------------
  |  Branch (60:7): [True: 0, False: 6.48k]
  ------------------
   61|      0|      throw Invalid_State("X509_Object uninitialized");
   62|      0|   }
   63|  6.48k|   return m_signed_data->m_sig;
   64|  6.48k|}
_ZNK5Botan11X509_Object11signed_bodyEv:
   66|  13.0k|const std::vector<uint8_t>& X509_Object::signed_body() const {
   67|  13.0k|   if(!m_signed_data) {
  ------------------
  |  Branch (67:7): [True: 0, False: 13.0k]
  ------------------
   68|      0|      throw Invalid_State("X509_Object uninitialized");
   69|      0|   }
   70|  13.0k|   return m_signed_data->m_tbs_bits;
   71|  13.0k|}
_ZNK5Botan11X509_Object19signature_algorithmEv:
   73|  12.9k|const AlgorithmIdentifier& X509_Object::signature_algorithm() const {
   74|  12.9k|   if(!m_signed_data) {
  ------------------
  |  Branch (74:7): [True: 0, False: 12.9k]
  ------------------
   75|      0|      throw Invalid_State("X509_Object uninitialized");
   76|      0|   }
   77|  12.9k|   return m_signed_data->m_sig_algo;
   78|  12.9k|}
_ZNK5Botan11X509_Object11encode_intoERNS_11DER_EncoderE:
   80|  6.48k|void X509_Object::encode_into(DER_Encoder& to) const {
   81|  6.48k|   to.start_sequence()
   82|  6.48k|      .start_sequence()
   83|  6.48k|      .raw_bytes(signed_body())
   84|  6.48k|      .end_cons()
   85|  6.48k|      .encode(signature_algorithm())
   86|  6.48k|      .encode_octet_aligned_bitstring(signature())
   87|  6.48k|      .end_cons();
   88|  6.48k|}
_ZN5Botan11X509_Object11decode_fromERNS_11BER_DecoderE:
   93|  6.89k|void X509_Object::decode_from(BER_Decoder& from) {
   94|  6.89k|   auto data = std::make_shared<Signed_Data>();
   95|       |
   96|  6.89k|   from.start_sequence()
   97|  6.89k|      .start_sequence()
   98|  6.89k|      .raw_bytes(data->m_tbs_bits)
   99|  6.89k|      .end_cons()
  100|  6.89k|      .decode(data->m_sig_algo)
  101|  6.89k|      .decode_octet_aligned_bitstring(data->m_sig)
  102|  6.89k|      .end_cons();
  103|       |
  104|  6.89k|   m_signed_data = std::move(data);
  105|  6.89k|   force_decode();
  106|  6.89k|}

_ZN5Botan18X509_Serial_NumberC2ERKNS_6BigIntE:
   20|  6.53k|X509_Serial_Number::X509_Serial_Number(const BigInt& value) : m_contents(ASN1::integer_contents(value)) {}
_ZNK5Botan18X509_Serial_Number11is_negativeEv:
   65|  6.48k|bool X509_Serial_Number::is_negative() const {
   66|  6.48k|   BOTAN_STATE_CHECK(!m_contents.empty());
  ------------------
  |  |   51|  6.48k|   do {                                                         \
  |  |   52|  6.48k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  6.48k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 6.48k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  6.48k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 6.48k]
  |  |  ------------------
  ------------------
   67|  6.48k|   return (m_contents[0] & 0x80) == 0x80;
   68|  6.48k|}
_ZNK5Botan18X509_Serial_Number7is_zeroEv:
   70|  6.48k|bool X509_Serial_Number::is_zero() const {
   71|  6.48k|   return m_contents.size() == 1 && m_contents[0] == 0x00;
  ------------------
  |  Branch (71:11): [True: 0, False: 6.48k]
  |  Branch (71:37): [True: 0, False: 0]
  ------------------
   72|  6.48k|}
_ZNK5Botan18X509_Serial_Number9magnitudeEv:
   74|  6.48k|std::vector<uint8_t> X509_Serial_Number::magnitude() const {
   75|  6.48k|   BOTAN_STATE_CHECK(!m_contents.empty());
  ------------------
  |  |   51|  6.48k|   do {                                                         \
  |  |   52|  6.48k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  6.48k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 6.48k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  6.48k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 6.48k]
  |  |  ------------------
  ------------------
   76|       |
   77|  6.48k|   if(is_zero()) {
  ------------------
  |  Branch (77:7): [True: 0, False: 6.48k]
  ------------------
   78|      0|      return {};
   79|  6.48k|   } else if(is_negative()) {
  ------------------
  |  Branch (79:14): [True: 0, False: 6.48k]
  ------------------
   80|      0|      return to_bigint().serialize();
   81|  6.48k|   } else if(m_contents[0] == 0x00) {
  ------------------
  |  Branch (81:14): [True: 6.48k, False: 0]
  ------------------
   82|       |      // Positive value whose leading magnitude bit is set; skip the sign octet
   83|  6.48k|      return {m_contents.begin() + 1, m_contents.end()};
   84|  6.48k|   } else {
   85|      0|      return m_contents;
   86|      0|   }
   87|  6.48k|}
_ZN5Botan18X509_Serial_Number11decode_fromERNS_11BER_DecoderE:
  108|  6.57k|void X509_Serial_Number::decode_from(BER_Decoder& from) {
  109|       |   // Decode via BigInt so the decoder's limits apply, in particular the
  110|       |   // rejection of non-minimal INTEGER encodings in DER mode
  111|  6.57k|   BigInt value;
  112|  6.57k|   from.decode(value);
  113|  6.57k|   *this = X509_Serial_Number(value);
  114|  6.57k|}

_ZN5Botan16X509_CertificateD2Ev:
   85|  12.5k|X509_Certificate::~X509_Certificate() = default;
_ZNK5Botan16X509_Certificate9PEM_labelEv:
   87|  6.92k|std::string X509_Certificate::PEM_label() const {
   88|  6.92k|   return "CERTIFICATE";
   89|  6.92k|}
_ZN5Botan16X509_CertificateC2ERNS_10DataSourceE:
   95|  6.48k|X509_Certificate::X509_Certificate(DataSource& src) {
   96|  6.48k|   load_data(src);
   97|  6.48k|}
_ZN5Botan16X509_CertificateC2ENSt3__14spanIKhLm18446744073709551615EEE:
   99|    446|X509_Certificate::X509_Certificate(std::span<const uint8_t> in) {
  100|    446|   DataSource_Memory src(in);
  101|    446|   load_data(src);
  102|    446|}
_ZN5Botan16X509_Certificate12force_decodeEv:
  367|  6.57k|void X509_Certificate::force_decode() {
  368|  6.57k|   m_data.reset();
  369|  6.57k|   m_data = parse_x509_cert_body(*this);
  370|  6.57k|}
x509cert.cpp:_ZN5Botan12_GLOBAL__N_120parse_x509_cert_bodyERKNS_11X509_ObjectE:
  113|  6.57k|std::unique_ptr<X509_Certificate_Data> parse_x509_cert_body(const X509_Object& obj) {
  114|  6.57k|   auto data = std::make_unique<X509_Certificate_Data>();
  115|       |
  116|  6.57k|   BER_Object public_key;
  117|  6.57k|   BER_Object v3_exts_data;
  118|       |
  119|  6.57k|   BER_Decoder(obj.signed_body(), BER_Decoder::Limits::DER())
  120|  6.57k|      .decode_optional(data->m_version, ASN1_Type(0), ASN1_Class::Constructed | ASN1_Class::ContextSpecific)
  121|  6.57k|      .decode(data->m_serial)
  122|  6.57k|      .decode(data->m_sig_algo_inner)
  123|  6.57k|      .decode(data->m_issuer_dn)
  124|  6.57k|      .start_sequence()
  125|  6.57k|      .decode(data->m_not_before)
  126|  6.57k|      .decode(data->m_not_after)
  127|  6.57k|      .end_cons()
  128|  6.57k|      .decode(data->m_subject_dn)
  129|  6.57k|      .get_next(public_key)
  130|  6.57k|      .decode_optional_string(data->m_v2_issuer_key_id, ASN1_Type::BitString, 1)
  131|  6.57k|      .decode_optional_string(data->m_v2_subject_key_id, ASN1_Type::BitString, 2)
  132|  6.57k|      .get_next(v3_exts_data)
  133|  6.57k|      .verify_end("TBSCertificate has extra data after extensions block");
  134|       |
  135|  6.57k|   if(data->m_version > 2) {
  ------------------
  |  Branch (135:7): [True: 0, False: 6.57k]
  ------------------
  136|      0|      throw Decoding_Error("Unknown X.509 cert version " + std::to_string(data->m_version));
  137|      0|   }
  138|  6.57k|   if(obj.signature_algorithm() != data->m_sig_algo_inner) {
  ------------------
  |  Branch (138:7): [True: 0, False: 6.57k]
  ------------------
  139|      0|      throw Decoding_Error("X.509 Certificate had differing algorithm identifiers in inner and outer ID fields");
  140|      0|   }
  141|       |
  142|  6.57k|   public_key.assert_is_a(ASN1_Type::Sequence, ASN1_Class::Constructed, "X.509 certificate public key");
  143|       |
  144|       |   // for general sanity convert wire version (0 based) to standards version (v1 .. v3)
  145|  6.57k|   data->m_version += 1;
  146|       |
  147|  6.57k|   data->m_serial_bits = data->m_serial.magnitude();
  148|  6.57k|   data->m_subject_dn_bits = ASN1::put_in_sequence(data->m_subject_dn.get_bits());
  149|  6.57k|   data->m_issuer_dn_bits = ASN1::put_in_sequence(data->m_issuer_dn.get_bits());
  150|       |
  151|  6.57k|   data->m_subject_public_key_bits.assign(public_key.bits(), public_key.bits() + public_key.length());
  152|       |
  153|  6.57k|   data->m_subject_public_key_bits_seq = ASN1::put_in_sequence(data->m_subject_public_key_bits);
  154|       |
  155|  6.57k|   BER_Decoder(data->m_subject_public_key_bits, BER_Decoder::Limits::DER())
  156|  6.57k|      .decode(data->m_subject_public_key_algid)
  157|  6.57k|      .decode_octet_aligned_bitstring(data->m_subject_public_key_bitstring)
  158|  6.57k|      .verify_end();
  159|       |
  160|  6.57k|   if(v3_exts_data.is_a(3, ASN1_Class::Constructed | ASN1_Class::ContextSpecific)) {
  ------------------
  |  Branch (160:7): [True: 6.48k, False: 91]
  ------------------
  161|       |      // Path validation will reject a v1/v2 cert with v3 extensions
  162|  6.48k|      BER_Decoder cert_extensions(v3_exts_data, BER_Decoder::Limits::DER());
  163|  6.48k|      data->m_v3_extensions.decode_from(cert_extensions, Extension_Context::Certificate);
  164|  6.48k|      cert_extensions.verify_end();
  165|  6.48k|   } else if(v3_exts_data.is_set()) {
  ------------------
  |  Branch (165:14): [True: 0, False: 91]
  ------------------
  166|      0|      throw BER_Bad_Tag("Unknown tag in X.509 cert", v3_exts_data.tagging());
  167|      0|   }
  168|       |
  169|       |   // Now cache some fields from the extensions
  170|  6.57k|   if(const auto* ext = data->m_v3_extensions.get_extension_object_as<Cert_Extension::Key_Usage>()) {
  ------------------
  |  Branch (170:19): [True: 0, False: 6.57k]
  ------------------
  171|      0|      data->m_key_constraints = ext->get_constraints();
  172|       |      /*
  173|       |      RFC 5280: When the keyUsage extension appears in a certificate,
  174|       |      at least one of the bits MUST be set to 1.
  175|       |      */
  176|      0|      if(data->m_key_constraints.empty()) {
  ------------------
  |  Branch (176:10): [True: 0, False: 0]
  ------------------
  177|      0|         throw Decoding_Error("Certificate has invalid encoding for KeyUsage");
  178|      0|      }
  179|      0|   }
  180|       |
  181|  6.57k|   if(const auto* ext = data->m_v3_extensions.get_extension_object_as<Cert_Extension::Subject_Key_ID>()) {
  ------------------
  |  Branch (181:19): [True: 6.48k, False: 91]
  ------------------
  182|  6.48k|      data->m_subject_key_id = ext->get_key_id();
  183|  6.48k|   }
  184|       |
  185|  6.57k|   if(const auto* ext = data->m_v3_extensions.get_extension_object_as<Cert_Extension::Authority_Key_ID>()) {
  ------------------
  |  Branch (185:19): [True: 6.48k, False: 91]
  ------------------
  186|  6.48k|      data->m_authority_key_id = ext->get_key_id();
  187|  6.48k|   }
  188|       |
  189|  6.57k|   if(const auto* ext = data->m_v3_extensions.get_extension_object_as<Cert_Extension::Name_Constraints>()) {
  ------------------
  |  Branch (189:19): [True: 0, False: 6.57k]
  ------------------
  190|      0|      data->m_name_constraints = ext->get_name_constraints();
  191|      0|   }
  192|       |
  193|  6.57k|   if(const auto* ext = data->m_v3_extensions.get_extension_object_as<Cert_Extension::Extended_Key_Usage>()) {
  ------------------
  |  Branch (193:19): [True: 0, False: 6.57k]
  ------------------
  194|      0|      data->m_extended_key_usage = ext->object_identifiers();
  195|       |      /*
  196|       |      RFC 5280 section 4.2.1.12
  197|       |
  198|       |      "This extension indicates one or more purposes ..."
  199|       |
  200|       |      "If the extension is present, then the certificate MUST only be
  201|       |      used for one of the purposes indicated."
  202|       |
  203|       |      Thus we reject an EKU extension which is empty, since this indicates
  204|       |      the certificate cannot be used for any purpose.
  205|       |      */
  206|      0|      if(data->m_extended_key_usage.empty()) {
  ------------------
  |  Branch (206:10): [True: 0, False: 0]
  ------------------
  207|      0|         throw Decoding_Error("Certificate has invalid empty EKU extension");
  208|      0|      }
  209|      0|   }
  210|       |
  211|  6.57k|   if(const auto* ext = data->m_v3_extensions.get_extension_object_as<Cert_Extension::Basic_Constraints>()) {
  ------------------
  |  Branch (211:19): [True: 6.48k, False: 91]
  ------------------
  212|       |      /*
  213|       |      * RFC 5280 4.2.1.9 requires that conforming CAs "MUST mark the
  214|       |      * extension [basicConstraints] as critical in such certificates"
  215|       |      * but places no such requirement on validators.
  216|       |      */
  217|  6.48k|      if(ext->is_ca() == true) {
  ------------------
  |  Branch (217:10): [True: 0, False: 6.48k]
  ------------------
  218|       |         /*
  219|       |         * RFC 5280 section 4.2.1.3 requires that CAs include KeyUsage in all
  220|       |         * intermediate CA certificates they issue. Currently we accept it being
  221|       |         * missing, as do most other implementations. But it may be worth
  222|       |         * removing this entirely, or alternately adding a warning level
  223|       |         * validation failure for it.
  224|       |         */
  225|      0|         const bool allowed_by_ku =
  226|      0|            data->m_key_constraints.includes(Key_Constraints::KeyCertSign) || data->m_key_constraints.empty();
  ------------------
  |  Branch (226:13): [True: 0, False: 0]
  |  Branch (226:79): [True: 0, False: 0]
  ------------------
  227|       |
  228|       |         /*
  229|       |         * If the extended key usages are set then we must restrict the usage in
  230|       |         * accordance with it as well.
  231|       |         *
  232|       |         * RFC 5280 does not define any extended key usages compatible with certificate
  233|       |         * signing, but some CAs use serverAuth, clientAuth, OCSPSigning, or AnyExtendedKeyUsage
  234|       |         * for this purpose, even though clearly all of these (besides AEKU) are invalid.
  235|       |         * This check at least allows excluding a certificate which is set for only eg
  236|       |         * timestamping or code signing, and that seems about the best we can possibly enforce.
  237|       |         * OpenSSL, BoringSSL, and Go all completely ignore EKUs in determining ability to
  238|       |         * issue certs.
  239|       |         */
  240|      0|         const bool allowed_by_ext_ku = [](const std::vector<OID>& ext_ku) -> bool {
  241|      0|            if(ext_ku.empty()) {
  242|      0|               return true;
  243|      0|            }
  244|       |
  245|      0|            const auto server_auth = OID::from_name("PKIX.ServerAuth");
  246|      0|            const auto client_auth = OID::from_name("PKIX.ClientAuth");
  247|      0|            const auto ocsp_sign = OID::from_name("PKIX.OCSPSigning");
  248|      0|            const auto any_eku = OID::from_name("X509v3.AnyExtendedKeyUsage");
  249|       |
  250|      0|            for(const auto& oid : ext_ku) {
  251|      0|               if(oid == any_eku || oid == server_auth || oid == client_auth || oid == ocsp_sign) {
  252|      0|                  return true;
  253|      0|               }
  254|      0|            }
  255|       |
  256|      0|            return false;
  257|      0|         }(data->m_extended_key_usage);
  258|       |
  259|      0|         if(allowed_by_ku && allowed_by_ext_ku) {
  ------------------
  |  Branch (259:13): [True: 0, False: 0]
  |  Branch (259:30): [True: 0, False: 0]
  ------------------
  260|      0|            data->m_is_ca_certificate = true;
  261|      0|            data->m_path_len_constraint = ext->path_length_constraint();
  262|      0|         }
  263|      0|      }
  264|  6.48k|   }
  265|       |
  266|  6.57k|   if(const auto* ext = data->m_v3_extensions.get_extension_object_as<Cert_Extension::Issuer_Alternative_Name>()) {
  ------------------
  |  Branch (266:19): [True: 0, False: 6.57k]
  ------------------
  267|      0|      data->m_issuer_alt_name = ext->get_alt_name();
  268|      0|   }
  269|       |
  270|  6.57k|   if(const auto* ext = data->m_v3_extensions.get_extension_object_as<Cert_Extension::Subject_Alternative_Name>()) {
  ------------------
  |  Branch (270:19): [True: 6.48k, False: 91]
  ------------------
  271|  6.48k|      data->m_subject_alt_name = ext->get_alt_name();
  272|  6.48k|   }
  273|       |
  274|       |   // This will be set even if SAN parsing failed entirely eg due to a decoding error
  275|       |   // or if the SAN is empty. This is used to guard against using the CN for domain
  276|       |   // name checking.
  277|  6.57k|   const auto san_oid = OID::from_string("X509v3.SubjectAlternativeName");
  278|  6.57k|   data->m_subject_alt_name_exists = data->m_v3_extensions.extension_set(san_oid);
  279|       |
  280|       |   /*
  281|       |   * RFC 9608 Section 4:
  282|       |   *
  283|       |   *   If the noRevAvail certificate extension specified in this document is
  284|       |   *   present or the ocsp-nocheck certificate extension [RFC6960] is
  285|       |   *   present, then Step (a)(3) is skipped.  Otherwise, revocation status
  286|       |   *   determination of the certificate is performed.
  287|       |   */
  288|  6.57k|   data->m_skip_revocation_check =
  289|  6.57k|      data->m_v3_extensions.extension_set(Cert_Extension::NoRevocationAvailable::static_oid()) ||
  ------------------
  |  Branch (289:7): [True: 91, False: 6.48k]
  ------------------
  290|  6.48k|      data->m_v3_extensions.extension_set(Cert_Extension::OCSP_NoCheck::static_oid());
  ------------------
  |  Branch (290:7): [True: 0, False: 6.48k]
  ------------------
  291|       |
  292|  6.57k|   if(const auto* ext = data->m_v3_extensions.get_extension_object_as<Cert_Extension::Certificate_Policies>()) {
  ------------------
  |  Branch (292:19): [True: 0, False: 6.57k]
  ------------------
  293|      0|      data->m_cert_policies = ext->get_policy_oids();
  294|      0|   }
  295|       |
  296|  6.57k|   if(const auto* ext = data->m_v3_extensions.get_extension_object_as<Cert_Extension::Authority_Information_Access>()) {
  ------------------
  |  Branch (296:19): [True: 0, False: 6.57k]
  ------------------
  297|      0|      data->m_ocsp_responders = ext->ocsp_responder_uris();
  298|      0|      data->m_ca_issuers = ext->ca_issuer_uris();
  299|      0|   }
  300|       |
  301|  6.57k|   if(const auto* ext = data->m_v3_extensions.get_extension_object_as<Cert_Extension::CRL_Distribution_Points>()) {
  ------------------
  |  Branch (301:19): [True: 0, False: 6.57k]
  ------------------
  302|      0|      data->m_crl_distribution_points = ext->crl_distribution_point_uris();
  303|      0|   }
  304|       |
  305|       |   /*
  306|       |   Determine if this certificate appears to be self-issued (subject == issuer).
  307|       |   This is only a heuristic used for path building so it's ok it is not precise.
  308|       |   The self-signature is verified during path validation.
  309|       |   */
  310|  6.57k|   if(data->m_subject_dn == data->m_issuer_dn) {
  ------------------
  |  Branch (310:7): [True: 6.48k, False: 91]
  ------------------
  311|  6.48k|      if(!data->m_subject_key_id.empty() && !data->m_authority_key_id.empty()) {
  ------------------
  |  Branch (311:10): [True: 6.48k, False: 0]
  |  Branch (311:45): [True: 6.48k, False: 0]
  ------------------
  312|       |         /*
  313|       |         Both SKID and AKID are set so we can reliably determine self-signed vs
  314|       |         self-issued by comparing the two
  315|       |         */
  316|  6.48k|         data->m_self_signed = (data->m_subject_key_id == data->m_authority_key_id);
  317|  6.48k|      } else {
  318|       |         /*
  319|       |         Without both SKID and AKID we can't determine with certainty. Assume
  320|       |         self-signed since that's by far the common case.
  321|       |         */
  322|      0|         data->m_self_signed = true;
  323|      0|      }
  324|  6.48k|   }
  325|       |
  326|  6.57k|   const std::vector<uint8_t> full_encoding = obj.BER_encode();
  327|       |
  328|  6.57k|   if(auto sha1 = HashFunction::create("SHA-1")) {
  ------------------
  |  Branch (328:12): [True: 6.48k, False: 91]
  ------------------
  329|  6.48k|      sha1->update(data->m_subject_public_key_bitstring);
  330|  6.48k|      data->m_subject_public_key_bitstring_sha1 = sha1->final_stdvec();
  331|       |      // otherwise left as empty, and we will throw if subject_public_key_bitstring_sha1 is called
  332|       |
  333|  6.48k|      sha1->update(full_encoding);
  334|  6.48k|      sha1->final(data->m_cert_data_sha1);
  335|  6.48k|      data->m_fingerprint_sha1 = format_hex_fingerprint(data->m_cert_data_sha1);
  336|       |
  337|  6.48k|      sha1->update(data->m_issuer_dn_bits);
  338|  6.48k|      sha1->final(data->m_issuer_dn_bits_sha1);
  339|       |
  340|  6.48k|      sha1->update(data->m_subject_dn_bits);
  341|  6.48k|      sha1->final(data->m_subject_dn_bits_sha1);
  342|  6.48k|   }
  343|       |
  344|       |   // SHA-256 is a hard dependency of this module
  345|  6.57k|   auto sha256 = HashFunction::create_or_throw("SHA-256");
  346|  6.57k|   sha256->update(data->m_issuer_dn_bits);
  347|  6.57k|   data->m_issuer_dn_bits_sha256 = sha256->final_stdvec();
  348|       |
  349|  6.57k|   sha256->update(data->m_subject_dn_bits);
  350|  6.57k|   data->m_subject_dn_bits_sha256 = sha256->final_stdvec();
  351|       |
  352|  6.57k|   sha256->update(full_encoding);
  353|  6.57k|   sha256->final(data->m_cert_data_sha256);
  354|  6.57k|   data->m_fingerprint_sha256 = format_hex_fingerprint(data->m_cert_data_sha256);
  355|       |
  356|  6.57k|   sha256->update(data->m_subject_public_key_bitstring);
  357|  6.57k|   sha256->final(data->m_subject_public_key_bitstring_sha256);
  358|       |
  359|  6.57k|   return data;
  360|  6.57k|}

