_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EEC2Ev:
   62|      2|      AlignmentBuffer() = default;
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE5clearEv:
   71|      4|      void clear() {
   72|      4|         zeroize_buffer(m_buffer.data(), m_buffer.size());
   73|      4|         m_position = 0;
   74|      4|      }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EED2Ev:
   64|      2|      ~AlignmentBuffer() { secure_zeroize_buffer(m_buffer.data(), sizeof(T) * m_buffer.size()); }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE21handle_unaligned_dataERNS_12BufferSlicerE:
  166|      2|      [[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|      2|         const size_t defer = (defers_final_block()) ? 1 : 0;
  ------------------
  |  Branch (170:31): [True: 0, False: 2]
  ------------------
  171|       |
  172|      2|         if(in_alignment() && slicer.remaining() >= m_buffer.size() + defer) {
  ------------------
  |  Branch (172:13): [True: 2, False: 0]
  |  Branch (172:31): [True: 0, False: 2]
  ------------------
  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|      0|            return std::nullopt;
  177|      0|         }
  178|       |
  179|       |         // Fill the buffer with as much input data as needed to reach alignment
  180|       |         // or until the input source is depleted.
  181|      2|         const auto elements_to_consume = std::min(m_buffer.size() - m_position, slicer.remaining());
  182|      2|         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|      2|         if(ready_to_consume() && (!defers_final_block() || !slicer.empty())) {
  ------------------
  |  Branch (188:13): [True: 0, False: 2]
  |  Branch (188:36): [True: 0, False: 0]
  |  Branch (188:61): [True: 0, False: 0]
  ------------------
  189|      0|            return consume();
  190|      2|         } else {
  191|      2|            return std::nullopt;
  192|      2|         }
  193|      2|      }
_ZNK5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE18defers_final_blockEv:
  233|      2|      constexpr bool defers_final_block() const {
  234|      2|         return FINAL_BLOCK_STRATEGY == AlignmentBufferFinalBlock::must_be_deferred;
  235|      2|      }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE6appendENSt3__14spanIKhLm18446744073709551615EEE:
   90|      4|      void append(std::span<const T> elements) {
   91|      4|         BOTAN_ASSERT_NOMSG(elements.size() <= elements_until_alignment());
  ------------------
  |  |   77|      4|   do {                                                                     \
  |  |   78|      4|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|      4|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 4]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|      4|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 4]
  |  |  ------------------
  ------------------
   92|      4|         std::copy(elements.begin(), elements.end(), m_buffer.begin() + m_position);
   93|      4|         m_position += elements.size();
   94|      4|      }
_ZNK5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE24elements_until_alignmentEv:
  221|     10|      size_t elements_until_alignment() const { return m_buffer.size() - m_position; }
_ZNK5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE16ready_to_consumeEv:
  231|      8|      bool ready_to_consume() const { return m_position == m_buffer.size(); }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE7consumeEv:
  200|      2|      [[nodiscard]] std::span<const T> consume() {
  201|      2|         BOTAN_ASSERT_NOMSG(ready_to_consume());
  ------------------
  |  |   77|      2|   do {                                                                     \
  |  |   78|      2|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|      2|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 2]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|      2|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  202|      2|         m_position = 0;
  203|      2|         return m_buffer;
  204|      2|      }
_ZNK5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE12in_alignmentEv:
  226|      4|      bool in_alignment() const { return m_position == 0; }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE18fill_up_with_zerosEv:
   79|      2|      void fill_up_with_zeros() {
   80|      2|         if(!ready_to_consume()) {
  ------------------
  |  Branch (80:13): [True: 2, False: 0]
  ------------------
   81|      2|            zeroize_buffer(&m_buffer[m_position], elements_until_alignment());
   82|      2|            m_position = m_buffer.size();
   83|      2|         }
   84|      2|      }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE20directly_modify_lastEm:
  113|      2|      std::span<T> directly_modify_last(size_t elements) {
  114|      2|         BOTAN_ASSERT_NOMSG(size() >= elements);
  ------------------
  |  |   77|      2|   do {                                                                     \
  |  |   78|      2|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|      2|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 2]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|      2|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  115|      2|         return std::span(m_buffer).last(elements);
  116|      2|      }
_ZNK5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE4sizeEv:
  217|      2|      constexpr size_t size() const { return m_buffer.size(); }

_ZNK5Botan17Barrett_Reduction4cubeERKNS_6BigIntE:
   66|  3.60k|      BigInt cube(const BigInt& x) const { return this->multiply(x, this->square(x)); }
_ZNK5Botan17Barrett_Reduction12modulus_bitsEv:
   71|    740|      size_t modulus_bits() const { return m_modulus_bits; }

_ZN5Botan17ct_expand_top_bitITkNSt3__117unsigned_integralEmEET_S2_:
   28|   329M|BOTAN_FORCE_INLINE constexpr T ct_expand_top_bit(T a) {
   29|   329M|   const T top = CT::value_barrier<T>(a >> (sizeof(T) * 8 - 1));
   30|   329M|   return static_cast<T>(0) - top;
   31|   329M|}
_ZN5Botan10ct_is_zeroITkNSt3__117unsigned_integralEmEET_S2_:
   37|   296M|BOTAN_FORCE_INLINE constexpr T ct_is_zero(T x) {
   38|   296M|   return ct_expand_top_bit<T>(~x & (x - 1));
   39|   296M|}
_ZN5Botan6chooseITkNSt3__117unsigned_integralEmEET_S2_S2_S2_:
  216|   375M|BOTAN_FORCE_INLINE constexpr T choose(T mask, T a, T b) {
  217|       |   //return (mask & a) | (~mask & b);
  218|   375M|   return (b ^ (mask & (a ^ b)));
  219|   375M|}
_ZN5Botan8high_bitITkNSt3__117unsigned_integralEjEEmT_:
   73|  2.29k|BOTAN_FORCE_INLINE constexpr size_t high_bit(T n) {
   74|  2.29k|   size_t hb = 0;
   75|       |
   76|  13.7k|   for(size_t s = 8 * sizeof(T) / 2; s > 0; s /= 2) {
  ------------------
  |  Branch (76:38): [True: 11.4k, False: 2.29k]
  ------------------
   77|       |      // Equivalent to: ((n >> s) == 0) ? 0 : s;
   78|  11.4k|      const size_t z = s - ct_if_is_zero_ret<T>(n >> s, s);
   79|  11.4k|      hb += z;
   80|  11.4k|      n >>= z;
   81|  11.4k|   }
   82|       |
   83|  2.29k|   hb += n;
   84|       |
   85|  2.29k|   return hb;
   86|  2.29k|}
_ZN5Botan17ct_if_is_zero_retITkNSt3__117unsigned_integralEjEEmT_m:
   45|  11.4k|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|  11.4k|   const T a = ~x & (x - 1);
   51|  11.4k|   const size_t a_top = static_cast<size_t>(CT::value_barrier<T>(a >> (sizeof(T) * 8 - 1)));
   52|  11.4k|   const size_t mask = static_cast<size_t>(0) - a_top;
   53|  11.4k|   return mask & s;
   54|  11.4k|}
_ZN5Botan17ct_if_is_zero_retITkNSt3__117unsigned_integralEmEEmT_m:
   45|   965k|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|   965k|   const T a = ~x & (x - 1);
   51|   965k|   const size_t a_top = static_cast<size_t>(CT::value_barrier<T>(a >> (sizeof(T) * 8 - 1)));
   52|   965k|   const size_t mask = static_cast<size_t>(0) - a_top;
   53|   965k|   return mask & s;
   54|   965k|}
_ZN5Botan3ctzITkNSt3__117unsigned_integralEmEEmT_:
  115|  94.4k|BOTAN_FORCE_INLINE constexpr size_t ctz(T n) {
  116|       |   /*
  117|       |   * If n == 0 then this function will compute 8*sizeof(T)-1, so
  118|       |   * initialize lb to 1 if n == 0 to produce the expected result.
  119|       |   */
  120|  94.4k|   size_t lb = ct_if_is_zero_ret<T>(n, 1);
  121|       |
  122|   660k|   for(size_t s = 8 * sizeof(T) / 2; s > 0; s /= 2) {
  ------------------
  |  Branch (122:38): [True: 566k, False: 94.4k]
  ------------------
  123|   566k|      const T range = (static_cast<T>(1) << s) - 1;
  124|       |      // Equivalent to: ((n & range) == 0) ? s : 0;
  125|   566k|      const size_t z = ct_if_is_zero_ret<T>(n & range, s);
  126|   566k|      lb += z;
  127|   566k|      n >>= z;
  128|   566k|   }
  129|       |
  130|  94.4k|   return lb;
  131|  94.4k|}
_ZN5Botan13is_power_of_2ITkNSt3__117unsigned_integralEmEEbT_:
   62|  10.3k|BOTAN_FORCE_INLINE constexpr bool is_power_of_2(T arg) {
   63|  10.3k|   return (arg != 0) && (arg != 1) && ((arg & static_cast<T>(arg - 1)) == 0);
  ------------------
  |  Branch (63:11): [True: 10.3k, False: 0]
  |  Branch (63:25): [True: 10.3k, False: 0]
  |  Branch (63:39): [True: 5.62k, False: 4.75k]
  ------------------
   64|  10.3k|}
_ZN5Botan8high_bitITkNSt3__117unsigned_integralEmEEmT_:
   73|  50.7k|BOTAN_FORCE_INLINE constexpr size_t high_bit(T n) {
   74|  50.7k|   size_t hb = 0;
   75|       |
   76|   355k|   for(size_t s = 8 * sizeof(T) / 2; s > 0; s /= 2) {
  ------------------
  |  Branch (76:38): [True: 304k, False: 50.7k]
  ------------------
   77|       |      // Equivalent to: ((n >> s) == 0) ? 0 : s;
   78|   304k|      const size_t z = s - ct_if_is_zero_ret<T>(n >> s, s);
   79|   304k|      hb += z;
   80|   304k|      n >>= z;
   81|   304k|   }
   82|       |
   83|  50.7k|   hb += n;
   84|       |
   85|  50.7k|   return hb;
   86|  50.7k|}
_ZN5Botan9ceil_log2ITkNSt3__117unsigned_integralEmEEhT_QltstS2_Li32E:
  142|    882|{
  143|    882|   if(x >> (sizeof(T) * 8 - 1)) {
  ------------------
  |  Branch (143:7): [True: 0, False: 882]
  ------------------
  144|      0|      return sizeof(T) * 8;
  145|      0|   }
  146|       |
  147|    882|   uint8_t result = 0;
  148|    882|   T compare = 1;
  149|       |
  150|  10.3k|   while(compare < x) {
  ------------------
  |  Branch (150:10): [True: 9.43k, False: 882]
  ------------------
  151|  9.43k|      compare <<= 1;
  152|  9.43k|      result++;
  153|  9.43k|   }
  154|       |
  155|    882|   return result;
  156|    882|}
_ZN5Botan10ct_is_zeroITkNSt3__117unsigned_integralEhEET_S2_:
   37|   541k|BOTAN_FORCE_INLINE constexpr T ct_is_zero(T x) {
   38|   541k|   return ct_expand_top_bit<T>(~x & (x - 1));
   39|   541k|}
_ZN5Botan17ct_expand_top_bitITkNSt3__117unsigned_integralEhEET_S2_:
   28|   541k|BOTAN_FORCE_INLINE constexpr T ct_expand_top_bit(T a) {
   29|   541k|   const T top = CT::value_barrier<T>(a >> (sizeof(T) * 8 - 1));
   30|   541k|   return static_cast<T>(0) - top;
   31|   541k|}
_ZN5Botan6chooseITkNSt3__117unsigned_integralEhEET_S2_S2_S2_:
  216|   541k|BOTAN_FORCE_INLINE constexpr T choose(T mask, T a, T b) {
  217|       |   //return (mask & a) | (~mask & b);
  218|   541k|   return (b ^ (mask & (a ^ b)));
  219|   541k|}
_ZN5Botan9ceil_log2ITkNSt3__117unsigned_integralEjEEhT_QltstS2_Li32E:
  142|     64|{
  143|     64|   if(x >> (sizeof(T) * 8 - 1)) {
  ------------------
  |  Branch (143:7): [True: 0, False: 64]
  ------------------
  144|      0|      return sizeof(T) * 8;
  145|      0|   }
  146|       |
  147|     64|   uint8_t result = 0;
  148|     64|   T compare = 1;
  149|       |
  150|    498|   while(compare < x) {
  ------------------
  |  Branch (150:10): [True: 434, False: 64]
  ------------------
  151|    434|      compare <<= 1;
  152|    434|      result++;
  153|    434|   }
  154|       |
  155|     64|   return result;
  156|     64|}
_ZN5Botan12ceil_tobytesITkNSt3__117unsigned_integralEjEET_S2_:
  175|    128|BOTAN_FORCE_INLINE constexpr T ceil_tobytes(T bits) {
  176|    128|   return (bits + 7) / 8;
  177|    128|}
_ZN5Botan8majorityITkNSt3__117unsigned_integralEmEET_S2_S2_S2_:
  222|    160|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|    160|   return choose(a ^ b, c, b);
  233|    160|}
_ZN5Botan10ct_is_zeroITkNSt3__117unsigned_integralEjEET_S2_:
   37|  1.15k|BOTAN_FORCE_INLINE constexpr T ct_is_zero(T x) {
   38|  1.15k|   return ct_expand_top_bit<T>(~x & (x - 1));
   39|  1.15k|}
_ZN5Botan17ct_expand_top_bitITkNSt3__117unsigned_integralEjEET_S2_:
   28|   130k|BOTAN_FORCE_INLINE constexpr T ct_expand_top_bit(T a) {
   29|   130k|   const T top = CT::value_barrier<T>(a >> (sizeof(T) * 8 - 1));
   30|   130k|   return static_cast<T>(0) - top;
   31|   130k|}

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

_ZN5Botan12BufferSlicerC2ENSt3__14spanIKhLm18446744073709551615EEE:
   25|  20.3k|      explicit BufferSlicer(std::span<const uint8_t> buffer) : m_remaining(buffer) {}
_ZNK5Botan12BufferSlicer5emptyEv:
   68|   263k|      bool empty() const { return m_remaining.empty(); }
_ZN5Botan12BufferSlicer9take_byteEv:
   57|   133k|      uint8_t take_byte() { return take(1)[0]; }
_ZN5Botan12BufferSlicer4takeEm:
   37|   138k|      std::span<const uint8_t> take(const size_t count) {
   38|   138k|         BOTAN_STATE_CHECK(remaining() >= count);
  ------------------
  |  |   51|   138k|   do {                                                         \
  |  |   52|   138k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|   138k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 138k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|   138k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 138k]
  |  |  ------------------
  ------------------
   39|   138k|         auto result = m_remaining.first(count);
   40|   138k|         m_remaining = m_remaining.subspan(count);
   41|   138k|         return result;
   42|   138k|      }
_ZNK5Botan12BufferSlicer9remainingEv:
   66|   191k|      size_t remaining() const { return m_remaining.size(); }
_ZN5Botan12BufferSlicer9copy_intoENSt3__14spanIhLm18446744073709551615EEE:
   59|  4.46k|      void copy_into(std::span<uint8_t> sink) {
   60|  4.46k|         const auto data = take(sink.size());
   61|  4.46k|         std::copy(data.begin(), data.end(), sink.begin());
   62|  4.46k|      }
_ZN5Botan12BufferSlicer4copyITkNS_8concepts20contiguous_containerENS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS_18SphincsPublicSeed_EJEEEEEDam:
   28|      2|      auto copy(const size_t count) {
   29|      2|         const auto result = take(count);
   30|      2|         return ContainerT(result.begin(), result.end());
   31|      2|      }
_ZN5Botan12BufferSlicer4copyITkNS_8concepts20contiguous_containerENS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS_16SphincsTreeNode_EJEEEEEDam:
   28|      2|      auto copy(const size_t count) {
   29|      2|         const auto result = take(count);
   30|      2|         return ContainerT(result.begin(), result.end());
   31|      2|      }
_ZN5Botan12BufferSlicer4copyITkNS_8concepts20contiguous_containerENS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_18SphincsSecretSeed_EJEEEEEDam:
   28|      2|      auto copy(const size_t count) {
   29|      2|         const auto result = take(count);
   30|      2|         return ContainerT(result.begin(), result.end());
   31|      2|      }
_ZN5Botan12BufferSlicer4copyITkNS_8concepts20contiguous_containerENS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_17SphincsSecretPRF_EJEEEEEDam:
   28|      2|      auto copy(const size_t count) {
   29|      2|         const auto result = take(count);
   30|      2|         return ContainerT(result.begin(), result.end());
   31|      2|      }
_ZN5Botan12BufferSlicer4takeILm8EEENSt3__14spanIKhXT_EEEv:
   45|  46.6k|      std::span<const uint8_t, count> take() {
   46|  46.6k|         BOTAN_STATE_CHECK(remaining() >= count);
  ------------------
  |  |   51|  46.6k|   do {                                                         \
  |  |   52|  46.6k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  46.6k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 46.6k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  46.6k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 46.6k]
  |  |  ------------------
  ------------------
   47|  46.6k|         auto result = m_remaining.first<count>();
   48|  46.6k|         m_remaining = m_remaining.subspan(count);
   49|  46.6k|         return result;
   50|  46.6k|      }
_ZN5Botan12BufferSlicer4copyITkNS_8concepts20contiguous_containerENS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS_13KyberSeedRho_EJEEEEEDam:
   28|     28|      auto copy(const size_t count) {
   29|     28|         const auto result = take(count);
   30|     28|         return ContainerT(result.begin(), result.end());
   31|     28|      }
_ZN5Botan12BufferSlicer4copyITkNS_8concepts20contiguous_containerENS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_15KyberSeedSigma_EJEEEEEDam:
   28|     28|      auto copy(const size_t count) {
   29|     28|         const auto result = take(count);
   30|     28|         return ContainerT(result.begin(), result.end());
   31|     28|      }
_ZN5Botan12BufferSlicer4takeILm4EEENSt3__14spanIKhXT_EEEv:
   45|  5.31k|      std::span<const uint8_t, count> take() {
   46|  5.31k|         BOTAN_STATE_CHECK(remaining() >= count);
  ------------------
  |  |   51|  5.31k|   do {                                                         \
  |  |   52|  5.31k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  5.31k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 5.31k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  5.31k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 5.31k]
  |  |  ------------------
  ------------------
   47|  5.31k|         auto result = m_remaining.first<count>();
   48|  5.31k|         m_remaining = m_remaining.subspan(count);
   49|  5.31k|         return result;
   50|  5.31k|      }
_ZN5Botan12BufferSlicer4takeILm3EEENSt3__14spanIKhXT_EEEv:
   45|  1.28k|      std::span<const uint8_t, count> take() {
   46|  1.28k|         BOTAN_STATE_CHECK(remaining() >= count);
  ------------------
  |  |   51|  1.28k|   do {                                                         \
  |  |   52|  1.28k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  1.28k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 1.28k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  1.28k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 1.28k]
  |  |  ------------------
  ------------------
   47|  1.28k|         auto result = m_remaining.first<count>();
   48|  1.28k|         m_remaining = m_remaining.subspan(count);
   49|  1.28k|         return result;
   50|  1.28k|      }
_ZN5Botan12BufferSlicer4copyITkNS_8concepts20contiguous_containerENS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_28KyberImplicitRejectionValue_EJEEEEEDam:
   28|     28|      auto copy(const size_t count) {
   29|     28|         const auto result = take(count);
   30|     28|         return ContainerT(result.begin(), result.end());
   31|     28|      }
_ZN5Botan12BufferSlicer4copyITkNS_8concepts20contiguous_containerENS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_20KyberSeedRandomness_EJEEEEEDam:
   28|     28|      auto copy(const size_t count) {
   29|     28|         const auto result = take(count);
   30|     28|         return ContainerT(result.begin(), result.end());
   31|     28|      }

_ZN5Botan13BufferStufferC2ENSt3__14spanIhLm18446744073709551615EEE:
   26|   967k|      constexpr explicit BufferStuffer(std::span<uint8_t> buffer) : m_buffer(buffer) {}
_ZN5Botan13BufferStuffer6appendEhm:
   64|  1.65k|      constexpr void append(uint8_t b, size_t repeat = 1) {
   65|  1.65k|         auto sink = next(repeat);
   66|  1.65k|         std::fill(sink.begin(), sink.end(), b);
   67|  1.65k|      }
_ZN5Botan13BufferStuffer4nextEm:
   32|  1.20M|      constexpr std::span<uint8_t> next(size_t bytes) {
   33|  1.20M|         BOTAN_STATE_CHECK(m_buffer.size() >= bytes);
  ------------------
  |  |   51|  1.20M|   do {                                                         \
  |  |   52|  1.20M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  1.20M|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 1.20M]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  1.20M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 1.20M]
  |  |  ------------------
  ------------------
   34|       |
   35|  1.20M|         auto result = m_buffer.first(bytes);
   36|  1.20M|         m_buffer = m_buffer.subspan(bytes);
   37|  1.20M|         return result;
   38|  1.20M|      }
_ZN5Botan13BufferStuffer6appendENSt3__14spanIKhLm18446744073709551615EEE:
   59|  1.20M|      constexpr void append(std::span<const uint8_t> buffer) {
   60|  1.20M|         auto sink = next(buffer.size());
   61|  1.20M|         std::copy(buffer.begin(), buffer.end(), sink.begin());
   62|  1.20M|      }
_ZNK5Botan13BufferStuffer4fullEv:
   69|   965k|      constexpr bool full() const { return m_buffer.empty(); }
_ZN5Botan13BufferStuffer4nextILm32EEENSt3__14spanIhXT_EEEv:
   41|    792|      constexpr std::span<uint8_t, bytes> next() {
   42|    792|         BOTAN_STATE_CHECK(m_buffer.size() >= bytes);
  ------------------
  |  |   51|    792|   do {                                                         \
  |  |   52|    792|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    792|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 792]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    792|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 792]
  |  |  ------------------
  ------------------
   43|       |
   44|    792|         auto result = m_buffer.first<bytes>();
   45|    792|         m_buffer = m_buffer.subspan(bytes);
   46|    792|         return result;
   47|    792|      }
_ZN5Botan13BufferStuffer4nextILm48EEENSt3__14spanIhXT_EEEv:
   41|    722|      constexpr std::span<uint8_t, bytes> next() {
   42|    722|         BOTAN_STATE_CHECK(m_buffer.size() >= bytes);
  ------------------
  |  |   51|    722|   do {                                                         \
  |  |   52|    722|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    722|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 722]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    722|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 722]
  |  |  ------------------
  ------------------
   43|       |
   44|    722|         auto result = m_buffer.first<bytes>();
   45|    722|         m_buffer = m_buffer.subspan(bytes);
   46|    722|         return result;
   47|    722|      }
_ZN5Botan13BufferStuffer4nextILm64EEENSt3__14spanIhXT_EEEv:
   41|    278|      constexpr std::span<uint8_t, bytes> next() {
   42|    278|         BOTAN_STATE_CHECK(m_buffer.size() >= bytes);
  ------------------
  |  |   51|    278|   do {                                                         \
  |  |   52|    278|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    278|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 278]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    278|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 278]
  |  |  ------------------
  ------------------
   43|       |
   44|    278|         auto result = m_buffer.first<bytes>();
   45|    278|         m_buffer = m_buffer.subspan(bytes);
   46|    278|         return result;
   47|    278|      }
_ZN5Botan13BufferStuffer4nextILm28EEENSt3__14spanIhXT_EEEv:
   41|    434|      constexpr std::span<uint8_t, bytes> next() {
   42|    434|         BOTAN_STATE_CHECK(m_buffer.size() >= bytes);
  ------------------
  |  |   51|    434|   do {                                                         \
  |  |   52|    434|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    434|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 434]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    434|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 434]
  |  |  ------------------
  ------------------
   43|       |
   44|    434|         auto result = m_buffer.first<bytes>();
   45|    434|         m_buffer = m_buffer.subspan(bytes);
   46|    434|         return result;
   47|    434|      }
_ZN5Botan13BufferStuffer4nextILm66EEENSt3__14spanIhXT_EEEv:
   41|    410|      constexpr std::span<uint8_t, bytes> next() {
   42|    410|         BOTAN_STATE_CHECK(m_buffer.size() >= bytes);
  ------------------
  |  |   51|    410|   do {                                                         \
  |  |   52|    410|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    410|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 410]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    410|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 410]
  |  |  ------------------
  ------------------
   43|       |
   44|    410|         auto result = m_buffer.first<bytes>();
   45|    410|         m_buffer = m_buffer.subspan(bytes);
   46|    410|         return result;
   47|    410|      }

_ZN5Botan13nibble_to_hexEh:
   76|     64|inline constexpr char nibble_to_hex(uint8_t b) {
   77|     64|   const uint8_t n = b & 0x0F;
   78|     64|   return static_cast<char>(n < 10 ? '0' + n : 'A' + (n - 10));
  ------------------
  |  Branch (78:29): [True: 43, False: 21]
  ------------------
   79|     64|}

base64.cpp:_ZN5Botan11base_decodeINS_12_GLOBAL__N_16Base64EEEmRKT_PhPKcmRmbb:
  124|    112|                   bool ignore_ws = true) {
  125|       |   // TODO(Botan4) Check if we can use just base. or Base:: here instead
  126|    112|   constexpr size_t decoding_bytes_in = std::remove_reference_t<Base>::decoding_bytes_in();
  127|    112|   constexpr size_t decoding_bytes_out = std::remove_reference_t<Base>::decoding_bytes_out();
  128|       |
  129|    112|   input_consumed = 0;
  130|       |
  131|    112|   uint8_t* out_ptr = output;
  132|    112|   std::array<uint8_t, decoding_bytes_in> decode_buf{};
  133|    112|   size_t decode_buf_pos = 0;
  134|    112|   size_t final_truncate = 0;
  135|    112|   bool seen_padding = false;
  136|       |
  137|    112|   clear_mem(output, base.decode_max_output(input_length));
  138|       |
  139|  19.0k|   for(size_t i = 0; i != input_length; ++i) {
  ------------------
  |  Branch (139:22): [True: 18.9k, False: 104]
  ------------------
  140|  18.9k|      const uint8_t bin = base.lookup_binary_value(input[i]);
  141|       |
  142|       |      // This call might throw Invalid_Argument
  143|  18.9k|      if(base.check_bad_char(bin, input[i], ignore_ws)) {
  ------------------
  |  Branch (143:10): [True: 1.44k, False: 17.5k]
  ------------------
  144|       |         // Padding may only appear at the end, so a data symbol must never
  145|       |         // follow one (0x81 marks a padding character)
  146|  1.44k|         if(seen_padding) {
  ------------------
  |  Branch (146:13): [True: 3, False: 1.44k]
  ------------------
  147|      3|            throw Invalid_Argument(base.name() + " decoding failed, data follows padding");
  148|      3|         }
  149|  1.44k|         decode_buf[decode_buf_pos] = bin;
  150|  1.44k|         ++decode_buf_pos;
  151|  17.5k|      } else if(bin == 0x81) {
  ------------------
  |  Branch (151:17): [True: 384, False: 17.1k]
  ------------------
  152|    384|         seen_padding = true;
  153|    384|      }
  154|       |
  155|       |      /*
  156|       |      * If we're at the end of the input, pad with 0s and truncate
  157|       |      */
  158|  18.9k|      if(final_inputs && (i == input_length - 1)) {
  ------------------
  |  Branch (158:10): [True: 18.9k, False: 34]
  |  Branch (158:26): [True: 55, False: 18.8k]
  ------------------
  159|     55|         if(decode_buf_pos) {
  ------------------
  |  Branch (159:13): [True: 24, False: 31]
  ------------------
  160|     24|            const size_t bits_per_symbol = base.bits_consumed();
  161|     24|            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|     24|            if(pad_bits >= bits_per_symbol) {
  ------------------
  |  Branch (165:16): [True: 3, False: 21]
  ------------------
  166|      3|               throw Invalid_Argument(base.name() + " decoding failed, invalid length");
  167|      3|            }
  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|     21|            const uint8_t pad_mask = static_cast<uint8_t>((1U << pad_bits) - 1);
  172|     21|            if(decode_buf[decode_buf_pos - 1] & pad_mask) {
  ------------------
  |  Branch (172:16): [True: 2, False: 19]
  ------------------
  173|      2|               throw Invalid_Argument(base.name() + " decoding failed, nonzero padding bits");
  174|      2|            }
  175|       |
  176|     36|            for(size_t j = decode_buf_pos; j < decoding_bytes_in; ++j) {
  ------------------
  |  Branch (176:44): [True: 17, False: 19]
  ------------------
  177|     17|               decode_buf[j] = 0;
  178|     17|            }
  179|       |
  180|     19|            final_truncate = decoding_bytes_in - decode_buf_pos;
  181|     19|            decode_buf_pos = decoding_bytes_in;
  182|     19|         }
  183|     55|      }
  184|       |
  185|  18.9k|      if(decode_buf_pos == decoding_bytes_in) {
  ------------------
  |  Branch (185:10): [True: 360, False: 18.5k]
  ------------------
  186|    360|         base.decode(out_ptr, decode_buf.data());
  187|       |
  188|    360|         out_ptr += decoding_bytes_out;
  189|    360|         decode_buf_pos = 0;
  190|    360|         input_consumed = i + 1;
  191|    360|      }
  192|  18.9k|   }
  193|       |
  194|  7.48k|   while(input_consumed < input_length && base.lookup_binary_value(input[input_consumed]) == 0x80) {
  ------------------
  |  Branch (194:10): [True: 7.39k, False: 89]
  |  Branch (194:43): [True: 7.37k, False: 15]
  ------------------
  195|  7.37k|      ++input_consumed;
  196|  7.37k|   }
  197|       |
  198|    104|   const size_t written = (out_ptr - output) - base.bytes_to_remove(final_truncate);
  199|       |
  200|    104|   return written;
  201|    112|}
base64.cpp:_ZN5Botan16base_decode_fullINS_12_GLOBAL__N_16Base64EEEmRKT_PhPKcmb:
  204|    112|size_t base_decode_full(const Base& base, uint8_t output[], const char input[], size_t input_length, bool ignore_ws) {
  205|    112|   size_t consumed = 0;
  206|    112|   const size_t written = base_decode(base, output, input, input_length, consumed, true, ignore_ws);
  207|       |
  208|    112|   if(consumed != input_length) {
  ------------------
  |  Branch (208:7): [True: 15, False: 97]
  ------------------
  209|     15|      throw Invalid_Argument(base.name() + " decoding failed, input did not have full bytes");
  210|     15|   }
  211|       |
  212|     97|   return written;
  213|    112|}
base64.cpp:_ZN5Botan18base_decode_to_vecINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_12_GLOBAL__N_16Base64EEET_RKT0_PKcmb:
  216|    112|Vector base_decode_to_vec(const Base& base, const char input[], size_t input_length, bool ignore_ws) {
  217|    112|   const size_t output_length = base.decode_max_output(input_length);
  218|    112|   Vector bin(output_length);
  219|       |
  220|    112|   const size_t written = base_decode_full(base, bin.data(), input, input_length, ignore_ws);
  221|       |
  222|    112|   bin.resize(written);
  223|    112|   return bin;
  224|    112|}

_ZN5Botan6concatINS_6detail10AutoDetectETpTkNS_6ranges14spanable_rangeEJNSt3__16vectorIhNS4_9allocatorIhEEEERNS_6StrongIS8_NS_13KyberSeedRho_EJEEEEEEDaDpOT0_Q10all_same_vIDpNS4_11conditionalIXsr21__is_primary_templateINS4_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS4_6ranges5__cpo5beginEEclsr3stdE7declvalIRSD_EEEEEEEEE5valueENS4_26indirectly_readable_traitsISM_EESN_E4type10value_typeEE:
   92|     28|{
   93|     28|   if constexpr(std::same_as<detail::AutoDetect, OutR>) {
   94|       |      // Try to auto-detect a reasonable output type given the input ranges
   95|     28|      static_assert(sizeof...(Rs) > 0, "Cannot auto-detect the output type if not a single input range is provided.");
   96|     28|      using candidate_result_t = std::remove_cvref_t<std::tuple_element_t<0, std::tuple<Rs...>>>;
   97|     28|      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|     28|      } 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|     28|         static_assert(
  109|     28|            concepts::reservable_container<candidate_result_t>,
  110|     28|            "First input range has static extent, but a dynamically allocated output range is required. Please explicitly specify a dynamically allocatable output type.");
  111|     28|         return detail::concatenate<candidate_result_t>(std::forward<Rs>(ranges)...);
  112|     28|      }
  113|       |   } else {
  114|       |      // The caller has explicitly specified the output type
  115|       |      return detail::concatenate<OutR>(std::forward<Rs>(ranges)...);
  116|       |   }
  117|     28|}
_ZN5Botan6detail11concatenateITkNS_6ranges14spanable_rangeENSt3__16vectorIhNS3_9allocatorIhEEEETpTkNS2_14spanable_rangeEJS7_RNS_6StrongIS7_NS_13KyberSeedRho_EJEEEEEET_DpOT0_Qoosr8conceptsE20reservable_containerISC_Esr6rangesE25statically_spanable_rangeISC_E:
   33|     28|{
   34|     28|   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|     28|   [[maybe_unused]] auto fill_fn = [&] {
   40|     28|      if constexpr(concepts::reservable_container<OutR>) {
   41|       |         // dynamically allocate the correct result byte length
   42|     28|         const size_t total_size = (ranges.size() + ... + 0);
   43|     28|         result.reserve(total_size);
   44|       |
   45|       |         // fill the result buffer using a back-inserter
   46|     28|         return [&result](auto&& range) {
   47|     28|            std::copy(
   48|     28|               std::ranges::begin(range), std::ranges::end(range), std::back_inserter(unwrap_strong_type(result)));
   49|     28|         };
   50|     28|      } else {
   51|     28|         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|     28|            [[maybe_unused]] constexpr size_t total_size = (decltype(std::span{ranges})::extent + ... + 0);
   55|     28|            static_assert(result.size() == total_size, "size of result buffer does not match the sum of input buffers");
   56|     28|         } else {
   57|       |            // at least one input range has a dynamic extent, so check the total size at runtime
   58|     28|            const size_t total_size = (ranges.size() + ... + 0);
   59|     28|            BOTAN_ARG_CHECK(result.size() == total_size,
   60|     28|                            "result buffer has static extent that does not match the sum of input buffers");
   61|     28|         }
   62|       |
   63|       |         // fill the result buffer and hold the current output-iterator position
   64|     28|         return [itr = std::ranges::begin(result)](auto&& range) mutable {
   65|     28|            std::copy(std::ranges::begin(range), std::ranges::end(range), itr);
   66|     28|            std::advance(itr, std::ranges::size(range));
   67|     28|         };
   68|     28|      }
   69|     28|   }();
   70|       |
   71|       |   // perform the actual concatenation
   72|     28|   (fill_fn(std::forward<Rs>(ranges)), ...);
   73|       |
   74|     28|   return result;
   75|     28|}
_ZZN5Botan6detail11concatenateITkNS_6ranges14spanable_rangeENSt3__16vectorIhNS3_9allocatorIhEEEETpTkNS2_14spanable_rangeEJS7_RNS_6StrongIS7_NS_13KyberSeedRho_EJEEEEEET_DpOT0_Qoosr8conceptsE20reservable_containerISC_Esr6rangesE25statically_spanable_rangeISC_EENKUlvE_clEv:
   39|     28|   [[maybe_unused]] auto fill_fn = [&] {
   40|     28|      if constexpr(concepts::reservable_container<OutR>) {
   41|       |         // dynamically allocate the correct result byte length
   42|     28|         const size_t total_size = (ranges.size() + ... + 0);
   43|     28|         result.reserve(total_size);
   44|       |
   45|       |         // fill the result buffer using a back-inserter
   46|     28|         return [&result](auto&& range) {
   47|     28|            std::copy(
   48|     28|               std::ranges::begin(range), std::ranges::end(range), std::back_inserter(unwrap_strong_type(result)));
   49|     28|         };
   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|     28|   }();
_ZZZN5Botan6detail11concatenateITkNS_6ranges14spanable_rangeENSt3__16vectorIhNS3_9allocatorIhEEEETpTkNS2_14spanable_rangeEJS7_RNS_6StrongIS7_NS_13KyberSeedRho_EJEEEEEET_DpOT0_Qoosr8conceptsE20reservable_containerISC_Esr6rangesE25statically_spanable_rangeISC_EENKUlvE_clEvENKUlOSC_E_clIS7_EEDaSH_:
   46|     28|         return [&result](auto&& range) {
   47|     28|            std::copy(
   48|     28|               std::ranges::begin(range), std::ranges::end(range), std::back_inserter(unwrap_strong_type(result)));
   49|     28|         };
_ZZZN5Botan6detail11concatenateITkNS_6ranges14spanable_rangeENSt3__16vectorIhNS3_9allocatorIhEEEETpTkNS2_14spanable_rangeEJS7_RNS_6StrongIS7_NS_13KyberSeedRho_EJEEEEEET_DpOT0_Qoosr8conceptsE20reservable_containerISC_Esr6rangesE25statically_spanable_rangeISC_EENKUlvE_clEvENKUlOSC_E_clISB_EEDaSH_:
   46|     28|         return [&result](auto&& range) {
   47|     28|            std::copy(
   48|     28|               std::ranges::begin(range), std::ranges::end(range), std::back_inserter(unwrap_strong_type(result)));
   49|     28|         };

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

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

_ZN5Botan2CT6Choice9from_maskEm:
  303|  8.81M|      constexpr static Choice from_mask(underlying_type v) { return Choice(v); }
_ZN5Botan2CT6Choice2noEv:
  307|    468|      constexpr static Choice no() { return Choice(0); }
_ZNK5Botan2CT6ChoicentEv:
  309|  3.17M|      constexpr Choice operator!() const { return Choice(~value()); }
_ZNK5Botan2CT6ChoiceaaERKS1_:
  311|  4.11M|      constexpr Choice operator&&(const Choice& other) const { return Choice(value() & other.value()); }
_ZNK5Botan2CT6ChoiceooERKS1_:
  313|   716k|      constexpr Choice operator||(const Choice& other) const { return Choice(value() | other.value()); }
_ZNK5Botan2CT6Choice7as_boolEv:
  329|  3.18M|      constexpr bool as_bool() const { return m_value != 0; }
_ZNK5Botan2CT6Choice5valueEv:
  332|  16.6M|      constexpr underlying_type value() const { return value_barrier(m_value); }
_ZN5Botan2CT6ChoiceC2Em:
  341|  19.0M|      constexpr explicit Choice(underlying_type v) : m_value(CT::value_barrier<underlying_type>(v)) {}
_ZN5Botan2CT4MaskImE7is_zeroEm:
  437|   104M|      static constexpr Mask<T> is_zero(T x) { return Mask<T>(ct_is_zero<T>(value_barrier<T>(x))); }
_ZNK5Botan2CT4MaskImE5valueEv:
  630|   277M|      constexpr T value() const { return value_barrier<T>(m_mask); }
_ZNK5Botan2CT4MaskImEcoEv:
  533|  49.8M|      constexpr Mask<T> operator~() const { return Mask<T>(~value()); }
_ZN5Botan2CT4MaskImE6expandEm:
  392|  49.4M|      static constexpr Mask<T> expand(T v) { return ~Mask<T>::is_zero(value_barrier<T>(v)); }
_ZN5Botan2CT6poisonImEEvPKT_m:
   56|  2.50M|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|  2.50M|   BOTAN_UNUSED(p, n);
  ------------------
  |  |  144|  2.50M|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   64|  2.50M|}
_ZN5Botan2CT6poisonITkNS_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_typeEEnt17custom_poisonableISC_EEEvRKSC_:
  121|  23.7k|constexpr void poison(const R& r) {
  122|  23.7k|   const std::span s{r};
  123|  23.7k|   poison(s.data(), s.size());
  124|  23.7k|}
_ZN5Botan2CT8unpoisonImEEvPKT_m:
   67|  46.3M|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|  46.3M|   BOTAN_UNUSED(p, n);
  ------------------
  |  |  144|  46.3M|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   75|  46.3M|}
_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|  7.42M|constexpr void unpoison(const R& r) {
  129|  7.42M|   const std::span s{r};
  130|  7.42M|   unpoison(s.data(), s.size());
  131|  7.42M|}
_ZNK5Botan2CT4MaskImE6selectEmm:
  548|  70.0M|      constexpr T select(T x, T y) const { return choose(value(), x, y); }
_ZNK5Botan2CT4MaskImE16conditional_swapImEEvRT_S5_QlestTL0__stS4_:
  587|  6.28k|      {
  588|  6.28k|         auto cnd = Mask<U>(*this);
  589|  6.28k|         U t0 = cnd.select(y, x);
  590|  6.28k|         U t1 = cnd.select(x, y);
  591|  6.28k|         x = t0;
  592|  6.28k|         y = t1;
  593|  6.28k|      }
_ZN5Botan2CT9all_zerosImEENS0_4MaskIT_EEPKS3_m:
  785|  6.54M|constexpr inline CT::Mask<T> all_zeros(const T elem[], size_t len) {
  786|  6.54M|   T sum = 0;
  787|  51.6M|   for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (787:22): [True: 45.1M, False: 6.54M]
  ------------------
  788|  45.1M|      sum |= elem[i];
  789|  45.1M|   }
  790|  6.54M|   return CT::Mask<T>::is_zero(sum);
  791|  6.54M|}
_ZN5Botan2CT4MaskImEC2Em:
  637|   201M|      constexpr explicit Mask(T m) : m_mask(m) {}
_ZNK5Botan2CT4MaskImE7as_boolEv:
  614|   755k|      constexpr bool as_bool() const { return unpoisoned_value() != 0; }
_ZNK5Botan2CT4MaskImE16unpoisoned_valueEv:
  598|  9.56M|      constexpr T unpoisoned_value() const {
  599|  9.56M|         T r = value();
  600|  9.56M|         CT::unpoison(r);
  601|  9.56M|         return r;
  602|  9.56M|      }
_ZN5Botan2CT8unpoisonITkNSt3__18integralEmEEvRKT_:
  112|  27.5M|constexpr void unpoison(const T& p) {
  113|  27.5M|   unpoison(&p, 1);
  114|  27.5M|}
_ZN5Botan2CTanENS0_4MaskImEES2_:
  518|   355k|      friend Mask<T> operator&(Mask<T> x, Mask<T> y) { return Mask<T>(x.value() & y.value()); }
_ZN5Botan2CT4MaskImE8is_equalEmm:
  442|  40.1M|      static constexpr Mask<T> is_equal(T x, T y) {
  443|  40.1M|         const T diff = value_barrier(x) ^ value_barrier(y);
  444|  40.1M|         return Mask<T>::is_zero(diff);
  445|  40.1M|      }
_ZNK5Botan2CT4MaskImE13if_set_returnEm:
  538|  35.7M|      constexpr T if_set_return(T x) const { return value() & x; }
_ZN5Botan2CT4MaskImE5is_ltEmm:
  450|  32.7M|      static constexpr Mask<T> is_lt(T x, T y) {
  451|  32.7M|         T u = x ^ ((x ^ y) | ((x - y) ^ x));
  452|  32.7M|         return Mask<T>::expand_top_bit(u);
  453|  32.7M|      }
_ZN5Botan2CT4MaskImE14expand_top_bitEm:
  415|  33.1M|      static constexpr Mask<T> expand_top_bit(T v) { return Mask<T>(ct_expand_top_bit<T>(v)); }
_ZN5Botan2CT20conditional_copy_memImEENS0_4MaskIT_EES3_PS3_PKS3_S7_m:
  738|  2.52M|constexpr inline Mask<T> conditional_copy_mem(T cnd, T* dest, const T* if_set, const T* if_unset, size_t elems) {
  739|  2.52M|   const auto mask = CT::Mask<T>::expand(cnd);
  740|  2.52M|   return CT::conditional_copy_mem(mask, dest, if_set, if_unset, elems);
  741|  2.52M|}
_ZN5Botan2CT20conditional_copy_memImEENS0_4MaskIT_EES4_PS3_PKS3_S7_m:
  732|  2.52M|constexpr inline Mask<T> conditional_copy_mem(Mask<T> mask, T* dest, const T* if_set, const T* if_unset, size_t elems) {
  733|  2.52M|   mask.select_n(dest, if_set, if_unset, elems);
  734|  2.52M|   return mask;
  735|  2.52M|}
_ZNK5Botan2CT4MaskImE8select_nEPmPKmS5_m:
  565|  43.9M|      constexpr void select_n(T output[], const T x[], const T y[], size_t len) const {
  566|  43.9M|         const T mask = value();
  567|   288M|         for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (567:28): [True: 244M, False: 43.9M]
  ------------------
  568|   244M|            output[i] = choose(mask, x[i], y[i]);
  569|   244M|         }
  570|  43.9M|      }
_ZNK5Botan2CT4MaskImE11select_maskES2_S2_:
  559|  13.9M|      Mask<T> select_mask(Mask<T> x, Mask<T> y) const { return Mask<T>(select(x.value(), y.value())); }
_ZN5Botan2CT4MaskImEoRES2_:
  510|   148k|      Mask<T>& operator|=(Mask<T> o) {
  511|   148k|         m_mask |= o.value();
  512|   148k|         return (*this);
  513|   148k|      }
_ZN5Botan2CT4MaskImEaNES2_:
  494|  2.16M|      Mask<T>& operator&=(Mask<T> o) {
  495|  2.16M|         m_mask &= o.value();
  496|  2.16M|         return (*this);
  497|  2.16M|      }
_ZN5Botan2CT4MaskImE11expand_boolEb:
  397|   537k|      static constexpr Mask<T> expand_bool(bool v) { return Mask<T>::expand(static_cast<T>(v)); }
_ZN5Botan2CT4MaskIhE11expand_boolEb:
  397|   541k|      static constexpr Mask<T> expand_bool(bool v) { return Mask<T>::expand(static_cast<T>(v)); }
_ZN5Botan2CT4MaskIhE6expandEh:
  392|   541k|      static constexpr Mask<T> expand(T v) { return ~Mask<T>::is_zero(value_barrier<T>(v)); }
_ZN5Botan2CT4MaskIhE7is_zeroEh:
  437|   541k|      static constexpr Mask<T> is_zero(T x) { return Mask<T>(ct_is_zero<T>(value_barrier<T>(x))); }
_ZN5Botan2CT4MaskIhEC2Eh:
  637|  1.08M|      constexpr explicit Mask(T m) : m_mask(m) {}
_ZNK5Botan2CT4MaskIhEcoEv:
  533|   541k|      constexpr Mask<T> operator~() const { return Mask<T>(~value()); }
_ZNK5Botan2CT4MaskIhE5valueEv:
  630|  1.08M|      constexpr T value() const { return value_barrier<T>(m_mask); }
_ZNK5Botan2CT4MaskIhE6selectEhh:
  548|   541k|      constexpr T select(T x, T y) const { return choose(value(), x, y); }
_ZNK5Botan2CT4MaskImE9as_choiceEv:
  619|  8.81M|      constexpr CT::Choice as_choice() const {
  620|  8.81M|         if constexpr(sizeof(T) >= sizeof(Choice::underlying_type)) {
  621|  8.81M|            return CT::Choice::from_mask(static_cast<Choice::underlying_type>(unpoisoned_value()));
  622|       |         } else {
  623|       |            return CT::Choice::from_int(unpoisoned_value());
  624|       |         }
  625|  8.81M|      }
_ZN5Botan2CT4MaskImE6is_gteEmm:
  468|   344k|      static constexpr Mask<T> is_gte(T x, T y) { return ~Mask<T>::is_lt(x, y); }
_ZN5Botan2CTorENS0_4MaskImEES2_:
  528|   344k|      friend Mask<T> operator|(Mask<T> x, Mask<T> y) { return Mask<T>(x.value() | y.value()); }
_ZN5Botan2CTeoENS0_4MaskImEES2_:
  523|    224|      friend Mask<T> operator^(Mask<T> x, Mask<T> y) { return Mask<T>(x.value() ^ y.value()); }
_ZN5Botan2CT6Choice8from_intIjQaasr3stdE17unsigned_integralIT_Entsr3stdE7same_asIbS3_EEES1_S3_:
  268|  2.20M|      constexpr static Choice from_int(T v) {
  269|  2.20M|         if constexpr(sizeof(T) <= sizeof(underlying_type)) {
  270|  2.20M|            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|  2.20M|      }
_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|  2.47M|constexpr void poison(const R& r) {
  122|  2.47M|   const std::span s{r};
  123|  2.47M|   poison(s.data(), s.size());
  124|  2.47M|}
_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|  2.47M|constexpr void unpoison(const R& r) {
  129|  2.47M|   const std::span s{r};
  130|  2.47M|   unpoison(s.data(), s.size());
  131|  2.47M|}
_ZN5Botan2CT4MaskImE15if_set_zero_outEPmm:
  575|  3.23M|      constexpr void if_set_zero_out(T buf[], size_t elems) {
  576|  32.3M|         for(size_t i = 0; i != elems; ++i) {
  ------------------
  |  Branch (576:28): [True: 29.1M, False: 3.23M]
  ------------------
  577|  29.1M|            buf[i] = this->if_not_set_return(buf[i]);
  578|  29.1M|         }
  579|  3.23M|      }
_ZNK5Botan2CT4MaskImE17if_not_set_returnEm:
  543|  29.2M|      constexpr T if_not_set_return(T x) const { return ~value() & x; }
_ZN5Botan2CT22conditional_assign_memImEENS0_4MaskIT_EES3_PS3_PKS3_m:
  749|  33.9M|constexpr inline Mask<T> conditional_assign_mem(T cnd, T* dest, const T* src, size_t elems) {
  750|  33.9M|   const auto mask = CT::Mask<T>::expand(cnd);
  751|  33.9M|   mask.select_n(dest, src, dest, elems);
  752|  33.9M|   return mask;
  753|  33.9M|}
_ZN5Botan2CT4MaskImE7clearedEv:
  387|  10.7k|      static constexpr Mask<T> cleared() { return Mask<T>(0); }
_ZN5Botan2CT16driveby_unpoisonITkNS0_12unpoisonableEmEEDcOT_Qsr3stdE21is_rvalue_reference_vIDtfp_EE:
  245|  1.38k|{
  246|  1.38k|   unpoison(v);
  247|  1.38k|   return std::forward<T>(v);
  248|  1.38k|}
_ZNK5Botan2CT6Choice12into_bitmaskImQaasr3stdE17unsigned_integralIT_Entsr3stdE7same_asIbS3_EEES3_v:
  291|  3.85M|      constexpr T into_bitmask() const {
  292|  3.85M|         if constexpr(sizeof(T) <= sizeof(underlying_type)) {
  293|       |            // The inner mask is already |0| or |1| so just truncate
  294|  3.85M|            return static_cast<T>(value());
  295|       |         } else {
  296|       |            return ~ct_is_zero<T>(value());
  297|       |         }
  298|  3.85M|      }
_ZN5Botan2CT6poisonIhEEvPKT_m:
   56|  1.42k|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|  1.42k|   BOTAN_UNUSED(p, n);
  ------------------
  |  |  144|  1.42k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   64|  1.42k|}
pcurves_brainpool256r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES4_E11FieldParamsEEEEES9_EEEEvRKT_:
  138|    104|constexpr void poison(const T& x) {
  139|    104|   x._const_time_poison();
  140|    104|}
pcurves_brainpool256r1.cpp:_ZN5Botan2CT10poison_allITpTkNS0_10poisonableEJNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES3_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  201|    104|constexpr void poison_all(const Ts&... ts) {
  202|    104|   (poison(ts), ...);
  203|    104|}
pcurves_brainpool256r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES3_E11FieldParamsEEEEEEEvRKT_:
  138|    312|constexpr void poison(const T& x) {
  139|    312|   x._const_time_poison();
  140|    312|}
_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|  1.83k|constexpr void poison(const R& r) {
  122|  1.83k|   const std::span s{r};
  123|  1.83k|   poison(s.data(), s.size());
  124|  1.83k|}
pcurves_brainpool256r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES4_E11FieldParamsEEEEES9_EEEEvRKT_:
  143|    104|constexpr void unpoison(const T& x) {
  144|    104|   x._const_time_unpoison();
  145|    104|}
pcurves_brainpool256r1.cpp:_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES3_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  207|    104|constexpr void unpoison_all(const Ts&... ts) {
  208|    104|   (unpoison(ts), ...);
  209|    104|}
pcurves_brainpool256r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES3_E11FieldParamsEEEEEEEvRKT_:
  143|    312|constexpr void unpoison(const T& x) {
  144|    312|   x._const_time_unpoison();
  145|    312|}
_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|  1.83k|constexpr void unpoison(const R& r) {
  129|  1.83k|   const std::span s{r};
  130|  1.83k|   unpoison(s.data(), s.size());
  131|  1.83k|}
_ZN5Botan2CT8unpoisonIhEEvPKT_m:
   67|  1.61k|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|  1.61k|   BOTAN_UNUSED(p, n);
  ------------------
  |  |  144|  1.61k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   75|  1.61k|}
_ZN5Botan2CT8is_equalImEENS0_4MaskIT_EEPKS3_S6_m:
  798|  1.81k|constexpr inline CT::Mask<T> is_equal(const T x[], const T y[], size_t len) {
  799|  1.81k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (799:7): [Folded, False: 1.81k]
  ------------------
  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|  1.81k|   } else {
  808|  1.81k|      volatile T difference = 0;
  809|       |
  810|  11.7k|      for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (810:25): [True: 9.94k, False: 1.81k]
  ------------------
  811|  9.94k|         difference = difference | (x[i] ^ y[i]);
  812|  9.94k|      }
  813|       |
  814|  1.81k|      return CT::Mask<T>::is_zero(difference);
  815|  1.81k|   }
  816|  1.81k|}
pcurves_brainpool384r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES4_E11FieldParamsEEEEES9_EEEEvRKT_:
  138|    165|constexpr void poison(const T& x) {
  139|    165|   x._const_time_poison();
  140|    165|}
pcurves_brainpool384r1.cpp:_ZN5Botan2CT10poison_allITpTkNS0_10poisonableEJNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES3_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  201|    165|constexpr void poison_all(const Ts&... ts) {
  202|    165|   (poison(ts), ...);
  203|    165|}
pcurves_brainpool384r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES3_E11FieldParamsEEEEEEEvRKT_:
  138|    495|constexpr void poison(const T& x) {
  139|    495|   x._const_time_poison();
  140|    495|}
_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|  1.08k|constexpr void poison(const R& r) {
  122|  1.08k|   const std::span s{r};
  123|  1.08k|   poison(s.data(), s.size());
  124|  1.08k|}
pcurves_brainpool384r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES4_E11FieldParamsEEEEES9_EEEEvRKT_:
  143|    165|constexpr void unpoison(const T& x) {
  144|    165|   x._const_time_unpoison();
  145|    165|}
pcurves_brainpool384r1.cpp:_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES3_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  207|    165|constexpr void unpoison_all(const Ts&... ts) {
  208|    165|   (unpoison(ts), ...);
  209|    165|}
pcurves_brainpool384r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES3_E11FieldParamsEEEEEEEvRKT_:
  143|    495|constexpr void unpoison(const T& x) {
  144|    495|   x._const_time_unpoison();
  145|    495|}
_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|  1.08k|constexpr void unpoison(const R& r) {
  129|  1.08k|   const std::span s{r};
  130|  1.08k|   unpoison(s.data(), s.size());
  131|  1.08k|}
pcurves_brainpool512r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES4_E11FieldParamsEEEEES9_EEEEvRKT_:
  138|    139|constexpr void poison(const T& x) {
  139|    139|   x._const_time_poison();
  140|    139|}
pcurves_brainpool512r1.cpp:_ZN5Botan2CT10poison_allITpTkNS0_10poisonableEJNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES3_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  201|    139|constexpr void poison_all(const Ts&... ts) {
  202|    139|   (poison(ts), ...);
  203|    139|}
pcurves_brainpool512r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES3_E11FieldParamsEEEEEEEvRKT_:
  138|    417|constexpr void poison(const T& x) {
  139|    417|   x._const_time_poison();
  140|    417|}
_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|    417|constexpr void poison(const R& r) {
  122|    417|   const std::span s{r};
  123|    417|   poison(s.data(), s.size());
  124|    417|}
pcurves_brainpool512r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES4_E11FieldParamsEEEEES9_EEEEvRKT_:
  143|    139|constexpr void unpoison(const T& x) {
  144|    139|   x._const_time_unpoison();
  145|    139|}
pcurves_brainpool512r1.cpp:_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES3_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  207|    139|constexpr void unpoison_all(const Ts&... ts) {
  208|    139|   (unpoison(ts), ...);
  209|    139|}
pcurves_brainpool512r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES3_E11FieldParamsEEEEEEEvRKT_:
  143|    417|constexpr void unpoison(const T& x) {
  144|    417|   x._const_time_unpoison();
  145|    417|}
_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|    417|constexpr void unpoison(const R& r) {
  129|    417|   const std::span s{r};
  130|    417|   unpoison(s.data(), s.size());
  131|    417|}
_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_6PCurve22GenericProjectivePointEEEvRKT_:
  138|    332|constexpr void poison(const T& x) {
  139|    332|   x._const_time_poison();
  140|    332|}
pcurves_generic.cpp:_ZN5Botan2CT10poison_allITpTkNS0_10poisonableEJNS_6PCurve12_GLOBAL__N_112GenericFieldES4_S4_EQgtsZT_Li0EEEvDpRKT_:
  201|    332|constexpr void poison_all(const Ts&... ts) {
  202|    332|   (poison(ts), ...);
  203|    332|}
pcurves_generic.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_6PCurve12_GLOBAL__N_112GenericFieldEEEvRKT_:
  138|    996|constexpr void poison(const T& x) {
  139|    996|   x._const_time_poison();
  140|    996|}
_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|  1.60k|constexpr void poison(const R& r) {
  122|  1.60k|   const std::span s{r};
  123|  1.60k|   poison(s.data(), s.size());
  124|  1.60k|}
_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_6PCurve22GenericProjectivePointEEEvRKT_:
  143|    332|constexpr void unpoison(const T& x) {
  144|    332|   x._const_time_unpoison();
  145|    332|}
pcurves_generic.cpp:_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNS_6PCurve12_GLOBAL__N_112GenericFieldES4_S4_EQgtsZT_Li0EEEvDpRKT_:
  207|    332|constexpr void unpoison_all(const Ts&... ts) {
  208|    332|   (unpoison(ts), ...);
  209|    332|}
pcurves_generic.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_6PCurve12_GLOBAL__N_112GenericFieldEEEvRKT_:
  143|    996|constexpr void unpoison(const T& x) {
  144|    996|   x._const_time_unpoison();
  145|    996|}
_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|  1.60k|constexpr void unpoison(const R& r) {
  129|  1.60k|   const std::span s{r};
  130|  1.60k|   unpoison(s.data(), s.size());
  131|  1.60k|}
pcurves_secp224r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS6_6ParamsES7_E11FieldParamsEEEEES9_EEEEvRKT_:
  138|    217|constexpr void poison(const T& x) {
  139|    217|   x._const_time_poison();
  140|    217|}
pcurves_secp224r1.cpp:_ZN5Botan2CT10poison_allITpTkNS0_10poisonableEJNS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  201|    217|constexpr void poison_all(const Ts&... ts) {
  202|    217|   (poison(ts), ...);
  203|    217|}
pcurves_secp224r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEEEEvRKT_:
  138|    651|constexpr void poison(const T& x) {
  139|    651|   x._const_time_poison();
  140|    651|}
pcurves_secp224r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS6_6ParamsES7_E11FieldParamsEEEEES9_EEEEvRKT_:
  143|    217|constexpr void unpoison(const T& x) {
  144|    217|   x._const_time_unpoison();
  145|    217|}
pcurves_secp224r1.cpp:_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  207|    217|constexpr void unpoison_all(const Ts&... ts) {
  208|    217|   (unpoison(ts), ...);
  209|    217|}
pcurves_secp224r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEEEEvRKT_:
  143|    651|constexpr void unpoison(const T& x) {
  144|    651|   x._const_time_unpoison();
  145|    651|}
pcurves_secp256k1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS6_6ParamsES7_E11FieldParamsEEEEES9_EEEEvRKT_:
  138|    219|constexpr void poison(const T& x) {
  139|    219|   x._const_time_poison();
  140|    219|}
pcurves_secp256k1.cpp:_ZN5Botan2CT10poison_allITpTkNS0_10poisonableEJNS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  201|    219|constexpr void poison_all(const Ts&... ts) {
  202|    219|   (poison(ts), ...);
  203|    219|}
pcurves_secp256k1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEEEEvRKT_:
  138|    657|constexpr void poison(const T& x) {
  139|    657|   x._const_time_poison();
  140|    657|}
pcurves_secp256k1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS6_6ParamsES7_E11FieldParamsEEEEES9_EEEEvRKT_:
  143|    219|constexpr void unpoison(const T& x) {
  144|    219|   x._const_time_unpoison();
  145|    219|}
pcurves_secp256k1.cpp:_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  207|    219|constexpr void unpoison_all(const Ts&... ts) {
  208|    219|   (unpoison(ts), ...);
  209|    219|}
pcurves_secp256k1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEEEEvRKT_:
  143|    657|constexpr void unpoison(const T& x) {
  144|    657|   x._const_time_unpoison();
  145|    657|}
pcurves_secp256r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS5_9secp256r16ParamsES6_E11FieldParamsEEEEES9_EEEEvRKT_:
  138|     73|constexpr void poison(const T& x) {
  139|     73|   x._const_time_poison();
  140|     73|}
pcurves_secp256r1.cpp:_ZN5Botan2CT10poison_allITpTkNS0_10poisonableEJNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS4_9secp256r16ParamsES5_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  201|     73|constexpr void poison_all(const Ts&... ts) {
  202|     73|   (poison(ts), ...);
  203|     73|}
pcurves_secp256r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS4_9secp256r16ParamsES5_E11FieldParamsEEEEEEEvRKT_:
  138|    219|constexpr void poison(const T& x) {
  139|    219|   x._const_time_poison();
  140|    219|}
pcurves_secp256r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS5_9secp256r16ParamsES6_E11FieldParamsEEEEES9_EEEEvRKT_:
  143|     73|constexpr void unpoison(const T& x) {
  144|     73|   x._const_time_unpoison();
  145|     73|}
pcurves_secp256r1.cpp:_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS4_9secp256r16ParamsES5_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  207|     73|constexpr void unpoison_all(const Ts&... ts) {
  208|     73|   (unpoison(ts), ...);
  209|     73|}
pcurves_secp256r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS4_9secp256r16ParamsES5_E11FieldParamsEEEEEEEvRKT_:
  143|    219|constexpr void unpoison(const T& x) {
  144|    219|   x._const_time_unpoison();
  145|    219|}
pcurves_secp384r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS5_9secp384r16ParamsES6_E11FieldParamsEEEEES9_EEEEvRKT_:
  138|    196|constexpr void poison(const T& x) {
  139|    196|   x._const_time_poison();
  140|    196|}
pcurves_secp384r1.cpp:_ZN5Botan2CT10poison_allITpTkNS0_10poisonableEJNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS4_9secp384r16ParamsES5_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  201|    196|constexpr void poison_all(const Ts&... ts) {
  202|    196|   (poison(ts), ...);
  203|    196|}
pcurves_secp384r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS4_9secp384r16ParamsES5_E11FieldParamsEEEEEEEvRKT_:
  138|    588|constexpr void poison(const T& x) {
  139|    588|   x._const_time_poison();
  140|    588|}
pcurves_secp384r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS5_9secp384r16ParamsES6_E11FieldParamsEEEEES9_EEEEvRKT_:
  143|    196|constexpr void unpoison(const T& x) {
  144|    196|   x._const_time_unpoison();
  145|    196|}
pcurves_secp384r1.cpp:_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS4_9secp384r16ParamsES5_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  207|    196|constexpr void unpoison_all(const Ts&... ts) {
  208|    196|   (unpoison(ts), ...);
  209|    196|}
pcurves_secp384r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS4_9secp384r16ParamsES5_E11FieldParamsEEEEEEEvRKT_:
  143|    588|constexpr void unpoison(const T& x) {
  144|    588|   x._const_time_unpoison();
  145|    588|}
pcurves_secp521r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS6_6ParamsES7_E11FieldParamsEEEEES9_EEEEvRKT_:
  138|    204|constexpr void poison(const T& x) {
  139|    204|   x._const_time_poison();
  140|    204|}
pcurves_secp521r1.cpp:_ZN5Botan2CT10poison_allITpTkNS0_10poisonableEJNS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  201|    204|constexpr void poison_all(const Ts&... ts) {
  202|    204|   (poison(ts), ...);
  203|    204|}
pcurves_secp521r1.cpp:_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEEEEvRKT_:
  138|    612|constexpr void poison(const T& x) {
  139|    612|   x._const_time_poison();
  140|    612|}
pcurves_secp521r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS6_6ParamsES7_E11FieldParamsEEEEES9_EEEEvRKT_:
  143|    204|constexpr void unpoison(const T& x) {
  144|    204|   x._const_time_unpoison();
  145|    204|}
pcurves_secp521r1.cpp:_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEESC_SC_EQgtsZT_Li0EEEvDpRKT_:
  207|    204|constexpr void unpoison_all(const Ts&... ts) {
  208|    204|   (unpoison(ts), ...);
  209|    204|}
pcurves_secp521r1.cpp:_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEEEEvRKT_:
  143|    612|constexpr void unpoison(const T& x) {
  144|    612|   x._const_time_unpoison();
  145|    612|}
_ZN5Botan2CT12poison_rangeITkNSt3__16ranges5rangeENS2_6vectorINS_14Montgomery_IntENS2_9allocatorIS5_EEEEQ10poisonableINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISF_EESG_E4type10value_typeEEEEvRKSC_:
  181|  1.48k|constexpr void poison_range(const R& r) {
  182|  23.7k|   for(const auto& v : r) {
  ------------------
  |  Branch (182:22): [True: 23.7k, False: 1.48k]
  ------------------
  183|  23.7k|      poison(v);
  184|  23.7k|   }
  185|  1.48k|}
_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_14Montgomery_IntEEEvRKT_:
  138|  23.7k|constexpr void poison(const T& x) {
  139|  23.7k|   x._const_time_poison();
  140|  23.7k|}
_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_14Montgomery_IntEEEvRKT_:
  143|  1.38k|constexpr void unpoison(const T& x) {
  144|  1.38k|   x._const_time_unpoison();
  145|  1.38k|}
_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|      1|constexpr void unpoison(const R& r) {
  129|      1|   const std::span s{r};
  130|      1|   unpoison(s.data(), s.size());
  131|      1|}
_ZNK5Botan2CT4MaskIjE5valueEv:
  630|   130k|      constexpr T value() const { return value_barrier<T>(m_mask); }
_ZNK5Botan2CT4MaskIjE13if_set_returnEj:
  538|   129k|      constexpr T if_set_return(T x) const { return value() & x; }
_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|      1|constexpr void poison(const R& r) {
  122|      1|   const std::span s{r};
  123|      1|   poison(s.data(), s.size());
  124|      1|}
_ZN5Botan2CT8unpoisonITkNSt3__18integralEbEEvRKT_:
  112|   337k|constexpr void unpoison(const T& p) {
  113|   337k|   unpoison(&p, 1);
  114|   337k|}
_ZN5Botan2CT8unpoisonIbEEvPKT_m:
   67|   337k|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|   337k|   BOTAN_UNUSED(p, n);
  ------------------
  |  |  144|   337k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   75|   337k|}
_ZN5Botan2CT4MaskIjEC2Ej:
  637|   130k|      constexpr explicit Mask(T m) : m_mask(m) {}
_ZN5Botan2CT4MaskIjE8is_equalEjj:
  442|  1.15k|      static constexpr Mask<T> is_equal(T x, T y) {
  443|  1.15k|         const T diff = value_barrier(x) ^ value_barrier(y);
  444|  1.15k|         return Mask<T>::is_zero(diff);
  445|  1.15k|      }
_ZN5Botan2CT4MaskIjE7is_zeroEj:
  437|  1.15k|      static constexpr Mask<T> is_zero(T x) { return Mask<T>(ct_is_zero<T>(value_barrier<T>(x))); }
_ZN5Botan2CT16driveby_unpoisonITkNS0_12unpoisonableEbEEDcOT_Qsr3stdE21is_rvalue_reference_vIDtfp_EE:
  245|   337k|{
  246|   337k|   unpoison(v);
  247|   337k|   return std::forward<T>(v);
  248|   337k|}
_ZN5Botan2CT13scoped_poisonIJNSt3__16vectorIhNS_16secure_allocatorIhEEEEEQaaaagtsZT_Li0Efraa10poisonableIT_Efraa12unpoisonableIS7_EEEDaDpRKS7_:
  222|      1|[[nodiscard]] constexpr auto scoped_poison(const Ts&... xs) {
  223|      1|   auto scope = scoped_cleanup([&] { unpoison_all(xs...); });
  224|      1|   poison_all(xs...);
  225|      1|   return scope;
  226|      1|}
_ZN5Botan2CT10poison_allITpTkNS0_10poisonableEJNSt3__16vectorIhNS_16secure_allocatorIhEEEEEQgtsZT_Li0EEEvDpRKT_:
  201|      1|constexpr void poison_all(const Ts&... ts) {
  202|      1|   (poison(ts), ...);
  203|      1|}
_ZZN5Botan2CT13scoped_poisonIJNSt3__16vectorIhNS_16secure_allocatorIhEEEEEQaaaagtsZT_Li0Efraa10poisonableIT_Efraa12unpoisonableIS7_EEEDaDpRKS7_ENKUlvE_clEv:
  223|      1|   auto scope = scoped_cleanup([&] { unpoison_all(xs...); });
_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNSt3__16vectorIhNS_16secure_allocatorIhEEEEEQgtsZT_Li0EEEvDpRKT_:
  207|      1|constexpr void unpoison_all(const Ts&... ts) {
  208|      1|   (unpoison(ts), ...);
  209|      1|}
_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|      1|constexpr void unpoison(const R& r) {
  129|      1|   const std::span s{r};
  130|      1|   unpoison(s.data(), s.size());
  131|      1|}
_ZN5Botan2CT4MaskImEeOES2_:
  502|    448|      Mask<T>& operator^=(Mask<T> o) {
  503|    448|         m_mask ^= o.value();
  504|    448|         return (*this);
  505|    448|      }
_ZN5Botan2CT4MaskIjE14expand_top_bitEj:
  415|   129k|      static constexpr Mask<T> expand_top_bit(T v) { return Mask<T>(ct_expand_top_bit<T>(v)); }
_ZN5Botan2CT6poisonITkNS0_17custom_poisonableENS_8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS2_6DomainE0EEEEEvRKT_:
  138|    941|constexpr void poison(const T& x) {
  139|    941|   x._const_time_poison();
  140|    941|}
_ZN5Botan2CT6poisonITkNS_6ranges14spanable_rangeENSt3__14spanIiLm256EEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEnt17custom_poisonableISA_EEEvRKSA_:
  121|    941|constexpr void poison(const R& r) {
  122|    941|   const std::span s{r};
  123|    941|   poison(s.data(), s.size());
  124|    941|}
_ZN5Botan2CT6poisonIiEEvPKT_m:
   56|    941|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|    941|   BOTAN_UNUSED(p, n);
  ------------------
  |  |  144|    941|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   64|    941|}
_ZN5Botan2CT6poisonITkNS_6ranges14spanable_rangeENS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_24DilithiumSeedRandomness_EJEEEQaasr3stdE23is_trivially_copyable_vINS4_11conditionalIXsr21__is_primary_templateINS4_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS4_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS4_26indirectly_readable_traitsISI_EESJ_E4type10value_typeEEnt17custom_poisonableISF_EEEvRKSF_:
  121|     79|constexpr void poison(const R& r) {
  122|     79|   const std::span s{r};
  123|     79|   poison(s.data(), s.size());
  124|     79|}
_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS2_6DomainE0EEEEEvRKT_:
  143|    316|constexpr void unpoison(const T& x) {
  144|    316|   x._const_time_unpoison();
  145|    316|}
_ZN5Botan2CT14unpoison_rangeITkNSt3__16ranges5rangeENS2_6vectorINS_8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS5_6DomainE0EEENS2_9allocatorIS9_EEEEQ12unpoisonableINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISJ_EESK_E4type10value_typeEEEEvRKSG_:
  189|    316|constexpr void unpoison_range(const R& r) {
  190|  1.94k|   for(const auto& v : r) {
  ------------------
  |  Branch (190:22): [True: 1.94k, False: 316]
  ------------------
  191|  1.94k|      unpoison(v);
  192|  1.94k|   }
  193|    316|}
_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS2_6DomainE0EEEEEvRKT_:
  143|  1.94k|constexpr void unpoison(const T& x) {
  144|  1.94k|   x._const_time_unpoison();
  145|  1.94k|}
_ZN5Botan2CT8unpoisonITkNS_6ranges14spanable_rangeENSt3__14spanIiLm256EEEQaasr3stdE23is_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.94k|constexpr void unpoison(const R& r) {
  129|  1.94k|   const std::span s{r};
  130|  1.94k|   unpoison(s.data(), s.size());
  131|  1.94k|}
_ZN5Botan2CT8unpoisonIiEEvPKT_m:
   67|  1.94k|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|  1.94k|   BOTAN_UNUSED(p, n);
  ------------------
  |  |  144|  1.94k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   75|  1.94k|}
_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_28Dilithium_PrivateKeyInternalEEEvRKT_:
  143|     79|constexpr void unpoison(const T& x) {
  144|     79|   x._const_time_unpoison();
  145|     79|}
_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_15DilithiumSeedK_EJEEENS_8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNSA_6DomainE0EEESE_SE_EQgtsZT_Li0EEEvDpRKT_:
  207|     79|constexpr void unpoison_all(const Ts&... ts) {
  208|     79|   (unpoison(ts), ...);
  209|     79|}
_ZN5Botan2CT8unpoisonITkNS_6ranges14spanable_rangeENS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_15DilithiumSeedK_EJEEEQaasr3stdE23is_trivially_copyable_vINS4_11conditionalIXsr21__is_primary_templateINS4_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS4_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS4_26indirectly_readable_traitsISI_EESJ_E4type10value_typeEEnt19custom_unpoisonableISF_EEEvRKSF_:
  128|     79|constexpr void unpoison(const R& r) {
  129|     79|   const std::span s{r};
  130|     79|   unpoison(s.data(), s.size());
  131|     79|}
_ZN5Botan2CT8unpoisonINS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_24DilithiumSeedRandomness_EJEEEQrQRKT__Xclgssr5Botan2CTE8unpoisonfL0p_EEEEvRKNS3_8optionalISA_EE:
  160|     79|constexpr void unpoison(const std::optional<T>& x) {
  161|     79|   if(x.has_value()) {
  ------------------
  |  Branch (161:7): [True: 79, False: 0]
  ------------------
  162|     79|      unpoison(*x);
  163|     79|   }
  164|     79|}
_ZN5Botan2CT8unpoisonITkNS_6ranges14spanable_rangeENS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_24DilithiumSeedRandomness_EJEEEQaasr3stdE23is_trivially_copyable_vINS4_11conditionalIXsr21__is_primary_templateINS4_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS4_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS4_26indirectly_readable_traitsISI_EESJ_E4type10value_typeEEnt19custom_unpoisonableISF_EEEvRKSF_:
  128|     79|constexpr void unpoison(const R& r) {
  129|     79|   const std::span s{r};
  130|     79|   unpoison(s.data(), s.size());
  131|     79|}
_ZN5Botan2CT8unpoisonITkNS_6ranges14spanable_rangeENS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS_20DilithiumPublicSeed_EJEEEQaasr3stdE23is_trivially_copyable_vINS4_11conditionalIXsr21__is_primary_templateINS4_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS4_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS4_26indirectly_readable_traitsISI_EESJ_E4type10value_typeEEnt19custom_unpoisonableISF_EEEvRKSF_:
  128|     79|constexpr void unpoison(const R& r) {
  129|     79|   const std::span s{r};
  130|     79|   unpoison(s.data(), s.size());
  131|     79|}
_ZN5Botan2CT8unpoisonITkNS_6ranges14spanable_rangeENSt3__14spanIhLm32EEEQaasr3stdE23is_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|constexpr void unpoison(const R& r) {
  129|      2|   const std::span s{r};
  130|      2|   unpoison(s.data(), s.size());
  131|      2|}
_ZN5Botan2CT6poisonITkNS_6ranges14spanable_rangeENS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_20KyberSeedRandomness_EJEEEQaasr3stdE23is_trivially_copyable_vINS4_11conditionalIXsr21__is_primary_templateINS4_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS4_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS4_26indirectly_readable_traitsISI_EESJ_E4type10value_typeEEnt17custom_poisonableISF_EEEvRKSF_:
  121|     28|constexpr void poison(const R& r) {
  122|     28|   const std::span s{r};
  123|     28|   poison(s.data(), s.size());
  124|     28|}
_ZN5Botan2CT8unpoisonITkNS_6ranges14spanable_rangeENS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_20KyberSeedRandomness_EJEEEQaasr3stdE23is_trivially_copyable_vINS4_11conditionalIXsr21__is_primary_templateINS4_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS4_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS4_26indirectly_readable_traitsISI_EESJ_E4type10value_typeEEnt19custom_unpoisonableISF_EEEvRKSF_:
  128|     28|constexpr void unpoison(const R& r) {
  129|     28|   const std::span s{r};
  130|     28|   unpoison(s.data(), s.size());
  131|     28|}
_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS2_6DomainE1EEEEEvRKT_:
  143|     56|constexpr void unpoison(const T& x) {
  144|     56|   x._const_time_unpoison();
  145|     56|}
_ZN5Botan2CT8unpoisonITkNS0_19custom_unpoisonableENS_8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS2_6DomainE1EEEEEvRKT_:
  143|    186|constexpr void unpoison(const T& x) {
  144|    186|   x._const_time_unpoison();
  145|    186|}
_ZN5Botan2CT14unpoison_rangeITkNSt3__16ranges5rangeENS2_6vectorINS_8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS5_6DomainE1EEENS2_9allocatorIS9_EEEEQ12unpoisonableINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISJ_EESK_E4type10value_typeEEEEvRKSG_:
  189|     56|constexpr void unpoison_range(const R& r) {
  190|    186|   for(const auto& v : r) {
  ------------------
  |  Branch (190:22): [True: 186, False: 56]
  ------------------
  191|    186|      unpoison(v);
  192|    186|   }
  193|     56|}
_ZN5Botan2CT8unpoisonIsEEvPKT_m:
   67|    186|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|    186|   BOTAN_UNUSED(p, n);
  ------------------
  |  |  144|    186|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   75|    186|}
_ZN5Botan2CT8unpoisonITkNS_6ranges14spanable_rangeENSt3__14spanIsLm256EEEQaasr3stdE23is_trivially_copyable_vINS3_11conditionalIXsr21__is_primary_templateINS3_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS3_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS3_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEnt19custom_unpoisonableISA_EEEvRKSA_:
  128|    186|constexpr void unpoison(const R& r) {
  129|    186|   const std::span s{r};
  130|    186|   unpoison(s.data(), s.size());
  131|    186|}
_ZN5Botan2CT8unpoisonITkNS_6ranges14spanable_rangeENS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS_13KyberSeedRho_EJEEEQaasr3stdE23is_trivially_copyable_vINS4_11conditionalIXsr21__is_primary_templateINS4_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS4_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS4_26indirectly_readable_traitsISI_EESJ_E4type10value_typeEEnt19custom_unpoisonableISF_EEEvRKSF_:
  128|     28|constexpr void unpoison(const R& r) {
  129|     28|   const std::span s{r};
  130|     28|   unpoison(s.data(), s.size());
  131|     28|}
_ZN5Botan2CT12unpoison_allITpTkNS0_12unpoisonableEJNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_20KyberSeedRandomness_EJEEENS_8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNSA_6DomainE1EEESE_EQgtsZT_Li0EEEvDpRKT_:
  207|     28|constexpr void unpoison_all(const Ts&... ts) {
  208|     28|   (unpoison(ts), ...);
  209|     28|}
_ZN5Botan2CT4MaskImE10expand_bitEmm:
  421|    256|      static constexpr Mask<T> expand_bit(T v, size_t bit) {
  422|    256|         return CT::Mask<T>::expand_top_bit(v << (sizeof(v) * 8 - 1 - bit));
  423|    256|      }

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

_ZNK5Botan18DilithiumConstants4modeEv:
  162|    164|      DilithiumMode mode() const { return m_mode; }
_ZNK5Botan18DilithiumConstants16public_key_bytesEv:
  152|     79|      size_t public_key_bytes() const { return m_public_key_bytes; }
_ZNK5Botan18DilithiumConstants20symmetric_primitivesEv:
  167|  4.00k|      Dilithium_Symmetric_Primitives_Base& symmetric_primitives() const { return *m_symmetric_primitives; }
_ZN5Botan18DilithiumConstantsC2EOS0_:
   96|    407|      DilithiumConstants(DilithiumConstants&& other) = default;
_ZNK5Botan18DilithiumConstants9is_ml_dsaEv:
  104|    328|      bool is_ml_dsa() const { return m_mode.is_ml_dsa(); }
_ZNK5Botan18DilithiumConstants1kEv:
  123|    905|      uint8_t k() const { return m_k; }
_ZNK5Botan18DilithiumConstants1lEv:
  126|  3.73k|      uint8_t l() const { return m_l; }
_ZNK5Botan18DilithiumConstants13keypair_codecEv:
  169|     85|      Dilithium_Keypair_Codec& keypair_codec() const { return *m_keypair_codec; }
_ZN5Botan18DilithiumConstantsC2ERKS0_:
   94|     79|      DilithiumConstants(const DilithiumConstants& other) : DilithiumConstants(other.m_mode) {}
_ZNK5Botan18DilithiumConstants9is_modernEv:
  100|    164|      bool is_modern() const { return m_mode.is_modern(); }
_ZNK5Botan18DilithiumConstants6is_aesEv:
  102|    164|      bool is_aes() const { return m_mode.is_aes(); }
_ZNK5Botan18DilithiumConstants3etaEv:
  129|    941|      DilithiumEta eta() const { return m_eta; }
_ZNK5Botan18DilithiumConstants21public_key_hash_bytesEv:
  138|    164|      size_t public_key_hash_bytes() const { return m_public_key_hash_bytes; }
_ZNK5Botan18DilithiumConstants26commitment_hash_full_bytesEv:
  141|    164|      size_t commitment_hash_full_bytes() const { return m_commitment_hash_full_bytes; }

_ZN5Botan27Dilithium_PublicKeyInternalC2ENS_18DilithiumConstantsENS_6StrongINSt3__16vectorIhNS3_9allocatorIhEEEENS_20DilithiumPublicSeed_EJEEENS_8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNSA_6DomainE0EEE:
   42|     79|            m_mode(std::move(mode)),
   43|     79|            m_rho(std::move(rho)),
   44|     79|            m_t1(std::move(t1)),
   45|     79|            m_tr(m_mode.symmetric_primitives().H(raw_pk())) {
   46|     79|         BOTAN_ASSERT_NOMSG(!m_rho.empty());
  ------------------
  |  |   77|     79|   do {                                                                     \
  |  |   78|     79|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|     79|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 79]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|     79|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 79]
  |  |  ------------------
  ------------------
   47|     79|         BOTAN_ASSERT_NOMSG(m_t1.size() > 0);
  ------------------
  |  |   77|     79|   do {                                                                     \
  |  |   78|     79|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|     79|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 79]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|     79|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 79]
  |  |  ------------------
  ------------------
   48|     79|      }
_ZNK5Botan27Dilithium_PublicKeyInternal6raw_pkEv:
   51|     79|      DilithiumSerializedPublicKey raw_pk() const { return Dilithium_Algos::encode_public_key(m_rho, m_t1, m_mode); }
_ZNK5Botan28Dilithium_PrivateKeyInternal20_const_time_unpoisonEv:
  102|     79|      void _const_time_unpoison() const {
  103|     79|         CT::unpoison_all(m_signing_seed, m_s1, m_s2, m_t0);
  104|     79|         CT::unpoison(m_seed);
  105|     79|      }
_ZN5Botan28Dilithium_PrivateKeyInternalC2ENS_18DilithiumConstantsENSt3__18optionalINS_6StrongINS2_6vectorIhNS_16secure_allocatorIhEEEENS_24DilithiumSeedRandomness_EJEEEEENS4_IS8_NS_15DilithiumSeedK_EJEEENS_8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNSE_6DomainE0EEESI_SI_:
   76|     79|            m_mode(std::move(mode)),
   77|     79|            m_seed(std::move(seed)),
   78|     79|            m_signing_seed(std::move(signing_seed)),
   79|     79|            m_t0(std::move(t0)),
   80|     79|            m_s1(std::move(s1)),
   81|     79|            m_s2(std::move(s2)) {}
_ZN5Botan23Dilithium_Keypair_CodecD2Ev:
   27|    164|      virtual ~Dilithium_Keypair_Codec() = default;

_ZN5Botan19DilithiumPolyTraits3nttENSt3__14spanIiLm256EEE:
   50|    437|      static constexpr void ntt(std::span<T, N> coeffs) {
   51|    437|         size_t j = 0;
   52|    437|         size_t k = 0;
   53|       |
   54|  3.93k|         for(size_t len = N / 2; len > 0; len >>= 1) {
  ------------------
  |  Branch (54:34): [True: 3.49k, False: 437]
  ------------------
   55|   114k|            for(size_t start = 0; start < N; start = j + len) {
  ------------------
  |  Branch (55:35): [True: 111k, False: 3.49k]
  ------------------
   56|   111k|               const T zeta = zetas[++k];
   57|   558k|               for(j = start; j < start + len; ++j) {
  ------------------
  |  Branch (57:31): [True: 447k, False: 111k]
  ------------------
   58|       |                  // Zetas contain the montgomery parameter 2^32 mod q
   59|   447k|                  const T t = fqmul(zeta, coeffs[j + len]);
   60|   447k|                  coeffs[j + len] = coeffs[j] - t;
   61|   447k|                  coeffs[j] = coeffs[j] + t;
   62|   447k|               }
   63|   111k|            }
   64|  3.49k|         }
   65|    437|      }
_ZN5Botan19DilithiumPolyTraits29montgomery_reduce_coefficientEl:
   26|  1.83M|      static constexpr T montgomery_reduce_coefficient(T2 a) {
   27|  1.83M|         const T2 t = static_cast<T>(static_cast<T2>(static_cast<T>(a)) * Q_inverse);
   28|  1.83M|         return static_cast<T>((a - static_cast<T2>(t) * Q) >> (sizeof(T) * 8));
   29|  1.83M|      }
_ZN5Botan19DilithiumPolyTraits25poly_pointwise_montgomeryENSt3__14spanIiLm256EEENS2_IKiLm256EEES5_:
  107|  2.90k|                                                      std::span<const T, N> rhs) {
  108|   746k|         for(size_t i = 0; i < N; ++i) {
  ------------------
  |  Branch (108:28): [True: 743k, False: 2.90k]
  ------------------
  109|   743k|            result[i] = fqmul(lhs[i], rhs[i]);
  110|   743k|         }
  111|  2.90k|      }
_ZN5Botan19DilithiumPolyTraits26barrett_reduce_coefficientEi:
   31|   258k|      static constexpr T barrett_reduce_coefficient(T a) {
   32|       |         // 2**22 is roughly Q/2 and 2**23 is roughly Q
   33|   258k|         const T t = (a + (1 << 22)) >> 23;
   34|   258k|         a = a - t * Q;
   35|   258k|         return a;
   36|   258k|      }
_ZN5Botan19DilithiumPolyTraits11inverse_nttENSt3__14spanIiLm256EEE:
   78|    504|      static constexpr void inverse_ntt(std::span<T, N> coeffs) {
   79|    504|         size_t j = 0;
   80|    504|         size_t k = N;
   81|  4.53k|         for(size_t len = 1; len < N; len <<= 1) {
  ------------------
  |  Branch (81:30): [True: 4.03k, False: 504]
  ------------------
   82|   132k|            for(size_t start = 0; start < N; start = j + len) {
  ------------------
  |  Branch (82:35): [True: 128k, False: 4.03k]
  ------------------
   83|   128k|               const T zeta = -zetas[--k];
   84|   644k|               for(j = start; j < start + len; ++j) {
  ------------------
  |  Branch (84:31): [True: 516k, False: 128k]
  ------------------
   85|   516k|                  const T t = coeffs[j];
   86|   516k|                  coeffs[j] = t + coeffs[j + len];
   87|   516k|                  coeffs[j + len] = t - coeffs[j + len];
   88|       |                  // Zetas contain the montgomery parameter 2^32 mod q
   89|   516k|                  coeffs[j + len] = fqmul(zeta, coeffs[j + len]);
   90|   516k|               }
   91|   128k|            }
   92|  4.03k|         }
   93|       |
   94|   129k|         for(auto& coeff : coeffs) {
  ------------------
  |  Branch (94:26): [True: 129k, False: 504]
  ------------------
   95|   129k|            coeff = fqmul(coeff, F_WITH_MONTY_SQUARED);
   96|   129k|         }
   97|    504|      }

_ZNK5Botan17DilithiumShakeXOF6XOF128ENSt3__14spanIKhLm18446744073709551615EEEt:
   27|  2.90k|      std::unique_ptr<XOF> XOF128(std::span<const uint8_t> seed, uint16_t nonce) const override {
   28|  2.90k|         return createXOF("SHAKE-128", seed, nonce);
   29|  2.90k|      }
_ZNK5Botan17DilithiumShakeXOF6XOF256ENSt3__14spanIKhLm18446744073709551615EEEt:
   31|    941|      std::unique_ptr<XOF> XOF256(std::span<const uint8_t> seed, uint16_t nonce) const override {
   32|    941|         return createXOF("SHAKE-256", seed, nonce);
   33|    941|      }
_ZN5Botan17DilithiumShakeXOFC2Ev:
   18|    164|      DilithiumShakeXOF() = default;

_ZNK5Botan35Dilithium_Symmetric_Primitives_Base1HENS_10StrongSpanIKNS_6StrongINSt3__16vectorIhNS3_9allocatorIhEEEENS_29DilithiumSerializedPublicKey_EJEEEEE:
  120|     79|      DilithiumHashedPublicKey H(StrongSpan<const DilithiumSerializedPublicKey> pk) const {
  121|     79|         return H_256<DilithiumHashedPublicKey>(m_public_key_hash_bytes, pk);
  122|     79|      }
_ZNK5Botan35Dilithium_Symmetric_Primitives_Base5H_256ITkNS_8concepts21resizable_byte_bufferENS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS_25DilithiumHashedPublicKey_EJEEETpTkNS_6ranges14spanable_rangeEJNS_10StrongSpanIKNS3_IS8_NS_29DilithiumSerializedPublicKey_EJEEEEEEEET_mDpRKT0_:
  178|     79|      OutT H_256(size_t outbytes, const InTs&... ins) const {
  179|     79|         auto xof = XOF::create_or_throw("SHAKE-256");
  180|     79|         (xof->update(ins), ...);
  181|     79|         return xof->output<OutT>(outbytes);
  182|     79|      }
_ZNK5Botan35Dilithium_Symmetric_Primitives_Base1HENS_10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_24DilithiumSeedRandomness_EJEEEEE:
  125|     79|         StrongSpan<const DilithiumSeedRandomness> seed) const {
  126|     79|         auto xof = XOF::create_or_throw("SHAKE-256");
  127|     79|         xof->update(seed);
  128|     79|         if(auto domsep = seed_expansion_domain_separator()) {
  ------------------
  |  Branch (128:18): [True: 79, False: 0]
  ------------------
  129|     79|            xof->update(domsep.value());
  130|     79|         }
  131|       |
  132|       |         // Note: The order of invocations in an initializer list is not
  133|       |         //       guaranteed by the C++ standard. Hence, we have to store the
  134|       |         //       results in variables to ensure the correct order of execution.
  135|     79|         auto rho = xof->output<DilithiumSeedRho>(DilithiumConstants::SEED_RHO_BYTES);
  136|     79|         auto rhoprime = xof->output<DilithiumSeedRhoPrime>(DilithiumConstants::SEED_RHOPRIME_BYTES);
  137|     79|         auto k = xof->output<DilithiumSigningSeedK>(DilithiumConstants::SEED_SIGNING_KEY_BYTES);
  138|       |
  139|     79|         return {std::move(rho), std::move(rhoprime), std::move(k)};
  140|     79|      }
_ZNK5Botan35Dilithium_Symmetric_Primitives_Base1HENS_10StrongSpanIKNS_6StrongINSt3__16vectorIhNS3_9allocatorIhEEEENS_20DilithiumPublicSeed_EJEEEEEt:
  153|  2.90k|      std::unique_ptr<XOF> H(StrongSpan<const DilithiumSeedRho> seed, uint16_t nonce) const {
  154|  2.90k|         return m_xof_adapter->XOF128(seed, nonce);
  155|  2.90k|      }
_ZNK5Botan35Dilithium_Symmetric_Primitives_Base1HENS_10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_22DilithiumSeedRhoPrime_EJEEEEEt:
  157|    941|      std::unique_ptr<XOF> H(StrongSpan<const DilithiumSeedRhoPrime> seed, uint16_t nonce) const {
  158|    941|         return m_xof_adapter->XOF256(seed, nonce);
  159|    941|      }
_ZN5Botan12DilithiumXOFD2Ev:
   86|    164|      virtual ~DilithiumXOF() = default;
_ZN5Botan35Dilithium_Symmetric_Primitives_BaseD2Ev:
  103|    164|      virtual ~Dilithium_Symmetric_Primitives_Base() = default;

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

_ZNK5Botan17EC_Scalar_Data_BN5valueEv:
   52|  1.48k|      const BigInt& value() const { return m_v; }
_ZN5Botan17EC_Scalar_Data_BNC2ENSt3__110shared_ptrIKNS_13EC_Group_DataEEENS_6BigIntE:
   18|  1.35k|            m_group(std::move(group)), m_v(std::move(v)) {}
_ZNK5Botan22EC_AffinePoint_Data_BN15to_legacy_pointEv:
   85|    138|      EC_Point to_legacy_point() const override { return m_pt; }

_ZNK5Botan13EC_Group_Data7p_bytesEv:
  205|  2.19k|      size_t p_bytes() const { return (m_p_bits + 7) / 8; }
_ZNK5Botan13EC_Group_Data11order_bytesEv:
  209|  10.3k|      size_t order_bytes() const { return m_order_bytes; }
_ZNK5Botan13EC_Group_Data1pEv:
  169|   622k|      const BigInt& p() const { return m_p; }
_ZNK5Botan13EC_Group_Data1aEv:
  171|    277|      const BigInt& a() const { return m_a; }
_ZNK5Botan13EC_Group_Data1bEv:
  173|    276|      const BigInt& b() const { return m_b; }
_ZNK5Botan13EC_Group_Data5orderEv:
  175|    248|      const BigInt& order() const { return m_order; }
_ZNK5Botan13EC_Group_Data8cofactorEv:
  177|    248|      const BigInt& cofactor() const { return m_cofactor; }
_ZNK5Botan13EC_Group_Data3oidEv:
  165|  4.32k|      const OID& oid() const { return m_oid; }
_ZNK5Botan13EC_Group_Data5curveEv:
  180|  1.65k|      const CurveGFp& curve() const { return m_curve; }
_ZNK5Botan13EC_Group_Data5montyEv:
  184|  11.7M|      const Montgomery_Params& monty() const { return m_monty; }
_ZNK5Botan13EC_Group_Data7monty_aEv:
  186|     23|      const BigInt& monty_a() const { return m_a_r; }
_ZNK5Botan13EC_Group_Data7monty_bEv:
  188|     23|      const BigInt& monty_b() const { return m_b_r; }
_ZNK5Botan13EC_Group_Data7p_wordsEv:
  201|   963k|      size_t p_words() const { return m_p_words; }
_ZNK5Botan13EC_Group_Data12a_is_minus_3Ev:
  211|  50.2k|      bool a_is_minus_3() const { return m_a_is_minus_3; }
_ZNK5Botan13EC_Group_Data9a_is_zeroEv:
  213|   259k|      bool a_is_zero() const { return m_a_is_zero; }
_ZNK5Botan13EC_Group_Data6pcurveEv:
  292|  9.00k|      const PCurve::PrimeOrderCurve& pcurve() const {
  293|  9.00k|         BOTAN_ASSERT_NONNULL(m_pcurve);
  ------------------
  |  |  116|  9.00k|   do {                                                                                   \
  |  |  117|  9.00k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (117:10): [True: 0, False: 9.00k]
  |  |  ------------------
  |  |  118|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  119|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  120|      0|      }                                                                                   \
  |  |  121|  9.00k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (121:12): [Folded, False: 9.00k]
  |  |  ------------------
  ------------------
  294|  9.00k|         return *m_pcurve;
  295|  9.00k|      }
_ZN5Botan19EC_AffinePoint_DataD2Ev:
   73|  1.78k|      virtual ~EC_AffinePoint_Data() = default;
_ZN5Botan14EC_Scalar_DataD2Ev:
   38|  5.40k|      virtual ~EC_Scalar_Data() = default;

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

_ZNK5Botan17EC_PublicKey_Data5groupEv:
   30|  1.78k|      const EC_Group& group() const { return m_group; }

_ZN5Botan20Ed25519_FieldElementC2Ev:
   33|  2.93k|      constexpr Ed25519_FieldElement() : m_fe{} {}
_ZN5Botan20Ed25519_FieldElement4zeroEv:
   35|    132|      constexpr static Ed25519_FieldElement zero() { return Ed25519_FieldElement(); }
_ZN5Botan20Ed25519_FieldElement3oneEv:
   37|    260|      constexpr static Ed25519_FieldElement one() {
   38|    260|         auto o = Ed25519_FieldElement();
   39|    260|         o.m_fe[0] = 1;
   40|    260|         return o;
   41|    260|      }
_ZN5BotanmlERKNS_20Ed25519_FieldElementES2_:
  148|    948|inline Ed25519_FieldElement operator*(const Ed25519_FieldElement& x, const Ed25519_FieldElement& y) {
  149|    948|   return Ed25519_FieldElement::mul(x, y);
  150|    948|}
_ZN5BotanplERKNS_20Ed25519_FieldElementES2_:
  140|    528|inline Ed25519_FieldElement operator+(const Ed25519_FieldElement& x, const Ed25519_FieldElement& y) {
  141|    528|   return Ed25519_FieldElement::add(x, y);
  142|    528|}
_ZN5Botan20Ed25519_FieldElement3addERKS0_S2_:
   94|    528|      static Ed25519_FieldElement add(const Ed25519_FieldElement& a, const Ed25519_FieldElement& b) {
   95|    528|         Ed25519_FieldElement z;
   96|  5.80k|         for(size_t i = 0; i != 10; ++i) {
  ------------------
  |  Branch (96:28): [True: 5.28k, False: 528]
  ------------------
   97|  5.28k|            z.m_fe[i] = a.m_fe[i] + b.m_fe[i];
   98|  5.28k|         }
   99|    528|         return z;
  100|    528|      }
_ZN5BotanmiERKNS_20Ed25519_FieldElementES2_:
  144|    408|inline Ed25519_FieldElement operator-(const Ed25519_FieldElement& x, const Ed25519_FieldElement& y) {
  145|    408|   return Ed25519_FieldElement::sub(x, y);
  146|    408|}
_ZN5Botan20Ed25519_FieldElement3subERKS0_S2_:
  102|    408|      static Ed25519_FieldElement sub(const Ed25519_FieldElement& a, const Ed25519_FieldElement& b) {
  103|    408|         Ed25519_FieldElement z;
  104|  4.48k|         for(size_t i = 0; i != 10; ++i) {
  ------------------
  |  Branch (104:28): [True: 4.08k, False: 408]
  ------------------
  105|  4.08k|            z.m_fe[i] = a.m_fe[i] - b.m_fe[i];
  106|  4.08k|         }
  107|    408|         return z;
  108|    408|      }
_ZN5Botan20Ed25519_FieldElementixEm:
  134|  53.7k|      int32_t& operator[](size_t i) { return m_fe[i]; }
_ZNK5Botan20Ed25519_FieldElementixEm:
  132|  30.7k|      int32_t operator[](size_t i) const { return m_fe[i]; }
_ZN5BotanngERKNS_20Ed25519_FieldElementE:
  152|    128|inline Ed25519_FieldElement operator-(const Ed25519_FieldElement& x) {
  153|    128|   return Ed25519_FieldElement::negate(x);
  154|    128|}
_ZN5Botan20Ed25519_FieldElement6negateERKS0_:
  110|    128|      static Ed25519_FieldElement negate(const Ed25519_FieldElement& a) {
  111|    128|         Ed25519_FieldElement z;
  112|  1.40k|         for(size_t i = 0; i != 10; ++i) {
  ------------------
  |  Branch (112:28): [True: 1.28k, False: 128]
  ------------------
  113|  1.28k|            z.m_fe[i] = -a.m_fe[i];
  114|  1.28k|         }
  115|    128|         return z;
  116|    128|      }
_ZNK5Botan20Ed25519_FieldElement3sqrEv:
  122|     28|      Ed25519_FieldElement sqr() const { return sqr_iter(1); }
_ZNK5Botan20Ed25519_FieldElement11is_negativeEv:
   87|      2|      bool is_negative() const {
   88|       |         // TODO could avoid most of the serialize computation here
   89|      2|         std::array<uint8_t, 32> s = {};
   90|      2|         this->serialize_to(s);
   91|      2|         return (s[0] & 0x01) == 0x01;
   92|      2|      }
_ZN5Botan20Ed25519_FieldElementC2Ellllllllll:
   60|  1.00k|                                     int64_t h9) {
   61|  1.00k|         m_fe[0] = static_cast<int32_t>(h0);
   62|  1.00k|         m_fe[1] = static_cast<int32_t>(h1);
   63|  1.00k|         m_fe[2] = static_cast<int32_t>(h2);
   64|  1.00k|         m_fe[3] = static_cast<int32_t>(h3);
   65|  1.00k|         m_fe[4] = static_cast<int32_t>(h4);
   66|  1.00k|         m_fe[5] = static_cast<int32_t>(h5);
   67|  1.00k|         m_fe[6] = static_cast<int32_t>(h6);
   68|  1.00k|         m_fe[7] = static_cast<int32_t>(h7);
   69|  1.00k|         m_fe[8] = static_cast<int32_t>(h8);
   70|  1.00k|         m_fe[9] = static_cast<int32_t>(h9);
   71|  1.00k|      }

_ZN5Botan5carryILm26ELl1EEEvRlS1_QaagtT_Li0EltT_Li64E:
   29|  10.4k|{
   30|  10.4k|   const int64_t X1 = (static_cast<int64_t>(1) << S);
   31|  10.4k|   const int64_t X2 = (static_cast<int64_t>(1) << (S - 1));
   32|  10.4k|   const int64_t c = (h0 + X2) >> S;
   33|  10.4k|   h1 += c * MUL;
   34|  10.4k|   h0 -= c * X1;
   35|  10.4k|}
_ZN5Botan5carryILm25ELl1EEEvRlS1_QaagtT_Li0EltT_Li64E:
   29|  5.95k|{
   30|  5.95k|   const int64_t X1 = (static_cast<int64_t>(1) << S);
   31|  5.95k|   const int64_t X2 = (static_cast<int64_t>(1) << (S - 1));
   32|  5.95k|   const int64_t c = (h0 + X2) >> S;
   33|  5.95k|   h1 += c * MUL;
   34|  5.95k|   h0 -= c * X1;
   35|  5.95k|}
_ZN5Botan5carryILm25ELl19EEEvRlS1_QaagtT_Li0EltT_Li64E:
   29|  1.48k|{
   30|  1.48k|   const int64_t X1 = (static_cast<int64_t>(1) << S);
   31|  1.48k|   const int64_t X2 = (static_cast<int64_t>(1) << (S - 1));
   32|  1.48k|   const int64_t c = (h0 + X2) >> S;
   33|  1.48k|   h1 += c * MUL;
   34|  1.48k|   h0 -= c * X1;
   35|  1.48k|}
_ZN5Botan6carry0ILm26EEEvRiS1_QaagtT_Li0EltT_Li32E:
   50|     20|{
   51|     20|   const int32_t X1 = (static_cast<int64_t>(1) << S);
   52|     20|   const int32_t c = h0 >> S;
   53|     20|   h1 += c;
   54|     20|   h0 -= c * X1;
   55|     20|}
_ZN5Botan6carry0ILm25EEEvRiS1_QaagtT_Li0EltT_Li32E:
   50|     16|{
   51|     16|   const int32_t X1 = (static_cast<int64_t>(1) << S);
   52|     16|   const int32_t c = h0 >> S;
   53|     16|   h1 += c;
   54|     16|   h0 -= c * X1;
   55|     16|}

_ZN5Botan3fmtIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEES7_NS1_17basic_string_viewIcS4_EEDpRKT_:
   53|    458|std::string fmt(std::string_view format, const T&... args) {
   54|    458|   std::ostringstream oss;
   55|    458|   oss.imbue(std::locale::classic());
   56|    458|   fmt_detail::do_fmt(oss, format, args...);
   57|    458|   return oss.str();
   58|    458|}
_ZN5Botan10fmt_detail6do_fmtINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEJEEEvRNS2_19basic_ostringstreamIcS5_S7_EENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    458|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    458|   size_t i = 0;
   27|       |
   28|  10.6k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 10.6k, False: 0]
  ------------------
   29|  10.6k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 458, False: 10.1k]
  |  Branch (29:30): [True: 458, False: 0]
  |  Branch (29:59): [True: 458, False: 0]
  ------------------
   30|    458|         oss << val;
   31|    458|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  10.1k|      } else {
   33|  10.1k|         oss << format[i];
   34|  10.1k|      }
   35|       |
   36|  10.1k|      i += 1;
   37|  10.1k|   }
   38|    458|}
_ZN5Botan10fmt_detail6do_fmtERNSt3__119basic_ostringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EE:
   20|  13.1k|inline void do_fmt(std::ostringstream& oss, std::string_view format) {
   21|  13.1k|   oss << format;
   22|  13.1k|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|  7.94k|std::string fmt(std::string_view format, const T&... args) {
   54|  7.94k|   std::ostringstream oss;
   55|  7.94k|   oss.imbue(std::locale::classic());
   56|  7.94k|   fmt_detail::do_fmt(oss, format, args...);
   57|  7.94k|   return oss.str();
   58|  7.94k|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|  9.72k|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|  9.72k|   size_t i = 0;
   27|       |
   28|  95.1k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 95.1k, False: 0]
  ------------------
   29|  95.1k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 9.72k, False: 85.4k]
  |  Branch (29:30): [True: 9.72k, False: 0]
  |  Branch (29:59): [True: 9.72k, False: 0]
  ------------------
   30|  9.72k|         oss << val;
   31|  9.72k|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  85.4k|      } else {
   33|  85.4k|         oss << format[i];
   34|  85.4k|      }
   35|       |
   36|  85.4k|      i += 1;
   37|  85.4k|   }
   38|  9.72k|}
_ZN5Botan3fmtIJNS_3OIDEEEENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EEDpRKT_:
   53|  1.73k|std::string fmt(std::string_view format, const T&... args) {
   54|  1.73k|   std::ostringstream oss;
   55|  1.73k|   oss.imbue(std::locale::classic());
   56|  1.73k|   fmt_detail::do_fmt(oss, format, args...);
   57|  1.73k|   return oss.str();
   58|  1.73k|}
_ZN5Botan10fmt_detail6do_fmtINS_3OIDEJEEEvRNSt3__119basic_ostringstreamIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_17basic_string_viewIcS6_EERKT_DpRKT0_:
   25|  1.73k|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|  1.73k|   size_t i = 0;
   27|       |
   28|  39.8k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 39.8k, False: 0]
  ------------------
   29|  39.8k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 1.73k, False: 38.1k]
  |  Branch (29:30): [True: 1.73k, False: 0]
  |  Branch (29:59): [True: 1.73k, False: 0]
  ------------------
   30|  1.73k|         oss << val;
   31|  1.73k|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  38.1k|      } else {
   33|  38.1k|         oss << format[i];
   34|  38.1k|      }
   35|       |
   36|  38.1k|      i += 1;
   37|  38.1k|   }
   38|  1.73k|}
_ZN5Botan3fmtIJPKcS2_S2_EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_17basic_string_viewIcS6_EEDpRKT_:
   53|      3|std::string fmt(std::string_view format, const T&... args) {
   54|      3|   std::ostringstream oss;
   55|      3|   oss.imbue(std::locale::classic());
   56|      3|   fmt_detail::do_fmt(oss, format, args...);
   57|      3|   return oss.str();
   58|      3|}
_ZN5Botan10fmt_detail6do_fmtIPKcJS3_S3_EEEvRNSt3__119basic_ostringstreamIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_17basic_string_viewIcS7_EERKT_DpRKT0_:
   25|      3|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|      3|   size_t i = 0;
   27|       |
   28|      3|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 3, False: 0]
  ------------------
   29|      3|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 3, False: 0]
  |  Branch (29:30): [True: 3, False: 0]
  |  Branch (29:59): [True: 3, False: 0]
  ------------------
   30|      3|         oss << val;
   31|      3|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|      3|      } else {
   33|      0|         oss << format[i];
   34|      0|      }
   35|       |
   36|      0|      i += 1;
   37|      0|   }
   38|      3|}
_ZN5Botan10fmt_detail6do_fmtIPKcJS3_EEEvRNSt3__119basic_ostringstreamIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_17basic_string_viewIcS7_EERKT_DpRKT0_:
   25|      3|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|      3|   size_t i = 0;
   27|       |
   28|     15|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 15, False: 0]
  ------------------
   29|     15|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 3, False: 12]
  |  Branch (29:30): [True: 3, False: 0]
  |  Branch (29:59): [True: 3, False: 0]
  ------------------
   30|      3|         oss << val;
   31|      3|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|     12|      } else {
   33|     12|         oss << format[i];
   34|     12|      }
   35|       |
   36|     12|      i += 1;
   37|     12|   }
   38|      3|}
_ZN5Botan10fmt_detail6do_fmtIPKcJEEEvRNSt3__119basic_ostringstreamIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_17basic_string_viewIcS7_EERKT_DpRKT0_:
   25|  1.14k|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|  1.14k|   size_t i = 0;
   27|       |
   28|  16.0k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 16.0k, False: 0]
  ------------------
   29|  16.0k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 1.14k, False: 14.8k]
  |  Branch (29:30): [True: 1.14k, False: 0]
  |  Branch (29:59): [True: 1.14k, False: 0]
  ------------------
   30|  1.14k|         oss << val;
   31|  1.14k|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  14.8k|      } else {
   33|  14.8k|         oss << format[i];
   34|  14.8k|      }
   35|       |
   36|  14.8k|      i += 1;
   37|  14.8k|   }
   38|  1.14k|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJS6_EEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|  1.78k|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|  1.78k|   size_t i = 0;
   27|       |
   28|  1.78k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 1.78k, False: 0]
  ------------------
   29|  1.78k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 1.78k, False: 0]
  |  Branch (29:30): [True: 1.78k, False: 0]
  |  Branch (29:59): [True: 1.78k, False: 0]
  ------------------
   30|  1.78k|         oss << val;
   31|  1.78k|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  1.78k|      } else {
   33|      0|         oss << format[i];
   34|      0|      }
   35|       |
   36|      0|      i += 1;
   37|      0|   }
   38|  1.78k|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEPKcEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|  1.13k|std::string fmt(std::string_view format, const T&... args) {
   54|  1.13k|   std::ostringstream oss;
   55|  1.13k|   oss.imbue(std::locale::classic());
   56|  1.13k|   fmt_detail::do_fmt(oss, format, args...);
   57|  1.13k|   return oss.str();
   58|  1.13k|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJPKcEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|  1.13k|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|  1.13k|   size_t i = 0;
   27|       |
   28|  1.13k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 1.13k, False: 0]
  ------------------
   29|  1.13k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 1.13k, False: 0]
  |  Branch (29:30): [True: 1.13k, False: 0]
  |  Branch (29:59): [True: 1.13k, False: 0]
  ------------------
   30|  1.13k|         oss << val;
   31|  1.13k|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  1.13k|      } else {
   33|      0|         oss << format[i];
   34|      0|      }
   35|       |
   36|      0|      i += 1;
   37|      0|   }
   38|  1.13k|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_EEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|  1.78k|std::string fmt(std::string_view format, const T&... args) {
   54|  1.78k|   std::ostringstream oss;
   55|  1.78k|   oss.imbue(std::locale::classic());
   56|  1.78k|   fmt_detail::do_fmt(oss, format, args...);
   57|  1.78k|   return oss.str();
   58|  1.78k|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEjEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|     57|std::string fmt(std::string_view format, const T&... args) {
   54|     57|   std::ostringstream oss;
   55|     57|   oss.imbue(std::locale::classic());
   56|     57|   fmt_detail::do_fmt(oss, format, args...);
   57|     57|   return oss.str();
   58|     57|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJjEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|     57|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     57|   size_t i = 0;
   27|       |
   28|     57|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 57, False: 0]
  ------------------
   29|     57|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 57, False: 0]
  |  Branch (29:30): [True: 57, False: 0]
  |  Branch (29:59): [True: 57, False: 0]
  ------------------
   30|     57|         oss << val;
   31|     57|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|     57|      } else {
   33|      0|         oss << format[i];
   34|      0|      }
   35|       |
   36|      0|      i += 1;
   37|      0|   }
   38|     57|}
_ZN5Botan10fmt_detail6do_fmtIjJEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|     57|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     57|   size_t i = 0;
   27|       |
   28|    171|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 171, False: 0]
  ------------------
   29|    171|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 57, False: 114]
  |  Branch (29:30): [True: 57, False: 0]
  |  Branch (29:59): [True: 57, False: 0]
  ------------------
   30|     57|         oss << val;
   31|     57|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|    114|      } else {
   33|    114|         oss << format[i];
   34|    114|      }
   35|       |
   36|    114|      i += 1;
   37|    114|   }
   38|     57|}
_ZN5Botan3fmtIJmPKcEEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_17basic_string_viewIcS6_EEDpRKT_:
   53|      6|std::string fmt(std::string_view format, const T&... args) {
   54|      6|   std::ostringstream oss;
   55|      6|   oss.imbue(std::locale::classic());
   56|      6|   fmt_detail::do_fmt(oss, format, args...);
   57|      6|   return oss.str();
   58|      6|}
_ZN5Botan10fmt_detail6do_fmtImJPKcEEEvRNSt3__119basic_ostringstreamIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_17basic_string_viewIcS7_EERKT_DpRKT0_:
   25|      6|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|      6|   size_t i = 0;
   27|       |
   28|     84|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 84, False: 0]
  ------------------
   29|     84|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 6, False: 78]
  |  Branch (29:30): [True: 6, False: 0]
  |  Branch (29:59): [True: 6, False: 0]
  ------------------
   30|      6|         oss << val;
   31|      6|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|     78|      } else {
   33|     78|         oss << format[i];
   34|     78|      }
   35|       |
   36|     78|      i += 1;
   37|     78|   }
   38|      6|}

_ZN5Botan11checked_mulITkNSt3__117unsigned_integralEmEENS1_8optionalIT_EES3_S3_:
   46|  16.1M|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|  16.1M|   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|  16.1M|   if(a != 0 && r / a != b) {
  ------------------
  |  Branch (53:7): [True: 16.1M, False: 0]
  |  Branch (53:17): [True: 0, False: 16.1M]
  ------------------
   54|      0|      return {};
   55|      0|   }
   56|  16.1M|   return r;
   57|  16.1M|}
_ZN5Botan11checked_addITkNSt3__117unsigned_integralEjEENS1_8optionalIT_EES3_S3_:
   19|  2.79k|constexpr inline std::optional<T> checked_add(T a, T b) {
   20|  2.79k|   const T r = a + b;
   21|  2.79k|   if(r < a || r < b) {
  ------------------
  |  Branch (21:7): [True: 0, False: 2.79k]
  |  Branch (21:16): [True: 0, False: 2.79k]
  ------------------
   22|      0|      return {};
   23|      0|   }
   24|  2.79k|   return r;
   25|  2.79k|}
_ZN5Botan13swar_in_rangeITkNSt3__117unsigned_integralEmEET_S2_S2_S2_:
  144|  1.22M|constexpr T swar_in_range(T v, T lower, T upper) {
  145|       |   // The constant 0x808080... as a T
  146|  1.22M|   constexpr T hi1 = (static_cast<T>(-1) / 255) << 7;
  147|       |   // The constant 0x7F7F7F... as a T
  148|  1.22M|   constexpr T lo7 = ~hi1;
  149|       |
  150|  1.22M|   const T sub = ((v | hi1) - (lower & lo7)) ^ ((v ^ (~lower)) & hi1);
  151|  1.22M|   const T a_lo = sub & lo7;
  152|  1.22M|   const T a_hi = sub & hi1;
  153|  1.22M|   return (lo7 - a_lo + upper) & hi1 & ~a_hi;
  154|  1.22M|}
_ZN5Botan23index_of_first_set_byteITkNSt3__117unsigned_integralEmEEmT_:
  160|  1.19M|constexpr size_t index_of_first_set_byte(T v) {
  161|       |   // The constant 0x010101... as a T
  162|  1.19M|   constexpr T lo1 = (static_cast<T>(-1) / 255);
  163|       |   // The constant 0x808080... as a T
  164|  1.19M|   constexpr T hi1 = lo1 << 7;
  165|       |   // How many bits to shift in order to get the top byte
  166|  1.19M|   constexpr size_t bits = (sizeof(T) * 8) - 8;
  167|       |
  168|  1.19M|   return static_cast<size_t>((((((v & hi1) - 1) & lo1) * lo1) >> bits) - 1);
  169|  1.19M|}

_ZN5Botan13KeccakPadding4sha3Ev:
   24|     56|      static constexpr KeccakPadding sha3() { return {.padding = 0b10 /* little-endian */, .bit_len = 2}; }
_ZN5Botan13KeccakPadding5shakeEv:
   27|  4.05k|      static constexpr KeccakPadding shake() { return {.padding = 0b1111, .bit_len = 4}; }
_ZN5Botan18Keccak_PermutationC2ENS0_6ConfigE:
   69|  4.11k|            Sponge({.bit_rate = state_bits() - config.capacity_bits, .initial_state = {}}), m_padding(config.padding) {}

_ZN5Botan24Keccak_Permutation_roundEPmPKmm:
   15|   457k|BOTAN_FORCE_INLINE void Keccak_Permutation_round(uint64_t T[25], const uint64_t A[25], uint64_t RC) {
   16|   457k|   const uint64_t C0 = A[0] ^ A[5] ^ A[10] ^ A[15] ^ A[20];
   17|   457k|   const uint64_t C1 = A[1] ^ A[6] ^ A[11] ^ A[16] ^ A[21];
   18|   457k|   const uint64_t C2 = A[2] ^ A[7] ^ A[12] ^ A[17] ^ A[22];
   19|   457k|   const uint64_t C3 = A[3] ^ A[8] ^ A[13] ^ A[18] ^ A[23];
   20|   457k|   const uint64_t C4 = A[4] ^ A[9] ^ A[14] ^ A[19] ^ A[24];
   21|       |
   22|   457k|   const uint64_t D0 = rotl<1>(C0) ^ C3;
   23|   457k|   const uint64_t D1 = rotl<1>(C1) ^ C4;
   24|   457k|   const uint64_t D2 = rotl<1>(C2) ^ C0;
   25|   457k|   const uint64_t D3 = rotl<1>(C3) ^ C1;
   26|   457k|   const uint64_t D4 = rotl<1>(C4) ^ C2;
   27|       |
   28|   457k|   const uint64_t B00 = A[0] ^ D1;
   29|   457k|   const uint64_t B01 = rotl<44>(A[6] ^ D2);
   30|   457k|   const uint64_t B02 = rotl<43>(A[12] ^ D3);
   31|   457k|   const uint64_t B03 = rotl<21>(A[18] ^ D4);
   32|   457k|   const uint64_t B04 = rotl<14>(A[24] ^ D0);
   33|   457k|   T[0] = B00 ^ (~B01 & B02) ^ RC;
   34|   457k|   T[1] = B01 ^ (~B02 & B03);
   35|   457k|   T[2] = B02 ^ (~B03 & B04);
   36|   457k|   T[3] = B03 ^ (~B04 & B00);
   37|   457k|   T[4] = B04 ^ (~B00 & B01);
   38|       |
   39|   457k|   const uint64_t B05 = rotl<28>(A[3] ^ D4);
   40|   457k|   const uint64_t B06 = rotl<20>(A[9] ^ D0);
   41|   457k|   const uint64_t B07 = rotl<3>(A[10] ^ D1);
   42|   457k|   const uint64_t B08 = rotl<45>(A[16] ^ D2);
   43|   457k|   const uint64_t B09 = rotl<61>(A[22] ^ D3);
   44|   457k|   T[5] = B05 ^ (~B06 & B07);
   45|   457k|   T[6] = B06 ^ (~B07 & B08);
   46|   457k|   T[7] = B07 ^ (~B08 & B09);
   47|   457k|   T[8] = B08 ^ (~B09 & B05);
   48|   457k|   T[9] = B09 ^ (~B05 & B06);
   49|       |
   50|   457k|   const uint64_t B10 = rotl<1>(A[1] ^ D2);
   51|   457k|   const uint64_t B11 = rotl<6>(A[7] ^ D3);
   52|   457k|   const uint64_t B12 = rotl<25>(A[13] ^ D4);
   53|   457k|   const uint64_t B13 = rotl<8>(A[19] ^ D0);
   54|   457k|   const uint64_t B14 = rotl<18>(A[20] ^ D1);
   55|   457k|   T[10] = B10 ^ (~B11 & B12);
   56|   457k|   T[11] = B11 ^ (~B12 & B13);
   57|   457k|   T[12] = B12 ^ (~B13 & B14);
   58|   457k|   T[13] = B13 ^ (~B14 & B10);
   59|   457k|   T[14] = B14 ^ (~B10 & B11);
   60|       |
   61|   457k|   const uint64_t B15 = rotl<27>(A[4] ^ D0);
   62|   457k|   const uint64_t B16 = rotl<36>(A[5] ^ D1);
   63|   457k|   const uint64_t B17 = rotl<10>(A[11] ^ D2);
   64|   457k|   const uint64_t B18 = rotl<15>(A[17] ^ D3);
   65|   457k|   const uint64_t B19 = rotl<56>(A[23] ^ D4);
   66|   457k|   T[15] = B15 ^ (~B16 & B17);
   67|   457k|   T[16] = B16 ^ (~B17 & B18);
   68|   457k|   T[17] = B17 ^ (~B18 & B19);
   69|   457k|   T[18] = B18 ^ (~B19 & B15);
   70|   457k|   T[19] = B19 ^ (~B15 & B16);
   71|       |
   72|   457k|   const uint64_t B20 = rotl<62>(A[2] ^ D3);
   73|   457k|   const uint64_t B21 = rotl<55>(A[8] ^ D4);
   74|   457k|   const uint64_t B22 = rotl<39>(A[14] ^ D0);
   75|   457k|   const uint64_t B23 = rotl<41>(A[15] ^ D1);
   76|   457k|   const uint64_t B24 = rotl<2>(A[21] ^ D2);
   77|   457k|   T[20] = B20 ^ (~B21 & B22);
   78|   457k|   T[21] = B21 ^ (~B22 & B23);
   79|   457k|   T[22] = B22 ^ (~B23 & B24);
   80|   457k|   T[23] = B23 ^ (~B24 & B20);
   81|   457k|   T[24] = B24 ^ (~B20 & B21);
   82|   457k|}

_ZN5Botan11Kyber_Algos17PolynomialSamplerINS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_15KyberSeedSigma_EJEEEEC2ENS_10StrongSpanIKS9_EERKNS_14KyberConstantsE:
   65|     28|            m_seed(seed), m_mode(mode), m_nonce(0) {}
_ZN5Botan11Kyber_Algos17PolynomialSamplerINS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_15KyberSeedSigma_EJEEEE33sample_polynomial_vector_cbd_eta1Ev:
   67|     56|      KyberPolyVec sample_polynomial_vector_cbd_eta1() {
   68|     56|         KyberPolyVec vec(m_mode.k());
   69|    186|         for(auto& poly : vec) {
  ------------------
  |  Branch (69:25): [True: 186, False: 56]
  ------------------
   70|    186|            sample_poly_cbd(poly, m_mode.eta1());
   71|    186|         }
   72|     56|         return vec;
   73|     56|      }
_ZN5Botan11Kyber_Algos17PolynomialSamplerINS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_15KyberSeedSigma_EJEEEE15sample_poly_cbdERNS_8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNSB_6DomainE0EEENS_14KyberConstants8KyberEtaE:
  101|    186|      void sample_poly_cbd(KyberPoly& poly, KyberConstants::KyberEta eta) {
  102|    186|         const auto randomness = [&] {
  103|    186|            switch(eta) {
  104|    186|               case KyberConstants::KyberEta::_2:
  105|    186|                  return prf(2 * poly.size() / 4);
  106|    186|               case KyberConstants::KyberEta::_3:
  107|    186|                  return prf(3 * poly.size() / 4);
  108|    186|            }
  109|       |
  110|    186|            BOTAN_ASSERT_UNREACHABLE();
  111|    186|         }();
  112|       |
  113|    186|         sample_polynomial_from_cbd(poly, eta, randomness);
  114|    186|      }
_ZZN5Botan11Kyber_Algos17PolynomialSamplerINS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_15KyberSeedSigma_EJEEEE15sample_poly_cbdERNS_8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNSB_6DomainE0EEENS_14KyberConstants8KyberEtaEENKUlvE_clEv:
  102|    186|         const auto randomness = [&] {
  103|    186|            switch(eta) {
  ------------------
  |  Branch (103:20): [True: 186, False: 0]
  ------------------
  104|    166|               case KyberConstants::KyberEta::_2:
  ------------------
  |  Branch (104:16): [True: 166, False: 20]
  ------------------
  105|    166|                  return prf(2 * poly.size() / 4);
  106|     20|               case KyberConstants::KyberEta::_3:
  ------------------
  |  Branch (106:16): [True: 20, False: 166]
  ------------------
  107|     20|                  return prf(3 * poly.size() / 4);
  108|    186|            }
  109|       |
  110|      0|            BOTAN_ASSERT_UNREACHABLE();
  ------------------
  |  |  163|      0|#define BOTAN_ASSERT_UNREACHABLE() Botan::assert_unreachable(__FILE__, __LINE__)
  ------------------
  111|      0|         }();
_ZN5Botan11Kyber_Algos17PolynomialSamplerINS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_15KyberSeedSigma_EJEEEE3prfEm:
   94|    186|      KyberSamplingRandomness prf(size_t bytes) {
   95|    186|         const auto& sym = m_mode.symmetric_primitives();
   96|    186|         auto seed_span = m_seed.get();
   97|    186|         sym.setup_PRF(m_prf_xof, seed_span, m_nonce++);
   98|    186|         return m_prf_xof->output<KyberSamplingRandomness>(bytes);
   99|    186|      }
_ZN5Botan11Kyber_Algos24encode_polynomial_vectorITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS3_9allocatorIhEEEEEET_RKNS_8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS9_6DomainE1EEERKNS_14KyberConstantsE:
   48|     28|T encode_polynomial_vector(const KyberPolyVecNTT& vec, const KyberConstants& mode) {
   49|     28|   T r(mode.polynomial_vector_bytes());
   50|     28|   encode_polynomial_vector(r, vec);
   51|     28|   return r;
   52|     28|}

_ZNK5Botan14KyberConstants4modeEv:
   73|     40|      KyberMode mode() const { return m_mode; }
_ZNK5Botan14KyberConstants1kEv:
   81|    803|      uint8_t k() const { return m_k; }
_ZNK5Botan14KyberConstants23polynomial_vector_bytesEv:
   99|     90|      size_t polynomial_vector_bytes() const { return m_polynomial_vector_bytes; }
_ZNK5Botan14KyberConstants22seed_private_key_bytesEv:
  121|     34|      size_t seed_private_key_bytes() const { return m_seed_private_key_bytes; }
_ZN5Botan14KyberConstantsC2EOS0_:
   69|    140|      KyberConstants(KyberConstants&& other) = default;
_ZNK5Botan14KyberConstants26expanded_private_key_bytesEv:
  118|      6|      size_t expanded_private_key_bytes() const { return m_expanded_private_key_bytes; }
_ZN5Botan14KyberConstantsC2ERKS0_:
   67|     28|      KyberConstants(const KyberConstants& other) : KyberConstants(other.m_mode) {}
_ZNK5Botan14KyberConstants4eta1Ev:
   83|    186|      KyberEta eta1() const { return m_eta1; }
_ZNK5Botan14KyberConstants3d_uEv:
   87|     62|      KyberDu d_u() const { return m_du; }
_ZNK5Botan14KyberConstants3d_vEv:
   89|     62|      KyberDv d_v() const { return m_dv; }
_ZNK5Botan14KyberConstants16public_key_bytesEv:
  114|     62|      size_t public_key_bytes() const { return polynomial_vector_bytes() + SEED_BYTES; }
_ZNK5Botan14KyberConstants20symmetric_primitivesEv:
  125|    270|      Kyber_Symmetric_Primitives& symmetric_primitives() const { return *m_symmetric_primitives; }

_ZN5Botan11Kyber_Algos8load_le3ENSt3__14spanIKhLm3EEE:
   24|  53.0k|inline uint32_t load_le3(std::span<const uint8_t, 3> in) {
   25|  53.0k|   return Botan::load_le(std::array<uint8_t, 4>{in[0], in[1], in[2], 0});
   26|  53.0k|}

_ZN5Botan19Kyber_Keypair_CodecD2Ev:
   24|     28|      virtual ~Kyber_Keypair_Codec() = default;
_ZN5Botan24Kyber_PrivateKeyInternalC2ENS_14KyberConstantsENS_8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS2_6DomainE1EEENS_19KyberPrivateKeySeedE:
   86|     28|            m_mode(std::move(mode)), m_s(std::move(s)), m_seed(std::move(seed)) {}

_ZN5Botan15KyberPolyTraits29montgomery_reduce_coefficientEi:
   29|   398k|      constexpr static T montgomery_reduce_coefficient(T2 a) {
   30|   398k|         const T u = static_cast<T>(static_cast<T>(a) * Q_inverse);
   31|   398k|         auto t = static_cast<T2>(u) * Q;
   32|   398k|         t = a - t;
   33|   398k|         t >>= sizeof(T) * 8;
   34|   398k|         return static_cast<T>(t);
   35|   398k|      }
_ZN5Botan15KyberPolyTraits26barrett_reduce_coefficientEs:
   37|   119k|      constexpr static T barrett_reduce_coefficient(T a) {
   38|   119k|         constexpr T2 v = ((1U << 26) + Q / 2) / Q;
   39|   119k|         const T t = static_cast<T>(((v * a) >> 26) * Q);
   40|   119k|         return static_cast<T>(a - t);
   41|   119k|      }
_ZN5Botan15KyberPolyTraits3nttENSt3__14spanIsLm256EEE:
   51|    186|      constexpr static void ntt(std::span<T, N> p) {
   52|  1.48k|         for(size_t len = N / 2, i = 0; len >= 2; len /= 2) {
  ------------------
  |  Branch (52:41): [True: 1.30k, False: 186]
  ------------------
   53|  24.9k|            for(size_t start = 0, j = 0; start < N; start = j + len) {
  ------------------
  |  Branch (53:42): [True: 23.6k, False: 1.30k]
  ------------------
   54|  23.6k|               const auto zeta = zetas[++i];
   55|   190k|               for(j = start; j < start + len; ++j) {
  ------------------
  |  Branch (55:31): [True: 166k, False: 23.6k]
  ------------------
   56|   166k|                  const auto t = fqmul(zeta, p[j + len]);
   57|   166k|                  p[j + len] = static_cast<T>(p[j] - t);
   58|   166k|                  p[j] = static_cast<T>(p[j] + t);
   59|   166k|               }
   60|  23.6k|            }
   61|  1.30k|         }
   62|       |
   63|    186|         barrett_reduce(p);
   64|    186|      }
_ZZN5Botan15KyberPolyTraits25poly_pointwise_montgomeryENSt3__14spanIsLm256EEENS2_IKsLm256EEES5_ENKUlT_E_clIS3_EEDaS6_:
  111|  21.1k|         auto Tq_elem_count = [](auto p) { return p.size() / 2; };
_ZZN5Botan15KyberPolyTraits25poly_pointwise_montgomeryENSt3__14spanIsLm256EEENS2_IKsLm256EEES5_ENKUlT_mE_clIS3_EEDaS6_m:
  113|  41.6k|         auto Tq_elem = [](auto p, size_t i) {
  114|       |            if constexpr(std::is_const_v<typename decltype(p)::element_type>) {
  115|       |               return std::array<T, 2>{p[2 * i], p[2 * i + 1]};
  116|  41.6k|            } else {
  117|  41.6k|               return std::tuple<T&, T&>{p[2 * i], p[2 * i + 1]};
  118|  41.6k|            }
  119|  41.6k|         };
_ZZN5Botan15KyberPolyTraits25poly_pointwise_montgomeryENSt3__14spanIsLm256EEENS2_IKsLm256EEES5_ENKUlT_mE_clIS5_EEDaS6_m:
  113|  83.2k|         auto Tq_elem = [](auto p, size_t i) {
  114|  83.2k|            if constexpr(std::is_const_v<typename decltype(p)::element_type>) {
  115|  83.2k|               return std::array<T, 2>{p[2 * i], p[2 * i + 1]};
  116|       |            } else {
  117|       |               return std::tuple<T&, T&>{p[2 * i], p[2 * i + 1]};
  118|       |            }
  119|  83.2k|         };
_ZZN5Botan15KyberPolyTraits25poly_pointwise_montgomeryENSt3__14spanIsLm256EEENS2_IKsLm256EEES5_ENKUlT_T0_sE_clINS1_5arrayIsLm2EEESB_EENS1_5tupleIJssEEES6_S7_s:
  106|  41.6k|         auto basemul = [](const auto a, const auto b, const T zeta) -> std::tuple<T, T> {
  107|  41.6k|            return {static_cast<T>(fqmul(a[0], b[0]) + fqmul(fqmul(a[1], b[1]), zeta)),
  108|  41.6k|                    static_cast<T>(fqmul(a[0], b[1]) + fqmul(a[1], b[0]))};
  109|  41.6k|         };
_ZN5Botan15KyberPolyTraits25poly_pointwise_montgomeryENSt3__14spanIsLm256EEENS2_IKsLm256EEES5_:
  102|    325|                                                      std::span<const T, N> rhs) {
  103|       |         /**
  104|       |          * NIST FIPS 203, Algorithm 12 (BaseCaseMultiply)
  105|       |          */
  106|    325|         auto basemul = [](const auto a, const auto b, const T zeta) -> std::tuple<T, T> {
  107|    325|            return {static_cast<T>(fqmul(a[0], b[0]) + fqmul(fqmul(a[1], b[1]), zeta)),
  108|    325|                    static_cast<T>(fqmul(a[0], b[1]) + fqmul(a[1], b[0]))};
  109|    325|         };
  110|       |
  111|    325|         auto Tq_elem_count = [](auto p) { return p.size() / 2; };
  112|       |
  113|    325|         auto Tq_elem = [](auto p, size_t i) {
  114|    325|            if constexpr(std::is_const_v<typename decltype(p)::element_type>) {
  115|    325|               return std::array<T, 2>{p[2 * i], p[2 * i + 1]};
  116|    325|            } else {
  117|    325|               return std::tuple<T&, T&>{p[2 * i], p[2 * i + 1]};
  118|    325|            }
  119|    325|         };
  120|       |
  121|  21.1k|         for(size_t i = 0; i < Tq_elem_count(result) / 2; ++i) {
  ------------------
  |  Branch (121:28): [True: 20.8k, False: 325]
  ------------------
  122|  20.8k|            const T zeta = zetas[64 + i];
  123|  20.8k|            const T nzeta = static_cast<T>(-zeta);
  124|  20.8k|            Tq_elem(result, 2 * i) = basemul(Tq_elem(lhs, 2 * i), Tq_elem(rhs, 2 * i), zeta);
  125|  20.8k|            Tq_elem(result, 2 * i + 1) = basemul(Tq_elem(lhs, 2 * i + 1), Tq_elem(rhs, 2 * i + 1), nzeta);
  126|  20.8k|         }
  127|    325|      }

_ZNK5Botan26Kyber_Symmetric_Primitives1HENS_10StrongSpanIKNS_6StrongINSt3__16vectorIhNS3_9allocatorIhEEEENS_25KyberSerializedPublicKey_EJEEEEE:
   40|     28|      KyberHashedPublicKey H(StrongSpan<const KyberSerializedPublicKey> pk) const {
   41|     28|         return create_H()->process<KyberHashedPublicKey>(pk);
   42|     28|      }
_ZNK5Botan26Kyber_Symmetric_Primitives1GENS_10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_20KyberSeedRandomness_EJEEEEERKNS_14KyberConstantsE:
   45|     28|                                                const KyberConstants& mode) const {
   46|     28|         if(auto domsep = seed_expansion_domain_separator(mode)) {
  ------------------
  |  Branch (46:18): [True: 28, False: 0]
  ------------------
   47|     28|            return G_split<KyberSeedRho, KyberSeedSigma>(seed, *domsep);
   48|     28|         } else {
   49|      0|            return G_split<KyberSeedRho, KyberSeedSigma>(seed);
   50|      0|         }
   51|     28|      }
_ZNK5Botan26Kyber_Symmetric_Primitives9setup_XOFERNSt3__110unique_ptrINS_3XOFENS1_14default_deleteIS3_EEEENS_10StrongSpanIKNS_6StrongINS1_6vectorIhNS1_9allocatorIhEEEENS_13KyberSeedRho_EJEEEEENS1_5tupleIJhhEEE:
   86|    325|                     std::tuple<uint8_t, uint8_t> matrix_position) const {
   87|    325|         if(!xof) {
  ------------------
  |  Branch (87:13): [True: 28, False: 297]
  ------------------
   88|     28|            xof = create_XOF(seed, matrix_position);
   89|    297|         } else {
   90|    297|            init_XOF(*xof, seed, matrix_position);
   91|    297|         }
   92|    325|      }
_ZNK5Botan26Kyber_Symmetric_Primitives9setup_PRFERNSt3__110unique_ptrINS_3XOFENS1_14default_deleteIS3_EEEENS1_4spanIKhLm18446744073709551615EEEh:
   95|    186|      void setup_PRF(std::unique_ptr<Botan::XOF>& xof, std::span<const uint8_t> seed, uint8_t nonce) const {
   96|    186|         if(!xof) {
  ------------------
  |  Branch (96:13): [True: 28, False: 158]
  ------------------
   97|     28|            xof = create_PRF(seed, nonce);
   98|    158|         } else {
   99|    158|            init_PRF(*xof, seed, nonce);
  100|    158|         }
  101|    186|      }
_ZNK5Botan26Kyber_Symmetric_Primitives7G_splitITkNS_8concepts22contiguous_strong_typeENS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS_13KyberSeedRho_EJEEETkNS2_22contiguous_strong_typeENS3_INS5_IhNS_16secure_allocatorIhEEEENS_15KyberSeedSigma_EJEEETpTkNS_6ranges16contiguous_rangeEJNS_10StrongSpanIKNS3_ISD_NS_20KyberSeedRandomness_EJEEEEENS4_5arrayIhLm1EEEEEENS4_4pairIT_T0_EEDpRKT1_:
  107|     28|      std::pair<T1, T2> G_split(const InputTs&... inputs) const {
  108|     28|         auto g = create_G();
  109|     28|         (g->update(inputs), ...);
  110|     28|         const auto s = g->final();
  111|       |
  112|     28|         BufferSlicer bs(s);
  113|     28|         std::pair<T1, T2> result;
  114|     28|         result.first = bs.copy<T1>(KyberConstants::SEED_BYTES);
  115|     28|         result.second = bs.copy<T2>(KyberConstants::SEED_BYTES);
  116|     28|         BOTAN_ASSERT_NOMSG(bs.empty());
  ------------------
  |  |   77|     28|   do {                                                                     \
  |  |   78|     28|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|     28|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 28]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|     28|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 28]
  |  |  ------------------
  ------------------
  117|     28|         return result;
  118|     28|      }
_ZN5Botan26Kyber_Symmetric_PrimitivesD2Ev:
   30|     62|      virtual ~Kyber_Symmetric_Primitives() = default;

_ZN5Botan11make_uint16Ehh:
   92|    325|inline constexpr uint16_t make_uint16(uint8_t i0, uint8_t i1) {
   93|    325|   return static_cast<uint16_t>((static_cast<uint16_t>(i0) << 8) | i1);
   94|    325|}
_ZN5Botan11make_uint32Ehhhh:
  104|   744k|inline constexpr uint32_t make_uint32(uint8_t i0, uint8_t i1, uint8_t i2, uint8_t i3) {
  105|   744k|   return ((static_cast<uint32_t>(i0) << 24) | (static_cast<uint32_t>(i1) << 16) | (static_cast<uint32_t>(i2) << 8) |
  106|   744k|           (static_cast<uint32_t>(i3)));
  107|   744k|}
_ZN5Botan12get_byte_varImEEhmT_:
   69|  46.8k|inline constexpr uint8_t get_byte_var(size_t byte_num, T input) {
   70|  46.8k|   return static_cast<uint8_t>(input >> (((~byte_num) & (sizeof(T) - 1)) << 3));
   71|  46.8k|}
_ZN5Botan8store_beINS_6detail10AutoDetectEJRKmPhEEEDaDpOT0_:
  745|  5.63k|inline constexpr auto store_be(ParamTs&&... params) {
  746|  5.63k|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|  5.63k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS0_20unsigned_integralishEmQoosr3stdE7same_asIS4_T0_Esr3stdE7same_asIT1_S5_EEEvS6_Ph:
  711|  5.63k|inline constexpr void store_any(T in, uint8_t out[]) {
  712|       |   // asserts that *out points to enough bytes to write into
  713|  5.63k|   store_any<endianness, InT>(in, std::span<uint8_t, sizeof(T)>(out, sizeof(T)));
  714|  5.63k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS0_20unsigned_integralishEmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm8EEEQsr3stdE7same_asIS4_T0_EEEvT1_OT2_:
  646|  5.63k|inline constexpr void store_any(T in, OutR&& out_range) {
  647|  5.63k|   store_any<endianness, T>(in, std::forward<OutR>(out_range));
  648|  5.63k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm8EEEQnt15custom_storableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEEvS9_OT1_:
  525|  50.5k|inline constexpr void store_any(WrappedInT wrapped_in, OutR&& out_range) {
  526|  50.5k|   const auto in = detail::unwrap_strong_type_or_enum(wrapped_in);
  527|  50.5k|   using InT = decltype(in);
  528|  50.5k|   ranges::assert_exact_byte_length<sizeof(in)>(out_range);
  529|  50.5k|   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|  50.5k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (534:7): [Folded, False: 50.5k]
  ------------------
  535|      0|      return fallback_store_any<endianness, InT>(in, std::forward<OutR>(out_range));
  536|  50.5k|   } 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|  50.5k|      } else {
  542|  50.5k|         static_assert(opposite(endianness) == std::endian::native);
  543|  50.5k|         typecast_copy(out, reverse_bytes(in));
  544|  50.5k|      }
  545|  50.5k|   }
  546|  50.5k|}
_ZN5Botan6detail26unwrap_strong_type_or_enumITkNS0_20unsigned_integralishEmEEDaT_:
  190|  50.5k|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|  50.5k|   } else {
  195|  50.5k|      return Botan::unwrap_strong_type(t);
  196|  50.5k|   }
  197|  50.5k|}
_ZN5Botan7load_beImJNSt3__14spanIKhLm8EEEEEEDaDpOT0_:
  504|   133k|inline constexpr auto load_be(ParamTs&&... params) {
  505|   133k|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|   133k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|   146k|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|   146k|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|   146k|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|   146k|   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|   146k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|   146k|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|   146k|      } else {
  289|   146k|         const std::span in{in_range};
  290|   146k|         if constexpr(sizeof(OutT) == 1) {
  291|   146k|            return static_cast<OutT>(in[0]);
  292|   146k|         } else if constexpr(endianness == std::endian::native) {
  293|   146k|            return typecast_copy<OutT>(in);
  294|   146k|         } else {
  295|   146k|            static_assert(opposite(endianness) == std::endian::native);
  296|   146k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|   146k|         }
  298|   146k|      }
  299|   146k|   }());
  300|   146k|}
_ZN5Botan6detail24wrap_strong_type_or_enumITkNS0_20unsigned_integralishEmTkNSt3__117unsigned_integralEmEEDaT0_:
  200|   226k|constexpr auto wrap_strong_type_or_enum(T t) {
  201|       |   if constexpr(std::is_enum_v<OutT>) {
  202|       |      return static_cast<OutT>(t);
  203|   226k|   } else {
  204|   226k|      return Botan::wrap_strong_type<OutT>(t);
  205|   226k|   }
  206|   226k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|   146k|   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|   146k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 146k]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|   146k|      } else {
  289|   146k|         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|   146k|         } else {
  295|   146k|            static_assert(opposite(endianness) == std::endian::native);
  296|   146k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|   146k|         }
  298|   146k|      }
  299|   146k|   }());
_ZN5Botan7load_beImJRNSt3__15arrayIhLm8EEEEEEDaDpOT0_:
  504|  28.4k|inline constexpr auto load_be(ParamTs&&... params) {
  505|  28.4k|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|  28.4k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEERNS2_5arrayIhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|  28.4k|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|  28.4k|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|  28.4k|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|  28.4k|   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|  28.4k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|  28.4k|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  28.4k|      } else {
  289|  28.4k|         const std::span in{in_range};
  290|  28.4k|         if constexpr(sizeof(OutT) == 1) {
  291|  28.4k|            return static_cast<OutT>(in[0]);
  292|  28.4k|         } else if constexpr(endianness == std::endian::native) {
  293|  28.4k|            return typecast_copy<OutT>(in);
  294|  28.4k|         } else {
  295|  28.4k|            static_assert(opposite(endianness) == std::endian::native);
  296|  28.4k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  28.4k|         }
  298|  28.4k|      }
  299|  28.4k|   }());
  300|  28.4k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEERNS2_5arrayIhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|  28.4k|   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|  28.4k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 28.4k]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  28.4k|      } else {
  289|  28.4k|         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|  28.4k|         } else {
  295|  28.4k|            static_assert(opposite(endianness) == std::endian::native);
  296|  28.4k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  28.4k|         }
  298|  28.4k|      }
  299|  28.4k|   }());
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm8EEETpTkNS0_20unsigned_integralishEJmEQaagtsZT2_Li0Eooaasr3stdE7same_asINS0_10AutoDetectET0_E10all_same_vIDpT2_Eaa20unsigned_integralishIS9_E10all_same_vIS9_SB_EEEvOT1_SB_:
  582|  44.9k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, Ts... ins) {
  583|  44.9k|   ranges::assert_exact_byte_length<(sizeof(Ts) + ...)>(out);
  584|  44.9k|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|  44.9k|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|  44.9k|      off += sizeof(T);
  587|  44.9k|   };
  588|       |
  589|  44.9k|   (store_one(std::span{out}, ins), ...);
  590|  44.9k|}
_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|  44.9k|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|  44.9k|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|  44.9k|      off += sizeof(T);
  587|  44.9k|   };
_ZN5Botan8store_beINS_6detail10AutoDetectEJRNSt3__14spanIhLm32EEERNS3_5arrayImLm4EEEEEEDaDpOT0_:
  745|  1.61k|inline constexpr auto store_be(ParamTs&&... params) {
  746|  1.61k|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|  1.61k|}
_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|  1.61k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|  1.61k|   ranges::assert_equal_byte_lengths(out, in);
  605|  1.61k|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|  1.61k|   auto store_elementwise = [&] {
  608|  1.61k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  1.61k|      std::span<uint8_t> out_s(out);
  610|  1.61k|      for(auto in_elem : in) {
  611|  1.61k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  1.61k|         out_s = out_s.subspan(bytes_per_element);
  613|  1.61k|      }
  614|  1.61k|   };
  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.61k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 1.61k]
  ------------------
  620|      0|      store_elementwise();
  621|  1.61k|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|  1.61k|      } else {
  625|  1.61k|         store_elementwise();
  626|  1.61k|      }
  627|  1.61k|   }
  628|  1.61k|}
_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|  1.61k|   auto store_elementwise = [&] {
  608|  1.61k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  1.61k|      std::span<uint8_t> out_s(out);
  610|  6.44k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 6.44k, False: 1.61k]
  ------------------
  611|  6.44k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  6.44k|         out_s = out_s.subspan(bytes_per_element);
  613|  6.44k|      }
  614|  1.61k|   };
_ZN5Botan7load_beImJPKhmEEEDaDpOT0_:
  504|  12.6k|inline constexpr auto load_be(ParamTs&&... params) {
  505|  12.6k|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|  12.6k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmEET0_PKhm:
  454|  12.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|  12.6k|   constexpr size_t out_size = sizeof(OutT);
  457|  12.6k|   return load_any<endianness, OutT>(std::span<const uint8_t, out_size>(in + off * out_size, out_size));
  458|  12.6k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE57005ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|  46.6k|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|  46.6k|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|  46.6k|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|  46.6k|   return detail::wrap_strong_type_or_enum<WrappedOutT>([&]() -> OutT {
  283|       |      // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  284|       |      // internally to copy ranges on a byte-by-byte basis, which is not allowed
  285|       |      // in a `constexpr` context.
  286|  46.6k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|  46.6k|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  46.6k|      } else {
  289|  46.6k|         const std::span in{in_range};
  290|  46.6k|         if constexpr(sizeof(OutT) == 1) {
  291|  46.6k|            return static_cast<OutT>(in[0]);
  292|  46.6k|         } else if constexpr(endianness == std::endian::native) {
  293|  46.6k|            return typecast_copy<OutT>(in);
  294|  46.6k|         } else {
  295|  46.6k|            static_assert(opposite(endianness) == std::endian::native);
  296|  46.6k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  46.6k|         }
  298|  46.6k|      }
  299|  46.6k|   }());
  300|  46.6k|}
_ZN5Botan8store_beINS_6detail10AutoDetectEJRNSt3__14spanIhLm48EEERNS3_5arrayImLm6EEEEEEDaDpOT0_:
  745|  1.48k|inline constexpr auto store_be(ParamTs&&... params) {
  746|  1.48k|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|  1.48k|}
_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|  1.48k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|  1.48k|   ranges::assert_equal_byte_lengths(out, in);
  605|  1.48k|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|  1.48k|   auto store_elementwise = [&] {
  608|  1.48k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  1.48k|      std::span<uint8_t> out_s(out);
  610|  1.48k|      for(auto in_elem : in) {
  611|  1.48k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  1.48k|         out_s = out_s.subspan(bytes_per_element);
  613|  1.48k|      }
  614|  1.48k|   };
  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.48k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 1.48k]
  ------------------
  620|      0|      store_elementwise();
  621|  1.48k|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|  1.48k|      } else {
  625|  1.48k|         store_elementwise();
  626|  1.48k|      }
  627|  1.48k|   }
  628|  1.48k|}
_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|  1.48k|   auto store_elementwise = [&] {
  608|  1.48k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  1.48k|      std::span<uint8_t> out_s(out);
  610|  8.88k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 8.88k, False: 1.48k]
  ------------------
  611|  8.88k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  8.88k|         out_s = out_s.subspan(bytes_per_element);
  613|  8.88k|      }
  614|  1.48k|   };
_ZN5Botan8store_beINS_6detail10AutoDetectEJRNSt3__14spanIhLm64EEERNS3_5arrayImLm8EEEEEEDaDpOT0_:
  745|    565|inline constexpr auto store_be(ParamTs&&... params) {
  746|    565|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|    565|}
_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|    565|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|    565|   ranges::assert_equal_byte_lengths(out, in);
  605|    565|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|    565|   auto store_elementwise = [&] {
  608|    565|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    565|      std::span<uint8_t> out_s(out);
  610|    565|      for(auto in_elem : in) {
  611|    565|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|    565|         out_s = out_s.subspan(bytes_per_element);
  613|    565|      }
  614|    565|   };
  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|    565|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 565]
  ------------------
  620|      0|      store_elementwise();
  621|    565|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|    565|      } else {
  625|    565|         store_elementwise();
  626|    565|      }
  627|    565|   }
  628|    565|}
_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|    565|   auto store_elementwise = [&] {
  608|    565|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    565|      std::span<uint8_t> out_s(out);
  610|  4.52k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 4.52k, False: 565]
  ------------------
  611|  4.52k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  4.52k|         out_s = out_s.subspan(bytes_per_element);
  613|  4.52k|      }
  614|    565|   };
_ZN5Botan8store_beINS_6detail10AutoDetectEJRNSt3__15arrayImLm9EEEEEEDaDpOT0_:
  745|  2.35k|inline constexpr auto store_be(ParamTs&&... params) {
  746|  2.35k|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|  2.35k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges14spanable_rangeERNS2_5arrayImLm9EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS9_Esr3stdE21default_initializableIS9_Esr8conceptsE21resizable_byte_bufferIS9_EEEDaOT1_:
  663|  2.35k|inline constexpr auto store_any(InR&& in_range) {
  664|  2.35k|   auto out = []([[maybe_unused]] const auto& in) {
  665|  2.35k|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|  2.35k|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|  2.35k|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|  2.35k|            return std::array<uint8_t, bytes>();
  669|  2.35k|         } else {
  670|  2.35k|            static_assert(
  671|  2.35k|               !std::same_as<AutoDetect, OutR>,
  672|  2.35k|               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|  2.35k|         }
  674|  2.35k|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|  2.35k|         return OutR(std::span{in}.size_bytes());
  676|  2.35k|      } else {
  677|  2.35k|         return OutR{};
  678|  2.35k|      }
  679|  2.35k|   }(in_range);
  680|       |
  681|  2.35k|   store_any<endianness, std::ranges::range_value_t<InR>>(out, std::forward<InR>(in_range));
  682|  2.35k|   return out;
  683|  2.35k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges14spanable_rangeERNS2_5arrayImLm9EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS9_Esr3stdE21default_initializableIS9_Esr8conceptsE21resizable_byte_bufferIS9_EEEDaOT1_ENKUlRKT_E_clIS7_EEDaSE_:
  664|  2.35k|   auto out = []([[maybe_unused]] const auto& in) {
  665|  2.35k|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|  2.35k|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|  2.35k|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|  2.35k|            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.35k|   }(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|  2.35k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|  2.35k|   ranges::assert_equal_byte_lengths(out, in);
  605|  2.35k|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|  2.35k|   auto store_elementwise = [&] {
  608|  2.35k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  2.35k|      std::span<uint8_t> out_s(out);
  610|  2.35k|      for(auto in_elem : in) {
  611|  2.35k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  2.35k|         out_s = out_s.subspan(bytes_per_element);
  613|  2.35k|      }
  614|  2.35k|   };
  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.35k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 2.35k]
  ------------------
  620|      0|      store_elementwise();
  621|  2.35k|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|  2.35k|      } else {
  625|  2.35k|         store_elementwise();
  626|  2.35k|      }
  627|  2.35k|   }
  628|  2.35k|}
_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|  2.35k|   auto store_elementwise = [&] {
  608|  2.35k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  2.35k|      std::span<uint8_t> out_s(out);
  610|  21.1k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 21.1k, False: 2.35k]
  ------------------
  611|  21.1k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  21.1k|         out_s = out_s.subspan(bytes_per_element);
  613|  21.1k|      }
  614|  2.35k|   };
_ZN5Botan8store_beINS_6detail10AutoDetectEJRNSt3__15arrayImLm4EEEEEEDaDpOT0_:
  745|    968|inline constexpr auto store_be(ParamTs&&... params) {
  746|    968|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|    968|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges14spanable_rangeERNS2_5arrayImLm4EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS9_Esr3stdE21default_initializableIS9_Esr8conceptsE21resizable_byte_bufferIS9_EEEDaOT1_:
  663|    968|inline constexpr auto store_any(InR&& in_range) {
  664|    968|   auto out = []([[maybe_unused]] const auto& in) {
  665|    968|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|    968|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|    968|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|    968|            return std::array<uint8_t, bytes>();
  669|    968|         } else {
  670|    968|            static_assert(
  671|    968|               !std::same_as<AutoDetect, OutR>,
  672|    968|               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|    968|         }
  674|    968|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|    968|         return OutR(std::span{in}.size_bytes());
  676|    968|      } else {
  677|    968|         return OutR{};
  678|    968|      }
  679|    968|   }(in_range);
  680|       |
  681|    968|   store_any<endianness, std::ranges::range_value_t<InR>>(out, std::forward<InR>(in_range));
  682|    968|   return out;
  683|    968|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges14spanable_rangeERNS2_5arrayImLm4EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS9_Esr3stdE21default_initializableIS9_Esr8conceptsE21resizable_byte_bufferIS9_EEEDaOT1_ENKUlRKT_E_clIS7_EEDaSE_:
  664|    968|   auto out = []([[maybe_unused]] const auto& in) {
  665|    968|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|    968|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|    968|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|    968|            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|    968|   }(in_range);
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEERNS2_5arrayIhLm32EEETkNS4_14spanable_rangeENS6_ImLm4EEEQoosr3stdE7same_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|    968|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|    968|   ranges::assert_equal_byte_lengths(out, in);
  605|    968|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|    968|   auto store_elementwise = [&] {
  608|    968|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    968|      std::span<uint8_t> out_s(out);
  610|    968|      for(auto in_elem : in) {
  611|    968|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|    968|         out_s = out_s.subspan(bytes_per_element);
  613|    968|      }
  614|    968|   };
  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|    968|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 968]
  ------------------
  620|      0|      store_elementwise();
  621|    968|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|    968|      } else {
  625|    968|         store_elementwise();
  626|    968|      }
  627|    968|   }
  628|    968|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206EmTkNS_6ranges23contiguous_output_rangeIhEERNS2_5arrayIhLm32EEETkNS4_14spanable_rangeENS6_ImLm4EEEQoosr3stdE7same_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|    968|   auto store_elementwise = [&] {
  608|    968|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    968|      std::span<uint8_t> out_s(out);
  610|  3.87k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 3.87k, False: 968]
  ------------------
  611|  3.87k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  3.87k|         out_s = out_s.subspan(bytes_per_element);
  613|  3.87k|      }
  614|    968|   };
_ZN5Botan8store_beINS_6detail10AutoDetectEJRKhEEEDaDpOT0_:
  745|    186|inline constexpr auto store_be(ParamTs&&... params) {
  746|    186|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|    186|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETpTkNS0_20unsigned_integralishEJhEQ10all_same_vIDpT1_EEEDaS6_:
  696|    186|inline constexpr auto store_any(Ts... ins) {
  697|    186|   return store_any<endianness, OutR>(std::array{ins...});
  698|    186|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayIhLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_:
  663|    186|inline constexpr auto store_any(InR&& in_range) {
  664|    186|   auto out = []([[maybe_unused]] const auto& in) {
  665|    186|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|    186|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|    186|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|    186|            return std::array<uint8_t, bytes>();
  669|    186|         } else {
  670|    186|            static_assert(
  671|    186|               !std::same_as<AutoDetect, OutR>,
  672|    186|               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|    186|         }
  674|    186|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|    186|         return OutR(std::span{in}.size_bytes());
  676|    186|      } else {
  677|    186|         return OutR{};
  678|    186|      }
  679|    186|   }(in_range);
  680|       |
  681|    186|   store_any<endianness, std::ranges::range_value_t<InR>>(out, std::forward<InR>(in_range));
  682|    186|   return out;
  683|    186|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayIhLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_ENKUlRKT_E_clIS7_EEDaSD_:
  664|    186|   auto out = []([[maybe_unused]] const auto& in) {
  665|    186|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|    186|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|    186|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|    186|            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|    186|   }(in_range);
_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|    186|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|    186|   ranges::assert_equal_byte_lengths(out, in);
  605|    186|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|    186|   auto store_elementwise = [&] {
  608|    186|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    186|      std::span<uint8_t> out_s(out);
  610|    186|      for(auto in_elem : in) {
  611|    186|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|    186|         out_s = out_s.subspan(bytes_per_element);
  613|    186|      }
  614|    186|   };
  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|    186|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 186]
  ------------------
  620|      0|      store_elementwise();
  621|    186|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|    186|      } else {
  625|    186|         store_elementwise();
  626|    186|      }
  627|    186|   }
  628|    186|}
_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|    186|   auto store_elementwise = [&] {
  608|    186|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    186|      std::span<uint8_t> out_s(out);
  610|    186|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 186, False: 186]
  ------------------
  611|    186|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|    186|         out_s = out_s.subspan(bytes_per_element);
  613|    186|      }
  614|    186|   };
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EhTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm1EEETpTkNS0_20unsigned_integralishEJhEQaagtsZT2_Li0Eooaasr3stdE7same_asINS0_10AutoDetectET0_E10all_same_vIDpT2_Eaa20unsigned_integralishIS9_E10all_same_vIS9_SB_EEEvOT1_SB_:
  582|    186|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, Ts... ins) {
  583|    186|   ranges::assert_exact_byte_length<(sizeof(Ts) + ...)>(out);
  584|    186|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|    186|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|    186|      off += sizeof(T);
  587|    186|   };
  588|       |
  589|    186|   (store_one(std::span{out}, ins), ...);
  590|    186|}
_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|    186|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|    186|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|    186|      off += sizeof(T);
  587|    186|   };
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEhTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm1EEEQnt15custom_storableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEEvS9_OT1_:
  525|    186|inline constexpr void store_any(WrappedInT wrapped_in, OutR&& out_range) {
  526|    186|   const auto in = detail::unwrap_strong_type_or_enum(wrapped_in);
  527|    186|   using InT = decltype(in);
  528|    186|   ranges::assert_exact_byte_length<sizeof(in)>(out_range);
  529|    186|   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|    186|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (534:7): [Folded, False: 186]
  ------------------
  535|      0|      return fallback_store_any<endianness, InT>(in, std::forward<OutR>(out_range));
  536|    186|   } else {
  537|    186|      if constexpr(sizeof(InT) == 1) {
  538|    186|         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|    186|   }
  546|    186|}
_ZN5Botan6detail26unwrap_strong_type_or_enumITkNS0_20unsigned_integralishEhEEDaT_:
  190|    186|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|    186|   } else {
  195|    186|      return Botan::unwrap_strong_type(t);
  196|    186|   }
  197|    186|}
_ZN5Botan6detail24wrap_strong_type_or_enumITkNS0_20unsigned_integralishEjTkNSt3__117unsigned_integralEjEEDaT0_:
  200|  58.3k|constexpr auto wrap_strong_type_or_enum(T t) {
  201|       |   if constexpr(std::is_enum_v<OutT>) {
  202|       |      return static_cast<OutT>(t);
  203|  58.3k|   } else {
  204|  58.3k|      return Botan::wrap_strong_type<OutT>(t);
  205|  58.3k|   }
  206|  58.3k|}
_ZN5Botan6detail24wrap_strong_type_or_enumITkNS0_20unsigned_integralishEtTkNSt3__117unsigned_integralEtEEDaT0_:
  200|  2.90k|constexpr auto wrap_strong_type_or_enum(T t) {
  201|       |   if constexpr(std::is_enum_v<OutT>) {
  202|       |      return static_cast<OutT>(t);
  203|  2.90k|   } else {
  204|  2.90k|      return Botan::wrap_strong_type<OutT>(t);
  205|  2.90k|   }
  206|  2.90k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEtTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm2EEEQnt15custom_storableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEEvS9_OT1_:
  525|    325|inline constexpr void store_any(WrappedInT wrapped_in, OutR&& out_range) {
  526|    325|   const auto in = detail::unwrap_strong_type_or_enum(wrapped_in);
  527|    325|   using InT = decltype(in);
  528|    325|   ranges::assert_exact_byte_length<sizeof(in)>(out_range);
  529|    325|   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|    325|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (534:7): [Folded, False: 325]
  ------------------
  535|      0|      return fallback_store_any<endianness, InT>(in, std::forward<OutR>(out_range));
  536|    325|   } 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|    325|      } else {
  542|    325|         static_assert(opposite(endianness) == std::endian::native);
  543|    325|         typecast_copy(out, reverse_bytes(in));
  544|    325|      }
  545|    325|   }
  546|    325|}
_ZN5Botan6detail26unwrap_strong_type_or_enumITkNS0_20unsigned_integralishEtEEDaT_:
  190|    325|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|    325|   } else {
  195|    325|      return Botan::unwrap_strong_type(t);
  196|    325|   }
  197|    325|}
_ZN5Botan6detail9store_anyILNSt3__16endianE57005ETkNS0_20unsigned_integralishEmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm8EEEQnt15custom_storableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEEvS9_OT1_:
  525|      4|inline constexpr void store_any(WrappedInT wrapped_in, OutR&& out_range) {
  526|      4|   const auto in = detail::unwrap_strong_type_or_enum(wrapped_in);
  527|      4|   using InT = decltype(in);
  528|      4|   ranges::assert_exact_byte_length<sizeof(in)>(out_range);
  529|      4|   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|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (534:7): [Folded, False: 4]
  ------------------
  535|      0|      return fallback_store_any<endianness, InT>(in, std::forward<OutR>(out_range));
  536|      4|   } else {
  537|       |      if constexpr(sizeof(InT) == 1) {
  538|       |         out[0] = static_cast<uint8_t>(in);
  539|      4|      } else if constexpr(endianness == std::endian::native) {
  540|      4|         typecast_copy(out, in);
  541|       |      } else {
  542|       |         static_assert(opposite(endianness) == std::endian::native);
  543|       |         typecast_copy(out, reverse_bytes(in));
  544|       |      }
  545|      4|   }
  546|      4|}
_ZN5Botan6detail8load_anyILNSt3__16endianE57005ETkNS0_20unsigned_integralishEjTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm4EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|  5.31k|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|  5.31k|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|  5.31k|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|  5.31k|   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|  5.31k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|  5.31k|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  5.31k|      } else {
  289|  5.31k|         const std::span in{in_range};
  290|  5.31k|         if constexpr(sizeof(OutT) == 1) {
  291|  5.31k|            return static_cast<OutT>(in[0]);
  292|  5.31k|         } else if constexpr(endianness == std::endian::native) {
  293|  5.31k|            return typecast_copy<OutT>(in);
  294|  5.31k|         } else {
  295|  5.31k|            static_assert(opposite(endianness) == std::endian::native);
  296|  5.31k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  5.31k|         }
  298|  5.31k|      }
  299|  5.31k|   }());
  300|  5.31k|}
_ZN5Botan11copy_out_beITkNS_6ranges14spanable_rangeENSt3__16vectorImNS_16secure_allocatorImEEEEEEvNS2_4spanIhLm18446744073709551615EEERKT_:
  773|      2|inline void copy_out_be(std::span<uint8_t> out, const InR& in) {
  774|      2|   using T = std::ranges::range_value_t<InR>;
  775|      2|   std::span<const T> in_s{in};
  776|      2|   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|      2|   for(size_t i = 0; i < remaining_bytes; ++i) {
  ------------------
  |  Branch (779:22): [True: 0, False: 2]
  ------------------
  780|      0|      out[i] = get_byte_var(i, in_s.front());
  781|      0|   }
  782|      2|}
_ZN5Botan6detail33copy_out_any_word_aligned_portionILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmEEmRNS2_4spanIhLm18446744073709551615EEERNS4_IKT0_Lm18446744073709551615EEE:
  752|      2|inline size_t copy_out_any_word_aligned_portion(std::span<uint8_t>& out, std::span<const T>& in) {
  753|      2|   const size_t full_words = out.size() / sizeof(T);
  754|      2|   const size_t full_word_bytes = full_words * sizeof(T);
  755|      2|   const size_t remaining_bytes = out.size() - full_word_bytes;
  756|      2|   BOTAN_ASSERT_NOMSG(in.size_bytes() >= full_word_bytes + remaining_bytes);
  ------------------
  |  |   77|      2|   do {                                                                     \
  |  |   78|      2|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|      2|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 2]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|      2|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  757|       |
  758|       |   // copy full words
  759|      2|   store_any<endianness, T>(out.first(full_word_bytes), in.first(full_words));
  760|      2|   out = out.subspan(full_word_bytes);
  761|      2|   in = in.subspan(full_words);
  762|       |
  763|      2|   return remaining_bytes;
  764|      2|}
_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|      2|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|      2|   ranges::assert_equal_byte_lengths(out, in);
  605|      2|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|      2|   auto store_elementwise = [&] {
  608|      2|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|      2|      std::span<uint8_t> out_s(out);
  610|      2|      for(auto in_elem : in) {
  611|      2|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|      2|         out_s = out_s.subspan(bytes_per_element);
  613|      2|      }
  614|      2|   };
  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|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 2]
  ------------------
  620|      0|      store_elementwise();
  621|      2|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|      2|      } else {
  625|      2|         store_elementwise();
  626|      2|      }
  627|      2|   }
  628|      2|}
_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|      2|   auto store_elementwise = [&] {
  608|      2|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|      2|      std::span<uint8_t> out_s(out);
  610|     16|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 16, False: 2]
  ------------------
  611|     16|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|     16|         out_s = out_s.subspan(bytes_per_element);
  613|     16|      }
  614|      2|   };
_ZN5Botan7load_leImJRPKhiEEEDaDpOT0_:
  495|      1|inline constexpr auto load_le(ParamTs&&... params) {
  496|      1|   return detail::load_any<std::endian::little, OutT>(std::forward<ParamTs>(params)...);
  497|      1|}
_ZN5Botan6detail8load_anyILNSt3__16endianE57005ETkNS0_20unsigned_integralishEmEET0_PKhm:
  454|      5|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|      5|   constexpr size_t out_size = sizeof(OutT);
  457|      5|   return load_any<endianness, OutT>(std::span<const uint8_t, out_size>(in + off * out_size, out_size));
  458|      5|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE57005ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|  46.6k|   return detail::wrap_strong_type_or_enum<WrappedOutT>([&]() -> OutT {
  283|       |      // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  284|       |      // internally to copy ranges on a byte-by-byte basis, which is not allowed
  285|       |      // in a `constexpr` context.
  286|  46.6k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 46.6k]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  46.6k|      } else {
  289|  46.6k|         const std::span in{in_range};
  290|       |         if constexpr(sizeof(OutT) == 1) {
  291|       |            return static_cast<OutT>(in[0]);
  292|  46.6k|         } else if constexpr(endianness == std::endian::native) {
  293|  46.6k|            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|  46.6k|      }
  299|  46.6k|   }());
_ZN5Botan7load_leImJPKhiEEEDaDpOT0_:
  495|      4|inline constexpr auto load_le(ParamTs&&... params) {
  496|      4|   return detail::load_any<std::endian::little, OutT>(std::forward<ParamTs>(params)...);
  497|      4|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE57005ETkNS0_20unsigned_integralishEjTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm4EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|  5.31k|   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|  5.31k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 5.31k]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  5.31k|      } else {
  289|  5.31k|         const std::span in{in_range};
  290|       |         if constexpr(sizeof(OutT) == 1) {
  291|       |            return static_cast<OutT>(in[0]);
  292|  5.31k|         } else if constexpr(endianness == std::endian::native) {
  293|  5.31k|            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|  5.31k|      }
  299|  5.31k|   }());
_ZN5Botan7load_leINS_6detail10AutoDetectEJRNSt3__15arrayIhLm8EEEEEEDaDpOT0_:
  495|  4.46k|inline constexpr auto load_le(ParamTs&&... params) {
  496|  4.46k|   return detail::load_any<std::endian::little, OutT>(std::forward<ParamTs>(params)...);
  497|  4.46k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges16contiguous_rangeIhEERNS2_5arrayIhLm8EEEQoosr3stdE7same_asIS4_T0_Eaaoosr6rangesE25statically_spanable_rangeISA_Esr8conceptsE19resizable_containerISA_E20unsigned_integralishINSA_10value_typeEEEEDaOT1_:
  397|  4.46k|inline constexpr auto load_any(InR&& in_range) {
  398|  4.46k|   auto out = []([[maybe_unused]] const auto& in) {
  399|  4.46k|      if constexpr(std::same_as<AutoDetect, OutT>) {
  400|  4.46k|         if constexpr(ranges::statically_spanable_range<InR>) {
  401|  4.46k|            constexpr size_t extent = decltype(std::span{in})::extent;
  402|       |
  403|       |            // clang-format off
  404|  4.46k|            using type =
  405|  4.46k|               std::conditional_t<extent == 1, uint8_t,
  406|  4.46k|               std::conditional_t<extent == 2, uint16_t,
  407|  4.46k|               std::conditional_t<extent == 4, uint32_t,
  408|  4.46k|               std::conditional_t<extent == 8, uint64_t, void>>>>;
  409|       |            // clang-format on
  410|       |
  411|  4.46k|            static_assert(
  412|  4.46k|               !std::is_void_v<type>,
  413|  4.46k|               "Cannot determine the output type based on a statically sized bytearray with length other than those: 1, 2, 4, 8");
  414|       |
  415|  4.46k|            return type{};
  416|  4.46k|         } else {
  417|  4.46k|            static_assert(
  418|  4.46k|               !std::same_as<AutoDetect, OutT>,
  419|  4.46k|               "cannot infer return type from a dynamic range at compile time, please specify it explicitly");
  420|  4.46k|         }
  421|  4.46k|      } else if constexpr(concepts::resizable_container<OutT>) {
  422|  4.46k|         const size_t in_bytes = std::span{in}.size_bytes();
  423|  4.46k|         constexpr size_t out_elem_bytes = sizeof(typename OutT::value_type);
  424|  4.46k|         BOTAN_ARG_CHECK(in_bytes % out_elem_bytes == 0,
  425|  4.46k|                         "Input range is not word-aligned with the requested output range");
  426|  4.46k|         return OutT(in_bytes / out_elem_bytes);
  427|  4.46k|      } else {
  428|  4.46k|         return OutT{};
  429|  4.46k|      }
  430|  4.46k|   }(in_range);
  431|       |
  432|  4.46k|   using out_type = decltype(out);
  433|  4.46k|   if constexpr(unsigned_integralish<out_type>) {
  434|  4.46k|      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|  4.46k|   return out;
  441|  4.46k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges16contiguous_rangeIhEERNS2_5arrayIhLm8EEEQoosr3stdE7same_asIS4_T0_Eaaoosr6rangesE25statically_spanable_rangeISA_Esr8conceptsE19resizable_containerISA_E20unsigned_integralishINSA_10value_typeEEEEDaOT1_ENKUlRKT_E_clIS8_EEDaSG_:
  398|  4.46k|   auto out = []([[maybe_unused]] const auto& in) {
  399|  4.46k|      if constexpr(std::same_as<AutoDetect, OutT>) {
  400|  4.46k|         if constexpr(ranges::statically_spanable_range<InR>) {
  401|  4.46k|            constexpr size_t extent = decltype(std::span{in})::extent;
  402|       |
  403|       |            // clang-format off
  404|  4.46k|            using type =
  405|  4.46k|               std::conditional_t<extent == 1, uint8_t,
  406|  4.46k|               std::conditional_t<extent == 2, uint16_t,
  407|  4.46k|               std::conditional_t<extent == 4, uint32_t,
  408|  4.46k|               std::conditional_t<extent == 8, uint64_t, void>>>>;
  409|       |            // clang-format on
  410|       |
  411|  4.46k|            static_assert(
  412|  4.46k|               !std::is_void_v<type>,
  413|  4.46k|               "Cannot determine the output type based on a statically sized bytearray with length other than those: 1, 2, 4, 8");
  414|       |
  415|  4.46k|            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|  4.46k|   }(in_range);
_ZN5Botan6detail8load_anyILNSt3__16endianE57005ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEERNS2_5arrayIhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|  4.46k|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|  4.46k|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|  4.46k|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|  4.46k|   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|  4.46k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|  4.46k|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  4.46k|      } else {
  289|  4.46k|         const std::span in{in_range};
  290|  4.46k|         if constexpr(sizeof(OutT) == 1) {
  291|  4.46k|            return static_cast<OutT>(in[0]);
  292|  4.46k|         } else if constexpr(endianness == std::endian::native) {
  293|  4.46k|            return typecast_copy<OutT>(in);
  294|  4.46k|         } else {
  295|  4.46k|            static_assert(opposite(endianness) == std::endian::native);
  296|  4.46k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  4.46k|         }
  298|  4.46k|      }
  299|  4.46k|   }());
  300|  4.46k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE57005ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEERNS2_5arrayIhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|  4.46k|   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|  4.46k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 4.46k]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  4.46k|      } else {
  289|  4.46k|         const std::span in{in_range};
  290|       |         if constexpr(sizeof(OutT) == 1) {
  291|       |            return static_cast<OutT>(in[0]);
  292|  4.46k|         } else if constexpr(endianness == std::endian::native) {
  293|  4.46k|            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|  4.46k|      }
  299|  4.46k|   }());
_ZN5Botan7load_leINS_6detail10AutoDetectEJNSt3__14spanIKhLm8EEEEEEDaDpOT0_:
  495|  46.6k|inline constexpr auto load_le(ParamTs&&... params) {
  496|  46.6k|   return detail::load_any<std::endian::little, OutT>(std::forward<ParamTs>(params)...);
  497|  46.6k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm8EEEQoosr3stdE7same_asIS4_T0_Eaaoosr6rangesE25statically_spanable_rangeISA_Esr8conceptsE19resizable_containerISA_E20unsigned_integralishINSA_10value_typeEEEEDaOT1_:
  397|  46.6k|inline constexpr auto load_any(InR&& in_range) {
  398|  46.6k|   auto out = []([[maybe_unused]] const auto& in) {
  399|  46.6k|      if constexpr(std::same_as<AutoDetect, OutT>) {
  400|  46.6k|         if constexpr(ranges::statically_spanable_range<InR>) {
  401|  46.6k|            constexpr size_t extent = decltype(std::span{in})::extent;
  402|       |
  403|       |            // clang-format off
  404|  46.6k|            using type =
  405|  46.6k|               std::conditional_t<extent == 1, uint8_t,
  406|  46.6k|               std::conditional_t<extent == 2, uint16_t,
  407|  46.6k|               std::conditional_t<extent == 4, uint32_t,
  408|  46.6k|               std::conditional_t<extent == 8, uint64_t, void>>>>;
  409|       |            // clang-format on
  410|       |
  411|  46.6k|            static_assert(
  412|  46.6k|               !std::is_void_v<type>,
  413|  46.6k|               "Cannot determine the output type based on a statically sized bytearray with length other than those: 1, 2, 4, 8");
  414|       |
  415|  46.6k|            return type{};
  416|  46.6k|         } else {
  417|  46.6k|            static_assert(
  418|  46.6k|               !std::same_as<AutoDetect, OutT>,
  419|  46.6k|               "cannot infer return type from a dynamic range at compile time, please specify it explicitly");
  420|  46.6k|         }
  421|  46.6k|      } else if constexpr(concepts::resizable_container<OutT>) {
  422|  46.6k|         const size_t in_bytes = std::span{in}.size_bytes();
  423|  46.6k|         constexpr size_t out_elem_bytes = sizeof(typename OutT::value_type);
  424|  46.6k|         BOTAN_ARG_CHECK(in_bytes % out_elem_bytes == 0,
  425|  46.6k|                         "Input range is not word-aligned with the requested output range");
  426|  46.6k|         return OutT(in_bytes / out_elem_bytes);
  427|  46.6k|      } else {
  428|  46.6k|         return OutT{};
  429|  46.6k|      }
  430|  46.6k|   }(in_range);
  431|       |
  432|  46.6k|   using out_type = decltype(out);
  433|  46.6k|   if constexpr(unsigned_integralish<out_type>) {
  434|  46.6k|      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|  46.6k|   return out;
  441|  46.6k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm8EEEQoosr3stdE7same_asIS4_T0_Eaaoosr6rangesE25statically_spanable_rangeISA_Esr8conceptsE19resizable_containerISA_E20unsigned_integralishINSA_10value_typeEEEEDaOT1_ENKUlRKT_E_clIS9_EEDaSG_:
  398|  46.6k|   auto out = []([[maybe_unused]] const auto& in) {
  399|  46.6k|      if constexpr(std::same_as<AutoDetect, OutT>) {
  400|  46.6k|         if constexpr(ranges::statically_spanable_range<InR>) {
  401|  46.6k|            constexpr size_t extent = decltype(std::span{in})::extent;
  402|       |
  403|       |            // clang-format off
  404|  46.6k|            using type =
  405|  46.6k|               std::conditional_t<extent == 1, uint8_t,
  406|  46.6k|               std::conditional_t<extent == 2, uint16_t,
  407|  46.6k|               std::conditional_t<extent == 4, uint32_t,
  408|  46.6k|               std::conditional_t<extent == 8, uint64_t, void>>>>;
  409|       |            // clang-format on
  410|       |
  411|  46.6k|            static_assert(
  412|  46.6k|               !std::is_void_v<type>,
  413|  46.6k|               "Cannot determine the output type based on a statically sized bytearray with length other than those: 1, 2, 4, 8");
  414|       |
  415|  46.6k|            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|  46.6k|   }(in_range);
_ZN5Botan8store_leINS_6detail10AutoDetectEJRmEEEDaDpOT0_:
  736|  1.16M|inline constexpr auto store_le(ParamTs&&... params) {
  737|  1.16M|   return detail::store_any<std::endian::little, ModifierT>(std::forward<ParamTs>(params)...);
  738|  1.16M|}
_ZN5Botan6detail9store_anyILNSt3__16endianE57005ENS0_10AutoDetectETpTkNS0_20unsigned_integralishEJmEQ10all_same_vIDpT1_EEEDaS6_:
  696|  1.16M|inline constexpr auto store_any(Ts... ins) {
  697|  1.16M|   return store_any<endianness, OutR>(std::array{ins...});
  698|  1.16M|}
_ZN5Botan6detail9store_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayImLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_:
  663|  1.16M|inline constexpr auto store_any(InR&& in_range) {
  664|  1.16M|   auto out = []([[maybe_unused]] const auto& in) {
  665|  1.16M|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|  1.16M|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|  1.16M|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|  1.16M|            return std::array<uint8_t, bytes>();
  669|  1.16M|         } else {
  670|  1.16M|            static_assert(
  671|  1.16M|               !std::same_as<AutoDetect, OutR>,
  672|  1.16M|               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|  1.16M|         }
  674|  1.16M|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|  1.16M|         return OutR(std::span{in}.size_bytes());
  676|  1.16M|      } else {
  677|  1.16M|         return OutR{};
  678|  1.16M|      }
  679|  1.16M|   }(in_range);
  680|       |
  681|  1.16M|   store_any<endianness, std::ranges::range_value_t<InR>>(out, std::forward<InR>(in_range));
  682|  1.16M|   return out;
  683|  1.16M|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayImLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_ENKUlRKT_E_clIS7_EEDaSD_:
  664|  1.16M|   auto out = []([[maybe_unused]] const auto& in) {
  665|  1.16M|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|  1.16M|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|  1.16M|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|  1.16M|            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|  1.16M|   }(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|  1.20M|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|  1.20M|   ranges::assert_equal_byte_lengths(out, in);
  605|  1.20M|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|  1.20M|   auto store_elementwise = [&] {
  608|  1.20M|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  1.20M|      std::span<uint8_t> out_s(out);
  610|  1.20M|      for(auto in_elem : in) {
  611|  1.20M|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  1.20M|         out_s = out_s.subspan(bytes_per_element);
  613|  1.20M|      }
  614|  1.20M|   };
  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.20M|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 1.20M]
  ------------------
  620|      0|      store_elementwise();
  621|  1.20M|   } else {
  622|  1.20M|      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|  1.20M|         typecast_copy(out, in);
  624|       |      } else {
  625|       |         store_elementwise();
  626|       |      }
  627|  1.20M|   }
  628|  1.20M|}
_ZN5Botan7load_leINS_6detail10AutoDetectEJNSt3__14spanIKhLm4EEEEEEDaDpOT0_:
  495|  5.31k|inline constexpr auto load_le(ParamTs&&... params) {
  496|  5.31k|   return detail::load_any<std::endian::little, OutT>(std::forward<ParamTs>(params)...);
  497|  5.31k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm4EEEQoosr3stdE7same_asIS4_T0_Eaaoosr6rangesE25statically_spanable_rangeISA_Esr8conceptsE19resizable_containerISA_E20unsigned_integralishINSA_10value_typeEEEEDaOT1_:
  397|  5.31k|inline constexpr auto load_any(InR&& in_range) {
  398|  5.31k|   auto out = []([[maybe_unused]] const auto& in) {
  399|  5.31k|      if constexpr(std::same_as<AutoDetect, OutT>) {
  400|  5.31k|         if constexpr(ranges::statically_spanable_range<InR>) {
  401|  5.31k|            constexpr size_t extent = decltype(std::span{in})::extent;
  402|       |
  403|       |            // clang-format off
  404|  5.31k|            using type =
  405|  5.31k|               std::conditional_t<extent == 1, uint8_t,
  406|  5.31k|               std::conditional_t<extent == 2, uint16_t,
  407|  5.31k|               std::conditional_t<extent == 4, uint32_t,
  408|  5.31k|               std::conditional_t<extent == 8, uint64_t, void>>>>;
  409|       |            // clang-format on
  410|       |
  411|  5.31k|            static_assert(
  412|  5.31k|               !std::is_void_v<type>,
  413|  5.31k|               "Cannot determine the output type based on a statically sized bytearray with length other than those: 1, 2, 4, 8");
  414|       |
  415|  5.31k|            return type{};
  416|  5.31k|         } else {
  417|  5.31k|            static_assert(
  418|  5.31k|               !std::same_as<AutoDetect, OutT>,
  419|  5.31k|               "cannot infer return type from a dynamic range at compile time, please specify it explicitly");
  420|  5.31k|         }
  421|  5.31k|      } else if constexpr(concepts::resizable_container<OutT>) {
  422|  5.31k|         const size_t in_bytes = std::span{in}.size_bytes();
  423|  5.31k|         constexpr size_t out_elem_bytes = sizeof(typename OutT::value_type);
  424|  5.31k|         BOTAN_ARG_CHECK(in_bytes % out_elem_bytes == 0,
  425|  5.31k|                         "Input range is not word-aligned with the requested output range");
  426|  5.31k|         return OutT(in_bytes / out_elem_bytes);
  427|  5.31k|      } else {
  428|  5.31k|         return OutT{};
  429|  5.31k|      }
  430|  5.31k|   }(in_range);
  431|       |
  432|  5.31k|   using out_type = decltype(out);
  433|  5.31k|   if constexpr(unsigned_integralish<out_type>) {
  434|  5.31k|      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|  5.31k|   return out;
  441|  5.31k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm4EEEQoosr3stdE7same_asIS4_T0_Eaaoosr6rangesE25statically_spanable_rangeISA_Esr8conceptsE19resizable_containerISA_E20unsigned_integralishINSA_10value_typeEEEEDaOT1_ENKUlRKT_E_clIS9_EEDaSG_:
  398|  5.31k|   auto out = []([[maybe_unused]] const auto& in) {
  399|  5.31k|      if constexpr(std::same_as<AutoDetect, OutT>) {
  400|  5.31k|         if constexpr(ranges::statically_spanable_range<InR>) {
  401|  5.31k|            constexpr size_t extent = decltype(std::span{in})::extent;
  402|       |
  403|       |            // clang-format off
  404|  5.31k|            using type =
  405|  5.31k|               std::conditional_t<extent == 1, uint8_t,
  406|  5.31k|               std::conditional_t<extent == 2, uint16_t,
  407|  5.31k|               std::conditional_t<extent == 4, uint32_t,
  408|  5.31k|               std::conditional_t<extent == 8, uint64_t, void>>>>;
  409|       |            // clang-format on
  410|       |
  411|  5.31k|            static_assert(
  412|  5.31k|               !std::is_void_v<type>,
  413|  5.31k|               "Cannot determine the output type based on a statically sized bytearray with length other than those: 1, 2, 4, 8");
  414|       |
  415|  5.31k|            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|  5.31k|   }(in_range);
_ZN5Botan8store_leINS_6detail10AutoDetectEJRNSt3__15arrayImLm1EEEEEEDaDpOT0_:
  736|  38.2k|inline constexpr auto store_le(ParamTs&&... params) {
  737|  38.2k|   return detail::store_any<std::endian::little, ModifierT>(std::forward<ParamTs>(params)...);
  738|  38.2k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges14spanable_rangeERNS2_5arrayImLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS9_Esr3stdE21default_initializableIS9_Esr8conceptsE21resizable_byte_bufferIS9_EEEDaOT1_:
  663|  38.2k|inline constexpr auto store_any(InR&& in_range) {
  664|  38.2k|   auto out = []([[maybe_unused]] const auto& in) {
  665|  38.2k|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|  38.2k|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|  38.2k|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|  38.2k|            return std::array<uint8_t, bytes>();
  669|  38.2k|         } else {
  670|  38.2k|            static_assert(
  671|  38.2k|               !std::same_as<AutoDetect, OutR>,
  672|  38.2k|               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|  38.2k|         }
  674|  38.2k|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|  38.2k|         return OutR(std::span{in}.size_bytes());
  676|  38.2k|      } else {
  677|  38.2k|         return OutR{};
  678|  38.2k|      }
  679|  38.2k|   }(in_range);
  680|       |
  681|  38.2k|   store_any<endianness, std::ranges::range_value_t<InR>>(out, std::forward<InR>(in_range));
  682|  38.2k|   return out;
  683|  38.2k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges14spanable_rangeERNS2_5arrayImLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS9_Esr3stdE21default_initializableIS9_Esr8conceptsE21resizable_byte_bufferIS9_EEEDaOT1_ENKUlRKT_E_clIS7_EEDaSE_:
  664|  38.2k|   auto out = []([[maybe_unused]] const auto& in) {
  665|  38.2k|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|  38.2k|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|  38.2k|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|  38.2k|            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|  38.2k|   }(in_range);
_ZN5Botan7load_leINS_6detail10AutoDetectEJNSt3__15arrayIhLm2EEEEEEDaDpOT0_:
  495|  2.90k|inline constexpr auto load_le(ParamTs&&... params) {
  496|  2.90k|   return detail::load_any<std::endian::little, OutT>(std::forward<ParamTs>(params)...);
  497|  2.90k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges16contiguous_rangeIhEENS2_5arrayIhLm2EEEQoosr3stdE7same_asIS4_T0_Eaaoosr6rangesE25statically_spanable_rangeIS9_Esr8conceptsE19resizable_containerIS9_E20unsigned_integralishINS9_10value_typeEEEEDaOT1_:
  397|  2.90k|inline constexpr auto load_any(InR&& in_range) {
  398|  2.90k|   auto out = []([[maybe_unused]] const auto& in) {
  399|  2.90k|      if constexpr(std::same_as<AutoDetect, OutT>) {
  400|  2.90k|         if constexpr(ranges::statically_spanable_range<InR>) {
  401|  2.90k|            constexpr size_t extent = decltype(std::span{in})::extent;
  402|       |
  403|       |            // clang-format off
  404|  2.90k|            using type =
  405|  2.90k|               std::conditional_t<extent == 1, uint8_t,
  406|  2.90k|               std::conditional_t<extent == 2, uint16_t,
  407|  2.90k|               std::conditional_t<extent == 4, uint32_t,
  408|  2.90k|               std::conditional_t<extent == 8, uint64_t, void>>>>;
  409|       |            // clang-format on
  410|       |
  411|  2.90k|            static_assert(
  412|  2.90k|               !std::is_void_v<type>,
  413|  2.90k|               "Cannot determine the output type based on a statically sized bytearray with length other than those: 1, 2, 4, 8");
  414|       |
  415|  2.90k|            return type{};
  416|  2.90k|         } else {
  417|  2.90k|            static_assert(
  418|  2.90k|               !std::same_as<AutoDetect, OutT>,
  419|  2.90k|               "cannot infer return type from a dynamic range at compile time, please specify it explicitly");
  420|  2.90k|         }
  421|  2.90k|      } else if constexpr(concepts::resizable_container<OutT>) {
  422|  2.90k|         const size_t in_bytes = std::span{in}.size_bytes();
  423|  2.90k|         constexpr size_t out_elem_bytes = sizeof(typename OutT::value_type);
  424|  2.90k|         BOTAN_ARG_CHECK(in_bytes % out_elem_bytes == 0,
  425|  2.90k|                         "Input range is not word-aligned with the requested output range");
  426|  2.90k|         return OutT(in_bytes / out_elem_bytes);
  427|  2.90k|      } else {
  428|  2.90k|         return OutT{};
  429|  2.90k|      }
  430|  2.90k|   }(in_range);
  431|       |
  432|  2.90k|   using out_type = decltype(out);
  433|  2.90k|   if constexpr(unsigned_integralish<out_type>) {
  434|  2.90k|      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|  2.90k|   return out;
  441|  2.90k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges16contiguous_rangeIhEENS2_5arrayIhLm2EEEQoosr3stdE7same_asIS4_T0_Eaaoosr6rangesE25statically_spanable_rangeIS9_Esr8conceptsE19resizable_containerIS9_E20unsigned_integralishINS9_10value_typeEEEEDaOT1_ENKUlRKT_E_clIS8_EEDaSF_:
  398|  2.90k|   auto out = []([[maybe_unused]] const auto& in) {
  399|  2.90k|      if constexpr(std::same_as<AutoDetect, OutT>) {
  400|  2.90k|         if constexpr(ranges::statically_spanable_range<InR>) {
  401|  2.90k|            constexpr size_t extent = decltype(std::span{in})::extent;
  402|       |
  403|       |            // clang-format off
  404|  2.90k|            using type =
  405|  2.90k|               std::conditional_t<extent == 1, uint8_t,
  406|  2.90k|               std::conditional_t<extent == 2, uint16_t,
  407|  2.90k|               std::conditional_t<extent == 4, uint32_t,
  408|  2.90k|               std::conditional_t<extent == 8, uint64_t, void>>>>;
  409|       |            // clang-format on
  410|       |
  411|  2.90k|            static_assert(
  412|  2.90k|               !std::is_void_v<type>,
  413|  2.90k|               "Cannot determine the output type based on a statically sized bytearray with length other than those: 1, 2, 4, 8");
  414|       |
  415|  2.90k|            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|  2.90k|   }(in_range);
_ZN5Botan6detail8load_anyILNSt3__16endianE57005ETkNS0_20unsigned_integralishEtTkNS_6ranges16contiguous_rangeIhEENS2_5arrayIhLm2EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEES9_OT1_:
  278|  2.90k|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|  2.90k|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|  2.90k|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|  2.90k|   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|  2.90k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|  2.90k|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  2.90k|      } else {
  289|  2.90k|         const std::span in{in_range};
  290|  2.90k|         if constexpr(sizeof(OutT) == 1) {
  291|  2.90k|            return static_cast<OutT>(in[0]);
  292|  2.90k|         } else if constexpr(endianness == std::endian::native) {
  293|  2.90k|            return typecast_copy<OutT>(in);
  294|  2.90k|         } else {
  295|  2.90k|            static_assert(opposite(endianness) == std::endian::native);
  296|  2.90k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  2.90k|         }
  298|  2.90k|      }
  299|  2.90k|   }());
  300|  2.90k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE57005ETkNS0_20unsigned_integralishEtTkNS_6ranges16contiguous_rangeIhEENS2_5arrayIhLm2EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEES9_OT1_ENKUlvE_clEv:
  282|  2.90k|   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|  2.90k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 2.90k]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  2.90k|      } else {
  289|  2.90k|         const std::span in{in_range};
  290|       |         if constexpr(sizeof(OutT) == 1) {
  291|       |            return static_cast<OutT>(in[0]);
  292|  2.90k|         } else if constexpr(endianness == std::endian::native) {
  293|  2.90k|            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|  2.90k|      }
  299|  2.90k|   }());
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayItLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_ENKUlRKT_E_clIS7_EEDaSD_:
  664|    325|   auto out = []([[maybe_unused]] const auto& in) {
  665|    325|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|    325|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|    325|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|    325|            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|    325|   }(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|    325|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|    325|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|    325|      off += sizeof(T);
  587|    325|   };
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EtTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm2EEETpTkNS0_20unsigned_integralishEJtEQaagtsZT2_Li0Eooaasr3stdE7same_asINS0_10AutoDetectET0_E10all_same_vIDpT2_Eaa20unsigned_integralishIS9_E10all_same_vIS9_SB_EEEvOT1_SB_:
  582|    325|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, Ts... ins) {
  583|    325|   ranges::assert_exact_byte_length<(sizeof(Ts) + ...)>(out);
  584|    325|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|    325|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|    325|      off += sizeof(T);
  587|    325|   };
  588|       |
  589|    325|   (store_one(std::span{out}, ins), ...);
  590|    325|}
_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|    325|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|    325|   ranges::assert_equal_byte_lengths(out, in);
  605|    325|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|    325|   auto store_elementwise = [&] {
  608|    325|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    325|      std::span<uint8_t> out_s(out);
  610|    325|      for(auto in_elem : in) {
  611|    325|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|    325|         out_s = out_s.subspan(bytes_per_element);
  613|    325|      }
  614|    325|   };
  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|    325|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 325]
  ------------------
  620|      0|      store_elementwise();
  621|    325|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|    325|      } else {
  625|    325|         store_elementwise();
  626|    325|      }
  627|    325|   }
  628|    325|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayItLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_:
  663|    325|inline constexpr auto store_any(InR&& in_range) {
  664|    325|   auto out = []([[maybe_unused]] const auto& in) {
  665|    325|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|    325|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|    325|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|    325|            return std::array<uint8_t, bytes>();
  669|    325|         } else {
  670|    325|            static_assert(
  671|    325|               !std::same_as<AutoDetect, OutR>,
  672|    325|               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|    325|         }
  674|    325|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|    325|         return OutR(std::span{in}.size_bytes());
  676|    325|      } else {
  677|    325|         return OutR{};
  678|    325|      }
  679|    325|   }(in_range);
  680|       |
  681|    325|   store_any<endianness, std::ranges::range_value_t<InR>>(out, std::forward<InR>(in_range));
  682|    325|   return out;
  683|    325|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETpTkNS0_20unsigned_integralishEJtEQ10all_same_vIDpT1_EEEDaS6_:
  696|    325|inline constexpr auto store_any(Ts... ins) {
  697|    325|   return store_any<endianness, OutR>(std::array{ins...});
  698|    325|}
_ZN5Botan8store_beINS_6detail10AutoDetectEJtEEEDaDpOT0_:
  745|    325|inline constexpr auto store_be(ParamTs&&... params) {
  746|    325|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|    325|}
_ZN5Botan7load_leINS_6detail10AutoDetectEJNSt3__15arrayIhLm4EEEEEEDaDpOT0_:
  495|  53.0k|inline constexpr auto load_le(ParamTs&&... params) {
  496|  53.0k|   return detail::load_any<std::endian::little, OutT>(std::forward<ParamTs>(params)...);
  497|  53.0k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges16contiguous_rangeIhEENS2_5arrayIhLm4EEEQoosr3stdE7same_asIS4_T0_Eaaoosr6rangesE25statically_spanable_rangeIS9_Esr8conceptsE19resizable_containerIS9_E20unsigned_integralishINS9_10value_typeEEEEDaOT1_:
  397|  53.0k|inline constexpr auto load_any(InR&& in_range) {
  398|  53.0k|   auto out = []([[maybe_unused]] const auto& in) {
  399|  53.0k|      if constexpr(std::same_as<AutoDetect, OutT>) {
  400|  53.0k|         if constexpr(ranges::statically_spanable_range<InR>) {
  401|  53.0k|            constexpr size_t extent = decltype(std::span{in})::extent;
  402|       |
  403|       |            // clang-format off
  404|  53.0k|            using type =
  405|  53.0k|               std::conditional_t<extent == 1, uint8_t,
  406|  53.0k|               std::conditional_t<extent == 2, uint16_t,
  407|  53.0k|               std::conditional_t<extent == 4, uint32_t,
  408|  53.0k|               std::conditional_t<extent == 8, uint64_t, void>>>>;
  409|       |            // clang-format on
  410|       |
  411|  53.0k|            static_assert(
  412|  53.0k|               !std::is_void_v<type>,
  413|  53.0k|               "Cannot determine the output type based on a statically sized bytearray with length other than those: 1, 2, 4, 8");
  414|       |
  415|  53.0k|            return type{};
  416|  53.0k|         } else {
  417|  53.0k|            static_assert(
  418|  53.0k|               !std::same_as<AutoDetect, OutT>,
  419|  53.0k|               "cannot infer return type from a dynamic range at compile time, please specify it explicitly");
  420|  53.0k|         }
  421|  53.0k|      } else if constexpr(concepts::resizable_container<OutT>) {
  422|  53.0k|         const size_t in_bytes = std::span{in}.size_bytes();
  423|  53.0k|         constexpr size_t out_elem_bytes = sizeof(typename OutT::value_type);
  424|  53.0k|         BOTAN_ARG_CHECK(in_bytes % out_elem_bytes == 0,
  425|  53.0k|                         "Input range is not word-aligned with the requested output range");
  426|  53.0k|         return OutT(in_bytes / out_elem_bytes);
  427|  53.0k|      } else {
  428|  53.0k|         return OutT{};
  429|  53.0k|      }
  430|  53.0k|   }(in_range);
  431|       |
  432|  53.0k|   using out_type = decltype(out);
  433|  53.0k|   if constexpr(unsigned_integralish<out_type>) {
  434|  53.0k|      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|  53.0k|   return out;
  441|  53.0k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges16contiguous_rangeIhEENS2_5arrayIhLm4EEEQoosr3stdE7same_asIS4_T0_Eaaoosr6rangesE25statically_spanable_rangeIS9_Esr8conceptsE19resizable_containerIS9_E20unsigned_integralishINS9_10value_typeEEEEDaOT1_ENKUlRKT_E_clIS8_EEDaSF_:
  398|  53.0k|   auto out = []([[maybe_unused]] const auto& in) {
  399|  53.0k|      if constexpr(std::same_as<AutoDetect, OutT>) {
  400|  53.0k|         if constexpr(ranges::statically_spanable_range<InR>) {
  401|  53.0k|            constexpr size_t extent = decltype(std::span{in})::extent;
  402|       |
  403|       |            // clang-format off
  404|  53.0k|            using type =
  405|  53.0k|               std::conditional_t<extent == 1, uint8_t,
  406|  53.0k|               std::conditional_t<extent == 2, uint16_t,
  407|  53.0k|               std::conditional_t<extent == 4, uint32_t,
  408|  53.0k|               std::conditional_t<extent == 8, uint64_t, void>>>>;
  409|       |            // clang-format on
  410|       |
  411|  53.0k|            static_assert(
  412|  53.0k|               !std::is_void_v<type>,
  413|  53.0k|               "Cannot determine the output type based on a statically sized bytearray with length other than those: 1, 2, 4, 8");
  414|       |
  415|  53.0k|            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|  53.0k|   }(in_range);
_ZN5Botan6detail8load_anyILNSt3__16endianE57005ETkNS0_20unsigned_integralishEjTkNS_6ranges16contiguous_rangeIhEENS2_5arrayIhLm4EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEES9_OT1_:
  278|  53.0k|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|  53.0k|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|  53.0k|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|  53.0k|   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|  53.0k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|  53.0k|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  53.0k|      } else {
  289|  53.0k|         const std::span in{in_range};
  290|  53.0k|         if constexpr(sizeof(OutT) == 1) {
  291|  53.0k|            return static_cast<OutT>(in[0]);
  292|  53.0k|         } else if constexpr(endianness == std::endian::native) {
  293|  53.0k|            return typecast_copy<OutT>(in);
  294|  53.0k|         } else {
  295|  53.0k|            static_assert(opposite(endianness) == std::endian::native);
  296|  53.0k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  53.0k|         }
  298|  53.0k|      }
  299|  53.0k|   }());
  300|  53.0k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE57005ETkNS0_20unsigned_integralishEjTkNS_6ranges16contiguous_rangeIhEENS2_5arrayIhLm4EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEES9_OT1_ENKUlvE_clEv:
  282|  53.0k|   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|  53.0k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 53.0k]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  53.0k|      } else {
  289|  53.0k|         const std::span in{in_range};
  290|       |         if constexpr(sizeof(OutT) == 1) {
  291|       |            return static_cast<OutT>(in[0]);
  292|  53.0k|         } else if constexpr(endianness == std::endian::native) {
  293|  53.0k|            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|  53.0k|      }
  299|  53.0k|   }());
_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|    325|   auto store_elementwise = [&] {
  608|    325|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    325|      std::span<uint8_t> out_s(out);
  610|    325|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 325, False: 325]
  ------------------
  611|    325|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|    325|         out_s = out_s.subspan(bytes_per_element);
  613|    325|      }
  614|    325|   };
_ZN5Botan8store_leINS_6detail10AutoDetectEJRPhmmmmEEEDaDpOT0_:
  736|      1|inline constexpr auto store_le(ParamTs&&... params) {
  737|      1|   return detail::store_any<std::endian::little, ModifierT>(std::forward<ParamTs>(params)...);
  738|      1|}
_ZN5Botan6detail9store_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS0_20unsigned_integralishEmTpTkNS0_20unsigned_integralishEJmmmEQaaoosr3stdE7same_asIS4_T0_Esr3stdE7same_asIT1_S5_E10all_same_vIS6_DpT2_EEEvPhS6_S8_:
  723|      1|inline constexpr void store_any(uint8_t out[], T0 in0, Ts... ins) {
  724|      1|   constexpr auto bytes = sizeof(in0) + (sizeof(ins) + ... + 0);
  725|       |   // asserts that *out points to the correct amount of memory
  726|      1|   store_any<endianness, T0>(std::span<uint8_t, bytes>(out, bytes), in0, ins...);
  727|      1|}
_ZN5Botan6detail9store_anyILNSt3__16endianE57005EmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm32EEETpTkNS0_20unsigned_integralishEJmmmmEQaagtsZT2_Li0Eooaasr3stdE7same_asINS0_10AutoDetectET0_E10all_same_vIDpT2_Eaa20unsigned_integralishIS9_E10all_same_vIS9_SB_EEEvOT1_SB_:
  582|      1|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, Ts... ins) {
  583|      1|   ranges::assert_exact_byte_length<(sizeof(Ts) + ...)>(out);
  584|      1|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|      1|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|      1|      off += sizeof(T);
  587|      1|   };
  588|       |
  589|      1|   (store_one(std::span{out}, ins), ...);
  590|      1|}
_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|      4|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|      4|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|      4|      off += sizeof(T);
  587|      4|   };
_ZN5Botan7load_leINS_6detail10AutoDetectEJRNSt3__15arrayImLm7EEERNS3_4spanIKhLm56EEEEEEDaDpOT0_:
  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__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|      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|}
_ZN5Botan8store_leINS_6detail10AutoDetectEJRNSt3__14spanIhLm56EEENS3_5arrayImLm7EEEEEEDaDpOT0_:
  736|      1|inline constexpr auto store_le(ParamTs&&... params) {
  737|      1|   return detail::store_any<std::endian::little, ModifierT>(std::forward<ParamTs>(params)...);
  738|      1|}
_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|      1|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|      1|   ranges::assert_equal_byte_lengths(out, in);
  605|      1|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|      1|   auto store_elementwise = [&] {
  608|      1|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|      1|      std::span<uint8_t> out_s(out);
  610|      1|      for(auto in_elem : in) {
  611|      1|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|      1|         out_s = out_s.subspan(bytes_per_element);
  613|      1|      }
  614|      1|   };
  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|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 1]
  ------------------
  620|      0|      store_elementwise();
  621|      1|   } else {
  622|      1|      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|      1|         typecast_copy(out, in);
  624|       |      } else {
  625|       |         store_elementwise();
  626|       |      }
  627|      1|   }
  628|      1|}
_ZN5Botan8store_leINS_6detail10AutoDetectEJRtEEEDaDpOT0_:
  736|  3.84k|inline constexpr auto store_le(ParamTs&&... params) {
  737|  3.84k|   return detail::store_any<std::endian::little, ModifierT>(std::forward<ParamTs>(params)...);
  738|  3.84k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE57005ENS0_10AutoDetectETpTkNS0_20unsigned_integralishEJtEQ10all_same_vIDpT1_EEEDaS6_:
  696|  3.84k|inline constexpr auto store_any(Ts... ins) {
  697|  3.84k|   return store_any<endianness, OutR>(std::array{ins...});
  698|  3.84k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayItLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_:
  663|  3.84k|inline constexpr auto store_any(InR&& in_range) {
  664|  3.84k|   auto out = []([[maybe_unused]] const auto& in) {
  665|  3.84k|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|  3.84k|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|  3.84k|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|  3.84k|            return std::array<uint8_t, bytes>();
  669|  3.84k|         } else {
  670|  3.84k|            static_assert(
  671|  3.84k|               !std::same_as<AutoDetect, OutR>,
  672|  3.84k|               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|  3.84k|         }
  674|  3.84k|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|  3.84k|         return OutR(std::span{in}.size_bytes());
  676|  3.84k|      } else {
  677|  3.84k|         return OutR{};
  678|  3.84k|      }
  679|  3.84k|   }(in_range);
  680|       |
  681|  3.84k|   store_any<endianness, std::ranges::range_value_t<InR>>(out, std::forward<InR>(in_range));
  682|  3.84k|   return out;
  683|  3.84k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayItLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_ENKUlRKT_E_clIS7_EEDaSD_:
  664|  3.84k|   auto out = []([[maybe_unused]] const auto& in) {
  665|  3.84k|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|  3.84k|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|  3.84k|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|  3.84k|            return std::array<uint8_t, bytes>();
  669|       |         } else {
  670|       |            static_assert(
  671|       |               !std::same_as<AutoDetect, OutR>,
  672|       |               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|       |         }
  674|       |      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|       |         return OutR(std::span{in}.size_bytes());
  676|       |      } else {
  677|       |         return OutR{};
  678|       |      }
  679|  3.84k|   }(in_range);
_ZN5Botan6detail9store_anyILNSt3__16endianE57005EtTkNS_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|  3.84k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|  3.84k|   ranges::assert_equal_byte_lengths(out, in);
  605|  3.84k|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|  3.84k|   auto store_elementwise = [&] {
  608|  3.84k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  3.84k|      std::span<uint8_t> out_s(out);
  610|  3.84k|      for(auto in_elem : in) {
  611|  3.84k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  3.84k|         out_s = out_s.subspan(bytes_per_element);
  613|  3.84k|      }
  614|  3.84k|   };
  615|       |
  616|       |   // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  617|       |   // internally to copy ranges on a byte-by-byte basis, which is not allowed
  618|       |   // in a `constexpr` context.
  619|  3.84k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 3.84k]
  ------------------
  620|      0|      store_elementwise();
  621|  3.84k|   } else {
  622|  3.84k|      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|  3.84k|         typecast_copy(out, in);
  624|       |      } else {
  625|       |         store_elementwise();
  626|       |      }
  627|  3.84k|   }
  628|  3.84k|}

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

_ZN5Botan14zeroize_bufferITkNSt3__117unsigned_integralEmEEvPT_m:
   37|  52.1M|inline void zeroize_buffer(T buf[], size_t n) {
   38|  52.1M|   if(n > 0) {
  ------------------
  |  Branch (38:7): [True: 50.3M, False: 1.88M]
  ------------------
   39|  50.3M|      std::memset(buf, 0, sizeof(T) * n);
   40|  50.3M|   }
   41|  52.1M|}
_ZN5Botan21unchecked_copy_memoryITkNSt3__117unsigned_integralEmEEvPT_PKS2_m:
   44|  5.52M|inline void unchecked_copy_memory(T* out, const T* in, size_t n) {
   45|  5.52M|   if(in != nullptr && out != nullptr && n > 0) {
  ------------------
  |  Branch (45:7): [True: 5.52M, False: 0]
  |  Branch (45:24): [True: 5.52M, False: 0]
  |  Branch (45:42): [True: 5.52M, False: 0]
  ------------------
   46|  5.52M|      std::memmove(out, in, sizeof(T) * n);
   47|  5.52M|   }
   48|  5.52M|}
_ZN5Botan14zeroize_bufferITkNSt3__117unsigned_integralEhEEvPT_m:
   37|      6|inline void zeroize_buffer(T buf[], size_t n) {
   38|      6|   if(n > 0) {
  ------------------
  |  Branch (38:7): [True: 6, False: 0]
  ------------------
   39|      6|      std::memset(buf, 0, sizeof(T) * n);
   40|      6|   }
   41|      6|}

_ZN5Botan27ML_DSA_Symmetric_PrimitivesC2ERKNS_18DilithiumConstantsE:
   65|    164|            Dilithium_Symmetric_Primitives_Base(mode, std::make_unique<DilithiumShakeXOF>()),
   66|    164|            m_seed_expansion_domain_separator({mode.k(), mode.l()}) {}
_ZNK5Botan27ML_DSA_Symmetric_Primitives31seed_expansion_domain_separatorEv:
   92|     79|      std::optional<std::array<uint8_t, 2>> seed_expansion_domain_separator() const override {
   93|     79|         return m_seed_expansion_domain_separator;
   94|     79|      }

_ZNK5Botan27ML_KEM_Symmetric_Primitives31seed_expansion_domain_separatorERKNS_14KyberConstantsE:
   59|     28|      std::optional<std::array<uint8_t, 1>> seed_expansion_domain_separator(const KyberConstants& mode) const override {
   60|       |         // NIST FIPS 203, Algorithm 13 (K-PKE.KeyGen)
   61|       |         //    Byte 33 of the input to G is the module dimension k from {2,3,4}.
   62|       |         //    This is included to establish domain separation between the three
   63|       |         //    parameter sets
   64|     28|         return std::array{mode.k()};
   65|     28|      }
_ZNK5Botan27ML_KEM_Symmetric_Primitives8create_GEv:
   67|     28|      std::unique_ptr<HashFunction> create_G() const override { return HashFunction::create_or_throw("SHA-3(512)"); }
_ZNK5Botan27ML_KEM_Symmetric_Primitives8create_HEv:
   69|     28|      std::unique_ptr<HashFunction> create_H() const override { return HashFunction::create_or_throw("SHA-3(256)"); }
_ZNK5Botan27ML_KEM_Symmetric_Primitives10create_PRFENSt3__14spanIKhLm18446744073709551615EEEh:
   79|     28|      std::unique_ptr<Botan::XOF> create_PRF(std::span<const uint8_t> seed, const uint8_t nonce) const override {
   80|     28|         auto xof = Botan::XOF::create_or_throw("SHAKE-256");
   81|     28|         init_PRF(*xof, seed, nonce);
   82|     28|         return xof;
   83|     28|      }
_ZNK5Botan27ML_KEM_Symmetric_Primitives8init_PRFERNS_3XOFENSt3__14spanIKhLm18446744073709551615EEEh:
   85|    186|      void init_PRF(Botan::XOF& xof, std::span<const uint8_t> seed, const uint8_t nonce) const override {
   86|    186|         xof.clear();
   87|    186|         xof.update(seed);
   88|    186|         xof.update(store_be(nonce));
   89|    186|      }
_ZNK5Botan27ML_KEM_Symmetric_Primitives10create_XOFENSt3__14spanIKhLm18446744073709551615EEENS1_5tupleIJhhEEE:
   92|     28|                                             std::tuple<uint8_t, uint8_t> matrix_position) const override {
   93|     28|         auto xof = Botan::XOF::create_or_throw("SHAKE-128");
   94|     28|         init_XOF(*xof, seed, matrix_position);
   95|     28|         return xof;
   96|     28|      }
_ZNK5Botan27ML_KEM_Symmetric_Primitives8init_XOFERNS_3XOFENSt3__14spanIKhLm18446744073709551615EEENS3_5tupleIJhhEEE:
  100|    325|                    std::tuple<uint8_t, uint8_t> matrix_position) const override {
  101|    325|         xof.clear();
  102|    325|         xof.update(seed);
  103|    325|         xof.update(store_be(make_uint16(std::get<0>(matrix_position), std::get<1>(matrix_position))));
  104|    325|      }

_ZNK5Botan17Montgomery_Params1pEv:
   41|  12.2M|      const BigInt& p() const { return m_data->p(); }
_ZNK5Botan17Montgomery_Params2R1Ev:
   43|  8.43k|      const BigInt& R1() const { return m_data->r1(); }
_ZNK5Botan17Montgomery_Params2R2Ev:
   45|  19.3k|      const BigInt& R2() const { return m_data->r2(); }
_ZNK5Botan17Montgomery_Params2R3Ev:
   47|  1.33k|      const BigInt& R3() const { return m_data->r3(); }
_ZNK5Botan17Montgomery_Params6p_dashEv:
   49|  12.2M|      word p_dash() const { return m_data->p_dash(); }
_ZNK5Botan17Montgomery_Params7p_wordsEv:
   51|  13.8M|      size_t p_words() const { return m_data->p_size(); }
_ZNK5Botan17Montgomery_Params4Data1pEv:
   76|  12.2M|            const BigInt& p() const { return m_p; }
_ZNK5Botan17Montgomery_Params4Data2r1Ev:
   78|  8.43k|            const BigInt& r1() const { return m_r1; }
_ZNK5Botan17Montgomery_Params4Data2r2Ev:
   80|  19.3k|            const BigInt& r2() const { return m_r2; }
_ZNK5Botan17Montgomery_Params4Data2r3Ev:
   82|  1.33k|            const BigInt& r3() const { return m_r3; }
_ZNK5Botan17Montgomery_Params4Data6p_dashEv:
   84|  12.2M|            word p_dash() const { return m_p_dash; }
_ZNK5Botan17Montgomery_Params4Data6p_sizeEv:
   86|  13.8M|            size_t p_size() const { return m_p_words; }
_ZNK5Botan14Montgomery_Int4reprEv:
  143|  1.66M|      const secure_vector<word>& repr() const { return m_v; }
_ZNK5Botan14Montgomery_Int18_const_time_poisonEv:
  159|  23.7k|      void _const_time_poison() const { CT::poison(m_v); }
_ZNK5Botan14Montgomery_Int20_const_time_unpoisonEv:
  161|  1.38k|      void _const_time_unpoison() const { CT::unpoison(m_v); }
_ZNK5Botan14Montgomery_Int7_paramsEv:
  163|  1.48k|      const Montgomery_Params& _params() const { return m_params; }

_ZN5Botan10word8_add2ITkNS_8WordTypeEmEET_PS1_PKS1_S1_:
  268|    471|inline constexpr auto word8_add2(W x[8], const W y[8], W carry) -> W {
  269|    471|#if defined(BOTAN_MP_USE_X86_64_ASM)
  270|    471|   if(std::same_as<W, uint64_t> && !std::is_constant_evaluated()) {
  ------------------
  |  Branch (270:7): [True: 0, Folded]
  |  Branch (270:36): [True: 0, Folded]
  ------------------
  271|    471|      asm volatile(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB2_OP, "adcq"))
  272|    471|                   : [carry] "=r"(carry)
  273|    471|                   : [x] "r"(x), [y] "r"(y), "0"(carry)
  274|    471|                   : "cc", "memory");
  275|    471|      return carry;
  276|    471|   }
  277|      0|#endif
  278|       |
  279|      0|   x[0] = word_add(x[0], y[0], &carry);
  280|      0|   x[1] = word_add(x[1], y[1], &carry);
  281|      0|   x[2] = word_add(x[2], y[2], &carry);
  282|      0|   x[3] = word_add(x[3], y[3], &carry);
  283|      0|   x[4] = word_add(x[4], y[4], &carry);
  284|      0|   x[5] = word_add(x[5], y[5], &carry);
  285|      0|   x[6] = word_add(x[6], y[6], &carry);
  286|      0|   x[7] = word_add(x[7], y[7], &carry);
  287|      0|   return carry;
  288|    471|}
_ZN5Botan8word_addITkNS_8WordTypeEmEET_S1_S1_PS1_:
  231|  65.0M|inline constexpr auto word_add(W x, W y, W* carry) -> W {
  232|  65.0M|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_addc)
  233|  65.0M|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (233:7): [True: 65.0M, Folded]
  ------------------
  234|       |      if constexpr(std::same_as<W, unsigned int>) {
  235|       |         return __builtin_addc(x, y, *carry & 1, carry);
  236|  65.0M|      } else if constexpr(std::same_as<W, unsigned long>) {
  237|  65.0M|         return __builtin_addcl(x, y, *carry & 1, carry);
  238|       |      } else if constexpr(std::same_as<W, unsigned long long>) {
  239|       |         return __builtin_addcll(x, y, *carry & 1, carry);
  240|       |      }
  241|  65.0M|   }
  242|      0|#endif
  243|       |
  244|       |   if constexpr(WordInfo<W>::dword_is_native && use_dword_for_word_add) {
  245|       |      /*
  246|       |      TODO(Botan4) this is largely a performance hack for GCCs that don't
  247|       |      support __builtin_addc, if we increase the minimum supported version of
  248|       |      GCC to GCC 14 then we can remove this and not worry about it
  249|       |      */
  250|       |      const W cb = *carry & 1;
  251|       |      const auto s = typename WordInfo<W>::dword(x) + y + cb;
  252|       |      *carry = static_cast<W>(s >> WordInfo<W>::bits);
  253|       |      return static_cast<W>(s);
  254|  65.0M|   } else {
  255|  65.0M|      const W cb = *carry & 1;
  256|  65.0M|      W z = x + y;
  257|  65.0M|      W c1 = (z < x);
  258|  65.0M|      z += cb;
  259|  65.0M|      *carry = c1 | (z < cb);
  260|  65.0M|      return z;
  261|  65.0M|   }
  262|  65.0M|}
_ZN5Botan10word8_sub2ITkNS_8WordTypeEmEET_PS1_PKS1_S1_:
  345|  1.11M|inline constexpr auto word8_sub2(W x[8], const W y[8], W carry) -> W {
  346|  1.11M|#if defined(BOTAN_MP_USE_X86_64_ASM)
  347|  1.11M|   if(std::same_as<W, uint64_t> && !std::is_constant_evaluated()) {
  ------------------
  |  Branch (347:7): [True: 0, Folded]
  |  Branch (347:36): [True: 0, Folded]
  ------------------
  348|  1.11M|      asm volatile(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB2_OP, "sbbq"))
  349|  1.11M|                   : [carry] "=r"(carry)
  350|  1.11M|                   : [x] "r"(x), [y] "r"(y), "0"(carry)
  351|  1.11M|                   : "cc", "memory");
  352|  1.11M|      return carry;
  353|  1.11M|   }
  354|      0|#endif
  355|       |
  356|      0|   x[0] = word_sub(x[0], y[0], &carry);
  357|      0|   x[1] = word_sub(x[1], y[1], &carry);
  358|      0|   x[2] = word_sub(x[2], y[2], &carry);
  359|      0|   x[3] = word_sub(x[3], y[3], &carry);
  360|      0|   x[4] = word_sub(x[4], y[4], &carry);
  361|      0|   x[5] = word_sub(x[5], y[5], &carry);
  362|      0|   x[6] = word_sub(x[6], y[6], &carry);
  363|      0|   x[7] = word_sub(x[7], y[7], &carry);
  364|      0|   return carry;
  365|  1.11M|}
_ZN5Botan8word_subITkNS_8WordTypeEmEET_S1_S1_PS1_:
  320|   232M|inline constexpr auto word_sub(W x, W y, W* carry) -> W {
  321|   232M|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_subc)
  322|   232M|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (322:7): [True: 232M, Folded]
  ------------------
  323|       |      if constexpr(std::same_as<W, unsigned int>) {
  324|       |         return __builtin_subc(x, y, *carry & 1, carry);
  325|   232M|      } else if constexpr(std::same_as<W, unsigned long>) {
  326|   232M|         return __builtin_subcl(x, y, *carry & 1, carry);
  327|       |      } else if constexpr(std::same_as<W, unsigned long long>) {
  328|       |         return __builtin_subcll(x, y, *carry & 1, carry);
  329|       |      }
  330|   232M|   }
  331|      0|#endif
  332|       |
  333|      0|   const W cb = *carry & 1;
  334|   232M|   W t0 = x - y;
  335|   232M|   W c1 = (t0 > x);
  336|   232M|   W z = t0 - cb;
  337|   232M|   *carry = c1 | (z > t0);
  338|   232M|   return z;
  339|   232M|}
_ZN5Botan10word8_sub3ITkNS_8WordTypeEmEET_PS1_PKS1_S4_S1_:
  371|  12.1M|inline constexpr auto word8_sub3(W z[8], const W x[8], const W y[8], W carry) -> W {
  372|  12.1M|#if defined(BOTAN_MP_USE_X86_64_ASM)
  373|  12.1M|   if(std::same_as<W, uint64_t> && !std::is_constant_evaluated()) {
  ------------------
  |  Branch (373:7): [True: 0, Folded]
  |  Branch (373:36): [True: 0, Folded]
  ------------------
  374|  12.1M|      asm volatile(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB3_OP, "sbbq"))
  375|  12.1M|                   : [carry] "=r"(carry)
  376|  12.1M|                   : [x] "r"(x), [y] "r"(y), [z] "r"(z), "0"(carry)
  377|  12.1M|                   : "cc", "memory");
  378|  12.1M|      return carry;
  379|  12.1M|   }
  380|      0|#endif
  381|       |
  382|      0|   z[0] = word_sub(x[0], y[0], &carry);
  383|      0|   z[1] = word_sub(x[1], y[1], &carry);
  384|      0|   z[2] = word_sub(x[2], y[2], &carry);
  385|      0|   z[3] = word_sub(x[3], y[3], &carry);
  386|      0|   z[4] = word_sub(x[4], y[4], &carry);
  387|      0|   z[5] = word_sub(x[5], y[5], &carry);
  388|      0|   z[6] = word_sub(x[6], y[6], &carry);
  389|      0|   z[7] = word_sub(x[7], y[7], &carry);
  390|      0|   return carry;
  391|  12.1M|}
_ZN5Botan10word8_add3ITkNS_8WordTypeEmEET_PS1_PKS1_S4_S1_:
  294|  1.10M|inline constexpr auto word8_add3(W z[8], const W x[8], const W y[8], W carry) -> W {
  295|  1.10M|#if defined(BOTAN_MP_USE_X86_64_ASM)
  296|  1.10M|   if(std::same_as<W, uint64_t> && !std::is_constant_evaluated()) {
  ------------------
  |  Branch (296:7): [True: 0, Folded]
  |  Branch (296:36): [True: 0, Folded]
  ------------------
  297|  1.10M|      asm volatile(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB3_OP, "adcq"))
  298|  1.10M|                   : [carry] "=r"(carry)
  299|  1.10M|                   : [x] "r"(x), [y] "r"(y), [z] "r"(z), "0"(carry)
  300|  1.10M|                   : "cc", "memory");
  301|  1.10M|      return carry;
  302|  1.10M|   }
  303|      0|#endif
  304|       |
  305|      0|   z[0] = word_add(x[0], y[0], &carry);
  306|      0|   z[1] = word_add(x[1], y[1], &carry);
  307|      0|   z[2] = word_add(x[2], y[2], &carry);
  308|      0|   z[3] = word_add(x[3], y[3], &carry);
  309|      0|   z[4] = word_add(x[4], y[4], &carry);
  310|      0|   z[5] = word_add(x[5], y[5], &carry);
  311|      0|   z[6] = word_add(x[6], y[6], &carry);
  312|      0|   z[7] = word_add(x[7], y[7], &carry);
  313|      0|   return carry;
  314|  1.10M|}
_ZN5Botan13word8_linmul3ITkNS_8WordTypeEmEET_PS1_PKS1_S1_S1_:
  397|  22.7k|inline constexpr auto word8_linmul3(W z[8], const W x[8], W y, W carry) -> W {
  398|  22.7k|#if defined(BOTAN_MP_USE_X86_64_ASM)
  399|  22.7k|   if(std::same_as<W, uint64_t> && !std::is_constant_evaluated()) {
  ------------------
  |  Branch (399:7): [True: 0, Folded]
  |  Branch (399:36): [True: 0, Folded]
  ------------------
  400|  22.7k|      asm volatile(DO_8_TIMES(LINMUL_OP, "z")
  401|  22.7k|                   : [carry] "=r"(carry)
  402|  22.7k|                   : [z] "r"(z), [x] "r"(x), [y] "rm"(y), "0"(carry)
  403|  22.7k|                   : "cc", "%rax", "%rdx", "memory");
  404|  22.7k|      return carry;
  405|  22.7k|   }
  406|      0|#endif
  407|       |
  408|      0|   z[0] = word_madd2(x[0], y, &carry);
  409|      0|   z[1] = word_madd2(x[1], y, &carry);
  410|      0|   z[2] = word_madd2(x[2], y, &carry);
  411|      0|   z[3] = word_madd2(x[3], y, &carry);
  412|      0|   z[4] = word_madd2(x[4], y, &carry);
  413|      0|   z[5] = word_madd2(x[5], y, &carry);
  414|      0|   z[6] = word_madd2(x[6], y, &carry);
  415|      0|   z[7] = word_madd2(x[7], y, &carry);
  416|      0|   return carry;
  417|  22.7k|}
_ZN5Botan10word_madd2ITkNS_8WordTypeEmEET_S1_S1_PS1_:
   90|  10.7M|inline constexpr auto word_madd2(W a, W b, W* c) -> W {
   91|  10.7M|#if defined(BOTAN_MP_USE_X86_64_ASM)
   92|  10.7M|   if(std::same_as<W, uint64_t> && !std::is_constant_evaluated()) {
  ------------------
  |  Branch (92:7): [True: 0, Folded]
  |  Branch (92:36): [True: 0, Folded]
  ------------------
   93|  10.7M|      asm(R"(
   94|  10.7M|         mulq %[b]
   95|  10.7M|         addq %[c],%[a]
   96|  10.7M|         adcq $0,%[carry]
   97|  10.7M|         )"
   98|  10.7M|          : [a] "=a"(a), [b] "=rm"(b), [carry] "=&d"(*c)
   99|  10.7M|          : "0"(a), "1"(b), [c] "g"(*c)
  100|  10.7M|          : "cc");
  101|       |
  102|  10.7M|      return a;
  103|  10.7M|   }
  104|       |#elif defined(BOTAN_MP_USE_AARCH64_ASM)
  105|       |   if(std::same_as<W, uint64_t> && !std::is_constant_evaluated()) {
  106|       |      W lo = 0;
  107|       |      W hi = 0;
  108|       |      asm(R"(
  109|       |         mul  %[lo], %[a], %[b]
  110|       |         umulh %[hi], %[a], %[b]
  111|       |         adds %[lo], %[lo], %[c]
  112|       |         adc  %[hi], %[hi], xzr
  113|       |         )"
  114|       |          : [lo] "=&r"(lo), [hi] "=&r"(hi)
  115|       |          : [a] "r"(a), [b] "r"(b), [c] "r"(*c)
  116|       |          : "cc");
  117|       |
  118|       |      *c = hi;
  119|       |      return lo;
  120|       |   }
  121|       |#endif
  122|       |
  123|      0|   typedef typename WordInfo<W>::dword dword;
  124|      0|   const dword s = dword(a) * b + *c;
  125|      0|   *c = static_cast<W>(s >> WordInfo<W>::bits);
  126|      0|   return static_cast<W>(s);
  127|  10.7M|}
_ZN5Botan11word8_madd3ITkNS_8WordTypeEmEET_PS1_PKS1_S1_S1_:
  423|  19.0M|inline constexpr auto word8_madd3(W z[8], const W x[8], W y, W carry) -> W {
  424|  19.0M|#if defined(BOTAN_MP_USE_X86_64_ASM)
  425|  19.0M|   if(std::same_as<W, uint64_t> && !std::is_constant_evaluated()) {
  ------------------
  |  Branch (425:7): [True: 0, Folded]
  |  Branch (425:36): [True: 0, Folded]
  ------------------
  426|  19.0M|      asm volatile(DO_8_TIMES(MULADD_OP, "")
  427|  19.0M|                   : [carry] "=r"(carry)
  428|  19.0M|                   : [z] "r"(z), [x] "r"(x), [y] "rm"(y), "0"(carry)
  429|  19.0M|                   : "cc", "%rax", "%rdx", "memory");
  430|  19.0M|      return carry;
  431|  19.0M|   }
  432|      0|#endif
  433|       |
  434|      0|   z[0] = word_madd3(x[0], y, z[0], &carry);
  435|      0|   z[1] = word_madd3(x[1], y, z[1], &carry);
  436|      0|   z[2] = word_madd3(x[2], y, z[2], &carry);
  437|      0|   z[3] = word_madd3(x[3], y, z[3], &carry);
  438|      0|   z[4] = word_madd3(x[4], y, z[4], &carry);
  439|      0|   z[5] = word_madd3(x[5], y, z[5], &carry);
  440|      0|   z[6] = word_madd3(x[6], y, z[6], &carry);
  441|      0|   z[7] = word_madd3(x[7], y, z[7], &carry);
  442|      0|   return carry;
  443|  19.0M|}
_ZN5Botan10word_madd3ITkNS_8WordTypeEmEET_S1_S1_S1_PS1_:
  133|   173M|inline constexpr auto word_madd3(W a, W b, W c, W* d) -> W {
  134|   173M|#if defined(BOTAN_MP_USE_X86_64_ASM)
  135|   173M|   if(std::same_as<W, uint64_t> && !std::is_constant_evaluated()) {
  ------------------
  |  Branch (135:7): [True: 0, Folded]
  |  Branch (135:36): [True: 0, Folded]
  ------------------
  136|   173M|      asm(R"(
  137|   173M|         mulq %[b]
  138|   173M|
  139|   173M|         addq %[c],%[a]
  140|   173M|         adcq $0,%[carry]
  141|   173M|
  142|   173M|         addq %[d],%[a]
  143|   173M|         adcq $0,%[carry]
  144|   173M|         )"
  145|   173M|          : [a] "=a"(a), [b] "=rm"(b), [carry] "=&d"(*d)
  146|   173M|          : "0"(a), "1"(b), [c] "g"(c), [d] "g"(*d)
  147|   173M|          : "cc");
  148|       |
  149|   173M|      return a;
  150|   173M|   }
  151|       |#elif defined(BOTAN_MP_USE_AARCH64_ASM)
  152|       |   if(std::same_as<W, uint64_t> && !std::is_constant_evaluated()) {
  153|       |      W lo = 0;
  154|       |      W hi = 0;
  155|       |      asm(R"(
  156|       |         mul  %[lo], %[a], %[b]
  157|       |         umulh %[hi], %[a], %[b]
  158|       |         adds %[lo], %[lo], %[c]
  159|       |         adc  %[hi], %[hi], xzr
  160|       |         adds %[lo], %[lo], %[d]
  161|       |         adc  %[hi], %[hi], xzr
  162|       |         )"
  163|       |          : [lo] "=&r"(lo), [hi] "=&r"(hi)
  164|       |          : [a] "r"(a), [b] "r"(b), [c] "r"(c), [d] "r"(*d)
  165|       |          : "cc");
  166|       |
  167|       |      *d = hi;
  168|       |      return lo;
  169|       |   }
  170|       |#endif
  171|       |
  172|      0|   typedef typename WordInfo<W>::dword dword;
  173|      0|   const dword s = dword(a) * b + c + *d;
  174|      0|   *d = static_cast<W>(s >> WordInfo<W>::bits);
  175|      0|   return static_cast<W>(s);
  176|   173M|}
_ZN5Botan5word3ImE3mulEmm:
  460|  1.22G|      inline constexpr void mul(W x, W y) { m_w += static_cast<W3>(x) * y; }
_ZN5Botan5word3ImE7extractEv:
  466|   391M|      inline constexpr W extract() {
  467|   391M|         W r = static_cast<W>(m_w);
  468|   391M|         m_w >>= WordInfo<W>::bits;
  469|   391M|         return r;
  470|   391M|      }
_ZN5Botan5word3ImE3addEm:
  464|   243M|      inline constexpr void add(W x) { m_w += x; }
_ZN5Botan5word3ImE10monty_stepEmm:
  472|   121M|      inline constexpr W monty_step(W p0, W p_dash) {
  473|   121M|         const W w0 = static_cast<W>(m_w);
  474|   121M|         const W r = w0 * p_dash;
  475|   121M|         mul(r, p0);
  476|   121M|         m_w >>= WordInfo<W>::bits;
  477|   121M|         return r;
  478|   121M|      }
_ZN5Botan5word3ImEC2Ev:
  458|  49.4M|      constexpr word3() : m_w(0) {}
_ZN5Botan5word3ImE6mul_x2Emm:
  462|  83.3M|      inline constexpr void mul_x2(W x, W y) { m_w += static_cast<W3>(x) * y * 2; }

_ZN5Botan11bigint_add2ITkNS_8WordTypeEmEET_PS1_mPKS1_m:
   94|   195k|inline constexpr auto bigint_add2(W x[], size_t x_size, const W y[], size_t y_size) -> W {
   95|   195k|   W carry = 0;
   96|       |
   97|   195k|   BOTAN_ASSERT(x_size >= y_size, "Expected sizes");
  ------------------
  |  |   64|   195k|   do {                                                                                 \
  |  |   65|   195k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|   195k|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 195k]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|   195k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 195k]
  |  |  ------------------
  ------------------
   98|       |
   99|   195k|   const size_t blocks = y_size - (y_size % 8);
  100|       |
  101|   195k|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (101:22): [True: 471, False: 195k]
  ------------------
  102|    471|      carry = word8_add2(x + i, y + i, carry);
  103|    471|   }
  104|       |
  105|   586k|   for(size_t i = blocks; i != y_size; ++i) {
  ------------------
  |  Branch (105:27): [True: 390k, False: 195k]
  ------------------
  106|   390k|      x[i] = word_add(x[i], y[i], &carry);
  107|   390k|   }
  108|       |
  109|   594k|   for(size_t i = y_size; i != x_size; ++i) {
  ------------------
  |  Branch (109:27): [True: 398k, False: 195k]
  ------------------
  110|   398k|      x[i] = word_add(x[i], static_cast<W>(0), &carry);
  111|   398k|   }
  112|       |
  113|   195k|   return carry;
  114|   195k|}
_ZN5Botan10bigint_cmpITkNS_8WordTypeEmEEiPKT_mS3_m:
  439|  2.57M|inline constexpr int32_t bigint_cmp(const W x[], size_t x_size, const W y[], size_t y_size) {
  440|  2.57M|   static_assert(sizeof(W) >= sizeof(uint32_t), "Size assumption");
  441|       |
  442|  2.57M|   const W LT = static_cast<W>(-1);
  443|  2.57M|   const W EQ = 0;
  444|  2.57M|   const W GT = 1;
  445|       |
  446|  2.57M|   const size_t common_elems = std::min(x_size, y_size);
  447|       |
  448|  2.57M|   W result = EQ;  // until found otherwise
  449|       |
  450|  21.1M|   for(size_t i = 0; i != common_elems; i++) {
  ------------------
  |  Branch (450:22): [True: 18.5M, False: 2.57M]
  ------------------
  451|  18.5M|      const auto is_eq = CT::Mask<W>::is_equal(x[i], y[i]);
  452|  18.5M|      const auto is_lt = CT::Mask<W>::is_lt(x[i], y[i]);
  453|       |
  454|  18.5M|      result = is_eq.select(result, is_lt.select(LT, GT));
  455|  18.5M|   }
  456|       |
  457|  2.57M|   if(x_size < y_size) {
  ------------------
  |  Branch (457:7): [True: 4.40k, False: 2.57M]
  ------------------
  458|  4.40k|      W mask = 0;
  459|  15.0k|      for(size_t i = x_size; i != y_size; i++) {
  ------------------
  |  Branch (459:30): [True: 10.6k, False: 4.40k]
  ------------------
  460|  10.6k|         mask |= y[i];
  461|  10.6k|      }
  462|       |
  463|       |      // If any bits were set in high part of y, then x < y
  464|  4.40k|      result = CT::Mask<W>::is_zero(mask).select(result, LT);
  465|  2.57M|   } else if(y_size < x_size) {
  ------------------
  |  Branch (465:14): [True: 12.7k, False: 2.56M]
  ------------------
  466|  12.7k|      W mask = 0;
  467|  46.8k|      for(size_t i = y_size; i != x_size; i++) {
  ------------------
  |  Branch (467:30): [True: 34.1k, False: 12.7k]
  ------------------
  468|  34.1k|         mask |= x[i];
  469|  34.1k|      }
  470|       |
  471|       |      // If any bits were set in high part of x, then x > y
  472|  12.7k|      result = CT::Mask<W>::is_zero(mask).select(result, GT);
  473|  12.7k|   }
  474|       |
  475|  2.57M|   CT::unpoison(result);
  476|  2.57M|   BOTAN_DEBUG_ASSERT(result == LT || result == GT || result == EQ);
  ------------------
  |  |  130|  2.57M|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  2.57M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 2.57M]
  |  |  ------------------
  ------------------
  477|  2.57M|   return static_cast<int32_t>(result);
  478|  2.57M|}
_ZN5Botan11bigint_sub2ITkNS_8WordTypeEmEET_PS1_mPKS1_m:
  148|  2.52M|inline constexpr auto bigint_sub2(W x[], size_t x_size, const W y[], size_t y_size) -> W {
  149|  2.52M|   W borrow = 0;
  150|       |
  151|  2.52M|   BOTAN_ASSERT(x_size >= y_size, "Expected sizes");
  ------------------
  |  |   64|  2.52M|   do {                                                                                 \
  |  |   65|  2.52M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|  2.52M|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 2.52M]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|  2.52M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 2.52M]
  |  |  ------------------
  ------------------
  152|       |
  153|  2.52M|   const size_t blocks = y_size - (y_size % 8);
  154|       |
  155|  3.64M|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (155:22): [True: 1.11M, False: 2.52M]
  ------------------
  156|  1.11M|      borrow = word8_sub2(x + i, y + i, borrow);
  157|  1.11M|   }
  158|       |
  159|  14.4M|   for(size_t i = blocks; i != y_size; ++i) {
  ------------------
  |  Branch (159:27): [True: 11.9M, False: 2.52M]
  ------------------
  160|  11.9M|      x[i] = word_sub(x[i], y[i], &borrow);
  161|  11.9M|   }
  162|       |
  163|  2.53M|   for(size_t i = y_size; i != x_size; ++i) {
  ------------------
  |  Branch (163:27): [True: 5.86k, False: 2.52M]
  ------------------
  164|  5.86k|      x[i] = word_sub(x[i], static_cast<W>(0), &borrow);
  165|  5.86k|   }
  166|       |
  167|  2.52M|   return borrow;
  168|  2.52M|}
_ZN5Botan15bigint_sub2_revITkNS_8WordTypeEmEEvPT_PKS1_m:
  174|  2.17k|inline constexpr void bigint_sub2_rev(W x[], const W y[], size_t y_size) {
  175|  2.17k|   W borrow = 0;
  176|       |
  177|  8.11k|   for(size_t i = 0; i != y_size; ++i) {
  ------------------
  |  Branch (177:22): [True: 5.93k, False: 2.17k]
  ------------------
  178|  5.93k|      x[i] = word_sub(y[i], x[i], &borrow);
  179|  5.93k|   }
  180|       |
  181|  2.17k|   BOTAN_ASSERT(borrow == 0, "y must be greater than x");
  ------------------
  |  |   64|  2.17k|   do {                                                                                 \
  |  |   65|  2.17k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|  2.17k|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 2.17k]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|  2.17k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 2.17k]
  |  |  ------------------
  ------------------
  182|  2.17k|}
_ZN5Botan11bigint_sub3ITkNS_8WordTypeEmEET_PS1_PKS1_mS4_m:
  192|  14.8M|inline constexpr auto bigint_sub3(W z[], const W x[], size_t x_size, const W y[], size_t y_size) -> W {
  193|  14.8M|   W borrow = 0;
  194|       |
  195|  14.8M|   BOTAN_ASSERT(x_size >= y_size, "Expected sizes");
  ------------------
  |  |   64|  14.8M|   do {                                                                                 \
  |  |   65|  14.8M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|  14.8M|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 14.8M]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|  14.8M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 14.8M]
  |  |  ------------------
  ------------------
  196|       |
  197|  14.8M|   const size_t blocks = y_size - (y_size % 8);
  198|       |
  199|  20.7M|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (199:22): [True: 5.87M, False: 14.8M]
  ------------------
  200|  5.87M|      borrow = word8_sub3(z + i, x + i, y + i, borrow);
  201|  5.87M|   }
  202|       |
  203|  57.4M|   for(size_t i = blocks; i != y_size; ++i) {
  ------------------
  |  Branch (203:27): [True: 42.5M, False: 14.8M]
  ------------------
  204|  42.5M|      z[i] = word_sub(x[i], y[i], &borrow);
  205|  42.5M|   }
  206|       |
  207|  23.7M|   for(size_t i = y_size; i != x_size; ++i) {
  ------------------
  |  Branch (207:27): [True: 8.89M, False: 14.8M]
  ------------------
  208|  8.89M|      z[i] = word_sub(x[i], static_cast<W>(0), &borrow);
  209|  8.89M|   }
  210|       |
  211|  14.8M|   return borrow;
  212|  14.8M|}
_ZN5Botan11bigint_add3ITkNS_8WordTypeEmEET_PS1_PKS1_mS4_m:
  120|  5.04M|inline constexpr auto bigint_add3(W z[], const W x[], size_t x_size, const W y[], size_t y_size) -> W {
  121|  5.04M|   if(x_size < y_size) {
  ------------------
  |  Branch (121:7): [True: 17.8k, False: 5.02M]
  ------------------
  122|  17.8k|      return bigint_add3(z, y, y_size, x, x_size);
  123|  17.8k|   }
  124|       |
  125|  5.02M|   W carry = 0;
  126|       |
  127|  5.02M|   const size_t blocks = y_size - (y_size % 8);
  128|       |
  129|  6.13M|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (129:22): [True: 1.10M, False: 5.02M]
  ------------------
  130|  1.10M|      carry = word8_add3(z + i, x + i, y + i, carry);
  131|  1.10M|   }
  132|       |
  133|  21.1M|   for(size_t i = blocks; i != y_size; ++i) {
  ------------------
  |  Branch (133:27): [True: 16.0M, False: 5.02M]
  ------------------
  134|  16.0M|      z[i] = word_add(x[i], y[i], &carry);
  135|  16.0M|   }
  136|       |
  137|  5.11M|   for(size_t i = y_size; i != x_size; ++i) {
  ------------------
  |  Branch (137:27): [True: 89.6k, False: 5.02M]
  ------------------
  138|  89.6k|      z[i] = word_add(x[i], static_cast<W>(0), &carry);
  139|  89.6k|   }
  140|       |
  141|  5.02M|   return carry;
  142|  5.04M|}
_ZN5Botan14bigint_cnd_addITkNS_8WordTypeEmEET_S1_PS1_PKS1_m:
   45|  4.75M|inline constexpr W bigint_cnd_add(W cnd, W x[], const W y[], size_t size) {
   46|  4.75M|   const auto mask = CT::Mask<W>::expand(cnd).value();
   47|       |
   48|  4.75M|   W carry = 0;
   49|       |
   50|  25.6M|   for(size_t i = 0; i != size; ++i) {
  ------------------
  |  Branch (50:22): [True: 20.8M, False: 4.75M]
  ------------------
   51|  20.8M|      x[i] = word_add(x[i], y[i] & mask, &carry);
   52|  20.8M|   }
   53|       |
   54|  4.75M|   return (mask & carry);
   55|  4.75M|}
_ZN5Botan14bigint_linmul3ITkNS_8WordTypeEmEEvPT_PKS1_mS1_:
  416|  46.5k|inline constexpr void bigint_linmul3(W z[], const W x[], size_t x_size, W y) {
  417|  46.5k|   const size_t blocks = x_size - (x_size % 8);
  418|       |
  419|  46.5k|   W carry = 0;
  420|       |
  421|  69.2k|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (421:22): [True: 22.7k, False: 46.5k]
  ------------------
  422|  22.7k|      carry = word8_linmul3(z + i, x + i, y, carry);
  423|  22.7k|   }
  424|       |
  425|   224k|   for(size_t i = blocks; i != x_size; ++i) {
  ------------------
  |  Branch (425:27): [True: 177k, False: 46.5k]
  ------------------
  426|   177k|      z[i] = word_madd2(x[i], y, &carry);
  427|   177k|   }
  428|       |
  429|  46.5k|   z[x_size] = carry;
  430|  46.5k|}
_ZN5Botan14bigint_linmul2ITkNS_8WordTypeEmEET_PS1_mS1_:
  405|  1.03M|[[nodiscard]] inline constexpr auto bigint_linmul2(W x[], size_t x_size, W y) -> W {
  406|  1.03M|   W carry = 0;
  407|       |
  408|  11.2M|   for(size_t i = 0; i != x_size; ++i) {
  ------------------
  |  Branch (408:22): [True: 10.2M, False: 1.03M]
  ------------------
  409|  10.2M|      x[i] = word_madd2(x[i], y, &carry);
  410|  10.2M|   }
  411|       |
  412|  1.03M|   return carry;
  413|  1.03M|}
_ZN5Botan14divide_precompImEC2Em:
  574|  19.1k|      explicit constexpr divide_precomp(W divisor) : m_divisor(divisor) {
  575|  19.1k|         BOTAN_ARG_CHECK(m_divisor != 0, "Division by zero");
  ------------------
  |  |   35|  19.1k|   do {                                                          \
  |  |   36|  19.1k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  19.1k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 19.1k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  19.1k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 19.1k]
  |  |  ------------------
  ------------------
  576|  19.1k|      }
_ZNK5Botan14divide_precompImE16vartime_mod_2to1Emm:
  644|  18.8k|      inline constexpr W vartime_mod_2to1(W n1, W n0) const {
  645|  18.8k|         BOTAN_ASSERT_NOMSG(n1 < m_divisor);
  ------------------
  |  |   77|  18.8k|   do {                                                                     \
  |  |   78|  18.8k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  18.8k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 18.8k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  18.8k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 18.8k]
  |  |  ------------------
  ------------------
  646|  18.8k|         W q = this->vartime_div_2to1(n1, n0);
  647|  18.8k|         W carry = 0;
  648|  18.8k|         q = word_madd2(q, m_divisor, &carry);
  649|  18.8k|         return (n0 - q);
  650|  18.8k|      }
_ZNK5Botan14divide_precompImE16vartime_div_2to1Emm:
  581|  88.0k|      inline constexpr W vartime_div_2to1(W n1, W n0) const {
  582|  88.0k|         BOTAN_ASSERT_NOMSG(n1 < m_divisor);
  ------------------
  |  |   77|  88.0k|   do {                                                                     \
  |  |   78|  88.0k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  88.0k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 88.0k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  88.0k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 88.0k]
  |  |  ------------------
  ------------------
  583|       |
  584|  88.0k|         if(m_divisor == WordInfo<W>::max) {
  ------------------
  |  Branch (584:13): [True: 40.1k, False: 47.8k]
  ------------------
  585|  40.1k|            return vartime_div_2to1_max_d(n1, n0);
  586|  40.1k|         }
  587|       |
  588|  47.8k|         if(m_divisor == WordInfo<W>::top_bit) {
  ------------------
  |  Branch (588:13): [True: 3.80k, False: 44.0k]
  ------------------
  589|       |            // Simply a shift by N-1 bits
  590|  3.80k|            return (n1 << 1) | (n0 >> (WordInfo<W>::bits - 1));
  591|  3.80k|         }
  592|       |
  593|  44.0k|         if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (593:13): [True: 44.0k, Folded]
  ------------------
  594|  44.0k|#if defined(BOTAN_MP_USE_X86_64_ASM)
  595|  44.0k|            if constexpr(std::same_as<W, uint64_t>) {
  596|  44.0k|               W quotient = 0;
  597|  44.0k|               W remainder = 0;
  598|       |               // NOLINTNEXTLINE(*-no-assembler)
  599|  44.0k|               asm("divq %[v]" : "=a"(quotient), "=d"(remainder) : [v] "r"(m_divisor), "a"(n0), "d"(n1) : "cc");
  600|  44.0k|               return quotient;
  601|  44.0k|            }
  602|      0|#endif
  603|       |
  604|      0|#if !defined(BOTAN_BUILD_COMPILER_IS_CLANGCL)
  605|       |
  606|       |            /* clang-cl has a bug where on encountering a 128/64 division it emits
  607|       |            * a call to __udivti3() but then fails to link the relevant builtin into
  608|       |            * the binary, causing a link failure. Work around this by simply omitting
  609|       |            * such code for clang-cl
  610|       |            *
  611|       |            * See https://github.com/llvm/llvm-project/issues/25679
  612|       |            */
  613|  44.0k|            if constexpr(WordInfo<W>::dword_is_native) {
  614|  44.0k|               typename WordInfo<W>::dword n = n1;
  615|  44.0k|               n <<= WordInfo<W>::bits;
  616|  44.0k|               n |= n0;
  617|  44.0k|               return static_cast<W>(n / m_divisor);
  618|  44.0k|            }
  619|  44.0k|#endif
  620|  44.0k|         }
  621|       |
  622|      0|         W high = n1;
  623|  44.0k|         W quotient = 0;
  624|       |
  625|  44.0k|         for(size_t i = 0; i != WordInfo<W>::bits; ++i) {
  ------------------
  |  Branch (625:28): [True: 0, False: 44.0k]
  ------------------
  626|      0|            const W high_top_bit = high >> (WordInfo<W>::bits - 1);
  627|       |
  628|      0|            high <<= 1;
  629|      0|            high |= (n0 >> (WordInfo<W>::bits - 1 - i)) & 1;
  630|      0|            quotient <<= 1;
  631|       |
  632|      0|            if(high_top_bit || high >= m_divisor) {
  ------------------
  |  Branch (632:16): [True: 0, False: 0]
  |  Branch (632:32): [True: 0, False: 0]
  ------------------
  633|      0|               high -= m_divisor;
  634|      0|               quotient |= 1;
  635|      0|            }
  636|      0|         }
  637|       |
  638|  44.0k|         return quotient;
  639|  47.8k|      }
_ZN5Botan14divide_precompImE22vartime_div_2to1_max_dEmm:
  657|  40.1k|      static inline constexpr W vartime_div_2to1_max_d(W n1, W n0) {
  658|       |         /*
  659|       |         Use k to refer to WordInfo<W>::bits
  660|       |
  661|       |         We are dividing n = (n1 * 2^k) + n0 by 2^k - 1
  662|       |
  663|       |         Recall that 2^k = 1 (mod 2^k - 1)
  664|       |
  665|       |         Rewrite n = n1*2^k + n0 as n1*(2^k - 1) + n1 + n0
  666|       |
  667|       |         The result of dividing n by (2^k - 1) will be equal to
  668|       |         (n1*(2^k-1) + n1 + n0) / (2^k-1) =
  669|       |         n1 + ((n1 + n0) / (2^k-1)
  670|       |
  671|       |         Use c to refer to ((n1 + n0) / (2^k-1))
  672|       |
  673|       |         If (n1 + n0) < (2^k - 1) then c is 0
  674|       |         If (n1 + n0) >= (2^k - 1) then c is 1
  675|       |
  676|       |         Since n1 < 2^k - 1 [*] and n0 <= 2^k - 1 it is impossible for (n1 + n0) / (2^k -1)
  677|       |         to be greater than 1.
  678|       |
  679|       |         [*] We require n1 be strictly less than the divisor to ensure that the
  680|       |         output fits in a single word; this is checked at the start of vartime_div_2to1.
  681|       |         */
  682|       |
  683|  40.1k|         const W s = n0 + n1;
  684|       |         // did n0 + n1 overflow? or does (n0 + n1) == 2^k - 1? if either, c == 1
  685|  40.1k|         if(s < n0 || s == WordInfo<W>::max) {
  ------------------
  |  Branch (685:13): [True: 5.44k, False: 34.7k]
  |  Branch (685:23): [True: 83, False: 34.6k]
  ------------------
  686|  5.52k|            n1 += 1;
  687|  5.52k|         }
  688|       |
  689|  40.1k|         return n1;
  690|  40.1k|      }
_ZN5Botan11bigint_shl1ITkNS_8WordTypeEmEEvPT_mmm:
  309|   260k|inline constexpr void bigint_shl1(W x[], size_t x_size, size_t x_words, size_t shift) {
  310|   260k|   const size_t word_shift = shift / WordInfo<W>::bits;
  311|   260k|   const size_t bit_shift = shift % WordInfo<W>::bits;
  312|       |
  313|   260k|   BOTAN_ASSERT_NOMSG(word_shift <= x_size);
  ------------------
  |  |   77|   260k|   do {                                                                     \
  |  |   78|   260k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|   260k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 260k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|   260k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 260k]
  |  |  ------------------
  ------------------
  314|   260k|   BOTAN_ASSERT_NOMSG(x_words <= x_size - word_shift);
  ------------------
  |  |   77|   260k|   do {                                                                     \
  |  |   78|   260k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|   260k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 260k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|   260k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 260k]
  |  |  ------------------
  ------------------
  315|       |
  316|   260k|   unchecked_copy_memory(x + word_shift, x, x_words);
  317|   260k|   zeroize_buffer(x, word_shift);
  318|       |
  319|   260k|   const auto carry_mask = CT::Mask<W>::expand(bit_shift);
  320|   260k|   const W carry_shift = carry_mask.if_set_return(WordInfo<W>::bits - bit_shift);
  321|       |
  322|   260k|   W carry = 0;
  323|  2.71M|   for(size_t i = word_shift; i != x_size; ++i) {
  ------------------
  |  Branch (323:31): [True: 2.45M, False: 260k]
  ------------------
  324|  2.45M|      const W w = x[i];
  325|  2.45M|      x[i] = (w << bit_shift) | carry;
  326|  2.45M|      carry = carry_mask.if_set_return(w >> carry_shift);
  327|  2.45M|   }
  328|   260k|}
_ZN5Botan11bigint_shr1ITkNS_8WordTypeEmEEvPT_mm:
  331|  1.69M|inline constexpr void bigint_shr1(W x[], size_t x_size, size_t shift) {
  332|  1.69M|   const size_t word_shift = shift / WordInfo<W>::bits;
  333|  1.69M|   const size_t bit_shift = shift % WordInfo<W>::bits;
  334|       |
  335|  1.69M|   const size_t top = x_size >= word_shift ? (x_size - word_shift) : 0;
  ------------------
  |  Branch (335:23): [True: 1.69M, False: 0]
  ------------------
  336|       |
  337|  1.69M|   if(top > 0) {
  ------------------
  |  Branch (337:7): [True: 1.69M, False: 0]
  ------------------
  338|  1.69M|      unchecked_copy_memory(x, x + word_shift, top);
  339|  1.69M|   }
  340|  1.69M|   zeroize_buffer(x + top, std::min(word_shift, x_size));
  341|       |
  342|  1.69M|   const auto carry_mask = CT::Mask<W>::expand(bit_shift);
  343|  1.69M|   const W carry_shift = carry_mask.if_set_return(WordInfo<W>::bits - bit_shift);
  344|       |
  345|  1.69M|   W carry = 0;
  346|       |
  347|  22.2M|   for(size_t i = 0; i != top; ++i) {
  ------------------
  |  Branch (347:22): [True: 20.5M, False: 1.69M]
  ------------------
  348|  20.5M|      const W w = x[top - i - 1];
  349|  20.5M|      x[top - i - 1] = (w >> bit_shift) | carry;
  350|  20.5M|      carry = carry_mask.if_set_return(w << carry_shift);
  351|  20.5M|   }
  352|  1.69M|}
_ZN5Botan17bigint_monty_redcEPmPKmS2_mmS0_m:
  924|  25.8M|   word r[], const word z[], const word p[], size_t p_size, word p_dash, word ws[], size_t ws_size) {
  925|  25.8M|   const size_t z_size = 2 * p_size;
  926|       |
  927|  25.8M|   BOTAN_ARG_CHECK(ws_size >= p_size, "Montgomery reduction workspace too small");
  ------------------
  |  |   35|  25.8M|   do {                                                          \
  |  |   36|  25.8M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  25.8M|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 25.8M]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  25.8M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 25.8M]
  |  |  ------------------
  ------------------
  928|       |
  929|  25.8M|   if(p_size == 4) {
  ------------------
  |  Branch (929:7): [True: 13.3M, False: 12.5M]
  ------------------
  930|  13.3M|      bigint_monty_redc_4(r, z, p, p_dash, ws);
  931|  13.3M|   } else if(p_size == 6) {
  ------------------
  |  Branch (931:14): [True: 11.2k, False: 12.5M]
  ------------------
  932|  11.2k|      bigint_monty_redc_6(r, z, p, p_dash, ws);
  933|  12.5M|   } else if(p_size == 8) {
  ------------------
  |  Branch (933:14): [True: 878, False: 12.5M]
  ------------------
  934|    878|      bigint_monty_redc_8(r, z, p, p_dash, ws);
  935|  12.5M|   } else if(p_size == 12) {
  ------------------
  |  Branch (935:14): [True: 0, False: 12.5M]
  ------------------
  936|      0|      bigint_monty_redc_12(r, z, p, p_dash, ws);
  937|  12.5M|   } else if(p_size == 16) {
  ------------------
  |  Branch (937:14): [True: 0, False: 12.5M]
  ------------------
  938|      0|      bigint_monty_redc_16(r, z, p, p_dash, ws);
  939|  12.5M|   } else if(p_size == 24) {
  ------------------
  |  Branch (939:14): [True: 0, False: 12.5M]
  ------------------
  940|      0|      bigint_monty_redc_24(r, z, p, p_dash, ws);
  941|  12.5M|   } else if(p_size == 32) {
  ------------------
  |  Branch (941:14): [True: 0, False: 12.5M]
  ------------------
  942|      0|      bigint_monty_redc_32(r, z, p, p_dash, ws);
  943|  12.5M|   } else {
  944|  12.5M|      bigint_monty_redc_generic(r, z, z_size, p, p_size, p_dash, ws);
  945|  12.5M|   }
  946|  25.8M|}
_ZN5Botan25bigint_monty_redc_inplaceEPmPKmmmS0_m:
  948|  12.2M|inline void bigint_monty_redc_inplace(word z[], const word p[], size_t p_size, word p_dash, word ws[], size_t ws_size) {
  949|  12.2M|   bigint_monty_redc(z, z, p, p_size, p_dash, ws, ws_size);
  950|  12.2M|   zeroize_buffer(z + p_size, p_size);
  951|  12.2M|}
_ZN5Botan11bigint_shl2ITkNS_8WordTypeEmEEvPT_mPKS1_mm:
  355|  14.4k|inline constexpr void bigint_shl2(W y[], size_t y_size, const W x[], size_t x_size, size_t shift) {
  356|  14.4k|   const size_t word_shift = shift / WordInfo<W>::bits;
  357|  14.4k|   const size_t bit_shift = shift % WordInfo<W>::bits;
  358|       |
  359|  14.4k|   BOTAN_ASSERT_NOMSG(word_shift <= y_size);
  ------------------
  |  |   77|  14.4k|   do {                                                                     \
  |  |   78|  14.4k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  14.4k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 14.4k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  14.4k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 14.4k]
  |  |  ------------------
  ------------------
  360|  14.4k|   BOTAN_ASSERT_NOMSG(x_size < y_size - word_shift);
  ------------------
  |  |   77|  14.4k|   do {                                                                     \
  |  |   78|  14.4k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  14.4k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 14.4k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  14.4k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 14.4k]
  |  |  ------------------
  ------------------
  361|       |
  362|  14.4k|   unchecked_copy_memory(y + word_shift, x, x_size);
  363|  14.4k|   zeroize_buffer(y, word_shift);
  364|  14.4k|   zeroize_buffer(y + word_shift + x_size, y_size - word_shift - x_size);
  365|       |
  366|  14.4k|   const auto carry_mask = CT::Mask<W>::expand(bit_shift);
  367|  14.4k|   const W carry_shift = carry_mask.if_set_return(WordInfo<W>::bits - bit_shift);
  368|       |
  369|  14.4k|   W carry = 0;
  370|   102k|   for(size_t i = word_shift; i != x_size + word_shift + 1; ++i) {
  ------------------
  |  Branch (370:31): [True: 88.1k, False: 14.4k]
  ------------------
  371|  88.1k|      const W w = y[i];
  372|  88.1k|      y[i] = (w << bit_shift) | carry;
  373|  88.1k|      carry = carry_mask.if_set_return(w >> carry_shift);
  374|  88.1k|   }
  375|  14.4k|}
_ZN5Botan11bigint_shr2ITkNS_8WordTypeEmEEvPT_mPKS1_mm:
  378|  1.38k|inline constexpr void bigint_shr2(W y[], size_t y_size, const W x[], size_t x_size, size_t shift) {
  379|  1.38k|   const size_t word_shift = shift / WordInfo<W>::bits;
  380|  1.38k|   const size_t bit_shift = shift % WordInfo<W>::bits;
  381|  1.38k|   const size_t new_size = x_size < word_shift ? 0 : (x_size - word_shift);
  ------------------
  |  Branch (381:28): [True: 0, False: 1.38k]
  ------------------
  382|       |
  383|  1.38k|   BOTAN_ASSERT_NOMSG(new_size <= y_size);
  ------------------
  |  |   77|  1.38k|   do {                                                                     \
  |  |   78|  1.38k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  1.38k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 1.38k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  1.38k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 1.38k]
  |  |  ------------------
  ------------------
  384|       |
  385|  1.38k|   if(new_size > 0) {
  ------------------
  |  Branch (385:7): [True: 1.38k, False: 0]
  ------------------
  386|  1.38k|      unchecked_copy_memory(y, x + word_shift, new_size);
  387|  1.38k|   }
  388|  1.38k|   zeroize_buffer(y + new_size, y_size - new_size);
  389|       |
  390|  1.38k|   const auto carry_mask = CT::Mask<W>::expand(bit_shift);
  391|  1.38k|   const W carry_shift = carry_mask.if_set_return(WordInfo<W>::bits - bit_shift);
  392|       |
  393|  1.38k|   W carry = 0;
  394|  8.33k|   for(size_t i = new_size; i > 0; --i) {
  ------------------
  |  Branch (394:29): [True: 6.95k, False: 1.38k]
  ------------------
  395|  6.95k|      W w = y[i - 1];
  396|  6.95k|      y[i - 1] = (w >> bit_shift) | carry;
  397|  6.95k|      carry = carry_mask.if_set_return(w << carry_shift);
  398|  6.95k|   }
  399|  1.38k|}
_ZN5Botan15bigint_ct_is_eqITkNS_8WordTypeEmEENS_2CT4MaskIT_EEPKS3_mS6_m:
  519|  31.5k|inline constexpr auto bigint_ct_is_eq(const W x[], size_t x_size, const W y[], size_t y_size) -> CT::Mask<W> {
  520|  31.5k|   const size_t common_elems = std::min(x_size, y_size);
  521|       |
  522|  31.5k|   W diff = 0;
  523|       |
  524|   337k|   for(size_t i = 0; i != common_elems; i++) {
  ------------------
  |  Branch (524:22): [True: 305k, False: 31.5k]
  ------------------
  525|   305k|      diff |= (x[i] ^ y[i]);
  526|   305k|   }
  527|       |
  528|       |   // If any bits were set in high part of x/y, then they are not equal
  529|  31.5k|   if(x_size < y_size) {
  ------------------
  |  Branch (529:7): [True: 235, False: 31.2k]
  ------------------
  530|  1.69k|      for(size_t i = x_size; i != y_size; i++) {
  ------------------
  |  Branch (530:30): [True: 1.46k, False: 235]
  ------------------
  531|  1.46k|         diff |= y[i];
  532|  1.46k|      }
  533|  31.2k|   } else if(y_size < x_size) {
  ------------------
  |  Branch (533:14): [True: 21.9k, False: 9.34k]
  ------------------
  534|   129k|      for(size_t i = y_size; i != x_size; i++) {
  ------------------
  |  Branch (534:30): [True: 107k, False: 21.9k]
  ------------------
  535|   107k|         diff |= x[i];
  536|   107k|      }
  537|  21.9k|   }
  538|       |
  539|  31.5k|   return CT::Mask<W>::is_zero(diff);
  540|  31.5k|}
_ZN5Botan15bigint_ct_is_ltITkNS_8WordTypeEmEENS_2CT4MaskIT_EEPKS3_mS6_mb:
  487|  2.23M|   -> CT::Mask<W> {
  488|  2.23M|   const size_t common_elems = std::min(x_size, y_size);
  489|       |
  490|  2.23M|   auto is_lt = CT::Mask<W>::expand(lt_or_equal);
  491|       |
  492|  16.1M|   for(size_t i = 0; i != common_elems; i++) {
  ------------------
  |  Branch (492:22): [True: 13.9M, False: 2.23M]
  ------------------
  493|  13.9M|      const auto eq = CT::Mask<W>::is_equal(x[i], y[i]);
  494|  13.9M|      const auto lt = CT::Mask<W>::is_lt(x[i], y[i]);
  495|  13.9M|      is_lt = eq.select_mask(is_lt, lt);
  496|  13.9M|   }
  497|       |
  498|  2.23M|   if(x_size < y_size) {
  ------------------
  |  Branch (498:7): [True: 53.5k, False: 2.17M]
  ------------------
  499|  53.5k|      W mask = 0;
  500|   112k|      for(size_t i = x_size; i != y_size; i++) {
  ------------------
  |  Branch (500:30): [True: 58.5k, False: 53.5k]
  ------------------
  501|  58.5k|         mask |= y[i];
  502|  58.5k|      }
  503|       |      // If any bits were set in high part of y, then is_lt should be forced true
  504|  53.5k|      is_lt |= CT::Mask<W>::expand(mask);
  505|  2.17M|   } else if(y_size < x_size) {
  ------------------
  |  Branch (505:14): [True: 2.15M, False: 19.6k]
  ------------------
  506|  2.15M|      W mask = 0;
  507|  24.7M|      for(size_t i = y_size; i != x_size; i++) {
  ------------------
  |  Branch (507:30): [True: 22.5M, False: 2.15M]
  ------------------
  508|  22.5M|         mask |= x[i];
  509|  22.5M|      }
  510|       |
  511|       |      // If any bits were set in high part of x, then is_lt should be false
  512|  2.15M|      is_lt &= CT::Mask<W>::is_zero(mask);
  513|  2.15M|   }
  514|       |
  515|  2.23M|   return is_lt;
  516|  2.23M|}
_ZN5Botan15bigint_cnd_swapITkNS_8WordTypeEmEEvT_PS1_S2_m:
   29|   651k|inline constexpr void bigint_cnd_swap(W cnd, W x[], W y[], size_t size) {
   30|   651k|   const auto mask = CT::Mask<W>::expand(cnd);
   31|       |
   32|  3.82M|   for(size_t i = 0; i != size; ++i) {
  ------------------
  |  Branch (32:22): [True: 3.17M, False: 651k]
  ------------------
   33|  3.17M|      const W a = x[i];
   34|  3.17M|      const W b = y[i];
   35|  3.17M|      x[i] = mask.select(b, a);
   36|  3.17M|      y[i] = mask.select(a, b);
   37|  3.17M|   }
   38|   651k|}
_ZN5Botan14bigint_sub_absITkNS_8WordTypeEmEENS_2CT4MaskIT_EEPS3_PKS3_S7_mS5_:
  279|  2.47M|inline constexpr auto bigint_sub_abs(W z[], const W x[], const W y[], size_t N, W ws[]) -> CT::Mask<W> {
  280|       |   // Subtract in both direction then conditional copy out the result
  281|       |
  282|  2.47M|   W* ws0 = ws;
  283|  2.47M|   W* ws1 = ws + N;
  284|       |
  285|  2.47M|   W borrow0 = 0;
  286|  2.47M|   W borrow1 = 0;
  287|       |
  288|  2.47M|   const size_t blocks = N - (N % 8);
  289|       |
  290|  3.52M|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (290:22): [True: 1.05M, False: 2.47M]
  ------------------
  291|  1.05M|      borrow0 = word8_sub3(ws0 + i, x + i, y + i, borrow0);
  292|  1.05M|      borrow1 = word8_sub3(ws1 + i, y + i, x + i, borrow1);
  293|  1.05M|   }
  294|       |
  295|  11.9M|   for(size_t i = blocks; i != N; ++i) {
  ------------------
  |  Branch (295:27): [True: 9.48M, False: 2.47M]
  ------------------
  296|  9.48M|      ws0[i] = word_sub(x[i], y[i], &borrow0);
  297|  9.48M|      ws1[i] = word_sub(y[i], x[i], &borrow1);
  298|  9.48M|   }
  299|       |
  300|  2.47M|   return CT::conditional_copy_mem(borrow0, z, ws1, ws0, N);
  301|  2.47M|}
_ZN5Botan14bigint_cnd_subITkNS_8WordTypeEmEET_S1_PS1_PKS1_m:
   62|   802k|inline constexpr auto bigint_cnd_sub(W cnd, W x[], const W y[], size_t size) -> W {
   63|   802k|   const auto mask = CT::Mask<W>::expand(cnd).value();
   64|       |
   65|   802k|   W carry = 0;
   66|       |
   67|  4.26M|   for(size_t i = 0; i != size; ++i) {
  ------------------
  |  Branch (67:22): [True: 3.46M, False: 802k]
  ------------------
   68|  3.46M|      x[i] = word_sub(x[i], y[i] & mask, &carry);
   69|  3.46M|   }
   70|       |
   71|   802k|   return (mask & carry);
   72|   802k|}
_ZN5Botan14bigint_cnd_absITkNS_8WordTypeEmEEvT_PS1_m:
   80|   401k|inline constexpr void bigint_cnd_abs(W cnd, W x[], size_t size) {
   81|   401k|   const auto mask = CT::Mask<W>::expand(cnd);
   82|       |
   83|   401k|   W carry = mask.if_set_return(1);
   84|  2.13M|   for(size_t i = 0; i != size; ++i) {
  ------------------
  |  Branch (84:22): [True: 1.73M, False: 401k]
  ------------------
   85|  1.73M|      const W z = word_add(~x[i], static_cast<W>(0), &carry);
   86|  1.73M|      x[i] = mask.select(z, x[i]);
   87|  1.73M|   }
   88|   401k|}
_ZN5Botan13monty_inverseITkNS_8WordTypeEmEET_S1_:
  703|  5.33k|inline constexpr auto monty_inverse(W a) -> W {
  704|  5.33k|   BOTAN_ARG_CHECK(a % 2 == 1, "Cannot compute Montgomery inverse of an even integer");
  ------------------
  |  |   35|  5.33k|   do {                                                          \
  |  |   36|  5.33k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  5.33k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 5.33k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  5.33k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 5.33k]
  |  |  ------------------
  ------------------
  705|       |
  706|       |   // Newton's Method, following https://lemire.me/blog/2017/09/18/computing-the-inverse-of-odd-integers/
  707|       |
  708|  5.33k|   constexpr size_t iter = WordInfo<W>::bits == 64 ? 4 : 3;
  ------------------
  |  Branch (708:28): [True: 0, Folded]
  ------------------
  709|       |
  710|       |   // Initial guess provides 5 bits of accuracy
  711|  5.33k|   W r = (3 * a) ^ 2;
  712|       |
  713|       |   // Each iteration doubles the accuracy
  714|  26.6k|   for(size_t i = 0; i != iter; ++i) {
  ------------------
  |  Branch (714:22): [True: 21.3k, False: 5.33k]
  ------------------
  715|  21.3k|      r = r * (2 - r * a);
  716|  21.3k|   }
  717|       |
  718|       |   // Now invert in addition space
  719|  5.33k|   r = (WordInfo<W>::max - r) + 1;
  720|       |
  721|  5.33k|   return r;
  722|  5.33k|}
_ZN5Botan22bigint_monty_maybe_subITkNS_8WordTypeEmEEvmPT_S1_PKS1_S4_:
  225|  16.6M|inline constexpr void bigint_monty_maybe_sub(size_t N, W z[], W x0, const W x[], const W p[]) {
  226|  16.6M|   W borrow = 0;
  227|       |
  228|  16.6M|   const size_t blocks = N - (N % 8);
  229|       |
  230|  20.8M|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (230:22): [True: 4.19M, False: 16.6M]
  ------------------
  231|  4.19M|      borrow = word8_sub3(z + i, x + i, p + i, borrow);
  232|  4.19M|   }
  233|       |
  234|  67.0M|   for(size_t i = blocks; i != N; ++i) {
  ------------------
  |  Branch (234:27): [True: 50.4M, False: 16.6M]
  ------------------
  235|  50.4M|      z[i] = word_sub(x[i], p[i], &borrow);
  236|  50.4M|   }
  237|       |
  238|  16.6M|   borrow = (x0 - borrow) > x0;
  239|       |
  240|  16.6M|   CT::conditional_assign_mem(borrow, z, x, N);
  241|  16.6M|}
_ZN5Botan9comba_sqrILm4ETkNS_8WordTypeEmEEvPT0_PKS1_:
  854|   257k|constexpr inline void comba_sqr(W z[2 * N], const W x[N]) {
  855|   257k|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (855:7): [True: 257k, Folded]
  ------------------
  856|   257k|      if constexpr(std::same_as<W, word> && N == 4) {
  857|   257k|         return bigint_comba_sqr4(z, x);
  858|   257k|      }
  859|       |      if constexpr(std::same_as<W, word> && N == 6) {
  860|       |         return bigint_comba_sqr6(z, x);
  861|       |      }
  862|       |      if constexpr(std::same_as<W, word> && N == 7) {
  863|       |         return bigint_comba_sqr7(z, x);
  864|       |      }
  865|       |      if constexpr(std::same_as<W, word> && N == 8) {
  866|       |         return bigint_comba_sqr8(z, x);
  867|       |      }
  868|       |      if constexpr(std::same_as<W, word> && N == 9) {
  869|       |         return bigint_comba_sqr9(z, x);
  870|       |      }
  871|       |      if constexpr(std::same_as<W, word> && N == 16) {
  872|       |         return bigint_comba_sqr16(z, x);
  873|       |      }
  874|   257k|   }
  875|       |
  876|      0|   word3<W> accum;
  877|       |
  878|   257k|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (878:22): [True: 0, False: 257k]
  ------------------
  879|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (879:28): [True: 0, False: 0]
  ------------------
  880|      0|      const size_t end = std::min(N, i + 1);
  881|       |
  882|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (882:29): [True: 0, False: 0]
  ------------------
  883|      0|         accum.mul(x[j], x[i - j]);
  884|      0|      }
  885|      0|      z[i] = accum.extract();
  886|      0|   }
  887|   257k|}
_ZN5Botan22bigint_monty_maybe_subILm4ETkNS_8WordTypeEmEEvPT0_S1_PKS1_S4_:
  254|  13.5M|inline constexpr void bigint_monty_maybe_sub(W z[N], W x0, const W x[N], const W y[N]) {
  255|  13.5M|   W borrow = 0;
  256|       |
  257|  67.5M|   for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (257:22): [True: 54.0M, False: 13.5M]
  ------------------
  258|  54.0M|      z[i] = word_sub(x[i], y[i], &borrow);
  259|  54.0M|   }
  260|       |
  261|  13.5M|   borrow = (x0 - borrow) > x0;
  262|       |
  263|  13.5M|   CT::conditional_assign_mem(borrow, z, x, N);
  264|  13.5M|}
_ZN5Botan9comba_mulILm4ETkNS_8WordTypeEmEEvPT0_PKS1_S4_:
  818|   296k|constexpr inline void comba_mul(W z[2 * N], const W x[N], const W y[N]) {
  819|   296k|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (819:7): [True: 296k, Folded]
  ------------------
  820|   296k|      if constexpr(std::same_as<W, word> && N == 4) {
  821|   296k|         return bigint_comba_mul4(z, x, y);
  822|   296k|      }
  823|       |      if constexpr(std::same_as<W, word> && N == 6) {
  824|       |         return bigint_comba_mul6(z, x, y);
  825|       |      }
  826|       |      if constexpr(std::same_as<W, word> && N == 7) {
  827|       |         return bigint_comba_mul7(z, x, y);
  828|       |      }
  829|       |      if constexpr(std::same_as<W, word> && N == 8) {
  830|       |         return bigint_comba_mul8(z, x, y);
  831|       |      }
  832|       |      if constexpr(std::same_as<W, word> && N == 9) {
  833|       |         return bigint_comba_mul9(z, x, y);
  834|       |      }
  835|       |      if constexpr(std::same_as<W, word> && N == 16) {
  836|       |         return bigint_comba_mul16(z, x, y);
  837|       |      }
  838|   296k|   }
  839|       |
  840|      0|   word3<W> accum;
  841|       |
  842|   296k|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (842:22): [True: 0, False: 296k]
  ------------------
  843|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (843:28): [True: 0, False: 0]
  ------------------
  844|      0|      const size_t end = std::min(N, i + 1);
  845|       |
  846|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (846:29): [True: 0, False: 0]
  ------------------
  847|      0|         accum.mul(x[j], y[i - j]);
  848|      0|      }
  849|      0|      z[i] = accum.extract();
  850|      0|   }
  851|   296k|}
_ZN5Botan10shift_leftILm1ETkNS_8WordTypeEmLm4EEET0_RNSt3__15arrayIS1_XT1_EEE:
  725|  25.8k|inline constexpr W shift_left(std::array<W, N>& x) {
  726|  25.8k|   static_assert(N >= 1, "Invalid input size");
  727|  25.8k|   static_assert(S > 0, "Zero shift not supported");
  728|  25.8k|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  729|       |
  730|  25.8k|   const W carry = x[N - 1] >> (WordInfo<W>::bits - S);
  731|       |
  732|   103k|   for(size_t i = N - 1; i != 0; --i) {
  ------------------
  |  Branch (732:26): [True: 77.5k, False: 25.8k]
  ------------------
  733|  77.5k|      x[i] = (x[i] << S) | (x[i - 1] >> (WordInfo<W>::bits - S));
  734|  77.5k|   }
  735|  25.8k|   x[0] <<= S;
  736|       |
  737|  25.8k|   return carry;
  738|  25.8k|}
_ZN5Botan16read_window_bitsILm4EmLm4EEEmNSt3__14spanIKT0_XT1_EEEm:
 1071|  6.65k|constexpr size_t read_window_bits(std::span<const W, N> words, size_t offset) {
 1072|  6.65k|   static_assert(WindowBits >= 1 && WindowBits <= 7);
 1073|       |
 1074|  6.65k|   constexpr uint8_t WindowMask = static_cast<uint8_t>(1 << WindowBits) - 1;
 1075|       |
 1076|  6.65k|   constexpr size_t W_bits = sizeof(W) * 8;
 1077|  6.65k|   const auto bit_shift = offset % W_bits;
 1078|  6.65k|   const auto word_offset = words.size() - 1 - (offset / W_bits);
 1079|       |
 1080|  6.65k|   const bool single_byte_window = bit_shift <= (W_bits - WindowBits) || word_offset == 0;
  ------------------
  |  Branch (1080:36): [True: 6.65k, False: 0]
  |  Branch (1080:74): [True: 0, False: 0]
  ------------------
 1081|       |
 1082|  6.65k|   const auto w0 = words[word_offset];
 1083|       |
 1084|  6.65k|   if(single_byte_window) {
  ------------------
  |  Branch (1084:7): [True: 6.65k, False: 0]
  ------------------
 1085|  6.65k|      return (w0 >> bit_shift) & WindowMask;
 1086|  6.65k|   } else {
 1087|       |      // Otherwise we must join two words and extract the result
 1088|      0|      const auto w1 = words[word_offset - 1];
 1089|      0|      const auto combined = ((w0 >> bit_shift) | (w1 << (W_bits - bit_shift)));
 1090|      0|      return combined & WindowMask;
 1091|      0|   }
 1092|  6.65k|}
_ZN5Botan11shift_rightILm1ETkNS_8WordTypeEmLm4EEET0_RNSt3__15arrayIS1_XT1_EEE:
  741|  2.86k|inline constexpr W shift_right(std::array<W, N>& x) {
  742|  2.86k|   static_assert(N >= 1, "Invalid input size");
  743|  2.86k|   static_assert(S > 0, "Zero shift not supported");
  744|  2.86k|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  745|       |
  746|  2.86k|   const W carry = x[0] << (WordInfo<W>::bits - S);
  747|       |
  748|  11.4k|   for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (748:22): [True: 8.59k, False: 2.86k]
  ------------------
  749|  8.59k|      x[i] = (x[i] >> S) | (x[i + 1] << (WordInfo<W>::bits - S));
  750|  8.59k|   }
  751|  2.86k|   x[N - 1] >>= S;
  752|       |
  753|  2.86k|   return carry;
  754|  2.86k|}
_ZN5Botan16read_window_bitsILm7EhLm18446744073709551615EEEmNSt3__14spanIKT0_XT1_EEEm:
 1071|  91.0k|constexpr size_t read_window_bits(std::span<const W, N> words, size_t offset) {
 1072|  91.0k|   static_assert(WindowBits >= 1 && WindowBits <= 7);
 1073|       |
 1074|  91.0k|   constexpr uint8_t WindowMask = static_cast<uint8_t>(1 << WindowBits) - 1;
 1075|       |
 1076|  91.0k|   constexpr size_t W_bits = sizeof(W) * 8;
 1077|  91.0k|   const auto bit_shift = offset % W_bits;
 1078|  91.0k|   const auto word_offset = words.size() - 1 - (offset / W_bits);
 1079|       |
 1080|  91.0k|   const bool single_byte_window = bit_shift <= (W_bits - WindowBits) || word_offset == 0;
  ------------------
  |  Branch (1080:36): [True: 23.5k, False: 67.4k]
  |  Branch (1080:74): [True: 1.44k, False: 66.0k]
  ------------------
 1081|       |
 1082|  91.0k|   const auto w0 = words[word_offset];
 1083|       |
 1084|  91.0k|   if(single_byte_window) {
  ------------------
  |  Branch (1084:7): [True: 25.0k, False: 66.0k]
  ------------------
 1085|  25.0k|      return (w0 >> bit_shift) & WindowMask;
 1086|  66.0k|   } else {
 1087|       |      // Otherwise we must join two words and extract the result
 1088|  66.0k|      const auto w1 = words[word_offset - 1];
 1089|  66.0k|      const auto combined = ((w0 >> bit_shift) | (w1 << (W_bits - bit_shift)));
 1090|  66.0k|      return combined & WindowMask;
 1091|  66.0k|   }
 1092|  91.0k|}
_ZN5Botan9comba_sqrILm6ETkNS_8WordTypeEmEEvPT0_PKS1_:
  854|   236k|constexpr inline void comba_sqr(W z[2 * N], const W x[N]) {
  855|   236k|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (855:7): [True: 236k, Folded]
  ------------------
  856|       |      if constexpr(std::same_as<W, word> && N == 4) {
  857|       |         return bigint_comba_sqr4(z, x);
  858|       |      }
  859|   236k|      if constexpr(std::same_as<W, word> && N == 6) {
  860|   236k|         return bigint_comba_sqr6(z, x);
  861|   236k|      }
  862|       |      if constexpr(std::same_as<W, word> && N == 7) {
  863|       |         return bigint_comba_sqr7(z, x);
  864|       |      }
  865|       |      if constexpr(std::same_as<W, word> && N == 8) {
  866|       |         return bigint_comba_sqr8(z, x);
  867|       |      }
  868|       |      if constexpr(std::same_as<W, word> && N == 9) {
  869|       |         return bigint_comba_sqr9(z, x);
  870|       |      }
  871|       |      if constexpr(std::same_as<W, word> && N == 16) {
  872|       |         return bigint_comba_sqr16(z, x);
  873|       |      }
  874|   236k|   }
  875|       |
  876|      0|   word3<W> accum;
  877|       |
  878|   236k|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (878:22): [True: 0, False: 236k]
  ------------------
  879|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (879:28): [True: 0, False: 0]
  ------------------
  880|      0|      const size_t end = std::min(N, i + 1);
  881|       |
  882|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (882:29): [True: 0, False: 0]
  ------------------
  883|      0|         accum.mul(x[j], x[i - j]);
  884|      0|      }
  885|      0|      z[i] = accum.extract();
  886|      0|   }
  887|   236k|}
_ZN5Botan22bigint_monty_maybe_subILm6ETkNS_8WordTypeEmEEvPT0_S1_PKS1_S4_:
  254|   307k|inline constexpr void bigint_monty_maybe_sub(W z[N], W x0, const W x[N], const W y[N]) {
  255|   307k|   W borrow = 0;
  256|       |
  257|  2.15M|   for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (257:22): [True: 1.84M, False: 307k]
  ------------------
  258|  1.84M|      z[i] = word_sub(x[i], y[i], &borrow);
  259|  1.84M|   }
  260|       |
  261|   307k|   borrow = (x0 - borrow) > x0;
  262|       |
  263|   307k|   CT::conditional_assign_mem(borrow, z, x, N);
  264|   307k|}
_ZN5Botan9comba_mulILm6ETkNS_8WordTypeEmEEvPT0_PKS1_S4_:
  818|   267k|constexpr inline void comba_mul(W z[2 * N], const W x[N], const W y[N]) {
  819|   267k|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (819:7): [True: 267k, Folded]
  ------------------
  820|       |      if constexpr(std::same_as<W, word> && N == 4) {
  821|       |         return bigint_comba_mul4(z, x, y);
  822|       |      }
  823|   267k|      if constexpr(std::same_as<W, word> && N == 6) {
  824|   267k|         return bigint_comba_mul6(z, x, y);
  825|   267k|      }
  826|       |      if constexpr(std::same_as<W, word> && N == 7) {
  827|       |         return bigint_comba_mul7(z, x, y);
  828|       |      }
  829|       |      if constexpr(std::same_as<W, word> && N == 8) {
  830|       |         return bigint_comba_mul8(z, x, y);
  831|       |      }
  832|       |      if constexpr(std::same_as<W, word> && N == 9) {
  833|       |         return bigint_comba_mul9(z, x, y);
  834|       |      }
  835|       |      if constexpr(std::same_as<W, word> && N == 16) {
  836|       |         return bigint_comba_mul16(z, x, y);
  837|       |      }
  838|   267k|   }
  839|       |
  840|      0|   word3<W> accum;
  841|       |
  842|   267k|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (842:22): [True: 0, False: 267k]
  ------------------
  843|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (843:28): [True: 0, False: 0]
  ------------------
  844|      0|      const size_t end = std::min(N, i + 1);
  845|       |
  846|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (846:29): [True: 0, False: 0]
  ------------------
  847|      0|         accum.mul(x[j], y[i - j]);
  848|      0|      }
  849|      0|      z[i] = accum.extract();
  850|      0|   }
  851|   267k|}
_ZN5Botan10shift_leftILm1ETkNS_8WordTypeEmLm6EEET0_RNSt3__15arrayIS1_XT1_EEE:
  725|  19.8k|inline constexpr W shift_left(std::array<W, N>& x) {
  726|  19.8k|   static_assert(N >= 1, "Invalid input size");
  727|  19.8k|   static_assert(S > 0, "Zero shift not supported");
  728|  19.8k|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  729|       |
  730|  19.8k|   const W carry = x[N - 1] >> (WordInfo<W>::bits - S);
  731|       |
  732|   119k|   for(size_t i = N - 1; i != 0; --i) {
  ------------------
  |  Branch (732:26): [True: 99.2k, False: 19.8k]
  ------------------
  733|  99.2k|      x[i] = (x[i] << S) | (x[i - 1] >> (WordInfo<W>::bits - S));
  734|  99.2k|   }
  735|  19.8k|   x[0] <<= S;
  736|       |
  737|  19.8k|   return carry;
  738|  19.8k|}
_ZN5Botan16read_window_bitsILm5EmLm6EEEmNSt3__14spanIKT0_XT1_EEEm:
 1071|  12.7k|constexpr size_t read_window_bits(std::span<const W, N> words, size_t offset) {
 1072|  12.7k|   static_assert(WindowBits >= 1 && WindowBits <= 7);
 1073|       |
 1074|  12.7k|   constexpr uint8_t WindowMask = static_cast<uint8_t>(1 << WindowBits) - 1;
 1075|       |
 1076|  12.7k|   constexpr size_t W_bits = sizeof(W) * 8;
 1077|  12.7k|   const auto bit_shift = offset % W_bits;
 1078|  12.7k|   const auto word_offset = words.size() - 1 - (offset / W_bits);
 1079|       |
 1080|  12.7k|   const bool single_byte_window = bit_shift <= (W_bits - WindowBits) || word_offset == 0;
  ------------------
  |  Branch (1080:36): [True: 11.8k, False: 825]
  |  Branch (1080:74): [True: 165, False: 660]
  ------------------
 1081|       |
 1082|  12.7k|   const auto w0 = words[word_offset];
 1083|       |
 1084|  12.7k|   if(single_byte_window) {
  ------------------
  |  Branch (1084:7): [True: 12.0k, False: 660]
  ------------------
 1085|  12.0k|      return (w0 >> bit_shift) & WindowMask;
 1086|  12.0k|   } else {
 1087|       |      // Otherwise we must join two words and extract the result
 1088|    660|      const auto w1 = words[word_offset - 1];
 1089|    660|      const auto combined = ((w0 >> bit_shift) | (w1 << (W_bits - bit_shift)));
 1090|    660|      return combined & WindowMask;
 1091|    660|   }
 1092|  12.7k|}
_ZN5Botan11shift_rightILm1ETkNS_8WordTypeEmLm6EEET0_RNSt3__15arrayIS1_XT1_EEE:
  741|  2.21k|inline constexpr W shift_right(std::array<W, N>& x) {
  742|  2.21k|   static_assert(N >= 1, "Invalid input size");
  743|  2.21k|   static_assert(S > 0, "Zero shift not supported");
  744|  2.21k|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  745|       |
  746|  2.21k|   const W carry = x[0] << (WordInfo<W>::bits - S);
  747|       |
  748|  13.2k|   for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (748:22): [True: 11.0k, False: 2.21k]
  ------------------
  749|  11.0k|      x[i] = (x[i] >> S) | (x[i + 1] << (WordInfo<W>::bits - S));
  750|  11.0k|   }
  751|  2.21k|   x[N - 1] >>= S;
  752|       |
  753|  2.21k|   return carry;
  754|  2.21k|}
_ZN5Botan9comba_sqrILm8ETkNS_8WordTypeEmEEvPT0_PKS1_:
  854|   127k|constexpr inline void comba_sqr(W z[2 * N], const W x[N]) {
  855|   127k|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (855:7): [True: 127k, Folded]
  ------------------
  856|       |      if constexpr(std::same_as<W, word> && N == 4) {
  857|       |         return bigint_comba_sqr4(z, x);
  858|       |      }
  859|       |      if constexpr(std::same_as<W, word> && N == 6) {
  860|       |         return bigint_comba_sqr6(z, x);
  861|       |      }
  862|       |      if constexpr(std::same_as<W, word> && N == 7) {
  863|       |         return bigint_comba_sqr7(z, x);
  864|       |      }
  865|   127k|      if constexpr(std::same_as<W, word> && N == 8) {
  866|   127k|         return bigint_comba_sqr8(z, x);
  867|   127k|      }
  868|       |      if constexpr(std::same_as<W, word> && N == 9) {
  869|       |         return bigint_comba_sqr9(z, x);
  870|       |      }
  871|       |      if constexpr(std::same_as<W, word> && N == 16) {
  872|       |         return bigint_comba_sqr16(z, x);
  873|       |      }
  874|   127k|   }
  875|       |
  876|      0|   word3<W> accum;
  877|       |
  878|   127k|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (878:22): [True: 0, False: 127k]
  ------------------
  879|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (879:28): [True: 0, False: 0]
  ------------------
  880|      0|      const size_t end = std::min(N, i + 1);
  881|       |
  882|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (882:29): [True: 0, False: 0]
  ------------------
  883|      0|         accum.mul(x[j], x[i - j]);
  884|      0|      }
  885|      0|      z[i] = accum.extract();
  886|      0|   }
  887|   127k|}
_ZN5Botan22bigint_monty_maybe_subILm8ETkNS_8WordTypeEmEEvPT0_S1_PKS1_S4_:
  254|   313k|inline constexpr void bigint_monty_maybe_sub(W z[N], W x0, const W x[N], const W y[N]) {
  255|   313k|   W borrow = 0;
  256|       |
  257|  2.82M|   for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (257:22): [True: 2.50M, False: 313k]
  ------------------
  258|  2.50M|      z[i] = word_sub(x[i], y[i], &borrow);
  259|  2.50M|   }
  260|       |
  261|   313k|   borrow = (x0 - borrow) > x0;
  262|       |
  263|   313k|   CT::conditional_assign_mem(borrow, z, x, N);
  264|   313k|}
_ZN5Botan9comba_mulILm8ETkNS_8WordTypeEmEEvPT0_PKS1_S4_:
  818|   153k|constexpr inline void comba_mul(W z[2 * N], const W x[N], const W y[N]) {
  819|   153k|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (819:7): [True: 153k, Folded]
  ------------------
  820|       |      if constexpr(std::same_as<W, word> && N == 4) {
  821|       |         return bigint_comba_mul4(z, x, y);
  822|       |      }
  823|       |      if constexpr(std::same_as<W, word> && N == 6) {
  824|       |         return bigint_comba_mul6(z, x, y);
  825|       |      }
  826|       |      if constexpr(std::same_as<W, word> && N == 7) {
  827|       |         return bigint_comba_mul7(z, x, y);
  828|       |      }
  829|   153k|      if constexpr(std::same_as<W, word> && N == 8) {
  830|   153k|         return bigint_comba_mul8(z, x, y);
  831|   153k|      }
  832|       |      if constexpr(std::same_as<W, word> && N == 9) {
  833|       |         return bigint_comba_mul9(z, x, y);
  834|       |      }
  835|       |      if constexpr(std::same_as<W, word> && N == 16) {
  836|       |         return bigint_comba_mul16(z, x, y);
  837|       |      }
  838|   153k|   }
  839|       |
  840|      0|   word3<W> accum;
  841|       |
  842|   153k|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (842:22): [True: 0, False: 153k]
  ------------------
  843|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (843:28): [True: 0, False: 0]
  ------------------
  844|      0|      const size_t end = std::min(N, i + 1);
  845|       |
  846|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (846:29): [True: 0, False: 0]
  ------------------
  847|      0|         accum.mul(x[j], y[i - j]);
  848|      0|      }
  849|      0|      z[i] = accum.extract();
  850|      0|   }
  851|   153k|}
_ZN5Botan10shift_leftILm1ETkNS_8WordTypeEmLm8EEET0_RNSt3__15arrayIS1_XT1_EEE:
  725|  13.1k|inline constexpr W shift_left(std::array<W, N>& x) {
  726|  13.1k|   static_assert(N >= 1, "Invalid input size");
  727|  13.1k|   static_assert(S > 0, "Zero shift not supported");
  728|  13.1k|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  729|       |
  730|  13.1k|   const W carry = x[N - 1] >> (WordInfo<W>::bits - S);
  731|       |
  732|   105k|   for(size_t i = N - 1; i != 0; --i) {
  ------------------
  |  Branch (732:26): [True: 92.3k, False: 13.1k]
  ------------------
  733|  92.3k|      x[i] = (x[i] << S) | (x[i - 1] >> (WordInfo<W>::bits - S));
  734|  92.3k|   }
  735|  13.1k|   x[0] <<= S;
  736|       |
  737|  13.1k|   return carry;
  738|  13.1k|}
_ZN5Botan16read_window_bitsILm5EmLm8EEEmNSt3__14spanIKT0_XT1_EEEm:
 1071|  14.3k|constexpr size_t read_window_bits(std::span<const W, N> words, size_t offset) {
 1072|  14.3k|   static_assert(WindowBits >= 1 && WindowBits <= 7);
 1073|       |
 1074|  14.3k|   constexpr uint8_t WindowMask = static_cast<uint8_t>(1 << WindowBits) - 1;
 1075|       |
 1076|  14.3k|   constexpr size_t W_bits = sizeof(W) * 8;
 1077|  14.3k|   const auto bit_shift = offset % W_bits;
 1078|  14.3k|   const auto word_offset = words.size() - 1 - (offset / W_bits);
 1079|       |
 1080|  14.3k|   const bool single_byte_window = bit_shift <= (W_bits - WindowBits) || word_offset == 0;
  ------------------
  |  Branch (1080:36): [True: 13.3k, False: 973]
  |  Branch (1080:74): [True: 139, False: 834]
  ------------------
 1081|       |
 1082|  14.3k|   const auto w0 = words[word_offset];
 1083|       |
 1084|  14.3k|   if(single_byte_window) {
  ------------------
  |  Branch (1084:7): [True: 13.4k, False: 834]
  ------------------
 1085|  13.4k|      return (w0 >> bit_shift) & WindowMask;
 1086|  13.4k|   } else {
 1087|       |      // Otherwise we must join two words and extract the result
 1088|    834|      const auto w1 = words[word_offset - 1];
 1089|    834|      const auto combined = ((w0 >> bit_shift) | (w1 << (W_bits - bit_shift)));
 1090|    834|      return combined & WindowMask;
 1091|    834|   }
 1092|  14.3k|}
_ZN5Botan11shift_rightILm1ETkNS_8WordTypeEmLm8EEET0_RNSt3__15arrayIS1_XT1_EEE:
  741|  1.42k|inline constexpr W shift_right(std::array<W, N>& x) {
  742|  1.42k|   static_assert(N >= 1, "Invalid input size");
  743|  1.42k|   static_assert(S > 0, "Zero shift not supported");
  744|  1.42k|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  745|       |
  746|  1.42k|   const W carry = x[0] << (WordInfo<W>::bits - S);
  747|       |
  748|  11.4k|   for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (748:22): [True: 9.98k, False: 1.42k]
  ------------------
  749|  9.98k|      x[i] = (x[i] >> S) | (x[i + 1] << (WordInfo<W>::bits - S));
  750|  9.98k|   }
  751|  1.42k|   x[N - 1] >>= S;
  752|       |
  753|  1.42k|   return carry;
  754|  1.42k|}
_ZN5Botan10shift_leftILm1ETkNS_8WordTypeEmLm9EEET0_RNSt3__15arrayIS1_XT1_EEE:
  725|  2.97M|inline constexpr W shift_left(std::array<W, N>& x) {
  726|  2.97M|   static_assert(N >= 1, "Invalid input size");
  727|  2.97M|   static_assert(S > 0, "Zero shift not supported");
  728|  2.97M|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  729|       |
  730|  2.97M|   const W carry = x[N - 1] >> (WordInfo<W>::bits - S);
  731|       |
  732|  26.8M|   for(size_t i = N - 1; i != 0; --i) {
  ------------------
  |  Branch (732:26): [True: 23.8M, False: 2.97M]
  ------------------
  733|  23.8M|      x[i] = (x[i] << S) | (x[i - 1] >> (WordInfo<W>::bits - S));
  734|  23.8M|   }
  735|  2.97M|   x[0] <<= S;
  736|       |
  737|  2.97M|   return carry;
  738|  2.97M|}
_ZN5Botan22bigint_monty_maybe_subILm9ETkNS_8WordTypeEmEEvPT0_S1_PKS1_S4_:
  254|  3.00M|inline constexpr void bigint_monty_maybe_sub(W z[N], W x0, const W x[N], const W y[N]) {
  255|  3.00M|   W borrow = 0;
  256|       |
  257|  30.0M|   for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (257:22): [True: 27.0M, False: 3.00M]
  ------------------
  258|  27.0M|      z[i] = word_sub(x[i], y[i], &borrow);
  259|  27.0M|   }
  260|       |
  261|  3.00M|   borrow = (x0 - borrow) > x0;
  262|       |
  263|  3.00M|   CT::conditional_assign_mem(borrow, z, x, N);
  264|  3.00M|}
_ZN5Botan16read_window_bitsILm4EmLm18446744073709551615EEEmNSt3__14spanIKT0_XT1_EEEm:
 1071|  47.0k|constexpr size_t read_window_bits(std::span<const W, N> words, size_t offset) {
 1072|  47.0k|   static_assert(WindowBits >= 1 && WindowBits <= 7);
 1073|       |
 1074|  47.0k|   constexpr uint8_t WindowMask = static_cast<uint8_t>(1 << WindowBits) - 1;
 1075|       |
 1076|  47.0k|   constexpr size_t W_bits = sizeof(W) * 8;
 1077|  47.0k|   const auto bit_shift = offset % W_bits;
 1078|  47.0k|   const auto word_offset = words.size() - 1 - (offset / W_bits);
 1079|       |
 1080|  47.0k|   const bool single_byte_window = bit_shift <= (W_bits - WindowBits) || word_offset == 0;
  ------------------
  |  Branch (1080:36): [True: 47.0k, False: 0]
  |  Branch (1080:74): [True: 0, False: 0]
  ------------------
 1081|       |
 1082|  47.0k|   const auto w0 = words[word_offset];
 1083|       |
 1084|  47.0k|   if(single_byte_window) {
  ------------------
  |  Branch (1084:7): [True: 47.0k, False: 0]
  ------------------
 1085|  47.0k|      return (w0 >> bit_shift) & WindowMask;
 1086|  47.0k|   } else {
 1087|       |      // Otherwise we must join two words and extract the result
 1088|      0|      const auto w1 = words[word_offset - 1];
 1089|      0|      const auto combined = ((w0 >> bit_shift) | (w1 << (W_bits - bit_shift)));
 1090|      0|      return combined & WindowMask;
 1091|      0|   }
 1092|  47.0k|}
_ZN5Botan11shift_rightILm1ETkNS_8WordTypeEmLm9EEET0_RNSt3__15arrayIS1_XT1_EEE:
  741|  1.48k|inline constexpr W shift_right(std::array<W, N>& x) {
  742|  1.48k|   static_assert(N >= 1, "Invalid input size");
  743|  1.48k|   static_assert(S > 0, "Zero shift not supported");
  744|  1.48k|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  745|       |
  746|  1.48k|   const W carry = x[0] << (WordInfo<W>::bits - S);
  747|       |
  748|  13.3k|   for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (748:22): [True: 11.8k, False: 1.48k]
  ------------------
  749|  11.8k|      x[i] = (x[i] >> S) | (x[i + 1] << (WordInfo<W>::bits - S));
  750|  11.8k|   }
  751|  1.48k|   x[N - 1] >>= S;
  752|       |
  753|  1.48k|   return carry;
  754|  1.48k|}
_ZN5Botan10shift_leftILm32ETkNS_8WordTypeEmLm4EEET0_RNSt3__15arrayIS1_XT1_EEE:
  725|    325|inline constexpr W shift_left(std::array<W, N>& x) {
  726|    325|   static_assert(N >= 1, "Invalid input size");
  727|    325|   static_assert(S > 0, "Zero shift not supported");
  728|    325|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  729|       |
  730|    325|   const W carry = x[N - 1] >> (WordInfo<W>::bits - S);
  731|       |
  732|  1.30k|   for(size_t i = N - 1; i != 0; --i) {
  ------------------
  |  Branch (732:26): [True: 975, False: 325]
  ------------------
  733|    975|      x[i] = (x[i] << S) | (x[i - 1] >> (WordInfo<W>::bits - S));
  734|    975|   }
  735|    325|   x[0] <<= S;
  736|       |
  737|    325|   return carry;
  738|    325|}
_ZN5Botan13redc_crandallITkNS_8WordTypeEmLm4ETnT_Lm4294968273EEENSt3__15arrayIS1_XT0_EEENS2_4spanIKS1_XmlLi2ET0_EEE:
  992|   190k|constexpr std::array<W, N> redc_crandall(std::span<const W, 2 * N> z) {
  993|   190k|   static_assert(N >= 2);
  994|       |
  995|   190k|   std::array<W, N> hi = {};
  996|       |
  997|       |   // hi = hi * c + lo
  998|       |
  999|   190k|   W carry = 0;
 1000|   950k|   for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (1000:22): [True: 760k, False: 190k]
  ------------------
 1001|   760k|      hi[i] = word_madd3(z[i + N], C, z[i], &carry);
 1002|   760k|   }
 1003|       |
 1004|       |   // hi += carry * C
 1005|   190k|   word carry_c[2] = {0};
 1006|   190k|   carry_c[0] = word_madd2(carry, C, &carry_c[1]);
 1007|       |
 1008|   190k|   carry = bigint_add2(hi.data(), N, carry_c, 2);
 1009|       |
 1010|   190k|   constexpr W P0 = WordInfo<W>::max - (C - 1);
 1011|       |
 1012|   190k|   std::array<W, N> r = {};
 1013|       |
 1014|   190k|   W borrow = 0;
 1015|       |
 1016|       |   /*
 1017|       |   * For undetermined reasons, on GCC (only) removing this asm block causes
 1018|       |   * massive (up to 20%) performance regressions in secp256k1.
 1019|       |   *
 1020|       |   * The generated code without the asm seems quite reasonable, and timing
 1021|       |   * repeated calls to redc_crandall with the cycle counter show that GCC
 1022|       |   * computes it in about the same number of cycles with or without the asm.
 1023|       |   *
 1024|       |   * So the cause of the regression is unclear. But it is reproducible across
 1025|       |   * machines and GCC versions.
 1026|       |   */
 1027|       |#if defined(BOTAN_MP_USE_X86_64_ASM) && defined(__GNUC__) && !defined(__clang__)
 1028|       |   if constexpr(N == 4 && std::same_as<W, uint64_t>) {
 1029|       |      if(!std::is_constant_evaluated()) {
 1030|       |         asm volatile(R"(
 1031|       |                      movq 0(%[x]), %[borrow]
 1032|       |                      subq %[p0], %[borrow]
 1033|       |                      movq %[borrow], 0(%[r])
 1034|       |                      movq 8(%[x]), %[borrow]
 1035|       |                      sbbq $-1, %[borrow]
 1036|       |                      movq %[borrow], 8(%[r])
 1037|       |                      movq 16(%[x]), %[borrow]
 1038|       |                      sbbq $-1, %[borrow]
 1039|       |                      movq %[borrow], 16(%[r])
 1040|       |                      movq 24(%[x]), %[borrow]
 1041|       |                      sbbq $-1, %[borrow]
 1042|       |                      movq %[borrow], 24(%[r])
 1043|       |                      sbbq %[borrow],%[borrow]
 1044|       |                      negq %[borrow]
 1045|       |                      )"
 1046|       |                      : [borrow] "=r"(borrow)
 1047|       |                      : [x] "r"(hi.data()), [p0] "r"(P0), [r] "r"(r.data()), "0"(borrow)
 1048|       |                      : "cc", "memory");
 1049|       |
 1050|       |         borrow = (carry - borrow) > carry;
 1051|       |         CT::conditional_assign_mem(borrow, r.data(), hi.data(), N);
 1052|       |         return r;
 1053|       |      }
 1054|       |   }
 1055|       |#endif
 1056|       |
 1057|   190k|   r[0] = word_sub(hi[0], P0, &borrow);
 1058|   760k|   for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (1058:22): [True: 570k, False: 190k]
  ------------------
 1059|   570k|      r[i] = word_sub(hi[i], WordInfo<W>::max, &borrow);
 1060|   570k|   }
 1061|       |
 1062|   190k|   borrow = (carry - borrow) > carry;
 1063|       |
 1064|   190k|   CT::conditional_assign_mem(borrow, r.data(), hi.data(), N);
 1065|       |
 1066|   190k|   return r;
 1067|   190k|}
_ZN5Botan9comba_sqrILm9ETkNS_8WordTypeEmEEvPT0_PKS1_:
  854|   175k|constexpr inline void comba_sqr(W z[2 * N], const W x[N]) {
  855|   175k|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (855:7): [True: 175k, Folded]
  ------------------
  856|       |      if constexpr(std::same_as<W, word> && N == 4) {
  857|       |         return bigint_comba_sqr4(z, x);
  858|       |      }
  859|       |      if constexpr(std::same_as<W, word> && N == 6) {
  860|       |         return bigint_comba_sqr6(z, x);
  861|       |      }
  862|       |      if constexpr(std::same_as<W, word> && N == 7) {
  863|       |         return bigint_comba_sqr7(z, x);
  864|       |      }
  865|       |      if constexpr(std::same_as<W, word> && N == 8) {
  866|       |         return bigint_comba_sqr8(z, x);
  867|       |      }
  868|   175k|      if constexpr(std::same_as<W, word> && N == 9) {
  869|   175k|         return bigint_comba_sqr9(z, x);
  870|   175k|      }
  871|       |      if constexpr(std::same_as<W, word> && N == 16) {
  872|       |         return bigint_comba_sqr16(z, x);
  873|       |      }
  874|   175k|   }
  875|       |
  876|      0|   word3<W> accum;
  877|       |
  878|   175k|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (878:22): [True: 0, False: 175k]
  ------------------
  879|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (879:28): [True: 0, False: 0]
  ------------------
  880|      0|      const size_t end = std::min(N, i + 1);
  881|       |
  882|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (882:29): [True: 0, False: 0]
  ------------------
  883|      0|         accum.mul(x[j], x[i - j]);
  884|      0|      }
  885|      0|      z[i] = accum.extract();
  886|      0|   }
  887|   175k|}
_ZN5Botan9comba_mulILm9ETkNS_8WordTypeEmEEvPT0_PKS1_S4_:
  818|   186k|constexpr inline void comba_mul(W z[2 * N], const W x[N], const W y[N]) {
  819|   186k|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (819:7): [True: 186k, Folded]
  ------------------
  820|       |      if constexpr(std::same_as<W, word> && N == 4) {
  821|       |         return bigint_comba_mul4(z, x, y);
  822|       |      }
  823|       |      if constexpr(std::same_as<W, word> && N == 6) {
  824|       |         return bigint_comba_mul6(z, x, y);
  825|       |      }
  826|       |      if constexpr(std::same_as<W, word> && N == 7) {
  827|       |         return bigint_comba_mul7(z, x, y);
  828|       |      }
  829|       |      if constexpr(std::same_as<W, word> && N == 8) {
  830|       |         return bigint_comba_mul8(z, x, y);
  831|       |      }
  832|   186k|      if constexpr(std::same_as<W, word> && N == 9) {
  833|   186k|         return bigint_comba_mul9(z, x, y);
  834|   186k|      }
  835|       |      if constexpr(std::same_as<W, word> && N == 16) {
  836|       |         return bigint_comba_mul16(z, x, y);
  837|       |      }
  838|   186k|   }
  839|       |
  840|      0|   word3<W> accum;
  841|       |
  842|   186k|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (842:22): [True: 0, False: 186k]
  ------------------
  843|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (843:28): [True: 0, False: 0]
  ------------------
  844|      0|      const size_t end = std::min(N, i + 1);
  845|       |
  846|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (846:29): [True: 0, False: 0]
  ------------------
  847|      0|         accum.mul(x[j], y[i - j]);
  848|      0|      }
  849|      0|      z[i] = accum.extract();
  850|      0|   }
  851|   186k|}
_ZN5Botan10shift_leftILm16ETkNS_8WordTypeEmLm9EEET0_RNSt3__15arrayIS1_XT1_EEE:
  725|    488|inline constexpr W shift_left(std::array<W, N>& x) {
  726|    488|   static_assert(N >= 1, "Invalid input size");
  727|    488|   static_assert(S > 0, "Zero shift not supported");
  728|    488|   static_assert(S < WordInfo<W>::bits, "Shift too large");
  729|       |
  730|    488|   const W carry = x[N - 1] >> (WordInfo<W>::bits - S);
  731|       |
  732|  4.39k|   for(size_t i = N - 1; i != 0; --i) {
  ------------------
  |  Branch (732:26): [True: 3.90k, False: 488]
  ------------------
  733|  3.90k|      x[i] = (x[i] << S) | (x[i - 1] >> (WordInfo<W>::bits - S));
  734|  3.90k|   }
  735|    488|   x[0] <<= S;
  736|       |
  737|    488|   return carry;
  738|    488|}
_ZN5Botan9comba_mulILm7ETkNS_8WordTypeEmEEvPT0_PKS1_S4_:
  818|  2.25k|constexpr inline void comba_mul(W z[2 * N], const W x[N], const W y[N]) {
  819|  2.25k|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (819:7): [True: 2.25k, Folded]
  ------------------
  820|       |      if constexpr(std::same_as<W, word> && N == 4) {
  821|       |         return bigint_comba_mul4(z, x, y);
  822|       |      }
  823|       |      if constexpr(std::same_as<W, word> && N == 6) {
  824|       |         return bigint_comba_mul6(z, x, y);
  825|       |      }
  826|  2.25k|      if constexpr(std::same_as<W, word> && N == 7) {
  827|  2.25k|         return bigint_comba_mul7(z, x, y);
  828|  2.25k|      }
  829|       |      if constexpr(std::same_as<W, word> && N == 8) {
  830|       |         return bigint_comba_mul8(z, x, y);
  831|       |      }
  832|       |      if constexpr(std::same_as<W, word> && N == 9) {
  833|       |         return bigint_comba_mul9(z, x, y);
  834|       |      }
  835|       |      if constexpr(std::same_as<W, word> && N == 16) {
  836|       |         return bigint_comba_mul16(z, x, y);
  837|       |      }
  838|  2.25k|   }
  839|       |
  840|      0|   word3<W> accum;
  841|       |
  842|  2.25k|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (842:22): [True: 0, False: 2.25k]
  ------------------
  843|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (843:28): [True: 0, False: 0]
  ------------------
  844|      0|      const size_t end = std::min(N, i + 1);
  845|       |
  846|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (846:29): [True: 0, False: 0]
  ------------------
  847|      0|         accum.mul(x[j], y[i - j]);
  848|      0|      }
  849|      0|      z[i] = accum.extract();
  850|      0|   }
  851|  2.25k|}
_ZN5Botan9comba_sqrILm7ETkNS_8WordTypeEmEEvPT0_PKS1_:
  854|  2.23k|constexpr inline void comba_sqr(W z[2 * N], const W x[N]) {
  855|  2.23k|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (855:7): [True: 2.23k, Folded]
  ------------------
  856|       |      if constexpr(std::same_as<W, word> && N == 4) {
  857|       |         return bigint_comba_sqr4(z, x);
  858|       |      }
  859|       |      if constexpr(std::same_as<W, word> && N == 6) {
  860|       |         return bigint_comba_sqr6(z, x);
  861|       |      }
  862|  2.23k|      if constexpr(std::same_as<W, word> && N == 7) {
  863|  2.23k|         return bigint_comba_sqr7(z, x);
  864|  2.23k|      }
  865|       |      if constexpr(std::same_as<W, word> && N == 8) {
  866|       |         return bigint_comba_sqr8(z, x);
  867|       |      }
  868|       |      if constexpr(std::same_as<W, word> && N == 9) {
  869|       |         return bigint_comba_sqr9(z, x);
  870|       |      }
  871|       |      if constexpr(std::same_as<W, word> && N == 16) {
  872|       |         return bigint_comba_sqr16(z, x);
  873|       |      }
  874|  2.23k|   }
  875|       |
  876|      0|   word3<W> accum;
  877|       |
  878|  2.23k|   for(size_t i = 0; i != 2 * N; ++i) {
  ------------------
  |  Branch (878:22): [True: 0, False: 2.23k]
  ------------------
  879|      0|      const size_t start = i + 1 < N ? 0 : i + 1 - N;
  ------------------
  |  Branch (879:28): [True: 0, False: 0]
  ------------------
  880|      0|      const size_t end = std::min(N, i + 1);
  881|       |
  882|      0|      for(size_t j = start; j != end; ++j) {
  ------------------
  |  Branch (882:29): [True: 0, False: 0]
  ------------------
  883|      0|         accum.mul(x[j], x[i - j]);
  884|      0|      }
  885|      0|      z[i] = accum.extract();
  886|      0|   }
  887|  2.23k|}

_ZN5Botan6PCurve15PrimeOrderCurve6ScalarD2Ev:
   72|  12.1k|            ~Scalar() = default;
_ZN5Botan6PCurve15PrimeOrderCurve11AffinePointD2Ev:
  100|  5.41k|            ~AffinePoint() = default;
_ZN5Botan6PCurve15PrimeOrderCurve15ProjectivePointD2Ev:
  134|  1.64k|            ~ProjectivePoint() = default;
_ZN5Botan6PCurve15PrimeOrderCurve6ScalarC2EOS2_:
   69|  6.08k|            Scalar(Scalar&& other) = default;
_ZN5Botan6PCurve15PrimeOrderCurve6ScalarC2ERKS2_:
   68|  4.05k|            Scalar(const Scalar& other) = default;
_ZN5Botan6PCurve15PrimeOrderCurve11AffinePointC2EOS2_:
   97|  3.30k|            AffinePoint(AffinePoint&& other) = default;
_ZNK5Botan6PCurve15PrimeOrderCurve6Scalar6_curveEv:
   76|  5.70k|            const auto& _curve() const { return m_curve; }
_ZNK5Botan6PCurve15PrimeOrderCurve6Scalar6_valueEv:
   78|  5.70k|            const auto& _value() const { return m_value; }
_ZN5Botan6PCurve15PrimeOrderCurve6Scalar7_createENSt3__110shared_ptrIKS1_EENS3_5arrayImLm9EEE:
   80|  2.02k|            static Scalar _create(CurvePtr curve, StorageUnit v) { return Scalar(std::move(curve), v); }
_ZN5Botan6PCurve15PrimeOrderCurve6ScalarC2ENSt3__110shared_ptrIKS1_EENS3_5arrayImLm9EEE:
   83|  2.02k|            Scalar(CurvePtr curve, StorageUnit v) : m_curve(std::move(curve)), m_value(v) {}
_ZNK5Botan6PCurve15PrimeOrderCurve11AffinePoint6_curveEv:
  104|  3.76k|            const auto& _curve() const { return m_curve; }
_ZNK5Botan6PCurve15PrimeOrderCurve11AffinePoint2_xEv:
  106|  3.76k|            const auto& _x() const { return m_x; }
_ZNK5Botan6PCurve15PrimeOrderCurve11AffinePoint2_yEv:
  108|  3.76k|            const auto& _y() const { return m_y; }
_ZN5Botan6PCurve15PrimeOrderCurve11AffinePoint7_createENSt3__110shared_ptrIKS1_EENS3_5arrayImLm9EEES8_:
  110|  2.11k|            static AffinePoint _create(CurvePtr curve, StorageUnit x, StorageUnit y) {
  111|  2.11k|               return AffinePoint(std::move(curve), x, y);
  112|  2.11k|            }
_ZN5Botan6PCurve15PrimeOrderCurve11AffinePointC2ENSt3__110shared_ptrIKS1_EENS3_5arrayImLm9EEES8_:
  115|  2.11k|            AffinePoint(CurvePtr curve, StorageUnit x, StorageUnit y) : m_curve(std::move(curve)), m_x(x), m_y(y) {}
_ZNK5Botan6PCurve15PrimeOrderCurve15ProjectivePoint6_curveEv:
  136|  1.64k|            const auto& _curve() const { return m_curve; }
_ZNK5Botan6PCurve15PrimeOrderCurve15ProjectivePoint2_xEv:
  138|  1.64k|            const auto& _x() const { return m_x; }
_ZNK5Botan6PCurve15PrimeOrderCurve15ProjectivePoint2_yEv:
  140|  1.64k|            const auto& _y() const { return m_y; }
_ZNK5Botan6PCurve15PrimeOrderCurve15ProjectivePoint2_zEv:
  142|  1.64k|            const auto& _z() const { return m_z; }
_ZN5Botan6PCurve15PrimeOrderCurve15ProjectivePoint7_createENSt3__110shared_ptrIKS1_EENS3_5arrayImLm9EEES8_S8_:
  144|  1.64k|            static ProjectivePoint _create(CurvePtr curve, StorageUnit x, StorageUnit y, StorageUnit z) {
  145|  1.64k|               return ProjectivePoint(std::move(curve), x, y, z);
  146|  1.64k|            }
_ZN5Botan6PCurve15PrimeOrderCurve15ProjectivePointC2ENSt3__110shared_ptrIKS1_EENS3_5arrayImLm9EEES8_S8_:
  150|  1.64k|                  m_curve(std::move(curve)), m_x(x), m_y(y), m_z(z) {}
_ZN5Botan6PCurve15PrimeOrderCurveD2Ev:
  163|    468|      virtual ~PrimeOrderCurve() = default;

pcurves_brainpool256r1.cpp:_ZN5Botan11dbl_genericINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES3_E11FieldParamsEEEEES8_EESC_EET_RKSE_RKT0_:
  397|    833|inline constexpr ProjectivePoint dbl_generic(const ProjectivePoint& pt, const FieldElement& A) {
  398|       |   // Cost: 1M + 3S + 1A + 1*3
  399|    833|   const auto z2 = pt.z().square();
  400|    833|   const auto m = pt.x().square().mul3() + A * z2.square();
  401|       |
  402|       |   // Remaining cost: 3M + 3S + 3A + 2*2 + 1*4 + 1*8
  403|    833|   const auto y2 = pt.y().square();
  404|    833|   const auto s = pt.x().mul4() * y2;
  405|    833|   const auto nx = m.square() - s.mul2();
  406|    833|   const auto ny = m * (s - nx) - y2.square().mul8();
  407|    833|   const auto nz = pt.y().mul2() * pt.z();
  408|       |
  409|    833|   return ProjectivePoint(nx, ny, nz);
  410|    833|}
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|    104|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|    104|   } else {
   85|    104|      const auto z_inv = invert_field_element<C>(pt.z());
   86|    104|      const auto z2_inv = z_inv.square();
   87|    104|      const auto z3_inv = z_inv * z2_inv;
   88|    104|      return typename C::AffinePoint(pt.x() * z2_inv, pt.y() * z3_inv);
   89|    104|   }
   90|    104|}
pcurves_brainpool256r1.cpp:_ZN5Botan20invert_field_elementINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveEEEDaRKNT_12FieldElementE:
   35|    104|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|    104|   } else {
   39|    104|      return fe.invert();
   40|    104|   }
   41|    104|}
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|  4.36k|                                                        const FieldElement& one) {
  297|  4.36k|   const auto a_is_identity = a.is_identity();
  298|  4.36k|   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|  4.36k|   auto by = b.y();
  307|  4.36k|   by.conditional_assign(sub, by.negate());
  308|       |
  309|  4.36k|   const auto Z1Z1 = a.z().square();
  310|  4.36k|   const auto U2 = b.x() * Z1Z1;
  311|  4.36k|   const auto S2 = by * a.z() * Z1Z1;
  312|  4.36k|   const auto H = U2 - a.x();
  313|  4.36k|   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|  4.36k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (325:7): [True: 0, False: 4.36k]
  ------------------
  326|      0|      return a.dbl();
  327|      0|   }
  328|       |
  329|  4.36k|   const auto HH = H.square();
  330|  4.36k|   const auto HHH = H * HH;
  331|  4.36k|   const auto V = a.x() * HH;
  332|  4.36k|   const auto t2 = r.square();
  333|  4.36k|   const auto t3 = V + V;
  334|  4.36k|   const auto t4 = t2 - HHH;
  335|  4.36k|   auto X3 = t4 - t3;
  336|  4.36k|   const auto t5 = V - X3;
  337|  4.36k|   const auto t6 = a.y() * HHH;
  338|  4.36k|   const auto t7 = r * t5;
  339|  4.36k|   auto Y3 = t7 - t6;
  340|  4.36k|   auto Z3 = a.z() * H;
  341|       |
  342|       |   // if a is identity then return b
  343|  4.36k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), by, one);
  344|       |
  345|       |   // if b is identity then return a
  346|  4.36k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  347|       |
  348|  4.36k|   return ProjectivePoint(X3, Y3, Z3);
  349|  4.36k|}
pcurves_brainpool384r1.cpp:_ZN5Botan11dbl_genericINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES3_E11FieldParamsEEEEES8_EESC_EET_RKSE_RKT0_:
  397|  1.24k|inline constexpr ProjectivePoint dbl_generic(const ProjectivePoint& pt, const FieldElement& A) {
  398|       |   // Cost: 1M + 3S + 1A + 1*3
  399|  1.24k|   const auto z2 = pt.z().square();
  400|  1.24k|   const auto m = pt.x().square().mul3() + A * z2.square();
  401|       |
  402|       |   // Remaining cost: 3M + 3S + 3A + 2*2 + 1*4 + 1*8
  403|  1.24k|   const auto y2 = pt.y().square();
  404|  1.24k|   const auto s = pt.x().mul4() * y2;
  405|  1.24k|   const auto nx = m.square() - s.mul2();
  406|  1.24k|   const auto ny = m * (s - nx) - y2.square().mul8();
  407|  1.24k|   const auto nz = pt.y().mul2() * pt.z();
  408|       |
  409|  1.24k|   return ProjectivePoint(nx, ny, nz);
  410|  1.24k|}
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|    165|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|    165|   } else {
   85|    165|      const auto z_inv = invert_field_element<C>(pt.z());
   86|    165|      const auto z2_inv = z_inv.square();
   87|    165|      const auto z3_inv = z_inv * z2_inv;
   88|    165|      return typename C::AffinePoint(pt.x() * z2_inv, pt.y() * z3_inv);
   89|    165|   }
   90|    165|}
pcurves_brainpool384r1.cpp:_ZN5Botan20invert_field_elementINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveEEEDaRKNT_12FieldElementE:
   35|    165|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|    165|   } else {
   39|    165|      return fe.invert();
   40|    165|   }
   41|    165|}
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|  10.5k|                                                        const FieldElement& one) {
  297|  10.5k|   const auto a_is_identity = a.is_identity();
  298|  10.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|  10.5k|   auto by = b.y();
  307|  10.5k|   by.conditional_assign(sub, by.negate());
  308|       |
  309|  10.5k|   const auto Z1Z1 = a.z().square();
  310|  10.5k|   const auto U2 = b.x() * Z1Z1;
  311|  10.5k|   const auto S2 = by * a.z() * Z1Z1;
  312|  10.5k|   const auto H = U2 - a.x();
  313|  10.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|  10.5k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (325:7): [True: 0, False: 10.5k]
  ------------------
  326|      0|      return a.dbl();
  327|      0|   }
  328|       |
  329|  10.5k|   const auto HH = H.square();
  330|  10.5k|   const auto HHH = H * HH;
  331|  10.5k|   const auto V = a.x() * HH;
  332|  10.5k|   const auto t2 = r.square();
  333|  10.5k|   const auto t3 = V + V;
  334|  10.5k|   const auto t4 = t2 - HHH;
  335|  10.5k|   auto X3 = t4 - t3;
  336|  10.5k|   const auto t5 = V - X3;
  337|  10.5k|   const auto t6 = a.y() * HHH;
  338|  10.5k|   const auto t7 = r * t5;
  339|  10.5k|   auto Y3 = t7 - t6;
  340|  10.5k|   auto Z3 = a.z() * H;
  341|       |
  342|       |   // if a is identity then return b
  343|  10.5k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), by, one);
  344|       |
  345|       |   // if b is identity then return a
  346|  10.5k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  347|       |
  348|  10.5k|   return ProjectivePoint(X3, Y3, Z3);
  349|  10.5k|}
pcurves_brainpool512r1.cpp:_ZN5Botan11dbl_genericINS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES3_E11FieldParamsEEEEES8_EESC_EET_RKSE_RKT0_:
  397|  1.64k|inline constexpr ProjectivePoint dbl_generic(const ProjectivePoint& pt, const FieldElement& A) {
  398|       |   // Cost: 1M + 3S + 1A + 1*3
  399|  1.64k|   const auto z2 = pt.z().square();
  400|  1.64k|   const auto m = pt.x().square().mul3() + A * z2.square();
  401|       |
  402|       |   // Remaining cost: 3M + 3S + 3A + 2*2 + 1*4 + 1*8
  403|  1.64k|   const auto y2 = pt.y().square();
  404|  1.64k|   const auto s = pt.x().mul4() * y2;
  405|  1.64k|   const auto nx = m.square() - s.mul2();
  406|  1.64k|   const auto ny = m * (s - nx) - y2.square().mul8();
  407|  1.64k|   const auto nz = pt.y().mul2() * pt.z();
  408|       |
  409|  1.64k|   return ProjectivePoint(nx, ny, nz);
  410|  1.64k|}
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|    139|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|    139|   } else {
   85|    139|      const auto z_inv = invert_field_element<C>(pt.z());
   86|    139|      const auto z2_inv = z_inv.square();
   87|    139|      const auto z3_inv = z_inv * z2_inv;
   88|    139|      return typename C::AffinePoint(pt.x() * z2_inv, pt.y() * z3_inv);
   89|    139|   }
   90|    139|}
pcurves_brainpool512r1.cpp:_ZN5Botan20invert_field_elementINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveEEEDaRKNT_12FieldElementE:
   35|    139|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|    139|   } else {
   39|    139|      return fe.invert();
   40|    139|   }
   41|    139|}
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|  11.8k|                                                        const FieldElement& one) {
  297|  11.8k|   const auto a_is_identity = a.is_identity();
  298|  11.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|  11.8k|   auto by = b.y();
  307|  11.8k|   by.conditional_assign(sub, by.negate());
  308|       |
  309|  11.8k|   const auto Z1Z1 = a.z().square();
  310|  11.8k|   const auto U2 = b.x() * Z1Z1;
  311|  11.8k|   const auto S2 = by * a.z() * Z1Z1;
  312|  11.8k|   const auto H = U2 - a.x();
  313|  11.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|  11.8k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (325:7): [True: 0, False: 11.8k]
  ------------------
  326|      0|      return a.dbl();
  327|      0|   }
  328|       |
  329|  11.8k|   const auto HH = H.square();
  330|  11.8k|   const auto HHH = H * HH;
  331|  11.8k|   const auto V = a.x() * HH;
  332|  11.8k|   const auto t2 = r.square();
  333|  11.8k|   const auto t3 = V + V;
  334|  11.8k|   const auto t4 = t2 - HHH;
  335|  11.8k|   auto X3 = t4 - t3;
  336|  11.8k|   const auto t5 = V - X3;
  337|  11.8k|   const auto t6 = a.y() * HHH;
  338|  11.8k|   const auto t7 = r * t5;
  339|  11.8k|   auto Y3 = t7 - t6;
  340|  11.8k|   auto Z3 = a.z() * H;
  341|       |
  342|       |   // if a is identity then return b
  343|  11.8k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), by, one);
  344|       |
  345|       |   // if b is identity then return a
  346|  11.8k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  347|       |
  348|  11.8k|   return ProjectivePoint(X3, Y3, Z3);
  349|  11.8k|}
pcurves_generic.cpp:_ZN5Botan22point_add_or_sub_mixedINS_6PCurve22GenericProjectivePointENS1_18GenericAffinePointENS1_12_GLOBAL__N_112GenericFieldEEET_RKS6_RKT0_NS_2CT6ChoiceERKT1_:
  296|  12.2k|                                                        const FieldElement& one) {
  297|  12.2k|   const auto a_is_identity = a.is_identity();
  298|  12.2k|   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|  12.2k|   auto by = b.y();
  307|  12.2k|   by.conditional_assign(sub, by.negate());
  308|       |
  309|  12.2k|   const auto Z1Z1 = a.z().square();
  310|  12.2k|   const auto U2 = b.x() * Z1Z1;
  311|  12.2k|   const auto S2 = by * a.z() * Z1Z1;
  312|  12.2k|   const auto H = U2 - a.x();
  313|  12.2k|   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|  12.2k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (325:7): [True: 0, False: 12.2k]
  ------------------
  326|      0|      return a.dbl();
  327|      0|   }
  328|       |
  329|  12.2k|   const auto HH = H.square();
  330|  12.2k|   const auto HHH = H * HH;
  331|  12.2k|   const auto V = a.x() * HH;
  332|  12.2k|   const auto t2 = r.square();
  333|  12.2k|   const auto t3 = V + V;
  334|  12.2k|   const auto t4 = t2 - HHH;
  335|  12.2k|   auto X3 = t4 - t3;
  336|  12.2k|   const auto t5 = V - X3;
  337|  12.2k|   const auto t6 = a.y() * HHH;
  338|  12.2k|   const auto t7 = r * t5;
  339|  12.2k|   auto Y3 = t7 - t6;
  340|  12.2k|   auto Z3 = a.z() * H;
  341|       |
  342|       |   // if a is identity then return b
  343|  12.2k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), by, one);
  344|       |
  345|       |   // if b is identity then return a
  346|  12.2k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  347|       |
  348|  12.2k|   return ProjectivePoint(X3, Y3, Z3);
  349|  12.2k|}
_ZN5Botan13dbl_a_minus_3INS_6PCurve22GenericProjectivePointEEET_RKS3_:
  362|  78.4k|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|  78.4k|   const auto z2 = pt.z().square();
  368|  78.4k|   const auto m = (pt.x() - z2).mul3() * (pt.x() + z2);
  369|       |
  370|       |   // Remaining cost: 3M + 3S + 3A + 2*2 + 1*4 + 1*8
  371|  78.4k|   const auto y2 = pt.y().square();
  372|  78.4k|   const auto s = pt.x().mul4() * y2;
  373|  78.4k|   const auto nx = m.square() - s.mul2();
  374|  78.4k|   const auto ny = m * (s - nx) - y2.square().mul8();
  375|  78.4k|   const auto nz = pt.y().mul2() * pt.z();
  376|       |
  377|  78.4k|   return ProjectivePoint(nx, ny, nz);
  378|  78.4k|}
_ZN5Botan10dbl_a_zeroINS_6PCurve22GenericProjectivePointEEET_RKS3_:
  381|   150k|inline constexpr ProjectivePoint dbl_a_zero(const ProjectivePoint& pt) {
  382|       |   // If a == 0 then 3*x^2 + a*z^4 == 3*x^2
  383|       |   // Cost: 1S + 1*3
  384|   150k|   const auto m = pt.x().square().mul3();
  385|       |
  386|       |   // Remaining cost: 3M + 3S + 3A + 2*2 + 1*4 + 1*8
  387|   150k|   const auto y2 = pt.y().square();
  388|   150k|   const auto s = pt.x().mul4() * y2;
  389|   150k|   const auto nx = m.square() - s.mul2();
  390|   150k|   const auto ny = m * (s - nx) - y2.square().mul8();
  391|   150k|   const auto nz = pt.y().mul2() * pt.z();
  392|       |
  393|   150k|   return ProjectivePoint(nx, ny, nz);
  394|   150k|}
pcurves_generic.cpp:_ZN5Botan11dbl_genericINS_6PCurve22GenericProjectivePointENS1_12_GLOBAL__N_112GenericFieldEEET_RKS5_RKT0_:
  397|   141k|inline constexpr ProjectivePoint dbl_generic(const ProjectivePoint& pt, const FieldElement& A) {
  398|       |   // Cost: 1M + 3S + 1A + 1*3
  399|   141k|   const auto z2 = pt.z().square();
  400|   141k|   const auto m = pt.x().square().mul3() + A * z2.square();
  401|       |
  402|       |   // Remaining cost: 3M + 3S + 3A + 2*2 + 1*4 + 1*8
  403|   141k|   const auto y2 = pt.y().square();
  404|   141k|   const auto s = pt.x().mul4() * y2;
  405|   141k|   const auto nx = m.square() - s.mul2();
  406|   141k|   const auto ny = m * (s - nx) - y2.square().mul8();
  407|   141k|   const auto nz = pt.y().mul2() * pt.z();
  408|       |
  409|   141k|   return ProjectivePoint(nx, ny, nz);
  410|   141k|}
pcurves_generic.cpp:_ZN5Botan20invert_field_elementINS_6PCurve12_GLOBAL__N_112GenericCurveEEEDaRKNT_12FieldElementE:
   35|    332|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|    332|   } else {
   39|    332|      return fe.invert();
   40|    332|   }
   41|    332|}
pcurves_generic.cpp:_ZN5Botan9point_addINS_6PCurve22GenericProjectivePointENS1_12_GLOBAL__N_112GenericFieldEEET_RKS5_S7_:
  187|   327k|inline constexpr ProjectivePoint point_add(const ProjectivePoint& a, const ProjectivePoint& b) {
  188|   327k|   const auto a_is_identity = a.is_identity();
  189|   327k|   const auto b_is_identity = b.is_identity();
  190|       |
  191|   327k|   const auto Z1Z1 = a.z().square();
  192|   327k|   const auto Z2Z2 = b.z().square();
  193|   327k|   const auto U1 = a.x() * Z2Z2;
  194|   327k|   const auto U2 = b.x() * Z1Z1;
  195|   327k|   const auto S1 = a.y() * b.z() * Z2Z2;
  196|   327k|   const auto S2 = b.y() * a.z() * Z1Z1;
  197|   327k|   const auto H = U2 - U1;
  198|   327k|   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|   327k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (210:7): [True: 0, False: 327k]
  ------------------
  211|      0|      return a.dbl();
  212|      0|   }
  213|       |
  214|   327k|   const auto HH = H.square();
  215|   327k|   const auto HHH = H * HH;
  216|   327k|   const auto V = U1 * HH;
  217|   327k|   const auto t2 = r.square();
  218|   327k|   const auto t3 = V + V;
  219|   327k|   const auto t4 = t2 - HHH;
  220|   327k|   auto X3 = t4 - t3;
  221|   327k|   const auto t5 = V - X3;
  222|   327k|   const auto t6 = S1 * HHH;
  223|   327k|   const auto t7 = r * t5;
  224|   327k|   auto Y3 = t7 - t6;
  225|   327k|   const auto t8 = b.z() * H;
  226|   327k|   auto Z3 = a.z() * t8;
  227|       |
  228|       |   // if a is identity then return b
  229|   327k|   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|   327k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  233|       |
  234|   327k|   return ProjectivePoint(X3, Y3, Z3);
  235|   327k|}
pcurves_generic.cpp:_ZN5Botan9to_affineINS_6PCurve12_GLOBAL__N_112GenericCurveEEEDaRKNT_15ProjectivePointE:
   76|    332|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|    332|   } else {
   85|    332|      const auto z_inv = invert_field_element<C>(pt.z());
   86|    332|      const auto z2_inv = z_inv.square();
   87|    332|      const auto z3_inv = z_inv * z2_inv;
   88|    332|      return typename C::AffinePoint(pt.x() * z2_inv, pt.y() * z3_inv);
   89|    332|   }
   90|    332|}
pcurves_generic.cpp:_ZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_112GenericCurveELb1EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEE:
  107|    460|auto to_affine_batch(std::span<const typename C::ProjectivePoint> projective) {
  108|    460|   using AffinePoint = typename C::AffinePoint;
  109|       |
  110|    460|   const size_t N = projective.size();
  111|    460|   std::vector<AffinePoint> affine;
  112|    460|   affine.reserve(N);
  113|       |
  114|    460|   CT::Choice any_identity = CT::Choice::no();
  115|       |
  116|   697k|   for(const auto& pt : projective) {
  ------------------
  |  Branch (116:23): [True: 697k, False: 460]
  ------------------
  117|   697k|      any_identity = any_identity || pt.is_identity();
  118|   697k|   }
  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|    460|   if(N <= 2 || any_identity.as_bool()) {
  ------------------
  |  Branch (126:7): [True: 0, False: 460]
  |  Branch (126:17): [True: 0, False: 460]
  ------------------
  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|    460|   } else {
  134|    460|      std::vector<typename C::FieldElement> c;
  135|    460|      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|    460|      c.push_back(projective[0].z());
  145|   697k|      for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (145:25): [True: 697k, False: 460]
  ------------------
  146|   697k|         c.push_back(c[i - 1] * projective[i].z());
  147|   697k|      }
  148|       |
  149|    460|      auto s_inv = [&]() {
  150|    460|         if constexpr(VariableTime) {
  151|    460|            return c[N - 1].invert_vartime();
  152|    460|         } else {
  153|    460|            return invert_field_element<C>(c[N - 1]);
  154|    460|         }
  155|    460|      }();
  156|       |
  157|   697k|      for(size_t i = N - 1; i > 0; --i) {
  ------------------
  |  Branch (157:29): [True: 697k, False: 460]
  ------------------
  158|   697k|         const auto& p = projective[i];
  159|       |
  160|   697k|         const auto z_inv = s_inv * c[i - 1];
  161|   697k|         const auto z2_inv = z_inv.square();
  162|   697k|         const auto z3_inv = z_inv * z2_inv;
  163|       |
  164|   697k|         s_inv = s_inv * p.z();
  165|       |
  166|   697k|         affine.push_back(AffinePoint(p.x() * z2_inv, p.y() * z3_inv));
  167|   697k|      }
  168|       |
  169|    460|      const auto z2_inv = s_inv.square();
  170|    460|      const auto z3_inv = s_inv * z2_inv;
  171|    460|      affine.push_back(AffinePoint(projective[0].x() * z2_inv, projective[0].y() * z3_inv));
  172|    460|      std::reverse(affine.begin(), affine.end());
  173|    460|      return affine;
  174|    460|   }
  175|       |
  176|      0|   return affine;
  177|    460|}
pcurves_generic.cpp:_ZZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_112GenericCurveELb1EEEDaNSt3__14spanIKNT_15ProjectivePointELm18446744073709551615EEEENKUlvE_clEv:
  149|    460|      auto s_inv = [&]() {
  150|    460|         if constexpr(VariableTime) {
  151|    460|            return c[N - 1].invert_vartime();
  152|       |         } else {
  153|       |            return invert_field_element<C>(c[N - 1]);
  154|       |         }
  155|    460|      }();
pcurves_secp224r1.cpp:_ZN5Botan13dbl_a_minus_3INS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEES8_EEEET_RKSE_:
  362|    731|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|    731|   const auto z2 = pt.z().square();
  368|    731|   const auto m = (pt.x() - z2).mul3() * (pt.x() + z2);
  369|       |
  370|       |   // Remaining cost: 3M + 3S + 3A + 2*2 + 1*4 + 1*8
  371|    731|   const auto y2 = pt.y().square();
  372|    731|   const auto s = pt.x().mul4() * y2;
  373|    731|   const auto nx = m.square() - s.mul2();
  374|    731|   const auto ny = m * (s - nx) - y2.square().mul8();
  375|    731|   const auto nz = pt.y().mul2() * pt.z();
  376|       |
  377|    731|   return ProjectivePoint(nx, ny, nz);
  378|    731|}
pcurves_secp224r1.cpp:_ZN5Botan9point_addINS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEES8_EESC_EET_RKSE_SG_:
  187|    645|inline constexpr ProjectivePoint point_add(const ProjectivePoint& a, const ProjectivePoint& b) {
  188|    645|   const auto a_is_identity = a.is_identity();
  189|    645|   const auto b_is_identity = b.is_identity();
  190|       |
  191|    645|   const auto Z1Z1 = a.z().square();
  192|    645|   const auto Z2Z2 = b.z().square();
  193|    645|   const auto U1 = a.x() * Z2Z2;
  194|    645|   const auto U2 = b.x() * Z1Z1;
  195|    645|   const auto S1 = a.y() * b.z() * Z2Z2;
  196|    645|   const auto S2 = b.y() * a.z() * Z1Z1;
  197|    645|   const auto H = U2 - U1;
  198|    645|   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|    645|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (210:7): [True: 0, False: 645]
  ------------------
  211|      0|      return a.dbl();
  212|      0|   }
  213|       |
  214|    645|   const auto HH = H.square();
  215|    645|   const auto HHH = H * HH;
  216|    645|   const auto V = U1 * HH;
  217|    645|   const auto t2 = r.square();
  218|    645|   const auto t3 = V + V;
  219|    645|   const auto t4 = t2 - HHH;
  220|    645|   auto X3 = t4 - t3;
  221|    645|   const auto t5 = V - X3;
  222|    645|   const auto t6 = S1 * HHH;
  223|    645|   const auto t7 = r * t5;
  224|    645|   auto Y3 = t7 - t6;
  225|    645|   const auto t8 = b.z() * H;
  226|    645|   auto Z3 = a.z() * t8;
  227|       |
  228|       |   // if a is identity then return b
  229|    645|   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|    645|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  233|       |
  234|    645|   return ProjectivePoint(X3, Y3, Z3);
  235|    645|}
pcurves_secp224r1.cpp:_ZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_19secp224r15CurveELb1EEEDaNSt3__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.37k|   for(const auto& pt : projective) {
  ------------------
  |  Branch (116:23): [True: 1.37k, False: 1]
  ------------------
  117|  1.37k|      any_identity = any_identity || pt.is_identity();
  118|  1.37k|   }
  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.37k|      for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (145:25): [True: 1.37k, False: 1]
  ------------------
  146|  1.37k|         c.push_back(c[i - 1] * projective[i].z());
  147|  1.37k|      }
  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.37k|      for(size_t i = N - 1; i > 0; --i) {
  ------------------
  |  Branch (157:29): [True: 1.37k, False: 1]
  ------------------
  158|  1.37k|         const auto& p = projective[i];
  159|       |
  160|  1.37k|         const auto z_inv = s_inv * c[i - 1];
  161|  1.37k|         const auto z2_inv = z_inv.square();
  162|  1.37k|         const auto z3_inv = z_inv * z2_inv;
  163|       |
  164|  1.37k|         s_inv = s_inv * p.z();
  165|       |
  166|  1.37k|         affine.push_back(AffinePoint(p.x() * z2_inv, p.y() * z3_inv));
  167|  1.37k|      }
  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_secp224r1.cpp:_ZN5Botan9to_affineINS_6PCurve12_GLOBAL__N_19secp224r15CurveEEEDaRKNT_15ProjectivePointE:
   76|    217|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|    217|   if constexpr(curve_supports_fe_invert2<C>) {
   81|    217|      const auto z2_inv = C::fe_invert2(pt.z());
   82|    217|      const auto z3_inv = z2_inv.square() * pt.z();
   83|    217|      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|    217|}
pcurves_secp224r1.cpp:_ZZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_19secp224r15CurveELb1EEEDaNSt3__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_secp224r1.cpp:_ZN5Botan22point_add_or_sub_mixedINS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEES8_EENS_16AffineCurvePointISC_EESC_EET_RKSG_RKT0_NS_2CT6ChoiceERKT1_:
  296|  8.02k|                                                        const FieldElement& one) {
  297|  8.02k|   const auto a_is_identity = a.is_identity();
  298|  8.02k|   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|  8.02k|   auto by = b.y();
  307|  8.02k|   by.conditional_assign(sub, by.negate());
  308|       |
  309|  8.02k|   const auto Z1Z1 = a.z().square();
  310|  8.02k|   const auto U2 = b.x() * Z1Z1;
  311|  8.02k|   const auto S2 = by * a.z() * Z1Z1;
  312|  8.02k|   const auto H = U2 - a.x();
  313|  8.02k|   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|  8.02k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (325:7): [True: 0, False: 8.02k]
  ------------------
  326|      0|      return a.dbl();
  327|      0|   }
  328|       |
  329|  8.02k|   const auto HH = H.square();
  330|  8.02k|   const auto HHH = H * HH;
  331|  8.02k|   const auto V = a.x() * HH;
  332|  8.02k|   const auto t2 = r.square();
  333|  8.02k|   const auto t3 = V + V;
  334|  8.02k|   const auto t4 = t2 - HHH;
  335|  8.02k|   auto X3 = t4 - t3;
  336|  8.02k|   const auto t5 = V - X3;
  337|  8.02k|   const auto t6 = a.y() * HHH;
  338|  8.02k|   const auto t7 = r * t5;
  339|  8.02k|   auto Y3 = t7 - t6;
  340|  8.02k|   auto Z3 = a.z() * H;
  341|       |
  342|       |   // if a is identity then return b
  343|  8.02k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), by, one);
  344|       |
  345|       |   // if b is identity then return a
  346|  8.02k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  347|       |
  348|  8.02k|   return ProjectivePoint(X3, Y3, Z3);
  349|  8.02k|}
pcurves_secp256k1.cpp:_ZN5Botan10dbl_a_zeroINS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEES8_EEEET_RKSE_:
  381|    833|inline constexpr ProjectivePoint dbl_a_zero(const ProjectivePoint& pt) {
  382|       |   // If a == 0 then 3*x^2 + a*z^4 == 3*x^2
  383|       |   // Cost: 1S + 1*3
  384|    833|   const auto m = pt.x().square().mul3();
  385|       |
  386|       |   // Remaining cost: 3M + 3S + 3A + 2*2 + 1*4 + 1*8
  387|    833|   const auto y2 = pt.y().square();
  388|    833|   const auto s = pt.x().mul4() * y2;
  389|    833|   const auto nx = m.square() - s.mul2();
  390|    833|   const auto ny = m * (s - nx) - y2.square().mul8();
  391|    833|   const auto nz = pt.y().mul2() * pt.z();
  392|       |
  393|    833|   return ProjectivePoint(nx, ny, nz);
  394|    833|}
pcurves_secp256k1.cpp:_ZN5Botan9point_addINS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS5_6ParamsES6_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_secp256k1.cpp:_ZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_19secp256k15CurveELb1EEEDaNSt3__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_secp256k1.cpp:_ZN5Botan9to_affineINS_6PCurve12_GLOBAL__N_19secp256k15CurveEEEDaRKNT_15ProjectivePointE:
   76|    219|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|    219|   if constexpr(curve_supports_fe_invert2<C>) {
   81|    219|      const auto z2_inv = C::fe_invert2(pt.z());
   82|    219|      const auto z3_inv = z2_inv.square() * pt.z();
   83|    219|      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|    219|}
pcurves_secp256k1.cpp:_ZZN5Botan15to_affine_batchINS_6PCurve12_GLOBAL__N_19secp256k15CurveELb1EEEDaNSt3__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_secp256k1.cpp:_ZN5Botan22point_add_or_sub_mixedINS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEES8_EENS_16AffineCurvePointISC_EESC_EET_RKSG_RKT0_NS_2CT6ChoiceERKT1_:
  296|  9.19k|                                                        const FieldElement& one) {
  297|  9.19k|   const auto a_is_identity = a.is_identity();
  298|  9.19k|   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|  9.19k|   auto by = b.y();
  307|  9.19k|   by.conditional_assign(sub, by.negate());
  308|       |
  309|  9.19k|   const auto Z1Z1 = a.z().square();
  310|  9.19k|   const auto U2 = b.x() * Z1Z1;
  311|  9.19k|   const auto S2 = by * a.z() * Z1Z1;
  312|  9.19k|   const auto H = U2 - a.x();
  313|  9.19k|   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|  9.19k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (325:7): [True: 0, False: 9.19k]
  ------------------
  326|      0|      return a.dbl();
  327|      0|   }
  328|       |
  329|  9.19k|   const auto HH = H.square();
  330|  9.19k|   const auto HHH = H * HH;
  331|  9.19k|   const auto V = a.x() * HH;
  332|  9.19k|   const auto t2 = r.square();
  333|  9.19k|   const auto t3 = V + V;
  334|  9.19k|   const auto t4 = t2 - HHH;
  335|  9.19k|   auto X3 = t4 - t3;
  336|  9.19k|   const auto t5 = V - X3;
  337|  9.19k|   const auto t6 = a.y() * HHH;
  338|  9.19k|   const auto t7 = r * t5;
  339|  9.19k|   auto Y3 = t7 - t6;
  340|  9.19k|   auto Z3 = a.z() * H;
  341|       |
  342|       |   // if a is identity then return b
  343|  9.19k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), by, one);
  344|       |
  345|       |   // if b is identity then return a
  346|  9.19k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  347|       |
  348|  9.19k|   return ProjectivePoint(X3, Y3, Z3);
  349|  9.19k|}
pcurves_secp256r1.cpp:_ZN5Botan13dbl_a_minus_3INS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS4_9secp256r16ParamsES5_E11FieldParamsEEEEES8_EEEET_RKSE_:
  362|    833|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|    833|   const auto z2 = pt.z().square();
  368|    833|   const auto m = (pt.x() - z2).mul3() * (pt.x() + z2);
  369|       |
  370|       |   // Remaining cost: 3M + 3S + 3A + 2*2 + 1*4 + 1*8
  371|    833|   const auto y2 = pt.y().square();
  372|    833|   const auto s = pt.x().mul4() * y2;
  373|    833|   const auto nx = m.square() - s.mul2();
  374|    833|   const auto ny = m * (s - nx) - y2.square().mul8();
  375|    833|   const auto nz = pt.y().mul2() * pt.z();
  376|       |
  377|    833|   return ProjectivePoint(nx, ny, nz);
  378|    833|}
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|     73|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|     73|   if constexpr(curve_supports_fe_invert2<C>) {
   81|     73|      const auto z2_inv = C::fe_invert2(pt.z());
   82|     73|      const auto z3_inv = z2_inv.square() * pt.z();
   83|     73|      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|     73|}
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|  3.06k|                                                        const FieldElement& one) {
  297|  3.06k|   const auto a_is_identity = a.is_identity();
  298|  3.06k|   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|  3.06k|   auto by = b.y();
  307|  3.06k|   by.conditional_assign(sub, by.negate());
  308|       |
  309|  3.06k|   const auto Z1Z1 = a.z().square();
  310|  3.06k|   const auto U2 = b.x() * Z1Z1;
  311|  3.06k|   const auto S2 = by * a.z() * Z1Z1;
  312|  3.06k|   const auto H = U2 - a.x();
  313|  3.06k|   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|  3.06k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (325:7): [True: 0, False: 3.06k]
  ------------------
  326|      0|      return a.dbl();
  327|      0|   }
  328|       |
  329|  3.06k|   const auto HH = H.square();
  330|  3.06k|   const auto HHH = H * HH;
  331|  3.06k|   const auto V = a.x() * HH;
  332|  3.06k|   const auto t2 = r.square();
  333|  3.06k|   const auto t3 = V + V;
  334|  3.06k|   const auto t4 = t2 - HHH;
  335|  3.06k|   auto X3 = t4 - t3;
  336|  3.06k|   const auto t5 = V - X3;
  337|  3.06k|   const auto t6 = a.y() * HHH;
  338|  3.06k|   const auto t7 = r * t5;
  339|  3.06k|   auto Y3 = t7 - t6;
  340|  3.06k|   auto Z3 = a.z() * H;
  341|       |
  342|       |   // if a is identity then return b
  343|  3.06k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), by, one);
  344|       |
  345|       |   // if b is identity then return a
  346|  3.06k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  347|       |
  348|  3.06k|   return ProjectivePoint(X3, Y3, Z3);
  349|  3.06k|}
pcurves_secp384r1.cpp:_ZN5Botan13dbl_a_minus_3INS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS4_9secp384r16ParamsES5_E11FieldParamsEEEEES8_EEEET_RKSE_:
  362|  1.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|  1.24k|   const auto z2 = pt.z().square();
  368|  1.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|  1.24k|   const auto y2 = pt.y().square();
  372|  1.24k|   const auto s = pt.x().mul4() * y2;
  373|  1.24k|   const auto nx = m.square() - s.mul2();
  374|  1.24k|   const auto ny = m * (s - nx) - y2.square().mul8();
  375|  1.24k|   const auto nz = pt.y().mul2() * pt.z();
  376|       |
  377|  1.24k|   return ProjectivePoint(nx, ny, nz);
  378|  1.24k|}
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|    196|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|    196|   if constexpr(curve_supports_fe_invert2<C>) {
   81|    196|      const auto z2_inv = C::fe_invert2(pt.z());
   82|    196|      const auto z3_inv = z2_inv.square() * pt.z();
   83|    196|      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|    196|}
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|  12.5k|                                                        const FieldElement& one) {
  297|  12.5k|   const auto a_is_identity = a.is_identity();
  298|  12.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|  12.5k|   auto by = b.y();
  307|  12.5k|   by.conditional_assign(sub, by.negate());
  308|       |
  309|  12.5k|   const auto Z1Z1 = a.z().square();
  310|  12.5k|   const auto U2 = b.x() * Z1Z1;
  311|  12.5k|   const auto S2 = by * a.z() * Z1Z1;
  312|  12.5k|   const auto H = U2 - a.x();
  313|  12.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|  12.5k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (325:7): [True: 0, False: 12.5k]
  ------------------
  326|      0|      return a.dbl();
  327|      0|   }
  328|       |
  329|  12.5k|   const auto HH = H.square();
  330|  12.5k|   const auto HHH = H * HH;
  331|  12.5k|   const auto V = a.x() * HH;
  332|  12.5k|   const auto t2 = r.square();
  333|  12.5k|   const auto t3 = V + V;
  334|  12.5k|   const auto t4 = t2 - HHH;
  335|  12.5k|   auto X3 = t4 - t3;
  336|  12.5k|   const auto t5 = V - X3;
  337|  12.5k|   const auto t6 = a.y() * HHH;
  338|  12.5k|   const auto t7 = r * t5;
  339|  12.5k|   auto Y3 = t7 - t6;
  340|  12.5k|   auto Z3 = a.z() * H;
  341|       |
  342|       |   // if a is identity then return b
  343|  12.5k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), by, one);
  344|       |
  345|       |   // if b is identity then return a
  346|  12.5k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  347|       |
  348|  12.5k|   return ProjectivePoint(X3, Y3, Z3);
  349|  12.5k|}
pcurves_secp521r1.cpp:_ZN5Botan13dbl_a_minus_3INS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS5_6ParamsES6_E11FieldParamsEEEEES8_EEEET_RKSE_:
  362|  1.64k|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|  1.64k|   const auto z2 = pt.z().square();
  368|  1.64k|   const auto m = (pt.x() - z2).mul3() * (pt.x() + z2);
  369|       |
  370|       |   // Remaining cost: 3M + 3S + 3A + 2*2 + 1*4 + 1*8
  371|  1.64k|   const auto y2 = pt.y().square();
  372|  1.64k|   const auto s = pt.x().mul4() * y2;
  373|  1.64k|   const auto nx = m.square() - s.mul2();
  374|  1.64k|   const auto ny = m * (s - nx) - y2.square().mul8();
  375|  1.64k|   const auto nz = pt.y().mul2() * pt.z();
  376|       |
  377|  1.64k|   return ProjectivePoint(nx, ny, nz);
  378|  1.64k|}
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|    204|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|    204|   if constexpr(curve_supports_fe_invert2<C>) {
   81|    204|      const auto z2_inv = C::fe_invert2(pt.z());
   82|    204|      const auto z3_inv = z2_inv.square() * pt.z();
   83|    204|      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|    204|}
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|  17.5k|                                                        const FieldElement& one) {
  297|  17.5k|   const auto a_is_identity = a.is_identity();
  298|  17.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|  17.5k|   auto by = b.y();
  307|  17.5k|   by.conditional_assign(sub, by.negate());
  308|       |
  309|  17.5k|   const auto Z1Z1 = a.z().square();
  310|  17.5k|   const auto U2 = b.x() * Z1Z1;
  311|  17.5k|   const auto S2 = by * a.z() * Z1Z1;
  312|  17.5k|   const auto H = U2 - a.x();
  313|  17.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|  17.5k|   if((r.is_zero() && H.is_zero() && !(a_is_identity && b_is_identity)).as_bool()) {
  ------------------
  |  Branch (325:7): [True: 0, False: 17.5k]
  ------------------
  326|      0|      return a.dbl();
  327|      0|   }
  328|       |
  329|  17.5k|   const auto HH = H.square();
  330|  17.5k|   const auto HHH = H * HH;
  331|  17.5k|   const auto V = a.x() * HH;
  332|  17.5k|   const auto t2 = r.square();
  333|  17.5k|   const auto t3 = V + V;
  334|  17.5k|   const auto t4 = t2 - HHH;
  335|  17.5k|   auto X3 = t4 - t3;
  336|  17.5k|   const auto t5 = V - X3;
  337|  17.5k|   const auto t6 = a.y() * HHH;
  338|  17.5k|   const auto t7 = r * t5;
  339|  17.5k|   auto Y3 = t7 - t6;
  340|  17.5k|   auto Z3 = a.z() * H;
  341|       |
  342|       |   // if a is identity then return b
  343|  17.5k|   FieldElement::conditional_assign(X3, Y3, Z3, a_is_identity, b.x(), by, one);
  344|       |
  345|       |   // if b is identity then return a
  346|  17.5k|   FieldElement::conditional_assign(X3, Y3, Z3, b_is_identity, a.x(), a.y(), a.z());
  347|       |
  348|  17.5k|   return ProjectivePoint(X3, Y3, Z3);
  349|  17.5k|}

_ZNK5Botan6PCurve22GenericPrimeOrderCurve7_paramsEv:
  117|  71.7M|      const GenericCurveParams& _params() const { return *m_params; }

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|    105|      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|    105|         auto x = pt.x();
 1027|    105|         auto y = pt.y();
 1028|    105|         auto z = FieldElement::one();
 1029|       |
 1030|    105|         FieldElement::conditional_swap(pt.is_identity(), y, z);
 1031|       |
 1032|    105|         return ProjectiveCurvePoint(x, y, z);
 1033|    105|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEEE1xEv:
  971|   157k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_brainpool256r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEEE1yEv:
  976|   152k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE3oneEv:
  200|  4.57k|      static constexpr Self one() { return Self(Rep::one()); }
pcurves_brainpool256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES0_E11FieldParamsEE3oneEv:
   99|  4.57k|      constexpr static std::array<W, N> one() { return R1; }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEEC2ENSt3__15arrayImLm4EEE:
  898|   146k|      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|    105|      static constexpr void conditional_swap(CT::Choice cond, Self& x, Self& y) {
  411|    105|         const W mask = cond.into_bitmask<W>();
  412|       |
  413|    525|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (413:28): [True: 420, False: 105]
  ------------------
  414|    420|            auto nx = Botan::choose(mask, y.m_val[i], x.m_val[i]);
  415|    420|            auto ny = Botan::choose(mask, x.m_val[i], y.m_val[i]);
  416|    420|            x.m_val[i] = nx;
  417|    420|            y.m_val[i] = ny;
  418|    420|         }
  419|    105|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEEE11is_identityEv:
  928|  4.78k|      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|  27.1k|      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|  6.24k|            m_x(x), m_y(y), m_z(z) {}
pcurves_brainpool256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E3dblEv:
 1121|    833|      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|    833|         } else {
 1127|    833|            return dbl_generic(*this, A);
 1128|    833|         }
 1129|    833|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E1zEv:
 1172|  35.9k|      constexpr const FieldElement& z() const { return m_z; }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE6squareEv:
  426|  23.6k|      constexpr BOTAN_FORCE_INLINE Self square() const {
  427|  23.6k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  428|  23.6k|         comba_sqr<N>(z.data(), this->data());
  429|  23.6k|         return Self(Rep::redc(z));
  430|  23.6k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE4dataEv:
  896|   182k|      constexpr const W* data() const { return m_val.data(); }
pcurves_brainpool256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES0_E11FieldParamsEE4redcERKNSt3__15arrayImLm8EEE:
  104|   113k|      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|   113k|         } else {
  108|   113k|            return monty_redc(z, P, P_dash);
  109|   113k|         }
  110|   113k|      }
pcurves_brainpool256r1.cpp:_ZN5BotanplERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEEESC_:
  265|  7.15k|      friend constexpr BOTAN_FORCE_INLINE Self operator+(const Self& a, const Self& b) {
  266|  7.15k|         std::array<W, N> t;  // NOLINT(*-member-init)
  267|       |
  268|  7.15k|         W carry = 0;
  269|  35.7k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (269:28): [True: 28.6k, False: 7.15k]
  ------------------
  270|  28.6k|            t[i] = word_add(a.m_val[i], b.m_val[i], &carry);
  271|  28.6k|         }
  272|       |
  273|  7.15k|         std::array<W, N> r;  // NOLINT(*-member-init)
  274|  7.15k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  275|  7.15k|         return Self(r);
  276|  7.15k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E1xEv:
 1162|  19.6k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE4mul3Ev:
  335|    833|      constexpr inline Self mul3() const { return mul2() + (*this); }
pcurves_brainpool256r1.cpp:_ZN5BotanmlERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEEESC_:
  346|  57.6k|      friend constexpr BOTAN_FORCE_INLINE Self operator*(const Self& a, const Self& b) {
  347|  57.6k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  348|  57.6k|         comba_mul<N>(z.data(), a.data(), b.data());
  349|  57.6k|         return Self(Rep::redc(z));
  350|  57.6k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E1yEv:
 1167|  19.6k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE4mul4Ev:
  338|    833|      constexpr inline Self mul4() const { return mul2().mul2(); }
pcurves_brainpool256r1.cpp:_ZN5BotanmiERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEEESC_:
  281|  33.1k|      friend constexpr BOTAN_FORCE_INLINE Self operator-(const Self& a, const Self& b) {
  282|  33.1k|         std::array<W, N> r;  // NOLINT(*-member-init)
  283|  33.1k|         W carry = 0;
  284|   165k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (284:28): [True: 132k, False: 33.1k]
  ------------------
  285|   132k|            r[i] = word_sub(a.m_val[i], b.m_val[i], &carry);
  286|   132k|         }
  287|       |
  288|  33.1k|         const auto mask = CT::Mask<W>::expand(carry).value();
  289|       |
  290|  33.1k|         carry = 0;
  291|       |
  292|   165k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (292:28): [True: 132k, False: 33.1k]
  ------------------
  293|   132k|            r[i] = word_add(r[i], P[i] & mask, &carry);
  294|   132k|         }
  295|       |
  296|  33.1k|         return Self(r);
  297|  33.1k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE4mul2Ev:
  325|  6.66k|      constexpr BOTAN_FORCE_INLINE Self mul2() const {
  326|  6.66k|         std::array<W, N> t = value();
  327|  6.66k|         const W carry = shift_left<1>(t);
  328|       |
  329|  6.66k|         std::array<W, N> r;  // NOLINT(*-member-init)
  330|  6.66k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  331|  6.66k|         return Self(r);
  332|  6.66k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE5valueEv:
  894|  6.66k|      constexpr const std::array<W, N>& value() const { return m_val; }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE4mul8Ev:
  341|    833|      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|  7.40k|      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|  10.3k|         Self& x, Self& y, Self& z, CT::Choice cond, const Self& nx, const Self& ny, const Self& nz) {
  396|  10.3k|         const W mask = cond.into_bitmask<W>();
  397|       |
  398|  51.5k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (398:28): [True: 41.2k, False: 10.3k]
  ------------------
  399|  41.2k|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  400|  41.2k|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  401|  41.2k|            z.m_val[i] = Botan::choose(mask, nz.m_val[i], z.m_val[i]);
  402|  41.2k|         }
  403|  10.3k|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE6invertEv:
  538|    104|      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|    104|      constexpr Self pow_vartime(const std::array<W, N>& exp) const {
  478|    104|         constexpr size_t WindowBits = (Self::BITS <= 256) ? 4 : 5;
  ------------------
  |  Branch (478:40): [True: 0, Folded]
  ------------------
  479|    104|         constexpr size_t WindowElements = (1 << WindowBits) - 1;
  480|       |
  481|    104|         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|    104|         std::array<Self, WindowElements> tbl;
  490|       |
  491|    104|         tbl[0] = (*this);
  492|       |
  493|  1.56k|         for(size_t i = 1; i != WindowElements; ++i) {
  ------------------
  |  Branch (493:28): [True: 1.45k, False: 104]
  ------------------
  494|       |            // Conditional ok: table indexes are public here
  495|  1.45k|            if(i % 2 == 1) {
  ------------------
  |  Branch (495:16): [True: 728, False: 728]
  ------------------
  496|    728|               tbl[i] = tbl[i / 2].square();
  497|    728|            } else {
  498|    728|               tbl[i] = tbl[i - 1] * tbl[0];
  499|    728|            }
  500|  1.45k|         }
  501|       |
  502|    104|         auto r = Self::one();
  503|       |
  504|    104|         const size_t w0 = read_window_bits<WindowBits>(std::span{exp}, (Windows - 1) * WindowBits);
  505|       |
  506|       |         // Conditional ok: this function is variable time
  507|    104|         if(w0 > 0) {
  ------------------
  |  Branch (507:13): [True: 104, False: 0]
  ------------------
  508|    104|            r = tbl[w0 - 1];
  509|    104|         }
  510|       |
  511|  6.65k|         for(size_t i = 1; i != Windows; ++i) {
  ------------------
  |  Branch (511:28): [True: 6.55k, False: 104]
  ------------------
  512|  6.55k|            r.square_n(WindowBits);
  513|       |
  514|  6.55k|            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|  6.55k|            if(w > 0) {
  ------------------
  |  Branch (517:16): [True: 6.13k, False: 416]
  ------------------
  518|  6.13k|               r *= tbl[w - 1];
  519|  6.13k|            }
  520|  6.55k|         }
  521|       |
  522|    104|         return r;
  523|    104|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEEC2Ev:
  180|  1.56k|      constexpr IntMod() : m_val({}) {}
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE8square_nEm:
  439|  6.55k|      constexpr void square_n(size_t n) {
  440|  6.55k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  441|  32.7k|         for(size_t i = 0; i != n; ++i) {
  ------------------
  |  Branch (441:28): [True: 26.2k, False: 6.55k]
  ------------------
  442|  26.2k|            comba_sqr<N>(z.data(), this->data());
  443|  26.2k|            m_val = Rep::redc(z);
  444|  26.2k|         }
  445|  6.55k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEEmLERKSA_:
  355|  6.13k|      constexpr BOTAN_FORCE_INLINE Self& operator*=(const Self& other) {
  356|  6.13k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  357|  6.13k|         comba_mul<N>(z.data(), data(), other.data());
  358|  6.13k|         m_val = Rep::redc(z);
  359|  6.13k|         return (*this);
  360|  6.13k|      }
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|  8.94k|      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|    209|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|    209|         std::array<W, 2 * N> ze = {};
  139|    209|         copy_mem(std::span{ze}.template first<N>(), z);
  140|    209|         return Self::redc(ze);
  141|    209|      }
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|  4.47k|      constexpr Self negate() const {
  453|  4.47k|         const W x_is_zero = ~CT::all_zeros(this->data(), N).value();
  454|       |
  455|  4.47k|         std::array<W, N> r;  // NOLINT(*-member-init)
  456|  4.47k|         W carry = 0;
  457|  22.3k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (457:28): [True: 17.8k, False: 4.47k]
  ------------------
  458|  17.8k|            r[i] = word_sub(P[i] & x_is_zero, m_val[i], &carry);
  459|  17.8k|         }
  460|       |
  461|  4.47k|         return Self(r);
  462|  4.47k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES0_E11FieldParamsEE6to_repERKNSt3__15arrayImLm4EEE:
  115|      1|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|      1|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|      1|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|      1|         return Self::redc(z);
  119|      1|      }
pcurves_brainpool256r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEEEC2ERKSB_SE_:
  917|  6.35k|      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|    520|      std::array<W, L> stash_value() const {
  760|    520|         static_assert(L >= N);
  761|    520|         std::array<W, L> stash = {};
  762|  2.60k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 2.08k, False: 520]
  ------------------
  763|  2.08k|            stash[i] = m_val[i];
  764|  2.08k|         }
  765|    520|         return stash;
  766|    520|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm6EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1407|    104|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1408|    104|         const BlindedScalar scalar(s, rng);
 1409|    104|         return basemul_booth_exec<C, WindowBits>(m_table, scalar, rng);
 1410|    104|      }
pcurves_brainpool256r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm7EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    104|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    104|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 104, Folded]
  |  Branch (1308:33): [True: 0, False: 104]
  ------------------
 1309|      0|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|      0|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|      0|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|      0|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|      0|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|      0|            W mask[n_words] = {0};
 1318|      0|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|      0|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|      0|            if constexpr(ExcessBits > 0) {
 1323|      0|               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|      0|               mask[MaskWords - 1] &= ExcessMask;
 1325|      0|            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|      0|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|      0|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|      0|            mask[0] |= 1;
 1331|       |
 1332|      0|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|      0|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|      0|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|      0|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|      0|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|      0|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|      0|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    104|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|    104|            m_bytes.resize(C::Scalar::BYTES);
 1346|    104|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|    104|            m_bits = C::Scalar::BITS;
 1348|    104|         }
 1349|       |
 1350|    104|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    104|      }
pcurves_brainpool256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES0_E12ScalarParamsEE8from_repERKNSt3__15arrayImLm4EEE:
  137|    233|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|    233|         std::array<W, 2 * N> ze = {};
  139|    233|         copy_mem(std::span{ze}.template first<N>(), z);
  140|    233|         return Self::redc(ze);
  141|    233|      }
pcurves_brainpool256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES0_E12ScalarParamsEE4redcERKNSt3__15arrayImLm8EEE:
  104|    363|      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|    363|         } else {
  108|    363|            return monty_redc(z, P, P_dash);
  109|    363|         }
  110|    363|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E12ScalarParamsEEEE12serialize_toENSt3__14spanIhLm32EEE:
  739|    233|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    233|         auto v = Rep::from_rep(m_val);
  741|    233|         std::reverse(v.begin(), v.end());
  742|       |
  743|    233|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|    233|            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|    233|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm7EE4bitsEv:
 1305|    104|      size_t bits() const { return m_bits; }
pcurves_brainpool256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E18conditional_assignENS_2CT6ChoiceERKSC_:
 1084|    104|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
 1085|    104|         FieldElement::conditional_assign(m_x, m_y, m_z, cond, pt.x(), pt.y(), pt.z());
 1086|    104|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E6negateEv:
 1134|    104|      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|    104|      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|    312|      constexpr void _const_time_poison() const { CT::poison(m_val); }
pcurves_brainpool256r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm7EE10get_windowEm:
 1353|  4.47k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  4.47k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  4.47k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E10add_or_subERKSC_RKNS_16AffineCurvePointISB_EENS_2CT6ChoiceE:
 1096|  4.36k|      constexpr static Self add_or_sub(const Self& a, const AffinePoint& b, CT::Choice sub) {
 1097|  4.36k|         return point_add_or_sub_mixed<Self, AffinePoint, FieldElement>(a, b, sub, FieldElement::one());
 1098|  4.36k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE18conditional_assignENS_2CT6ChoiceERKSA_:
  367|  4.36k|      constexpr void conditional_assign(CT::Choice cond, const Self& nx) {
  368|  4.36k|         const W mask = cond.into_bitmask<W>();
  369|       |
  370|  21.8k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (370:28): [True: 17.4k, False: 4.36k]
  ------------------
  371|  17.4k|            m_val[i] = Botan::choose(mask, nx.m_val[i], m_val[i]);
  372|  17.4k|         }
  373|  4.36k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEEE9ct_selectENSt3__14spanIKSC_Lm18446744073709551615EEEm:
  955|  4.47k|      static constexpr auto ct_select(std::span<const Self> pts, size_t idx) {
  956|  4.47k|         auto result = Self::identity(pts[0]);
  957|       |
  958|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
  959|  4.47k|         const size_t idx1 = static_cast<size_t>(idx - 1);
  960|   147k|         for(size_t i = 0; i != pts.size(); ++i) {
  ------------------
  |  Branch (960:28): [True: 143k, False: 4.47k]
  ------------------
  961|   143k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
  962|   143k|            result.conditional_assign(found, pts[i]);
  963|   143k|         }
  964|       |
  965|  4.47k|         return result;
  966|  4.47k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEEE8identityERKSC_:
  924|  4.47k|      static constexpr Self identity(const Self& /*unused*/) {
  925|  4.47k|         return Self(FieldElement::zero(), FieldElement::zero());
  926|  4.47k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEEE18conditional_assignENS_2CT6ChoiceERKSC_:
  981|   143k|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
  982|   143k|         FieldElement::conditional_assign(m_x, m_y, cond, pt.x(), pt.y());
  983|   143k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE18conditional_assignERSA_SB_NS_2CT6ChoiceERKSA_SF_:
  380|   143k|      static constexpr void conditional_assign(Self& x, Self& y, CT::Choice cond, const Self& nx, const Self& ny) {
  381|   143k|         const W mask = cond.into_bitmask<W>();
  382|       |
  383|   715k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (383:28): [True: 572k, False: 143k]
  ------------------
  384|   572k|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  385|   572k|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  386|   572k|         }
  387|   143k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E13randomize_repERNS_21RandomNumberGeneratorE:
 1142|    416|      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|    416|         if(rng.is_seeded()) {
  ------------------
  |  Branch (1147:13): [True: 0, False: 416]
  ------------------
 1148|      0|            auto r = FieldElement::random(rng);
 1149|       |
 1150|      0|            auto r2 = r.square();
 1151|      0|            auto r3 = r2 * r;
 1152|       |
 1153|      0|            m_x *= r2;
 1154|      0|            m_y *= r3;
 1155|      0|            m_z *= r;
 1156|      0|         }
 1157|    416|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEES7_E20_const_time_unpoisonEv:
 1176|    104|      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|    312|      constexpr void _const_time_unpoison() const { CT::unpoison(m_val); }
pcurves_brainpool256r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm7EED2Ev:
 1358|    104|      ~BlindedScalarBits() {
 1359|    104|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    104|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    104|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E12ScalarParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|    362|      static Self from_stash(const std::array<W, L>& stash) {
  775|    362|         static_assert(L >= N);
  776|    362|         std::array<W, N> val = {};
  777|  1.81k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 1.44k, False: 362]
  ------------------
  778|  1.44k|            val[i] = stash[i];
  779|  1.44k|         }
  780|    362|         return Self(val);
  781|    362|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E12ScalarParamsEEEEC2ENSt3__15arrayImLm4EEE:
  898|    492|      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|    208|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    208|         auto v = Rep::from_rep(m_val);
  741|    208|         std::reverse(v.begin(), v.end());
  742|       |
  743|    208|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|    208|            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|    208|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E12ScalarParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|    129|      std::array<W, L> stash_value() const {
  760|    129|         static_assert(L >= N);
  761|    129|         std::array<W, L> stash = {};
  762|    645|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 516, False: 129]
  ------------------
  763|    516|            stash[i] = m_val[i];
  764|    516|         }
  765|    129|         return stash;
  766|    129|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E11FieldParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|    728|      static Self from_stash(const std::array<W, L>& stash) {
  775|    728|         static_assert(L >= N);
  776|    728|         std::array<W, N> val = {};
  777|  3.64k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 2.91k, False: 728]
  ------------------
  778|  2.91k|            val[i] = stash[i];
  779|  2.91k|         }
  780|    728|         return Self(val);
  781|    728|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E12ScalarParamsEEEE7is_zeroEv:
  225|    259|      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|    104|      constexpr CT::Choice operator==(const Self& other) const {
  723|    104|         return CT::is_equal(this->data(), other.data(), N).as_choice();
  724|    104|      }
pcurves_brainpool256r1.cpp:_ZN5Botan13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsENS_13MontgomeryRepEE7x3_ax_bERKNS_6IntModINS5_INS6_11FieldParamsEEEEE:
 1275|    104|      static constexpr FieldElement x3_ax_b(const FieldElement& x) { return (x.square() + A) * x + B; }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E12ScalarParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|    130|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|    130|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 130]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|    130|         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|    130|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 0, False: 130]
  ------------------
  802|      0|            return {};
  803|      0|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|    130|         return Self::from_words(words);
  807|    130|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES1_E12ScalarParamsEEEE10from_wordsILm4EEESA_NSt3__15arrayImXT_EEE:
  211|    130|      static constexpr Self from_words(std::array<W, L> w) {
  212|    130|         if constexpr(L == N) {
  213|    130|            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|    130|      }
pcurves_brainpool256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES0_E12ScalarParamsEE6to_repERKNSt3__15arrayImLm4EEE:
  115|    130|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|    130|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|    130|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|    130|         return Self::redc(z);
  119|    130|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool256r16ParamsES2_E11FieldParamsEEEEEE12serialize_toENSt3__14spanIhLm65EEE:
  941|    104|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  942|    104|         BOTAN_STATE_CHECK(this->is_identity().as_bool() == false);
  ------------------
  |  |   51|    104|   do {                                                         \
  |  |   52|    104|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    104|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 104]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    104|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 104]
  |  |  ------------------
  ------------------
  943|    104|         BufferStuffer pack(bytes);
  944|    104|         pack.append(0x04);
  945|    104|         x().serialize_to(pack.next<FieldElement::BYTES>());
  946|    104|         y().serialize_to(pack.next<FieldElement::BYTES>());
  947|    104|         BOTAN_DEBUG_ASSERT(pack.full());
  ------------------
  |  |  130|    104|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    104|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 104]
  |  |  ------------------
  ------------------
  948|    104|      }
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|    166|      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|    166|         auto x = pt.x();
 1027|    166|         auto y = pt.y();
 1028|    166|         auto z = FieldElement::one();
 1029|       |
 1030|    166|         FieldElement::conditional_swap(pt.is_identity(), y, z);
 1031|       |
 1032|    166|         return ProjectiveCurvePoint(x, y, z);
 1033|    166|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEEE1xEv:
  971|   376k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_brainpool384r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEEE1yEv:
  976|   365k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE3oneEv:
  200|  10.8k|      static constexpr Self one() { return Self(Rep::one()); }
pcurves_brainpool384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES0_E11FieldParamsEE3oneEv:
   99|  10.8k|      constexpr static std::array<W, N> one() { return R1; }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEEC2ENSt3__15arrayImLm6EEE:
  898|   311k|      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|    166|      static constexpr void conditional_swap(CT::Choice cond, Self& x, Self& y) {
  411|    166|         const W mask = cond.into_bitmask<W>();
  412|       |
  413|  1.16k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (413:28): [True: 996, False: 166]
  ------------------
  414|    996|            auto nx = Botan::choose(mask, y.m_val[i], x.m_val[i]);
  415|    996|            auto ny = Botan::choose(mask, x.m_val[i], y.m_val[i]);
  416|    996|            x.m_val[i] = nx;
  417|    996|            y.m_val[i] = ny;
  418|    996|         }
  419|    166|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEEE11is_identityEv:
  928|  11.2k|      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|  60.8k|      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|  13.3k|            m_x(x), m_y(y), m_z(z) {}
pcurves_brainpool384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E3dblEv:
 1121|  1.24k|      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|  1.24k|         } else {
 1127|  1.24k|            return dbl_generic(*this, A);
 1128|  1.24k|         }
 1129|  1.24k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E1zEv:
 1172|  73.8k|      constexpr const FieldElement& z() const { return m_z; }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE6squareEv:
  426|  48.8k|      constexpr BOTAN_FORCE_INLINE Self square() const {
  427|  48.8k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  428|  48.8k|         comba_sqr<N>(z.data(), this->data());
  429|  48.8k|         return Self(Rep::redc(z));
  430|  48.8k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE4dataEv:
  896|   386k|      constexpr const W* data() const { return m_val.data(); }
pcurves_brainpool384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES0_E11FieldParamsEE4redcERKNSt3__15arrayImLm12EEE:
  104|   243k|      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|   243k|         } else {
  108|   243k|            return monty_redc(z, P, P_dash);
  109|   243k|         }
  110|   243k|      }
pcurves_brainpool384r1.cpp:_ZN5BotanplERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEEESC_:
  265|  14.7k|      friend constexpr BOTAN_FORCE_INLINE Self operator+(const Self& a, const Self& b) {
  266|  14.7k|         std::array<W, N> t;  // NOLINT(*-member-init)
  267|       |
  268|  14.7k|         W carry = 0;
  269|   103k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (269:28): [True: 88.3k, False: 14.7k]
  ------------------
  270|  88.3k|            t[i] = word_add(a.m_val[i], b.m_val[i], &carry);
  271|  88.3k|         }
  272|       |
  273|  14.7k|         std::array<W, N> r;  // NOLINT(*-member-init)
  274|  14.7k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  275|  14.7k|         return Self(r);
  276|  14.7k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E1xEv:
 1162|  41.5k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE4mul3Ev:
  335|  1.24k|      constexpr inline Self mul3() const { return mul2() + (*this); }
pcurves_brainpool384r1.cpp:_ZN5BotanmlERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEEESC_:
  346|   119k|      friend constexpr BOTAN_FORCE_INLINE Self operator*(const Self& a, const Self& b) {
  347|   119k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  348|   119k|         comba_mul<N>(z.data(), a.data(), b.data());
  349|   119k|         return Self(Rep::redc(z));
  350|   119k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E1yEv:
 1167|  41.5k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE4mul4Ev:
  338|  1.24k|      constexpr inline Self mul4() const { return mul2().mul2(); }
pcurves_brainpool384r1.cpp:_ZN5BotanmiERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEEESC_:
  281|  73.6k|      friend constexpr BOTAN_FORCE_INLINE Self operator-(const Self& a, const Self& b) {
  282|  73.6k|         std::array<W, N> r;  // NOLINT(*-member-init)
  283|  73.6k|         W carry = 0;
  284|   515k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (284:28): [True: 441k, False: 73.6k]
  ------------------
  285|   441k|            r[i] = word_sub(a.m_val[i], b.m_val[i], &carry);
  286|   441k|         }
  287|       |
  288|  73.6k|         const auto mask = CT::Mask<W>::expand(carry).value();
  289|       |
  290|  73.6k|         carry = 0;
  291|       |
  292|   515k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (292:28): [True: 441k, False: 73.6k]
  ------------------
  293|   441k|            r[i] = word_add(r[i], P[i] & mask, &carry);
  294|   441k|         }
  295|       |
  296|  73.6k|         return Self(r);
  297|  73.6k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE4mul2Ev:
  325|  9.92k|      constexpr BOTAN_FORCE_INLINE Self mul2() const {
  326|  9.92k|         std::array<W, N> t = value();
  327|  9.92k|         const W carry = shift_left<1>(t);
  328|       |
  329|  9.92k|         std::array<W, N> r;  // NOLINT(*-member-init)
  330|  9.92k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  331|  9.92k|         return Self(r);
  332|  9.92k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE5valueEv:
  894|  9.92k|      constexpr const std::array<W, N>& value() const { return m_val; }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE4mul8Ev:
  341|  1.24k|      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|  15.0k|      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|  23.4k|         Self& x, Self& y, Self& z, CT::Choice cond, const Self& nx, const Self& ny, const Self& nz) {
  396|  23.4k|         const W mask = cond.into_bitmask<W>();
  397|       |
  398|   164k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (398:28): [True: 140k, False: 23.4k]
  ------------------
  399|   140k|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  400|   140k|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  401|   140k|            z.m_val[i] = Botan::choose(mask, nz.m_val[i], z.m_val[i]);
  402|   140k|         }
  403|  23.4k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE6invertEv:
  538|    165|      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|    165|      constexpr Self pow_vartime(const std::array<W, N>& exp) const {
  478|    165|         constexpr size_t WindowBits = (Self::BITS <= 256) ? 4 : 5;
  ------------------
  |  Branch (478:40): [Folded, False: 165]
  ------------------
  479|    165|         constexpr size_t WindowElements = (1 << WindowBits) - 1;
  480|       |
  481|    165|         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|    165|         std::array<Self, WindowElements> tbl;
  490|       |
  491|    165|         tbl[0] = (*this);
  492|       |
  493|  5.11k|         for(size_t i = 1; i != WindowElements; ++i) {
  ------------------
  |  Branch (493:28): [True: 4.95k, False: 165]
  ------------------
  494|       |            // Conditional ok: table indexes are public here
  495|  4.95k|            if(i % 2 == 1) {
  ------------------
  |  Branch (495:16): [True: 2.47k, False: 2.47k]
  ------------------
  496|  2.47k|               tbl[i] = tbl[i / 2].square();
  497|  2.47k|            } else {
  498|  2.47k|               tbl[i] = tbl[i - 1] * tbl[0];
  499|  2.47k|            }
  500|  4.95k|         }
  501|       |
  502|    165|         auto r = Self::one();
  503|       |
  504|    165|         const size_t w0 = read_window_bits<WindowBits>(std::span{exp}, (Windows - 1) * WindowBits);
  505|       |
  506|       |         // Conditional ok: this function is variable time
  507|    165|         if(w0 > 0) {
  ------------------
  |  Branch (507:13): [True: 165, False: 0]
  ------------------
  508|    165|            r = tbl[w0 - 1];
  509|    165|         }
  510|       |
  511|  12.7k|         for(size_t i = 1; i != Windows; ++i) {
  ------------------
  |  Branch (511:28): [True: 12.5k, False: 165]
  ------------------
  512|  12.5k|            r.square_n(WindowBits);
  513|       |
  514|  12.5k|            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|  12.5k|            if(w > 0) {
  ------------------
  |  Branch (517:16): [True: 12.0k, False: 495]
  ------------------
  518|  12.0k|               r *= tbl[w - 1];
  519|  12.0k|            }
  520|  12.5k|         }
  521|       |
  522|    165|         return r;
  523|    165|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEEC2Ev:
  180|  5.11k|      constexpr IntMod() : m_val({}) {}
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE8square_nEm:
  439|  12.5k|      constexpr void square_n(size_t n) {
  440|  12.5k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  441|  75.2k|         for(size_t i = 0; i != n; ++i) {
  ------------------
  |  Branch (441:28): [True: 62.7k, False: 12.5k]
  ------------------
  442|  62.7k|            comba_sqr<N>(z.data(), this->data());
  443|  62.7k|            m_val = Rep::redc(z);
  444|  62.7k|         }
  445|  12.5k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEEmLERKSA_:
  355|  12.0k|      constexpr BOTAN_FORCE_INLINE Self& operator*=(const Self& other) {
  356|  12.0k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  357|  12.0k|         comba_mul<N>(z.data(), data(), other.data());
  358|  12.0k|         m_val = Rep::redc(z);
  359|  12.0k|         return (*this);
  360|  12.0k|      }
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|  21.4k|      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|    331|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|    331|         std::array<W, 2 * N> ze = {};
  139|    331|         copy_mem(std::span{ze}.template first<N>(), z);
  140|    331|         return Self::redc(ze);
  141|    331|      }
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|  10.7k|      constexpr Self negate() const {
  453|  10.7k|         const W x_is_zero = ~CT::all_zeros(this->data(), N).value();
  454|       |
  455|  10.7k|         std::array<W, N> r;  // NOLINT(*-member-init)
  456|  10.7k|         W carry = 0;
  457|  75.0k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (457:28): [True: 64.3k, False: 10.7k]
  ------------------
  458|  64.3k|            r[i] = word_sub(P[i] & x_is_zero, m_val[i], &carry);
  459|  64.3k|         }
  460|       |
  461|  10.7k|         return Self(r);
  462|  10.7k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES0_E11FieldParamsEE6to_repERKNSt3__15arrayImLm6EEE:
  115|      1|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|      1|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|      1|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|      1|         return Self::redc(z);
  119|      1|      }
pcurves_brainpool384r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEEEC2ERKSB_SE_:
  917|  13.5k|      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|    825|      std::array<W, L> stash_value() const {
  760|    825|         static_assert(L >= N);
  761|    825|         std::array<W, L> stash = {};
  762|  5.77k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 4.95k, False: 825]
  ------------------
  763|  4.95k|            stash[i] = m_val[i];
  764|  4.95k|         }
  765|    825|         return stash;
  766|    825|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm6EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1407|    165|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1408|    165|         const BlindedScalar scalar(s, rng);
 1409|    165|         return basemul_booth_exec<C, WindowBits>(m_table, scalar, rng);
 1410|    165|      }
pcurves_brainpool384r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm7EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    165|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    165|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 165, Folded]
  |  Branch (1308:33): [True: 0, False: 165]
  ------------------
 1309|      0|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|      0|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|      0|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|      0|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|      0|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|      0|            W mask[n_words] = {0};
 1318|      0|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|      0|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|      0|            if constexpr(ExcessBits > 0) {
 1323|      0|               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|      0|               mask[MaskWords - 1] &= ExcessMask;
 1325|      0|            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|      0|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|      0|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|      0|            mask[0] |= 1;
 1331|       |
 1332|      0|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|      0|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|      0|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|      0|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|      0|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|      0|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|      0|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    165|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|    165|            m_bytes.resize(C::Scalar::BYTES);
 1346|    165|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|    165|            m_bits = C::Scalar::BITS;
 1348|    165|         }
 1349|       |
 1350|    165|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    165|      }
pcurves_brainpool384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES0_E12ScalarParamsEE8from_repERKNSt3__15arrayImLm6EEE:
  137|    350|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|    350|         std::array<W, 2 * N> ze = {};
  139|    350|         copy_mem(std::span{ze}.template first<N>(), z);
  140|    350|         return Self::redc(ze);
  141|    350|      }
pcurves_brainpool384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES0_E12ScalarParamsEE4redcERKNSt3__15arrayImLm12EEE:
  104|    536|      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|    536|         } else {
  108|    536|            return monty_redc(z, P, P_dash);
  109|    536|         }
  110|    536|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E12ScalarParamsEEEE12serialize_toENSt3__14spanIhLm48EEE:
  739|    350|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    350|         auto v = Rep::from_rep(m_val);
  741|    350|         std::reverse(v.begin(), v.end());
  742|       |
  743|    350|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|    350|            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|    350|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm7EE4bitsEv:
 1305|    165|      size_t bits() const { return m_bits; }
pcurves_brainpool384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E18conditional_assignENS_2CT6ChoiceERKSC_:
 1084|    165|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
 1085|    165|         FieldElement::conditional_assign(m_x, m_y, m_z, cond, pt.x(), pt.y(), pt.z());
 1086|    165|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E6negateEv:
 1134|    165|      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|    165|      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|    495|      constexpr void _const_time_poison() const { CT::poison(m_val); }
pcurves_brainpool384r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm7EE10get_windowEm:
 1353|  10.7k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  10.7k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  10.7k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E10add_or_subERKSC_RKNS_16AffineCurvePointISB_EENS_2CT6ChoiceE:
 1096|  10.5k|      constexpr static Self add_or_sub(const Self& a, const AffinePoint& b, CT::Choice sub) {
 1097|  10.5k|         return point_add_or_sub_mixed<Self, AffinePoint, FieldElement>(a, b, sub, FieldElement::one());
 1098|  10.5k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE18conditional_assignENS_2CT6ChoiceERKSA_:
  367|  10.5k|      constexpr void conditional_assign(CT::Choice cond, const Self& nx) {
  368|  10.5k|         const W mask = cond.into_bitmask<W>();
  369|       |
  370|  73.9k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (370:28): [True: 63.3k, False: 10.5k]
  ------------------
  371|  63.3k|            m_val[i] = Botan::choose(mask, nx.m_val[i], m_val[i]);
  372|  63.3k|         }
  373|  10.5k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEEE9ct_selectENSt3__14spanIKSC_Lm18446744073709551615EEEm:
  955|  10.7k|      static constexpr auto ct_select(std::span<const Self> pts, size_t idx) {
  956|  10.7k|         auto result = Self::identity(pts[0]);
  957|       |
  958|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
  959|  10.7k|         const size_t idx1 = static_cast<size_t>(idx - 1);
  960|   353k|         for(size_t i = 0; i != pts.size(); ++i) {
  ------------------
  |  Branch (960:28): [True: 343k, False: 10.7k]
  ------------------
  961|   343k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
  962|   343k|            result.conditional_assign(found, pts[i]);
  963|   343k|         }
  964|       |
  965|  10.7k|         return result;
  966|  10.7k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEEE8identityERKSC_:
  924|  10.7k|      static constexpr Self identity(const Self& /*unused*/) {
  925|  10.7k|         return Self(FieldElement::zero(), FieldElement::zero());
  926|  10.7k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEEE18conditional_assignENS_2CT6ChoiceERKSC_:
  981|   343k|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
  982|   343k|         FieldElement::conditional_assign(m_x, m_y, cond, pt.x(), pt.y());
  983|   343k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE18conditional_assignERSA_SB_NS_2CT6ChoiceERKSA_SF_:
  380|   343k|      static constexpr void conditional_assign(Self& x, Self& y, CT::Choice cond, const Self& nx, const Self& ny) {
  381|   343k|         const W mask = cond.into_bitmask<W>();
  382|       |
  383|  2.40M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (383:28): [True: 2.05M, False: 343k]
  ------------------
  384|  2.05M|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  385|  2.05M|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  386|  2.05M|         }
  387|   343k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E13randomize_repERNS_21RandomNumberGeneratorE:
 1142|    660|      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|    660|         if(rng.is_seeded()) {
  ------------------
  |  Branch (1147:13): [True: 0, False: 660]
  ------------------
 1148|      0|            auto r = FieldElement::random(rng);
 1149|       |
 1150|      0|            auto r2 = r.square();
 1151|      0|            auto r3 = r2 * r;
 1152|       |
 1153|      0|            m_x *= r2;
 1154|      0|            m_y *= r3;
 1155|      0|            m_z *= r;
 1156|      0|         }
 1157|    660|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEES7_E20_const_time_unpoisonEv:
 1176|    165|      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|    495|      constexpr void _const_time_unpoison() const { CT::unpoison(m_val); }
pcurves_brainpool384r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm7EED2Ev:
 1358|    165|      ~BlindedScalarBits() {
 1359|    165|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    165|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    165|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E12ScalarParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|    535|      static Self from_stash(const std::array<W, L>& stash) {
  775|    535|         static_assert(L >= N);
  776|    535|         std::array<W, N> val = {};
  777|  3.74k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 3.21k, False: 535]
  ------------------
  778|  3.21k|            val[i] = stash[i];
  779|  3.21k|         }
  780|    535|         return Self(val);
  781|    535|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E12ScalarParamsEEEEC2ENSt3__15arrayImLm6EEE:
  898|    721|      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|    330|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    330|         auto v = Rep::from_rep(m_val);
  741|    330|         std::reverse(v.begin(), v.end());
  742|       |
  743|    330|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|    330|            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|    330|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E12ScalarParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|    185|      std::array<W, L> stash_value() const {
  760|    185|         static_assert(L >= N);
  761|    185|         std::array<W, L> stash = {};
  762|  1.29k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 1.11k, False: 185]
  ------------------
  763|  1.11k|            stash[i] = m_val[i];
  764|  1.11k|         }
  765|    185|         return stash;
  766|    185|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E11FieldParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|  1.15k|      static Self from_stash(const std::array<W, L>& stash) {
  775|  1.15k|         static_assert(L >= N);
  776|  1.15k|         std::array<W, N> val = {};
  777|  8.08k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 6.93k, False: 1.15k]
  ------------------
  778|  6.93k|            val[i] = stash[i];
  779|  6.93k|         }
  780|  1.15k|         return Self(val);
  781|  1.15k|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E12ScalarParamsEEEE7is_zeroEv:
  225|    371|      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|    165|      constexpr CT::Choice operator==(const Self& other) const {
  723|    165|         return CT::is_equal(this->data(), other.data(), N).as_choice();
  724|    165|      }
pcurves_brainpool384r1.cpp:_ZN5Botan13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsENS_13MontgomeryRepEE7x3_ax_bERKNS_6IntModINS5_INS6_11FieldParamsEEEEE:
 1275|    165|      static constexpr FieldElement x3_ax_b(const FieldElement& x) { return (x.square() + A) * x + B; }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E12ScalarParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|    186|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|    186|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 186]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|    186|         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|    186|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 0, False: 186]
  ------------------
  802|      0|            return {};
  803|      0|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|    186|         return Self::from_words(words);
  807|    186|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES1_E12ScalarParamsEEEE10from_wordsILm6EEESA_NSt3__15arrayImXT_EEE:
  211|    186|      static constexpr Self from_words(std::array<W, L> w) {
  212|    186|         if constexpr(L == N) {
  213|    186|            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|    186|      }
pcurves_brainpool384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES0_E12ScalarParamsEE6to_repERKNSt3__15arrayImLm6EEE:
  115|    186|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|    186|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|    186|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|    186|         return Self::redc(z);
  119|    186|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool384r16ParamsES2_E11FieldParamsEEEEEE12serialize_toENSt3__14spanIhLm97EEE:
  941|    165|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  942|    165|         BOTAN_STATE_CHECK(this->is_identity().as_bool() == false);
  ------------------
  |  |   51|    165|   do {                                                         \
  |  |   52|    165|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    165|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 165]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    165|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 165]
  |  |  ------------------
  ------------------
  943|    165|         BufferStuffer pack(bytes);
  944|    165|         pack.append(0x04);
  945|    165|         x().serialize_to(pack.next<FieldElement::BYTES>());
  946|    165|         y().serialize_to(pack.next<FieldElement::BYTES>());
  947|    165|         BOTAN_DEBUG_ASSERT(pack.full());
  ------------------
  |  |  130|    165|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    165|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 165]
  |  |  ------------------
  ------------------
  948|    165|      }
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|    140|      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|    140|         auto x = pt.x();
 1027|    140|         auto y = pt.y();
 1028|    140|         auto z = FieldElement::one();
 1029|       |
 1030|    140|         FieldElement::conditional_swap(pt.is_identity(), y, z);
 1031|       |
 1032|    140|         return ProjectiveCurvePoint(x, y, z);
 1033|    140|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEEE1xEv:
  971|   419k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_brainpool512r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEEE1yEv:
  976|   407k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE3oneEv:
  200|  12.0k|      static constexpr Self one() { return Self(Rep::one()); }
pcurves_brainpool512r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES0_E11FieldParamsEE3oneEv:
   99|  12.0k|      constexpr static std::array<W, N> one() { return R1; }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEEC2ENSt3__15arrayImLm8EEE:
  898|   360k|      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|    140|      static constexpr void conditional_swap(CT::Choice cond, Self& x, Self& y) {
  411|    140|         const W mask = cond.into_bitmask<W>();
  412|       |
  413|  1.26k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (413:28): [True: 1.12k, False: 140]
  ------------------
  414|  1.12k|            auto nx = Botan::choose(mask, y.m_val[i], x.m_val[i]);
  415|  1.12k|            auto ny = Botan::choose(mask, x.m_val[i], y.m_val[i]);
  416|  1.12k|            x.m_val[i] = nx;
  417|  1.12k|            y.m_val[i] = ny;
  418|  1.12k|         }
  419|    140|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEEE11is_identityEv:
  928|  12.3k|      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|  69.1k|      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|  15.3k|            m_x(x), m_y(y), m_z(z) {}
pcurves_brainpool512r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E3dblEv:
 1121|  1.64k|      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|  1.64k|         } else {
 1127|  1.64k|            return dbl_generic(*this, A);
 1128|  1.64k|         }
 1129|  1.64k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E1zEv:
 1172|  86.7k|      constexpr const FieldElement& z() const { return m_z; }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE6squareEv:
  426|  56.7k|      constexpr BOTAN_FORCE_INLINE Self square() const {
  427|  56.7k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  428|  56.7k|         comba_sqr<N>(z.data(), this->data());
  429|  56.7k|         return Self(Rep::redc(z));
  430|  56.7k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE4dataEv:
  896|   448k|      constexpr const W* data() const { return m_val.data(); }
pcurves_brainpool512r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES0_E11FieldParamsEE4redcERKNSt3__15arrayImLm16EEE:
  104|   281k|      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|   281k|         } else {
  108|   281k|            return monty_redc(z, P, P_dash);
  109|   281k|         }
  110|   281k|      }
pcurves_brainpool512r1.cpp:_ZN5BotanplERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEEESC_:
  265|  17.2k|      friend constexpr BOTAN_FORCE_INLINE Self operator+(const Self& a, const Self& b) {
  266|  17.2k|         std::array<W, N> t;  // NOLINT(*-member-init)
  267|       |
  268|  17.2k|         W carry = 0;
  269|   154k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (269:28): [True: 137k, False: 17.2k]
  ------------------
  270|   137k|            t[i] = word_add(a.m_val[i], b.m_val[i], &carry);
  271|   137k|         }
  272|       |
  273|  17.2k|         std::array<W, N> r;  // NOLINT(*-member-init)
  274|  17.2k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  275|  17.2k|         return Self(r);
  276|  17.2k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E1xEv:
 1162|  48.2k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE4mul3Ev:
  335|  1.64k|      constexpr inline Self mul3() const { return mul2() + (*this); }
pcurves_brainpool512r1.cpp:_ZN5BotanmlERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEEESC_:
  346|   139k|      friend constexpr BOTAN_FORCE_INLINE Self operator*(const Self& a, const Self& b) {
  347|   139k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  348|   139k|         comba_mul<N>(z.data(), a.data(), b.data());
  349|   139k|         return Self(Rep::redc(z));
  350|   139k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E1yEv:
 1167|  48.2k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE4mul4Ev:
  338|  1.64k|      constexpr inline Self mul4() const { return mul2().mul2(); }
pcurves_brainpool512r1.cpp:_ZN5BotanmiERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEEESC_:
  281|  84.5k|      friend constexpr BOTAN_FORCE_INLINE Self operator-(const Self& a, const Self& b) {
  282|  84.5k|         std::array<W, N> r;  // NOLINT(*-member-init)
  283|  84.5k|         W carry = 0;
  284|   761k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (284:28): [True: 676k, False: 84.5k]
  ------------------
  285|   676k|            r[i] = word_sub(a.m_val[i], b.m_val[i], &carry);
  286|   676k|         }
  287|       |
  288|  84.5k|         const auto mask = CT::Mask<W>::expand(carry).value();
  289|       |
  290|  84.5k|         carry = 0;
  291|       |
  292|   761k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (292:28): [True: 676k, False: 84.5k]
  ------------------
  293|   676k|            r[i] = word_add(r[i], P[i] & mask, &carry);
  294|   676k|         }
  295|       |
  296|  84.5k|         return Self(r);
  297|  84.5k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE4mul2Ev:
  325|  13.1k|      constexpr BOTAN_FORCE_INLINE Self mul2() const {
  326|  13.1k|         std::array<W, N> t = value();
  327|  13.1k|         const W carry = shift_left<1>(t);
  328|       |
  329|  13.1k|         std::array<W, N> r;  // NOLINT(*-member-init)
  330|  13.1k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  331|  13.1k|         return Self(r);
  332|  13.1k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE5valueEv:
  894|  13.1k|      constexpr const std::array<W, N>& value() const { return m_val; }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE4mul8Ev:
  341|  1.64k|      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|  17.8k|      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|  26.6k|         Self& x, Self& y, Self& z, CT::Choice cond, const Self& nx, const Self& ny, const Self& nz) {
  396|  26.6k|         const W mask = cond.into_bitmask<W>();
  397|       |
  398|   240k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (398:28): [True: 213k, False: 26.6k]
  ------------------
  399|   213k|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  400|   213k|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  401|   213k|            z.m_val[i] = Botan::choose(mask, nz.m_val[i], z.m_val[i]);
  402|   213k|         }
  403|  26.6k|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE6invertEv:
  538|    139|      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|    139|      constexpr Self pow_vartime(const std::array<W, N>& exp) const {
  478|    139|         constexpr size_t WindowBits = (Self::BITS <= 256) ? 4 : 5;
  ------------------
  |  Branch (478:40): [Folded, False: 139]
  ------------------
  479|    139|         constexpr size_t WindowElements = (1 << WindowBits) - 1;
  480|       |
  481|    139|         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|    139|         std::array<Self, WindowElements> tbl;
  490|       |
  491|    139|         tbl[0] = (*this);
  492|       |
  493|  4.30k|         for(size_t i = 1; i != WindowElements; ++i) {
  ------------------
  |  Branch (493:28): [True: 4.17k, False: 139]
  ------------------
  494|       |            // Conditional ok: table indexes are public here
  495|  4.17k|            if(i % 2 == 1) {
  ------------------
  |  Branch (495:16): [True: 2.08k, False: 2.08k]
  ------------------
  496|  2.08k|               tbl[i] = tbl[i / 2].square();
  497|  2.08k|            } else {
  498|  2.08k|               tbl[i] = tbl[i - 1] * tbl[0];
  499|  2.08k|            }
  500|  4.17k|         }
  501|       |
  502|    139|         auto r = Self::one();
  503|       |
  504|    139|         const size_t w0 = read_window_bits<WindowBits>(std::span{exp}, (Windows - 1) * WindowBits);
  505|       |
  506|       |         // Conditional ok: this function is variable time
  507|    139|         if(w0 > 0) {
  ------------------
  |  Branch (507:13): [True: 139, False: 0]
  ------------------
  508|    139|            r = tbl[w0 - 1];
  509|    139|         }
  510|       |
  511|  14.3k|         for(size_t i = 1; i != Windows; ++i) {
  ------------------
  |  Branch (511:28): [True: 14.1k, False: 139]
  ------------------
  512|  14.1k|            r.square_n(WindowBits);
  513|       |
  514|  14.1k|            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|  14.1k|            if(w > 0) {
  ------------------
  |  Branch (517:16): [True: 13.9k, False: 278]
  ------------------
  518|  13.9k|               r *= tbl[w - 1];
  519|  13.9k|            }
  520|  14.1k|         }
  521|       |
  522|    139|         return r;
  523|    139|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEEC2Ev:
  180|  4.30k|      constexpr IntMod() : m_val({}) {}
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE8square_nEm:
  439|  14.1k|      constexpr void square_n(size_t n) {
  440|  14.1k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  441|  85.0k|         for(size_t i = 0; i != n; ++i) {
  ------------------
  |  Branch (441:28): [True: 70.8k, False: 14.1k]
  ------------------
  442|  70.8k|            comba_sqr<N>(z.data(), this->data());
  443|  70.8k|            m_val = Rep::redc(z);
  444|  70.8k|         }
  445|  14.1k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEEmLERKSA_:
  355|  13.9k|      constexpr BOTAN_FORCE_INLINE Self& operator*=(const Self& other) {
  356|  13.9k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  357|  13.9k|         comba_mul<N>(z.data(), data(), other.data());
  358|  13.9k|         m_val = Rep::redc(z);
  359|  13.9k|         return (*this);
  360|  13.9k|      }
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|  23.9k|      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|    279|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|    279|         std::array<W, 2 * N> ze = {};
  139|    279|         copy_mem(std::span{ze}.template first<N>(), z);
  140|    279|         return Self::redc(ze);
  141|    279|      }
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|  11.9k|      constexpr Self negate() const {
  453|  11.9k|         const W x_is_zero = ~CT::all_zeros(this->data(), N).value();
  454|       |
  455|  11.9k|         std::array<W, N> r;  // NOLINT(*-member-init)
  456|  11.9k|         W carry = 0;
  457|   107k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (457:28): [True: 95.6k, False: 11.9k]
  ------------------
  458|  95.6k|            r[i] = word_sub(P[i] & x_is_zero, m_val[i], &carry);
  459|  95.6k|         }
  460|       |
  461|  11.9k|         return Self(r);
  462|  11.9k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES0_E11FieldParamsEE6to_repERKNSt3__15arrayImLm8EEE:
  115|      1|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|      1|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|      1|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|      1|         return Self::redc(z);
  119|      1|      }
pcurves_brainpool512r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEEEC2ERKSB_SE_:
  917|  15.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|    695|      std::array<W, L> stash_value() const {
  760|    695|         static_assert(L >= N);
  761|    695|         std::array<W, L> stash = {};
  762|  6.25k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 5.56k, False: 695]
  ------------------
  763|  5.56k|            stash[i] = m_val[i];
  764|  5.56k|         }
  765|    695|         return stash;
  766|    695|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm6EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1407|    139|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1408|    139|         const BlindedScalar scalar(s, rng);
 1409|    139|         return basemul_booth_exec<C, WindowBits>(m_table, scalar, rng);
 1410|    139|      }
pcurves_brainpool512r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm7EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    139|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    139|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 139, Folded]
  |  Branch (1308:33): [True: 0, False: 139]
  ------------------
 1309|      0|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|      0|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|      0|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|      0|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|      0|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|      0|            W mask[n_words] = {0};
 1318|      0|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|      0|            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|      0|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|      0|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|      0|            mask[0] |= 1;
 1331|       |
 1332|      0|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|      0|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|      0|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|      0|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|      0|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|      0|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|      0|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    139|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|    139|            m_bytes.resize(C::Scalar::BYTES);
 1346|    139|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|    139|            m_bits = C::Scalar::BITS;
 1348|    139|         }
 1349|       |
 1350|    139|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    139|      }
pcurves_brainpool512r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES0_E12ScalarParamsEE8from_repERKNSt3__15arrayImLm8EEE:
  137|    287|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|    287|         std::array<W, 2 * N> ze = {};
  139|    287|         copy_mem(std::span{ze}.template first<N>(), z);
  140|    287|         return Self::redc(ze);
  141|    287|      }
pcurves_brainpool512r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES0_E12ScalarParamsEE4redcERKNSt3__15arrayImLm16EEE:
  104|    436|      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|    436|         } else {
  108|    436|            return monty_redc(z, P, P_dash);
  109|    436|         }
  110|    436|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E12ScalarParamsEEEE12serialize_toENSt3__14spanIhLm64EEE:
  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_brainpool512r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm7EE4bitsEv:
 1305|    139|      size_t bits() const { return m_bits; }
pcurves_brainpool512r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E18conditional_assignENS_2CT6ChoiceERKSC_:
 1084|    139|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
 1085|    139|         FieldElement::conditional_assign(m_x, m_y, m_z, cond, pt.x(), pt.y(), pt.z());
 1086|    139|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E6negateEv:
 1134|    139|      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|    139|      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|    417|      constexpr void _const_time_poison() const { CT::poison(m_val); }
pcurves_brainpool512r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm7EE10get_windowEm:
 1353|  11.9k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  11.9k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  11.9k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E10add_or_subERKSC_RKNS_16AffineCurvePointISB_EENS_2CT6ChoiceE:
 1096|  11.8k|      constexpr static Self add_or_sub(const Self& a, const AffinePoint& b, CT::Choice sub) {
 1097|  11.8k|         return point_add_or_sub_mixed<Self, AffinePoint, FieldElement>(a, b, sub, FieldElement::one());
 1098|  11.8k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE18conditional_assignENS_2CT6ChoiceERKSA_:
  367|  11.8k|      constexpr void conditional_assign(CT::Choice cond, const Self& nx) {
  368|  11.8k|         const W mask = cond.into_bitmask<W>();
  369|       |
  370|   106k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (370:28): [True: 94.5k, False: 11.8k]
  ------------------
  371|  94.5k|            m_val[i] = Botan::choose(mask, nx.m_val[i], m_val[i]);
  372|  94.5k|         }
  373|  11.8k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEEE9ct_selectENSt3__14spanIKSC_Lm18446744073709551615EEEm:
  955|  11.9k|      static constexpr auto ct_select(std::span<const Self> pts, size_t idx) {
  956|  11.9k|         auto result = Self::identity(pts[0]);
  957|       |
  958|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
  959|  11.9k|         const size_t idx1 = static_cast<size_t>(idx - 1);
  960|   394k|         for(size_t i = 0; i != pts.size(); ++i) {
  ------------------
  |  Branch (960:28): [True: 382k, False: 11.9k]
  ------------------
  961|   382k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
  962|   382k|            result.conditional_assign(found, pts[i]);
  963|   382k|         }
  964|       |
  965|  11.9k|         return result;
  966|  11.9k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEEE8identityERKSC_:
  924|  11.9k|      static constexpr Self identity(const Self& /*unused*/) {
  925|  11.9k|         return Self(FieldElement::zero(), FieldElement::zero());
  926|  11.9k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEEE18conditional_assignENS_2CT6ChoiceERKSC_:
  981|   382k|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
  982|   382k|         FieldElement::conditional_assign(m_x, m_y, cond, pt.x(), pt.y());
  983|   382k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE18conditional_assignERSA_SB_NS_2CT6ChoiceERKSA_SF_:
  380|   382k|      static constexpr void conditional_assign(Self& x, Self& y, CT::Choice cond, const Self& nx, const Self& ny) {
  381|   382k|         const W mask = cond.into_bitmask<W>();
  382|       |
  383|  3.44M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (383:28): [True: 3.06M, False: 382k]
  ------------------
  384|  3.06M|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  385|  3.06M|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  386|  3.06M|         }
  387|   382k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E13randomize_repERNS_21RandomNumberGeneratorE:
 1142|    556|      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|    556|         if(rng.is_seeded()) {
  ------------------
  |  Branch (1147:13): [True: 0, False: 556]
  ------------------
 1148|      0|            auto r = FieldElement::random(rng);
 1149|       |
 1150|      0|            auto r2 = r.square();
 1151|      0|            auto r3 = r2 * r;
 1152|       |
 1153|      0|            m_x *= r2;
 1154|      0|            m_y *= r3;
 1155|      0|            m_z *= r;
 1156|      0|         }
 1157|    556|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEES7_E20_const_time_unpoisonEv:
 1176|    139|      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|    417|      constexpr void _const_time_unpoison() const { CT::unpoison(m_val); }
pcurves_brainpool512r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm7EED2Ev:
 1358|    139|      ~BlindedScalarBits() {
 1359|    139|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    139|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    139|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E12ScalarParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|    435|      static Self from_stash(const std::array<W, L>& stash) {
  775|    435|         static_assert(L >= N);
  776|    435|         std::array<W, N> val = {};
  777|  3.91k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 3.48k, False: 435]
  ------------------
  778|  3.48k|            val[i] = stash[i];
  779|  3.48k|         }
  780|    435|         return Self(val);
  781|    435|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E12ScalarParamsEEEEC2ENSt3__15arrayImLm8EEE:
  898|    584|      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|    278|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    278|         auto v = Rep::from_rep(m_val);
  741|    278|         std::reverse(v.begin(), v.end());
  742|       |
  743|    278|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|    278|            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|    278|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E12ScalarParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|    148|      std::array<W, L> stash_value() const {
  760|    148|         static_assert(L >= N);
  761|    148|         std::array<W, L> stash = {};
  762|  1.33k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 1.18k, False: 148]
  ------------------
  763|  1.18k|            stash[i] = m_val[i];
  764|  1.18k|         }
  765|    148|         return stash;
  766|    148|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E11FieldParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|    973|      static Self from_stash(const std::array<W, L>& stash) {
  775|    973|         static_assert(L >= N);
  776|    973|         std::array<W, N> val = {};
  777|  8.75k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 7.78k, False: 973]
  ------------------
  778|  7.78k|            val[i] = stash[i];
  779|  7.78k|         }
  780|    973|         return Self(val);
  781|    973|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E12ScalarParamsEEEE7is_zeroEv:
  225|    297|      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|    139|      constexpr CT::Choice operator==(const Self& other) const {
  723|    139|         return CT::is_equal(this->data(), other.data(), N).as_choice();
  724|    139|      }
pcurves_brainpool512r1.cpp:_ZN5Botan13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsENS_13MontgomeryRepEE7x3_ax_bERKNS_6IntModINS5_INS6_11FieldParamsEEEEE:
 1275|    139|      static constexpr FieldElement x3_ax_b(const FieldElement& x) { return (x.square() + A) * x + B; }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E12ScalarParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|    149|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|    149|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 149]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|    149|         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|    149|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 0, False: 149]
  ------------------
  802|      0|            return {};
  803|      0|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|    149|         return Self::from_words(words);
  807|    149|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES1_E12ScalarParamsEEEE10from_wordsILm8EEESA_NSt3__15arrayImXT_EEE:
  211|    149|      static constexpr Self from_words(std::array<W, L> w) {
  212|    149|         if constexpr(L == N) {
  213|    149|            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|    149|      }
pcurves_brainpool512r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES0_E12ScalarParamsEE6to_repERKNSt3__15arrayImLm8EEE:
  115|    149|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|    149|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|    149|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|    149|         return Self::redc(z);
  119|    149|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_114brainpool512r16ParamsES2_E11FieldParamsEEEEEE12serialize_toENSt3__14spanIhLm129EEE:
  941|    139|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  942|    139|         BOTAN_STATE_CHECK(this->is_identity().as_bool() == false);
  ------------------
  |  |   51|    139|   do {                                                         \
  |  |   52|    139|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    139|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 139]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    139|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 139]
  |  |  ------------------
  ------------------
  943|    139|         BufferStuffer pack(bytes);
  944|    139|         pack.append(0x04);
  945|    139|         x().serialize_to(pack.next<FieldElement::BYTES>());
  946|    139|         y().serialize_to(pack.next<FieldElement::BYTES>());
  947|    139|         BOTAN_DEBUG_ASSERT(pack.full());
  ------------------
  |  |  130|    139|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    139|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 139]
  |  |  ------------------
  ------------------
  948|    139|      }
pcurves_secp224r1.cpp:_ZN5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_19secp224r15CurveELm6EEC2ERKNS_16AffineCurvePointINS_6IntModINS3_12Secp224r1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
 1405|      1|            m_table(basemul_booth_setup<C, WindowBits>(p, BlindedScalar::Bits + 1)) {}
pcurves_secp224r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E11from_affineERKNS_16AffineCurvePointISB_EE:
 1016|    218|      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|    218|         auto x = pt.x();
 1027|    218|         auto y = pt.y();
 1028|    218|         auto z = FieldElement::one();
 1029|       |
 1030|    218|         FieldElement::conditional_swap(pt.is_identity(), y, z);
 1031|       |
 1032|    218|         return ProjectiveCurvePoint(x, y, z);
 1033|    218|      }
pcurves_secp224r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE1xEv:
  971|   289k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_secp224r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE1yEv:
  976|   281k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_secp224r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE3oneEv:
  200|  8.24k|      static constexpr Self one() { return Self(Rep::one()); }
pcurves_secp224r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEC2ENSt3__15arrayImLm4EEE:
  898|   222k|      explicit constexpr IntMod(std::array<W, N> v) : m_val(v) {}
pcurves_secp224r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE16conditional_swapENS_2CT6ChoiceERSA_SD_:
  410|    218|      static constexpr void conditional_swap(CT::Choice cond, Self& x, Self& y) {
  411|    218|         const W mask = cond.into_bitmask<W>();
  412|       |
  413|  1.09k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (413:28): [True: 872, False: 218]
  ------------------
  414|    872|            auto nx = Botan::choose(mask, y.m_val[i], x.m_val[i]);
  415|    872|            auto ny = Botan::choose(mask, x.m_val[i], y.m_val[i]);
  416|    872|            x.m_val[i] = nx;
  417|    872|            y.m_val[i] = ny;
  418|    872|         }
  419|    218|      }
pcurves_secp224r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE11is_identityEv:
  928|  8.89k|      constexpr CT::Choice is_identity() const { return x().is_zero() && y().is_zero(); }
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE7is_zeroEv:
  225|  45.8k|      constexpr CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_val.size()).as_choice(); }
pcurves_secp224r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_EC2ERKSB_SE_SE_:
 1056|  10.0k|            m_x(x), m_y(y), m_z(z) {}
pcurves_secp224r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E3dblEv:
 1121|    731|      constexpr Self dbl() const {
 1122|    731|         if constexpr(Self::A_is_minus_3) {
 1123|    731|            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|    731|      }
pcurves_secp224r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E1zEv:
 1172|  53.2k|      constexpr const FieldElement& z() const { return m_z; }
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE6squareEv:
  426|  32.7k|      constexpr BOTAN_FORCE_INLINE Self square() const {
  427|  32.7k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  428|  32.7k|         comba_sqr<N>(z.data(), this->data());
  429|  32.7k|         return Self(Rep::redc(z));
  430|  32.7k|      }
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4dataEv:
  896|   262k|      constexpr const W* data() const { return m_val.data(); }
pcurves_secp224r1.cpp:_ZN5BotanmlERKNS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEESC_:
  346|  84.0k|      friend constexpr BOTAN_FORCE_INLINE Self operator*(const Self& a, const Self& b) {
  347|  84.0k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  348|  84.0k|         comba_mul<N>(z.data(), a.data(), b.data());
  349|  84.0k|         return Self(Rep::redc(z));
  350|  84.0k|      }
pcurves_secp224r1.cpp:_ZN5BotanmiERKNS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEESC_:
  281|  54.9k|      friend constexpr BOTAN_FORCE_INLINE Self operator-(const Self& a, const Self& b) {
  282|  54.9k|         std::array<W, N> r;  // NOLINT(*-member-init)
  283|  54.9k|         W carry = 0;
  284|   274k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (284:28): [True: 219k, False: 54.9k]
  ------------------
  285|   219k|            r[i] = word_sub(a.m_val[i], b.m_val[i], &carry);
  286|   219k|         }
  287|       |
  288|  54.9k|         const auto mask = CT::Mask<W>::expand(carry).value();
  289|       |
  290|  54.9k|         carry = 0;
  291|       |
  292|   274k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (292:28): [True: 219k, False: 54.9k]
  ------------------
  293|   219k|            r[i] = word_add(r[i], P[i] & mask, &carry);
  294|   219k|         }
  295|       |
  296|  54.9k|         return Self(r);
  297|  54.9k|      }
pcurves_secp224r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E1xEv:
 1162|  31.1k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4mul3Ev:
  335|    731|      constexpr inline Self mul3() const { return mul2() + (*this); }
pcurves_secp224r1.cpp:_ZN5BotanplERKNS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEESC_:
  265|  10.7k|      friend constexpr BOTAN_FORCE_INLINE Self operator+(const Self& a, const Self& b) {
  266|  10.7k|         std::array<W, N> t;  // NOLINT(*-member-init)
  267|       |
  268|  10.7k|         W carry = 0;
  269|  53.6k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (269:28): [True: 42.9k, False: 10.7k]
  ------------------
  270|  42.9k|            t[i] = word_add(a.m_val[i], b.m_val[i], &carry);
  271|  42.9k|         }
  272|       |
  273|  10.7k|         std::array<W, N> r;  // NOLINT(*-member-init)
  274|  10.7k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  275|  10.7k|         return Self(r);
  276|  10.7k|      }
pcurves_secp224r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E1yEv:
 1167|  30.3k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4mul4Ev:
  338|    731|      constexpr inline Self mul4() const { return mul2().mul2(); }
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4mul2Ev:
  325|  5.84k|      constexpr BOTAN_FORCE_INLINE Self mul2() const {
  326|  5.84k|         std::array<W, N> t = value();
  327|  5.84k|         const W carry = shift_left<1>(t);
  328|       |
  329|  5.84k|         std::array<W, N> r;  // NOLINT(*-member-init)
  330|  5.84k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  331|  5.84k|         return Self(r);
  332|  5.84k|      }
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE5valueEv:
  894|  5.84k|      constexpr const std::array<W, N>& value() const { return m_val; }
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4mul8Ev:
  341|    731|      constexpr inline Self mul8() const { return mul2().mul2().mul2(); }
pcurves_secp224r1.cpp:_ZN5BotanplERKNS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_EESE_:
 1064|    645|      friend constexpr Self operator+(const Self& a, const Self& b) { return Self::add(a, b); }
pcurves_secp224r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E3addERKSC_SE_:
 1103|    645|      constexpr static Self add(const Self& a, const Self& b) { return point_add<Self, FieldElement>(a, b); }
pcurves_secp224r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E11is_identityEv:
 1082|  10.6k|      constexpr CT::Choice is_identity() const { return z().is_zero(); }
pcurves_secp224r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE18conditional_assignERSA_SB_SB_NS_2CT6ChoiceERKSA_SF_SF_:
  395|  17.5k|         Self& x, Self& y, Self& z, CT::Choice cond, const Self& nx, const Self& ny, const Self& nz) {
  396|  17.5k|         const W mask = cond.into_bitmask<W>();
  397|       |
  398|  87.8k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (398:28): [True: 70.2k, False: 17.5k]
  ------------------
  399|  70.2k|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  400|  70.2k|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  401|  70.2k|            z.m_val[i] = Botan::choose(mask, nz.m_val[i], z.m_val[i]);
  402|  70.2k|         }
  403|  17.5k|      }
pcurves_secp224r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEmLERKSA_:
  355|  2.60k|      constexpr BOTAN_FORCE_INLINE Self& operator*=(const Self& other) {
  356|  2.60k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  357|  2.60k|         comba_mul<N>(z.data(), data(), other.data());
  358|  2.60k|         m_val = Rep::redc(z);
  359|  2.60k|         return (*this);
  360|  2.60k|      }
pcurves_secp224r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE8square_nEm:
  439|  1.73k|      constexpr void square_n(size_t n) {
  440|  1.73k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  441|  49.0k|         for(size_t i = 0; i != n; ++i) {
  ------------------
  |  Branch (441:28): [True: 47.3k, False: 1.73k]
  ------------------
  442|  47.3k|            comba_sqr<N>(z.data(), this->data());
  443|  47.3k|            m_val = Rep::redc(z);
  444|  47.3k|         }
  445|  1.73k|      }
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_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|    153|         for(;;) {
  618|       |            // Conditional ok: this function is variable time
  619|    153|            if(a.m_val == b.m_val) {
  ------------------
  |  Branch (619:16): [True: 1, False: 152]
  ------------------
  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|    152|            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|    152|            std::array<W, N> r;  // NOLINT(*-member-init)
  640|    152|            const word carry = bigint_sub3(r.data(), b.data(), N, a.data(), N);
  641|       |
  642|       |            // Conditional ok: this function is variable time
  643|    152|            if(carry == 0) {
  ------------------
  |  Branch (643:16): [True: 81, False: 71]
  ------------------
  644|       |               // b > a
  645|     81|               b.m_val = r;
  646|     81|               x = nx;
  647|     81|               Self::_invert_vartime_div2_helper(b, x);
  648|     81|            } else {
  649|       |               // We know this can't underflow because a > b
  650|     71|               bigint_sub3(r.data(), a.data(), N, b.data(), N);
  651|     71|               a.m_val = r;
  652|     71|               y = nx;
  653|     71|               Self::_invert_vartime_div2_helper(a, y);
  654|     71|            }
  655|    152|         }
  656|      1|      }
pcurves_secp224r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4zeroEv:
  195|  16.4k|      static constexpr Self zero() { return Self(std::array<W, N>{0}); }
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE8to_wordsEv:
  734|      1|      constexpr std::array<W, Self::N> to_words() const { return Rep::from_rep(m_val); }
pcurves_secp224r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE27_invert_vartime_div2_helperERSA_SB_:
  547|    154|      static constexpr void _invert_vartime_div2_helper(Self& a, Self& x) {
  548|    154|         constexpr auto INV_2 = p_div_2_plus_1(Rep::P);
  549|       |
  550|       |         // Conditional ok: this function is variable time
  551|    479|         while((a.m_val[0] & 1) != 1) {
  ------------------
  |  Branch (551:16): [True: 325, False: 154]
  ------------------
  552|    325|            shift_right<1>(a.m_val);
  553|       |
  554|    325|            const W borrow = shift_right<1>(x.m_val);
  555|       |
  556|       |            // Conditional ok: this function is variable time
  557|    325|            if(borrow) {
  ------------------
  |  Branch (557:16): [True: 200, False: 125]
  ------------------
  558|    200|               bigint_add2(x.m_val.data(), N, INV_2.data(), N);
  559|    200|            }
  560|    325|         }
  561|    154|      }
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE6negateEv:
  452|  8.24k|      constexpr Self negate() const {
  453|  8.24k|         const W x_is_zero = ~CT::all_zeros(this->data(), N).value();
  454|       |
  455|  8.24k|         std::array<W, N> r;  // NOLINT(*-member-init)
  456|  8.24k|         W carry = 0;
  457|  41.2k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (457:28): [True: 32.9k, False: 8.24k]
  ------------------
  458|  32.9k|            r[i] = word_sub(P[i] & x_is_zero, m_val[i], &carry);
  459|  32.9k|         }
  460|       |
  461|  8.24k|         return Self(r);
  462|  8.24k|      }
pcurves_secp224r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEEC2ERKSB_SE_:
  917|  10.2k|      constexpr AffineCurvePoint(const FieldElement& x, const FieldElement& y) : m_x(x), m_y(y) {}
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|  1.08k|      std::array<W, L> stash_value() const {
  760|  1.08k|         static_assert(L >= N);
  761|  1.08k|         std::array<W, L> stash = {};
  762|  5.42k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 4.34k, False: 1.08k]
  ------------------
  763|  4.34k|            stash[i] = m_val[i];
  764|  4.34k|         }
  765|  1.08k|         return stash;
  766|  1.08k|      }
pcurves_secp224r1.cpp:_ZNK5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_19secp224r15CurveELm6EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS3_12Secp224r1RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1407|    217|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1408|    217|         const BlindedScalar scalar(s, rng);
 1409|    217|         return basemul_booth_exec<C, WindowBits>(m_table, scalar, rng);
 1410|    217|      }
pcurves_secp224r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp224r15CurveELm7EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS3_12Secp224r1RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    217|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    217|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 217, Folded]
  |  Branch (1308:33): [True: 0, False: 217]
  ------------------
 1309|      0|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|      0|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|      0|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|      0|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|      0|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|      0|            W mask[n_words] = {0};
 1318|      0|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|      0|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|      0|            if constexpr(ExcessBits > 0) {
 1323|      0|               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|      0|               mask[MaskWords - 1] &= ExcessMask;
 1325|      0|            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|      0|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|      0|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|      0|            mask[0] |= 1;
 1331|       |
 1332|      0|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|      0|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|      0|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|      0|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|      0|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|      0|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|      0|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    217|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|    217|            m_bytes.resize(C::Scalar::BYTES);
 1346|    217|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|    217|            m_bits = C::Scalar::BITS;
 1348|    217|         }
 1349|       |
 1350|    217|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    217|      }
pcurves_secp224r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp224r16ParamsENS4_12Secp224r1RepEE12ScalarParamsEE8from_repERKNSt3__15arrayImLm4EEE:
  137|    534|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|    534|         std::array<W, 2 * N> ze = {};
  139|    534|         copy_mem(std::span{ze}.template first<N>(), z);
  140|    534|         return Self::redc(ze);
  141|    534|      }
pcurves_secp224r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp224r16ParamsENS4_12Secp224r1RepEE12ScalarParamsEE4redcERKNSt3__15arrayImLm8EEE:
  104|    852|      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|    852|         } else {
  108|    852|            return monty_redc(z, P, P_dash);
  109|    852|         }
  110|    852|      }
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp224r16ParamsENS5_12Secp224r1RepEE12ScalarParamsEEEE12serialize_toENSt3__14spanIhLm28EEE:
  739|    534|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    534|         auto v = Rep::from_rep(m_val);
  741|    534|         std::reverse(v.begin(), v.end());
  742|       |
  743|       |         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|       |            store_be(bytes, v);
  745|    534|         } else {
  746|       |            // Remove leading zero bytes
  747|    534|            const auto padded_bytes = store_be(v);
  748|    534|            constexpr size_t extra = N * WordInfo<W>::bytes - Self::BYTES;
  749|    534|            copy_mem(bytes, std::span{padded_bytes}.template subspan<extra, Self::BYTES>());
  750|    534|         }
  751|    534|      }
pcurves_secp224r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp224r15CurveELm7EE4bitsEv:
 1305|    217|      size_t bits() const { return m_bits; }
pcurves_secp224r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E18conditional_assignENS_2CT6ChoiceERKSC_:
 1084|    217|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
 1085|    217|         FieldElement::conditional_assign(m_x, m_y, m_z, cond, pt.x(), pt.y(), pt.z());
 1086|    217|      }
pcurves_secp224r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E6negateEv:
 1134|    217|      constexpr Self negate() const { return Self(x(), y().negate(), z()); }
pcurves_secp224r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E18_const_time_poisonEv:
 1174|    217|      constexpr void _const_time_poison() const { CT::poison_all(m_x, m_y, m_z); }
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE18_const_time_poisonEv:
  889|    651|      constexpr void _const_time_poison() const { CT::poison(m_val); }
pcurves_secp224r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp224r15CurveELm7EE10get_windowEm:
 1353|  8.24k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  8.24k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  8.24k|      }
pcurves_secp224r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E10add_or_subERKSC_RKNS_16AffineCurvePointISB_EENS_2CT6ChoiceE:
 1096|  8.02k|      constexpr static Self add_or_sub(const Self& a, const AffinePoint& b, CT::Choice sub) {
 1097|  8.02k|         return point_add_or_sub_mixed<Self, AffinePoint, FieldElement>(a, b, sub, FieldElement::one());
 1098|  8.02k|      }
pcurves_secp224r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE18conditional_assignENS_2CT6ChoiceERKSA_:
  367|  8.02k|      constexpr void conditional_assign(CT::Choice cond, const Self& nx) {
  368|  8.02k|         const W mask = cond.into_bitmask<W>();
  369|       |
  370|  40.1k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (370:28): [True: 32.1k, False: 8.02k]
  ------------------
  371|  32.1k|            m_val[i] = Botan::choose(mask, nx.m_val[i], m_val[i]);
  372|  32.1k|         }
  373|  8.02k|      }
pcurves_secp224r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE9ct_selectENSt3__14spanIKSC_Lm18446744073709551615EEEm:
  955|  8.24k|      static constexpr auto ct_select(std::span<const Self> pts, size_t idx) {
  956|  8.24k|         auto result = Self::identity(pts[0]);
  957|       |
  958|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
  959|  8.24k|         const size_t idx1 = static_cast<size_t>(idx - 1);
  960|   272k|         for(size_t i = 0; i != pts.size(); ++i) {
  ------------------
  |  Branch (960:28): [True: 263k, False: 8.24k]
  ------------------
  961|   263k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
  962|   263k|            result.conditional_assign(found, pts[i]);
  963|   263k|         }
  964|       |
  965|  8.24k|         return result;
  966|  8.24k|      }
pcurves_secp224r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE8identityERKSC_:
  924|  8.24k|      static constexpr Self identity(const Self& /*unused*/) {
  925|  8.24k|         return Self(FieldElement::zero(), FieldElement::zero());
  926|  8.24k|      }
pcurves_secp224r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE18conditional_assignENS_2CT6ChoiceERKSC_:
  981|   263k|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
  982|   263k|         FieldElement::conditional_assign(m_x, m_y, cond, pt.x(), pt.y());
  983|   263k|      }
pcurves_secp224r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE18conditional_assignERSA_SB_NS_2CT6ChoiceERKSA_SF_:
  380|   263k|      static constexpr void conditional_assign(Self& x, Self& y, CT::Choice cond, const Self& nx, const Self& ny) {
  381|   263k|         const W mask = cond.into_bitmask<W>();
  382|       |
  383|  1.31M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (383:28): [True: 1.05M, False: 263k]
  ------------------
  384|  1.05M|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  385|  1.05M|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  386|  1.05M|         }
  387|   263k|      }
pcurves_secp224r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E13randomize_repERNS_21RandomNumberGeneratorE:
 1142|    868|      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|    868|         if(rng.is_seeded()) {
  ------------------
  |  Branch (1147:13): [True: 0, False: 868]
  ------------------
 1148|      0|            auto r = FieldElement::random(rng);
 1149|       |
 1150|      0|            auto r2 = r.square();
 1151|      0|            auto r3 = r2 * r;
 1152|       |
 1153|      0|            m_x *= r2;
 1154|      0|            m_y *= r3;
 1155|      0|            m_z *= r;
 1156|      0|         }
 1157|    868|      }
pcurves_secp224r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|      6|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|      6|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 6]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|      6|         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|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 0, False: 6]
  ------------------
  802|      0|            return {};
  803|      0|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|      6|         return Self::from_words(words);
  807|      6|      }
pcurves_secp224r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE10from_wordsILm4EEESA_NSt3__15arrayImXT_EEE:
  211|      6|      static constexpr Self from_words(std::array<W, L> w) {
  212|      6|         if constexpr(L == N) {
  213|      6|            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|      }
pcurves_secp224r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E20_const_time_unpoisonEv:
 1176|    217|      constexpr void _const_time_unpoison() const { CT::unpoison_all(m_x, m_y, m_z); }
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE20_const_time_unpoisonEv:
  891|    651|      constexpr void _const_time_unpoison() const { CT::unpoison(m_val); }
pcurves_secp224r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp224r15CurveELm7EED2Ev:
 1358|    217|      ~BlindedScalarBits() {
 1359|    217|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    217|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    217|      }
pcurves_secp224r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp224r16ParamsENS5_12Secp224r1RepEE12ScalarParamsEEEE10from_stashILm9EEESB_RKNSt3__15arrayImXT_EEE:
  774|    851|      static Self from_stash(const std::array<W, L>& stash) {
  775|    851|         static_assert(L >= N);
  776|    851|         std::array<W, N> val = {};
  777|  4.25k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 3.40k, False: 851]
  ------------------
  778|  3.40k|            val[i] = stash[i];
  779|  3.40k|         }
  780|    851|         return Self(val);
  781|    851|      }
pcurves_secp224r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp224r16ParamsENS5_12Secp224r1RepEE12ScalarParamsEEEEC2ENSt3__15arrayImLm4EEE:
  898|  1.16k|      explicit constexpr IntMod(std::array<W, N> v) : m_val(v) {}
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE12serialize_toENSt3__14spanIhLm28EEE:
  739|    434|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    434|         auto v = Rep::from_rep(m_val);
  741|    434|         std::reverse(v.begin(), v.end());
  742|       |
  743|       |         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|       |            store_be(bytes, v);
  745|    434|         } else {
  746|       |            // Remove leading zero bytes
  747|    434|            const auto padded_bytes = store_be(v);
  748|    434|            constexpr size_t extra = N * WordInfo<W>::bytes - Self::BYTES;
  749|    434|            copy_mem(bytes, std::span{padded_bytes}.template subspan<extra, Self::BYTES>());
  750|    434|         }
  751|    434|      }
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp224r16ParamsENS5_12Secp224r1RepEE12ScalarParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|    317|      std::array<W, L> stash_value() const {
  760|    317|         static_assert(L >= N);
  761|    317|         std::array<W, L> stash = {};
  762|  1.58k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 1.26k, False: 317]
  ------------------
  763|  1.26k|            stash[i] = m_val[i];
  764|  1.26k|         }
  765|    317|         return stash;
  766|    317|      }
pcurves_secp224r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|  1.51k|      static Self from_stash(const std::array<W, L>& stash) {
  775|  1.51k|         static_assert(L >= N);
  776|  1.51k|         std::array<W, N> val = {};
  777|  7.59k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 6.07k, False: 1.51k]
  ------------------
  778|  6.07k|            val[i] = stash[i];
  779|  6.07k|         }
  780|  1.51k|         return Self(val);
  781|  1.51k|      }
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp224r16ParamsENS5_12Secp224r1RepEE12ScalarParamsEEEE7is_zeroEv:
  225|    635|      constexpr CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_val.size()).as_choice(); }
pcurves_secp224r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEeqERKSA_:
  722|    220|      constexpr CT::Choice operator==(const Self& other) const {
  723|    220|         return CT::is_equal(this->data(), other.data(), N).as_choice();
  724|    220|      }
pcurves_secp224r1.cpp:_ZN5Botan13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp224r16ParamsENS3_12Secp224r1RepEE7x3_ax_bERKNS_6IntModINS5_INS6_11FieldParamsEEEEE:
 1275|    220|      static constexpr FieldElement x3_ax_b(const FieldElement& x) { return (x.square() + A) * x + B; }
pcurves_secp224r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp224r16ParamsENS5_12Secp224r1RepEE12ScalarParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|    319|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|    319|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 319]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|    319|         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|    319|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 1, False: 318]
  ------------------
  802|      1|            return {};
  803|      1|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|    318|         return Self::from_words(words);
  807|    319|      }
pcurves_secp224r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp224r16ParamsENS5_12Secp224r1RepEE12ScalarParamsEEEE10from_wordsILm4EEESB_NSt3__15arrayImXT_EEE:
  211|    318|      static constexpr Self from_words(std::array<W, L> w) {
  212|    318|         if constexpr(L == N) {
  213|    318|            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|    318|      }
pcurves_secp224r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp224r16ParamsENS4_12Secp224r1RepEE12ScalarParamsEE6to_repERKNSt3__15arrayImLm4EEE:
  115|    318|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|    318|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|    318|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|    318|         return Self::redc(z);
  119|    318|      }
pcurves_secp224r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE12serialize_toENSt3__14spanIhLm57EEE:
  941|    217|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  942|    217|         BOTAN_STATE_CHECK(this->is_identity().as_bool() == false);
  ------------------
  |  |   51|    217|   do {                                                         \
  |  |   52|    217|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    217|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 217]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    217|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 217]
  |  |  ------------------
  ------------------
  943|    217|         BufferStuffer pack(bytes);
  944|    217|         pack.append(0x04);
  945|    217|         x().serialize_to(pack.next<FieldElement::BYTES>());
  946|    217|         y().serialize_to(pack.next<FieldElement::BYTES>());
  947|    217|         BOTAN_DEBUG_ASSERT(pack.full());
  ------------------
  |  |  130|    217|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    217|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 217]
  |  |  ------------------
  ------------------
  948|    217|      }
pcurves_secp256k1.cpp:_ZN5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_19secp256k15CurveELm6EEC2ERKNS_16AffineCurvePointINS_6IntModINS3_12Secp256k1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
 1405|      1|            m_table(basemul_booth_setup<C, WindowBits>(p, BlindedScalar::Bits + 1)) {}
pcurves_secp256k1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E11from_affineERKNS_16AffineCurvePointISB_EE:
 1016|    220|      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|    220|         auto x = pt.x();
 1027|    220|         auto y = pt.y();
 1028|    220|         auto z = FieldElement::one();
 1029|       |
 1030|    220|         FieldElement::conditional_swap(pt.is_identity(), y, z);
 1031|       |
 1032|    220|         return ProjectiveCurvePoint(x, y, z);
 1033|    220|      }
pcurves_secp256k1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE1xEv:
  971|   330k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_secp256k1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE1yEv:
  976|   321k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_secp256k1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE3oneEv:
  200|  9.41k|      static constexpr Self one() { return Self(Rep::one()); }
pcurves_secp256k1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEC2ENSt3__15arrayImLm4EEE:
  898|   251k|      explicit constexpr IntMod(std::array<W, N> v) : m_val(v) {}
pcurves_secp256k1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE16conditional_swapENS_2CT6ChoiceERSA_SD_:
  410|    220|      static constexpr void conditional_swap(CT::Choice cond, Self& x, Self& y) {
  411|    220|         const W mask = cond.into_bitmask<W>();
  412|       |
  413|  1.10k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (413:28): [True: 880, False: 220]
  ------------------
  414|    880|            auto nx = Botan::choose(mask, y.m_val[i], x.m_val[i]);
  415|    880|            auto ny = Botan::choose(mask, x.m_val[i], y.m_val[i]);
  416|    880|            x.m_val[i] = nx;
  417|    880|            y.m_val[i] = ny;
  418|    880|         }
  419|    220|      }
pcurves_secp256k1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE11is_identityEv:
  928|  10.0k|      constexpr CT::Choice is_identity() const { return x().is_zero() && y().is_zero(); }
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE7is_zeroEv:
  225|  52.2k|      constexpr CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_val.size()).as_choice(); }
pcurves_secp256k1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_EC2ERKSB_SE_SE_:
 1056|  11.4k|            m_x(x), m_y(y), m_z(z) {}
pcurves_secp256k1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E3dblEv:
 1121|    833|      constexpr Self dbl() const {
 1122|       |         if constexpr(Self::A_is_minus_3) {
 1123|       |            return dbl_a_minus_3(*this);
 1124|    833|         } else if constexpr(Self::A_is_zero) {
 1125|    833|            return dbl_a_zero(*this);
 1126|       |         } else {
 1127|       |            return dbl_generic(*this, A);
 1128|       |         }
 1129|    833|      }
pcurves_secp256k1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E1xEv:
 1162|  34.6k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE6squareEv:
  426|  36.5k|      constexpr BOTAN_FORCE_INLINE Self square() const {
  427|  36.5k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  428|  36.5k|         comba_sqr<N>(z.data(), this->data());
  429|  36.5k|         return Self(Rep::redc(z));
  430|  36.5k|      }
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4dataEv:
  896|   298k|      constexpr const W* data() const { return m_val.data(); }
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4mul3Ev:
  335|    833|      constexpr inline Self mul3() const { return mul2() + (*this); }
pcurves_secp256k1.cpp:_ZN5BotanplERKNS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEESC_:
  265|  11.3k|      friend constexpr BOTAN_FORCE_INLINE Self operator+(const Self& a, const Self& b) {
  266|  11.3k|         std::array<W, N> t;  // NOLINT(*-member-init)
  267|       |
  268|  11.3k|         W carry = 0;
  269|  56.8k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (269:28): [True: 45.5k, False: 11.3k]
  ------------------
  270|  45.5k|            t[i] = word_add(a.m_val[i], b.m_val[i], &carry);
  271|  45.5k|         }
  272|       |
  273|  11.3k|         std::array<W, N> r;  // NOLINT(*-member-init)
  274|  11.3k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  275|  11.3k|         return Self(r);
  276|  11.3k|      }
pcurves_secp256k1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E1yEv:
 1167|  34.6k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_secp256k1.cpp:_ZN5BotanmlERKNS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEESC_:
  346|  95.4k|      friend constexpr BOTAN_FORCE_INLINE Self operator*(const Self& a, const Self& b) {
  347|  95.4k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  348|  95.4k|         comba_mul<N>(z.data(), a.data(), b.data());
  349|  95.4k|         return Self(Rep::redc(z));
  350|  95.4k|      }
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4mul4Ev:
  338|    833|      constexpr inline Self mul4() const { return mul2().mul2(); }
pcurves_secp256k1.cpp:_ZN5BotanmiERKNS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEESC_:
  281|  62.0k|      friend constexpr BOTAN_FORCE_INLINE Self operator-(const Self& a, const Self& b) {
  282|  62.0k|         std::array<W, N> r;  // NOLINT(*-member-init)
  283|  62.0k|         W carry = 0;
  284|   310k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (284:28): [True: 248k, False: 62.0k]
  ------------------
  285|   248k|            r[i] = word_sub(a.m_val[i], b.m_val[i], &carry);
  286|   248k|         }
  287|       |
  288|  62.0k|         const auto mask = CT::Mask<W>::expand(carry).value();
  289|       |
  290|  62.0k|         carry = 0;
  291|       |
  292|   310k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (292:28): [True: 248k, False: 62.0k]
  ------------------
  293|   248k|            r[i] = word_add(r[i], P[i] & mask, &carry);
  294|   248k|         }
  295|       |
  296|  62.0k|         return Self(r);
  297|  62.0k|      }
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4mul2Ev:
  325|  6.66k|      constexpr BOTAN_FORCE_INLINE Self mul2() const {
  326|  6.66k|         std::array<W, N> t = value();
  327|  6.66k|         const W carry = shift_left<1>(t);
  328|       |
  329|  6.66k|         std::array<W, N> r;  // NOLINT(*-member-init)
  330|  6.66k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  331|  6.66k|         return Self(r);
  332|  6.66k|      }
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE5valueEv:
  894|  6.66k|      constexpr const std::array<W, N>& value() const { return m_val; }
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4mul8Ev:
  341|    833|      constexpr inline Self mul8() const { return mul2().mul2().mul2(); }
pcurves_secp256k1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E1zEv:
 1172|  59.9k|      constexpr const FieldElement& z() const { return m_z; }
pcurves_secp256k1.cpp:_ZN5BotanplERKNS_20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_EESE_:
 1064|    735|      friend constexpr Self operator+(const Self& a, const Self& b) { return Self::add(a, b); }
pcurves_secp256k1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E3addERKSC_SE_:
 1103|    735|      constexpr static Self add(const Self& a, const Self& b) { return point_add<Self, FieldElement>(a, b); }
pcurves_secp256k1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E11is_identityEv:
 1082|  12.2k|      constexpr CT::Choice is_identity() const { return z().is_zero(); }
pcurves_secp256k1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE18conditional_assignERSA_SB_SB_NS_2CT6ChoiceERKSA_SF_SF_:
  395|  20.0k|         Self& x, Self& y, Self& z, CT::Choice cond, const Self& nx, const Self& ny, const Self& nz) {
  396|  20.0k|         const W mask = cond.into_bitmask<W>();
  397|       |
  398|   100k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (398:28): [True: 80.3k, False: 20.0k]
  ------------------
  399|  80.3k|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  400|  80.3k|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  401|  80.3k|            z.m_val[i] = Botan::choose(mask, nz.m_val[i], z.m_val[i]);
  402|  80.3k|         }
  403|  20.0k|      }
pcurves_secp256k1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEmLERKSA_:
  355|  2.84k|      constexpr BOTAN_FORCE_INLINE Self& operator*=(const Self& other) {
  356|  2.84k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  357|  2.84k|         comba_mul<N>(z.data(), data(), other.data());
  358|  2.84k|         m_val = Rep::redc(z);
  359|  2.84k|         return (*this);
  360|  2.84k|      }
pcurves_secp256k1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE8square_nEm:
  439|  2.84k|      constexpr void square_n(size_t n) {
  440|  2.84k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  441|  58.2k|         for(size_t i = 0; i != n; ++i) {
  ------------------
  |  Branch (441:28): [True: 55.4k, False: 2.84k]
  ------------------
  442|  55.4k|            comba_sqr<N>(z.data(), this->data());
  443|  55.4k|            m_val = Rep::redc(z);
  444|  55.4k|         }
  445|  2.84k|      }
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_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|    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: 105, False: 70]
  ------------------
  644|       |               // b > a
  645|    105|               b.m_val = r;
  646|    105|               x = nx;
  647|    105|               Self::_invert_vartime_div2_helper(b, x);
  648|    105|            } else {
  649|       |               // We know this can't underflow because a > b
  650|     70|               bigint_sub3(r.data(), a.data(), N, b.data(), N);
  651|     70|               a.m_val = r;
  652|     70|               y = nx;
  653|     70|               Self::_invert_vartime_div2_helper(a, y);
  654|     70|            }
  655|    175|         }
  656|      1|      }
pcurves_secp256k1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4zeroEv:
  195|  18.8k|      static constexpr Self zero() { return Self(std::array<W, N>{0}); }
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE8to_wordsEv:
  734|      1|      constexpr std::array<W, Self::N> to_words() const { return Rep::from_rep(m_val); }
pcurves_secp256k1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_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|    541|         while((a.m_val[0] & 1) != 1) {
  ------------------
  |  Branch (551:16): [True: 364, False: 177]
  ------------------
  552|    364|            shift_right<1>(a.m_val);
  553|       |
  554|    364|            const W borrow = shift_right<1>(x.m_val);
  555|       |
  556|       |            // Conditional ok: this function is variable time
  557|    364|            if(borrow) {
  ------------------
  |  Branch (557:16): [True: 186, False: 178]
  ------------------
  558|    186|               bigint_add2(x.m_val.data(), N, INV_2.data(), N);
  559|    186|            }
  560|    364|         }
  561|    177|      }
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE6negateEv:
  452|  9.41k|      constexpr Self negate() const {
  453|  9.41k|         const W x_is_zero = ~CT::all_zeros(this->data(), N).value();
  454|       |
  455|  9.41k|         std::array<W, N> r;  // NOLINT(*-member-init)
  456|  9.41k|         W carry = 0;
  457|  47.0k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (457:28): [True: 37.6k, False: 9.41k]
  ------------------
  458|  37.6k|            r[i] = word_sub(P[i] & x_is_zero, m_val[i], &carry);
  459|  37.6k|         }
  460|       |
  461|  9.41k|         return Self(r);
  462|  9.41k|      }
pcurves_secp256k1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEEC2ERKSB_SE_:
  917|  11.6k|      constexpr AffineCurvePoint(const FieldElement& x, const FieldElement& y) : m_x(x), m_y(y) {}
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|  1.09k|      std::array<W, L> stash_value() const {
  760|  1.09k|         static_assert(L >= N);
  761|  1.09k|         std::array<W, L> stash = {};
  762|  5.47k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 4.38k, False: 1.09k]
  ------------------
  763|  4.38k|            stash[i] = m_val[i];
  764|  4.38k|         }
  765|  1.09k|         return stash;
  766|  1.09k|      }
pcurves_secp256k1.cpp:_ZNK5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_19secp256k15CurveELm6EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS3_12Secp256k1RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1407|    219|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1408|    219|         const BlindedScalar scalar(s, rng);
 1409|    219|         return basemul_booth_exec<C, WindowBits>(m_table, scalar, rng);
 1410|    219|      }
pcurves_secp256k1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp256k15CurveELm7EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS3_12Secp256k1RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    219|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    219|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 219, Folded]
  |  Branch (1308:33): [True: 0, False: 219]
  ------------------
 1309|      0|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|      0|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|      0|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|      0|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|      0|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|      0|            W mask[n_words] = {0};
 1318|      0|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|      0|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|      0|            if constexpr(ExcessBits > 0) {
 1323|      0|               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|      0|               mask[MaskWords - 1] &= ExcessMask;
 1325|      0|            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|      0|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|      0|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|      0|            mask[0] |= 1;
 1331|       |
 1332|      0|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|      0|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|      0|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|      0|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|      0|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|      0|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|      0|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    219|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|    219|            m_bytes.resize(C::Scalar::BYTES);
 1346|    219|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|    219|            m_bits = C::Scalar::BITS;
 1348|    219|         }
 1349|       |
 1350|    219|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    219|      }
pcurves_secp256k1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256k16ParamsENS4_12Secp256k1RepEE12ScalarParamsEE8from_repERKNSt3__15arrayImLm4EEE:
  137|    441|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|    441|         std::array<W, 2 * N> ze = {};
  139|    441|         copy_mem(std::span{ze}.template first<N>(), z);
  140|    441|         return Self::redc(ze);
  141|    441|      }
pcurves_secp256k1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256k16ParamsENS4_12Secp256k1RepEE12ScalarParamsEE4redcERKNSt3__15arrayImLm8EEE:
  104|    664|      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|    664|         } else {
  108|    664|            return monty_redc(z, P, P_dash);
  109|    664|         }
  110|    664|      }
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256k16ParamsENS5_12Secp256k1RepEE12ScalarParamsEEEE12serialize_toENSt3__14spanIhLm32EEE:
  739|    441|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    441|         auto v = Rep::from_rep(m_val);
  741|    441|         std::reverse(v.begin(), v.end());
  742|       |
  743|    441|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|    441|            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|    441|      }
pcurves_secp256k1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp256k15CurveELm7EE4bitsEv:
 1305|    219|      size_t bits() const { return m_bits; }
pcurves_secp256k1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E18conditional_assignENS_2CT6ChoiceERKSC_:
 1084|    219|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
 1085|    219|         FieldElement::conditional_assign(m_x, m_y, m_z, cond, pt.x(), pt.y(), pt.z());
 1086|    219|      }
pcurves_secp256k1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E6negateEv:
 1134|    219|      constexpr Self negate() const { return Self(x(), y().negate(), z()); }
pcurves_secp256k1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E18_const_time_poisonEv:
 1174|    219|      constexpr void _const_time_poison() const { CT::poison_all(m_x, m_y, m_z); }
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE18_const_time_poisonEv:
  889|    657|      constexpr void _const_time_poison() const { CT::poison(m_val); }
pcurves_secp256k1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp256k15CurveELm7EE10get_windowEm:
 1353|  9.41k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  9.41k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  9.41k|      }
pcurves_secp256k1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E10add_or_subERKSC_RKNS_16AffineCurvePointISB_EENS_2CT6ChoiceE:
 1096|  9.19k|      constexpr static Self add_or_sub(const Self& a, const AffinePoint& b, CT::Choice sub) {
 1097|  9.19k|         return point_add_or_sub_mixed<Self, AffinePoint, FieldElement>(a, b, sub, FieldElement::one());
 1098|  9.19k|      }
pcurves_secp256k1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE18conditional_assignENS_2CT6ChoiceERKSA_:
  367|  9.19k|      constexpr void conditional_assign(CT::Choice cond, const Self& nx) {
  368|  9.19k|         const W mask = cond.into_bitmask<W>();
  369|       |
  370|  45.9k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (370:28): [True: 36.7k, False: 9.19k]
  ------------------
  371|  36.7k|            m_val[i] = Botan::choose(mask, nx.m_val[i], m_val[i]);
  372|  36.7k|         }
  373|  9.19k|      }
pcurves_secp256k1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE9ct_selectENSt3__14spanIKSC_Lm18446744073709551615EEEm:
  955|  9.41k|      static constexpr auto ct_select(std::span<const Self> pts, size_t idx) {
  956|  9.41k|         auto result = Self::identity(pts[0]);
  957|       |
  958|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
  959|  9.41k|         const size_t idx1 = static_cast<size_t>(idx - 1);
  960|   310k|         for(size_t i = 0; i != pts.size(); ++i) {
  ------------------
  |  Branch (960:28): [True: 301k, False: 9.41k]
  ------------------
  961|   301k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
  962|   301k|            result.conditional_assign(found, pts[i]);
  963|   301k|         }
  964|       |
  965|  9.41k|         return result;
  966|  9.41k|      }
pcurves_secp256k1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE8identityERKSC_:
  924|  9.41k|      static constexpr Self identity(const Self& /*unused*/) {
  925|  9.41k|         return Self(FieldElement::zero(), FieldElement::zero());
  926|  9.41k|      }
pcurves_secp256k1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE18conditional_assignENS_2CT6ChoiceERKSC_:
  981|   301k|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
  982|   301k|         FieldElement::conditional_assign(m_x, m_y, cond, pt.x(), pt.y());
  983|   301k|      }
pcurves_secp256k1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE18conditional_assignERSA_SB_NS_2CT6ChoiceERKSA_SF_:
  380|   301k|      static constexpr void conditional_assign(Self& x, Self& y, CT::Choice cond, const Self& nx, const Self& ny) {
  381|   301k|         const W mask = cond.into_bitmask<W>();
  382|       |
  383|  1.50M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (383:28): [True: 1.20M, False: 301k]
  ------------------
  384|  1.20M|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  385|  1.20M|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  386|  1.20M|         }
  387|   301k|      }
pcurves_secp256k1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E13randomize_repERNS_21RandomNumberGeneratorE:
 1142|    876|      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|    876|         if(rng.is_seeded()) {
  ------------------
  |  Branch (1147:13): [True: 0, False: 876]
  ------------------
 1148|      0|            auto r = FieldElement::random(rng);
 1149|       |
 1150|      0|            auto r2 = r.square();
 1151|      0|            auto r3 = r2 * r;
 1152|       |
 1153|      0|            m_x *= r2;
 1154|      0|            m_y *= r3;
 1155|      0|            m_z *= r;
 1156|      0|         }
 1157|    876|      }
pcurves_secp256k1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E20_const_time_unpoisonEv:
 1176|    219|      constexpr void _const_time_unpoison() const { CT::unpoison_all(m_x, m_y, m_z); }
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE20_const_time_unpoisonEv:
  891|    657|      constexpr void _const_time_unpoison() const { CT::unpoison(m_val); }
pcurves_secp256k1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp256k15CurveELm7EED2Ev:
 1358|    219|      ~BlindedScalarBits() {
 1359|    219|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    219|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    219|      }
pcurves_secp256k1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256k16ParamsENS5_12Secp256k1RepEE12ScalarParamsEEEE10from_stashILm9EEESB_RKNSt3__15arrayImXT_EEE:
  774|    663|      static Self from_stash(const std::array<W, L>& stash) {
  775|    663|         static_assert(L >= N);
  776|    663|         std::array<W, N> val = {};
  777|  3.31k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 2.65k, False: 663]
  ------------------
  778|  2.65k|            val[i] = stash[i];
  779|  2.65k|         }
  780|    663|         return Self(val);
  781|    663|      }
pcurves_secp256k1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256k16ParamsENS5_12Secp256k1RepEE12ScalarParamsEEEEC2ENSt3__15arrayImLm4EEE:
  898|    886|      explicit constexpr IntMod(std::array<W, N> v) : m_val(v) {}
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE12serialize_toENSt3__14spanIhLm32EEE:
  739|    438|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    438|         auto v = Rep::from_rep(m_val);
  741|    438|         std::reverse(v.begin(), v.end());
  742|       |
  743|    438|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|    438|            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|    438|      }
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256k16ParamsENS5_12Secp256k1RepEE12ScalarParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|    222|      std::array<W, L> stash_value() const {
  760|    222|         static_assert(L >= N);
  761|    222|         std::array<W, L> stash = {};
  762|  1.11k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 888, False: 222]
  ------------------
  763|    888|            stash[i] = m_val[i];
  764|    888|         }
  765|    222|         return stash;
  766|    222|      }
pcurves_secp256k1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|  1.53k|      static Self from_stash(const std::array<W, L>& stash) {
  775|  1.53k|         static_assert(L >= N);
  776|  1.53k|         std::array<W, N> val = {};
  777|  7.66k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 6.13k, False: 1.53k]
  ------------------
  778|  6.13k|            val[i] = stash[i];
  779|  6.13k|         }
  780|  1.53k|         return Self(val);
  781|  1.53k|      }
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256k16ParamsENS5_12Secp256k1RepEE12ScalarParamsEEEE7is_zeroEv:
  225|    445|      constexpr CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_val.size()).as_choice(); }
pcurves_secp256k1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEeqERKSA_:
  722|    219|      constexpr CT::Choice operator==(const Self& other) const {
  723|    219|         return CT::is_equal(this->data(), other.data(), N).as_choice();
  724|    219|      }
pcurves_secp256k1.cpp:_ZN5Botan13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256k16ParamsENS3_12Secp256k1RepEE7x3_ax_bERKNS_6IntModINS5_INS6_11FieldParamsEEEEE:
 1275|    219|      static constexpr FieldElement x3_ax_b(const FieldElement& x) { return (x.square() + A) * x + B; }
pcurves_secp256k1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256k16ParamsENS5_12Secp256k1RepEE12ScalarParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|    223|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|    223|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 223]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|    223|         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|    223|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 0, False: 223]
  ------------------
  802|      0|            return {};
  803|      0|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|    223|         return Self::from_words(words);
  807|    223|      }
pcurves_secp256k1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256k16ParamsENS5_12Secp256k1RepEE12ScalarParamsEEEE10from_wordsILm4EEESB_NSt3__15arrayImXT_EEE:
  211|    223|      static constexpr Self from_words(std::array<W, L> w) {
  212|    223|         if constexpr(L == N) {
  213|    223|            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|    223|      }
pcurves_secp256k1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256k16ParamsENS4_12Secp256k1RepEE12ScalarParamsEE6to_repERKNSt3__15arrayImLm4EEE:
  115|    223|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|    223|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|    223|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|    223|         return Self::redc(z);
  119|    223|      }
pcurves_secp256k1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE12serialize_toENSt3__14spanIhLm65EEE:
  941|    219|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  942|    219|         BOTAN_STATE_CHECK(this->is_identity().as_bool() == false);
  ------------------
  |  |   51|    219|   do {                                                         \
  |  |   52|    219|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    219|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 219]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    219|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 219]
  |  |  ------------------
  ------------------
  943|    219|         BufferStuffer pack(bytes);
  944|    219|         pack.append(0x04);
  945|    219|         x().serialize_to(pack.next<FieldElement::BYTES>());
  946|    219|         y().serialize_to(pack.next<FieldElement::BYTES>());
  947|    219|         BOTAN_DEBUG_ASSERT(pack.full());
  ------------------
  |  |  130|    219|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    219|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 219]
  |  |  ------------------
  ------------------
  948|    219|      }
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|     74|      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|     74|         auto x = pt.x();
 1027|     74|         auto y = pt.y();
 1028|     74|         auto z = FieldElement::one();
 1029|       |
 1030|     74|         FieldElement::conditional_swap(pt.is_identity(), y, z);
 1031|       |
 1032|     74|         return ProjectiveCurvePoint(x, y, z);
 1033|     74|      }
pcurves_secp256r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEEE1xEv:
  971|   110k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_secp256r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEEE1yEv:
  976|   107k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE3oneEv:
  200|  3.14k|      static constexpr Self one() { return Self(Rep::one()); }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEEC2ENSt3__15arrayImLm4EEE:
  898|   115k|      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|     74|      static constexpr void conditional_swap(CT::Choice cond, Self& x, Self& y) {
  411|     74|         const W mask = cond.into_bitmask<W>();
  412|       |
  413|    370|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (413:28): [True: 296, False: 74]
  ------------------
  414|    296|            auto nx = Botan::choose(mask, y.m_val[i], x.m_val[i]);
  415|    296|            auto ny = Botan::choose(mask, x.m_val[i], y.m_val[i]);
  416|    296|            x.m_val[i] = nx;
  417|    296|            y.m_val[i] = ny;
  418|    296|         }
  419|     74|      }
pcurves_secp256r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEEE11is_identityEv:
  928|  3.35k|      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|  20.4k|      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|  4.85k|            m_x(x), m_y(y), m_z(z) {}
pcurves_secp256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E3dblEv:
 1121|    833|      constexpr Self dbl() const {
 1122|    833|         if constexpr(Self::A_is_minus_3) {
 1123|    833|            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|    833|      }
pcurves_secp256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E1zEv:
 1172|  29.4k|      constexpr const FieldElement& z() const { return m_z; }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE6squareEv:
  426|  17.4k|      constexpr BOTAN_FORCE_INLINE Self square() const {
  427|  17.4k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  428|  17.4k|         comba_sqr<N>(z.data(), this->data());
  429|  17.4k|         return Self(Rep::redc(z));
  430|  17.4k|      }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE4dataEv:
  896|   134k|      constexpr const W* data() const { return m_val.data(); }
pcurves_secp256r1.cpp:_ZN5BotanmlERKNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEEESC_:
  346|  46.3k|      friend constexpr BOTAN_FORCE_INLINE Self operator*(const Self& a, const Self& b) {
  347|  46.3k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  348|  46.3k|         comba_mul<N>(z.data(), a.data(), b.data());
  349|  46.3k|         return Self(Rep::redc(z));
  350|  46.3k|      }
pcurves_secp256r1.cpp:_ZN5BotanmiERKNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEEESC_:
  281|  26.1k|      friend constexpr BOTAN_FORCE_INLINE Self operator-(const Self& a, const Self& b) {
  282|  26.1k|         std::array<W, N> r;  // NOLINT(*-member-init)
  283|  26.1k|         W carry = 0;
  284|   130k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (284:28): [True: 104k, False: 26.1k]
  ------------------
  285|   104k|            r[i] = word_sub(a.m_val[i], b.m_val[i], &carry);
  286|   104k|         }
  287|       |
  288|  26.1k|         const auto mask = CT::Mask<W>::expand(carry).value();
  289|       |
  290|  26.1k|         carry = 0;
  291|       |
  292|   130k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (292:28): [True: 104k, False: 26.1k]
  ------------------
  293|   104k|            r[i] = word_add(r[i], P[i] & mask, &carry);
  294|   104k|         }
  295|       |
  296|  26.1k|         return Self(r);
  297|  26.1k|      }
pcurves_secp256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E1xEv:
 1162|  16.4k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE4mul3Ev:
  335|    833|      constexpr inline Self mul3() const { return mul2() + (*this); }
pcurves_secp256r1.cpp:_ZN5BotanplERKNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEEESC_:
  265|  5.78k|      friend constexpr BOTAN_FORCE_INLINE Self operator+(const Self& a, const Self& b) {
  266|  5.78k|         std::array<W, N> t;  // NOLINT(*-member-init)
  267|       |
  268|  5.78k|         W carry = 0;
  269|  28.9k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (269:28): [True: 23.1k, False: 5.78k]
  ------------------
  270|  23.1k|            t[i] = word_add(a.m_val[i], b.m_val[i], &carry);
  271|  23.1k|         }
  272|       |
  273|  5.78k|         std::array<W, N> r;  // NOLINT(*-member-init)
  274|  5.78k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  275|  5.78k|         return Self(r);
  276|  5.78k|      }
pcurves_secp256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E1yEv:
 1167|  15.6k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE4mul4Ev:
  338|    833|      constexpr inline Self mul4() const { return mul2().mul2(); }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE4mul2Ev:
  325|  6.66k|      constexpr BOTAN_FORCE_INLINE Self mul2() const {
  326|  6.66k|         std::array<W, N> t = value();
  327|  6.66k|         const W carry = shift_left<1>(t);
  328|       |
  329|  6.66k|         std::array<W, N> r;  // NOLINT(*-member-init)
  330|  6.66k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  331|  6.66k|         return Self(r);
  332|  6.66k|      }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE5valueEv:
  894|  6.66k|      constexpr const std::array<W, N>& value() const { return m_val; }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE4mul8Ev:
  341|    833|      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|  6.10k|      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|  7.67k|         Self& x, Self& y, Self& z, CT::Choice cond, const Self& nx, const Self& ny, const Self& nz) {
  396|  7.67k|         const W mask = cond.into_bitmask<W>();
  397|       |
  398|  38.3k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (398:28): [True: 30.7k, False: 7.67k]
  ------------------
  399|  30.7k|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  400|  30.7k|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  401|  30.7k|            z.m_val[i] = Botan::choose(mask, nz.m_val[i], z.m_val[i]);
  402|  30.7k|         }
  403|  7.67k|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEEmLERKSA_:
  355|    803|      constexpr BOTAN_FORCE_INLINE Self& operator*=(const Self& other) {
  356|    803|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  357|    803|         comba_mul<N>(z.data(), data(), other.data());
  358|    803|         m_val = Rep::redc(z);
  359|    803|         return (*this);
  360|    803|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE8square_nEm:
  439|    657|      constexpr void square_n(size_t n) {
  440|    657|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  441|  19.0k|         for(size_t i = 0; i != n; ++i) {
  ------------------
  |  Branch (441:28): [True: 18.3k, False: 657]
  ------------------
  442|  18.3k|            comba_sqr<N>(z.data(), this->data());
  443|  18.3k|            m_val = Rep::redc(z);
  444|  18.3k|         }
  445|    657|      }
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|  6.27k|      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|  3.14k|      constexpr Self negate() const {
  453|  3.14k|         const W x_is_zero = ~CT::all_zeros(this->data(), N).value();
  454|       |
  455|  3.14k|         std::array<W, N> r;  // NOLINT(*-member-init)
  456|  3.14k|         W carry = 0;
  457|  15.7k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (457:28): [True: 12.5k, False: 3.14k]
  ------------------
  458|  12.5k|            r[i] = word_sub(P[i] & x_is_zero, m_val[i], &carry);
  459|  12.5k|         }
  460|       |
  461|  3.14k|         return Self(r);
  462|  3.14k|      }
pcurves_secp256r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEEEC2ERKSB_SE_:
  917|  4.92k|      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|    365|      std::array<W, L> stash_value() const {
  760|    365|         static_assert(L >= N);
  761|    365|         std::array<W, L> stash = {};
  762|  1.82k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 1.46k, False: 365]
  ------------------
  763|  1.46k|            stash[i] = m_val[i];
  764|  1.46k|         }
  765|    365|         return stash;
  766|    365|      }
pcurves_secp256r1.cpp:_ZNK5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm6EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS2_12Secp256r1RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1407|     73|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1408|     73|         const BlindedScalar scalar(s, rng);
 1409|     73|         return basemul_booth_exec<C, WindowBits>(m_table, scalar, rng);
 1410|     73|      }
pcurves_secp256r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm7EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS2_12Secp256r1RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|     73|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|     73|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 73, Folded]
  |  Branch (1308:33): [True: 0, False: 73]
  ------------------
 1309|      0|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|      0|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|      0|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|      0|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|      0|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|      0|            W mask[n_words] = {0};
 1318|      0|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|      0|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|      0|            if constexpr(ExcessBits > 0) {
 1323|      0|               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|      0|               mask[MaskWords - 1] &= ExcessMask;
 1325|      0|            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|      0|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|      0|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|      0|            mask[0] |= 1;
 1331|       |
 1332|      0|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|      0|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|      0|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|      0|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|      0|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|      0|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|      0|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|     73|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|     73|            m_bytes.resize(C::Scalar::BYTES);
 1346|     73|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|     73|            m_bits = C::Scalar::BITS;
 1348|     73|         }
 1349|       |
 1350|     73|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|     73|      }
pcurves_secp256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS3_12Secp256r1RepEE12ScalarParamsEE8from_repERKNSt3__15arrayImLm4EEE:
  137|    146|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|    146|         std::array<W, 2 * N> ze = {};
  139|    146|         copy_mem(std::span{ze}.template first<N>(), z);
  140|    146|         return Self::redc(ze);
  141|    146|      }
pcurves_secp256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS3_12Secp256r1RepEE12ScalarParamsEE4redcERKNSt3__15arrayImLm8EEE:
  104|    220|      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|    220|         } else {
  108|    220|            return monty_redc(z, P, P_dash);
  109|    220|         }
  110|    220|      }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS4_12Secp256r1RepEE12ScalarParamsEEEE12serialize_toENSt3__14spanIhLm32EEE:
  739|    146|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    146|         auto v = Rep::from_rep(m_val);
  741|    146|         std::reverse(v.begin(), v.end());
  742|       |
  743|    146|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|    146|            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|    146|      }
pcurves_secp256r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm7EE4bitsEv:
 1305|     73|      size_t bits() const { return m_bits; }
pcurves_secp256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E18conditional_assignENS_2CT6ChoiceERKSC_:
 1084|     73|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
 1085|     73|         FieldElement::conditional_assign(m_x, m_y, m_z, cond, pt.x(), pt.y(), pt.z());
 1086|     73|      }
pcurves_secp256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E6negateEv:
 1134|     73|      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|     73|      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|    219|      constexpr void _const_time_poison() const { CT::poison(m_val); }
pcurves_secp256r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm7EE10get_windowEm:
 1353|  3.13k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  3.13k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  3.13k|      }
pcurves_secp256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E10add_or_subERKSC_RKNS_16AffineCurvePointISB_EENS_2CT6ChoiceE:
 1096|  3.06k|      constexpr static Self add_or_sub(const Self& a, const AffinePoint& b, CT::Choice sub) {
 1097|  3.06k|         return point_add_or_sub_mixed<Self, AffinePoint, FieldElement>(a, b, sub, FieldElement::one());
 1098|  3.06k|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE18conditional_assignENS_2CT6ChoiceERKSA_:
  367|  3.06k|      constexpr void conditional_assign(CT::Choice cond, const Self& nx) {
  368|  3.06k|         const W mask = cond.into_bitmask<W>();
  369|       |
  370|  15.3k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (370:28): [True: 12.2k, False: 3.06k]
  ------------------
  371|  12.2k|            m_val[i] = Botan::choose(mask, nx.m_val[i], m_val[i]);
  372|  12.2k|         }
  373|  3.06k|      }
pcurves_secp256r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEEE9ct_selectENSt3__14spanIKSC_Lm18446744073709551615EEEm:
  955|  3.13k|      static constexpr auto ct_select(std::span<const Self> pts, size_t idx) {
  956|  3.13k|         auto result = Self::identity(pts[0]);
  957|       |
  958|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
  959|  3.13k|         const size_t idx1 = static_cast<size_t>(idx - 1);
  960|   103k|         for(size_t i = 0; i != pts.size(); ++i) {
  ------------------
  |  Branch (960:28): [True: 100k, False: 3.13k]
  ------------------
  961|   100k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
  962|   100k|            result.conditional_assign(found, pts[i]);
  963|   100k|         }
  964|       |
  965|  3.13k|         return result;
  966|  3.13k|      }
pcurves_secp256r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEEE8identityERKSC_:
  924|  3.13k|      static constexpr Self identity(const Self& /*unused*/) {
  925|  3.13k|         return Self(FieldElement::zero(), FieldElement::zero());
  926|  3.13k|      }
pcurves_secp256r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEEE18conditional_assignENS_2CT6ChoiceERKSC_:
  981|   100k|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
  982|   100k|         FieldElement::conditional_assign(m_x, m_y, cond, pt.x(), pt.y());
  983|   100k|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE18conditional_assignERSA_SB_NS_2CT6ChoiceERKSA_SF_:
  380|   100k|      static constexpr void conditional_assign(Self& x, Self& y, CT::Choice cond, const Self& nx, const Self& ny) {
  381|   100k|         const W mask = cond.into_bitmask<W>();
  382|       |
  383|   502k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (383:28): [True: 401k, False: 100k]
  ------------------
  384|   401k|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  385|   401k|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  386|   401k|         }
  387|   100k|      }
pcurves_secp256r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E13randomize_repERNS_21RandomNumberGeneratorE:
 1142|    292|      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|    292|         if(rng.is_seeded()) {
  ------------------
  |  Branch (1147:13): [True: 0, False: 292]
  ------------------
 1148|      0|            auto r = FieldElement::random(rng);
 1149|       |
 1150|      0|            auto r2 = r.square();
 1151|      0|            auto r3 = r2 * r;
 1152|       |
 1153|      0|            m_x *= r2;
 1154|      0|            m_y *= r3;
 1155|      0|            m_z *= r;
 1156|      0|         }
 1157|    292|      }
pcurves_secp256r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEES7_E20_const_time_unpoisonEv:
 1176|     73|      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|    219|      constexpr void _const_time_unpoison() const { CT::unpoison(m_val); }
pcurves_secp256r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm7EED2Ev:
 1358|     73|      ~BlindedScalarBits() {
 1359|     73|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|     73|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|     73|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS4_12Secp256r1RepEE12ScalarParamsEEEE10from_stashILm9EEESB_RKNSt3__15arrayImXT_EEE:
  774|    219|      static Self from_stash(const std::array<W, L>& stash) {
  775|    219|         static_assert(L >= N);
  776|    219|         std::array<W, N> val = {};
  777|  1.09k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 876, False: 219]
  ------------------
  778|    876|            val[i] = stash[i];
  779|    876|         }
  780|    219|         return Self(val);
  781|    219|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS4_12Secp256r1RepEE12ScalarParamsEEEEC2ENSt3__15arrayImLm4EEE:
  898|    293|      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|    146|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    146|         auto v = Rep::from_rep(m_val);
  741|    146|         std::reverse(v.begin(), v.end());
  742|       |
  743|    146|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|    146|            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|    146|      }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS4_12Secp256r1RepEE12ScalarParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|     73|      std::array<W, L> stash_value() const {
  760|     73|         static_assert(L >= N);
  761|     73|         std::array<W, L> stash = {};
  762|    365|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 292, False: 73]
  ------------------
  763|    292|            stash[i] = m_val[i];
  764|    292|         }
  765|     73|         return stash;
  766|     73|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS2_9secp256r16ParamsES3_E11FieldParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|    511|      static Self from_stash(const std::array<W, L>& stash) {
  775|    511|         static_assert(L >= N);
  776|    511|         std::array<W, N> val = {};
  777|  2.55k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 2.04k, False: 511]
  ------------------
  778|  2.04k|            val[i] = stash[i];
  779|  2.04k|         }
  780|    511|         return Self(val);
  781|    511|      }
pcurves_secp256r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS4_12Secp256r1RepEE12ScalarParamsEEEE7is_zeroEv:
  225|    147|      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|     73|      constexpr CT::Choice operator==(const Self& other) const {
  723|     73|         return CT::is_equal(this->data(), other.data(), N).as_choice();
  724|     73|      }
pcurves_secp256r1.cpp:_ZN5Botan13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS2_12Secp256r1RepEE7x3_ax_bERKNS_6IntModINS5_INS6_11FieldParamsEEEEE:
 1275|     73|      static constexpr FieldElement x3_ax_b(const FieldElement& x) { return (x.square() + A) * x + B; }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS4_12Secp256r1RepEE12ScalarParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|     74|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|     74|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 74]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|     74|         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|     74|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 0, False: 74]
  ------------------
  802|      0|            return {};
  803|      0|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|     74|         return Self::from_words(words);
  807|     74|      }
pcurves_secp256r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS4_12Secp256r1RepEE12ScalarParamsEEEE10from_wordsILm4EEESB_NSt3__15arrayImXT_EEE:
  211|     74|      static constexpr Self from_words(std::array<W, L> w) {
  212|     74|         if constexpr(L == N) {
  213|     74|            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|     74|      }
pcurves_secp256r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp256r16ParamsENS3_12Secp256r1RepEE12ScalarParamsEE6to_repERKNSt3__15arrayImLm4EEE:
  115|     74|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|     74|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|     74|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|     74|         return Self::redc(z);
  119|     74|      }
pcurves_secp256r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS3_9secp256r16ParamsES4_E11FieldParamsEEEEEE12serialize_toENSt3__14spanIhLm65EEE:
  941|     73|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  942|     73|         BOTAN_STATE_CHECK(this->is_identity().as_bool() == false);
  ------------------
  |  |   51|     73|   do {                                                         \
  |  |   52|     73|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|     73|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 73]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|     73|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 73]
  |  |  ------------------
  ------------------
  943|     73|         BufferStuffer pack(bytes);
  944|     73|         pack.append(0x04);
  945|     73|         x().serialize_to(pack.next<FieldElement::BYTES>());
  946|     73|         y().serialize_to(pack.next<FieldElement::BYTES>());
  947|     73|         BOTAN_DEBUG_ASSERT(pack.full());
  ------------------
  |  |  130|     73|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|     73|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 73]
  |  |  ------------------
  ------------------
  948|     73|      }
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|    197|      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|    197|         auto x = pt.x();
 1027|    197|         auto y = pt.y();
 1028|    197|         auto z = FieldElement::one();
 1029|       |
 1030|    197|         FieldElement::conditional_swap(pt.is_identity(), y, z);
 1031|       |
 1032|    197|         return ProjectiveCurvePoint(x, y, z);
 1033|    197|      }
pcurves_secp384r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEEE1xEv:
  971|   446k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_secp384r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEEE1yEv:
  976|   434k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE3oneEv:
  200|  12.7k|      static constexpr Self one() { return Self(Rep::one()); }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEEC2ENSt3__15arrayImLm6EEE:
  898|   349k|      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|    197|      static constexpr void conditional_swap(CT::Choice cond, Self& x, Self& y) {
  411|    197|         const W mask = cond.into_bitmask<W>();
  412|       |
  413|  1.37k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (413:28): [True: 1.18k, False: 197]
  ------------------
  414|  1.18k|            auto nx = Botan::choose(mask, y.m_val[i], x.m_val[i]);
  415|  1.18k|            auto ny = Botan::choose(mask, x.m_val[i], y.m_val[i]);
  416|  1.18k|            x.m_val[i] = nx;
  417|  1.18k|            y.m_val[i] = ny;
  418|  1.18k|         }
  419|    197|      }
pcurves_secp384r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEEE11is_identityEv:
  928|  13.3k|      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|  71.0k|      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|  15.4k|            m_x(x), m_y(y), m_z(z) {}
pcurves_secp384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E3dblEv:
 1121|  1.24k|      constexpr Self dbl() const {
 1122|  1.24k|         if constexpr(Self::A_is_minus_3) {
 1123|  1.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|  1.24k|      }
pcurves_secp384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E1zEv:
 1172|  84.1k|      constexpr const FieldElement& z() const { return m_z; }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE6squareEv:
  426|  50.2k|      constexpr BOTAN_FORCE_INLINE Self square() const {
  427|  50.2k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  428|  50.2k|         comba_sqr<N>(z.data(), this->data());
  429|  50.2k|         return Self(Rep::redc(z));
  430|  50.2k|      }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE4dataEv:
  896|   410k|      constexpr const W* data() const { return m_val.data(); }
pcurves_secp384r1.cpp:_ZN5BotanmlERKNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEEESC_:
  346|   133k|      friend constexpr BOTAN_FORCE_INLINE Self operator*(const Self& a, const Self& b) {
  347|   133k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  348|   133k|         comba_mul<N>(z.data(), a.data(), b.data());
  349|   133k|         return Self(Rep::redc(z));
  350|   133k|      }
pcurves_secp384r1.cpp:_ZN5BotanmiERKNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEEESC_:
  281|  86.7k|      friend constexpr BOTAN_FORCE_INLINE Self operator-(const Self& a, const Self& b) {
  282|  86.7k|         std::array<W, N> r;  // NOLINT(*-member-init)
  283|  86.7k|         W carry = 0;
  284|   607k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (284:28): [True: 520k, False: 86.7k]
  ------------------
  285|   520k|            r[i] = word_sub(a.m_val[i], b.m_val[i], &carry);
  286|   520k|         }
  287|       |
  288|  86.7k|         const auto mask = CT::Mask<W>::expand(carry).value();
  289|       |
  290|  86.7k|         carry = 0;
  291|       |
  292|   607k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (292:28): [True: 520k, False: 86.7k]
  ------------------
  293|   520k|            r[i] = word_add(r[i], P[i] & mask, &carry);
  294|   520k|         }
  295|       |
  296|  86.7k|         return Self(r);
  297|  86.7k|      }
pcurves_secp384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E1xEv:
 1162|  48.8k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE4mul3Ev:
  335|  1.24k|      constexpr inline Self mul3() const { return mul2() + (*this); }
pcurves_secp384r1.cpp:_ZN5BotanplERKNS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEEESC_:
  265|  16.7k|      friend constexpr BOTAN_FORCE_INLINE Self operator+(const Self& a, const Self& b) {
  266|  16.7k|         std::array<W, N> t;  // NOLINT(*-member-init)
  267|       |
  268|  16.7k|         W carry = 0;
  269|   117k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (269:28): [True: 100k, False: 16.7k]
  ------------------
  270|   100k|            t[i] = word_add(a.m_val[i], b.m_val[i], &carry);
  271|   100k|         }
  272|       |
  273|  16.7k|         std::array<W, N> r;  // NOLINT(*-member-init)
  274|  16.7k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  275|  16.7k|         return Self(r);
  276|  16.7k|      }
pcurves_secp384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E1yEv:
 1167|  47.6k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE4mul4Ev:
  338|  1.24k|      constexpr inline Self mul4() const { return mul2().mul2(); }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE4mul2Ev:
  325|  9.92k|      constexpr BOTAN_FORCE_INLINE Self mul2() const {
  326|  9.92k|         std::array<W, N> t = value();
  327|  9.92k|         const W carry = shift_left<1>(t);
  328|       |
  329|  9.92k|         std::array<W, N> r;  // NOLINT(*-member-init)
  330|  9.92k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  331|  9.92k|         return Self(r);
  332|  9.92k|      }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE5valueEv:
  894|  9.92k|      constexpr const std::array<W, N>& value() const { return m_val; }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE4mul8Ev:
  341|  1.24k|      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|  17.0k|      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|  27.4k|         Self& x, Self& y, Self& z, CT::Choice cond, const Self& nx, const Self& ny, const Self& nz) {
  396|  27.4k|         const W mask = cond.into_bitmask<W>();
  397|       |
  398|   192k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (398:28): [True: 164k, False: 27.4k]
  ------------------
  399|   164k|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  400|   164k|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  401|   164k|            z.m_val[i] = Botan::choose(mask, nz.m_val[i], z.m_val[i]);
  402|   164k|         }
  403|  27.4k|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEEmLERKSA_:
  355|  2.54k|      constexpr BOTAN_FORCE_INLINE Self& operator*=(const Self& other) {
  356|  2.54k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  357|  2.54k|         comba_mul<N>(z.data(), data(), other.data());
  358|  2.54k|         m_val = Rep::redc(z);
  359|  2.54k|         return (*this);
  360|  2.54k|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE8square_nEm:
  439|  2.35k|      constexpr void square_n(size_t n) {
  440|  2.35k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  441|  77.0k|         for(size_t i = 0; i != n; ++i) {
  ------------------
  |  Branch (441:28): [True: 74.6k, False: 2.35k]
  ------------------
  442|  74.6k|            comba_sqr<N>(z.data(), this->data());
  443|  74.6k|            m_val = Rep::redc(z);
  444|  74.6k|         }
  445|  2.35k|      }
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|  25.4k|      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|  12.7k|      constexpr Self negate() const {
  453|  12.7k|         const W x_is_zero = ~CT::all_zeros(this->data(), N).value();
  454|       |
  455|  12.7k|         std::array<W, N> r;  // NOLINT(*-member-init)
  456|  12.7k|         W carry = 0;
  457|  89.1k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (457:28): [True: 76.4k, False: 12.7k]
  ------------------
  458|  76.4k|            r[i] = word_sub(P[i] & x_is_zero, m_val[i], &carry);
  459|  76.4k|         }
  460|       |
  461|  12.7k|         return Self(r);
  462|  12.7k|      }
pcurves_secp384r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEEEC2ERKSB_SE_:
  917|  15.6k|      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|    980|      std::array<W, L> stash_value() const {
  760|    980|         static_assert(L >= N);
  761|    980|         std::array<W, L> stash = {};
  762|  6.86k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 5.88k, False: 980]
  ------------------
  763|  5.88k|            stash[i] = m_val[i];
  764|  5.88k|         }
  765|    980|         return stash;
  766|    980|      }
pcurves_secp384r1.cpp:_ZNK5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm6EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS2_12Secp384r1RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1407|    196|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1408|    196|         const BlindedScalar scalar(s, rng);
 1409|    196|         return basemul_booth_exec<C, WindowBits>(m_table, scalar, rng);
 1410|    196|      }
pcurves_secp384r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm7EEC2ERKNS_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: 0, False: 196]
  ------------------
 1309|      0|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|      0|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|      0|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|      0|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|      0|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|      0|            W mask[n_words] = {0};
 1318|      0|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|      0|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|      0|            if constexpr(ExcessBits > 0) {
 1323|      0|               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|      0|               mask[MaskWords - 1] &= ExcessMask;
 1325|      0|            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|      0|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|      0|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|      0|            mask[0] |= 1;
 1331|       |
 1332|      0|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|      0|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|      0|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|      0|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|      0|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|      0|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|      0|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    196|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|    196|            m_bytes.resize(C::Scalar::BYTES);
 1346|    196|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|    196|            m_bits = C::Scalar::BITS;
 1348|    196|         }
 1349|       |
 1350|    196|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    196|      }
pcurves_secp384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS3_12Secp384r1RepEE12ScalarParamsEE8from_repERKNSt3__15arrayImLm6EEE:
  137|    409|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|    409|         std::array<W, 2 * N> ze = {};
  139|    409|         copy_mem(std::span{ze}.template first<N>(), z);
  140|    409|         return Self::redc(ze);
  141|    409|      }
pcurves_secp384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS3_12Secp384r1RepEE12ScalarParamsEE4redcERKNSt3__15arrayImLm12EEE:
  104|    623|      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|    623|         } else {
  108|    623|            return monty_redc(z, P, P_dash);
  109|    623|         }
  110|    623|      }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS4_12Secp384r1RepEE12ScalarParamsEEEE12serialize_toENSt3__14spanIhLm48EEE:
  739|    409|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    409|         auto v = Rep::from_rep(m_val);
  741|    409|         std::reverse(v.begin(), v.end());
  742|       |
  743|    409|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|    409|            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|    409|      }
pcurves_secp384r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm7EE4bitsEv:
 1305|    196|      size_t bits() const { return m_bits; }
pcurves_secp384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E18conditional_assignENS_2CT6ChoiceERKSC_:
 1084|    196|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
 1085|    196|         FieldElement::conditional_assign(m_x, m_y, m_z, cond, pt.x(), pt.y(), pt.z());
 1086|    196|      }
pcurves_secp384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E6negateEv:
 1134|    196|      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|    196|      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|    588|      constexpr void _const_time_poison() const { CT::poison(m_val); }
pcurves_secp384r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm7EE10get_windowEm:
 1353|  12.7k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  12.7k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  12.7k|      }
pcurves_secp384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E10add_or_subERKSC_RKNS_16AffineCurvePointISB_EENS_2CT6ChoiceE:
 1096|  12.5k|      constexpr static Self add_or_sub(const Self& a, const AffinePoint& b, CT::Choice sub) {
 1097|  12.5k|         return point_add_or_sub_mixed<Self, AffinePoint, FieldElement>(a, b, sub, FieldElement::one());
 1098|  12.5k|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE18conditional_assignENS_2CT6ChoiceERKSA_:
  367|  12.5k|      constexpr void conditional_assign(CT::Choice cond, const Self& nx) {
  368|  12.5k|         const W mask = cond.into_bitmask<W>();
  369|       |
  370|  87.8k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (370:28): [True: 75.2k, False: 12.5k]
  ------------------
  371|  75.2k|            m_val[i] = Botan::choose(mask, nx.m_val[i], m_val[i]);
  372|  75.2k|         }
  373|  12.5k|      }
pcurves_secp384r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEEE9ct_selectENSt3__14spanIKSC_Lm18446744073709551615EEEm:
  955|  12.7k|      static constexpr auto ct_select(std::span<const Self> pts, size_t idx) {
  956|  12.7k|         auto result = Self::identity(pts[0]);
  957|       |
  958|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
  959|  12.7k|         const size_t idx1 = static_cast<size_t>(idx - 1);
  960|   420k|         for(size_t i = 0; i != pts.size(); ++i) {
  ------------------
  |  Branch (960:28): [True: 407k, False: 12.7k]
  ------------------
  961|   407k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
  962|   407k|            result.conditional_assign(found, pts[i]);
  963|   407k|         }
  964|       |
  965|  12.7k|         return result;
  966|  12.7k|      }
pcurves_secp384r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEEE8identityERKSC_:
  924|  12.7k|      static constexpr Self identity(const Self& /*unused*/) {
  925|  12.7k|         return Self(FieldElement::zero(), FieldElement::zero());
  926|  12.7k|      }
pcurves_secp384r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEEE18conditional_assignENS_2CT6ChoiceERKSC_:
  981|   407k|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
  982|   407k|         FieldElement::conditional_assign(m_x, m_y, cond, pt.x(), pt.y());
  983|   407k|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE18conditional_assignERSA_SB_NS_2CT6ChoiceERKSA_SF_:
  380|   407k|      static constexpr void conditional_assign(Self& x, Self& y, CT::Choice cond, const Self& nx, const Self& ny) {
  381|   407k|         const W mask = cond.into_bitmask<W>();
  382|       |
  383|  2.85M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (383:28): [True: 2.44M, False: 407k]
  ------------------
  384|  2.44M|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  385|  2.44M|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  386|  2.44M|         }
  387|   407k|      }
pcurves_secp384r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E13randomize_repERNS_21RandomNumberGeneratorE:
 1142|    784|      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|    784|         if(rng.is_seeded()) {
  ------------------
  |  Branch (1147:13): [True: 0, False: 784]
  ------------------
 1148|      0|            auto r = FieldElement::random(rng);
 1149|       |
 1150|      0|            auto r2 = r.square();
 1151|      0|            auto r3 = r2 * r;
 1152|       |
 1153|      0|            m_x *= r2;
 1154|      0|            m_y *= r3;
 1155|      0|            m_z *= r;
 1156|      0|         }
 1157|    784|      }
pcurves_secp384r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEES7_E20_const_time_unpoisonEv:
 1176|    196|      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|    588|      constexpr void _const_time_unpoison() const { CT::unpoison(m_val); }
pcurves_secp384r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm7EED2Ev:
 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:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS4_12Secp384r1RepEE12ScalarParamsEEEE10from_stashILm9EEESB_RKNSt3__15arrayImXT_EEE:
  774|    622|      static Self from_stash(const std::array<W, L>& stash) {
  775|    622|         static_assert(L >= N);
  776|    622|         std::array<W, N> val = {};
  777|  4.35k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 3.73k, False: 622]
  ------------------
  778|  3.73k|            val[i] = stash[i];
  779|  3.73k|         }
  780|    622|         return Self(val);
  781|    622|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS4_12Secp384r1RepEE12ScalarParamsEEEEC2ENSt3__15arrayImLm6EEE:
  898|    836|      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|    392|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    392|         auto v = Rep::from_rep(m_val);
  741|    392|         std::reverse(v.begin(), v.end());
  742|       |
  743|    392|         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|    392|            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|    392|      }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS4_12Secp384r1RepEE12ScalarParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|    213|      std::array<W, L> stash_value() const {
  760|    213|         static_assert(L >= N);
  761|    213|         std::array<W, L> stash = {};
  762|  1.49k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 1.27k, False: 213]
  ------------------
  763|  1.27k|            stash[i] = m_val[i];
  764|  1.27k|         }
  765|    213|         return stash;
  766|    213|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS2_9secp384r16ParamsES3_E11FieldParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|  1.37k|      static Self from_stash(const std::array<W, L>& stash) {
  775|  1.37k|         static_assert(L >= N);
  776|  1.37k|         std::array<W, N> val = {};
  777|  9.60k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 8.23k, False: 1.37k]
  ------------------
  778|  8.23k|            val[i] = stash[i];
  779|  8.23k|         }
  780|  1.37k|         return Self(val);
  781|  1.37k|      }
pcurves_secp384r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS4_12Secp384r1RepEE12ScalarParamsEEEE7is_zeroEv:
  225|    427|      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|    196|      constexpr CT::Choice operator==(const Self& other) const {
  723|    196|         return CT::is_equal(this->data(), other.data(), N).as_choice();
  724|    196|      }
pcurves_secp384r1.cpp:_ZN5Botan13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS2_12Secp384r1RepEE7x3_ax_bERKNS_6IntModINS5_INS6_11FieldParamsEEEEE:
 1275|    196|      static constexpr FieldElement x3_ax_b(const FieldElement& x) { return (x.square() + A) * x + B; }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS4_12Secp384r1RepEE12ScalarParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|    214|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|    214|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 214]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|    214|         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|    214|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 0, False: 214]
  ------------------
  802|      0|            return {};
  803|      0|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|    214|         return Self::from_words(words);
  807|    214|      }
pcurves_secp384r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS4_12Secp384r1RepEE12ScalarParamsEEEE10from_wordsILm6EEESB_NSt3__15arrayImXT_EEE:
  211|    214|      static constexpr Self from_words(std::array<W, L> w) {
  212|    214|         if constexpr(L == N) {
  213|    214|            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|    214|      }
pcurves_secp384r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp384r16ParamsENS3_12Secp384r1RepEE12ScalarParamsEE6to_repERKNSt3__15arrayImLm6EEE:
  115|    214|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|    214|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|    214|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|    214|         return Self::redc(z);
  119|    214|      }
pcurves_secp384r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS3_9secp384r16ParamsES4_E11FieldParamsEEEEEE12serialize_toENSt3__14spanIhLm97EEE:
  941|    196|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  942|    196|         BOTAN_STATE_CHECK(this->is_identity().as_bool() == false);
  ------------------
  |  |   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]
  |  |  ------------------
  ------------------
  943|    196|         BufferStuffer pack(bytes);
  944|    196|         pack.append(0x04);
  945|    196|         x().serialize_to(pack.next<FieldElement::BYTES>());
  946|    196|         y().serialize_to(pack.next<FieldElement::BYTES>());
  947|    196|         BOTAN_DEBUG_ASSERT(pack.full());
  ------------------
  |  |  130|    196|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    196|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 196]
  |  |  ------------------
  ------------------
  948|    196|      }
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|    205|      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|    205|         auto x = pt.x();
 1027|    205|         auto y = pt.y();
 1028|    205|         auto z = FieldElement::one();
 1029|       |
 1030|    205|         FieldElement::conditional_swap(pt.is_identity(), y, z);
 1031|       |
 1032|    205|         return ProjectiveCurvePoint(x, y, z);
 1033|    205|      }
pcurves_secp521r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE1xEv:
  971|   622k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_secp521r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE1yEv:
  976|   604k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE3oneEv:
  200|  17.7k|      static constexpr Self one() { return Self(Rep::one()); }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEC2ENSt3__15arrayImLm9EEE:
  898|   482k|      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|    205|      static constexpr void conditional_swap(CT::Choice cond, Self& x, Self& y) {
  411|    205|         const W mask = cond.into_bitmask<W>();
  412|       |
  413|  2.05k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (413:28): [True: 1.84k, False: 205]
  ------------------
  414|  1.84k|            auto nx = Botan::choose(mask, y.m_val[i], x.m_val[i]);
  415|  1.84k|            auto ny = Botan::choose(mask, x.m_val[i], y.m_val[i]);
  416|  1.84k|            x.m_val[i] = nx;
  417|  1.84k|            y.m_val[i] = ny;
  418|  1.84k|         }
  419|    205|      }
pcurves_secp521r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE11is_identityEv:
  928|  18.3k|      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|  98.2k|      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|  21.2k|            m_x(x), m_y(y), m_z(z) {}
pcurves_secp521r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E3dblEv:
 1121|  1.64k|      constexpr Self dbl() const {
 1122|  1.64k|         if constexpr(Self::A_is_minus_3) {
 1123|  1.64k|            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|  1.64k|      }
pcurves_secp521r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E1zEv:
 1172|   115k|      constexpr const FieldElement& z() const { return m_z; }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE6squareEv:
  426|  69.3k|      constexpr BOTAN_FORCE_INLINE Self square() const {
  427|  69.3k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  428|  69.3k|         comba_sqr<N>(z.data(), this->data());
  429|  69.3k|         return Self(Rep::redc(z));
  430|  69.3k|      }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4dataEv:
  896|   567k|      constexpr const W* data() const { return m_val.data(); }
pcurves_secp521r1.cpp:_ZN5BotanmlERKNS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEESC_:
  346|   183k|      friend constexpr BOTAN_FORCE_INLINE Self operator*(const Self& a, const Self& b) {
  347|   183k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  348|   183k|         comba_mul<N>(z.data(), a.data(), b.data());
  349|   183k|         return Self(Rep::redc(z));
  350|   183k|      }
pcurves_secp521r1.cpp:_ZN5BotanmiERKNS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEESC_:
  281|   120k|      friend constexpr BOTAN_FORCE_INLINE Self operator-(const Self& a, const Self& b) {
  282|   120k|         std::array<W, N> r;  // NOLINT(*-member-init)
  283|   120k|         W carry = 0;
  284|  1.20M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (284:28): [True: 1.08M, False: 120k]
  ------------------
  285|  1.08M|            r[i] = word_sub(a.m_val[i], b.m_val[i], &carry);
  286|  1.08M|         }
  287|       |
  288|   120k|         const auto mask = CT::Mask<W>::expand(carry).value();
  289|       |
  290|   120k|         carry = 0;
  291|       |
  292|  1.20M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (292:28): [True: 1.08M, False: 120k]
  ------------------
  293|  1.08M|            r[i] = word_add(r[i], P[i] & mask, &carry);
  294|  1.08M|         }
  295|       |
  296|   120k|         return Self(r);
  297|   120k|      }
pcurves_secp521r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E1xEv:
 1162|  67.3k|      constexpr const FieldElement& x() const { return m_x; }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4mul3Ev:
  335|  1.64k|      constexpr inline Self mul3() const { return mul2() + (*this); }
pcurves_secp521r1.cpp:_ZN5BotanplERKNS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEESC_:
  265|  23.2k|      friend constexpr BOTAN_FORCE_INLINE Self operator+(const Self& a, const Self& b) {
  266|  23.2k|         std::array<W, N> t;  // NOLINT(*-member-init)
  267|       |
  268|  23.2k|         W carry = 0;
  269|   232k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (269:28): [True: 209k, False: 23.2k]
  ------------------
  270|   209k|            t[i] = word_add(a.m_val[i], b.m_val[i], &carry);
  271|   209k|         }
  272|       |
  273|  23.2k|         std::array<W, N> r;  // NOLINT(*-member-init)
  274|  23.2k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  275|  23.2k|         return Self(r);
  276|  23.2k|      }
pcurves_secp521r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E1yEv:
 1167|  65.6k|      constexpr const FieldElement& y() const { return m_y; }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4mul4Ev:
  338|  1.64k|      constexpr inline Self mul4() const { return mul2().mul2(); }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4mul2Ev:
  325|  13.1k|      constexpr BOTAN_FORCE_INLINE Self mul2() const {
  326|  13.1k|         std::array<W, N> t = value();
  327|  13.1k|         const W carry = shift_left<1>(t);
  328|       |
  329|  13.1k|         std::array<W, N> r;  // NOLINT(*-member-init)
  330|  13.1k|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), P.data());
  331|  13.1k|         return Self(r);
  332|  13.1k|      }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE5valueEv:
  894|  13.1k|      constexpr const std::array<W, N>& value() const { return m_val; }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE4mul8Ev:
  341|  1.64k|      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|  23.5k|      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|  38.2k|         Self& x, Self& y, Self& z, CT::Choice cond, const Self& nx, const Self& ny, const Self& nz) {
  396|  38.2k|         const W mask = cond.into_bitmask<W>();
  397|       |
  398|   382k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (398:28): [True: 343k, False: 38.2k]
  ------------------
  399|   343k|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  400|   343k|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  401|   343k|            z.m_val[i] = Botan::choose(mask, nz.m_val[i], z.m_val[i]);
  402|   343k|         }
  403|  38.2k|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEEmLERKSA_:
  355|  2.44k|      constexpr BOTAN_FORCE_INLINE Self& operator*=(const Self& other) {
  356|  2.44k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  357|  2.44k|         comba_mul<N>(z.data(), data(), other.data());
  358|  2.44k|         m_val = Rep::redc(z);
  359|  2.44k|         return (*this);
  360|  2.44k|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE8square_nEm:
  439|  2.24k|      constexpr void square_n(size_t n) {
  440|  2.24k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  441|   107k|         for(size_t i = 0; i != n; ++i) {
  ------------------
  |  Branch (441:28): [True: 105k, False: 2.24k]
  ------------------
  442|   105k|            comba_sqr<N>(z.data(), this->data());
  443|   105k|            m_val = Rep::redc(z);
  444|   105k|         }
  445|  2.24k|      }
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|  35.4k|      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|  17.7k|      constexpr Self negate() const {
  453|  17.7k|         const W x_is_zero = ~CT::all_zeros(this->data(), N).value();
  454|       |
  455|  17.7k|         std::array<W, N> r;  // NOLINT(*-member-init)
  456|  17.7k|         W carry = 0;
  457|   177k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (457:28): [True: 159k, False: 17.7k]
  ------------------
  458|   159k|            r[i] = word_sub(P[i] & x_is_zero, m_val[i], &carry);
  459|   159k|         }
  460|       |
  461|  17.7k|         return Self(r);
  462|  17.7k|      }
pcurves_secp521r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEEC2ERKSB_SE_:
  917|  21.4k|      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|  1.02k|      std::array<W, L> stash_value() const {
  760|  1.02k|         static_assert(L >= N);
  761|  1.02k|         std::array<W, L> stash = {};
  762|  10.2k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 9.19k, False: 1.02k]
  ------------------
  763|  9.19k|            stash[i] = m_val[i];
  764|  9.19k|         }
  765|  1.02k|         return stash;
  766|  1.02k|      }
pcurves_secp521r1.cpp:_ZNK5Botan23PrecomputedBaseMulTableINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm6EE3mulERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS3_7P521RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1407|    204|      ProjectivePoint mul(const Scalar& s, RandomNumberGenerator& rng) const {
 1408|    204|         const BlindedScalar scalar(s, rng);
 1409|    204|         return basemul_booth_exec<C, WindowBits>(m_table, scalar, rng);
 1410|    204|      }
pcurves_secp521r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm7EEC2ERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS3_7P521RepEE12ScalarParamsEEEEERNS_21RandomNumberGeneratorE:
 1307|    204|      BlindedScalarBits(const typename C::Scalar& scalar, RandomNumberGenerator& rng) {
 1308|    204|         if(BlindingBits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1308:13): [True: 204, Folded]
  |  Branch (1308:33): [True: 0, False: 204]
  ------------------
 1309|      0|            constexpr size_t MaskWords = (BlindingBits + WordInfo<W>::bits - 1) / WordInfo<W>::bits;
 1310|      0|            constexpr size_t MaskBytes = MaskWords * WordInfo<W>::bytes;
 1311|       |
 1312|      0|            constexpr size_t n_words = C::Words;
 1313|       |
 1314|      0|            uint8_t maskb[MaskBytes + (BlindingBits == 0 ? 1 : 0)] = {0};
 1315|      0|            rng.randomize(maskb, MaskBytes);
 1316|       |
 1317|      0|            W mask[n_words] = {0};
 1318|      0|            load_le(mask, maskb, MaskWords);
 1319|       |
 1320|       |            // Mask to exactly BlindingBits
 1321|      0|            constexpr size_t ExcessBits = MaskWords * WordInfo<W>::bits - BlindingBits;
 1322|      0|            if constexpr(ExcessBits > 0) {
 1323|      0|               constexpr W ExcessMask = (static_cast<W>(1) << (WordInfo<W>::bits - ExcessBits)) - 1;
 1324|      0|               mask[MaskWords - 1] &= ExcessMask;
 1325|      0|            }
 1326|       |
 1327|       |            // Set top and bottom bits of mask
 1328|      0|            constexpr size_t TopMaskBit = (BlindingBits - 1) % WordInfo<W>::bits;
 1329|      0|            mask[(BlindingBits - 1) / WordInfo<W>::bits] |= static_cast<W>(1) << TopMaskBit;
 1330|      0|            mask[0] |= 1;
 1331|       |
 1332|      0|            W mask_n[2 * n_words] = {0};
 1333|       |
 1334|      0|            const auto sw = scalar.to_words();
 1335|       |
 1336|       |            // Compute masked scalar s + k*n
 1337|      0|            comba_mul<n_words>(mask_n, mask, C::NW.data());
 1338|      0|            bigint_add2(mask_n, 2 * n_words, sw.data(), sw.size());
 1339|       |
 1340|      0|            std::reverse(mask_n, mask_n + 2 * n_words);
 1341|      0|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1342|      0|            m_bits = C::Scalar::BITS + BlindingBits;
 1343|    204|         } else {
 1344|       |            // No RNG available, skip blinding
 1345|    204|            m_bytes.resize(C::Scalar::BYTES);
 1346|    204|            scalar.serialize_to(std::span{m_bytes}.template first<C::Scalar::BYTES>());
 1347|    204|            m_bits = C::Scalar::BITS;
 1348|    204|         }
 1349|       |
 1350|    204|         CT::poison(m_bytes.data(), m_bytes.size());
 1351|    204|      }
pcurves_secp521r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS4_7P521RepEE12ScalarParamsEE8from_repERKNSt3__15arrayImLm9EEE:
  137|    505|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) {
  138|    505|         std::array<W, 2 * N> ze = {};
  139|    505|         copy_mem(std::span{ze}.template first<N>(), z);
  140|    505|         return Self::redc(ze);
  141|    505|      }
pcurves_secp521r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS4_7P521RepEE12ScalarParamsEE4redcERKNSt3__15arrayImLm18EEE:
  104|    807|      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|    807|         } else {
  108|    807|            return monty_redc(z, P, P_dash);
  109|    807|         }
  110|    807|      }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS5_7P521RepEE12ScalarParamsEEEE12serialize_toENSt3__14spanIhLm66EEE:
  739|    505|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    505|         auto v = Rep::from_rep(m_val);
  741|    505|         std::reverse(v.begin(), v.end());
  742|       |
  743|       |         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|       |            store_be(bytes, v);
  745|    505|         } else {
  746|       |            // Remove leading zero bytes
  747|    505|            const auto padded_bytes = store_be(v);
  748|    505|            constexpr size_t extra = N * WordInfo<W>::bytes - Self::BYTES;
  749|    505|            copy_mem(bytes, std::span{padded_bytes}.template subspan<extra, Self::BYTES>());
  750|    505|         }
  751|    505|      }
pcurves_secp521r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm7EE4bitsEv:
 1305|    204|      size_t bits() const { return m_bits; }
pcurves_secp521r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E18conditional_assignENS_2CT6ChoiceERKSC_:
 1084|    204|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
 1085|    204|         FieldElement::conditional_assign(m_x, m_y, m_z, cond, pt.x(), pt.y(), pt.z());
 1086|    204|      }
pcurves_secp521r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E6negateEv:
 1134|    204|      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|    204|      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|    612|      constexpr void _const_time_poison() const { CT::poison(m_val); }
pcurves_secp521r1.cpp:_ZNK5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm7EE10get_windowEm:
 1353|  17.7k|      size_t get_window(size_t offset) const {
 1354|       |         // Extract a WindowBits sized window out of s, depending on offset.
 1355|  17.7k|         return read_window_bits<WindowBits>(std::span{m_bytes}, offset);
 1356|  17.7k|      }
pcurves_secp521r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E10add_or_subERKSC_RKNS_16AffineCurvePointISB_EENS_2CT6ChoiceE:
 1096|  17.5k|      constexpr static Self add_or_sub(const Self& a, const AffinePoint& b, CT::Choice sub) {
 1097|  17.5k|         return point_add_or_sub_mixed<Self, AffinePoint, FieldElement>(a, b, sub, FieldElement::one());
 1098|  17.5k|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE18conditional_assignENS_2CT6ChoiceERKSA_:
  367|  17.5k|      constexpr void conditional_assign(CT::Choice cond, const Self& nx) {
  368|  17.5k|         const W mask = cond.into_bitmask<W>();
  369|       |
  370|   175k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (370:28): [True: 157k, False: 17.5k]
  ------------------
  371|   157k|            m_val[i] = Botan::choose(mask, nx.m_val[i], m_val[i]);
  372|   157k|         }
  373|  17.5k|      }
pcurves_secp521r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE9ct_selectENSt3__14spanIKSC_Lm18446744073709551615EEEm:
  955|  17.7k|      static constexpr auto ct_select(std::span<const Self> pts, size_t idx) {
  956|  17.7k|         auto result = Self::identity(pts[0]);
  957|       |
  958|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
  959|  17.7k|         const size_t idx1 = static_cast<size_t>(idx - 1);
  960|   585k|         for(size_t i = 0; i != pts.size(); ++i) {
  ------------------
  |  Branch (960:28): [True: 567k, False: 17.7k]
  ------------------
  961|   567k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
  962|   567k|            result.conditional_assign(found, pts[i]);
  963|   567k|         }
  964|       |
  965|  17.7k|         return result;
  966|  17.7k|      }
pcurves_secp521r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE8identityERKSC_:
  924|  17.7k|      static constexpr Self identity(const Self& /*unused*/) {
  925|  17.7k|         return Self(FieldElement::zero(), FieldElement::zero());
  926|  17.7k|      }
pcurves_secp521r1.cpp:_ZN5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE18conditional_assignENS_2CT6ChoiceERKSC_:
  981|   567k|      constexpr void conditional_assign(CT::Choice cond, const Self& pt) {
  982|   567k|         FieldElement::conditional_assign(m_x, m_y, cond, pt.x(), pt.y());
  983|   567k|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE18conditional_assignERSA_SB_NS_2CT6ChoiceERKSA_SF_:
  380|   567k|      static constexpr void conditional_assign(Self& x, Self& y, CT::Choice cond, const Self& nx, const Self& ny) {
  381|   567k|         const W mask = cond.into_bitmask<W>();
  382|       |
  383|  5.67M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (383:28): [True: 5.11M, False: 567k]
  ------------------
  384|  5.11M|            x.m_val[i] = Botan::choose(mask, nx.m_val[i], x.m_val[i]);
  385|  5.11M|            y.m_val[i] = Botan::choose(mask, ny.m_val[i], y.m_val[i]);
  386|  5.11M|         }
  387|   567k|      }
pcurves_secp521r1.cpp:_ZN5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E13randomize_repERNS_21RandomNumberGeneratorE:
 1142|    816|      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|    816|         if(rng.is_seeded()) {
  ------------------
  |  Branch (1147:13): [True: 0, False: 816]
  ------------------
 1148|      0|            auto r = FieldElement::random(rng);
 1149|       |
 1150|      0|            auto r2 = r.square();
 1151|      0|            auto r3 = r2 * r;
 1152|       |
 1153|      0|            m_x *= r2;
 1154|      0|            m_y *= r3;
 1155|      0|            m_z *= r;
 1156|      0|         }
 1157|    816|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|    184|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|    184|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 184]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|    184|         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|    184|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 8, False: 176]
  ------------------
  802|      8|            return {};
  803|      8|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|    176|         return Self::from_words(words);
  807|    184|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE10from_wordsILm9EEESA_NSt3__15arrayImXT_EEE:
  211|    176|      static constexpr Self from_words(std::array<W, L> w) {
  212|    176|         if constexpr(L == N) {
  213|    176|            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|    176|      }
pcurves_secp521r1.cpp:_ZNK5Botan20ProjectiveCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEES7_E20_const_time_unpoisonEv:
 1176|    204|      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|    612|      constexpr void _const_time_unpoison() const { CT::unpoison(m_val); }
pcurves_secp521r1.cpp:_ZN5Botan17BlindedScalarBitsINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm7EED2Ev:
 1358|    204|      ~BlindedScalarBits() {
 1359|    204|         secure_zeroize_buffer(m_bytes.data(), m_bytes.size());
 1360|    204|         CT::unpoison(m_bytes.data(), m_bytes.size());
 1361|    204|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS5_7P521RepEE12ScalarParamsEEEE10from_stashILm9EEESB_RKNSt3__15arrayImXT_EEE:
  774|    806|      static Self from_stash(const std::array<W, L>& stash) {
  775|    806|         static_assert(L >= N);
  776|    806|         std::array<W, N> val = {};
  777|  8.06k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 7.25k, False: 806]
  ------------------
  778|  7.25k|            val[i] = stash[i];
  779|  7.25k|         }
  780|    806|         return Self(val);
  781|    806|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS5_7P521RepEE12ScalarParamsEEEEC2ENSt3__15arrayImLm9EEE:
  898|  1.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|    410|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  740|    410|         auto v = Rep::from_rep(m_val);
  741|    410|         std::reverse(v.begin(), v.end());
  742|       |
  743|       |         if constexpr(Self::BYTES == N * WordInfo<W>::bytes) {
  744|       |            store_be(bytes, v);
  745|    410|         } else {
  746|       |            // Remove leading zero bytes
  747|    410|            const auto padded_bytes = store_be(v);
  748|    410|            constexpr size_t extra = N * WordInfo<W>::bytes - Self::BYTES;
  749|    410|            copy_mem(bytes, std::span{padded_bytes}.template subspan<extra, Self::BYTES>());
  750|    410|         }
  751|    410|      }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS5_7P521RepEE12ScalarParamsEEEE11stash_valueILm9EEENSt3__15arrayImXT_EEEv:
  759|    301|      std::array<W, L> stash_value() const {
  760|    301|         static_assert(L >= N);
  761|    301|         std::array<W, L> stash = {};
  762|  3.01k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (762:28): [True: 2.70k, False: 301]
  ------------------
  763|  2.70k|            stash[i] = m_val[i];
  764|  2.70k|         }
  765|    301|         return stash;
  766|    301|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS3_6ParamsES4_E11FieldParamsEEEE10from_stashILm9EEESA_RKNSt3__15arrayImXT_EEE:
  774|  1.43k|      static Self from_stash(const std::array<W, L>& stash) {
  775|  1.43k|         static_assert(L >= N);
  776|  1.43k|         std::array<W, N> val = {};
  777|  14.3k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (777:28): [True: 12.8k, False: 1.43k]
  ------------------
  778|  12.8k|            val[i] = stash[i];
  779|  12.8k|         }
  780|  1.43k|         return Self(val);
  781|  1.43k|      }
pcurves_secp521r1.cpp:_ZNK5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS5_7P521RepEE12ScalarParamsEEEE7is_zeroEv:
  225|    603|      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|    291|      constexpr CT::Choice operator==(const Self& other) const {
  723|    291|         return CT::is_equal(this->data(), other.data(), N).as_choice();
  724|    291|      }
pcurves_secp521r1.cpp:_ZN5Botan13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS3_7P521RepEE7x3_ax_bERKNS_6IntModINS5_INS6_11FieldParamsEEEEE:
 1275|    291|      static constexpr FieldElement x3_ax_b(const FieldElement& x) { return (x.square() + A) * x + B; }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS5_7P521RepEE12ScalarParamsEEEE11deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  792|    304|      static std::optional<Self> deserialize(std::span<const uint8_t> bytes) {
  793|       |         // Conditional ok: input length is public
  794|    304|         if(bytes.size() != Self::BYTES) {
  ------------------
  |  Branch (794:13): [True: 0, False: 304]
  ------------------
  795|      0|            return {};
  796|      0|         }
  797|       |
  798|    304|         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|    304|         if(!bigint_ct_is_lt(words.data(), N, P.data(), N).as_bool()) {
  ------------------
  |  Branch (801:13): [True: 2, False: 302]
  ------------------
  802|      2|            return {};
  803|      2|         }
  804|       |
  805|       |         // Safe because we checked above that words is an integer < P
  806|    302|         return Self::from_words(words);
  807|    304|      }
pcurves_secp521r1.cpp:_ZN5Botan6IntModINS_13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS5_7P521RepEE12ScalarParamsEEEE10from_wordsILm9EEESB_NSt3__15arrayImXT_EEE:
  211|    302|      static constexpr Self from_words(std::array<W, L> w) {
  212|    302|         if constexpr(L == N) {
  213|    302|            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|    302|      }
pcurves_secp521r1.cpp:_ZN5Botan13MontgomeryRepINS_13EllipticCurveINS_6PCurve12_GLOBAL__N_19secp521r16ParamsENS4_7P521RepEE12ScalarParamsEE6to_repERKNSt3__15arrayImLm9EEE:
  115|    302|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) {
  116|    302|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  117|    302|         comba_mul<N>(z.data(), x.data(), R2.data());
  118|    302|         return Self::redc(z);
  119|    302|      }
pcurves_secp521r1.cpp:_ZNK5Botan16AffineCurvePointINS_6IntModINS_6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS4_6ParamsES5_E11FieldParamsEEEEEE12serialize_toENSt3__14spanIhLm133EEE:
  941|    205|      constexpr void serialize_to(std::span<uint8_t, Self::BYTES> bytes) const {
  942|    205|         BOTAN_STATE_CHECK(this->is_identity().as_bool() == false);
  ------------------
  |  |   51|    205|   do {                                                         \
  |  |   52|    205|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    205|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 205]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    205|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 205]
  |  |  ------------------
  ------------------
  943|    205|         BufferStuffer pack(bytes);
  944|    205|         pack.append(0x04);
  945|    205|         x().serialize_to(pack.next<FieldElement::BYTES>());
  946|    205|         y().serialize_to(pack.next<FieldElement::BYTES>());
  947|    205|         BOTAN_DEBUG_ASSERT(pack.full());
  ------------------
  |  |  130|    205|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    205|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 205]
  |  |  ------------------
  ------------------
  948|    205|      }

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|    104|                                               RandomNumberGenerator& rng) {
  309|    104|   static constexpr size_t WindowElements = 1 << (WindowBits - 1);
  310|       |
  311|    104|   const size_t windows = (scalar.bits() + WindowBits) / WindowBits;
  312|       |
  313|    104|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    104|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    104|      const size_t raw = w_bits << 1;
  317|    104|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    104|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    104|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    104|      pt.conditional_assign(tneg, pt.negate());
  322|    104|      CT::poison(pt);
  323|    104|      pt.randomize_rep(rng);
  324|    104|      return pt;
  325|    104|   }();
  326|       |
  327|  4.47k|   for(size_t i = 1; i != windows; ++i) {
  ------------------
  |  Branch (327:22): [True: 4.36k, False: 104]
  ------------------
  328|       |      // Extract W+1 bits overlapping by 1 with the previous window
  329|  4.36k|      const size_t bit_pos = WindowBits * i - 1;
  330|  4.36k|      const size_t raw = scalar.get_window(bit_pos);
  331|  4.36k|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  332|       |
  333|  4.36k|      const auto tbl_i = table.subspan(WindowElements * i, WindowElements);
  334|       |
  335|  4.36k|      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|  4.36k|      if(i <= 3) {
  ------------------
  |  Branch (338:10): [True: 312, False: 4.05k]
  ------------------
  339|    312|         accum.randomize_rep(rng);
  340|    312|      }
  341|  4.36k|   }
  342|       |
  343|    104|   CT::unpoison(accum);
  344|    104|   return accum;
  345|    104|}
pcurves_brainpool256r1.cpp:_ZZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_114brainpool256r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorEENKUlvE_clEv:
  313|    104|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    104|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    104|      const size_t raw = w_bits << 1;
  317|    104|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    104|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    104|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    104|      pt.conditional_assign(tneg, pt.negate());
  322|    104|      CT::poison(pt);
  323|    104|      pt.randomize_rep(rng);
  324|    104|      return pt;
  325|    104|   }();
_ZN5Botan12booth_recodeILm6ETkNSt3__117unsigned_integralEmEENS1_4pairImNS_2CT6ChoiceEEET0_:
  294|  91.0k|constexpr std::pair<size_t, CT::Choice> booth_recode(T x) {
  295|  91.0k|   static_assert(WindowBits >= 1 && WindowBits <= 8);
  296|       |
  297|  91.0k|   auto s_mask = CT::Mask<T>::expand(x >> WindowBits);
  298|  91.0k|   const T neg_x = (1 << (WindowBits + 1)) - x - 1;
  299|  91.0k|   T d = s_mask.select(neg_x, x);
  300|  91.0k|   d = (d >> 1) + (d & 1);
  301|       |
  302|  91.0k|   return std::make_pair(static_cast<size_t>(d), s_mask.as_choice());
  303|  91.0k|}
_ZN5Botan20scalar_blinding_bitsEm:
   41|    792|constexpr size_t scalar_blinding_bits(size_t scalar_bits) {
   42|       |   // For blinding use 1/8 the order length for most curves; for P-521 we round down a bit
   43|       |   // so the masked scalar fits exactly in 9 or 18 words.
   44|       |
   45|    792|   if(scalar_bits == 521) {
  ------------------
  |  Branch (45:7): [True: 38, False: 754]
  ------------------
   46|     38|      return 55;
   47|    754|   } else {
   48|    754|      return scalar_bits / 8;
   49|    754|   }
   50|    792|}
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|    165|                                               RandomNumberGenerator& rng) {
  309|    165|   static constexpr size_t WindowElements = 1 << (WindowBits - 1);
  310|       |
  311|    165|   const size_t windows = (scalar.bits() + WindowBits) / WindowBits;
  312|       |
  313|    165|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    165|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    165|      const size_t raw = w_bits << 1;
  317|    165|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    165|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    165|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    165|      pt.conditional_assign(tneg, pt.negate());
  322|    165|      CT::poison(pt);
  323|    165|      pt.randomize_rep(rng);
  324|    165|      return pt;
  325|    165|   }();
  326|       |
  327|  10.7k|   for(size_t i = 1; i != windows; ++i) {
  ------------------
  |  Branch (327:22): [True: 10.5k, False: 165]
  ------------------
  328|       |      // Extract W+1 bits overlapping by 1 with the previous window
  329|  10.5k|      const size_t bit_pos = WindowBits * i - 1;
  330|  10.5k|      const size_t raw = scalar.get_window(bit_pos);
  331|  10.5k|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  332|       |
  333|  10.5k|      const auto tbl_i = table.subspan(WindowElements * i, WindowElements);
  334|       |
  335|  10.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|  10.5k|      if(i <= 3) {
  ------------------
  |  Branch (338:10): [True: 495, False: 10.0k]
  ------------------
  339|    495|         accum.randomize_rep(rng);
  340|    495|      }
  341|  10.5k|   }
  342|       |
  343|    165|   CT::unpoison(accum);
  344|    165|   return accum;
  345|    165|}
pcurves_brainpool384r1.cpp:_ZZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_114brainpool384r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorEENKUlvE_clEv:
  313|    165|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    165|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    165|      const size_t raw = w_bits << 1;
  317|    165|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    165|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    165|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    165|      pt.conditional_assign(tneg, pt.negate());
  322|    165|      CT::poison(pt);
  323|    165|      pt.randomize_rep(rng);
  324|    165|      return pt;
  325|    165|   }();
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|    139|                                               RandomNumberGenerator& rng) {
  309|    139|   static constexpr size_t WindowElements = 1 << (WindowBits - 1);
  310|       |
  311|    139|   const size_t windows = (scalar.bits() + WindowBits) / WindowBits;
  312|       |
  313|    139|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    139|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    139|      const size_t raw = w_bits << 1;
  317|    139|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    139|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    139|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    139|      pt.conditional_assign(tneg, pt.negate());
  322|    139|      CT::poison(pt);
  323|    139|      pt.randomize_rep(rng);
  324|    139|      return pt;
  325|    139|   }();
  326|       |
  327|  11.9k|   for(size_t i = 1; i != windows; ++i) {
  ------------------
  |  Branch (327:22): [True: 11.8k, False: 139]
  ------------------
  328|       |      // Extract W+1 bits overlapping by 1 with the previous window
  329|  11.8k|      const size_t bit_pos = WindowBits * i - 1;
  330|  11.8k|      const size_t raw = scalar.get_window(bit_pos);
  331|  11.8k|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  332|       |
  333|  11.8k|      const auto tbl_i = table.subspan(WindowElements * i, WindowElements);
  334|       |
  335|  11.8k|      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|  11.8k|      if(i <= 3) {
  ------------------
  |  Branch (338:10): [True: 417, False: 11.3k]
  ------------------
  339|    417|         accum.randomize_rep(rng);
  340|    417|      }
  341|  11.8k|   }
  342|       |
  343|    139|   CT::unpoison(accum);
  344|    139|   return accum;
  345|    139|}
pcurves_brainpool512r1.cpp:_ZZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_114brainpool512r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorEENKUlvE_clEv:
  313|    139|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    139|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    139|      const size_t raw = w_bits << 1;
  317|    139|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    139|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    139|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    139|      pt.conditional_assign(tneg, pt.negate());
  322|    139|      CT::poison(pt);
  323|    139|      pt.randomize_rep(rng);
  324|    139|      return pt;
  325|    139|   }();
pcurves_generic.cpp:_ZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_112GenericCurveELm6ENS2_24GenericBlindedScalarBitsEEENT_15ProjectivePointENSt3__14spanIKNS5_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorE:
  308|    332|                                               RandomNumberGenerator& rng) {
  309|    332|   static constexpr size_t WindowElements = 1 << (WindowBits - 1);
  310|       |
  311|    332|   const size_t windows = (scalar.bits() + WindowBits) / WindowBits;
  312|       |
  313|    332|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    332|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    332|      const size_t raw = w_bits << 1;
  317|    332|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    332|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    332|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    332|      pt.conditional_assign(tneg, pt.negate());
  322|    332|      CT::poison(pt);
  323|    332|      pt.randomize_rep(rng);
  324|    332|      return pt;
  325|    332|   }();
  326|       |
  327|  12.6k|   for(size_t i = 1; i != windows; ++i) {
  ------------------
  |  Branch (327:22): [True: 12.2k, False: 332]
  ------------------
  328|       |      // Extract W+1 bits overlapping by 1 with the previous window
  329|  12.2k|      const size_t bit_pos = WindowBits * i - 1;
  330|  12.2k|      const size_t raw = scalar.get_window(bit_pos);
  331|  12.2k|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  332|       |
  333|  12.2k|      const auto tbl_i = table.subspan(WindowElements * i, WindowElements);
  334|       |
  335|  12.2k|      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|  12.2k|      if(i <= 3) {
  ------------------
  |  Branch (338:10): [True: 996, False: 11.2k]
  ------------------
  339|    996|         accum.randomize_rep(rng);
  340|    996|      }
  341|  12.2k|   }
  342|       |
  343|    332|   CT::unpoison(accum);
  344|    332|   return accum;
  345|    332|}
pcurves_generic.cpp:_ZZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_112GenericCurveELm6ENS2_24GenericBlindedScalarBitsEEENT_15ProjectivePointENSt3__14spanIKNS5_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorEENKUlvE_clEv:
  313|    332|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    332|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    332|      const size_t raw = w_bits << 1;
  317|    332|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    332|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    332|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    332|      pt.conditional_assign(tneg, pt.negate());
  322|    332|      CT::poison(pt);
  323|    332|      pt.randomize_rep(rng);
  324|    332|      return pt;
  325|    332|   }();
pcurves_generic.cpp:_ZN5Botan19basemul_booth_setupINS_6PCurve12_GLOBAL__N_112GenericCurveELm6EEENSt3__16vectorINT_11AffinePointENS4_9allocatorIS7_EEEERKS7_m:
  254|    460|std::vector<typename C::AffinePoint> basemul_booth_setup(const typename C::AffinePoint& p, size_t max_scalar_bits) {
  255|    460|   static_assert(WindowBits >= 1 && WindowBits <= 8);
  256|       |
  257|       |   // 2^(W-1) elements per window [1*base .. 2^(W-1)*base]
  258|    460|   constexpr size_t WindowElements = 1 << (WindowBits - 1);
  259|       |
  260|    460|   const size_t Windows = (max_scalar_bits + WindowBits - 1) / WindowBits;
  261|       |
  262|    460|   const size_t TableSize = Windows * WindowElements;
  263|       |
  264|    460|   std::vector<typename C::ProjectivePoint> table;
  265|    460|   table.reserve(TableSize);
  266|       |
  267|    460|   auto accum = C::ProjectivePoint::from_affine(p);
  268|       |
  269|  22.2k|   for(size_t i = 0; i != TableSize; i += WindowElements) {
  ------------------
  |  Branch (269:22): [True: 21.8k, False: 460]
  ------------------
  270|  21.8k|      table.push_back(accum);
  271|       |
  272|   697k|      for(size_t j = 1; j != WindowElements; ++j) {
  ------------------
  |  Branch (272:25): [True: 675k, False: 21.8k]
  ------------------
  273|       |         // Conditional ok: loop iteration count is public
  274|   675k|         if(j % 2 == 1) {
  ------------------
  |  Branch (274:13): [True: 348k, False: 327k]
  ------------------
  275|   348k|            table.emplace_back(table[i + j / 2].dbl());
  276|   348k|         } else {
  277|   327k|            table.emplace_back(table[i + j - 1] + table[i]);
  278|   327k|         }
  279|   675k|      }
  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|  21.8k|      accum = table[i + WindowElements - 1].dbl();
  284|  21.8k|   }
  285|       |
  286|       |   // Variable time batch conversion is fine since generator is public
  287|    460|   return to_affine_batch<C, true>(table);
  288|    460|}
pcurves_secp224r1.cpp:_ZN5Botan19basemul_booth_setupINS_6PCurve12_GLOBAL__N_19secp224r15CurveELm6EEENSt3__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|     44|   for(size_t i = 0; i != TableSize; i += WindowElements) {
  ------------------
  |  Branch (269:22): [True: 43, False: 1]
  ------------------
  270|     43|      table.push_back(accum);
  271|       |
  272|  1.37k|      for(size_t j = 1; j != WindowElements; ++j) {
  ------------------
  |  Branch (272:25): [True: 1.33k, False: 43]
  ------------------
  273|       |         // Conditional ok: loop iteration count is public
  274|  1.33k|         if(j % 2 == 1) {
  ------------------
  |  Branch (274:13): [True: 688, False: 645]
  ------------------
  275|    688|            table.emplace_back(table[i + j / 2].dbl());
  276|    688|         } else {
  277|    645|            table.emplace_back(table[i + j - 1] + table[i]);
  278|    645|         }
  279|  1.33k|      }
  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|     43|      accum = table[i + WindowElements - 1].dbl();
  284|     43|   }
  285|       |
  286|       |   // Variable time batch conversion is fine since generator is public
  287|      1|   return to_affine_batch<C, true>(table);
  288|      1|}
pcurves_secp224r1.cpp:_ZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_19secp224r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorE:
  308|    217|                                               RandomNumberGenerator& rng) {
  309|    217|   static constexpr size_t WindowElements = 1 << (WindowBits - 1);
  310|       |
  311|    217|   const size_t windows = (scalar.bits() + WindowBits) / WindowBits;
  312|       |
  313|    217|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    217|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    217|      const size_t raw = w_bits << 1;
  317|    217|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    217|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    217|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    217|      pt.conditional_assign(tneg, pt.negate());
  322|    217|      CT::poison(pt);
  323|    217|      pt.randomize_rep(rng);
  324|    217|      return pt;
  325|    217|   }();
  326|       |
  327|  8.24k|   for(size_t i = 1; i != windows; ++i) {
  ------------------
  |  Branch (327:22): [True: 8.02k, False: 217]
  ------------------
  328|       |      // Extract W+1 bits overlapping by 1 with the previous window
  329|  8.02k|      const size_t bit_pos = WindowBits * i - 1;
  330|  8.02k|      const size_t raw = scalar.get_window(bit_pos);
  331|  8.02k|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  332|       |
  333|  8.02k|      const auto tbl_i = table.subspan(WindowElements * i, WindowElements);
  334|       |
  335|  8.02k|      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|  8.02k|      if(i <= 3) {
  ------------------
  |  Branch (338:10): [True: 651, False: 7.37k]
  ------------------
  339|    651|         accum.randomize_rep(rng);
  340|    651|      }
  341|  8.02k|   }
  342|       |
  343|    217|   CT::unpoison(accum);
  344|    217|   return accum;
  345|    217|}
pcurves_secp224r1.cpp:_ZZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_19secp224r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorEENKUlvE_clEv:
  313|    217|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    217|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    217|      const size_t raw = w_bits << 1;
  317|    217|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    217|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    217|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    217|      pt.conditional_assign(tneg, pt.negate());
  322|    217|      CT::poison(pt);
  323|    217|      pt.randomize_rep(rng);
  324|    217|      return pt;
  325|    217|   }();
pcurves_secp256k1.cpp:_ZN5Botan19basemul_booth_setupINS_6PCurve12_GLOBAL__N_19secp256k15CurveELm6EEENSt3__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_secp256k1.cpp:_ZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_19secp256k15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorE:
  308|    219|                                               RandomNumberGenerator& rng) {
  309|    219|   static constexpr size_t WindowElements = 1 << (WindowBits - 1);
  310|       |
  311|    219|   const size_t windows = (scalar.bits() + WindowBits) / WindowBits;
  312|       |
  313|    219|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    219|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    219|      const size_t raw = w_bits << 1;
  317|    219|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    219|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    219|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    219|      pt.conditional_assign(tneg, pt.negate());
  322|    219|      CT::poison(pt);
  323|    219|      pt.randomize_rep(rng);
  324|    219|      return pt;
  325|    219|   }();
  326|       |
  327|  9.41k|   for(size_t i = 1; i != windows; ++i) {
  ------------------
  |  Branch (327:22): [True: 9.19k, False: 219]
  ------------------
  328|       |      // Extract W+1 bits overlapping by 1 with the previous window
  329|  9.19k|      const size_t bit_pos = WindowBits * i - 1;
  330|  9.19k|      const size_t raw = scalar.get_window(bit_pos);
  331|  9.19k|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  332|       |
  333|  9.19k|      const auto tbl_i = table.subspan(WindowElements * i, WindowElements);
  334|       |
  335|  9.19k|      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|  9.19k|      if(i <= 3) {
  ------------------
  |  Branch (338:10): [True: 657, False: 8.54k]
  ------------------
  339|    657|         accum.randomize_rep(rng);
  340|    657|      }
  341|  9.19k|   }
  342|       |
  343|    219|   CT::unpoison(accum);
  344|    219|   return accum;
  345|    219|}
pcurves_secp256k1.cpp:_ZZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_19secp256k15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorEENKUlvE_clEv:
  313|    219|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    219|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    219|      const size_t raw = w_bits << 1;
  317|    219|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    219|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    219|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    219|      pt.conditional_assign(tneg, pt.negate());
  322|    219|      CT::poison(pt);
  323|    219|      pt.randomize_rep(rng);
  324|    219|      return pt;
  325|    219|   }();
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|     73|                                               RandomNumberGenerator& rng) {
  309|     73|   static constexpr size_t WindowElements = 1 << (WindowBits - 1);
  310|       |
  311|     73|   const size_t windows = (scalar.bits() + WindowBits) / WindowBits;
  312|       |
  313|     73|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|     73|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|     73|      const size_t raw = w_bits << 1;
  317|     73|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|     73|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|     73|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|     73|      pt.conditional_assign(tneg, pt.negate());
  322|     73|      CT::poison(pt);
  323|     73|      pt.randomize_rep(rng);
  324|     73|      return pt;
  325|     73|   }();
  326|       |
  327|  3.13k|   for(size_t i = 1; i != windows; ++i) {
  ------------------
  |  Branch (327:22): [True: 3.06k, False: 73]
  ------------------
  328|       |      // Extract W+1 bits overlapping by 1 with the previous window
  329|  3.06k|      const size_t bit_pos = WindowBits * i - 1;
  330|  3.06k|      const size_t raw = scalar.get_window(bit_pos);
  331|  3.06k|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  332|       |
  333|  3.06k|      const auto tbl_i = table.subspan(WindowElements * i, WindowElements);
  334|       |
  335|  3.06k|      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|  3.06k|      if(i <= 3) {
  ------------------
  |  Branch (338:10): [True: 219, False: 2.84k]
  ------------------
  339|    219|         accum.randomize_rep(rng);
  340|    219|      }
  341|  3.06k|   }
  342|       |
  343|     73|   CT::unpoison(accum);
  344|     73|   return accum;
  345|     73|}
pcurves_secp256r1.cpp:_ZZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_19secp256r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorEENKUlvE_clEv:
  313|     73|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|     73|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|     73|      const size_t raw = w_bits << 1;
  317|     73|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|     73|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|     73|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|     73|      pt.conditional_assign(tneg, pt.negate());
  322|     73|      CT::poison(pt);
  323|     73|      pt.randomize_rep(rng);
  324|     73|      return pt;
  325|     73|   }();
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|    196|                                               RandomNumberGenerator& rng) {
  309|    196|   static constexpr size_t WindowElements = 1 << (WindowBits - 1);
  310|       |
  311|    196|   const size_t windows = (scalar.bits() + WindowBits) / WindowBits;
  312|       |
  313|    196|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    196|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    196|      const size_t raw = w_bits << 1;
  317|    196|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    196|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    196|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    196|      pt.conditional_assign(tneg, pt.negate());
  322|    196|      CT::poison(pt);
  323|    196|      pt.randomize_rep(rng);
  324|    196|      return pt;
  325|    196|   }();
  326|       |
  327|  12.7k|   for(size_t i = 1; i != windows; ++i) {
  ------------------
  |  Branch (327:22): [True: 12.5k, False: 196]
  ------------------
  328|       |      // Extract W+1 bits overlapping by 1 with the previous window
  329|  12.5k|      const size_t bit_pos = WindowBits * i - 1;
  330|  12.5k|      const size_t raw = scalar.get_window(bit_pos);
  331|  12.5k|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  332|       |
  333|  12.5k|      const auto tbl_i = table.subspan(WindowElements * i, WindowElements);
  334|       |
  335|  12.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|  12.5k|      if(i <= 3) {
  ------------------
  |  Branch (338:10): [True: 588, False: 11.9k]
  ------------------
  339|    588|         accum.randomize_rep(rng);
  340|    588|      }
  341|  12.5k|   }
  342|       |
  343|    196|   CT::unpoison(accum);
  344|    196|   return accum;
  345|    196|}
pcurves_secp384r1.cpp:_ZZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_19secp384r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorEENKUlvE_clEv:
  313|    196|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    196|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    196|      const size_t raw = w_bits << 1;
  317|    196|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    196|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    196|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    196|      pt.conditional_assign(tneg, pt.negate());
  322|    196|      CT::poison(pt);
  323|    196|      pt.randomize_rep(rng);
  324|    196|      return pt;
  325|    196|   }();
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|    204|                                               RandomNumberGenerator& rng) {
  309|    204|   static constexpr size_t WindowElements = 1 << (WindowBits - 1);
  310|       |
  311|    204|   const size_t windows = (scalar.bits() + WindowBits) / WindowBits;
  312|       |
  313|    204|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    204|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    204|      const size_t raw = w_bits << 1;
  317|    204|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    204|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    204|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    204|      pt.conditional_assign(tneg, pt.negate());
  322|    204|      CT::poison(pt);
  323|    204|      pt.randomize_rep(rng);
  324|    204|      return pt;
  325|    204|   }();
  326|       |
  327|  17.7k|   for(size_t i = 1; i != windows; ++i) {
  ------------------
  |  Branch (327:22): [True: 17.5k, False: 204]
  ------------------
  328|       |      // Extract W+1 bits overlapping by 1 with the previous window
  329|  17.5k|      const size_t bit_pos = WindowBits * i - 1;
  330|  17.5k|      const size_t raw = scalar.get_window(bit_pos);
  331|  17.5k|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  332|       |
  333|  17.5k|      const auto tbl_i = table.subspan(WindowElements * i, WindowElements);
  334|       |
  335|  17.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|  17.5k|      if(i <= 3) {
  ------------------
  |  Branch (338:10): [True: 612, False: 16.9k]
  ------------------
  339|    612|         accum.randomize_rep(rng);
  340|    612|      }
  341|  17.5k|   }
  342|       |
  343|    204|   CT::unpoison(accum);
  344|    204|   return accum;
  345|    204|}
pcurves_secp521r1.cpp:_ZZN5Botan18basemul_booth_execINS_6PCurve12_GLOBAL__N_19secp521r15CurveELm6ENS_17BlindedScalarBitsIS4_Lm7EEEEENT_15ProjectivePointENSt3__14spanIKNS7_11AffinePointELm18446744073709551615EEERKT1_RNS_21RandomNumberGeneratorEENKUlvE_clEv:
  313|    204|   auto accum = [&]() {
  314|       |      // First window: extract W bits, shift left 1 to insert implicit carry in of zero
  315|    204|      const size_t w_bits = scalar.get_window(0) & ((1 << WindowBits) - 1);
  316|    204|      const size_t raw = w_bits << 1;
  317|    204|      const auto [tidx, tneg] = booth_recode<WindowBits>(raw);
  318|    204|      const auto tbl_0 = table.first(WindowElements);
  319|       |
  320|    204|      auto pt = C::ProjectivePoint::from_affine(C::AffinePoint::ct_select(tbl_0, tidx));
  321|    204|      pt.conditional_assign(tneg, pt.negate());
  322|    204|      CT::poison(pt);
  323|    204|      pt.randomize_rep(rng);
  324|    204|      return pt;
  325|    204|   }();

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

_ZN5Botan10monty_redcITkNS_8WordTypeEmLm4EEENSt3__15arrayIT_XT0_EEERKNS2_IS3_XmlLi2ET0_EEERKS4_S3_:
  110|   115k|   -> std::array<W, N> {
  111|   115k|   static_assert(N >= 1);
  112|       |
  113|   115k|   std::array<W, N> ws;  // NOLINT(*-member-init)
  114|   115k|   std::array<W, N> r;   // NOLINT(*-member-init)
  115|       |
  116|       |   // Conditional ok: the parameter size is public
  117|   115k|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (117:7): [True: 115k, Folded]
  ------------------
  118|       |      // This range ensures we cover fields of 256, 384 and 512 bits for both 32 and 64 bit words
  119|   115k|      if constexpr(N == 4) {
  120|   115k|         bigint_monty_redc_4(r.data(), z.data(), p.data(), p_dash, ws.data());
  121|   115k|         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|   115k|   }
  136|       |
  137|      0|   word3<W> accum;
  138|       |
  139|   115k|   accum.add(z[0]);
  140|       |
  141|   115k|   ws[0] = accum.monty_step(p[0], p_dash);
  142|       |
  143|   115k|   for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (143:22): [True: 0, False: 115k]
  ------------------
  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|   115k|   for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (153:22): [True: 0, False: 115k]
  ------------------
  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|   115k|   accum.add(z[2 * N - 1]);
  164|       |
  165|   115k|   ws[N - 1] = accum.extract();
  166|       |   // w1 is the final part, which is not stored in the workspace
  167|   115k|   const W w1 = accum.extract();
  168|       |
  169|   115k|   bigint_monty_maybe_sub<N>(r.data(), w1, ws.data(), p.data());
  170|       |
  171|   115k|   return r;
  172|   115k|}
_ZN5Botan14bytes_to_wordsITkNS_8WordTypeEmLm4ELm32EEEDaNSt3__14spanIKhXT1_EEE:
  287|    427|inline constexpr auto bytes_to_words(std::span<const uint8_t, L> bytes) {
  288|    427|   static_assert(L <= WordInfo<W>::bytes * N);
  289|       |
  290|    427|   std::array<W, N> r = {};
  291|       |
  292|    427|   constexpr size_t full_words = L / WordInfo<W>::bytes;
  293|    427|   constexpr size_t extra_bytes = L % WordInfo<W>::bytes;
  294|       |
  295|    427|   static_assert(full_words + (extra_bytes ? 1 : 0) <= N);
  296|       |
  297|  2.13k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (297:22): [True: 1.70k, False: 427]
  ------------------
  298|  1.70k|      r[i] = load_be<W>(bytes.data(), full_words - 1 - i);
  299|  1.70k|   }
  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|    427|   return r;
  312|    427|}
_ZN5Botan14bytes_to_wordsITkNS_8WordTypeEmLm8ELm64EEEDaNSt3__14spanIKhXT1_EEE:
  287|    149|inline constexpr auto bytes_to_words(std::span<const uint8_t, L> bytes) {
  288|    149|   static_assert(L <= WordInfo<W>::bytes * N);
  289|       |
  290|    149|   std::array<W, N> r = {};
  291|       |
  292|    149|   constexpr size_t full_words = L / WordInfo<W>::bytes;
  293|    149|   constexpr size_t extra_bytes = L % WordInfo<W>::bytes;
  294|       |
  295|    149|   static_assert(full_words + (extra_bytes ? 1 : 0) <= N);
  296|       |
  297|  1.34k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (297:22): [True: 1.19k, False: 149]
  ------------------
  298|  1.19k|      r[i] = load_be<W>(bytes.data(), full_words - 1 - i);
  299|  1.19k|   }
  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|    149|   return r;
  312|    149|}
_ZN5Botan10monty_redcITkNS_8WordTypeEmLm6EEENSt3__15arrayIT_XT0_EEERKNS2_IS3_XmlLi2ET0_EEERKS4_S3_:
  110|   244k|   -> std::array<W, N> {
  111|   244k|   static_assert(N >= 1);
  112|       |
  113|   244k|   std::array<W, N> ws;  // NOLINT(*-member-init)
  114|   244k|   std::array<W, N> r;   // NOLINT(*-member-init)
  115|       |
  116|       |   // Conditional ok: the parameter size is public
  117|   244k|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (117:7): [True: 244k, 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|   244k|      } else if constexpr(N == 6) {
  123|   244k|         bigint_monty_redc_6(r.data(), z.data(), p.data(), p_dash, ws.data());
  124|   244k|         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|   244k|   }
  136|       |
  137|      0|   word3<W> accum;
  138|       |
  139|   244k|   accum.add(z[0]);
  140|       |
  141|   244k|   ws[0] = accum.monty_step(p[0], p_dash);
  142|       |
  143|   244k|   for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (143:22): [True: 0, False: 244k]
  ------------------
  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|   244k|   for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (153:22): [True: 0, False: 244k]
  ------------------
  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|   244k|   accum.add(z[2 * N - 1]);
  164|       |
  165|   244k|   ws[N - 1] = accum.extract();
  166|       |   // w1 is the final part, which is not stored in the workspace
  167|   244k|   const W w1 = accum.extract();
  168|       |
  169|   244k|   bigint_monty_maybe_sub<N>(r.data(), w1, ws.data(), p.data());
  170|       |
  171|   244k|   return r;
  172|   244k|}
_ZN5Botan14bytes_to_wordsITkNS_8WordTypeEmLm6ELm48EEEDaNSt3__14spanIKhXT1_EEE:
  287|    400|inline constexpr auto bytes_to_words(std::span<const uint8_t, L> bytes) {
  288|    400|   static_assert(L <= WordInfo<W>::bytes * N);
  289|       |
  290|    400|   std::array<W, N> r = {};
  291|       |
  292|    400|   constexpr size_t full_words = L / WordInfo<W>::bytes;
  293|    400|   constexpr size_t extra_bytes = L % WordInfo<W>::bytes;
  294|       |
  295|    400|   static_assert(full_words + (extra_bytes ? 1 : 0) <= N);
  296|       |
  297|  2.80k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (297:22): [True: 2.40k, False: 400]
  ------------------
  298|  2.40k|      r[i] = load_be<W>(bytes.data(), full_words - 1 - i);
  299|  2.40k|   }
  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|    400|   return r;
  312|    400|}
_ZN5Botan10monty_redcITkNS_8WordTypeEmLm8EEENSt3__15arrayIT_XT0_EEERKNS2_IS3_XmlLi2ET0_EEERKS4_S3_:
  110|   282k|   -> std::array<W, N> {
  111|   282k|   static_assert(N >= 1);
  112|       |
  113|   282k|   std::array<W, N> ws;  // NOLINT(*-member-init)
  114|   282k|   std::array<W, N> r;   // NOLINT(*-member-init)
  115|       |
  116|       |   // Conditional ok: the parameter size is public
  117|   282k|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (117:7): [True: 282k, 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|   282k|      } else if constexpr(N == 8) {
  126|   282k|         bigint_monty_redc_8(r.data(), z.data(), p.data(), p_dash, ws.data());
  127|   282k|         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|   282k|   }
  136|       |
  137|      0|   word3<W> accum;
  138|       |
  139|   282k|   accum.add(z[0]);
  140|       |
  141|   282k|   ws[0] = accum.monty_step(p[0], p_dash);
  142|       |
  143|   282k|   for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (143:22): [True: 0, False: 282k]
  ------------------
  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|   282k|   for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (153:22): [True: 0, False: 282k]
  ------------------
  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|   282k|   accum.add(z[2 * N - 1]);
  164|       |
  165|   282k|   ws[N - 1] = accum.extract();
  166|       |   // w1 is the final part, which is not stored in the workspace
  167|   282k|   const W w1 = accum.extract();
  168|       |
  169|   282k|   bigint_monty_maybe_sub<N>(r.data(), w1, ws.data(), p.data());
  170|       |
  171|   282k|   return r;
  172|   282k|}
_ZN5Botan14bytes_to_wordsITkNS_8WordTypeEmLm4ELm28EEEDaNSt3__14spanIKhXT1_EEE:
  287|    325|inline constexpr auto bytes_to_words(std::span<const uint8_t, L> bytes) {
  288|    325|   static_assert(L <= WordInfo<W>::bytes * N);
  289|       |
  290|    325|   std::array<W, N> r = {};
  291|       |
  292|    325|   constexpr size_t full_words = L / WordInfo<W>::bytes;
  293|    325|   constexpr size_t extra_bytes = L % WordInfo<W>::bytes;
  294|       |
  295|    325|   static_assert(full_words + (extra_bytes ? 1 : 0) <= N);
  296|       |
  297|  1.30k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (297:22): [True: 975, False: 325]
  ------------------
  298|    975|      r[i] = load_be<W>(bytes.data(), full_words - 1 - i);
  299|    975|   }
  300|       |
  301|    325|   if constexpr(extra_bytes > 0) {
  302|    325|      constexpr size_t shift = extra_bytes * 8;
  303|    325|      shift_left<shift>(r);
  304|       |
  305|  1.62k|      for(size_t i = 0; i != extra_bytes; ++i) {
  ------------------
  |  Branch (305:25): [True: 1.30k, False: 325]
  ------------------
  306|  1.30k|         const W b0 = bytes[WordInfo<W>::bytes * full_words + i];
  307|  1.30k|         r[0] |= (b0 << (8 * (extra_bytes - 1 - i)));
  308|  1.30k|      }
  309|    325|   }
  310|       |
  311|    325|   return r;
  312|    325|}
_ZN5Botan10monty_redcITkNS_8WordTypeEmLm9EEENSt3__15arrayIT_XT0_EEERKNS2_IS3_XmlLi2ET0_EEERKS4_S3_:
  110|    807|   -> std::array<W, N> {
  111|    807|   static_assert(N >= 1);
  112|       |
  113|    807|   std::array<W, N> ws;  // NOLINT(*-member-init)
  114|    807|   std::array<W, N> r;   // NOLINT(*-member-init)
  115|       |
  116|       |   // Conditional ok: the parameter size is public
  117|    807|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (117:7): [True: 807, 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|    807|      } else if constexpr(N == 16) {
  132|    807|         bigint_monty_redc_16(r.data(), z.data(), p.data(), p_dash, ws.data());
  133|    807|         return r;
  134|    807|      }
  135|    807|   }
  136|       |
  137|    807|   word3<W> accum;
  138|       |
  139|    807|   accum.add(z[0]);
  140|       |
  141|    807|   ws[0] = accum.monty_step(p[0], p_dash);
  142|       |
  143|  7.26k|   for(size_t i = 1; i != N; ++i) {
  ------------------
  |  Branch (143:22): [True: 6.45k, False: 807]
  ------------------
  144|  35.5k|      for(size_t j = 0; j < i; ++j) {
  ------------------
  |  Branch (144:25): [True: 29.0k, False: 6.45k]
  ------------------
  145|  29.0k|         accum.mul(ws[j], p[i - j]);
  146|  29.0k|      }
  147|       |
  148|  6.45k|      accum.add(z[i]);
  149|       |
  150|  6.45k|      ws[i] = accum.monty_step(p[0], p_dash);
  151|  6.45k|   }
  152|       |
  153|  7.26k|   for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (153:22): [True: 6.45k, False: 807]
  ------------------
  154|  35.5k|      for(size_t j = i + 1; j != N; ++j) {
  ------------------
  |  Branch (154:29): [True: 29.0k, False: 6.45k]
  ------------------
  155|  29.0k|         accum.mul(ws[j], p[N + i - j]);
  156|  29.0k|      }
  157|       |
  158|  6.45k|      accum.add(z[N + i]);
  159|       |
  160|  6.45k|      ws[i] = accum.extract();
  161|  6.45k|   }
  162|       |
  163|    807|   accum.add(z[2 * N - 1]);
  164|       |
  165|    807|   ws[N - 1] = accum.extract();
  166|       |   // w1 is the final part, which is not stored in the workspace
  167|    807|   const W w1 = accum.extract();
  168|       |
  169|    807|   bigint_monty_maybe_sub<N>(r.data(), w1, ws.data(), p.data());
  170|       |
  171|    807|   return r;
  172|    807|}
_ZN5Botan14bytes_to_wordsITkNS_8WordTypeEmLm9ELm66EEEDaNSt3__14spanIKhXT1_EEE:
  287|    488|inline constexpr auto bytes_to_words(std::span<const uint8_t, L> bytes) {
  288|    488|   static_assert(L <= WordInfo<W>::bytes * N);
  289|       |
  290|    488|   std::array<W, N> r = {};
  291|       |
  292|    488|   constexpr size_t full_words = L / WordInfo<W>::bytes;
  293|    488|   constexpr size_t extra_bytes = L % WordInfo<W>::bytes;
  294|       |
  295|    488|   static_assert(full_words + (extra_bytes ? 1 : 0) <= N);
  296|       |
  297|  4.39k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (297:22): [True: 3.90k, False: 488]
  ------------------
  298|  3.90k|      r[i] = load_be<W>(bytes.data(), full_words - 1 - i);
  299|  3.90k|   }
  300|       |
  301|    488|   if constexpr(extra_bytes > 0) {
  302|    488|      constexpr size_t shift = extra_bytes * 8;
  303|    488|      shift_left<shift>(r);
  304|       |
  305|  1.46k|      for(size_t i = 0; i != extra_bytes; ++i) {
  ------------------
  |  Branch (305:25): [True: 976, False: 488]
  ------------------
  306|    976|         const W b0 = bytes[WordInfo<W>::bytes * full_words + i];
  307|    976|         r[0] |= (b0 << (8 * (extra_bytes - 1 - i)));
  308|    976|      }
  309|    488|   }
  310|       |
  311|    488|   return r;
  312|    488|}

pcurves_brainpool256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE8instanceEv:
  342|  1.14k|      static std::shared_ptr<const PrimeOrderCurve> instance() {
  343|  1.14k|         static auto g_curve = std::make_shared<const PrimeOrderCurveImpl<C>>();
  344|  1.14k|         return g_curve;
  345|  1.14k|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEEC2Ev:
  340|      1|      PrimeOrderCurveImpl() : m_mul_by_g(C::G) {}
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE19field_element_bytesEv:
   36|    208|      size_t field_element_bytes() const override { return C::FieldElement::BYTES; }
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE8mul_by_gERKNS0_15PrimeOrderCurve6ScalarERNS_21RandomNumberGeneratorE:
   38|    104|      ProjectivePoint mul_by_g(const Scalar& scalar, RandomNumberGenerator& rng) const override {
   39|    104|         return stash(m_mul_by_g.mul(from_stash(scalar), rng));
   40|    104|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE5stashERKNS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEESA_EE:
  374|    104|      static ProjectivePoint stash(const typename C::ProjectivePoint& pt) {
  375|    104|         auto x_w = pt.x().template stash_value<StorageWords>();
  376|    104|         auto y_w = pt.y().template stash_value<StorageWords>();
  377|    104|         auto z_w = pt.z().template stash_value<StorageWords>();
  378|    104|         return ProjectivePoint::_create(instance(), x_w, y_w, z_w);
  379|    104|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE10from_stashERKNS0_15PrimeOrderCurve6ScalarE:
  352|    362|      static typename C::Scalar from_stash(const Scalar& s) {
  353|    362|         if(s._curve() != instance()) {
  ------------------
  |  Branch (353:13): [True: 0, False: 362]
  ------------------
  354|      0|            throw Invalid_Argument("Curve mismatch");
  355|      0|         }
  356|    362|         return C::Scalar::from_stash(s._value());
  357|    362|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE5stashERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEE:
  348|    129|      static Scalar stash(const typename C::Scalar& s) {
  349|    129|         return Scalar::_create(instance(), s.template stash_value<StorageWords>());
  350|    129|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE10from_stashERKNS0_15PrimeOrderCurve11AffinePointE:
  365|    208|      static typename C::AffinePoint from_stash(const AffinePoint& pt) {
  366|    208|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (366:13): [True: 0, False: 208]
  ------------------
  367|      0|            throw Invalid_Argument("Curve mismatch");
  368|      0|         }
  369|    208|         auto x = C::FieldElement::from_stash(pt._x());
  370|    208|         auto y = C::FieldElement::from_stash(pt._y());
  371|    208|         return typename C::AffinePoint(x, y);
  372|    208|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE5stashERKNS_16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
  359|    104|      static AffinePoint stash(const typename C::AffinePoint& pt) {
  360|    104|         auto x_w = pt.x().template stash_value<StorageWords>();
  361|    104|         auto y_w = pt.y().template stash_value<StorageWords>();
  362|    104|         return AffinePoint::_create(instance(), x_w, y_w);
  363|    104|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE18deserialize_scalarENSt3__14spanIKhLm18446744073709551615EEE:
  224|    130|      std::optional<Scalar> deserialize_scalar(std::span<const uint8_t> bytes) const override {
  225|    130|         if(auto scalar = C::Scalar::deserialize(bytes)) {
  ------------------
  |  Branch (225:18): [True: 130, False: 0]
  ------------------
  226|    130|            if(!scalar->is_zero().as_bool()) {
  ------------------
  |  Branch (226:16): [True: 129, False: 1]
  ------------------
  227|    129|               return stash(*scalar);
  228|    129|            }
  229|    130|         }
  230|       |
  231|      1|         return {};
  232|    130|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE15point_to_affineERKNS0_15PrimeOrderCurve15ProjectivePointE:
  192|    104|      AffinePoint point_to_affine(const ProjectivePoint& pt) const override {
  193|    104|         auto affine = to_affine<C>(from_stash(pt));
  194|       |
  195|    104|         const auto y2 = affine.y().square();
  196|    104|         const auto x3_ax_b = C::x3_ax_b(affine.x());
  197|    104|         const auto valid_point = affine.is_identity() || (y2 == x3_ax_b);
  198|       |
  199|    104|         BOTAN_ASSERT(valid_point.as_bool(), "Computed point is on the curve");
  ------------------
  |  |   64|    104|   do {                                                                                 \
  |  |   65|    104|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|    104|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 104]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|    104|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 104]
  |  |  ------------------
  ------------------
  200|       |
  201|    104|         return stash(affine);
  202|    104|      }
pcurves_brainpool256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE10from_stashERKNS0_15PrimeOrderCurve15ProjectivePointE:
  381|    104|      static typename C::ProjectivePoint from_stash(const ProjectivePoint& pt) {
  382|    104|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (382:13): [True: 0, False: 104]
  ------------------
  383|      0|            throw Invalid_Argument("Curve mismatch");
  384|      0|         }
  385|    104|         auto x = C::FieldElement::from_stash(pt._x());
  386|    104|         auto y = C::FieldElement::from_stash(pt._y());
  387|    104|         auto z = C::FieldElement::from_stash(pt._z());
  388|    104|         return typename C::ProjectivePoint(x, y, z);
  389|    104|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE24affine_point_is_identityERKNS0_15PrimeOrderCurve11AffinePointE:
  210|    104|      bool affine_point_is_identity(const AffinePoint& pt) const override {
  211|    104|         return from_stash(pt).is_identity().as_bool();
  212|    104|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE15serialize_pointENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve11AffinePointE:
  214|    104|      void serialize_point(std::span<uint8_t> bytes, const AffinePoint& pt) const override {
  215|    104|         BOTAN_ARG_CHECK(bytes.size() == C::AffinePoint::BYTES, "Invalid length for serialize_point");
  ------------------
  |  |   35|    104|   do {                                                          \
  |  |   36|    104|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    104|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 104]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    104|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 104]
  |  |  ------------------
  ------------------
  216|    104|         from_stash(pt).serialize_to(bytes.subspan<0, C::AffinePoint::BYTES>());
  217|    104|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE16serialize_scalarENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve6ScalarE:
  219|    129|      void serialize_scalar(std::span<uint8_t> bytes, const Scalar& scalar) const override {
  220|    129|         BOTAN_ARG_CHECK(bytes.size() == C::Scalar::BYTES, "Invalid length to serialize_scalar");
  ------------------
  |  |   35|    129|   do {                                                          \
  |  |   36|    129|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    129|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 129]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    129|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 129]
  |  |  ------------------
  ------------------
  221|    129|         return from_stash(scalar).serialize_to(bytes.subspan<0, C::Scalar::BYTES>());
  222|    129|      }
pcurves_brainpool256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool256r15CurveEE14scalar_is_zeroERKNS0_15PrimeOrderCurve6ScalarE:
  330|    129|      bool scalar_is_zero(const Scalar& s) const override { return from_stash(s).is_zero().as_bool(); }
pcurves_brainpool384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE8instanceEv:
  342|  1.73k|      static std::shared_ptr<const PrimeOrderCurve> instance() {
  343|  1.73k|         static auto g_curve = std::make_shared<const PrimeOrderCurveImpl<C>>();
  344|  1.73k|         return g_curve;
  345|  1.73k|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEEC2Ev:
  340|      1|      PrimeOrderCurveImpl() : m_mul_by_g(C::G) {}
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE19field_element_bytesEv:
   36|    330|      size_t field_element_bytes() const override { return C::FieldElement::BYTES; }
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE8mul_by_gERKNS0_15PrimeOrderCurve6ScalarERNS_21RandomNumberGeneratorE:
   38|    165|      ProjectivePoint mul_by_g(const Scalar& scalar, RandomNumberGenerator& rng) const override {
   39|    165|         return stash(m_mul_by_g.mul(from_stash(scalar), rng));
   40|    165|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE5stashERKNS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEESA_EE:
  374|    165|      static ProjectivePoint stash(const typename C::ProjectivePoint& pt) {
  375|    165|         auto x_w = pt.x().template stash_value<StorageWords>();
  376|    165|         auto y_w = pt.y().template stash_value<StorageWords>();
  377|    165|         auto z_w = pt.z().template stash_value<StorageWords>();
  378|    165|         return ProjectivePoint::_create(instance(), x_w, y_w, z_w);
  379|    165|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE10from_stashERKNS0_15PrimeOrderCurve6ScalarE:
  352|    535|      static typename C::Scalar from_stash(const Scalar& s) {
  353|    535|         if(s._curve() != instance()) {
  ------------------
  |  Branch (353:13): [True: 0, False: 535]
  ------------------
  354|      0|            throw Invalid_Argument("Curve mismatch");
  355|      0|         }
  356|    535|         return C::Scalar::from_stash(s._value());
  357|    535|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE5stashERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEE:
  348|    185|      static Scalar stash(const typename C::Scalar& s) {
  349|    185|         return Scalar::_create(instance(), s.template stash_value<StorageWords>());
  350|    185|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE10from_stashERKNS0_15PrimeOrderCurve11AffinePointE:
  365|    330|      static typename C::AffinePoint from_stash(const AffinePoint& pt) {
  366|    330|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (366:13): [True: 0, False: 330]
  ------------------
  367|      0|            throw Invalid_Argument("Curve mismatch");
  368|      0|         }
  369|    330|         auto x = C::FieldElement::from_stash(pt._x());
  370|    330|         auto y = C::FieldElement::from_stash(pt._y());
  371|    330|         return typename C::AffinePoint(x, y);
  372|    330|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE5stashERKNS_16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
  359|    165|      static AffinePoint stash(const typename C::AffinePoint& pt) {
  360|    165|         auto x_w = pt.x().template stash_value<StorageWords>();
  361|    165|         auto y_w = pt.y().template stash_value<StorageWords>();
  362|    165|         return AffinePoint::_create(instance(), x_w, y_w);
  363|    165|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE18deserialize_scalarENSt3__14spanIKhLm18446744073709551615EEE:
  224|    186|      std::optional<Scalar> deserialize_scalar(std::span<const uint8_t> bytes) const override {
  225|    186|         if(auto scalar = C::Scalar::deserialize(bytes)) {
  ------------------
  |  Branch (225:18): [True: 186, False: 0]
  ------------------
  226|    186|            if(!scalar->is_zero().as_bool()) {
  ------------------
  |  Branch (226:16): [True: 185, False: 1]
  ------------------
  227|    185|               return stash(*scalar);
  228|    185|            }
  229|    186|         }
  230|       |
  231|      1|         return {};
  232|    186|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE15point_to_affineERKNS0_15PrimeOrderCurve15ProjectivePointE:
  192|    165|      AffinePoint point_to_affine(const ProjectivePoint& pt) const override {
  193|    165|         auto affine = to_affine<C>(from_stash(pt));
  194|       |
  195|    165|         const auto y2 = affine.y().square();
  196|    165|         const auto x3_ax_b = C::x3_ax_b(affine.x());
  197|    165|         const auto valid_point = affine.is_identity() || (y2 == x3_ax_b);
  198|       |
  199|    165|         BOTAN_ASSERT(valid_point.as_bool(), "Computed point is on the curve");
  ------------------
  |  |   64|    165|   do {                                                                                 \
  |  |   65|    165|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|    165|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 165]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|    165|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 165]
  |  |  ------------------
  ------------------
  200|       |
  201|    165|         return stash(affine);
  202|    165|      }
pcurves_brainpool384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE10from_stashERKNS0_15PrimeOrderCurve15ProjectivePointE:
  381|    165|      static typename C::ProjectivePoint from_stash(const ProjectivePoint& pt) {
  382|    165|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (382:13): [True: 0, False: 165]
  ------------------
  383|      0|            throw Invalid_Argument("Curve mismatch");
  384|      0|         }
  385|    165|         auto x = C::FieldElement::from_stash(pt._x());
  386|    165|         auto y = C::FieldElement::from_stash(pt._y());
  387|    165|         auto z = C::FieldElement::from_stash(pt._z());
  388|    165|         return typename C::ProjectivePoint(x, y, z);
  389|    165|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE24affine_point_is_identityERKNS0_15PrimeOrderCurve11AffinePointE:
  210|    165|      bool affine_point_is_identity(const AffinePoint& pt) const override {
  211|    165|         return from_stash(pt).is_identity().as_bool();
  212|    165|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE15serialize_pointENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve11AffinePointE:
  214|    165|      void serialize_point(std::span<uint8_t> bytes, const AffinePoint& pt) const override {
  215|    165|         BOTAN_ARG_CHECK(bytes.size() == C::AffinePoint::BYTES, "Invalid length for serialize_point");
  ------------------
  |  |   35|    165|   do {                                                          \
  |  |   36|    165|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    165|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 165]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    165|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 165]
  |  |  ------------------
  ------------------
  216|    165|         from_stash(pt).serialize_to(bytes.subspan<0, C::AffinePoint::BYTES>());
  217|    165|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE16serialize_scalarENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve6ScalarE:
  219|    185|      void serialize_scalar(std::span<uint8_t> bytes, const Scalar& scalar) const override {
  220|    185|         BOTAN_ARG_CHECK(bytes.size() == C::Scalar::BYTES, "Invalid length to serialize_scalar");
  ------------------
  |  |   35|    185|   do {                                                          \
  |  |   36|    185|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    185|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 185]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    185|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 185]
  |  |  ------------------
  ------------------
  221|    185|         return from_stash(scalar).serialize_to(bytes.subspan<0, C::Scalar::BYTES>());
  222|    185|      }
pcurves_brainpool384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool384r15CurveEE14scalar_is_zeroERKNS0_15PrimeOrderCurve6ScalarE:
  330|    185|      bool scalar_is_zero(const Scalar& s) const override { return from_stash(s).is_zero().as_bool(); }
pcurves_brainpool512r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE8instanceEv:
  342|  1.42k|      static std::shared_ptr<const PrimeOrderCurve> instance() {
  343|  1.42k|         static auto g_curve = std::make_shared<const PrimeOrderCurveImpl<C>>();
  344|  1.42k|         return g_curve;
  345|  1.42k|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEEC2Ev:
  340|      1|      PrimeOrderCurveImpl() : m_mul_by_g(C::G) {}
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE19field_element_bytesEv:
   36|    278|      size_t field_element_bytes() const override { return C::FieldElement::BYTES; }
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE8mul_by_gERKNS0_15PrimeOrderCurve6ScalarERNS_21RandomNumberGeneratorE:
   38|    139|      ProjectivePoint mul_by_g(const Scalar& scalar, RandomNumberGenerator& rng) const override {
   39|    139|         return stash(m_mul_by_g.mul(from_stash(scalar), rng));
   40|    139|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE5stashERKNS_20ProjectiveCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEESA_EE:
  374|    139|      static ProjectivePoint stash(const typename C::ProjectivePoint& pt) {
  375|    139|         auto x_w = pt.x().template stash_value<StorageWords>();
  376|    139|         auto y_w = pt.y().template stash_value<StorageWords>();
  377|    139|         auto z_w = pt.z().template stash_value<StorageWords>();
  378|    139|         return ProjectivePoint::_create(instance(), x_w, y_w, z_w);
  379|    139|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE10from_stashERKNS0_15PrimeOrderCurve6ScalarE:
  352|    435|      static typename C::Scalar from_stash(const Scalar& s) {
  353|    435|         if(s._curve() != instance()) {
  ------------------
  |  Branch (353:13): [True: 0, False: 435]
  ------------------
  354|      0|            throw Invalid_Argument("Curve mismatch");
  355|      0|         }
  356|    435|         return C::Scalar::from_stash(s._value());
  357|    435|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE5stashERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES7_E12ScalarParamsEEEEE:
  348|    148|      static Scalar stash(const typename C::Scalar& s) {
  349|    148|         return Scalar::_create(instance(), s.template stash_value<StorageWords>());
  350|    148|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE10from_stashERKNS0_15PrimeOrderCurve11AffinePointE:
  365|    278|      static typename C::AffinePoint from_stash(const AffinePoint& pt) {
  366|    278|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (366:13): [True: 0, False: 278]
  ------------------
  367|      0|            throw Invalid_Argument("Curve mismatch");
  368|      0|         }
  369|    278|         auto x = C::FieldElement::from_stash(pt._x());
  370|    278|         auto y = C::FieldElement::from_stash(pt._y());
  371|    278|         return typename C::AffinePoint(x, y);
  372|    278|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE5stashERKNS_16AffineCurvePointINS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
  359|    139|      static AffinePoint stash(const typename C::AffinePoint& pt) {
  360|    139|         auto x_w = pt.x().template stash_value<StorageWords>();
  361|    139|         auto y_w = pt.y().template stash_value<StorageWords>();
  362|    139|         return AffinePoint::_create(instance(), x_w, y_w);
  363|    139|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE18deserialize_scalarENSt3__14spanIKhLm18446744073709551615EEE:
  224|    149|      std::optional<Scalar> deserialize_scalar(std::span<const uint8_t> bytes) const override {
  225|    149|         if(auto scalar = C::Scalar::deserialize(bytes)) {
  ------------------
  |  Branch (225:18): [True: 149, False: 0]
  ------------------
  226|    149|            if(!scalar->is_zero().as_bool()) {
  ------------------
  |  Branch (226:16): [True: 148, False: 1]
  ------------------
  227|    148|               return stash(*scalar);
  228|    148|            }
  229|    149|         }
  230|       |
  231|      1|         return {};
  232|    149|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE15point_to_affineERKNS0_15PrimeOrderCurve15ProjectivePointE:
  192|    139|      AffinePoint point_to_affine(const ProjectivePoint& pt) const override {
  193|    139|         auto affine = to_affine<C>(from_stash(pt));
  194|       |
  195|    139|         const auto y2 = affine.y().square();
  196|    139|         const auto x3_ax_b = C::x3_ax_b(affine.x());
  197|    139|         const auto valid_point = affine.is_identity() || (y2 == x3_ax_b);
  198|       |
  199|    139|         BOTAN_ASSERT(valid_point.as_bool(), "Computed point is on the curve");
  ------------------
  |  |   64|    139|   do {                                                                                 \
  |  |   65|    139|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|    139|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 139]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|    139|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 139]
  |  |  ------------------
  ------------------
  200|       |
  201|    139|         return stash(affine);
  202|    139|      }
pcurves_brainpool512r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE10from_stashERKNS0_15PrimeOrderCurve15ProjectivePointE:
  381|    139|      static typename C::ProjectivePoint from_stash(const ProjectivePoint& pt) {
  382|    139|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (382:13): [True: 0, False: 139]
  ------------------
  383|      0|            throw Invalid_Argument("Curve mismatch");
  384|      0|         }
  385|    139|         auto x = C::FieldElement::from_stash(pt._x());
  386|    139|         auto y = C::FieldElement::from_stash(pt._y());
  387|    139|         auto z = C::FieldElement::from_stash(pt._z());
  388|    139|         return typename C::ProjectivePoint(x, y, z);
  389|    139|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE24affine_point_is_identityERKNS0_15PrimeOrderCurve11AffinePointE:
  210|    139|      bool affine_point_is_identity(const AffinePoint& pt) const override {
  211|    139|         return from_stash(pt).is_identity().as_bool();
  212|    139|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE15serialize_pointENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve11AffinePointE:
  214|    139|      void serialize_point(std::span<uint8_t> bytes, const AffinePoint& pt) const override {
  215|    139|         BOTAN_ARG_CHECK(bytes.size() == C::AffinePoint::BYTES, "Invalid length for serialize_point");
  ------------------
  |  |   35|    139|   do {                                                          \
  |  |   36|    139|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    139|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 139]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    139|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 139]
  |  |  ------------------
  ------------------
  216|    139|         from_stash(pt).serialize_to(bytes.subspan<0, C::AffinePoint::BYTES>());
  217|    139|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE16serialize_scalarENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve6ScalarE:
  219|    148|      void serialize_scalar(std::span<uint8_t> bytes, const Scalar& scalar) const override {
  220|    148|         BOTAN_ARG_CHECK(bytes.size() == C::Scalar::BYTES, "Invalid length to serialize_scalar");
  ------------------
  |  |   35|    148|   do {                                                          \
  |  |   36|    148|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    148|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 148]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    148|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 148]
  |  |  ------------------
  ------------------
  221|    148|         return from_stash(scalar).serialize_to(bytes.subspan<0, C::Scalar::BYTES>());
  222|    148|      }
pcurves_brainpool512r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_114brainpool512r15CurveEE14scalar_is_zeroERKNS0_15PrimeOrderCurve6ScalarE:
  330|    148|      bool scalar_is_zero(const Scalar& s) const override { return from_stash(s).is_zero().as_bool(); }
pcurves_secp224r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp224r15CurveEE8instanceEv:
  342|  2.58k|      static std::shared_ptr<const PrimeOrderCurve> instance() {
  343|  2.58k|         static auto g_curve = std::make_shared<const PrimeOrderCurveImpl<C>>();
  344|  2.58k|         return g_curve;
  345|  2.58k|      }
pcurves_secp224r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp224r15CurveEEC2Ev:
  340|      1|      PrimeOrderCurveImpl() : m_mul_by_g(C::G) {}
pcurves_secp224r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp224r15CurveEE19field_element_bytesEv:
   36|    434|      size_t field_element_bytes() const override { return C::FieldElement::BYTES; }
pcurves_secp224r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp224r15CurveEE8mul_by_gERKNS0_15PrimeOrderCurve6ScalarERNS_21RandomNumberGeneratorE:
   38|    217|      ProjectivePoint mul_by_g(const Scalar& scalar, RandomNumberGenerator& rng) const override {
   39|    217|         return stash(m_mul_by_g.mul(from_stash(scalar), rng));
   40|    217|      }
pcurves_secp224r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp224r15CurveEE5stashERKNS_20ProjectiveCurvePointINS_6IntModINS3_12Secp224r1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEESA_EE:
  374|    217|      static ProjectivePoint stash(const typename C::ProjectivePoint& pt) {
  375|    217|         auto x_w = pt.x().template stash_value<StorageWords>();
  376|    217|         auto y_w = pt.y().template stash_value<StorageWords>();
  377|    217|         auto z_w = pt.z().template stash_value<StorageWords>();
  378|    217|         return ProjectivePoint::_create(instance(), x_w, y_w, z_w);
  379|    217|      }
pcurves_secp224r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp224r15CurveEE10from_stashERKNS0_15PrimeOrderCurve6ScalarE:
  352|    851|      static typename C::Scalar from_stash(const Scalar& s) {
  353|    851|         if(s._curve() != instance()) {
  ------------------
  |  Branch (353:13): [True: 0, False: 851]
  ------------------
  354|      0|            throw Invalid_Argument("Curve mismatch");
  355|      0|         }
  356|    851|         return C::Scalar::from_stash(s._value());
  357|    851|      }
pcurves_secp224r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp224r15CurveEE5stashERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS3_12Secp224r1RepEE12ScalarParamsEEEEE:
  348|    317|      static Scalar stash(const typename C::Scalar& s) {
  349|    317|         return Scalar::_create(instance(), s.template stash_value<StorageWords>());
  350|    317|      }
pcurves_secp224r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp224r15CurveEE10from_stashERKNS0_15PrimeOrderCurve11AffinePointE:
  365|    434|      static typename C::AffinePoint from_stash(const AffinePoint& pt) {
  366|    434|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (366:13): [True: 0, False: 434]
  ------------------
  367|      0|            throw Invalid_Argument("Curve mismatch");
  368|      0|         }
  369|    434|         auto x = C::FieldElement::from_stash(pt._x());
  370|    434|         auto y = C::FieldElement::from_stash(pt._y());
  371|    434|         return typename C::AffinePoint(x, y);
  372|    434|      }
pcurves_secp224r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp224r15CurveEE5stashERKNS_16AffineCurvePointINS_6IntModINS3_12Secp224r1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
  359|    217|      static AffinePoint stash(const typename C::AffinePoint& pt) {
  360|    217|         auto x_w = pt.x().template stash_value<StorageWords>();
  361|    217|         auto y_w = pt.y().template stash_value<StorageWords>();
  362|    217|         return AffinePoint::_create(instance(), x_w, y_w);
  363|    217|      }
pcurves_secp224r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp224r15CurveEE30deserialize_point_uncompressedENSt3__14spanIKhLm18446744073709551615EEE:
  244|      3|      std::optional<AffinePoint> deserialize_point_uncompressed(std::span<const uint8_t> bytes) const override {
  245|      3|         constexpr size_t FieldElementBytes = C::FieldElement::BYTES;
  246|      3|         constexpr size_t UncompressedBytes = 2 * C::FieldElement::BYTES + 1;
  247|       |
  248|      3|         if(bytes.size() == UncompressedBytes && bytes[0] == 0x04) {
  ------------------
  |  Branch (248:13): [True: 3, False: 0]
  |  Branch (248:50): [True: 3, False: 0]
  ------------------
  249|      3|            const auto encoded_point = bytes.subspan(1);
  250|      3|            auto x = C::FieldElement::deserialize(encoded_point.first(FieldElementBytes));
  251|      3|            auto y = C::FieldElement::deserialize(encoded_point.last(FieldElementBytes));
  252|       |
  253|      3|            if(x && y) {
  ------------------
  |  Branch (253:16): [True: 3, False: 0]
  |  Branch (253:21): [True: 3, False: 0]
  ------------------
  254|       |               // Check that y^2 = x^3 + ax + b
  255|      3|               const auto lhs = (*y).square();
  256|      3|               const auto rhs = C::x3_ax_b(*x);
  257|      3|               const auto valid = (lhs == rhs);
  258|      3|               if(valid.as_bool()) {
  ------------------
  |  Branch (258:19): [True: 0, False: 3]
  ------------------
  259|      0|                  return stash(typename C::AffinePoint(*x, *y));
  260|      0|               }
  261|      3|            }
  262|      3|         }
  263|       |
  264|      3|         return {};
  265|      3|      }
pcurves_secp224r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp224r15CurveEE18deserialize_scalarENSt3__14spanIKhLm18446744073709551615EEE:
  224|    319|      std::optional<Scalar> deserialize_scalar(std::span<const uint8_t> bytes) const override {
  225|    319|         if(auto scalar = C::Scalar::deserialize(bytes)) {
  ------------------
  |  Branch (225:18): [True: 318, False: 1]
  ------------------
  226|    318|            if(!scalar->is_zero().as_bool()) {
  ------------------
  |  Branch (226:16): [True: 317, False: 1]
  ------------------
  227|    317|               return stash(*scalar);
  228|    317|            }
  229|    318|         }
  230|       |
  231|      2|         return {};
  232|    319|      }
pcurves_secp224r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp224r15CurveEE15point_to_affineERKNS0_15PrimeOrderCurve15ProjectivePointE:
  192|    217|      AffinePoint point_to_affine(const ProjectivePoint& pt) const override {
  193|    217|         auto affine = to_affine<C>(from_stash(pt));
  194|       |
  195|    217|         const auto y2 = affine.y().square();
  196|    217|         const auto x3_ax_b = C::x3_ax_b(affine.x());
  197|    217|         const auto valid_point = affine.is_identity() || (y2 == x3_ax_b);
  198|       |
  199|    217|         BOTAN_ASSERT(valid_point.as_bool(), "Computed point is on the curve");
  ------------------
  |  |   64|    217|   do {                                                                                 \
  |  |   65|    217|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|    217|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 217]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|    217|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 217]
  |  |  ------------------
  ------------------
  200|       |
  201|    217|         return stash(affine);
  202|    217|      }
pcurves_secp224r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp224r15CurveEE10from_stashERKNS0_15PrimeOrderCurve15ProjectivePointE:
  381|    217|      static typename C::ProjectivePoint from_stash(const ProjectivePoint& pt) {
  382|    217|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (382:13): [True: 0, False: 217]
  ------------------
  383|      0|            throw Invalid_Argument("Curve mismatch");
  384|      0|         }
  385|    217|         auto x = C::FieldElement::from_stash(pt._x());
  386|    217|         auto y = C::FieldElement::from_stash(pt._y());
  387|    217|         auto z = C::FieldElement::from_stash(pt._z());
  388|    217|         return typename C::ProjectivePoint(x, y, z);
  389|    217|      }
pcurves_secp224r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp224r15CurveEE24affine_point_is_identityERKNS0_15PrimeOrderCurve11AffinePointE:
  210|    217|      bool affine_point_is_identity(const AffinePoint& pt) const override {
  211|    217|         return from_stash(pt).is_identity().as_bool();
  212|    217|      }
pcurves_secp224r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp224r15CurveEE15serialize_pointENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve11AffinePointE:
  214|    217|      void serialize_point(std::span<uint8_t> bytes, const AffinePoint& pt) const override {
  215|    217|         BOTAN_ARG_CHECK(bytes.size() == C::AffinePoint::BYTES, "Invalid length for serialize_point");
  ------------------
  |  |   35|    217|   do {                                                          \
  |  |   36|    217|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    217|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 217]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    217|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 217]
  |  |  ------------------
  ------------------
  216|    217|         from_stash(pt).serialize_to(bytes.subspan<0, C::AffinePoint::BYTES>());
  217|    217|      }
pcurves_secp224r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp224r15CurveEE16serialize_scalarENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve6ScalarE:
  219|    317|      void serialize_scalar(std::span<uint8_t> bytes, const Scalar& scalar) const override {
  220|    317|         BOTAN_ARG_CHECK(bytes.size() == C::Scalar::BYTES, "Invalid length to serialize_scalar");
  ------------------
  |  |   35|    317|   do {                                                          \
  |  |   36|    317|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    317|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 317]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    317|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 317]
  |  |  ------------------
  ------------------
  221|    317|         return from_stash(scalar).serialize_to(bytes.subspan<0, C::Scalar::BYTES>());
  222|    317|      }
pcurves_secp224r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp224r15CurveEE14scalar_is_zeroERKNS0_15PrimeOrderCurve6ScalarE:
  330|    317|      bool scalar_is_zero(const Scalar& s) const override { return from_stash(s).is_zero().as_bool(); }
pcurves_secp256k1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256k15CurveEE8instanceEv:
  342|  2.21k|      static std::shared_ptr<const PrimeOrderCurve> instance() {
  343|  2.21k|         static auto g_curve = std::make_shared<const PrimeOrderCurveImpl<C>>();
  344|  2.21k|         return g_curve;
  345|  2.21k|      }
pcurves_secp256k1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256k15CurveEEC2Ev:
  340|      1|      PrimeOrderCurveImpl() : m_mul_by_g(C::G) {}
pcurves_secp256k1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256k15CurveEE19field_element_bytesEv:
   36|    438|      size_t field_element_bytes() const override { return C::FieldElement::BYTES; }
pcurves_secp256k1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256k15CurveEE8mul_by_gERKNS0_15PrimeOrderCurve6ScalarERNS_21RandomNumberGeneratorE:
   38|    219|      ProjectivePoint mul_by_g(const Scalar& scalar, RandomNumberGenerator& rng) const override {
   39|    219|         return stash(m_mul_by_g.mul(from_stash(scalar), rng));
   40|    219|      }
pcurves_secp256k1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256k15CurveEE5stashERKNS_20ProjectiveCurvePointINS_6IntModINS3_12Secp256k1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEESA_EE:
  374|    219|      static ProjectivePoint stash(const typename C::ProjectivePoint& pt) {
  375|    219|         auto x_w = pt.x().template stash_value<StorageWords>();
  376|    219|         auto y_w = pt.y().template stash_value<StorageWords>();
  377|    219|         auto z_w = pt.z().template stash_value<StorageWords>();
  378|    219|         return ProjectivePoint::_create(instance(), x_w, y_w, z_w);
  379|    219|      }
pcurves_secp256k1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256k15CurveEE10from_stashERKNS0_15PrimeOrderCurve6ScalarE:
  352|    663|      static typename C::Scalar from_stash(const Scalar& s) {
  353|    663|         if(s._curve() != instance()) {
  ------------------
  |  Branch (353:13): [True: 0, False: 663]
  ------------------
  354|      0|            throw Invalid_Argument("Curve mismatch");
  355|      0|         }
  356|    663|         return C::Scalar::from_stash(s._value());
  357|    663|      }
pcurves_secp256k1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256k15CurveEE5stashERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS3_12Secp256k1RepEE12ScalarParamsEEEEE:
  348|    222|      static Scalar stash(const typename C::Scalar& s) {
  349|    222|         return Scalar::_create(instance(), s.template stash_value<StorageWords>());
  350|    222|      }
pcurves_secp256k1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256k15CurveEE10from_stashERKNS0_15PrimeOrderCurve11AffinePointE:
  365|    438|      static typename C::AffinePoint from_stash(const AffinePoint& pt) {
  366|    438|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (366:13): [True: 0, False: 438]
  ------------------
  367|      0|            throw Invalid_Argument("Curve mismatch");
  368|      0|         }
  369|    438|         auto x = C::FieldElement::from_stash(pt._x());
  370|    438|         auto y = C::FieldElement::from_stash(pt._y());
  371|    438|         return typename C::AffinePoint(x, y);
  372|    438|      }
pcurves_secp256k1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256k15CurveEE5stashERKNS_16AffineCurvePointINS_6IntModINS3_12Secp256k1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
  359|    219|      static AffinePoint stash(const typename C::AffinePoint& pt) {
  360|    219|         auto x_w = pt.x().template stash_value<StorageWords>();
  361|    219|         auto y_w = pt.y().template stash_value<StorageWords>();
  362|    219|         return AffinePoint::_create(instance(), x_w, y_w);
  363|    219|      }
pcurves_secp256k1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256k15CurveEE18deserialize_scalarENSt3__14spanIKhLm18446744073709551615EEE:
  224|    223|      std::optional<Scalar> deserialize_scalar(std::span<const uint8_t> bytes) const override {
  225|    223|         if(auto scalar = C::Scalar::deserialize(bytes)) {
  ------------------
  |  Branch (225:18): [True: 223, False: 0]
  ------------------
  226|    223|            if(!scalar->is_zero().as_bool()) {
  ------------------
  |  Branch (226:16): [True: 222, False: 1]
  ------------------
  227|    222|               return stash(*scalar);
  228|    222|            }
  229|    223|         }
  230|       |
  231|      1|         return {};
  232|    223|      }
pcurves_secp256k1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256k15CurveEE15point_to_affineERKNS0_15PrimeOrderCurve15ProjectivePointE:
  192|    219|      AffinePoint point_to_affine(const ProjectivePoint& pt) const override {
  193|    219|         auto affine = to_affine<C>(from_stash(pt));
  194|       |
  195|    219|         const auto y2 = affine.y().square();
  196|    219|         const auto x3_ax_b = C::x3_ax_b(affine.x());
  197|    219|         const auto valid_point = affine.is_identity() || (y2 == x3_ax_b);
  198|       |
  199|    219|         BOTAN_ASSERT(valid_point.as_bool(), "Computed point is on the curve");
  ------------------
  |  |   64|    219|   do {                                                                                 \
  |  |   65|    219|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|    219|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 219]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|    219|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 219]
  |  |  ------------------
  ------------------
  200|       |
  201|    219|         return stash(affine);
  202|    219|      }
pcurves_secp256k1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256k15CurveEE10from_stashERKNS0_15PrimeOrderCurve15ProjectivePointE:
  381|    219|      static typename C::ProjectivePoint from_stash(const ProjectivePoint& pt) {
  382|    219|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (382:13): [True: 0, False: 219]
  ------------------
  383|      0|            throw Invalid_Argument("Curve mismatch");
  384|      0|         }
  385|    219|         auto x = C::FieldElement::from_stash(pt._x());
  386|    219|         auto y = C::FieldElement::from_stash(pt._y());
  387|    219|         auto z = C::FieldElement::from_stash(pt._z());
  388|    219|         return typename C::ProjectivePoint(x, y, z);
  389|    219|      }
pcurves_secp256k1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256k15CurveEE24affine_point_is_identityERKNS0_15PrimeOrderCurve11AffinePointE:
  210|    219|      bool affine_point_is_identity(const AffinePoint& pt) const override {
  211|    219|         return from_stash(pt).is_identity().as_bool();
  212|    219|      }
pcurves_secp256k1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256k15CurveEE15serialize_pointENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve11AffinePointE:
  214|    219|      void serialize_point(std::span<uint8_t> bytes, const AffinePoint& pt) const override {
  215|    219|         BOTAN_ARG_CHECK(bytes.size() == C::AffinePoint::BYTES, "Invalid length for serialize_point");
  ------------------
  |  |   35|    219|   do {                                                          \
  |  |   36|    219|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    219|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 219]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    219|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 219]
  |  |  ------------------
  ------------------
  216|    219|         from_stash(pt).serialize_to(bytes.subspan<0, C::AffinePoint::BYTES>());
  217|    219|      }
pcurves_secp256k1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256k15CurveEE16serialize_scalarENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve6ScalarE:
  219|    222|      void serialize_scalar(std::span<uint8_t> bytes, const Scalar& scalar) const override {
  220|    222|         BOTAN_ARG_CHECK(bytes.size() == C::Scalar::BYTES, "Invalid length to serialize_scalar");
  ------------------
  |  |   35|    222|   do {                                                          \
  |  |   36|    222|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    222|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 222]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    222|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 222]
  |  |  ------------------
  ------------------
  221|    222|         return from_stash(scalar).serialize_to(bytes.subspan<0, C::Scalar::BYTES>());
  222|    222|      }
pcurves_secp256k1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256k15CurveEE14scalar_is_zeroERKNS0_15PrimeOrderCurve6ScalarE:
  330|    222|      bool scalar_is_zero(const Scalar& s) const override { return from_stash(s).is_zero().as_bool(); }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE8instanceEv:
  342|    788|      static std::shared_ptr<const PrimeOrderCurve> instance() {
  343|    788|         static auto g_curve = std::make_shared<const PrimeOrderCurveImpl<C>>();
  344|    788|         return g_curve;
  345|    788|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEEC2Ev:
  340|      1|      PrimeOrderCurveImpl() : m_mul_by_g(C::G) {}
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE19field_element_bytesEv:
   36|    146|      size_t field_element_bytes() const override { return C::FieldElement::BYTES; }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE8mul_by_gERKNS0_15PrimeOrderCurve6ScalarERNS_21RandomNumberGeneratorE:
   38|     73|      ProjectivePoint mul_by_g(const Scalar& scalar, RandomNumberGenerator& rng) const override {
   39|     73|         return stash(m_mul_by_g.mul(from_stash(scalar), rng));
   40|     73|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE5stashERKNS_20ProjectiveCurvePointINS_6IntModINS2_12Secp256r1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEESA_EE:
  374|     73|      static ProjectivePoint stash(const typename C::ProjectivePoint& pt) {
  375|     73|         auto x_w = pt.x().template stash_value<StorageWords>();
  376|     73|         auto y_w = pt.y().template stash_value<StorageWords>();
  377|     73|         auto z_w = pt.z().template stash_value<StorageWords>();
  378|     73|         return ProjectivePoint::_create(instance(), x_w, y_w, z_w);
  379|     73|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE10from_stashERKNS0_15PrimeOrderCurve6ScalarE:
  352|    219|      static typename C::Scalar from_stash(const Scalar& s) {
  353|    219|         if(s._curve() != instance()) {
  ------------------
  |  Branch (353:13): [True: 0, False: 219]
  ------------------
  354|      0|            throw Invalid_Argument("Curve mismatch");
  355|      0|         }
  356|    219|         return C::Scalar::from_stash(s._value());
  357|    219|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE5stashERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS2_12Secp256r1RepEE12ScalarParamsEEEEE:
  348|     73|      static Scalar stash(const typename C::Scalar& s) {
  349|     73|         return Scalar::_create(instance(), s.template stash_value<StorageWords>());
  350|     73|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE10from_stashERKNS0_15PrimeOrderCurve11AffinePointE:
  365|    146|      static typename C::AffinePoint from_stash(const AffinePoint& pt) {
  366|    146|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (366:13): [True: 0, False: 146]
  ------------------
  367|      0|            throw Invalid_Argument("Curve mismatch");
  368|      0|         }
  369|    146|         auto x = C::FieldElement::from_stash(pt._x());
  370|    146|         auto y = C::FieldElement::from_stash(pt._y());
  371|    146|         return typename C::AffinePoint(x, y);
  372|    146|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE5stashERKNS_16AffineCurvePointINS_6IntModINS2_12Secp256r1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
  359|     73|      static AffinePoint stash(const typename C::AffinePoint& pt) {
  360|     73|         auto x_w = pt.x().template stash_value<StorageWords>();
  361|     73|         auto y_w = pt.y().template stash_value<StorageWords>();
  362|     73|         return AffinePoint::_create(instance(), x_w, y_w);
  363|     73|      }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE18deserialize_scalarENSt3__14spanIKhLm18446744073709551615EEE:
  224|     74|      std::optional<Scalar> deserialize_scalar(std::span<const uint8_t> bytes) const override {
  225|     74|         if(auto scalar = C::Scalar::deserialize(bytes)) {
  ------------------
  |  Branch (225:18): [True: 74, False: 0]
  ------------------
  226|     74|            if(!scalar->is_zero().as_bool()) {
  ------------------
  |  Branch (226:16): [True: 73, False: 1]
  ------------------
  227|     73|               return stash(*scalar);
  228|     73|            }
  229|     74|         }
  230|       |
  231|      1|         return {};
  232|     74|      }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE15point_to_affineERKNS0_15PrimeOrderCurve15ProjectivePointE:
  192|     73|      AffinePoint point_to_affine(const ProjectivePoint& pt) const override {
  193|     73|         auto affine = to_affine<C>(from_stash(pt));
  194|       |
  195|     73|         const auto y2 = affine.y().square();
  196|     73|         const auto x3_ax_b = C::x3_ax_b(affine.x());
  197|     73|         const auto valid_point = affine.is_identity() || (y2 == x3_ax_b);
  198|       |
  199|     73|         BOTAN_ASSERT(valid_point.as_bool(), "Computed point is on the curve");
  ------------------
  |  |   64|     73|   do {                                                                                 \
  |  |   65|     73|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|     73|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 73]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|     73|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 73]
  |  |  ------------------
  ------------------
  200|       |
  201|     73|         return stash(affine);
  202|     73|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE10from_stashERKNS0_15PrimeOrderCurve15ProjectivePointE:
  381|     73|      static typename C::ProjectivePoint from_stash(const ProjectivePoint& pt) {
  382|     73|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (382:13): [True: 0, False: 73]
  ------------------
  383|      0|            throw Invalid_Argument("Curve mismatch");
  384|      0|         }
  385|     73|         auto x = C::FieldElement::from_stash(pt._x());
  386|     73|         auto y = C::FieldElement::from_stash(pt._y());
  387|     73|         auto z = C::FieldElement::from_stash(pt._z());
  388|     73|         return typename C::ProjectivePoint(x, y, z);
  389|     73|      }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE24affine_point_is_identityERKNS0_15PrimeOrderCurve11AffinePointE:
  210|     73|      bool affine_point_is_identity(const AffinePoint& pt) const override {
  211|     73|         return from_stash(pt).is_identity().as_bool();
  212|     73|      }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE15serialize_pointENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve11AffinePointE:
  214|     73|      void serialize_point(std::span<uint8_t> bytes, const AffinePoint& pt) const override {
  215|     73|         BOTAN_ARG_CHECK(bytes.size() == C::AffinePoint::BYTES, "Invalid length for serialize_point");
  ------------------
  |  |   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]
  |  |  ------------------
  ------------------
  216|     73|         from_stash(pt).serialize_to(bytes.subspan<0, C::AffinePoint::BYTES>());
  217|     73|      }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE16serialize_scalarENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve6ScalarE:
  219|     73|      void serialize_scalar(std::span<uint8_t> bytes, const Scalar& scalar) const override {
  220|     73|         BOTAN_ARG_CHECK(bytes.size() == C::Scalar::BYTES, "Invalid length to serialize_scalar");
  ------------------
  |  |   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]
  |  |  ------------------
  ------------------
  221|     73|         return from_stash(scalar).serialize_to(bytes.subspan<0, C::Scalar::BYTES>());
  222|     73|      }
pcurves_secp256r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp256r15CurveEE14scalar_is_zeroERKNS0_15PrimeOrderCurve6ScalarE:
  330|     73|      bool scalar_is_zero(const Scalar& s) const override { return from_stash(s).is_zero().as_bool(); }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE8instanceEv:
  342|  2.03k|      static std::shared_ptr<const PrimeOrderCurve> instance() {
  343|  2.03k|         static auto g_curve = std::make_shared<const PrimeOrderCurveImpl<C>>();
  344|  2.03k|         return g_curve;
  345|  2.03k|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEEC2Ev:
  340|      1|      PrimeOrderCurveImpl() : m_mul_by_g(C::G) {}
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE19field_element_bytesEv:
   36|    392|      size_t field_element_bytes() const override { return C::FieldElement::BYTES; }
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE8mul_by_gERKNS0_15PrimeOrderCurve6ScalarERNS_21RandomNumberGeneratorE:
   38|    196|      ProjectivePoint mul_by_g(const Scalar& scalar, RandomNumberGenerator& rng) const override {
   39|    196|         return stash(m_mul_by_g.mul(from_stash(scalar), rng));
   40|    196|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE5stashERKNS_20ProjectiveCurvePointINS_6IntModINS2_12Secp384r1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEESA_EE:
  374|    196|      static ProjectivePoint stash(const typename C::ProjectivePoint& pt) {
  375|    196|         auto x_w = pt.x().template stash_value<StorageWords>();
  376|    196|         auto y_w = pt.y().template stash_value<StorageWords>();
  377|    196|         auto z_w = pt.z().template stash_value<StorageWords>();
  378|    196|         return ProjectivePoint::_create(instance(), x_w, y_w, z_w);
  379|    196|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE10from_stashERKNS0_15PrimeOrderCurve6ScalarE:
  352|    622|      static typename C::Scalar from_stash(const Scalar& s) {
  353|    622|         if(s._curve() != instance()) {
  ------------------
  |  Branch (353:13): [True: 0, False: 622]
  ------------------
  354|      0|            throw Invalid_Argument("Curve mismatch");
  355|      0|         }
  356|    622|         return C::Scalar::from_stash(s._value());
  357|    622|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE5stashERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS2_12Secp384r1RepEE12ScalarParamsEEEEE:
  348|    213|      static Scalar stash(const typename C::Scalar& s) {
  349|    213|         return Scalar::_create(instance(), s.template stash_value<StorageWords>());
  350|    213|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE10from_stashERKNS0_15PrimeOrderCurve11AffinePointE:
  365|    392|      static typename C::AffinePoint from_stash(const AffinePoint& pt) {
  366|    392|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (366:13): [True: 0, False: 392]
  ------------------
  367|      0|            throw Invalid_Argument("Curve mismatch");
  368|      0|         }
  369|    392|         auto x = C::FieldElement::from_stash(pt._x());
  370|    392|         auto y = C::FieldElement::from_stash(pt._y());
  371|    392|         return typename C::AffinePoint(x, y);
  372|    392|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE5stashERKNS_16AffineCurvePointINS_6IntModINS2_12Secp384r1RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
  359|    196|      static AffinePoint stash(const typename C::AffinePoint& pt) {
  360|    196|         auto x_w = pt.x().template stash_value<StorageWords>();
  361|    196|         auto y_w = pt.y().template stash_value<StorageWords>();
  362|    196|         return AffinePoint::_create(instance(), x_w, y_w);
  363|    196|      }
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE18deserialize_scalarENSt3__14spanIKhLm18446744073709551615EEE:
  224|    214|      std::optional<Scalar> deserialize_scalar(std::span<const uint8_t> bytes) const override {
  225|    214|         if(auto scalar = C::Scalar::deserialize(bytes)) {
  ------------------
  |  Branch (225:18): [True: 214, False: 0]
  ------------------
  226|    214|            if(!scalar->is_zero().as_bool()) {
  ------------------
  |  Branch (226:16): [True: 213, False: 1]
  ------------------
  227|    213|               return stash(*scalar);
  228|    213|            }
  229|    214|         }
  230|       |
  231|      1|         return {};
  232|    214|      }
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE15point_to_affineERKNS0_15PrimeOrderCurve15ProjectivePointE:
  192|    196|      AffinePoint point_to_affine(const ProjectivePoint& pt) const override {
  193|    196|         auto affine = to_affine<C>(from_stash(pt));
  194|       |
  195|    196|         const auto y2 = affine.y().square();
  196|    196|         const auto x3_ax_b = C::x3_ax_b(affine.x());
  197|    196|         const auto valid_point = affine.is_identity() || (y2 == x3_ax_b);
  198|       |
  199|    196|         BOTAN_ASSERT(valid_point.as_bool(), "Computed point is on the curve");
  ------------------
  |  |   64|    196|   do {                                                                                 \
  |  |   65|    196|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|    196|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 196]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|    196|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 196]
  |  |  ------------------
  ------------------
  200|       |
  201|    196|         return stash(affine);
  202|    196|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE10from_stashERKNS0_15PrimeOrderCurve15ProjectivePointE:
  381|    196|      static typename C::ProjectivePoint from_stash(const ProjectivePoint& pt) {
  382|    196|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (382:13): [True: 0, False: 196]
  ------------------
  383|      0|            throw Invalid_Argument("Curve mismatch");
  384|      0|         }
  385|    196|         auto x = C::FieldElement::from_stash(pt._x());
  386|    196|         auto y = C::FieldElement::from_stash(pt._y());
  387|    196|         auto z = C::FieldElement::from_stash(pt._z());
  388|    196|         return typename C::ProjectivePoint(x, y, z);
  389|    196|      }
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE24affine_point_is_identityERKNS0_15PrimeOrderCurve11AffinePointE:
  210|    196|      bool affine_point_is_identity(const AffinePoint& pt) const override {
  211|    196|         return from_stash(pt).is_identity().as_bool();
  212|    196|      }
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE15serialize_pointENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve11AffinePointE:
  214|    196|      void serialize_point(std::span<uint8_t> bytes, const AffinePoint& pt) const override {
  215|    196|         BOTAN_ARG_CHECK(bytes.size() == C::AffinePoint::BYTES, "Invalid length for serialize_point");
  ------------------
  |  |   35|    196|   do {                                                          \
  |  |   36|    196|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    196|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 196]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    196|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 196]
  |  |  ------------------
  ------------------
  216|    196|         from_stash(pt).serialize_to(bytes.subspan<0, C::AffinePoint::BYTES>());
  217|    196|      }
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE16serialize_scalarENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve6ScalarE:
  219|    213|      void serialize_scalar(std::span<uint8_t> bytes, const Scalar& scalar) const override {
  220|    213|         BOTAN_ARG_CHECK(bytes.size() == C::Scalar::BYTES, "Invalid length to serialize_scalar");
  ------------------
  |  |   35|    213|   do {                                                          \
  |  |   36|    213|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    213|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 213]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    213|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 213]
  |  |  ------------------
  ------------------
  221|    213|         return from_stash(scalar).serialize_to(bytes.subspan<0, C::Scalar::BYTES>());
  222|    213|      }
pcurves_secp384r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp384r15CurveEE14scalar_is_zeroERKNS0_15PrimeOrderCurve6ScalarE:
  330|    213|      bool scalar_is_zero(const Scalar& s) const override { return from_stash(s).is_zero().as_bool(); }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE8instanceEv:
  342|  2.47k|      static std::shared_ptr<const PrimeOrderCurve> instance() {
  343|  2.47k|         static auto g_curve = std::make_shared<const PrimeOrderCurveImpl<C>>();
  344|  2.47k|         return g_curve;
  345|  2.47k|      }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEEC2Ev:
  340|      1|      PrimeOrderCurveImpl() : m_mul_by_g(C::G) {}
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE19field_element_bytesEv:
   36|    410|      size_t field_element_bytes() const override { return C::FieldElement::BYTES; }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE8mul_by_gERKNS0_15PrimeOrderCurve6ScalarERNS_21RandomNumberGeneratorE:
   38|    204|      ProjectivePoint mul_by_g(const Scalar& scalar, RandomNumberGenerator& rng) const override {
   39|    204|         return stash(m_mul_by_g.mul(from_stash(scalar), rng));
   40|    204|      }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE5stashERKNS_20ProjectiveCurvePointINS_6IntModINS3_7P521RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEESA_EE:
  374|    204|      static ProjectivePoint stash(const typename C::ProjectivePoint& pt) {
  375|    204|         auto x_w = pt.x().template stash_value<StorageWords>();
  376|    204|         auto y_w = pt.y().template stash_value<StorageWords>();
  377|    204|         auto z_w = pt.z().template stash_value<StorageWords>();
  378|    204|         return ProjectivePoint::_create(instance(), x_w, y_w, z_w);
  379|    204|      }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE10from_stashERKNS0_15PrimeOrderCurve6ScalarE:
  352|    806|      static typename C::Scalar from_stash(const Scalar& s) {
  353|    806|         if(s._curve() != instance()) {
  ------------------
  |  Branch (353:13): [True: 0, False: 806]
  ------------------
  354|      0|            throw Invalid_Argument("Curve mismatch");
  355|      0|         }
  356|    806|         return C::Scalar::from_stash(s._value());
  357|    806|      }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE5stashERKNS_6IntModINS_13MontgomeryRepINS_13EllipticCurveINS3_6ParamsENS3_7P521RepEE12ScalarParamsEEEEE:
  348|    301|      static Scalar stash(const typename C::Scalar& s) {
  349|    301|         return Scalar::_create(instance(), s.template stash_value<StorageWords>());
  350|    301|      }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE10from_stashERKNS0_15PrimeOrderCurve11AffinePointE:
  365|    410|      static typename C::AffinePoint from_stash(const AffinePoint& pt) {
  366|    410|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (366:13): [True: 0, False: 410]
  ------------------
  367|      0|            throw Invalid_Argument("Curve mismatch");
  368|      0|         }
  369|    410|         auto x = C::FieldElement::from_stash(pt._x());
  370|    410|         auto y = C::FieldElement::from_stash(pt._y());
  371|    410|         return typename C::AffinePoint(x, y);
  372|    410|      }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE5stashERKNS_16AffineCurvePointINS_6IntModINS3_7P521RepINS_13EllipticCurveINS3_6ParamsES8_E11FieldParamsEEEEEEE:
  359|    205|      static AffinePoint stash(const typename C::AffinePoint& pt) {
  360|    205|         auto x_w = pt.x().template stash_value<StorageWords>();
  361|    205|         auto y_w = pt.y().template stash_value<StorageWords>();
  362|    205|         return AffinePoint::_create(instance(), x_w, y_w);
  363|    205|      }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE30deserialize_point_uncompressedENSt3__14spanIKhLm18446744073709551615EEE:
  244|     92|      std::optional<AffinePoint> deserialize_point_uncompressed(std::span<const uint8_t> bytes) const override {
  245|     92|         constexpr size_t FieldElementBytes = C::FieldElement::BYTES;
  246|     92|         constexpr size_t UncompressedBytes = 2 * C::FieldElement::BYTES + 1;
  247|       |
  248|     92|         if(bytes.size() == UncompressedBytes && bytes[0] == 0x04) {
  ------------------
  |  Branch (248:13): [True: 92, False: 0]
  |  Branch (248:50): [True: 92, False: 0]
  ------------------
  249|     92|            const auto encoded_point = bytes.subspan(1);
  250|     92|            auto x = C::FieldElement::deserialize(encoded_point.first(FieldElementBytes));
  251|     92|            auto y = C::FieldElement::deserialize(encoded_point.last(FieldElementBytes));
  252|       |
  253|     92|            if(x && y) {
  ------------------
  |  Branch (253:16): [True: 88, False: 4]
  |  Branch (253:21): [True: 87, False: 1]
  ------------------
  254|       |               // Check that y^2 = x^3 + ax + b
  255|     87|               const auto lhs = (*y).square();
  256|     87|               const auto rhs = C::x3_ax_b(*x);
  257|     87|               const auto valid = (lhs == rhs);
  258|     87|               if(valid.as_bool()) {
  ------------------
  |  Branch (258:19): [True: 1, False: 86]
  ------------------
  259|      1|                  return stash(typename C::AffinePoint(*x, *y));
  260|      1|               }
  261|     87|            }
  262|     92|         }
  263|       |
  264|     91|         return {};
  265|     92|      }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE18deserialize_scalarENSt3__14spanIKhLm18446744073709551615EEE:
  224|    304|      std::optional<Scalar> deserialize_scalar(std::span<const uint8_t> bytes) const override {
  225|    304|         if(auto scalar = C::Scalar::deserialize(bytes)) {
  ------------------
  |  Branch (225:18): [True: 302, False: 2]
  ------------------
  226|    302|            if(!scalar->is_zero().as_bool()) {
  ------------------
  |  Branch (226:16): [True: 301, False: 1]
  ------------------
  227|    301|               return stash(*scalar);
  228|    301|            }
  229|    302|         }
  230|       |
  231|      3|         return {};
  232|    304|      }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE15point_to_affineERKNS0_15PrimeOrderCurve15ProjectivePointE:
  192|    204|      AffinePoint point_to_affine(const ProjectivePoint& pt) const override {
  193|    204|         auto affine = to_affine<C>(from_stash(pt));
  194|       |
  195|    204|         const auto y2 = affine.y().square();
  196|    204|         const auto x3_ax_b = C::x3_ax_b(affine.x());
  197|    204|         const auto valid_point = affine.is_identity() || (y2 == x3_ax_b);
  198|       |
  199|    204|         BOTAN_ASSERT(valid_point.as_bool(), "Computed point is on the curve");
  ------------------
  |  |   64|    204|   do {                                                                                 \
  |  |   65|    204|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|    204|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 204]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|    204|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 204]
  |  |  ------------------
  ------------------
  200|       |
  201|    204|         return stash(affine);
  202|    204|      }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE10from_stashERKNS0_15PrimeOrderCurve15ProjectivePointE:
  381|    204|      static typename C::ProjectivePoint from_stash(const ProjectivePoint& pt) {
  382|    204|         if(pt._curve() != instance()) {
  ------------------
  |  Branch (382:13): [True: 0, False: 204]
  ------------------
  383|      0|            throw Invalid_Argument("Curve mismatch");
  384|      0|         }
  385|    204|         auto x = C::FieldElement::from_stash(pt._x());
  386|    204|         auto y = C::FieldElement::from_stash(pt._y());
  387|    204|         auto z = C::FieldElement::from_stash(pt._z());
  388|    204|         return typename C::ProjectivePoint(x, y, z);
  389|    204|      }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE24affine_point_is_identityERKNS0_15PrimeOrderCurve11AffinePointE:
  210|    205|      bool affine_point_is_identity(const AffinePoint& pt) const override {
  211|    205|         return from_stash(pt).is_identity().as_bool();
  212|    205|      }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE15serialize_pointENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve11AffinePointE:
  214|    205|      void serialize_point(std::span<uint8_t> bytes, const AffinePoint& pt) const override {
  215|    205|         BOTAN_ARG_CHECK(bytes.size() == C::AffinePoint::BYTES, "Invalid length for serialize_point");
  ------------------
  |  |   35|    205|   do {                                                          \
  |  |   36|    205|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    205|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 205]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    205|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 205]
  |  |  ------------------
  ------------------
  216|    205|         from_stash(pt).serialize_to(bytes.subspan<0, C::AffinePoint::BYTES>());
  217|    205|      }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE16serialize_scalarENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve6ScalarE:
  219|    301|      void serialize_scalar(std::span<uint8_t> bytes, const Scalar& scalar) const override {
  220|    301|         BOTAN_ARG_CHECK(bytes.size() == C::Scalar::BYTES, "Invalid length to serialize_scalar");
  ------------------
  |  |   35|    301|   do {                                                          \
  |  |   36|    301|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    301|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 301]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    301|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 301]
  |  |  ------------------
  ------------------
  221|    301|         return from_stash(scalar).serialize_to(bytes.subspan<0, C::Scalar::BYTES>());
  222|    301|      }
pcurves_secp521r1.cpp:_ZNK5Botan6PCurve19PrimeOrderCurveImplINS0_12_GLOBAL__N_19secp521r15CurveEE14scalar_is_zeroERKNS0_15PrimeOrderCurve6ScalarE:
  330|    301|      bool scalar_is_zero(const Scalar& s) const override { return from_stash(s).is_zero().as_bool(); }

_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE0EEC2EOS4_:
  409|    948|      PolynomialVector(ThisPolynomialVector&& other) noexcept = default;
_ZNK5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE0EE4sizeEv:
  414|    899|      size_t size() const { return m_vec.size(); }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE0EED2Ev:
  412|  1.42k|      ~PolynomialVector() = default;
_ZN5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE0EED2Ev:
  274|  8.81k|      ~Polynomial() = default;
_ZN5Botan8CRYSTALS3nttITkNS0_14crystals_traitENS_19DilithiumPolyTraitsEEENS0_16PolynomialVectorIT_LNS0_6DomainE1EEENS3_IS4_LS5_0EEE:
  574|     79|PolynomialVector<Trait, Domain::NTT> ntt(PolynomialVector<Trait, Domain::Normal> polyvec) {
  575|     79|   auto polyvec_ntt = detail::domain_cast<Domain::NTT>(std::move(polyvec));
  576|    437|   for(auto& poly : polyvec_ntt) {
  ------------------
  |  Branch (576:19): [True: 437, False: 79]
  ------------------
  577|    437|      Trait::ntt(poly.coefficients());
  578|    437|   }
  579|     79|   return polyvec_ntt;
  580|     79|}
_ZN5Botan8CRYSTALS6detail11domain_castILNS0_6DomainE1ETtTyTnS3_ENS0_16PolynomialVectorETkNS0_14crystals_traitENS_19DilithiumPolyTraitsELS3_0EQneT_T2_EET0_IT1_XT_EEOS6_IS7_XT2_EE:
  163|     79|StructureT<Trait, To> domain_cast(StructureT<Trait, From>&& p) {
  164|       |   // The public factory method `from_domain_cast` is just a workaround for
  165|       |   // Xcode and NDK not understanding the friend declaration to allow this
  166|       |   // to directly call the private constructor.
  167|     79|   return StructureT<Trait, To>::from_domain_cast(std::move(p));
  168|     79|}
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE1EE16from_domain_castILS3_0EQneT0_TL0__EES4_ONS1_IS2_XT_EEE:
  396|     79|      static PolynomialVector<Trait, D> from_domain_cast(PolynomialVector<Trait, OtherD>&& other) {
  397|     79|         return PolynomialVector<Trait, D>(std::move(other));
  398|     79|      }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE1EEC2ILS3_0EQneT0_TL0__EEONS1_IS2_XT_EEE:
  379|     79|            m_polys_storage(std::move(other.m_polys_storage)) {
  380|     79|         BOTAN_DEBUG_ASSERT(m_polys_storage.size() % Trait::N == 0);
  ------------------
  |  |  130|     79|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|     79|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 79]
  |  |  ------------------
  ------------------
  381|     79|         const size_t vecsize = m_polys_storage.size() / Trait::N;
  382|    516|         for(size_t i = 0; i < vecsize; ++i) {
  ------------------
  |  Branch (382:28): [True: 437, False: 79]
  ------------------
  383|    437|            m_vec.emplace_back(
  384|    437|               Polynomial<Trait, D>(std::span{m_polys_storage}.subspan(i * Trait::N).template first<Trait::N>()));
  385|    437|         }
  386|     79|      }
_ZN5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE1EEC2EOS4_:
  261|  8.19k|            m_coeffs_storage(std::move(other.m_coeffs_storage)), m_coeffs(other.m_coeffs) {}
_ZN5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE1EEC2ENSt3__14spanIiLm256EEE:
  256|  3.84k|      explicit Polynomial(std::span<T, Trait::N> coeffs) : m_coeffs(coeffs) { BOTAN_DEBUG_ASSERT(!owns_storage()); }
  ------------------
  |  |  130|  3.84k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  3.84k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 3.84k]
  |  |  ------------------
  ------------------
_ZN5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE1EED2Ev:
  274|  12.0k|      ~Polynomial() = default;
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE1EE5beginEv:
  481|     79|      decltype(auto) begin() { return m_vec.begin(); }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE1EE3endEv:
  485|     79|      decltype(auto) end() { return m_vec.end(); }
_ZN5Botan8CRYSTALS10Trait_BaseINS_18DilithiumConstantsENS_19DilithiumPolyTraitsEE5fqmulEii:
   96|  1.83M|      static constexpr T fqmul(T a, T b) { return DerivedT::montgomery_reduce_coefficient(static_cast<T2>(a) * b); }
_ZN5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE1EE12coefficientsEv:
  302|  1.44k|      std::span<T, Trait::N> coefficients() { return m_coeffs; }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE0EEC2Em:
  401|    395|      explicit PolynomialVector(size_t vecsize) : m_polys_storage(vecsize * Trait::N) {
  402|  2.78k|         for(size_t i = 0; i < vecsize; ++i) {
  ------------------
  |  Branch (402:28): [True: 2.38k, False: 395]
  ------------------
  403|  2.38k|            m_vec.emplace_back(
  404|  2.38k|               Polynomial<Trait, D>(std::span{m_polys_storage}.subspan(i * Trait::N).template first<Trait::N>()));
  405|  2.38k|         }
  406|    395|      }
_ZN5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE0EEC2EOS4_:
  261|  5.92k|            m_coeffs_storage(std::move(other.m_coeffs_storage)), m_coeffs(other.m_coeffs) {}
_ZN5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE0EEC2ENSt3__14spanIiLm256EEE:
  256|  2.89k|      explicit Polynomial(std::span<T, Trait::N> coeffs) : m_coeffs(coeffs) { BOTAN_DEBUG_ASSERT(!owns_storage()); }
  ------------------
  |  |  130|  2.89k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  2.89k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 2.89k]
  |  |  ------------------
  ------------------
_ZNK5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE0EEixEm:
  479|   258k|      const Polynomial<Trait, D>& operator[](size_t i) const { return m_vec[i]; }
_ZNK5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE0EEixEm:
  308|   258k|      T operator[](size_t i) const { return m_coeffs[i]; }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE0EEixEm:
  477|   258k|      Polynomial<Trait, D>& operator[](size_t i) { return m_vec[i]; }
_ZN5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE0EEixEm:
  306|   258k|      T& operator[](size_t i) { return m_coeffs[i]; }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE1EED2Ev:
  412|    741|      ~PolynomialVector() = default;
_ZN5Botan8CRYSTALS16PolynomialMatrixINS_19DilithiumPolyTraitsEED2Ev:
  509|     79|      ~PolynomialMatrix() = default;
_ZN5Botan8CRYSTALSmlITkNS0_14crystals_traitENS_19DilithiumPolyTraitsEEENS0_16PolynomialVectorIT_LNS0_6DomainE1EEERKNS0_16PolynomialMatrixIS4_EERKS6_:
  618|     79|                                               const PolynomialVector<Trait, Domain::NTT>& vec) {
  619|     79|   PolynomialVector<Trait, Domain::NTT> result(mat.size());
  620|    583|   for(size_t i = 0; i < mat.size(); ++i) {
  ------------------
  |  Branch (620:22): [True: 504, False: 79]
  ------------------
  621|    504|      Trait::polyvec_pointwise_acc_montgomery(result[i].coefficients(), mat[i].coefficients(), vec.coefficients());
  622|    504|   }
  623|     79|   return result;
  624|     79|}
_ZNK5Botan8CRYSTALS16PolynomialMatrixINS_19DilithiumPolyTraitsEE4sizeEv:
  511|    662|      size_t size() const { return m_mat.size(); }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE1EEC2Em:
  401|    583|      explicit PolynomialVector(size_t vecsize) : m_polys_storage(vecsize * Trait::N) {
  402|  3.99k|         for(size_t i = 0; i < vecsize; ++i) {
  ------------------
  |  Branch (402:28): [True: 3.40k, False: 583]
  ------------------
  403|  3.40k|            m_vec.emplace_back(
  404|  3.40k|               Polynomial<Trait, D>(std::span{m_polys_storage}.subspan(i * Trait::N).template first<Trait::N>()));
  405|  3.40k|         }
  406|    583|      }
_ZN5Botan8CRYSTALS10Trait_BaseINS_18DilithiumConstantsENS_19DilithiumPolyTraitsEE32polyvec_pointwise_acc_montgomeryENSt3__14spanIiLm256EEENS6_IKiLm18446744073709551615EEES9_:
  131|    504|                                                             std::span<const T> v) {
  132|    504|         clear_mem(w);
  133|    504|         std::array<T, N> t{};
  134|  3.40k|         for(size_t i = 0; i < polys_in_polyvec(u); ++i) {
  ------------------
  |  Branch (134:28): [True: 2.90k, False: 504]
  ------------------
  135|  2.90k|            DerivedT::poly_pointwise_montgomery(t, poly_in_polyvec(u, i), poly_in_polyvec(v, i));
  136|  2.90k|            poly_add(w, w, t);
  137|  2.90k|         }
  138|    504|         barrett_reduce(w);
  139|    504|      }
_ZN5Botan8CRYSTALS10Trait_BaseINS_18DilithiumConstantsENS_19DilithiumPolyTraitsEE16polys_in_polyvecENSt3__14spanIKiLm18446744073709551615EEE:
   81|  3.40k|      static constexpr size_t polys_in_polyvec(std::span<const T> polyvec) {
   82|  3.40k|         BOTAN_DEBUG_ASSERT(polyvec.size() % N == 0);
  ------------------
  |  |  130|  3.40k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  3.40k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 3.40k]
  |  |  ------------------
  ------------------
   83|  3.40k|         return polyvec.size() / N;
   84|  3.40k|      }
_ZN5Botan8CRYSTALS10Trait_BaseINS_18DilithiumConstantsENS_19DilithiumPolyTraitsEE15poly_in_polyvecIKiQoosr3stdE7same_asINT_1TETL0__Esr3stdE7same_asIKS8_S9_EEENSt3__14spanIS7_Lm256EEENSC_IS7_Lm18446744073709551615EEEm:
   89|  5.80k|      static constexpr std::span<U, N> poly_in_polyvec(std::span<U> polyvec, size_t index) {
   90|  5.80k|         BOTAN_DEBUG_ASSERT(polyvec.size() % N == 0);
  ------------------
  |  |  130|  5.80k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  5.80k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 5.80k]
  |  |  ------------------
  ------------------
   91|  5.80k|         BOTAN_DEBUG_ASSERT(polyvec.size() / N > index);
  ------------------
  |  |  130|  5.80k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  5.80k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 5.80k]
  |  |  ------------------
  ------------------
   92|  5.80k|         auto polyspan = polyvec.subspan(index * N, N);
   93|  5.80k|         return std::span<U, N>{polyspan.data(), polyspan.size()};
   94|  5.80k|      }
_ZN5Botan8CRYSTALS10Trait_BaseINS_18DilithiumConstantsENS_19DilithiumPolyTraitsEE8poly_addENSt3__14spanIiLm256EEENS6_IKiLm256EEES9_:
   99|  3.40k|      static constexpr void poly_add(std::span<T, N> result, std::span<const T, N> lhs, std::span<const T, N> rhs) {
  100|   875k|         for(size_t i = 0; i < N; ++i) {
  ------------------
  |  Branch (100:28): [True: 872k, False: 3.40k]
  ------------------
  101|   872k|            result[i] = lhs[i] + rhs[i];
  102|   872k|         }
  103|  3.40k|      }
_ZN5Botan8CRYSTALS10Trait_BaseINS_18DilithiumConstantsENS_19DilithiumPolyTraitsEE14barrett_reduceENSt3__14spanIiLm256EEE:
  122|  1.00k|      constexpr static void barrett_reduce(std::span<T, N> poly) {
  123|   258k|         for(auto& coeff : poly) {
  ------------------
  |  Branch (123:26): [True: 258k, False: 1.00k]
  ------------------
  124|   258k|            coeff = DerivedT::barrett_reduce_coefficient(coeff);
  125|   258k|         }
  126|  1.00k|      }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE1EEixEm:
  477|  3.40k|      Polynomial<Trait, D>& operator[](size_t i) { return m_vec[i]; }
_ZNK5Botan8CRYSTALS16PolynomialMatrixINS_19DilithiumPolyTraitsEEixEm:
  522|    504|      const PolynomialVector<Trait, Domain::NTT>& operator[](size_t i) const { return m_mat[i]; }
_ZNK5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE1EE12coefficientsEv:
  445|  1.00k|      std::span<const T> coefficients() const { return m_polys_storage; }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE1EE6reduceEv:
  463|     79|      ThisPolynomialVector& reduce() {
  464|    504|         for(auto& p : m_vec) {
  ------------------
  |  Branch (464:22): [True: 504, False: 79]
  ------------------
  465|    504|            Trait::barrett_reduce(p.coefficients());
  466|    504|         }
  467|     79|         return *this;
  468|     79|      }
_ZN5Botan8CRYSTALS11inverse_nttITkNS0_14crystals_traitENS_19DilithiumPolyTraitsEEENS0_16PolynomialVectorIT_LNS0_6DomainE0EEENS3_IS4_LS5_1EEE:
  583|     79|PolynomialVector<Trait, Domain::Normal> inverse_ntt(PolynomialVector<Trait, Domain::NTT> polyvec_ntt) {
  584|     79|   auto polyvec = detail::domain_cast<Domain::Normal>(std::move(polyvec_ntt));
  585|    504|   for(auto& poly : polyvec) {
  ------------------
  |  Branch (585:19): [True: 504, False: 79]
  ------------------
  586|    504|      Trait::inverse_ntt(poly.coefficients());
  587|    504|   }
  588|     79|   return polyvec;
  589|     79|}
_ZN5Botan8CRYSTALS6detail11domain_castILNS0_6DomainE0ETtTyTnS3_ENS0_16PolynomialVectorETkNS0_14crystals_traitENS_19DilithiumPolyTraitsELS3_1EQneT_T2_EET0_IT1_XT_EEOS6_IS7_XT2_EE:
  163|     79|StructureT<Trait, To> domain_cast(StructureT<Trait, From>&& p) {
  164|       |   // The public factory method `from_domain_cast` is just a workaround for
  165|       |   // Xcode and NDK not understanding the friend declaration to allow this
  166|       |   // to directly call the private constructor.
  167|     79|   return StructureT<Trait, To>::from_domain_cast(std::move(p));
  168|     79|}
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE0EE16from_domain_castILS3_1EQneT0_TL0__EES4_ONS1_IS2_XT_EEE:
  396|     79|      static PolynomialVector<Trait, D> from_domain_cast(PolynomialVector<Trait, OtherD>&& other) {
  397|     79|         return PolynomialVector<Trait, D>(std::move(other));
  398|     79|      }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE0EEC2ILS3_1EQneT0_TL0__EEONS1_IS2_XT_EEE:
  379|     79|            m_polys_storage(std::move(other.m_polys_storage)) {
  380|     79|         BOTAN_DEBUG_ASSERT(m_polys_storage.size() % Trait::N == 0);
  ------------------
  |  |  130|     79|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|     79|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 79]
  |  |  ------------------
  ------------------
  381|     79|         const size_t vecsize = m_polys_storage.size() / Trait::N;
  382|    583|         for(size_t i = 0; i < vecsize; ++i) {
  ------------------
  |  Branch (382:28): [True: 504, False: 79]
  ------------------
  383|    504|            m_vec.emplace_back(
  384|    504|               Polynomial<Trait, D>(std::span{m_polys_storage}.subspan(i * Trait::N).template first<Trait::N>()));
  385|    504|         }
  386|     79|      }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE0EE5beginEv:
  481|    237|      decltype(auto) begin() { return m_vec.begin(); }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE0EE3endEv:
  485|    237|      decltype(auto) end() { return m_vec.end(); }
_ZN5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE0EE12coefficientsEv:
  302|  2.01k|      std::span<T, Trait::N> coefficients() { return m_coeffs; }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE1EEC2EOS4_:
  409|     79|      PolynomialVector(ThisPolynomialVector&& other) noexcept = default;
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE0EE17conditional_add_qEv:
  470|     79|      ThisPolynomialVector& conditional_add_q() {
  471|    504|         for(auto& v : m_vec) {
  ------------------
  |  Branch (471:22): [True: 504, False: 79]
  ------------------
  472|    504|            Trait::poly_cadd_q(v.coefficients());
  473|    504|         }
  474|     79|         return *this;
  475|     79|      }
_ZN5Botan8CRYSTALS10Trait_BaseINS_18DilithiumConstantsENS_19DilithiumPolyTraitsEE11poly_cadd_qENSt3__14spanIiLm256EEE:
  112|    504|      static constexpr void poly_cadd_q(std::span<T, N> coeffs) {
  113|   129k|         for(auto& coeff : coeffs) {
  ------------------
  |  Branch (113:26): [True: 129k, False: 504]
  ------------------
  114|   129k|            using unsigned_T = std::make_unsigned_t<T>;
  115|   129k|            const auto is_negative = CT::Mask<unsigned_T>::expand_top_bit(static_cast<unsigned_T>(coeff));
  116|   129k|            coeff += is_negative.if_set_return(Q);
  117|   129k|         }
  118|    504|      }
_ZNK5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE0EE5cloneEv:
  418|     79|      ThisPolynomialVector clone() const {
  419|     79|         ThisPolynomialVector res(size());
  420|       |
  421|       |         // The default-constructed PolynomialVector has set up res.m_vec to
  422|       |         // point to res.m_polys_storage. Therefore we can just copy the data
  423|       |         // into res.m_polys_storage to fill the non-owning polynomials.
  424|     79|         copy_mem(res.m_polys_storage, m_polys_storage);
  425|       |
  426|     79|         return res;
  427|     79|      }
_ZNK5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE0EE18_const_time_poisonEv:
  330|    941|      void _const_time_poison() const { CT::poison(m_coeffs); }
_ZNK5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE0EE12coefficientsEv:
  304|    504|      std::span<const T, Trait::N> coefficients() const { return m_coeffs; }
_ZNK5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE0EE20_const_time_unpoisonEv:
  491|    316|      void _const_time_unpoison() const { CT::unpoison_range(m_vec); }
_ZNK5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE0EE20_const_time_unpoisonEv:
  332|  1.94k|      void _const_time_unpoison() const { CT::unpoison(m_coeffs); }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE0EEpLERKS4_:
  447|     79|      ThisPolynomialVector& operator+=(const ThisPolynomialVector& other) {
  448|     79|         BOTAN_ASSERT(m_vec.size() == other.m_vec.size(), "cannot add polynomial vectors of differing lengths");
  ------------------
  |  |   64|     79|   do {                                                                                 \
  |  |   65|     79|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|     79|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 79]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|     79|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 79]
  |  |  ------------------
  ------------------
  449|    583|         for(size_t i = 0; i < m_vec.size(); ++i) {
  ------------------
  |  Branch (449:28): [True: 504, False: 79]
  ------------------
  450|    504|            Trait::poly_add(m_vec[i].coefficients(), m_vec[i].coefficients(), other.m_vec[i].coefficients());
  451|    504|         }
  452|     79|         return *this;
  453|     79|      }
_ZN5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE0EE5beginEv:
  310|    941|      decltype(auto) begin() { return m_coeffs.begin(); }
_ZN5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE0EE3endEv:
  314|    941|      decltype(auto) end() { return m_coeffs.end(); }
_ZNK5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE0EE4sizeEv:
  276|   162k|      constexpr size_t size() const { return m_coeffs.size(); }
_ZNK5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE0EE5beginEv:
  483|     79|      decltype(auto) begin() const { return m_vec.begin(); }
_ZNK5Botan8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS0_6DomainE0EE3endEv:
  487|     79|      decltype(auto) end() const { return m_vec.end(); }
_ZN5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE1EE5beginEv:
  310|  2.90k|      decltype(auto) begin() { return m_coeffs.begin(); }
_ZN5Botan8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS0_6DomainE1EE3endEv:
  314|  2.90k|      decltype(auto) end() { return m_coeffs.end(); }
_ZN5Botan8CRYSTALS16PolynomialMatrixINS_19DilithiumPolyTraitsEEC2Emm:
  513|     79|      PolynomialMatrix(size_t rows, size_t cols) {
  514|     79|         m_mat.reserve(rows);
  515|    583|         for(size_t i = 0; i < rows; ++i) {
  ------------------
  |  Branch (515:28): [True: 504, False: 79]
  ------------------
  516|    504|            m_mat.emplace_back(cols);
  517|    504|         }
  518|     79|      }
_ZN5Botan8CRYSTALS16PolynomialMatrixINS_19DilithiumPolyTraitsEEixEm:
  520|  2.90k|      PolynomialVector<Trait, Domain::NTT>& operator[](size_t i) { return m_mat[i]; }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE1EED2Ev:
  412|    317|      ~PolynomialVector() = default;
_ZN5Botan8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS0_6DomainE1EED2Ev:
  274|  1.68k|      ~Polynomial() = default;
_ZN5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE1EEC2Em:
  401|    121|      explicit PolynomialVector(size_t vecsize) : m_polys_storage(vecsize * Trait::N) {
  402|    539|         for(size_t i = 0; i < vecsize; ++i) {
  ------------------
  |  Branch (402:28): [True: 418, False: 121]
  ------------------
  403|    418|            m_vec.emplace_back(
  404|    418|               Polynomial<Trait, D>(std::span{m_polys_storage}.subspan(i * Trait::N).template first<Trait::N>()));
  405|    418|         }
  406|    121|      }
_ZN5Botan8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS0_6DomainE1EEC2EOS4_:
  261|  1.08k|            m_coeffs_storage(std::move(other.m_coeffs_storage)), m_coeffs(other.m_coeffs) {}
_ZN5Botan8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS0_6DomainE1EEC2ENSt3__14spanIsLm256EEE:
  256|    604|      explicit Polynomial(std::span<T, Trait::N> coeffs) : m_coeffs(coeffs) { BOTAN_DEBUG_ASSERT(!owns_storage()); }
  ------------------
  |  |  130|    604|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    604|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 604]
  |  |  ------------------
  ------------------
_ZN5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE1EEC2EOS4_:
  409|    140|      PolynomialVector(ThisPolynomialVector&& other) noexcept = default;
_ZN5Botan8CRYSTALS16PolynomialMatrixINS_15KyberPolyTraitsEED2Ev:
  509|     28|      ~PolynomialMatrix() = default;
_ZN5Botan8CRYSTALS10Trait_BaseINS_14KyberConstantsENS_15KyberPolyTraitsEE5fqmulEss:
   96|   398k|      static constexpr T fqmul(T a, T b) { return DerivedT::montgomery_reduce_coefficient(static_cast<T2>(a) * b); }
_ZN5Botan8CRYSTALS10Trait_BaseINS_14KyberConstantsENS_15KyberPolyTraitsEE14barrett_reduceENSt3__14spanIsLm256EEE:
  122|    465|      constexpr static void barrett_reduce(std::span<T, N> poly) {
  123|   119k|         for(auto& coeff : poly) {
  ------------------
  |  Branch (123:26): [True: 119k, False: 465]
  ------------------
  124|   119k|            coeff = DerivedT::barrett_reduce_coefficient(coeff);
  125|   119k|         }
  126|    465|      }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE0EE5beginEv:
  481|     56|      decltype(auto) begin() { return m_vec.begin(); }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE0EE3endEv:
  485|     56|      decltype(auto) end() { return m_vec.end(); }
_ZNK5Botan8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS0_6DomainE0EE4sizeEv:
  276|  6.96k|      constexpr size_t size() const { return m_coeffs.size(); }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE1EE5beginEv:
  481|     84|      decltype(auto) begin() { return m_vec.begin(); }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE1EE3endEv:
  485|     84|      decltype(auto) end() { return m_vec.end(); }
_ZN5Botan8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS0_6DomainE1EE5beginEv:
  310|    418|      decltype(auto) begin() { return m_coeffs.begin(); }
_ZN5Botan8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS0_6DomainE1EE3endEv:
  314|    418|      decltype(auto) end() { return m_coeffs.end(); }
_ZNK5Botan8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS0_6DomainE1EE4sizeEv:
  276|  6.04k|      constexpr size_t size() const { return m_coeffs.size(); }
_ZNK5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE1EE20_const_time_unpoisonEv:
  491|     56|      void _const_time_unpoison() const { CT::unpoison_range(m_vec); }
_ZNK5Botan8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS0_6DomainE1EE20_const_time_unpoisonEv:
  332|    186|      void _const_time_unpoison() const { CT::unpoison(m_coeffs); }
_ZNK5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE1EE5beginEv:
  483|     28|      decltype(auto) begin() const { return m_vec.begin(); }
_ZNK5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE1EE3endEv:
  487|     28|      decltype(auto) end() const { return m_vec.end(); }
_ZNK5Botan8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS0_6DomainE1EEixEm:
  308|  23.8k|      T operator[](size_t i) const { return m_coeffs[i]; }
_ZNK5Botan8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS0_6DomainE1EE12coefficientsEv:
  304|     93|      std::span<const T, Trait::N> coefficients() const { return m_coeffs; }
_ZN5Botan8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS0_6DomainE0EED2Ev:
  274|    520|      ~Polynomial() = default;
_ZN5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE0EED2Ev:
  412|     56|      ~PolynomialVector() = default;
_ZN5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE0EEC2Em:
  401|     56|      explicit PolynomialVector(size_t vecsize) : m_polys_storage(vecsize * Trait::N) {
  402|    242|         for(size_t i = 0; i < vecsize; ++i) {
  ------------------
  |  Branch (402:28): [True: 186, False: 56]
  ------------------
  403|    186|            m_vec.emplace_back(
  404|    186|               Polynomial<Trait, D>(std::span{m_polys_storage}.subspan(i * Trait::N).template first<Trait::N>()));
  405|    186|         }
  406|     56|      }
_ZN5Botan8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS0_6DomainE0EEC2EOS4_:
  261|    334|            m_coeffs_storage(std::move(other.m_coeffs_storage)), m_coeffs(other.m_coeffs) {}
_ZN5Botan8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS0_6DomainE0EEC2ENSt3__14spanIsLm256EEE:
  256|    186|      explicit Polynomial(std::span<T, Trait::N> coeffs) : m_coeffs(coeffs) { BOTAN_DEBUG_ASSERT(!owns_storage()); }
  ------------------
  |  |  130|    186|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    186|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 186]
  |  |  ------------------
  ------------------
_ZN5Botan8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS0_6DomainE0EEixEm:
  306|  47.6k|      T& operator[](size_t i) { return m_coeffs[i]; }
_ZN5Botan8CRYSTALS3nttITkNS0_14crystals_traitENS_15KyberPolyTraitsEEENS0_16PolynomialVectorIT_LNS0_6DomainE1EEENS3_IS4_LS5_0EEE:
  574|     56|PolynomialVector<Trait, Domain::NTT> ntt(PolynomialVector<Trait, Domain::Normal> polyvec) {
  575|     56|   auto polyvec_ntt = detail::domain_cast<Domain::NTT>(std::move(polyvec));
  576|    186|   for(auto& poly : polyvec_ntt) {
  ------------------
  |  Branch (576:19): [True: 186, False: 56]
  ------------------
  577|    186|      Trait::ntt(poly.coefficients());
  578|    186|   }
  579|     56|   return polyvec_ntt;
  580|     56|}
_ZN5Botan8CRYSTALS6detail11domain_castILNS0_6DomainE1ETtTyTnS3_ENS0_16PolynomialVectorETkNS0_14crystals_traitENS_15KyberPolyTraitsELS3_0EQneT_T2_EET0_IT1_XT_EEOS6_IS7_XT2_EE:
  163|     56|StructureT<Trait, To> domain_cast(StructureT<Trait, From>&& p) {
  164|       |   // The public factory method `from_domain_cast` is just a workaround for
  165|       |   // Xcode and NDK not understanding the friend declaration to allow this
  166|       |   // to directly call the private constructor.
  167|     56|   return StructureT<Trait, To>::from_domain_cast(std::move(p));
  168|     56|}
_ZN5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE1EE16from_domain_castILS3_0EQneT0_TL0__EES4_ONS1_IS2_XT_EEE:
  396|     56|      static PolynomialVector<Trait, D> from_domain_cast(PolynomialVector<Trait, OtherD>&& other) {
  397|     56|         return PolynomialVector<Trait, D>(std::move(other));
  398|     56|      }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE1EEC2ILS3_0EQneT0_TL0__EEONS1_IS2_XT_EEE:
  379|     56|            m_polys_storage(std::move(other.m_polys_storage)) {
  380|     56|         BOTAN_DEBUG_ASSERT(m_polys_storage.size() % Trait::N == 0);
  ------------------
  |  |  130|     56|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|     56|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 56]
  |  |  ------------------
  ------------------
  381|     56|         const size_t vecsize = m_polys_storage.size() / Trait::N;
  382|    242|         for(size_t i = 0; i < vecsize; ++i) {
  ------------------
  |  Branch (382:28): [True: 186, False: 56]
  ------------------
  383|    186|            m_vec.emplace_back(
  384|    186|               Polynomial<Trait, D>(std::span{m_polys_storage}.subspan(i * Trait::N).template first<Trait::N>()));
  385|    186|         }
  386|     56|      }
_ZN5Botan8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS0_6DomainE1EE12coefficientsEv:
  302|    651|      std::span<T, Trait::N> coefficients() { return m_coeffs; }
_ZN5Botan8CRYSTALSmlITkNS0_14crystals_traitENS_15KyberPolyTraitsEEENS0_16PolynomialVectorIT_LNS0_6DomainE1EEERKNS0_16PolynomialMatrixIS4_EERKS6_:
  618|     28|                                               const PolynomialVector<Trait, Domain::NTT>& vec) {
  619|     28|   PolynomialVector<Trait, Domain::NTT> result(mat.size());
  620|    121|   for(size_t i = 0; i < mat.size(); ++i) {
  ------------------
  |  Branch (620:22): [True: 93, False: 28]
  ------------------
  621|     93|      Trait::polyvec_pointwise_acc_montgomery(result[i].coefficients(), mat[i].coefficients(), vec.coefficients());
  622|     93|   }
  623|     28|   return result;
  624|     28|}
_ZNK5Botan8CRYSTALS16PolynomialMatrixINS_15KyberPolyTraitsEE4sizeEv:
  511|    149|      size_t size() const { return m_mat.size(); }
_ZN5Botan8CRYSTALS10Trait_BaseINS_14KyberConstantsENS_15KyberPolyTraitsEE32polyvec_pointwise_acc_montgomeryENSt3__14spanIsLm256EEENS6_IKsLm18446744073709551615EEES9_:
  131|     93|                                                             std::span<const T> v) {
  132|     93|         clear_mem(w);
  133|     93|         std::array<T, N> t{};
  134|    418|         for(size_t i = 0; i < polys_in_polyvec(u); ++i) {
  ------------------
  |  Branch (134:28): [True: 325, False: 93]
  ------------------
  135|    325|            DerivedT::poly_pointwise_montgomery(t, poly_in_polyvec(u, i), poly_in_polyvec(v, i));
  136|    325|            poly_add(w, w, t);
  137|    325|         }
  138|     93|         barrett_reduce(w);
  139|     93|      }
_ZN5Botan8CRYSTALS10Trait_BaseINS_14KyberConstantsENS_15KyberPolyTraitsEE16polys_in_polyvecENSt3__14spanIKsLm18446744073709551615EEE:
   81|    418|      static constexpr size_t polys_in_polyvec(std::span<const T> polyvec) {
   82|    418|         BOTAN_DEBUG_ASSERT(polyvec.size() % N == 0);
  ------------------
  |  |  130|    418|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    418|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 418]
  |  |  ------------------
  ------------------
   83|    418|         return polyvec.size() / N;
   84|    418|      }
_ZN5Botan8CRYSTALS10Trait_BaseINS_14KyberConstantsENS_15KyberPolyTraitsEE15poly_in_polyvecIKsQoosr3stdE7same_asINT_1TETL0__Esr3stdE7same_asIKS8_S9_EEENSt3__14spanIS7_Lm256EEENSC_IS7_Lm18446744073709551615EEEm:
   89|    650|      static constexpr std::span<U, N> poly_in_polyvec(std::span<U> polyvec, size_t index) {
   90|    650|         BOTAN_DEBUG_ASSERT(polyvec.size() % N == 0);
  ------------------
  |  |  130|    650|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    650|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 650]
  |  |  ------------------
  ------------------
   91|    650|         BOTAN_DEBUG_ASSERT(polyvec.size() / N > index);
  ------------------
  |  |  130|    650|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    650|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 650]
  |  |  ------------------
  ------------------
   92|    650|         auto polyspan = polyvec.subspan(index * N, N);
   93|    650|         return std::span<U, N>{polyspan.data(), polyspan.size()};
   94|    650|      }
_ZN5Botan8CRYSTALS10Trait_BaseINS_14KyberConstantsENS_15KyberPolyTraitsEE8poly_addENSt3__14spanIsLm256EEENS6_IKsLm256EEES9_:
   99|    418|      static constexpr void poly_add(std::span<T, N> result, std::span<const T, N> lhs, std::span<const T, N> rhs) {
  100|   107k|         for(size_t i = 0; i < N; ++i) {
  ------------------
  |  Branch (100:28): [True: 107k, False: 418]
  ------------------
  101|   107k|            result[i] = lhs[i] + rhs[i];
  102|   107k|         }
  103|    418|      }
_ZNK5Botan8CRYSTALS16PolynomialMatrixINS_15KyberPolyTraitsEEixEm:
  522|     93|      const PolynomialVector<Trait, Domain::NTT>& operator[](size_t i) const { return m_mat[i]; }
_ZNK5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE1EE12coefficientsEv:
  445|    186|      std::span<const T> coefficients() const { return m_polys_storage; }
_ZN5Botan8CRYSTALS10montgomeryITkNS0_14crystals_traitENS_15KyberPolyTraitsELNS0_6DomainE1EEENS0_16PolynomialVectorIT_XT0_EEES6_:
  598|     28|PolynomialVector<Trait, D> montgomery(PolynomialVector<Trait, D> polyvec) {
  599|     93|   for(auto& p : polyvec) {
  ------------------
  |  Branch (599:16): [True: 93, False: 28]
  ------------------
  600|     93|      detail::montgomery(p);
  601|     93|   }
  602|     28|   return polyvec;
  603|     28|}
_ZN5Botan8CRYSTALS6detail10montgomeryITkNS0_14crystals_traitENS_15KyberPolyTraitsELNS0_6DomainE1EEEvRNS0_10PolynomialIT_XT0_EEE:
  540|     93|void montgomery(Polynomial<Trait, D>& p) {
  541|  23.8k|   for(auto& c : p) {
  ------------------
  |  Branch (541:16): [True: 23.8k, False: 93]
  ------------------
  542|  23.8k|      c = Trait::to_montgomery(c);
  543|  23.8k|   }
  544|     93|}
_ZN5Botan8CRYSTALS10Trait_BaseINS_14KyberConstantsENS_15KyberPolyTraitsEE13to_montgomeryEs:
  120|  23.8k|      static constexpr T to_montgomery(T a) { return fqmul(a, MONTY_SQUARED); }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE1EEpLERKS4_:
  447|     28|      ThisPolynomialVector& operator+=(const ThisPolynomialVector& other) {
  448|     28|         BOTAN_ASSERT(m_vec.size() == other.m_vec.size(), "cannot add polynomial vectors of differing lengths");
  ------------------
  |  |   64|     28|   do {                                                                                 \
  |  |   65|     28|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|     28|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 28]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|     28|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 28]
  |  |  ------------------
  ------------------
  449|    121|         for(size_t i = 0; i < m_vec.size(); ++i) {
  ------------------
  |  Branch (449:28): [True: 93, False: 28]
  ------------------
  450|     93|            Trait::poly_add(m_vec[i].coefficients(), m_vec[i].coefficients(), other.m_vec[i].coefficients());
  451|     93|         }
  452|     28|         return *this;
  453|     28|      }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE1EE6reduceEv:
  463|     56|      ThisPolynomialVector& reduce() {
  464|    186|         for(auto& p : m_vec) {
  ------------------
  |  Branch (464:22): [True: 186, False: 56]
  ------------------
  465|    186|            Trait::barrett_reduce(p.coefficients());
  466|    186|         }
  467|     56|         return *this;
  468|     56|      }
_ZN5Botan8CRYSTALS16PolynomialMatrixINS_15KyberPolyTraitsEEC2Emm:
  513|     28|      PolynomialMatrix(size_t rows, size_t cols) {
  514|     28|         m_mat.reserve(rows);
  515|    121|         for(size_t i = 0; i < rows; ++i) {
  ------------------
  |  Branch (515:28): [True: 93, False: 28]
  ------------------
  516|     93|            m_mat.emplace_back(cols);
  517|     93|         }
  518|     28|      }
_ZN5Botan8CRYSTALS16PolynomialMatrixINS_15KyberPolyTraitsEEixEm:
  520|    325|      PolynomialVector<Trait, Domain::NTT>& operator[](size_t i) { return m_mat[i]; }
_ZN5Botan8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS0_6DomainE1EEixEm:
  477|    418|      Polynomial<Trait, D>& operator[](size_t i) { return m_vec[i]; }

_ZN5Botan8CRYSTALS4packILi1023ETkNS0_14crystals_traitENS_19DilithiumPolyTraitsELNS0_6DomainE0EEEvRKNS0_10PolynomialIT0_XT1_EEERNS_13BufferStufferE:
  223|    504|constexpr void pack(const Polynomial<PolyTrait, D>& p, BufferStuffer& stuffer) {
  224|    504|   using unsigned_T = std::make_unsigned_t<typename PolyTrait::T>;
  225|    504|   pack<range>(p, stuffer, [](typename PolyTrait::T x) { return static_cast<unsigned_T>(x); });
  226|    504|}
_ZN5Botan8CRYSTALS4packILi1023ETkNS0_14crystals_traitENS_19DilithiumPolyTraitsELNS0_6DomainE0ETkNS0_12coeff_map_fnINT0_1TEEEZNS0_4packILi1023ETkNS0_14crystals_traitES2_LS3_0EEEvRKNS0_10PolynomialIS5_XT1_EEERNS_13BufferStufferEEUliE_EEvSB_SD_T2_:
  117|    504|constexpr void pack(const Polynomial<PolyTrait, D>& p, BufferStuffer& stuffer, MapFnT map) {
  118|    504|   using trait = BitPackingTrait<range, PolyTrait>;
  119|       |
  120|    504|   BOTAN_DEBUG_ASSERT(stuffer.remaining_capacity() >= p.size() * trait::bits_per_coeff / 8);
  ------------------
  |  |  130|    504|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    504|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 504]
  |  |  ------------------
  ------------------
  121|       |
  122|       |   // Bit-packing example that shows a coefficients' bit-pack that spills across
  123|       |   // more than one 64-bit collectors. This illustrates the algorithm below.
  124|       |   //
  125|       |   //                         0                                       64                                       128
  126|       |   // Collectors   (64 bits): |               collectors[0]            |               collectors[1]            |
  127|       |   //                         |                                        |                                        |
  128|       |   // Coefficients (11 bits): | c[0] | c[1] | c[2] | c[3] | c[4] | c[5] | c[6] | c[7] |      |      |      |      | ...
  129|       |   //                         |                                                       |                         |
  130|       |   //                         |         < byte-aligned coefficient pack >             |  < byte-aligned pad. >  |
  131|       |   //                         |             (one inner loop iteration)                |
  132|       |   //                         0                                                      88 (divisible by 8)
  133|       |
  134|  32.7k|   for(size_t i = 0; i < p.size(); i += trait::coeffs_per_pack) {
  ------------------
  |  Branch (134:22): [True: 32.2k, False: 504]
  ------------------
  135|       |      // The collectors array is filled with bit-packed coefficients to produce
  136|       |      // a byte-aligned pack of coefficients. When coefficients fall onto the
  137|       |      // boundary of two collectors, their bits must be split.
  138|  32.2k|      typename trait::collector_array collectors = {0};
  139|   161k|      for(size_t j = 0, bit_offset = 0, c = 0; j < trait::coeffs_per_pack; ++j) {
  ------------------
  |  Branch (139:48): [True: 129k, False: 32.2k]
  ------------------
  140|       |         // Transform p[i] via a custom map function (that may be a NOOP).
  141|   129k|         const typename trait::unsigned_T mapped_coeff = map(p[i + j]);
  142|   129k|         const auto coeff_value = static_cast<typename trait::sink_t>(mapped_coeff);
  143|       |
  144|       |         // pack() is called only on data produced by us. If the values returned
  145|       |         // by the map function are not in the range [0, range] we have a bug.
  146|   129k|         BOTAN_DEBUG_ASSERT(coeff_value <= range);
  ------------------
  |  |  130|   129k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|   129k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 129k]
  |  |  ------------------
  ------------------
  147|       |
  148|       |         // Bit-pack the coefficient into the collectors array and keep track of
  149|       |         // the bit-offset within the current collector. Note that this might
  150|       |         // shift some high-bits of the coefficient out of the current collector.
  151|   129k|         collectors[c] |= coeff_value << bit_offset;
  152|   129k|         bit_offset += trait::bits_per_coeff;
  153|       |
  154|       |         // If the bit-offset now exceeds the collector's bit-width, we fill the
  155|       |         // next collector with the high-bits that didn't fit into the previous.
  156|       |         // The bit-offset is adjusted to now point into the new collector.
  157|   129k|         if(bit_offset > trait::bits_in_collector) {
  ------------------
  |  Branch (157:13): [True: 0, False: 129k]
  ------------------
  158|      0|            bit_offset = bit_offset - trait::bits_in_collector;
  159|      0|            collectors[++c] = coeff_value >> (trait::bits_per_coeff - bit_offset);
  160|      0|         }
  161|   129k|      }
  162|       |
  163|       |      // One byte-aligned pack of bit-packed coefficients is now stored in the
  164|       |      // collectors and can be written to an output buffer. Note that we might
  165|       |      // have to remove some padding bytes of unused collector space.
  166|  32.2k|      const auto bytes = store_le(collectors);
  167|  32.2k|      stuffer.append(std::span{bytes}.template first<trait::bytes_per_pack>());
  168|  32.2k|   }
  169|    504|}
_ZZN5Botan8CRYSTALS4packILi1023ETkNS0_14crystals_traitENS_19DilithiumPolyTraitsELNS0_6DomainE0EEEvRKNS0_10PolynomialIT0_XT1_EEERNS_13BufferStufferEENKUliE_clEi:
  225|   129k|   pack<range>(p, stuffer, [](typename PolyTrait::T x) { return static_cast<unsigned_T>(x); });
_ZN5Botan8CRYSTALS4packILi3328ETkNS0_14crystals_traitENS_15KyberPolyTraitsELNS0_6DomainE1EEEvRKNS0_10PolynomialIT0_XT1_EEERNS_13BufferStufferE:
  223|     93|constexpr void pack(const Polynomial<PolyTrait, D>& p, BufferStuffer& stuffer) {
  224|     93|   using unsigned_T = std::make_unsigned_t<typename PolyTrait::T>;
  225|     93|   pack<range>(p, stuffer, [](typename PolyTrait::T x) { return static_cast<unsigned_T>(x); });
  226|     93|}
_ZN5Botan8CRYSTALS4packILi3328ETkNS0_14crystals_traitENS_15KyberPolyTraitsELNS0_6DomainE1ETkNS0_12coeff_map_fnINT0_1TEEEZNS0_4packILi3328ETkNS0_14crystals_traitES2_LS3_1EEEvRKNS0_10PolynomialIS5_XT1_EEERNS_13BufferStufferEEUlsE_EEvSB_SD_T2_:
  117|     93|constexpr void pack(const Polynomial<PolyTrait, D>& p, BufferStuffer& stuffer, MapFnT map) {
  118|     93|   using trait = BitPackingTrait<range, PolyTrait>;
  119|       |
  120|     93|   BOTAN_DEBUG_ASSERT(stuffer.remaining_capacity() >= p.size() * trait::bits_per_coeff / 8);
  ------------------
  |  |  130|     93|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|     93|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 93]
  |  |  ------------------
  ------------------
  121|       |
  122|       |   // Bit-packing example that shows a coefficients' bit-pack that spills across
  123|       |   // more than one 64-bit collectors. This illustrates the algorithm below.
  124|       |   //
  125|       |   //                         0                                       64                                       128
  126|       |   // Collectors   (64 bits): |               collectors[0]            |               collectors[1]            |
  127|       |   //                         |                                        |                                        |
  128|       |   // Coefficients (11 bits): | c[0] | c[1] | c[2] | c[3] | c[4] | c[5] | c[6] | c[7] |      |      |      |      | ...
  129|       |   //                         |                                                       |                         |
  130|       |   //                         |         < byte-aligned coefficient pack >             |  < byte-aligned pad. >  |
  131|       |   //                         |             (one inner loop iteration)                |
  132|       |   //                         0                                                      88 (divisible by 8)
  133|       |
  134|  6.04k|   for(size_t i = 0; i < p.size(); i += trait::coeffs_per_pack) {
  ------------------
  |  Branch (134:22): [True: 5.95k, False: 93]
  ------------------
  135|       |      // The collectors array is filled with bit-packed coefficients to produce
  136|       |      // a byte-aligned pack of coefficients. When coefficients fall onto the
  137|       |      // boundary of two collectors, their bits must be split.
  138|  5.95k|      typename trait::collector_array collectors = {0};
  139|  29.7k|      for(size_t j = 0, bit_offset = 0, c = 0; j < trait::coeffs_per_pack; ++j) {
  ------------------
  |  Branch (139:48): [True: 23.8k, False: 5.95k]
  ------------------
  140|       |         // Transform p[i] via a custom map function (that may be a NOOP).
  141|  23.8k|         const typename trait::unsigned_T mapped_coeff = map(p[i + j]);
  142|  23.8k|         const auto coeff_value = static_cast<typename trait::sink_t>(mapped_coeff);
  143|       |
  144|       |         // pack() is called only on data produced by us. If the values returned
  145|       |         // by the map function are not in the range [0, range] we have a bug.
  146|  23.8k|         BOTAN_DEBUG_ASSERT(coeff_value <= range);
  ------------------
  |  |  130|  23.8k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  23.8k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 23.8k]
  |  |  ------------------
  ------------------
  147|       |
  148|       |         // Bit-pack the coefficient into the collectors array and keep track of
  149|       |         // the bit-offset within the current collector. Note that this might
  150|       |         // shift some high-bits of the coefficient out of the current collector.
  151|  23.8k|         collectors[c] |= coeff_value << bit_offset;
  152|  23.8k|         bit_offset += trait::bits_per_coeff;
  153|       |
  154|       |         // If the bit-offset now exceeds the collector's bit-width, we fill the
  155|       |         // next collector with the high-bits that didn't fit into the previous.
  156|       |         // The bit-offset is adjusted to now point into the new collector.
  157|  23.8k|         if(bit_offset > trait::bits_in_collector) {
  ------------------
  |  Branch (157:13): [True: 0, False: 23.8k]
  ------------------
  158|      0|            bit_offset = bit_offset - trait::bits_in_collector;
  159|      0|            collectors[++c] = coeff_value >> (trait::bits_per_coeff - bit_offset);
  160|      0|         }
  161|  23.8k|      }
  162|       |
  163|       |      // One byte-aligned pack of bit-packed coefficients is now stored in the
  164|       |      // collectors and can be written to an output buffer. Note that we might
  165|       |      // have to remove some padding bytes of unused collector space.
  166|  5.95k|      const auto bytes = store_le(collectors);
  167|  5.95k|      stuffer.append(std::span{bytes}.template first<trait::bytes_per_pack>());
  168|  5.95k|   }
  169|     93|}
_ZZN5Botan8CRYSTALS4packILi3328ETkNS0_14crystals_traitENS_15KyberPolyTraitsELNS0_6DomainE1EEEvRKNS0_10PolynomialIT0_XT1_EEERNS_13BufferStufferEENKUlsE_clEs:
  225|  23.8k|   pack<range>(p, stuffer, [](typename PolyTrait::T x) { return static_cast<unsigned_T>(x); });

_ZN5Botan6bitlenEm:
  101|    882|constexpr auto bitlen(size_t x) {
  102|    882|   return ceil_log2(x + 1);
  103|    882|}
_ZN5Botan6detail11Bounded_XOFIRNS_3XOFELm894EEC2ES3_:
  173|  2.90k|      explicit Bounded_XOF(XofT xof) : m_xof(xof), m_bytes_consumed(0) {}
dilithium_algos.cpp:_ZN5Botan6detail11Bounded_XOFIRNS_3XOFELm894EE4nextILm3EZNS_15Dilithium_Algos12_GLOBAL__N_118sample_ntt_uniformENS_10StrongSpanIKNS_6StrongINSt3__16vectorIhNSA_9allocatorIhEEEENS_20DilithiumPublicSeed_EJEEEEERNS_8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNSJ_6DomainE1EEEtRKNS_18DilithiumConstantsEE3$_0ZNS7_18sample_ntt_uniformESI_SO_tSR_E3$_1Qaasr3stdE9invocableITL0_0_NSA_5arrayIhXTL0__EEEEsr3stdE9invocableITL0_1_NSA_20__invoke_result_implIvJSU_SW_EE4typeEEEEDaRKT0_RKT1_:
  195|   743k|                          const PredicateFnT& predicate = default_predicate<bytes, MappedValueT<bytes, MapFnT>>) {
  196|   744k|         while(true) {
  ------------------
  |  Branch (196:16): [True: 744k, Folded]
  ------------------
  197|   744k|            auto output = transformer(take<bytes>());
  198|   744k|            if(predicate(output)) {
  ------------------
  |  Branch (198:16): [True: 743k, False: 774]
  ------------------
  199|   743k|               return output;
  200|   743k|            }
  201|   744k|         }
  202|   743k|      }
_ZN5Botan6detail11Bounded_XOFIRNS_3XOFELm894EE4takeILm3EEENSt3__15arrayIhXT_EEEv:
  206|   744k|      constexpr std::array<uint8_t, bytes> take() {
  207|   744k|         m_bytes_consumed += bytes;
  208|   744k|         if(m_bytes_consumed > bound) {
  ------------------
  |  Branch (208:13): [True: 0, False: 744k]
  ------------------
  209|      0|            throw Internal_Error("XOF consumed more bytes than allowed");
  210|      0|         }
  211|   744k|         return m_xof.template output<bytes>();
  212|   744k|      }
_ZN5Botan6detail11Bounded_XOFIRNS_3XOFELm481EEC2ES3_:
  173|    941|      explicit Bounded_XOF(XofT xof) : m_xof(xof), m_bytes_consumed(0) {}
_ZN5Botan6detail11Bounded_XOFIRNS_3XOFELm481EE9next_byteIFbhEQsr3stdE9invocableITL0__hEEEDaOT_:
  180|   168k|      constexpr auto next_byte(PredicateFnT&& predicate = default_predicate<1, uint8_t>) {
  181|   168k|         return next<1>([](const auto bytes) { return bytes[0]; }, std::forward<PredicateFnT>(predicate));
  182|   168k|      }
_ZN5Botan6detail11Bounded_XOFIRNS_3XOFELm481EE4nextILm1EZNS4_9next_byteIFbhEQsr3stdE9invocableITL0__hEEEDaOT_EUlS9_E_S7_Qaasr3stdE9invocableITL0_0_NSt3__15arrayIhXTL0__EEEEsr3stdE9invocableITL0_1_NSD_20__invoke_result_implIvJSC_SF_EE4typeEEEEDaRKT0_RKT1_:
  195|   168k|                          const PredicateFnT& predicate = default_predicate<bytes, MappedValueT<bytes, MapFnT>>) {
  196|   168k|         while(true) {
  ------------------
  |  Branch (196:16): [True: 168k, Folded]
  ------------------
  197|   168k|            auto output = transformer(take<bytes>());
  198|   168k|            if(predicate(output)) {
  ------------------
  |  Branch (198:16): [True: 168k, False: 0]
  ------------------
  199|   168k|               return output;
  200|   168k|            }
  201|   168k|         }
  202|   168k|      }
_ZZN5Botan6detail11Bounded_XOFIRNS_3XOFELm481EE9next_byteIFbhEQsr3stdE9invocableITL0__hEEEDaOT_ENKUlS8_E_clINSt3__15arrayIhLm1EEEEEDaS8_:
  181|   168k|         return next<1>([](const auto bytes) { return bytes[0]; }, std::forward<PredicateFnT>(predicate));
_ZN5Botan6detail11Bounded_XOFIRNS_3XOFELm481EE4takeILm1EEENSt3__15arrayIhXT_EEEv:
  206|   168k|      constexpr std::array<uint8_t, bytes> take() {
  207|   168k|         m_bytes_consumed += bytes;
  208|   168k|         if(m_bytes_consumed > bound) {
  ------------------
  |  Branch (208:13): [True: 0, False: 168k]
  ------------------
  209|      0|            throw Internal_Error("XOF consumed more bytes than allowed");
  210|      0|         }
  211|   168k|         return m_xof.template output<bytes>();
  212|   168k|      }
_ZN5Botan6detail11Bounded_XOFIRNS_3XOFELm481EE17default_predicateILm1EhEEbT0_:
  164|   168k|      constexpr static bool default_predicate(T /*v*/) {
  165|   168k|         return true;
  166|   168k|      }
_ZN5Botan6detail11Bounded_XOFIRNS_3XOFELm840EEC2ES3_:
  173|    325|      explicit Bounded_XOF(XofT xof) : m_xof(xof), m_bytes_consumed(0) {}
kyber_algos.cpp:_ZN5Botan6detail11Bounded_XOFIRNS_3XOFELm840EE4nextILm3EZZNS_11Kyber_Algos12_GLOBAL__N_118sample_ntt_uniformERNS_8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS8_6DomainE1EEES3_EN3$_0clEvEUlT_E_FbNSt3__14pairINSH_8optionalItEESK_EEEQaasr3stdE9invocableITL0_0_NSH_5arrayIhXTL0__EEEEsr3stdE9invocableITL0_1_NSH_20__invoke_result_implIvJSN_SP_EE4typeEEEEDaRKT0_RKT1_:
  195|  51.7k|                          const PredicateFnT& predicate = default_predicate<bytes, MappedValueT<bytes, MapFnT>>) {
  196|  51.7k|         while(true) {
  ------------------
  |  Branch (196:16): [True: 51.7k, Folded]
  ------------------
  197|  51.7k|            auto output = transformer(take<bytes>());
  198|  51.7k|            if(predicate(output)) {
  ------------------
  |  Branch (198:16): [True: 51.7k, False: 0]
  ------------------
  199|  51.7k|               return output;
  200|  51.7k|            }
  201|  51.7k|         }
  202|  51.7k|      }
_ZN5Botan6detail11Bounded_XOFIRNS_3XOFELm840EE4takeILm3EEENSt3__15arrayIhXT_EEEv:
  206|  51.7k|      constexpr std::array<uint8_t, bytes> take() {
  207|  51.7k|         m_bytes_consumed += bytes;
  208|  51.7k|         if(m_bytes_consumed > bound) {
  ------------------
  |  Branch (208:13): [True: 0, False: 51.7k]
  ------------------
  209|      0|            throw Internal_Error("XOF consumed more bytes than allowed");
  210|      0|         }
  211|  51.7k|         return m_xof.template output<bytes>();
  212|  51.7k|      }
_ZN5Botan6detail11Bounded_XOFIRNS_3XOFELm840EE17default_predicateILm3ENSt3__14pairINS6_8optionalItEES9_EEEEbT0_:
  164|  51.7k|      constexpr static bool default_predicate(T /*v*/) {
  165|  51.7k|         return true;
  166|  51.7k|      }

_ZN5Botan3rhoILm14ELm18ELm41ETkNSt3__117unsigned_integralEmEET2_S2_:
   53|    160|BOTAN_FORCE_INLINE constexpr T rho(T x) {
   54|    160|   return rotr<R1>(x) ^ rotr<R2>(x) ^ rotr<R3>(x);
   55|    160|}
_ZN5Botan4rotrILm14ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|    160|{
   38|    160|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|    160|}
_ZN5Botan4rotrILm18ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|    160|{
   38|    160|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|    160|}
_ZN5Botan4rotrILm41ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|    160|{
   38|    160|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|    160|}
_ZN5Botan3rhoILm28ELm34ELm39ETkNSt3__117unsigned_integralEmEET2_S2_:
   53|    160|BOTAN_FORCE_INLINE constexpr T rho(T x) {
   54|    160|   return rotr<R1>(x) ^ rotr<R2>(x) ^ rotr<R3>(x);
   55|    160|}
_ZN5Botan4rotrILm28ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|    160|{
   38|    160|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|    160|}
_ZN5Botan4rotrILm34ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|    160|{
   38|    160|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|    160|}
_ZN5Botan4rotrILm39ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|    160|{
   38|    160|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|    160|}
_ZN5Botan4rotlILm21ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm1ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|  2.74M|{
   26|  2.74M|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|  2.74M|}
_ZN5Botan4rotlILm44ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm43ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm14ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm28ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm20ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm3ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm45ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm61ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm6ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm25ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm8ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm18ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm27ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm36ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm10ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm15ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm56ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm62ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm55ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm39ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm41ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}
_ZN5Botan4rotlILm2ETkNSt3__117unsigned_integralEmEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   25|   457k|{
   26|   457k|   return static_cast<T>((input << ROT) | (input >> (8 * sizeof(T) - ROT)));
   27|   457k|}

_ZN5Botan8round_upEmm:
   26|  45.3k|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|  45.3k|   BOTAN_ARG_CHECK(align_to != 0, "align_to must not be 0");
  ------------------
  |  |   35|  45.3k|   do {                                                          \
  |  |   36|  45.3k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  45.3k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 45.3k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  45.3k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 45.3k]
  |  |  ------------------
  ------------------
   29|       |
   30|  45.3k|   if(n % align_to > 0) {
  ------------------
  |  Branch (30:7): [True: 42.2k, False: 3.10k]
  ------------------
   31|  42.2k|      const size_t adj = align_to - (n % align_to);
   32|  42.2k|      BOTAN_ARG_CHECK(n + adj >= n, "Integer overflow during rounding");
  ------------------
  |  |   35|  42.2k|   do {                                                          \
  |  |   36|  42.2k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  42.2k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 42.2k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  42.2k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 42.2k]
  |  |  ------------------
  ------------------
   33|  42.2k|      n += adj;
   34|  42.2k|   }
   35|  45.3k|   return n;
   36|  45.3k|}

_ZNK5Botan9SCAN_Name9arg_countEv:
   49|  4.11k|      size_t arg_count() const { return m_args.size(); }
_ZNK5Botan9SCAN_Name9algo_nameEv:
   44|  5.57k|      const std::string& algo_name() const { return m_alg_name; }

_ZN5Botan14scoped_cleanupIZNS_2CT13scoped_poisonIJNSt3__16vectorIhNS_16secure_allocatorIhEEEEEQaaaagtsZT_Li0Efraa10poisonableIT_Efraa12unpoisonableIS8_EEEDaDpRKS8_EUlvE_EC2ESC_:
   26|      1|      explicit scoped_cleanup(FunT cleanup) : m_cleanup(std::move(cleanup)) {}
_ZN5Botan14scoped_cleanupIZNS_2CT13scoped_poisonIJNSt3__16vectorIhNS_16secure_allocatorIhEEEEEQaaaagtsZT_Li0Efraa10poisonableIT_Efraa12unpoisonableIS8_EEEDaDpRKS8_EUlvE_EC2EOSD_:
   32|      1|      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|      1|      void disengage() noexcept { m_cleanup.reset(); }
_ZN5Botan14scoped_cleanupIZNS_2CT13scoped_poisonIJNSt3__16vectorIhNS_16secure_allocatorIhEEEEEQaaaagtsZT_Li0Efraa10poisonableIT_Efraa12unpoisonableIS8_EEEDaDpRKS8_EUlvE_ED2Ev:
   34|      2|      ~scoped_cleanup() {
   35|      2|         if(m_cleanup.has_value()) {
  ------------------
  |  Branch (35:13): [True: 1, False: 1]
  ------------------
   36|      1|            (*m_cleanup)();  // NOLINT(bugprone-exception-escape) clang-tidy bug
   37|      1|         }
   38|      2|      }

_ZNK5Botan7SHA_51213output_lengthEv:
   74|      2|      size_t output_length() const override { return output_bytes; }

_ZN5Botan9SHA2_64_FEmmmRmmmmS0_m:
   42|    160|   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) {
   43|    160|   H += rho<14, 18, 41>(E) + choose(E, F, G) + M;
   44|    160|   D += H;
   45|    160|   H += rho<28, 34, 39>(A) + majority(A, B, C);
   46|    160|}

_ZNK5Botan5SHA_313output_lengthEv:
   31|     56|      size_t output_length() const override { return m_output_length; }

_ZN5Botan13SHAKE_128_XOFC2Ev:
   52|  2.93k|      SHAKE_128_XOF() : SHAKE_XOF(256) {}
_ZN5Botan13SHAKE_256_XOFC2Ev:
   66|  1.12k|      SHAKE_256_XOF() : SHAKE_XOF(512) {}

_ZN5Botan9SIMD_2x64C2Ev:
   50|     16|            m_simd(_mm_setzero_si128())
   51|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
   52|       |            m_simd(wasm_u64x2_const_splat(0))
   53|       |#endif
   54|     16|      {
   55|     16|      }
_ZN5Botan9SIMD_2x647load_beEPKv:
   90|     16|      static SIMD_2x64 BOTAN_FN_ISA_SIMD_2X64 load_be(const void* in) { return SIMD_2x64::load_le(in).bswap(); }
_ZNK5Botan9SIMD_2x645bswapEv:
  100|     16|      SIMD_2x64 BOTAN_FN_ISA_SIMD_2X64 bswap() const {
  101|     16|#if defined(BOTAN_SIMD_USE_SSSE3)
  102|     16|         const auto idx = _mm_set_epi8(8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7);
  103|     16|         return SIMD_2x64(_mm_shuffle_epi8(m_simd, idx));
  104|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  105|       |         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));
  106|       |#endif
  107|     16|      }
_ZN5Botan9SIMD_2x64C2EDv2_x:
  316|    624|      explicit BOTAN_FN_ISA_SIMD_2X64 SIMD_2x64(native_simd_type x) : m_simd(x) {}
_ZNK5Botan9SIMD_2x64plERKS0_:
  144|    272|      SIMD_2x64 BOTAN_FN_ISA_SIMD_2X64 operator+(const SIMD_2x64& other) const {
  145|    272|         SIMD_2x64 retval(*this);
  146|    272|         retval += other;
  147|    272|         return retval;
  148|    272|      }
_ZN5Botan9SIMD_2x64pLERKS0_:
  156|    272|      void BOTAN_FN_ISA_SIMD_2X64 operator+=(const SIMD_2x64& other) {
  157|    272|#if defined(BOTAN_SIMD_USE_SSSE3)
  158|    272|         m_simd = _mm_add_epi64(m_simd, other.m_simd);
  159|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  160|       |         m_simd = wasm_i64x2_add(m_simd, other.m_simd);
  161|       |#endif
  162|    272|      }
_ZN5Botan9SIMD_2x647load_leEPKv:
   82|     96|      static SIMD_2x64 BOTAN_FN_ISA_SIMD_2X64 load_le(const void* in) {
   83|     96|#if defined(BOTAN_SIMD_USE_SSSE3)
   84|     96|         return SIMD_2x64(_mm_loadu_si128(reinterpret_cast<const __m128i*>(in)));
   85|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
   86|       |         return SIMD_2x64(wasm_v128_load(in));
   87|       |#endif
   88|     96|      }
_ZNK5Botan9SIMD_2x648store_leEPm:
  126|     80|      void BOTAN_FN_ISA_SIMD_2X64 store_le(uint64_t out[2]) const { this->store_le(reinterpret_cast<uint8_t*>(out)); }
_ZNK5Botan9SIMD_2x648store_leEPh:
  128|     80|      void BOTAN_FN_ISA_SIMD_2X64 store_le(uint8_t out[]) const {
  129|     80|#if defined(BOTAN_SIMD_USE_SSSE3)
  130|     80|         _mm_storeu_si128(reinterpret_cast<__m128i*>(out), m_simd);
  131|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  132|       |         wasm_v128_store(out, m_simd);
  133|       |#endif
  134|     80|      }
_ZN5Botan9SIMD_2x647alignr8ERKS0_S2_:
  240|    128|      static SIMD_2x64 BOTAN_FN_ISA_SIMD_2X64 alignr8(const SIMD_2x64& a, const SIMD_2x64& b) {
  241|    128|#if defined(BOTAN_SIMD_USE_SSSE3)
  242|    128|         return SIMD_2x64(_mm_alignr_epi8(a.m_simd, b.m_simd, 8));
  243|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  244|       |         return SIMD_2x64(
  245|       |            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));
  246|       |#endif
  247|    128|      }
_ZNK5Botan9SIMD_2x644rotrILm1EEES0_vQaagtT_Li0EltT_Li64E:
  184|     64|      {
  185|     64|#if defined(BOTAN_SIMD_USE_SSSE3)
  186|       |         if constexpr(ROT == 8) {
  187|       |            auto tab = _mm_setr_epi8(1, 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 14, 15, 8);
  188|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  189|       |         } else if constexpr(ROT == 16) {
  190|       |            auto tab = _mm_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9);
  191|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  192|       |         } else if constexpr(ROT == 24) {
  193|       |            auto tab = _mm_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10);
  194|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  195|       |         } else if constexpr(ROT == 32) {
  196|       |            auto tab = _mm_setr_epi8(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11);
  197|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  198|     64|         } else {
  199|     64|            return SIMD_2x64(_mm_or_si128(_mm_srli_epi64(m_simd, static_cast<int>(ROT)),
  200|     64|                                          _mm_slli_epi64(m_simd, static_cast<int>(64 - ROT))));
  201|     64|         }
  202|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  203|       |         if constexpr(ROT == 8) {
  204|       |            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));
  205|       |         } else if constexpr(ROT == 16) {
  206|       |            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));
  207|       |         } else if constexpr(ROT == 24) {
  208|       |            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));
  209|       |         } else if constexpr(ROT == 32) {
  210|       |            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));
  211|       |         } else {
  212|       |            return SIMD_2x64(wasm_v128_or(wasm_u64x2_shr(m_simd, ROT), wasm_i64x2_shl(m_simd, 64 - ROT)));
  213|       |         }
  214|       |#endif
  215|     64|      }
_ZNK5Botan9SIMD_2x64eoERKS0_:
  150|    256|      SIMD_2x64 BOTAN_FN_ISA_SIMD_2X64 operator^(const SIMD_2x64& other) const {
  151|    256|         SIMD_2x64 retval(*this);
  152|    256|         retval ^= other;
  153|    256|         return retval;
  154|    256|      }
_ZN5Botan9SIMD_2x64eOERKS0_:
  164|    256|      void BOTAN_FN_ISA_SIMD_2X64 operator^=(const SIMD_2x64& other) {
  165|    256|#if defined(BOTAN_SIMD_USE_SSSE3)
  166|    256|         m_simd = _mm_xor_si128(m_simd, other.m_simd);
  167|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  168|       |         m_simd = wasm_v128_xor(m_simd, other.m_simd);
  169|       |#endif
  170|    256|      }
_ZNK5Botan9SIMD_2x644rotrILm8EEES0_vQaagtT_Li0EltT_Li64E:
  184|     64|      {
  185|     64|#if defined(BOTAN_SIMD_USE_SSSE3)
  186|     64|         if constexpr(ROT == 8) {
  187|     64|            auto tab = _mm_setr_epi8(1, 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 14, 15, 8);
  188|     64|            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  189|       |         } else if constexpr(ROT == 16) {
  190|       |            auto tab = _mm_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9);
  191|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  192|       |         } else if constexpr(ROT == 24) {
  193|       |            auto tab = _mm_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10);
  194|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  195|       |         } else if constexpr(ROT == 32) {
  196|       |            auto tab = _mm_setr_epi8(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11);
  197|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  198|       |         } else {
  199|       |            return SIMD_2x64(_mm_or_si128(_mm_srli_epi64(m_simd, static_cast<int>(ROT)),
  200|       |                                          _mm_slli_epi64(m_simd, static_cast<int>(64 - ROT))));
  201|       |         }
  202|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  203|       |         if constexpr(ROT == 8) {
  204|       |            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));
  205|       |         } else if constexpr(ROT == 16) {
  206|       |            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));
  207|       |         } else if constexpr(ROT == 24) {
  208|       |            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));
  209|       |         } else if constexpr(ROT == 32) {
  210|       |            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));
  211|       |         } else {
  212|       |            return SIMD_2x64(wasm_v128_or(wasm_u64x2_shr(m_simd, ROT), wasm_i64x2_shl(m_simd, 64 - ROT)));
  213|       |         }
  214|       |#endif
  215|     64|      }
_ZNK5Botan9SIMD_2x643shrILi7EEES0_v:
  223|     64|      SIMD_2x64 BOTAN_FN_ISA_SIMD_2X64 shr() const noexcept {
  224|     64|#if defined(BOTAN_SIMD_USE_SSSE3)
  225|     64|         return SIMD_2x64(_mm_srli_epi64(m_simd, SHIFT));
  226|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  227|       |         return SIMD_2x64(wasm_u64x2_shr(m_simd, SHIFT));
  228|       |#endif
  229|     64|      }
_ZNK5Botan9SIMD_2x644rotrILm19EEES0_vQaagtT_Li0EltT_Li64E:
  184|     64|      {
  185|     64|#if defined(BOTAN_SIMD_USE_SSSE3)
  186|       |         if constexpr(ROT == 8) {
  187|       |            auto tab = _mm_setr_epi8(1, 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 14, 15, 8);
  188|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  189|       |         } else if constexpr(ROT == 16) {
  190|       |            auto tab = _mm_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9);
  191|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  192|       |         } else if constexpr(ROT == 24) {
  193|       |            auto tab = _mm_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10);
  194|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  195|       |         } else if constexpr(ROT == 32) {
  196|       |            auto tab = _mm_setr_epi8(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11);
  197|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  198|     64|         } else {
  199|     64|            return SIMD_2x64(_mm_or_si128(_mm_srli_epi64(m_simd, static_cast<int>(ROT)),
  200|     64|                                          _mm_slli_epi64(m_simd, static_cast<int>(64 - ROT))));
  201|     64|         }
  202|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  203|       |         if constexpr(ROT == 8) {
  204|       |            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));
  205|       |         } else if constexpr(ROT == 16) {
  206|       |            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));
  207|       |         } else if constexpr(ROT == 24) {
  208|       |            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));
  209|       |         } else if constexpr(ROT == 32) {
  210|       |            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));
  211|       |         } else {
  212|       |            return SIMD_2x64(wasm_v128_or(wasm_u64x2_shr(m_simd, ROT), wasm_i64x2_shl(m_simd, 64 - ROT)));
  213|       |         }
  214|       |#endif
  215|     64|      }
_ZNK5Botan9SIMD_2x644rotrILm61EEES0_vQaagtT_Li0EltT_Li64E:
  184|     64|      {
  185|     64|#if defined(BOTAN_SIMD_USE_SSSE3)
  186|       |         if constexpr(ROT == 8) {
  187|       |            auto tab = _mm_setr_epi8(1, 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 14, 15, 8);
  188|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  189|       |         } else if constexpr(ROT == 16) {
  190|       |            auto tab = _mm_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9);
  191|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  192|       |         } else if constexpr(ROT == 24) {
  193|       |            auto tab = _mm_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10);
  194|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  195|       |         } else if constexpr(ROT == 32) {
  196|       |            auto tab = _mm_setr_epi8(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11);
  197|       |            return SIMD_2x64(_mm_shuffle_epi8(m_simd, tab));
  198|     64|         } else {
  199|     64|            return SIMD_2x64(_mm_or_si128(_mm_srli_epi64(m_simd, static_cast<int>(ROT)),
  200|     64|                                          _mm_slli_epi64(m_simd, static_cast<int>(64 - ROT))));
  201|     64|         }
  202|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  203|       |         if constexpr(ROT == 8) {
  204|       |            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));
  205|       |         } else if constexpr(ROT == 16) {
  206|       |            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));
  207|       |         } else if constexpr(ROT == 24) {
  208|       |            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));
  209|       |         } else if constexpr(ROT == 32) {
  210|       |            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));
  211|       |         } else {
  212|       |            return SIMD_2x64(wasm_v128_or(wasm_u64x2_shr(m_simd, ROT), wasm_i64x2_shl(m_simd, 64 - ROT)));
  213|       |         }
  214|       |#endif
  215|     64|      }
_ZNK5Botan9SIMD_2x643shrILi6EEES0_v:
  223|     64|      SIMD_2x64 BOTAN_FN_ISA_SIMD_2X64 shr() const noexcept {
  224|     64|#if defined(BOTAN_SIMD_USE_SSSE3)
  225|     64|         return SIMD_2x64(_mm_srli_epi64(m_simd, SHIFT));
  226|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  227|       |         return SIMD_2x64(wasm_u64x2_shr(m_simd, SHIFT));
  228|       |#endif
  229|     64|      }

_ZN5Botan6SpongeILm25EmE11state_bytesEv:
   43|  4.11k|      constexpr static size_t state_bytes() { return sizeof(state_t); }
_ZN5Botan6SpongeILm25EmE10state_bitsEv:
   45|  4.11k|      constexpr static size_t state_bits() { return state_bytes() * 8; }
_ZNK5Botan6SpongeILm25EmE9byte_rateEv:
   49|   978k|      constexpr size_t byte_rate() const { return m_bit_rate / 8; }
_ZN5Botan6SpongeILm25EmEC2ENS1_6ConfigE:
   39|  4.11k|      constexpr explicit Sponge(Config config) : m_S(config.initial_state), m_S_cursor(0), m_bit_rate(config.bit_rate) {
   40|  4.11k|         BOTAN_ARG_CHECK(m_bit_rate % word_bits == 0 && m_bit_rate < words * word_bits, "Invalid sponge bit rate");
  ------------------
  |  |   35|  4.11k|   do {                                                          \
  |  |   36|  4.11k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  8.23k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 4.11k, False: 0]
  |  |  |  Branch (37:12): [True: 4.11k, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  4.11k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 4.11k]
  |  |  ------------------
  ------------------
   41|  4.11k|      }
_ZN5Botan6SpongeILm25EmE5stateEv:
   55|  1.43M|      constexpr auto& state() { return m_S; }
_ZN5Botan6SpongeILm25EmE12reset_cursorEv:
   62|  5.13k|      void reset_cursor() { m_S_cursor = 0; }
_ZN5Botan6SpongeILm25EmE7_cursorEv:
   59|   974k|      size_t& _cursor() { return m_S_cursor; }
_ZNK5Botan6SpongeILm25EmE6cursorEv:
   57|  9.14k|      size_t cursor() const { return m_S_cursor; }

_ZN5Botan18absorb_into_spongeITkNS_6detail28SpongeLikeWithTrivialPermuteENS_18Keccak_PermutationEEEvRT_NSt3__14spanIKhLm18446744073709551615EEE:
  233|  9.03k|inline void absorb_into_sponge(detail::SpongeLikeWithTrivialPermute auto& sponge, std::span<const uint8_t> input) {
  234|  9.03k|   absorb_into_sponge(sponge, input, [&sponge] { sponge.permute(); });
  235|  9.03k|}
_ZN5Botan18absorb_into_spongeITkNS_6detail10SpongeLikeENS_18Keccak_PermutationETkNS1_13PermutationFnEZNS_18absorb_into_spongeITkNS1_28SpongeLikeWithTrivialPermuteES2_EEvRT_NSt3__14spanIKhLm18446744073709551615EEEEUlvE_EEvS5_S9_RKT0_:
  223|  9.03k|                               const detail::PermutationFn auto& permutation_fn) {
  224|  9.03k|   using word_t = typename SpongeT::word_t;
  225|       |
  226|  9.03k|   BufferSlicer input_slicer(input);
  227|  9.03k|   process_bytes_in_sponge(sponge, input.size(), permutation_fn, [&](word_t state_word, auto bounds) {
  228|  9.03k|      return state_word ^ bounds.read_from(input_slicer);
  229|  9.03k|   });
  230|  9.03k|   BOTAN_ASSERT_NOMSG(input_slicer.empty());
  ------------------
  |  |   77|  9.03k|   do {                                                                     \
  |  |   78|  9.03k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  9.03k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 9.03k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  9.03k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 9.03k]
  |  |  ------------------
  ------------------
  231|  9.03k|}
_ZN5Botan23process_bytes_in_spongeITkNS_6detail10SpongeLikeENS_18Keccak_PermutationETkNS1_13PermutationFnEZNS_18absorb_into_spongeITkNS1_28SpongeLikeWithTrivialPermuteES2_EEvRT_NSt3__14spanIKhLm18446744073709551615EEEEUlvE_TkNS1_10ModifierFnIS4_EEZNS_18absorb_into_spongeITkNS1_10SpongeLikeES2_TkNS1_13PermutationFnESA_EEvS5_S9_RKT0_EUlmS4_E_EEvS5_mSF_RKT1_:
  139|  9.03k|                                                const detail::ModifierFn<SpongeT> auto& modifier_fn) {
  140|  9.03k|   if(bytes_to_process == 0) {
  ------------------
  |  Branch (140:7): [True: 0, False: 9.03k]
  ------------------
  141|      0|      return;
  142|      0|   }
  143|       |
  144|  9.03k|   constexpr auto word_bytes = SpongeT::word_bytes;
  145|  9.03k|   const auto byte_rate = sponge.byte_rate();
  146|  9.03k|   auto& S = sponge.state();
  147|  9.03k|   auto& cursor = sponge._cursor();
  148|       |
  149|       |   // If necessary, try to get aligned with the sponge state's words array
  150|  9.03k|   const auto bytes_out_of_word_alignment = static_cast<size_t>(cursor % word_bytes);
  151|  9.03k|   if(bytes_out_of_word_alignment > 0) {
  ------------------
  |  Branch (151:7): [True: 0, False: 9.03k]
  ------------------
  152|      0|      const auto bytes_until_word_alignment = word_bytes - bytes_out_of_word_alignment;
  153|      0|      const auto bytes_from_input = std::min(bytes_to_process, bytes_until_word_alignment);
  154|      0|      BOTAN_DEBUG_ASSERT(bytes_from_input < word_bytes);
  ------------------
  |  |  130|      0|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|      0|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 0]
  |  |  ------------------
  ------------------
  155|       |
  156|      0|      S[cursor / word_bytes] = modifier_fn(S[cursor / word_bytes],
  157|      0|                                           detail::PartialWordBounds<SpongeT>{
  158|      0|                                              .offset = bytes_out_of_word_alignment,
  159|      0|                                              .length = bytes_from_input,
  160|      0|                                           });
  161|      0|      cursor += bytes_from_input;
  162|      0|      bytes_to_process -= bytes_from_input;
  163|       |
  164|      0|      if(cursor == byte_rate) {
  ------------------
  |  Branch (164:10): [True: 0, False: 0]
  ------------------
  165|      0|         permutation_fn();
  166|      0|         cursor = 0;
  167|      0|      }
  168|      0|   }
  169|       |
  170|       |   // If we didn't exhaust the bytes to process for this invocation, we should
  171|       |   // be word-aligned with the sponge state now
  172|  9.03k|   BOTAN_DEBUG_ASSERT(bytes_to_process == 0 || cursor % word_bytes == 0);
  ------------------
  |  |  130|  9.03k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  9.03k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 9.03k]
  |  |  ------------------
  ------------------
  173|       |
  174|       |   // Block-wise incorporation of the input data into the sponge state until
  175|       |   // all input bytes are processed
  176|  15.0k|   while(bytes_to_process >= word_bytes) {
  ------------------
  |  Branch (176:10): [True: 6.00k, False: 9.03k]
  ------------------
  177|       |      // Process full words until we either run out of data or reach the
  178|       |      // end of the current sponge state block
  179|  52.6k|      while(bytes_to_process >= word_bytes && cursor < byte_rate) {
  ------------------
  |  Branch (179:13): [True: 48.1k, False: 4.57k]
  |  Branch (179:47): [True: 46.6k, False: 1.43k]
  ------------------
  180|  46.6k|         S[cursor / word_bytes] = modifier_fn(S[cursor / word_bytes], detail::FullWordBounds<SpongeT>{});
  181|  46.6k|         cursor += word_bytes;
  182|  46.6k|         bytes_to_process -= word_bytes;
  183|  46.6k|      }
  184|       |
  185|  6.00k|      if(cursor == byte_rate) {
  ------------------
  |  Branch (185:10): [True: 1.43k, False: 4.57k]
  ------------------
  186|  1.43k|         permutation_fn();
  187|  1.43k|         cursor = 0;
  188|  1.43k|      }
  189|  6.00k|   }
  190|       |
  191|       |   // Process the remaining bytes that don't fill an entire word.
  192|       |   // Therefore, leaving the sponge state in an unaligned state that won't
  193|       |   // need another permutation until the next call to process().
  194|  9.03k|   BOTAN_DEBUG_ASSERT(bytes_to_process < word_bytes && cursor < byte_rate);
  ------------------
  |  |  130|  9.03k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  9.03k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 9.03k]
  |  |  ------------------
  ------------------
  195|  9.03k|   if(bytes_to_process > 0) {
  ------------------
  |  Branch (195:7): [True: 4.46k, False: 4.57k]
  ------------------
  196|  4.46k|      S[cursor / word_bytes] = modifier_fn(S[cursor / word_bytes],
  197|  4.46k|                                           detail::PartialWordBounds<SpongeT>{
  198|  4.46k|                                              .offset = 0,
  199|  4.46k|                                              .length = bytes_to_process,
  200|  4.46k|                                           });
  201|  4.46k|      cursor += bytes_to_process;
  202|  4.46k|   }
  203|  9.03k|}
_ZZN5Botan18absorb_into_spongeITkNS_6detail10SpongeLikeENS_18Keccak_PermutationETkNS1_13PermutationFnEZNS_18absorb_into_spongeITkNS1_28SpongeLikeWithTrivialPermuteES2_EEvRT_NSt3__14spanIKhLm18446744073709551615EEEEUlvE_EEvS5_S9_RKT0_ENKUlmS4_E_clINS1_17PartialWordBoundsIS2_EEEEDamS4_:
  227|  4.46k|   process_bytes_in_sponge(sponge, input.size(), permutation_fn, [&](word_t state_word, auto bounds) {
  228|  4.46k|      return state_word ^ bounds.read_from(input_slicer);
  229|  4.46k|   });
_ZNK5Botan6detail17PartialWordBoundsINS_18Keccak_PermutationEE9read_fromERNS_12BufferSlicerE:
   59|  4.46k|      word_t read_from(BufferSlicer& slicer) const {
   60|  4.46k|         std::array<uint8_t, word_bytes> partial_word_bytes{};
   61|  4.46k|         slicer.copy_into(std::span{partial_word_bytes}.subspan(offset, length));
   62|  4.46k|         return load_le(partial_word_bytes);
   63|  4.46k|      }
_ZZN5Botan18absorb_into_spongeITkNS_6detail28SpongeLikeWithTrivialPermuteENS_18Keccak_PermutationEEEvRT_NSt3__14spanIKhLm18446744073709551615EEEENKUlvE_clEv:
  234|  1.43k|   absorb_into_sponge(sponge, input, [&sponge] { sponge.permute(); });
_ZZN5Botan18absorb_into_spongeITkNS_6detail10SpongeLikeENS_18Keccak_PermutationETkNS1_13PermutationFnEZNS_18absorb_into_spongeITkNS1_28SpongeLikeWithTrivialPermuteES2_EEvRT_NSt3__14spanIKhLm18446744073709551615EEEEUlvE_EEvS5_S9_RKT0_ENKUlmS4_E_clINS1_14FullWordBoundsIS2_EEEEDamS4_:
  227|  46.6k|   process_bytes_in_sponge(sponge, input.size(), permutation_fn, [&](word_t state_word, auto bounds) {
  228|  46.6k|      return state_word ^ bounds.read_from(input_slicer);
  229|  46.6k|   });
_ZNK5Botan6detail14FullWordBoundsINS_18Keccak_PermutationEE9read_fromERNS_12BufferSlicerE:
   97|  46.6k|      word_t read_from(BufferSlicer& slicer) const { return load_le(slicer.take<word_bytes>()); }
_ZN5Botan19squeeze_from_spongeITkNS_6detail28SpongeLikeWithTrivialPermuteENS_18Keccak_PermutationEEEvRT_NSt3__14spanIhLm18446744073709551615EEE:
  258|   965k|inline void squeeze_from_sponge(detail::SpongeLikeWithTrivialPermute auto& sponge, std::span<uint8_t> output) {
  259|   965k|   squeeze_from_sponge(sponge, output, [&sponge] { sponge.permute(); });
  260|   965k|}
_ZN5Botan19squeeze_from_spongeITkNS_6detail10SpongeLikeENS_18Keccak_PermutationETkNS1_13PermutationFnEZNS_19squeeze_from_spongeITkNS1_28SpongeLikeWithTrivialPermuteES2_EEvRT_NSt3__14spanIhLm18446744073709551615EEEEUlvE_EEvS5_S8_RKT0_:
  247|   965k|                                const detail::PermutationFn auto& permutation_fn) {
  248|   965k|   using word_t = typename SpongeT::word_t;
  249|       |
  250|   965k|   BufferStuffer output_stuffer(output);
  251|   965k|   process_bytes_in_sponge(sponge, output.size(), permutation_fn, [&](word_t state_word, auto bounds) {
  252|   965k|      bounds.write_into(output_stuffer, state_word);
  253|   965k|      return state_word;
  254|   965k|   });
  255|   965k|   BOTAN_ASSERT_NOMSG(output_stuffer.full());
  ------------------
  |  |   77|   965k|   do {                                                                     \
  |  |   78|   965k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|   965k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 965k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|   965k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 965k]
  |  |  ------------------
  ------------------
  256|   965k|}
_ZN5Botan23process_bytes_in_spongeITkNS_6detail10SpongeLikeENS_18Keccak_PermutationETkNS1_13PermutationFnEZNS_19squeeze_from_spongeITkNS1_28SpongeLikeWithTrivialPermuteES2_EEvRT_NSt3__14spanIhLm18446744073709551615EEEEUlvE_TkNS1_10ModifierFnIS4_EEZNS_19squeeze_from_spongeITkNS1_10SpongeLikeES2_TkNS1_13PermutationFnES9_EEvS5_S8_RKT0_EUlmS4_E_EEvS5_mSE_RKT1_:
  139|   965k|                                                const detail::ModifierFn<SpongeT> auto& modifier_fn) {
  140|   965k|   if(bytes_to_process == 0) {
  ------------------
  |  Branch (140:7): [True: 0, False: 965k]
  ------------------
  141|      0|      return;
  142|      0|   }
  143|       |
  144|   965k|   constexpr auto word_bytes = SpongeT::word_bytes;
  145|   965k|   const auto byte_rate = sponge.byte_rate();
  146|   965k|   auto& S = sponge.state();
  147|   965k|   auto& cursor = sponge._cursor();
  148|       |
  149|       |   // If necessary, try to get aligned with the sponge state's words array
  150|   965k|   const auto bytes_out_of_word_alignment = static_cast<size_t>(cursor % word_bytes);
  151|   965k|   if(bytes_out_of_word_alignment > 0) {
  ------------------
  |  Branch (151:7): [True: 843k, False: 122k]
  ------------------
  152|   843k|      const auto bytes_until_word_alignment = word_bytes - bytes_out_of_word_alignment;
  153|   843k|      const auto bytes_from_input = std::min(bytes_to_process, bytes_until_word_alignment);
  154|   843k|      BOTAN_DEBUG_ASSERT(bytes_from_input < word_bytes);
  ------------------
  |  |  130|   843k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|   843k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 843k]
  |  |  ------------------
  ------------------
  155|       |
  156|   843k|      S[cursor / word_bytes] = modifier_fn(S[cursor / word_bytes],
  157|   843k|                                           detail::PartialWordBounds<SpongeT>{
  158|   843k|                                              .offset = bytes_out_of_word_alignment,
  159|   843k|                                              .length = bytes_from_input,
  160|   843k|                                           });
  161|   843k|      cursor += bytes_from_input;
  162|   843k|      bytes_to_process -= bytes_from_input;
  163|       |
  164|   843k|      if(cursor == byte_rate) {
  ------------------
  |  Branch (164:10): [True: 13.0k, False: 830k]
  ------------------
  165|  13.0k|         permutation_fn();
  166|  13.0k|         cursor = 0;
  167|  13.0k|      }
  168|   843k|   }
  169|       |
  170|       |   // If we didn't exhaust the bytes to process for this invocation, we should
  171|       |   // be word-aligned with the sponge state now
  172|   965k|   BOTAN_DEBUG_ASSERT(bytes_to_process == 0 || cursor % word_bytes == 0);
  ------------------
  |  |  130|   965k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|   965k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 965k]
  |  |  ------------------
  ------------------
  173|       |
  174|       |   // Block-wise incorporation of the input data into the sponge state until
  175|       |   // all input bytes are processed
  176|   965k|   while(bytes_to_process >= word_bytes) {
  ------------------
  |  Branch (176:10): [True: 578, False: 965k]
  ------------------
  177|       |      // Process full words until we either run out of data or reach the
  178|       |      // end of the current sponge state block
  179|  5.94k|      while(bytes_to_process >= word_bytes && cursor < byte_rate) {
  ------------------
  |  Branch (179:13): [True: 5.38k, False: 558]
  |  Branch (179:47): [True: 5.36k, False: 20]
  ------------------
  180|  5.36k|         S[cursor / word_bytes] = modifier_fn(S[cursor / word_bytes], detail::FullWordBounds<SpongeT>{});
  181|  5.36k|         cursor += word_bytes;
  182|  5.36k|         bytes_to_process -= word_bytes;
  183|  5.36k|      }
  184|       |
  185|    578|      if(cursor == byte_rate) {
  ------------------
  |  Branch (185:10): [True: 20, False: 558]
  ------------------
  186|     20|         permutation_fn();
  187|     20|         cursor = 0;
  188|     20|      }
  189|    578|   }
  190|       |
  191|       |   // Process the remaining bytes that don't fill an entire word.
  192|       |   // Therefore, leaving the sponge state in an unaligned state that won't
  193|       |   // need another permutation until the next call to process().
  194|   965k|   BOTAN_DEBUG_ASSERT(bytes_to_process < word_bytes && cursor < byte_rate);
  ------------------
  |  |  130|   965k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|   965k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 965k]
  |  |  ------------------
  ------------------
  195|   965k|   if(bytes_to_process > 0) {
  ------------------
  |  Branch (195:7): [True: 320k, False: 644k]
  ------------------
  196|   320k|      S[cursor / word_bytes] = modifier_fn(S[cursor / word_bytes],
  197|   320k|                                           detail::PartialWordBounds<SpongeT>{
  198|   320k|                                              .offset = 0,
  199|   320k|                                              .length = bytes_to_process,
  200|   320k|                                           });
  201|   320k|      cursor += bytes_to_process;
  202|   320k|   }
  203|   965k|}
_ZZN5Botan19squeeze_from_spongeITkNS_6detail10SpongeLikeENS_18Keccak_PermutationETkNS1_13PermutationFnEZNS_19squeeze_from_spongeITkNS1_28SpongeLikeWithTrivialPermuteES2_EEvRT_NSt3__14spanIhLm18446744073709551615EEEEUlvE_EEvS5_S8_RKT0_ENKUlmS4_E_clINS1_17PartialWordBoundsIS2_EEEEDamS4_:
  251|  1.16M|   process_bytes_in_sponge(sponge, output.size(), permutation_fn, [&](word_t state_word, auto bounds) {
  252|  1.16M|      bounds.write_into(output_stuffer, state_word);
  253|  1.16M|      return state_word;
  254|  1.16M|   });
_ZNK5Botan6detail17PartialWordBoundsINS_18Keccak_PermutationEE10write_intoERNS_13BufferStufferEm:
   69|  1.16M|      void write_into(BufferStuffer& stuffer, word_t partial_word) const {
   70|  1.16M|         const auto partial_word_bytes = store_le(partial_word);
   71|  1.16M|         stuffer.append(std::span{partial_word_bytes}.subspan(offset, length));
   72|  1.16M|      }
_ZZN5Botan19squeeze_from_spongeITkNS_6detail28SpongeLikeWithTrivialPermuteENS_18Keccak_PermutationEEEvRT_NSt3__14spanIhLm18446744073709551615EEEENKUlvE_clEv:
  259|  13.0k|   squeeze_from_sponge(sponge, output, [&sponge] { sponge.permute(); });
_ZZN5Botan19squeeze_from_spongeITkNS_6detail10SpongeLikeENS_18Keccak_PermutationETkNS1_13PermutationFnEZNS_19squeeze_from_spongeITkNS1_28SpongeLikeWithTrivialPermuteES2_EEvRT_NSt3__14spanIhLm18446744073709551615EEEEUlvE_EEvS5_S8_RKT0_ENKUlmS4_E_clINS1_14FullWordBoundsIS2_EEEEDamS4_:
  251|  5.36k|   process_bytes_in_sponge(sponge, output.size(), permutation_fn, [&](word_t state_word, auto bounds) {
  252|  5.36k|      bounds.write_into(output_stuffer, state_word);
  253|  5.36k|      return state_word;
  254|  5.36k|   });
_ZNK5Botan6detail14FullWordBoundsINS_18Keccak_PermutationEE10write_intoERNS_13BufferStufferEm:
   99|  5.36k|      void write_into(BufferStuffer& stuffer, word_t full_word) const { stuffer.append(store_le(full_word)); }

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

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

_ZNK5Botan14ASN1_BitString5bytesEv:
  136|  1.86k|      std::span<const uint8_t> bytes() const { return std::span{m_bytes}; }
_ZNK5Botan14ASN1_BitString11unused_bitsEv:
  138|    935|      size_t unused_bits() const { return m_unused_bits; }
_ZNK5Botan10BER_Object6is_setEv:
  162|   180k|      bool is_set() const { return m_type_tag != ASN1_Type::NoObject; }
_ZNK5Botan10BER_Object7taggingEv:
  164|  74.0k|      uint32_t tagging() const { return type_tag() | class_tag(); }
_ZNK5Botan10BER_Object8type_tagEv:
  166|  77.9k|      ASN1_Type type_tag() const { return m_type_tag; }
_ZNK5Botan10BER_Object9class_tagEv:
  168|  89.6k|      ASN1_Class class_tag() const { return m_class_tag; }
_ZNK5Botan10BER_Object4bitsEv:
  174|   885k|      const uint8_t* bits() const { return m_value.data(); }
_ZNK5Botan10BER_Object6lengthEv:
  176|  1.85M|      size_t length() const { return m_value.size(); }
_ZNK5Botan10BER_Object4dataEv:
  178|  27.6k|      std::span<const uint8_t> data() const { return std::span{m_value}; }
_ZN5Botan10BER_Object12mutable_bitsEm:
  195|  62.8k|      uint8_t* mutable_bits(size_t length) {
  196|  62.8k|         m_value.resize(length);
  197|  62.8k|         return m_value.data();
  198|  62.8k|      }
_ZNK5Botan3OID5emptyEv:
  291|  8.66k|      bool empty() const { return m_id.empty(); }
_ZNK5Botan3OID9has_valueEv:
  297|  3.94k|      bool has_value() const { return !empty(); }
_ZNK5Botan3OIDeqERKS0_:
  333|  44.6k|      bool operator==(const OID& other) const { return m_id == other.m_id; }
_ZNK5Botan19AlgorithmIdentifier3oidEv:
  439|  12.3k|      const OID& oid() const { return m_oid; }
_ZNK5Botan19AlgorithmIdentifier10parametersEv:
  441|  4.06k|      const std::vector<uint8_t>& parameters() const { return m_parameters; }
_ZNK5Botan19AlgorithmIdentifier20parameters_are_emptyEv:
  451|  6.41k|      bool parameters_are_empty() const { return m_parameters.empty(); }
_ZNK5Botan19AlgorithmIdentifier28parameters_are_null_or_emptyEv:
  453|  6.28k|      bool parameters_are_null_or_empty() const { return parameters_are_empty() || parameters_are_null(); }
  ------------------
  |  Branch (453:58): [True: 2.03k, False: 4.24k]
  |  Branch (453:84): [True: 3, False: 4.24k]
  ------------------
_ZN5BotanorENS_10ASN1_ClassES0_:
   78|  24.3k|inline ASN1_Class operator|(ASN1_Class x, ASN1_Class y) {
   79|  24.3k|   return static_cast<ASN1_Class>(static_cast<uint32_t>(x) | static_cast<uint32_t>(y));
   80|  24.3k|}
_ZN5BotanorENS_9ASN1_TypeENS_10ASN1_ClassE:
   82|  74.0k|inline uint32_t operator|(ASN1_Type x, ASN1_Class y) {
   83|  74.0k|   return static_cast<uint32_t>(x) | static_cast<uint32_t>(y);
   84|  74.0k|}
_ZN5BotanorENS_10ASN1_ClassENS_9ASN1_TypeE:
   86|  11.1k|inline uint32_t operator|(ASN1_Class x, ASN1_Type y) {
   87|  11.1k|   return static_cast<uint32_t>(x) | static_cast<uint32_t>(y);
   88|  11.1k|}
_ZN5BotanneERKNS_3OIDES2_:
  374|  3.77k|inline bool operator!=(const OID& a, const OID& b) {
  375|  3.77k|   return !(a == b);
  376|  3.77k|}
_ZNKSt3__14hashIN5Botan3OIDEEclERKS2_:
  473|  1.73k|      size_t operator()(const Botan::OID& oid) const noexcept { return static_cast<size_t>(oid.hash_code()); }
_ZN5Botan3OIDC2Ev:
  246|  25.9k|      explicit OID() = default;
_ZN5Botan11ASN1_ObjectC2Ev:
  117|  82.9k|      ASN1_Object() = default;
_ZN5Botan11ASN1_ObjectD2Ev:
  122|  86.8k|      virtual ~ASN1_Object() = default;
_ZN5Botan11ASN1_ObjectC2ERKS0_:
  118|  2.95k|      ASN1_Object(const ASN1_Object&) = default;
_ZN5Botan11ASN1_ObjectaSERKS0_:
  119|  2.79k|      ASN1_Object& operator=(const ASN1_Object&) = default;
_ZN5Botan19AlgorithmIdentifierC2Ev:
  431|  14.5k|      AlgorithmIdentifier() = default;
_ZN5Botan11ASN1_ObjectC2EOS0_:
  120|    953|      ASN1_Object(ASN1_Object&&) = default;
_ZN5Botan10BER_ObjectC2Ev:
  154|   114k|      BER_Object() = default;
_ZN5Botan10BER_ObjectaSEOS0_:
  159|  27.2k|      BER_Object& operator=(BER_Object&& other) = default;
_ZN5Botan10BER_ObjectC2EOS0_:
  157|  26.0k|      BER_Object(BER_Object&& other) = default;
_ZN5Botan14ASN1_BitStringC2Ev:
  130|    942|      ASN1_BitString() = default;

_ZN5Botan13ignore_paramsIJPKmmEEEvDpRKT_:
  142|  48.8M|constexpr void ignore_params([[maybe_unused]] const T&... args) {}
_ZN5Botan13ignore_paramsIJmEEEvDpRKT_:
  142|  50.2k|constexpr void ignore_params([[maybe_unused]] const T&... args) {}
_ZN5Botan13ignore_paramsIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEEvDpRKT_:
  142|  1.06k|constexpr void ignore_params([[maybe_unused]] const T&... args) {}
_ZN5Botan13ignore_paramsIJPKhmEEEvDpRKT_:
  142|  3.04k|constexpr void ignore_params([[maybe_unused]] const T&... args) {}
_ZN5Botan13ignore_paramsIJPKbmEEEvDpRKT_:
  142|   337k|constexpr void ignore_params([[maybe_unused]] const T&... args) {}
_ZN5Botan13ignore_paramsIJPKimEEEvDpRKT_:
  142|  2.89k|constexpr void ignore_params([[maybe_unused]] const T&... args) {}
_ZN5Botan13ignore_paramsIJPKsmEEEvDpRKT_:
  142|    186|constexpr void ignore_params([[maybe_unused]] const T&... args) {}
_ZN5Botan13ignore_paramsIJNSt3__14spanIKhLm18446744073709551615EEES4_EEEvDpRKT_:
  142|  4.51k|constexpr void ignore_params([[maybe_unused]] const T&... args) {}

_ZN5Botan11BER_Decoder6Limits3DEREv:
   41|  14.1k|            static Limits DER() { return Limits(false, 0, false, DefaultMaxObjectSize, false); }
_ZN5Botan11BER_Decoder6LimitsC2EbmbNSt3__18optionalImEEb:
  120|  14.1k|                  m_allow_ber(allow_ber),
  121|  14.1k|                  m_max_nested_indef(max_nested_indef),
  122|  14.1k|                  m_allow_standalone_eoc(allow_standalone_eoc),
  123|  14.1k|                  m_max_object_size(max_object_size),
  124|  14.1k|                  m_reject_default_value_encoding(reject_default_value_encoding) {}
_ZN5Botan11BER_Decoder14start_sequenceEv:
  238|  20.2k|      BER_Decoder start_sequence() { return start_cons(ASN1_Type::Sequence, ASN1_Class::Universal); }
_ZN5Botan11BER_Decoder6decodeERNS_6BigIntE:
  308|  4.26k|      BER_Decoder& decode(BigInt& out) { return decode(out, ASN1_Type::Integer, ASN1_Class::Universal); }
_ZN5Botan11BER_Decoder6decodeINSt3__19allocatorIhEEEERS0_RNS2_6vectorIhT_EENS_9ASN1_TypeE:
  320|  1.22k|      BER_Decoder& decode(std::vector<uint8_t, Alloc>& out, ASN1_Type real_type) {
  321|  1.22k|         return decode(out, real_type, real_type, ASN1_Class::Universal);
  322|  1.22k|      }
_ZN5Botan11BER_Decoder16decode_and_checkImEERS0_RKT_NSt3__117basic_string_viewIcNS6_11char_traitsIcEEEE:
  481|  11.0k|      BER_Decoder& decode_and_check(const T& expected, std::string_view error_msg) {
  482|  11.0k|         T actual;
  483|  11.0k|         decode(actual);
  484|       |
  485|  11.0k|         if(actual != expected) {
  ------------------
  |  Branch (485:13): [True: 93, False: 10.9k]
  ------------------
  486|     93|            throw Decoding_Error(error_msg);
  487|     93|         }
  488|       |
  489|  10.9k|         return (*this);
  490|  11.0k|      }
_ZN5Botan11BER_Decoder6decodeERm:
  303|  11.0k|      BER_Decoder& decode(size_t& out) { return decode(out, ASN1_Type::Integer, ASN1_Class::Universal); }
_ZN5Botan11BER_Decoder16decode_and_checkINS_3OIDEEERS0_RKT_NSt3__117basic_string_viewIcNS7_11char_traitsIcEEEE:
  481|  1.24k|      BER_Decoder& decode_and_check(const T& expected, std::string_view error_msg) {
  482|  1.24k|         T actual;
  483|  1.24k|         decode(actual);
  484|       |
  485|  1.24k|         if(actual != expected) {
  ------------------
  |  Branch (485:13): [True: 10, False: 1.23k]
  ------------------
  486|     10|            throw Decoding_Error(error_msg);
  487|     10|         }
  488|       |
  489|  1.23k|         return (*this);
  490|  1.24k|      }
_ZN5Botan11BER_Decoder22decode_optional_stringINSt3__19allocatorIhEEEERS0_RNS2_6vectorIhT_EENS_9ASN1_TypeESA_NS_10ASN1_ClassE:
  523|  1.23k|                                          ASN1_Class class_tag = ASN1_Class::ContextSpecific) {
  524|  1.23k|         return decode_optional_string(out, real_type, static_cast<uint32_t>(expected_tag), class_tag);
  525|  1.23k|      }
_ZN5Botan11BER_Decoder22decode_optional_stringINSt3__19allocatorIhEEEERS0_RNS2_6vectorIhT_EENS_9ASN1_TypeEjNS_10ASN1_ClassE:
  499|  1.23k|                                          ASN1_Class class_tag = ASN1_Class::ContextSpecific) {
  500|  1.23k|         BER_Object obj = get_next_object();
  501|       |
  502|  1.23k|         const ASN1_Type type_tag = static_cast<ASN1_Type>(expected_tag);
  503|       |
  504|  1.23k|         if(obj.is_a(type_tag, class_tag)) {
  ------------------
  |  Branch (504:13): [True: 1.15k, False: 78]
  ------------------
  505|  1.15k|            if(class_tag == ASN1_Class::ExplicitContextSpecific) {
  ------------------
  |  Branch (505:16): [True: 0, False: 1.15k]
  ------------------
  506|      0|               BER_Decoder(obj, m_limits).decode(out, real_type).verify_end();
  507|  1.15k|            } else {
  508|  1.15k|               push_back(std::move(obj));
  509|  1.15k|               decode(out, real_type, type_tag, class_tag);
  510|  1.15k|            }
  511|  1.15k|         } else {
  512|     78|            out.clear();
  513|     78|            push_back(std::move(obj));
  514|     78|         }
  515|       |
  516|  1.23k|         return (*this);
  517|  1.23k|      }
_ZN5Botan11BER_DecoderC2ERKNS_10BER_ObjectENS0_6LimitsE:
  154|  1.83k|            BER_Decoder(obj.data(), limits) {}
_ZNK5Botan11BER_Decoder6Limits18allow_ber_encodingEv:
   52|   163k|            bool allow_ber_encoding() const { return m_allow_ber; }
_ZNK5Botan11BER_Decoder6Limits20require_der_encodingEv:
   54|   100k|            bool require_der_encoding() const { return !allow_ber_encoding(); }
_ZNK5Botan11BER_Decoder6Limits15max_object_sizeEv:
   70|  62.9k|            std::optional<size_t> max_object_size() const { return m_max_object_size; }
_ZNK5Botan11BER_Decoder6limitsEv:
  176|  20.0k|      Limits limits() const { return m_limits; }
_ZN5Botan11BER_Decoder6decodeINS_16secure_allocatorIhEEEERS0_RNSt3__16vectorIhT_EENS_9ASN1_TypeE:
  320|  11.4k|      BER_Decoder& decode(std::vector<uint8_t, Alloc>& out, ASN1_Type real_type) {
  321|  11.4k|         return decode(out, real_type, real_type, ASN1_Class::Universal);
  322|  11.4k|      }
_ZN5Botan11BER_Decoder9raw_bytesINSt3__19allocatorIhEEEERS0_RNS2_6vectorIhT_EE:
  281|  6.28k|      BER_Decoder& raw_bytes(std::vector<uint8_t, Alloc>& out) {
  282|  6.28k|         out.clear();
  283|   461k|         for(;;) {
  284|   461k|            if(auto next = this->read_next_byte()) {
  ------------------
  |  Branch (284:21): [True: 455k, False: 6.28k]
  ------------------
  285|   455k|               out.push_back(*next);
  286|   455k|            } else {
  287|  6.28k|               break;
  288|  6.28k|            }
  289|   461k|         }
  290|  6.28k|         return (*this);
  291|  6.28k|      }
_ZN5Botan11BER_Decoder15decode_optionalINS_3OIDEEERS0_RT_NS_9ASN1_TypeENS_10ASN1_ClassERKS4_:
  387|  2.80k|      BER_Decoder& decode_optional(T& out, ASN1_Type type_tag, ASN1_Class class_tag, const T& default_value = T()) {
  388|  2.80k|         std::optional<T> optval;
  389|  2.80k|         this->decode_optional(optval, type_tag, class_tag);
  390|  2.80k|         out = optval ? *optval : default_value;
  ------------------
  |  Branch (390:16): [True: 883, False: 1.91k]
  ------------------
  391|  2.80k|         return (*this);
  392|  2.80k|      }
_ZN5Botan11BER_Decoder15decode_optionalINS_3OIDEEERS0_RNSt3__18optionalIT_EENS_9ASN1_TypeENS_10ASN1_ClassE:
  578|  2.80k|BER_Decoder& BER_Decoder::decode_optional(std::optional<T>& optval, ASN1_Type type_tag, ASN1_Class class_tag) {
  579|  2.80k|   BER_Object obj = get_next_object();
  580|       |
  581|  2.80k|   if(obj.is_a(type_tag, class_tag)) {
  ------------------
  |  Branch (581:7): [True: 889, False: 1.91k]
  ------------------
  582|    889|      T out{};
  583|    889|      if(class_tag == ASN1_Class::ExplicitContextSpecific) {
  ------------------
  |  Branch (583:10): [True: 889, False: 0]
  ------------------
  584|    889|         BER_Decoder(obj, m_limits).decode(out).verify_end();
  585|    889|      } else {
  586|      0|         this->push_back(std::move(obj));
  587|      0|         this->decode(out, type_tag, class_tag);
  588|      0|      }
  589|    889|      optval = std::move(out);
  590|  1.91k|   } else {
  591|  1.91k|      this->push_back(std::move(obj));
  592|  1.91k|      optval = std::nullopt;
  593|  1.91k|   }
  594|       |
  595|  2.80k|   return (*this);
  596|  2.80k|}
_ZN5Botan11BER_Decoder39decode_optional_octet_aligned_bitstringINS_16secure_allocatorIhEEEERS0_RNSt3__16vectorIhT_EEjNS_10ASN1_ClassE:
  530|  2.79k|                                                           ASN1_Class class_tag = ASN1_Class::ContextSpecific) {
  531|  2.79k|         BER_Object obj = get_next_object();
  532|       |
  533|  2.79k|         const ASN1_Type type_tag = static_cast<ASN1_Type>(expected_tag);
  534|       |
  535|  2.79k|         if(obj.is_a(type_tag, class_tag)) {
  ------------------
  |  Branch (535:13): [True: 942, False: 1.84k]
  ------------------
  536|    942|            if(class_tag == ASN1_Class::ExplicitContextSpecific) {
  ------------------
  |  Branch (536:16): [True: 942, False: 0]
  ------------------
  537|    942|               BER_Decoder(obj, m_limits).decode_octet_aligned_bitstring(out).verify_end();
  538|    942|            } else {
  539|      0|               push_back(std::move(obj));
  540|      0|               decode_octet_aligned_bitstring(out, type_tag, class_tag);
  541|      0|            }
  542|  1.84k|         } else {
  543|  1.84k|            out.clear();
  544|  1.84k|            push_back(std::move(obj));
  545|  1.84k|         }
  546|       |
  547|  2.79k|         return (*this);
  548|  2.79k|      }
_ZN5Botan11BER_Decoder30decode_octet_aligned_bitstringINS_16secure_allocatorIhEEEERS0_RNSt3__16vectorIhT_EENS_9ASN1_TypeENS_10ASN1_ClassE:
  347|    942|                                                  ASN1_Class class_tag = ASN1_Class::Universal) {
  348|    942|         ASN1_BitString bits;
  349|    942|         decode_bitstring(bits, type_tag, class_tag);
  350|       |
  351|    942|         if(bits.unused_bits() != 0) {
  ------------------
  |  Branch (351:13): [True: 2, False: 940]
  ------------------
  352|      2|            throw Decoding_Error("Expected octet-aligned BIT STRING");
  353|      2|         }
  354|       |
  355|    940|         out.assign(bits.bytes().begin(), bits.bytes().end());
  356|    940|         return (*this);
  357|    942|      }

_ZN5Botan6BigInt4zeroEv:
   50|  14.5k|      static BigInt zero() { return BigInt(); }
_ZN5Botan6BigInt3oneEv:
   55|  1.68k|      static BigInt one() { return BigInt::from_u64(1); }
_ZN5Botan6BigIntC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   98|  17.1k|      explicit BigInt(std::string_view str) { *this = BigInt::from_string(str); }
_ZN5Botan6BigIntC2ENSt3__14spanIKhLm18446744073709551615EEE:
  139|    678|      explicit BigInt(std::span<const uint8_t> bytes) { assign_from_bytes(bytes); }
_ZN5Botan6BigIntC2EOS0_:
  183|  30.2k|      BigInt(BigInt&& other) noexcept { this->swap(other); }
_ZN5Botan6BigIntD2Ev:
  185|  8.92M|      ~BigInt() { _const_time_unpoison(); }
_ZN5Botan6BigIntaSEOS0_:
  190|  3.24M|      BigInt& operator=(BigInt&& other) noexcept {
  191|  3.24M|         if(this != &other) {
  ------------------
  |  Branch (191:13): [True: 3.24M, False: 0]
  ------------------
  192|  3.24M|            this->swap(other);
  193|  3.24M|         }
  194|       |
  195|  3.24M|         return (*this);
  196|  3.24M|      }
_ZN5Botan6BigInt4swapERS0_:
  207|  5.63M|      void swap(BigInt& other) noexcept {
  208|  5.63M|         m_data.swap(other.m_data);
  209|  5.63M|         std::swap(m_signedness, other.m_signedness);
  210|  5.63M|      }
_ZN5Botan6BigInt8swap_regERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  214|  1.67M|      BOTAN_DEPRECATED("Deprecated no replacement") void swap_reg(secure_vector<word>& reg) {
  215|  1.67M|         m_data.swap(reg);
  216|       |         // sign left unchanged
  217|  1.67M|      }
_ZN5Botan6BigIntpLEm:
  229|  2.34k|      BigInt& operator+=(word y) { return add(&y, 1, Positive); }
_ZN5Botan6BigIntmIEm:
  241|  1.46k|      BigInt& operator-=(word y) { return sub(&y, 1, Positive); }
_ZN5Botan6BigInt3subEPKmmNS0_4SignE:
  332|  51.7k|      BigInt& sub(const word y[], size_t y_words, Sign sign) {
  333|  51.7k|         return add(y, y_words, sign == Positive ? Negative : Positive);
  ------------------
  |  Branch (333:33): [True: 51.7k, False: 0]
  ------------------
  334|  51.7k|      }
_ZN5Botan6BigInt5clearEv:
  415|  41.6k|      void clear() {
  416|  41.6k|         m_data.set_to_zero();
  417|  41.6k|         m_signedness = Positive;
  418|  41.6k|      }
_ZNK5Botan6BigInt7is_evenEv:
  455|  9.32k|      bool is_even() const { return !get_bit(0); }
_ZNK5Botan6BigInt6is_oddEv:
  461|   817k|      bool is_odd() const { return get_bit(0); }
_ZNK5Botan6BigInt6signumEv:
  467|  19.2M|      int signum() const {
  468|  19.2M|         if(sig_words() == 0) {
  ------------------
  |  Branch (468:13): [True: 17.3k, False: 19.2M]
  ------------------
  469|  17.3k|            return 0;
  470|  17.3k|         }
  471|  19.2M|         return (sign() == Negative) ? -1 : 1;
  ------------------
  |  Branch (471:17): [True: 7.47k, False: 19.2M]
  ------------------
  472|  19.2M|      }
_ZNK5Botan6BigInt7is_zeroEv:
  484|  1.86M|      bool is_zero() const { return sig_words() == 0; }
_ZN5Botan6BigInt7set_bitEm:
  490|  17.4k|      void set_bit(size_t n) { conditionally_set_bit(n, true); }
_ZN5Botan6BigInt21conditionally_set_bitEmb:
  500|   611k|      void conditionally_set_bit(size_t n, bool set_it) {
  501|   611k|         const size_t which = n / (sizeof(word) * 8);
  502|   611k|         const word mask = static_cast<word>(set_it) << (n % (sizeof(word) * 8));
  503|   611k|         m_data.set_word_at(which, word_at(which) | mask);
  504|   611k|      }
_ZNK5Botan6BigInt7get_bitEm:
  523|  1.43M|      bool get_bit(size_t n) const { return ((word_at(n / (sizeof(word) * 8)) >> (n % (sizeof(word) * 8))) & 1) == 1; }
_ZNK5Botan6BigInt7word_atEm:
  574|  23.6M|      word word_at(size_t n) const { return m_data.get_word_at(n); }
_ZN5Botan6BigInt11set_word_atEmm:
  576|  11.5M|      BOTAN_DEPRECATED("Deprecated no replacement") void set_word_at(size_t i, word w) { m_data.set_word_at(i, w); }
_ZN5Botan6BigInt9set_wordsEPKmm:
  578|  50.4k|      BOTAN_DEPRECATED("Deprecated no replacement") void set_words(const word w[], size_t len) {
  579|  50.4k|         m_data.set_words(w, len);
  580|  50.4k|      }
_ZNK5Botan6BigInt4signEv:
  604|  23.5M|      Sign sign() const { return (m_signedness); }
_ZNK5Botan6BigInt12reverse_signEv:
  609|  3.89k|      Sign reverse_sign() const {
  610|  3.89k|         if(sign() == Positive) {
  ------------------
  |  Branch (610:13): [True: 3.02k, False: 876]
  ------------------
  611|  3.02k|            return Negative;
  612|  3.02k|         }
  613|    876|         return Positive;
  614|  3.89k|      }
_ZN5Botan6BigInt9flip_signEv:
  619|  2.43k|      BOTAN_DEPRECATED("Deprecated no replacement") void flip_sign() { set_sign(reverse_sign()); }
_ZN5Botan6BigInt8set_signENS0_4SignE:
  625|  1.45M|      void set_sign(Sign sign) {
  626|  1.45M|         if(sign == Negative && is_zero()) {
  ------------------
  |  Branch (626:13): [True: 4.54k, False: 1.45M]
  |  Branch (626:33): [True: 1.46k, False: 3.08k]
  ------------------
  627|  1.46k|            sign = Positive;
  628|  1.46k|         }
  629|       |
  630|  1.45M|         m_signedness = sign;
  631|  1.45M|      }
_ZNK5Botan6BigInt4sizeEv:
  642|  97.5M|      size_t size() const { return m_data.size(); }
_ZNK5Botan6BigInt9sig_wordsEv:
  648|  39.0M|      size_t sig_words() const { return m_data.sig_words(); }
_ZN5Botan6BigInt12mutable_dataEv:
  673|  35.1M|      BOTAN_DEPRECATED("Deprecated no replacement") word* mutable_data() { return m_data.mutable_data(); }
_ZNK5Botan6BigInt4dataEv:
  679|  13.6k|      BOTAN_DEPRECATED("Deprecated no replacement") const word* data() const { return m_data.const_data(); }
_ZN5Botan6BigInt15get_word_vectorEv:
  684|  1.23M|      BOTAN_DEPRECATED("Deprecated no replacement") secure_vector<word>& get_word_vector() {
  685|  1.23M|         return m_data.mutable_vector();
  686|  1.23M|      }
_ZNK5Botan6BigInt7grow_toEm:
  699|  13.1M|      BOTAN_DEPRECATED("Deprecated no replacement") void grow_to(size_t n) const { m_data.grow_to(n); }
_ZN5Botan6BigInt10power_of_2Em:
  856|  5.58k|      static BigInt power_of_2(size_t n) {
  857|  5.58k|         BigInt b;
  858|  5.58k|         b.set_bit(n);
  859|  5.58k|         return b;
  860|  5.58k|      }
_ZN5Botan6BigInt6decodeEPKhm:
  893|     50|      BOTAN_DEPRECATED("Use BigInt::from_bytes") static BigInt decode(const uint8_t buf[], size_t length) {
  894|     50|         return BigInt::from_bytes(std::span{buf, length});
  895|     50|      }
_ZN5Botan6BigInt11encode_1363EPhmRKS0_:
  940|    276|      static void encode_1363(uint8_t out[], size_t bytes, const BigInt& n) {
  941|    276|         n.serialize_to(std::span{out, bytes});
  942|    276|      }
_ZNK5Botan6BigInt8_as_spanEv:
  962|  1.09M|      std::span<const word> _as_span() const { return m_data.const_span(); }
_ZNK5Botan6BigInt5_dataEv:
  972|  70.6M|      const word* _data() const { return m_data.const_data(); }
_ZN5Botan6BigInt18_assign_from_bytesENSt3__14spanIKhLm18446744073709551615EEE:
  983|  14.8k|      void _assign_from_bytes(std::span<const uint8_t> bytes) { assign_from_bytes(bytes); }
_ZN5Botan6BigInt11_from_wordsERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  991|  2.47M|      static BigInt _from_words(secure_vector<word>& words) {
  992|  2.47M|         BigInt bn;
  993|  2.47M|         bn.m_data.swap(words);
  994|  2.47M|         return bn;
  995|  2.47M|      }
_ZN5Botan6BigInt4Data12mutable_dataEv:
 1022|  36.0M|            word* mutable_data() {
 1023|  36.0M|               invalidate_sig_words();
 1024|  36.0M|               return m_reg.data();
 1025|  36.0M|            }
_ZNK5Botan6BigInt4Data10const_dataEv:
 1027|  79.5M|            const word* const_data() const { return m_reg.data(); }
_ZNK5Botan6BigInt4Data10const_spanEv:
 1029|  1.09M|            std::span<const word> const_span() const { return std::span{m_reg}; }
_ZN5Botan6BigInt4Data14mutable_vectorEv:
 1031|  1.23M|            secure_vector<word>& mutable_vector() {
 1032|  1.23M|               invalidate_sig_words();
 1033|  1.23M|               return m_reg;
 1034|  1.23M|            }
_ZNK5Botan6BigInt4Data11get_word_atEm:
 1038|  23.6M|            word get_word_at(size_t n) const {
 1039|  23.6M|               if(n < m_reg.size()) {
  ------------------
  |  Branch (1039:19): [True: 23.6M, False: 16.8k]
  ------------------
 1040|  23.6M|                  return m_reg[n];
 1041|  23.6M|               }
 1042|  16.8k|               return 0;
 1043|  23.6M|            }
_ZN5Botan6BigInt4Data11set_word_atEmm:
 1045|  12.1M|            void set_word_at(size_t i, word w) {
 1046|  12.1M|               invalidate_sig_words();
 1047|  12.1M|               if(i >= m_reg.size()) {
  ------------------
  |  Branch (1047:19): [True: 1.06M, False: 11.0M]
  ------------------
 1048|  1.06M|                  if(w == 0) {
  ------------------
  |  Branch (1048:22): [True: 1.03M, False: 28.0k]
  ------------------
 1049|  1.03M|                     return;
 1050|  1.03M|                  }
 1051|  28.0k|                  grow_to(i + 1);
 1052|  28.0k|               }
 1053|  11.1M|               m_reg[i] = w;
 1054|  11.1M|            }
_ZN5Botan6BigInt4Data9set_wordsEPKmm:
 1056|  50.4k|            void set_words(const word w[], size_t len) {
 1057|  50.4k|               invalidate_sig_words();
 1058|  50.4k|               m_reg.assign(w, w + len);
 1059|  50.4k|            }
_ZNK5Botan6BigInt4Data7grow_toEm:
 1065|  13.1M|            void grow_to(size_t n) const {
 1066|  13.1M|               if(n > size()) {
  ------------------
  |  Branch (1066:19): [True: 5.24M, False: 7.89M]
  ------------------
 1067|  5.24M|                  if(n <= m_reg.capacity()) {
  ------------------
  |  Branch (1067:22): [True: 586k, False: 4.66M]
  ------------------
 1068|   586k|                     m_reg.resize(n);
 1069|  4.66M|                  } else {
 1070|  4.66M|                     m_reg.resize(n + (8 - (n % 8)));
 1071|  4.66M|                  }
 1072|  5.24M|               }
 1073|  13.1M|            }
_ZNK5Botan6BigInt4Data4sizeEv:
 1075|   120M|            size_t size() const { return m_reg.size(); }
_ZN5Botan6BigInt4Data4swapERS1_:
 1090|  5.63M|            void swap(Data& other) noexcept {
 1091|  5.63M|               m_reg.swap(other.m_reg);
 1092|  5.63M|               std::swap(m_sig_words, other.m_sig_words);
 1093|  5.63M|            }
_ZN5Botan6BigInt4Data4swapERNSt3__16vectorImNS_16secure_allocatorImEEEE:
 1095|  4.19M|            void swap(secure_vector<word>& reg) noexcept {
 1096|  4.19M|               m_reg.swap(reg);
 1097|  4.19M|               invalidate_sig_words();
 1098|  4.19M|            }
_ZNK5Botan6BigInt4Data20invalidate_sig_wordsEv:
 1100|  53.7M|            void invalidate_sig_words() const noexcept { m_sig_words = sig_words_npos; }
_ZNK5Botan6BigInt4Data9sig_wordsEv:
 1102|  39.0M|            size_t sig_words() const {
 1103|  39.0M|               if(m_sig_words == sig_words_npos) {
  ------------------
  |  Branch (1103:19): [True: 15.3M, False: 23.6M]
  ------------------
 1104|  15.3M|                  m_sig_words = calc_sig_words();
 1105|  15.3M|               }
 1106|  39.0M|               return m_sig_words;
 1107|  39.0M|            }
_ZN5BotanplERKNS_6BigIntES2_:
 1125|   814k|inline BigInt operator+(const BigInt& x, const BigInt& y) {
 1126|   814k|   return BigInt::add2(x, y._data(), y.sig_words(), y.sign());
 1127|   814k|}
_ZN5BotanplERKNS_6BigIntEm:
 1129|  2.68k|inline BigInt operator+(const BigInt& x, word y) {
 1130|  2.68k|   return BigInt::add2(x, &y, 1, BigInt::Positive);
 1131|  2.68k|}
_ZN5BotanmiERKNS_6BigIntES2_:
 1137|  1.46k|inline BigInt operator-(const BigInt& x, const BigInt& y) {
 1138|  1.46k|   return BigInt::add2(x, y._data(), y.sig_words(), y.reverse_sign());
 1139|  1.46k|}
_ZN5BotanmiERKNS_6BigIntEm:
 1141|  5.35k|inline BigInt operator-(const BigInt& x, word y) {
 1142|  5.35k|   return BigInt::add2(x, &y, 1, BigInt::Negative);
 1143|  5.35k|}
_ZN5BotanmlEmRKNS_6BigIntE:
 1148|  46.0k|inline BigInt operator*(word x, const BigInt& y) {
 1149|  46.0k|   return y * x;
 1150|  46.0k|}
_ZN5BotaneqERKNS_6BigIntES2_:
 1162|  26.6k|inline bool operator==(const BigInt& a, const BigInt& b) {
 1163|  26.6k|   return a.is_equal(b);
 1164|  26.6k|}
_ZN5BotanneERKNS_6BigIntES2_:
 1166|  4.89k|inline bool operator!=(const BigInt& a, const BigInt& b) {
 1167|  4.89k|   return !a.is_equal(b);
 1168|  4.89k|}
_ZN5BotangeERKNS_6BigIntES2_:
 1174|  15.3k|inline bool operator>=(const BigInt& a, const BigInt& b) {
 1175|  15.3k|   return (a.cmp(b) >= 0);
 1176|  15.3k|}
_ZN5BotanltERKNS_6BigIntES2_:
 1178|  21.3k|inline bool operator<(const BigInt& a, const BigInt& b) {
 1179|  21.3k|   return a.is_less_than(b);
 1180|  21.3k|}
_ZN5BotangtERKNS_6BigIntES2_:
 1182|      6|inline bool operator>(const BigInt& a, const BigInt& b) {
 1183|      6|   return b.is_less_than(a);
 1184|      6|}
_ZN5BotaneqERKNS_6BigIntEm:
 1186|  54.7k|inline bool operator==(const BigInt& a, word b) {
 1187|  54.7k|   return (a.cmp_word(b) == 0);
 1188|  54.7k|}
_ZN5BotanneERKNS_6BigIntEm:
 1190|  2.93k|inline bool operator!=(const BigInt& a, word b) {
 1191|  2.93k|   return (a.cmp_word(b) != 0);
 1192|  2.93k|}
_ZN5BotanleERKNS_6BigIntEm:
 1194|  3.57k|inline bool operator<=(const BigInt& a, word b) {
 1195|  3.57k|   return (a.cmp_word(b) <= 0);
 1196|  3.57k|}
_ZN5BotangeERKNS_6BigIntEm:
 1198|  8.67k|inline bool operator>=(const BigInt& a, word b) {
 1199|  8.67k|   return (a.cmp_word(b) >= 0);
 1200|  8.67k|}
_ZN5BotanltERKNS_6BigIntEm:
 1202|  19.3k|inline bool operator<(const BigInt& a, word b) {
 1203|  19.3k|   return (a.cmp_word(b) < 0);
 1204|  19.3k|}
_ZN5BotangtERKNS_6BigIntEm:
 1206|  3.40k|inline bool operator>(const BigInt& a, word b) {
 1207|  3.40k|   return (a.cmp_word(b) > 0);
 1208|  3.40k|}
_ZNK5Botan6BigInt9serializeINSt3__16vectorIhNS2_9allocatorIhEEEEEET_m:
  747|    460|      T serialize(size_t len) const {
  748|       |         // TODO this supports std::vector and secure_vector
  749|       |         // it would be nice if this also could work with std::array as in
  750|       |         //   bn.serialize_to<std::array<uint8_t, 32>>(32);
  751|    460|         T out(len);
  752|    460|         this->serialize_to(out);
  753|    460|         return out;
  754|    460|      }
_ZN5Botan6BigIntC2Ev:
   45|  7.76M|      BigInt() = default;
_ZN5Botan6BigIntC2ERKS0_:
   88|  1.11M|      BigInt(const BigInt& other) = default;
_ZN5Botan6BigIntaSERKS0_:
  201|  2.24M|      BigInt& operator=(const BigInt&) = default;

_ZN5Botan20Buffered_Computation6updateEPKhm:
   34|      2|      void update(const uint8_t in[], size_t length) { add_data({in, length}); }
_ZN5Botan20Buffered_Computation6updateENSt3__14spanIKhLm18446744073709551615EEE:
   40|     84|      void update(std::span<const uint8_t> in) { add_data(in); }
_ZN5Botan20Buffered_Computation5finalEPh:
   69|      2|      void final(uint8_t out[]) { final_result({out, output_length()}); }
_ZN5Botan20Buffered_Computation5finalITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS_16secure_allocatorIhEEEEEET_v:
   77|     28|      T final() {
   78|     28|         T output(output_length());
   79|     28|         final_result(output);
   80|     28|         return output;
   81|     28|      }
_ZN5Botan20Buffered_ComputationD2Ev:
  130|     58|      virtual ~Buffered_Computation() = default;
_ZN5Botan20Buffered_Computation7processITkNS_8concepts21resizable_byte_bufferENS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS_21KyberHashedPublicKey_EJEEEEET_NS4_4spanIKhLm18446744073709551615EEE:
  125|     28|      T process(std::span<const uint8_t> in) {
  126|     28|         update(in);
  127|     28|         return final<T>();
  128|     28|      }
_ZN5Botan20Buffered_Computation5finalITkNS_8concepts21resizable_byte_bufferENS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS_21KyberHashedPublicKey_EJEEEEET_v:
   77|     28|      T final() {
   78|     28|         T output(output_length());
   79|     28|         final_result(output);
   80|     28|         return output;
   81|     28|      }

_ZN5Botan8CurveGFp4swapERS0_:
   69|   523k|      void swap(CurveGFp& other) noexcept { std::swap(m_group, other.m_group); }
_ZNK5Botan8CurveGFpeqERKS0_:
   71|   345k|      bool operator==(const CurveGFp& other) const { return (m_group == other.m_group); }
_ZN5Botan8CurveGFpC2Ev:
   62|   614k|      CurveGFp() = default;

_ZN5Botan17DataSource_MemoryC2ENSt3__14spanIKhLm18446744073709551615EEE:
  141|  23.2k|      explicit DataSource_Memory(std::span<const uint8_t> in) : m_offset(0) {
  142|       |         // Guard against forming a range from a null pointer (eg an empty span)
  143|  23.2k|         if(!in.empty()) {
  ------------------
  |  Branch (143:13): [True: 23.1k, False: 97]
  ------------------
  144|  23.1k|            m_source.assign(in.begin(), in.end());
  145|  23.1k|         }
  146|  23.2k|      }
_ZN5Botan10DataSourceC2Ev:
  100|  50.4k|      DataSource() = default;
_ZN5Botan10DataSourceD2Ev:
  101|  43.2k|      virtual ~DataSource() = default;
_ZN5Botan17DataSource_MemoryC2ENSt3__16vectorIhNS_16secure_allocatorIhEEEE:
  135|      4|      explicit DataSource_Memory(secure_vector<uint8_t> in) : m_source(std::move(in)), m_offset(0) {}

_ZN5Botan11DER_Encoder10add_objectENS_9ASN1_TypeENS_10ASN1_ClassENSt3__14spanIKhLm18446744073709551615EEE:
  218|  2.79k|      DER_Encoder& add_object(ASN1_Type type_tag, ASN1_Class class_tag, std::span<const uint8_t> rep) {
  219|  2.79k|         return add_object(type_tag, class_tag, rep.data(), rep.size());
  220|  2.79k|      }
_ZN5Botan11DER_Encoder10add_objectENS_9ASN1_TypeENS_10ASN1_ClassERKNSt3__16vectorIhNS3_9allocatorIhEEEE:
  222|  2.79k|      DER_Encoder& add_object(ASN1_Type type_tag, ASN1_Class class_tag, const std::vector<uint8_t>& rep) {
  223|  2.79k|         return add_object(type_tag, class_tag, std::span{rep});
  224|  2.79k|      }

_ZN5Botan12DH_PublicKeyC2Ev:
   68|    146|      DH_PublicKey() = default;

_ZNK5Botan13DilithiumMode19is_dilithium_round3Ev:
   49|    164|      bool is_dilithium_round3() const { return !is_ml_dsa(); }
_ZNK5Botan13DilithiumMode4modeEv:
   53|    492|      Mode mode() const { return m_mode; }
_ZN5Botan19Dilithium_PublicKeyC2Ev:
  101|     85|      Dilithium_PublicKey() = default;

_ZN5Botan13DSA_PublicKeyC2Ev:
   71|     11|      DSA_PublicKey() = default;

_ZNK5Botan14EC_AffinePoint5innerEv:
  302|  1.78k|      const EC_AffinePoint_Data& inner() const { return *m_point; }

_ZNK5Botan8EC_Group5_dataEv:
  458|  4.56k|      const std::shared_ptr<EC_Group_Data>& _data() const { return m_data; }
_ZN5Botan8EC_GroupC2EOS0_:
  221|  4.49k|      EC_Group(EC_Group&&) = default;

_ZN5Botan8EC_PointC2EOS0_:
   62|    276|      EC_Point(EC_Point&& other) noexcept { this->swap(other); }
_ZN5Botan8EC_PointaSEOS0_:
   72|   437k|      EC_Point& operator=(EC_Point&& other) noexcept {
   73|   437k|         if(this != &other) {
  ------------------
  |  Branch (73:13): [True: 437k, False: 0]
  ------------------
   74|   437k|            this->swap(other);
   75|   437k|         }
   76|   437k|         return (*this);
   77|   437k|      }
_ZNK5Botan8EC_Point7is_zeroEv:
  163|  1.21M|      bool is_zero() const { return m_z.is_zero(); }
_ZNK5Botan8EC_Point5get_xEv:
  238|   605k|      BOTAN_DEPRECATED("Use affine coordinates only") const BigInt& get_x() const { return m_x; }
_ZNK5Botan8EC_Point5get_yEv:
  245|   605k|      BOTAN_DEPRECATED("Use affine coordinates only") const BigInt& get_y() const { return m_y; }
_ZNK5Botan8EC_Point4plusERKS0_RNSt3__16vectorINS_6BigIntENS3_9allocatorIS5_EEEE:
  338|   345k|      EC_Point plus(const EC_Point& other, std::vector<BigInt>& workspace) const {
  339|   345k|         EC_Point x = (*this);
  340|   345k|         x.add(other, workspace);
  341|   345k|         return x;
  342|   345k|      }
_ZNK5Botan8EC_Point9get_curveEv:
  361|    740|      BOTAN_DEPRECATED("Deprecated no replacement") const CurveGFp& get_curve() const { return m_curve; }
_ZN5Botan8EC_PointD2Ev:
   79|   963k|      ~EC_Point() = default;
_ZN5Botan8EC_PointC2Ev:
   46|   611k|      EC_Point() = default;
_ZN5Botan8EC_PointC2ERKS0_:
   57|   346k|      EC_Point(const EC_Point&) = default;
_ZN5Botan8EC_PointaSERKS0_:
   67|   345k|      EC_Point& operator=(const EC_Point&) = default;

_ZNK5Botan9EC_Scalar10is_nonzeroEv:
  161|  2.70k|      bool is_nonzero() const { return !is_zero(); }
_ZNK5Botan9EC_Scalar6_innerEv:
  244|  1.78k|      const EC_Scalar_Data& _inner() const { return inner(); }
_ZNK5Botan9EC_Scalar5innerEv:
  253|  8.97k|      const EC_Scalar_Data& inner() const { return *m_scalar; }

_ZN5Botan12EC_PublicKeyC2Ev:
  137|  3.90k|      EC_PublicKey() = default;
_ZN5Botan12EC_PublicKeyD2Ev:
   42|  3.90k|      ~EC_PublicKey() override = default;
_ZN5Botan13EC_PrivateKeyD2Ev:
  170|  1.78k|      ~EC_PrivateKey() override = default;

_ZN5Botan15ECDH_PrivateKeyC1ERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEE:
   87|    700|            EC_PrivateKey(alg_id, key_bits) {}
_ZN5Botan14ECDH_PublicKeyC2Ev:
   67|    493|      ECDH_PublicKey() = default;

_ZN5Botan16ECDSA_PrivateKeyC1ERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEE:
   98|  3.20k|            EC_PrivateKey(alg_id, key_bits) {}
_ZN5Botan15ECDSA_PublicKeyC2Ev:
   79|  3.20k|      ECDSA_PublicKey() = default;

_ZN5Botan17Ed25519_PublicKeyC2Ev:
   63|      9|      Ed25519_PublicKey() = default;

_ZN5Botan15Ed448_PublicKeyC2Ev:
   70|      5|      Ed448_PublicKey() = default;

_ZNK5Botan9Exception4whatEv:
   94|  1.13k|      const char* what() const noexcept override { return m_msg.c_str(); }

_ZN5Botan20GOST_3410_PrivateKeyC1ERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEE:
   91|      2|            EC_PrivateKey(alg_id, key_bits) {}
_ZN5Botan19GOST_3410_PublicKeyC2Ev:
   72|      2|      GOST_3410_PublicKey() = default;

_ZN5Botan15Kyber_PublicKeyD2Ev:
  105|     34|      ~Kyber_PublicKey() override = default;
_ZNK5Botan9KyberMode4modeEv:
   60|     62|      Mode mode() const { return m_mode; }
_ZN5Botan15Kyber_PublicKeyC2Ev:
  135|     34|      Kyber_PublicKey() = default;

_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|  1.43k|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|  1.43k|   ranges::assert_equal_byte_lengths(out, in);
  162|  1.43k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 1.43k]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|  1.43k|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 1.43k, False: 0]
  ------------------
  165|  1.43k|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|  1.43k|   }
  167|  1.43k|}
_ZN5Botan11clear_bytesEPvm:
  101|  20.9M|inline constexpr void clear_bytes(void* ptr, size_t bytes) {
  102|  20.9M|   if(bytes > 0) {
  ------------------
  |  Branch (102:7): [True: 20.9M, False: 41.6k]
  ------------------
  103|  20.9M|      std::memset(ptr, 0, bytes);
  104|  20.9M|   }
  105|  20.9M|}
_ZN5Botan9clear_memImEEvPT_m:
  118|  4.88M|inline constexpr void clear_mem(T* ptr, size_t n) {
  119|  4.88M|   clear_bytes(ptr, sizeof(T) * n);
  120|  4.88M|}
_ZN5Botan8copy_memIhQsr3stdE12is_trivial_vIu7__decayIT_EEEEvPS1_PKS1_m:
  144|  2.11M|inline constexpr void copy_mem(T* out, const T* in, size_t n) {
  145|  2.11M|   BOTAN_ASSERT_IMPLICATION(n > 0, in != nullptr && out != nullptr, "If n > 0 then args are not null");
  ------------------
  |  |  103|  2.11M|   do {                                                                                          \
  |  |  104|  2.11M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                              \
  |  |  105|  4.17M|      if((expr1) && !(expr2)) {                                                                  \
  |  |  ------------------
  |  |  |  Branch (105:10): [True: 2.08M, False: 24.8k]
  |  |  |  Branch (105:23): [True: 2.08M, False: 0]
  |  |  |  Branch (105:23): [True: 2.08M, False: 0]
  |  |  ------------------
  |  |  106|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                     \
  |  |  107|      0|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |  108|      0|      }                                                                                          \
  |  |  109|  2.11M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (109:12): [Folded, False: 2.11M]
  |  |  ------------------
  ------------------
  146|       |
  147|  2.11M|   if(in != nullptr && out != nullptr && n > 0) {
  ------------------
  |  Branch (147:7): [True: 2.11M, False: 102]
  |  Branch (147:24): [True: 2.10M, False: 2.16k]
  |  Branch (147:42): [True: 2.08M, False: 22.6k]
  ------------------
  148|  2.08M|      std::memmove(out, in, sizeof(T) * n);
  149|  2.08M|   }
  150|  2.11M|}
_ZN5Botan19secure_scrub_memoryITkNS_6ranges23contiguous_output_rangeERNSt3__16vectorIhNS2_9allocatorIhEEEEEEvOT_:
   59|   140k|void secure_scrub_memory(ranges::contiguous_output_range auto&& data) {
   60|   140k|   secure_scrub_memory(std::ranges::data(data), ranges::size_bytes(data));
   61|   140k|}
_ZN5Botan9clear_memIhEEvPT_m:
  118|  19.7k|inline constexpr void clear_mem(T* ptr, size_t n) {
  119|  19.7k|   clear_bytes(ptr, sizeof(T) * n);
  120|  19.7k|}
_ZN5Botan8copy_memImQsr3stdE12is_trivial_vIu7__decayIT_EEEEvPS1_PKS1_m:
  144|  3.69M|inline constexpr void copy_mem(T* out, const T* in, size_t n) {
  145|  3.69M|   BOTAN_ASSERT_IMPLICATION(n > 0, in != nullptr && out != nullptr, "If n > 0 then args are not null");
  ------------------
  |  |  103|  3.69M|   do {                                                                                          \
  |  |  104|  3.69M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                              \
  |  |  105|  7.39M|      if((expr1) && !(expr2)) {                                                                  \
  |  |  ------------------
  |  |  |  Branch (105:10): [True: 3.69M, False: 0]
  |  |  |  Branch (105:23): [True: 3.69M, False: 0]
  |  |  |  Branch (105:23): [True: 3.69M, False: 0]
  |  |  ------------------
  |  |  106|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                     \
  |  |  107|      0|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |  108|      0|      }                                                                                          \
  |  |  109|  3.69M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (109:12): [Folded, False: 3.69M]
  |  |  ------------------
  ------------------
  146|       |
  147|  3.69M|   if(in != nullptr && out != nullptr && n > 0) {
  ------------------
  |  Branch (147:7): [True: 3.69M, False: 0]
  |  Branch (147:24): [True: 3.69M, False: 0]
  |  Branch (147:42): [True: 3.69M, False: 0]
  ------------------
  148|  3.69M|      std::memmove(out, in, sizeof(T) * n);
  149|  3.69M|   }
  150|  3.69M|}
_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|  50.5k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromT& in) {
  200|  50.5k|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  201|  50.5k|}
_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|  50.5k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  50.5k|   ranges::assert_equal_byte_lengths(out, in);
  178|  50.5k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  50.5k|}
_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|   193k|inline constexpr ToT typecast_copy(const FromR& src) {
  211|   193k|   ToT dst;  // NOLINT(*-member-init)
  212|   193k|   typecast_copy(dst, src);
  213|   193k|   return dst;
  214|   193k|}
_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|   193k|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|   193k|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|   193k|}
_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|   193k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|   193k|   ranges::assert_equal_byte_lengths(out, in);
  178|   193k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|   193k|}
_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.7k|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|  30.7k|   ranges::assert_equal_byte_lengths(out, in);
  162|  30.7k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 30.7k]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|  30.7k|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 30.7k, False: 0]
  ------------------
  165|  30.7k|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|  30.7k|   }
  167|  30.7k|}
_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|  32.9k|inline constexpr ToT typecast_copy(const FromR& src) {
  211|  32.9k|   ToT dst;  // NOLINT(*-member-init)
  212|  32.9k|   typecast_copy(dst, src);
  213|  32.9k|   return dst;
  214|  32.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|  32.9k|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|  32.9k|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|  32.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|  32.9k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  32.9k|   ranges::assert_equal_byte_lengths(out, in);
  178|  32.9k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  32.9k|}
_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|  2.47M|{
  133|  2.47M|   clear_bytes(std::ranges::data(mem), ranges::size_bytes(mem));
  134|  2.47M|}
_ZN5Botan8copy_memITkNS_6ranges23contiguous_output_rangeENSt3__14spanImLm18446744073709551615EEETkNS1_16contiguous_rangeENS3_IKmLm18446744073709551615EEEQaasr3stdE9is_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|  10.3k|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|  10.3k|   ranges::assert_equal_byte_lengths(out, in);
  162|  10.3k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 10.3k]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|  10.3k|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 10.0k, False: 239]
  ------------------
  165|  10.0k|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|  10.0k|   }
  167|  10.3k|}
_ZN5Botan8copy_memITkNS_6ranges23contiguous_output_rangeERNSt3__16vectorImNS_16secure_allocatorImEEEETkNS1_16contiguous_rangeENS2_4spanImLm18446744073709551615EEEQaasr3stdE9is_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|   526k|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|   526k|   ranges::assert_equal_byte_lengths(out, in);
  162|   526k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 526k]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|   526k|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 526k, False: 0]
  ------------------
  165|   526k|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|   526k|   }
  167|   526k|}
_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|  1.56k|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|  1.56k|   ranges::assert_equal_byte_lengths(out, in);
  162|  1.56k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 1.56k]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|  1.56k|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 1.56k, False: 0]
  ------------------
  165|  1.56k|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|  1.56k|   }
  167|  1.56k|}
_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|  1.09k|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|  1.09k|   ranges::assert_equal_byte_lengths(out, in);
  162|  1.09k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 1.09k]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|  1.09k|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 1.09k, False: 0]
  ------------------
  165|  1.09k|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|  1.09k|   }
  167|  1.09k|}
_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|    566|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|    566|   ranges::assert_equal_byte_lengths(out, in);
  162|    566|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 566]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|    566|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 566, False: 0]
  ------------------
  165|    566|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|    566|   }
  167|    566|}
_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.94k|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|  1.94k|   ranges::assert_equal_byte_lengths(out, in);
  162|  1.94k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 1.94k]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|  1.94k|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 1.94k, False: 0]
  ------------------
  165|  1.94k|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|  1.94k|   }
  167|  1.94k|}
_ZN5Botan9clear_memITkNS_6ranges23contiguous_output_rangeERNSt3__15arrayImLm18EEEEEvOT_Qsr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRS6_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeEE:
  132|  13.5M|{
  133|  13.5M|   clear_bytes(std::ranges::data(mem), ranges::size_bytes(mem));
  134|  13.5M|}
_ZN5Botan8copy_memITkNS_6ranges23contiguous_output_rangeERNSt3__14spanIhLm28EEETkNS1_16contiguous_rangeENS3_IKhLm28EEEQaasr3stdE9is_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|    968|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|    968|   ranges::assert_equal_byte_lengths(out, in);
  162|    968|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 968]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|    968|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 968, False: 0]
  ------------------
  165|    968|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|    968|   }
  167|    968|}
_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|    915|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|    915|   ranges::assert_equal_byte_lengths(out, in);
  162|    915|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 915]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|    915|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 915, False: 0]
  ------------------
  165|    915|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|    915|   }
  167|    915|}
_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|  5.31k|inline constexpr ToT typecast_copy(const FromR& src) {
  211|  5.31k|   ToT dst;  // NOLINT(*-member-init)
  212|  5.31k|   typecast_copy(dst, src);
  213|  5.31k|   return dst;
  214|  5.31k|}
_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|  5.31k|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|  5.31k|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|  5.31k|}
_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|  5.31k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  5.31k|   ranges::assert_equal_byte_lengths(out, in);
  178|  5.31k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  5.31k|}
_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|    325|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromT& in) {
  200|    325|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  201|    325|}
_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|    325|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|    325|   ranges::assert_equal_byte_lengths(out, in);
  178|    325|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|    325|}
_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|  1.20M|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  1.20M|   ranges::assert_equal_byte_lengths(out, in);
  178|  1.20M|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  1.20M|}
_ZN5Botan13typecast_copyIjTkNS_6ranges16contiguous_rangeENSt3__14spanIhLm4EEEQaaaasr3stdE26is_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|  53.0k|inline constexpr ToT typecast_copy(const FromR& src) {
  211|  53.0k|   ToT dst;  // NOLINT(*-member-init)
  212|  53.0k|   typecast_copy(dst, src);
  213|  53.0k|   return dst;
  214|  53.0k|}
_ZN5Botan13typecast_copyIjTkNS_6ranges16contiguous_rangeENSt3__14spanIhLm4EEEQaaaasr3stdE23is_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|  53.0k|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|  53.0k|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|  53.0k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeENSt3__14spanIjLm1EEETkNS1_16contiguous_rangeENS3_IhLm4EEEQaasr3stdE23is_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|  53.0k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  53.0k|   ranges::assert_equal_byte_lengths(out, in);
  178|  53.0k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  53.0k|}
_ZN5Botan13typecast_copyItTkNS_6ranges16contiguous_rangeENSt3__14spanIhLm2EEEQaaaasr3stdE26is_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|  2.90k|inline constexpr ToT typecast_copy(const FromR& src) {
  211|  2.90k|   ToT dst;  // NOLINT(*-member-init)
  212|  2.90k|   typecast_copy(dst, src);
  213|  2.90k|   return dst;
  214|  2.90k|}
_ZN5Botan13typecast_copyItTkNS_6ranges16contiguous_rangeENSt3__14spanIhLm2EEEQaaaasr3stdE23is_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|  2.90k|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|  2.90k|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|  2.90k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeENSt3__14spanItLm1EEETkNS1_16contiguous_rangeENS3_IhLm2EEEQaasr3stdE23is_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|  2.90k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  2.90k|   ranges::assert_equal_byte_lengths(out, in);
  178|  2.90k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  2.90k|}
_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|      1|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|      1|   ranges::assert_equal_byte_lengths(out, in);
  178|      1|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|      1|}
_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|      1|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|      1|   ranges::assert_equal_byte_lengths(out, in);
  162|      1|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 1]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|      1|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 1, False: 0]
  ------------------
  165|      1|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|      1|   }
  167|      1|}
_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|      1|inline constexpr ToT typecast_copy(const FromR& src) {
  211|      1|   ToT dst;  // NOLINT(*-member-init)
  212|      1|   typecast_copy(dst, src);
  213|      1|   return dst;
  214|      1|}
_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|      1|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|      1|   ranges::assert_equal_byte_lengths(out, in);
  178|      1|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|      1|}
_ZN5Botan9clear_memITkNS_6ranges23contiguous_output_rangeERNSt3__14spanIiLm256EEEEEvOT_Qsr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRS6_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeEE:
  132|    504|{
  133|    504|   clear_bytes(std::ranges::data(mem), ranges::size_bytes(mem));
  134|    504|}
_ZN5Botan8copy_memITkNS_6ranges23contiguous_output_rangeERNSt3__16vectorIiNS2_9allocatorIiEEEETkNS1_16contiguous_rangeES6_Qaasr3stdE9is_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|     79|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|     79|   ranges::assert_equal_byte_lengths(out, in);
  162|     79|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 79]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|     79|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 79, False: 0]
  ------------------
  165|     79|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|     79|   }
  167|     79|}
_ZN5Botan9clear_memITkNS_6ranges23contiguous_output_rangeERNSt3__14spanIsLm256EEEEEvOT_Qsr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRS6_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeEE:
  132|     93|{
  133|     93|   clear_bytes(std::ranges::data(mem), ranges::size_bytes(mem));
  134|     93|}
_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__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|      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|}
_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|  8.06k|{
  133|  8.06k|   clear_bytes(std::ranges::data(mem), ranges::size_bytes(mem));
  134|  8.06k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERNSt3__15arrayIhLm2EEETkNS1_16contiguous_rangeENS3_ItLm1EEEQaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINS7_IXsr21__is_primary_templateINS8_Iu14__remove_cvrefIDTclL_ZNSA_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSG_ISO_EESP_E4type10value_typeEEEEvOSL_RKSB_:
  176|  3.84k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  3.84k|   ranges::assert_equal_byte_lengths(out, in);
  178|  3.84k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  3.84k|}

_ZN5Botan14Asymmetric_KeyD2Ev:
   62|  4.26k|      virtual ~Asymmetric_Key() = default;

_ZN5Botan15PKCS8_ExceptionC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   30|  1.78k|      explicit PKCS8_Exception(std::string_view error) : Decoding_Error("PKCS #8", error) {}

_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKhLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  32.1k|{
  101|  32.1k|   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|  32.1k|   } else {
  107|  32.1k|      const size_t expected_size = s0.size_bytes();
  108|  32.1k|      const bool correct_size =
  109|  32.1k|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|  32.1k|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 32.1k]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|  32.1k|   }
  115|  32.1k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEEEEmRKT_:
   59|  64.3k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  64.3k|   return std::span{r}.size_bytes();
   61|  64.3k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm32ETkNS0_14spanable_rangeENSt3__14spanIhLm32EEEEEvRKT0_:
   77|      1|inline constexpr void assert_exact_byte_length(const R& r) {
   78|      1|   const std::span s{r};
   79|      1|   if constexpr(statically_spanable_range<R>) {
   80|      1|      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|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm32ETkNS0_14spanable_rangeENSt3__15arrayImLm4EEEEEvRKT0_:
   77|  4.14k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  4.14k|   const std::span s{r};
   79|  4.14k|   if constexpr(statically_spanable_range<R>) {
   80|  4.14k|      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.14k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm32EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm4EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  1.61k|{
  101|  1.61k|   const std::span s0{r0};
  102|       |
  103|  1.61k|   if constexpr(statically_spanable_range<R0>) {
  104|  1.61k|      constexpr size_t expected_size = s0.size_bytes();
  105|  1.61k|      (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.61k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__16vectorIhNS2_9allocatorIhEEEEEEmRKT_:
   59|   140k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|   140k|   return std::span{r}.size_bytes();
   61|   140k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIhLm8EEEEEvRKT0_:
   77|   128k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|   128k|   const std::span s{r};
   79|   128k|   if constexpr(statically_spanable_range<R>) {
   80|   128k|      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|   128k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm8EEETpTkNS0_14spanable_rangeEJNS3_IKmLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  50.5k|{
  101|  50.5k|   const std::span s0{r0};
  102|       |
  103|  50.5k|   if constexpr(statically_spanable_range<R0>) {
  104|  50.5k|      constexpr size_t expected_size = s0.size_bytes();
  105|  50.5k|      (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|  50.5k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIKmLm1EEEEEvRKT0_:
   77|  50.5k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  50.5k|   const std::span s{r};
   79|  50.5k|   if constexpr(statically_spanable_range<R>) {
   80|  50.5k|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|       |   } else {
   82|       |      if(s.size_bytes() != expected) {
   83|       |         memory_region_size_violation();
   84|       |      }
   85|       |   }
   86|  50.5k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm8EEEEEmRKT_:
   59|  50.5k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  50.5k|   return std::span{r}.size_bytes();
   61|  50.5k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIKhLm8EEEEEvRKT0_:
   77|   386k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|   386k|   const std::span s{r};
   79|   386k|   if constexpr(statically_spanable_range<R>) {
   80|   386k|      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|   386k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm1EEETpTkNS0_14spanable_rangeEJNS3_IKhLm8EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|   193k|{
  101|   193k|   const std::span s0{r0};
  102|       |
  103|   193k|   if constexpr(statically_spanable_range<R0>) {
  104|   193k|      constexpr size_t expected_size = s0.size_bytes();
  105|   193k|      (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|   193k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm1EEEEEmRKT_:
   59|   226k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|   226k|   return std::span{r}.size_bytes();
   61|   226k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__15arrayIhLm8EEEEEvRKT0_:
   77|  32.9k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  32.9k|   const std::span s{r};
   79|  32.9k|   if constexpr(statically_spanable_range<R>) {
   80|  32.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|  32.9k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm1EEETpTkNS0_14spanable_rangeEJNS3_IhLm8EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  32.9k|{
  101|  32.9k|   const std::span s0{r0};
  102|       |
  103|  32.9k|   if constexpr(statically_spanable_range<R0>) {
  104|  32.9k|      constexpr size_t expected_size = s0.size_bytes();
  105|  32.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|  32.9k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm18446744073709551615EEEEEmRKT_:
   59|  2.49M|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  2.49M|   return std::span{r}.size_bytes();
   61|  2.49M|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKmLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  10.3k|{
  101|  10.3k|   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|  10.3k|   } else {
  107|  10.3k|      const size_t expected_size = s0.size_bytes();
  108|  10.3k|      const bool correct_size =
  109|  10.3k|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|  10.3k|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 10.3k]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|  10.3k|   }
  115|  10.3k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__16vectorImNS_16secure_allocatorImEEEETpTkNS0_14spanable_rangeEJNS2_4spanImLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|   526k|{
  101|   526k|   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|   526k|   } else {
  107|   526k|      const size_t expected_size = s0.size_bytes();
  108|   526k|      const bool correct_size =
  109|   526k|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|   526k|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 526k]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|   526k|   }
  115|   526k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__16vectorImNS_16secure_allocatorImEEEEEEmRKT_:
   59|  1.05M|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  1.05M|   return std::span{r}.size_bytes();
   61|  1.05M|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm4EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm4EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  1.56k|{
  101|  1.56k|   const std::span s0{r0};
  102|       |
  103|  1.56k|   if constexpr(statically_spanable_range<R0>) {
  104|  1.56k|      constexpr size_t expected_size = s0.size_bytes();
  105|  1.56k|      (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.56k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm4EEEEEmRKT_:
   59|  3.12k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  3.12k|   return std::span{r}.size_bytes();
   61|  3.12k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__15arrayImLm1EEEEEvRKT0_:
   77|  2.41M|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  2.41M|   const std::span s{r};
   79|  2.41M|   if constexpr(statically_spanable_range<R>) {
   80|  2.41M|      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.41M|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm6EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm6EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  1.09k|{
  101|  1.09k|   const std::span s0{r0};
  102|       |
  103|  1.09k|   if constexpr(statically_spanable_range<R0>) {
  104|  1.09k|      constexpr size_t expected_size = s0.size_bytes();
  105|  1.09k|      (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.09k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm48ETkNS0_14spanable_rangeENSt3__15arrayImLm6EEEEEvRKT0_:
   77|  2.57k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  2.57k|   const std::span s{r};
   79|  2.57k|   if constexpr(statically_spanable_range<R>) {
   80|  2.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|  2.57k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm6EEEEEmRKT_:
   59|  2.18k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  2.18k|   return std::span{r}.size_bytes();
   61|  2.18k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm48EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm6EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  1.48k|{
  101|  1.48k|   const std::span s0{r0};
  102|       |
  103|  1.48k|   if constexpr(statically_spanable_range<R0>) {
  104|  1.48k|      constexpr size_t expected_size = s0.size_bytes();
  105|  1.48k|      (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.48k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm8EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm8EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    566|{
  101|    566|   const std::span s0{r0};
  102|       |
  103|    566|   if constexpr(statically_spanable_range<R0>) {
  104|    566|      constexpr size_t expected_size = s0.size_bytes();
  105|    566|      (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|    566|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm64ETkNS0_14spanable_rangeENSt3__15arrayImLm8EEEEEvRKT0_:
   77|  1.13k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  1.13k|   const std::span s{r};
   79|  1.13k|   if constexpr(statically_spanable_range<R>) {
   80|  1.13k|      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.13k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm8EEEEEmRKT_:
   59|  1.13k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  1.13k|   return std::span{r}.size_bytes();
   61|  1.13k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm64EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm8EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    565|{
  101|    565|   const std::span s0{r0};
  102|       |
  103|    565|   if constexpr(statically_spanable_range<R0>) {
  104|    565|      constexpr size_t expected_size = s0.size_bytes();
  105|    565|      (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|    565|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm9EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm9EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  1.94k|{
  101|  1.94k|   const std::span s0{r0};
  102|       |
  103|  1.94k|   if constexpr(statically_spanable_range<R0>) {
  104|  1.94k|      constexpr size_t expected_size = s0.size_bytes();
  105|  1.94k|      (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.94k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm72ETkNS0_14spanable_rangeENSt3__15arrayImLm9EEEEEvRKT0_:
   77|  4.29k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  4.29k|   const std::span s{r};
   79|  4.29k|   if constexpr(statically_spanable_range<R>) {
   80|  4.29k|      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.29k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm9EEEEEmRKT_:
   59|  3.88k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  3.88k|   return std::span{r}.size_bytes();
   61|  3.88k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayImLm18EEEEEmRKT_:
   59|  13.5M|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  13.5M|   return std::span{r}.size_bytes();
   61|  13.5M|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm72EEETpTkNS0_14spanable_rangeEJNS3_ImLm9EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  2.35k|{
  101|  2.35k|   const std::span s0{r0};
  102|       |
  103|  2.35k|   if constexpr(statically_spanable_range<R0>) {
  104|  2.35k|      constexpr size_t expected_size = s0.size_bytes();
  105|  2.35k|      (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.35k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm32EEETpTkNS0_14spanable_rangeEJNS3_ImLm4EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    968|{
  101|    968|   const std::span s0{r0};
  102|       |
  103|    968|   if constexpr(statically_spanable_range<R0>) {
  104|    968|      constexpr size_t expected_size = s0.size_bytes();
  105|    968|      (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|    968|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm28EEETpTkNS0_14spanable_rangeEJNS3_IKhLm28EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    968|{
  101|    968|   const std::span s0{r0};
  102|       |
  103|    968|   if constexpr(statically_spanable_range<R0>) {
  104|    968|      constexpr size_t expected_size = s0.size_bytes();
  105|    968|      (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|    968|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm28ETkNS0_14spanable_rangeENSt3__14spanIKhLm28EEEEEvRKT0_:
   77|    968|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    968|   const std::span s{r};
   79|    968|   if constexpr(statically_spanable_range<R>) {
   80|    968|      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|    968|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm28EEEEEmRKT_:
   59|  1.93k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  1.93k|   return std::span{r}.size_bytes();
   61|  1.93k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm66EEETpTkNS0_14spanable_rangeEJNS3_IKhLm66EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    915|{
  101|    915|   const std::span s0{r0};
  102|       |
  103|    915|   if constexpr(statically_spanable_range<R0>) {
  104|    915|      constexpr size_t expected_size = s0.size_bytes();
  105|    915|      (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|    915|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm66ETkNS0_14spanable_rangeENSt3__14spanIKhLm66EEEEEvRKT0_:
   77|    915|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    915|   const std::span s{r};
   79|    915|   if constexpr(statically_spanable_range<R>) {
   80|    915|      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|    915|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm66EEEEEmRKT_:
   59|  1.83k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  1.83k|   return std::span{r}.size_bytes();
   61|  1.83k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm1EEETpTkNS0_14spanable_rangeEJS4_EEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    186|{
  101|    186|   const std::span s0{r0};
  102|       |
  103|    186|   if constexpr(statically_spanable_range<R0>) {
  104|    186|      constexpr size_t expected_size = s0.size_bytes();
  105|    186|      (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|    186|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm1ETkNS0_14spanable_rangeENSt3__15arrayIhLm1EEEEEvRKT0_:
   77|    186|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    186|   const std::span s{r};
   79|    186|   if constexpr(statically_spanable_range<R>) {
   80|    186|      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|    186|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm1ETkNS0_14spanable_rangeENSt3__14spanIhLm1EEEEEvRKT0_:
   77|    372|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    372|   const std::span s{r};
   79|    372|   if constexpr(statically_spanable_range<R>) {
   80|    372|      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|    372|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__14spanIhLm4EEEEEvRKT0_:
   77|  53.0k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  53.0k|   const std::span s{r};
   79|  53.0k|   if constexpr(statically_spanable_range<R>) {
   80|  53.0k|      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.0k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__14spanIKhLm4EEEEEvRKT0_:
   77|  10.6k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  10.6k|   const std::span s{r};
   79|  10.6k|   if constexpr(statically_spanable_range<R>) {
   80|  10.6k|      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|  10.6k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIjLm1EEETpTkNS0_14spanable_rangeEJNS3_IKhLm4EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  5.31k|{
  101|  5.31k|   const std::span s0{r0};
  102|       |
  103|  5.31k|   if constexpr(statically_spanable_range<R0>) {
  104|  5.31k|      constexpr size_t expected_size = s0.size_bytes();
  105|  5.31k|      (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.31k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIjLm1EEEEEmRKT_:
   59|  58.3k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  58.3k|   return std::span{r}.size_bytes();
   61|  58.3k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanItLm1EEEEEmRKT_:
   59|  2.90k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  2.90k|   return std::span{r}.size_bytes();
   61|  2.90k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm2ETkNS0_14spanable_rangeENSt3__14spanIhLm2EEEEEvRKT0_:
   77|  3.55k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  3.55k|   const std::span s{r};
   79|  3.55k|   if constexpr(statically_spanable_range<R>) {
   80|  3.55k|      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|  3.55k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm2EEETpTkNS0_14spanable_rangeEJNS3_IKtLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    325|{
  101|    325|   const std::span s0{r0};
  102|       |
  103|    325|   if constexpr(statically_spanable_range<R0>) {
  104|    325|      constexpr size_t expected_size = s0.size_bytes();
  105|    325|      (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|    325|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm2ETkNS0_14spanable_rangeENSt3__14spanIKtLm1EEEEEvRKT0_:
   77|    325|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    325|   const std::span s{r};
   79|    325|   if constexpr(statically_spanable_range<R>) {
   80|    325|      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|    325|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm2EEEEEmRKT_:
   59|    325|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|    325|   return std::span{r}.size_bytes();
   61|    325|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKmLm18446744073709551615EEEEEEvRKT_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|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm8EEETpTkNS0_14spanable_rangeEJNS3_ImLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  2.41M|{
  101|  2.41M|   const std::span s0{r0};
  102|       |
  103|  2.41M|   if constexpr(statically_spanable_range<R0>) {
  104|  2.41M|      constexpr size_t expected_size = s0.size_bytes();
  105|  2.41M|      (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.41M|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayIhLm8EEEEEmRKT_:
   59|  1.20M|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  1.20M|   return std::span{r}.size_bytes();
   61|  1.20M|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIjLm1EEETpTkNS0_14spanable_rangeEJNS3_IhLm4EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  53.0k|{
  101|  53.0k|   const std::span s0{r0};
  102|       |
  103|  53.0k|   if constexpr(statically_spanable_range<R0>) {
  104|  53.0k|      constexpr size_t expected_size = s0.size_bytes();
  105|  53.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|  53.0k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanItLm1EEETpTkNS0_14spanable_rangeEJNS3_IhLm2EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  2.90k|{
  101|  2.90k|   const std::span s0{r0};
  102|       |
  103|  2.90k|   if constexpr(statically_spanable_range<R0>) {
  104|  2.90k|      constexpr size_t expected_size = s0.size_bytes();
  105|  2.90k|      (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.90k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayImLm7EEEEEmRKT_:
   59|  8.07k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  8.07k|   return std::span{r}.size_bytes();
   61|  8.07k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm56EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm7EEEEEEvRKT_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__15arrayImLm7EEEEEvRKT0_:
   77|      2|inline constexpr void assert_exact_byte_length(const R& r) {
   78|      2|   const std::span s{r};
   79|      2|   if constexpr(statically_spanable_range<R>) {
   80|      2|      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|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm56EEEEEmRKT_:
   59|      3|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|      3|   return std::span{r}.size_bytes();
   61|      3|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm56EEETpTkNS0_14spanable_rangeEJNS2_6vectorIhNS_16secure_allocatorIhEEEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|      1|{
  101|      1|   const std::span s0{r0};
  102|       |
  103|      1|   if constexpr(statically_spanable_range<R0>) {
  104|      1|      constexpr size_t expected_size = s0.size_bytes();
  105|      1|      (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|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm56ETkNS0_14spanable_rangeENSt3__16vectorIhNS_16secure_allocatorIhEEEEEEvRKT0_:
   77|      1|inline constexpr void assert_exact_byte_length(const R& r) {
   78|      1|   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|      1|   } else {
   82|      1|      if(s.size_bytes() != expected) {
  ------------------
  |  Branch (82:10): [True: 0, False: 1]
  ------------------
   83|      0|         memory_region_size_violation();
   84|      0|      }
   85|      1|   }
   86|      1|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENS_6StrongINSt3__15arrayIhLm56EEENS_11ScalarX448_EJEEETpTkNS0_14spanable_rangeEJNS3_4spanIKhLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|      1|{
  101|      1|   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|   } else {
  107|      1|      const size_t expected_size = s0.size_bytes();
  108|      1|      const bool correct_size =
  109|      1|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|      1|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 1]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|      1|   }
  115|      1|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENS_6StrongINSt3__15arrayIhLm56EEENS_11ScalarX448_EJEEEEEmRKT_:
   59|      1|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|      1|   return std::span{r}.size_bytes();
   61|      1|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIiLm256EEEEEmRKT_:
   59|    504|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|    504|   return std::span{r}.size_bytes();
   61|    504|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__16vectorIiNS2_9allocatorIiEEEETpTkNS0_14spanable_rangeEJS6_EEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|     79|{
  101|     79|   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|     79|   } else {
  107|     79|      const size_t expected_size = s0.size_bytes();
  108|     79|      const bool correct_size =
  109|     79|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|     79|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 79]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|     79|   }
  115|     79|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__16vectorIiNS2_9allocatorIiEEEEEEmRKT_:
   59|    158|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|    158|   return std::span{r}.size_bytes();
   61|    158|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm2ETkNS0_14spanable_rangeENSt3__15arrayIhLm2EEEEEvRKT0_:
   77|  2.90k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  2.90k|   const std::span s{r};
   79|  2.90k|   if constexpr(statically_spanable_range<R>) {
   80|  2.90k|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|       |   } else {
   82|       |      if(s.size_bytes() != expected) {
   83|       |         memory_region_size_violation();
   84|       |      }
   85|       |   }
   86|  2.90k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm2ETkNS0_14spanable_rangeENSt3__15arrayItLm1EEEEEvRKT0_:
   77|  8.01k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  8.01k|   const std::span s{r};
   79|  8.01k|   if constexpr(statically_spanable_range<R>) {
   80|  8.01k|      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.01k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm2EEETpTkNS0_14spanable_rangeEJNS3_ItLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  8.01k|{
  101|  8.01k|   const std::span s0{r0};
  102|       |
  103|  8.01k|   if constexpr(statically_spanable_range<R0>) {
  104|  8.01k|      constexpr size_t expected_size = s0.size_bytes();
  105|  8.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|  8.01k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__15arrayIhLm4EEEEEvRKT0_:
   77|  53.0k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  53.0k|   const std::span s{r};
   79|  53.0k|   if constexpr(statically_spanable_range<R>) {
   80|  53.0k|      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.0k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIsLm256EEEEEmRKT_:
   59|     93|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|     93|   return std::span{r}.size_bytes();
   61|     93|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayImLm7EEETpTkNS0_14spanable_rangeEJNS2_4spanIKhLm56EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|      4|{
  101|      4|   const std::span s0{r0};
  102|       |
  103|      4|   if constexpr(statically_spanable_range<R0>) {
  104|      4|      constexpr size_t expected_size = s0.size_bytes();
  105|      4|      (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|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm56ETkNS0_14spanable_rangeENSt3__14spanIKhLm56EEEEEvRKT0_:
   77|      4|inline constexpr void assert_exact_byte_length(const R& r) {
   78|      4|   const std::span s{r};
   79|      4|   if constexpr(statically_spanable_range<R>) {
   80|      4|      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|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayIhLm2EEEEEmRKT_:
   59|  3.84k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  3.84k|   return std::span{r}.size_bytes();
   61|  3.84k|}

_ZNK5Botan8Null_RNG9is_seededEv:
  352|  8.51k|      bool is_seeded() const override { return false; }
_ZN5Botan21RandomNumberGeneratorC2Ev:
   54|  1.78k|      RandomNumberGenerator() = default;

_ZN5Botan13RSA_PublicKeyC2Ev:
   87|     45|      RSA_PublicKey() = default;

_ZN5Botan16secure_allocatorIhE10deallocateEPhm:
   54|   127k|      void deallocate(T* p, std::size_t n) { deallocate_memory(p, n, sizeof(T)); }
_ZN5Botan16secure_allocatorIhE8allocateEm:
   52|   127k|      T* allocate(std::size_t n) { return static_cast<T*>(allocate_memory(n, sizeof(T))); }
_ZN5Botan16secure_allocatorImE10deallocateEPmm:
   54|  16.0M|      void deallocate(T* p, std::size_t n) { deallocate_memory(p, n, sizeof(T)); }
_ZN5Botan16secure_allocatorImE8allocateEm:
   52|  16.0M|      T* allocate(std::size_t n) { return static_cast<T*>(allocate_memory(n, sizeof(T))); }
_ZN5BotanneIhhEEbRKNS_16secure_allocatorIT_EERKNS1_IT0_EE:
   63|  17.3k|inline bool operator!=(const secure_allocator<T>& /*a*/, const secure_allocator<U>& /*b*/) {
   64|  17.3k|   return false;
   65|  17.3k|}
_ZN5BotanpLIhNS_16secure_allocatorIhEES2_EERNSt3__16vectorIT_T0_EES8_RKNS4_IS5_T1_EE:
   92|  2.47k|std::vector<T, Alloc>& operator+=(std::vector<T, Alloc>& out, const std::vector<T, Alloc2>& in) {
   93|  2.47k|   out.insert(out.end(), in.begin(), in.end());
   94|  2.47k|   return out;
   95|  2.47k|}

_ZNK5Botan18Sphincs_Parameters9hash_typeEv:
   71|     16|      Sphincs_Hash_Type hash_type() const { return m_hash_type; }
_ZNK5Botan18Sphincs_Parameters13parameter_setEv:
   76|     16|      Sphincs_Parameter_Set parameter_set() const { return m_set; }
_ZNK5Botan18Sphincs_Parameters1nEv:
   96|      8|      size_t n() const { return m_n; }
_ZNK5Botan18Sphincs_Parameters16public_key_bytesEv:
  195|     30|      uint32_t public_key_bytes() const { return m_n * 2; }
_ZNK5Botan18Sphincs_Parameters17private_key_bytesEv:
  200|     22|      uint32_t private_key_bytes() const { return m_n * 2 + public_key_bytes(); }

_ZN5Botan18unwrap_strong_typeIRmEEDcOT_:
  243|  50.5k|[[nodiscard]] constexpr decltype(auto) unwrap_strong_type(T&& t) {
  244|  50.5k|   if constexpr(!concepts::strong_type<std::remove_cvref_t<T>>) {
  245|       |      // If the parameter type isn't a strong type, return it as is.
  246|  50.5k|      return std::forward<T>(t);
  247|       |   } else {
  248|       |      // Unwrap the strong type and return the underlying value.
  249|       |      return std::forward<T>(t).get();
  250|       |   }
  251|  50.5k|}
_ZN5Botan16wrap_strong_typeImRmQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  268|   226k|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  269|   226k|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  270|       |      // Noop, if the parameter type already is the desired return type.
  271|   226k|      return std::forward<ParamT>(t);
  272|       |   } else if constexpr(std::constructible_from<T, ParamT>) {
  273|       |      // Implicit conversion from the parameter type to the return type.
  274|       |      return T{std::forward<ParamT>(t)};
  275|       |   } else {
  276|       |      // Explicitly calling the wrapped type's constructor to support
  277|       |      // implicit conversions on types that mark their constructors as explicit.
  278|       |      static_assert(concepts::strong_type<T> && std::constructible_from<typename T::wrapped_type, ParamT>);
  279|       |      return T{typename T::wrapped_type{std::forward<ParamT>(t)}};
  280|       |   }
  281|   226k|}
_ZNK5Botan6detail29Container_Strong_Adapter_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEE4sizeEv:
  141|    693|      size_type size() const noexcept(noexcept(this->get().size())) { return this->get().size(); }
_ZNKR5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEE3getEv:
   87|  1.17k|      constexpr const T& get() const& { return m_value; }
_ZN5Botan18unwrap_strong_typeIRNSt3__16vectorIhNS1_9allocatorIhEEEEEEDcOT_:
  243|     56|[[nodiscard]] constexpr decltype(auto) unwrap_strong_type(T&& t) {
  244|     56|   if constexpr(!concepts::strong_type<std::remove_cvref_t<T>>) {
  245|       |      // If the parameter type isn't a strong type, return it as is.
  246|     56|      return std::forward<T>(t);
  247|       |   } else {
  248|       |      // Unwrap the strong type and return the underlying value.
  249|       |      return std::forward<T>(t).get();
  250|       |   }
  251|     56|}
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEED2Ev:
   81|    650|      ~Strong_Base() = default;
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS_16secure_allocatorIhEEEEED2Ev:
   81|  1.21k|      ~Strong_Base() = default;
_ZNK5Botan6detail29Container_Strong_Adapter_BaseINSt3__16vectorIhNS_16secure_allocatorIhEEEEE4sizeEv:
  141|  1.12k|      size_type size() const noexcept(noexcept(this->get().size())) { return this->get().size(); }
_ZNKR5Botan6detail11Strong_BaseINSt3__16vectorIhNS_16secure_allocatorIhEEEEE3getEv:
   87|  1.81k|      constexpr const T& get() const& { return m_value; }
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2Ev:
   76|     32|      Strong_Base() = default;
_ZN5Botan6detail29Container_Strong_Adapter_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2INS2_11__wrap_iterIPKhEEEET_SD_:
  122|     32|      Container_Strong_Adapter_Base(InputIt begin, InputIt end) : Container_Strong_Adapter_Base(T(begin, end)) {}
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2ES6_:
   83|    325|      constexpr explicit Strong_Base(T v) : m_value(std::move(v)) {}
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEaSEOS7_:
   80|     32|      Strong_Base& operator=(Strong_Base&&) noexcept = default;
_ZN5Botan6detail29Container_Strong_Adapter_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2EmQsr8conceptsE19resizable_containerIT_E:
  119|    265|            : Container_Strong_Adapter_Base(T(size)) {}
_ZNR5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEE3getEv:
   85|    321|      constexpr T& get() & { return m_value; }
_ZN5Botan6detail29Container_Strong_Adapter_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEE3endEv:
  129|     28|      decltype(auto) end() noexcept(noexcept(this->get().end())) { return this->get().end(); }
_ZN5Botan18unwrap_strong_typeIRhEEDcOT_:
  243|    186|[[nodiscard]] constexpr decltype(auto) unwrap_strong_type(T&& t) {
  244|    186|   if constexpr(!concepts::strong_type<std::remove_cvref_t<T>>) {
  245|       |      // If the parameter type isn't a strong type, return it as is.
  246|    186|      return std::forward<T>(t);
  247|       |   } else {
  248|       |      // Unwrap the strong type and return the underlying value.
  249|       |      return std::forward<T>(t).get();
  250|       |   }
  251|    186|}
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2EOS7_:
   78|    293|      Strong_Base(Strong_Base&&) noexcept = default;
_ZNK5Botan6detail14Strong_AdapterINSt3__16vectorIhNS2_9allocatorIhEEEEE4dataEv:
  200|    400|      decltype(auto) data() const noexcept(noexcept(this->get().data())) { return this->get().data(); }
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS_16secure_allocatorIhEEEEEC2Ev:
   76|     32|      Strong_Base() = default;
_ZN5Botan6detail29Container_Strong_Adapter_BaseINSt3__16vectorIhNS_16secure_allocatorIhEEEEEC2INS2_11__wrap_iterIPKhEEEET_SD_:
  122|     88|      Container_Strong_Adapter_Base(InputIt begin, InputIt end) : Container_Strong_Adapter_Base(T(begin, end)) {}
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS_16secure_allocatorIhEEEEEC2ES6_:
   83|    517|      constexpr explicit Strong_Base(T v) : m_value(std::move(v)) {}
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS_16secure_allocatorIhEEEEEaSEOS7_:
   80|     32|      Strong_Base& operator=(Strong_Base&&) noexcept = default;
_ZNR5Botan6detail11Strong_BaseINSt3__16vectorIhNS_16secure_allocatorIhEEEEE3getEv:
   85|    344|      constexpr T& get() & { return m_value; }
_ZN5Botan6detail14Strong_AdapterINSt3__16vectorIhNS_16secure_allocatorIhEEEEE4dataEv:
  198|    344|      decltype(auto) data() noexcept(noexcept(this->get().data())) { return this->get().data(); }
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS_16secure_allocatorIhEEEEEC2EOS7_:
   78|    670|      Strong_Base(Strong_Base&&) noexcept = default;
_ZN5Botan6detail14Strong_AdapterINSt3__16vectorIhNS2_9allocatorIhEEEEE4dataEv:
  198|    265|      decltype(auto) data() noexcept(noexcept(this->get().data())) { return this->get().data(); }
_ZNK5Botan6detail14Strong_AdapterINSt3__16vectorIhNS_16secure_allocatorIhEEEEE4dataEv:
  200|    693|      decltype(auto) data() const noexcept(noexcept(this->get().data())) { return this->get().data(); }
_ZN5Botan6detail29Container_Strong_Adapter_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEE5beginEv:
  125|     28|      decltype(auto) begin() noexcept(noexcept(this->get().begin())) { return this->get().begin(); }
_ZN5Botan16wrap_strong_typeIjRjQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  268|  58.3k|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  269|  58.3k|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  270|       |      // Noop, if the parameter type already is the desired return type.
  271|  58.3k|      return std::forward<ParamT>(t);
  272|       |   } else if constexpr(std::constructible_from<T, ParamT>) {
  273|       |      // Implicit conversion from the parameter type to the return type.
  274|       |      return T{std::forward<ParamT>(t)};
  275|       |   } else {
  276|       |      // Explicitly calling the wrapped type's constructor to support
  277|       |      // implicit conversions on types that mark their constructors as explicit.
  278|       |      static_assert(concepts::strong_type<T> && std::constructible_from<typename T::wrapped_type, ParamT>);
  279|       |      return T{typename T::wrapped_type{std::forward<ParamT>(t)}};
  280|       |   }
  281|  58.3k|}
_ZN5Botan16wrap_strong_typeItRtQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  268|  2.90k|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  269|  2.90k|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  270|       |      // Noop, if the parameter type already is the desired return type.
  271|  2.90k|      return std::forward<ParamT>(t);
  272|       |   } else if constexpr(std::constructible_from<T, ParamT>) {
  273|       |      // Implicit conversion from the parameter type to the return type.
  274|       |      return T{std::forward<ParamT>(t)};
  275|       |   } else {
  276|       |      // Explicitly calling the wrapped type's constructor to support
  277|       |      // implicit conversions on types that mark their constructors as explicit.
  278|       |      static_assert(concepts::strong_type<T> && std::constructible_from<typename T::wrapped_type, ParamT>);
  279|       |      return T{typename T::wrapped_type{std::forward<ParamT>(t)}};
  280|       |   }
  281|  2.90k|}
_ZN5Botan18unwrap_strong_typeIRtEEDcOT_:
  243|    325|[[nodiscard]] constexpr decltype(auto) unwrap_strong_type(T&& t) {
  244|    325|   if constexpr(!concepts::strong_type<std::remove_cvref_t<T>>) {
  245|       |      // If the parameter type isn't a strong type, return it as is.
  246|    325|      return std::forward<T>(t);
  247|       |   } else {
  248|       |      // Unwrap the strong type and return the underlying value.
  249|       |      return std::forward<T>(t).get();
  250|       |   }
  251|    325|}
_ZN5Botan6detail29Container_Strong_Adapter_BaseINSt3__16vectorIhNS_16secure_allocatorIhEEEEEC2EmQsr8conceptsE19resizable_containerIT_E:
  119|    344|            : Container_Strong_Adapter_Base(T(size)) {}
_ZNK5Botan6detail29Container_Strong_Adapter_BaseINSt3__15arrayIhLm56EEEE5beginEv:
  127|      1|      decltype(auto) begin() const noexcept(noexcept(this->get().begin())) { return this->get().begin(); }
_ZNK5Botan6detail29Container_Strong_Adapter_BaseINSt3__15arrayIhLm56EEEE3endEv:
  131|      1|      decltype(auto) end() const noexcept(noexcept(this->get().end())) { return this->get().end(); }
_ZNK5Botan6detail14Strong_AdapterINSt3__15arrayIhLm56EEEE4dataEv:
  200|      2|      decltype(auto) data() const noexcept(noexcept(this->get().data())) { return this->get().data(); }
_ZNK5Botan6detail29Container_Strong_Adapter_BaseINSt3__15arrayIhLm56EEEE4sizeEv:
  141|      2|      size_type size() const noexcept(noexcept(this->get().size())) { return this->get().size(); }
_ZN5Botan6detail14Strong_AdapterINSt3__15arrayIhLm56EEEE4dataEv:
  198|      1|      decltype(auto) data() noexcept(noexcept(this->get().data())) { return this->get().data(); }
_ZNR5Botan6detail11Strong_BaseINSt3__15arrayIhLm56EEEE3getEv:
   85|      3|      constexpr T& get() & { return m_value; }
_ZN5Botan6detail29Container_Strong_Adapter_BaseINSt3__15arrayIhLm56EEEEixIiEEDcOT_:
  167|      2|      decltype(auto) operator[](U&& i) noexcept(noexcept(this->get().operator[](i))) {
  168|      2|         return this->get()[std::forward<U>(i)];
  169|      2|      }
_ZNKR5Botan6detail11Strong_BaseINSt3__15arrayIhLm56EEEE3getEv:
   87|    456|      constexpr const T& get() const& { return m_value; }
_ZNK5Botan6detail29Container_Strong_Adapter_BaseINSt3__15arrayIhLm56EEEEixImEEDcOT_:
  162|    448|      decltype(auto) operator[](U&& i) const noexcept(noexcept(this->get().operator[](i))) {
  163|    448|         return this->get()[std::forward<U>(i)];
  164|    448|      }
_ZN5Botan6detail11Strong_BaseINSt3__15arrayIhLm56EEEEC2ES4_:
   83|      1|      constexpr explicit Strong_Base(T v) : m_value(std::move(v)) {}
_ZNK5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS2_9allocatorIhEEEENS_29DilithiumSerializedPublicKey_EJEEEE4dataEv:
  712|     79|      decltype(auto) data() const noexcept(noexcept(this->m_span.data())) { return this->m_span.data(); }
_ZNK5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS2_9allocatorIhEEEENS_29DilithiumSerializedPublicKey_EJEEEE4sizeEv:
  714|     79|      decltype(auto) size() const noexcept(noexcept(this->m_span.size())) { return this->m_span.size(); }
_ZN5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS2_9allocatorIhEEEENS_29DilithiumSerializedPublicKey_EJEEEEC2ERS9_:
  675|     79|      StrongSpan(T& strong) : m_span(strong) {}
_ZNK5Botan6detail29Container_Strong_Adapter_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEE5emptyEvQsr8conceptsE9has_emptyIT_E:
  145|     79|      {
  146|     79|         return this->get().empty();
  147|     79|      }
_ZN5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS2_9allocatorIhEEEENS_20DilithiumPublicSeed_EJEEEEC2ERS9_:
  675|    158|      StrongSpan(T& strong) : m_span(strong) {}
_ZN5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_22DilithiumSeedRhoPrime_EJEEEEC2ERS9_:
  675|     79|      StrongSpan(T& strong) : m_span(strong) {}
_ZN5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_24DilithiumSeedRandomness_EJEEEE4dataEv:
  710|     79|      decltype(auto) data() noexcept(noexcept(this->m_span.data())) { return this->m_span.data(); }
_ZNK5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_24DilithiumSeedRandomness_EJEEEE4sizeEv:
  714|     79|      decltype(auto) size() const noexcept(noexcept(this->m_span.size())) { return this->m_span.size(); }
_ZN5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS2_9allocatorIhEEEENS_20DilithiumPublicSeed_EJEEEE4dataEv:
  710|  2.98k|      decltype(auto) data() noexcept(noexcept(this->m_span.data())) { return this->m_span.data(); }
_ZNK5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS2_9allocatorIhEEEENS_20DilithiumPublicSeed_EJEEEE4sizeEv:
  714|  2.98k|      decltype(auto) size() const noexcept(noexcept(this->m_span.size())) { return this->m_span.size(); }
_ZN5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_22DilithiumSeedRhoPrime_EJEEEE4dataEv:
  710|    941|      decltype(auto) data() noexcept(noexcept(this->m_span.data())) { return this->m_span.data(); }
_ZNK5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_22DilithiumSeedRhoPrime_EJEEEE4sizeEv:
  714|    941|      decltype(auto) size() const noexcept(noexcept(this->m_span.size())) { return this->m_span.size(); }
_ZN5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_24DilithiumSeedRandomness_EJEEEEC2ERS9_:
  675|     79|      StrongSpan(T& strong) : m_span(strong) {}
_ZN5Botan6detail14Strong_AdapterINSt3__16vectorIhNS_16secure_allocatorIhEEEEEC2ENS2_4spanIKhLm18446744073709551615EEE:
  188|     85|            Strong_Adapter(T(span.begin(), span.end())) {}
_ZN5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS2_9allocatorIhEEEENS_13KyberSeedRho_EJEEEEC2ERS9_:
  675|     28|      StrongSpan(T& strong) : m_span(strong) {}
_ZN5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS2_9allocatorIhEEEENS_25KyberSerializedPublicKey_EJEEEE4dataEv:
  710|     28|      decltype(auto) data() noexcept(noexcept(this->m_span.data())) { return this->m_span.data(); }
_ZNK5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS2_9allocatorIhEEEENS_25KyberSerializedPublicKey_EJEEEE4sizeEv:
  714|     28|      decltype(auto) size() const noexcept(noexcept(this->m_span.size())) { return this->m_span.size(); }
_ZN5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS2_9allocatorIhEEEENS_13KyberSeedRho_EJEEEE4dataEv:
  710|    325|      decltype(auto) data() noexcept(noexcept(this->m_span.data())) { return this->m_span.data(); }
_ZNK5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS2_9allocatorIhEEEENS_13KyberSeedRho_EJEEEE4sizeEv:
  714|    353|      decltype(auto) size() const noexcept(noexcept(this->m_span.size())) { return this->m_span.size(); }
_ZNK5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_20KyberSeedRandomness_EJEEEE4dataEv:
  712|     28|      decltype(auto) data() const noexcept(noexcept(this->m_span.data())) { return this->m_span.data(); }
_ZNK5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_20KyberSeedRandomness_EJEEEE4sizeEv:
  714|     28|      decltype(auto) size() const noexcept(noexcept(this->m_span.size())) { return this->m_span.size(); }
_ZN5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_24KyberSamplingRandomness_EJEEEE4dataEv:
  710|    186|      decltype(auto) data() noexcept(noexcept(this->m_span.data())) { return this->m_span.data(); }
_ZNK5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_24KyberSamplingRandomness_EJEEEE4sizeEv:
  714|    186|      decltype(auto) size() const noexcept(noexcept(this->m_span.size())) { return this->m_span.size(); }
_ZN5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_20KyberSeedRandomness_EJEEEEC2ERS9_:
  675|     28|      StrongSpan(T& strong) : m_span(strong) {}
_ZN5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_15KyberSeedSigma_EJEEEEC2ERS9_:
  675|     28|      StrongSpan(T& strong) : m_span(strong) {}
_ZN5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_15KyberSeedSigma_EJEEEE3getEv:
  708|    186|      underlying_span get() { return m_span; }
_ZN5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_24KyberSamplingRandomness_EJEEEEC2ERS9_:
  675|    186|      StrongSpan(T& strong) : m_span(strong) {}
_ZN5Botan10StrongSpanIKNS_6StrongINSt3__16vectorIhNS2_9allocatorIhEEEENS_25KyberSerializedPublicKey_EJEEEEC2ERS9_:
  675|     28|      StrongSpan(T& strong) : m_span(strong) {}

_ZN5Botan24Key_Length_SpecificationC2Em:
   28|  4.51k|      explicit Key_Length_Specification(size_t keylen) : m_min_keylen(keylen), m_max_keylen(keylen), m_keylen_mod(1) {}
_ZNK5Botan24Key_Length_Specification15valid_keylengthEm:
   43|  4.51k|      bool valid_keylength(size_t length) const {
   44|  4.51k|         return ((length >= m_min_keylen) && (length <= m_max_keylen) && (length % m_keylen_mod == 0));
  ------------------
  |  Branch (44:18): [True: 4.51k, False: 0]
  |  Branch (44:46): [True: 4.51k, False: 0]
  |  Branch (44:74): [True: 4.51k, False: 0]
  ------------------
   45|  4.51k|      }

_ZN5Botan16X25519_PublicKeyC2Ev:
   57|      9|      X25519_PublicKey() = default;

_ZN5Botan14X448_PublicKeyC2Ev:
   62|      1|      X448_PublicKey() = default;

_ZN5Botan3XOF5clearEv:
   64|    511|      void clear() {
   65|    511|         m_xof_started = false;
   66|    511|         reset();
   67|    511|      }
_ZN5Botan3XOF6updateENSt3__14spanIKhLm18446744073709551615EEE:
  140|  8.94k|      void update(std::span<const uint8_t> input) {
  141|  8.94k|         if(!m_xof_started) {
  ------------------
  |  Branch (141:13): [True: 4.51k, False: 4.43k]
  ------------------
  142|       |            // If the user didn't start() before the first input, we enforce
  143|       |            // it with a default value, here.
  144|  4.51k|            start();
  145|  4.51k|         }
  146|  8.94k|         add_data(input);
  147|  8.94k|      }
_ZN5Botan3XOFD2Ev:
   31|  4.05k|      virtual ~XOF() = default;
_ZNK5Botan3XOF8key_specEv:
   97|  4.51k|      virtual Key_Length_Specification key_spec() const {
   98|       |         // Keys are not supported by default
   99|  4.51k|         return Key_Length_Specification(0);
  100|  4.51k|      }
_ZNK5Botan3XOF17valid_salt_lengthEm:
   89|  4.51k|      virtual bool valid_salt_length(size_t salt_len) const {
   90|       |         // Salts are not supported by default
   91|  4.51k|         return salt_len == 0;
   92|  4.51k|      }
_ZN5Botan3XOF6outputITkNS_8concepts21resizable_byte_bufferENS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS_25DilithiumHashedPublicKey_EJEEEEET_m:
  153|     79|      T output(size_t bytes) {
  154|     79|         T out(bytes);
  155|     79|         generate_bytes(out);
  156|     79|         return out;
  157|     79|      }
_ZN5Botan3XOF6outputITkNS_8concepts21resizable_byte_bufferENS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS_20DilithiumPublicSeed_EJEEEEET_m:
  153|     79|      T output(size_t bytes) {
  154|     79|         T out(bytes);
  155|     79|         generate_bytes(out);
  156|     79|         return out;
  157|     79|      }
_ZN5Botan3XOF6outputITkNS_8concepts21resizable_byte_bufferENS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_22DilithiumSeedRhoPrime_EJEEEEET_m:
  153|     79|      T output(size_t bytes) {
  154|     79|         T out(bytes);
  155|     79|         generate_bytes(out);
  156|     79|         return out;
  157|     79|      }
_ZN5Botan3XOF6outputITkNS_8concepts21resizable_byte_bufferENS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_15DilithiumSeedK_EJEEEEET_m:
  153|     79|      T output(size_t bytes) {
  154|     79|         T out(bytes);
  155|     79|         generate_bytes(out);
  156|     79|         return out;
  157|     79|      }
_ZN5Botan3XOF6outputILm1EEENSt3__15arrayIhXT_EEEv:
  163|   168k|      std::array<uint8_t, count> output() {
  164|   168k|         std::array<uint8_t, count> out;  // NOLINT(*-member-init)
  165|   168k|         generate_bytes(out);
  166|   168k|         return out;
  167|   168k|      }
_ZN5Botan3XOF6outputILm3EEENSt3__15arrayIhXT_EEEv:
  163|   795k|      std::array<uint8_t, count> output() {
  164|   795k|         std::array<uint8_t, count> out;  // NOLINT(*-member-init)
  165|   795k|         generate_bytes(out);
  166|   795k|         return out;
  167|   795k|      }
_ZN5Botan3XOF6outputITkNS_8concepts21resizable_byte_bufferENS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_24KyberSamplingRandomness_EJEEEEET_m:
  153|    186|      T output(size_t bytes) {
  154|    186|         T out(bytes);
  155|    186|         generate_bytes(out);
  156|    186|         return out;
  157|    186|      }

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|  7.28k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t in[], size_t len) {
   40|  7.28k|   if(len <= max_fuzzer_input_size) {
  ------------------
  |  Branch (40:7): [True: 7.28k, False: 1]
  ------------------
   41|  7.28k|      try {
   42|  7.28k|         fuzz(std::span<const uint8_t>(in, len));
   43|  7.28k|      } 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|  7.28k|   }
   51|  7.28k|   return 0;
   52|  7.28k|}

_Z4fuzzNSt3__14spanIKhLm18446744073709551615EEE:
   14|  7.28k|void fuzz(std::span<const uint8_t> in) {
   15|  7.28k|   try {
   16|  7.28k|      Botan::DataSource_Memory input(in);
   17|  7.28k|      Botan::PKCS8::load_key(input);
   18|  7.28k|   } catch(const Botan::Exception& e) {}
   19|       |
   20|       |   /*
   21|       |   * This avoids OOMs in OSS-Fuzz caused by storing precomputations
   22|       |   * for thousands of curves randomly generated by the fuzzer.
   23|       |   *
   24|       |   * TODO(Botan4) we can remove this call once support for explicit curves
   25|       |   * is removed
   26|       |   */
   27|  7.28k|   Botan::EC_Group::clear_registered_curve_data();
   28|  7.28k|}

_ZNK5Botan19AlgorithmIdentifier19parameters_are_nullEv:
   50|  4.24k|bool AlgorithmIdentifier::parameters_are_null() const {
   51|  4.24k|   return (m_parameters.size() == 2 && (m_parameters[0] == 0x05) && (m_parameters[1] == 0x00));
  ------------------
  |  Branch (51:12): [True: 27, False: 4.22k]
  |  Branch (51:40): [True: 9, False: 18]
  |  Branch (51:69): [True: 3, False: 6]
  ------------------
   52|  4.24k|}
_ZN5Botan19AlgorithmIdentifier11decode_fromERNS_11BER_DecoderE:
   83|  6.39k|void AlgorithmIdentifier::decode_from(BER_Decoder& codec) {
   84|  6.39k|   codec.start_sequence().decode(m_oid).raw_bytes(m_parameters).end_cons();
   85|       |
   86|       |   /*
   87|       |   * The parameters field is OPTIONAL ANY but in practice it is one of
   88|       |   * - empty
   89|       |   * - NULL
   90|       |   * - SEQUENCE
   91|       |   * - OBJECT IDENTIFIER (namedCurve)
   92|       |   * - OCTET STRING (CBC IV in PBES2)
   93|       |   *
   94|       |   * So require it be exactly one of these values. In particular this ensures that
   95|       |   * there is not any additional trailing data (eg after the SEQUENCE encoding)
   96|       |   * that might be otherwise skipped over by a reader.
   97|       |   */
   98|       |
   99|  6.39k|   const bool acceptable_parameters = [&]() {
  100|  6.39k|      if(this->parameters_are_null_or_empty()) {
  101|  6.39k|         return true;
  102|  6.39k|      }
  103|  6.39k|      if(ASN1::is_der_sequence_header(m_parameters)) {
  104|  6.39k|         return true;
  105|  6.39k|      }
  106|  6.39k|      if(ASN1::is_single_der_object(m_parameters, ASN1_Type::ObjectId, ASN1_Class::Universal)) {
  107|  6.39k|         return true;
  108|  6.39k|      }
  109|  6.39k|      if(ASN1::is_single_der_object(m_parameters, ASN1_Type::OctetString, ASN1_Class::Universal)) {
  110|  6.39k|         return true;
  111|  6.39k|      }
  112|  6.39k|      return false;
  113|  6.39k|   }();
  114|       |
  115|  6.39k|   if(!acceptable_parameters) {
  ------------------
  |  Branch (115:7): [True: 132, False: 6.26k]
  ------------------
  116|    132|      throw Decoding_Error("AlgorithmIdentifier parameters were not NULL, a SEQUENCE, an OID, or an OCTET STRING");
  117|    132|   }
  118|  6.39k|}
alg_id.cpp:_ZZN5Botan19AlgorithmIdentifier11decode_fromERNS_11BER_DecoderEENK3$_0clEv:
   99|  6.28k|   const bool acceptable_parameters = [&]() {
  100|  6.28k|      if(this->parameters_are_null_or_empty()) {
  ------------------
  |  Branch (100:10): [True: 2.03k, False: 4.24k]
  ------------------
  101|  2.03k|         return true;
  102|  2.03k|      }
  103|  4.24k|      if(ASN1::is_der_sequence_header(m_parameters)) {
  ------------------
  |  Branch (103:10): [True: 1.41k, False: 2.82k]
  ------------------
  104|  1.41k|         return true;
  105|  1.41k|      }
  106|  2.82k|      if(ASN1::is_single_der_object(m_parameters, ASN1_Type::ObjectId, ASN1_Class::Universal)) {
  ------------------
  |  Branch (106:10): [True: 2.68k, False: 143]
  ------------------
  107|  2.68k|         return true;
  108|  2.68k|      }
  109|    143|      if(ASN1::is_single_der_object(m_parameters, ASN1_Type::OctetString, ASN1_Class::Universal)) {
  ------------------
  |  Branch (109:10): [True: 11, False: 132]
  ------------------
  110|     11|         return true;
  111|     11|      }
  112|    132|      return false;
  113|    143|   }();

_ZN5Botan14ASN1_BitStringC2ENSt3__16vectorIhNS1_9allocatorIhEEEEm:
   29|    935|      m_bytes(std::move(bytes)), m_unused_bits(unused_bits) {
   30|    935|   if(m_unused_bits >= 8) {
  ------------------
  |  Branch (30:7): [True: 0, False: 935]
  ------------------
   31|      0|      throw Invalid_Argument("ASN1_BitString: Invalid unused bit count");
   32|      0|   }
   33|       |
   34|    935|   if(m_bytes.empty() && m_unused_bits != 0) {
  ------------------
  |  Branch (34:7): [True: 1, False: 934]
  |  Branch (34:26): [True: 0, False: 1]
  ------------------
   35|      0|      throw Invalid_Argument("ASN1_BitString: Empty BIT STRING cannot have unused bits");
   36|      0|   }
   37|       |
   38|    935|   if(m_unused_bits > 0 && (m_bytes.back() & ((1U << m_unused_bits) - 1)) != 0) {
  ------------------
  |  Branch (38:7): [True: 2, False: 933]
  |  Branch (38:28): [True: 0, False: 2]
  ------------------
   39|      0|      throw Invalid_Argument("ASN1_BitString: Unused bits must be zero");
   40|      0|   }
   41|    935|}
_ZN5Botan10BER_ObjectD2Ev:
   58|   140k|BER_Object::~BER_Object() {
   59|   140k|   secure_scrub_memory(m_value);
   60|   140k|}
_ZNK5Botan10BER_Object11assert_is_aENS_9ASN1_TypeENS_10ASN1_ClassENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   65|  49.8k|void BER_Object::assert_is_a(ASN1_Type expected_type_tag, ASN1_Class expected_class_tag, std::string_view descr) const {
   66|  49.8k|   if(!this->is_a(expected_type_tag, expected_class_tag)) {
  ------------------
  |  Branch (66:7): [True: 284, False: 49.5k]
  ------------------
   67|    284|      std::stringstream msg;
   68|       |
   69|    284|      msg << "Tag mismatch when decoding " << descr << " got ";
   70|       |
   71|    284|      if(m_class_tag == ASN1_Class::NoObject && m_type_tag == ASN1_Type::NoObject) {
  ------------------
  |  Branch (71:10): [True: 107, False: 177]
  |  Branch (71:49): [True: 107, False: 0]
  ------------------
   72|    107|         msg << "EOF";
   73|    177|      } else {
   74|    177|         if(m_class_tag == ASN1_Class::Universal || m_class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (74:13): [True: 65, False: 112]
  |  Branch (74:53): [True: 79, False: 33]
  ------------------
   75|    144|            msg << asn1_tag_to_string(m_type_tag);
   76|    144|         } else {
   77|     33|            msg << std::to_string(static_cast<uint32_t>(m_type_tag));
   78|     33|         }
   79|       |
   80|    177|         msg << "/" << asn1_class_to_string(m_class_tag);
   81|    177|      }
   82|       |
   83|    284|      msg << " expected ";
   84|       |
   85|    284|      if(expected_class_tag == ASN1_Class::Universal || expected_class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (85:10): [True: 242, False: 42]
  |  Branch (85:57): [True: 42, False: 0]
  ------------------
   86|    284|         msg << asn1_tag_to_string(expected_type_tag);
   87|    284|      } else {
   88|      0|         msg << std::to_string(static_cast<uint32_t>(expected_type_tag));
   89|      0|      }
   90|       |
   91|    284|      msg << "/" << asn1_class_to_string(expected_class_tag);
   92|       |
   93|    284|      throw BER_Decoding_Error(msg.str());
   94|    284|   }
   95|  49.8k|}
_ZNK5Botan10BER_Object4is_aENS_9ASN1_TypeENS_10ASN1_ClassE:
   97|  56.7k|bool BER_Object::is_a(ASN1_Type expected_type_tag, ASN1_Class expected_class_tag) const {
   98|  56.7k|   return (m_type_tag == expected_type_tag && m_class_tag == expected_class_tag);
  ------------------
  |  Branch (98:12): [True: 52.5k, False: 4.10k]
  |  Branch (98:47): [True: 52.5k, False: 12]
  ------------------
   99|  56.7k|}
_ZN5Botan10BER_Object11set_taggingENS_9ASN1_TypeENS_10ASN1_ClassE:
  105|  66.0k|void BER_Object::set_tagging(ASN1_Type type_tag, ASN1_Class class_tag) {
  106|  66.0k|   m_type_tag = type_tag;
  107|  66.0k|   m_class_tag = class_tag;
  108|  66.0k|}
_ZN5Botan20asn1_class_to_stringENS_10ASN1_ClassE:
  110|    461|std::string asn1_class_to_string(ASN1_Class type) {
  111|    461|   switch(type) {
  112|    307|      case ASN1_Class::Universal:
  ------------------
  |  Branch (112:7): [True: 307, False: 154]
  ------------------
  113|    307|         return "UNIVERSAL";
  114|    121|      case ASN1_Class::Constructed:
  ------------------
  |  Branch (114:7): [True: 121, False: 340]
  ------------------
  115|    121|         return "CONSTRUCTED";
  116|     13|      case ASN1_Class::ContextSpecific:
  ------------------
  |  Branch (116:7): [True: 13, False: 448]
  ------------------
  117|     13|         return "CONTEXT_SPECIFIC";
  118|      3|      case ASN1_Class::Application:
  ------------------
  |  Branch (118:7): [True: 3, False: 458]
  ------------------
  119|      3|         return "APPLICATION";
  120|      4|      case ASN1_Class::Private:
  ------------------
  |  Branch (120:7): [True: 4, False: 457]
  ------------------
  121|      4|         return "PRIVATE";
  122|      0|      case ASN1_Class::NoObject:
  ------------------
  |  Branch (122:7): [True: 0, False: 461]
  ------------------
  123|      0|         return "NO_OBJECT";
  124|     13|      default:
  ------------------
  |  Branch (124:7): [True: 13, False: 448]
  ------------------
  125|     13|         return "CLASS(" + std::to_string(static_cast<size_t>(type)) + ")";
  126|    461|   }
  127|    461|}
_ZN5Botan18asn1_tag_to_stringENS_9ASN1_TypeE:
  129|    435|std::string asn1_tag_to_string(ASN1_Type type) {
  130|    435|   switch(type) {
  131|     45|      case ASN1_Type::Sequence:
  ------------------
  |  Branch (131:7): [True: 45, False: 390]
  ------------------
  132|     45|         return "SEQUENCE";
  133|       |
  134|      4|      case ASN1_Type::Set:
  ------------------
  |  Branch (134:7): [True: 4, False: 431]
  ------------------
  135|      4|         return "SET";
  136|       |
  137|      3|      case ASN1_Type::PrintableString:
  ------------------
  |  Branch (137:7): [True: 3, False: 432]
  ------------------
  138|      3|         return "PRINTABLE STRING";
  139|       |
  140|      2|      case ASN1_Type::NumericString:
  ------------------
  |  Branch (140:7): [True: 2, False: 433]
  ------------------
  141|      2|         return "NUMERIC STRING";
  142|       |
  143|      1|      case ASN1_Type::Ia5String:
  ------------------
  |  Branch (143:7): [True: 1, False: 434]
  ------------------
  144|      1|         return "IA5 STRING";
  145|       |
  146|      1|      case ASN1_Type::TeletexString:
  ------------------
  |  Branch (146:7): [True: 1, False: 434]
  ------------------
  147|      1|         return "T61 STRING";
  148|       |
  149|      1|      case ASN1_Type::Utf8String:
  ------------------
  |  Branch (149:7): [True: 1, False: 434]
  ------------------
  150|      1|         return "UTF8 STRING";
  151|       |
  152|      1|      case ASN1_Type::VisibleString:
  ------------------
  |  Branch (152:7): [True: 1, False: 434]
  ------------------
  153|      1|         return "VISIBLE STRING";
  154|       |
  155|      2|      case ASN1_Type::BmpString:
  ------------------
  |  Branch (155:7): [True: 2, False: 433]
  ------------------
  156|      2|         return "BMP STRING";
  157|       |
  158|      1|      case ASN1_Type::UniversalString:
  ------------------
  |  Branch (158:7): [True: 1, False: 434]
  ------------------
  159|      1|         return "UNIVERSAL STRING";
  160|       |
  161|      1|      case ASN1_Type::UtcTime:
  ------------------
  |  Branch (161:7): [True: 1, False: 434]
  ------------------
  162|      1|         return "UTC TIME";
  163|       |
  164|      1|      case ASN1_Type::GeneralizedTime:
  ------------------
  |  Branch (164:7): [True: 1, False: 434]
  ------------------
  165|      1|         return "GENERALIZED TIME";
  166|       |
  167|     20|      case ASN1_Type::OctetString:
  ------------------
  |  Branch (167:7): [True: 20, False: 415]
  ------------------
  168|     20|         return "OCTET STRING";
  169|       |
  170|      3|      case ASN1_Type::BitString:
  ------------------
  |  Branch (170:7): [True: 3, False: 432]
  ------------------
  171|      3|         return "BIT STRING";
  172|       |
  173|      2|      case ASN1_Type::Enumerated:
  ------------------
  |  Branch (173:7): [True: 2, False: 433]
  ------------------
  174|      2|         return "ENUMERATED";
  175|       |
  176|    228|      case ASN1_Type::Integer:
  ------------------
  |  Branch (176:7): [True: 228, False: 207]
  ------------------
  177|    228|         return "INTEGER";
  178|       |
  179|      1|      case ASN1_Type::Null:
  ------------------
  |  Branch (179:7): [True: 1, False: 434]
  ------------------
  180|      1|         return "NULL";
  181|       |
  182|      3|      case ASN1_Type::ObjectId:
  ------------------
  |  Branch (182:7): [True: 3, False: 432]
  ------------------
  183|      3|         return "OBJECT";
  184|       |
  185|      1|      case ASN1_Type::Boolean:
  ------------------
  |  Branch (185:7): [True: 1, False: 434]
  ------------------
  186|      1|         return "BOOLEAN";
  187|       |
  188|      6|      case ASN1_Type::NoObject:
  ------------------
  |  Branch (188:7): [True: 6, False: 429]
  ------------------
  189|      6|         return "NO_OBJECT";
  190|       |
  191|    108|      default:
  ------------------
  |  Branch (191:7): [True: 108, False: 327]
  ------------------
  192|    108|         return "TAG(" + std::to_string(static_cast<uint32_t>(type)) + ")";
  193|    435|   }
  194|    435|}
_ZN5Botan18BER_Decoding_ErrorC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  199|    912|BER_Decoding_Error::BER_Decoding_Error(std::string_view err) : Decoding_Error(fmt("BER: {}", err)) {}
_ZN5Botan11BER_Bad_TagC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEj:
  201|     57|BER_Bad_Tag::BER_Bad_Tag(std::string_view str, uint32_t tagging) : BER_Decoding_Error(fmt("{}: {}", str, tagging)) {}
_ZN5Botan4ASN19maybe_BERERNS_10DataSourceE:
  231|  7.28k|bool maybe_BER(DataSource& source) {
  232|  7.28k|   uint8_t first_u8 = 0;
  233|  7.28k|   if(source.peek_byte(first_u8) == 0) {
  ------------------
  |  Branch (233:7): [True: 0, False: 7.28k]
  ------------------
  234|      0|      BOTAN_ASSERT_EQUAL(source.read_byte(first_u8), 0, "Expected EOF");
  ------------------
  |  |   90|      0|   do {                                                                                                \
  |  |   91|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                                    \
  |  |   92|      0|      if((expr1) != (expr2)) {                                                                         \
  |  |  ------------------
  |  |  |  Branch (92:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   93|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                           \
  |  |   94|      0|         Botan::assertion_failure(#expr1 " == " #expr2, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   95|      0|      }                                                                                                \
  |  |   96|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (96:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  235|      0|      throw Stream_IO_Error("ASN1::maybe_BER: Source was empty");
  236|      0|   }
  237|       |
  238|  7.28k|   const auto cons_seq = static_cast<uint8_t>(ASN1_Class::Constructed) | static_cast<uint8_t>(ASN1_Type::Sequence);
  239|  7.28k|   return first_u8 == cons_seq;
  240|  7.28k|}

_ZN5Botan3OID11from_stringENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   80|     16|OID OID::from_string(std::string_view str) {
   81|     16|   if(str.empty()) {
  ------------------
  |  Branch (81:7): [True: 0, False: 16]
  ------------------
   82|      0|      throw Invalid_Argument("OID::from_string argument must be non-empty");
   83|      0|   }
   84|       |
   85|     16|   OID o = OID_Map::global_registry().str2oid(str);
   86|     16|   if(o.has_value()) {
  ------------------
  |  Branch (86:7): [True: 16, False: 0]
  ------------------
   87|     16|      return o;
   88|     16|   }
   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|  42.3k|OID::OID(std::initializer_list<uint32_t> init) : m_id(init) {
   99|  42.3k|   oid_valid_check(m_id);
  100|  42.3k|}
_ZNK5Botan3OID9to_stringEv:
  123|  1.83k|std::string OID::to_string() const {
  124|  1.83k|   std::ostringstream out;
  125|       |
  126|  25.1k|   for(size_t i = 0; i != m_id.size(); ++i) {
  ------------------
  |  Branch (126:22): [True: 23.3k, False: 1.83k]
  ------------------
  127|       |      // avoid locale issues with integer formatting
  128|  23.3k|      out << std::to_string(m_id[i]);
  129|  23.3k|      if(i != m_id.size() - 1) {
  ------------------
  |  Branch (129:10): [True: 21.4k, False: 1.83k]
  ------------------
  130|  21.4k|         out << ".";
  131|  21.4k|      }
  132|  23.3k|   }
  133|       |
  134|  1.83k|   return out.str();
  135|  1.83k|}
_ZNK5Botan3OID15registered_nameEv:
  149|  13.4k|std::optional<std::string> OID::registered_name() const {
  150|  13.4k|   return OID_Map::global_registry().oid2str(*this);
  151|  13.4k|}
_ZNK5Botan3OID7matchesESt16initializer_listIjE:
  157|  12.0k|bool OID::matches(std::initializer_list<uint32_t> other) const {
  158|       |   // TODO: once all target compilers support it, use std::ranges::equal
  159|  12.0k|   return std::equal(m_id.begin(), m_id.end(), other.begin(), other.end());
  160|  12.0k|}
_ZNK5Botan3OID9hash_codeEv:
  162|  15.1k|uint64_t OID::hash_code() const {
  163|       |   // If this is changed also update gen_oids.py to match
  164|  15.1k|   uint64_t hash = 0x621F302327D9A49A;
  165|   110k|   for(auto id : m_id) {
  ------------------
  |  Branch (165:16): [True: 110k, False: 15.1k]
  ------------------
  166|   110k|      hash *= 193;
  167|   110k|      hash += id;
  168|   110k|   }
  169|  15.1k|   return hash;
  170|  15.1k|}
_ZNK5Botan3OID11encode_intoERNS_11DER_EncoderE:
  185|  2.79k|void OID::encode_into(DER_Encoder& der) const {
  186|  2.79k|   if(m_id.size() < 2) {
  ------------------
  |  Branch (186:7): [True: 0, False: 2.79k]
  ------------------
  187|      0|      throw Invalid_Argument("OID::encode_into: OID is invalid");
  188|      0|   }
  189|       |
  190|  2.79k|   auto append = [](std::vector<uint8_t>& encoding, uint32_t z) {
  191|  2.79k|      if(z <= 0x7F) {
  192|  2.79k|         encoding.push_back(static_cast<uint8_t>(z));
  193|  2.79k|      } else {
  194|  2.79k|         const size_t z7 = (high_bit(z) + 7 - 1) / 7;
  195|       |
  196|  2.79k|         for(size_t j = 0; j != z7; ++j) {
  197|  2.79k|            uint8_t zp = static_cast<uint8_t>(z >> (7 * (z7 - j - 1)) & 0x7F);
  198|       |
  199|  2.79k|            if(j != z7 - 1) {
  200|  2.79k|               zp |= 0x80;
  201|  2.79k|            }
  202|       |
  203|  2.79k|            encoding.push_back(zp);
  204|  2.79k|         }
  205|  2.79k|      }
  206|  2.79k|   };
  207|       |
  208|  2.79k|   std::vector<uint8_t> encoding;
  209|       |
  210|       |   // We know 40 * root can't overflow because root is between 0 and 2
  211|  2.79k|   auto first = checked_add(40 * m_id[0], m_id[1]);
  212|  2.79k|   BOTAN_ASSERT_NOMSG(first.has_value());
  ------------------
  |  |   77|  2.79k|   do {                                                                     \
  |  |   78|  2.79k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  2.79k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 2.79k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  2.79k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 2.79k]
  |  |  ------------------
  ------------------
  213|       |
  214|  2.79k|   append(encoding, *first);
  215|       |
  216|  14.5k|   for(size_t i = 2; i != m_id.size(); ++i) {
  ------------------
  |  Branch (216:22): [True: 11.8k, False: 2.79k]
  ------------------
  217|  11.8k|      append(encoding, m_id[i]);
  218|  11.8k|   }
  219|  2.79k|   der.add_object(ASN1_Type::ObjectId, ASN1_Class::Universal, encoding);
  220|  2.79k|}
_ZN5Botan3OID11decode_fromERNS_11BER_DecoderE:
  225|  11.1k|void OID::decode_from(BER_Decoder& decoder) {
  226|  11.1k|   const BER_Object obj = decoder.get_next_object();
  227|  11.1k|   if(obj.tagging() != (ASN1_Class::Universal | ASN1_Type::ObjectId)) {
  ------------------
  |  Branch (227:7): [True: 57, False: 11.0k]
  ------------------
  228|     57|      throw BER_Bad_Tag("Error decoding OID, unknown tag", obj.tagging());
  229|     57|   }
  230|       |
  231|  11.0k|   if(obj.length() == 0) {
  ------------------
  |  Branch (231:7): [True: 1, False: 11.0k]
  ------------------
  232|      1|      throw BER_Decoding_Error("OID encoding is too short");
  233|      1|   }
  234|       |
  235|  11.0k|   auto consume = [](BufferSlicer& data) -> uint32_t {
  236|  11.0k|      BOTAN_ASSERT_NOMSG(!data.empty());
  237|  11.0k|      uint32_t b = data.take_byte();
  238|       |
  239|  11.0k|      if(b > 0x7F) {
  240|  11.0k|         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|  11.0k|         if(b == 0) {
  246|  11.0k|            throw Decoding_Error("Leading zero byte in multibyte OID encoding");
  247|  11.0k|         }
  248|       |
  249|  11.0k|         while(true) {
  250|  11.0k|            if(data.empty()) {
  251|  11.0k|               throw Decoding_Error("Truncated OID value");
  252|  11.0k|            }
  253|       |
  254|  11.0k|            const uint8_t next = data.take_byte();
  255|  11.0k|            const bool more = (next & 0x80) == 0x80;
  256|  11.0k|            const uint8_t value = next & 0x7F;
  257|       |
  258|  11.0k|            if((b >> (32 - 7)) != 0) {
  259|  11.0k|               throw Decoding_Error("OID component overflow");
  260|  11.0k|            }
  261|       |
  262|  11.0k|            b = (b << 7) | value;
  263|       |
  264|  11.0k|            if(!more) {
  265|  11.0k|               break;
  266|  11.0k|            }
  267|  11.0k|         }
  268|  11.0k|      }
  269|       |
  270|  11.0k|      return b;
  271|  11.0k|   };
  272|       |
  273|  11.0k|   BufferSlicer data(obj.data());
  274|  11.0k|   std::vector<uint32_t> parts;
  275|   119k|   while(!data.empty()) {
  ------------------
  |  Branch (275:10): [True: 108k, False: 11.0k]
  ------------------
  276|   108k|      const uint32_t comp = consume(data);
  277|       |
  278|   108k|      if(parts.empty()) {
  ------------------
  |  Branch (278:10): [True: 11.0k, False: 97.7k]
  ------------------
  279|       |         // divide into root and second arc
  280|       |
  281|  11.0k|         const uint32_t root_arc = [](uint32_t b0) -> uint32_t {
  282|  11.0k|            if(b0 < 40) {
  283|  11.0k|               return 0;
  284|  11.0k|            } else if(b0 < 80) {
  285|  11.0k|               return 1;
  286|  11.0k|            } else {
  287|  11.0k|               return 2;
  288|  11.0k|            }
  289|  11.0k|         }(comp);
  290|       |
  291|  11.0k|         parts.push_back(root_arc);
  292|  11.0k|         BOTAN_ASSERT_NOMSG(comp >= 40 * root_arc);
  ------------------
  |  |   77|  11.0k|   do {                                                                     \
  |  |   78|  11.0k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  11.0k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 11.0k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  11.0k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 11.0k]
  |  |  ------------------
  ------------------
  293|  11.0k|         parts.push_back(comp - 40 * root_arc);
  294|  97.7k|      } else {
  295|  97.7k|         parts.push_back(comp);
  296|  97.7k|      }
  297|   108k|   }
  298|       |
  299|  11.0k|   m_id = parts;
  300|  11.0k|}
_ZN5BotanlsERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEERKNS_3OIDE:
  302|  1.73k|std::ostream& operator<<(std::ostream& out, const OID& oid) {
  303|  1.73k|   out << oid.to_string();
  304|  1.73k|   return out;
  305|  1.73k|}
asn1_oid.cpp:_ZN5Botan12_GLOBAL__N_115oid_valid_checkENSt3__14spanIKjLm18446744073709551615EEE:
   26|  42.3k|void oid_valid_check(std::span<const uint32_t> oid) {
   27|  42.3k|   BOTAN_ARG_CHECK(oid.size() >= 2, "OID too short to be valid");
  ------------------
  |  |   35|  42.3k|   do {                                                          \
  |  |   36|  42.3k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  42.3k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 42.3k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  42.3k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 42.3k]
  |  |  ------------------
  ------------------
   28|  42.3k|   BOTAN_ARG_CHECK(oid[0] <= 2, "OID root out of range");
  ------------------
  |  |   35|  42.3k|   do {                                                          \
  |  |   36|  42.3k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  42.3k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 42.3k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  42.3k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 42.3k]
  |  |  ------------------
  ------------------
   29|  42.3k|   BOTAN_ARG_CHECK(oid[1] <= 39 || oid[0] == 2, "OID second arc too large");
  ------------------
  |  |   35|  42.3k|   do {                                                          \
  |  |   36|  42.3k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  42.3k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 42.3k, 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|  42.3k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 42.3k]
  |  |  ------------------
  ------------------
   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|  42.3k|   BOTAN_ARG_CHECK(oid[1] <= 0xFFFFFFAF, "OID second arc too large");
  ------------------
  |  |   35|  42.3k|   do {                                                          \
  |  |   36|  42.3k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  42.3k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 42.3k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  42.3k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 42.3k]
  |  |  ------------------
  ------------------
   33|  42.3k|}
asn1_oid.cpp:_ZZNK5Botan3OID11encode_intoERNS_11DER_EncoderEENK3$_0clERNSt3__16vectorIhNS4_9allocatorIhEEEEj:
  190|  14.5k|   auto append = [](std::vector<uint8_t>& encoding, uint32_t z) {
  191|  14.5k|      if(z <= 0x7F) {
  ------------------
  |  Branch (191:10): [True: 12.3k, False: 2.29k]
  ------------------
  192|  12.3k|         encoding.push_back(static_cast<uint8_t>(z));
  193|  12.3k|      } else {
  194|  2.29k|         const size_t z7 = (high_bit(z) + 7 - 1) / 7;
  195|       |
  196|  6.87k|         for(size_t j = 0; j != z7; ++j) {
  ------------------
  |  Branch (196:28): [True: 4.58k, False: 2.29k]
  ------------------
  197|  4.58k|            uint8_t zp = static_cast<uint8_t>(z >> (7 * (z7 - j - 1)) & 0x7F);
  198|       |
  199|  4.58k|            if(j != z7 - 1) {
  ------------------
  |  Branch (199:16): [True: 2.29k, False: 2.29k]
  ------------------
  200|  2.29k|               zp |= 0x80;
  201|  2.29k|            }
  202|       |
  203|  4.58k|            encoding.push_back(zp);
  204|  4.58k|         }
  205|  2.29k|      }
  206|  14.5k|   };
asn1_oid.cpp:_ZZN5Botan3OID11decode_fromERNS_11BER_DecoderEENK3$_0clERNS_12BufferSlicerE:
  235|   108k|   auto consume = [](BufferSlicer& data) -> uint32_t {
  236|   108k|      BOTAN_ASSERT_NOMSG(!data.empty());
  ------------------
  |  |   77|   108k|   do {                                                                     \
  |  |   78|   108k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|   108k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 108k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|   108k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 108k]
  |  |  ------------------
  ------------------
  237|   108k|      uint32_t b = data.take_byte();
  238|       |
  239|   108k|      if(b > 0x7F) {
  ------------------
  |  Branch (239:10): [True: 21.1k, False: 87.6k]
  ------------------
  240|  21.1k|         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|  21.1k|         if(b == 0) {
  ------------------
  |  Branch (245:13): [True: 2, False: 21.1k]
  ------------------
  246|      2|            throw Decoding_Error("Leading zero byte in multibyte OID encoding");
  247|      2|         }
  248|       |
  249|  25.1k|         while(true) {
  ------------------
  |  Branch (249:16): [True: 25.1k, Folded]
  ------------------
  250|  25.1k|            if(data.empty()) {
  ------------------
  |  Branch (250:16): [True: 23, False: 25.1k]
  ------------------
  251|     23|               throw Decoding_Error("Truncated OID value");
  252|     23|            }
  253|       |
  254|  25.1k|            const uint8_t next = data.take_byte();
  255|  25.1k|            const bool more = (next & 0x80) == 0x80;
  256|  25.1k|            const uint8_t value = next & 0x7F;
  257|       |
  258|  25.1k|            if((b >> (32 - 7)) != 0) {
  ------------------
  |  Branch (258:16): [True: 20, False: 25.1k]
  ------------------
  259|     20|               throw Decoding_Error("OID component overflow");
  260|     20|            }
  261|       |
  262|  25.1k|            b = (b << 7) | value;
  263|       |
  264|  25.1k|            if(!more) {
  ------------------
  |  Branch (264:16): [True: 21.1k, False: 3.99k]
  ------------------
  265|  21.1k|               break;
  266|  21.1k|            }
  267|  25.1k|         }
  268|  21.1k|      }
  269|       |
  270|   108k|      return b;
  271|   108k|   };
asn1_oid.cpp:_ZZN5Botan3OID11decode_fromERNS_11BER_DecoderEENK3$_1clEj:
  281|  11.0k|         const uint32_t root_arc = [](uint32_t b0) -> uint32_t {
  282|  11.0k|            if(b0 < 40) {
  ------------------
  |  Branch (282:16): [True: 1.23k, False: 9.85k]
  ------------------
  283|  1.23k|               return 0;
  284|  9.85k|            } else if(b0 < 80) {
  ------------------
  |  Branch (284:23): [True: 8.33k, False: 1.51k]
  ------------------
  285|  8.33k|               return 1;
  286|  8.33k|            } else {
  287|  1.51k|               return 2;
  288|  1.51k|            }
  289|  11.0k|         }(comp);

_ZN5Botan11BER_DecoderD2Ev:
  456|  35.9k|BER_Decoder::~BER_Decoder() = default;
_ZN5Botan11BER_Decoder10verify_endEv:
  471|  14.6k|BER_Decoder& BER_Decoder::verify_end() {
  472|  14.6k|   return verify_end("BER_Decoder::verify_end called, but data remains");
  473|  14.6k|}
_ZN5Botan11BER_Decoder10verify_endENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  478|  14.6k|BER_Decoder& BER_Decoder::verify_end(std::string_view err) {
  479|  14.6k|   if(!m_source->end_of_data() || m_pushed.is_set()) {
  ------------------
  |  Branch (479:7): [True: 30, False: 14.6k]
  |  Branch (479:35): [True: 0, False: 14.6k]
  ------------------
  480|     30|      throw Decoding_Error(err);
  481|     30|   }
  482|  14.6k|   return (*this);
  483|  14.6k|}
_ZN5Botan11BER_Decoder17discard_remainingEv:
  488|  6.26k|BER_Decoder& BER_Decoder::discard_remaining() {
  489|  6.26k|   m_pushed = BER_Object();
  490|  6.26k|   uint8_t buf = 0;
  491|   221k|   while(m_source->read_byte(buf) != 0) {}
  ------------------
  |  Branch (491:10): [True: 215k, False: 6.26k]
  ------------------
  492|  6.26k|   return (*this);
  493|  6.26k|}
_ZN5Botan11BER_Decoder14read_next_byteEv:
  495|   461k|std::optional<uint8_t> BER_Decoder::read_next_byte() {
  496|   461k|   BOTAN_ASSERT_NOMSG(m_source != nullptr);
  ------------------
  |  |   77|   461k|   do {                                                                     \
  |  |   78|   461k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|   461k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 461k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|   461k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 461k]
  |  |  ------------------
  ------------------
  497|   461k|   uint8_t b = 0;
  498|   461k|   if(m_source->read_byte(b) != 0) {
  ------------------
  |  Branch (498:7): [True: 455k, False: 6.28k]
  ------------------
  499|   455k|      return b;
  500|   455k|   } else {
  501|  6.28k|      return {};
  502|  6.28k|   }
  503|   461k|}
_ZN5Botan11BER_Decoder16peek_next_objectEv:
  505|  3.90k|const BER_Object& BER_Decoder::peek_next_object() {
  506|  3.90k|   if(!m_pushed.is_set()) {
  ------------------
  |  Branch (506:7): [True: 3.90k, False: 0]
  ------------------
  507|  3.90k|      m_pushed = get_next_object();
  508|  3.90k|   }
  509|       |
  510|  3.90k|   return m_pushed;
  511|  3.90k|}
_ZN5Botan11BER_Decoder15get_next_objectEv:
  516|  72.1k|BER_Object BER_Decoder::get_next_object() {
  517|  72.1k|   BER_Object next;
  518|       |
  519|  72.1k|   if(m_pushed.is_set()) {
  ------------------
  |  Branch (519:7): [True: 6.03k, False: 66.1k]
  ------------------
  520|  6.03k|      std::swap(next, m_pushed);
  521|  6.03k|      return next;
  522|  6.03k|   }
  523|       |
  524|  66.1k|   for(;;) {
  525|  66.1k|      ASN1_Type type_tag = ASN1_Type::NoObject;
  526|  66.1k|      ASN1_Class class_tag = ASN1_Class::NoObject;
  527|  66.1k|      decode_tag(m_source, type_tag, class_tag);
  528|  66.1k|      next.set_tagging(type_tag, class_tag);
  529|  66.1k|      if(next.is_set() == false) {  // no more objects
  ------------------
  |  Branch (529:10): [True: 2.92k, False: 63.1k]
  ------------------
  530|  2.92k|         return next;
  531|  2.92k|      }
  532|       |
  533|  63.1k|      const size_t allow_indef = m_limits.allow_ber_encoding() ? m_limits.max_nested_indefinite_length() : 0;
  ------------------
  |  Branch (533:34): [True: 0, False: 63.1k]
  ------------------
  534|  63.1k|      const bool der_mode = m_limits.require_der_encoding();
  535|  63.1k|      const auto dl = decode_length(m_source, allow_indef, der_mode, is_constructed(class_tag));
  536|       |
  537|       |      // Per X.690 8.1.5 the only valid EOC encoding is the two-octet
  538|       |      // sequence 0x00 0x00. Reject any other length encoding on a tag of
  539|       |      // (Eoc, Universal) before we consume the "content" bytes.
  540|  63.1k|      if(type_tag == ASN1_Type::Eoc && class_tag == ASN1_Class::Universal &&
  ------------------
  |  Branch (540:10): [True: 942, False: 62.2k]
  |  Branch (540:40): [True: 45, False: 897]
  ------------------
  541|     45|         (dl.content_length() != 0 || dl.indefinite_length())) {
  ------------------
  |  Branch (541:11): [True: 34, False: 11]
  |  Branch (541:39): [True: 0, False: 11]
  ------------------
  542|     34|         throw BER_Decoding_Error("EOC marker with non-zero length");
  543|     34|      }
  544|       |
  545|  63.1k|      if(const auto max_size = m_limits.max_object_size(); max_size && dl.content_length() > *max_size) {
  ------------------
  |  Branch (545:60): [True: 62.9k, False: 191]
  |  Branch (545:72): [True: 38, False: 62.9k]
  ------------------
  546|     38|         throw BER_Decoding_Error("Encoded object exceeds maximum size");
  547|     38|      }
  548|       |
  549|  63.1k|      if(!m_source->check_available(dl.total_length())) {
  ------------------
  |  Branch (549:10): [True: 122, False: 63.0k]
  ------------------
  550|    122|         throw BER_Decoding_Error("Value truncated");
  551|    122|      }
  552|       |
  553|  63.0k|      uint8_t* out = next.mutable_bits(dl.content_length());
  554|  63.0k|      if(m_source->read(out, dl.content_length()) != dl.content_length()) {
  ------------------
  |  Branch (554:10): [True: 0, False: 63.0k]
  ------------------
  555|      0|         throw BER_Decoding_Error("Value truncated");
  556|      0|      }
  557|       |
  558|  63.0k|      if(dl.indefinite_length()) {
  ------------------
  |  Branch (558:10): [True: 0, False: 63.0k]
  ------------------
  559|       |         // After reading the data consume the 2-byte EOC
  560|      0|         uint8_t eoc[2] = {0xFF, 0xFF};
  561|      0|         if(m_source->read(eoc, 2) != 2 || eoc[0] != 0x00 || eoc[1] != 0x00) {
  ------------------
  |  Branch (561:13): [True: 0, False: 0]
  |  Branch (561:44): [True: 0, False: 0]
  |  Branch (561:62): [True: 0, False: 0]
  ------------------
  562|      0|            throw BER_Decoding_Error("Missing or malformed EOC marker");
  563|      0|         }
  564|      0|      }
  565|       |
  566|  63.0k|      if(next.tagging() == static_cast<uint32_t>(ASN1_Type::Eoc)) {
  ------------------
  |  Branch (566:10): [True: 11, False: 62.9k]
  ------------------
  567|     11|         if(m_limits.require_der_encoding()) {
  ------------------
  |  Branch (567:13): [True: 11, False: 0]
  ------------------
  568|     11|            throw BER_Decoding_Error("Detected EOC marker in DER structure");
  569|     11|         }
  570|       |         // An EOC marker is only valid as an indefinite-length terminator, which
  571|       |         // is consumed above when reading the indefinite-length object. A
  572|       |         // standalone EOC is rejected unless the caller opted to tolerate it.
  573|      0|         if(m_limits.allow_standalone_eoc()) {
  ------------------
  |  Branch (573:13): [True: 0, False: 0]
  ------------------
  574|      0|            continue;
  575|      0|         }
  576|      0|         throw BER_Decoding_Error("Encountered EOC marker outside of indefinite-length encoding");
  577|      0|      }
  578|       |
  579|  62.9k|      break;
  580|  63.0k|   }
  581|       |
  582|  62.9k|   return next;
  583|  66.1k|}
_ZN5Botan11BER_Decoder9push_backEONS_10BER_ObjectE:
  607|  4.98k|void BER_Decoder::push_back(BER_Object&& obj) {
  608|  4.98k|   if(m_pushed.is_set()) {
  ------------------
  |  Branch (608:7): [True: 0, False: 4.98k]
  ------------------
  609|      0|      throw Invalid_State("BER_Decoder: Only one push back is allowed");
  610|      0|   }
  611|  4.98k|   m_pushed = std::move(obj);
  612|  4.98k|}
_ZN5Botan11BER_Decoder10start_consENS_9ASN1_TypeENS_10ASN1_ClassE:
  614|  20.2k|BER_Decoder BER_Decoder::start_cons(ASN1_Type type_tag, ASN1_Class class_tag) {
  615|  20.2k|   BER_Object obj = get_next_object();
  616|  20.2k|   obj.assert_is_a(type_tag, class_tag | ASN1_Class::Constructed);
  617|       |
  618|       |   // In DER mode the elements of a universal SET must appear in sorted order
  619|  20.2k|   if(m_limits.require_der_encoding() && type_tag == ASN1_Type::Set && class_tag == ASN1_Class::Universal) {
  ------------------
  |  Branch (619:7): [True: 20.0k, False: 173]
  |  Branch (619:42): [True: 0, False: 20.0k]
  |  Branch (619:72): [True: 0, False: 0]
  ------------------
  620|      0|      verify_set_is_sorted(std::span<const uint8_t>{obj.bits(), obj.length()});
  621|      0|   }
  622|       |
  623|  20.2k|   BER_Decoder child(std::move(obj), this);
  624|  20.2k|   return child;
  625|  20.2k|}
_ZN5Botan11BER_Decoder8end_consEv:
  630|  18.8k|BER_Decoder& BER_Decoder::end_cons() {
  631|  18.8k|   if(m_parent == nullptr) {
  ------------------
  |  Branch (631:7): [True: 0, False: 18.8k]
  ------------------
  632|      0|      throw Invalid_State("BER_Decoder::end_cons called with null parent");
  633|      0|   }
  634|  18.8k|   if(!m_source->end_of_data() || m_pushed.is_set()) {
  ------------------
  |  Branch (634:7): [True: 28, False: 18.8k]
  |  Branch (634:35): [True: 17, False: 18.8k]
  ------------------
  635|     45|      throw Decoding_Error("BER_Decoder::end_cons called with data left");
  636|     45|   }
  637|  18.8k|   return (*m_parent);
  638|  18.8k|}
_ZN5Botan11BER_DecoderC2EONS_10BER_ObjectEPS0_:
  641|  20.0k|      m_limits(parent != nullptr ? parent->limits() : BER_Decoder::Limits::BER()), m_parent(parent) {
  ------------------
  |  Branch (641:16): [True: 20.0k, False: 0]
  ------------------
  642|  20.0k|   m_data_src = std::make_unique<DataSource_BERObject>(std::move(obj));
  643|  20.0k|   m_source = m_data_src.get();
  644|  20.0k|}
_ZN5Botan11BER_DecoderC2ERNS_10DataSourceENS0_6LimitsE:
  654|      4|BER_Decoder::BER_Decoder(DataSource& src, Limits limits) : m_limits(limits), m_source(&src) {}
_ZN5Botan11BER_DecoderC2ENSt3__14spanIKhLm18446744073709551615EEENS0_6LimitsE:
  659|  15.9k|BER_Decoder::BER_Decoder(std::span<const uint8_t> buf, Limits limits) : m_limits(limits) {
  660|  15.9k|   m_data_src = std::make_unique<DataSource_Memory>(buf);
  661|  15.9k|   m_source = m_data_src.get();
  662|  15.9k|}
_ZN5Botan11BER_Decoder6decodeERNS_11ASN1_ObjectENS_9ASN1_TypeENS_10ASN1_ClassE:
  671|  17.5k|BER_Decoder& BER_Decoder::decode(ASN1_Object& obj, ASN1_Type /*unused*/, ASN1_Class /*unused*/) {
  672|  17.5k|   obj.decode_from(*this);
  673|  17.5k|   return (*this);
  674|  17.5k|}
_ZN5Botan11BER_Decoder26decode_octet_string_bigintERNS_6BigIntE:
  688|  2.47k|BER_Decoder& BER_Decoder::decode_octet_string_bigint(BigInt& out) {
  689|  2.47k|   secure_vector<uint8_t> out_vec;
  690|  2.47k|   decode(out_vec, ASN1_Type::OctetString);
  691|  2.47k|   out = BigInt::from_bytes(out_vec);
  692|  2.47k|   return (*this);
  693|  2.47k|}
_ZN5Botan11BER_Decoder6decodeERmNS_9ASN1_TypeENS_10ASN1_ClassE:
  721|  11.0k|BER_Decoder& BER_Decoder::decode(size_t& out, ASN1_Type type_tag, ASN1_Class class_tag) {
  722|  11.0k|   BigInt integer;
  723|  11.0k|   decode(integer, type_tag, class_tag);
  724|       |
  725|  11.0k|   if(integer.signum() < 0) {
  ------------------
  |  Branch (725:7): [True: 64, False: 10.9k]
  ------------------
  726|     64|      throw BER_Decoding_Error("Decoded small integer value was negative");
  727|     64|   }
  728|       |
  729|  10.9k|   if(integer.bits() > 32) {
  ------------------
  |  Branch (729:7): [True: 60, False: 10.8k]
  ------------------
  730|     60|      throw BER_Decoding_Error("Decoded integer value larger than expected");
  731|     60|   }
  732|       |
  733|  10.8k|   out = 0;
  734|  53.0k|   for(size_t i = 0; i != 4; ++i) {
  ------------------
  |  Branch (734:22): [True: 42.1k, False: 10.8k]
  ------------------
  735|  42.1k|      out = (out << 8) | integer.byte_at(3 - i);
  736|  42.1k|   }
  737|       |
  738|  10.8k|   return (*this);
  739|  10.9k|}
_ZN5Botan11BER_Decoder6decodeERNS_6BigIntENS_9ASN1_TypeENS_10ASN1_ClassE:
  771|  15.2k|BER_Decoder& BER_Decoder::decode(BigInt& out, ASN1_Type type_tag, ASN1_Class class_tag) {
  772|  15.2k|   const BER_Object obj = get_next_object();
  773|  15.2k|   obj.assert_is_a(type_tag, class_tag);
  774|       |
  775|       |   // An INTEGER must have at least one content octet (X.690 section 8.3.1)
  776|  15.2k|   if(obj.length() == 0) {
  ------------------
  |  Branch (776:7): [True: 1, False: 15.2k]
  ------------------
  777|      1|      throw BER_Decoding_Error("INTEGER encoding has no content octets");
  778|      1|   }
  779|       |
  780|       |   // DER requires minimal INTEGER encoding (X.690 section 8.3.2)
  781|  15.2k|   if(m_limits.require_der_encoding()) {
  ------------------
  |  Branch (781:7): [True: 14.8k, False: 447]
  ------------------
  782|  14.8k|      if(obj.length() > 1) {
  ------------------
  |  Branch (782:10): [True: 3.00k, False: 11.8k]
  ------------------
  783|  3.00k|         if(obj.bits()[0] == 0x00 && (obj.bits()[1] & 0x80) == 0) {
  ------------------
  |  Branch (783:13): [True: 1.45k, False: 1.55k]
  |  Branch (783:38): [True: 3, False: 1.45k]
  ------------------
  784|      3|            throw BER_Decoding_Error("Detected non-minimal INTEGER encoding in DER structure");
  785|      3|         }
  786|  3.00k|         if(obj.bits()[0] == 0xFF && (obj.bits()[1] & 0x80) != 0) {
  ------------------
  |  Branch (786:13): [True: 19, False: 2.98k]
  |  Branch (786:38): [True: 8, False: 11]
  ------------------
  787|      8|            throw BER_Decoding_Error("Detected non-minimal INTEGER encoding in DER structure");
  788|      8|         }
  789|  3.00k|      }
  790|  14.8k|   }
  791|       |
  792|  15.2k|   const uint8_t first = obj.bits()[0];
  793|  15.2k|   const bool negative = (first & 0x80) == 0x80;
  794|       |
  795|  15.2k|   if(negative) {
  ------------------
  |  Branch (795:7): [True: 88, False: 15.1k]
  ------------------
  796|     88|      secure_vector<uint8_t> vec(obj.bits(), obj.bits() + obj.length());
  797|    526|      for(size_t i = obj.length(); i > 0; --i) {
  ------------------
  |  Branch (797:36): [True: 526, False: 0]
  ------------------
  798|    526|         const bool gt0 = (vec[i - 1] > 0);
  799|    526|         vec[i - 1] -= 1;
  800|    526|         if(gt0) {
  ------------------
  |  Branch (800:13): [True: 88, False: 438]
  ------------------
  801|     88|            break;
  802|     88|         }
  803|    526|      }
  804|  15.2k|      for(size_t i = 0; i != obj.length(); ++i) {
  ------------------
  |  Branch (804:25): [True: 15.1k, False: 88]
  ------------------
  805|  15.1k|         vec[i] = ~vec[i];
  806|  15.1k|      }
  807|     88|      out._assign_from_bytes(vec);
  808|     88|      out.flip_sign();
  809|  15.1k|   } else {
  810|  15.1k|      out._assign_from_bytes(obj.data());
  811|  15.1k|   }
  812|       |
  813|  15.2k|   return (*this);
  814|  15.2k|}
_ZN5Botan11BER_Decoder6decodeERNSt3__16vectorIhNS_16secure_allocatorIhEEEENS_9ASN1_TypeES7_NS_10ASN1_ClassE:
 1006|  11.4k|                                 ASN1_Class class_tag) {
 1007|  11.4k|   if(real_type != ASN1_Type::OctetString && real_type != ASN1_Type::BitString) {
  ------------------
  |  Branch (1007:7): [True: 0, False: 11.4k]
  |  Branch (1007:46): [True: 0, False: 0]
  ------------------
 1008|      0|      throw BER_Bad_Tag("Bad tag for {BIT,OCTET} STRING", static_cast<uint32_t>(real_type));
 1009|      0|   }
 1010|       |
 1011|  11.4k|   asn1_decode_binary_string(buffer, get_next_object(), real_type, type_tag, class_tag, m_limits);
 1012|  11.4k|   return (*this);
 1013|  11.4k|}
_ZN5Botan11BER_Decoder6decodeERNSt3__16vectorIhNS1_9allocatorIhEEEENS_9ASN1_TypeES7_NS_10ASN1_ClassE:
 1018|  2.38k|                                 ASN1_Class class_tag) {
 1019|  2.38k|   if(real_type != ASN1_Type::OctetString && real_type != ASN1_Type::BitString) {
  ------------------
  |  Branch (1019:7): [True: 1.15k, False: 1.22k]
  |  Branch (1019:46): [True: 0, False: 1.15k]
  ------------------
 1020|      0|      throw BER_Bad_Tag("Bad tag for {BIT,OCTET} STRING", static_cast<uint32_t>(real_type));
 1021|      0|   }
 1022|       |
 1023|  2.38k|   asn1_decode_binary_string(buffer, get_next_object(), real_type, type_tag, class_tag, m_limits);
 1024|  2.38k|   return (*this);
 1025|  2.38k|}
_ZN5Botan11BER_Decoder16decode_bitstringERNS_14ASN1_BitStringENS_9ASN1_TypeENS_10ASN1_ClassE:
 1027|    942|BER_Decoder& BER_Decoder::decode_bitstring(ASN1_BitString& out, ASN1_Type type_tag, ASN1_Class class_tag) {
 1028|    942|   const BER_Object obj = get_next_object();
 1029|       |
 1030|    942|   std::vector<uint8_t> bits;
 1031|    942|   uint8_t unused_bits = 0;
 1032|       |
 1033|    942|   if(is_constructed(obj.class_tag())) {
  ------------------
  |  Branch (1033:7): [True: 2, False: 940]
  ------------------
 1034|      2|      obj.assert_is_a(type_tag, class_tag | ASN1_Class::Constructed);
 1035|      2|      if(m_limits.require_der_encoding()) {
  ------------------
  |  Branch (1035:10): [True: 1, False: 1]
  ------------------
 1036|      1|         throw BER_Decoding_Error("Detected constructed string encoding in DER structure");
 1037|      1|      }
 1038|      1|      bits.reserve(obj.length());  // upper possible bound on the output size
 1039|      1|      unused_bits = asn1_concat_constructed_bit_string(bits, obj, m_limits, 0);
 1040|    940|   } else {
 1041|    940|      unused_bits = asn1_bitstring_unused_bits(obj, type_tag, class_tag, m_limits.require_der_encoding());
 1042|    940|      bits.assign(obj.bits() + 1, obj.bits() + obj.length());
 1043|    940|   }
 1044|       |
 1045|    941|   if(unused_bits > 0 && !bits.empty()) {
  ------------------
  |  Branch (1045:7): [True: 2, False: 939]
  |  Branch (1045:26): [True: 2, False: 0]
  ------------------
 1046|      2|      bits.back() &= static_cast<uint8_t>(0xFF << unused_bits);
 1047|      2|   }
 1048|       |
 1049|    941|   out = ASN1_BitString(std::move(bits), unused_bits);
 1050|    941|   return (*this);
 1051|    942|}
_ZN5Botan4ASN120is_single_der_objectENSt3__14spanIKhLm18446744073709551615EEENS_9ASN1_TypeENS_10ASN1_ClassE:
 1085|  7.21k|bool is_single_der_object(std::span<const uint8_t> bytes, ASN1_Type expected_type, ASN1_Class expected_class) {
 1086|  7.21k|   if(bytes.empty()) {
  ------------------
  |  Branch (1086:7): [True: 0, False: 7.21k]
  ------------------
 1087|      0|      return false;
 1088|      0|   }
 1089|       |
 1090|  7.21k|   try {
 1091|  7.21k|      DataSource_Span src(bytes);
 1092|       |
 1093|  7.21k|      ASN1_Type type_tag = ASN1_Type::NoObject;
 1094|  7.21k|      ASN1_Class class_tag = ASN1_Class::NoObject;
 1095|  7.21k|      const size_t tag_bytes = decode_tag(&src, type_tag, class_tag);
 1096|       |
 1097|  7.21k|      if(type_tag != expected_type || class_tag != expected_class) {
  ------------------
  |  Branch (1097:10): [True: 3.04k, False: 4.16k]
  |  Branch (1097:39): [True: 6, False: 4.16k]
  ------------------
 1098|  3.02k|         return false;
 1099|  3.02k|      }
 1100|       |
 1101|  4.18k|      const auto dl = decode_length(&src, /*allow_indef=*/0, /*der_mode=*/true, is_constructed(expected_class));
 1102|       |
 1103|  4.18k|      const size_t header_bytes = tag_bytes + dl.field_length();
 1104|  4.18k|      if(header_bytes > bytes.size()) {
  ------------------
  |  Branch (1104:10): [True: 0, False: 4.18k]
  ------------------
 1105|      0|         return false;
 1106|      0|      }
 1107|  4.18k|      return dl.content_length() == bytes.size() - header_bytes;
 1108|  4.18k|   } catch(Decoding_Error&) {
 1109|     25|      return false;
 1110|     25|   }
 1111|  7.21k|}
_ZN5Botan4ASN122is_der_sequence_headerENSt3__14spanIKhLm18446744073709551615EEE:
 1113|  4.24k|bool is_der_sequence_header(std::span<const uint8_t> bytes) {
 1114|  4.24k|   return is_single_der_object(bytes, ASN1_Type::Sequence, ASN1_Class::Universal | ASN1_Class::Constructed);
 1115|  4.24k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_110decode_tagEPNS_10DataSourceERNS_9ASN1_TypeERNS_10ASN1_ClassE:
   29|  73.3k|size_t decode_tag(DataSource* ber, ASN1_Type& type_tag, ASN1_Class& class_tag) {
   30|  73.3k|   auto b = ber->read_byte();
   31|       |
   32|  73.3k|   if(!b) {
  ------------------
  |  Branch (32:7): [True: 2.92k, False: 70.4k]
  ------------------
   33|  2.92k|      type_tag = ASN1_Type::NoObject;
   34|  2.92k|      class_tag = ASN1_Class::NoObject;
   35|  2.92k|      return 0;
   36|  2.92k|   }
   37|       |
   38|  70.4k|   if((*b & 0x1F) != 0x1F) {
  ------------------
  |  Branch (38:7): [True: 69.9k, False: 442]
  ------------------
   39|  69.9k|      type_tag = ASN1_Type(*b & 0x1F);
   40|  69.9k|      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|  69.9k|      if(type_tag == ASN1_Type::Eoc && class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (44:10): [True: 1.01k, False: 68.9k]
  |  Branch (44:40): [True: 8, False: 1.00k]
  ------------------
   45|      8|         throw BER_Decoding_Error("EOC tag with constructed encoding");
   46|      8|      }
   47|  69.9k|      return 1;
   48|  69.9k|   }
   49|       |
   50|    442|   size_t tag_bytes = 1;
   51|    442|   class_tag = ASN1_Class(*b & 0xE0);
   52|       |
   53|    442|   uint32_t tag_buf = 0;
   54|  1.60k|   while(true) {
  ------------------
  |  Branch (54:10): [True: 1.60k, Folded]
  ------------------
   55|  1.60k|      b = ber->read_byte();
   56|  1.60k|      if(!b) {
  ------------------
  |  Branch (56:10): [True: 19, False: 1.58k]
  ------------------
   57|     19|         throw BER_Decoding_Error("Long-form tag truncated");
   58|     19|      }
   59|       |      // Reject if shifting in another 7 bits would overflow the uint32_t tag
   60|  1.58k|      if((tag_buf >> 25) != 0) {
  ------------------
  |  Branch (60:10): [True: 21, False: 1.56k]
  ------------------
   61|     21|         throw BER_Decoding_Error("Long-form tag overflowed 32 bits");
   62|     21|      }
   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.56k|      if(tag_bytes == 1 && (*b & 0x7F) == 0) {
  ------------------
  |  Branch (67:10): [True: 431, False: 1.13k]
  |  Branch (67:28): [True: 4, False: 427]
  ------------------
   68|      4|         throw BER_Decoding_Error("Long form tag with leading zero");
   69|      4|      }
   70|  1.56k|      ++tag_bytes;
   71|  1.56k|      tag_buf = (tag_buf << 7) | (*b & 0x7F);
   72|  1.56k|      if((*b & 0x80) == 0) {
  ------------------
  |  Branch (72:10): [True: 398, False: 1.16k]
  ------------------
   73|    398|         break;
   74|    398|      }
   75|  1.56k|   }
   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|    398|   if(tag_buf <= 30) {
  ------------------
  |  Branch (79:7): [True: 8, False: 390]
  ------------------
   80|      8|      throw BER_Decoding_Error("Long-form tag encoding used for small tag value");
   81|      8|   }
   82|       |
   83|    390|   if(tag_buf == static_cast<uint32_t>(ASN1_Type::NoObject)) {
  ------------------
  |  Branch (83:7): [True: 4, False: 386]
  ------------------
   84|      4|      throw BER_Decoding_Error("Tag value collides with internal sentinel");
   85|      4|   }
   86|       |
   87|       |   // NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange)
   88|    386|   type_tag = ASN1_Type(tag_buf);
   89|    386|   return tag_bytes;
   90|    390|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_113decode_lengthEPNS_10DataSourceEmbb:
  135|  67.3k|BerDecodedLength decode_length(DataSource* ber, size_t allow_indef, bool der_mode, bool constructed) {
  136|  67.3k|   uint8_t b = 0;
  137|  67.3k|   if(ber->read_byte(b) == 0) {
  ------------------
  |  Branch (137:7): [True: 84, False: 67.2k]
  ------------------
  138|     84|      throw BER_Decoding_Error("Length field not found");
  139|     84|   }
  140|  67.2k|   if((b & 0x80) == 0) {
  ------------------
  |  Branch (140:7): [True: 59.3k, False: 7.85k]
  ------------------
  141|  59.3k|      return BerDecodedLength(b, 1);
  142|  59.3k|   }
  143|       |
  144|  7.85k|   const size_t num_length_bytes = (b & 0x7F);
  145|  7.85k|   if(num_length_bytes > 4) {
  ------------------
  |  Branch (145:7): [True: 45, False: 7.81k]
  ------------------
  146|     45|      throw BER_Decoding_Error("Length field is too large");
  147|     45|   }
  148|       |
  149|  7.81k|   const size_t field_size = 1 + num_length_bytes;
  150|       |
  151|  7.81k|   if(num_length_bytes == 0) {
  ------------------
  |  Branch (151:7): [True: 2, False: 7.81k]
  ------------------
  152|      2|      if(der_mode) {
  ------------------
  |  Branch (152:10): [True: 2, False: 0]
  ------------------
  153|      2|         throw BER_Decoding_Error("Detected indefinite-length encoding in DER structure");
  154|      2|      } 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|      2|   }
  169|       |
  170|  7.81k|   size_t length = 0;
  171|       |
  172|  20.2k|   for(size_t i = 0; i != num_length_bytes; ++i) {
  ------------------
  |  Branch (172:22): [True: 12.4k, False: 7.80k]
  ------------------
  173|  12.4k|      if(ber->read_byte(b) == 0) {
  ------------------
  |  Branch (173:10): [True: 9, False: 12.4k]
  ------------------
  174|      9|         throw BER_Decoding_Error("Corrupted length field");
  175|      9|      }
  176|       |      // Can't overflow since we already checked that num_length_bytes <= 4
  177|  12.4k|      length = (length << 8) | b;
  178|  12.4k|   }
  179|       |
  180|       |   // DER requires shortest possible length encoding
  181|  7.80k|   if(der_mode) {
  ------------------
  |  Branch (181:7): [True: 7.80k, False: 0]
  ------------------
  182|  7.80k|      if(length < 128) {
  ------------------
  |  Branch (182:10): [True: 10, False: 7.79k]
  ------------------
  183|     10|         throw BER_Decoding_Error("Detected non-canonical length encoding in DER structure");
  184|     10|      }
  185|  7.79k|      if(num_length_bytes > 1 && length < (size_t(1) << ((num_length_bytes - 1) * 8))) {
  ------------------
  |  Branch (185:10): [True: 4.42k, False: 3.36k]
  |  Branch (185:34): [True: 2, False: 4.42k]
  ------------------
  186|      2|         throw BER_Decoding_Error("Detected non-canonical length encoding in DER structure");
  187|      2|      }
  188|  7.79k|   }
  189|       |
  190|  7.79k|   return BerDecodedLength(length, field_size);
  191|  7.80k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_116BerDecodedLengthC2Emm:
  108|  67.1k|            BerDecodedLength(content_length, field_length, false) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_116BerDecodedLengthC2Emmb:
  125|  67.1k|            m_content_length(content_length), m_field_length(field_length), m_indefinite(indefinite) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_114is_constructedENS_10ASN1_ClassE:
   22|  82.9k|bool is_constructed(ASN1_Class class_tag) {
   23|  82.9k|   return (static_cast<uint32_t>(class_tag) & static_cast<uint32_t>(ASN1_Class::Constructed)) != 0;
   24|  82.9k|}
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength14content_lengthEv:
  114|   255k|      size_t content_length() const { return m_content_length; }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength17indefinite_lengthEv:
  121|  62.8k|      bool indefinite_length() const { return m_indefinite; }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength12total_lengthEv:
  117|  62.9k|      size_t total_length() const { return m_indefinite ? m_content_length + 2 : m_content_length; }
  ------------------
  |  Branch (117:44): [True: 0, False: 62.9k]
  ------------------
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_126asn1_bitstring_unused_bitsERKNS_10BER_ObjectENS_9ASN1_TypeENS_10ASN1_ClassEb:
  970|    940|uint8_t asn1_bitstring_unused_bits(const BER_Object& obj, ASN1_Type type_tag, ASN1_Class class_tag, bool require_der) {
  971|    940|   obj.assert_is_a(type_tag, class_tag);
  972|    940|   BOTAN_ASSERT_NOMSG(!is_constructed(obj));
  ------------------
  |  |   77|    940|   do {                                                                     \
  |  |   78|    940|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    940|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 940]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    940|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 940]
  |  |  ------------------
  ------------------
  973|       |
  974|    940|   if(obj.length() == 0) {
  ------------------
  |  Branch (974:7): [True: 1, False: 939]
  ------------------
  975|      1|      throw BER_Decoding_Error("Invalid BIT STRING");
  976|      1|   }
  977|       |
  978|    939|   const uint8_t unused_bits = obj.bits()[0];
  979|       |
  980|    939|   if(unused_bits >= 8) {
  ------------------
  |  Branch (980:7): [True: 2, False: 937]
  ------------------
  981|      2|      throw BER_Decoding_Error("Invalid number of unused bits in BIT STRING");
  982|      2|   }
  983|       |
  984|    937|   if(obj.length() == 1 && unused_bits != 0) {
  ------------------
  |  Branch (984:7): [True: 2, False: 935]
  |  Branch (984:28): [True: 1, False: 1]
  ------------------
  985|      1|      throw BER_Decoding_Error("Invalid BIT STRING");
  986|      1|   }
  987|       |
  988|    936|   if(require_der && unused_bits > 0) {
  ------------------
  |  Branch (988:7): [True: 936, False: 0]
  |  Branch (988:22): [True: 3, False: 933]
  ------------------
  989|      3|      const uint8_t last_byte = obj.bits()[obj.length() - 1];
  990|      3|      if((last_byte & ((1 << unused_bits) - 1)) != 0) {
  ------------------
  |  Branch (990:10): [True: 1, False: 2]
  ------------------
  991|      1|         throw BER_Decoding_Error("Detected non-zero padding bits in BIT STRING in DER structure");
  992|      1|      }
  993|      3|   }
  994|       |
  995|    935|   return unused_bits;
  996|    936|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_114is_constructedERKNS_10BER_ObjectE:
  818|  14.7k|bool is_constructed(const BER_Object& obj) {
  819|  14.7k|   return is_constructed(obj.class_tag());
  820|  14.7k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_115DataSource_SpanC2ENSt3__14spanIKhLm18446744073709551615EEE:
  414|  7.21k|      explicit DataSource_Span(std::span<const uint8_t> buf) : m_buf(buf) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_115DataSource_Span4readEPhm:
  392|  13.7k|      size_t read(uint8_t out[], size_t length) override {
  393|  13.7k|         const size_t got = std::min(m_buf.size() - m_offset, length);
  394|  13.7k|         copy_mem(out, m_buf.data() + m_offset, got);
  395|  13.7k|         m_offset += got;
  396|  13.7k|         return got;
  397|  13.7k|      }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength12field_lengthEv:
  119|  4.15k|      size_t field_length() const { return m_field_length; }
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObjectC2EONS_10BER_ObjectE:
  379|  20.0k|      explicit DataSource_BERObject(BER_Object&& obj) : m_obj(std::move(obj)) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObject4readEPhm:
  349|   832k|      size_t read(uint8_t out[], size_t length) override {
  350|   832k|         BOTAN_ASSERT_NOMSG(m_offset <= m_obj.length());
  ------------------
  |  |   77|   832k|   do {                                                                     \
  |  |   78|   832k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|   832k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 832k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|   832k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 832k]
  |  |  ------------------
  ------------------
  351|   832k|         const size_t got = std::min<size_t>(m_obj.length() - m_offset, length);
  352|   832k|         copy_mem(out, m_obj.bits() + m_offset, got);
  353|   832k|         m_offset += got;
  354|   832k|         return got;
  355|   832k|      }
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObject15check_availableEm:
  370|  47.1k|      bool check_available(size_t n) override {
  371|  47.1k|         BOTAN_ASSERT_NOMSG(m_offset <= m_obj.length());
  ------------------
  |  |   77|  47.1k|   do {                                                                     \
  |  |   78|  47.1k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  47.1k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 47.1k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  47.1k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 47.1k]
  |  |  ------------------
  ------------------
  372|  47.1k|         return (n <= (m_obj.length() - m_offset));
  373|  47.1k|      }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_120DataSource_BERObject11end_of_dataEv:
  375|  18.8k|      bool end_of_data() const override { return get_bytes_read() == m_obj.length(); }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_120DataSource_BERObject14get_bytes_readEv:
  377|  18.8k|      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:
  912|  11.4k|                               const BER_Decoder::Limits& limits) {
  913|       |   // DER requires BIT STRING and OCTET STRING to use primitive encoding;
  914|       |   // in BER the constructed (fragmented) form is decoded by concatenation
  915|  11.4k|   if(is_constructed(obj)) {
  ------------------
  |  Branch (915:7): [True: 3, False: 11.4k]
  ------------------
  916|      3|      obj.assert_is_a(type_tag, class_tag | ASN1_Class::Constructed);
  917|       |
  918|      3|      if(limits.require_der_encoding()) {
  ------------------
  |  Branch (918:10): [True: 1, False: 2]
  ------------------
  919|      1|         throw BER_Decoding_Error("Detected constructed string encoding in DER structure");
  920|      1|      }
  921|       |
  922|       |      // Concatenate into a temporary so a failed decode leaves buffer unmodified
  923|      2|      std::vector<uint8_t, Alloc> concat;
  924|      2|      concat.reserve(obj.length());  // upper possible bound on the output size
  925|      2|      if(real_type == ASN1_Type::OctetString) {
  ------------------
  |  Branch (925:10): [True: 0, False: 2]
  ------------------
  926|      0|         asn1_concat_constructed_octet_string(concat, obj, limits, 0);
  927|      2|      } else {
  928|      2|         asn1_concat_constructed_bit_string(concat, obj, limits, 0);
  929|      2|      }
  930|      2|      buffer = std::move(concat);
  931|      2|      return;
  932|      3|   }
  933|       |
  934|  11.4k|   obj.assert_is_a(type_tag, class_tag);
  935|       |
  936|  11.4k|   if(real_type == ASN1_Type::OctetString) {
  ------------------
  |  Branch (936:7): [True: 11.3k, False: 15]
  ------------------
  937|  11.3k|      buffer.assign(obj.bits(), obj.bits() + obj.length());
  938|  11.3k|   } else {
  939|     15|      if(obj.length() == 0) {
  ------------------
  |  Branch (939:10): [True: 0, False: 15]
  ------------------
  940|      0|         throw BER_Decoding_Error("Invalid BIT STRING");
  941|      0|      }
  942|       |
  943|     15|      const uint8_t unused_bits = obj.bits()[0];
  944|       |
  945|     15|      if(unused_bits >= 8) {
  ------------------
  |  Branch (945:10): [True: 0, False: 15]
  ------------------
  946|      0|         throw BER_Decoding_Error("Bad number of unused bits in BIT STRING");
  947|      0|      }
  948|       |
  949|       |      // Empty BIT STRING with unused bits > 0 ...
  950|     15|      if(unused_bits > 0 && obj.length() < 2) {
  ------------------
  |  Branch (950:10): [True: 0, False: 15]
  |  Branch (950:29): [True: 0, False: 0]
  ------------------
  951|      0|         throw BER_Decoding_Error("Invalid BIT STRING");
  952|      0|      }
  953|       |
  954|       |      // DER requires unused bits in BIT STRING to be zero (X.690 section 11.2.2)
  955|     15|      if(limits.require_der_encoding() && unused_bits > 0) {
  ------------------
  |  Branch (955:10): [True: 0, False: 15]
  |  Branch (955:43): [True: 0, False: 0]
  ------------------
  956|      0|         const uint8_t last_byte = obj.bits()[obj.length() - 1];
  957|      0|         if((last_byte & ((1 << unused_bits) - 1)) != 0) {
  ------------------
  |  Branch (957:13): [True: 0, False: 0]
  ------------------
  958|      0|            throw BER_Decoding_Error("Detected non-zero padding bits in BIT STRING in DER structure");
  959|      0|         }
  960|      0|      }
  961|       |
  962|     15|      buffer.resize(obj.length() - 1);
  963|       |
  964|     15|      if(obj.length() > 1) {
  ------------------
  |  Branch (964:10): [True: 0, False: 15]
  ------------------
  965|      0|         copy_mem(buffer.data(), obj.bits() + 1, obj.length() - 1);
  966|      0|      }
  967|     15|   }
  968|  11.4k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_125asn1_decode_binary_stringINSt3__19allocatorIhEEEEvRNS2_6vectorIhT_EERKNS_10BER_ObjectENS_9ASN1_TypeESC_NS_10ASN1_ClassERKNS_11BER_Decoder6LimitsE:
  912|  2.38k|                               const BER_Decoder::Limits& limits) {
  913|       |   // DER requires BIT STRING and OCTET STRING to use primitive encoding;
  914|       |   // in BER the constructed (fragmented) form is decoded by concatenation
  915|  2.38k|   if(is_constructed(obj)) {
  ------------------
  |  Branch (915:7): [True: 1, False: 2.37k]
  ------------------
  916|      1|      obj.assert_is_a(type_tag, class_tag | ASN1_Class::Constructed);
  917|       |
  918|      1|      if(limits.require_der_encoding()) {
  ------------------
  |  Branch (918:10): [True: 1, False: 0]
  ------------------
  919|      1|         throw BER_Decoding_Error("Detected constructed string encoding in DER structure");
  920|      1|      }
  921|       |
  922|       |      // Concatenate into a temporary so a failed decode leaves buffer unmodified
  923|      0|      std::vector<uint8_t, Alloc> concat;
  924|      0|      concat.reserve(obj.length());  // upper possible bound on the output size
  925|      0|      if(real_type == ASN1_Type::OctetString) {
  ------------------
  |  Branch (925:10): [True: 0, False: 0]
  ------------------
  926|      0|         asn1_concat_constructed_octet_string(concat, obj, limits, 0);
  927|      0|      } else {
  928|      0|         asn1_concat_constructed_bit_string(concat, obj, limits, 0);
  929|      0|      }
  930|      0|      buffer = std::move(concat);
  931|      0|      return;
  932|      1|   }
  933|       |
  934|  2.37k|   obj.assert_is_a(type_tag, class_tag);
  935|       |
  936|  2.37k|   if(real_type == ASN1_Type::OctetString) {
  ------------------
  |  Branch (936:7): [True: 1.22k, False: 1.15k]
  ------------------
  937|  1.22k|      buffer.assign(obj.bits(), obj.bits() + obj.length());
  938|  1.22k|   } else {
  939|  1.15k|      if(obj.length() == 0) {
  ------------------
  |  Branch (939:10): [True: 1, False: 1.15k]
  ------------------
  940|      1|         throw BER_Decoding_Error("Invalid BIT STRING");
  941|      1|      }
  942|       |
  943|  1.15k|      const uint8_t unused_bits = obj.bits()[0];
  944|       |
  945|  1.15k|      if(unused_bits >= 8) {
  ------------------
  |  Branch (945:10): [True: 1, False: 1.15k]
  ------------------
  946|      1|         throw BER_Decoding_Error("Bad number of unused bits in BIT STRING");
  947|      1|      }
  948|       |
  949|       |      // Empty BIT STRING with unused bits > 0 ...
  950|  1.15k|      if(unused_bits > 0 && obj.length() < 2) {
  ------------------
  |  Branch (950:10): [True: 29, False: 1.12k]
  |  Branch (950:29): [True: 1, False: 28]
  ------------------
  951|      1|         throw BER_Decoding_Error("Invalid BIT STRING");
  952|      1|      }
  953|       |
  954|       |      // DER requires unused bits in BIT STRING to be zero (X.690 section 11.2.2)
  955|  1.15k|      if(limits.require_der_encoding() && unused_bits > 0) {
  ------------------
  |  Branch (955:10): [True: 1.15k, False: 0]
  |  Branch (955:43): [True: 28, False: 1.12k]
  ------------------
  956|     28|         const uint8_t last_byte = obj.bits()[obj.length() - 1];
  957|     28|         if((last_byte & ((1 << unused_bits) - 1)) != 0) {
  ------------------
  |  Branch (957:13): [True: 2, False: 26]
  ------------------
  958|      2|            throw BER_Decoding_Error("Detected non-zero padding bits in BIT STRING in DER structure");
  959|      2|         }
  960|     28|      }
  961|       |
  962|  1.15k|      buffer.resize(obj.length() - 1);
  963|       |
  964|  1.15k|      if(obj.length() > 1) {
  ------------------
  |  Branch (964:10): [True: 1.15k, False: 1]
  ------------------
  965|  1.15k|         copy_mem(buffer.data(), obj.bits() + 1, obj.length() - 1);
  966|  1.15k|      }
  967|  1.15k|   }
  968|  2.37k|}

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

_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|  13.4k|OID_Map& OID_Map::global_registry() {
   17|  13.4k|   static OID_Map g_map;
   18|  13.4k|   return g_map;
   19|  13.4k|}
_ZN5Botan7OID_Map7oid2strERKNS_3OIDE:
   73|  13.4k|std::optional<std::string> OID_Map::oid2str(const OID& oid) {
   74|  13.4k|   if(auto name = lookup_static_oid(oid)) {
  ------------------
  |  Branch (74:12): [True: 11.7k, False: 1.73k]
  ------------------
   75|  11.7k|      return std::string(*name);
   76|  11.7k|   }
   77|       |
   78|  1.73k|   const lock_guard_type<mutex_type> lock(m_mutex);
   79|       |
   80|  1.73k|   auto i = m_oid2str.find(oid);
   81|  1.73k|   if(i != m_oid2str.end()) {
  ------------------
  |  Branch (81:7): [True: 0, False: 1.73k]
  ------------------
   82|      0|      return i->second;
   83|      0|   }
   84|       |
   85|  1.73k|   return {};
   86|  1.73k|}
_ZN5Botan7OID_Map7str2oidENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   88|     16|OID OID_Map::str2oid(std::string_view str) {
   89|     16|   if(auto oid = lookup_static_oid_name(str)) {
  ------------------
  |  Branch (89:12): [True: 16, False: 0]
  ------------------
   90|     16|      return std::move(*oid);
   91|     16|   }
   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|}

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

_ZN5Botan13base64_decodeEPKcmb:
  189|    112|secure_vector<uint8_t> base64_decode(const char input[], size_t input_length, bool ignore_ws) {
  190|    112|   return base_decode_to_vec<secure_vector<uint8_t>>(Base64(), input, input_length, ignore_ws);
  191|    112|}
base64.cpp:_ZN5Botan12_GLOBAL__N_16Base6417decode_max_outputEm:
   43|    224|      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|    224|         return (round_up(input_length, m_encoding_bytes_out) / m_encoding_bytes_out) * m_encoding_bytes_in;
   46|    224|      }
base64.cpp:_ZN5Botan12_GLOBAL__N_16Base6413bits_consumedEv:
   34|     24|      static constexpr size_t bits_consumed() noexcept { return m_encoding_bits; }
base64.cpp:_ZN5Botan12_GLOBAL__N_16Base6419lookup_binary_valueEc:
  112|  26.3k|uint8_t Base64::lookup_binary_value(char input) noexcept {
  113|  26.3k|   auto has_zero_byte = [](uint64_t v) { return ((v - 0x0101010101010101) & ~(v) & 0x8080808080808080); };
  114|       |
  115|       |   // Assumes each byte is either 0x00 or 0x80
  116|  26.3k|   auto index_of_first_set_byte = [](uint64_t v) {
  117|  26.3k|      return ((((v - 1) & 0x0101010101010101) * 0x0101010101010101) >> 56) - 1;
  118|  26.3k|   };
  119|       |
  120|  26.3k|   constexpr uint64_t lo = 0x0101010101010101;
  121|       |
  122|  26.3k|   const uint8_t x = static_cast<uint8_t>(input);
  123|       |
  124|  26.3k|   const uint64_t x8 = x * lo;
  125|       |
  126|       |   // Defines the valid ASCII ranges of base64, except the special chars (below)
  127|  26.3k|   constexpr uint64_t val_l = make_uint64(0, 0, 0, 0, 0, 'A', 'a', '0');
  128|  26.3k|   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|  26.3k|   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|  26.3k|   const uint64_t val_v = 0xbfb904 ^ (0xFF000000 - (x << 24));
  136|       |
  137|  26.3k|   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|  26.3k|   constexpr uint64_t specials_i = make_uint64(0, '+', '/', '=', ' ', '\n', '\t', '\r');
  141|       |
  142|  26.3k|   const uint64_t specials_v = 0x3e3f8180808080 ^ (static_cast<uint64_t>(z) << 56);
  143|       |
  144|  26.3k|   const uint64_t smask = has_zero_byte(x8 ^ specials_i) ^ 0x8000000000000000;
  145|       |
  146|  26.3k|   return static_cast<uint8_t>(specials_v >> (8 * index_of_first_set_byte(smask)));
  147|  26.3k|}
base64.cpp:_ZZN5Botan12_GLOBAL__N_16Base6419lookup_binary_valueEcENK3$_0clEm:
  116|  52.6k|   auto index_of_first_set_byte = [](uint64_t v) {
  117|  52.6k|      return ((((v - 1) & 0x0101010101010101) * 0x0101010101010101) >> 56) - 1;
  118|  52.6k|   };
base64.cpp:_ZZN5Botan12_GLOBAL__N_16Base6419lookup_binary_valueEcENK3$_1clEm:
  113|  26.3k|   auto has_zero_byte = [](uint64_t v) { return ((v - 0x0101010101010101) & ~(v) & 0x8080808080808080); };
base64.cpp:_ZN5Botan12_GLOBAL__N_16Base6414check_bad_charEhcb:
  150|  18.9k|bool Base64::check_bad_char(uint8_t bin, char input, bool ignore_ws) {
  151|  18.9k|   if(bin <= 0x3F) {
  ------------------
  |  Branch (151:7): [True: 1.44k, False: 17.5k]
  ------------------
  152|  1.44k|      return true;
  153|  17.5k|   } else if(!(bin == 0x81 || (bin == 0x80 && ignore_ws))) {
  ------------------
  |  Branch (153:16): [True: 384, False: 17.1k]
  |  Branch (153:32): [True: 17.0k, False: 34]
  |  Branch (153:47): [True: 17.0k, False: 0]
  ------------------
  154|     34|      throw Invalid_Argument(fmt("base64_decode: invalid character '{}'", format_char_for_display(input)));
  155|     34|   }
  156|  17.4k|   return false;
  157|  18.9k|}
base64.cpp:_ZN5Botan12_GLOBAL__N_16Base644nameEv:
   24|     23|      static std::string name() { return "base64"; }
base64.cpp:_ZN5Botan12_GLOBAL__N_16Base646decodeEPhPKh:
   54|    360|      static void decode(uint8_t* out_ptr, const uint8_t decode_buf[4]) {
   55|    360|         out_ptr[0] = (decode_buf[0] << 2) | (decode_buf[1] >> 4);
   56|    360|         out_ptr[1] = (decode_buf[1] << 4) | (decode_buf[2] >> 2);
   57|    360|         out_ptr[2] = (decode_buf[2] << 6) | decode_buf[3];
   58|    360|      }
base64.cpp:_ZN5Botan12_GLOBAL__N_16Base6415bytes_to_removeEm:
   60|     70|      static size_t bytes_to_remove(size_t final_truncate) { return final_truncate; }

_ZN5Botan10hex_decodeEPhPKcmRmb:
   75|  19.6k|size_t hex_decode(uint8_t output[], const char input[], size_t input_length, size_t& input_consumed, bool ignore_ws) {
   76|  19.6k|   uint8_t* out_ptr = output;
   77|  19.6k|   bool top_nibble = true;
   78|  19.6k|   uint8_t next = 0;
   79|       |
   80|  19.6k|   input_consumed = 0;
   81|       |
   82|  19.6k|   clear_mem(output, input_length / 2);
   83|       |
   84|  1.21M|   for(size_t i = 0; i != input_length; ++i) {
  ------------------
  |  Branch (84:22): [True: 1.19M, False: 19.6k]
  ------------------
   85|  1.19M|      const uint8_t bin = hex_char_to_bin(input[i]);
   86|       |
   87|  1.19M|      if(bin >= 0x10) {
  ------------------
  |  Branch (87:10): [True: 0, False: 1.19M]
  ------------------
   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|  1.19M|      if(top_nibble) {
  ------------------
  |  Branch (95:10): [True: 597k, False: 597k]
  ------------------
   96|   597k|         next = bin << 4;
   97|   597k|      } else {
   98|   597k|         next |= bin;
   99|   597k|         *out_ptr = next;
  100|   597k|      }
  101|       |
  102|  1.19M|      top_nibble = !top_nibble;
  103|  1.19M|      if(top_nibble) {
  ------------------
  |  Branch (103:10): [True: 597k, False: 597k]
  ------------------
  104|   597k|         ++out_ptr;
  105|   597k|         input_consumed = i + 1;
  106|   597k|      }
  107|  1.19M|   }
  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|  19.6k|   while(input_consumed < input_length && hex_char_to_bin(input[input_consumed]) == 0x80) {
  ------------------
  |  Branch (113:10): [True: 0, False: 19.6k]
  |  Branch (113:43): [True: 0, False: 0]
  ------------------
  114|      0|      ++input_consumed;
  115|      0|   }
  116|       |
  117|  19.6k|   return (out_ptr - output);
  118|  19.6k|}
_ZN5Botan10hex_decodeEPhPKcmb:
  120|  19.6k|size_t hex_decode(uint8_t output[], const char input[], size_t input_length, bool ignore_ws) {
  121|  19.6k|   size_t consumed = 0;
  122|  19.6k|   const size_t written = hex_decode(output, input, input_length, consumed, ignore_ws);
  123|       |
  124|  19.6k|   if(consumed != input_length) {
  ------------------
  |  Branch (124:7): [True: 0, False: 19.6k]
  ------------------
  125|      0|      throw Invalid_Argument("hex_decode: input did not have full bytes");
  126|      0|   }
  127|       |
  128|  19.6k|   return written;
  129|  19.6k|}
_ZN5Botan17hex_decode_lockedEPKcmb:
  142|  19.6k|secure_vector<uint8_t> hex_decode_locked(const char input[], size_t input_length, bool ignore_ws) {
  143|  19.6k|   secure_vector<uint8_t> bin(1 + input_length / 2);
  144|       |
  145|  19.6k|   const size_t written = hex_decode(bin.data(), input, input_length, ignore_ws);
  146|       |
  147|  19.6k|   bin.resize(written);
  148|  19.6k|   return bin;
  149|  19.6k|}
_ZN5Botan17hex_decode_lockedENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEEb:
  151|  12.4k|secure_vector<uint8_t> hex_decode_locked(std::string_view input, bool ignore_ws) {
  152|  12.4k|   return hex_decode_locked(input.data(), input.size(), ignore_ws);
  153|  12.4k|}
hex.cpp:_ZN5Botan12_GLOBAL__N_115hex_char_to_binEc:
   55|  1.19M|uint8_t hex_char_to_bin(char input) {
   56|       |   // Starts of valid value ranges (v_lo) and their lengths (v_range)
   57|  1.19M|   constexpr uint64_t v_lo = make_uint64(0, '0', 'a', 'A', ' ', '\n', '\t', '\r');
   58|  1.19M|   constexpr uint64_t v_range = make_uint64(0, 10, 6, 6, 1, 1, 1, 1);
   59|  1.19M|   constexpr uint64_t expand8 = 0x0101010101010101;
   60|  1.19M|   constexpr uint64_t top64 = 0x8000000000000000;
   61|       |
   62|  1.19M|   const uint8_t x = static_cast<uint8_t>(input);
   63|  1.19M|   const uint64_t x8 = x * expand8;
   64|       |
   65|  1.19M|   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|  1.19M|   const uint64_t val_v = 0xd0a9c960767773 ^ static_cast<uint64_t>(0xFF - x) << 56;
   69|       |
   70|  1.19M|   return x + static_cast<uint8_t>(val_v >> (8 * index_of_first_set_byte(v_mask)));
   71|  1.19M|}

_ZN5Botan12HashFunction6createENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
  111|     58|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|     58|   if(provider.empty() == false && provider != "base") {
  ------------------
  |  Branch (122:7): [True: 0, False: 58]
  |  Branch (122:36): [True: 0, False: 0]
  ------------------
  123|      0|      return nullptr;  // unknown provider
  124|      0|   }
  125|       |
  126|     58|#if defined(BOTAN_HAS_SHA1)
  127|     58|   if(algo_spec == "SHA-1") {
  ------------------
  |  Branch (127:7): [True: 0, False: 58]
  ------------------
  128|      0|      return std::make_unique<SHA_1>();
  129|      0|   }
  130|     58|#endif
  131|       |
  132|     58|#if defined(BOTAN_HAS_SHA2_32)
  133|     58|   if(algo_spec == "SHA-224") {
  ------------------
  |  Branch (133:7): [True: 0, False: 58]
  ------------------
  134|      0|      return std::make_unique<SHA_224>();
  135|      0|   }
  136|       |
  137|     58|   if(algo_spec == "SHA-256") {
  ------------------
  |  Branch (137:7): [True: 0, False: 58]
  ------------------
  138|      0|      return std::make_unique<SHA_256>();
  139|      0|   }
  140|     58|#endif
  141|       |
  142|     58|#if defined(BOTAN_HAS_SHA2_64)
  143|     58|   if(algo_spec == "SHA-384") {
  ------------------
  |  Branch (143:7): [True: 0, False: 58]
  ------------------
  144|      0|      return std::make_unique<SHA_384>();
  145|      0|   }
  146|       |
  147|     58|   if(algo_spec == "SHA-512") {
  ------------------
  |  Branch (147:7): [True: 2, False: 56]
  ------------------
  148|      2|      return std::make_unique<SHA_512>();
  149|      2|   }
  150|       |
  151|     56|   if(algo_spec == "SHA-512-256") {
  ------------------
  |  Branch (151:7): [True: 0, False: 56]
  ------------------
  152|      0|      return std::make_unique<SHA_512_256>();
  153|      0|   }
  154|     56|#endif
  155|       |
  156|     56|#if defined(BOTAN_HAS_RIPEMD_160)
  157|     56|   if(algo_spec == "RIPEMD-160") {
  ------------------
  |  Branch (157:7): [True: 0, False: 56]
  ------------------
  158|      0|      return std::make_unique<RIPEMD_160>();
  159|      0|   }
  160|     56|#endif
  161|       |
  162|     56|#if defined(BOTAN_HAS_WHIRLPOOL)
  163|     56|   if(algo_spec == "Whirlpool") {
  ------------------
  |  Branch (163:7): [True: 0, False: 56]
  ------------------
  164|      0|      return std::make_unique<Whirlpool>();
  165|      0|   }
  166|     56|#endif
  167|       |
  168|     56|#if defined(BOTAN_HAS_MD5)
  169|     56|   if(algo_spec == "MD5") {
  ------------------
  |  Branch (169:7): [True: 0, False: 56]
  ------------------
  170|      0|      return std::make_unique<MD5>();
  171|      0|   }
  172|     56|#endif
  173|       |
  174|     56|#if defined(BOTAN_HAS_MD4)
  175|     56|   if(algo_spec == "MD4") {
  ------------------
  |  Branch (175:7): [True: 0, False: 56]
  ------------------
  176|      0|      return std::make_unique<MD4>();
  177|      0|   }
  178|     56|#endif
  179|       |
  180|     56|#if defined(BOTAN_HAS_GOST_34_11)
  181|     56|   if(algo_spec == "GOST-R-34.11-94" || algo_spec == "GOST-34.11") {
  ------------------
  |  Branch (181:7): [True: 0, False: 56]
  |  Branch (181:41): [True: 0, False: 56]
  ------------------
  182|      0|      return std::make_unique<GOST_34_11>();
  183|      0|   }
  184|     56|#endif
  185|       |
  186|     56|#if defined(BOTAN_HAS_ADLER32)
  187|     56|   if(algo_spec == "Adler32") {
  ------------------
  |  Branch (187:7): [True: 0, False: 56]
  ------------------
  188|      0|      return std::make_unique<Adler32>();
  189|      0|   }
  190|     56|#endif
  191|       |
  192|     56|#if defined(BOTAN_HAS_ASCON_HASH256)
  193|     56|   if(algo_spec == "Ascon-Hash256") {
  ------------------
  |  Branch (193:7): [True: 0, False: 56]
  ------------------
  194|      0|      return std::make_unique<Ascon_Hash256>();
  195|      0|   }
  196|     56|#endif
  197|       |
  198|     56|#if defined(BOTAN_HAS_CRC24)
  199|     56|   if(algo_spec == "CRC24") {
  ------------------
  |  Branch (199:7): [True: 0, False: 56]
  ------------------
  200|      0|      return std::make_unique<CRC24>();
  201|      0|   }
  202|     56|#endif
  203|       |
  204|     56|#if defined(BOTAN_HAS_CRC32)
  205|     56|   if(algo_spec == "CRC32") {
  ------------------
  |  Branch (205:7): [True: 0, False: 56]
  ------------------
  206|      0|      return std::make_unique<CRC32>();
  207|      0|   }
  208|     56|#endif
  209|       |
  210|     56|#if defined(BOTAN_HAS_STREEBOG)
  211|     56|   if(algo_spec == "Streebog-256") {
  ------------------
  |  Branch (211:7): [True: 0, False: 56]
  ------------------
  212|      0|      return std::make_unique<Streebog>(256);
  213|      0|   }
  214|     56|   if(algo_spec == "Streebog-512") {
  ------------------
  |  Branch (214:7): [True: 0, False: 56]
  ------------------
  215|      0|      return std::make_unique<Streebog>(512);
  216|      0|   }
  217|     56|#endif
  218|       |
  219|     56|#if defined(BOTAN_HAS_SM3)
  220|     56|   if(algo_spec == "SM3") {
  ------------------
  |  Branch (220:7): [True: 0, False: 56]
  ------------------
  221|      0|      return std::make_unique<SM3>();
  222|      0|   }
  223|     56|#endif
  224|       |
  225|     56|   const SCAN_Name req(algo_spec);
  226|       |
  227|     56|#if defined(BOTAN_HAS_SKEIN_512)
  228|     56|   if(req.algo_name() == "Skein-512") {
  ------------------
  |  Branch (228:7): [True: 0, False: 56]
  ------------------
  229|      0|      return std::make_unique<Skein_512>(req.arg_as_integer(0, 512), req.arg(1, ""));
  230|      0|   }
  231|     56|#endif
  232|       |
  233|     56|#if defined(BOTAN_HAS_BLAKE2B)
  234|     56|   if(req.algo_name() == "Blake2b" || req.algo_name() == "BLAKE2b") {
  ------------------
  |  Branch (234:7): [True: 0, False: 56]
  |  Branch (234:39): [True: 0, False: 56]
  ------------------
  235|      0|      return std::make_unique<BLAKE2b>(req.arg_as_integer(0, 512));
  236|      0|   }
  237|     56|#endif
  238|       |
  239|     56|#if defined(BOTAN_HAS_BLAKE2S)
  240|     56|   if(req.algo_name() == "Blake2s" || req.algo_name() == "BLAKE2s") {
  ------------------
  |  Branch (240:7): [True: 0, False: 56]
  |  Branch (240:39): [True: 0, False: 56]
  ------------------
  241|      0|      return std::make_unique<BLAKE2s>(req.arg_as_integer(0, 256));
  242|      0|   }
  243|     56|#endif
  244|       |
  245|     56|#if defined(BOTAN_HAS_KECCAK)
  246|     56|   if(req.algo_name() == "Keccak-1600") {
  ------------------
  |  Branch (246:7): [True: 0, False: 56]
  ------------------
  247|      0|      return std::make_unique<Keccak_1600>(req.arg_as_integer(0, 512));
  248|      0|   }
  249|     56|#endif
  250|       |
  251|     56|#if defined(BOTAN_HAS_SHA3)
  252|     56|   if(req.algo_name() == "SHA-3") {
  ------------------
  |  Branch (252:7): [True: 56, False: 0]
  ------------------
  253|     56|      return std::make_unique<SHA_3>(req.arg_as_integer(0, 512));
  254|     56|   }
  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|     58|std::unique_ptr<HashFunction> HashFunction::create_or_throw(std::string_view algo, std::string_view provider) {
  309|     58|   if(auto hash = HashFunction::create(algo, provider)) {
  ------------------
  |  Branch (309:12): [True: 58, False: 0]
  ------------------
  310|     58|      return hash;
  311|     58|   }
  312|      0|   throw Lookup_Error("Hash", algo, provider);
  313|     58|}

_ZN5Botan7SHA_51215compress_digestERNSt3__16vectorImNS_16secure_allocatorImEEEENS1_4spanIKhLm18446744073709551615EEEm:
   56|      2|void SHA_512::compress_digest(digest_type& digest, std::span<const uint8_t> input, size_t blocks) {
   57|      2|#if defined(BOTAN_HAS_SHA2_64_X86)
   58|      2|   if(CPUID::has(CPUID::Feature::SHA512)) {
  ------------------
  |  Branch (58:7): [True: 0, False: 2]
  ------------------
   59|      0|      return compress_digest_x86(digest, input, blocks);
   60|      0|   }
   61|      2|#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|      2|#if defined(BOTAN_HAS_SHA2_64_X86_AVX512)
   70|      2|   if(CPUID::has(CPUID::Feature::AVX512, CPUID::Feature::BMI)) {
  ------------------
  |  Branch (70:7): [True: 0, False: 2]
  ------------------
   71|      0|      return compress_digest_x86_avx512(digest, input, blocks);
   72|      0|   }
   73|      2|#endif
   74|       |
   75|      2|#if defined(BOTAN_HAS_SHA2_64_X86_AVX2)
   76|      2|   if(CPUID::has(CPUID::Feature::AVX2, CPUID::Feature::BMI)) {
  ------------------
  |  Branch (76:7): [True: 2, False: 0]
  ------------------
   77|      2|      return compress_digest_x86_avx2(digest, input, blocks);
   78|      2|   }
   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], 0x428A2F98D728AE22);
  100|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], 0x7137449123EF65CD);
  101|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], 0xB5C0FBCFEC4D3B2F);
  102|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], 0xE9B5DBA58189DBBC);
  103|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], 0x3956C25BF348B538);
  104|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], 0x59F111F1B605D019);
  105|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], 0x923F82A4AF194F9B);
  106|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], 0xAB1C5ED5DA6D8118);
  107|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], 0xD807AA98A3030242);
  108|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], 0x12835B0145706FBE);
  109|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], 0x243185BE4EE4B28C);
  110|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], 0x550C7DC3D5FFB4E2);
  111|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], 0x72BE5D74F27B896F);
  112|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], 0x80DEB1FE3B1696B1);
  113|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], 0x9BDC06A725C71235);
  114|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], 0xC19BF174CF692694);
  115|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], 0xE49B69C19EF14AD2);
  116|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], 0xEFBE4786384F25E3);
  117|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], 0x0FC19DC68B8CD5B5);
  118|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], 0x240CA1CC77AC9C65);
  119|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], 0x2DE92C6F592B0275);
  120|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], 0x4A7484AA6EA6E483);
  121|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], 0x5CB0A9DCBD41FBD4);
  122|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], 0x76F988DA831153B5);
  123|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], 0x983E5152EE66DFAB);
  124|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], 0xA831C66D2DB43210);
  125|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], 0xB00327C898FB213F);
  126|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], 0xBF597FC7BEEF0EE4);
  127|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], 0xC6E00BF33DA88FC2);
  128|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], 0xD5A79147930AA725);
  129|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], 0x06CA6351E003826F);
  130|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], 0x142929670A0E6E70);
  131|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], 0x27B70A8546D22FFC);
  132|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], 0x2E1B21385C26C926);
  133|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], 0x4D2C6DFC5AC42AED);
  134|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], 0x53380D139D95B3DF);
  135|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], 0x650A73548BAF63DE);
  136|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], 0x766A0ABB3C77B2A8);
  137|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], 0x81C2C92E47EDAEE6);
  138|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], 0x92722C851482353B);
  139|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], 0xA2BFE8A14CF10364);
  140|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], 0xA81A664BBC423001);
  141|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], 0xC24B8B70D0F89791);
  142|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], 0xC76C51A30654BE30);
  143|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], 0xD192E819D6EF5218);
  144|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], 0xD69906245565A910);
  145|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], 0xF40E35855771202A);
  146|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], 0x106AA07032BBD1B8);
  147|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], 0x19A4C116B8D2D0C8);
  148|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], 0x1E376C085141AB53);
  149|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], 0x2748774CDF8EEB99);
  150|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], 0x34B0BCB5E19B48A8);
  151|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], 0x391C0CB3C5C95A63);
  152|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], 0x4ED8AA4AE3418ACB);
  153|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], 0x5B9CCA4F7763E373);
  154|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], 0x682E6FF3D6B2B8A3);
  155|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], 0x748F82EE5DEFB2FC);
  156|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], 0x78A5636F43172F60);
  157|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], 0x84C87814A1F0AB72);
  158|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], 0x8CC702081A6439EC);
  159|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], 0x90BEFFFA23631E28);
  160|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], 0xA4506CEBDE82BDE9);
  161|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], 0xBEF9A3F7B2C67915);
  162|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], 0xC67178F2E372532B);
  163|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], 0xCA273ECEEA26619C);
  164|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], 0xD186B8C721C0C207);
  165|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], 0xEADA7DD6CDE0EB1E);
  166|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], 0xF57D4F7FEE6ED178);
  167|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], 0x06F067AA72176FBA);
  168|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], 0x0A637DC5A2C898A6);
  169|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], 0x113F9804BEF90DAE);
  170|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], 0x1B710B35131C471B);
  171|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], 0x28DB77F523047D84);
  172|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], 0x32CAAB7B40C72493);
  173|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], 0x3C9EBE0A15C9BEBC);
  174|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], 0x431D67C49C100D4C);
  175|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], 0x4CC5D4BECB3E42B6);
  176|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], 0x597F299CFC657E2A);
  177|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], 0x5FCB6FAB3AD6FAEC);
  178|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], 0x6C44198C4A475817);
  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_51210compress_nERNSt3__16vectorImNS_16secure_allocatorImEEEENS1_4spanIKhLm18446744073709551615EEEm:
  213|      2|void SHA_512::compress_n(digest_type& digest, std::span<const uint8_t> input, size_t blocks) {
  214|      2|   SHA_512::compress_digest(digest, input, blocks);
  215|      2|}
_ZN5Botan7SHA_5124initERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  239|      4|void SHA_512::init(digest_type& digest) {
  240|      4|   digest.assign({0x6A09E667F3BCC908,
  241|      4|                  0xBB67AE8584CAA73B,
  242|      4|                  0x3C6EF372FE94F82B,
  243|      4|                  0xA54FF53A5F1D36F1,
  244|      4|                  0x510E527FADE682D1,
  245|      4|                  0x9B05688C2B3E6C1F,
  246|      4|                  0x1F83D9ABFB41BD6B,
  247|      4|                  0x5BE0CD19137E2179});
  248|      4|}
_ZN5Botan7SHA_5128add_dataENSt3__14spanIKhLm18446744073709551615EEE:
  278|      2|void SHA_512::add_data(std::span<const uint8_t> input) {
  279|      2|   m_md.update(input);
  280|      2|}
_ZN5Botan7SHA_51212final_resultENSt3__14spanIhLm18446744073709551615EEE:
  290|      2|void SHA_512::final_result(std::span<uint8_t> output) {
  291|      2|   m_md.final(output);
  292|      2|}

_ZN5Botan7SHA_51224compress_digest_x86_avx2ERNSt3__16vectorImNS_16secure_allocatorImEEEENS1_4spanIKhLm18446744073709551615EEEm:
   44|      2|                                                              size_t blocks) {
   45|       |   // clang-format off
   46|      2|   alignas(64) const uint64_t K[80] = {
   47|      2|      0x428A2F98D728AE22, 0x7137449123EF65CD, 0xB5C0FBCFEC4D3B2F, 0xE9B5DBA58189DBBC,
   48|      2|      0x3956C25BF348B538, 0x59F111F1B605D019, 0x923F82A4AF194F9B, 0xAB1C5ED5DA6D8118,
   49|      2|      0xD807AA98A3030242, 0x12835B0145706FBE, 0x243185BE4EE4B28C, 0x550C7DC3D5FFB4E2,
   50|      2|      0x72BE5D74F27B896F, 0x80DEB1FE3B1696B1, 0x9BDC06A725C71235, 0xC19BF174CF692694,
   51|      2|      0xE49B69C19EF14AD2, 0xEFBE4786384F25E3, 0x0FC19DC68B8CD5B5, 0x240CA1CC77AC9C65,
   52|      2|      0x2DE92C6F592B0275, 0x4A7484AA6EA6E483, 0x5CB0A9DCBD41FBD4, 0x76F988DA831153B5,
   53|      2|      0x983E5152EE66DFAB, 0xA831C66D2DB43210, 0xB00327C898FB213F, 0xBF597FC7BEEF0EE4,
   54|      2|      0xC6E00BF33DA88FC2, 0xD5A79147930AA725, 0x06CA6351E003826F, 0x142929670A0E6E70,
   55|      2|      0x27B70A8546D22FFC, 0x2E1B21385C26C926, 0x4D2C6DFC5AC42AED, 0x53380D139D95B3DF,
   56|      2|      0x650A73548BAF63DE, 0x766A0ABB3C77B2A8, 0x81C2C92E47EDAEE6, 0x92722C851482353B,
   57|      2|      0xA2BFE8A14CF10364, 0xA81A664BBC423001, 0xC24B8B70D0F89791, 0xC76C51A30654BE30,
   58|      2|      0xD192E819D6EF5218, 0xD69906245565A910, 0xF40E35855771202A, 0x106AA07032BBD1B8,
   59|      2|      0x19A4C116B8D2D0C8, 0x1E376C085141AB53, 0x2748774CDF8EEB99, 0x34B0BCB5E19B48A8,
   60|      2|      0x391C0CB3C5C95A63, 0x4ED8AA4AE3418ACB, 0x5B9CCA4F7763E373, 0x682E6FF3D6B2B8A3,
   61|      2|      0x748F82EE5DEFB2FC, 0x78A5636F43172F60, 0x84C87814A1F0AB72, 0x8CC702081A6439EC,
   62|      2|      0x90BEFFFA23631E28, 0xA4506CEBDE82BDE9, 0xBEF9A3F7B2C67915, 0xC67178F2E372532B,
   63|      2|      0xCA273ECEEA26619C, 0xD186B8C721C0C207, 0xEADA7DD6CDE0EB1E, 0xF57D4F7FEE6ED178,
   64|      2|      0x06F067AA72176FBA, 0x0A637DC5A2C898A6, 0x113F9804BEF90DAE, 0x1B710B35131C471B,
   65|      2|      0x28DB77F523047D84, 0x32CAAB7B40C72493, 0x3C9EBE0A15C9BEBC, 0x431D67C49C100D4C,
   66|      2|      0x4CC5D4BECB3E42B6, 0x597F299CFC657E2A, 0x5FCB6FAB3AD6FAEC, 0x6C44198C4A475817,
   67|      2|   };
   68|       |   // clang-format on
   69|       |
   70|      2|   alignas(64) uint64_t W[16] = {0};
   71|      2|   alignas(64) uint64_t W2[80];
   72|       |
   73|      2|   uint64_t A = digest[0];
   74|      2|   uint64_t B = digest[1];
   75|      2|   uint64_t C = digest[2];
   76|      2|   uint64_t D = digest[3];
   77|      2|   uint64_t E = digest[4];
   78|      2|   uint64_t F = digest[5];
   79|      2|   uint64_t G = digest[6];
   80|      2|   uint64_t H = digest[7];
   81|       |
   82|      2|   const uint8_t* data = input.data();
   83|       |
   84|      2|   while(blocks >= 2) {
  ------------------
  |  Branch (84:10): [True: 0, False: 2]
  ------------------
   85|      0|      SIMD_4x64 WS[8];
   86|       |
   87|      0|      for(size_t i = 0; i < 8; i++) {
  ------------------
  |  Branch (87:25): [True: 0, False: 0]
  ------------------
   88|      0|         WS[i] = SIMD_4x64::load_be2(&data[16 * i], &data[128 + 16 * i]);
   89|      0|         auto WK = WS[i] + SIMD_4x64::broadcast_2x64(&K[2 * i]);
   90|      0|         WK.store_le2(&W[2 * i], &W2[2 * i]);
   91|      0|      }
   92|       |
   93|      0|      data += 2 * 128;
   94|      0|      blocks -= 2;
   95|       |
   96|       |      // First 64 rounds of SHA-512
   97|      0|      for(size_t r = 0; r != 64; r += 16) {
  ------------------
  |  Branch (97:25): [True: 0, False: 0]
  ------------------
   98|      0|         auto w = sha512_next_w(WS) + SIMD_4x64::broadcast_2x64(&K[r + 16]);
   99|      0|         SHA2_64_F(A, B, C, D, E, F, G, H, W[0]);
  100|      0|         SHA2_64_F(H, A, B, C, D, E, F, G, W[1]);
  101|      0|         w.store_le2(&W[0], &W2[r + 16]);
  102|       |
  103|      0|         w = sha512_next_w(WS) + SIMD_4x64::broadcast_2x64(&K[r + 18]);
  104|      0|         SHA2_64_F(G, H, A, B, C, D, E, F, W[2]);
  105|      0|         SHA2_64_F(F, G, H, A, B, C, D, E, W[3]);
  106|      0|         w.store_le2(&W[2], &W2[r + 18]);
  107|       |
  108|      0|         w = sha512_next_w(WS) + SIMD_4x64::broadcast_2x64(&K[r + 20]);
  109|      0|         SHA2_64_F(E, F, G, H, A, B, C, D, W[4]);
  110|      0|         SHA2_64_F(D, E, F, G, H, A, B, C, W[5]);
  111|      0|         w.store_le2(&W[4], &W2[r + 20]);
  112|       |
  113|      0|         w = sha512_next_w(WS) + SIMD_4x64::broadcast_2x64(&K[r + 22]);
  114|      0|         SHA2_64_F(C, D, E, F, G, H, A, B, W[6]);
  115|      0|         SHA2_64_F(B, C, D, E, F, G, H, A, W[7]);
  116|      0|         w.store_le2(&W[6], &W2[r + 22]);
  117|       |
  118|      0|         w = sha512_next_w(WS) + SIMD_4x64::broadcast_2x64(&K[r + 24]);
  119|      0|         SHA2_64_F(A, B, C, D, E, F, G, H, W[8]);
  120|      0|         SHA2_64_F(H, A, B, C, D, E, F, G, W[9]);
  121|      0|         w.store_le2(&W[8], &W2[r + 24]);
  122|       |
  123|      0|         w = sha512_next_w(WS) + SIMD_4x64::broadcast_2x64(&K[r + 26]);
  124|      0|         SHA2_64_F(G, H, A, B, C, D, E, F, W[10]);
  125|      0|         SHA2_64_F(F, G, H, A, B, C, D, E, W[11]);
  126|      0|         w.store_le2(&W[10], &W2[r + 26]);
  127|       |
  128|      0|         w = sha512_next_w(WS) + SIMD_4x64::broadcast_2x64(&K[r + 28]);
  129|      0|         SHA2_64_F(E, F, G, H, A, B, C, D, W[12]);
  130|      0|         SHA2_64_F(D, E, F, G, H, A, B, C, W[13]);
  131|      0|         w.store_le2(&W[12], &W2[r + 28]);
  132|       |
  133|      0|         w = sha512_next_w(WS) + SIMD_4x64::broadcast_2x64(&K[r + 30]);
  134|      0|         SHA2_64_F(C, D, E, F, G, H, A, B, W[14]);
  135|      0|         SHA2_64_F(B, C, D, E, F, G, H, A, W[15]);
  136|      0|         w.store_le2(&W[14], &W2[r + 30]);
  137|      0|      }
  138|       |
  139|       |      // Final 16 rounds of SHA-512
  140|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[0]);
  141|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[1]);
  142|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[2]);
  143|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[3]);
  144|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[4]);
  145|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[5]);
  146|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[6]);
  147|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[7]);
  148|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W[8]);
  149|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W[9]);
  150|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W[10]);
  151|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W[11]);
  152|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W[12]);
  153|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W[13]);
  154|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W[14]);
  155|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W[15]);
  156|       |
  157|      0|      A = (digest[0] += A);
  158|      0|      B = (digest[1] += B);
  159|      0|      C = (digest[2] += C);
  160|      0|      D = (digest[3] += D);
  161|      0|      E = (digest[4] += E);
  162|      0|      F = (digest[5] += F);
  163|      0|      G = (digest[6] += G);
  164|      0|      H = (digest[7] += H);
  165|       |
  166|       |      // Second block of SHA-512 compression, with pre-expanded message
  167|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[0]);
  168|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[1]);
  169|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[2]);
  170|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[3]);
  171|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[4]);
  172|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[5]);
  173|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[6]);
  174|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[7]);
  175|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[8]);
  176|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[9]);
  177|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[10]);
  178|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[11]);
  179|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[12]);
  180|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[13]);
  181|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[14]);
  182|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[15]);
  183|       |
  184|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[16]);
  185|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[17]);
  186|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[18]);
  187|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[19]);
  188|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[20]);
  189|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[21]);
  190|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[22]);
  191|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[23]);
  192|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[24]);
  193|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[25]);
  194|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[26]);
  195|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[27]);
  196|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[28]);
  197|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[29]);
  198|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[30]);
  199|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[31]);
  200|       |
  201|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[32]);
  202|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[33]);
  203|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[34]);
  204|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[35]);
  205|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[36]);
  206|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[37]);
  207|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[38]);
  208|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[39]);
  209|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[40]);
  210|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[41]);
  211|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[42]);
  212|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[43]);
  213|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[44]);
  214|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[45]);
  215|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[46]);
  216|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[47]);
  217|       |
  218|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[48]);
  219|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[49]);
  220|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[50]);
  221|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[51]);
  222|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[52]);
  223|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[53]);
  224|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[54]);
  225|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[55]);
  226|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[56]);
  227|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[57]);
  228|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[58]);
  229|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[59]);
  230|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[60]);
  231|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[61]);
  232|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[62]);
  233|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[63]);
  234|       |
  235|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[64]);
  236|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[65]);
  237|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[66]);
  238|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[67]);
  239|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[68]);
  240|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[69]);
  241|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[70]);
  242|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[71]);
  243|      0|      SHA2_64_F(A, B, C, D, E, F, G, H, W2[72]);
  244|      0|      SHA2_64_F(H, A, B, C, D, E, F, G, W2[73]);
  245|      0|      SHA2_64_F(G, H, A, B, C, D, E, F, W2[74]);
  246|      0|      SHA2_64_F(F, G, H, A, B, C, D, E, W2[75]);
  247|      0|      SHA2_64_F(E, F, G, H, A, B, C, D, W2[76]);
  248|      0|      SHA2_64_F(D, E, F, G, H, A, B, C, W2[77]);
  249|      0|      SHA2_64_F(C, D, E, F, G, H, A, B, W2[78]);
  250|      0|      SHA2_64_F(B, C, D, E, F, G, H, A, W2[79]);
  251|       |
  252|      0|      A = (digest[0] += A);
  253|      0|      B = (digest[1] += B);
  254|      0|      C = (digest[2] += C);
  255|      0|      D = (digest[3] += D);
  256|      0|      E = (digest[4] += E);
  257|      0|      F = (digest[5] += F);
  258|      0|      G = (digest[6] += G);
  259|      0|      H = (digest[7] += H);
  260|      0|   }
  261|       |
  262|      4|   while(blocks > 0) {
  ------------------
  |  Branch (262:10): [True: 2, False: 2]
  ------------------
  263|      2|      SIMD_2x64 WS[8];
  264|       |
  265|     18|      for(size_t i = 0; i < 8; i++) {
  ------------------
  |  Branch (265:25): [True: 16, False: 2]
  ------------------
  266|     16|         WS[i] = SIMD_2x64::load_be(&data[16 * i]);
  267|     16|         auto WK = WS[i] + SIMD_2x64::load_le(&K[2 * i]);
  268|     16|         WK.store_le(&W[2 * i]);
  269|     16|      }
  270|       |
  271|      2|      data += 128;
  272|      2|      blocks -= 1;
  273|       |
  274|       |      // First 64 rounds of SHA-512
  275|     10|      for(size_t r = 0; r != 64; r += 16) {
  ------------------
  |  Branch (275:25): [True: 8, False: 2]
  ------------------
  276|      8|         auto w = sha512_next_w(WS) + SIMD_2x64::load_le(&K[r + 16]);
  277|      8|         SHA2_64_F(A, B, C, D, E, F, G, H, W[0]);
  278|      8|         SHA2_64_F(H, A, B, C, D, E, F, G, W[1]);
  279|      8|         w.store_le(&W[0]);
  280|       |
  281|      8|         w = sha512_next_w(WS) + SIMD_2x64::load_le(&K[r + 18]);
  282|      8|         SHA2_64_F(G, H, A, B, C, D, E, F, W[2]);
  283|      8|         SHA2_64_F(F, G, H, A, B, C, D, E, W[3]);
  284|      8|         w.store_le(&W[2]);
  285|       |
  286|      8|         w = sha512_next_w(WS) + SIMD_2x64::load_le(&K[r + 20]);
  287|      8|         SHA2_64_F(E, F, G, H, A, B, C, D, W[4]);
  288|      8|         SHA2_64_F(D, E, F, G, H, A, B, C, W[5]);
  289|      8|         w.store_le(&W[4]);
  290|       |
  291|      8|         w = sha512_next_w(WS) + SIMD_2x64::load_le(&K[r + 22]);
  292|      8|         SHA2_64_F(C, D, E, F, G, H, A, B, W[6]);
  293|      8|         SHA2_64_F(B, C, D, E, F, G, H, A, W[7]);
  294|      8|         w.store_le(&W[6]);
  295|       |
  296|      8|         w = sha512_next_w(WS) + SIMD_2x64::load_le(&K[r + 24]);
  297|      8|         SHA2_64_F(A, B, C, D, E, F, G, H, W[8]);
  298|      8|         SHA2_64_F(H, A, B, C, D, E, F, G, W[9]);
  299|      8|         w.store_le(&W[8]);
  300|       |
  301|      8|         w = sha512_next_w(WS) + SIMD_2x64::load_le(&K[r + 26]);
  302|      8|         SHA2_64_F(G, H, A, B, C, D, E, F, W[10]);
  303|      8|         SHA2_64_F(F, G, H, A, B, C, D, E, W[11]);
  304|      8|         w.store_le(&W[10]);
  305|       |
  306|      8|         w = sha512_next_w(WS) + SIMD_2x64::load_le(&K[r + 28]);
  307|      8|         SHA2_64_F(E, F, G, H, A, B, C, D, W[12]);
  308|      8|         SHA2_64_F(D, E, F, G, H, A, B, C, W[13]);
  309|      8|         w.store_le(&W[12]);
  310|       |
  311|      8|         w = sha512_next_w(WS) + SIMD_2x64::load_le(&K[r + 30]);
  312|      8|         SHA2_64_F(C, D, E, F, G, H, A, B, W[14]);
  313|      8|         SHA2_64_F(B, C, D, E, F, G, H, A, W[15]);
  314|      8|         w.store_le(&W[14]);
  315|      8|      }
  316|       |
  317|       |      // Final 16 rounds of SHA-512
  318|      2|      SHA2_64_F(A, B, C, D, E, F, G, H, W[0]);
  319|      2|      SHA2_64_F(H, A, B, C, D, E, F, G, W[1]);
  320|      2|      SHA2_64_F(G, H, A, B, C, D, E, F, W[2]);
  321|      2|      SHA2_64_F(F, G, H, A, B, C, D, E, W[3]);
  322|      2|      SHA2_64_F(E, F, G, H, A, B, C, D, W[4]);
  323|      2|      SHA2_64_F(D, E, F, G, H, A, B, C, W[5]);
  324|      2|      SHA2_64_F(C, D, E, F, G, H, A, B, W[6]);
  325|      2|      SHA2_64_F(B, C, D, E, F, G, H, A, W[7]);
  326|      2|      SHA2_64_F(A, B, C, D, E, F, G, H, W[8]);
  327|      2|      SHA2_64_F(H, A, B, C, D, E, F, G, W[9]);
  328|      2|      SHA2_64_F(G, H, A, B, C, D, E, F, W[10]);
  329|      2|      SHA2_64_F(F, G, H, A, B, C, D, E, W[11]);
  330|      2|      SHA2_64_F(E, F, G, H, A, B, C, D, W[12]);
  331|      2|      SHA2_64_F(D, E, F, G, H, A, B, C, W[13]);
  332|      2|      SHA2_64_F(C, D, E, F, G, H, A, B, W[14]);
  333|      2|      SHA2_64_F(B, C, D, E, F, G, H, A, W[15]);
  334|       |
  335|      2|      A = (digest[0] += A);
  336|      2|      B = (digest[1] += B);
  337|      2|      C = (digest[2] += C);
  338|      2|      D = (digest[3] += D);
  339|      2|      E = (digest[4] += E);
  340|      2|      F = (digest[5] += F);
  341|      2|      G = (digest[6] += G);
  342|      2|      H = (digest[7] += H);
  343|      2|   }
  344|      2|}
sha2_64_avx2.cpp:_ZN5Botan12_GLOBAL__N_113sha512_next_wINS_9SIMD_2x64EEET_PS3_:
   19|     64|BOTAN_FORCE_INLINE BOTAN_FN_ISA_AVX2_BMI2 SIMD_T sha512_next_w(SIMD_T x[8]) {
   20|     64|   auto t0 = SIMD_T::alignr8(x[1], x[0]);
   21|     64|   auto t1 = SIMD_T::alignr8(x[5], x[4]);
   22|       |
   23|     64|   auto s0 = t0.template rotr<1>() ^ t0.template rotr<8>() ^ t0.template shr<7>();
   24|     64|   auto s1 = x[7].template rotr<19>() ^ x[7].template rotr<61>() ^ x[7].template shr<6>();
   25|       |
   26|     64|   auto nx = x[0] + s0 + s1 + t1;
   27|       |
   28|     64|   x[0] = x[1];
   29|     64|   x[1] = x[2];
   30|     64|   x[2] = x[3];
   31|     64|   x[3] = x[4];
   32|     64|   x[4] = x[5];
   33|     64|   x[5] = x[6];
   34|     64|   x[6] = x[7];
   35|     64|   x[7] = nx;
   36|       |
   37|     64|   return x[7];
   38|     64|}

_ZN5Botan5SHA_3C2Em:
   17|     56|      m_keccak({.capacity_bits = output_bits * 2, .padding = KeccakPadding::sha3()}), m_output_length(output_bits / 8) {
   18|       |   // We only support the parameters for SHA-3 in this constructor
   19|       |
   20|     56|   if(output_bits != 224 && output_bits != 256 && output_bits != 384 && output_bits != 512) {
  ------------------
  |  Branch (20:7): [True: 56, False: 0]
  |  Branch (20:29): [True: 28, False: 28]
  |  Branch (20:51): [True: 28, False: 0]
  |  Branch (20:73): [True: 0, False: 28]
  ------------------
   21|      0|      throw Invalid_Argument(fmt("SHA_3: Invalid output length {}", output_bits));
   22|      0|   }
   23|     56|}
_ZN5Botan5SHA_38add_dataENSt3__14spanIKhLm18446744073709551615EEE:
   45|     84|void SHA_3::add_data(std::span<const uint8_t> input) {
   46|     84|   m_keccak.absorb(input);
   47|     84|}
_ZN5Botan5SHA_312final_resultENSt3__14spanIhLm18446744073709551615EEE:
   49|     56|void SHA_3::final_result(std::span<uint8_t> output) {
   50|     56|   m_keccak.finish();
   51|     56|   m_keccak.squeeze(output);
   52|     56|   m_keccak.clear();
   53|     56|}

_ZN5Botan6BigInt17from_radix_digitsENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEm:
  125|  17.1k|BigInt BigInt::from_radix_digits(std::string_view digits, size_t radix) {
  126|  17.1k|   if(radix == 16) {
  ------------------
  |  Branch (126:7): [True: 17.1k, False: 0]
  ------------------
  127|  17.1k|      secure_vector<uint8_t> binary;
  128|       |
  129|  17.1k|      if(digits.size() % 2 == 1) {
  ------------------
  |  Branch (129:10): [True: 4.65k, False: 12.4k]
  ------------------
  130|       |         // Handle lack of leading 0
  131|  4.65k|         const char buf0_with_leading_0[2] = {'0', digits[0]};
  132|       |
  133|  4.65k|         binary = hex_decode_locked(buf0_with_leading_0, 2);
  134|       |
  135|  4.65k|         if(digits.size() > 1) {
  ------------------
  |  Branch (135:13): [True: 2.47k, False: 2.18k]
  ------------------
  136|  2.47k|            binary += hex_decode_locked(&digits[1], digits.size() - 1, false);
  137|  2.47k|         }
  138|  12.4k|      } else {
  139|  12.4k|         binary = hex_decode_locked(digits, false);
  140|  12.4k|      }
  141|       |
  142|  17.1k|      return BigInt::from_bytes(binary);
  143|  17.1k|   } 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|  17.1k|}

_ZN5Botan6BigIntpLERKS0_:
   16|    920|BigInt& BigInt::operator+=(const BigInt& y) {
   17|    920|   if(&y == this) {
  ------------------
  |  Branch (17:7): [True: 0, False: 920]
  ------------------
   18|      0|      return *this <<= 1;
   19|      0|   }
   20|    920|   return add(y._data(), y.sig_words(), y.sign());
   21|    920|}
_ZN5Botan6BigIntmIERKS0_:
   23|  50.2k|BigInt& BigInt::operator-=(const BigInt& y) {
   24|  50.2k|   if(&y == this) {
  ------------------
  |  Branch (24:7): [True: 0, False: 50.2k]
  ------------------
   25|      0|      this->clear();
   26|      0|      this->set_sign(Positive);
   27|      0|      return *this;
   28|      0|   }
   29|  50.2k|   return sub(y._data(), y.sig_words(), y.sign());
   30|  50.2k|}
_ZN5Botan6BigInt3addEPKmmNS0_4SignE:
   32|  55.0k|BigInt& BigInt::add(const word y[], size_t y_words, Sign y_sign) {
   33|  55.0k|   const size_t x_sw = sig_words();
   34|       |
   35|  55.0k|   grow_to(std::max(x_sw, y_words) + 1);
   36|       |
   37|  55.0k|   if(sign() == y_sign) {
  ------------------
  |  Branch (37:7): [True: 2.61k, False: 52.3k]
  ------------------
   38|  2.61k|      const word carry = bigint_add2(mutable_data(), size() - 1, y, y_words);
   39|  2.61k|      mutable_data()[size() - 1] += carry;
   40|  52.3k|   } else {
   41|  52.3k|      const int32_t relative_size = bigint_cmp(_data(), x_sw, y, y_words);
   42|       |
   43|  52.3k|      if(relative_size >= 0) {
  ------------------
  |  Branch (43:10): [True: 50.2k, False: 2.17k]
  ------------------
   44|       |         // *this >= y
   45|  50.2k|         bigint_sub2(mutable_data(), x_sw, y, y_words);
   46|  50.2k|      } else {
   47|       |         // *this < y: compute *this = y - *this
   48|  2.17k|         bigint_sub2_rev(mutable_data(), y, y_words);
   49|  2.17k|      }
   50|       |
   51|  52.3k|      if(relative_size < 0) {
  ------------------
  |  Branch (51:10): [True: 2.17k, False: 50.2k]
  ------------------
   52|  2.17k|         set_sign(y_sign);
   53|  50.2k|      } else if(relative_size == 0) {
  ------------------
  |  Branch (53:17): [True: 2, False: 50.2k]
  ------------------
   54|      2|         set_sign(Positive);
   55|      2|      }
   56|  52.3k|   }
   57|       |
   58|  55.0k|   return (*this);
   59|  55.0k|}
_ZN5Botan6BigInt7mod_addERKS0_S2_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   61|  50.2k|BigInt& BigInt::mod_add(const BigInt& s, const BigInt& mod, secure_vector<word>& ws) {
   62|  50.2k|   if(this->signum() < 0 || s.signum() < 0 || mod.signum() < 0) {
  ------------------
  |  Branch (62:7): [True: 0, False: 50.2k]
  |  Branch (62:29): [True: 0, False: 50.2k]
  |  Branch (62:47): [True: 0, False: 50.2k]
  ------------------
   63|      0|      throw Invalid_Argument("BigInt::mod_add expects all arguments are positive");
   64|      0|   }
   65|       |
   66|  50.2k|   BOTAN_DEBUG_ASSERT(*this < mod);
  ------------------
  |  |  130|  50.2k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  50.2k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 50.2k]
  |  |  ------------------
  ------------------
   67|  50.2k|   BOTAN_DEBUG_ASSERT(s < mod);
  ------------------
  |  |  130|  50.2k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  50.2k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 50.2k]
  |  |  ------------------
  ------------------
   68|       |
   69|       |   /*
   70|       |   t + s or t + s - p == t - (p - s)
   71|       |
   72|       |   So first compute ws = p - s
   73|       |
   74|       |   Then compute t + s and t - ws
   75|       |
   76|       |   If t - ws does not borrow, then that is the correct valued
   77|       |   */
   78|       |
   79|  50.2k|   const size_t mod_sw = mod.sig_words();
   80|  50.2k|   BOTAN_ARG_CHECK(mod_sw > 0, "BigInt::mod_add modulus must be positive");
  ------------------
  |  |   35|  50.2k|   do {                                                          \
  |  |   36|  50.2k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  50.2k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 50.2k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  50.2k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 50.2k]
  |  |  ------------------
  ------------------
   81|       |
   82|  50.2k|   this->grow_to(mod_sw);
   83|  50.2k|   s.grow_to(mod_sw);
   84|       |
   85|       |   // First mod_sw for p - s, 2*mod_sw for bigint_addsub workspace
   86|  50.2k|   if(ws.size() < 3 * mod_sw) {
  ------------------
  |  Branch (86:7): [True: 36.8k, False: 13.3k]
  ------------------
   87|  36.8k|      ws.resize(3 * mod_sw);
   88|  36.8k|   }
   89|       |
   90|       |   // NOLINTBEGIN(readability-container-data-pointer)
   91|       |
   92|  50.2k|   word borrow = bigint_sub3(&ws[0], mod._data(), mod_sw, s._data(), mod_sw);
   93|  50.2k|   BOTAN_DEBUG_ASSERT(borrow == 0);
  ------------------
  |  |  130|  50.2k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  50.2k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 50.2k]
  |  |  ------------------
  ------------------
   94|  50.2k|   BOTAN_UNUSED(borrow);
  ------------------
  |  |  144|  50.2k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   95|       |
   96|       |   // Compute t - ws
   97|  50.2k|   borrow = bigint_sub3(&ws[mod_sw], this->_data(), mod_sw, &ws[0], mod_sw);
   98|       |
   99|       |   // Compute t + s
  100|  50.2k|   bigint_add3(&ws[mod_sw * 2], this->_data(), mod_sw, s._data(), mod_sw);
  101|       |
  102|  50.2k|   CT::conditional_copy_mem(borrow, &ws[0], &ws[mod_sw * 2], &ws[mod_sw], mod_sw);
  103|  50.2k|   set_words(&ws[0], mod_sw);
  104|       |
  105|       |   // NOLINTEND(readability-container-data-pointer)
  106|       |
  107|  50.2k|   return (*this);
  108|  50.2k|}
_ZN5Botan6BigInt7mod_subERKS0_S2_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  110|  3.55M|BigInt& BigInt::mod_sub(const BigInt& s, const BigInt& mod, secure_vector<word>& ws) {
  111|  3.55M|   if(this->signum() < 0 || s.signum() < 0 || mod.signum() < 0) {
  ------------------
  |  Branch (111:7): [True: 0, False: 3.55M]
  |  Branch (111:29): [True: 0, False: 3.55M]
  |  Branch (111:47): [True: 0, False: 3.55M]
  ------------------
  112|      0|      throw Invalid_Argument("BigInt::mod_sub expects all arguments are positive");
  113|      0|   }
  114|       |
  115|       |   // We are assuming in this function that *this and s are no more than mod_sw words long
  116|  3.55M|   BOTAN_DEBUG_ASSERT(*this < mod);
  ------------------
  |  |  130|  3.55M|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  3.55M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 3.55M]
  |  |  ------------------
  ------------------
  117|  3.55M|   BOTAN_DEBUG_ASSERT(s < mod);
  ------------------
  |  |  130|  3.55M|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  3.55M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 3.55M]
  |  |  ------------------
  ------------------
  118|       |
  119|  3.55M|   const size_t mod_sw = mod.sig_words();
  120|       |
  121|  3.55M|   this->grow_to(mod_sw);
  122|  3.55M|   s.grow_to(mod_sw);
  123|       |
  124|  3.55M|   if(ws.size() < mod_sw) {
  ------------------
  |  Branch (124:7): [True: 0, False: 3.55M]
  ------------------
  125|      0|      ws.resize(mod_sw);
  126|      0|   }
  127|       |
  128|  3.55M|   const word borrow = bigint_sub3(ws.data(), mutable_data(), mod_sw, s._data(), mod_sw);
  129|       |
  130|       |   // Conditionally add back the modulus
  131|  3.55M|   bigint_cnd_add(borrow, ws.data(), mod._data(), mod_sw);
  132|       |
  133|  3.55M|   unchecked_copy_memory(mutable_data(), ws.data(), mod_sw);
  134|       |
  135|  3.55M|   return (*this);
  136|  3.55M|}
_ZN5Botan6BigInt7mod_mulEhRKS0_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  138|  1.03M|BigInt& BigInt::mod_mul(uint8_t y, const BigInt& mod, secure_vector<word>& ws) {
  139|  1.03M|   BOTAN_ARG_CHECK(this->signum() >= 0, "*this must be positive");
  ------------------
  |  |   35|  1.03M|   do {                                                          \
  |  |   36|  1.03M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  1.03M|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 1.03M]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.03M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.03M]
  |  |  ------------------
  ------------------
  140|  1.03M|   BOTAN_ARG_CHECK(y < 16, "y too large");
  ------------------
  |  |   35|  1.03M|   do {                                                          \
  |  |   36|  1.03M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  1.03M|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 1.03M]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.03M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.03M]
  |  |  ------------------
  ------------------
  141|       |
  142|  1.03M|   BOTAN_DEBUG_ASSERT(*this < mod);
  ------------------
  |  |  130|  1.03M|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  1.03M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 1.03M]
  |  |  ------------------
  ------------------
  143|       |
  144|  1.03M|   *this *= static_cast<word>(y);
  145|  1.03M|   this->reduce_below(mod, ws);
  146|  1.03M|   return (*this);
  147|  1.03M|}
_ZN5Botan6BigIntmLEm:
  205|  1.03M|BigInt& BigInt::operator*=(word y) {
  206|  1.03M|   if(y == 0) {
  ------------------
  |  Branch (206:7): [True: 0, False: 1.03M]
  ------------------
  207|      0|      clear();
  208|      0|      set_sign(Positive);
  209|      0|   }
  210|       |
  211|  1.03M|   const word carry = bigint_linmul2(mutable_data(), size(), y);
  212|  1.03M|   set_word_at(size(), carry);
  213|       |
  214|  1.03M|   return (*this);
  215|  1.03M|}
_ZN5Botan6BigIntrMERKS0_:
  232|  7.68k|BigInt& BigInt::operator%=(const BigInt& mod) {
  233|  7.68k|   return (*this = (*this) % mod);
  234|  7.68k|}
_ZN5Botan6BigIntlSEm:
  269|  11.6k|BigInt& BigInt::operator<<=(size_t shift) {
  270|  11.6k|   if(shift >= 65536) {
  ------------------
  |  Branch (270:7): [True: 0, False: 11.6k]
  ------------------
  271|      0|      throw Invalid_Argument("BigInt left shift count too large");
  272|      0|   }
  273|       |
  274|  11.6k|   const size_t sw = sig_words();
  275|  11.6k|   const size_t new_size = sw + (shift + WordInfo<word>::bits - 1) / WordInfo<word>::bits;
  276|       |
  277|  11.6k|   m_data.grow_to(new_size);
  278|       |
  279|  11.6k|   bigint_shl1(m_data.mutable_data(), new_size, sw, shift);
  280|       |
  281|  11.6k|   return (*this);
  282|  11.6k|}
_ZN5Botan6BigIntrSEm:
  287|   888k|BigInt& BigInt::operator>>=(size_t shift) {
  288|   888k|   bigint_shr1(m_data.mutable_data(), m_data.size(), shift);
  289|       |
  290|   888k|   if(sig_words() == 0 && m_signedness == Negative) {
  ------------------
  |  Branch (290:7): [True: 838, False: 887k]
  |  Branch (290:27): [True: 0, False: 838]
  ------------------
  291|      0|      m_signedness = Positive;
  292|      0|   }
  293|       |
  294|   888k|   return (*this);
  295|   888k|}

_ZN5Botan6BigInt4add2ERKS0_PKmmNS0_4SignE:
   20|   823k|BigInt BigInt::add2(const BigInt& x, const word y[], size_t y_size, BigInt::Sign y_sign) {
   21|   823k|   const size_t x_sw = x.sig_words();
   22|       |
   23|   823k|   BigInt z = BigInt::with_capacity(std::max(x_sw, y_size) + 1);
   24|       |
   25|   823k|   if(x.sign() == y_sign) {
  ------------------
  |  Branch (25:7): [True: 816k, False: 6.82k]
  ------------------
   26|   816k|      const word carry = bigint_add3(z.mutable_data(), x._data(), x_sw, y, y_size);
   27|   816k|      z.mutable_data()[std::max(x_sw, y_size)] += carry;
   28|   816k|      z.set_sign(x.sign());
   29|   816k|   } else {
   30|  6.82k|      const int32_t relative_size = bigint_cmp(x.data(), x_sw, y, y_size);
   31|       |
   32|  6.82k|      if(relative_size < 0) {
  ------------------
  |  Branch (32:10): [True: 0, False: 6.82k]
  ------------------
   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.82k|      } else if(relative_size == 0) {
  ------------------
  |  Branch (37:17): [True: 0, False: 6.82k]
  ------------------
   38|       |         // Positive zero (nothing to do in this case)
   39|  6.82k|      } 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.82k|         y_size = std::min(x_sw, y_size);
   46|  6.82k|         bigint_sub3(z.mutable_data(), x.data(), x_sw, y, y_size);
   47|  6.82k|         z.set_sign(x.sign());
   48|  6.82k|      }
   49|  6.82k|   }
   50|       |
   51|   823k|   return z;
   52|   823k|}
_ZN5BotanmlERKNS_6BigIntES2_:
   57|    667|BigInt operator*(const BigInt& x, const BigInt& y) {
   58|    667|   const size_t x_sw = x.sig_words();
   59|    667|   const size_t y_sw = y.sig_words();
   60|       |
   61|    667|   BigInt z = BigInt::with_capacity(x.size() + y.size());
   62|       |
   63|    667|   if(x_sw == 1 && y_sw > 0) {
  ------------------
  |  Branch (63:7): [True: 15, False: 652]
  |  Branch (63:20): [True: 15, False: 0]
  ------------------
   64|     15|      bigint_linmul3(z.mutable_data(), y._data(), y_sw, x.word_at(0));
   65|    652|   } else if(y_sw == 1 && x_sw > 0) {
  ------------------
  |  Branch (65:14): [True: 0, False: 652]
  |  Branch (65:27): [True: 0, False: 0]
  ------------------
   66|      0|      bigint_linmul3(z.mutable_data(), x._data(), x_sw, y.word_at(0));
   67|    652|   } else if(x_sw > 0 && y_sw > 0) {
  ------------------
  |  Branch (67:14): [True: 652, False: 0]
  |  Branch (67:26): [True: 652, False: 0]
  ------------------
   68|    652|      secure_vector<word> workspace(z.size());
   69|       |
   70|    652|      bigint_mul(z.mutable_data(),
   71|    652|                 z.size(),
   72|    652|                 x._data(),
   73|    652|                 x.size(),
   74|    652|                 x_sw,
   75|    652|                 y._data(),
   76|    652|                 y.size(),
   77|    652|                 y_sw,
   78|    652|                 workspace.data(),
   79|    652|                 workspace.size());
   80|    652|   }
   81|       |
   82|    667|   z.cond_flip_sign(x_sw > 0 && y_sw > 0 && x.sign() != y.sign());
  ------------------
  |  Branch (82:21): [True: 667, False: 0]
  |  Branch (82:33): [True: 667, False: 0]
  |  Branch (82:45): [True: 0, False: 667]
  ------------------
   83|       |
   84|    667|   return z;
   85|    667|}
_ZN5BotanmlERKNS_6BigIntEm:
   90|  46.0k|BigInt operator*(const BigInt& x, word y) {
   91|  46.0k|   const size_t x_sw = x.sig_words();
   92|       |
   93|  46.0k|   BigInt z = BigInt::with_capacity(x_sw + 1);
   94|       |
   95|  46.0k|   if(x_sw > 0 && y > 0) {
  ------------------
  |  Branch (95:7): [True: 46.0k, False: 0]
  |  Branch (95:19): [True: 46.0k, False: 0]
  ------------------
   96|  46.0k|      bigint_linmul3(z.mutable_data(), x._data(), x_sw, y);
   97|  46.0k|      z.set_sign(x.sign());
   98|  46.0k|   }
   99|       |
  100|  46.0k|   return z;
  101|  46.0k|}
_ZN5BotandvERKNS_6BigIntES2_:
  106|    542|BigInt operator/(const BigInt& x, const BigInt& y) {
  107|    542|   if(y.sig_words() == 1 && y.signum() >= 0) {
  ------------------
  |  Branch (107:7): [True: 12, False: 530]
  |  Branch (107:29): [True: 12, False: 0]
  ------------------
  108|     12|      return x / y.word_at(0);
  109|     12|   }
  110|       |
  111|    530|   BigInt q;
  112|    530|   BigInt r;
  113|    530|   vartime_divide(x, y, q, r);
  114|    530|   return q;
  115|    542|}
_ZN5BotandvERKNS_6BigIntEm:
  120|  1.39k|BigInt operator/(const BigInt& x, word y) {
  121|  1.39k|   if(y == 0) {
  ------------------
  |  Branch (121:7): [True: 0, False: 1.39k]
  ------------------
  122|      0|      throw Invalid_Argument("BigInt::operator/ divide by zero");
  123|      0|   }
  124|       |
  125|  1.39k|   BigInt q;
  126|  1.39k|   word r = 0;
  127|  1.39k|   ct_divide_word(x, y, q, r);
  128|  1.39k|   return q;
  129|  1.39k|}
_ZN5BotanrmERKNS_6BigIntES2_:
  134|  7.68k|BigInt operator%(const BigInt& n, const BigInt& mod) {
  135|  7.68k|   if(mod.is_zero()) {
  ------------------
  |  Branch (135:7): [True: 0, False: 7.68k]
  ------------------
  136|      0|      throw Invalid_Argument("BigInt::operator% divide by zero");
  137|      0|   }
  138|  7.68k|   if(mod.signum() < 0) {
  ------------------
  |  Branch (138:7): [True: 0, False: 7.68k]
  ------------------
  139|      0|      throw Invalid_Argument("BigInt::operator% modulus must be > 0");
  140|      0|   }
  141|  7.68k|   if(n.signum() >= 0 && mod.signum() >= 0 && n < mod) {
  ------------------
  |  Branch (141:7): [True: 6.21k, False: 1.46k]
  |  Branch (141:26): [True: 6.21k, False: 0]
  |  Branch (141:47): [True: 0, False: 6.21k]
  ------------------
  142|      0|      return n;
  143|      0|   }
  144|       |
  145|  7.68k|   if(mod.sig_words() == 1) {
  ------------------
  |  Branch (145:7): [True: 4.75k, False: 2.93k]
  ------------------
  146|  4.75k|      return BigInt::from_word(n % mod.word_at(0));
  147|  4.75k|   }
  148|       |
  149|  2.93k|   BigInt q;
  150|  2.93k|   BigInt r;
  151|  2.93k|   vartime_divide(n, mod, q, r);
  152|  2.93k|   return r;
  153|  7.68k|}
_ZN5BotanrmERKNS_6BigIntEm:
  158|  10.3k|word operator%(const BigInt& n, word mod) {
  159|  10.3k|   if(mod == 0) {
  ------------------
  |  Branch (159:7): [True: 0, False: 10.3k]
  ------------------
  160|      0|      throw Invalid_Argument("BigInt::operator% divide by zero");
  161|      0|   }
  162|       |
  163|  10.3k|   if(mod == 1) {
  ------------------
  |  Branch (163:7): [True: 0, False: 10.3k]
  ------------------
  164|      0|      return 0;
  165|      0|   }
  166|       |
  167|  10.3k|   word remainder = 0;
  168|       |
  169|  10.3k|   if(n.signum() >= 0 && is_power_of_2(mod)) {
  ------------------
  |  Branch (169:7): [True: 10.3k, False: 3]
  |  Branch (169:26): [True: 5.62k, False: 4.75k]
  ------------------
  170|  5.62k|      remainder = (n.word_at(0) & (mod - 1));
  171|  5.62k|   } else {
  172|  4.75k|      const divide_precomp redc_mod(mod);
  173|  4.75k|      const size_t sw = n.sig_words();
  174|  23.6k|      for(size_t i = sw; i > 0; --i) {
  ------------------
  |  Branch (174:26): [True: 18.8k, False: 4.75k]
  ------------------
  175|  18.8k|         remainder = redc_mod.vartime_mod_2to1(remainder, n.word_at(i - 1));
  176|  18.8k|      }
  177|  4.75k|   }
  178|       |
  179|  10.3k|   if(remainder != 0 && n.sign() == BigInt::Negative) {
  ------------------
  |  Branch (179:7): [True: 10.3k, False: 0]
  |  Branch (179:25): [True: 3, False: 10.3k]
  ------------------
  180|      3|      return mod - remainder;
  181|      3|   }
  182|  10.3k|   return remainder;
  183|  10.3k|}
_ZN5BotanlsERKNS_6BigIntEm:
  188|  14.4k|BigInt operator<<(const BigInt& x, size_t shift) {
  189|  14.4k|   if(shift >= 65536) {
  ------------------
  |  Branch (189:7): [True: 0, False: 14.4k]
  ------------------
  190|      0|      throw Invalid_Argument("BigInt left shift count too large");
  191|      0|   }
  192|       |
  193|  14.4k|   if(x.is_zero()) {
  ------------------
  |  Branch (193:7): [True: 0, False: 14.4k]
  ------------------
  194|      0|      return BigInt::zero();
  195|      0|   }
  196|       |
  197|  14.4k|   const size_t x_sw = x.sig_words();
  198|       |
  199|  14.4k|   const size_t new_size = x_sw + shift / WordInfo<word>::bits + 1;
  200|  14.4k|   BigInt y = BigInt::with_capacity(new_size);
  201|  14.4k|   bigint_shl2(y.mutable_data(), new_size, x._data(), x_sw, shift);
  202|  14.4k|   y.set_sign(x.sign());
  203|  14.4k|   return y;
  204|  14.4k|}
_ZN5BotanrsERKNS_6BigIntEm:
  209|  1.38k|BigInt operator>>(const BigInt& x, size_t shift) {
  210|  1.38k|   const size_t shift_words = shift / WordInfo<word>::bits;
  211|  1.38k|   const size_t x_sw = x.sig_words();
  212|       |
  213|  1.38k|   if(shift_words >= x_sw) {
  ------------------
  |  Branch (213:7): [True: 0, False: 1.38k]
  ------------------
  214|      0|      return BigInt::zero();
  215|      0|   }
  216|       |
  217|  1.38k|   const size_t new_size = x_sw - shift_words;
  218|  1.38k|   BigInt y = BigInt::with_capacity(new_size);
  219|  1.38k|   bigint_shr2(y.mutable_data(), new_size, x._data(), x_sw, shift);
  220|       |
  221|  1.38k|   if(x.signum() < 0 && y.is_zero()) {
  ------------------
  |  Branch (221:7): [True: 0, False: 1.38k]
  |  Branch (221:25): [True: 0, False: 0]
  ------------------
  222|      0|      y.set_sign(BigInt::Positive);
  223|  1.38k|   } else {
  224|  1.38k|      y.set_sign(x.sign());
  225|  1.38k|   }
  226|       |
  227|  1.38k|   return y;
  228|  1.38k|}

_ZN5Botan6BigIntC2Em:
   20|  4.74k|BigInt::BigInt(uint64_t n) {
   21|  4.74k|   if constexpr(sizeof(word) == 8) {
   22|  4.74k|      m_data.set_word_at(0, static_cast<word>(n));
   23|       |   } else {
   24|       |      m_data.set_word_at(1, static_cast<word>(n >> 32));
   25|       |      m_data.set_word_at(0, static_cast<word>(n));
   26|       |   }
   27|  4.74k|}
_ZN5Botan6BigInt8from_u64Em:
   30|  1.68k|BigInt BigInt::from_u64(uint64_t n) {
   31|  1.68k|   return BigInt(n);
   32|  1.68k|}
_ZN5Botan6BigInt9from_wordEm:
   35|  6.97k|BigInt BigInt::from_word(word n) {
   36|  6.97k|   BigInt bn;
   37|  6.97k|   bn.set_word_at(0, n);
   38|  6.97k|   return bn;
   39|  6.97k|}
_ZN5Botan6BigInt13with_capacityEm:
   51|  2.71M|BigInt BigInt::with_capacity(size_t size) {
   52|  2.71M|   BigInt bn;
   53|  2.71M|   bn.grow_to(size);
   54|  2.71M|   return bn;
   55|  2.71M|}
_ZN5Botan6BigInt11from_stringENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   57|  17.1k|BigInt BigInt::from_string(std::string_view str) {
   58|  17.1k|   size_t prefix_bytes = 0;
   59|  17.1k|   bool negative = false;
   60|  17.1k|   size_t radix = 10;
   61|       |
   62|  17.1k|   if(!str.empty() && str[0] == '-') {
  ------------------
  |  Branch (62:7): [True: 17.1k, False: 0]
  |  Branch (62:23): [True: 0, False: 17.1k]
  ------------------
   63|      0|      prefix_bytes += 1;
   64|      0|      negative = true;
   65|      0|   }
   66|       |
   67|  17.1k|   if(str.length() > prefix_bytes + 2 && str[prefix_bytes] == '0' && str[prefix_bytes + 1] == 'x') {
  ------------------
  |  Branch (67:7): [True: 17.1k, False: 0]
  |  Branch (67:42): [True: 17.1k, False: 0]
  |  Branch (67:70): [True: 17.1k, False: 0]
  ------------------
   68|  17.1k|      prefix_bytes += 2;
   69|  17.1k|      radix = 16;
   70|  17.1k|   }
   71|       |
   72|  17.1k|   BigInt r = BigInt::from_radix_digits(str.substr(prefix_bytes), radix);
   73|       |
   74|  17.1k|   if(negative) {
  ------------------
  |  Branch (74:7): [True: 0, False: 17.1k]
  ------------------
   75|      0|      r.set_sign(Negative);
   76|  17.1k|   } else {
   77|  17.1k|      r.set_sign(Positive);
   78|  17.1k|   }
   79|       |
   80|  17.1k|   return r;
   81|  17.1k|}
_ZN5Botan6BigInt10from_bytesENSt3__14spanIKhLm18446744073709551615EEE:
   83|  26.1k|BigInt BigInt::from_bytes(std::span<const uint8_t> input) {
   84|  26.1k|   BigInt r;
   85|  26.1k|   r.assign_from_bytes(input);
   86|  26.1k|   return r;
   87|  26.1k|}
_ZNK5Botan6BigInt7byte_atEm:
  118|  42.1k|uint8_t BigInt::byte_at(size_t n) const {
  119|  42.1k|   return get_byte_var(sizeof(word) - (n % sizeof(word)) - 1, word_at(n / sizeof(word)));
  120|  42.1k|}
_ZNK5Botan6BigInt8cmp_wordEm:
  122|  92.6k|int32_t BigInt::cmp_word(word other) const {
  123|  92.6k|   if(signum() < 0) {
  ------------------
  |  Branch (123:7): [True: 2.93k, False: 89.7k]
  ------------------
  124|  2.93k|      return -1;  // other is positive ...
  125|  2.93k|   }
  126|       |
  127|  89.7k|   const size_t sw = this->sig_words();
  128|  89.7k|   if(sw > 1) {
  ------------------
  |  Branch (128:7): [True: 60.8k, False: 28.8k]
  ------------------
  129|  60.8k|      return 1;  // must be larger since other is just one word ...
  130|  60.8k|   }
  131|       |
  132|  28.8k|   return bigint_cmp(this->_data(), sw, &other, 1);
  133|  89.7k|}
_ZNK5Botan6BigInt3cmpERKS0_b:
  138|  15.3k|int32_t BigInt::cmp(const BigInt& other, bool check_signs) const {
  139|  15.3k|   if(check_signs) {
  ------------------
  |  Branch (139:7): [True: 15.3k, False: 0]
  ------------------
  140|  15.3k|      if(other.signum() >= 0 && this->signum() < 0) {
  ------------------
  |  Branch (140:10): [True: 15.3k, False: 0]
  |  Branch (140:33): [True: 0, False: 15.3k]
  ------------------
  141|      0|         return -1;
  142|      0|      }
  143|       |
  144|  15.3k|      if(other.signum() < 0 && this->signum() >= 0) {
  ------------------
  |  Branch (144:10): [True: 0, False: 15.3k]
  |  Branch (144:32): [True: 0, False: 0]
  ------------------
  145|      0|         return 1;
  146|      0|      }
  147|       |
  148|  15.3k|      if(other.signum() < 0 && this->signum() < 0) {
  ------------------
  |  Branch (148:10): [True: 0, False: 15.3k]
  |  Branch (148:32): [True: 0, False: 0]
  ------------------
  149|      0|         return (-bigint_cmp(this->_data(), this->size(), other._data(), other.size()));
  150|      0|      }
  151|  15.3k|   }
  152|       |
  153|  15.3k|   return bigint_cmp(this->_data(), this->size(), other._data(), other.size());
  154|  15.3k|}
_ZNK5Botan6BigInt8is_equalERKS0_:
  156|  31.5k|bool BigInt::is_equal(const BigInt& other) const {
  157|  31.5k|   if(this->sign() != other.sign()) {
  ------------------
  |  Branch (157:7): [True: 0, False: 31.5k]
  ------------------
  158|      0|      return false;
  159|      0|   }
  160|       |
  161|  31.5k|   return bigint_ct_is_eq(this->_data(), this->size(), other._data(), other.size()).as_bool();
  162|  31.5k|}
_ZNK5Botan6BigInt12is_less_thanERKS0_:
  164|  21.3k|bool BigInt::is_less_than(const BigInt& other) const {
  165|  21.3k|   if(this->signum() < 0 && other.signum() >= 0) {
  ------------------
  |  Branch (165:7): [True: 0, False: 21.3k]
  |  Branch (165:29): [True: 0, False: 0]
  ------------------
  166|      0|      return true;
  167|      0|   }
  168|       |
  169|  21.3k|   if(this->signum() >= 0 && other.signum() < 0) {
  ------------------
  |  Branch (169:7): [True: 21.3k, False: 0]
  |  Branch (169:30): [True: 0, False: 21.3k]
  ------------------
  170|      0|      return false;
  171|      0|   }
  172|       |
  173|  21.3k|   if(other.signum() < 0 && this->signum() < 0) {
  ------------------
  |  Branch (173:7): [True: 0, False: 21.3k]
  |  Branch (173:29): [True: 0, False: 0]
  ------------------
  174|      0|      return bigint_ct_is_lt(other._data(), other.size(), this->_data(), this->size()).as_bool();
  175|      0|   }
  176|       |
  177|  21.3k|   return bigint_ct_is_lt(this->_data(), this->size(), other._data(), other.size()).as_bool();
  178|  21.3k|}
_ZNK5Botan6BigInt12encode_wordsEPmm:
  180|  1.21M|void BigInt::encode_words(word out[], size_t size) const {
  181|  1.21M|   const size_t words = sig_words();
  182|       |
  183|  1.21M|   if(words > size) {
  ------------------
  |  Branch (183:7): [True: 0, False: 1.21M]
  ------------------
  184|      0|      throw Encoding_Error("BigInt::encode_words value too large to encode");
  185|      0|   }
  186|       |
  187|  1.21M|   clear_mem(out, size);
  188|  1.21M|   copy_mem(out, _data(), words);
  189|  1.21M|}
_ZN5Botan6BigInt4Data11set_to_zeroEv:
  191|  41.6k|void BigInt::Data::set_to_zero() {
  192|  41.6k|   m_reg.resize(m_reg.capacity());
  193|  41.6k|   clear_mem(m_reg.data(), m_reg.size());
  194|  41.6k|   m_sig_words = 0;
  195|  41.6k|}
_ZNK5Botan6BigInt4Data14calc_sig_wordsEv:
  215|  15.3M|size_t BigInt::Data::calc_sig_words() const {
  216|  15.3M|   const size_t sz = m_reg.size();
  217|  15.3M|   size_t sig = sz;
  218|       |
  219|  15.3M|   word sub = 1;
  220|       |
  221|   205M|   for(size_t i = 0; i != sz; ++i) {
  ------------------
  |  Branch (221:22): [True: 190M, False: 15.3M]
  ------------------
  222|   190M|      const word w = m_reg[sz - i - 1];
  223|   190M|      sub &= ct_is_zero(w);
  224|   190M|      sig -= sub;
  225|   190M|   }
  226|       |
  227|       |   /*
  228|       |   * This depends on the data so is poisoned, but unpoison it here as
  229|       |   * later conditionals are made on the size.
  230|       |   */
  231|  15.3M|   CT::unpoison(sig);
  232|       |
  233|  15.3M|   return sig;
  234|  15.3M|}
_ZNK5Botan6BigInt13get_substringEmm:
  239|   113k|uint32_t BigInt::get_substring(size_t offset, size_t length) const {
  240|   113k|   if(length == 0 || length > 32) {
  ------------------
  |  Branch (240:7): [True: 0, False: 113k]
  |  Branch (240:22): [True: 0, False: 113k]
  ------------------
  241|      0|      throw Invalid_Argument("BigInt::get_substring invalid substring length");
  242|      0|   }
  243|       |
  244|   113k|   const uint32_t mask = 0xFFFFFFFF >> (32 - length);
  245|       |
  246|   113k|   const size_t word_offset = offset / WordInfo<word>::bits;
  247|   113k|   const size_t wshift = (offset % WordInfo<word>::bits);
  248|       |
  249|       |   /*
  250|       |   * The substring is contained within one or at most two words. The
  251|       |   * offset and length are not secret, so we can perform conditional
  252|       |   * operations on those values.
  253|       |   */
  254|   113k|   const word w0 = word_at(word_offset);
  255|       |
  256|   113k|   if(wshift == 0 || (offset + length) / WordInfo<word>::bits == word_offset) {
  ------------------
  |  Branch (256:7): [True: 7.39k, False: 106k]
  |  Branch (256:22): [True: 99.7k, False: 6.72k]
  ------------------
  257|   107k|      return static_cast<uint32_t>(w0 >> wshift) & mask;
  258|   107k|   } else {
  259|  6.72k|      const word w1 = word_at(word_offset + 1);
  260|  6.72k|      return static_cast<uint32_t>((w0 >> wshift) | (w1 << (WordInfo<word>::bits - wshift))) & mask;
  261|  6.72k|   }
  262|   113k|}
_ZNK5Botan6BigInt5bytesEv:
  294|  2.65k|size_t BigInt::bytes() const {
  295|  2.65k|   return round_up(bits(), 8) / 8;
  296|  2.65k|}
_ZNK5Botan6BigInt13top_bits_freeEv:
  298|  50.7k|size_t BigInt::top_bits_free() const {
  299|  50.7k|   const size_t words = sig_words();
  300|       |
  301|  50.7k|   const word top_word = word_at(words - 1);
  302|  50.7k|   const size_t bits_used = high_bit(CT::value_barrier(top_word));
  303|  50.7k|   CT::unpoison(bits_used);
  304|  50.7k|   return WordInfo<word>::bits - bits_used;
  305|  50.7k|}
_ZNK5Botan6BigInt4bitsEv:
  307|  42.6k|size_t BigInt::bits() const {
  308|  42.6k|   const size_t words = sig_words();
  309|       |
  310|  42.6k|   if(words == 0) {
  ------------------
  |  Branch (310:7): [True: 6.40k, False: 36.2k]
  ------------------
  311|  6.40k|      return 0;
  312|  6.40k|   }
  313|       |
  314|  36.2k|   const size_t full_words = (words - 1) * WordInfo<word>::bits;
  315|  36.2k|   const size_t top_bits = WordInfo<word>::bits - top_bits_free();
  316|       |
  317|  36.2k|   return full_words + top_bits;
  318|  42.6k|}
_ZN5Botan6BigInt12reduce_belowERKS0_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  329|  1.05M|size_t BigInt::reduce_below(const BigInt& p, secure_vector<word>& ws) {
  330|  1.05M|   if(p.signum() < 0 || this->signum() < 0) {
  ------------------
  |  Branch (330:7): [True: 0, False: 1.05M]
  |  Branch (330:25): [True: 0, False: 1.05M]
  ------------------
  331|      0|      throw Invalid_Argument("BigInt::reduce_below both values must be positive");
  332|      0|   }
  333|       |
  334|  1.05M|   const size_t p_words = p.sig_words();
  335|       |
  336|  1.05M|   if(size() < p_words + 1) {
  ------------------
  |  Branch (336:7): [True: 365, False: 1.05M]
  ------------------
  337|    365|      grow_to(p_words + 1);
  338|    365|   }
  339|       |
  340|  1.05M|   if(ws.size() < p_words + 1) {
  ------------------
  |  Branch (340:7): [True: 14.4k, False: 1.03M]
  ------------------
  341|  14.4k|      ws.resize(p_words + 1);
  342|  14.4k|   }
  343|       |
  344|  1.05M|   clear_mem(ws.data(), ws.size());
  345|       |
  346|  1.05M|   size_t reductions = 0;
  347|       |
  348|  2.73M|   for(;;) {
  349|  2.73M|      const word borrow = bigint_sub3(ws.data(), _data(), p_words + 1, p._data(), p_words);
  350|  2.73M|      if(borrow > 0) {
  ------------------
  |  Branch (350:10): [True: 1.05M, False: 1.67M]
  ------------------
  351|  1.05M|         break;
  352|  1.05M|      }
  353|       |
  354|  1.67M|      ++reductions;
  355|  1.67M|      swap_reg(ws);
  356|  1.67M|   }
  357|       |
  358|  1.05M|   return reductions;
  359|  1.05M|}
_ZNK5Botan6BigInt3absEv:
  386|  1.46k|BigInt BigInt::abs() const {
  387|  1.46k|   BigInt x = (*this);
  388|  1.46k|   x.set_sign(Positive);
  389|  1.46k|   return x;
  390|  1.46k|}
_ZNK5Botan6BigInt12serialize_toENSt3__14spanIhLm18446744073709551615EEE:
  395|  1.41k|void BigInt::serialize_to(std::span<uint8_t> output) const {
  396|  1.41k|   BOTAN_ARG_CHECK(this->bytes() <= output.size(), "Insufficient output space");
  ------------------
  |  |   35|  1.41k|   do {                                                          \
  |  |   36|  1.41k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  1.41k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 1.41k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.41k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.41k]
  |  |  ------------------
  ------------------
  397|       |
  398|  1.41k|   this->binary_encode(output.data(), output.size());
  399|  1.41k|}
_ZNK5Botan6BigInt13binary_encodeEPhm:
  404|  1.41k|void BigInt::binary_encode(uint8_t output[], size_t len) const {
  405|  1.41k|   const size_t full_words = len / sizeof(word);
  406|  1.41k|   const size_t extra_bytes = len % sizeof(word);
  407|       |
  408|  7.04k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (408:22): [True: 5.63k, False: 1.41k]
  ------------------
  409|  5.63k|      const word w = word_at(i);
  410|  5.63k|      store_be(w, output + (len - (i + 1) * sizeof(word)));
  411|  5.63k|   }
  412|       |
  413|  1.41k|   if(extra_bytes > 0) {
  ------------------
  |  Branch (413:7): [True: 1.13k, False: 275]
  ------------------
  414|  1.13k|      const word w = word_at(full_words);
  415|       |
  416|  5.76k|      for(size_t i = 0; i != extra_bytes; ++i) {
  ------------------
  |  Branch (416:25): [True: 4.63k, False: 1.13k]
  ------------------
  417|  4.63k|         output[extra_bytes - i - 1] = get_byte_var(sizeof(word) - i - 1, w);
  418|  4.63k|      }
  419|  1.13k|   }
  420|  1.41k|}
_ZN5Botan6BigInt17assign_from_bytesENSt3__14spanIKhLm18446744073709551615EEE:
  425|  41.6k|void BigInt::assign_from_bytes(std::span<const uint8_t> bytes) {
  426|  41.6k|   clear();
  427|       |
  428|  41.6k|   const size_t length = bytes.size();
  429|  41.6k|   const size_t full_words = length / sizeof(word);
  430|  41.6k|   const size_t extra_bytes = length % sizeof(word);
  431|       |
  432|  41.6k|   secure_vector<word> reg((round_up(full_words + (extra_bytes > 0 ? 1 : 0), 8)));
  ------------------
  |  Branch (432:52): [True: 28.4k, False: 13.1k]
  ------------------
  433|       |
  434|   175k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (434:22): [True: 133k, False: 41.6k]
  ------------------
  435|   133k|      reg[i] = load_be<word>(bytes.last<sizeof(word)>());
  436|   133k|      bytes = bytes.first(bytes.size() - sizeof(word));
  437|   133k|   }
  438|       |
  439|  41.6k|   if(!bytes.empty()) {
  ------------------
  |  Branch (439:7): [True: 28.4k, False: 13.1k]
  ------------------
  440|  28.4k|      BOTAN_ASSERT_NOMSG(extra_bytes == bytes.size());
  ------------------
  |  |   77|  28.4k|   do {                                                                     \
  |  |   78|  28.4k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  28.4k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 28.4k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  28.4k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 28.4k]
  |  |  ------------------
  ------------------
  441|  28.4k|      std::array<uint8_t, sizeof(word)> last_partial_word = {0};
  442|  28.4k|      copy_mem(std::span{last_partial_word}.last(extra_bytes), bytes);
  443|  28.4k|      reg[full_words] = load_be<word>(last_partial_word);
  444|  28.4k|   }
  445|       |
  446|  41.6k|   m_data.swap(reg);
  447|  41.6k|}
_ZN5Botan6BigInt11ct_cond_addEbRKS0_:
  449|   806k|void BigInt::ct_cond_add(bool predicate, const BigInt& value) {
  450|   806k|   if(this->signum() < 0 || value.signum() < 0) {
  ------------------
  |  Branch (450:7): [True: 0, False: 806k]
  |  Branch (450:29): [True: 0, False: 806k]
  ------------------
  451|      0|      throw Invalid_Argument("BigInt::ct_cond_add requires both values to be positive");
  452|      0|   }
  453|   806k|   const size_t v_words = value.sig_words();
  454|       |
  455|       |   // The carry can propagate through every existing word of *this, so the
  456|       |   // output needs one slot above whichever input is wider.
  457|   806k|   this->grow_to(std::max(this->size(), v_words) + 1);
  458|       |
  459|   806k|   const auto mask = CT::Mask<word>::expand(static_cast<word>(predicate)).value();
  460|       |
  461|   806k|   word carry = 0;
  462|       |
  463|   806k|   word* x = this->mutable_data();
  464|   806k|   const word* y = value._data();
  465|       |
  466|  5.85M|   for(size_t i = 0; i != v_words; ++i) {
  ------------------
  |  Branch (466:22): [True: 5.05M, False: 806k]
  ------------------
  467|  5.05M|      x[i] = word_add(x[i], y[i] & mask, &carry);
  468|  5.05M|   }
  469|       |
  470|  11.5M|   for(size_t i = v_words; i != size(); ++i) {
  ------------------
  |  Branch (470:28): [True: 10.7M, False: 806k]
  ------------------
  471|  10.7M|      x[i] = word_add(x[i], static_cast<word>(0), &carry);
  472|  10.7M|   }
  473|   806k|}
_ZN5Botan6BigInt14cond_flip_signEb:
  521|   541k|void BigInt::cond_flip_sign(bool predicate) {
  522|       |   // This code is assuming Negative == 0, Positive == 1
  523|       |
  524|   541k|   const auto mask = CT::Mask<uint8_t>::expand_bool(predicate);
  525|       |
  526|   541k|   const uint8_t current_sign = static_cast<uint8_t>(sign());
  527|       |
  528|   541k|   const uint8_t new_sign = mask.select(current_sign ^ 1, current_sign);
  529|       |
  530|   541k|   set_sign(static_cast<Sign>(new_sign));
  531|   541k|}
_ZN5Botan6BigInt14ct_cond_assignEbRKS0_:
  533|   537k|void BigInt::ct_cond_assign(bool predicate, const BigInt& other) {
  534|   537k|   const size_t t_words = size();
  535|   537k|   const size_t o_words = other.size();
  536|       |
  537|   537k|   if(t_words < o_words) {
  ------------------
  |  Branch (537:7): [True: 537k, False: 0]
  ------------------
  538|   537k|      grow_to(o_words);
  539|   537k|   }
  540|       |
  541|   537k|   const size_t r_words = std::max(t_words, o_words);
  542|       |
  543|   537k|   const auto mask = CT::Mask<word>::expand_bool(predicate);
  544|       |
  545|  11.0M|   for(size_t i = 0; i != r_words; ++i) {
  ------------------
  |  Branch (545:22): [True: 10.5M, False: 537k]
  ------------------
  546|  10.5M|      const word o_word = other.word_at(i);
  547|  10.5M|      const word t_word = this->word_at(i);
  548|  10.5M|      this->set_word_at(i, mask.select(o_word, t_word));
  549|  10.5M|   }
  550|       |
  551|   537k|   const auto same_sign = CT::Mask<word>::is_equal(sign(), other.sign()).as_choice();
  552|   537k|   cond_flip_sign((mask.as_choice() && !same_sign).as_bool());
  553|   537k|}
_ZNK5Botan6BigInt20_const_time_unpoisonEv:
  559|  8.92M|void BigInt::_const_time_unpoison() const {
  560|  8.92M|   CT::unpoison(m_data.const_data(), m_data.size());
  561|  8.92M|}

_ZN5Botan15ct_divide_pow2kEmRKNS_6BigIntE:
   89|    920|BigInt ct_divide_pow2k(size_t k, const BigInt& y) {
   90|    920|   BOTAN_ARG_CHECK(y.signum() != 0, "Cannot divide by zero");
  ------------------
  |  |   35|    920|   do {                                                          \
  |  |   36|    920|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    920|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 920]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    920|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 920]
  |  |  ------------------
  ------------------
   91|    920|   BOTAN_ARG_CHECK(y.signum() >= 0, "Negative divisor not supported");
  ------------------
  |  |   35|    920|   do {                                                          \
  |  |   36|    920|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    920|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 920]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    920|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 920]
  |  |  ------------------
  ------------------
   92|    920|   BOTAN_ARG_CHECK(k > 1, "Invalid k");
  ------------------
  |  |   35|    920|   do {                                                          \
  |  |   36|    920|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    920|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 920]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    920|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 920]
  |  |  ------------------
  ------------------
   93|       |
   94|    920|   const size_t x_bits = k + 1;
   95|    920|   const size_t y_bits = y.bits();
   96|       |
   97|    920|   if(x_bits < y_bits) {
  ------------------
  |  Branch (97:7): [True: 0, False: 920]
  ------------------
   98|      0|      return BigInt::zero();
   99|      0|   }
  100|       |
  101|    920|   BOTAN_ASSERT_NOMSG(y_bits >= 1);
  ------------------
  |  |   77|    920|   do {                                                                     \
  |  |   78|    920|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    920|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 920]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    920|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 920]
  |  |  ------------------
  ------------------
  102|    920|   const size_t x_words = (x_bits + WordInfo<word>::bits - 1) / WordInfo<word>::bits;
  103|    920|   const size_t y_words = y.sig_words();
  104|       |
  105|    920|   BigInt q = BigInt::with_capacity(x_words);
  106|    920|   BigInt r = BigInt::with_capacity(y_words + 1);
  107|    920|   BigInt t = BigInt::with_capacity(y_words + 1);  // a temporary
  108|       |
  109|    920|   r.set_bit(y_bits - 1);
  110|   250k|   for(size_t i = y_bits - 1; i != x_bits; ++i) {
  ------------------
  |  Branch (110:31): [True: 249k, False: 920]
  ------------------
  111|   249k|      const size_t b = x_bits - 1 - i;
  112|       |
  113|   249k|      if(i >= y_bits) {
  ------------------
  |  Branch (113:10): [True: 249k, False: 920]
  ------------------
  114|   249k|         bigint_shl1(r.mutable_data(), r.size(), r.size(), 1);
  115|   249k|      }
  116|       |
  117|   249k|      const bool r_gte_y = bigint_sub3(t.mutable_data(), r._data(), r.size(), y._data(), y_words) == 0;
  118|       |
  119|   249k|      q.conditionally_set_bit(b, r_gte_y);
  120|       |
  121|   249k|      bigint_cnd_swap(static_cast<word>(r_gte_y), r.mutable_data(), t.mutable_data(), y_words + 1);
  122|   249k|   }
  123|       |
  124|       |   // No need for sign fixup
  125|       |
  126|    920|   return q;
  127|    920|}
_ZN5Botan14ct_divide_wordERKNS_6BigIntEmRS0_Rm:
  129|  1.39k|void ct_divide_word(const BigInt& x, word y, BigInt& q_out, word& r_out) {
  130|  1.39k|   if(y == 0) {
  ------------------
  |  Branch (130:7): [True: 0, False: 1.39k]
  ------------------
  131|      0|      throw Invalid_Argument("ct_divide_word: cannot divide by zero");
  132|      0|   }
  133|       |
  134|  1.39k|   const size_t x_words = x.sig_words();
  135|  1.39k|   const size_t x_bits = x.bits();
  136|       |
  137|  1.39k|   BigInt q = BigInt::with_capacity(x_words);
  138|  1.39k|   word r = 0;
  139|       |
  140|   345k|   for(size_t i = 0; i != x_bits; ++i) {
  ------------------
  |  Branch (140:22): [True: 344k, False: 1.39k]
  ------------------
  141|   344k|      const size_t b = x_bits - 1 - i;
  142|   344k|      const bool x_b = x.get_bit(b);
  143|       |
  144|   344k|      const auto r_carry = CT::Mask<word>::expand_top_bit(r);
  145|       |
  146|   344k|      r <<= 1;
  147|   344k|      r += static_cast<word>(x_b);
  148|       |
  149|   344k|      const auto r_gte_y = CT::Mask<word>::is_gte(r, y) | r_carry;
  150|   344k|      q.conditionally_set_bit(b, r_gte_y.as_bool());
  151|   344k|      r = r_gte_y.select(r - y, r);
  152|   344k|   }
  153|       |
  154|  1.39k|   if(x.signum() < 0) {
  ------------------
  |  Branch (154:7): [True: 0, False: 1.39k]
  ------------------
  155|      0|      q.flip_sign();
  156|      0|      if(r != 0) {
  ------------------
  |  Branch (156:10): [True: 0, False: 0]
  ------------------
  157|      0|         --q;
  158|      0|         r = y - r;
  159|      0|      }
  160|      0|   }
  161|       |
  162|  1.39k|   r_out = r;
  163|  1.39k|   q_out = q;
  164|  1.39k|}
_ZN5Botan20vartime_divide_pow2kEmRKNS_6BigIntE:
  232|  10.9k|BigInt vartime_divide_pow2k(size_t k, const BigInt& y_arg) {
  233|  10.9k|   constexpr size_t WB = WordInfo<word>::bits;
  234|       |
  235|  10.9k|   BOTAN_ARG_CHECK(y_arg.signum() != 0, "Cannot divide by zero");
  ------------------
  |  |   35|  10.9k|   do {                                                          \
  |  |   36|  10.9k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  10.9k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 10.9k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  10.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 10.9k]
  |  |  ------------------
  ------------------
  236|  10.9k|   BOTAN_ARG_CHECK(y_arg.signum() >= 0, "Negative divisor not supported");
  ------------------
  |  |   35|  10.9k|   do {                                                          \
  |  |   36|  10.9k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  10.9k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 10.9k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  10.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 10.9k]
  |  |  ------------------
  ------------------
  237|  10.9k|   BOTAN_ARG_CHECK(k > 1, "Invalid k");
  ------------------
  |  |   35|  10.9k|   do {                                                          \
  |  |   36|  10.9k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  10.9k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 10.9k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  10.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 10.9k]
  |  |  ------------------
  ------------------
  238|       |
  239|  10.9k|   BigInt y = y_arg;
  240|       |
  241|  10.9k|   const size_t y_words = y.sig_words();
  242|       |
  243|  10.9k|   BOTAN_ASSERT_NOMSG(y_words > 0);
  ------------------
  |  |   77|  10.9k|   do {                                                                     \
  |  |   78|  10.9k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  10.9k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 10.9k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  10.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 10.9k]
  |  |  ------------------
  ------------------
  244|       |
  245|       |   // Calculate shifts needed to normalize y with high bit set
  246|  10.9k|   const size_t shifts = y.top_bits_free();
  247|       |
  248|  10.9k|   if(shifts > 0) {
  ------------------
  |  Branch (248:7): [True: 5.81k, False: 5.16k]
  ------------------
  249|  5.81k|      y <<= shifts;
  250|  5.81k|   }
  251|       |
  252|  10.9k|   BigInt r;
  253|  10.9k|   r.set_bit(k + shifts);  // (2^k) << shifts
  254|       |
  255|       |   // we know y has not changed size, since we only shifted up to set high bit
  256|  10.9k|   const size_t t = y_words - 1;
  257|  10.9k|   const size_t n = std::max(y_words, r.sig_words()) - 1;
  258|       |
  259|  10.9k|   BOTAN_ASSERT_NOMSG(n >= t);
  ------------------
  |  |   77|  10.9k|   do {                                                                     \
  |  |   78|  10.9k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  10.9k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 10.9k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  10.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 10.9k]
  |  |  ------------------
  ------------------
  260|       |
  261|  10.9k|   BigInt q = BigInt::zero();
  262|  10.9k|   q.grow_to(n - t + 1);
  263|       |
  264|  10.9k|   word* q_words = q.mutable_data();
  265|       |
  266|  10.9k|   BigInt shifted_y = y << (WB * (n - t));
  267|       |
  268|       |   // Set q_{n-t} to number of times r > shifted_y
  269|  10.9k|   secure_vector<word> ws;
  270|  10.9k|   q_words[n - t] = r.reduce_below(shifted_y, ws);
  271|       |
  272|  10.9k|   const word y_t0 = y.word_at(t);
  273|  10.9k|   const word y_t1 = y.word_at(t - 1);
  274|  10.9k|   BOTAN_DEBUG_ASSERT((y_t0 >> (WB - 1)) == 1);
  ------------------
  |  |  130|  10.9k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  10.9k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 10.9k]
  |  |  ------------------
  ------------------
  275|       |
  276|  10.9k|   const divide_precomp div_y_t0(y_t0);
  277|       |
  278|  77.8k|   for(size_t i = n; i != t; --i) {
  ------------------
  |  Branch (278:22): [True: 66.8k, False: 10.9k]
  ------------------
  279|  66.8k|      const word x_i0 = r.word_at(i);
  280|  66.8k|      const word x_i1 = r.word_at(i - 1);
  281|  66.8k|      const word x_i2 = r.word_at(i - 2);
  282|       |
  283|  66.8k|      word qit = (x_i0 == y_t0) ? WordInfo<word>::max : div_y_t0.vartime_div_2to1(x_i0, x_i1);
  ------------------
  |  Branch (283:18): [True: 852, False: 66.0k]
  ------------------
  284|       |
  285|       |      // Per HAC 14.23, this operation is required at most twice
  286|  75.5k|      for(size_t j = 0; j != 2; ++j) {
  ------------------
  |  Branch (286:25): [True: 75.3k, False: 233]
  ------------------
  287|  75.3k|         if(division_check_vartime(qit, y_t0, y_t1, x_i0, x_i1, x_i2)) {
  ------------------
  |  Branch (287:13): [True: 8.70k, False: 66.6k]
  ------------------
  288|  8.70k|            BOTAN_ASSERT_NOMSG(qit > 0);
  ------------------
  |  |   77|  8.70k|   do {                                                                     \
  |  |   78|  8.70k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  8.70k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 8.70k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  8.70k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 8.70k]
  |  |  ------------------
  ------------------
  289|  8.70k|            qit--;
  290|  66.6k|         } else {
  291|  66.6k|            break;
  292|  66.6k|         }
  293|  75.3k|      }
  294|       |
  295|  66.8k|      shifted_y >>= WB;
  296|       |      // Now shifted_y == y << (WB * (i-t-1))
  297|       |
  298|       |      /*
  299|       |      * Special case qit == 0 and qit == 1 which occurs relatively often here due to a
  300|       |      * combination of the fixed 2^k and in many cases the typical structure of
  301|       |      * public moduli (as this function is called by Barrett_Reduction::for_public_modulus).
  302|       |      *
  303|       |      * Over the test suite, about 5% of loop iterations have qit == 1 and 10% have qit == 0
  304|       |      */
  305|       |
  306|  66.8k|      if(qit != 0) {
  ------------------
  |  Branch (306:10): [True: 47.0k, False: 19.8k]
  ------------------
  307|  47.0k|         if(qit == 1) {
  ------------------
  |  Branch (307:13): [True: 5.86k, False: 41.1k]
  ------------------
  308|  5.86k|            r -= shifted_y;
  309|  41.1k|         } else {
  310|  41.1k|            r -= qit * shifted_y;
  311|  41.1k|         }
  312|       |
  313|  47.0k|         if(r.signum() < 0) {
  ------------------
  |  Branch (313:13): [True: 29, False: 47.0k]
  ------------------
  314|     29|            BOTAN_ASSERT_NOMSG(qit > 0);
  ------------------
  |  |   77|     29|   do {                                                                     \
  |  |   78|     29|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|     29|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 29]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|     29|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 29]
  |  |  ------------------
  ------------------
  315|     29|            qit--;
  316|     29|            r += shifted_y;
  317|     29|            BOTAN_ASSERT_NOMSG(r.signum() >= 0);
  ------------------
  |  |   77|     29|   do {                                                                     \
  |  |   78|     29|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|     29|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 29]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|     29|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 29]
  |  |  ------------------
  ------------------
  318|     29|         }
  319|  47.0k|      }
  320|       |
  321|  66.8k|      q_words[i - t - 1] = qit;
  322|  66.8k|   }
  323|       |
  324|  10.9k|   return q;
  325|  10.9k|}
_ZN5Botan14vartime_divideERKNS_6BigIntES2_RS0_S3_:
  332|  3.46k|void vartime_divide(const BigInt& x, const BigInt& y_arg, BigInt& q_out, BigInt& r_out) {
  333|  3.46k|   constexpr size_t WB = WordInfo<word>::bits;
  334|       |
  335|  3.46k|   if(y_arg.is_zero()) {
  ------------------
  |  Branch (335:7): [True: 0, False: 3.46k]
  ------------------
  336|      0|      throw Invalid_Argument("vartime_divide: cannot divide by zero");
  337|      0|   }
  338|       |
  339|  3.46k|   const size_t y_words = y_arg.sig_words();
  340|       |
  341|  3.46k|   BOTAN_ASSERT_NOMSG(y_words > 0);
  ------------------
  |  |   77|  3.46k|   do {                                                                     \
  |  |   78|  3.46k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  3.46k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 3.46k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  3.46k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 3.46k]
  |  |  ------------------
  ------------------
  342|       |
  343|  3.46k|   BigInt y = y_arg;
  344|       |
  345|  3.46k|   BigInt r = x;
  346|  3.46k|   BigInt q = BigInt::zero();
  347|  3.46k|   secure_vector<word> ws;
  348|       |
  349|  3.46k|   r.set_sign(BigInt::Positive);
  350|  3.46k|   y.set_sign(BigInt::Positive);
  351|       |
  352|       |   // Calculate shifts needed to normalize y with high bit set
  353|  3.46k|   const size_t shifts = y.top_bits_free();
  354|       |
  355|  3.46k|   if(shifts > 0) {
  ------------------
  |  Branch (355:7): [True: 2.93k, False: 523]
  ------------------
  356|  2.93k|      y <<= shifts;
  357|  2.93k|      r <<= shifts;
  358|  2.93k|   }
  359|       |
  360|       |   // we know y has not changed size, since we only shifted up to set high bit
  361|  3.46k|   const size_t t = y_words - 1;
  362|  3.46k|   const size_t n = std::max(y_words, r.sig_words()) - 1;  // r may have changed size however
  363|       |
  364|  3.46k|   BOTAN_ASSERT_NOMSG(n >= t);
  ------------------
  |  |   77|  3.46k|   do {                                                                     \
  |  |   78|  3.46k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  3.46k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 3.46k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  3.46k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 3.46k]
  |  |  ------------------
  ------------------
  365|       |
  366|  3.46k|   q.grow_to(n - t + 1);
  367|       |
  368|  3.46k|   word* q_words = q.mutable_data();
  369|       |
  370|  3.46k|   BigInt shifted_y = y << (WB * (n - t));
  371|       |
  372|       |   // Set q_{n-t} to number of times r > shifted_y
  373|  3.46k|   q_words[n - t] = r.reduce_below(shifted_y, ws);
  374|       |
  375|  3.46k|   const word y_t0 = y.word_at(t);
  376|  3.46k|   const word y_t1 = y.word_at(t - 1);
  377|  3.46k|   BOTAN_DEBUG_ASSERT((y_t0 >> (WB - 1)) == 1);
  ------------------
  |  |  130|  3.46k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  3.46k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 3.46k]
  |  |  ------------------
  ------------------
  378|       |
  379|  3.46k|   const divide_precomp div_y_t0(y_t0);
  380|       |
  381|  6.68k|   for(size_t i = n; i != t; --i) {
  ------------------
  |  Branch (381:22): [True: 3.22k, False: 3.46k]
  ------------------
  382|  3.22k|      const word x_i0 = r.word_at(i);
  383|  3.22k|      const word x_i1 = r.word_at(i - 1);
  384|  3.22k|      const word x_i2 = r.word_at(i - 2);
  385|       |
  386|  3.22k|      word qit = (x_i0 == y_t0) ? WordInfo<word>::max : div_y_t0.vartime_div_2to1(x_i0, x_i1);
  ------------------
  |  Branch (386:18): [True: 87, False: 3.13k]
  ------------------
  387|       |
  388|       |      // Per HAC 14.23, this operation is required at most twice
  389|  3.70k|      for(size_t j = 0; j != 2; ++j) {
  ------------------
  |  Branch (389:25): [True: 3.67k, False: 29]
  ------------------
  390|  3.67k|         if(division_check_vartime(qit, y_t0, y_t1, x_i0, x_i1, x_i2)) {
  ------------------
  |  Branch (390:13): [True: 487, False: 3.19k]
  ------------------
  391|    487|            BOTAN_ASSERT_NOMSG(qit > 0);
  ------------------
  |  |   77|    487|   do {                                                                     \
  |  |   78|    487|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    487|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 487]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    487|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 487]
  |  |  ------------------
  ------------------
  392|    487|            qit--;
  393|  3.19k|         } else {
  394|  3.19k|            break;
  395|  3.19k|         }
  396|  3.67k|      }
  397|       |
  398|  3.22k|      shifted_y >>= WB;
  399|       |      // Now shifted_y == y << (WB * (i-t-1))
  400|       |
  401|  3.22k|      if(qit != 0) {
  ------------------
  |  Branch (401:10): [True: 3.21k, False: 7]
  ------------------
  402|  3.21k|         r -= qit * shifted_y;
  403|  3.21k|         if(r.signum() < 0) {
  ------------------
  |  Branch (403:13): [True: 30, False: 3.18k]
  ------------------
  404|     30|            BOTAN_ASSERT_NOMSG(qit > 0);
  ------------------
  |  |   77|     30|   do {                                                                     \
  |  |   78|     30|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|     30|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 30]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|     30|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 30]
  |  |  ------------------
  ------------------
  405|     30|            qit--;
  406|     30|            r += shifted_y;
  407|     30|            BOTAN_ASSERT_NOMSG(r.signum() >= 0);
  ------------------
  |  |   77|     30|   do {                                                                     \
  |  |   78|     30|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|     30|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 30]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|     30|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 30]
  |  |  ------------------
  ------------------
  408|     30|         }
  409|  3.21k|      }
  410|       |
  411|  3.22k|      q_words[i - t - 1] = qit;
  412|  3.22k|   }
  413|       |
  414|  3.46k|   if(shifts > 0) {
  ------------------
  |  Branch (414:7): [True: 2.93k, False: 523]
  ------------------
  415|  2.93k|      r >>= shifts;
  416|  2.93k|   }
  417|       |
  418|  3.46k|   sign_fixup(x, y_arg, q, r);
  419|       |
  420|  3.46k|   r_out = r;
  421|  3.46k|   q_out = q;
  422|  3.46k|}
divide.cpp:_ZN5Botan12_GLOBAL__N_110sign_fixupERKNS_6BigIntES3_RS1_S4_:
   21|  3.46k|void sign_fixup(const BigInt& x, const BigInt& y, BigInt& q, BigInt& r) {
   22|  3.46k|   q.cond_flip_sign(x.sign() != y.sign());
   23|       |
   24|  3.46k|   if(x.signum() < 0 && r.signum() != 0) {
  ------------------
  |  Branch (24:7): [True: 1.46k, False: 1.99k]
  |  Branch (24:25): [True: 1.46k, False: 0]
  ------------------
   25|  1.46k|      if(y.signum() > 0) {
  ------------------
  |  Branch (25:10): [True: 1.46k, False: 0]
  ------------------
   26|  1.46k|         q -= 1;
   27|  1.46k|      } else {
   28|      0|         q += 1;
   29|      0|      }
   30|  1.46k|      r = y.abs() - r;
   31|  1.46k|   }
   32|  3.46k|}
divide.cpp:_ZN5Botan12_GLOBAL__N_122division_check_vartimeEmmmmmm:
   34|  79.0k|inline bool division_check_vartime(word q, word y2, word y1, word x3, word x2, word x1) {
   35|       |   /*
   36|       |   Compute (y3,y2,y1) = (y2,y1) * q
   37|       |   and return true if (y3,y2,y1) > (x3,x2,x1)
   38|       |   */
   39|       |
   40|  79.0k|   word y3 = 0;
   41|  79.0k|   y1 = word_madd2(q, y1, &y3);
   42|  79.0k|   y2 = word_madd2(q, y2, &y3);
   43|       |
   44|  79.0k|   if(x3 != y3) {
  ------------------
  |  Branch (44:7): [True: 34.0k, False: 44.9k]
  ------------------
   45|  34.0k|      return (y3 > x3);
   46|  34.0k|   }
   47|  44.9k|   if(x2 != y2) {
  ------------------
  |  Branch (47:7): [True: 28.7k, False: 16.2k]
  ------------------
   48|  28.7k|      return (y2 > x2);
   49|  28.7k|   }
   50|  16.2k|   return (y1 > x1);
   51|  44.9k|}

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

_ZN5Botan12basecase_mulEPmmPKmmS2_m:
   20|  8.23M|void basecase_mul(word z[], size_t z_size, const word x[], size_t x_size, const word y[], size_t y_size) {
   21|  8.23M|   if(z_size < x_size + y_size) {
  ------------------
  |  Branch (21:7): [True: 0, False: 8.23M]
  ------------------
   22|      0|      throw Invalid_Argument("basecase_mul z_size too small");
   23|      0|   }
   24|       |
   25|  8.23M|   const size_t x_size_8 = x_size - (x_size % 8);
   26|       |
   27|  8.23M|   zeroize_buffer(z, z_size);
   28|       |
   29|  50.3M|   for(size_t i = 0; i != y_size; ++i) {
  ------------------
  |  Branch (29:22): [True: 42.1M, False: 8.23M]
  ------------------
   30|  42.1M|      const word y_i = y[i];
   31|       |
   32|  42.1M|      word carry = 0;
   33|       |
   34|  61.2M|      for(size_t j = 0; j != x_size_8; j += 8) {
  ------------------
  |  Branch (34:25): [True: 19.0M, False: 42.1M]
  ------------------
   35|  19.0M|         carry = word8_madd3(z + i + j, x + j, y_i, carry);
   36|  19.0M|      }
   37|       |
   38|   171M|      for(size_t j = x_size_8; j != x_size; ++j) {
  ------------------
  |  Branch (38:32): [True: 128M, False: 42.1M]
  ------------------
   39|   128M|         z[i + j] = word_madd3(x[j], y_i, z[i + j], &carry);
   40|   128M|      }
   41|       |
   42|  42.1M|      z[x_size + i] = carry;
   43|  42.1M|   }
   44|  8.23M|}
_ZN5Botan12basecase_sqrEPmmPKmm:
   46|  2.76M|void basecase_sqr(word z[], size_t z_size, const word x[], size_t x_size) {
   47|  2.76M|   if(z_size < 2 * x_size) {
  ------------------
  |  Branch (47:7): [True: 0, False: 2.76M]
  ------------------
   48|      0|      throw Invalid_Argument("basecase_sqr z_size too small");
   49|      0|   }
   50|       |
   51|  2.76M|   const size_t x_size_8 = x_size - (x_size % 8);
   52|       |
   53|  2.76M|   zeroize_buffer(z, z_size);
   54|       |
   55|  13.3M|   for(size_t i = 0; i != x_size; ++i) {
  ------------------
  |  Branch (55:22): [True: 10.6M, False: 2.76M]
  ------------------
   56|  10.6M|      const word x_i = x[i];
   57|       |
   58|  10.6M|      word carry = 0;
   59|       |
   60|  10.6M|      for(size_t j = 0; j != x_size_8; j += 8) {
  ------------------
  |  Branch (60:25): [True: 9.77k, False: 10.6M]
  ------------------
   61|  9.77k|         carry = word8_madd3(z + i + j, x + j, x_i, carry);
   62|  9.77k|      }
   63|       |
   64|  54.4M|      for(size_t j = x_size_8; j != x_size; ++j) {
  ------------------
  |  Branch (64:32): [True: 43.8M, False: 10.6M]
  ------------------
   65|  43.8M|         z[i + j] = word_madd3(x[j], x_i, z[i + j], &carry);
   66|  43.8M|      }
   67|       |
   68|  10.6M|      z[x_size + i] = carry;
   69|  10.6M|   }
   70|  2.76M|}
_ZN5Botan10bigint_mulEPmmPKmmmS2_mmS0_m:
  292|  20.4M|                size_t ws_size) {
  293|  20.4M|   zeroize_buffer(z, z_size);
  294|       |
  295|  20.4M|   if(x_sw == 1) {
  ------------------
  |  Branch (295:7): [True: 147, False: 20.4M]
  ------------------
  296|    147|      bigint_linmul3(z, y, y_sw, x[0]);
  297|  20.4M|   } else if(y_sw == 1) {
  ------------------
  |  Branch (297:14): [True: 131, False: 20.4M]
  ------------------
  298|    131|      bigint_linmul3(z, x, x_sw, y[0]);
  299|  20.4M|   } else if(sized_for_comba_mul<4>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (299:14): [True: 8.13M, False: 12.2M]
  ------------------
  300|  8.13M|      bigint_comba_mul4(z, x, y);
  301|  12.2M|   } else if(sized_for_comba_mul<6>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (301:14): [True: 2.77M, False: 9.52M]
  ------------------
  302|  2.77M|      bigint_comba_mul6(z, x, y);
  303|  9.52M|   } else if(sized_for_comba_mul<8>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (303:14): [True: 205k, False: 9.31M]
  ------------------
  304|   205k|      bigint_comba_mul8(z, x, y);
  305|  9.31M|   } else if(sized_for_comba_mul<9>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (305:14): [True: 1.08M, False: 8.23M]
  ------------------
  306|  1.08M|      bigint_comba_mul9(z, x, y);
  307|  8.23M|   } else if(sized_for_comba_mul<16>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (307:14): [True: 0, False: 8.23M]
  ------------------
  308|      0|      bigint_comba_mul16(z, x, y);
  309|  8.23M|   } else if(sized_for_comba_mul<24>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (309:14): [True: 0, False: 8.23M]
  ------------------
  310|      0|      bigint_comba_mul24(z, x, y);
  311|  8.23M|   } else if(x_sw < KARATSUBA_MULTIPLY_THRESHOLD || y_sw < KARATSUBA_MULTIPLY_THRESHOLD || workspace == nullptr) {
  ------------------
  |  Branch (311:14): [True: 8.23M, False: 0]
  |  Branch (311:53): [True: 0, False: 0]
  |  Branch (311:92): [True: 0, False: 0]
  ------------------
  312|  8.23M|      basecase_mul(z, z_size, x, x_sw, y, y_sw);
  313|  8.23M|   } 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|  20.4M|}
_ZN5Botan10bigint_sqrEPmmPKmmmS0_m:
  327|  6.51M|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|  6.51M|   zeroize_buffer(z, z_size);
  329|       |
  330|  6.51M|   BOTAN_ASSERT(z_size / 2 >= x_sw, "Output size is sufficient");
  ------------------
  |  |   64|  6.51M|   do {                                                                                 \
  |  |   65|  6.51M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|  6.51M|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 6.51M]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|  6.51M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 6.51M]
  |  |  ------------------
  ------------------
  331|       |
  332|  6.51M|   if(x_sw == 1) {
  ------------------
  |  Branch (332:7): [True: 145, False: 6.51M]
  ------------------
  333|    145|      bigint_linmul3(z, x, x_sw, x[0]);
  334|  6.51M|   } else if(sized_for_comba_sqr<4>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (334:14): [True: 3.12M, False: 3.38M]
  ------------------
  335|  3.12M|      bigint_comba_sqr4(z, x);
  336|  3.38M|   } else if(sized_for_comba_sqr<6>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (336:14): [True: 14.4k, False: 3.37M]
  ------------------
  337|  14.4k|      bigint_comba_sqr6(z, x);
  338|  3.37M|   } else if(sized_for_comba_sqr<8>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (338:14): [True: 866, False: 3.37M]
  ------------------
  339|    866|      bigint_comba_sqr8(z, x);
  340|  3.37M|   } else if(sized_for_comba_sqr<9>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (340:14): [True: 609k, False: 2.76M]
  ------------------
  341|   609k|      bigint_comba_sqr9(z, x);
  342|  2.76M|   } else if(sized_for_comba_sqr<16>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (342:14): [True: 0, False: 2.76M]
  ------------------
  343|      0|      bigint_comba_sqr16(z, x);
  344|  2.76M|   } else if(sized_for_comba_sqr<24>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (344:14): [True: 0, False: 2.76M]
  ------------------
  345|      0|      bigint_comba_sqr24(z, x);
  346|  2.76M|   } else if(x_size < KARATSUBA_SQUARE_THRESHOLD || workspace == nullptr) {
  ------------------
  |  Branch (346:14): [True: 2.76M, False: 40]
  |  Branch (346:53): [True: 0, False: 40]
  ------------------
  347|  2.76M|      basecase_sqr(z, z_size, x, x_sw);
  348|  2.76M|   } else {
  349|     40|      const size_t N = karatsuba_size(z_size, x_size, x_sw);
  350|       |
  351|     40|      if(N > 0 && z_size >= 2 * N && ws_size >= 2 * N) {
  ------------------
  |  Branch (351:10): [True: 0, False: 40]
  |  Branch (351:19): [True: 0, False: 0]
  |  Branch (351:38): [True: 0, False: 0]
  ------------------
  352|      0|         karatsuba_sqr(z, x, N, workspace);
  353|     40|      } else {
  354|     40|         basecase_sqr(z, z_size, x, x_sw);
  355|     40|      }
  356|     40|   }
  357|  6.51M|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_114karatsuba_sizeEmmm:
  245|     40|size_t karatsuba_size(size_t z_size, size_t x_size, size_t x_sw) {
  246|     40|   if(x_sw == x_size) {
  ------------------
  |  Branch (246:7): [True: 0, False: 40]
  ------------------
  247|      0|      if(x_sw % 2 != 0) {
  ------------------
  |  Branch (247:10): [True: 0, False: 0]
  ------------------
  248|      0|         return 0;
  249|      0|      }
  250|      0|      return x_sw;
  251|      0|   }
  252|       |
  253|     80|   for(size_t j = x_sw; j <= x_size; ++j) {
  ------------------
  |  Branch (253:25): [True: 80, False: 0]
  ------------------
  254|     80|      if(j % 2 != 0) {
  ------------------
  |  Branch (254:10): [True: 40, False: 40]
  ------------------
  255|     40|         continue;
  256|     40|      }
  257|       |
  258|     40|      if(2 * j > z_size) {
  ------------------
  |  Branch (258:10): [True: 40, False: 0]
  ------------------
  259|     40|         return 0;
  260|     40|      }
  261|       |
  262|      0|      if(j % 4 == 2 && (j + 2) <= x_size && 2 * (j + 2) <= z_size) {
  ------------------
  |  Branch (262:10): [True: 0, False: 0]
  |  Branch (262:24): [True: 0, False: 0]
  |  Branch (262:45): [True: 0, False: 0]
  ------------------
  263|      0|         return j + 2;
  264|      0|      }
  265|      0|      return j;
  266|      0|   }
  267|       |
  268|      0|   return 0;
  269|     40|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm4EEEbmmmmm:
  272|  20.4M|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|  20.4M|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (273:12): [True: 12.1M, False: 8.25M]
  |  Branch (273:26): [True: 8.31M, False: 3.87M]
  |  Branch (273:42): [True: 8.31M, False: 0]
  |  Branch (273:56): [True: 8.23M, False: 78.9k]
  |  Branch (273:72): [True: 8.13M, False: 93.1k]
  ------------------
  274|  20.4M|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm6EEEbmmmmm:
  272|  12.2M|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|  12.2M|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (273:12): [True: 8.96M, False: 3.33M]
  |  Branch (273:26): [True: 3.06M, False: 5.89M]
  |  Branch (273:42): [True: 3.06M, False: 0]
  |  Branch (273:56): [True: 2.98M, False: 78.9k]
  |  Branch (273:72): [True: 2.77M, False: 214k]
  ------------------
  274|  12.2M|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm8EEEbmmmmm:
  272|  9.52M|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|  9.52M|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (273:12): [True: 6.44M, False: 3.07M]
  |  Branch (273:26): [True: 468k, False: 5.97M]
  |  Branch (273:42): [True: 442k, False: 26.0k]
  |  Branch (273:56): [True: 377k, False: 65.6k]
  |  Branch (273:72): [True: 205k, False: 171k]
  ------------------
  274|  9.52M|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm9EEEbmmmmm:
  272|  9.31M|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|  9.31M|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (273:12): [True: 7.35M, False: 1.96M]
  |  Branch (273:26): [True: 1.23M, False: 6.11M]
  |  Branch (273:42): [True: 1.23M, False: 0]
  |  Branch (273:56): [True: 1.13M, False: 98.7k]
  |  Branch (273:72): [True: 1.08M, False: 54.0k]
  ------------------
  274|  9.31M|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm16EEEbmmmmm:
  272|  8.23M|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|  8.23M|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (273:12): [True: 8.23M, False: 0]
  |  Branch (273:26): [True: 1.06M, False: 7.16M]
  |  Branch (273:42): [True: 1.06M, False: 0]
  |  Branch (273:56): [True: 1.02M, False: 33.7k]
  |  Branch (273:72): [True: 0, False: 1.02M]
  ------------------
  274|  8.23M|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm24EEEbmmmmm:
  272|  8.23M|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|  8.23M|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (273:12): [True: 8.23M, False: 0]
  |  Branch (273:26): [True: 8.24k, False: 8.22M]
  |  Branch (273:42): [True: 8.24k, False: 0]
  |  Branch (273:56): [True: 8.24k, False: 0]
  |  Branch (273:72): [True: 0, False: 8.24k]
  ------------------
  274|  8.23M|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_sqrILm4EEEbmmm:
  277|  6.51M|inline bool sized_for_comba_sqr(size_t x_sw, size_t x_size, size_t z_size) {
  278|  6.51M|   return (x_sw <= SZ && x_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (278:12): [True: 4.75M, False: 1.75M]
  |  Branch (278:26): [True: 3.18M, False: 1.56M]
  |  Branch (278:42): [True: 3.12M, False: 61.2k]
  ------------------
  279|  6.51M|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_sqrILm6EEEbmmm:
  277|  3.38M|inline bool sized_for_comba_sqr(size_t x_sw, size_t x_size, size_t z_size) {
  278|  3.38M|   return (x_sw <= SZ && x_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (278:12): [True: 2.74M, False: 642k]
  |  Branch (278:26): [True: 166k, False: 2.58M]
  |  Branch (278:42): [True: 14.4k, False: 151k]
  ------------------
  279|  3.38M|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_sqrILm8EEEbmmm:
  277|  3.37M|inline bool sized_for_comba_sqr(size_t x_sw, size_t x_size, size_t z_size) {
  278|  3.37M|   return (x_sw <= SZ && x_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (278:12): [True: 2.76M, False: 609k]
  |  Branch (278:26): [True: 152k, False: 2.61M]
  |  Branch (278:42): [True: 866, False: 151k]
  ------------------
  279|  3.37M|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_sqrILm9EEEbmmm:
  277|  3.37M|inline bool sized_for_comba_sqr(size_t x_sw, size_t x_size, size_t z_size) {
  278|  3.37M|   return (x_sw <= SZ && x_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (278:12): [True: 3.37M, False: 752]
  |  Branch (278:26): [True: 737k, False: 2.63M]
  |  Branch (278:42): [True: 609k, False: 128k]
  ------------------
  279|  3.37M|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_sqrILm16EEEbmmm:
  277|  2.76M|inline bool sized_for_comba_sqr(size_t x_sw, size_t x_size, size_t z_size) {
  278|  2.76M|   return (x_sw <= SZ && x_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (278:12): [True: 2.76M, False: 0]
  |  Branch (278:26): [True: 97.7k, False: 2.66M]
  |  Branch (278:42): [True: 0, False: 97.7k]
  ------------------
  279|  2.76M|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_sqrILm24EEEbmmm:
  277|  2.76M|inline bool sized_for_comba_sqr(size_t x_sw, size_t x_size, size_t z_size) {
  278|  2.76M|   return (x_sw <= SZ && x_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (278:12): [True: 2.76M, False: 0]
  |  Branch (278:26): [True: 15.8k, False: 2.74M]
  |  Branch (278:42): [True: 0, False: 15.8k]
  ------------------
  279|  2.76M|}

_ZN5Botan25bigint_monty_redc_genericEPmPKmmS2_mmS0_:
   91|  12.5M|   word r[], const word z[], size_t z_size, const word p[], size_t p_size, word p_dash, word ws[]) {
   92|  12.5M|   BOTAN_ARG_CHECK(z_size >= 2 * p_size && p_size > 0, "Invalid sizes for bigint_monty_redc_generic");
  ------------------
  |  |   35|  12.5M|   do {                                                          \
  |  |   36|  12.5M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  25.0M|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 12.5M, False: 0]
  |  |  |  Branch (37:12): [True: 12.5M, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  12.5M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 12.5M]
  |  |  ------------------
  ------------------
   93|       |
   94|  12.5M|   word3<word> accum;
   95|       |
   96|  12.5M|   accum.add(z[0]);
   97|       |
   98|  12.5M|   ws[0] = accum.monty_step(p[0], p_dash);
   99|       |
  100|  64.2M|   for(size_t i = 1; i != p_size; ++i) {
  ------------------
  |  Branch (100:22): [True: 51.7M, False: 12.5M]
  ------------------
  101|  51.7M|      mul_rev_range(accum, ws, p, i);
  102|  51.7M|      accum.add(z[i]);
  103|  51.7M|      ws[i] = accum.monty_step(p[0], p_dash);
  104|  51.7M|   }
  105|       |
  106|  64.2M|   for(size_t i = 0; i != p_size - 1; ++i) {
  ------------------
  |  Branch (106:22): [True: 51.7M, False: 12.5M]
  ------------------
  107|  51.7M|      mul_rev_range(accum, &ws[i + 1], &p[i], p_size - (i + 1));
  108|  51.7M|      accum.add(z[p_size + i]);
  109|  51.7M|      ws[i] = accum.extract();
  110|  51.7M|   }
  111|       |
  112|  12.5M|   accum.add(z[2 * p_size - 1]);
  113|       |
  114|  12.5M|   ws[p_size - 1] = accum.extract();
  115|       |   // w1 is the final part, which is not stored in the workspace
  116|  12.5M|   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|  12.5M|   bigint_monty_maybe_sub(p_size, r, w1, ws, p);
  137|  12.5M|}
mp_monty.cpp:_ZN5Botan12_GLOBAL__N_113mul_rev_rangeERNS_5word3ImEEPKmS5_m:
   18|   103M|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|   103M|   size_t lower = 0;
   28|   247M|   while(lower < bound) {
  ------------------
  |  Branch (28:10): [True: 144M, False: 103M]
  ------------------
   29|   144M|      const size_t upper = bound - lower;
   30|       |
   31|   144M|      if(upper >= 16) {
  ------------------
  |  Branch (31:10): [True: 0, False: 144M]
  ------------------
   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|   144M|      } else if(upper >= 8) {
  ------------------
  |  Branch (49:17): [True: 6.88M, False: 137M]
  ------------------
   50|  6.88M|         accum.mul(ws[lower], p[upper]);
   51|  6.88M|         accum.mul(ws[lower + 1], p[upper - 1]);
   52|  6.88M|         accum.mul(ws[lower + 2], p[upper - 2]);
   53|  6.88M|         accum.mul(ws[lower + 3], p[upper - 3]);
   54|  6.88M|         accum.mul(ws[lower + 4], p[upper - 4]);
   55|  6.88M|         accum.mul(ws[lower + 5], p[upper - 5]);
   56|  6.88M|         accum.mul(ws[lower + 6], p[upper - 6]);
   57|  6.88M|         accum.mul(ws[lower + 7], p[upper - 7]);
   58|  6.88M|         lower += 8;
   59|   137M|      } else if(upper >= 4) {
  ------------------
  |  Branch (59:17): [True: 33.6M, False: 103M]
  ------------------
   60|  33.6M|         accum.mul(ws[lower], p[upper]);
   61|  33.6M|         accum.mul(ws[lower + 1], p[upper - 1]);
   62|  33.6M|         accum.mul(ws[lower + 2], p[upper - 2]);
   63|  33.6M|         accum.mul(ws[lower + 3], p[upper - 3]);
   64|  33.6M|         lower += 4;
   65|   103M|      } else if(upper >= 2) {
  ------------------
  |  Branch (65:17): [True: 51.7M, False: 51.7M]
  ------------------
   66|  51.7M|         accum.mul(ws[lower], p[upper]);
   67|  51.7M|         accum.mul(ws[lower + 1], p[upper - 1]);
   68|  51.7M|         lower += 2;
   69|  51.7M|      } else {
   70|  51.7M|         accum.mul(ws[lower], p[upper]);
   71|  51.7M|         lower += 1;
   72|  51.7M|      }
   73|   144M|   }
   74|   103M|}

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

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

_ZN5Botan24inverse_mod_public_primeERKNS_6BigIntES2_:
  294|    878|BigInt inverse_mod_public_prime(const BigInt& x, const BigInt& p) {
  295|    878|   BOTAN_ARG_CHECK(p.signum() > 0, "Modulus must be positive");
  ------------------
  |  |   35|    878|   do {                                                          \
  |  |   36|    878|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    878|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 878]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    878|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 878]
  |  |  ------------------
  ------------------
  296|    878|   BOTAN_ARG_CHECK(x.signum() > 0, "Input must be positive");
  ------------------
  |  |   35|    878|   do {                                                          \
  |  |   36|    878|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    878|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 878]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    878|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 878]
  |  |  ------------------
  ------------------
  297|    878|   BOTAN_ARG_CHECK(x < p, "Input must be less than modulus");
  ------------------
  |  |   35|    878|   do {                                                          \
  |  |   36|    878|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    878|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 878]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    878|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 878]
  |  |  ------------------
  ------------------
  298|    878|   BOTAN_ARG_CHECK(p.is_odd() && p > 1, "Primes are odd integers greater than 1");
  ------------------
  |  |   35|    878|   do {                                                          \
  |  |   36|    878|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  1.75k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 878, False: 0]
  |  |  |  Branch (37:12): [True: 878, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    878|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 878]
  |  |  ------------------
  ------------------
  299|       |
  300|       |   // TODO possibly use FLT, or the algorithm presented for this case in
  301|       |   // Handbook of Elliptic and Hyperelliptic Curve Cryptography
  302|       |
  303|    878|   return inverse_mod_odd_modulus(x, p);
  304|    878|}
mod_inv.cpp:_ZN5Botan12_GLOBAL__N_123inverse_mod_odd_modulusERKNS_6BigIntES3_:
   21|    878|BigInt inverse_mod_odd_modulus(const BigInt& n, const BigInt& mod) {
   22|       |   // Caller should assure these preconditions:
   23|    878|   BOTAN_ASSERT_NOMSG(n.signum() >= 0);
  ------------------
  |  |   77|    878|   do {                                                                     \
  |  |   78|    878|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    878|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 878]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    878|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 878]
  |  |  ------------------
  ------------------
   24|    878|   BOTAN_ASSERT_NOMSG(mod.signum() > 0);
  ------------------
  |  |   77|    878|   do {                                                                     \
  |  |   78|    878|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    878|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 878]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    878|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 878]
  |  |  ------------------
  ------------------
   25|    878|   BOTAN_ASSERT_NOMSG(n < mod);
  ------------------
  |  |   77|    878|   do {                                                                     \
  |  |   78|    878|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    878|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 878]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    878|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 878]
  |  |  ------------------
  ------------------
   26|    878|   BOTAN_ASSERT_NOMSG(mod >= 3 && mod.is_odd());
  ------------------
  |  |   77|    878|   do {                                                                     \
  |  |   78|    878|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  1.75k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:12): [True: 878, False: 0]
  |  |  |  Branch (79:12): [True: 878, False: 0]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    878|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 878]
  |  |  ------------------
  ------------------
   27|       |
   28|       |   /*
   29|       |   This uses a modular inversion algorithm designed by Niels Möller
   30|       |   and implemented in Nettle. The same algorithm was later also
   31|       |   adapted to GMP in mpn_sec_invert.
   32|       |
   33|       |   It can be easily implemented in a way that does not depend on
   34|       |   secret branches or memory lookups, providing resistance against
   35|       |   some forms of side channel attack.
   36|       |
   37|       |   There is also a description of the algorithm in Appendix 5 of "Fast
   38|       |   Software Polynomial Multiplication on ARM Processors using the NEON Engine"
   39|       |   by Danilo Câmara, Conrado P. L. Gouvêa, Julio López, and Ricardo
   40|       |   Dahab in LNCS 8182
   41|       |      https://inria.hal.science/hal-01506572/document
   42|       |
   43|       |   Thanks to Niels for creating the algorithm, explaining some things
   44|       |   about it, and the reference to the paper.
   45|       |   */
   46|       |
   47|    878|   const size_t mod_words = mod.sig_words();
   48|    878|   BOTAN_ASSERT(mod_words > 0, "Not empty");
  ------------------
  |  |   64|    878|   do {                                                                                 \
  |  |   65|    878|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|    878|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 878]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|    878|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 878]
  |  |  ------------------
  ------------------
   49|       |
   50|    878|   secure_vector<word> tmp_mem(5 * mod_words);
   51|       |
   52|    878|   word* v_w = &tmp_mem[0];  // NOLINT(readability-container-data-pointer)
   53|    878|   word* u_w = &tmp_mem[1 * mod_words];
   54|    878|   word* b_w = &tmp_mem[2 * mod_words];
   55|    878|   word* a_w = &tmp_mem[3 * mod_words];
   56|    878|   word* mp1o2 = &tmp_mem[4 * mod_words];
   57|       |
   58|    878|   copy_mem(a_w, n._data(), std::min(n.size(), mod_words));
   59|    878|   copy_mem(b_w, mod._data(), std::min(mod.size(), mod_words));
   60|    878|   u_w[0] = 1;
   61|       |   // v_w = 0
   62|       |
   63|       |   // compute (mod + 1) / 2 which [because mod is odd] is equal to
   64|       |   // (mod / 2) + 1
   65|    878|   copy_mem(mp1o2, mod._data(), std::min(mod.size(), mod_words));
   66|    878|   bigint_shr1(mp1o2, mod_words, 1);
   67|    878|   const word carry = bigint_add2(mp1o2, mod_words, u_w, 1);
   68|    878|   BOTAN_ASSERT_NOMSG(carry == 0);
  ------------------
  |  |   77|    878|   do {                                                                     \
  |  |   78|    878|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    878|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 878]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    878|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 878]
  |  |  ------------------
  ------------------
   69|       |
   70|    878|   CT::poison(tmp_mem.data(), tmp_mem.size());
   71|       |
   72|       |   // Only n.bits() + mod.bits() iterations are required, but avoid leaking the size of n
   73|    878|   const size_t execs = 2 * mod.bits();
   74|       |
   75|   401k|   for(size_t i = 0; i != execs; ++i) {
  ------------------
  |  Branch (75:22): [True: 401k, False: 878]
  ------------------
   76|   401k|      const word odd_a = a_w[0] & 1;
   77|       |
   78|       |      //if(odd_a) a -= b
   79|   401k|      const word underflow = bigint_cnd_sub(odd_a, a_w, b_w, mod_words);
   80|       |
   81|       |      //if(underflow) { b -= a; a = abs(a); swap(u, v); }
   82|   401k|      bigint_cnd_add(underflow, b_w, a_w, mod_words);
   83|   401k|      bigint_cnd_abs(underflow, a_w, mod_words);
   84|   401k|      bigint_cnd_swap(underflow, u_w, v_w, mod_words);
   85|       |
   86|       |      // a >>= 1
   87|   401k|      bigint_shr1(a_w, mod_words, 1);
   88|       |
   89|       |      //if(odd_a) u -= v;
   90|   401k|      const word borrow = bigint_cnd_sub(odd_a, u_w, v_w, mod_words);
   91|       |
   92|       |      // if(borrow) u += p
   93|   401k|      bigint_cnd_add(borrow, u_w, mod._data(), mod_words);
   94|       |
   95|   401k|      const word odd_u = u_w[0] & 1;
   96|       |
   97|       |      // u >>= 1
   98|   401k|      bigint_shr1(u_w, mod_words, 1);
   99|       |
  100|       |      //if(odd_u) u += mp1o2;
  101|   401k|      bigint_cnd_add(odd_u, u_w, mp1o2, mod_words);
  102|   401k|   }
  103|       |
  104|    878|   const auto a_is_0 = CT::all_zeros(a_w, mod_words);
  105|       |
  106|    878|   auto b_is_1 = CT::Mask<word>::is_equal(b_w[0], 1);
  107|  3.56k|   for(size_t i = 1; i != mod_words; ++i) {
  ------------------
  |  Branch (107:22): [True: 2.68k, False: 878]
  ------------------
  108|  2.68k|      b_is_1 &= CT::Mask<word>::is_zero(b_w[i]);
  109|  2.68k|   }
  110|       |
  111|    878|   BOTAN_ASSERT(a_is_0.as_bool(), "A is zero");
  ------------------
  |  |   64|    878|   do {                                                                                 \
  |  |   65|    878|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|    878|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 878]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|    878|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 878]
  |  |  ------------------
  ------------------
  112|       |
  113|       |   // if b != 1 then gcd(n,mod) > 1 and inverse does not exist
  114|       |   // in which case zero out the result to indicate this
  115|    878|   (~b_is_1).if_set_zero_out(v_w, mod_words);
  116|       |
  117|       |   /*
  118|       |   * We've placed the result in the lowest words of the temp buffer.
  119|       |   * So just clear out the other values and then give that buffer to a
  120|       |   * BigInt.
  121|       |   */
  122|    878|   clear_mem(&tmp_mem[mod_words], 4 * mod_words);
  123|       |
  124|    878|   CT::unpoison(tmp_mem.data(), tmp_mem.size());
  125|       |
  126|    878|   BigInt r;
  127|    878|   r.swap_reg(tmp_mem);
  128|    878|   return r;
  129|    878|}

_ZN5Botan17Montgomery_Params4DataC2ERKNS_6BigIntERKNS_17Barrett_ReductionE:
   40|  5.33k|Montgomery_Params::Data::Data(const BigInt& p, const Barrett_Reduction& mod_p) {
   41|  5.33k|   if(p.is_even() || p < 3) {
  ------------------
  |  Branch (41:7): [True: 0, False: 5.33k]
  |  Branch (41:22): [True: 0, False: 5.33k]
  ------------------
   42|      0|      throw Invalid_Argument("Montgomery_Params invalid modulus");
   43|      0|   }
   44|       |
   45|  5.33k|   m_p = p;
   46|  5.33k|   m_p_words = m_p.sig_words();
   47|  5.33k|   m_p_dash = monty_inverse(m_p.word_at(0));
   48|       |
   49|  5.33k|   const BigInt r = BigInt::power_of_2(m_p_words * WordInfo<word>::bits);
   50|       |
   51|  5.33k|   m_r1 = mod_p.reduce(r);
   52|  5.33k|   m_r2 = mod_p.square(m_r1);
   53|  5.33k|   m_r3 = mod_p.multiply(m_r1, m_r2);
   54|       |
   55|       |   // Barrett should be at least zero prefixing up to modulus size
   56|  5.33k|   BOTAN_ASSERT_NOMSG(m_r1.size() >= m_p_words);
  ------------------
  |  |   77|  5.33k|   do {                                                                     \
  |  |   78|  5.33k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  5.33k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 5.33k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  5.33k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 5.33k]
  |  |  ------------------
  ------------------
   57|  5.33k|   BOTAN_ASSERT_NOMSG(m_r2.size() >= m_p_words);
  ------------------
  |  |   77|  5.33k|   do {                                                                     \
  |  |   78|  5.33k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  5.33k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 5.33k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  5.33k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 5.33k]
  |  |  ------------------
  ------------------
   58|  5.33k|   BOTAN_ASSERT_NOMSG(m_r3.size() >= m_p_words);
  ------------------
  |  |   77|  5.33k|   do {                                                                     \
  |  |   78|  5.33k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  5.33k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 5.33k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  5.33k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 5.33k]
  |  |  ------------------
  ------------------
   59|  5.33k|}
_ZN5Botan17Montgomery_ParamsC2ERKNS_6BigIntERKNS_17Barrett_ReductionE:
   62|  5.33k|      m_data(std::make_shared<Data>(p, mod_p)) {}
_ZN5Botan17Montgomery_ParamsC2ERKNS_6BigIntE:
   65|    920|      Montgomery_Params(p, Barrett_Reduction::for_secret_modulus(p)) {}
_ZNK5Botan17Montgomery_ParamseqERKS0_:
   67|  10.4k|bool Montgomery_Params::operator==(const Montgomery_Params& other) const {
   68|  10.4k|   if(this->m_data == other.m_data) {
  ------------------
  |  Branch (68:7): [True: 10.4k, False: 0]
  ------------------
   69|  10.4k|      return true;
   70|  10.4k|   }
   71|       |
   72|      0|   return (this->m_data->p() == other.m_data->p());
   73|  10.4k|}
_ZNK5Botan17Montgomery_Params4redcERKNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
   75|    323|BigInt Montgomery_Params::redc(const BigInt& x, secure_vector<word>& ws) const {
   76|    323|   const size_t p_size = this->p_words();
   77|       |
   78|    323|   if(ws.size() < p_size) {
  ------------------
  |  Branch (78:7): [True: 276, False: 47]
  ------------------
   79|    276|      ws.resize(p_size);
   80|    276|   }
   81|       |
   82|    323|   BigInt z = x;
   83|    323|   z.grow_to(2 * p_size);
   84|       |
   85|    323|   bigint_monty_redc_inplace(z.mutable_data(), this->p()._data(), p_size, this->p_dash(), ws.data(), ws.size());
   86|       |
   87|    323|   return z;
   88|    323|}
_ZNK5Botan17Montgomery_Params3mulERKNS_6BigIntES3_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   90|  1.82M|BigInt Montgomery_Params::mul(const BigInt& x, const BigInt& y, secure_vector<word>& ws) const {
   91|  1.82M|   const size_t p_size = this->p_words();
   92|  1.82M|   BigInt z = BigInt::with_capacity(2 * p_size);
   93|  1.82M|   this->mul(z, x, y, ws);
   94|  1.82M|   return z;
   95|  1.82M|}
_ZNK5Botan17Montgomery_Params3mulERNS_6BigIntERKS1_S4_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   97|  7.27M|void Montgomery_Params::mul(BigInt& z, const BigInt& x, const BigInt& y, secure_vector<word>& ws) const {
   98|  7.27M|   BOTAN_ARG_CHECK(&z != &x && &z != &y, "Montgomery_Params::mul output must not alias inputs");
  ------------------
  |  |   35|  7.27M|   do {                                                          \
  |  |   36|  7.27M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  14.5M|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 7.27M, False: 0]
  |  |  |  Branch (37:12): [True: 7.27M, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  7.27M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 7.27M]
  |  |  ------------------
  ------------------
   99|       |
  100|  7.27M|   const size_t p_size = this->p_words();
  101|       |
  102|  7.27M|   if(ws.size() < 2 * p_size) {
  ------------------
  |  Branch (102:7): [True: 3.52k, False: 7.27M]
  ------------------
  103|  3.52k|      ws.resize(2 * p_size);
  104|  3.52k|   }
  105|       |
  106|  7.27M|   BOTAN_DEBUG_ASSERT(x.sig_words() <= p_size);
  ------------------
  |  |  130|  7.27M|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  7.27M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 7.27M]
  |  |  ------------------
  ------------------
  107|  7.27M|   BOTAN_DEBUG_ASSERT(y.sig_words() <= p_size);
  ------------------
  |  |  130|  7.27M|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  7.27M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 7.27M]
  |  |  ------------------
  ------------------
  108|       |
  109|  7.27M|   if(z.size() < 2 * p_size) {
  ------------------
  |  Branch (109:7): [True: 606k, False: 6.66M]
  ------------------
  110|   606k|      z.grow_to(2 * p_size);
  111|   606k|   }
  112|       |
  113|  7.27M|   bigint_mul(z.mutable_data(),
  114|  7.27M|              z.size(),
  115|  7.27M|              x._data(),
  116|  7.27M|              x.size(),
  117|  7.27M|              std::min(p_size, x.size()),
  118|  7.27M|              y._data(),
  119|  7.27M|              y.size(),
  120|  7.27M|              std::min(p_size, y.size()),
  121|  7.27M|              ws.data(),
  122|  7.27M|              ws.size());
  123|       |
  124|  7.27M|   bigint_monty_redc_inplace(z.mutable_data(), this->p()._data(), p_size, this->p_dash(), ws.data(), ws.size());
  125|  7.27M|}
_ZNK5Botan17Montgomery_Params3mulERNS_6BigIntERKS1_NSt3__14spanIKmLm18446744073709551615EEERNS5_6vectorImNS_16secure_allocatorImEEEE:
  127|  1.39M|void Montgomery_Params::mul(BigInt& z, const BigInt& x, std::span<const word> y, secure_vector<word>& ws) const {
  128|  1.39M|   BOTAN_ARG_CHECK(&z != &x, "Montgomery_Params::mul output must not alias x");
  ------------------
  |  |   35|  1.39M|   do {                                                          \
  |  |   36|  1.39M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  1.39M|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 1.39M]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.39M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.39M]
  |  |  ------------------
  ------------------
  129|  1.39M|   BOTAN_ARG_CHECK(!ranges_overlap(z._data(), z.size(), y.data(), y.size()),
  ------------------
  |  |   35|  1.39M|   do {                                                          \
  |  |   36|  1.39M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  1.39M|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 1.39M]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.39M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.39M]
  |  |  ------------------
  ------------------
  130|  1.39M|                   "Montgomery_Params::mul output must not overlap y");
  131|       |
  132|  1.39M|   const size_t p_size = this->p_words();
  133|       |
  134|  1.39M|   if(ws.size() < 2 * p_size) {
  ------------------
  |  Branch (134:7): [True: 0, False: 1.39M]
  ------------------
  135|      0|      ws.resize(2 * p_size);
  136|      0|   }
  137|  1.39M|   if(z.size() < 2 * p_size) {
  ------------------
  |  Branch (137:7): [True: 0, False: 1.39M]
  ------------------
  138|      0|      z.grow_to(2 * p_size);
  139|      0|   }
  140|       |
  141|  1.39M|   BOTAN_DEBUG_ASSERT(x.sig_words() <= p_size);
  ------------------
  |  |  130|  1.39M|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  1.39M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 1.39M]
  |  |  ------------------
  ------------------
  142|       |
  143|  1.39M|   bigint_mul(z.mutable_data(),
  144|  1.39M|              z.size(),
  145|  1.39M|              x._data(),
  146|  1.39M|              x.size(),
  147|  1.39M|              std::min(p_size, x.size()),
  148|  1.39M|              y.data(),
  149|  1.39M|              y.size(),
  150|  1.39M|              std::min(p_size, y.size()),
  151|  1.39M|              ws.data(),
  152|  1.39M|              ws.size());
  153|       |
  154|  1.39M|   bigint_monty_redc_inplace(z.mutable_data(), this->p()._data(), p_size, this->p_dash(), ws.data(), ws.size());
  155|  1.39M|}
_ZNK5Botan17Montgomery_Params6mul_byERNS_6BigIntERKS1_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  157|  9.21k|void Montgomery_Params::mul_by(BigInt& x, const BigInt& y, secure_vector<word>& ws) const {
  158|  9.21k|   const size_t p_size = this->p_words();
  159|       |
  160|  9.21k|   if(ws.size() < 4 * p_size) {
  ------------------
  |  Branch (160:7): [True: 4.60k, False: 4.60k]
  ------------------
  161|  4.60k|      ws.resize(4 * p_size);
  162|  4.60k|   }
  163|       |
  164|  9.21k|   word* z_data = ws.data();
  165|  9.21k|   word* ws_data = &ws[2 * p_size];
  166|       |
  167|  9.21k|   BOTAN_DEBUG_ASSERT(x.sig_words() <= p_size);
  ------------------
  |  |  130|  9.21k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  9.21k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 9.21k]
  |  |  ------------------
  ------------------
  168|       |
  169|  9.21k|   bigint_mul(z_data,
  170|  9.21k|              2 * p_size,
  171|  9.21k|              x._data(),
  172|  9.21k|              x.size(),
  173|  9.21k|              std::min(p_size, x.size()),
  174|  9.21k|              y._data(),
  175|  9.21k|              y.size(),
  176|  9.21k|              std::min(p_size, y.size()),
  177|  9.21k|              ws_data,
  178|  9.21k|              2 * p_size);
  179|       |
  180|  9.21k|   bigint_monty_redc_inplace(z_data, this->p()._data(), p_size, this->p_dash(), ws_data, 2 * p_size);
  181|       |
  182|  9.21k|   if(x.size() < 2 * p_size) {
  ------------------
  |  Branch (182:7): [True: 3.63k, False: 5.57k]
  ------------------
  183|  3.63k|      x.grow_to(2 * p_size);
  184|  3.63k|   }
  185|  9.21k|   copy_mem(x.mutable_data(), z_data, 2 * p_size);
  186|  9.21k|}
_ZNK5Botan17Montgomery_Params3sqrERKNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  188|    209|BigInt Montgomery_Params::sqr(const BigInt& x, secure_vector<word>& ws) const {
  189|    209|   BOTAN_DEBUG_ASSERT(x.sig_words() <= this->p_words());
  ------------------
  |  |  130|    209|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    209|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 209]
  |  |  ------------------
  ------------------
  190|    209|   return this->sqr(std::span{x._data(), x.size()}, ws);
  191|    209|}
_ZNK5Botan17Montgomery_Params3sqrENSt3__14spanIKmLm18446744073709551615EEERNS1_6vectorImNS_16secure_allocatorImEEEE:
  193|    209|BigInt Montgomery_Params::sqr(std::span<const word> x, secure_vector<word>& ws) const {
  194|    209|   const size_t p_size = this->p_words();
  195|    209|   BigInt z = BigInt::with_capacity(2 * p_size);
  196|    209|   this->sqr(z, x, ws);
  197|    209|   return z;
  198|    209|}
_ZNK5Botan17Montgomery_Params3sqrERNS_6BigIntERKS1_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  200|  2.70M|void Montgomery_Params::sqr(BigInt& z, const BigInt& x, secure_vector<word>& ws) const {
  201|  2.70M|   BOTAN_ARG_CHECK(&z != &x, "Montgomery_Params::sqr output must not alias input");
  ------------------
  |  |   35|  2.70M|   do {                                                          \
  |  |   36|  2.70M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  2.70M|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 2.70M]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  2.70M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 2.70M]
  |  |  ------------------
  ------------------
  202|  2.70M|   this->sqr(z, std::span{x._data(), x.size()}, ws);
  203|  2.70M|}
_ZNK5Botan17Montgomery_Params3sqrERNS_6BigIntENSt3__14spanIKmLm18446744073709551615EEERNS3_6vectorImNS_16secure_allocatorImEEEE:
  205|  3.04M|void Montgomery_Params::sqr(BigInt& z, std::span<const word> x, secure_vector<word>& ws) const {
  206|  3.04M|   BOTAN_ARG_CHECK(!ranges_overlap(z._data(), z.size(), x.data(), x.size()),
  ------------------
  |  |   35|  3.04M|   do {                                                          \
  |  |   36|  3.04M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  3.04M|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 3.04M]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  3.04M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 3.04M]
  |  |  ------------------
  ------------------
  207|  3.04M|                   "Montgomery_Params::sqr output must not overlap input");
  208|       |
  209|  3.04M|   const size_t p_size = this->p_words();
  210|       |
  211|  3.04M|   if(ws.size() < 2 * p_size) {
  ------------------
  |  Branch (211:7): [True: 23, False: 3.04M]
  ------------------
  212|     23|      ws.resize(2 * p_size);
  213|     23|   }
  214|       |
  215|  3.04M|   if(z.size() < 2 * p_size) {
  ------------------
  |  Branch (215:7): [True: 51.0k, False: 2.99M]
  ------------------
  216|  51.0k|      z.grow_to(2 * p_size);
  217|  51.0k|   }
  218|       |
  219|  3.04M|   bigint_sqr(z.mutable_data(), z.size(), x.data(), x.size(), std::min(p_size, x.size()), ws.data(), ws.size());
  220|       |
  221|  3.04M|   bigint_monty_redc_inplace(z.mutable_data(), this->p()._data(), p_size, this->p_dash(), ws.data(), ws.size());
  222|  3.04M|}
_ZN5Botan14Montgomery_IntC2ERKNS_17Montgomery_ParamsENSt3__16vectorImNS_16secure_allocatorImEEEE:
  227|  10.4k|      m_params(params), m_v(std::move(words)) {
  228|  10.4k|   BOTAN_ASSERT_NOMSG(m_v.size() == m_params.p_words());
  ------------------
  |  |   77|  10.4k|   do {                                                                     \
  |  |   78|  10.4k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  10.4k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 10.4k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  10.4k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 10.4k]
  |  |  ------------------
  ------------------
  229|  10.4k|}
_ZN5Botan14Montgomery_Int3oneERKNS_17Montgomery_ParamsE:
  231|  1.48k|Montgomery_Int Montgomery_Int::one(const Montgomery_Params& params) {
  232|  1.48k|   return Montgomery_Int(params, params.R1(), false);
  233|  1.48k|}
_ZN5Botan14Montgomery_IntC2ERKNS_17Montgomery_ParamsERKNS_6BigIntEb:
  242|  2.97k|      m_params(params), m_v(m_params.p_words()) {
  243|  2.97k|   BOTAN_ARG_CHECK(v.signum() >= 0 && v < m_params.p(), "Input out of range");
  ------------------
  |  |   35|  2.97k|   do {                                                          \
  |  |   36|  2.97k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  5.94k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 2.97k, False: 0]
  |  |  |  Branch (37:12): [True: 2.97k, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  2.97k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 2.97k]
  |  |  ------------------
  ------------------
  244|       |
  245|  2.97k|   const size_t p_size = m_params.p_words();
  246|       |
  247|  2.97k|   auto v_span = v._as_span();
  248|       |
  249|  2.97k|   if(v_span.size() > p_size) {
  ------------------
  |  Branch (249:7): [True: 2.64k, False: 329]
  ------------------
  250|       |      // Safe to truncate the span since we already checked v < p
  251|  2.64k|      v_span = v_span.first(p_size);
  252|  2.64k|   }
  253|       |
  254|  2.97k|   BOTAN_ASSERT_NOMSG(m_v.size() >= v_span.size());
  ------------------
  |  |   77|  2.97k|   do {                                                                     \
  |  |   78|  2.97k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  2.97k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 2.97k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  2.97k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 2.97k]
  |  |  ------------------
  ------------------
  255|       |
  256|  2.97k|   copy_mem(std::span{m_v}.first(v_span.size()), v_span);
  257|       |
  258|  2.97k|   if(redc_needed) {
  ------------------
  |  Branch (258:7): [True: 1.48k, False: 1.48k]
  ------------------
  259|  1.48k|      secure_vector<word> ws;
  260|  1.48k|      this->mul_by(m_params.R2()._as_span().first(p_size), ws);
  261|  1.48k|   }
  262|  2.97k|}
_ZN5Botan14Montgomery_IntC2ERKNS_17Montgomery_ParamsENSt3__14spanIKmLm18446744073709551615EEE:
  265|  1.38k|      m_params(params), m_v(words.begin(), words.end()) {
  266|  1.38k|   BOTAN_ARG_CHECK(m_v.size() == m_params.p_words(), "Invalid input span");
  ------------------
  |  |   35|  1.38k|   do {                                                          \
  |  |   36|  1.38k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  1.38k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 1.38k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.38k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.38k]
  |  |  ------------------
  ------------------
  267|  1.38k|}
_ZNK5Botan14Montgomery_Int5valueEv:
  273|  1.38k|BigInt Montgomery_Int::value() const {
  274|  1.38k|   secure_vector<word> ws(m_params.p_words());
  275|       |
  276|  1.38k|   secure_vector<word> z = m_v;
  277|  1.38k|   z.resize(2 * m_params.p_words());  // zero extend
  278|       |
  279|  1.38k|   bigint_monty_redc_inplace(
  280|  1.38k|      z.data(), m_params.p()._data(), m_params.p_words(), m_params.p_dash(), ws.data(), ws.size());
  281|       |
  282|  1.38k|   return BigInt::_from_words(z);
  283|  1.38k|}
_ZNK5Botan14Montgomery_Int3mulERKS0_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  320|  10.4k|Montgomery_Int Montgomery_Int::mul(const Montgomery_Int& other, secure_vector<word>& ws) const {
  321|  10.4k|   BOTAN_STATE_CHECK(other.m_params == m_params);
  ------------------
  |  |   51|  10.4k|   do {                                                         \
  |  |   52|  10.4k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  10.4k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 10.4k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  10.4k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 10.4k]
  |  |  ------------------
  ------------------
  322|       |
  323|  10.4k|   const size_t p_size = m_params.p_words();
  324|  10.4k|   BOTAN_ASSERT_NOMSG(m_v.size() == p_size && other.m_v.size() == p_size);
  ------------------
  |  |   77|  10.4k|   do {                                                                     \
  |  |   78|  10.4k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  20.8k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:12): [True: 10.4k, False: 0]
  |  |  |  Branch (79:12): [True: 10.4k, False: 0]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  10.4k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 10.4k]
  |  |  ------------------
  ------------------
  325|       |
  326|  10.4k|   if(ws.size() < 2 * p_size) {
  ------------------
  |  Branch (326:7): [True: 0, False: 10.4k]
  ------------------
  327|      0|      ws.resize(2 * p_size);
  328|      0|   }
  329|       |
  330|  10.4k|   secure_vector<word> z(2 * p_size);
  331|       |
  332|  10.4k|   bigint_mul(z.data(), z.size(), m_v.data(), p_size, p_size, other.m_v.data(), p_size, p_size, ws.data(), ws.size());
  333|       |
  334|  10.4k|   bigint_monty_redc_inplace(z.data(), m_params.p()._data(), p_size, m_params.p_dash(), ws.data(), ws.size());
  335|  10.4k|   z.resize(p_size);  // truncate off high zero words
  336|       |
  337|  10.4k|   return Montgomery_Int(m_params, std::move(z));
  338|  10.4k|}
_ZN5Botan14Montgomery_Int6mul_byENSt3__14spanIKmLm18446744073709551615EEERNS1_6vectorImNS_16secure_allocatorImEEEE:
  345|   104k|Montgomery_Int& Montgomery_Int::mul_by(std::span<const word> other, secure_vector<word>& ws) {
  346|   104k|   const size_t p_size = m_params.p_words();
  347|   104k|   BOTAN_ASSERT_NOMSG(m_v.size() == p_size && other.size() == p_size);
  ------------------
  |  |   77|   104k|   do {                                                                     \
  |  |   78|   104k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|   208k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:12): [True: 104k, False: 0]
  |  |  |  Branch (79:12): [True: 104k, False: 0]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|   104k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 104k]
  |  |  ------------------
  ------------------
  348|       |
  349|   104k|   if(ws.size() < 2 * p_size) {
  ------------------
  |  Branch (349:7): [True: 1.48k, False: 102k]
  ------------------
  350|  1.48k|      ws.resize(2 * p_size);
  351|  1.48k|   }
  352|       |
  353|   104k|   auto do_mul_by = [&](std::span<word> z) {
  354|   104k|      bigint_mul(z.data(), z.size(), m_v.data(), p_size, p_size, other.data(), p_size, p_size, ws.data(), ws.size());
  355|       |
  356|   104k|      bigint_monty_redc_inplace(z.data(), m_params.p()._data(), p_size, m_params.p_dash(), ws.data(), ws.size());
  357|       |
  358|   104k|      copy_mem(m_v, z.first(p_size));
  359|   104k|   };
  360|       |
  361|   104k|   if(p_size <= MontgomeryUseStackLimit) {
  ------------------
  |  Branch (361:7): [True: 104k, False: 0]
  ------------------
  362|   104k|      std::array<word, 2 * MontgomeryUseStackLimit> z{};
  363|   104k|      do_mul_by(z);
  364|   104k|   } else {
  365|      0|      secure_vector<word> z(2 * p_size);
  366|      0|      do_mul_by(z);
  367|      0|   }
  368|       |
  369|   104k|   return (*this);
  370|   104k|}
_ZN5Botan14Montgomery_Int19square_this_n_timesERNSt3__16vectorImNS_16secure_allocatorImEEEEm:
  372|   113k|Montgomery_Int& Montgomery_Int::square_this_n_times(secure_vector<word>& ws, size_t n) {
  373|   113k|   const size_t p_size = m_params.p_words();
  374|   113k|   BOTAN_ASSERT_NOMSG(m_v.size() == p_size);
  ------------------
  |  |   77|   113k|   do {                                                                     \
  |  |   78|   113k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|   113k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 113k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|   113k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 113k]
  |  |  ------------------
  ------------------
  375|       |
  376|   113k|   if(ws.size() < 2 * p_size) {
  ------------------
  |  Branch (376:7): [True: 0, False: 113k]
  ------------------
  377|      0|      ws.resize(2 * p_size);
  378|      0|   }
  379|       |
  380|   113k|   auto do_sqr_n = [&](std::span<word> z) {
  381|   113k|      for(size_t i = 0; i != n; ++i) {
  382|   113k|         bigint_sqr(z.data(), 2 * p_size, m_v.data(), p_size, p_size, ws.data(), ws.size());
  383|       |
  384|   113k|         bigint_monty_redc_inplace(z.data(), m_params.p()._data(), p_size, m_params.p_dash(), ws.data(), ws.size());
  385|       |
  386|   113k|         copy_mem(m_v, std::span{z}.first(p_size));
  387|   113k|      }
  388|   113k|   };
  389|       |
  390|   113k|   if(p_size <= MontgomeryUseStackLimit) {
  ------------------
  |  Branch (390:7): [True: 113k, False: 0]
  ------------------
  391|   113k|      std::array<word, 2 * MontgomeryUseStackLimit> z{};
  392|   113k|      do_sqr_n(z);
  393|   113k|   } else {
  394|      0|      secure_vector<word> z(2 * p_size);
  395|      0|      do_sqr_n(z);
  396|      0|   }
  397|       |
  398|   113k|   return (*this);
  399|   113k|}
_ZNK5Botan14Montgomery_Int6squareERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  401|  10.4k|Montgomery_Int Montgomery_Int::square(secure_vector<word>& ws) const {
  402|  10.4k|   auto z = (*this);
  403|  10.4k|   z.square_this_n_times(ws, 1);
  404|  10.4k|   return z;
  405|  10.4k|}
monty.cpp:_ZN5Botan12_GLOBAL__N_114ranges_overlapEPKmmS2_m:
   30|  4.44M|bool ranges_overlap(const word* a, size_t na, const word* b, size_t nb) {
   31|  4.44M|   if(na == 0 || nb == 0) {
  ------------------
  |  Branch (31:7): [True: 740, False: 4.44M]
  |  Branch (31:18): [True: 0, False: 4.44M]
  ------------------
   32|    740|      return false;
   33|    740|   }
   34|  4.44M|   const std::less<const word*> lt;  // NOLINT(modernize-use-transparent-functors)
   35|  4.44M|   return lt(a, b + nb) && lt(b, a + na);
  ------------------
  |  Branch (35:11): [True: 2.90M, False: 1.53M]
  |  Branch (35:28): [True: 0, False: 2.90M]
  ------------------
   36|  4.44M|}
monty.cpp:_ZZN5Botan14Montgomery_Int6mul_byENSt3__14spanIKmLm18446744073709551615EEERNS1_6vectorImNS_16secure_allocatorImEEEEENK3$_0clENS2_ImLm18446744073709551615EEE:
  353|   104k|   auto do_mul_by = [&](std::span<word> z) {
  354|   104k|      bigint_mul(z.data(), z.size(), m_v.data(), p_size, p_size, other.data(), p_size, p_size, ws.data(), ws.size());
  355|       |
  356|   104k|      bigint_monty_redc_inplace(z.data(), m_params.p()._data(), p_size, m_params.p_dash(), ws.data(), ws.size());
  357|       |
  358|   104k|      copy_mem(m_v, z.first(p_size));
  359|   104k|   };
monty.cpp:_ZZN5Botan14Montgomery_Int19square_this_n_timesERNSt3__16vectorImNS_16secure_allocatorImEEEEmENK3$_0clENS1_4spanImLm18446744073709551615EEE:
  380|   113k|   auto do_sqr_n = [&](std::span<word> z) {
  381|   535k|      for(size_t i = 0; i != n; ++i) {
  ------------------
  |  Branch (381:25): [True: 421k, False: 113k]
  ------------------
  382|   421k|         bigint_sqr(z.data(), 2 * p_size, m_v.data(), p_size, p_size, ws.data(), ws.size());
  383|       |
  384|   421k|         bigint_monty_redc_inplace(z.data(), m_params.p()._data(), p_size, m_params.p_dash(), ws.data(), ws.size());
  385|       |
  386|   421k|         copy_mem(m_v, std::span{z}.first(p_size));
  387|   421k|      }
  388|   113k|   };

_ZN5Botan31Montgomery_Exponentiation_StateC2ERKNS_14Montgomery_IntEmb:
   36|  1.48k|      m_params(g._params()), m_window_bits(window_bits == 0 ? 4 : window_bits) {
  ------------------
  |  Branch (36:44): [True: 0, False: 1.48k]
  ------------------
   37|  1.48k|   if(m_window_bits < 1 || m_window_bits > 12) {  // really even 8 is too large ...
  ------------------
  |  Branch (37:7): [True: 0, False: 1.48k]
  |  Branch (37:28): [True: 0, False: 1.48k]
  ------------------
   38|      0|      throw Invalid_Argument("Invalid window bits for Montgomery exponentiation");
   39|      0|   }
   40|       |
   41|  1.48k|   const size_t window_size = (static_cast<size_t>(1) << m_window_bits);
   42|       |
   43|  1.48k|   m_g.reserve(window_size);
   44|       |
   45|  1.48k|   m_g.push_back(Montgomery_Int::one(m_params));
   46|       |
   47|  1.48k|   m_g.push_back(g);
   48|       |
   49|  1.48k|   secure_vector<word> ws(2 * m_params.p_words());
   50|       |
   51|  22.2k|   for(size_t i = 2; i != window_size; ++i) {
  ------------------
  |  Branch (51:22): [True: 20.8k, False: 1.48k]
  ------------------
   52|  20.8k|      if(i % 2 == 0) {
  ------------------
  |  Branch (52:10): [True: 10.4k, False: 10.4k]
  ------------------
   53|  10.4k|         m_g.push_back(m_g[i / 2].square(ws));
   54|  10.4k|      } else {
   55|  10.4k|         m_g.push_back(m_g[1].mul(m_g[i - 1], ws));
   56|  10.4k|      }
   57|  20.8k|   }
   58|       |
   59|  1.48k|   if(const_time) {
  ------------------
  |  Branch (59:7): [True: 1.48k, False: 0]
  ------------------
   60|  1.48k|      CT::poison_range(m_g);
   61|  1.48k|   }
   62|  1.48k|}
_ZNK5Botan31Montgomery_Exponentiation_State14exponentiationERKNS_6BigIntEm:
   91|  1.38k|Montgomery_Int Montgomery_Exponentiation_State::exponentiation(const BigInt& scalar, size_t max_k_bits) const {
   92|  1.38k|   BOTAN_ARG_CHECK(scalar.signum() >= 0, "Invalid scalar for Montgomery exponentiation");
  ------------------
  |  |   35|  1.38k|   do {                                                          \
  |  |   36|  1.38k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  1.38k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 1.38k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.38k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.38k]
  |  |  ------------------
  ------------------
   93|  1.38k|   BOTAN_DEBUG_ASSERT(scalar.bits() <= max_k_bits);
  ------------------
  |  |  130|  1.38k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  1.38k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 1.38k]
  |  |  ------------------
  ------------------
   94|       |   // TODO add a const-time implementation of above assert and use it in release builds
   95|       |
   96|  1.38k|   const size_t exp_nibbles = (max_k_bits + m_window_bits - 1) / m_window_bits;
   97|       |
   98|  1.38k|   if(exp_nibbles == 0) {
  ------------------
  |  Branch (98:7): [True: 0, False: 1.38k]
  ------------------
   99|      0|      return Montgomery_Int::one(m_params);
  100|      0|   }
  101|       |
  102|  1.38k|   secure_vector<word> e_bits(m_params.p_words());
  103|  1.38k|   secure_vector<word> ws(2 * m_params.p_words());
  104|       |
  105|  1.38k|   const_time_lookup(e_bits, m_g, scalar.get_substring(m_window_bits * (exp_nibbles - 1), m_window_bits));
  106|  1.38k|   Montgomery_Int x(m_params, std::span{e_bits});
  107|       |
  108|   104k|   for(size_t i = exp_nibbles - 1; i > 0; --i) {
  ------------------
  |  Branch (108:36): [True: 102k, False: 1.38k]
  ------------------
  109|   102k|      x.square_this_n_times(ws, m_window_bits);
  110|   102k|      const_time_lookup(e_bits, m_g, scalar.get_substring(m_window_bits * (i - 1), m_window_bits));
  111|   102k|      x.mul_by(e_bits, ws);
  112|   102k|   }
  113|       |
  114|  1.38k|   CT::unpoison(x);
  115|  1.38k|   return x;
  116|  1.38k|}
_ZN5Botan16monty_precomputeERKNS_14Montgomery_IntEmb:
  144|  1.48k|                                                                        bool const_time) {
  145|  1.48k|   return std::make_shared<const Montgomery_Exponentiation_State>(g, window_bits, const_time);
  146|  1.48k|}
_ZN5Botan16monty_precomputeERKNS_17Montgomery_ParamsERKNS_6BigIntEmb:
  151|  1.48k|                                                                        bool const_time) {
  152|  1.48k|   BOTAN_ARG_CHECK(g.signum() >= 0 && g < params.p(), "Montgomery exponentiation base integer out of range");
  ------------------
  |  |   35|  1.48k|   do {                                                          \
  |  |   36|  1.48k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  2.97k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 1.48k, False: 0]
  |  |  |  Branch (37:12): [True: 1.48k, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.48k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.48k]
  |  |  ------------------
  ------------------
  153|  1.48k|   const Montgomery_Int monty_g(params, g);
  154|  1.48k|   return monty_precompute(monty_g, window_bits, const_time);
  155|  1.48k|}
_ZN5Botan13monty_executeERKNS_31Montgomery_Exponentiation_StateERKNS_6BigIntEm:
  159|  1.38k|                             size_t max_k_bits) {
  160|  1.38k|   return precomputed_state.exponentiation(k, max_k_bits);
  161|  1.38k|}
monty_exp.cpp:_ZN5Botan12_GLOBAL__N_117const_time_lookupERNSt3__16vectorImNS_16secure_allocatorImEEEERKNS2_INS_14Montgomery_IntENS1_9allocatorIS7_EEEEm:
   66|   104k|void const_time_lookup(secure_vector<word>& output, const std::vector<Montgomery_Int>& g, size_t nibble) {
   67|   104k|   BOTAN_ASSERT_NOMSG(g.size() % 2 == 0);  // actually a power of 2
  ------------------
  |  |   77|   104k|   do {                                                                     \
  |  |   78|   104k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|   104k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 104k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|   104k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 104k]
  |  |  ------------------
  ------------------
   68|       |
   69|   104k|   const size_t words = output.size();
   70|       |
   71|   104k|   clear_mem(output.data(), output.size());
   72|       |
   73|   938k|   for(size_t i = 0; i != g.size(); i += 2) {
  ------------------
  |  Branch (73:22): [True: 833k, False: 104k]
  ------------------
   74|   833k|      const secure_vector<word>& vec_0 = g[i].repr();
   75|   833k|      const secure_vector<word>& vec_1 = g[i + 1].repr();
   76|       |
   77|   833k|      BOTAN_ASSERT_NOMSG(vec_0.size() >= words && vec_1.size() >= words);
  ------------------
  |  |   77|   833k|   do {                                                                     \
  |  |   78|   833k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  1.66M|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:12): [True: 833k, False: 0]
  |  |  |  Branch (79:12): [True: 833k, False: 0]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|   833k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 833k]
  |  |  ------------------
  ------------------
   78|       |
   79|   833k|      const auto mask_0 = CT::Mask<word>::is_equal(nibble, i);
   80|   833k|      const auto mask_1 = CT::Mask<word>::is_equal(nibble, i + 1);
   81|       |
   82|  5.70M|      for(size_t w = 0; w != words; ++w) {
  ------------------
  |  Branch (82:25): [True: 4.87M, False: 833k]
  ------------------
   83|  4.87M|         output[w] |= mask_0.if_set_return(vec_0[w]);
   84|  4.87M|         output[w] |= mask_1.if_set_return(vec_1[w]);
   85|  4.87M|      }
   86|   833k|   }
   87|   104k|}

_ZN5Botan6jacobiENS_6BigIntES0_:
  119|  3.18k|int32_t jacobi(BigInt a, BigInt n) {
  120|  3.18k|   BOTAN_ARG_CHECK(n.is_odd() && n >= 3, "Argument n must be an odd integer >= 3");
  ------------------
  |  |   35|  3.18k|   do {                                                          \
  |  |   36|  3.18k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  6.37k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 3.18k, False: 0]
  |  |  |  Branch (37:12): [True: 3.18k, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  3.18k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 3.18k]
  |  |  ------------------
  ------------------
  121|       |
  122|  3.18k|   if(a < 0 || a >= n) {
  ------------------
  |  Branch (122:7): [True: 1.46k, False: 1.71k]
  |  Branch (122:16): [True: 0, False: 1.71k]
  ------------------
  123|  1.46k|      a %= n;
  124|  1.46k|   }
  125|       |
  126|  3.18k|   if(a == 0) {
  ------------------
  |  Branch (126:7): [True: 0, False: 3.18k]
  ------------------
  127|      0|      return 0;
  128|      0|   }
  129|  3.18k|   if(a == 1) {
  ------------------
  |  Branch (129:7): [True: 0, False: 3.18k]
  ------------------
  130|      0|      return 1;
  131|      0|   }
  132|       |
  133|  3.18k|   int32_t s = 1;
  134|       |
  135|  9.40k|   for(;;) {
  136|  9.40k|      const size_t e = low_zero_bits(a);
  137|  9.40k|      a >>= e;
  138|  9.40k|      const word n_mod_8 = n.word_at(0) % 8;
  139|  9.40k|      const word n_mod_4 = n_mod_8 % 4;
  140|       |
  141|  9.40k|      if(e % 2 == 1 && (n_mod_8 == 3 || n_mod_8 == 5)) {
  ------------------
  |  Branch (141:10): [True: 2.84k, False: 6.55k]
  |  Branch (141:25): [True: 568, False: 2.28k]
  |  Branch (141:41): [True: 471, False: 1.81k]
  ------------------
  142|  1.03k|         s = -s;
  143|  1.03k|      }
  144|       |
  145|  9.40k|      if(n_mod_4 == 3 && a % 4 == 3) {
  ------------------
  |  Branch (145:10): [True: 4.49k, False: 4.90k]
  |  Branch (145:26): [True: 1.88k, False: 2.61k]
  ------------------
  146|  1.88k|         s = -s;
  147|  1.88k|      }
  148|       |
  149|       |      /*
  150|       |      * The HAC presentation of the algorithm uses recursion, which is not
  151|       |      * desirable or necessary.
  152|       |      *
  153|       |      * Instead we loop accumulating the product of the various jacobi()
  154|       |      * subcomputations into s, until we reach algorithm termination, which
  155|       |      * occurs in one of two ways.
  156|       |      *
  157|       |      * If a == 1 then the recursion has completed; we can return the value of s.
  158|       |      *
  159|       |      * Otherwise, after swapping and reducing, check for a == 0 [this value is
  160|       |      * called `n1` in HAC's presentation]. This would imply that jacobi(n1,a1)
  161|       |      * would have the value 0, due to Line 1 in HAC 2.149, in which case the
  162|       |      * entire product is zero, and we can immediately return that result.
  163|       |      */
  164|       |
  165|  9.40k|      if(a == 1) {
  ------------------
  |  Branch (165:10): [True: 3.18k, False: 6.21k]
  ------------------
  166|  3.18k|         return s;
  167|  3.18k|      }
  168|       |
  169|  6.21k|      std::swap(a, n);
  170|       |
  171|  6.21k|      BOTAN_ASSERT_NOMSG(n.is_odd());
  ------------------
  |  |   77|  6.21k|   do {                                                                     \
  |  |   78|  6.21k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  6.21k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 6.21k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  6.21k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 6.21k]
  |  |  ------------------
  ------------------
  172|       |
  173|  6.21k|      a %= n;
  174|       |
  175|  6.21k|      if(a == 0) {
  ------------------
  |  Branch (175:10): [True: 0, False: 6.21k]
  ------------------
  176|      0|         return 0;
  177|      0|      }
  178|  6.21k|   }
  179|  3.18k|}
_ZN5Botan13low_zero_bitsERKNS_6BigIntE:
  194|  10.7k|size_t low_zero_bits(const BigInt& n) {
  195|  10.7k|   size_t low_zero = 0;
  196|       |
  197|  10.7k|   auto seen_nonempty_word = CT::Mask<word>::cleared();
  198|       |
  199|   105k|   for(size_t i = 0; i != n.size(); ++i) {
  ------------------
  |  Branch (199:22): [True: 94.4k, False: 10.7k]
  ------------------
  200|  94.4k|      const word x = n.word_at(i);
  201|       |
  202|       |      // ctz(0) will return sizeof(word)
  203|  94.4k|      const size_t tz_x = ctz(x);
  204|       |
  205|       |      // if x > 0 we want to count tz_x in total but not any
  206|       |      // further words, so set the mask after the addition
  207|  94.4k|      low_zero += seen_nonempty_word.if_not_set_return(tz_x);
  208|       |
  209|  94.4k|      seen_nonempty_word |= CT::Mask<word>::expand(x);
  210|  94.4k|   }
  211|       |
  212|       |   // if we saw no words with x > 0 then n == 0 and the value we have
  213|       |   // computed is meaningless. Instead return BigInt::zero() in that case.
  214|  10.7k|   return static_cast<size_t>(seen_nonempty_word.if_set_return(low_zero));
  215|  10.7k|}
_ZN5Botan17is_perfect_squareERKNS_6BigIntE:
  347|    125|BigInt is_perfect_square(const BigInt& C) {
  348|    125|   if(C < 1) {
  ------------------
  |  Branch (348:7): [True: 0, False: 125]
  ------------------
  349|      0|      throw Invalid_Argument("is_perfect_square requires C >= 1");
  350|      0|   }
  351|    125|   if(C == 1) {
  ------------------
  |  Branch (351:7): [True: 0, False: 125]
  ------------------
  352|      0|      return BigInt::one();
  353|      0|   }
  354|       |
  355|    125|   const size_t n = C.bits();
  356|    125|   const size_t m = (n + 1) / 2;
  357|    125|   const BigInt B = C + BigInt::power_of_2(m);
  358|       |
  359|    125|   BigInt X = BigInt::power_of_2(m) - 1;
  360|    125|   BigInt X2 = (X * X);
  361|       |
  362|    542|   for(;;) {
  363|    542|      X = (X2 + C) / (2 * X);
  364|    542|      X2 = (X * X);
  365|       |
  366|    542|      if(X2 < B) {
  ------------------
  |  Branch (366:10): [True: 125, False: 417]
  ------------------
  367|    125|         break;
  368|    125|      }
  369|    542|   }
  370|       |
  371|    125|   if(X2 == C) {
  ------------------
  |  Branch (371:7): [True: 0, False: 125]
  ------------------
  372|      0|      return X;
  373|    125|   } else {
  374|    125|      return BigInt::zero();
  375|    125|   }
  376|    125|}

_ZN5Botan23is_lucas_probable_primeERKNS_6BigIntERKNS_17Barrett_ReductionE:
   18|    846|bool is_lucas_probable_prime(const BigInt& C, const Barrett_Reduction& mod_C) {
   19|    846|   BOTAN_ARG_CHECK(C.signum() >= 0, "Argument must be non-negative");
  ------------------
  |  |   35|    846|   do {                                                          \
  |  |   36|    846|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    846|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 846]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    846|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 846]
  |  |  ------------------
  ------------------
   20|       |
   21|    846|   if(C == 2 || C == 3 || C == 5 || C == 7 || C == 11 || C == 13) {
  ------------------
  |  Branch (21:7): [True: 0, False: 846]
  |  Branch (21:17): [True: 1, False: 845]
  |  Branch (21:27): [True: 1, False: 844]
  |  Branch (21:37): [True: 1, False: 843]
  |  Branch (21:47): [True: 1, False: 842]
  |  Branch (21:58): [True: 2, False: 840]
  ------------------
   22|      6|      return true;
   23|      6|   }
   24|       |
   25|    840|   if(C <= 1 || C.is_even()) {
  ------------------
  |  Branch (25:7): [True: 0, False: 840]
  |  Branch (25:17): [True: 0, False: 840]
  ------------------
   26|      0|      return false;
   27|      0|   }
   28|       |
   29|    840|   BigInt D = BigInt::from_word(5);
   30|       |
   31|  3.18k|   for(;;) {
   32|  3.18k|      const int32_t j = jacobi(D, C);
   33|  3.18k|      if(j == 0) {
  ------------------
  |  Branch (33:10): [True: 0, False: 3.18k]
  ------------------
   34|      0|         return false;
   35|      0|      }
   36|       |
   37|  3.18k|      if(j == -1) {
  ------------------
  |  Branch (37:10): [True: 840, False: 2.34k]
  ------------------
   38|    840|         break;
   39|    840|      }
   40|       |
   41|       |      // Check 5, -7, 9, -11, 13, -15, 17, ...
   42|  2.34k|      if(D.signum() < 0) {
  ------------------
  |  Branch (42:10): [True: 876, False: 1.46k]
  ------------------
   43|    876|         D.flip_sign();
   44|    876|         D += 2;
   45|  1.46k|      } else {
   46|  1.46k|         D += 2;
   47|  1.46k|         D.flip_sign();
   48|  1.46k|      }
   49|       |
   50|  2.34k|      if(D == 17 && is_perfect_square(C).signum() != 0) {
  ------------------
  |  Branch (50:10): [True: 125, False: 2.22k]
  |  Branch (50:10): [True: 0, False: 2.34k]
  |  Branch (50:21): [True: 0, False: 125]
  ------------------
   51|      0|         return false;
   52|      0|      }
   53|  2.34k|   }
   54|       |
   55|    840|   if(D.signum() < 0) {
  ------------------
  |  Branch (55:7): [True: 593, False: 247]
  ------------------
   56|    593|      D += C;
   57|    593|   }
   58|       |
   59|    840|   const BigInt K = C + 1;
   60|    840|   const size_t K_bits = K.bits() - 1;
   61|       |
   62|    840|   BigInt U = BigInt::one();
   63|    840|   BigInt V = BigInt::one();
   64|       |
   65|    840|   BigInt Ut;
   66|    840|   BigInt Vt;
   67|    840|   BigInt U2;
   68|    840|   BigInt V2;
   69|       |
   70|   269k|   for(size_t i = 0; i != K_bits; ++i) {
  ------------------
  |  Branch (70:22): [True: 268k, False: 840]
  ------------------
   71|   268k|      const bool k_bit = K.get_bit(K_bits - 1 - i);
   72|       |
   73|   268k|      Ut = mod_C.multiply(U, V);
   74|       |
   75|   268k|      Vt = mod_C.reduce(mod_C.square(V) + mod_C.multiply(D, mod_C.square(U)));
   76|   268k|      Vt.ct_cond_add(Vt.is_odd(), C);
   77|   268k|      Vt >>= 1;
   78|   268k|      Vt = mod_C.reduce(Vt);
   79|       |
   80|   268k|      U = Ut;
   81|   268k|      V = Vt;
   82|       |
   83|   268k|      U2 = mod_C.reduce(Ut + Vt);
   84|   268k|      U2.ct_cond_add(U2.is_odd(), C);
   85|   268k|      U2 >>= 1;
   86|       |
   87|   268k|      V2 = mod_C.reduce(Vt + mod_C.multiply(Ut, D));
   88|   268k|      V2.ct_cond_add(V2.is_odd(), C);
   89|   268k|      V2 >>= 1;
   90|       |
   91|   268k|      U.ct_cond_assign(k_bit, U2);
   92|   268k|      V.ct_cond_assign(k_bit, V2);
   93|   268k|   }
   94|       |
   95|    840|   return (U == 0);
   96|    840|}
_ZN5Botan28is_bailie_psw_probable_primeERKNS_6BigIntERKNS_17Barrett_ReductionE:
   98|  1.51k|bool is_bailie_psw_probable_prime(const BigInt& n, const Barrett_Reduction& mod_n) {
   99|  1.51k|   if(n == 2) {
  ------------------
  |  Branch (99:7): [True: 1, False: 1.50k]
  ------------------
  100|      1|      return true;
  101|  1.50k|   } else if(n <= 1 || n.is_even()) {
  ------------------
  |  Branch (101:14): [True: 1, False: 1.50k]
  |  Branch (101:24): [True: 127, False: 1.38k]
  ------------------
  102|    128|      return false;
  103|    128|   }
  104|       |
  105|  1.38k|   const Montgomery_Params monty_n(n, mod_n);
  106|  1.38k|   const auto base = BigInt::from_word(2);
  107|  1.38k|   return passes_miller_rabin_test(n, mod_n, monty_n, base) && is_lucas_probable_prime(n, mod_n);
  ------------------
  |  Branch (107:11): [True: 846, False: 535]
  |  Branch (107:64): [True: 844, False: 2]
  ------------------
  108|  1.51k|}
_ZN5Botan24passes_miller_rabin_testERKNS_6BigIntERKNS_17Barrett_ReductionERKNS_17Montgomery_ParamsES2_:
  113|  1.38k|                              const BigInt& a) {
  114|  1.38k|   if(n < 3 || n.is_even()) {
  ------------------
  |  Branch (114:7): [True: 0, False: 1.38k]
  |  Branch (114:16): [True: 0, False: 1.38k]
  ------------------
  115|      0|      return false;
  116|      0|   }
  117|       |
  118|  1.38k|   BOTAN_ASSERT_NOMSG(n > 1);
  ------------------
  |  |   77|  1.38k|   do {                                                                     \
  |  |   78|  1.38k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  1.38k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 1.38k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  1.38k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 1.38k]
  |  |  ------------------
  ------------------
  119|       |
  120|  1.38k|   const BigInt n_minus_1 = n - 1;
  121|       |   /*
  122|       |   * This unpoison is not ideal but realistically there is no way to
  123|       |   * hide the number of loop iterations (below). The main user of
  124|       |   * secret primes is RSA and we always generate RSA primes such that
  125|       |   * p == 3 (mod 4), which means s is always 1.
  126|       |   */
  127|  1.38k|   const size_t s = CT::driveby_unpoison(low_zero_bits(n_minus_1));
  128|  1.38k|   const BigInt nm1_s = n_minus_1 >> s;
  129|  1.38k|   const size_t n_bits = n.bits();
  130|       |
  131|  1.38k|   const size_t powm_window = 4;
  132|       |
  133|  1.38k|   auto powm_a_n = monty_precompute(monty_n, a, powm_window);
  134|       |
  135|  1.38k|   BigInt y = monty_execute(*powm_a_n, nm1_s, n_bits).value();
  136|       |
  137|  1.38k|   if(y == 1 || y == n_minus_1) {
  ------------------
  |  Branch (137:7): [True: 376, False: 1.00k]
  |  Branch (137:17): [True: 59, False: 946]
  ------------------
  138|    435|      return true;
  139|    435|   }
  140|       |
  141|  21.9k|   for(size_t i = 1; i != s; ++i) {
  ------------------
  |  Branch (141:22): [True: 21.4k, False: 534]
  ------------------
  142|  21.4k|      y = mod_n.square(y);
  143|       |
  144|  21.4k|      if(y == 1) {  // found a non-trivial square root
  ------------------
  |  Branch (144:10): [True: 1, False: 21.4k]
  ------------------
  145|      1|         return false;
  146|      1|      }
  147|       |
  148|       |      /*
  149|       |      -1 is the trivial square root of unity, so ``a`` is not a
  150|       |      witness for this number - give up
  151|       |      */
  152|  21.4k|      if(y == n_minus_1) {
  ------------------
  |  Branch (152:10): [True: 411, False: 21.0k]
  ------------------
  153|    411|         return true;
  154|    411|      }
  155|  21.4k|   }
  156|       |
  157|    534|   return false;
  158|    946|}

_ZN5Botan6PCurve15PrimeOrderCurve6Scalar8_zeroizeEv:
   16|  2.02k|void PrimeOrderCurve::Scalar::_zeroize() {
   17|  2.02k|   secure_zeroize_buffer(m_value.data(), m_value.size() * sizeof(word));
   18|  2.02k|}
_ZN5Botan6PCurve15PrimeOrderCurve11from_paramsERKNS_6BigIntES4_S4_S4_S4_S4_:
   22|  1.13k|   const BigInt& p, const BigInt& a, const BigInt& b, const BigInt& base_x, const BigInt& base_y, const BigInt& order) {
   23|  1.13k|#if defined(BOTAN_HAS_PCURVES_GENERIC)
   24|  1.13k|   return PCurveInstance::from_params(p, a, b, base_x, base_y, order);
   25|      0|#endif
   26|       |
   27|      0|   BOTAN_UNUSED(p, a, b, base_x, base_y, order);
  ------------------
  |  |  144|      0|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   28|      0|   return {};
   29|  1.13k|}
_ZN5Botan6PCurve15PrimeOrderCurve15for_named_curveENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   32|  2.79k|std::shared_ptr<const PrimeOrderCurve> PrimeOrderCurve::for_named_curve(std::string_view name) {
   33|  2.79k|#if defined(BOTAN_HAS_PCURVES_SECP256R1)
   34|  2.79k|   if(name == "secp256r1") {
  ------------------
  |  Branch (34:7): [True: 131, False: 2.66k]
  ------------------
   35|    131|      return PCurveInstance::secp256r1();
   36|    131|   }
   37|  2.66k|#endif
   38|       |
   39|  2.66k|#if defined(BOTAN_HAS_PCURVES_SECP384R1)
   40|  2.66k|   if(name == "secp384r1") {
  ------------------
  |  Branch (40:7): [True: 222, False: 2.44k]
  ------------------
   41|    222|      return PCurveInstance::secp384r1();
   42|    222|   }
   43|  2.44k|#endif
   44|       |
   45|  2.44k|#if defined(BOTAN_HAS_PCURVES_SECP521R1)
   46|  2.44k|   if(name == "secp521r1") {
  ------------------
  |  Branch (46:7): [True: 344, False: 2.09k]
  ------------------
   47|    344|      return PCurveInstance::secp521r1();
   48|    344|   }
   49|  2.09k|#endif
   50|       |
   51|  2.09k|#if defined(BOTAN_HAS_PCURVES_BRAINPOOL256R1)
   52|  2.09k|   if(name == "brainpool256r1") {
  ------------------
  |  Branch (52:7): [True: 132, False: 1.96k]
  ------------------
   53|    132|      return PCurveInstance::brainpool256r1();
   54|    132|   }
   55|  1.96k|#endif
   56|       |
   57|  1.96k|#if defined(BOTAN_HAS_PCURVES_BRAINPOOL384R1)
   58|  1.96k|   if(name == "brainpool384r1") {
  ------------------
  |  Branch (58:7): [True: 186, False: 1.77k]
  ------------------
   59|    186|      return PCurveInstance::brainpool384r1();
   60|    186|   }
   61|  1.77k|#endif
   62|       |
   63|  1.77k|#if defined(BOTAN_HAS_PCURVES_BRAINPOOL512R1)
   64|  1.77k|   if(name == "brainpool512r1") {
  ------------------
  |  Branch (64:7): [True: 150, False: 1.62k]
  ------------------
   65|    150|      return PCurveInstance::brainpool512r1();
   66|    150|   }
   67|  1.62k|#endif
   68|       |
   69|  1.62k|#if defined(BOTAN_HAS_PCURVES_FRP256V1)
   70|  1.62k|   if(name == "frp256v1") {
  ------------------
  |  Branch (70:7): [True: 0, False: 1.62k]
  ------------------
   71|      0|      return PCurveInstance::frp256v1();
   72|      0|   }
   73|  1.62k|#endif
   74|       |
   75|  1.62k|#if defined(BOTAN_HAS_PCURVES_SECP192R1)
   76|  1.62k|   if(name == "secp192r1") {
  ------------------
  |  Branch (76:7): [True: 0, False: 1.62k]
  ------------------
   77|      0|      return PCurveInstance::secp192r1();
   78|      0|   }
   79|  1.62k|#endif
   80|       |
   81|  1.62k|#if defined(BOTAN_HAS_PCURVES_SECP224R1)
   82|  1.62k|   if(name == "secp224r1") {
  ------------------
  |  Branch (82:7): [True: 336, False: 1.29k]
  ------------------
   83|    336|      return PCurveInstance::secp224r1();
   84|    336|   }
   85|  1.29k|#endif
   86|       |
   87|  1.29k|#if defined(BOTAN_HAS_PCURVES_SECP256K1)
   88|  1.29k|   if(name == "secp256k1") {
  ------------------
  |  Branch (88:7): [True: 230, False: 1.06k]
  ------------------
   89|    230|      return PCurveInstance::secp256k1();
   90|    230|   }
   91|  1.06k|#endif
   92|       |
   93|  1.06k|#if defined(BOTAN_HAS_PCURVES_SM2P256V1)
   94|  1.06k|   if(name == "sm2p256v1") {
  ------------------
  |  Branch (94:7): [True: 0, False: 1.06k]
  ------------------
   95|      0|      return PCurveInstance::sm2p256v1();
   96|      0|   }
   97|  1.06k|#endif
   98|       |
   99|  1.06k|#if defined(BOTAN_HAS_PCURVES_NUMSP512D1)
  100|  1.06k|   if(name == "numsp512d1") {
  ------------------
  |  Branch (100:7): [True: 0, False: 1.06k]
  ------------------
  101|      0|      return PCurveInstance::numsp512d1();
  102|      0|   }
  103|  1.06k|#endif
  104|       |
  105|  1.06k|   BOTAN_UNUSED(name);
  ------------------
  |  |  144|  1.06k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  106|  1.06k|   return {};
  107|  1.06k|}

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

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

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

_ZN5Botan6PCurve22GenericPrimeOrderCurveC2ERKNS_6BigIntES4_S4_S4_S4_S4_:
 1439|    460|      m_params(std::make_unique<GenericCurveParams>(p, a, b, base_x, base_y, order)) {}
_ZN5Botan6PCurve22GenericPrimeOrderCurve20_precompute_base_mulEv:
 1441|    460|void GenericPrimeOrderCurve::_precompute_base_mul() {
 1442|    460|   BOTAN_STATE_CHECK(m_basemul == nullptr);
  ------------------
  |  |   51|    460|   do {                                                         \
  |  |   52|    460|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    460|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 460]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    460|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 460]
  |  |  ------------------
  ------------------
 1443|    460|   m_basemul = std::make_unique<GenericBaseMulTable>(from_stash(generator()));
 1444|    460|}
_ZNK5Botan6PCurve22GenericPrimeOrderCurve10order_bitsEv:
 1446|    460|size_t GenericPrimeOrderCurve::order_bits() const {
 1447|    460|   return _params().order_bits();
 1448|    460|}
_ZNK5Botan6PCurve22GenericPrimeOrderCurve19field_element_bytesEv:
 1454|    666|size_t GenericPrimeOrderCurve::field_element_bytes() const {
 1455|    666|   return _params().field_bytes();
 1456|    666|}
_ZNK5Botan6PCurve22GenericPrimeOrderCurve8mul_by_gERKNS0_15PrimeOrderCurve6ScalarERNS_21RandomNumberGeneratorE:
 1459|    332|                                                                  RandomNumberGenerator& rng) const {
 1460|    332|   BOTAN_STATE_CHECK(m_basemul != nullptr);
  ------------------
  |  |   51|    332|   do {                                                         \
  |  |   52|    332|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    332|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 332]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    332|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 332]
  |  |  ------------------
  ------------------
 1461|    332|   return stash(m_basemul->mul(from_stash(scalar), rng));
 1462|    332|}
_ZNK5Botan6PCurve22GenericPrimeOrderCurve9generatorEv:
 1553|    460|PrimeOrderCurve::AffinePoint GenericPrimeOrderCurve::generator() const {
 1554|    460|   return PrimeOrderCurve::AffinePoint::_create(shared_from_this(), _params().base_x(), _params().base_y());
 1555|    460|}
_ZNK5Botan6PCurve22GenericPrimeOrderCurve15point_to_affineERKNS0_15PrimeOrderCurve15ProjectivePointE:
 1561|    332|PrimeOrderCurve::AffinePoint GenericPrimeOrderCurve::point_to_affine(const ProjectivePoint& pt) const {
 1562|    332|   auto affine = to_affine<GenericCurve>(from_stash(pt));
 1563|       |
 1564|    332|   const auto y2 = affine.y().square();
 1565|    332|   const auto x3_ax_b = GenericCurve::AffinePoint::x3_ax_b(affine.x());
 1566|    332|   const auto valid_point = affine.is_identity() || (y2 == x3_ax_b);
 1567|       |
 1568|    332|   BOTAN_ASSERT(valid_point.as_bool(), "Computed point is on the curve");
  ------------------
  |  |   64|    332|   do {                                                                                 \
  |  |   65|    332|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|    332|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 332]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|    332|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 332]
  |  |  ------------------
  ------------------
 1569|       |
 1570|    332|   return stash(affine);
 1571|    332|}
_ZNK5Botan6PCurve22GenericPrimeOrderCurve24affine_point_is_identityERKNS0_15PrimeOrderCurve11AffinePointE:
 1581|    333|bool GenericPrimeOrderCurve::affine_point_is_identity(const AffinePoint& pt) const {
 1582|    333|   return from_stash(pt).is_identity().as_bool();
 1583|    333|}
_ZNK5Botan6PCurve22GenericPrimeOrderCurve15serialize_pointENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve11AffinePointE:
 1585|    333|void GenericPrimeOrderCurve::serialize_point(std::span<uint8_t> bytes, const AffinePoint& pt) const {
 1586|    333|   from_stash(pt).serialize_to(bytes);
 1587|    333|}
_ZNK5Botan6PCurve22GenericPrimeOrderCurve16serialize_scalarENSt3__14spanIhLm18446744073709551615EEERKNS0_15PrimeOrderCurve6ScalarE:
 1589|    439|void GenericPrimeOrderCurve::serialize_scalar(std::span<uint8_t> bytes, const Scalar& scalar) const {
 1590|    439|   BOTAN_ARG_CHECK(bytes.size() == _params().order_bytes(), "Invalid length to serialize_scalar");
  ------------------
  |  |   35|    439|   do {                                                          \
  |  |   36|    439|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    439|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 439]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    439|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 439]
  |  |  ------------------
  ------------------
 1591|    439|   from_stash(scalar).serialize_to(bytes);
 1592|    439|}
_ZNK5Botan6PCurve22GenericPrimeOrderCurve18deserialize_scalarENSt3__14spanIKhLm18446744073709551615EEE:
 1595|    446|   std::span<const uint8_t> bytes) const {
 1596|    446|   if(auto s = GenericScalar::deserialize(this, bytes)) {
  ------------------
  |  Branch (1596:12): [True: 442, False: 4]
  ------------------
 1597|    442|      if(s->is_nonzero().as_bool()) {
  ------------------
  |  Branch (1597:10): [True: 439, False: 3]
  ------------------
 1598|    439|         return stash(s.value());
 1599|    439|      }
 1600|    442|   }
 1601|       |
 1602|      7|   return {};
 1603|    446|}
_ZNK5Botan6PCurve22GenericPrimeOrderCurve30deserialize_point_uncompressedENSt3__14spanIKhLm18446744073709551615EEE:
 1615|     90|   std::span<const uint8_t> bytes) const {
 1616|     90|   if(auto pt = GenericAffinePoint::deserialize_uncompressed(this, bytes)) {
  ------------------
  |  Branch (1616:12): [True: 1, False: 89]
  ------------------
 1617|      1|      return stash(pt.value());
 1618|     89|   } else {
 1619|     89|      return {};
 1620|     89|   }
 1621|     90|}
_ZNK5Botan6PCurve22GenericPrimeOrderCurve14scalar_is_zeroERKNS0_15PrimeOrderCurve6ScalarE:
 1660|    439|bool GenericPrimeOrderCurve::scalar_is_zero(const Scalar& s) const {
 1661|    439|   return from_stash(s).is_zero().as_bool();
 1662|    439|}
_ZNK5Botan6PCurve22GenericPrimeOrderCurve5stashERKNS0_13GenericScalarE:
 1676|    439|PrimeOrderCurve::Scalar GenericPrimeOrderCurve::stash(const GenericScalar& s) const {
 1677|    439|   return Scalar::_create(shared_from_this(), s.stash_value());
 1678|    439|}
_ZNK5Botan6PCurve22GenericPrimeOrderCurve10from_stashERKNS0_15PrimeOrderCurve6ScalarE:
 1680|  1.21k|GenericScalar GenericPrimeOrderCurve::from_stash(const PrimeOrderCurve::Scalar& s) const {
 1681|  1.21k|   BOTAN_ARG_CHECK(s._curve().get() == this, "Curve mismatch");
  ------------------
  |  |   35|  1.21k|   do {                                                          \
  |  |   36|  1.21k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  1.21k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 1.21k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.21k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.21k]
  |  |  ------------------
  ------------------
 1682|  1.21k|   return GenericScalar(this, s._value());
 1683|  1.21k|}
_ZNK5Botan6PCurve22GenericPrimeOrderCurve5stashERKNS0_18GenericAffinePointE:
 1685|    333|PrimeOrderCurve::AffinePoint GenericPrimeOrderCurve::stash(const GenericAffinePoint& pt) const {
 1686|    333|   auto x_w = pt.x().stash_value();
 1687|    333|   auto y_w = pt.y().stash_value();
 1688|    333|   return AffinePoint::_create(shared_from_this(), x_w, y_w);
 1689|    333|}
_ZNK5Botan6PCurve22GenericPrimeOrderCurve10from_stashERKNS0_15PrimeOrderCurve11AffinePointE:
 1691|  1.12k|GenericAffinePoint GenericPrimeOrderCurve::from_stash(const PrimeOrderCurve::AffinePoint& pt) const {
 1692|  1.12k|   BOTAN_ARG_CHECK(pt._curve().get() == this, "Curve mismatch");
  ------------------
  |  |   35|  1.12k|   do {                                                          \
  |  |   36|  1.12k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  1.12k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 1.12k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.12k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.12k]
  |  |  ------------------
  ------------------
 1693|  1.12k|   auto x = GenericField(this, pt._x());
 1694|  1.12k|   auto y = GenericField(this, pt._y());
 1695|  1.12k|   return GenericAffinePoint(x, y);
 1696|  1.12k|}
_ZNK5Botan6PCurve22GenericPrimeOrderCurve5stashERKNS0_22GenericProjectivePointE:
 1698|    332|PrimeOrderCurve::ProjectivePoint GenericPrimeOrderCurve::stash(const GenericProjectivePoint& pt) const {
 1699|    332|   auto x_w = pt.x().stash_value();
 1700|    332|   auto y_w = pt.y().stash_value();
 1701|    332|   auto z_w = pt.z().stash_value();
 1702|    332|   return ProjectivePoint::_create(shared_from_this(), x_w, y_w, z_w);
 1703|    332|}
_ZNK5Botan6PCurve22GenericPrimeOrderCurve10from_stashERKNS0_15PrimeOrderCurve15ProjectivePointE:
 1705|    332|GenericProjectivePoint GenericPrimeOrderCurve::from_stash(const PrimeOrderCurve::ProjectivePoint& pt) const {
 1706|    332|   BOTAN_ARG_CHECK(pt._curve().get() == this, "Curve mismatch");
  ------------------
  |  |   35|    332|   do {                                                          \
  |  |   36|    332|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    332|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 332]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    332|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 332]
  |  |  ------------------
  ------------------
 1707|    332|   auto x = GenericField(this, pt._x());
 1708|    332|   auto y = GenericField(this, pt._y());
 1709|    332|   auto z = GenericField(this, pt._z());
 1710|    332|   return GenericProjectivePoint(x, y, z);
 1711|    332|}
_ZN5Botan6PCurve14PCurveInstance11from_paramsERKNS_6BigIntES4_S4_S4_S4_S4_:
 1726|  1.13k|   const BigInt& p, const BigInt& a, const BigInt& b, const BigInt& base_x, const BigInt& base_y, const BigInt& order) {
 1727|       |   // We don't check that p and order are prime here on the assumption this has
 1728|       |   // been checked already by EC_Group
 1729|       |
 1730|  1.13k|   BOTAN_ARG_CHECK(a >= 0 && a < p, "a is invalid");
  ------------------
  |  |   35|  1.13k|   do {                                                          \
  |  |   36|  1.13k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  2.26k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 1.13k, False: 0]
  |  |  |  Branch (37:12): [True: 1.13k, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.13k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.13k]
  |  |  ------------------
  ------------------
 1731|  1.13k|   BOTAN_ARG_CHECK(b > 0 && b < p, "b is invalid");
  ------------------
  |  |   35|  1.13k|   do {                                                          \
  |  |   36|  1.13k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  2.26k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 1.13k, False: 0]
  |  |  |  Branch (37:12): [True: 1.13k, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.13k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.13k]
  |  |  ------------------
  ------------------
 1732|  1.13k|   BOTAN_ARG_CHECK(base_x >= 0 && base_x < p, "base_x is invalid");
  ------------------
  |  |   35|  1.13k|   do {                                                          \
  |  |   36|  1.13k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  2.26k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 1.13k, False: 0]
  |  |  |  Branch (37:12): [True: 1.13k, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.13k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.13k]
  |  |  ------------------
  ------------------
 1733|  1.13k|   BOTAN_ARG_CHECK(base_y >= 0 && base_y < p, "base_y is invalid");
  ------------------
  |  |   35|  1.13k|   do {                                                          \
  |  |   36|  1.13k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  2.26k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 1.13k, False: 0]
  |  |  |  Branch (37:12): [True: 1.13k, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.13k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.13k]
  |  |  ------------------
  ------------------
 1734|       |
 1735|  1.13k|   const size_t p_bits = p.bits();
 1736|       |
 1737|       |   // Same size restrictions as EC_Group however here we do not require
 1738|       |   // exactly the primes for the 521 or 239 bit exceptions; this code
 1739|       |   // should work fine with any such prime and we are relying on the higher
 1740|       |   // levels to prevent creating such a group in the first place
 1741|       |   //
 1742|       |   // TODO(Botan4) increase the 128 here to 192 when the corresponding EC_Group constructor is changed
 1743|       |   //
 1744|  1.13k|   if(p_bits != 521 && p_bits != 239 && (p_bits < 128 || p_bits > 512 || p_bits % 32 != 0)) {
  ------------------
  |  Branch (1744:7): [True: 1.09k, False: 39]
  |  Branch (1744:24): [True: 1.09k, False: 0]
  |  Branch (1744:42): [True: 0, False: 1.09k]
  |  Branch (1744:58): [True: 0, False: 1.09k]
  |  Branch (1744:74): [True: 0, False: 1.09k]
  ------------------
 1745|      0|      return {};
 1746|      0|   }
 1747|       |
 1748|       |   // We don't want to deal with Shanks-Tonelli in the generic case
 1749|  1.13k|   if(p % 4 != 3) {
  ------------------
  |  Branch (1749:7): [True: 611, False: 521]
  ------------------
 1750|    611|      return {};
 1751|    611|   }
 1752|       |
 1753|       |   // The bit length of the field and order being the same simplifies things
 1754|    521|   if(p_bits != order.bits()) {
  ------------------
  |  Branch (1754:7): [True: 61, False: 460]
  ------------------
 1755|     61|      return {};
 1756|     61|   }
 1757|       |
 1758|       |   // Check that the (x,y) generator point is on the curve
 1759|    460|   auto mod_p = Barrett_Reduction::for_public_modulus(p);
 1760|    460|   const BigInt y2 = mod_p.square(base_y);
 1761|    460|   const BigInt x3_ax_b = mod_p.reduce(mod_p.cube(base_x) + mod_p.multiply(a, base_x) + b);
 1762|    460|   if(y2 != x3_ax_b) {
  ------------------
  |  Branch (1762:7): [True: 0, False: 460]
  ------------------
 1763|      0|      return {};
 1764|      0|   }
 1765|       |
 1766|    460|   auto gpoc = std::make_shared<GenericPrimeOrderCurve>(p, a, b, base_x, base_y, order);
 1767|       |   /*
 1768|       |   The implementation of this needs to call shared_from_this which is not usable
 1769|       |   until after the constructor has completed, so we have to do a two-stage
 1770|       |   construction process. This is certainly not so clean but it is contained to
 1771|       |   this single file so seems tolerable.
 1772|       |
 1773|       |   Alternately we could lazily compute the base mul table but this brings in
 1774|       |   locking issues which seem a worse alternative overall.
 1775|       |   */
 1776|    460|   gpoc->_precompute_base_mul();
 1777|    460|   return gpoc;
 1778|    460|}
_ZNK5Botan6PCurve18GenericCurveParams10order_bitsEv:
  146|    792|      size_t order_bits() const { return m_order_bits; }
_ZNK5Botan6PCurve18GenericCurveParams11order_bytesEv:
  148|  1.98k|      size_t order_bytes() const { return m_order_bytes; }
_ZNK5Botan6PCurve18GenericCurveParams11field_bytesEv:
  152|  1.93k|      size_t field_bytes() const { return m_field_bytes; }
_ZN5Botan6PCurve19GenericBaseMulTable3mulERKNS0_13GenericScalarERNS_21RandomNumberGeneratorE:
 1347|    332|      GenericProjectivePoint mul(const GenericScalar& s, RandomNumberGenerator& rng) {
 1348|       |         // W+1 bit windows for Booth recoding overlap
 1349|    332|         const GenericBlindedScalarBits scalar(s, rng, WindowBits + 1);
 1350|    332|         return basemul_booth_exec<GenericCurve, WindowBits>(m_table, scalar, rng);
 1351|    332|      }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_124GenericBlindedScalarBitsC2ERKNS0_13GenericScalarERNS_21RandomNumberGeneratorEm:
 1237|    332|      GenericBlindedScalarBits(const GenericScalar& scalar, RandomNumberGenerator& rng, size_t wb) {
 1238|    332|         BOTAN_ASSERT_NOMSG(wb == 1 || wb == 2 || wb == 3 || wb == 4 || wb == 5 || wb == 6 || wb == 7);
  ------------------
  |  |   77|    332|   do {                                                                     \
  |  |   78|    332|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  3.98k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:12): [True: 0, False: 332]
  |  |  |  Branch (79:12): [True: 0, False: 332]
  |  |  |  Branch (79:12): [True: 0, False: 332]
  |  |  |  Branch (79:12): [True: 0, False: 332]
  |  |  |  Branch (79:12): [True: 0, False: 332]
  |  |  |  Branch (79:12): [True: 0, False: 332]
  |  |  |  Branch (79:12): [True: 332, False: 0]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    332|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 332]
  |  |  ------------------
  ------------------
 1239|       |
 1240|    332|         const auto& params = scalar.curve()->_params();
 1241|       |
 1242|    332|         const size_t order_bits = params.order_bits();
 1243|    332|         m_window_bits = wb;
 1244|       |
 1245|    332|         const size_t blinder_bits = scalar_blinding_bits(order_bits);
 1246|       |
 1247|    332|         if(blinder_bits > 0 && rng.is_seeded()) {
  ------------------
  |  Branch (1247:13): [True: 332, False: 0]
  |  Branch (1247:33): [True: 0, False: 332]
  ------------------
 1248|      0|            const size_t mask_words = (blinder_bits + WordInfo<word>::bits - 1) / WordInfo<word>::bits;
 1249|      0|            const size_t mask_bytes = mask_words * WordInfo<word>::bytes;
 1250|       |
 1251|      0|            const size_t words = params.words();
 1252|       |
 1253|      0|            secure_vector<uint8_t> maskb(mask_bytes);
 1254|      0|            rng.randomize(maskb);
 1255|       |
 1256|      0|            std::array<word, PrimeOrderCurve::StorageWords> mask{};
 1257|      0|            load_le(mask.data(), maskb.data(), mask_words);
 1258|       |
 1259|       |            // Mask to exactly blinder_bits and set MSB and LSB
 1260|      0|            const size_t excess = mask_words * WordInfo<word>::bits - blinder_bits;
 1261|      0|            if(excess > 0) {
  ------------------
  |  Branch (1261:16): [True: 0, False: 0]
  ------------------
 1262|      0|               mask[mask_words - 1] &= (static_cast<word>(1) << (WordInfo<word>::bits - excess)) - 1;
 1263|      0|            }
 1264|      0|            const size_t msb_pos = (blinder_bits - 1) % WordInfo<word>::bits;
 1265|      0|            mask[(blinder_bits - 1) / WordInfo<word>::bits] |= static_cast<word>(1) << msb_pos;
 1266|      0|            mask[0] |= 1;
 1267|       |
 1268|      0|            std::array<word, 2 * PrimeOrderCurve::StorageWords> mask_n{};
 1269|       |
 1270|      0|            const auto sw = scalar.to_words();
 1271|       |
 1272|       |            // Compute masked scalar s + k*n
 1273|      0|            params.mul(mask_n, mask, params.order());
 1274|      0|            bigint_add2(mask_n.data(), 2 * words, sw.data(), words);
 1275|       |
 1276|      0|            std::reverse(mask_n.begin(), mask_n.end());
 1277|      0|            m_bytes = store_be<std::vector<uint8_t>>(mask_n);
 1278|      0|            m_bits = order_bits + blinder_bits;
 1279|    332|         } else {
 1280|       |            // No RNG available, skip blinding
 1281|    332|            m_bytes = scalar.serialize<std::vector<uint8_t>>();
 1282|    332|            m_bits = order_bits;
 1283|    332|         }
 1284|       |
 1285|    332|         m_windows = (m_bits + wb - 1) / wb;
 1286|    332|      }
_ZNK5Botan6PCurve13GenericScalar5curveEv:
  549|    332|      const GenericPrimeOrderCurve* curve() const { return m_curve; }
_ZNK5Botan6PCurve18GenericCurveParams5wordsEv:
  144|  19.8M|      size_t words() const { return m_words; }
_ZN5Botan6PCurve13GenericScalar8from_repEPKNS0_22GenericPrimeOrderCurveENSt3__15arrayImLm9EEE:
  573|    771|      static StorageUnit from_rep(const GenericPrimeOrderCurve* curve, StorageUnit z) {
  574|    771|         std::array<W, 2 * N> ze{};
  575|    771|         copy_mem(std::span{ze}.template first<N>(), z);
  576|    771|         return redc(curve, ze);
  577|    771|      }
_ZN5Botan6PCurve13GenericScalar4redcEPKNS0_22GenericPrimeOrderCurveENSt3__15arrayImLm18EEE:
  563|  1.21k|      static StorageUnit redc(const GenericPrimeOrderCurve* curve, std::array<W, 2 * N> z) {
  564|  1.21k|         const auto& mod = curve->_params().order();
  565|  1.21k|         const size_t words = curve->_params().words();
  566|  1.21k|         StorageUnit r{};
  567|  1.21k|         StorageUnit ws{};
  568|  1.21k|         bigint_monty_redc(
  569|  1.21k|            r.data(), z.data(), mod.data(), words, curve->_params().order_p_dash(), ws.data(), ws.size());
  570|  1.21k|         return r;
  571|  1.21k|      }
_ZNK5Botan6PCurve18GenericCurveParams12order_p_dashEv:
  184|  1.21k|      word order_p_dash() const { return m_order_p_dash; }
_ZNK5Botan6PCurve18GenericCurveParams3mulERNSt3__15arrayImLm18EEERKNS3_ImLm9EEES8_:
  200|  9.59M|      void mul(std::array<word, 2 * N>& z, const std::array<word, N>& x, const std::array<word, N>& y) const {
  201|  9.59M|         clear_mem(z);
  202|       |
  203|  9.59M|         if(m_words == 4) {
  ------------------
  |  Branch (203:13): [True: 2.09M, False: 7.49M]
  ------------------
  204|  2.09M|            bigint_comba_mul4(z.data(), x.data(), y.data());
  205|  7.49M|         } else if(m_words == 6) {
  ------------------
  |  Branch (205:20): [True: 0, False: 7.49M]
  ------------------
  206|      0|            bigint_comba_mul6(z.data(), x.data(), y.data());
  207|  7.49M|         } else if(m_words == 8) {
  ------------------
  |  Branch (207:20): [True: 0, False: 7.49M]
  ------------------
  208|      0|            bigint_comba_mul8(z.data(), x.data(), y.data());
  209|  7.49M|         } else if(m_words == 9) {
  ------------------
  |  Branch (209:20): [True: 1.62M, False: 5.87M]
  ------------------
  210|  1.62M|            bigint_comba_mul9(z.data(), x.data(), y.data());
  211|  5.87M|         } else {
  212|  5.87M|            bigint_mul(z.data(), z.size(), x.data(), m_words, m_words, y.data(), m_words, m_words, nullptr, 0);
  213|  5.87M|         }
  214|  9.59M|      }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_124GenericBlindedScalarBits4bitsEv:
 1290|    332|      size_t bits() const { return m_bits; }
_ZN5Botan6PCurve22GenericProjectivePoint18conditional_assignENS_2CT6ChoiceERKS1_:
 1121|    332|      void conditional_assign(CT::Choice cond, const Self& pt) {
 1122|    332|         GenericField::conditional_assign(m_x, m_y, m_z, cond, pt.x(), pt.y(), pt.z());
 1123|    332|      }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112GenericField18conditional_assignERS2_S3_S3_NS_2CT6ChoiceERKS2_S7_S7_:
  862|   678k|                                     const GenericField& nz) {
  863|   678k|         const W mask = cond.into_bitmask<W>();
  864|       |
  865|  6.78M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (865:28): [True: 6.11M, False: 678k]
  ------------------
  866|  6.11M|            x.m_val[i] = choose(mask, nx.m_val[i], x.m_val[i]);
  867|  6.11M|            y.m_val[i] = choose(mask, ny.m_val[i], y.m_val[i]);
  868|  6.11M|            z.m_val[i] = choose(mask, nz.m_val[i], z.m_val[i]);
  869|  6.11M|         }
  870|   678k|      }
_ZNK5Botan6PCurve22GenericProjectivePoint6negateEv:
 1172|    332|      Self negate() const { return Self(x(), y().negate(), z()); }
_ZNK5Botan6PCurve22GenericProjectivePoint18_const_time_poisonEv:
 1213|    332|      void _const_time_poison() const { CT::poison_all(m_x, m_y, m_z); }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericField18_const_time_poisonEv:
  813|    996|      void _const_time_poison() const { CT::poison(m_val); }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_124GenericBlindedScalarBits10get_windowEm:
 1292|  12.6k|      size_t get_window(size_t offset) const {
 1293|  12.6k|         if(m_window_bits == 1) {
  ------------------
  |  Branch (1293:13): [True: 0, False: 12.6k]
  ------------------
 1294|      0|            return read_window_bits<1>(std::span{m_bytes}, offset);
 1295|  12.6k|         } else if(m_window_bits == 2) {
  ------------------
  |  Branch (1295:20): [True: 0, False: 12.6k]
  ------------------
 1296|      0|            return read_window_bits<2>(std::span{m_bytes}, offset);
 1297|  12.6k|         } else if(m_window_bits == 3) {
  ------------------
  |  Branch (1297:20): [True: 0, False: 12.6k]
  ------------------
 1298|      0|            return read_window_bits<3>(std::span{m_bytes}, offset);
 1299|  12.6k|         } else if(m_window_bits == 4) {
  ------------------
  |  Branch (1299:20): [True: 0, False: 12.6k]
  ------------------
 1300|      0|            return read_window_bits<4>(std::span{m_bytes}, offset);
 1301|  12.6k|         } else if(m_window_bits == 5) {
  ------------------
  |  Branch (1301:20): [True: 0, False: 12.6k]
  ------------------
 1302|      0|            return read_window_bits<5>(std::span{m_bytes}, offset);
 1303|  12.6k|         } else if(m_window_bits == 6) {
  ------------------
  |  Branch (1303:20): [True: 0, False: 12.6k]
  ------------------
 1304|      0|            return read_window_bits<6>(std::span{m_bytes}, offset);
 1305|  12.6k|         } else if(m_window_bits == 7) {
  ------------------
  |  Branch (1305:20): [True: 12.6k, False: 0]
  ------------------
 1306|  12.6k|            return read_window_bits<7>(std::span{m_bytes}, offset);
 1307|  12.6k|         } else {
 1308|      0|            BOTAN_ASSERT_UNREACHABLE();
  ------------------
  |  |  163|      0|#define BOTAN_ASSERT_UNREACHABLE() Botan::assert_unreachable(__FILE__, __LINE__)
  ------------------
 1309|      0|         }
 1310|  12.6k|      }
_ZN5Botan6PCurve22GenericProjectivePoint10add_or_subERKS1_RKNS0_18GenericAffinePointENS_2CT6ChoiceE:
 1132|  12.2k|      static Self add_or_sub(const Self& a, const GenericAffinePoint& b, CT::Choice sub) {
 1133|  12.2k|         return point_add_or_sub_mixed<Self, GenericAffinePoint, GenericField>(a, b, sub, GenericField::one(a.curve()));
 1134|  12.2k|      }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112GenericField18conditional_assignENS_2CT6ChoiceERKS2_:
  828|  12.2k|      void conditional_assign(CT::Choice cond, const GenericField& nx) {
  829|  12.2k|         const W mask = cond.into_bitmask<W>();
  830|       |
  831|   122k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (831:28): [True: 110k, False: 12.2k]
  ------------------
  832|   110k|            m_val[i] = choose(mask, nx.m_val[i], m_val[i]);
  833|   110k|         }
  834|  12.2k|      }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_1miERKNS1_12GenericFieldES4_:
  718|  3.22M|      friend GenericField operator-(const GenericField& a, const GenericField& b) { return a + b.negate(); }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericField7is_zeroEv:
  787|  2.07M|      CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_curve->_params().words()).as_choice(); }
_ZNK5Botan6PCurve22GenericProjectivePoint3dblEv:
 1158|   370k|      Self dbl() const {
 1159|   370k|         if(curve()->_params().a_is_minus_3()) {
  ------------------
  |  Branch (1159:13): [True: 78.4k, False: 292k]
  ------------------
 1160|  78.4k|            return dbl_a_minus_3(*this);
 1161|   292k|         } else if(curve()->_params().a_is_zero()) {
  ------------------
  |  Branch (1161:20): [True: 150k, False: 141k]
  ------------------
 1162|   150k|            return dbl_a_zero(*this);
 1163|   150k|         } else {
 1164|   141k|            const auto A = GenericField::curve_a(curve());
 1165|   141k|            return dbl_generic(*this, A);
 1166|   141k|         }
 1167|   370k|      }
_ZNK5Botan6PCurve18GenericCurveParams12a_is_minus_3Ev:
  194|   370k|      bool a_is_minus_3() const { return m_a_is_minus_3; }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericField4mul3Ev:
  698|   370k|      GenericField mul3() const { return mul2() + (*this); }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericField4mul4Ev:
  701|   370k|      GenericField mul4() const { return mul2().mul2(); }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericField4mul2Ev:
  688|  2.96M|      GenericField mul2() const {
  689|  2.96M|         StorageUnit t = value();
  690|  2.96M|         const W carry = shift_left<1>(t);
  691|       |
  692|  2.96M|         StorageUnit r;
  693|  2.96M|         bigint_monty_maybe_sub<N>(r.data(), carry, t.data(), m_curve->_params().field().data());
  694|  2.96M|         return GenericField(m_curve, r);
  695|  2.96M|      }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericField5valueEv:
  885|  26.1M|      const StorageUnit& value() const { return m_val; }
_ZNK5Botan6PCurve18GenericCurveParams5fieldEv:
  158|  23.9M|      const StorageUnit& field() const { return m_field; }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericField4mul8Ev:
  704|   370k|      GenericField mul8() const { return mul2().mul2().mul2(); }
_ZNK5Botan6PCurve18GenericCurveParams9a_is_zeroEv:
  196|   292k|      bool a_is_zero() const { return m_a_is_zero; }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112GenericField7curve_aEPKNS0_22GenericPrimeOrderCurveE:
  639|   142k|      static GenericField curve_a(const GenericPrimeOrderCurve* curve) {
  640|   142k|         return GenericField(curve, curve->_params().monty_curve_a());
  641|   142k|      }
_ZNK5Botan6PCurve18GenericCurveParams13monty_curve_aEv:
  186|   142k|      const StorageUnit& monty_curve_a() const { return m_monty_curve_a; }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112GenericField3oneEPKNS0_22GenericPrimeOrderCurveE:
  635|  13.8k|      static GenericField one(const GenericPrimeOrderCurve* curve) {
  636|  13.8k|         return GenericField(curve, curve->_params().field_monty_r1());
  637|  13.8k|      }
_ZNK5Botan6PCurve18GenericCurveParams14field_monty_r1Ev:
  162|  13.8k|      const StorageUnit& field_monty_r1() const { return m_field_monty_r1; }
_ZNK5Botan6PCurve22GenericProjectivePoint5curveEv:
 1211|   816k|      const GenericPrimeOrderCurve* curve() const { return m_x.curve(); }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericField5curveEv:
  801|   834k|      const GenericPrimeOrderCurve* curve() const { return m_curve; }
_ZN5Botan6PCurve18GenericAffinePoint9ct_selectENSt3__14spanIKS1_Lm18446744073709551615EEEm:
  963|  12.6k|      static auto ct_select(std::span<const GenericAffinePoint> pts, size_t idx) {
  964|  12.6k|         BOTAN_ARG_CHECK(!pts.empty(), "Cannot select from an empty set");
  ------------------
  |  |   35|  12.6k|   do {                                                          \
  |  |   36|  12.6k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  12.6k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 12.6k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  12.6k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 12.6k]
  |  |  ------------------
  ------------------
  965|  12.6k|         auto result = GenericAffinePoint::identity(pts[0].curve());
  966|       |
  967|       |         // Intentionally wrapping; set to maximum size_t if idx == 0
  968|  12.6k|         const size_t idx1 = static_cast<size_t>(idx - 1);
  969|   416k|         for(size_t i = 0; i != pts.size(); ++i) {
  ------------------
  |  Branch (969:28): [True: 403k, False: 12.6k]
  ------------------
  970|   403k|            const auto found = CT::Mask<size_t>::is_equal(idx1, i).as_choice();
  971|   403k|            result.conditional_assign(found, pts[i]);
  972|   403k|         }
  973|       |
  974|  12.6k|         return result;
  975|  12.6k|      }
_ZNK5Botan6PCurve18GenericAffinePoint5curveEv:
 1048|  13.4k|      const GenericPrimeOrderCurve* curve() const { return m_x.curve(); }
_ZN5Botan6PCurve18GenericAffinePoint18conditional_assignENS_2CT6ChoiceERKS1_:
 1044|   403k|      void conditional_assign(CT::Choice cond, const GenericAffinePoint& pt) {
 1045|   403k|         GenericField::conditional_assign(m_x, m_y, cond, pt.x(), pt.y());
 1046|   403k|      }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112GenericField18conditional_assignERS2_S3_NS_2CT6ChoiceERKS2_S7_:
  842|   403k|         GenericField& x, GenericField& y, CT::Choice cond, const GenericField& nx, const GenericField& ny) {
  843|   403k|         const W mask = cond.into_bitmask<W>();
  844|       |
  845|  4.03M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (845:28): [True: 3.63M, False: 403k]
  ------------------
  846|  3.63M|            x.m_val[i] = choose(mask, nx.m_val[i], x.m_val[i]);
  847|  3.63M|            y.m_val[i] = choose(mask, ny.m_val[i], y.m_val[i]);
  848|  3.63M|         }
  849|   403k|      }
_ZN5Botan6PCurve22GenericProjectivePoint13randomize_repERNS_21RandomNumberGeneratorE:
 1180|  1.32k|      void randomize_rep(RandomNumberGenerator& rng) {
 1181|       |         // In certain contexts we may be called with a Null_RNG; in that case the
 1182|       |         // caller is accepting that randomization will not occur
 1183|       |
 1184|  1.32k|         if(rng.is_seeded()) {
  ------------------
  |  Branch (1184:13): [True: 0, False: 1.32k]
  ------------------
 1185|      0|            auto r = GenericField::random(curve(), rng);
 1186|       |
 1187|      0|            auto r2 = r.square();
 1188|      0|            auto r3 = r2 * r;
 1189|       |
 1190|      0|            m_x *= r2;
 1191|      0|            m_y *= r3;
 1192|      0|            m_z *= r;
 1193|      0|         }
 1194|  1.32k|      }
_ZNK5Botan6PCurve18GenericCurveParams10field_bitsEv:
  150|    792|      size_t field_bits() const { return m_field_bits; }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112GenericFieldmLERKS2_:
  728|  44.1k|      GenericField& operator*=(const GenericField& other) {
  729|  44.1k|         const auto* curve = check_curve(*this, other);
  730|       |
  731|  44.1k|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  732|  44.1k|         curve->_params().mul(z, value(), other.value());
  733|  44.1k|         m_val = redc(curve, z);
  734|  44.1k|         return (*this);
  735|  44.1k|      }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112GenericField11check_curveERKS2_S4_:
  889|  13.7M|      static const GenericPrimeOrderCurve* check_curve(const GenericField& a, const GenericField& b) {
  890|  13.7M|         BOTAN_STATE_CHECK(a.m_curve == b.m_curve);
  ------------------
  |  |   51|  13.7M|   do {                                                         \
  |  |   52|  13.7M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  13.7M|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 13.7M]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  13.7M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 13.7M]
  |  |  ------------------
  ------------------
  891|  13.7M|         return a.m_curve;
  892|  13.7M|      }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112GenericField4redcEPKNS0_22GenericPrimeOrderCurveENSt3__15arrayImLm18EEE:
  894|  13.5M|      static StorageUnit redc(const GenericPrimeOrderCurve* curve, std::array<W, 2 * N> z) {
  895|  13.5M|         const auto& mod = curve->_params().field();
  896|  13.5M|         const size_t words = curve->_params().words();
  897|  13.5M|         StorageUnit r{};
  898|  13.5M|         StorageUnit ws{};
  899|  13.5M|         bigint_monty_redc(
  900|  13.5M|            r.data(), z.data(), mod.data(), words, curve->_params().field_p_dash(), ws.data(), ws.size());
  901|  13.5M|         return r;
  902|  13.5M|      }
_ZNK5Botan6PCurve18GenericCurveParams12field_p_dashEv:
  170|  13.5M|      word field_p_dash() const { return m_field_p_dash; }
_ZNK5Botan6PCurve22GenericProjectivePoint20_const_time_unpoisonEv:
 1215|    332|      void _const_time_unpoison() const { CT::unpoison_all(m_x, m_y, m_z); }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericField20_const_time_unpoisonEv:
  815|    996|      void _const_time_unpoison() const { CT::unpoison(m_val); }
_ZNK5Botan6PCurve22GenericProjectivePoint11is_identityEv:
 1119|  1.36M|      CT::Choice is_identity() const { return z().is_zero(); }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericField6invertEv:
  759|    792|      GenericField invert() const { return pow_vartime(m_curve->_params().field_minus_2()); }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericField11pow_vartimeERKNSt3__15arrayImLm9EEE:
  743|    792|      GenericField pow_vartime(const StorageUnit& exp) const {
  744|    792|         auto one = GenericField::one(curve());
  745|    792|         auto bits = curve()->_params().field_bits();
  746|    792|         auto words = curve()->_params().words();
  747|    792|         return impl_pow_vartime(*this, one, bits, std::span{exp}.last(words));
  748|    792|      }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_116impl_pow_vartimeINS1_12GenericFieldEEET_RKS4_S6_mNSt3__14spanIKmLm18446744073709551615EEE:
   56|    792|T impl_pow_vartime(const T& elem, const T& one, size_t bits, std::span<const word> exp) {
   57|    792|   constexpr size_t WindowBits = 4;
   58|    792|   constexpr size_t WindowElements = (1 << WindowBits) - 1;
   59|       |
   60|    792|   const size_t Windows = (bits + WindowBits - 1) / WindowBits;
   61|       |
   62|    792|   std::vector<T> tbl;
   63|    792|   tbl.reserve(WindowElements);
   64|       |
   65|    792|   tbl.push_back(elem);
   66|       |
   67|  11.8k|   for(size_t i = 1; i != WindowElements; ++i) {
  ------------------
  |  Branch (67:22): [True: 11.0k, False: 792]
  ------------------
   68|  11.0k|      if(i % 2 == 1) {
  ------------------
  |  Branch (68:10): [True: 5.54k, False: 5.54k]
  ------------------
   69|  5.54k|         tbl.push_back(tbl[i / 2].square());
   70|  5.54k|      } else {
   71|  5.54k|         tbl.push_back(tbl[i - 1] * tbl[0]);
   72|  5.54k|      }
   73|  11.0k|   }
   74|       |
   75|    792|   auto r = one;
   76|       |
   77|    792|   const size_t w0 = read_window_bits<WindowBits>(exp, (Windows - 1) * WindowBits);
   78|       |
   79|    792|   if(w0 > 0) {
  ------------------
  |  Branch (79:7): [True: 792, False: 0]
  ------------------
   80|    792|      r = tbl[w0 - 1];
   81|    792|   }
   82|       |
   83|  47.0k|   for(size_t i = 1; i != Windows; ++i) {
  ------------------
  |  Branch (83:22): [True: 46.2k, False: 792]
  ------------------
   84|   231k|      for(size_t j = 0; j != WindowBits; ++j) {
  ------------------
  |  Branch (84:25): [True: 185k, False: 46.2k]
  ------------------
   85|   185k|         r = r.square();
   86|   185k|      }
   87|  46.2k|      const size_t w = read_window_bits<WindowBits>(exp, (Windows - i - 1) * WindowBits);
   88|       |
   89|  46.2k|      if(w > 0) {
  ------------------
  |  Branch (89:10): [True: 44.1k, False: 2.10k]
  ------------------
   90|  44.1k|         r *= tbl[w - 1];
   91|  44.1k|      }
   92|  46.2k|   }
   93|       |
   94|    792|   return r;
   95|    792|}
_ZNK5Botan6PCurve18GenericCurveParams13field_minus_2Ev:
  160|    792|      const StorageUnit& field_minus_2() const { return m_field_minus_2; }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112GenericField4zeroEPKNS0_22GenericPrimeOrderCurveE:
  630|  25.2k|      static GenericField zero(const GenericPrimeOrderCurve* curve) {
  631|  25.2k|         const StorageUnit zeros{};
  632|  25.2k|         return GenericField(curve, zeros);
  633|  25.2k|      }
_ZN5Botan6PCurveplERKNS0_22GenericProjectivePointES3_:
 1103|   327k|      friend Self operator+(const Self& a, const Self& b) { return Self::add(a, b); }
_ZN5Botan6PCurve22GenericProjectivePoint3addERKS1_S3_:
 1139|   327k|      static Self add(const Self& a, const Self& b) { return point_add<Self, GenericField>(a, b); }
pcurves_generic.cpp:_ZNK5Botan6PCurve22GenericProjectivePoint1zEv:
 1209|  6.01M|      const GenericField& z() const { return m_z; }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericField6squareEv:
  737|  4.00M|      GenericField square() const {
  738|  4.00M|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  739|  4.00M|         m_curve->_params().sqr(z, value());
  740|  4.00M|         return GenericField(m_curve, redc(m_curve, z));
  741|  4.00M|      }
_ZNK5Botan6PCurve18GenericCurveParams3sqrERNSt3__15arrayImLm18EEERKNS3_ImLm9EEE:
  216|  4.00M|      void sqr(std::array<word, 2 * N>& z, const std::array<word, N>& x) const {
  217|  4.00M|         clear_mem(z);
  218|       |
  219|  4.00M|         if(m_words == 4) {
  ------------------
  |  Branch (219:13): [True: 920k, False: 3.08M]
  ------------------
  220|   920k|            bigint_comba_sqr4(z.data(), x.data());
  221|  3.08M|         } else if(m_words == 6) {
  ------------------
  |  Branch (221:20): [True: 0, False: 3.08M]
  ------------------
  222|      0|            bigint_comba_sqr6(z.data(), x.data());
  223|  3.08M|         } else if(m_words == 8) {
  ------------------
  |  Branch (223:20): [True: 0, False: 3.08M]
  ------------------
  224|      0|            bigint_comba_sqr8(z.data(), x.data());
  225|  3.08M|         } else if(m_words == 9) {
  ------------------
  |  Branch (225:20): [True: 609k, False: 2.47M]
  ------------------
  226|   609k|            bigint_comba_sqr9(z.data(), x.data());
  227|  2.47M|         } else {
  228|  2.47M|            bigint_sqr(z.data(), z.size(), x.data(), m_words, m_words, nullptr, 0);
  229|  2.47M|         }
  230|  4.00M|      }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112GenericField11deserializeEPKNS0_22GenericPrimeOrderCurveENSt3__14spanIKhLm18446744073709551615EEE:
  605|    180|                                                     std::span<const uint8_t> bytes) {
  606|    180|         const size_t len = curve->_params().field_bytes();
  607|       |
  608|    180|         if(bytes.size() != len) {
  ------------------
  |  Branch (608:13): [True: 0, False: 180]
  ------------------
  609|      0|            return {};
  610|      0|         }
  611|       |
  612|    180|         const auto words = bytes_to_words<N>(bytes);
  613|       |
  614|    180|         if(words) {
  ------------------
  |  Branch (614:13): [True: 180, False: 0]
  ------------------
  615|    180|            if(!bigint_ct_is_lt(words->data(), N, curve->_params().field().data(), N).as_bool()) {
  ------------------
  |  Branch (615:16): [True: 11, False: 169]
  ------------------
  616|     11|               return {};
  617|     11|            }
  618|       |
  619|       |            // Safe because we checked above that words is an integer < P
  620|    169|            return GenericField::from_words(curve, *words);
  621|    180|         } else {
  622|      0|            return {};
  623|      0|         }
  624|    180|      }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_114bytes_to_wordsILm9EEENSt3__18optionalINS3_5arrayImXT_EEEEENS3_4spanIKhLm18446744073709551615EEE:
   28|    626|constexpr std::optional<std::array<word, N>> bytes_to_words(std::span<const uint8_t> bytes) {
   29|    626|   if(bytes.size() > WordInfo<word>::bytes * N) {
  ------------------
  |  Branch (29:7): [True: 0, False: 626]
  ------------------
   30|      0|      return std::nullopt;
   31|      0|   }
   32|       |
   33|    626|   std::array<word, N> r{};
   34|       |
   35|    626|   const size_t full_words = bytes.size() / WordInfo<word>::bytes;
   36|    626|   const size_t extra_bytes = bytes.size() % WordInfo<word>::bytes;
   37|       |
   38|  3.12k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (38:22): [True: 2.50k, False: 626]
  ------------------
   39|  2.50k|      r[i] = load_be<word>(bytes.data(), full_words - 1 - i);
   40|  2.50k|   }
   41|       |
   42|    626|   if(extra_bytes > 0) {
  ------------------
  |  Branch (42:7): [True: 304, False: 322]
  ------------------
   43|    304|      const size_t shift = extra_bytes * 8;
   44|    304|      bigint_shl1(r.data(), r.size(), r.size(), shift);
   45|       |
   46|  1.33k|      for(size_t i = 0; i != extra_bytes; ++i) {
  ------------------
  |  Branch (46:25): [True: 1.03k, False: 304]
  ------------------
   47|  1.03k|         const word b0 = bytes[WordInfo<word>::bytes * full_words + i];
   48|  1.03k|         r[0] |= (b0 << (8 * (extra_bytes - 1 - i)));
   49|  1.03k|      }
   50|    304|   }
   51|       |
   52|    626|   return r;
   53|    626|}
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_1mlERKNS1_12GenericFieldES4_:
  720|  9.54M|      friend GenericField operator*(const GenericField& a, const GenericField& b) {
  721|  9.54M|         const auto* curve = check_curve(a, b);
  722|       |
  723|  9.54M|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  724|  9.54M|         curve->_params().mul(z, a.value(), b.value());
  725|  9.54M|         return GenericField(curve, redc(curve, z));
  726|  9.54M|      }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericFieldeqERKS2_:
  791|    412|      CT::Choice operator==(const GenericField& other) const {
  792|    412|         if(this->m_curve != other.m_curve) {
  ------------------
  |  Branch (792:13): [True: 0, False: 412]
  ------------------
  793|      0|            return CT::Choice::no();
  794|      0|         }
  795|       |
  796|    412|         return CT::is_equal(m_val.data(), other.m_val.data(), m_curve->_params().words()).as_choice();
  797|    412|      }
pcurves_generic.cpp:_ZNK5Botan6PCurve22GenericProjectivePoint1xEv:
 1199|  2.86M|      const GenericField& x() const { return m_x; }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112GenericField10from_wordsEPKNS0_22GenericPrimeOrderCurveERKNSt3__15arrayImLm9EEE:
  626|    169|      static GenericField from_words(const GenericPrimeOrderCurve* curve, const std::array<word, N>& words) {
  627|    169|         return GenericField(curve, to_rep(curve, words));
  628|    169|      }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112GenericField6to_repEPKNS0_22GenericPrimeOrderCurveENSt3__15arrayImLm9EEE:
  910|    169|      static StorageUnit to_rep(const GenericPrimeOrderCurve* curve, StorageUnit x) {
  911|    169|         std::array<W, 2 * N> z{};
  912|    169|         curve->_params().mul(z, x, curve->_params().field_monty_r2());
  913|    169|         return redc(curve, z);
  914|    169|      }
_ZNK5Botan6PCurve18GenericCurveParams14field_monty_r2Ev:
  164|    169|      const StorageUnit& field_monty_r2() const { return m_field_monty_r2; }
_ZNK5Botan6PCurve18GenericCurveParams5orderEv:
  172|  1.65k|      const StorageUnit& order() const { return m_order; }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericField6negateEv:
  750|  3.23M|      GenericField negate() const {
  751|  3.23M|         auto x_is_zero = CT::all_zeros(this->data(), N);
  752|       |
  753|  3.23M|         StorageUnit r;
  754|  3.23M|         bigint_sub3(r.data(), m_curve->_params().field().data(), N, this->data(), N);
  755|  3.23M|         x_is_zero.if_set_zero_out(r.data(), N);
  756|  3.23M|         return GenericField(m_curve, r);
  757|  3.23M|      }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericField4dataEv:
  887|  14.7M|      const W* data() const { return m_val.data(); }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112GenericField8from_repEPKNS0_22GenericPrimeOrderCurveENSt3__15arrayImLm9EEE:
  904|    666|      static StorageUnit from_rep(const GenericPrimeOrderCurve* curve, StorageUnit z) {
  905|    666|         std::array<W, 2 * N> ze{};
  906|    666|         copy_mem(std::span{ze}.template first<N>(), z);
  907|    666|         return redc(curve, ze);
  908|    666|      }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_1plERKNS1_12GenericFieldES4_:
  706|  4.15M|      friend GenericField operator+(const GenericField& a, const GenericField& b) {
  707|  4.15M|         const auto* curve = check_curve(a, b);
  708|  4.15M|         const size_t words = curve->_params().words();
  709|       |
  710|  4.15M|         StorageUnit t{};
  711|  4.15M|         const W carry = bigint_add3(t.data(), a.data(), words, b.data(), words);
  712|       |
  713|  4.15M|         StorageUnit r{};
  714|  4.15M|         bigint_monty_maybe_sub(words, r.data(), carry, t.data(), curve->_params().field().data());
  715|  4.15M|         return GenericField(curve, r);
  716|  4.15M|      }
_ZNK5Botan6PCurve18GenericCurveParams6base_xEv:
  190|    460|      const StorageUnit& base_x() const { return m_base_x; }
_ZNK5Botan6PCurve18GenericCurveParams6base_yEv:
  192|    460|      const StorageUnit& base_y() const { return m_base_y; }
_ZN5Botan6PCurve18GenericAffinePoint8identityEPKNS0_22GenericPrimeOrderCurveE:
  934|  12.6k|      static GenericAffinePoint identity(const GenericPrimeOrderCurve* curve) {
  935|  12.6k|         return GenericAffinePoint(GenericField::zero(curve), GenericField::zero(curve));
  936|  12.6k|      }
pcurves_generic.cpp:_ZNK5Botan6PCurve18GenericAffinePoint1yEv:
 1039|   431k|      const GenericField& y() const { return m_y; }
pcurves_generic.cpp:_ZN5Botan6PCurve18GenericAffinePoint7x3_ax_bERKNS0_12_GLOBAL__N_112GenericFieldE:
  980|    412|      static GenericField x3_ax_b(const GenericField& x) {
  981|    412|         return (x.square() + GenericField::curve_a(x.curve())) * x + GenericField::curve_b(x.curve());
  982|    412|      }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112GenericField7curve_bEPKNS0_22GenericPrimeOrderCurveE:
  643|    412|      static GenericField curve_b(const GenericPrimeOrderCurve* curve) {
  644|    412|         return GenericField(curve, curve->_params().monty_curve_b());
  645|    412|      }
_ZNK5Botan6PCurve18GenericCurveParams13monty_curve_bEv:
  188|    412|      const StorageUnit& monty_curve_b() const { return m_monty_curve_b; }
pcurves_generic.cpp:_ZNK5Botan6PCurve18GenericAffinePoint1xEv:
 1034|   444k|      const GenericField& x() const { return m_x; }
_ZNK5Botan6PCurve18GenericAffinePoint11is_identityEv:
  940|  14.0k|      CT::Choice is_identity() const { return x().is_zero() && y().is_zero(); }
_ZN5Botan6PCurve22GenericProjectivePoint11from_affineERKNS0_18GenericAffinePointE:
 1068|    792|      static Self from_affine(const GenericAffinePoint& pt) {
 1069|    792|         auto x = pt.x();
 1070|    792|         auto y = pt.y();
 1071|    792|         auto z = GenericField::one(x.curve());
 1072|       |
 1073|       |         // If pt is identity (0,0) swap y/z to convert (0,0,1) into (0,1,0)
 1074|    792|         GenericField::conditional_swap(pt.is_identity(), y, z);
 1075|    792|         return GenericProjectivePoint(x, y, z);
 1076|    792|      }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112GenericField16conditional_swapENS_2CT6ChoiceERS2_S5_:
  817|    792|      static void conditional_swap(CT::Choice cond, GenericField& x, GenericField& y) {
  818|    792|         const W mask = cond.into_bitmask<W>();
  819|       |
  820|  7.92k|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (820:28): [True: 7.12k, False: 792]
  ------------------
  821|  7.12k|            auto nx = choose(mask, y.m_val[i], x.m_val[i]);
  822|  7.12k|            auto ny = choose(mask, x.m_val[i], y.m_val[i]);
  823|  7.12k|            x.m_val[i] = nx;
  824|  7.12k|            y.m_val[i] = ny;
  825|  7.12k|         }
  826|    792|      }
_ZNK5Botan6PCurve18GenericAffinePoint12serialize_toENSt3__14spanIhLm18446744073709551615EEE:
  947|    333|      void serialize_to(std::span<uint8_t> bytes) const {
  948|    333|         const size_t fe_bytes = curve()->_params().field_bytes();
  949|    333|         BOTAN_ARG_CHECK(bytes.size() == 1 + 2 * fe_bytes, "Buffer size incorrect");
  ------------------
  |  |   35|    333|   do {                                                          \
  |  |   36|    333|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    333|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 333]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    333|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 333]
  |  |  ------------------
  ------------------
  950|    333|         BOTAN_STATE_CHECK(this->is_identity().as_bool() == false);
  ------------------
  |  |   51|    333|   do {                                                         \
  |  |   52|    333|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    333|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 333]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    333|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 333]
  |  |  ------------------
  ------------------
  951|    333|         BufferStuffer pack(bytes);
  952|    333|         pack.append(0x04);
  953|    333|         x().serialize_to(pack.next(fe_bytes));
  954|    333|         y().serialize_to(pack.next(fe_bytes));
  955|    333|         BOTAN_DEBUG_ASSERT(pack.full());
  ------------------
  |  |  130|    333|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    333|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 333]
  |  |  ------------------
  ------------------
  956|    333|      }
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericField12serialize_toENSt3__14spanIhLm18446744073709551615EEE:
  774|    666|      void serialize_to(std::span<uint8_t> bytes) const {
  775|    666|         auto v = from_rep(m_curve, m_val);
  776|    666|         std::reverse(v.begin(), v.end());
  777|       |
  778|    666|         const size_t flen = m_curve->_params().field_bytes();
  779|    666|         BOTAN_ARG_CHECK(bytes.size() == flen, "Expected output span provided");
  ------------------
  |  |   35|    666|   do {                                                          \
  |  |   36|    666|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    666|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 666]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    666|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 666]
  |  |  ------------------
  ------------------
  780|       |
  781|       |         // Remove leading zero bytes
  782|    666|         const auto padded_bytes = store_be(v);
  783|    666|         const size_t extra = N * WordInfo<W>::bytes - flen;
  784|    666|         copy_mem(bytes, std::span{padded_bytes}.subspan(extra, flen));
  785|    666|      }
_ZNK5Botan6PCurve13GenericScalar12serialize_toENSt3__14spanIhLm18446744073709551615EEE:
  517|    771|      void serialize_to(std::span<uint8_t> bytes) const {
  518|    771|         auto v = from_rep(m_curve, m_val);
  519|    771|         std::reverse(v.begin(), v.end());
  520|       |
  521|    771|         const size_t flen = m_curve->_params().order_bytes();
  522|    771|         BOTAN_ARG_CHECK(bytes.size() == flen, "Expected output span provided");
  ------------------
  |  |   35|    771|   do {                                                          \
  |  |   36|    771|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    771|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 771]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    771|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 771]
  |  |  ------------------
  ------------------
  523|       |
  524|       |         // Remove leading zero bytes
  525|    771|         const auto padded_bytes = store_be(v);
  526|    771|         const size_t extra = N * WordInfo<W>::bytes - flen;
  527|    771|         copy_mem(bytes, std::span{padded_bytes}.subspan(extra, flen));
  528|    771|      }
_ZN5Botan6PCurve13GenericScalar11deserializeEPKNS0_22GenericPrimeOrderCurveENSt3__14spanIKhLm18446744073709551615EEE:
  312|    446|                                                      std::span<const uint8_t> bytes) {
  313|    446|         const size_t len = curve->_params().order_bytes();
  314|       |
  315|    446|         if(bytes.size() != len) {
  ------------------
  |  Branch (315:13): [True: 0, False: 446]
  ------------------
  316|      0|            return {};
  317|      0|         }
  318|       |
  319|    446|         const auto words = bytes_to_words<N>(bytes);
  320|       |
  321|    446|         if(words) {
  ------------------
  |  Branch (321:13): [True: 446, False: 0]
  ------------------
  322|    446|            if(!bigint_ct_is_lt(words->data(), N, curve->_params().order().data(), N).as_bool()) {
  ------------------
  |  Branch (322:16): [True: 4, False: 442]
  ------------------
  323|      4|               return {};
  324|      4|            }
  325|       |
  326|       |            // Safe because we checked above that words is an integer < P
  327|    442|            return GenericScalar(curve, to_rep(curve, *words));
  328|    446|         } else {
  329|      0|            return {};
  330|      0|         }
  331|    446|      }
_ZN5Botan6PCurve13GenericScalar6to_repEPKNS0_22GenericPrimeOrderCurveENSt3__15arrayImLm9EEE:
  579|    442|      static StorageUnit to_rep(const GenericPrimeOrderCurve* curve, StorageUnit x) {
  580|    442|         std::array<W, 2 * N> z;  // NOLINT(*-member-init)
  581|    442|         curve->_params().mul(z, x, curve->_params().order_monty_r2());
  582|    442|         return redc(curve, z);
  583|    442|      }
_ZNK5Botan6PCurve18GenericCurveParams14order_monty_r2Ev:
  178|    442|      const StorageUnit& order_monty_r2() const { return m_order_monty_r2; }
_ZNK5Botan6PCurve13GenericScalar10is_nonzeroEv:
  532|    442|      CT::Choice is_nonzero() const { return !is_zero(); }
_ZN5Botan6PCurve18GenericAffinePoint24deserialize_uncompressedEPKNS0_22GenericPrimeOrderCurveENSt3__14spanIKhLm18446744073709551615EEE:
  988|     90|                                                                        std::span<const uint8_t> bytes) {
  989|     90|         const size_t fe_bytes = curve->_params().field_bytes();
  990|       |
  991|     90|         if(bytes.size() == 1 + 2 * fe_bytes && bytes[0] == 0x04) {
  ------------------
  |  Branch (991:13): [True: 90, False: 0]
  |  Branch (991:49): [True: 90, False: 0]
  ------------------
  992|     90|            auto x = GenericField::deserialize(curve, bytes.subspan(1, fe_bytes));
  993|     90|            auto y = GenericField::deserialize(curve, bytes.subspan(1 + fe_bytes, fe_bytes));
  994|       |
  995|     90|            if(x && y) {
  ------------------
  |  Branch (995:16): [True: 86, False: 4]
  |  Branch (995:21): [True: 80, False: 6]
  ------------------
  996|     80|               const auto lhs = (*y).square();
  997|     80|               const auto rhs = GenericAffinePoint::x3_ax_b(*x);
  998|     80|               if((lhs == rhs).as_bool()) {
  ------------------
  |  Branch (998:19): [True: 1, False: 79]
  ------------------
  999|      1|                  return GenericAffinePoint(*x, *y);
 1000|      1|               }
 1001|     80|            }
 1002|     90|         }
 1003|       |
 1004|     89|         return {};
 1005|     90|      }
_ZNK5Botan6PCurve13GenericScalar7is_zeroEv:
  530|    881|      CT::Choice is_zero() const { return CT::all_zeros(m_val.data(), m_curve->_params().words()).as_choice(); }
_ZNK5Botan6PCurve13GenericScalar11stash_valueEv:
  547|    439|      const StorageUnit& stash_value() const { return m_val; }
_ZN5Botan6PCurve13GenericScalarC2EPKNS0_22GenericPrimeOrderCurveENSt3__15arrayImLm9EEE:
  551|  1.65k|      GenericScalar(const GenericPrimeOrderCurve* curve, StorageUnit val) : m_curve(curve), m_val(val) {}
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericField11stash_valueEv:
  799|  1.66k|      const StorageUnit& stash_value() const { return m_val; }
pcurves_generic.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112GenericFieldC2EPKNS0_22GenericPrimeOrderCurveENSt3__15arrayImLm9EEE:
  882|  24.0M|      GenericField(const GenericPrimeOrderCurve* curve, StorageUnit val) : m_curve(curve), m_val(val) {}
pcurves_generic.cpp:_ZN5Botan6PCurve18GenericAffinePointC2ERKNS0_12_GLOBAL__N_112GenericFieldES5_:
  929|   711k|      GenericAffinePoint(const GenericField& x, const GenericField& y) : m_x(x), m_y(y) {}
pcurves_generic.cpp:_ZNK5Botan6PCurve22GenericProjectivePoint1yEv:
 1204|  2.78M|      const GenericField& y() const { return m_y; }
pcurves_generic.cpp:_ZN5Botan6PCurve22GenericProjectivePointC2ERKNS0_12_GLOBAL__N_112GenericFieldES5_S5_:
 1101|   711k|            m_x(x), m_y(y), m_z(z) {}
_ZNK5Botan6PCurve13GenericScalar9serializeITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS4_9allocatorIhEEEEEET_v:
  511|    332|      T serialize() const {
  512|    332|         T bytes(m_curve->_params().order_bytes());
  513|    332|         this->serialize_to(bytes);
  514|    332|         return bytes;
  515|    332|      }
_ZN5Botan6PCurve18GenericCurveParamsC2ERKNS_6BigIntES4_S4_S4_S4_S4_:
  110|    460|            m_words(p.sig_words()),
  111|    460|            m_order_bits(order.bits()),
  112|    460|            m_order_bytes(order.bytes()),
  113|    460|            m_field_bits(p.bits()),
  114|    460|            m_field_bytes(p.bytes()),
  115|    460|            m_monty_order(order),
  116|    460|            m_monty_field(p),
  117|    460|            m_field(bn_to_fixed(p)),
  118|    460|            m_field_minus_2(bn_to_fixed_rev(p - 2)),
  119|    460|            m_field_monty_r1(bn_to_fixed(m_monty_field.R1())),
  120|    460|            m_field_monty_r2(bn_to_fixed(m_monty_field.R2())),
  121|    460|            m_field_p_plus_1_over_4(bn_to_fixed_rev((p + 1) / 4)),
  122|    460|            m_field_inv_2(bn_to_fixed((p / 2) + 1)),
  123|    460|            m_field_p_dash(m_monty_field.p_dash()),
  124|       |
  125|    460|            m_order(bn_to_fixed(order)),
  126|    460|            m_order_minus_2(bn_to_fixed_rev(order - 2)),
  127|    460|            m_order_monty_r1(bn_to_fixed(m_monty_order.R1())),
  128|    460|            m_order_monty_r2(bn_to_fixed(m_monty_order.R2())),
  129|    460|            m_order_monty_r3(bn_to_fixed(m_monty_order.R3())),
  130|    460|            m_order_inv_2(bn_to_fixed((order / 2) + 1)),
  131|    460|            m_order_p_dash(m_monty_order.p_dash()),
  132|       |
  133|    460|            m_a_is_minus_3(a + 3 == p),
  134|    460|            m_a_is_zero(a.is_zero()),
  135|    460|            m_order_is_lt_field(order < p) {
  136|    460|         secure_vector<word> ws;
  137|    460|         m_monty_curve_a = bn_to_fixed(m_monty_field.mul(a, m_monty_field.R2(), ws));
  138|    460|         m_monty_curve_b = bn_to_fixed(m_monty_field.mul(b, m_monty_field.R2(), ws));
  139|       |
  140|    460|         m_base_x = bn_to_fixed(m_monty_field.mul(base_x, m_monty_field.R2(), ws));
  141|    460|         m_base_y = bn_to_fixed(m_monty_field.mul(base_y, m_monty_field.R2(), ws));
  142|    460|      }
_ZN5Botan6PCurve18GenericCurveParams11bn_to_fixedERKNS_6BigIntE:
  233|  7.36k|      static std::array<word, PrimeOrderCurve::StorageWords> bn_to_fixed(const BigInt& n) {
  234|  7.36k|         const size_t n_words = n.sig_words();
  235|  7.36k|         BOTAN_ASSERT_NOMSG(n_words <= PrimeOrderCurve::StorageWords);
  ------------------
  |  |   77|  7.36k|   do {                                                                     \
  |  |   78|  7.36k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  7.36k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 7.36k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  7.36k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 7.36k]
  |  |  ------------------
  ------------------
  236|       |
  237|  7.36k|         std::array<word, PrimeOrderCurve::StorageWords> r{};
  238|  7.36k|         copy_mem(std::span{r}.first(n_words), n._as_span().first(n_words));
  239|  7.36k|         return r;
  240|  7.36k|      }
_ZN5Botan6PCurve18GenericCurveParams15bn_to_fixed_revERKNS_6BigIntE:
  242|  1.38k|      static std::array<word, PrimeOrderCurve::StorageWords> bn_to_fixed_rev(const BigInt& n) {
  243|  1.38k|         auto v = bn_to_fixed(n);
  244|  1.38k|         std::reverse(v.begin(), v.end());
  245|  1.38k|         return v;
  246|  1.38k|      }
_ZN5Botan6PCurve19GenericBaseMulTableC2ERKNS0_18GenericAffinePointE:
 1345|    460|            m_table(basemul_booth_setup<GenericCurve, WindowBits>(pt, blinded_scalar_bits(*pt.curve()) + 1)) {}
pcurves_generic.cpp:_ZNK5Botan6PCurve12_GLOBAL__N_112GenericField14invert_vartimeEv:
  761|    460|      GenericField invert_vartime() const {
  762|       |         // TODO take advantage of variable time here using eg BEEA
  763|       |         // see IntMod::invert_vartime in pcurves_impl.h
  764|    460|         return invert();
  765|    460|      }
_ZN5Botan6PCurve19GenericBaseMulTable19blinded_scalar_bitsERKNS0_22GenericPrimeOrderCurveE:
 1354|    460|      static size_t blinded_scalar_bits(const GenericPrimeOrderCurve& curve) {
 1355|    460|         const size_t order_bits = curve.order_bits();
 1356|    460|         return order_bits + scalar_blinding_bits(order_bits);
 1357|    460|      }

_ZN5Botan6PCurve14PCurveInstance9secp224r1Ev:
  223|    336|std::shared_ptr<const PrimeOrderCurve> PCurveInstance::secp224r1() {
  224|    336|   return PrimeOrderCurveImpl<secp224r1::Curve>::instance();
  225|    336|}
pcurves_secp224r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS2_6ParamsES3_E11FieldParamsEE3oneEv:
   69|  8.24k|      constexpr static std::array<W, N> one() { return std::array<W, N>{1}; }
pcurves_secp224r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS2_6ParamsES3_E11FieldParamsEE4redcERKNSt3__15arrayImLm8EEE:
   25|   166k|      constexpr static std::array<W, N> redc(const std::array<W, 2 * N>& z) {
   26|   166k|         const int64_t X00 = get_uint32(z.data(), 0);
   27|   166k|         const int64_t X01 = get_uint32(z.data(), 1);
   28|   166k|         const int64_t X02 = get_uint32(z.data(), 2);
   29|   166k|         const int64_t X03 = get_uint32(z.data(), 3);
   30|   166k|         const int64_t X04 = get_uint32(z.data(), 4);
   31|   166k|         const int64_t X05 = get_uint32(z.data(), 5);
   32|   166k|         const int64_t X06 = get_uint32(z.data(), 6);
   33|   166k|         const int64_t X07 = get_uint32(z.data(), 7);
   34|   166k|         const int64_t X08 = get_uint32(z.data(), 8);
   35|   166k|         const int64_t X09 = get_uint32(z.data(), 9);
   36|   166k|         const int64_t X10 = get_uint32(z.data(), 10);
   37|   166k|         const int64_t X11 = get_uint32(z.data(), 11);
   38|   166k|         const int64_t X12 = get_uint32(z.data(), 12);
   39|   166k|         const int64_t X13 = get_uint32(z.data(), 13);
   40|       |
   41|   166k|         const int64_t S0 = 0x00000001 + X00 - X07 - X11;
   42|   166k|         const int64_t S1 = 0x00000000 + X01 - X08 - X12;
   43|   166k|         const int64_t S2 = 0x00000000 + X02 - X09 - X13;
   44|   166k|         const int64_t S3 = 0xFFFFFFFF + X03 + X07 + X11 - X10;
   45|   166k|         const int64_t S4 = 0xFFFFFFFF + X04 + X08 + X12 - X11;
   46|   166k|         const int64_t S5 = 0xFFFFFFFF + X05 + X09 + X13 - X12;
   47|   166k|         const int64_t S6 = 0xFFFFFFFF + X06 + X10 - X13;
   48|       |
   49|   166k|         std::array<W, N> r = {};
   50|       |
   51|   166k|         SolinasAccum sum(r);
   52|       |
   53|   166k|         sum.accum(S0);
   54|   166k|         sum.accum(S1);
   55|   166k|         sum.accum(S2);
   56|   166k|         sum.accum(S3);
   57|   166k|         sum.accum(S4);
   58|   166k|         sum.accum(S5);
   59|   166k|         sum.accum(S6);
   60|   166k|         const auto S = sum.final_carry(0);
   61|       |
   62|   166k|         BOTAN_DEBUG_ASSERT(S <= 2);
  ------------------
  |  |  130|   166k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|   166k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 166k]
  |  |  ------------------
  ------------------
   63|       |
   64|   166k|         solinas_correct_redc<N>(r, P, p224_mul_mod_224(S));
   65|       |
   66|   166k|         return r;
   67|   166k|      }
pcurves_secp224r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS2_6ParamsES3_E11FieldParamsEE16p224_mul_mod_224Em:
   81|   166k|      constexpr static std::array<W, N> p224_mul_mod_224(W i) {
   82|   166k|         static_assert(WordInfo<W>::bits == 32 || WordInfo<W>::bits == 64);
   83|       |
   84|       |         // For small i, multiples of P-224 have a simple structure so it's faster to
   85|       |         // compute the value directly vs a (constant time) table lookup
   86|       |
   87|   166k|         auto r = P;
   88|       |
   89|       |         if constexpr(WordInfo<W>::bits == 32) {
   90|       |            r[3] -= i;
   91|       |            r[0] += i;
   92|   166k|         } else {
   93|   166k|            const W i32 = i << 32;
   94|   166k|            r[1] -= i32;
   95|   166k|            r[0] += i;
   96|   166k|         }
   97|   166k|         return r;
   98|   166k|      }
pcurves_secp224r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp224r15Curve10fe_invert2ERKNS_6IntModINS2_12Secp224r1RepINS_13EllipticCurveINS2_6ParamsES5_E11FieldParamsEEEEE:
  117|    217|      static constexpr FieldElement fe_invert2(const FieldElement& x) {
  118|    217|         auto z = x.square();
  119|    217|         z *= x;
  120|    217|         z = z.square();
  121|    217|         z *= x;
  122|    217|         auto t0 = z;
  123|    217|         t0.square_n(3);
  124|    217|         t0 *= z;
  125|    217|         auto t1 = t0;
  126|    217|         t1.square_n(6);
  127|    217|         t0 *= t1;
  128|    217|         t0.square_n(3);
  129|    217|         z *= t0;
  130|    217|         t0 = z.square();
  131|    217|         t0 *= x;
  132|    217|         t1 = t0;
  133|    217|         t1.square_n(16);
  134|    217|         t0 *= t1;
  135|    217|         t1 = t0;
  136|    217|         t1.square_n(15);
  137|    217|         z *= t1;
  138|    217|         t1 = z;
  139|    217|         t1.square_n(47);
  140|    217|         z *= t1;
  141|    217|         z = z.square();
  142|    217|         z *= x;
  143|    217|         t1 = z;
  144|    217|         t1.square_n(32);
  145|    217|         t0 *= t1;
  146|    217|         t0.square_n(96);
  147|    217|         z *= t0;
  148|    217|         return z.square();
  149|    217|      }
pcurves_secp224r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS2_6ParamsES3_E11FieldParamsEE8from_repERKNSt3__15arrayImLm4EEE:
   75|    435|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) { return z; }
pcurves_secp224r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp224r112Secp224r1RepINS_13EllipticCurveINS2_6ParamsES3_E11FieldParamsEE6to_repERKNSt3__15arrayImLm4EEE:
   71|      7|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) { return x; }

_ZN5Botan6PCurve14PCurveInstance9secp256k1Ev:
  233|    230|std::shared_ptr<const PrimeOrderCurve> PCurveInstance::secp256k1() {
  234|    230|   return PrimeOrderCurveImpl<secp256k1::Curve>::instance();
  235|    230|}
pcurves_secp256k1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS2_6ParamsES3_E11FieldParamsEE3oneEv:
   28|  9.41k|      constexpr static std::array<W, N> one() { return std::array<W, N>{1}; }
pcurves_secp256k1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS2_6ParamsES3_E11FieldParamsEE4redcERKNSt3__15arrayImLm8EEE:
   30|   190k|      constexpr static std::array<W, N> redc(const std::array<W, 2 * N>& z) {
   31|   190k|         return redc_crandall<W, N, C>(std::span{z});
   32|   190k|      }
pcurves_secp256k1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp256k15Curve10fe_invert2ERKNS_6IntModINS2_12Secp256k1RepINS_13EllipticCurveINS2_6ParamsES5_E11FieldParamsEEEEE:
   60|    219|      static constexpr FieldElement fe_invert2(const FieldElement& x) {
   61|    219|         auto z = x.square();
   62|    219|         z *= x;
   63|    219|         auto t0 = z;
   64|    219|         t0.square_n(2);
   65|    219|         t0 *= z;
   66|    219|         auto t1 = t0.square();
   67|    219|         auto t2 = t1 * x;
   68|    219|         t1 = t2;
   69|    219|         t1.square_n(2);
   70|    219|         t1 *= z;
   71|    219|         auto t3 = t1;
   72|    219|         t3.square_n(4);
   73|    219|         t0 *= t3;
   74|    219|         t3 = t0;
   75|    219|         t3.square_n(11);
   76|    219|         t0 *= t3;
   77|    219|         t3 = t0;
   78|    219|         t3.square_n(5);
   79|    219|         t2 *= t3;
   80|    219|         t3 = t2;
   81|    219|         t3.square_n(27);
   82|    219|         t2 *= t3;
   83|    219|         t3 = t2;
   84|    219|         t3.square_n(54);
   85|    219|         t2 *= t3;
   86|    219|         t3 = t2;
   87|    219|         t3.square_n(108);
   88|    219|         t2 *= t3;
   89|    219|         t2.square_n(7);
   90|    219|         t1 *= t2;
   91|    219|         t1.square_n(23);
   92|    219|         t0 *= t1;
   93|    219|         t0.square_n(5);
   94|    219|         t0 *= x;
   95|    219|         t0.square_n(3);
   96|    219|         z *= t0;
   97|    219|         z.square_n(2);
   98|    219|         return z;
   99|    219|      }
pcurves_secp256k1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS2_6ParamsES3_E11FieldParamsEE8from_repERKNSt3__15arrayImLm4EEE:
   38|    439|      constexpr static std::array<W, N> from_rep(const std::array<W, N>& z) { return z; }
pcurves_secp256k1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp256k112Secp256k1RepINS_13EllipticCurveINS2_6ParamsES3_E11FieldParamsEE6to_repERKNSt3__15arrayImLm4EEE:
   34|      1|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) { return x; }

_ZN5Botan6PCurve14PCurveInstance9secp256r1Ev:
  268|    131|std::shared_ptr<const PrimeOrderCurve> PCurveInstance::secp256r1() {
  269|    131|   return PrimeOrderCurveImpl<secp256r1::Curve>::instance();
  270|    131|}
pcurves_secp256r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS1_9secp256r16ParamsES2_E11FieldParamsEE3oneEv:
   77|  3.14k|      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|  83.0k|      constexpr static std::array<W, N> redc(const std::array<W, 2 * N>& z) {
   28|  83.0k|         const int64_t X00 = get_uint32(z.data(), 0);
   29|  83.0k|         const int64_t X01 = get_uint32(z.data(), 1);
   30|  83.0k|         const int64_t X02 = get_uint32(z.data(), 2);
   31|  83.0k|         const int64_t X03 = get_uint32(z.data(), 3);
   32|  83.0k|         const int64_t X04 = get_uint32(z.data(), 4);
   33|  83.0k|         const int64_t X05 = get_uint32(z.data(), 5);
   34|  83.0k|         const int64_t X06 = get_uint32(z.data(), 6);
   35|  83.0k|         const int64_t X07 = get_uint32(z.data(), 7);
   36|  83.0k|         const int64_t X08 = get_uint32(z.data(), 8);
   37|  83.0k|         const int64_t X09 = get_uint32(z.data(), 9);
   38|  83.0k|         const int64_t X10 = get_uint32(z.data(), 10);
   39|  83.0k|         const int64_t X11 = get_uint32(z.data(), 11);
   40|  83.0k|         const int64_t X12 = get_uint32(z.data(), 12);
   41|  83.0k|         const int64_t X13 = get_uint32(z.data(), 13);
   42|  83.0k|         const int64_t X14 = get_uint32(z.data(), 14);
   43|  83.0k|         const int64_t X15 = get_uint32(z.data(), 15);
   44|       |
   45|       |         // See SP 800-186 section G.1.2
   46|  83.0k|         const int64_t S0 = P256_4[0] + X00 + X08 + X09 - (X11 + X12 + X13 + X14);
   47|  83.0k|         const int64_t S1 = P256_4[1] + X01 + X09 + X10 - (X12 + X13 + X14 + X15);
   48|  83.0k|         const int64_t S2 = P256_4[2] + X02 + X10 + X11 - (X13 + X14 + X15);
   49|  83.0k|         const int64_t S3 = P256_4[3] + X03 + 2 * (X11 + X12) + X13 - (X15 + X08 + X09);
   50|  83.0k|         const int64_t S4 = P256_4[4] + X04 + 2 * (X12 + X13) + X14 - (X09 + X10);
   51|  83.0k|         const int64_t S5 = P256_4[5] + X05 + 2 * (X13 + X14) + X15 - (X10 + X11);
   52|  83.0k|         const int64_t S6 = P256_4[6] + X06 + X13 + X14 * 3 + X15 * 2 - (X08 + X09);
   53|  83.0k|         const int64_t S7 = P256_4[7] + X07 + X15 * 3 + X08 - (X10 + X11 + X12 + X13);
   54|  83.0k|         const int64_t S8 = P256_4[8];
   55|       |
   56|  83.0k|         std::array<W, N> r = {};
   57|       |
   58|  83.0k|         SolinasAccum sum(r);
   59|       |
   60|  83.0k|         sum.accum(S0);
   61|  83.0k|         sum.accum(S1);
   62|  83.0k|         sum.accum(S2);
   63|  83.0k|         sum.accum(S3);
   64|  83.0k|         sum.accum(S4);
   65|  83.0k|         sum.accum(S5);
   66|  83.0k|         sum.accum(S6);
   67|  83.0k|         sum.accum(S7);
   68|  83.0k|         const auto S = sum.final_carry(S8);
   69|       |
   70|  83.0k|         BOTAN_DEBUG_ASSERT(S <= 8);
  ------------------
  |  |  130|  83.0k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  83.0k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 83.0k]
  |  |  ------------------
  ------------------
   71|       |
   72|  83.0k|         solinas_correct_redc<N>(r, P, p256_mul_mod_256(S));
   73|       |
   74|  83.0k|         return r;
   75|  83.0k|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS1_9secp256r16ParamsES2_E11FieldParamsEE16p256_mul_mod_256Em:
   89|  83.0k|      constexpr static std::array<W, N> p256_mul_mod_256(W i) {
   90|  83.0k|         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|  83.0k|         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|  83.0k|         } else {
  102|  83.0k|            const uint64_t i32 = static_cast<uint64_t>(i) << 32;
  103|  83.0k|            r[3] -= i32;
  104|  83.0k|            r[3] += i;
  105|  83.0k|            r[1] += i32;
  106|  83.0k|            r[0] -= i;
  107|  83.0k|         }
  108|  83.0k|         return r;
  109|  83.0k|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp256r15Curve10fe_invert2ERKNS_6IntModINS1_12Secp256r1RepINS_13EllipticCurveINS2_6ParamsES5_E11FieldParamsEEEEE:
  131|     73|      static constexpr FieldElement fe_invert2(const FieldElement& x) {
  132|       |         // Generated using https://github.com/mmcloughlin/addchain
  133|       |
  134|     73|         auto z = x.square();
  135|     73|         z *= x;
  136|     73|         z = z.square();
  137|     73|         z *= x;
  138|     73|         auto t0 = z;
  139|     73|         t0.square_n(3);
  140|     73|         t0 *= z;
  141|     73|         auto t1 = t0;
  142|     73|         t1.square_n(6);
  143|     73|         t0 *= t1;
  144|     73|         t0.square_n(3);
  145|     73|         z *= t0;
  146|     73|         t0 = z.square();
  147|     73|         t0 *= x;
  148|     73|         t1 = t0;
  149|     73|         t1.square_n(16);
  150|     73|         t0 *= t1;
  151|     73|         t0.square_n(15);
  152|     73|         z *= t0;
  153|     73|         t0.square_n(17);
  154|     73|         t0 *= x;
  155|     73|         t0.square_n(143);
  156|     73|         t0 *= z;
  157|     73|         t0.square_n(47);
  158|     73|         z *= t0;
  159|     73|         z.square_n(2);
  160|       |
  161|     73|         return z;
  162|     73|      }
pcurves_secp256r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112Secp256r1RepINS_13EllipticCurveINS1_9secp256r16ParamsES2_E11FieldParamsEE8from_repERKNSt3__15arrayImLm4EEE:
   83|    147|      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|      1|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) { return x; }

_ZN5Botan6PCurve14PCurveInstance9secp384r1Ev:
  343|    222|std::shared_ptr<const PrimeOrderCurve> PCurveInstance::secp384r1() {
  344|    222|   return PrimeOrderCurveImpl<secp384r1::Curve>::instance();
  345|    222|}
pcurves_secp384r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS1_9secp384r16ParamsES2_E11FieldParamsEE3oneEv:
   88|  12.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|   260k|      constexpr static std::array<W, N> redc(const std::array<W, 2 * N>& z) {
   24|   260k|         const int64_t X00 = get_uint32(z.data(), 0);
   25|   260k|         const int64_t X01 = get_uint32(z.data(), 1);
   26|   260k|         const int64_t X02 = get_uint32(z.data(), 2);
   27|   260k|         const int64_t X03 = get_uint32(z.data(), 3);
   28|   260k|         const int64_t X04 = get_uint32(z.data(), 4);
   29|   260k|         const int64_t X05 = get_uint32(z.data(), 5);
   30|   260k|         const int64_t X06 = get_uint32(z.data(), 6);
   31|   260k|         const int64_t X07 = get_uint32(z.data(), 7);
   32|   260k|         const int64_t X08 = get_uint32(z.data(), 8);
   33|   260k|         const int64_t X09 = get_uint32(z.data(), 9);
   34|   260k|         const int64_t X10 = get_uint32(z.data(), 10);
   35|   260k|         const int64_t X11 = get_uint32(z.data(), 11);
   36|   260k|         const int64_t X12 = get_uint32(z.data(), 12);
   37|   260k|         const int64_t X13 = get_uint32(z.data(), 13);
   38|   260k|         const int64_t X14 = get_uint32(z.data(), 14);
   39|   260k|         const int64_t X15 = get_uint32(z.data(), 15);
   40|   260k|         const int64_t X16 = get_uint32(z.data(), 16);
   41|   260k|         const int64_t X17 = get_uint32(z.data(), 17);
   42|   260k|         const int64_t X18 = get_uint32(z.data(), 18);
   43|   260k|         const int64_t X19 = get_uint32(z.data(), 19);
   44|   260k|         const int64_t X20 = get_uint32(z.data(), 20);
   45|   260k|         const int64_t X21 = get_uint32(z.data(), 21);
   46|   260k|         const int64_t X22 = get_uint32(z.data(), 22);
   47|   260k|         const int64_t X23 = get_uint32(z.data(), 23);
   48|       |
   49|       |         // One copy of P-384 is added to prevent underflow
   50|   260k|         const int64_t S0 = 0xFFFFFFFF + X00 + X12 + X20 + X21 - X23;
   51|   260k|         const int64_t S1 = 0x00000000 + X01 + X13 + X22 + X23 - X12 - X20;
   52|   260k|         const int64_t S2 = 0x00000000 + X02 + X14 + X23 - X13 - X21;
   53|   260k|         const int64_t S3 = 0xFFFFFFFF + X03 + X12 + X15 + X20 + X21 - X14 - X22 - X23;
   54|   260k|         const int64_t S4 = 0xFFFFFFFE + X04 + X12 + X13 + X16 + X20 + X21 * 2 + X22 - X15 - X23 * 2;
   55|   260k|         const int64_t S5 = 0xFFFFFFFF + X05 + X13 + X14 + X17 + X21 + X22 * 2 + X23 - X16;
   56|   260k|         const int64_t S6 = 0xFFFFFFFF + X06 + X14 + X15 + X18 + X22 + X23 * 2 - X17;
   57|   260k|         const int64_t S7 = 0xFFFFFFFF + X07 + X15 + X16 + X19 + X23 - X18;
   58|   260k|         const int64_t S8 = 0xFFFFFFFF + X08 + X16 + X17 + X20 - X19;
   59|   260k|         const int64_t S9 = 0xFFFFFFFF + X09 + X17 + X18 + X21 - X20;
   60|   260k|         const int64_t SA = 0xFFFFFFFF + X10 + X18 + X19 + X22 - X21;
   61|   260k|         const int64_t SB = 0xFFFFFFFF + X11 + X19 + X20 + X23 - X22;
   62|       |
   63|   260k|         std::array<W, N> r = {};
   64|       |
   65|   260k|         SolinasAccum sum(r);
   66|       |
   67|   260k|         sum.accum(S0);
   68|   260k|         sum.accum(S1);
   69|   260k|         sum.accum(S2);
   70|   260k|         sum.accum(S3);
   71|   260k|         sum.accum(S4);
   72|   260k|         sum.accum(S5);
   73|   260k|         sum.accum(S6);
   74|   260k|         sum.accum(S7);
   75|   260k|         sum.accum(S8);
   76|   260k|         sum.accum(S9);
   77|   260k|         sum.accum(SA);
   78|   260k|         sum.accum(SB);
   79|   260k|         const auto S = sum.final_carry(0);
   80|       |
   81|   260k|         BOTAN_DEBUG_ASSERT(S <= 4);
  ------------------
  |  |  130|   260k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|   260k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 260k]
  |  |  ------------------
  ------------------
   82|       |
   83|   260k|         solinas_correct_redc<N>(r, P, p384_mul_mod_384(S));
   84|       |
   85|   260k|         return r;
   86|   260k|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS1_9secp384r16ParamsES2_E11FieldParamsEE16p384_mul_mod_384Em:
  100|   260k|      constexpr static std::array<W, N> p384_mul_mod_384(W i) {
  101|   260k|         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|   260k|         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|   260k|         } else {
  113|   260k|            const uint64_t i32 = static_cast<uint64_t>(i) << 32;
  114|   260k|            r[2] -= i;
  115|   260k|            r[1] -= i32;
  116|   260k|            r[0] += i32;
  117|   260k|            r[0] -= i;
  118|   260k|         }
  119|   260k|         return r;
  120|   260k|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp384r15Curve10fe_invert2ERKNS_6IntModINS1_12Secp384r1RepINS_13EllipticCurveINS2_6ParamsES5_E11FieldParamsEEEEE:
  142|    196|      static constexpr FieldElement fe_invert2(const FieldElement& x) {
  143|       |         // From https://briansmith.org/ecc-inversion-addition-chains-01
  144|       |
  145|    196|         FieldElement r = x.square();
  146|    196|         r *= x;
  147|    196|         const auto x2 = r;
  148|    196|         r = r.square();
  149|    196|         r *= x;
  150|    196|         const auto x3 = r;
  151|    196|         r.square_n(3);
  152|    196|         r *= x3;
  153|    196|         auto rl = r;
  154|    196|         r.square_n(6);
  155|    196|         r *= rl;
  156|    196|         r.square_n(3);
  157|    196|         r *= x3;
  158|    196|         const auto x15 = r;
  159|    196|         r.square_n(15);
  160|    196|         r *= x15;
  161|    196|         const auto x30 = r;
  162|    196|         r.square_n(30);
  163|    196|         r *= x30;
  164|    196|         rl = r;
  165|    196|         r.square_n(60);
  166|    196|         r *= rl;
  167|    196|         rl = r;
  168|    196|         r.square_n(120);
  169|    196|         r *= rl;
  170|    196|         r.square_n(15);
  171|    196|         r *= x15;
  172|    196|         r.square_n(31);
  173|    196|         r *= x30;
  174|    196|         r.square_n(2);
  175|    196|         r *= x2;
  176|    196|         r.square_n(94);
  177|    196|         r *= x30;
  178|    196|         r.square_n(2);
  179|       |
  180|    196|         return r;
  181|    196|      }
pcurves_secp384r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_112Secp384r1RepINS_13EllipticCurveINS1_9secp384r16ParamsES2_E11FieldParamsEE8from_repERKNSt3__15arrayImLm6EEE:
   94|    393|      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|      1|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) { return x; }

_ZN5Botan6PCurve14PCurveInstance9secp521r1Ev:
  291|    344|std::shared_ptr<const PrimeOrderCurve> PCurveInstance::secp521r1() {
  292|    344|   return PrimeOrderCurveImpl<secp521r1::Curve>::instance();
  293|    344|}
pcurves_secp521r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS2_6ParamsES3_E11FieldParamsEE3oneEv:
   24|  17.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|   361k|      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|   361k|         constexpr W TOP_BITS = static_cast<W>(0x1FF);
   29|       |         // The 23 or 55 bits that should be cleared in the top word
   30|   361k|         constexpr W CLEARED_TOP_BITS = WordInfo<W>::max ^ TOP_BITS;
   31|       |
   32|       |         /*
   33|       |         * Extract the high part of z (z >> 521)
   34|       |         */
   35|   361k|         std::array<W, N> t;  // NOLINT(*-member-init)
   36|       |
   37|  3.61M|         for(size_t i = 0; i != N; ++i) {
  ------------------
  |  Branch (37:28): [True: 3.25M, False: 361k]
  ------------------
   38|  3.25M|            t[i] = z[(N - 1) + i] >> 9;
   39|  3.25M|         }
   40|       |
   41|  3.25M|         for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (41:28): [True: 2.89M, False: 361k]
  ------------------
   42|  2.89M|            t[i] |= z[(N - 1) + i + 1] << (WordInfo<W>::bits - 9);
   43|  2.89M|         }
   44|       |
   45|       |         // Now t += z & (2**521-1)
   46|   361k|         W carry = 0;
   47|  3.25M|         for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (47:28): [True: 2.89M, False: 361k]
  ------------------
   48|  2.89M|            t[i] = word_add(t[i], z[i], &carry);
   49|  2.89M|         }
   50|       |
   51|       |         // Now add the (partial) top words; this can't carry out
   52|       |         // since both inputs are at most 2**9-1
   53|   361k|         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|   361k|         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|   361k|         const W is_eq_p521 = [&]() {
   71|   361k|            W sum = WordInfo<W>::max;
   72|   361k|            for(size_t i = 0; i != N - 1; ++i) {
   73|   361k|               sum &= t[i];
   74|   361k|            }
   75|   361k|            sum &= (CLEARED_TOP_BITS | t[N - 1]);
   76|       |
   77|   361k|            return CT::Mask<W>::is_zero(sum ^ WordInfo<W>::max).value();
   78|   361k|         }();
   79|       |
   80|   361k|         const W need_sub = is_over_p521 | is_eq_p521;
   81|       |
   82|   361k|         W borrow = 0;
   83|  3.25M|         for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (83:28): [True: 2.89M, False: 361k]
  ------------------
   84|  2.89M|            t[i] = word_sub(t[i], need_sub & WordInfo<W>::max, &borrow);
   85|  2.89M|         }
   86|   361k|         t[N - 1] = word_sub(t[N - 1], need_sub & TOP_BITS, &borrow);
   87|       |
   88|   361k|         return t;
   89|   361k|      }
pcurves_secp521r1.cpp:_ZZN5Botan6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS2_6ParamsES3_E11FieldParamsEE4redcERKNSt3__15arrayImLm18EEEENKUlvE_clEv:
   70|   361k|         const W is_eq_p521 = [&]() {
   71|   361k|            W sum = WordInfo<W>::max;
   72|  3.25M|            for(size_t i = 0; i != N - 1; ++i) {
  ------------------
  |  Branch (72:31): [True: 2.89M, False: 361k]
  ------------------
   73|  2.89M|               sum &= t[i];
   74|  2.89M|            }
   75|   361k|            sum &= (CLEARED_TOP_BITS | t[N - 1]);
   76|       |
   77|   361k|            return CT::Mask<W>::is_zero(sum ^ WordInfo<W>::max).value();
   78|   361k|         }();
pcurves_secp521r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp521r15Curve10fe_invert2ERKNS_6IntModINS2_7P521RepINS_13EllipticCurveINS2_6ParamsES5_E11FieldParamsEEEEE:
  115|    204|      static constexpr FieldElement fe_invert2(const FieldElement& x) {
  116|       |         // Addition chain from https://eprint.iacr.org/2014/852.pdf page 6
  117|       |
  118|    204|         FieldElement r = x.square();
  119|    204|         r *= x;
  120|    204|         r = r.square();
  121|    204|         r *= x;
  122|    204|         FieldElement rl = r;
  123|    204|         r.square_n(3);
  124|    204|         r *= rl;
  125|    204|         r.square_n(1);
  126|    204|         r *= x;
  127|    204|         const auto a7 = r;
  128|    204|         r.square_n(1);
  129|    204|         r *= x;
  130|    204|         rl = r;
  131|    204|         r.square_n(8);
  132|    204|         r *= rl;
  133|    204|         rl = r;
  134|    204|         r.square_n(16);
  135|    204|         r *= rl;
  136|    204|         rl = r;
  137|    204|         r.square_n(32);
  138|    204|         r *= rl;
  139|    204|         rl = r;
  140|    204|         r.square_n(64);
  141|    204|         r *= rl;
  142|    204|         rl = r;
  143|    204|         r.square_n(128);
  144|    204|         r *= rl;
  145|    204|         rl = r;
  146|    204|         r.square_n(256);
  147|    204|         r *= rl;
  148|    204|         r.square_n(7);
  149|    204|         r *= a7;
  150|    204|         r.square_n(2);
  151|       |
  152|    204|         return r;
  153|    204|      }
pcurves_secp521r1.cpp:_ZN5Botan6PCurve12_GLOBAL__N_19secp521r17P521RepINS_13EllipticCurveINS2_6ParamsES3_E11FieldParamsEE8from_repERKNSt3__15arrayImLm9EEE:
   95|    411|      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|    177|      constexpr static std::array<W, N> to_rep(const std::array<W, N>& x) { return x; }

_ZN5Botan18Keccak_Permutation5clearEv:
   37|    567|void Keccak_Permutation::clear() {
   38|    567|   state() = {};
   39|    567|   reset_cursor();
   40|    567|}
_ZN5Botan18Keccak_Permutation6absorbENSt3__14spanIKhLm18446744073709551615EEE:
   42|  9.03k|void Keccak_Permutation::absorb(std::span<const uint8_t> input) {
   43|  9.03k|   absorb_into_sponge(*this, input);
   44|  9.03k|}
_ZN5Botan18Keccak_Permutation7squeezeENSt3__14spanIhLm18446744073709551615EEE:
   46|   965k|void Keccak_Permutation::squeeze(std::span<uint8_t> output) {
   47|   965k|   squeeze_from_sponge(*this, output);
   48|   965k|}
_ZN5Botan18Keccak_Permutation6finishEv:
   50|  4.57k|void Keccak_Permutation::finish() {
   51|       |   // The padding for Keccak[c]-based functions spans the entire remaining
   52|       |   // byterate until the next permute() call. At most that could be an entire
   53|       |   // byterate. First are a few bits of "custom" padding defined by the using
   54|       |   // function (e.g. SHA-3 uses "01"), then the remaining space is filled with
   55|       |   // "pad10*1" (see NIST FIPS 202 Section 5.1) followed by a final permute().
   56|       |
   57|  4.57k|   auto& S = state();
   58|       |
   59|       |   // Apply the custom padding + the left-most 1-bit of "pad10*1" to the current
   60|       |   // (partial) word of the sponge state
   61|       |
   62|  4.57k|   const uint64_t start_of_padding = (m_padding.padding | uint64_t(1) << m_padding.bit_len);
   63|  4.57k|   S[cursor() / word_bytes] ^= start_of_padding << (8 * (cursor() % word_bytes));
   64|       |
   65|       |   // XOR'ing the 0-bits of "pad10*1" into the state is a NOOP
   66|       |
   67|       |   // If the custom padding + the left-most 1-bit of "pad10*1" had resulted in a
   68|       |   // byte-aligned "partial padding", the final 1-bit of of "pad10*1" could
   69|       |   // potentially override parts of the already-appended "start_of_padding".
   70|       |   // In case we ever introduce a Keccak-based function with such a need, we
   71|       |   // have to modify this padding algorithm.
   72|  4.57k|   BOTAN_DEBUG_ASSERT(m_padding.bit_len % 8 != 7);
  ------------------
  |  |  130|  4.57k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  4.57k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 4.57k]
  |  |  ------------------
  ------------------
   73|       |
   74|       |   // Append the final bit of "pad10*1" into the last word of the input range
   75|  4.57k|   S[(byte_rate() / word_bytes) - 1] ^= uint64_t(0x8000000000000000);
   76|       |
   77|       |   // Perform the final permutation and reset the state cursor
   78|  4.57k|   permute();
   79|  4.57k|   reset_cursor();
   80|       |
   81|  4.57k|   BOTAN_DEBUG_ASSERT(cursor() == 0);
  ------------------
  |  |  130|  4.57k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  4.57k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 4.57k]
  |  |  ------------------
  ------------------
   82|  4.57k|}
_ZN5Botan18Keccak_Permutation7permuteEv:
   84|  19.0k|void Keccak_Permutation::permute() {
   85|  19.0k|#if defined(BOTAN_HAS_KECCAK_PERM_AVX512)
   86|  19.0k|   if(CPUID::has(CPUID::Feature::AVX512)) {
  ------------------
  |  Branch (86:7): [True: 0, False: 19.0k]
  ------------------
   87|      0|      return permute_avx512();
   88|      0|   }
   89|  19.0k|#endif
   90|       |
   91|  19.0k|#if defined(BOTAN_HAS_KECCAK_PERM_BMI2)
   92|  19.0k|   if(CPUID::has(CPUID::Feature::BMI)) {
  ------------------
  |  Branch (92:7): [True: 19.0k, False: 0]
  ------------------
   93|  19.0k|      return permute_bmi2();
   94|  19.0k|   }
   95|      0|#endif
   96|       |
   97|      0|   static const uint64_t RC[24] = {0x0000000000000001, 0x0000000000008082, 0x800000000000808A, 0x8000000080008000,
   98|      0|                                   0x000000000000808B, 0x0000000080000001, 0x8000000080008081, 0x8000000000008009,
   99|      0|                                   0x000000000000008A, 0x0000000000000088, 0x0000000080008009, 0x000000008000000A,
  100|      0|                                   0x000000008000808B, 0x800000000000008B, 0x8000000000008089, 0x8000000000008003,
  101|      0|                                   0x8000000000008002, 0x8000000000000080, 0x000000000000800A, 0x800000008000000A,
  102|      0|                                   0x8000000080008081, 0x8000000000008080, 0x0000000080000001, 0x8000000080008008};
  103|       |
  104|      0|   uint64_t T[25];
  105|       |
  106|      0|   for(size_t i = 0; i != 24; i += 2) {
  ------------------
  |  Branch (106:22): [True: 0, False: 0]
  ------------------
  107|      0|      Keccak_Permutation_round(T, state().data(), RC[i + 0]);
  108|      0|      Keccak_Permutation_round(state().data(), T, RC[i + 1]);
  109|      0|   }
  110|      0|}

_ZN5Botan18Keccak_Permutation12permute_bmi2Ev:
   15|  19.0k|void BOTAN_FN_ISA_BMI2 Keccak_Permutation::permute_bmi2() {
   16|  19.0k|   static const uint64_t RC[24] = {0x0000000000000001, 0x0000000000008082, 0x800000000000808A, 0x8000000080008000,
   17|  19.0k|                                   0x000000000000808B, 0x0000000080000001, 0x8000000080008081, 0x8000000000008009,
   18|  19.0k|                                   0x000000000000008A, 0x0000000000000088, 0x0000000080008009, 0x000000008000000A,
   19|  19.0k|                                   0x000000008000808B, 0x800000000000008B, 0x8000000000008089, 0x8000000000008003,
   20|  19.0k|                                   0x8000000000008002, 0x8000000000000080, 0x000000000000800A, 0x800000008000000A,
   21|  19.0k|                                   0x8000000080008081, 0x8000000000008080, 0x0000000080000001, 0x8000000080008008};
   22|       |
   23|  19.0k|   uint64_t T[25];
   24|       |
   25|   248k|   for(size_t i = 0; i != 24; i += 2) {
  ------------------
  |  Branch (25:22): [True: 228k, False: 19.0k]
  ------------------
   26|   228k|      Keccak_Permutation_round(T, state().data(), RC[i + 0]);
   27|   228k|      Keccak_Permutation_round(state().data(), T, RC[i + 1]);
   28|   228k|   }
   29|  19.0k|}

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

_ZN5Botan16Ed448_PrivateKeyC1ERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEE:
   91|      5|Ed448_PrivateKey::Ed448_PrivateKey(const AlgorithmIdentifier& alg_id, std::span<const uint8_t> key_bits) {
   92|       |   // RFC 8410 Section 3: "the parameters MUST be absent".
   93|      5|   if(!alg_id.parameters_are_empty()) {
  ------------------
  |  Branch (93:7): [True: 1, False: 4]
  ------------------
   94|      1|      throw Decoding_Error("Unexpected parameters for Ed448 private key");
   95|      1|   }
   96|       |
   97|      4|   secure_vector<uint8_t> bits;
   98|      4|   BER_Decoder(key_bits, BER_Decoder::Limits::DER()).decode(bits, ASN1_Type::OctetString).verify_end();
   99|       |
  100|      4|   if(bits.size() != ED448_LEN) {
  ------------------
  |  Branch (100:7): [True: 3, False: 1]
  ------------------
  101|      3|      throw Decoding_Error("Invalid size for Ed448 private key");
  102|      3|   }
  103|      1|   auto pub = create_pk_from_sk(std::span(bits).first<ED448_LEN>());
  104|      1|   m_public = std::make_shared<const Ed448_PublicKey_Data>(pub);
  105|      1|   m_private = std::make_shared<const Ed448_PrivateKey_Data>(std::move(bits));
  106|      1|}

_ZN5Botan15X448_PrivateKeyC1ERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEE:
  117|      4|      X448_PrivateKey(ber_decode_sk(key_bits)) {
  118|       |   // RFC 8410 Section 3: "the parameters MUST be absent".
  119|      4|   if(!alg_id.parameters_are_empty()) {
  ------------------
  |  Branch (119:7): [True: 0, False: 4]
  ------------------
  120|      0|      throw Decoding_Error("Unexpected parameters for X448 private key");
  121|      0|   }
  122|      4|}
_ZN5Botan15X448_PrivateKeyC1ENSt3__14spanIKhLm18446744073709551615EEE:
  124|      1|X448_PrivateKey::X448_PrivateKey(std::span<const uint8_t> secret_key) {
  125|      1|   BOTAN_ARG_CHECK(secret_key.size() == X448_LEN, "Invalid size for X448 private key");
  ------------------
  |  |   35|      1|   do {                                                          \
  |  |   36|      1|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|      1|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 1]
  |  |  ------------------
  |  |   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]
  |  |  ------------------
  ------------------
  126|      1|   load_x448_keypair(secure_vector<uint8_t>(secret_key.begin(), secret_key.end()), m_public, m_private);
  127|      1|}
x448.cpp:_ZN5Botan12_GLOBAL__N_113ber_decode_skENSt3__14spanIKhLm18446744073709551615EEE:
   53|      4|secure_vector<uint8_t> ber_decode_sk(std::span<const uint8_t> key_bits) {
   54|      4|   secure_vector<uint8_t> decoded_bits;
   55|      4|   BER_Decoder(key_bits, BER_Decoder::Limits::DER()).decode(decoded_bits, ASN1_Type::OctetString).verify_end();
   56|      4|   if(decoded_bits.size() != X448_LEN) {
  ------------------
  |  Branch (56:7): [True: 2, False: 2]
  ------------------
   57|      2|      throw Decoding_Error("Invalid size for X448 private key");
   58|      2|   }
   59|      2|   return decoded_bits;
   60|      4|}
x448.cpp:_ZN5Botan12_GLOBAL__N_117load_x448_keypairENSt3__16vectorIhNS_16secure_allocatorIhEEEERNS1_10shared_ptrIKNS_19X448_PublicKey_DataEEERNS6_IKNS_20X448_PrivateKey_DataEEE:
   66|      1|                       std::shared_ptr<const X448_PrivateKey_Data>& sk_out) {
   67|      1|   BOTAN_ASSERT_NOMSG(secret.size() == X448_LEN);
  ------------------
  |  |   77|      1|   do {                                                                     \
  |  |   78|      1|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|      1|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 1]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|      1|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 1]
  |  |  ------------------
  ------------------
   68|      1|   std::array<uint8_t, X448_LEN> pub{};
   69|      1|   {
   70|      1|      auto scope = CT::scoped_poison(secret);
   71|      1|      x448_basepoint_from_data(pub, std::span(secret).first<X448_LEN>());
   72|      1|      CT::unpoison(pub);
   73|      1|   }
   74|      1|   pk_out = std::make_shared<const X448_PublicKey_Data>(pub);
   75|      1|   sk_out = std::make_shared<const X448_PrivateKey_Data>(std::move(secret));
   76|      1|}
_ZN5Botan20X448_PrivateKey_DataC2ENSt3__16vectorIhNS_16secure_allocatorIhEEEE:
   33|      1|      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|      1|void x448_basepoint_from_data(std::span<uint8_t, X448_LEN> mypublic, std::span<const uint8_t, X448_LEN> secret) {
   48|      1|   auto bp = x448_basepoint(decode_scalar(secret));
   49|      1|   auto bp_bytes = encode_point(bp);
   50|      1|   copy_mem(mypublic, bp_bytes);
   51|      1|}
_ZN5Botan19X448_PublicKey_DataC2ENSt3__15arrayIhLm56EEE:
   23|      1|      explicit X448_PublicKey_Data(std::array<uint8_t, X448_LEN> key) : m_key(key) {}

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

_ZN5Botan13DH_PrivateKeyC1ERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEE:
   70|    146|DH_PrivateKey::DH_PrivateKey(const AlgorithmIdentifier& alg_id, std::span<const uint8_t> key_bits) {
   71|    146|   m_private_key = std::make_shared<DL_PrivateKey>(alg_id, key_bits, DL_Group_Format::ANSI_X9_42);
   72|    146|   m_public_key = m_private_key->public_key();
   73|    146|}

_ZN5Botan13DilithiumModeC2ERKNS_3OIDE:
   74|     85|DilithiumMode::DilithiumMode(const OID& oid) : m_mode(dilithium_mode_from_oid(oid)) {}
_ZNK5Botan13DilithiumMode6is_aesEv:
  107|    328|bool DilithiumMode::is_aes() const {
  108|    328|   return m_mode == Dilithium4x4_AES || m_mode == Dilithium6x5_AES || m_mode == Dilithium8x7_AES;
  ------------------
  |  Branch (108:11): [True: 0, False: 328]
  |  Branch (108:41): [True: 0, False: 328]
  |  Branch (108:71): [True: 0, False: 328]
  ------------------
  109|    328|}
_ZNK5Botan13DilithiumMode9is_modernEv:
  111|    164|bool DilithiumMode::is_modern() const {
  112|    164|   return !is_aes();
  113|    164|}
_ZNK5Botan13DilithiumMode9is_ml_dsaEv:
  115|    656|bool DilithiumMode::is_ml_dsa() const {
  116|    656|   return m_mode == ML_DSA_4x4 || m_mode == ML_DSA_6x5 || m_mode == ML_DSA_8x7;
  ------------------
  |  Branch (116:11): [True: 100, False: 556]
  |  Branch (116:35): [True: 328, False: 228]
  |  Branch (116:59): [True: 228, False: 0]
  ------------------
  117|    656|}
_ZN5Botan20Dilithium_PrivateKeyC1ERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEE:
  434|     85|      Dilithium_PrivateKey(sk, DilithiumMode(alg_id.oid())) {
  435|       |   // The parameter set is identified by the OID; no parameters are defined.
  436|     85|   if(!alg_id.parameters_are_empty()) {
  ------------------
  |  Branch (436:7): [True: 0, False: 85]
  ------------------
  437|      0|      throw Decoding_Error("Unexpected parameters for ML-DSA/Dilithium private key");
  438|      0|   }
  439|     85|}
_ZN5Botan20Dilithium_PrivateKeyC1ENSt3__14spanIKhLm18446744073709551615EEENS_13DilithiumModeE:
  441|     85|Dilithium_PrivateKey::Dilithium_PrivateKey(std::span<const uint8_t> sk, DilithiumMode m) {
  442|     85|   DilithiumConstants mode(m);
  443|     85|   auto& codec = mode.keypair_codec();
  444|     85|   std::tie(m_public, m_private) = codec.decode_keypair(sk, std::move(mode));
  445|     85|}
dilithium.cpp:_ZN5Botan12_GLOBAL__N_123dilithium_mode_from_oidERKNS_3OIDE:
   64|     85|DilithiumMode::Mode dilithium_mode_from_oid(const OID& oid) {
   65|     85|   if(const auto name = oid.registered_name()) {
  ------------------
  |  Branch (65:18): [True: 85, False: 0]
  ------------------
   66|     85|      return dilithium_mode_from_string(*name);
   67|     85|   }
   68|       |
   69|      0|   throw Invalid_Argument(fmt("OID '{}' is not registered as a Dilithium/ML-DSA mode", oid));
   70|     85|}
dilithium.cpp:_ZN5Botan12_GLOBAL__N_126dilithium_mode_from_stringENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   32|     85|DilithiumMode::Mode dilithium_mode_from_string(std::string_view str) {
   33|     85|   if(str == "Dilithium-4x4-r3") {
  ------------------
  |  Branch (33:7): [True: 0, False: 85]
  ------------------
   34|      0|      return DilithiumMode::Dilithium4x4;
   35|      0|   }
   36|     85|   if(str == "Dilithium-4x4-AES-r3") {
  ------------------
  |  Branch (36:7): [True: 0, False: 85]
  ------------------
   37|      0|      return DilithiumMode::Dilithium4x4_AES;
   38|      0|   }
   39|     85|   if(str == "Dilithium-6x5-r3") {
  ------------------
  |  Branch (39:7): [True: 0, False: 85]
  ------------------
   40|      0|      return DilithiumMode::Dilithium6x5;
   41|      0|   }
   42|     85|   if(str == "Dilithium-6x5-AES-r3") {
  ------------------
  |  Branch (42:7): [True: 0, False: 85]
  ------------------
   43|      0|      return DilithiumMode::Dilithium6x5_AES;
   44|      0|   }
   45|     85|   if(str == "Dilithium-8x7-r3") {
  ------------------
  |  Branch (45:7): [True: 0, False: 85]
  ------------------
   46|      0|      return DilithiumMode::Dilithium8x7;
   47|      0|   }
   48|     85|   if(str == "Dilithium-8x7-AES-r3") {
  ------------------
  |  Branch (48:7): [True: 0, False: 85]
  ------------------
   49|      0|      return DilithiumMode::Dilithium8x7_AES;
   50|      0|   }
   51|     85|   if(str == "ML-DSA-4x4") {
  ------------------
  |  Branch (51:7): [True: 13, False: 72]
  ------------------
   52|     13|      return DilithiumMode::ML_DSA_4x4;
   53|     13|   }
   54|     72|   if(str == "ML-DSA-6x5") {
  ------------------
  |  Branch (54:7): [True: 42, False: 30]
  ------------------
   55|     42|      return DilithiumMode::ML_DSA_6x5;
   56|     42|   }
   57|     30|   if(str == "ML-DSA-8x7") {
  ------------------
  |  Branch (57:7): [True: 30, False: 0]
  ------------------
   58|     30|      return DilithiumMode::ML_DSA_8x7;
   59|     30|   }
   60|       |
   61|      0|   throw Invalid_Argument(fmt("'{}' is not a valid Dilithium mode name", str));
   62|     30|}

_ZN5Botan15Dilithium_Algos17encode_public_keyENS_10StrongSpanIKNS_6StrongINSt3__16vectorIhNS3_9allocatorIhEEEENS_20DilithiumPublicSeed_EJEEEEERKNS_8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNSC_6DomainE0EEERKNS_18DilithiumConstantsE:
  332|     79|                                               const DilithiumConstants& mode) {
  333|     79|   DilithiumSerializedPublicKey pk(mode.public_key_bytes());
  334|     79|   BufferStuffer stuffer(pk);
  335|       |
  336|     79|   stuffer.append(rho);
  337|    504|   for(const auto& p : t1) {
  ------------------
  |  Branch (337:22): [True: 504, False: 79]
  ------------------
  338|    504|      poly_pack_t1(p, stuffer);
  339|    504|   }
  340|       |
  341|     79|   BOTAN_ASSERT_NOMSG(stuffer.full());
  ------------------
  |  |   77|     79|   do {                                                                     \
  |  |   78|     79|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|     79|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 79]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|     79|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 79]
  |  |  ------------------
  ------------------
  342|     79|   return pk;
  343|     79|}
_ZN5Botan15Dilithium_Algos14expand_keypairENS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_24DilithiumSeedRandomness_EJEEENS_18DilithiumConstantsE:
  668|     85|DilithiumInternalKeypair expand_keypair(DilithiumSeedRandomness xi, DilithiumConstants mode) {
  669|     85|   if(xi.size() != DilithiumConstants::SEED_RANDOMNESS_BYTES) {
  ------------------
  |  Branch (669:7): [True: 6, False: 79]
  ------------------
  670|      6|      throw Decoding_Error("Invalid ML-DSA seed size");
  671|      6|   }
  672|     79|   const auto& sympriv = mode.symmetric_primitives();
  673|     79|   CT::poison(xi);
  674|       |
  675|     79|   auto [rho, rhoprime, K] = sympriv.H(xi);
  676|     79|   CT::unpoison(rho);  // rho is public (seed for the public matrix A)
  677|       |
  678|     79|   const auto A = Dilithium_Algos::expand_A(rho, mode);
  679|     79|   auto [s1, s2] = Dilithium_Algos::expand_s(rhoprime, mode);
  680|     79|   auto [t1, t0] = Dilithium_Algos::compute_t1_and_t0(A, s1, s2);
  681|       |
  682|     79|   CT::unpoison(t1);  // part of the public key
  683|       |
  684|     79|   DilithiumInternalKeypair keypair{
  685|     79|      std::make_shared<Dilithium_PublicKeyInternal>(mode, std::move(rho), std::move(t1)),
  686|     79|      std::make_shared<Dilithium_PrivateKeyInternal>(
  687|     79|         std::move(mode), std::move(xi), std::move(K), std::move(s1), std::move(s2), std::move(t0)),
  688|     79|   };
  689|       |
  690|     79|   CT::unpoison(*keypair.second);
  691|       |
  692|     79|   return keypair;
  693|     85|}
_ZN5Botan15Dilithium_Algos8expand_AENS_10StrongSpanIKNS_6StrongINSt3__16vectorIhNS3_9allocatorIhEEEENS_20DilithiumPublicSeed_EJEEEEERKNS_18DilithiumConstantsE:
  701|     79|DilithiumPolyMatNTT expand_A(StrongSpan<const DilithiumSeedRho> rho, const DilithiumConstants& mode) {
  702|     79|   DilithiumPolyMatNTT A(mode.k(), mode.l());
  703|    583|   for(uint8_t r = 0; r < mode.k(); ++r) {
  ------------------
  |  Branch (703:23): [True: 504, False: 79]
  ------------------
  704|  3.40k|      for(uint8_t s = 0; s < mode.l(); ++s) {
  ------------------
  |  Branch (704:26): [True: 2.90k, False: 504]
  ------------------
  705|  2.90k|         sample_ntt_uniform(rho, A[r][s], load_le(std::array{s, r}), mode);
  706|  2.90k|      }
  707|    504|   }
  708|     79|   return A;
  709|     79|}
_ZN5Botan15Dilithium_Algos8expand_sENS_10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_22DilithiumSeedRhoPrime_EJEEEEERKNS_18DilithiumConstantsE:
  715|     79|                                                       const DilithiumConstants& mode) {
  716|     79|   auto result = std::make_pair(DilithiumPolyVec(mode.l()), DilithiumPolyVec(mode.k()));
  717|     79|   auto& [s1, s2] = result;
  718|       |
  719|     79|   uint16_t nonce = 0;
  720|    437|   for(auto& p : s1) {
  ------------------
  |  Branch (720:16): [True: 437, False: 79]
  ------------------
  721|    437|      sample_uniform_eta(rhoprime, p, nonce++, mode);
  722|    437|   }
  723|       |
  724|    504|   for(auto& p : s2) {
  ------------------
  |  Branch (724:16): [True: 504, False: 79]
  ------------------
  725|    504|      sample_uniform_eta(rhoprime, p, nonce++, mode);
  726|    504|   }
  727|       |
  728|     79|   return result;
  729|     79|}
_ZN5Botan15Dilithium_Algos11power2roundERKNS_8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS1_6DomainE0EEE:
  752|     79|std::pair<DilithiumPolyVec, DilithiumPolyVec> power2round(const DilithiumPolyVec& vec) {
  753|       |   // This procedure is taken verbatim from Dilithium's reference implementation.
  754|     79|   auto power2round = [d = DilithiumConstants::D](int32_t r) -> std::pair<int32_t, int32_t> {
  755|     79|      const int32_t r1 = (r + (1 << (d - 1)) - 1) >> d;
  756|     79|      const int32_t r0 = r - (r1 << d);
  757|     79|      return {r1, r0};
  758|     79|   };
  759|       |
  760|     79|   auto result = std::make_pair(DilithiumPolyVec(vec.size()), DilithiumPolyVec(vec.size()));
  761|       |
  762|    583|   for(size_t i = 0; i < vec.size(); ++i) {
  ------------------
  |  Branch (762:22): [True: 504, False: 79]
  ------------------
  763|   129k|      for(size_t j = 0; j < vec[i].size(); ++j) {
  ------------------
  |  Branch (763:25): [True: 129k, False: 504]
  ------------------
  764|   129k|         std::tie(result.first[i][j], result.second[i][j]) = power2round(vec[i][j]);
  765|   129k|      }
  766|    504|   }
  767|       |
  768|     79|   return result;
  769|     79|}
dilithium_algos.cpp:_ZN5Botan15Dilithium_Algos12_GLOBAL__N_112poly_pack_t1ERKNS_8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS2_6DomainE0EEERNS_13BufferStufferE:
  102|    504|void poly_pack_t1(const DilithiumPoly& p, BufferStuffer& stuffer) {
  103|    504|   constexpr auto b = (1 << (bitlen(DilithiumConstants::Q - 1) - DilithiumConstants::D)) - 1;
  104|    504|   poly_pack<0, b>(p, stuffer);
  105|    504|}
dilithium_algos.cpp:_ZN5Botan15Dilithium_Algos12_GLOBAL__N_19poly_packILi0ELi1023ETkNS_8CRYSTALS14crystals_traitENS_19DilithiumPolyTraitsELNS3_6DomainE0EEEvRKNS3_10PolynomialIT1_XT2_EEERNS_13BufferStufferE:
   60|    504|constexpr void poly_pack(const CRYSTALS::Polynomial<PolyTrait, D>& p, BufferStuffer& stuffer) {
   61|    504|   if constexpr(a == 0) {
   62|       |      // If `a` is 0, we assume SimpleBitPack (Algorithm 16) where the
   63|       |      // coefficients are in the range [0, b].
   64|    504|      CRYSTALS::pack<b>(p, stuffer);
   65|       |   } else {
   66|       |      // Otherwise, for BitPack (Algorithm 17), we must map the coefficients to
   67|       |      // positive values as they are in the range [-a, b].
   68|       |      CRYSTALS::pack<a + b>(p, stuffer, map_range<b>);
   69|       |   }
   70|    504|}
dilithium_algos.cpp:_ZN5Botan15Dilithium_Algos12_GLOBAL__N_117compute_t1_and_t0ERKNS_8CRYSTALS16PolynomialMatrixINS_19DilithiumPolyTraitsEEERKNS2_16PolynomialVectorIS4_LNS2_6DomainE0EEESC_:
  315|     79|                                                                const DilithiumPolyVec& s2) {
  316|     79|   auto t_hat = A * ntt(s1.clone());
  317|     79|   t_hat.reduce();
  318|     79|   auto t = inverse_ntt(std::move(t_hat));
  319|     79|   t += s2;
  320|     79|   t.conditional_add_q();
  321|       |
  322|     79|   return Dilithium_Algos::power2round(t);
  323|     79|}
dilithium_algos.cpp:_ZN5Botan15Dilithium_Algos12_GLOBAL__N_118sample_ntt_uniformENS_10StrongSpanIKNS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS_20DilithiumPublicSeed_EJEEEEERNS_8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNSD_6DomainE1EEEtRKNS_18DilithiumConstantsE:
  563|  2.90k|                        const DilithiumConstants& mode) {
  564|       |   /**
  565|       |    * A generator that returns the next coefficient sampled from the XOF,
  566|       |    * according to: NIST FIPS 204, Algorithm 14 (CoeffFromThreeBytes).
  567|       |    */
  568|  2.90k|   auto xof = mode.symmetric_primitives().H(rho, nonce);
  569|  2.90k|   auto bounded_xof = Bounded_XOF<DilithiumConstants::SAMPLE_NTT_POLY_FROM_XOF_BOUND>(*xof);
  570|       |
  571|   743k|   for(auto& coeff : p) {
  ------------------
  |  Branch (571:20): [True: 743k, False: 2.90k]
  ------------------
  572|   743k|      coeff =
  573|   743k|         bounded_xof.next<3>([](const auto bytes) { return make_uint32(0, bytes[2], bytes[1], bytes[0]) & 0x7FFFFF; },
  574|   743k|                             [](const uint32_t z) { return z < DilithiumConstants::Q; });
  575|   743k|   }
  576|       |
  577|  2.90k|   BOTAN_DEBUG_ASSERT(p.ct_validate_value_range(0, DilithiumConstants::Q - 1));
  ------------------
  |  |  130|  2.90k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  2.90k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 2.90k]
  |  |  ------------------
  ------------------
  578|  2.90k|}
dilithium_algos.cpp:_ZZN5Botan15Dilithium_Algos12_GLOBAL__N_118sample_ntt_uniformENS_10StrongSpanIKNS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS_20DilithiumPublicSeed_EJEEEEERNS_8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNSD_6DomainE1EEEtRKNS_18DilithiumConstantsEENK3$_0clINS4_5arrayIhLm3EEEEEDaT_:
  573|   744k|         bounded_xof.next<3>([](const auto bytes) { return make_uint32(0, bytes[2], bytes[1], bytes[0]) & 0x7FFFFF; },
dilithium_algos.cpp:_ZZN5Botan15Dilithium_Algos12_GLOBAL__N_118sample_ntt_uniformENS_10StrongSpanIKNS_6StrongINSt3__16vectorIhNS4_9allocatorIhEEEENS_20DilithiumPublicSeed_EJEEEEERNS_8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNSD_6DomainE1EEEtRKNS_18DilithiumConstantsEENK3$_1clEj:
  574|   744k|                             [](const uint32_t z) { return z < DilithiumConstants::Q; });
dilithium_algos.cpp:_ZN5Botan15Dilithium_Algos12_GLOBAL__N_118sample_uniform_etaENS_10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_22DilithiumSeedRhoPrime_EJEEEEERNS_8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNSD_6DomainE0EEEtRKNS_18DilithiumConstantsE:
  641|    941|                        const DilithiumConstants& mode) {
  642|    941|   using Eta = DilithiumConstants::DilithiumEta;
  643|       |
  644|    941|   auto xof = mode.symmetric_primitives().H(rhoprime, nonce);
  645|    941|   switch(mode.eta()) {
  ------------------
  |  Branch (645:11): [True: 941, False: 0]
  ------------------
  646|    501|      case Eta::_2:
  ------------------
  |  Branch (646:7): [True: 501, False: 440]
  ------------------
  647|    501|         sample_uniform_eta<Eta::_2>(p, *xof);
  648|    501|         break;
  649|    440|      case Eta::_4:
  ------------------
  |  Branch (649:7): [True: 440, False: 501]
  ------------------
  650|    440|         sample_uniform_eta<Eta::_4>(p, *xof);
  651|    440|         break;
  652|    941|   }
  653|       |
  654|       |   // Rejection sampling is done. Secret polynomial can be repoisoned.
  655|    941|   CT::poison(p);
  656|       |
  657|    941|   BOTAN_DEBUG_ASSERT(p.ct_validate_value_range(-static_cast<int32_t>(mode.eta()), mode.eta()));
  ------------------
  |  |  130|    941|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    941|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 941]
  |  |  ------------------
  ------------------
  658|    941|}
dilithium_algos.cpp:_ZN5Botan15Dilithium_Algos12_GLOBAL__N_118sample_uniform_etaILNS_18DilithiumConstants12DilithiumEtaE2EEEvRNS_8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS5_6DomainE0EEERNS_3XOFE:
  604|    501|void sample_uniform_eta(DilithiumPoly& p, Botan::XOF& xof) {
  605|       |   // A generator that returns the next coefficient sampled from the XOF. As the
  606|       |   // sampling uses half-bytes, this keeps track of the additionally sampled
  607|       |   // coefficient as needed.
  608|    501|   auto next_coeff = [bounded_xof = Bounded_XOF<DilithiumConstants::SAMPLE_POLY_FROM_XOF_BOUND>(xof),
  609|    501|                      stashed_coeff = std::optional<int32_t>{}]() mutable -> int32_t {
  610|    501|      if(auto stashed = std::exchange(stashed_coeff, std::nullopt)) {
  611|    501|         return *stashed;
  612|    501|      }
  613|       |
  614|    501|      BOTAN_DEBUG_ASSERT(!stashed_coeff.has_value());
  615|    501|      while(true) {
  616|    501|         const auto b = bounded_xof.next_byte();
  617|    501|         const auto z0 = coeff_from_halfbyte<eta>(b & 0x0F);
  618|    501|         const auto z1 = coeff_from_halfbyte<eta>(b >> 4);
  619|       |
  620|    501|         if(z0.has_value()) {
  621|    501|            stashed_coeff = z1;  // keep candidate z1 for the next invocation
  622|    501|            return *z0;
  623|    501|         } else if(z1.has_value()) {
  624|       |            // z0 was invalid, z1 is valid, nothing to stash
  625|    501|            return *z1;
  626|    501|         }
  627|    501|      }
  628|    501|   };
  629|       |
  630|   128k|   for(auto& coeff : p) {
  ------------------
  |  Branch (630:20): [True: 128k, False: 501]
  ------------------
  631|   128k|      coeff = next_coeff();
  632|   128k|   }
  633|    501|}
dilithium_algos.cpp:_ZZN5Botan15Dilithium_Algos12_GLOBAL__N_118sample_uniform_etaILNS_18DilithiumConstants12DilithiumEtaE2EEEvRNS_8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS5_6DomainE0EEERNS_3XOFEENUlvE_clEv:
  609|   128k|                      stashed_coeff = std::optional<int32_t>{}]() mutable -> int32_t {
  610|   128k|      if(auto stashed = std::exchange(stashed_coeff, std::nullopt)) {
  ------------------
  |  Branch (610:15): [True: 60.0k, False: 68.2k]
  ------------------
  611|  60.0k|         return *stashed;
  612|  60.0k|      }
  613|       |
  614|  68.2k|      BOTAN_DEBUG_ASSERT(!stashed_coeff.has_value());
  ------------------
  |  |  130|  68.2k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  68.2k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 68.2k]
  |  |  ------------------
  ------------------
  615|  68.4k|      while(true) {
  ------------------
  |  Branch (615:13): [True: 68.4k, Folded]
  ------------------
  616|  68.4k|         const auto b = bounded_xof.next_byte();
  617|  68.4k|         const auto z0 = coeff_from_halfbyte<eta>(b & 0x0F);
  618|  68.4k|         const auto z1 = coeff_from_halfbyte<eta>(b >> 4);
  619|       |
  620|  68.4k|         if(z0.has_value()) {
  ------------------
  |  Branch (620:13): [True: 64.2k, False: 4.18k]
  ------------------
  621|  64.2k|            stashed_coeff = z1;  // keep candidate z1 for the next invocation
  622|  64.2k|            return *z0;
  623|  64.2k|         } else if(z1.has_value()) {
  ------------------
  |  Branch (623:20): [True: 3.92k, False: 260]
  ------------------
  624|       |            // z0 was invalid, z1 is valid, nothing to stash
  625|  3.92k|            return *z1;
  626|  3.92k|         }
  627|  68.4k|      }
  628|  68.2k|   };
dilithium_algos.cpp:_ZN5Botan15Dilithium_Algos12_GLOBAL__N_119coeff_from_halfbyteILNS_18DilithiumConstants12DilithiumEtaE2EEENSt3__18optionalIiEEh:
  586|   136k|std::optional<int32_t> coeff_from_halfbyte(uint8_t b) {
  587|   136k|   BOTAN_DEBUG_ASSERT(b < 16);
  ------------------
  |  |  130|   136k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|   136k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 136k]
  |  |  ------------------
  ------------------
  588|       |
  589|   136k|   if constexpr(eta == DilithiumConstants::DilithiumEta::_2) {
  590|   136k|      if(CT::driveby_unpoison(b < 15)) {
  ------------------
  |  Branch (590:10): [True: 128k, False: 8.43k]
  ------------------
  591|   128k|         b = b - (205U * b >> 10) * 5;  // b = b mod 5
  592|   128k|         return 2 - b;
  593|   128k|      }
  594|       |   } else if constexpr(eta == DilithiumConstants::DilithiumEta::_4) {
  595|       |      if(CT::driveby_unpoison(b < 9)) {
  596|       |         return 4 - b;
  597|       |      }
  598|       |   }
  599|       |
  600|  8.43k|   return std::nullopt;
  601|   136k|}
dilithium_algos.cpp:_ZN5Botan15Dilithium_Algos12_GLOBAL__N_118sample_uniform_etaILNS_18DilithiumConstants12DilithiumEtaE4EEEvRNS_8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS5_6DomainE0EEERNS_3XOFE:
  604|    440|void sample_uniform_eta(DilithiumPoly& p, Botan::XOF& xof) {
  605|       |   // A generator that returns the next coefficient sampled from the XOF. As the
  606|       |   // sampling uses half-bytes, this keeps track of the additionally sampled
  607|       |   // coefficient as needed.
  608|    440|   auto next_coeff = [bounded_xof = Bounded_XOF<DilithiumConstants::SAMPLE_POLY_FROM_XOF_BOUND>(xof),
  609|    440|                      stashed_coeff = std::optional<int32_t>{}]() mutable -> int32_t {
  610|    440|      if(auto stashed = std::exchange(stashed_coeff, std::nullopt)) {
  611|    440|         return *stashed;
  612|    440|      }
  613|       |
  614|    440|      BOTAN_DEBUG_ASSERT(!stashed_coeff.has_value());
  615|    440|      while(true) {
  616|    440|         const auto b = bounded_xof.next_byte();
  617|    440|         const auto z0 = coeff_from_halfbyte<eta>(b & 0x0F);
  618|    440|         const auto z1 = coeff_from_halfbyte<eta>(b >> 4);
  619|       |
  620|    440|         if(z0.has_value()) {
  621|    440|            stashed_coeff = z1;  // keep candidate z1 for the next invocation
  622|    440|            return *z0;
  623|    440|         } else if(z1.has_value()) {
  624|       |            // z0 was invalid, z1 is valid, nothing to stash
  625|    440|            return *z1;
  626|    440|         }
  627|    440|      }
  628|    440|   };
  629|       |
  630|   112k|   for(auto& coeff : p) {
  ------------------
  |  Branch (630:20): [True: 112k, False: 440]
  ------------------
  631|   112k|      coeff = next_coeff();
  632|   112k|   }
  633|    440|}
dilithium_algos.cpp:_ZZN5Botan15Dilithium_Algos12_GLOBAL__N_118sample_uniform_etaILNS_18DilithiumConstants12DilithiumEtaE4EEEvRNS_8CRYSTALS10PolynomialINS_19DilithiumPolyTraitsELNS5_6DomainE0EEERNS_3XOFEENUlvE_clEv:
  609|   112k|                      stashed_coeff = std::optional<int32_t>{}]() mutable -> int32_t {
  610|   112k|      if(auto stashed = std::exchange(stashed_coeff, std::nullopt)) {
  ------------------
  |  Branch (610:15): [True: 31.7k, False: 80.9k]
  ------------------
  611|  31.7k|         return *stashed;
  612|  31.7k|      }
  613|       |
  614|  80.9k|      BOTAN_DEBUG_ASSERT(!stashed_coeff.has_value());
  ------------------
  |  |  130|  80.9k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  80.9k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 80.9k]
  |  |  ------------------
  ------------------
  615|   100k|      while(true) {
  ------------------
  |  Branch (615:13): [True: 100k, Folded]
  ------------------
  616|   100k|         const auto b = bounded_xof.next_byte();
  617|   100k|         const auto z0 = coeff_from_halfbyte<eta>(b & 0x0F);
  618|   100k|         const auto z1 = coeff_from_halfbyte<eta>(b >> 4);
  619|       |
  620|   100k|         if(z0.has_value()) {
  ------------------
  |  Branch (620:13): [True: 56.2k, False: 44.0k]
  ------------------
  621|  56.2k|            stashed_coeff = z1;  // keep candidate z1 for the next invocation
  622|  56.2k|            return *z0;
  623|  56.2k|         } else if(z1.has_value()) {
  ------------------
  |  Branch (623:20): [True: 24.6k, False: 19.4k]
  ------------------
  624|       |            // z0 was invalid, z1 is valid, nothing to stash
  625|  24.6k|            return *z1;
  626|  24.6k|         }
  627|   100k|      }
  628|  80.9k|   };
dilithium_algos.cpp:_ZN5Botan15Dilithium_Algos12_GLOBAL__N_119coeff_from_halfbyteILNS_18DilithiumConstants12DilithiumEtaE4EEENSt3__18optionalIiEEh:
  586|   200k|std::optional<int32_t> coeff_from_halfbyte(uint8_t b) {
  587|   200k|   BOTAN_DEBUG_ASSERT(b < 16);
  ------------------
  |  |  130|   200k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|   200k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 200k]
  |  |  ------------------
  ------------------
  588|       |
  589|       |   if constexpr(eta == DilithiumConstants::DilithiumEta::_2) {
  590|       |      if(CT::driveby_unpoison(b < 15)) {
  591|       |         b = b - (205U * b >> 10) * 5;  // b = b mod 5
  592|       |         return 2 - b;
  593|       |      }
  594|   200k|   } else if constexpr(eta == DilithiumConstants::DilithiumEta::_4) {
  595|   200k|      if(CT::driveby_unpoison(b < 9)) {
  ------------------
  |  Branch (595:10): [True: 112k, False: 87.8k]
  ------------------
  596|   112k|         return 4 - b;
  597|   112k|      }
  598|   200k|   }
  599|       |
  600|  87.8k|   return std::nullopt;
  601|   200k|}
dilithium_algos.cpp:_ZZN5Botan15Dilithium_Algos11power2roundERKNS_8CRYSTALS16PolynomialVectorINS_19DilithiumPolyTraitsELNS1_6DomainE0EEEENK3$_0clEi:
  754|   129k|   auto power2round = [d = DilithiumConstants::D](int32_t r) -> std::pair<int32_t, int32_t> {
  755|   129k|      const int32_t r1 = (r + (1 << (d - 1)) - 1) >> d;
  756|   129k|      const int32_t r0 = r - (r1 << d);
  757|   129k|      return {r1, r0};
  758|   129k|   };

_ZN5Botan18DilithiumConstantsD2Ev:
   57|    571|DilithiumConstants::~DilithiumConstants() = default;
_ZN5Botan18DilithiumConstantsC2ENS_13DilithiumModeE:
   60|    164|      m_mode(mode),
   61|    164|      m_public_key_hash_bytes(public_key_hash_size(m_mode)),
   62|    164|      m_commitment_hash_full_bytes(commitment_hash_full_size(m_mode)) {
   63|    164|   switch(m_mode.mode()) {
   64|      0|      case Botan::DilithiumMode::Dilithium4x4:
  ------------------
  |  Branch (64:7): [True: 0, False: 164]
  ------------------
   65|      0|      case Botan::DilithiumMode::Dilithium4x4_AES:
  ------------------
  |  Branch (65:7): [True: 0, False: 164]
  ------------------
   66|     25|      case Botan::DilithiumMode::ML_DSA_4x4:
  ------------------
  |  Branch (66:7): [True: 25, False: 139]
  ------------------
   67|     25|         m_tau = DilithiumTau::_39;
   68|     25|         m_lambda = DilithiumLambda::_128;
   69|     25|         m_gamma1 = DilithiumGamma1::ToThe17th;
   70|     25|         m_gamma2 = DilithiumGamma2::Qminus1DividedBy88;
   71|     25|         m_k = 4;
   72|     25|         m_l = 4;
   73|     25|         m_eta = DilithiumEta::_2;
   74|     25|         m_beta = DilithiumBeta::_78;
   75|     25|         m_omega = DilithiumOmega::_80;
   76|     25|         break;
   77|      0|      case Botan::DilithiumMode::Dilithium6x5:
  ------------------
  |  Branch (77:7): [True: 0, False: 164]
  ------------------
   78|      0|      case Botan::DilithiumMode::Dilithium6x5_AES:
  ------------------
  |  Branch (78:7): [True: 0, False: 164]
  ------------------
   79|     82|      case Botan::DilithiumMode::ML_DSA_6x5:
  ------------------
  |  Branch (79:7): [True: 82, False: 82]
  ------------------
   80|     82|         m_tau = DilithiumTau::_49;
   81|     82|         m_lambda = DilithiumLambda::_192;
   82|     82|         m_gamma1 = DilithiumGamma1::ToThe19th;
   83|     82|         m_gamma2 = DilithiumGamma2::Qminus1DividedBy32;
   84|     82|         m_k = 6;
   85|     82|         m_l = 5;
   86|     82|         m_eta = DilithiumEta::_4;
   87|     82|         m_beta = DilithiumBeta::_196;
   88|     82|         m_omega = DilithiumOmega::_55;
   89|     82|         break;
   90|      0|      case Botan::DilithiumMode::Dilithium8x7:
  ------------------
  |  Branch (90:7): [True: 0, False: 164]
  ------------------
   91|      0|      case Botan::DilithiumMode::Dilithium8x7_AES:
  ------------------
  |  Branch (91:7): [True: 0, False: 164]
  ------------------
   92|     57|      case Botan::DilithiumMode::ML_DSA_8x7:
  ------------------
  |  Branch (92:7): [True: 57, False: 107]
  ------------------
   93|     57|         m_tau = DilithiumTau::_60;
   94|     57|         m_lambda = DilithiumLambda::_256;
   95|     57|         m_gamma1 = DilithiumGamma1::ToThe19th;
   96|     57|         m_gamma2 = DilithiumGamma2::Qminus1DividedBy32;
   97|     57|         m_k = 8;
   98|     57|         m_l = 7;
   99|     57|         m_eta = DilithiumEta::_2;
  100|     57|         m_beta = DilithiumBeta::_120;
  101|     57|         m_omega = DilithiumOmega::_75;
  102|     57|         break;
  103|      0|      default:
  ------------------
  |  Branch (103:7): [True: 0, False: 164]
  ------------------
  104|      0|         BOTAN_ASSERT_UNREACHABLE();
  ------------------
  |  |  163|      0|#define BOTAN_ASSERT_UNREACHABLE() Botan::assert_unreachable(__FILE__, __LINE__)
  ------------------
  105|    164|   }
  106|       |
  107|    164|   const auto s1_bytes = 32 * m_l * bitlen(2 * m_eta);
  108|    164|   const auto s2_bytes = 32 * m_k * bitlen(2 * m_eta);
  109|    164|   const auto t0_bytes = 32 * m_k * D;
  110|    164|   const auto t1_bytes = 32 * m_k * (bitlen(static_cast<uint32_t>(Q) - 1) - D);
  111|    164|   const auto z_bytes = 32 * m_l * (1 + bitlen(m_gamma1 - 1));
  112|    164|   const auto hint_bytes = m_omega + m_k;
  113|       |
  114|    164|   m_private_key_bytes =
  115|    164|      SEED_RHO_BYTES + SEED_SIGNING_KEY_BYTES + m_public_key_hash_bytes + s1_bytes + s2_bytes + t0_bytes;
  116|    164|   m_public_key_bytes = SEED_RHO_BYTES + t1_bytes;
  117|    164|   m_signature_bytes = m_commitment_hash_full_bytes + z_bytes + hint_bytes;
  118|    164|   m_serialized_commitment_bytes = 32 * m_k * bitlen(((Q - 1) / (2 * m_gamma2)) - 1);
  119|       |
  120|    164|   m_symmetric_primitives = Dilithium_Symmetric_Primitives_Base::create(*this);
  121|    164|   m_keypair_codec = Dilithium_Keypair_Codec::create(mode);
  122|    164|}
dilithium_constants.cpp:_ZN5Botan12_GLOBAL__N_120public_key_hash_sizeENS_13DilithiumModeE:
   20|    164|uint32_t public_key_hash_size(DilithiumMode mode) {
   21|    164|   switch(mode.mode()) {
  ------------------
  |  Branch (21:11): [True: 164, False: 0]
  ------------------
   22|     25|      case DilithiumMode::ML_DSA_4x4:
  ------------------
  |  Branch (22:7): [True: 25, False: 139]
  ------------------
   23|    107|      case DilithiumMode::ML_DSA_6x5:
  ------------------
  |  Branch (23:7): [True: 82, False: 82]
  ------------------
   24|    164|      case DilithiumMode::ML_DSA_8x7:
  ------------------
  |  Branch (24:7): [True: 57, False: 107]
  ------------------
   25|    164|         return 64;
   26|      0|      case DilithiumMode::Dilithium4x4:
  ------------------
  |  Branch (26:7): [True: 0, False: 164]
  ------------------
   27|      0|      case DilithiumMode::Dilithium4x4_AES:
  ------------------
  |  Branch (27:7): [True: 0, False: 164]
  ------------------
   28|      0|      case DilithiumMode::Dilithium6x5:
  ------------------
  |  Branch (28:7): [True: 0, False: 164]
  ------------------
   29|      0|      case DilithiumMode::Dilithium6x5_AES:
  ------------------
  |  Branch (29:7): [True: 0, False: 164]
  ------------------
   30|      0|      case DilithiumMode::Dilithium8x7:
  ------------------
  |  Branch (30:7): [True: 0, False: 164]
  ------------------
   31|      0|      case DilithiumMode::Dilithium8x7_AES:
  ------------------
  |  Branch (31:7): [True: 0, False: 164]
  ------------------
   32|      0|         return 32;
   33|    164|   }
   34|      0|   BOTAN_ASSERT_UNREACHABLE();
  ------------------
  |  |  163|      0|#define BOTAN_ASSERT_UNREACHABLE() Botan::assert_unreachable(__FILE__, __LINE__)
  ------------------
   35|      0|}
dilithium_constants.cpp:_ZN5Botan12_GLOBAL__N_125commitment_hash_full_sizeENS_13DilithiumModeE:
   37|    164|uint32_t commitment_hash_full_size(DilithiumMode mode) {
   38|    164|   switch(mode.mode()) {
  ------------------
  |  Branch (38:11): [True: 164, False: 0]
  ------------------
   39|      0|      case DilithiumMode::Dilithium4x4:
  ------------------
  |  Branch (39:7): [True: 0, False: 164]
  ------------------
   40|      0|      case DilithiumMode::Dilithium4x4_AES:
  ------------------
  |  Branch (40:7): [True: 0, False: 164]
  ------------------
   41|      0|      case DilithiumMode::Dilithium6x5:
  ------------------
  |  Branch (41:7): [True: 0, False: 164]
  ------------------
   42|      0|      case DilithiumMode::Dilithium6x5_AES:
  ------------------
  |  Branch (42:7): [True: 0, False: 164]
  ------------------
   43|      0|      case DilithiumMode::Dilithium8x7:
  ------------------
  |  Branch (43:7): [True: 0, False: 164]
  ------------------
   44|      0|      case DilithiumMode::Dilithium8x7_AES:
  ------------------
  |  Branch (44:7): [True: 0, False: 164]
  ------------------
   45|     25|      case DilithiumMode::ML_DSA_4x4:
  ------------------
  |  Branch (45:7): [True: 25, False: 139]
  ------------------
   46|     25|         return 32;
   47|     82|      case DilithiumMode::ML_DSA_6x5:
  ------------------
  |  Branch (47:7): [True: 82, False: 82]
  ------------------
   48|     82|         return 48;
   49|     57|      case DilithiumMode::ML_DSA_8x7:
  ------------------
  |  Branch (49:7): [True: 57, False: 107]
  ------------------
   50|     57|         return 64;
   51|    164|   }
   52|      0|   BOTAN_ASSERT_UNREACHABLE();
  ------------------
  |  |  163|      0|#define BOTAN_ASSERT_UNREACHABLE() Botan::assert_unreachable(__FILE__, __LINE__)
  ------------------
   53|      0|}

_ZN5Botan23Dilithium_Keypair_Codec6createENS_13DilithiumModeE:
   22|    164|std::unique_ptr<Dilithium_Keypair_Codec> Dilithium_Keypair_Codec::create(DilithiumMode mode) {
   23|    164|#if defined(BOTAN_HAS_DILITHIUM) || defined(BOTAN_HAS_DILITHIUM_AES)
   24|    164|   if(mode.is_dilithium_round3()) {
  ------------------
  |  Branch (24:7): [True: 0, False: 164]
  ------------------
   25|      0|      return std::make_unique<Dilithium_Expanded_Keypair_Codec>();
   26|      0|   }
   27|    164|#endif
   28|       |
   29|    164|#if defined(BOTAN_HAS_ML_DSA)
   30|    164|   if(mode.is_ml_dsa()) {
  ------------------
  |  Branch (30:7): [True: 164, False: 0]
  ------------------
   31|    164|      return std::make_unique<ML_DSA_Expanding_Keypair_Codec>();
   32|    164|   }
   33|      0|#endif
   34|       |
   35|      0|   throw Not_Implemented("requested ML-DSA/Dilithium mode is not implemented in this build");
   36|    164|}

_ZN5Botan17DilithiumShakeXOFD2Ev:
   13|    164|DilithiumShakeXOF::~DilithiumShakeXOF() = default;
_ZN5Botan17DilithiumShakeXOF9createXOFENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS1_4spanIKhLm18446744073709551615EEEt:
   18|  3.84k|                                                         uint16_t nonce) {
   19|  3.84k|   auto xof = Botan::XOF::create_or_throw(name);
   20|  3.84k|   xof->update(seed);
   21|  3.84k|   xof->update(store_le(nonce));
   22|  3.84k|   return xof;
   23|  3.84k|}

_ZN5Botan35Dilithium_Symmetric_Primitives_BaseC2ERKNS_18DilithiumConstantsENSt3__110unique_ptrINS_12DilithiumXOFENS4_14default_deleteIS6_EEEE:
   41|    164|      m_commitment_hash_length_bytes(mode.commitment_hash_full_bytes()),
   42|    164|      m_public_key_hash_bytes(mode.public_key_hash_bytes()),
   43|    164|      m_mode(mode.mode()),
   44|    164|      m_xof_adapter(std::move(xof_adapter)) {}
_ZN5Botan35Dilithium_Symmetric_Primitives_Base6createERKNS_18DilithiumConstantsE:
   47|    164|   const DilithiumConstants& mode) {
   48|    164|#if defined(BOTAN_HAS_DILITHIUM)
   49|    164|   if(mode.is_modern() && !mode.is_ml_dsa()) {
  ------------------
  |  Branch (49:7): [True: 164, False: 0]
  |  Branch (49:27): [True: 0, False: 164]
  ------------------
   50|      0|      return std::make_unique<Dilithium_Symmetric_Primitives>(mode);
   51|      0|   }
   52|    164|#endif
   53|       |
   54|    164|#if defined(BOTAN_HAS_DILITHIUM_AES)
   55|    164|   if(mode.is_aes()) {
  ------------------
  |  Branch (55:7): [True: 0, False: 164]
  ------------------
   56|      0|      return std::make_unique<Dilithium_AES_Symmetric_Primitives>(mode);
   57|      0|   }
   58|    164|#endif
   59|       |
   60|    164|#if defined(BOTAN_HAS_ML_DSA)
   61|    164|   if(mode.is_ml_dsa()) {
  ------------------
  |  Branch (61:7): [True: 164, False: 0]
  ------------------
   62|    164|      return std::make_unique<ML_DSA_Symmetric_Primitives>(mode);
   63|    164|   }
   64|      0|#endif
   65|       |
   66|      0|   throw Not_Implemented("requested ML-DSA/Dilithium mode is not implemented in this build");
   67|    164|}

_ZNK5Botan30ML_DSA_Expanding_Keypair_Codec14decode_keypairENSt3__14spanIKhLm18446744073709551615EEENS_18DilithiumConstantsE:
   23|     85|                                                                        DilithiumConstants mode) const {
   24|     85|   return Dilithium_Algos::expand_keypair(DilithiumSeedRandomness(private_key_seed), std::move(mode));
   25|     85|}

_ZN5Botan12DL_PublicKeyC2ERKNS_8DL_GroupERKNS_6BigIntE:
   38|      5|DL_PublicKey::DL_PublicKey(const DL_Group& group, const BigInt& public_key) : m_group(group), m_public_key(public_key) {
   39|       |   // The subgroup check (y^q == 1 mod p) is deferred to check_key() since it can be expensive
   40|      5|   BOTAN_ARG_CHECK(m_public_key > 1 && m_public_key < m_group.get_p(), "Invalid DL public key");
  ------------------
  |  |   35|      5|   do {                                                          \
  |  |   36|      5|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     10|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 5, False: 0]
  |  |  |  Branch (37:12): [True: 5, False: 0]
  |  |  ------------------
  |  |   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]
  |  |  ------------------
  ------------------
   41|      5|}
_ZN5Botan13DL_PrivateKeyC2ERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEENS_15DL_Group_FormatE:
   85|    157|      m_group(alg_id.parameters(), format),
   86|    157|      m_private_key(check_dl_private_key_input(decode_single_bigint(key_bits), m_group)),
   87|    157|      m_public_key(m_group.power_g_p(m_private_key, m_private_key.bits())) {}
_ZNK5Botan13DL_PrivateKey10public_keyEv:
  101|      5|std::shared_ptr<DL_PublicKey> DL_PrivateKey::public_key() const {
  102|      5|   return std::make_shared<DL_PublicKey>(m_group, m_public_key);
  103|      5|}
dl_scheme.cpp:_ZN5Botan12_GLOBAL__N_120decode_single_bigintENSt3__14spanIKhLm18446744073709551615EEE:
   17|    105|BigInt decode_single_bigint(std::span<const uint8_t> key_bits) {
   18|    105|   BigInt x;
   19|    105|   BER_Decoder(key_bits, BER_Decoder::Limits::DER()).decode(x).verify_end();
   20|    105|   return x;
   21|    105|}
dl_scheme.cpp:_ZN5Botan12_GLOBAL__N_126check_dl_private_key_inputERKNS_6BigIntERKNS_8DL_GroupE:
   31|      8|BigInt check_dl_private_key_input(const BigInt& x, const DL_Group& group) {
   32|      8|   BOTAN_ARG_CHECK(group.verify_private_element(x), "Invalid discrete logarithm private key value");
  ------------------
  |  |   35|      8|   do {                                                          \
  |  |   36|      8|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|      8|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 3, False: 5]
  |  |  ------------------
  |  |   38|      3|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      3|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      3|      }                                                          \
  |  |   41|      8|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 8]
  |  |  ------------------
  ------------------
   33|      8|   return x;
   34|      8|}

_ZN5Botan8DL_Group19DER_decode_DL_groupENSt3__14spanIKhLm18446744073709551615EEENS_15DL_Group_FormatENS_15DL_Group_SourceE:
  170|    157|                                                             DL_Group_Source source) {
  171|    157|   BER_Decoder outer(data, BER_Decoder::Limits::DER());
  172|    157|   BER_Decoder inner = outer.start_sequence();
  173|    157|   outer.verify_end();
  174|       |
  175|    157|   if(format == DL_Group_Format::ANSI_X9_57) {
  ------------------
  |  Branch (175:7): [True: 3, False: 154]
  ------------------
  176|       |      /*
  177|       |      This format is p, q, g with no additional data following
  178|       |      */
  179|      3|      BigInt p;
  180|      3|      BigInt q;
  181|      3|      BigInt g;
  182|      3|      inner.decode(p).decode(q).decode(g).verify_end();
  183|      3|      return DL_Group_Data::create(p, q, g, source);
  184|    154|   } else if(format == DL_Group_Format::ANSI_X9_42) {
  ------------------
  |  Branch (184:14): [True: 145, False: 9]
  ------------------
  185|       |      /*
  186|       |      This format is p, g, q with optional cofactor and seed following
  187|       |      */
  188|    145|      BigInt p;
  189|    145|      BigInt g;
  190|    145|      BigInt q;
  191|    145|      inner.decode(p).decode(g).decode(q).discard_remaining();
  192|    145|      return DL_Group_Data::create(p, q, g, source);
  193|    145|   } else if(format == DL_Group_Format::PKCS_3) {
  ------------------
  |  Branch (193:14): [True: 0, False: 9]
  ------------------
  194|       |      /*
  195|       |      This format is p, g followed by optional privateValueLength (recommended exponent size)
  196|       |      */
  197|      0|      BigInt p;
  198|      0|      BigInt g;
  199|      0|      inner.decode(p).decode(g).discard_remaining();
  200|      0|      return DL_Group_Data::create(p, g, source);
  201|      9|   } else {
  202|      9|      throw Invalid_Argument("Unknown DL_Group encoding");
  203|      9|   }
  204|    157|}
_ZNK5Botan8DL_Group4dataEv:
  413|     26|const DL_Group_Data& DL_Group::data() const {
  414|     26|   if(m_data) {
  ------------------
  |  Branch (414:7): [True: 26, False: 0]
  ------------------
  415|     26|      return *m_data;
  416|     26|   }
  417|       |
  418|      0|   throw Invalid_State("DL_Group uninitialized");
  419|     26|}
_ZNK5Botan8DL_Group22verify_private_elementERKNS_6BigIntE:
  438|      8|bool DL_Group::verify_private_element(const BigInt& x) const {
  439|      8|   const BigInt& p = get_p();
  440|      8|   const BigInt& q = get_q();
  441|       |
  442|      8|   if(x <= 1 || x >= p) {
  ------------------
  |  Branch (442:7): [True: 1, False: 7]
  |  Branch (442:17): [True: 1, False: 6]
  ------------------
  443|      2|      return false;
  444|      2|   }
  445|       |
  446|      6|   if(q > 0 && x > q) {
  ------------------
  |  Branch (446:7): [True: 6, False: 0]
  |  Branch (446:16): [True: 1, False: 5]
  ------------------
  447|      1|      return false;
  448|      1|   }
  449|       |
  450|      5|   return true;
  451|      6|}
_ZNK5Botan8DL_Group5get_pEv:
  523|     13|const BigInt& DL_Group::get_p() const {
  524|     13|   return data().p();
  525|     13|}
_ZNK5Botan8DL_Group5get_qEv:
  537|      8|const BigInt& DL_Group::get_q() const {
  538|      8|   return data().q();
  539|      8|}
_ZNK5Botan8DL_Group9power_g_pERKNS_6BigIntEm:
  622|      5|BigInt DL_Group::power_g_p(const BigInt& x, size_t max_x_bits) const {
  623|      5|   return data().power_g_p(x, max_x_bits);
  624|      5|}
_ZN5Botan8DL_GroupC2ENSt3__14spanIKhLm18446744073709551615EEENS_15DL_Group_FormatE:
  681|    157|DL_Group::DL_Group(std::span<const uint8_t> der, DL_Group_Format format) {
  682|    157|   m_data = DER_decode_DL_group(der, format, DL_Group_Source::ExternalSource);
  683|    157|}
_ZN5Botan13DL_Group_Data6createERKNS_6BigIntES3_S3_NS_15DL_Group_SourceE:
   52|    145|                                                   DL_Group_Source source) {
   53|    145|         check_dl_group_params(p, q, g);
   54|    145|         return std::make_shared<DL_Group_Data>(p, q, g, source);
   55|    145|      }
dl_group.cpp:_ZN5Botan12_GLOBAL__N_121check_dl_group_paramsERKNS_6BigIntES3_S3_:
   38|    145|void check_dl_group_params(const BigInt& p, const BigInt& q, const BigInt& g) {
   39|    145|   check_dl_group_params(p, g);
   40|    145|   if(q.signum() <= 0 || q.is_even() || q.bits() >= p.bits()) {
  ------------------
  |  Branch (40:7): [True: 35, False: 110]
  |  Branch (40:26): [True: 1, False: 109]
  |  Branch (40:41): [True: 4, False: 105]
  ------------------
   41|      9|      throw Decoding_Error("Invalid DL group subgroup order");
   42|      9|   }
   43|    145|}
dl_group.cpp:_ZN5Botan12_GLOBAL__N_121check_dl_group_paramsERKNS_6BigIntES3_:
   29|    145|void check_dl_group_params(const BigInt& p, const BigInt& g) {
   30|    145|   if(p.signum() <= 0 || p.is_even() || p.bits() < 3 || p.bits() > 16384) {
  ------------------
  |  Branch (30:7): [True: 2, False: 143]
  |  Branch (30:26): [True: 1, False: 142]
  |  Branch (30:41): [True: 1, False: 141]
  |  Branch (30:57): [True: 0, False: 141]
  ------------------
   31|      4|      throw Decoding_Error("Invalid DL group prime");
   32|      4|   }
   33|    141|   if(g.signum() <= 0 || g < 2 || g >= p) {
  ------------------
  |  Branch (33:7): [True: 2, False: 139]
  |  Branch (33:26): [True: 1, False: 138]
  |  Branch (33:35): [True: 24, False: 114]
  ------------------
   34|     27|      throw Decoding_Error("Invalid DL group generator");
   35|     27|   }
   36|    141|}
_ZN5Botan13DL_Group_DataC2ERKNS_6BigIntES3_S3_NS_15DL_Group_SourceE:
   65|    105|            m_p(p),
   66|    105|            m_q(q),
   67|    105|            m_g(g),
   68|    105|            m_mod_p(Barrett_Reduction::for_public_modulus(p)),
   69|    105|            m_mod_q(Barrett_Reduction::for_public_modulus(q)),
   70|    105|            m_monty_params(m_p, m_mod_p),
   71|    105|            m_monty(monty_precompute(m_monty_params, m_g, /*window bits=*/4)),
   72|    105|            m_p_bits(p.bits()),
   73|    105|            m_q_bits(q.bits()),
   74|       |            // For DL crypto in a prime-order subgroup, security is bounded by
   75|       |            // both the NFS cost in Z_p* and Pollard rho in the q-order subgroup.
   76|    105|            m_estimated_strength(std::min(dl_work_factor(m_p_bits), m_q_bits / 2)),
   77|    105|            m_exponent_bits(dl_exponent_size(m_p_bits)),
   78|    105|            m_source(source) {}
_ZN5Botan13DL_Group_DataD2Ev:
   94|    105|      ~DL_Group_Data() = default;
_ZNK5Botan13DL_Group_Data1pEv:
  101|     13|      const BigInt& p() const { return m_p; }
_ZNK5Botan13DL_Group_Data1qEv:
  103|      8|      const BigInt& q() const { return m_q; }
_ZNK5Botan13DL_Group_Data9power_g_pERKNS_6BigIntEm:
  128|      5|      BigInt power_g_p(const BigInt& k, size_t max_k_bits) const {
  129|      5|         return monty_execute(*m_monty, k, max_k_bits).value();
  130|      5|      }

_ZN5Botan14DSA_PrivateKeyC1ERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEE:
   96|     11|DSA_PrivateKey::DSA_PrivateKey(const AlgorithmIdentifier& alg_id, std::span<const uint8_t> key_bits) {
   97|     11|   m_private_key = std::make_shared<DL_PrivateKey>(alg_id, key_bits, DL_Group_Format::ANSI_X9_57);
   98|     11|   m_public_key = m_private_key->public_key();
   99|       |
  100|     11|   check_dsa_group(m_private_key->group());
  101|     11|}

_ZN5Botan14EC_AffinePointC2ENSt3__110unique_ptrINS_19EC_AffinePoint_DataENS1_14default_deleteIS3_EEEE:
   16|  1.78k|EC_AffinePoint::EC_AffinePoint(std::unique_ptr<EC_AffinePoint_Data> point) : m_point(std::move(point)) {
   17|  1.78k|   BOTAN_ASSERT_NONNULL(m_point);
  ------------------
  |  |  116|  1.78k|   do {                                                                                   \
  |  |  117|  1.78k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (117:10): [True: 0, False: 1.78k]
  |  |  ------------------
  |  |  118|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  119|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  120|      0|      }                                                                                   \
  |  |  121|  1.78k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (121:12): [Folded, False: 1.78k]
  |  |  ------------------
  ------------------
   18|  1.78k|}
_ZN5Botan14EC_AffinePointC2EOS0_:
   22|  3.58k|EC_AffinePoint::EC_AffinePoint(EC_AffinePoint&& other) noexcept : m_point(std::move(other.m_point)) {}
_ZNK5Botan14EC_AffinePoint15to_legacy_pointEv:
   46|  1.78k|EC_Point EC_AffinePoint::to_legacy_point() const {
   47|  1.78k|   return m_point->to_legacy_point();
   48|  1.78k|}
_ZNK5Botan14EC_AffinePoint11is_identityEv:
  114|  1.78k|bool EC_AffinePoint::is_identity() const {
  115|  1.78k|   return inner().is_identity();
  116|  1.78k|}
_ZN5Botan14EC_AffinePointD2Ev:
  148|  5.37k|EC_AffinePoint::~EC_AffinePoint() = default;
_ZN5Botan14EC_AffinePoint22deserialize_compressedERKNS_8EC_GroupENSt3__14spanIKhLm18446744073709551615EEE:
  190|    913|                                                                     std::span<const uint8_t> bytes) {
  191|    913|   if(auto pt = group._data()->point_deserialize_compressed(bytes)) {
  ------------------
  |  Branch (191:12): [True: 0, False: 913]
  ------------------
  192|      0|      return EC_AffinePoint(std::move(pt));
  193|    913|   } else {
  194|    913|      return {};
  195|    913|   }
  196|    913|}
_ZN5Botan14EC_AffinePoint24deserialize_uncompressedERKNS_8EC_GroupENSt3__14spanIKhLm18446744073709551615EEE:
  199|    916|                                                                       std::span<const uint8_t> bytes) {
  200|    916|   if(auto pt = group._data()->point_deserialize_uncompressed(bytes)) {
  ------------------
  |  Branch (200:12): [True: 3, False: 913]
  ------------------
  201|      3|      return EC_AffinePoint(std::move(pt));
  202|    913|   } else {
  203|    913|      return {};
  204|    913|   }
  205|    916|}
_ZN5Botan14EC_AffinePoint5g_mulERKNS_9EC_ScalarERNS_21RandomNumberGeneratorE:
  207|  1.78k|EC_AffinePoint EC_AffinePoint::g_mul(const EC_Scalar& scalar, RandomNumberGenerator& rng) {
  208|  1.78k|   auto pt = scalar._inner().group()->point_g_mul(scalar.inner(), rng);
  209|  1.78k|   return EC_AffinePoint(std::move(pt));
  210|  1.78k|}

_ZN5Botan8EC_Group13ec_group_dataEv:
  231|  11.0k|EC_Group_Data_Map& EC_Group::ec_group_data() {
  232|       |   /*
  233|       |   * This exists purely to ensure the allocator is constructed before g_ec_data,
  234|       |   * which ensures that its destructor runs after ~g_ec_data is complete.
  235|       |   */
  236|       |
  237|  11.0k|   static const Allocator_Initializer g_init_allocator;
  238|  11.0k|   static EC_Group_Data_Map g_ec_data;
  239|  11.0k|   return g_ec_data;
  240|  11.0k|}
_ZN5Botan8EC_Group27clear_registered_curve_dataEv:
  243|  7.28k|size_t EC_Group::clear_registered_curve_data() {
  244|  7.28k|   return ec_group_data().clear();
  245|  7.28k|}
_ZN5Botan8EC_Group18load_EC_group_infoEPKcS2_S2_S2_S2_S2_RKNS_3OIDE:
  254|  2.79k|                                                            const OID& oid) {
  255|  2.79k|   BOTAN_ARG_CHECK(oid.has_value(), "EC_Group::load_EC_group_info OID must be set");
  ------------------
  |  |   35|  2.79k|   do {                                                          \
  |  |   36|  2.79k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  2.79k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 2.79k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  2.79k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 2.79k]
  |  |  ------------------
  ------------------
  256|       |
  257|  2.79k|   const BigInt p(p_str);
  258|  2.79k|   const BigInt a(a_str);
  259|  2.79k|   const BigInt b(b_str);
  260|  2.79k|   const BigInt g_x(g_x_str);
  261|  2.79k|   const BigInt g_y(g_y_str);
  262|  2.79k|   const BigInt order(order_str);
  263|  2.79k|   const BigInt cofactor(1);  // implicit
  264|       |
  265|  2.79k|   return EC_Group_Data::create(p, a, b, g_x, g_y, order, cofactor, oid, EC_Group_Source::Builtin);
  266|  2.79k|}
_ZN5Botan8EC_Group19DER_decode_EC_groupENSt3__14spanIKhLm18446744073709551615EEENS_15EC_Group_SourceE:
  270|  3.90k|                                                                              EC_Group_Source source) {
  271|  3.90k|   BER_Decoder dec(der, BER_Decoder::Limits::DER());
  272|       |
  273|  3.90k|   auto next_obj_type = dec.peek_next_object().type_tag();
  274|       |
  275|  3.90k|   if(next_obj_type == ASN1_Type::ObjectId) {
  ------------------
  |  Branch (275:7): [True: 2.63k, False: 1.26k]
  ------------------
  276|  2.63k|      OID oid;
  277|  2.63k|      dec.decode(oid).verify_end();
  278|       |
  279|  2.63k|      auto data = ec_group_data().lookup(oid);
  280|  2.63k|      if(!data) {
  ------------------
  |  Branch (280:10): [True: 104, False: 2.53k]
  ------------------
  281|    104|         throw Decoding_Error(fmt("Unknown namedCurve OID '{}'", oid.to_string()));
  282|    104|      }
  283|       |
  284|  2.53k|      return std::make_pair(data, false);
  285|  2.63k|   } else if(next_obj_type == ASN1_Type::Sequence) {
  ------------------
  |  Branch (285:14): [True: 1.26k, False: 7]
  ------------------
  286|  1.26k|      BigInt p;
  287|  1.26k|      BigInt a;
  288|  1.26k|      BigInt b;
  289|  1.26k|      BigInt order;
  290|  1.26k|      BigInt cofactor;
  291|  1.26k|      std::vector<uint8_t> base_pt;
  292|  1.26k|      std::vector<uint8_t> seed;
  293|       |
  294|  1.26k|      dec.start_sequence()
  295|  1.26k|         .decode_and_check<size_t>(1, "Unknown ECC param version code")
  296|  1.26k|         .start_sequence()
  297|  1.26k|         .decode_and_check(OID({1, 2, 840, 10045, 1, 1}), "Only prime ECC fields supported")
  298|  1.26k|         .decode(p)
  299|  1.26k|         .end_cons()
  300|  1.26k|         .start_sequence()
  301|  1.26k|         .decode_octet_string_bigint(a)
  302|  1.26k|         .decode_octet_string_bigint(b)
  303|  1.26k|         .decode_optional_string(seed, ASN1_Type::BitString, ASN1_Type::BitString, ASN1_Class::Universal)
  304|  1.26k|         .end_cons()
  305|  1.26k|         .decode(base_pt, ASN1_Type::OctetString)
  306|  1.26k|         .decode(order)
  307|  1.26k|         .decode(cofactor)
  308|  1.26k|         .end_cons()
  309|  1.26k|         .verify_end();
  310|       |
  311|       |      // TODO(Botan4) Require cofactor == 1
  312|  1.26k|      if(cofactor <= 0 || cofactor >= 16) {
  ------------------
  |  Branch (312:10): [True: 40, False: 1.22k]
  |  Branch (312:27): [True: 2, False: 1.21k]
  ------------------
  313|      3|         throw Decoding_Error("Invalid ECC cofactor parameter");
  314|      3|      }
  315|       |
  316|  1.25k|      if(p.bits() < 112 || p.bits() > 521 || p.signum() < 0) {
  ------------------
  |  Branch (316:10): [True: 39, False: 1.21k]
  |  Branch (316:28): [True: 1, False: 1.21k]
  |  Branch (316:46): [True: 1, False: 1.21k]
  ------------------
  317|      2|         throw Decoding_Error("ECC p parameter is invalid size");
  318|      2|      }
  319|       |
  320|       |      // A can be zero
  321|  1.25k|      if(a.signum() < 0 || a >= p) {
  ------------------
  |  Branch (321:10): [True: 39, False: 1.21k]
  |  Branch (321:28): [True: 1, False: 1.21k]
  ------------------
  322|      1|         throw Decoding_Error("Invalid ECC a parameter");
  323|      1|      }
  324|       |
  325|       |      // B must be > 0
  326|  1.25k|      if(b.signum() <= 0 || b >= p) {
  ------------------
  |  Branch (326:10): [True: 40, False: 1.21k]
  |  Branch (326:29): [True: 73, False: 1.14k]
  ------------------
  327|     74|         throw Decoding_Error("Invalid ECC b parameter");
  328|     74|      }
  329|       |
  330|  1.18k|      if(order.signum() <= 0 || order >= 2 * p) {
  ------------------
  |  Branch (330:10): [True: 43, False: 1.13k]
  |  Branch (330:10): [True: 6, False: 1.17k]
  |  Branch (330:33): [True: 2, False: 1.13k]
  ------------------
  331|      6|         throw Decoding_Error("Invalid ECC group order");
  332|      6|      }
  333|       |
  334|  1.17k|      if(auto data = ec_group_data().lookup_from_params(p, a, b, base_pt, order, cofactor)) {
  ------------------
  |  Branch (334:15): [True: 170, False: 1.00k]
  ------------------
  335|    170|         return std::make_pair(data, true);
  336|    170|      }
  337|       |
  338|       |      /*
  339|       |      TODO(Botan4) the remaining code is used only to handle the case of decoding an EC_Group
  340|       |      which is neither a builtin group nor a group that was registered by the application.
  341|       |      It can all be removed and replaced with a throw
  342|       |      */
  343|       |
  344|  1.00k|      auto mod_p = Barrett_Reduction::for_public_modulus(p);
  345|  1.00k|      if(!is_bailie_psw_probable_prime(p, mod_p)) {
  ------------------
  |  Branch (345:10): [True: 418, False: 586]
  ------------------
  346|    418|         throw Decoding_Error("ECC p parameter is not a prime");
  347|    418|      }
  348|       |
  349|    586|      auto mod_order = Barrett_Reduction::for_public_modulus(order);
  350|    586|      if(!is_bailie_psw_probable_prime(order, mod_order)) {
  ------------------
  |  Branch (350:10): [True: 247, False: 339]
  ------------------
  351|    247|         throw Decoding_Error("Invalid ECC order parameter");
  352|    247|      }
  353|       |
  354|    339|      const size_t p_bytes = p.bytes();
  355|    339|      if(base_pt.size() != 1 + p_bytes && base_pt.size() != 1 + 2 * p_bytes) {
  ------------------
  |  Branch (355:10): [True: 299, False: 40]
  |  Branch (355:43): [True: 54, False: 245]
  ------------------
  356|     54|         throw Decoding_Error("Invalid ECC base point encoding");
  357|     54|      }
  358|       |
  359|    285|      auto [g_x, g_y] = [&]() {
  360|    285|         const uint8_t hdr = base_pt[0];
  361|       |
  362|    285|         if(hdr == 0x04 && base_pt.size() == 1 + 2 * p_bytes) {
  363|    285|            const BigInt x = BigInt::from_bytes(std::span{base_pt}.subspan(1, p_bytes));
  364|    285|            const BigInt y = BigInt::from_bytes(std::span{base_pt}.subspan(1 + p_bytes, p_bytes));
  365|       |
  366|    285|            if(x < p && y < p) {
  367|    285|               return std::make_pair(x, y);
  368|    285|            }
  369|    285|         } else if((hdr == 0x02 || hdr == 0x03) && base_pt.size() == 1 + p_bytes) {
  370|       |            // TODO(Botan4) remove this branch; we won't support compressed points
  371|    285|            const BigInt x = BigInt::from_bytes(std::span{base_pt}.subspan(1, p_bytes));
  372|    285|            BigInt y = sqrt_modulo_prime(((x * x + a) * x + b) % p, p);
  373|       |
  374|    285|            if(x < p && y >= 0) {
  375|    285|               const bool y_mod_2 = (hdr & 0x01) == 1;
  376|    285|               if(y.get_bit(0) != y_mod_2) {
  377|    285|                  y = p - y;
  378|    285|               }
  379|       |
  380|    285|               return std::make_pair(x, y);
  381|    285|            }
  382|    285|         }
  383|       |
  384|    285|         throw Decoding_Error("Invalid ECC base point encoding");
  385|    285|      }();
  386|       |
  387|       |      // TODO(Botan4) we can remove this check since we'll only accept pre-registered groups
  388|    285|      auto y2 = mod_p.square(g_y);
  389|    285|      auto x3_ax_b = mod_p.reduce(mod_p.cube(g_x) + mod_p.multiply(a, g_x) + b);
  390|    285|      if(y2 != x3_ax_b) {
  ------------------
  |  Branch (390:10): [True: 81, False: 204]
  ------------------
  391|     81|         throw Decoding_Error("Invalid ECC base point");
  392|     81|      }
  393|       |
  394|       |      /*
  395|       |      * Create the group data without registering it in the global map.
  396|       |      *
  397|       |      * Applications that need persistent custom groups should register them
  398|       |      * via the relevant EC_Group constructor
  399|       |      */
  400|    204|      auto data = EC_Group_Data::create(p, a, b, g_x, g_y, order, cofactor, OID(), source);
  401|    204|      return std::make_pair(data, true);
  402|    285|   } else if(next_obj_type == ASN1_Type::Null) {
  ------------------
  |  Branch (402:14): [True: 0, False: 7]
  ------------------
  403|      0|      throw Decoding_Error("Decoding ImplicitCA ECC parameters is not supported");
  404|      7|   } else {
  405|      7|      throw Decoding_Error(
  406|      7|         fmt("Unexpected tag {} while decoding ECC domain params", asn1_tag_to_string(next_obj_type)));
  407|      7|   }
  408|  3.90k|}
_ZN5Botan8EC_GroupD2Ev:
  412|  12.7k|EC_Group::~EC_Group() = default;
_ZN5Botan8EC_GroupC2ERKS0_:
  414|  5.43k|EC_Group::EC_Group(const EC_Group&) = default;
_ZN5Botan8EC_GroupC2ENSt3__14spanIKhLm18446744073709551615EEE:
  636|  3.90k|EC_Group::EC_Group(std::span<const uint8_t> der) {
  637|  3.90k|   auto data = DER_decode_EC_group(der, EC_Group_Source::ExternalSource);
  638|  3.90k|   m_data = data.first;
  639|  3.90k|   m_explicit_encoding = data.second;
  640|  3.90k|}
_ZNK5Botan8EC_Group4dataEv:
  647|  6.77k|const EC_Group_Data& EC_Group::data() const {
  648|  6.77k|   if(m_data == nullptr) {
  ------------------
  |  Branch (648:7): [True: 0, False: 6.77k]
  ------------------
  649|      0|      throw Invalid_State("EC_Group uninitialized");
  650|      0|   }
  651|  6.77k|   return *m_data;
  652|  6.77k|}
_ZNK5Botan8EC_Group15get_order_bytesEv:
  666|  4.98k|size_t EC_Group::get_order_bytes() const {
  667|  4.98k|   return data().order_bytes();
  668|  4.98k|}
_ZNK5Botan8EC_Group13get_curve_oidEv:
  738|  1.78k|const OID& EC_Group::get_curve_oid() const {
  739|  1.78k|   return data().oid();
  740|  1.78k|}
_ZN5Botan17EC_Group_Data_Map5clearEv:
   31|  7.28k|      size_t clear() {
   32|  7.28k|         const lock_guard_type<mutex_type> lock(m_mutex);
   33|  7.28k|         const size_t count = m_registered_curves.size();
   34|  7.28k|         m_registered_curves.clear();
   35|  7.28k|         return count;
   36|  7.28k|      }
_ZN5Botan17EC_Group_Data_Map6lookupERKNS_3OIDE:
   54|  2.63k|      std::shared_ptr<EC_Group_Data> lookup(const OID& oid) {
   55|  2.63k|         const lock_guard_type<mutex_type> lock(m_mutex);
   56|       |
   57|  2.63k|         for(auto i : m_registered_curves) {
  ------------------
  |  Branch (57:21): [True: 0, False: 2.63k]
  ------------------
   58|      0|            if(i->oid() == oid) {
  ------------------
  |  Branch (58:16): [True: 0, False: 0]
  ------------------
   59|      0|               return i;
   60|      0|            }
   61|      0|         }
   62|       |
   63|       |         // Not found, check hardcoded data
   64|  2.63k|         std::shared_ptr<EC_Group_Data> data = EC_Group::EC_group_info(oid);
   65|       |
   66|  2.63k|         if(data) {
  ------------------
  |  Branch (66:13): [True: 2.53k, False: 104]
  ------------------
   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|  2.53k|            if(data->oid() != oid) {
  ------------------
  |  Branch (69:16): [True: 0, False: 2.53k]
  ------------------
   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|  2.53k|            m_registered_curves.push_back(data);
   78|  2.53k|            return data;
   79|  2.53k|         }
   80|       |
   81|       |         // Nope, unknown curve
   82|    104|         return std::shared_ptr<EC_Group_Data>();
   83|  2.63k|      }
_ZN5Botan17EC_Group_Data_Map18lookup_from_paramsERKNS_6BigIntES3_S3_NSt3__14spanIKhLm18446744073709551615EEES3_S3_:
  159|  1.13k|                                                        const BigInt& cofactor) {
  160|  1.13k|         const lock_guard_type<mutex_type> lock(m_mutex);
  161|       |
  162|  1.13k|         for(auto i : m_registered_curves) {
  ------------------
  |  Branch (162:21): [True: 0, False: 1.13k]
  ------------------
  163|      0|            if(i->params_match(p, a, b, base_pt, order, cofactor)) {
  ------------------
  |  Branch (163:16): [True: 0, False: 0]
  ------------------
  164|      0|               return i;
  165|      0|            }
  166|      0|         }
  167|       |
  168|       |         // Try to use the order as a hint to look up the group id
  169|  1.13k|         const OID oid_from_order = EC_Group::EC_group_identity_from_order(order);
  170|  1.13k|         if(oid_from_order.has_value()) {
  ------------------
  |  Branch (170:13): [True: 261, False: 874]
  ------------------
  171|    261|            auto new_group = EC_Group::EC_group_info(oid_from_order);
  172|       |
  173|       |            // Have to check all params in the (unlikely/malicious) event of an order collision
  174|    261|            if(new_group && new_group->params_match(p, a, b, base_pt, order, cofactor)) {
  ------------------
  |  Branch (174:16): [True: 261, False: 0]
  |  Branch (174:29): [True: 170, False: 91]
  ------------------
  175|    170|               m_registered_curves.push_back(new_group);
  176|    170|               return new_group;
  177|    170|            }
  178|    261|         }
  179|       |
  180|    965|         return {};
  181|  1.13k|      }
ec_group.cpp:_ZZN5Botan8EC_Group19DER_decode_EC_groupENSt3__14spanIKhLm18446744073709551615EEENS_15EC_Group_SourceEENK3$_0clEv:
  359|    245|      auto [g_x, g_y] = [&]() {
  360|    245|         const uint8_t hdr = base_pt[0];
  361|       |
  362|    245|         if(hdr == 0x04 && base_pt.size() == 1 + 2 * p_bytes) {
  ------------------
  |  Branch (362:13): [True: 226, False: 19]
  |  Branch (362:28): [True: 226, False: 0]
  ------------------
  363|    226|            const BigInt x = BigInt::from_bytes(std::span{base_pt}.subspan(1, p_bytes));
  364|    226|            const BigInt y = BigInt::from_bytes(std::span{base_pt}.subspan(1 + p_bytes, p_bytes));
  365|       |
  366|    226|            if(x < p && y < p) {
  ------------------
  |  Branch (366:16): [True: 223, False: 3]
  |  Branch (366:25): [True: 218, False: 5]
  ------------------
  367|    218|               return std::make_pair(x, y);
  368|    218|            }
  369|    226|         } else if((hdr == 0x02 || hdr == 0x03) && base_pt.size() == 1 + p_bytes) {
  ------------------
  |  Branch (369:21): [True: 3, False: 16]
  |  Branch (369:36): [True: 4, False: 12]
  |  Branch (369:52): [True: 0, False: 7]
  ------------------
  370|       |            // TODO(Botan4) remove this branch; we won't support compressed points
  371|      0|            const BigInt x = BigInt::from_bytes(std::span{base_pt}.subspan(1, p_bytes));
  372|      0|            BigInt y = sqrt_modulo_prime(((x * x + a) * x + b) % p, p);
  373|       |
  374|      0|            if(x < p && y >= 0) {
  ------------------
  |  Branch (374:16): [True: 0, False: 0]
  |  Branch (374:25): [True: 0, False: 0]
  ------------------
  375|      0|               const bool y_mod_2 = (hdr & 0x01) == 1;
  376|      0|               if(y.get_bit(0) != y_mod_2) {
  ------------------
  |  Branch (376:19): [True: 0, False: 0]
  ------------------
  377|      0|                  y = p - y;
  378|      0|               }
  379|       |
  380|      0|               return std::make_pair(x, y);
  381|      0|            }
  382|      0|         }
  383|       |
  384|     27|         throw Decoding_Error("Invalid ECC base point encoding");
  385|    245|      }();

_ZN5Botan13EC_Group_DataD2Ev:
   27|  2.93k|EC_Group_Data::~EC_Group_Data() = default;
_ZN5Botan13EC_Group_DataC2ERKNS_6BigIntES3_S3_S3_S3_S3_S3_RKNS_3OIDENS_15EC_Group_SourceE:
   39|  2.93k|      m_p(p),
   40|  2.93k|      m_a(a),
   41|  2.93k|      m_b(b),
   42|  2.93k|      m_g_x(g_x),
   43|  2.93k|      m_g_y(g_y),
   44|  2.93k|      m_order(order),
   45|  2.93k|      m_cofactor(cofactor),
   46|       |#if defined(BOTAN_HAS_LEGACY_EC_POINT)
   47|  2.93k|      m_mod_field(Barrett_Reduction::for_public_modulus(p)),
   48|  2.93k|      m_mod_order(Barrett_Reduction::for_public_modulus(order)),
   49|  2.93k|      m_monty(m_p, m_mod_field),
   50|       |#endif
   51|  2.93k|      m_oid(oid),
   52|  2.93k|      m_p_words(p.sig_words()),
   53|  2.93k|      m_p_bits(p.bits()),
   54|  2.93k|      m_order_bits(order.bits()),
   55|  2.93k|      m_order_bytes((m_order_bits + 7) / 8),
   56|  2.93k|      m_a_is_minus_3(a == p - 3),
   57|  2.93k|      m_a_is_zero(a.is_zero()),
   58|  2.93k|      m_has_cofactor(m_cofactor != 1),
   59|  2.93k|      m_order_is_less_than_p(m_order < p),
   60|  2.93k|      m_source(source) {
   61|       |   // Verify the generator (x, y) satisfies y^2 = x^3 + a*x + b (mod p)
   62|  2.93k|   auto mod_p = Barrett_Reduction::for_public_modulus(p);
   63|  2.93k|   const BigInt y2 = mod_p.square(g_y);
   64|  2.93k|   const BigInt x3_ax_b = mod_p.reduce(mod_p.cube(g_x) + mod_p.multiply(a, g_x) + b);
   65|  2.93k|   if(y2 != x3_ax_b) {
  ------------------
  |  Branch (65:7): [True: 0, False: 2.93k]
  ------------------
   66|      0|      throw Invalid_Argument("EC_Group generator is not on the curve");
   67|      0|   }
   68|       |
   69|       |   // TODO(Botan4) we can assume/assert the OID is set
   70|  2.93k|   if(!m_oid.empty()) {
  ------------------
  |  Branch (70:7): [True: 2.79k, False: 137]
  ------------------
   71|  2.79k|      DER_Encoder der(m_der_named_curve);
   72|  2.79k|      der.encode(m_oid);
   73|       |
   74|  2.79k|      if(const auto name = m_oid.registered_name()) {
  ------------------
  |  Branch (74:21): [True: 2.79k, False: 0]
  ------------------
   75|       |         // returns nullptr if unknown or not supported
   76|  2.79k|         m_pcurve = PCurve::PrimeOrderCurve::for_named_curve(*name);
   77|  2.79k|      }
   78|  2.79k|      if(m_pcurve) {
  ------------------
  |  Branch (78:10): [True: 1.73k, False: 1.06k]
  ------------------
   79|  1.73k|         m_engine = EC_Group_Engine::Optimized;
   80|  1.73k|      }
   81|  2.79k|   }
   82|       |
   83|       |   // Try a generic pcurves instance
   84|  2.93k|   if(!m_pcurve && !m_has_cofactor) {
  ------------------
  |  Branch (84:7): [True: 1.20k, False: 1.73k]
  |  Branch (84:20): [True: 1.13k, False: 68]
  ------------------
   85|  1.13k|      m_pcurve = PCurve::PrimeOrderCurve::from_params(p, a, b, g_x, g_y, order);
   86|  1.13k|      if(m_pcurve) {
  ------------------
  |  Branch (86:10): [True: 460, False: 672]
  ------------------
   87|    460|         m_engine = EC_Group_Engine::Generic;
   88|    460|      }
   89|       |      // possibly still null here, if parameters unsuitable or if the
   90|       |      // pcurves_generic module wasn't included in the build
   91|  1.13k|   }
   92|       |
   93|  2.93k|#if defined(BOTAN_HAS_LEGACY_EC_POINT)
   94|  2.93k|   secure_vector<word> ws;
   95|  2.93k|   m_a_r = m_monty.mul(a, m_monty.R2(), ws);
   96|  2.93k|   m_b_r = m_monty.mul(b, m_monty.R2(), ws);
   97|  2.93k|   if(!m_pcurve) {
  ------------------
  |  Branch (97:7): [True: 740, False: 2.19k]
  ------------------
   98|    740|      m_engine = EC_Group_Engine::Legacy;
   99|    740|   }
  100|       |#else
  101|       |   if(!m_pcurve) {
  102|       |      if(m_oid.empty()) {
  103|       |         throw Not_Implemented("EC_Group this group is not supported in this build configuration");
  104|       |      } else {
  105|       |         throw Not_Implemented(
  106|       |            fmt("EC_Group the group {} is not supported in this build configuration", oid.to_string()));
  107|       |      }
  108|       |   }
  109|       |#endif
  110|  2.93k|}
_ZN5Botan13EC_Group_Data6createERKNS_6BigIntES3_S3_S3_S3_S3_S3_RKNS_3OIDENS_15EC_Group_SourceE:
  120|  2.93k|                                                     EC_Group_Source source) {
  121|  2.93k|   auto group = std::make_shared<EC_Group_Data>(p, a, b, g_x, g_y, order, cofactor, oid, source);
  122|       |
  123|  2.93k|#if defined(BOTAN_HAS_LEGACY_EC_POINT)
  124|  2.93k|   group->m_curve = CurveGFp(group.get());
  125|  2.93k|   group->m_base_point = EC_Point(group->m_curve, g_x, g_y);
  126|  2.93k|   if(!group->m_pcurve) {
  ------------------
  |  Branch (126:7): [True: 740, False: 2.19k]
  ------------------
  127|    740|      group->m_base_mult = std::make_unique<EC_Point_Base_Point_Precompute>(group->m_base_point, group->m_mod_order);
  128|    740|   }
  129|  2.93k|#endif
  130|       |
  131|  2.93k|   return group;
  132|  2.93k|}
_ZNK5Botan13EC_Group_Data12params_matchERKNS_6BigIntES3_S3_NSt3__14spanIKhLm18446744073709551615EEES3_S3_:
  171|    261|                                 const BigInt& cofactor) const {
  172|    261|   if(p != this->p()) {
  ------------------
  |  Branch (172:7): [True: 9, False: 252]
  ------------------
  173|      9|      return false;
  174|      9|   }
  175|    252|   if(a != this->a()) {
  ------------------
  |  Branch (175:7): [True: 1, False: 251]
  ------------------
  176|      1|      return false;
  177|      1|   }
  178|    251|   if(b != this->b()) {
  ------------------
  |  Branch (178:7): [True: 3, False: 248]
  ------------------
  179|      3|      return false;
  180|      3|   }
  181|    248|   if(order != this->order()) {
  ------------------
  |  Branch (181:7): [True: 0, False: 248]
  ------------------
  182|      0|      return false;
  183|      0|   }
  184|    248|   if(cofactor != this->cofactor()) {
  ------------------
  |  Branch (184:7): [True: 17, False: 231]
  ------------------
  185|     17|      return false;
  186|     17|   }
  187|       |
  188|    231|   const size_t field_len = this->p_bytes();
  189|       |
  190|    231|   if(base_pt.size() == 1 + field_len && (base_pt[0] == 0x02 || base_pt[0] == 0x03)) {
  ------------------
  |  Branch (190:7): [True: 0, False: 231]
  |  Branch (190:43): [True: 0, False: 0]
  |  Branch (190:65): [True: 0, False: 0]
  ------------------
  191|       |      // compressed
  192|       |
  193|      0|      const auto g_x = m_g_x.serialize(field_len);
  194|      0|      const auto g_y = m_g_y.is_odd();
  195|       |
  196|      0|      const auto sec1_x = base_pt.subspan(1, field_len);
  197|      0|      const bool sec1_y = (base_pt[0] == 0x03);
  198|       |
  199|      0|      if(!std::ranges::equal(sec1_x, g_x)) {
  ------------------
  |  Branch (199:10): [True: 0, False: 0]
  ------------------
  200|      0|         return false;
  201|      0|      }
  202|       |
  203|      0|      if(sec1_y != g_y) {
  ------------------
  |  Branch (203:10): [True: 0, False: 0]
  ------------------
  204|      0|         return false;
  205|      0|      }
  206|       |
  207|      0|      return true;
  208|    231|   } else if(base_pt.size() == 1 + 2 * field_len && base_pt[0] == 0x04) {
  ------------------
  |  Branch (208:14): [True: 231, False: 0]
  |  Branch (208:53): [True: 230, False: 1]
  ------------------
  209|    230|      const auto g_x = m_g_x.serialize(field_len);
  210|    230|      const auto g_y = m_g_y.serialize(field_len);
  211|       |
  212|    230|      const auto sec1_x = base_pt.subspan(1, field_len);
  213|    230|      const auto sec1_y = base_pt.subspan(1 + field_len, field_len);
  214|       |
  215|    230|      if(!std::ranges::equal(sec1_x, g_x)) {
  ------------------
  |  Branch (215:10): [True: 38, False: 192]
  ------------------
  216|     38|         return false;
  217|     38|      }
  218|       |
  219|    192|      if(!std::ranges::equal(sec1_y, g_y)) {
  ------------------
  |  Branch (219:10): [True: 22, False: 170]
  ------------------
  220|     22|         return false;
  221|     22|      }
  222|       |
  223|    170|      return true;
  224|    192|   } else {
  225|      1|      throw Decoding_Error("Invalid base point encoding in explicit group");
  226|      1|   }
  227|    231|}
_ZNK5Botan13EC_Group_Data18scalar_deserializeENSt3__14spanIKhLm18446744073709551615EEE:
  357|  2.73k|std::unique_ptr<EC_Scalar_Data> EC_Group_Data::scalar_deserialize(std::span<const uint8_t> bytes) const {
  358|  2.73k|   if(bytes.size() != m_order_bytes) {
  ------------------
  |  Branch (358:7): [True: 9, False: 2.72k]
  ------------------
  359|      9|      return nullptr;
  360|      9|   }
  361|       |
  362|  2.72k|   if(m_pcurve) {
  ------------------
  |  Branch (362:7): [True: 2.04k, False: 678]
  ------------------
  363|  2.04k|      if(auto s = m_pcurve->deserialize_scalar(bytes)) {
  ------------------
  |  Branch (363:15): [True: 2.02k, False: 18]
  ------------------
  364|  2.02k|         return std::make_unique<EC_Scalar_Data_PC>(shared_from_this(), *s);
  365|  2.02k|      } else {
  366|     18|         return nullptr;
  367|     18|      }
  368|  2.04k|   } else {
  369|    678|#if defined(BOTAN_HAS_LEGACY_EC_POINT)
  370|    678|      BigInt r(bytes);
  371|       |
  372|    678|      if(r.is_zero() || r >= m_order) {
  ------------------
  |  Branch (372:10): [True: 2, False: 676]
  |  Branch (372:25): [True: 1, False: 675]
  ------------------
  373|      3|         return nullptr;
  374|      3|      }
  375|       |
  376|    675|      return std::make_unique<EC_Scalar_Data_BN>(shared_from_this(), std::move(r));
  377|       |#else
  378|       |      throw Not_Implemented("Legacy EC interfaces disabled in this build configuration");
  379|       |#endif
  380|    678|   }
  381|  2.72k|}
_ZNK5Botan13EC_Group_Data30point_deserialize_uncompressedENSt3__14spanIKhLm18446744073709551615EEE:
  384|    916|   std::span<const uint8_t> bytes) const {
  385|    916|   if(bytes.size() != 1 + 2 * p_bytes() || bytes[0] != 0x04) {
  ------------------
  |  Branch (385:7): [True: 84, False: 832]
  |  Branch (385:44): [True: 622, False: 210]
  ------------------
  386|    706|      return {};
  387|    706|   }
  388|       |
  389|    210|   if(m_pcurve) {
  ------------------
  |  Branch (389:7): [True: 185, False: 25]
  ------------------
  390|    185|      if(auto pt = m_pcurve->deserialize_point_uncompressed(bytes)) {
  ------------------
  |  Branch (390:15): [True: 2, False: 183]
  ------------------
  391|      2|         return std::make_unique<EC_AffinePoint_Data_PC>(shared_from_this(), std::move(*pt));
  392|    183|      } else {
  393|    183|         return {};
  394|    183|      }
  395|    185|   } else {
  396|     25|#if defined(BOTAN_HAS_LEGACY_EC_POINT)
  397|     25|      try {
  398|     25|         auto pt = Botan::OS2ECP(bytes, m_curve);
  399|     25|         return std::make_unique<EC_AffinePoint_Data_BN>(shared_from_this(), std::move(pt));
  400|     25|      } catch(...) {
  401|     24|         return {};
  402|     24|      }
  403|       |#else
  404|       |      throw Not_Implemented("Legacy EC interfaces disabled in this build configuration");
  405|       |#endif
  406|     25|   }
  407|    210|}
_ZNK5Botan13EC_Group_Data28point_deserialize_compressedENSt3__14spanIKhLm18446744073709551615EEE:
  409|    913|std::unique_ptr<EC_AffinePoint_Data> EC_Group_Data::point_deserialize_compressed(std::span<const uint8_t> bytes) const {
  410|    913|   if(bytes.size() != 1 + p_bytes() || (bytes[0] != 0x02 && bytes[0] != 0x03)) {
  ------------------
  |  Branch (410:7): [True: 913, False: 0]
  |  Branch (410:41): [True: 0, False: 0]
  |  Branch (410:61): [True: 0, False: 0]
  ------------------
  411|    913|      return {};
  412|    913|   }
  413|       |
  414|      0|   if(m_pcurve) {
  ------------------
  |  Branch (414:7): [True: 0, False: 0]
  ------------------
  415|      0|      if(auto pt = m_pcurve->deserialize_point_compressed(bytes)) {
  ------------------
  |  Branch (415:15): [True: 0, False: 0]
  ------------------
  416|      0|         return std::make_unique<EC_AffinePoint_Data_PC>(shared_from_this(), std::move(*pt));
  417|      0|      } else {
  418|      0|         return {};
  419|      0|      }
  420|      0|   } else {
  421|      0|#if defined(BOTAN_HAS_LEGACY_EC_POINT)
  422|      0|      try {
  423|      0|         auto pt = Botan::OS2ECP(bytes, m_curve);
  424|      0|         return std::make_unique<EC_AffinePoint_Data_BN>(shared_from_this(), std::move(pt));
  425|      0|      } catch(...) {
  426|      0|         return {};
  427|      0|      }
  428|       |#else
  429|       |      throw Not_Implemented("Legacy EC interfaces disabled in this build configuration");
  430|       |#endif
  431|      0|   }
  432|      0|}
_ZNK5Botan13EC_Group_Data11point_g_mulERKNS_14EC_Scalar_DataERNS_21RandomNumberGeneratorE:
  494|  1.78k|                                                                RandomNumberGenerator& rng) const {
  495|  1.78k|   if(m_pcurve) {
  ------------------
  |  Branch (495:7): [True: 1.64k, False: 137]
  ------------------
  496|  1.64k|      const auto& k = EC_Scalar_Data_PC::checked_ref(scalar);
  497|  1.64k|      auto pt = m_pcurve->point_to_affine(m_pcurve->mul_by_g(k.value(), rng));
  498|  1.64k|      return std::make_unique<EC_AffinePoint_Data_PC>(shared_from_this(), std::move(pt));
  499|  1.64k|   } else {
  500|    137|#if defined(BOTAN_HAS_LEGACY_EC_POINT)
  501|    137|      const auto& group = scalar.group();
  502|    137|      const auto& bn = EC_Scalar_Data_BN::checked_ref(scalar);
  503|       |
  504|    137|      BOTAN_STATE_CHECK(group->m_base_mult != nullptr);
  ------------------
  |  |   51|    137|   do {                                                         \
  |  |   52|    137|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|    137|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 137]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|    137|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 137]
  |  |  ------------------
  ------------------
  505|    137|      std::vector<BigInt> ws;
  506|    137|      auto pt = group->m_base_mult->mul(bn.value(), rng, m_order, ws);
  507|    137|      return std::make_unique<EC_AffinePoint_Data_BN>(shared_from_this(), std::move(pt));
  508|       |#else
  509|       |      throw Not_Implemented("Legacy EC interfaces disabled in this build configuration");
  510|       |#endif
  511|    137|   }
  512|  1.78k|}

_ZN5Botan17EC_Scalar_Data_PC11checked_refERKNS_14EC_Scalar_DataE:
   14|  1.64k|const EC_Scalar_Data_PC& EC_Scalar_Data_PC::checked_ref(const EC_Scalar_Data& data) {
   15|  1.64k|   const auto* p = dynamic_cast<const EC_Scalar_Data_PC*>(&data);
   16|  1.64k|   if(p == nullptr) {
  ------------------
  |  Branch (16:7): [True: 0, False: 1.64k]
  ------------------
   17|      0|      throw Invalid_State("Failed conversion to EC_Scalar_Data_PC");
   18|      0|   }
   19|  1.64k|   return *p;
   20|  1.64k|}
_ZNK5Botan17EC_Scalar_Data_PC5groupEv:
   22|  7.73k|const std::shared_ptr<const EC_Group_Data>& EC_Scalar_Data_PC::group() const {
   23|  7.73k|   return m_group;
   24|  7.73k|}
_ZNK5Botan17EC_Scalar_Data_PC5bytesEv:
   26|  2.02k|size_t EC_Scalar_Data_PC::bytes() const {
   27|  2.02k|   return this->group()->order_bytes();
   28|  2.02k|}
_ZNK5Botan17EC_Scalar_Data_PC5cloneEv:
   30|  2.02k|std::unique_ptr<EC_Scalar_Data> EC_Scalar_Data_PC::clone() const {
   31|  2.02k|   return std::make_unique<EC_Scalar_Data_PC>(this->group(), this->value());
   32|  2.02k|}
_ZNK5Botan17EC_Scalar_Data_PC7is_zeroEv:
   34|  2.02k|bool EC_Scalar_Data_PC::is_zero() const {
   35|  2.02k|   const auto& pcurve = this->group()->pcurve();
   36|  2.02k|   return pcurve.scalar_is_zero(m_v);
   37|  2.02k|}
_ZN5Botan17EC_Scalar_Data_PC7zeroizeEv:
   49|  2.02k|void EC_Scalar_Data_PC::zeroize() {
   50|  2.02k|   m_v._zeroize();
   51|  2.02k|}
_ZNK5Botan17EC_Scalar_Data_PC12serialize_toENSt3__14spanIhLm18446744073709551615EEE:
   82|  2.02k|void EC_Scalar_Data_PC::serialize_to(std::span<uint8_t> bytes) const {
   83|  2.02k|   BOTAN_ARG_CHECK(bytes.size() == m_group->order_bytes(), "Invalid output length");
  ------------------
  |  |   35|  2.02k|   do {                                                          \
  |  |   36|  2.02k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  2.02k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 2.02k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  2.02k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 2.02k]
  |  |  ------------------
  ------------------
   84|  2.02k|   m_group->pcurve().serialize_scalar(bytes, m_v);
   85|  2.02k|}
_ZN5Botan22EC_AffinePoint_Data_PCC2ENSt3__110shared_ptrIKNS_13EC_Group_DataEEENS_6PCurve15PrimeOrderCurve11AffinePointE:
   89|  1.65k|      m_group(std::move(group)), m_pt(std::move(pt)) {
   90|  1.65k|   const auto& pcurve = m_group->pcurve();
   91|       |
   92|  1.65k|   if(!pcurve.affine_point_is_identity(m_pt)) {
  ------------------
  |  Branch (92:7): [True: 1.65k, False: 0]
  ------------------
   93|  1.65k|      m_xy.resize(1 + 2 * field_element_bytes());
   94|  1.65k|      pcurve.serialize_point(m_xy, m_pt);
   95|  1.65k|   }
   96|  1.65k|}
_ZNK5Botan22EC_AffinePoint_Data_PC19field_element_bytesEv:
  130|  3.30k|size_t EC_AffinePoint_Data_PC::field_element_bytes() const {
  131|  3.30k|   return m_group->pcurve().field_element_bytes();
  132|  3.30k|}
_ZNK5Botan22EC_AffinePoint_Data_PC11is_identityEv:
  134|  3.30k|bool EC_AffinePoint_Data_PC::is_identity() const {
  135|  3.30k|   return m_xy.empty();
  136|  3.30k|}
_ZNK5Botan22EC_AffinePoint_Data_PC15to_legacy_pointEv:
  178|  1.65k|EC_Point EC_AffinePoint_Data_PC::to_legacy_point() const {
  179|  1.65k|   if(this->is_identity()) {
  ------------------
  |  Branch (179:7): [True: 0, False: 1.65k]
  ------------------
  180|      0|      return EC_Point(m_group->curve());
  181|  1.65k|   } else {
  182|  1.65k|      const size_t fe_bytes = this->field_element_bytes();
  183|  1.65k|      return EC_Point(m_group->curve(),
  184|  1.65k|                      BigInt::from_bytes(std::span{m_xy}.subspan(1, fe_bytes)),
  185|  1.65k|                      BigInt::from_bytes(std::span{m_xy}.last(fe_bytes)));
  186|  1.65k|   }
  187|  1.65k|}

_ZN5Botan8EC_Group13EC_group_infoERKNS_3OIDE:
   16|  2.89k|std::shared_ptr<EC_Group_Data> EC_Group::EC_group_info(const OID& oid) {
   17|       |   // secp256r1
   18|  2.89k|   if(oid == OID{1, 2, 840, 10045, 3, 1, 7}) {
  ------------------
  |  Branch (18:7): [True: 131, False: 2.76k]
  ------------------
   19|    131|      return load_EC_group_info(
   20|    131|         "0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF",
   21|    131|         "0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC",
   22|    131|         "0x5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B",
   23|    131|         "0x6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296",
   24|    131|         "0x4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",
   25|    131|         "0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551",
   26|    131|         oid);
   27|    131|   }
   28|       |
   29|       |   // secp384r1
   30|  2.76k|   if(oid == OID{1, 3, 132, 0, 34}) {
  ------------------
  |  Branch (30:7): [True: 222, False: 2.54k]
  ------------------
   31|    222|      return load_EC_group_info(
   32|    222|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF",
   33|    222|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC",
   34|    222|         "0xB3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF",
   35|    222|         "0xAA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7",
   36|    222|         "0x3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F",
   37|    222|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973",
   38|    222|         oid);
   39|    222|   }
   40|       |
   41|       |   // secp521r1
   42|  2.54k|   if(oid == OID{1, 3, 132, 0, 35}) {
  ------------------
  |  Branch (42:7): [True: 344, False: 2.20k]
  ------------------
   43|    344|      return load_EC_group_info(
   44|    344|         "0x1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
   45|    344|         "0x1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC",
   46|    344|         "0x51953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00",
   47|    344|         "0xC6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66",
   48|    344|         "0x11839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650",
   49|    344|         "0x1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409",
   50|    344|         oid);
   51|    344|   }
   52|       |
   53|       |   // brainpool160r1
   54|  2.20k|   if(oid == OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 1}) {
  ------------------
  |  Branch (54:7): [True: 1, False: 2.20k]
  ------------------
   55|      1|      return load_EC_group_info(
   56|      1|         "0xE95E4A5F737059DC60DFC7AD95B3D8139515620F",
   57|      1|         "0x340E7BE2A280EB74E2BE61BADA745D97E8F7C300",
   58|      1|         "0x1E589A8595423412134FAA2DBDEC95C8D8675E58",
   59|      1|         "0xBED5AF16EA3F6A4F62938C4631EB5AF7BDBCDBC3",
   60|      1|         "0x1667CB477A1A8EC338F94741669C976316DA6321",
   61|      1|         "0xE95E4A5F737059DC60DF5991D45029409E60FC09",
   62|      1|         oid);
   63|      1|   }
   64|       |
   65|       |   // brainpool192r1
   66|  2.20k|   if(oid == OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 3}) {
  ------------------
  |  Branch (66:7): [True: 2, False: 2.19k]
  ------------------
   67|      2|      return load_EC_group_info(
   68|      2|         "0xC302F41D932A36CDA7A3463093D18DB78FCE476DE1A86297",
   69|      2|         "0x6A91174076B1E0E19C39C031FE8685C1CAE040E5C69A28EF",
   70|      2|         "0x469A28EF7C28CCA3DC721D044F4496BCCA7EF4146FBF25C9",
   71|      2|         "0xC0A0647EAAB6A48753B033C56CB0F0900A2F5C4853375FD6",
   72|      2|         "0x14B690866ABD5BB88B5F4828C1490002E6773FA2FA299B8F",
   73|      2|         "0xC302F41D932A36CDA7A3462F9E9E916B5BE8F1029AC4ACC1",
   74|      2|         oid);
   75|      2|   }
   76|       |
   77|       |   // brainpool224r1
   78|  2.19k|   if(oid == OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 5}) {
  ------------------
  |  Branch (78:7): [True: 88, False: 2.11k]
  ------------------
   79|     88|      return load_EC_group_info(
   80|     88|         "0xD7C134AA264366862A18302575D1D787B09F075797DA89F57EC8C0FF",
   81|     88|         "0x68A5E62CA9CE6C1C299803A6C1530B514E182AD8B0042A59CAD29F43",
   82|     88|         "0x2580F63CCFE44138870713B1A92369E33E2135D266DBB372386C400B",
   83|     88|         "0xD9029AD2C7E5CF4340823B2A87DC68C9E4CE3174C1E6EFDEE12C07D",
   84|     88|         "0x58AA56F772C0726F24C6B89E4ECDAC24354B9E99CAA3F6D3761402CD",
   85|     88|         "0xD7C134AA264366862A18302575D0FB98D116BC4B6DDEBCA3A5A7939F",
   86|     88|         oid);
   87|     88|   }
   88|       |
   89|       |   // brainpool256r1
   90|  2.11k|   if(oid == OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 7}) {
  ------------------
  |  Branch (90:7): [True: 132, False: 1.97k]
  ------------------
   91|    132|      return load_EC_group_info(
   92|    132|         "0xA9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5377",
   93|    132|         "0x7D5A0975FC2C3057EEF67530417AFFE7FB8055C126DC5C6CE94A4B44F330B5D9",
   94|    132|         "0x26DC5C6CE94A4B44F330B5D9BBD77CBF958416295CF7E1CE6BCCDC18FF8C07B6",
   95|    132|         "0x8BD2AEB9CB7E57CB2C4B482FFC81B7AFB9DE27E1E3BD23C23A4453BD9ACE3262",
   96|    132|         "0x547EF835C3DAC4FD97F8461A14611DC9C27745132DED8E545C1D54C72F046997",
   97|    132|         "0xA9FB57DBA1EEA9BC3E660A909D838D718C397AA3B561A6F7901E0E82974856A7",
   98|    132|         oid);
   99|    132|   }
  100|       |
  101|       |   // brainpool320r1
  102|  1.97k|   if(oid == OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 9}) {
  ------------------
  |  Branch (102:7): [True: 73, False: 1.90k]
  ------------------
  103|     73|      return load_EC_group_info(
  104|     73|         "0xD35E472036BC4FB7E13C785ED201E065F98FCFA6F6F40DEF4F92B9EC7893EC28FCD412B1F1B32E27",
  105|     73|         "0x3EE30B568FBAB0F883CCEBD46D3F3BB8A2A73513F5EB79DA66190EB085FFA9F492F375A97D860EB4",
  106|     73|         "0x520883949DFDBC42D3AD198640688A6FE13F41349554B49ACC31DCCD884539816F5EB4AC8FB1F1A6",
  107|     73|         "0x43BD7E9AFB53D8B85289BCC48EE5BFE6F20137D10A087EB6E7871E2A10A599C710AF8D0D39E20611",
  108|     73|         "0x14FDD05545EC1CC8AB4093247F77275E0743FFED117182EAA9C77877AAAC6AC7D35245D1692E8EE1",
  109|     73|         "0xD35E472036BC4FB7E13C785ED201E065F98FCFA5B68F12A32D482EC7EE8658E98691555B44C59311",
  110|     73|         oid);
  111|     73|   }
  112|       |
  113|       |   // brainpool384r1
  114|  1.90k|   if(oid == OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 11}) {
  ------------------
  |  Branch (114:7): [True: 186, False: 1.71k]
  ------------------
  115|    186|      return load_EC_group_info(
  116|    186|         "0x8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123ACD3A729901D1A71874700133107EC53",
  117|    186|         "0x7BC382C63D8C150C3C72080ACE05AFA0C2BEA28E4FB22787139165EFBA91F90F8AA5814A503AD4EB04A8C7DD22CE2826",
  118|    186|         "0x4A8C7DD22CE28268B39B55416F0447C2FB77DE107DCD2A62E880EA53EEB62D57CB4390295DBC9943AB78696FA504C11",
  119|    186|         "0x1D1C64F068CF45FFA2A63A81B7C13F6B8847A3E77EF14FE3DB7FCAFE0CBD10E8E826E03436D646AAEF87B2E247D4AF1E",
  120|    186|         "0x8ABE1D7520F9C2A45CB1EB8E95CFD55262B70B29FEEC5864E19C054FF99129280E4646217791811142820341263C5315",
  121|    186|         "0x8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B31F166E6CAC0425A7CF3AB6AF6B7FC3103B883202E9046565",
  122|    186|         oid);
  123|    186|   }
  124|       |
  125|       |   // brainpool512r1
  126|  1.71k|   if(oid == OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 13}) {
  ------------------
  |  Branch (126:7): [True: 150, False: 1.56k]
  ------------------
  127|    150|      return load_EC_group_info(
  128|    150|         "0xAADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA703308717D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F3",
  129|    150|         "0x7830A3318B603B89E2327145AC234CC594CBDD8D3DF91610A83441CAEA9863BC2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A72BF2C7B9E7C1AC4D77FC94CA",
  130|    150|         "0x3DF91610A83441CAEA9863BC2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A72BF2C7B9E7C1AC4D77FC94CADC083E67984050B75EBAE5DD2809BD638016F723",
  131|    150|         "0x81AEE4BDD82ED9645A21322E9C4C6A9385ED9F70B5D916C1B43B62EEF4D0098EFF3B1F78E2D0D48D50D1687B93B97D5F7C6D5047406A5E688B352209BCB9F822",
  132|    150|         "0x7DDE385D566332ECC0EABFA9CF7822FDF209F70024A57B1AA000C55B881F8111B2DCDE494A5F485E5BCA4BD88A2763AED1CA2B2FA8F0540678CD1E0F3AD80892",
  133|    150|         "0xAADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330870553E5C414CA92619418661197FAC10471DB1D381085DDADDB58796829CA90069",
  134|    150|         oid);
  135|    150|   }
  136|       |
  137|       |   // frp256v1
  138|  1.56k|   if(oid == OID{1, 2, 250, 1, 223, 101, 256, 1}) {
  ------------------
  |  Branch (138:7): [True: 0, False: 1.56k]
  ------------------
  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|  1.56k|   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: 1.56k]
  |  Branch (150:7): [True: 0, False: 1.56k]
  |  Branch (150:50): [True: 0, False: 1.56k]
  |  Branch (150:88): [True: 0, False: 1.56k]
  ------------------
  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|  1.56k|   if(oid == OID{1, 2, 643, 7, 1, 2, 1, 2, 1}) {
  ------------------
  |  Branch (162:7): [True: 0, False: 1.56k]
  ------------------
  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|  1.56k|   if(oid == OID{1, 3, 132, 0, 9}) {
  ------------------
  |  Branch (174:7): [True: 13, False: 1.55k]
  ------------------
  175|     13|      return load_EC_group_info(
  176|     13|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73",
  177|     13|         "0x0",
  178|     13|         "0x7",
  179|     13|         "0x3B4C382CE37AA192A4019E763036F4F5DD4D7EBB",
  180|     13|         "0x938CF935318FDCED6BC28286531733C3F03C4FEE",
  181|     13|         "0x100000000000000000001B8FA16DFAB9ACA16B6B3",
  182|     13|         oid);
  183|     13|   }
  184|       |
  185|       |   // secp160r1
  186|  1.55k|   if(oid == OID{1, 3, 132, 0, 8}) {
  ------------------
  |  Branch (186:7): [True: 14, False: 1.54k]
  ------------------
  187|     14|      return load_EC_group_info(
  188|     14|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF",
  189|     14|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC",
  190|     14|         "0x1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45",
  191|     14|         "0x4A96B5688EF573284664698968C38BB913CBFC82",
  192|     14|         "0x23A628553168947D59DCC912042351377AC5FB32",
  193|     14|         "0x100000000000000000001F4C8F927AED3CA752257",
  194|     14|         oid);
  195|     14|   }
  196|       |
  197|       |   // secp160r2
  198|  1.54k|   if(oid == OID{1, 3, 132, 0, 30}) {
  ------------------
  |  Branch (198:7): [True: 25, False: 1.51k]
  ------------------
  199|     25|      return load_EC_group_info(
  200|     25|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73",
  201|     25|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC70",
  202|     25|         "0xB4E134D3FB59EB8BAB57274904664D5AF50388BA",
  203|     25|         "0x52DCB034293A117E1F4FF11B30F7199D3144CE6D",
  204|     25|         "0xFEAFFEF2E331F296E071FA0DF9982CFEA7D43F2E",
  205|     25|         "0x100000000000000000000351EE786A818F3A1A16B",
  206|     25|         oid);
  207|     25|   }
  208|       |
  209|       |   // secp192k1
  210|  1.51k|   if(oid == OID{1, 3, 132, 0, 31}) {
  ------------------
  |  Branch (210:7): [True: 239, False: 1.27k]
  ------------------
  211|    239|      return load_EC_group_info(
  212|    239|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37",
  213|    239|         "0x0",
  214|    239|         "0x3",
  215|    239|         "0xDB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D",
  216|    239|         "0x9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D",
  217|    239|         "0xFFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D",
  218|    239|         oid);
  219|    239|   }
  220|       |
  221|       |   // secp192r1
  222|  1.27k|   if(oid == OID{1, 2, 840, 10045, 3, 1, 1}) {
  ------------------
  |  Branch (222:7): [True: 0, False: 1.27k]
  ------------------
  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|  1.27k|   if(oid == OID{1, 3, 132, 0, 32}) {
  ------------------
  |  Branch (234:7): [True: 608, False: 670]
  ------------------
  235|    608|      return load_EC_group_info(
  236|    608|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D",
  237|    608|         "0x0",
  238|    608|         "0x5",
  239|    608|         "0xA1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C",
  240|    608|         "0x7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5",
  241|    608|         "0x10000000000000000000000000001DCE8D2EC6184CAF0A971769FB1F7",
  242|    608|         oid);
  243|    608|   }
  244|       |
  245|       |   // secp224r1
  246|    670|   if(oid == OID{1, 3, 132, 0, 33}) {
  ------------------
  |  Branch (246:7): [True: 336, False: 334]
  ------------------
  247|    336|      return load_EC_group_info(
  248|    336|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001",
  249|    336|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE",
  250|    336|         "0xB4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4",
  251|    336|         "0xB70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21",
  252|    336|         "0xBD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34",
  253|    336|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D",
  254|    336|         oid);
  255|    336|   }
  256|       |
  257|       |   // secp256k1
  258|    334|   if(oid == OID{1, 3, 132, 0, 10}) {
  ------------------
  |  Branch (258:7): [True: 230, False: 104]
  ------------------
  259|    230|      return load_EC_group_info(
  260|    230|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F",
  261|    230|         "0x0",
  262|    230|         "0x7",
  263|    230|         "0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798",
  264|    230|         "0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8",
  265|    230|         "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141",
  266|    230|         oid);
  267|    230|   }
  268|       |
  269|       |   // sm2p256v1
  270|    104|   if(oid == OID{1, 2, 156, 10197, 1, 301}) {
  ------------------
  |  Branch (270:7): [True: 0, False: 104]
  ------------------
  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|    104|   if(oid == OID{1, 2, 840, 10045, 3, 1, 2}) {
  ------------------
  |  Branch (282:7): [True: 0, False: 104]
  ------------------
  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|    104|   if(oid == OID{1, 2, 840, 10045, 3, 1, 3}) {
  ------------------
  |  Branch (294:7): [True: 0, False: 104]
  ------------------
  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|    104|   if(oid == OID{1, 2, 840, 10045, 3, 1, 4}) {
  ------------------
  |  Branch (306:7): [True: 0, False: 104]
  ------------------
  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|    104|   if(oid == OID{1, 2, 840, 10045, 3, 1, 5}) {
  ------------------
  |  Branch (318:7): [True: 0, False: 104]
  ------------------
  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|    104|   if(oid == OID{1, 2, 840, 10045, 3, 1, 6}) {
  ------------------
  |  Branch (330:7): [True: 0, False: 104]
  ------------------
  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|    104|   if(oid == OID{1, 3, 6, 1, 4, 1, 25258, 4, 3}) {
  ------------------
  |  Branch (342:7): [True: 0, False: 104]
  ------------------
  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|    104|   return std::shared_ptr<EC_Group_Data>();
  354|    104|}
_ZN5Botan8EC_Group28EC_group_identity_from_orderERKNS_6BigIntE:
  358|  1.13k|   {
  359|  1.13k|   const uint32_t low_bits = static_cast<uint32_t>(order.word_at(0));
  360|       |
  361|  1.13k|   if(low_bits == 0xFC632551 && order == BigInt("0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551")) {
  ------------------
  |  Branch (361:7): [True: 170, False: 965]
  |  Branch (361:7): [True: 131, False: 1.00k]
  |  Branch (361:33): [True: 131, False: 39]
  ------------------
  362|    131|      return OID{1, 2, 840, 10045, 3, 1, 7};
  363|    131|   }
  364|       |
  365|  1.00k|   if(low_bits == 0xCCC52973 && order == BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973")) {
  ------------------
  |  Branch (365:7): [True: 2, False: 1.00k]
  |  Branch (365:7): [True: 0, False: 1.00k]
  |  Branch (365:33): [True: 0, False: 2]
  ------------------
  366|      0|      return OID{1, 3, 132, 0, 34};
  367|      0|   }
  368|       |
  369|  1.00k|   if(low_bits == 0x91386409 && order == BigInt("0x1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409")) {
  ------------------
  |  Branch (369:7): [True: 158, False: 846]
  |  Branch (369:7): [True: 128, False: 876]
  |  Branch (369:33): [True: 128, False: 30]
  ------------------
  370|    128|      return OID{1, 3, 132, 0, 35};
  371|    128|   }
  372|       |
  373|    876|   if(low_bits == 0x9E60FC09 && order == BigInt("0xE95E4A5F737059DC60DF5991D45029409E60FC09")) {
  ------------------
  |  Branch (373:7): [True: 1, False: 875]
  |  Branch (373:7): [True: 0, False: 876]
  |  Branch (373:33): [True: 0, False: 1]
  ------------------
  374|      0|      return OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 1};
  375|      0|   }
  376|       |
  377|    876|   if(low_bits == 0x9AC4ACC1 && order == BigInt("0xC302F41D932A36CDA7A3462F9E9E916B5BE8F1029AC4ACC1")) {
  ------------------
  |  Branch (377:7): [True: 0, False: 876]
  |  Branch (377:7): [True: 0, False: 876]
  |  Branch (377:33): [True: 0, False: 0]
  ------------------
  378|      0|      return OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 3};
  379|      0|   }
  380|       |
  381|    876|   if(low_bits == 0xA5A7939F && order == BigInt("0xD7C134AA264366862A18302575D0FB98D116BC4B6DDEBCA3A5A7939F")) {
  ------------------
  |  Branch (381:7): [True: 1, False: 875]
  |  Branch (381:7): [True: 0, False: 876]
  |  Branch (381:33): [True: 0, False: 1]
  ------------------
  382|      0|      return OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 5};
  383|      0|   }
  384|       |
  385|    876|   if(low_bits == 0x974856A7 && order == BigInt("0xA9FB57DBA1EEA9BC3E660A909D838D718C397AA3B561A6F7901E0E82974856A7")) {
  ------------------
  |  Branch (385:7): [True: 2, False: 874]
  |  Branch (385:7): [True: 0, False: 876]
  |  Branch (385:33): [True: 0, False: 2]
  ------------------
  386|      0|      return OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 7};
  387|      0|   }
  388|       |
  389|    876|   if(low_bits == 0x44C59311 && order == BigInt("0xD35E472036BC4FB7E13C785ED201E065F98FCFA5B68F12A32D482EC7EE8658E98691555B44C59311")) {
  ------------------
  |  Branch (389:7): [True: 1, False: 875]
  |  Branch (389:7): [True: 0, False: 876]
  |  Branch (389:33): [True: 0, False: 1]
  ------------------
  390|      0|      return OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 9};
  391|      0|   }
  392|       |
  393|    876|   if(low_bits == 0xE9046565 && order == BigInt("0x8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B31F166E6CAC0425A7CF3AB6AF6B7FC3103B883202E9046565")) {
  ------------------
  |  Branch (393:7): [True: 4, False: 872]
  |  Branch (393:7): [True: 0, False: 876]
  |  Branch (393:33): [True: 0, False: 4]
  ------------------
  394|      0|      return OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 11};
  395|      0|   }
  396|       |
  397|    876|   if(low_bits == 0x9CA90069 && order == BigInt("0xAADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330870553E5C414CA92619418661197FAC10471DB1D381085DDADDB58796829CA90069")) {
  ------------------
  |  Branch (397:7): [True: 1, False: 875]
  |  Branch (397:7): [True: 0, False: 876]
  |  Branch (397:33): [True: 0, False: 1]
  ------------------
  398|      0|      return OID{1, 3, 36, 3, 3, 2, 8, 1, 1, 13};
  399|      0|   }
  400|       |
  401|    876|   if(low_bits == 0xC6D655E1 && order == BigInt("0xF1FD178C0B3AD58F10126DE8CE42435B53DC67E140D2BF941FFDD459C6D655E1")) {
  ------------------
  |  Branch (401:7): [True: 6, False: 870]
  |  Branch (401:7): [True: 0, False: 876]
  |  Branch (401:33): [True: 0, False: 6]
  ------------------
  402|      0|      return OID{1, 2, 250, 1, 223, 101, 256, 1};
  403|      0|   }
  404|       |
  405|    876|   if(low_bits == 0xB761B893 && order == BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6C611070995AD10045841B09B761B893")) {
  ------------------
  |  Branch (405:7): [True: 0, False: 876]
  |  Branch (405:7): [True: 0, False: 876]
  |  Branch (405:33): [True: 0, False: 0]
  ------------------
  406|      0|      return OID{1, 2, 643, 7, 1, 2, 1, 1, 1};
  407|      0|   }
  408|       |
  409|    876|   if(low_bits == 0x1F10B275 && order == BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF27E69532F48D89116FF22B8D4E0560609B4B38ABFAD2B85DCACDB1411F10B275")) {
  ------------------
  |  Branch (409:7): [True: 7, False: 869]
  |  Branch (409:7): [True: 0, False: 876]
  |  Branch (409:33): [True: 0, False: 7]
  ------------------
  410|      0|      return OID{1, 2, 643, 7, 1, 2, 1, 2, 1};
  411|      0|   }
  412|       |
  413|    876|   if(low_bits == 0xCA16B6B3 && order == BigInt("0x100000000000000000001B8FA16DFAB9ACA16B6B3")) {
  ------------------
  |  Branch (413:7): [True: 1, False: 875]
  |  Branch (413:7): [True: 0, False: 876]
  |  Branch (413:33): [True: 0, False: 1]
  ------------------
  414|      0|      return OID{1, 3, 132, 0, 9};
  415|      0|   }
  416|       |
  417|    876|   if(low_bits == 0xCA752257 && order == BigInt("0x100000000000000000001F4C8F927AED3CA752257")) {
  ------------------
  |  Branch (417:7): [True: 0, False: 876]
  |  Branch (417:7): [True: 0, False: 876]
  |  Branch (417:33): [True: 0, False: 0]
  ------------------
  418|      0|      return OID{1, 3, 132, 0, 8};
  419|      0|   }
  420|       |
  421|    876|   if(low_bits == 0xF3A1A16B && order == BigInt("0x100000000000000000000351EE786A818F3A1A16B")) {
  ------------------
  |  Branch (421:7): [True: 1, False: 875]
  |  Branch (421:7): [True: 0, False: 876]
  |  Branch (421:33): [True: 0, False: 1]
  ------------------
  422|      0|      return OID{1, 3, 132, 0, 30};
  423|      0|   }
  424|       |
  425|    876|   if(low_bits == 0x74DEFD8D && order == BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D")) {
  ------------------
  |  Branch (425:7): [True: 1, False: 875]
  |  Branch (425:7): [True: 0, False: 876]
  |  Branch (425:33): [True: 0, False: 1]
  ------------------
  426|      0|      return OID{1, 3, 132, 0, 31};
  427|      0|   }
  428|       |
  429|    876|   if(low_bits == 0xB4D22831 && order == BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831")) {
  ------------------
  |  Branch (429:7): [True: 1, False: 875]
  |  Branch (429:7): [True: 0, False: 876]
  |  Branch (429:33): [True: 0, False: 1]
  ------------------
  430|      0|      return OID{1, 2, 840, 10045, 3, 1, 1};
  431|      0|   }
  432|       |
  433|    876|   if(low_bits == 0x769FB1F7 && order == BigInt("0x10000000000000000000000000001DCE8D2EC6184CAF0A971769FB1F7")) {
  ------------------
  |  Branch (433:7): [True: 1, False: 875]
  |  Branch (433:7): [True: 0, False: 876]
  |  Branch (433:33): [True: 0, False: 1]
  ------------------
  434|      0|      return OID{1, 3, 132, 0, 32};
  435|      0|   }
  436|       |
  437|    876|   if(low_bits == 0x5C5C2A3D && order == BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D")) {
  ------------------
  |  Branch (437:7): [True: 4, False: 872]
  |  Branch (437:7): [True: 2, False: 874]
  |  Branch (437:33): [True: 2, False: 2]
  ------------------
  438|      2|      return OID{1, 3, 132, 0, 33};
  439|      2|   }
  440|       |
  441|    874|   if(low_bits == 0xD0364141 && order == BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141")) {
  ------------------
  |  Branch (441:7): [True: 3, False: 871]
  |  Branch (441:7): [True: 0, False: 874]
  |  Branch (441:33): [True: 0, False: 3]
  ------------------
  442|      0|      return OID{1, 3, 132, 0, 10};
  443|      0|   }
  444|       |
  445|    874|   if(low_bits == 0x39D54123 && order == BigInt("0xFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123")) {
  ------------------
  |  Branch (445:7): [True: 0, False: 874]
  |  Branch (445:7): [True: 0, False: 874]
  |  Branch (445:33): [True: 0, False: 0]
  ------------------
  446|      0|      return OID{1, 2, 156, 10197, 1, 301};
  447|      0|   }
  448|       |
  449|    874|   if(low_bits == 0x48D8DD31 && order == BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFE5FB1A724DC80418648D8DD31")) {
  ------------------
  |  Branch (449:7): [True: 0, False: 874]
  |  Branch (449:7): [True: 0, False: 874]
  |  Branch (449:33): [True: 0, False: 0]
  ------------------
  450|      0|      return OID{1, 2, 840, 10045, 3, 1, 2};
  451|      0|   }
  452|       |
  453|    874|   if(low_bits == 0xF640EC13 && order == BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFF7A62D031C83F4294F640EC13")) {
  ------------------
  |  Branch (453:7): [True: 2, False: 872]
  |  Branch (453:7): [True: 0, False: 874]
  |  Branch (453:33): [True: 0, False: 2]
  ------------------
  454|      0|      return OID{1, 2, 840, 10045, 3, 1, 3};
  455|      0|   }
  456|       |
  457|    874|   if(low_bits == 0x88909D0B && order == BigInt("0x7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF9E5E9A9F5D9071FBD1522688909D0B")) {
  ------------------
  |  Branch (457:7): [True: 2, False: 872]
  |  Branch (457:7): [True: 0, False: 874]
  |  Branch (457:33): [True: 0, False: 2]
  ------------------
  458|      0|      return OID{1, 2, 840, 10045, 3, 1, 4};
  459|      0|   }
  460|       |
  461|    874|   if(low_bits == 0xBC582063 && order == BigInt("0x7FFFFFFFFFFFFFFFFFFFFFFF800000CFA7E8594377D414C03821BC582063")) {
  ------------------
  |  Branch (461:7): [True: 5, False: 869]
  |  Branch (461:7): [True: 0, False: 874]
  |  Branch (461:33): [True: 0, False: 5]
  ------------------
  462|      0|      return OID{1, 2, 840, 10045, 3, 1, 5};
  463|      0|   }
  464|       |
  465|    874|   if(low_bits == 0x46526551 && order == BigInt("0x7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF975DEB41B3A6057C3C432146526551")) {
  ------------------
  |  Branch (465:7): [True: 3, False: 871]
  |  Branch (465:7): [True: 0, False: 874]
  |  Branch (465:33): [True: 0, False: 3]
  ------------------
  466|      0|      return OID{1, 2, 840, 10045, 3, 1, 6};
  467|      0|   }
  468|       |
  469|    874|   if(low_bits == 0x0433555D && order == BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5B3CA4FB94E7831B4FC258ED97D0BDC63B568B36607CD243CE153F390433555D")) {
  ------------------
  |  Branch (469:7): [True: 3, False: 871]
  |  Branch (469:7): [True: 0, False: 874]
  |  Branch (469:33): [True: 0, False: 3]
  ------------------
  470|      0|      return OID{1, 3, 6, 1, 4, 1, 25258, 4, 3};
  471|      0|   }
  472|       |
  473|    874|   return OID();
  474|    874|}

_ZN5Botan9EC_ScalarC2ENSt3__110unique_ptrINS_14EC_Scalar_DataENS1_14default_deleteIS3_EEEE:
   22|  2.70k|EC_Scalar::EC_Scalar(std::unique_ptr<EC_Scalar_Data> scalar) : m_scalar(std::move(scalar)) {
   23|  2.70k|   BOTAN_ASSERT_NONNULL(m_scalar);
  ------------------
  |  |  116|  2.70k|   do {                                                                                   \
  |  |  117|  2.70k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (117:10): [True: 0, False: 2.70k]
  |  |  ------------------
  |  |  118|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  119|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  120|      0|      }                                                                                   \
  |  |  121|  2.70k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (121:12): [Folded, False: 2.70k]
  |  |  ------------------
  ------------------
   24|  2.70k|}
_ZN5Botan9EC_ScalarC2ERKS0_:
   26|  2.70k|EC_Scalar::EC_Scalar(const EC_Scalar& other) : m_scalar(other.inner().clone()) {}
_ZN5Botan9EC_ScalarC2EOS0_:
   28|  5.40k|EC_Scalar::EC_Scalar(EC_Scalar&& other) noexcept : m_scalar(std::move(other.m_scalar)) {}
_ZN5Botan9EC_ScalarD2Ev:
   49|  10.8k|EC_Scalar::~EC_Scalar() = default;
_ZNK5Botan9EC_Scalar9to_bigintEv:
   83|  2.70k|BigInt EC_Scalar::to_bigint() const {
   84|  2.70k|   secure_vector<uint8_t> bytes(m_scalar->bytes());
   85|  2.70k|   m_scalar->serialize_to(bytes);
   86|  2.70k|   return BigInt::from_bytes(bytes);
   87|  2.70k|}
_ZN5Botan9EC_Scalar11deserializeERKNS_8EC_GroupENSt3__14spanIKhLm18446744073709551615EEE:
  125|  2.73k|std::optional<EC_Scalar> EC_Scalar::deserialize(const EC_Group& group, std::span<const uint8_t> bytes) {
  126|  2.73k|   if(auto v = group._data()->scalar_deserialize(bytes)) {
  ------------------
  |  Branch (126:12): [True: 2.70k, False: 30]
  ------------------
  127|  2.70k|      return EC_Scalar(std::move(v));
  128|  2.70k|   } else {
  129|     30|      return {};
  130|     30|   }
  131|  2.73k|}
_ZNK5Botan9EC_Scalar7is_zeroEv:
  140|  2.70k|bool EC_Scalar::is_zero() const {
  141|  2.70k|   return inner().is_zero();
  142|  2.70k|}
_ZN5Botan9EC_Scalar7zeroizeEv:
  185|  2.70k|void EC_Scalar::zeroize() {
  186|  2.70k|   m_scalar->zeroize();
  187|  2.70k|}

_ZN5Botan17EC_Scalar_Data_BN11checked_refERKNS_14EC_Scalar_DataE:
   15|    137|const EC_Scalar_Data_BN& EC_Scalar_Data_BN::checked_ref(const EC_Scalar_Data& data) {
   16|    137|   const auto* p = dynamic_cast<const EC_Scalar_Data_BN*>(&data);
   17|    137|   if(p == nullptr) {
  ------------------
  |  Branch (17:7): [True: 0, False: 137]
  ------------------
   18|      0|      throw Invalid_State("Failed conversion to EC_Scalar_Data_BN");
   19|      0|   }
   20|    137|   return *p;
   21|    137|}
_ZNK5Botan17EC_Scalar_Data_BN5groupEv:
   23|  1.62k|const std::shared_ptr<const EC_Group_Data>& EC_Scalar_Data_BN::group() const {
   24|  1.62k|   return m_group;
   25|  1.62k|}
_ZNK5Botan17EC_Scalar_Data_BN5bytesEv:
   27|    675|size_t EC_Scalar_Data_BN::bytes() const {
   28|    675|   return this->group()->order_bytes();
   29|    675|}
_ZNK5Botan17EC_Scalar_Data_BN5cloneEv:
   31|    675|std::unique_ptr<EC_Scalar_Data> EC_Scalar_Data_BN::clone() const {
   32|    675|   return std::make_unique<EC_Scalar_Data_BN>(this->group(), this->value());
   33|    675|}
_ZNK5Botan17EC_Scalar_Data_BN7is_zeroEv:
   35|    675|bool EC_Scalar_Data_BN::is_zero() const {
   36|    675|   return this->value().is_zero();
   37|    675|}
_ZN5Botan17EC_Scalar_Data_BN7zeroizeEv:
   48|    675|void EC_Scalar_Data_BN::zeroize() {
   49|       |   // BigInt stores its value in a secure_vector, after swapping the existing
   50|       |   // value will go out of scope (inside `zero`) and be wiped properly.
   51|    675|   BigInt zero;
   52|    675|   std::swap(m_v, zero);
   53|    675|}
_ZNK5Botan17EC_Scalar_Data_BN12serialize_toENSt3__14spanIhLm18446744073709551615EEE:
   92|    675|void EC_Scalar_Data_BN::serialize_to(std::span<uint8_t> bytes) const {
   93|    675|   BOTAN_ARG_CHECK(bytes.size() == m_group->order_bytes(), "Invalid output length");
  ------------------
  |  |   35|    675|   do {                                                          \
  |  |   36|    675|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    675|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 675]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    675|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 675]
  |  |  ------------------
  ------------------
   94|    675|   m_v.serialize_to(bytes);
   95|    675|}
_ZN5Botan22EC_AffinePoint_Data_BNC2ENSt3__110shared_ptrIKNS_13EC_Group_DataEEENS_8EC_PointE:
   98|    138|      m_group(std::move(group)), m_pt(std::move(pt)) {
   99|    138|   if(!m_pt.is_zero()) {
  ------------------
  |  Branch (99:7): [True: 138, False: 0]
  ------------------
  100|    138|      m_pt.force_affine();
  101|    138|      m_xy = m_pt.xy_bytes();
  102|    138|   }
  103|    138|}
_ZNK5Botan22EC_AffinePoint_Data_BN11is_identityEv:
  153|    138|bool EC_AffinePoint_Data_BN::is_identity() const {
  154|    138|   return m_xy.empty();
  155|    138|}

_ZN5Botan8CurveGFpC2EPKNS_13EC_Group_DataE:
   28|  2.93k|CurveGFp::CurveGFp(const EC_Group_Data* group) : m_group(group) {
   29|  2.93k|   BOTAN_ASSERT_NONNULL(m_group);
  ------------------
  |  |  116|  2.93k|   do {                                                                                   \
  |  |  117|  2.93k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (117:10): [True: 0, False: 2.93k]
  |  |  ------------------
  |  |  118|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  119|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  120|      0|      }                                                                                   \
  |  |  121|  2.93k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (121:12): [Folded, False: 2.93k]
  |  |  ------------------
  ------------------
   30|  2.93k|}
_ZNK5Botan8CurveGFp5groupEv:
   32|   969k|const EC_Group_Data& CurveGFp::group() const {
   33|   969k|   BOTAN_ASSERT_NONNULL(m_group);
  ------------------
  |  |  116|   969k|   do {                                                                                   \
  |  |  117|   969k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (117:10): [True: 0, False: 969k]
  |  |  ------------------
  |  |  118|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  119|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  120|      0|      }                                                                                   \
  |  |  121|   969k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (121:12): [Folded, False: 969k]
  |  |  ------------------
  ------------------
   34|   969k|   return *m_group;
   35|   969k|}
_ZNK5Botan8CurveGFp5get_aEv:
   37|     25|const BigInt& CurveGFp::get_a() const {
   38|     25|   return this->group().a();
   39|     25|}
_ZNK5Botan8CurveGFp5get_bEv:
   41|     25|const BigInt& CurveGFp::get_b() const {
   42|     25|   return this->group().b();
   43|     25|}
_ZNK5Botan8CurveGFp5get_pEv:
   45|     25|const BigInt& CurveGFp::get_p() const {
   46|     25|   return this->group().p();
   47|     25|}
_ZNK5Botan8CurveGFp11get_p_wordsEv:
   49|   346k|size_t CurveGFp::get_p_words() const {
   50|   346k|   return this->group().p_words();
   51|   346k|}
_ZN5Botan8EC_PointC2ERKNS_8CurveGFpE:
  108|    137|EC_Point::EC_Point(const CurveGFp& curve) : m_curve(curve), m_x(0), m_y(curve.group().monty().R1()), m_z(0) {}
_ZNK5Botan8EC_Point4zeroEv:
  110|    137|EC_Point EC_Point::zero() const {
  111|    137|   return EC_Point(m_curve);
  112|    137|}
_ZN5Botan8EC_PointC2ERKNS_8CurveGFpENS_6BigIntES4_:
  115|  4.60k|      m_curve(curve), m_x(std::move(x)), m_y(std::move(y)), m_z(m_curve.group().monty().R1()) {
  116|  4.60k|   const auto& group = m_curve.group();
  117|       |
  118|  4.60k|   if(m_x < 0 || m_x >= group.p()) {
  ------------------
  |  Branch (118:7): [True: 0, False: 4.60k]
  |  Branch (118:18): [True: 0, False: 4.60k]
  ------------------
  119|      0|      throw Invalid_Argument("Invalid EC_Point affine x");
  120|      0|   }
  121|  4.60k|   if(m_y < 0 || m_y >= group.p()) {
  ------------------
  |  Branch (121:7): [True: 0, False: 4.60k]
  |  Branch (121:18): [True: 0, False: 4.60k]
  ------------------
  122|      0|      throw Invalid_Argument("Invalid EC_Point affine y");
  123|      0|   }
  124|       |
  125|  4.60k|   secure_vector<word> monty_ws(monty_ws_size(group));
  126|       |
  127|  4.60k|   to_rep(group, m_x, monty_ws);
  128|  4.60k|   to_rep(group, m_y, monty_ws);
  129|  4.60k|}
_ZN5Botan8EC_Point10add_affineEPKmmS2_mRNSt3__16vectorINS_6BigIntENS3_9allocatorIS5_EEEE:
  188|  9.61k|   const word x_words[], size_t x_size, const word y_words[], size_t y_size, std::vector<BigInt>& ws_bn) {
  189|  9.61k|   if((CT::all_zeros(x_words, x_size) & CT::all_zeros(y_words, y_size)).as_bool()) {
  ------------------
  |  Branch (189:7): [True: 3.08k, False: 6.52k]
  ------------------
  190|  3.08k|      return;
  191|  3.08k|   }
  192|       |
  193|  6.52k|   const auto& group = m_curve.group();
  194|       |
  195|  6.52k|   if(is_zero()) {
  ------------------
  |  Branch (195:7): [True: 137, False: 6.38k]
  ------------------
  196|    137|      m_x.set_words(x_words, x_size);
  197|    137|      m_y.set_words(y_words, y_size);
  198|    137|      m_z = group.monty().R1();
  199|    137|      return;
  200|    137|   }
  201|       |
  202|  6.38k|   resize_ws(ws_bn, monty_ws_size(group));
  203|       |
  204|  6.38k|   secure_vector<word>& ws = ws_bn[0].get_word_vector();
  205|  6.38k|   secure_vector<word>& sub_ws = ws_bn[1].get_word_vector();
  206|       |
  207|  6.38k|   BigInt& T0 = ws_bn[2];
  208|  6.38k|   BigInt& T1 = ws_bn[3];
  209|  6.38k|   BigInt& T2 = ws_bn[4];
  210|  6.38k|   BigInt& T3 = ws_bn[5];
  211|  6.38k|   BigInt& T4 = ws_bn[6];
  212|       |
  213|       |   /*
  214|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-1998-cmo-2
  215|       |   simplified with Z2 = 1
  216|       |   */
  217|       |
  218|  6.38k|   const BigInt& p = group.p();
  219|       |
  220|  6.38k|   fe_sqr(group, T3, m_z, ws);                  // z1^2
  221|  6.38k|   fe_mul(group, T4, x_words, x_size, T3, ws);  // x2*z1^2
  222|       |
  223|  6.38k|   fe_mul(group, T2, m_z, T3, ws);              // z1^3
  224|  6.38k|   fe_mul(group, T0, y_words, y_size, T2, ws);  // y2*z1^3
  225|       |
  226|  6.38k|   T4.mod_sub(m_x, p, sub_ws);  // x2*z1^2 - x1*z2^2
  227|       |
  228|  6.38k|   T0.mod_sub(m_y, p, sub_ws);
  229|       |
  230|  6.38k|   if(T4.is_zero()) {
  ------------------
  |  Branch (230:7): [True: 4, False: 6.38k]
  ------------------
  231|      4|      if(T0.is_zero()) {
  ------------------
  |  Branch (231:10): [True: 4, False: 0]
  ------------------
  232|      4|         mult2(ws_bn);
  233|      4|         return;
  234|      4|      }
  235|       |
  236|       |      // setting to zero:
  237|      0|      m_x.clear();
  238|      0|      m_y = group.monty().R1();
  239|      0|      m_z.clear();
  240|      0|      return;
  241|      4|   }
  242|       |
  243|  6.38k|   fe_sqr(group, T2, T4, ws);
  244|       |
  245|  6.38k|   fe_mul(group, T3, m_x, T2, ws);
  246|       |
  247|  6.38k|   fe_mul(group, T1, T2, T4, ws);
  248|       |
  249|  6.38k|   fe_sqr(group, m_x, T0, ws);
  250|  6.38k|   m_x.mod_sub(T1, p, sub_ws);
  251|       |
  252|  6.38k|   m_x.mod_sub(T3, p, sub_ws);
  253|  6.38k|   m_x.mod_sub(T3, p, sub_ws);
  254|       |
  255|  6.38k|   T3.mod_sub(m_x, p, sub_ws);
  256|       |
  257|  6.38k|   fe_mul(group, T2, T0, T3, ws);
  258|  6.38k|   fe_mul(group, T0, m_y, T1, ws);
  259|  6.38k|   T2.mod_sub(T0, p, sub_ws);
  260|  6.38k|   m_y.swap(T2);
  261|       |
  262|  6.38k|   fe_mul(group, T0, m_z, T4, ws);
  263|  6.38k|   m_z.swap(T0);
  264|  6.38k|}
_ZN5Botan8EC_Point3addERKS0_RNSt3__16vectorINS_6BigIntENS3_9allocatorIS5_EEEE:
  266|   345k|void EC_Point::add(const EC_Point& other, std::vector<BigInt>& workspace) {
  267|   345k|   BOTAN_ARG_CHECK(m_curve == other.m_curve, "cannot add points on different curves");
  ------------------
  |  |   35|   345k|   do {                                                          \
  |  |   36|   345k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|   345k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 345k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|   345k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 345k]
  |  |  ------------------
  ------------------
  268|       |
  269|   345k|   const size_t p_words = m_curve.get_p_words();
  270|       |
  271|   345k|   add(other.m_x._data(),
  272|   345k|       std::min(p_words, other.m_x.size()),
  273|   345k|       other.m_y._data(),
  274|   345k|       std::min(p_words, other.m_y.size()),
  275|   345k|       other.m_z._data(),
  276|   345k|       std::min(p_words, other.m_z.size()),
  277|   345k|       workspace);
  278|   345k|}
_ZN5Botan8EC_Point3addEPKmmS2_mS2_mRNSt3__16vectorINS_6BigIntENS3_9allocatorIS5_EEEE:
  286|   345k|                   std::vector<BigInt>& ws_bn) {
  287|   345k|   if((CT::all_zeros(x_words, x_size) & CT::all_zeros(z_words, z_size)).as_bool()) {
  ------------------
  |  Branch (287:7): [True: 0, False: 345k]
  ------------------
  288|      0|      return;
  289|      0|   }
  290|       |
  291|   345k|   const auto& group = m_curve.group();
  292|       |
  293|   345k|   if(is_zero()) {
  ------------------
  |  Branch (293:7): [True: 0, False: 345k]
  ------------------
  294|      0|      m_x.set_words(x_words, x_size);
  295|      0|      m_y.set_words(y_words, y_size);
  296|      0|      m_z.set_words(z_words, z_size);
  297|      0|      return;
  298|      0|   }
  299|       |
  300|   345k|   resize_ws(ws_bn, monty_ws_size(group));
  301|       |
  302|   345k|   secure_vector<word>& ws = ws_bn[0].get_word_vector();
  303|   345k|   secure_vector<word>& sub_ws = ws_bn[1].get_word_vector();
  304|       |
  305|   345k|   BigInt& T0 = ws_bn[2];
  306|   345k|   BigInt& T1 = ws_bn[3];
  307|   345k|   BigInt& T2 = ws_bn[4];
  308|   345k|   BigInt& T3 = ws_bn[5];
  309|   345k|   BigInt& T4 = ws_bn[6];
  310|   345k|   BigInt& T5 = ws_bn[7];
  311|       |
  312|       |   /*
  313|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-1998-cmo-2
  314|       |   */
  315|       |
  316|   345k|   const BigInt& p = group.p();
  317|       |
  318|   345k|   fe_sqr(group, T0, z_words, z_size, ws);      // z2^2
  319|   345k|   fe_mul(group, T1, m_x, T0, ws);              // x1*z2^2
  320|   345k|   fe_mul(group, T3, z_words, z_size, T0, ws);  // z2^3
  321|   345k|   fe_mul(group, T2, m_y, T3, ws);              // y1*z2^3
  322|       |
  323|   345k|   fe_sqr(group, T3, m_z, ws);                  // z1^2
  324|   345k|   fe_mul(group, T4, x_words, x_size, T3, ws);  // x2*z1^2
  325|       |
  326|   345k|   fe_mul(group, T5, m_z, T3, ws);              // z1^3
  327|   345k|   fe_mul(group, T0, y_words, y_size, T5, ws);  // y2*z1^3
  328|       |
  329|   345k|   T4.mod_sub(T1, p, sub_ws);  // x2*z1^2 - x1*z2^2
  330|       |
  331|   345k|   T0.mod_sub(T2, p, sub_ws);
  332|       |
  333|   345k|   if(T4.is_zero()) {
  ------------------
  |  Branch (333:7): [True: 0, False: 345k]
  ------------------
  334|      0|      if(T0.is_zero()) {
  ------------------
  |  Branch (334:10): [True: 0, False: 0]
  ------------------
  335|      0|         mult2(ws_bn);
  336|      0|         return;
  337|      0|      }
  338|       |
  339|       |      // setting to zero:
  340|      0|      m_x.clear();
  341|      0|      m_y = group.monty().R1();
  342|      0|      m_z.clear();
  343|      0|      return;
  344|      0|   }
  345|       |
  346|   345k|   fe_sqr(group, T5, T4, ws);
  347|       |
  348|   345k|   fe_mul(group, T3, T1, T5, ws);
  349|       |
  350|   345k|   fe_mul(group, T1, T5, T4, ws);
  351|       |
  352|   345k|   fe_sqr(group, m_x, T0, ws);
  353|   345k|   m_x.mod_sub(T1, p, sub_ws);
  354|   345k|   m_x.mod_sub(T3, p, sub_ws);
  355|   345k|   m_x.mod_sub(T3, p, sub_ws);
  356|       |
  357|   345k|   T3.mod_sub(m_x, p, sub_ws);
  358|       |
  359|   345k|   fe_mul(group, m_y, T0, T3, ws);
  360|   345k|   fe_mul(group, T3, T2, T1, ws);
  361|       |
  362|   345k|   m_y.mod_sub(T3, p, sub_ws);
  363|       |
  364|   345k|   fe_mul(group, T3, z_words, z_size, m_z, ws);
  365|   345k|   fe_mul(group, m_z, T3, T4, ws);
  366|   345k|}
_ZN5Botan8EC_Point5mult2ERNSt3__16vectorINS_6BigIntENS1_9allocatorIS3_EEEE:
  388|   259k|void EC_Point::mult2(std::vector<BigInt>& ws_bn) {
  389|   259k|   if(is_zero()) {
  ------------------
  |  Branch (389:7): [True: 0, False: 259k]
  ------------------
  390|      0|      return;
  391|      0|   }
  392|       |
  393|   259k|   const auto& group = m_curve.group();
  394|       |
  395|   259k|   if(m_y.is_zero()) {
  ------------------
  |  Branch (395:7): [True: 0, False: 259k]
  ------------------
  396|      0|      *this = EC_Point(m_curve);  // setting myself to zero
  397|      0|      return;
  398|      0|   }
  399|       |
  400|   259k|   resize_ws(ws_bn, monty_ws_size(group));
  401|       |
  402|   259k|   secure_vector<word>& ws = ws_bn[0].get_word_vector();
  403|   259k|   secure_vector<word>& sub_ws = ws_bn[1].get_word_vector();
  404|       |
  405|   259k|   BigInt& T0 = ws_bn[2];
  406|   259k|   BigInt& T1 = ws_bn[3];
  407|   259k|   BigInt& T2 = ws_bn[4];
  408|   259k|   BigInt& T3 = ws_bn[5];
  409|   259k|   BigInt& T4 = ws_bn[6];
  410|       |
  411|       |   /*
  412|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-1986-cc
  413|       |   */
  414|   259k|   const BigInt& p = group.p();
  415|       |
  416|   259k|   fe_sqr(group, T0, m_y, ws);
  417|       |
  418|   259k|   fe_mul(group, T1, m_x, T0, ws);
  419|   259k|   fe_smul<4>(T1, p, sub_ws);
  420|       |
  421|   259k|   if(group.a_is_zero()) {
  ------------------
  |  Branch (421:7): [True: 209k, False: 50.2k]
  ------------------
  422|       |      // if a == 0 then 3*x^2 + a*z^4 is just 3*x^2
  423|   209k|      fe_sqr(group, T4, m_x, ws);  // x^2
  424|   209k|      fe_smul<3>(T4, p, sub_ws);   // 3*x^2
  425|   209k|   } else if(group.a_is_minus_3()) {
  ------------------
  |  Branch (425:14): [True: 50.2k, False: 0]
  ------------------
  426|       |      /*
  427|       |      if a == -3 then
  428|       |        3*x^2 + a*z^4 == 3*x^2 - 3*z^4 == 3*(x^2-z^4) == 3*(x-z^2)*(x+z^2)
  429|       |      */
  430|  50.2k|      fe_sqr(group, T3, m_z, ws);  // z^2
  431|       |
  432|       |      // (x-z^2)
  433|  50.2k|      T2 = m_x;
  434|  50.2k|      T2.mod_sub(T3, p, sub_ws);
  435|       |
  436|       |      // (x+z^2)
  437|  50.2k|      T3.mod_add(m_x, p, sub_ws);
  438|       |
  439|  50.2k|      fe_mul(group, T4, T2, T3, ws);  // (x-z^2)*(x+z^2)
  440|       |
  441|  50.2k|      fe_smul<3>(T4, p, sub_ws);  // 3*(x-z^2)*(x+z^2)
  442|  50.2k|   } else {
  443|      0|      fe_sqr(group, T3, m_z, ws);                  // z^2
  444|      0|      fe_sqr(group, T4, T3, ws);                   // z^4
  445|      0|      fe_mul(group, T3, group.monty_a(), T4, ws);  // a*z^4
  446|       |
  447|      0|      fe_sqr(group, T4, m_x, ws);  // x^2
  448|      0|      fe_smul<3>(T4, p, sub_ws);
  449|      0|      T4.mod_add(T3, p, sub_ws);  // 3*x^2 + a*z^4
  450|      0|   }
  451|       |
  452|   259k|   fe_sqr(group, T2, T4, ws);
  453|   259k|   T2.mod_sub(T1, p, sub_ws);
  454|   259k|   T2.mod_sub(T1, p, sub_ws);
  455|       |
  456|   259k|   fe_sqr(group, T3, T0, ws);
  457|   259k|   fe_smul<8>(T3, p, sub_ws);
  458|       |
  459|   259k|   T1.mod_sub(T2, p, sub_ws);
  460|       |
  461|   259k|   fe_mul(group, T0, T4, T1, ws);
  462|   259k|   T0.mod_sub(T3, p, sub_ws);
  463|       |
  464|   259k|   m_x.swap(T2);
  465|       |
  466|   259k|   fe_mul(group, T2, m_y, m_z, ws);
  467|   259k|   fe_smul<2>(T2, p, sub_ws);
  468|       |
  469|   259k|   m_y.swap(T0);
  470|   259k|   m_z.swap(T2);
  471|   259k|}
_ZN5Botan8EC_Point16force_all_affineENSt3__14spanIS0_Lm18446744073709551615EEERNS1_6vectorImNS_16secure_allocatorImEEEE:
  520|    740|void EC_Point::force_all_affine(std::span<EC_Point> points, secure_vector<word>& ws) {
  521|    740|   if(points.size() <= 1) {
  ------------------
  |  Branch (521:7): [True: 0, False: 740]
  ------------------
  522|      0|      for(auto& point : points) {
  ------------------
  |  Branch (522:23): [True: 0, False: 0]
  ------------------
  523|      0|         point.force_affine();
  524|      0|      }
  525|      0|      return;
  526|      0|   }
  527|       |
  528|   605k|   for(auto& point : points) {
  ------------------
  |  Branch (528:20): [True: 605k, False: 740]
  ------------------
  529|   605k|      if(point.is_zero()) {
  ------------------
  |  Branch (529:10): [True: 0, False: 605k]
  ------------------
  530|      0|         throw Invalid_State("Cannot convert zero ECC point to affine");
  531|      0|      }
  532|   605k|   }
  533|       |
  534|       |   /*
  535|       |   For >= 2 points use Montgomery's trick
  536|       |
  537|       |   See Algorithm 2.26 in "Guide to Elliptic Curve Cryptography"
  538|       |   (Hankerson, Menezes, Vanstone)
  539|       |
  540|       |   TODO is it really necessary to save all k points in c?
  541|       |   */
  542|       |
  543|    740|   const auto& group = points[0].m_curve.group();
  544|    740|   const BigInt& rep_1 = group.monty().R1();
  545|       |
  546|    740|   if(ws.size() < monty_ws_size(group)) {
  ------------------
  |  Branch (546:7): [True: 0, False: 740]
  ------------------
  547|      0|      ws.resize(monty_ws_size(group));
  548|      0|   }
  549|       |
  550|    740|   std::vector<BigInt> c(points.size());
  551|    740|   c[0] = points[0].m_z;
  552|       |
  553|   605k|   for(size_t i = 1; i != points.size(); ++i) {
  ------------------
  |  Branch (553:22): [True: 604k, False: 740]
  ------------------
  554|   604k|      fe_mul(group, c[i], c[i - 1], points[i].m_z, ws);
  555|   604k|   }
  556|       |
  557|    740|   BigInt s_inv = invert_element(group, c[c.size() - 1], ws);
  558|       |
  559|    740|   BigInt z_inv;
  560|    740|   BigInt z2_inv;
  561|    740|   BigInt z3_inv;
  562|       |
  563|   605k|   for(size_t i = points.size() - 1; i != 0; i--) {
  ------------------
  |  Branch (563:38): [True: 604k, False: 740]
  ------------------
  564|   604k|      EC_Point& point = points[i];
  565|       |
  566|   604k|      fe_mul(group, z_inv, s_inv, c[i - 1], ws);
  567|       |
  568|   604k|      s_inv = fe_mul(group, s_inv, point.m_z, ws);
  569|       |
  570|   604k|      fe_sqr(group, z2_inv, z_inv, ws);
  571|   604k|      fe_mul(group, z3_inv, z2_inv, z_inv, ws);
  572|   604k|      point.m_x = fe_mul(group, point.m_x, z2_inv, ws);
  573|   604k|      point.m_y = fe_mul(group, point.m_y, z3_inv, ws);
  574|   604k|      point.m_z = rep_1;
  575|   604k|   }
  576|       |
  577|    740|   fe_sqr(group, z2_inv, s_inv, ws);
  578|    740|   fe_mul(group, z3_inv, z2_inv, s_inv, ws);
  579|    740|   points[0].m_x = fe_mul(group, points[0].m_x, z2_inv, ws);
  580|    740|   points[0].m_y = fe_mul(group, points[0].m_y, z3_inv, ws);
  581|    740|   points[0].m_z = rep_1;
  582|    740|}
_ZN5Botan8EC_Point12force_affineEv:
  584|    138|void EC_Point::force_affine() {
  585|    138|   if(is_zero()) {
  ------------------
  |  Branch (585:7): [True: 0, False: 138]
  ------------------
  586|      0|      throw Invalid_State("Cannot convert zero ECC point to affine");
  587|      0|   }
  588|       |
  589|    138|   secure_vector<word> ws;
  590|       |
  591|    138|   const auto& group = m_curve.group();
  592|       |
  593|    138|   const BigInt z_inv = invert_element(group, m_z, ws);
  594|    138|   const BigInt z2_inv = fe_sqr(group, z_inv, ws);
  595|    138|   const BigInt z3_inv = fe_mul(group, z_inv, z2_inv, ws);
  596|    138|   m_x = fe_mul(group, m_x, z2_inv, ws);
  597|    138|   m_y = fe_mul(group, m_y, z3_inv, ws);
  598|    138|   m_z = group.monty().R1();
  599|    138|}
_ZNK5Botan8EC_Point9is_affineEv:
  601|    276|bool EC_Point::is_affine() const {
  602|    276|   const auto& group = m_curve.group();
  603|    276|   return m_z == group.monty().R1();
  604|    276|}
_ZNK5Botan8EC_Point8xy_bytesEv:
  622|    138|secure_vector<uint8_t> EC_Point::xy_bytes() const {
  623|    138|   const auto& group = m_curve.group();
  624|    138|   const size_t p_bytes = group.p_bytes();
  625|    138|   secure_vector<uint8_t> b(2 * p_bytes);
  626|    138|   BigInt::encode_1363(&b[0], p_bytes, this->get_affine_x());  // NOLINT(*container-data-pointer)
  627|    138|   BigInt::encode_1363(&b[p_bytes], p_bytes, this->get_affine_y());
  628|    138|   return b;
  629|    138|}
_ZNK5Botan8EC_Point12get_affine_xEv:
  631|    138|BigInt EC_Point::get_affine_x() const {
  632|    138|   if(is_zero()) {
  ------------------
  |  Branch (632:7): [True: 0, False: 138]
  ------------------
  633|      0|      throw Invalid_State("Cannot convert zero point to affine");
  634|      0|   }
  635|       |
  636|    138|   secure_vector<word> monty_ws;
  637|       |
  638|    138|   const auto& group = m_curve.group();
  639|       |
  640|    138|   if(is_affine()) {
  ------------------
  |  Branch (640:7): [True: 138, False: 0]
  ------------------
  641|    138|      return from_rep_to_tmp(group, m_x, monty_ws);
  642|    138|   }
  643|       |
  644|      0|   BigInt z2 = fe_sqr(group, m_z, monty_ws);
  645|      0|   z2 = invert_element(group, z2, monty_ws);
  646|       |
  647|      0|   BigInt r;
  648|      0|   fe_mul(group, r, m_x, z2, monty_ws);
  649|      0|   from_rep(group, r, monty_ws);
  650|      0|   return r;
  651|    138|}
_ZNK5Botan8EC_Point12get_affine_yEv:
  653|    138|BigInt EC_Point::get_affine_y() const {
  654|    138|   if(is_zero()) {
  ------------------
  |  Branch (654:7): [True: 0, False: 138]
  ------------------
  655|      0|      throw Invalid_State("Cannot convert zero point to affine");
  656|      0|   }
  657|       |
  658|    138|   const auto& group = m_curve.group();
  659|    138|   secure_vector<word> monty_ws;
  660|       |
  661|    138|   if(is_affine()) {
  ------------------
  |  Branch (661:7): [True: 138, False: 0]
  ------------------
  662|    138|      return from_rep_to_tmp(group, m_y, monty_ws);
  663|    138|   }
  664|       |
  665|      0|   const BigInt z2 = fe_sqr(group, m_z, monty_ws);
  666|      0|   const BigInt z3 = fe_mul(group, m_z, z2, monty_ws);
  667|      0|   const BigInt z3_inv = invert_element(group, z3, monty_ws);
  668|       |
  669|      0|   BigInt r;
  670|      0|   fe_mul(group, r, m_y, z3_inv, monty_ws);
  671|      0|   from_rep(group, r, monty_ws);
  672|      0|   return r;
  673|    138|}
_ZNK5Botan8EC_Point12on_the_curveEv:
  675|     23|bool EC_Point::on_the_curve() const {
  676|       |   /*
  677|       |   Is the point still on the curve?? (If everything is correct, the
  678|       |   point is always on its curve; then the function will return true.
  679|       |   If somehow the state is corrupted, which suggests a fault attack
  680|       |   (or internal computational error), then return false.
  681|       |   */
  682|     23|   if(is_zero()) {
  ------------------
  |  Branch (682:7): [True: 0, False: 23]
  ------------------
  683|      0|      return true;
  684|      0|   }
  685|       |
  686|     23|   const auto& group = m_curve.group();
  687|     23|   secure_vector<word> monty_ws;
  688|       |
  689|     23|   const BigInt y2 = from_rep_to_tmp(group, fe_sqr(group, m_y, monty_ws), monty_ws);
  690|     23|   const BigInt x3 = fe_mul(group, m_x, fe_sqr(group, m_x, monty_ws), monty_ws);
  691|     23|   const BigInt ax = fe_mul(group, m_x, group.monty_a(), monty_ws);
  692|     23|   const BigInt z2 = fe_sqr(group, m_z, monty_ws);
  693|       |
  694|     23|   const BigInt& monty_b = group.monty_b();
  695|       |
  696|       |   // Is z equal to 1 (in Montgomery form)?
  697|     23|   if(m_z == z2) {
  ------------------
  |  Branch (697:7): [True: 23, False: 0]
  ------------------
  698|     23|      if(y2 != from_rep_to_tmp(group, x3 + ax + monty_b, monty_ws)) {
  ------------------
  |  Branch (698:10): [True: 22, False: 1]
  ------------------
  699|     22|         return false;
  700|     22|      }
  701|     23|   }
  702|       |
  703|      1|   const BigInt z3 = fe_mul(group, m_z, z2, monty_ws);
  704|      1|   const BigInt ax_z4 = fe_mul(group, ax, fe_sqr(group, z2, monty_ws), monty_ws);
  705|      1|   const BigInt b_z6 = fe_mul(group, monty_b, fe_sqr(group, z3, monty_ws), monty_ws);
  706|       |
  707|      1|   if(y2 != from_rep_to_tmp(group, x3 + ax_z4 + b_z6, monty_ws)) {
  ------------------
  |  Branch (707:7): [True: 0, False: 1]
  ------------------
  708|      0|      return false;
  709|      0|   }
  710|       |
  711|      1|   return true;
  712|      1|}
_ZN5Botan8EC_Point4swapERS0_:
  792|   523k|void EC_Point::swap(EC_Point& other) noexcept {
  793|   523k|   m_curve.swap(other.m_curve);
  794|   523k|   m_x.swap(other.m_x);
  795|   523k|   m_y.swap(other.m_y);
  796|   523k|   m_z.swap(other.m_z);
  797|   523k|}
_ZN5Botan6OS2ECPENSt3__14spanIKhLm18446744073709551615EEERKNS_8CurveGFpE:
  866|     25|EC_Point OS2ECP(std::span<const uint8_t> data, const CurveGFp& curve) {
  867|     25|   return OS2ECP(data.data(), data.size(), curve);
  868|     25|}
_ZN5Botan6OS2ECPEPKhmRKNS_8CurveGFpE:
  870|     25|EC_Point OS2ECP(const uint8_t data[], size_t data_len, const CurveGFp& curve) {
  871|     25|   if(data_len == 1 && data[0] == 0) {
  ------------------
  |  Branch (871:7): [True: 0, False: 25]
  |  Branch (871:24): [True: 0, False: 0]
  ------------------
  872|       |      // SEC1 standard representation of the point at infinity
  873|      0|      return EC_Point(curve);
  874|      0|   }
  875|       |
  876|     25|   const auto [g_x, g_y] = OS2ECP(data, data_len, curve.get_p(), curve.get_a(), curve.get_b());
  877|       |
  878|     25|   EC_Point point(curve, g_x, g_y);
  879|       |
  880|     25|   if(!point.on_the_curve()) {
  ------------------
  |  Branch (880:7): [True: 22, False: 3]
  ------------------
  881|     22|      throw Decoding_Error("OS2ECP: Decoded point was not on the curve");
  882|     22|   }
  883|       |
  884|      3|   return point;
  885|     25|}
_ZN5Botan6OS2ECPEPKhmRKNS_6BigIntES4_S4_:
  887|     25|std::pair<BigInt, BigInt> OS2ECP(const uint8_t pt[], size_t pt_len, const BigInt& p, const BigInt& a, const BigInt& b) {
  888|     25|   if(pt_len <= 1) {
  ------------------
  |  Branch (888:7): [True: 0, False: 25]
  ------------------
  889|      0|      throw Decoding_Error("OS2ECP invalid point encoding");
  890|      0|   }
  891|       |
  892|     25|   const uint8_t pc = pt[0];
  893|     25|   const size_t p_bytes = p.bytes();
  894|       |
  895|     25|   BigInt x;
  896|     25|   BigInt y;
  897|       |
  898|     25|   if(pc == 2 || pc == 3) {
  ------------------
  |  Branch (898:7): [True: 0, False: 25]
  |  Branch (898:18): [True: 0, False: 25]
  ------------------
  899|      0|      if(pt_len != 1 + p_bytes) {
  ------------------
  |  Branch (899:10): [True: 0, False: 0]
  ------------------
  900|      0|         throw Decoding_Error("OS2ECP invalid point encoding");
  901|      0|      }
  902|      0|      x = BigInt::decode(&pt[1], pt_len - 1);
  903|       |
  904|      0|      const bool y_mod_2 = ((pc & 0x01) == 1);
  905|      0|      y = decompress_point(y_mod_2, x, p, a, b);
  906|     25|   } else if(pc == 4) {
  ------------------
  |  Branch (906:14): [True: 25, False: 0]
  ------------------
  907|     25|      if(pt_len != 1 + 2 * p_bytes) {
  ------------------
  |  Branch (907:10): [True: 0, False: 25]
  ------------------
  908|      0|         throw Decoding_Error("OS2ECP invalid point encoding");
  909|      0|      }
  910|       |
  911|     25|      x = BigInt::decode(&pt[1], p_bytes);
  912|     25|      y = BigInt::decode(&pt[p_bytes + 1], p_bytes);
  913|     25|   } else if(pc == 6 || pc == 7) {
  ------------------
  |  Branch (913:14): [True: 0, False: 0]
  |  Branch (913:25): [True: 0, False: 0]
  ------------------
  914|      0|      if(pt_len != 1 + 2 * p_bytes) {
  ------------------
  |  Branch (914:10): [True: 0, False: 0]
  ------------------
  915|      0|         throw Decoding_Error("OS2ECP invalid point encoding");
  916|      0|      }
  917|       |
  918|      0|      x = BigInt::decode(&pt[1], p_bytes);
  919|      0|      y = BigInt::decode(&pt[p_bytes + 1], p_bytes);
  920|       |
  921|      0|      const bool y_mod_2 = ((pc & 0x01) == 1);
  922|       |
  923|      0|      if(decompress_point(y_mod_2, x, p, a, b) != y) {
  ------------------
  |  Branch (923:10): [True: 0, False: 0]
  ------------------
  924|      0|         throw Decoding_Error("OS2ECP: Decoding error in hybrid format");
  925|      0|      }
  926|      0|   } else {
  927|      0|      throw Decoding_Error("OS2ECP: Unknown format type " + std::to_string(static_cast<int>(pc)));
  928|      0|   }
  929|       |
  930|     25|   if(x >= p || y >= p) {
  ------------------
  |  Branch (930:7): [True: 2, False: 23]
  |  Branch (930:17): [True: 0, False: 23]
  ------------------
  931|      2|      throw Decoding_Error("OS2ECP invalid point encoding");
  932|      2|   }
  933|       |
  934|     23|   return std::make_pair(x, y);
  935|     25|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_113monty_ws_sizeERKNS_13EC_Group_DataE:
  102|   617k|size_t monty_ws_size(const EC_Group_Data& group) {
  103|   617k|   return 2 * group.p_words();
  104|   617k|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_16to_repERKNS_13EC_Group_DataERNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
   55|  9.21k|void to_rep(const EC_Group_Data& group, BigInt& x, secure_vector<word>& ws) {
   56|  9.21k|   group.monty().mul_by(x, group.monty().R2(), ws);
   57|  9.21k|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_16fe_sqrERKNS_13EC_Group_DataERKNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
   94|    209|BigInt fe_sqr(const EC_Group_Data& group, const BigInt& x, secure_vector<word>& ws) {
   95|    209|   return group.monty().sqr(x, ws);
   96|    209|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_16fe_mulERKNS_13EC_Group_DataERKNS_6BigIntES6_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   82|  1.81M|inline BigInt fe_mul(const EC_Group_Data& group, const BigInt& x, const BigInt& y, secure_vector<word>& ws) {
   83|  1.81M|   return group.monty().mul(x, y, ws);
   84|  1.81M|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_19resize_wsERNSt3__16vectorINS_6BigIntENS1_9allocatorIS3_EEEEm:
  163|   611k|inline void resize_ws(std::vector<BigInt>& ws_bn, size_t cap_size) {
  164|   611k|   BOTAN_ASSERT(ws_bn.size() >= EC_Point::WORKSPACE_SIZE, "Expected size for EC_Point workspace");
  ------------------
  |  |   64|   611k|   do {                                                                                 \
  |  |   65|   611k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|   611k|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 611k]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|   611k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 611k]
  |  |  ------------------
  ------------------
  165|       |
  166|  4.89M|   for(auto& ws : ws_bn) {
  ------------------
  |  Branch (166:17): [True: 4.89M, False: 611k]
  ------------------
  167|  4.89M|      if(ws.size() < cap_size) {
  ------------------
  |  Branch (167:10): [True: 7.15k, False: 4.88M]
  ------------------
  168|  7.15k|         ws.get_word_vector().resize(cap_size);
  169|  7.15k|      }
  170|  4.89M|   }
  171|   611k|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_16fe_sqrERKNS_13EC_Group_DataERNS_6BigIntERKS4_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   86|  2.70M|void fe_sqr(const EC_Group_Data& group, BigInt& z, const BigInt& x, secure_vector<word>& ws) {
   87|  2.70M|   group.monty().sqr(z, x, ws);
   88|  2.70M|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_16fe_mulERKNS_13EC_Group_DataERNS_6BigIntEPKmmRKS4_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   72|  1.39M|   const EC_Group_Data& group, BigInt& z, const word x_w[], size_t x_size, const BigInt& y, secure_vector<word>& ws) {
   73|  1.39M|   group.monty().mul(z, y, std::span{x_w, x_size}, ws);
   74|  1.39M|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_16fe_mulERKNS_13EC_Group_DataERNS_6BigIntERKS4_S7_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   67|  5.44M|inline void fe_mul(const EC_Group_Data& group, BigInt& z, const BigInt& x, const BigInt& y, secure_vector<word>& ws) {
   68|  5.44M|   group.monty().mul(z, x, y, ws);
   69|  5.44M|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_16fe_sqrERKNS_13EC_Group_DataERNS_6BigIntEPKmmRNSt3__16vectorImNS_16secure_allocatorImEEEE:
   90|   345k|void fe_sqr(const EC_Group_Data& group, BigInt& z, const word x_w[], size_t x_size, secure_vector<word>& ws) {
   91|   345k|   group.monty().sqr(z, std::span{x_w, x_size}, ws);
   92|   345k|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_114invert_elementERKNS_13EC_Group_DataERKNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
   98|    878|BigInt invert_element(const EC_Group_Data& group, const BigInt& x, secure_vector<word>& ws) {
   99|    878|   return group.monty().mul(inverse_mod_public_prime(x, group.p()), group.monty().R3(), ws);
  100|    878|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_115from_rep_to_tmpERKNS_13EC_Group_DataERKNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
   63|    323|BigInt from_rep_to_tmp(const EC_Group_Data& group, const BigInt& x, secure_vector<word>& ws) {
   64|    323|   return group.monty().redc(x, ws);
   65|    323|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_17fe_smulILm4EEEvRNS_6BigIntERKS2_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   77|   259k|inline void fe_smul(BigInt& z, const BigInt& p, secure_vector<word>& ws) {
   78|   259k|   static_assert(M == 2 || M == 3 || M == 4 || M == 8);
   79|   259k|   z.mod_mul(M, p, ws);
   80|   259k|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_17fe_smulILm3EEEvRNS_6BigIntERKS2_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   77|   259k|inline void fe_smul(BigInt& z, const BigInt& p, secure_vector<word>& ws) {
   78|   259k|   static_assert(M == 2 || M == 3 || M == 4 || M == 8);
   79|   259k|   z.mod_mul(M, p, ws);
   80|   259k|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_17fe_smulILm8EEEvRNS_6BigIntERKS2_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   77|   259k|inline void fe_smul(BigInt& z, const BigInt& p, secure_vector<word>& ws) {
   78|   259k|   static_assert(M == 2 || M == 3 || M == 4 || M == 8);
   79|   259k|   z.mod_mul(M, p, ws);
   80|   259k|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_17fe_smulILm2EEEvRNS_6BigIntERKS2_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   77|   259k|inline void fe_smul(BigInt& z, const BigInt& p, secure_vector<word>& ws) {
   78|   259k|   static_assert(M == 2 || M == 3 || M == 4 || M == 8);
   79|   259k|   z.mod_mul(M, p, ws);
   80|   259k|}

_ZN5Botan30EC_Point_Base_Point_PrecomputeC2ERKNS_8EC_PointERKNS_17Barrett_ReductionE:
   43|    740|      m_base_point(base), m_mod_order(mod_order), m_p_words(base.get_curve().get_p_words()) {
   44|    740|   std::vector<BigInt> ws(EC_Point::WORKSPACE_SIZE);
   45|       |
   46|    740|   const size_t order_bits = mod_order.modulus_bits();
   47|       |
   48|    740|   const size_t T_bits = round_up(order_bits + blinding_size(order_bits), WindowBits) / WindowBits;
   49|       |
   50|    740|   std::vector<EC_Point> T(WindowSize * T_bits);
   51|       |
   52|    740|   EC_Point g = base;
   53|    740|   EC_Point g2;
   54|    740|   EC_Point g4;
   55|       |
   56|  87.2k|   for(size_t i = 0; i != T_bits; i++) {
  ------------------
  |  Branch (56:22): [True: 86.4k, False: 740]
  ------------------
   57|  86.4k|      g2 = g;
   58|  86.4k|      g2.mult2(ws);
   59|  86.4k|      g4 = g2;
   60|  86.4k|      g4.mult2(ws);
   61|       |
   62|  86.4k|      T[7 * i + 0] = g;
   63|  86.4k|      T[7 * i + 1] = std::move(g2);
   64|  86.4k|      T[7 * i + 2] = T[7 * i + 1].plus(T[7 * i + 0], ws);  // g2+g
   65|  86.4k|      T[7 * i + 3] = g4;
   66|  86.4k|      T[7 * i + 4] = T[7 * i + 3].plus(T[7 * i + 0], ws);  // g4+g
   67|  86.4k|      T[7 * i + 5] = T[7 * i + 3].plus(T[7 * i + 1], ws);  // g4+g2
   68|  86.4k|      T[7 * i + 6] = T[7 * i + 3].plus(T[7 * i + 2], ws);  // g4+g2+g
   69|       |
   70|  86.4k|      g.swap(g4);
   71|  86.4k|      g.mult2(ws);
   72|  86.4k|   }
   73|       |
   74|    740|   EC_Point::force_all_affine(T, ws[0].get_word_vector());
   75|       |
   76|    740|   m_W.resize(T.size() * 2 * m_p_words);
   77|       |
   78|    740|   word* p = m_W.data();
   79|   605k|   for(const auto& pt : T) {
  ------------------
  |  Branch (79:23): [True: 605k, False: 740]
  ------------------
   80|   605k|      pt.get_x().encode_words(p, m_p_words);
   81|   605k|      p += m_p_words;
   82|   605k|      pt.get_y().encode_words(p, m_p_words);
   83|   605k|      p += m_p_words;
   84|   605k|   }
   85|    740|}
_ZNK5Botan30EC_Point_Base_Point_Precompute3mulERKNS_6BigIntERNS_21RandomNumberGeneratorES3_RNSt3__16vectorIS1_NS6_9allocatorIS1_EEEE:
   90|    137|                                             std::vector<BigInt>& ws) const {
   91|    137|   if(k.signum() < 0) {
  ------------------
  |  Branch (91:7): [True: 0, False: 137]
  ------------------
   92|      0|      throw Invalid_Argument("EC_Point_Base_Point_Precompute scalar must be positive");
   93|      0|   }
   94|       |
   95|       |   // Instead of reducing k mod group order should we alter the mask size??
   96|    137|   BigInt scalar = m_mod_order.reduce(k);
   97|       |
   98|    137|   if(rng.is_seeded()) {
  ------------------
  |  Branch (98:7): [True: 0, False: 137]
  ------------------
   99|       |      // Choose a small mask m and use k' = k + m*order (Coron's 1st countermeasure)
  100|      0|      scalar += group_order * blinding_mask(group_order, rng);
  101|    137|   } else {
  102|       |      /*
  103|       |      When we don't have an RNG we cannot do scalar blinding. Instead use the
  104|       |      same trick as OpenSSL and add one or two copies of the order to normalize
  105|       |      the length of the scalar at order.bits()+1. This at least ensures the loop
  106|       |      bound does not leak information about the high bits of the scalar.
  107|       |      */
  108|    137|      scalar += group_order;
  109|    137|      if(scalar.bits() == group_order.bits()) {
  ------------------
  |  Branch (109:10): [True: 131, False: 6]
  ------------------
  110|    131|         scalar += group_order;
  111|    131|      }
  112|    137|      BOTAN_DEBUG_ASSERT(scalar.bits() == group_order.bits() + 1);
  ------------------
  |  |  130|    137|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    137|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 137]
  |  |  ------------------
  ------------------
  113|    137|   }
  114|       |
  115|    137|   const size_t windows = round_up(scalar.bits(), WindowBits) / WindowBits;
  116|       |
  117|    137|   const size_t elem_size = 2 * m_p_words;
  118|       |
  119|    137|   BOTAN_ASSERT(windows <= m_W.size() / (3 * elem_size), "Precomputed sufficient values for scalar mult");
  ------------------
  |  |   64|    137|   do {                                                                                 \
  |  |   65|    137|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|    137|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 137]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|    137|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 137]
  |  |  ------------------
  ------------------
  120|       |
  121|    137|   EC_Point R = m_base_point.zero();
  122|       |
  123|    137|   if(ws.size() < EC_Point::WORKSPACE_SIZE) {
  ------------------
  |  Branch (123:7): [True: 137, False: 0]
  ------------------
  124|    137|      ws.resize(EC_Point::WORKSPACE_SIZE);
  125|    137|   }
  126|       |
  127|       |   // the precomputed multiples are not secret so use std::vector
  128|    137|   std::vector<word> Wt(elem_size);
  129|       |
  130|  9.74k|   for(size_t i = 0; i != windows; ++i) {
  ------------------
  |  Branch (130:22): [True: 9.61k, False: 137]
  ------------------
  131|  9.61k|      const size_t window = windows - i - 1;
  132|  9.61k|      const size_t base_addr = (WindowSize * window) * elem_size;
  133|       |
  134|  9.61k|      const word w = scalar.get_substring(WindowBits * window, WindowBits);
  135|       |
  136|  9.61k|      const auto w_is_1 = CT::Mask<word>::is_equal(w, 1);
  137|  9.61k|      const auto w_is_2 = CT::Mask<word>::is_equal(w, 2);
  138|  9.61k|      const auto w_is_3 = CT::Mask<word>::is_equal(w, 3);
  139|  9.61k|      const auto w_is_4 = CT::Mask<word>::is_equal(w, 4);
  140|  9.61k|      const auto w_is_5 = CT::Mask<word>::is_equal(w, 5);
  141|  9.61k|      const auto w_is_6 = CT::Mask<word>::is_equal(w, 6);
  142|  9.61k|      const auto w_is_7 = CT::Mask<word>::is_equal(w, 7);
  143|       |
  144|  81.8k|      for(size_t j = 0; j != elem_size; ++j) {
  ------------------
  |  Branch (144:25): [True: 72.2k, False: 9.61k]
  ------------------
  145|  72.2k|         const word w1 = w_is_1.if_set_return(m_W[base_addr + 0 * elem_size + j]);
  146|  72.2k|         const word w2 = w_is_2.if_set_return(m_W[base_addr + 1 * elem_size + j]);
  147|  72.2k|         const word w3 = w_is_3.if_set_return(m_W[base_addr + 2 * elem_size + j]);
  148|  72.2k|         const word w4 = w_is_4.if_set_return(m_W[base_addr + 3 * elem_size + j]);
  149|  72.2k|         const word w5 = w_is_5.if_set_return(m_W[base_addr + 4 * elem_size + j]);
  150|  72.2k|         const word w6 = w_is_6.if_set_return(m_W[base_addr + 5 * elem_size + j]);
  151|  72.2k|         const word w7 = w_is_7.if_set_return(m_W[base_addr + 6 * elem_size + j]);
  152|       |
  153|  72.2k|         Wt[j] = w1 | w2 | w3 | w4 | w5 | w6 | w7;
  154|  72.2k|      }
  155|       |
  156|  9.61k|      R.add_affine(Wt.data(), m_p_words, &Wt[m_p_words], m_p_words, ws);
  157|       |
  158|  9.61k|      if(i == 0 && rng.is_seeded()) {
  ------------------
  |  Branch (158:10): [True: 137, False: 9.47k]
  |  Branch (158:20): [True: 0, False: 137]
  ------------------
  159|       |         /*
  160|       |         * Since we start with the top bit of the exponent we know the
  161|       |         * first window must have a non-zero element, and thus R is
  162|       |         * now a point other than the point at infinity.
  163|       |         */
  164|      0|         BOTAN_DEBUG_ASSERT(w != 0);
  ------------------
  |  |  130|      0|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|      0|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 0]
  |  |  ------------------
  ------------------
  165|      0|         R.randomize_repr(rng, ws[0].get_word_vector());
  166|      0|      }
  167|  9.61k|   }
  168|       |
  169|    137|   BOTAN_DEBUG_ASSERT(R.on_the_curve());
  ------------------
  |  |  130|    137|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    137|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 137]
  |  |  ------------------
  ------------------
  170|       |
  171|    137|   return R;
  172|    137|}
point_mul.cpp:_ZN5Botan12_GLOBAL__N_113blinding_sizeEm:
   20|    740|size_t blinding_size(size_t order_bits) {
   21|    740|   return (order_bits + 1) / 2;
   22|    740|}

_ZN5Botan17EC_PublicKey_DataC2ERKNS_8EC_GroupENSt3__14spanIKhLm18446744073709551615EEE:
   38|    916|      EC_PublicKey_Data(group, decode_ec_public_key_point(group, bytes)) {}
_ZN5Botan17EC_PublicKey_DataC2ENS_8EC_GroupENS_14EC_AffinePointE:
   41|  1.78k|      m_group(std::move(group)), m_point(std::move(pt)) {
   42|  1.78k|#if defined(BOTAN_HAS_LEGACY_EC_POINT)
   43|  1.78k|   m_legacy_point = m_point.to_legacy_point();
   44|  1.78k|#endif
   45|       |
   46|       |   // Checking that the point lies on the curve is done in the deserialization
   47|       |   // of EC_AffinePoint.
   48|  1.78k|   BOTAN_ARG_CHECK(!m_point.is_identity(), "ECC public key cannot be point at infinity");
  ------------------
  |  |   35|  1.78k|   do {                                                          \
  |  |   36|  1.78k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  1.78k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 1.78k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  1.78k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 1.78k]
  |  |  ------------------
  ------------------
   49|  1.78k|}
_ZN5Botan18EC_PrivateKey_DataC2ENS_8EC_GroupENS_9EC_ScalarE:
   52|  2.70k|      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|  2.70k|   BOTAN_ARG_CHECK(m_scalar.is_nonzero(), "ECC private key cannot be zero");
  ------------------
  |  |   35|  2.70k|   do {                                                          \
  |  |   36|  2.70k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  2.70k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 2.70k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  2.70k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 2.70k]
  |  |  ------------------
  ------------------
   56|  2.70k|}
_ZN5Botan18EC_PrivateKey_DataC2ERKNS_8EC_GroupENSt3__14spanIKhLm18446744073709551615EEE:
   88|  2.73k|      Botan::EC_PrivateKey_Data(group, decode_ec_secret_key_scalar(group, bytes)) {}
_ZN5Botan18EC_PrivateKey_DataD2Ev:
   90|  2.70k|EC_PrivateKey_Data::~EC_PrivateKey_Data() {
   91|  2.70k|   m_scalar.zeroize();
   92|  2.70k|}
_ZNK5Botan18EC_PrivateKey_Data10public_keyERNS_21RandomNumberGeneratorEb:
   95|  1.78k|                                                                  bool with_modular_inverse) const {
   96|  1.78k|   auto public_point = [&] {
   97|  1.78k|      if(with_modular_inverse) {
   98|  1.78k|         return EC_AffinePoint::g_mul(m_scalar.invert(), rng);
   99|  1.78k|      } else {
  100|  1.78k|         return EC_AffinePoint::g_mul(m_scalar, rng);
  101|  1.78k|      }
  102|  1.78k|   };
  103|       |
  104|  1.78k|   return std::make_shared<EC_PublicKey_Data>(m_group, public_point());
  105|  1.78k|}
_ZNK5Botan18EC_PrivateKey_Data10public_keyEb:
  107|  1.78k|std::shared_ptr<EC_PublicKey_Data> EC_PrivateKey_Data::public_key(bool with_modular_inverse) const {
  108|  1.78k|   Null_RNG null_rng;
  109|  1.78k|   return this->public_key(null_rng, with_modular_inverse);
  110|  1.78k|}
ec_key_data.cpp:_ZN5Botan12_GLOBAL__N_126decode_ec_public_key_pointERKNS_8EC_GroupENSt3__14spanIKhLm18446744073709551615EEE:
   17|    916|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|    916|   if(auto pt_uncompressed = EC_AffinePoint::deserialize_uncompressed(group, bytes)) {
  ------------------
  |  Branch (26:12): [True: 3, False: 913]
  ------------------
   27|      3|      return std::move(pt_uncompressed).value();
   28|    913|   } else if(auto pt_compressed = EC_AffinePoint::deserialize_compressed(group, bytes)) {
  ------------------
  |  Branch (28:19): [True: 0, False: 913]
  ------------------
   29|      0|      return std::move(pt_compressed).value();
   30|    913|   } else {
   31|    913|      throw Decoding_Error("Failed to deserialize elliptic curve point");
   32|    913|   }
   33|    916|}
ec_key_data.cpp:_ZN5Botan12_GLOBAL__N_127decode_ec_secret_key_scalarERKNS_8EC_GroupENSt3__14spanIKhLm18446744073709551615EEE:
   60|  4.98k|EC_Scalar decode_ec_secret_key_scalar(const EC_Group& group, std::span<const uint8_t> bytes) {
   61|  4.98k|   const size_t order_bytes = group.get_order_bytes();
   62|       |
   63|  4.98k|   if(bytes.size() < order_bytes) {
  ------------------
  |  Branch (63:7): [True: 2.25k, False: 2.73k]
  ------------------
   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|  2.25k|      secure_vector<uint8_t> padded_sk(order_bytes);
   74|  2.25k|      copy_mem(std::span{padded_sk}.last(bytes.size()), bytes);
   75|  2.25k|      return decode_ec_secret_key_scalar(group, padded_sk);
   76|  2.25k|   }
   77|       |
   78|  2.73k|   if(auto s = EC_Scalar::deserialize(group, bytes)) {
  ------------------
  |  Branch (78:12): [True: 2.70k, False: 30]
  ------------------
   79|  2.70k|      return s.value();
   80|  2.70k|   } else {
   81|     30|      throw Decoding_Error("EC private key is invalid for this group");
   82|     30|   }
   83|  2.73k|}
ec_key_data.cpp:_ZZNK5Botan18EC_PrivateKey_Data10public_keyERNS_21RandomNumberGeneratorEbENK3$_0clEv:
   96|  1.78k|   auto public_point = [&] {
   97|  1.78k|      if(with_modular_inverse) {
  ------------------
  |  Branch (97:10): [True: 0, False: 1.78k]
  ------------------
   98|      0|         return EC_AffinePoint::g_mul(m_scalar.invert(), rng);
   99|  1.78k|      } else {
  100|  1.78k|         return EC_AffinePoint::g_mul(m_scalar, rng);
  101|  1.78k|      }
  102|  1.78k|   };

_ZNK5Botan12EC_PublicKey6domainEv:
   64|  1.78k|const EC_Group& EC_PublicKey::domain() const {
   65|  1.78k|   BOTAN_STATE_CHECK(m_public_key != nullptr);
  ------------------
  |  |   51|  1.78k|   do {                                                         \
  |  |   52|  1.78k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  1.78k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 1.78k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  1.78k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 1.78k]
  |  |  ------------------
  ------------------
   66|  1.78k|   return m_public_key->group();
   67|  1.78k|}
_ZN5Botan13EC_PrivateKeyC2ERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEEb:
  179|  3.90k|      m_with_modular_inverse(with_modular_inverse) {
  180|  3.90k|   const EC_Group group(alg_id.parameters());
  181|       |
  182|  3.90k|   OID key_parameters;
  183|  3.90k|   secure_vector<uint8_t> private_key_bits;
  184|  3.90k|   secure_vector<uint8_t> public_key_bits;
  185|       |
  186|  3.90k|   BER_Decoder(key_bits, BER_Decoder::Limits::DER())
  187|  3.90k|      .start_sequence()
  188|  3.90k|      .decode_and_check<size_t>(1, "Unknown version code for ECC key")
  189|  3.90k|      .decode(private_key_bits, ASN1_Type::OctetString)
  190|  3.90k|      .decode_optional(key_parameters, ASN1_Type(0), ASN1_Class::ExplicitContextSpecific)
  191|  3.90k|      .decode_optional_octet_aligned_bitstring(public_key_bits, 1, ASN1_Class::ExplicitContextSpecific)
  192|  3.90k|      .end_cons()
  193|  3.90k|      .verify_end();
  194|       |
  195|  3.90k|   m_private_key = std::make_shared<EC_PrivateKey_Data>(group, private_key_bits);
  196|       |
  197|  3.90k|   if(public_key_bits.empty()) {
  ------------------
  |  Branch (197:7): [True: 1.78k, False: 2.11k]
  ------------------
  198|  1.78k|      m_public_key = m_private_key->public_key(with_modular_inverse);
  199|  2.11k|   } else {
  200|  2.11k|      m_public_key = std::make_shared<EC_PublicKey_Data>(group, public_key_bits);
  201|  2.11k|   }
  202|       |
  203|  3.90k|   m_domain_encoding = default_encoding_for(domain());
  204|  3.90k|}
ecc_key.cpp:_ZN5Botan12_GLOBAL__N_120default_encoding_forERKNS_8EC_GroupE:
   36|  1.78k|EC_Group_Encoding default_encoding_for(const EC_Group& group) {
   37|  1.78k|   if(group.get_curve_oid().empty()) {
  ------------------
  |  Branch (37:7): [True: 38, False: 1.75k]
  ------------------
   38|     38|      return EC_Group_Encoding::Explicit;
   39|  1.75k|   } else {
   40|  1.75k|      return EC_Group_Encoding::NamedCurve;
   41|  1.75k|   }
   42|  1.78k|}

_ZN5Botan19ed25519_gen_keypairEPhS0_PKh:
   19|      2|void ed25519_gen_keypair(uint8_t pk[32], uint8_t sk[64], const uint8_t seed[32]) {
   20|      2|   uint8_t az[64];
   21|       |
   22|      2|   auto sha512 = HashFunction::create_or_throw("SHA-512");
   23|      2|   sha512->update(seed, 32);
   24|      2|   sha512->final(az);
   25|      2|   az[0] &= 248;
   26|      2|   az[31] &= 63;
   27|      2|   az[31] |= 64;
   28|       |
   29|      2|   ed25519_basepoint_mul(std::span<uint8_t, 32>{pk, 32}, az);
   30|       |
   31|      2|   copy_mem(sk, seed, 32);
   32|      2|   copy_mem(sk + 32, pk, 32);
   33|      2|}

_ZNK5Botan20Ed25519_FieldElement6invertEv:
   18|      2|Ed25519_FieldElement Ed25519_FieldElement::invert() const {
   19|      2|   auto t0 = this->sqr();
   20|      2|   auto t1 = t0.sqr_iter(2);
   21|      2|   t1 = *this * t1;
   22|      2|   t0 = t0 * t1;
   23|      2|   auto t2 = t0.sqr();
   24|      2|   t1 = t1 * t2;
   25|      2|   t2 = t1.sqr_iter(5);
   26|      2|   t1 = t2 * t1;
   27|      2|   t2 = t1.sqr_iter(10);
   28|      2|   t2 = t2 * t1;
   29|      2|   auto t3 = t2.sqr_iter(20);
   30|      2|   t2 = t3 * t2;
   31|      2|   t2 = t2.sqr_iter(10);
   32|      2|   t1 = t2 * t1;
   33|      2|   t2 = t1.sqr_iter(50);
   34|      2|   t2 = t2 * t1;
   35|      2|   t3 = t2.sqr_iter(100);
   36|      2|   t2 = t3 * t2;
   37|      2|   t2 = t2.sqr_iter(50);
   38|      2|   t1 = t2 * t1;
   39|      2|   t1 = t1.sqr_iter(5);
   40|       |
   41|      2|   t0 = t1 * t0;
   42|      2|   return t0;
   43|      2|}
_ZN5Botan20Ed25519_FieldElement3mulERKS0_S2_:
  105|    948|Ed25519_FieldElement Ed25519_FieldElement::mul(const Ed25519_FieldElement& f, const Ed25519_FieldElement& g) {
  106|    948|   const int32_t f0 = f.m_fe[0];
  107|    948|   const int32_t f1 = f.m_fe[1];
  108|    948|   const int32_t f2 = f.m_fe[2];
  109|    948|   const int32_t f3 = f.m_fe[3];
  110|    948|   const int32_t f4 = f.m_fe[4];
  111|    948|   const int32_t f5 = f.m_fe[5];
  112|    948|   const int32_t f6 = f.m_fe[6];
  113|    948|   const int32_t f7 = f.m_fe[7];
  114|    948|   const int32_t f8 = f.m_fe[8];
  115|    948|   const int32_t f9 = f.m_fe[9];
  116|       |
  117|    948|   const int32_t g0 = g.m_fe[0];
  118|    948|   const int32_t g1 = g.m_fe[1];
  119|    948|   const int32_t g2 = g.m_fe[2];
  120|    948|   const int32_t g3 = g.m_fe[3];
  121|    948|   const int32_t g4 = g.m_fe[4];
  122|    948|   const int32_t g5 = g.m_fe[5];
  123|    948|   const int32_t g6 = g.m_fe[6];
  124|    948|   const int32_t g7 = g.m_fe[7];
  125|    948|   const int32_t g8 = g.m_fe[8];
  126|    948|   const int32_t g9 = g.m_fe[9];
  127|       |
  128|    948|   const int32_t g1_19 = 19 * g1; /* 1.959375*2^29 */
  129|    948|   const int32_t g2_19 = 19 * g2; /* 1.959375*2^30; still ok */
  130|    948|   const int32_t g3_19 = 19 * g3;
  131|    948|   const int32_t g4_19 = 19 * g4;
  132|    948|   const int32_t g5_19 = 19 * g5;
  133|    948|   const int32_t g6_19 = 19 * g6;
  134|    948|   const int32_t g7_19 = 19 * g7;
  135|    948|   const int32_t g8_19 = 19 * g8;
  136|    948|   const int32_t g9_19 = 19 * g9;
  137|    948|   const int32_t f1_2 = 2 * f1;
  138|    948|   const int32_t f3_2 = 2 * f3;
  139|    948|   const int32_t f5_2 = 2 * f5;
  140|    948|   const int32_t f7_2 = 2 * f7;
  141|    948|   const int32_t f9_2 = 2 * f9;
  142|       |
  143|    948|   const int64_t f0g0 = f0 * static_cast<int64_t>(g0);
  144|    948|   const int64_t f0g1 = f0 * static_cast<int64_t>(g1);
  145|    948|   const int64_t f0g2 = f0 * static_cast<int64_t>(g2);
  146|    948|   const int64_t f0g3 = f0 * static_cast<int64_t>(g3);
  147|    948|   const int64_t f0g4 = f0 * static_cast<int64_t>(g4);
  148|    948|   const int64_t f0g5 = f0 * static_cast<int64_t>(g5);
  149|    948|   const int64_t f0g6 = f0 * static_cast<int64_t>(g6);
  150|    948|   const int64_t f0g7 = f0 * static_cast<int64_t>(g7);
  151|    948|   const int64_t f0g8 = f0 * static_cast<int64_t>(g8);
  152|    948|   const int64_t f0g9 = f0 * static_cast<int64_t>(g9);
  153|    948|   const int64_t f1g0 = f1 * static_cast<int64_t>(g0);
  154|    948|   const int64_t f1g1_2 = f1_2 * static_cast<int64_t>(g1);
  155|    948|   const int64_t f1g2 = f1 * static_cast<int64_t>(g2);
  156|    948|   const int64_t f1g3_2 = f1_2 * static_cast<int64_t>(g3);
  157|    948|   const int64_t f1g4 = f1 * static_cast<int64_t>(g4);
  158|    948|   const int64_t f1g5_2 = f1_2 * static_cast<int64_t>(g5);
  159|    948|   const int64_t f1g6 = f1 * static_cast<int64_t>(g6);
  160|    948|   const int64_t f1g7_2 = f1_2 * static_cast<int64_t>(g7);
  161|    948|   const int64_t f1g8 = f1 * static_cast<int64_t>(g8);
  162|    948|   const int64_t f1g9_38 = f1_2 * static_cast<int64_t>(g9_19);
  163|    948|   const int64_t f2g0 = f2 * static_cast<int64_t>(g0);
  164|    948|   const int64_t f2g1 = f2 * static_cast<int64_t>(g1);
  165|    948|   const int64_t f2g2 = f2 * static_cast<int64_t>(g2);
  166|    948|   const int64_t f2g3 = f2 * static_cast<int64_t>(g3);
  167|    948|   const int64_t f2g4 = f2 * static_cast<int64_t>(g4);
  168|    948|   const int64_t f2g5 = f2 * static_cast<int64_t>(g5);
  169|    948|   const int64_t f2g6 = f2 * static_cast<int64_t>(g6);
  170|    948|   const int64_t f2g7 = f2 * static_cast<int64_t>(g7);
  171|    948|   const int64_t f2g8_19 = f2 * static_cast<int64_t>(g8_19);
  172|    948|   const int64_t f2g9_19 = f2 * static_cast<int64_t>(g9_19);
  173|    948|   const int64_t f3g0 = f3 * static_cast<int64_t>(g0);
  174|    948|   const int64_t f3g1_2 = f3_2 * static_cast<int64_t>(g1);
  175|    948|   const int64_t f3g2 = f3 * static_cast<int64_t>(g2);
  176|    948|   const int64_t f3g3_2 = f3_2 * static_cast<int64_t>(g3);
  177|    948|   const int64_t f3g4 = f3 * static_cast<int64_t>(g4);
  178|    948|   const int64_t f3g5_2 = f3_2 * static_cast<int64_t>(g5);
  179|    948|   const int64_t f3g6 = f3 * static_cast<int64_t>(g6);
  180|    948|   const int64_t f3g7_38 = f3_2 * static_cast<int64_t>(g7_19);
  181|    948|   const int64_t f3g8_19 = f3 * static_cast<int64_t>(g8_19);
  182|    948|   const int64_t f3g9_38 = f3_2 * static_cast<int64_t>(g9_19);
  183|    948|   const int64_t f4g0 = f4 * static_cast<int64_t>(g0);
  184|    948|   const int64_t f4g1 = f4 * static_cast<int64_t>(g1);
  185|    948|   const int64_t f4g2 = f4 * static_cast<int64_t>(g2);
  186|    948|   const int64_t f4g3 = f4 * static_cast<int64_t>(g3);
  187|    948|   const int64_t f4g4 = f4 * static_cast<int64_t>(g4);
  188|    948|   const int64_t f4g5 = f4 * static_cast<int64_t>(g5);
  189|    948|   const int64_t f4g6_19 = f4 * static_cast<int64_t>(g6_19);
  190|    948|   const int64_t f4g7_19 = f4 * static_cast<int64_t>(g7_19);
  191|    948|   const int64_t f4g8_19 = f4 * static_cast<int64_t>(g8_19);
  192|    948|   const int64_t f4g9_19 = f4 * static_cast<int64_t>(g9_19);
  193|    948|   const int64_t f5g0 = f5 * static_cast<int64_t>(g0);
  194|    948|   const int64_t f5g1_2 = f5_2 * static_cast<int64_t>(g1);
  195|    948|   const int64_t f5g2 = f5 * static_cast<int64_t>(g2);
  196|    948|   const int64_t f5g3_2 = f5_2 * static_cast<int64_t>(g3);
  197|    948|   const int64_t f5g4 = f5 * static_cast<int64_t>(g4);
  198|    948|   const int64_t f5g5_38 = f5_2 * static_cast<int64_t>(g5_19);
  199|    948|   const int64_t f5g6_19 = f5 * static_cast<int64_t>(g6_19);
  200|    948|   const int64_t f5g7_38 = f5_2 * static_cast<int64_t>(g7_19);
  201|    948|   const int64_t f5g8_19 = f5 * static_cast<int64_t>(g8_19);
  202|    948|   const int64_t f5g9_38 = f5_2 * static_cast<int64_t>(g9_19);
  203|    948|   const int64_t f6g0 = f6 * static_cast<int64_t>(g0);
  204|    948|   const int64_t f6g1 = f6 * static_cast<int64_t>(g1);
  205|    948|   const int64_t f6g2 = f6 * static_cast<int64_t>(g2);
  206|    948|   const int64_t f6g3 = f6 * static_cast<int64_t>(g3);
  207|    948|   const int64_t f6g4_19 = f6 * static_cast<int64_t>(g4_19);
  208|    948|   const int64_t f6g5_19 = f6 * static_cast<int64_t>(g5_19);
  209|    948|   const int64_t f6g6_19 = f6 * static_cast<int64_t>(g6_19);
  210|    948|   const int64_t f6g7_19 = f6 * static_cast<int64_t>(g7_19);
  211|    948|   const int64_t f6g8_19 = f6 * static_cast<int64_t>(g8_19);
  212|    948|   const int64_t f6g9_19 = f6 * static_cast<int64_t>(g9_19);
  213|    948|   const int64_t f7g0 = f7 * static_cast<int64_t>(g0);
  214|    948|   const int64_t f7g1_2 = f7_2 * static_cast<int64_t>(g1);
  215|    948|   const int64_t f7g2 = f7 * static_cast<int64_t>(g2);
  216|    948|   const int64_t f7g3_38 = f7_2 * static_cast<int64_t>(g3_19);
  217|    948|   const int64_t f7g4_19 = f7 * static_cast<int64_t>(g4_19);
  218|    948|   const int64_t f7g5_38 = f7_2 * static_cast<int64_t>(g5_19);
  219|    948|   const int64_t f7g6_19 = f7 * static_cast<int64_t>(g6_19);
  220|    948|   const int64_t f7g7_38 = f7_2 * static_cast<int64_t>(g7_19);
  221|    948|   const int64_t f7g8_19 = f7 * static_cast<int64_t>(g8_19);
  222|    948|   const int64_t f7g9_38 = f7_2 * static_cast<int64_t>(g9_19);
  223|    948|   const int64_t f8g0 = f8 * static_cast<int64_t>(g0);
  224|    948|   const int64_t f8g1 = f8 * static_cast<int64_t>(g1);
  225|    948|   const int64_t f8g2_19 = f8 * static_cast<int64_t>(g2_19);
  226|    948|   const int64_t f8g3_19 = f8 * static_cast<int64_t>(g3_19);
  227|    948|   const int64_t f8g4_19 = f8 * static_cast<int64_t>(g4_19);
  228|    948|   const int64_t f8g5_19 = f8 * static_cast<int64_t>(g5_19);
  229|    948|   const int64_t f8g6_19 = f8 * static_cast<int64_t>(g6_19);
  230|    948|   const int64_t f8g7_19 = f8 * static_cast<int64_t>(g7_19);
  231|    948|   const int64_t f8g8_19 = f8 * static_cast<int64_t>(g8_19);
  232|    948|   const int64_t f8g9_19 = f8 * static_cast<int64_t>(g9_19);
  233|    948|   const int64_t f9g0 = f9 * static_cast<int64_t>(g0);
  234|    948|   const int64_t f9g1_38 = f9_2 * static_cast<int64_t>(g1_19);
  235|    948|   const int64_t f9g2_19 = f9 * static_cast<int64_t>(g2_19);
  236|    948|   const int64_t f9g3_38 = f9_2 * static_cast<int64_t>(g3_19);
  237|    948|   const int64_t f9g4_19 = f9 * static_cast<int64_t>(g4_19);
  238|    948|   const int64_t f9g5_38 = f9_2 * static_cast<int64_t>(g5_19);
  239|    948|   const int64_t f9g6_19 = f9 * static_cast<int64_t>(g6_19);
  240|    948|   const int64_t f9g7_38 = f9_2 * static_cast<int64_t>(g7_19);
  241|    948|   const int64_t f9g8_19 = f9 * static_cast<int64_t>(g8_19);
  242|    948|   const int64_t f9g9_38 = f9_2 * static_cast<int64_t>(g9_19);
  243|       |
  244|    948|   int64_t h0 = f0g0 + f1g9_38 + f2g8_19 + f3g7_38 + f4g6_19 + f5g5_38 + f6g4_19 + f7g3_38 + f8g2_19 + f9g1_38;
  245|    948|   int64_t h1 = f0g1 + f1g0 + f2g9_19 + f3g8_19 + f4g7_19 + f5g6_19 + f6g5_19 + f7g4_19 + f8g3_19 + f9g2_19;
  246|    948|   int64_t h2 = f0g2 + f1g1_2 + f2g0 + f3g9_38 + f4g8_19 + f5g7_38 + f6g6_19 + f7g5_38 + f8g4_19 + f9g3_38;
  247|    948|   int64_t h3 = f0g3 + f1g2 + f2g1 + f3g0 + f4g9_19 + f5g8_19 + f6g7_19 + f7g6_19 + f8g5_19 + f9g4_19;
  248|    948|   int64_t h4 = f0g4 + f1g3_2 + f2g2 + f3g1_2 + f4g0 + f5g9_38 + f6g8_19 + f7g7_38 + f8g6_19 + f9g5_38;
  249|    948|   int64_t h5 = f0g5 + f1g4 + f2g3 + f3g2 + f4g1 + f5g0 + f6g9_19 + f7g8_19 + f8g7_19 + f9g6_19;
  250|    948|   int64_t h6 = f0g6 + f1g5_2 + f2g4 + f3g3_2 + f4g2 + f5g1_2 + f6g0 + f7g9_38 + f8g8_19 + f9g7_38;
  251|    948|   int64_t h7 = f0g7 + f1g6 + f2g5 + f3g4 + f4g3 + f5g2 + f6g1 + f7g0 + f8g9_19 + f9g8_19;
  252|    948|   int64_t h8 = f0g8 + f1g7_2 + f2g6 + f3g5_2 + f4g4 + f5g3_2 + f6g2 + f7g1_2 + f8g0 + f9g9_38;
  253|    948|   int64_t h9 = f0g9 + f1g8 + f2g7 + f3g6 + f4g5 + f5g4 + f6g3 + f7g2 + f8g1 + f9g0;
  254|       |
  255|       |   /*
  256|       |   |h0| <= (1.65*1.65*2^52*(1+19+19+19+19)+1.65*1.65*2^50*(38+38+38+38+38))
  257|       |   i.e. |h0| <= 1.4*2^60; narrower ranges for h2, h4, h6, h8
  258|       |   |h1| <= (1.65*1.65*2^51*(1+1+19+19+19+19+19+19+19+19))
  259|       |   i.e. |h1| <= 1.7*2^59; narrower ranges for h3, h5, h7, h9
  260|       |   */
  261|    948|   carry<26>(h0, h1);
  262|    948|   carry<26>(h4, h5);
  263|       |
  264|       |   /* |h0| <= 2^25 */
  265|       |   /* |h4| <= 2^25 */
  266|       |   /* |h1| <= 1.71*2^59 */
  267|       |   /* |h5| <= 1.71*2^59 */
  268|       |
  269|    948|   carry<25>(h1, h2);
  270|    948|   carry<25>(h5, h6);
  271|       |
  272|       |   /* |h1| <= 2^24; from now on fits into int32 */
  273|       |   /* |h5| <= 2^24; from now on fits into int32 */
  274|       |   /* |h2| <= 1.41*2^60 */
  275|       |   /* |h6| <= 1.41*2^60 */
  276|       |
  277|    948|   carry<26>(h2, h3);
  278|    948|   carry<26>(h6, h7);
  279|       |   /* |h2| <= 2^25; from now on fits into int32 unchanged */
  280|       |   /* |h6| <= 2^25; from now on fits into int32 unchanged */
  281|       |   /* |h3| <= 1.71*2^59 */
  282|       |   /* |h7| <= 1.71*2^59 */
  283|       |
  284|    948|   carry<25>(h3, h4);
  285|    948|   carry<25>(h7, h8);
  286|       |   /* |h3| <= 2^24; from now on fits into int32 unchanged */
  287|       |   /* |h7| <= 2^24; from now on fits into int32 unchanged */
  288|       |   /* |h4| <= 1.72*2^34 */
  289|       |   /* |h8| <= 1.41*2^60 */
  290|       |
  291|    948|   carry<26>(h4, h5);
  292|    948|   carry<26>(h8, h9);
  293|       |   /* |h4| <= 2^25; from now on fits into int32 unchanged */
  294|       |   /* |h8| <= 2^25; from now on fits into int32 unchanged */
  295|       |   /* |h5| <= 1.01*2^24 */
  296|       |   /* |h9| <= 1.71*2^59 */
  297|       |
  298|    948|   carry<25, 19>(h9, h0);
  299|       |
  300|       |   /* |h9| <= 2^24; from now on fits into int32 unchanged */
  301|       |   /* |h0| <= 1.1*2^39 */
  302|       |
  303|    948|   carry<26>(h0, h1);
  304|       |   /* |h0| <= 2^25; from now on fits into int32 unchanged */
  305|       |   /* |h1| <= 1.01*2^24 */
  306|       |
  307|    948|   return Ed25519_FieldElement(h0, h1, h2, h3, h4, h5, h6, h7, h8, h9);
  308|    948|}
_ZNK5Botan20Ed25519_FieldElement8sqr_iterEm:
  326|     46|Ed25519_FieldElement Ed25519_FieldElement::sqr_iter(size_t iter) const {
  327|     46|   int32_t f0 = m_fe[0];
  328|     46|   int32_t f1 = m_fe[1];
  329|     46|   int32_t f2 = m_fe[2];
  330|     46|   int32_t f3 = m_fe[3];
  331|     46|   int32_t f4 = m_fe[4];
  332|     46|   int32_t f5 = m_fe[5];
  333|     46|   int32_t f6 = m_fe[6];
  334|     46|   int32_t f7 = m_fe[7];
  335|     46|   int32_t f8 = m_fe[8];
  336|     46|   int32_t f9 = m_fe[9];
  337|       |
  338|    578|   for(size_t i = 0; i != iter; ++i) {
  ------------------
  |  Branch (338:22): [True: 532, False: 46]
  ------------------
  339|    532|      const int32_t f0_2 = 2 * f0;
  340|    532|      const int32_t f1_2 = 2 * f1;
  341|    532|      const int32_t f2_2 = 2 * f2;
  342|    532|      const int32_t f3_2 = 2 * f3;
  343|    532|      const int32_t f4_2 = 2 * f4;
  344|    532|      const int32_t f5_2 = 2 * f5;
  345|    532|      const int32_t f6_2 = 2 * f6;
  346|    532|      const int32_t f7_2 = 2 * f7;
  347|    532|      const int32_t f5_38 = 38 * f5; /* 1.959375*2^30 */
  348|    532|      const int32_t f6_19 = 19 * f6; /* 1.959375*2^30 */
  349|    532|      const int32_t f7_38 = 38 * f7; /* 1.959375*2^30 */
  350|    532|      const int32_t f8_19 = 19 * f8; /* 1.959375*2^30 */
  351|    532|      const int32_t f9_38 = 38 * f9; /* 1.959375*2^30 */
  352|       |
  353|    532|      const int64_t f0f0 = f0 * static_cast<int64_t>(f0);
  354|    532|      const int64_t f0f1_2 = f0_2 * static_cast<int64_t>(f1);
  355|    532|      const int64_t f0f2_2 = f0_2 * static_cast<int64_t>(f2);
  356|    532|      const int64_t f0f3_2 = f0_2 * static_cast<int64_t>(f3);
  357|    532|      const int64_t f0f4_2 = f0_2 * static_cast<int64_t>(f4);
  358|    532|      const int64_t f0f5_2 = f0_2 * static_cast<int64_t>(f5);
  359|    532|      const int64_t f0f6_2 = f0_2 * static_cast<int64_t>(f6);
  360|    532|      const int64_t f0f7_2 = f0_2 * static_cast<int64_t>(f7);
  361|    532|      const int64_t f0f8_2 = f0_2 * static_cast<int64_t>(f8);
  362|    532|      const int64_t f0f9_2 = f0_2 * static_cast<int64_t>(f9);
  363|    532|      const int64_t f1f1_2 = f1_2 * static_cast<int64_t>(f1);
  364|    532|      const int64_t f1f2_2 = f1_2 * static_cast<int64_t>(f2);
  365|    532|      const int64_t f1f3_4 = f1_2 * static_cast<int64_t>(f3_2);
  366|    532|      const int64_t f1f4_2 = f1_2 * static_cast<int64_t>(f4);
  367|    532|      const int64_t f1f5_4 = f1_2 * static_cast<int64_t>(f5_2);
  368|    532|      const int64_t f1f6_2 = f1_2 * static_cast<int64_t>(f6);
  369|    532|      const int64_t f1f7_4 = f1_2 * static_cast<int64_t>(f7_2);
  370|    532|      const int64_t f1f8_2 = f1_2 * static_cast<int64_t>(f8);
  371|    532|      const int64_t f1f9_76 = f1_2 * static_cast<int64_t>(f9_38);
  372|    532|      const int64_t f2f2 = f2 * static_cast<int64_t>(f2);
  373|    532|      const int64_t f2f3_2 = f2_2 * static_cast<int64_t>(f3);
  374|    532|      const int64_t f2f4_2 = f2_2 * static_cast<int64_t>(f4);
  375|    532|      const int64_t f2f5_2 = f2_2 * static_cast<int64_t>(f5);
  376|    532|      const int64_t f2f6_2 = f2_2 * static_cast<int64_t>(f6);
  377|    532|      const int64_t f2f7_2 = f2_2 * static_cast<int64_t>(f7);
  378|    532|      const int64_t f2f8_38 = f2_2 * static_cast<int64_t>(f8_19);
  379|    532|      const int64_t f2f9_38 = f2 * static_cast<int64_t>(f9_38);
  380|    532|      const int64_t f3f3_2 = f3_2 * static_cast<int64_t>(f3);
  381|    532|      const int64_t f3f4_2 = f3_2 * static_cast<int64_t>(f4);
  382|    532|      const int64_t f3f5_4 = f3_2 * static_cast<int64_t>(f5_2);
  383|    532|      const int64_t f3f6_2 = f3_2 * static_cast<int64_t>(f6);
  384|    532|      const int64_t f3f7_76 = f3_2 * static_cast<int64_t>(f7_38);
  385|    532|      const int64_t f3f8_38 = f3_2 * static_cast<int64_t>(f8_19);
  386|    532|      const int64_t f3f9_76 = f3_2 * static_cast<int64_t>(f9_38);
  387|    532|      const int64_t f4f4 = f4 * static_cast<int64_t>(f4);
  388|    532|      const int64_t f4f5_2 = f4_2 * static_cast<int64_t>(f5);
  389|    532|      const int64_t f4f6_38 = f4_2 * static_cast<int64_t>(f6_19);
  390|    532|      const int64_t f4f7_38 = f4 * static_cast<int64_t>(f7_38);
  391|    532|      const int64_t f4f8_38 = f4_2 * static_cast<int64_t>(f8_19);
  392|    532|      const int64_t f4f9_38 = f4 * static_cast<int64_t>(f9_38);
  393|    532|      const int64_t f5f5_38 = f5 * static_cast<int64_t>(f5_38);
  394|    532|      const int64_t f5f6_38 = f5_2 * static_cast<int64_t>(f6_19);
  395|    532|      const int64_t f5f7_76 = f5_2 * static_cast<int64_t>(f7_38);
  396|    532|      const int64_t f5f8_38 = f5_2 * static_cast<int64_t>(f8_19);
  397|    532|      const int64_t f5f9_76 = f5_2 * static_cast<int64_t>(f9_38);
  398|    532|      const int64_t f6f6_19 = f6 * static_cast<int64_t>(f6_19);
  399|    532|      const int64_t f6f7_38 = f6 * static_cast<int64_t>(f7_38);
  400|    532|      const int64_t f6f8_38 = f6_2 * static_cast<int64_t>(f8_19);
  401|    532|      const int64_t f6f9_38 = f6 * static_cast<int64_t>(f9_38);
  402|    532|      const int64_t f7f7_38 = f7 * static_cast<int64_t>(f7_38);
  403|    532|      const int64_t f7f8_38 = f7_2 * static_cast<int64_t>(f8_19);
  404|    532|      const int64_t f7f9_76 = f7_2 * static_cast<int64_t>(f9_38);
  405|    532|      const int64_t f8f8_19 = f8 * static_cast<int64_t>(f8_19);
  406|    532|      const int64_t f8f9_38 = f8 * static_cast<int64_t>(f9_38);
  407|    532|      const int64_t f9f9_38 = f9 * static_cast<int64_t>(f9_38);
  408|       |
  409|    532|      int64_t h0 = f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38;
  410|    532|      int64_t h1 = f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38;
  411|    532|      int64_t h2 = f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19;
  412|    532|      int64_t h3 = f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38;
  413|    532|      int64_t h4 = f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38;
  414|    532|      int64_t h5 = f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38;
  415|    532|      int64_t h6 = f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19;
  416|    532|      int64_t h7 = f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38;
  417|    532|      int64_t h8 = f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38;
  418|    532|      int64_t h9 = f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2;
  419|       |
  420|    532|      carry<26>(h0, h1);
  421|    532|      carry<26>(h4, h5);
  422|    532|      carry<25>(h1, h2);
  423|    532|      carry<25>(h5, h6);
  424|    532|      carry<26>(h2, h3);
  425|    532|      carry<26>(h6, h7);
  426|       |
  427|    532|      carry<25>(h3, h4);
  428|    532|      carry<25>(h7, h8);
  429|       |
  430|    532|      carry<26>(h4, h5);
  431|    532|      carry<26>(h8, h9);
  432|    532|      carry<25, 19>(h9, h0);
  433|    532|      carry<26>(h0, h1);
  434|       |
  435|    532|      f0 = static_cast<int32_t>(h0);
  436|    532|      f1 = static_cast<int32_t>(h1);
  437|    532|      f2 = static_cast<int32_t>(h2);
  438|    532|      f3 = static_cast<int32_t>(h3);
  439|    532|      f4 = static_cast<int32_t>(h4);
  440|    532|      f5 = static_cast<int32_t>(h5);
  441|    532|      f6 = static_cast<int32_t>(h6);
  442|    532|      f7 = static_cast<int32_t>(h7);
  443|    532|      f8 = static_cast<int32_t>(h8);
  444|    532|      f9 = static_cast<int32_t>(h9);
  445|    532|   }
  446|       |
  447|     46|   return Ed25519_FieldElement(f0, f1, f2, f3, f4, f5, f6, f7, f8, f9);
  448|     46|}
_ZNK5Botan20Ed25519_FieldElement4sqr2Ev:
  466|      8|Ed25519_FieldElement Ed25519_FieldElement::sqr2() const {
  467|      8|   const int32_t f0 = m_fe[0];
  468|      8|   const int32_t f1 = m_fe[1];
  469|      8|   const int32_t f2 = m_fe[2];
  470|      8|   const int32_t f3 = m_fe[3];
  471|      8|   const int32_t f4 = m_fe[4];
  472|      8|   const int32_t f5 = m_fe[5];
  473|      8|   const int32_t f6 = m_fe[6];
  474|      8|   const int32_t f7 = m_fe[7];
  475|      8|   const int32_t f8 = m_fe[8];
  476|      8|   const int32_t f9 = m_fe[9];
  477|       |
  478|      8|   const int32_t f0_2 = 2 * f0;
  479|      8|   const int32_t f1_2 = 2 * f1;
  480|      8|   const int32_t f2_2 = 2 * f2;
  481|      8|   const int32_t f3_2 = 2 * f3;
  482|      8|   const int32_t f4_2 = 2 * f4;
  483|      8|   const int32_t f5_2 = 2 * f5;
  484|      8|   const int32_t f6_2 = 2 * f6;
  485|      8|   const int32_t f7_2 = 2 * f7;
  486|      8|   const int32_t f5_38 = 38 * f5; /* 1.959375*2^30 */
  487|      8|   const int32_t f6_19 = 19 * f6; /* 1.959375*2^30 */
  488|      8|   const int32_t f7_38 = 38 * f7; /* 1.959375*2^30 */
  489|      8|   const int32_t f8_19 = 19 * f8; /* 1.959375*2^30 */
  490|      8|   const int32_t f9_38 = 38 * f9; /* 1.959375*2^30 */
  491|      8|   const int64_t f0f0 = f0 * static_cast<int64_t>(f0);
  492|      8|   const int64_t f0f1_2 = f0_2 * static_cast<int64_t>(f1);
  493|      8|   const int64_t f0f2_2 = f0_2 * static_cast<int64_t>(f2);
  494|      8|   const int64_t f0f3_2 = f0_2 * static_cast<int64_t>(f3);
  495|      8|   const int64_t f0f4_2 = f0_2 * static_cast<int64_t>(f4);
  496|      8|   const int64_t f0f5_2 = f0_2 * static_cast<int64_t>(f5);
  497|      8|   const int64_t f0f6_2 = f0_2 * static_cast<int64_t>(f6);
  498|      8|   const int64_t f0f7_2 = f0_2 * static_cast<int64_t>(f7);
  499|      8|   const int64_t f0f8_2 = f0_2 * static_cast<int64_t>(f8);
  500|      8|   const int64_t f0f9_2 = f0_2 * static_cast<int64_t>(f9);
  501|      8|   const int64_t f1f1_2 = f1_2 * static_cast<int64_t>(f1);
  502|      8|   const int64_t f1f2_2 = f1_2 * static_cast<int64_t>(f2);
  503|      8|   const int64_t f1f3_4 = f1_2 * static_cast<int64_t>(f3_2);
  504|      8|   const int64_t f1f4_2 = f1_2 * static_cast<int64_t>(f4);
  505|      8|   const int64_t f1f5_4 = f1_2 * static_cast<int64_t>(f5_2);
  506|      8|   const int64_t f1f6_2 = f1_2 * static_cast<int64_t>(f6);
  507|      8|   const int64_t f1f7_4 = f1_2 * static_cast<int64_t>(f7_2);
  508|      8|   const int64_t f1f8_2 = f1_2 * static_cast<int64_t>(f8);
  509|      8|   const int64_t f1f9_76 = f1_2 * static_cast<int64_t>(f9_38);
  510|      8|   const int64_t f2f2 = f2 * static_cast<int64_t>(f2);
  511|      8|   const int64_t f2f3_2 = f2_2 * static_cast<int64_t>(f3);
  512|      8|   const int64_t f2f4_2 = f2_2 * static_cast<int64_t>(f4);
  513|      8|   const int64_t f2f5_2 = f2_2 * static_cast<int64_t>(f5);
  514|      8|   const int64_t f2f6_2 = f2_2 * static_cast<int64_t>(f6);
  515|      8|   const int64_t f2f7_2 = f2_2 * static_cast<int64_t>(f7);
  516|      8|   const int64_t f2f8_38 = f2_2 * static_cast<int64_t>(f8_19);
  517|      8|   const int64_t f2f9_38 = f2 * static_cast<int64_t>(f9_38);
  518|      8|   const int64_t f3f3_2 = f3_2 * static_cast<int64_t>(f3);
  519|      8|   const int64_t f3f4_2 = f3_2 * static_cast<int64_t>(f4);
  520|      8|   const int64_t f3f5_4 = f3_2 * static_cast<int64_t>(f5_2);
  521|      8|   const int64_t f3f6_2 = f3_2 * static_cast<int64_t>(f6);
  522|      8|   const int64_t f3f7_76 = f3_2 * static_cast<int64_t>(f7_38);
  523|      8|   const int64_t f3f8_38 = f3_2 * static_cast<int64_t>(f8_19);
  524|      8|   const int64_t f3f9_76 = f3_2 * static_cast<int64_t>(f9_38);
  525|      8|   const int64_t f4f4 = f4 * static_cast<int64_t>(f4);
  526|      8|   const int64_t f4f5_2 = f4_2 * static_cast<int64_t>(f5);
  527|      8|   const int64_t f4f6_38 = f4_2 * static_cast<int64_t>(f6_19);
  528|      8|   const int64_t f4f7_38 = f4 * static_cast<int64_t>(f7_38);
  529|      8|   const int64_t f4f8_38 = f4_2 * static_cast<int64_t>(f8_19);
  530|      8|   const int64_t f4f9_38 = f4 * static_cast<int64_t>(f9_38);
  531|      8|   const int64_t f5f5_38 = f5 * static_cast<int64_t>(f5_38);
  532|      8|   const int64_t f5f6_38 = f5_2 * static_cast<int64_t>(f6_19);
  533|      8|   const int64_t f5f7_76 = f5_2 * static_cast<int64_t>(f7_38);
  534|      8|   const int64_t f5f8_38 = f5_2 * static_cast<int64_t>(f8_19);
  535|      8|   const int64_t f5f9_76 = f5_2 * static_cast<int64_t>(f9_38);
  536|      8|   const int64_t f6f6_19 = f6 * static_cast<int64_t>(f6_19);
  537|      8|   const int64_t f6f7_38 = f6 * static_cast<int64_t>(f7_38);
  538|      8|   const int64_t f6f8_38 = f6_2 * static_cast<int64_t>(f8_19);
  539|      8|   const int64_t f6f9_38 = f6 * static_cast<int64_t>(f9_38);
  540|      8|   const int64_t f7f7_38 = f7 * static_cast<int64_t>(f7_38);
  541|      8|   const int64_t f7f8_38 = f7_2 * static_cast<int64_t>(f8_19);
  542|      8|   const int64_t f7f9_76 = f7_2 * static_cast<int64_t>(f9_38);
  543|      8|   const int64_t f8f8_19 = f8 * static_cast<int64_t>(f8_19);
  544|      8|   const int64_t f8f9_38 = f8 * static_cast<int64_t>(f9_38);
  545|      8|   const int64_t f9f9_38 = f9 * static_cast<int64_t>(f9_38);
  546|       |
  547|      8|   int64_t h0 = f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38;
  548|      8|   int64_t h1 = f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38;
  549|      8|   int64_t h2 = f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19;
  550|      8|   int64_t h3 = f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38;
  551|      8|   int64_t h4 = f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38;
  552|      8|   int64_t h5 = f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38;
  553|      8|   int64_t h6 = f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19;
  554|      8|   int64_t h7 = f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38;
  555|      8|   int64_t h8 = f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38;
  556|      8|   int64_t h9 = f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2;
  557|       |
  558|      8|   h0 += h0;
  559|      8|   h1 += h1;
  560|      8|   h2 += h2;
  561|      8|   h3 += h3;
  562|      8|   h4 += h4;
  563|      8|   h5 += h5;
  564|      8|   h6 += h6;
  565|      8|   h7 += h7;
  566|      8|   h8 += h8;
  567|      8|   h9 += h9;
  568|       |
  569|      8|   carry<26>(h0, h1);
  570|      8|   carry<26>(h4, h5);
  571|       |
  572|      8|   carry<25>(h1, h2);
  573|      8|   carry<25>(h5, h6);
  574|       |
  575|      8|   carry<26>(h2, h3);
  576|      8|   carry<26>(h6, h7);
  577|       |
  578|      8|   carry<25>(h3, h4);
  579|      8|   carry<25>(h7, h8);
  580|      8|   carry<26>(h4, h5);
  581|      8|   carry<26>(h8, h9);
  582|      8|   carry<25, 19>(h9, h0);
  583|      8|   carry<26>(h0, h1);
  584|       |
  585|      8|   return Ed25519_FieldElement(h0, h1, h2, h3, h4, h5, h6, h7, h8, h9);
  586|      8|}
_ZNK5Botan20Ed25519_FieldElement12serialize_toENSt3__14spanIhLm32EEE:
  643|      4|void Ed25519_FieldElement::serialize_to(std::span<uint8_t, 32> s) const {
  644|      4|   const int32_t X25 = (1 << 25);
  645|       |
  646|      4|   int32_t h0 = m_fe[0];
  647|      4|   int32_t h1 = m_fe[1];
  648|      4|   int32_t h2 = m_fe[2];
  649|      4|   int32_t h3 = m_fe[3];
  650|      4|   int32_t h4 = m_fe[4];
  651|      4|   int32_t h5 = m_fe[5];
  652|      4|   int32_t h6 = m_fe[6];
  653|      4|   int32_t h7 = m_fe[7];
  654|      4|   int32_t h8 = m_fe[8];
  655|      4|   int32_t h9 = m_fe[9];
  656|       |
  657|      4|   int32_t q = (19 * h9 + ((static_cast<int32_t>(1) << 24))) >> 25;
  658|      4|   q = (h0 + q) >> 26;
  659|      4|   q = (h1 + q) >> 25;
  660|      4|   q = (h2 + q) >> 26;
  661|      4|   q = (h3 + q) >> 25;
  662|      4|   q = (h4 + q) >> 26;
  663|      4|   q = (h5 + q) >> 25;
  664|      4|   q = (h6 + q) >> 26;
  665|      4|   q = (h7 + q) >> 25;
  666|      4|   q = (h8 + q) >> 26;
  667|      4|   q = (h9 + q) >> 25;
  668|       |
  669|       |   /* Goal: Output h-(2^255-19)q, which is between 0 and 2^255-20. */
  670|      4|   h0 += 19 * q;
  671|       |   /* Goal: Output h-2^255 q, which is between 0 and 2^255-20. */
  672|       |
  673|      4|   carry0<26>(h0, h1);
  674|      4|   carry0<25>(h1, h2);
  675|      4|   carry0<26>(h2, h3);
  676|      4|   carry0<25>(h3, h4);
  677|      4|   carry0<26>(h4, h5);
  678|      4|   carry0<25>(h5, h6);
  679|      4|   carry0<26>(h6, h7);
  680|      4|   carry0<25>(h7, h8);
  681|      4|   carry0<26>(h8, h9);
  682|       |
  683|      4|   const int32_t carry9 = h9 >> 25;
  684|      4|   h9 -= carry9 * X25;
  685|       |   /* h10 = carry9 */
  686|       |
  687|       |   /*
  688|       |   Goal: Output h0+...+2^255 h10-2^255 q, which is between 0 and 2^255-20.
  689|       |   Have h0+...+2^230 h9 between 0 and 2^255-1;
  690|       |   evidently 2^255 h10-2^255 q = 0.
  691|       |   Goal: Output h0+...+2^230 h9.
  692|       |   */
  693|       |
  694|      4|   s[0] = static_cast<uint8_t>(h0 >> 0);
  695|      4|   s[1] = static_cast<uint8_t>(h0 >> 8);
  696|      4|   s[2] = static_cast<uint8_t>(h0 >> 16);
  697|      4|   s[3] = static_cast<uint8_t>((h0 >> 24) | (h1 << 2));
  698|      4|   s[4] = static_cast<uint8_t>(h1 >> 6);
  699|      4|   s[5] = static_cast<uint8_t>(h1 >> 14);
  700|      4|   s[6] = static_cast<uint8_t>((h1 >> 22) | (h2 << 3));
  701|      4|   s[7] = static_cast<uint8_t>(h2 >> 5);
  702|      4|   s[8] = static_cast<uint8_t>(h2 >> 13);
  703|      4|   s[9] = static_cast<uint8_t>((h2 >> 21) | (h3 << 5));
  704|      4|   s[10] = static_cast<uint8_t>(h3 >> 3);
  705|      4|   s[11] = static_cast<uint8_t>(h3 >> 11);
  706|      4|   s[12] = static_cast<uint8_t>((h3 >> 19) | (h4 << 6));
  707|      4|   s[13] = static_cast<uint8_t>(h4 >> 2);
  708|      4|   s[14] = static_cast<uint8_t>(h4 >> 10);
  709|      4|   s[15] = static_cast<uint8_t>(h4 >> 18);
  710|      4|   s[16] = static_cast<uint8_t>(h5 >> 0);
  711|      4|   s[17] = static_cast<uint8_t>(h5 >> 8);
  712|      4|   s[18] = static_cast<uint8_t>(h5 >> 16);
  713|      4|   s[19] = static_cast<uint8_t>((h5 >> 24) | (h6 << 1));
  714|      4|   s[20] = static_cast<uint8_t>(h6 >> 7);
  715|      4|   s[21] = static_cast<uint8_t>(h6 >> 15);
  716|      4|   s[22] = static_cast<uint8_t>((h6 >> 23) | (h7 << 3));
  717|      4|   s[23] = static_cast<uint8_t>(h7 >> 5);
  718|      4|   s[24] = static_cast<uint8_t>(h7 >> 13);
  719|      4|   s[25] = static_cast<uint8_t>((h7 >> 21) | (h8 << 4));
  720|      4|   s[26] = static_cast<uint8_t>(h8 >> 4);
  721|      4|   s[27] = static_cast<uint8_t>(h8 >> 12);
  722|      4|   s[28] = static_cast<uint8_t>((h8 >> 20) | (h9 << 6));
  723|      4|   s[29] = static_cast<uint8_t>(h9 >> 2);
  724|      4|   s[30] = static_cast<uint8_t>(h9 >> 10);
  725|      4|   s[31] = static_cast<uint8_t>(h9 >> 18);
  726|      4|}

_ZN5Botan18Ed25519_PrivateKeyC1ERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEE:
  171|      9|Ed25519_PrivateKey::Ed25519_PrivateKey(const AlgorithmIdentifier& alg_id, std::span<const uint8_t> key_bits) {
  172|       |   // RFC 8410 Section 3: "the parameters MUST be absent".
  173|      9|   if(!alg_id.parameters_are_empty()) {
  ------------------
  |  Branch (173:7): [True: 1, False: 8]
  ------------------
  174|      1|      throw Decoding_Error("Unexpected parameters for Ed25519 private key");
  175|      1|   }
  176|       |
  177|      8|   secure_vector<uint8_t> bits;
  178|      8|   BER_Decoder(key_bits, BER_Decoder::Limits::DER()).decode(bits, ASN1_Type::OctetString).discard_remaining();
  179|       |
  180|      8|   if(bits.size() != 32) {
  ------------------
  |  Branch (180:7): [True: 5, False: 3]
  ------------------
  181|      5|      throw Decoding_Error("Invalid size for Ed25519 private key");
  182|      5|   }
  183|      3|   load_ed25519_keypair(ed25519_expand_seed(bits), m_public, m_private);
  184|      3|}
ed25519_key.cpp:_ZN5Botan12_GLOBAL__N_120load_ed25519_keypairENSt3__16vectorIhNS_16secure_allocatorIhEEEERNS1_10shared_ptrIKNS_22Ed25519_PublicKey_DataEEERNS6_IKNS_23Ed25519_PrivateKey_DataEEE:
  126|      2|                          std::shared_ptr<const Ed25519_PrivateKey_Data>& sk_out) {
  127|      2|   BOTAN_ASSERT_NOMSG(expanded_key.size() == 64);
  ------------------
  |  |   77|      2|   do {                                                                     \
  |  |   78|      2|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|      2|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 2]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|      2|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  128|      2|   pk_out = std::make_shared<const Ed25519_PublicKey_Data>(
  129|      2|      std::vector<uint8_t>(expanded_key.begin() + 32, expanded_key.end()));
  130|      2|   sk_out = std::make_shared<const Ed25519_PrivateKey_Data>(std::move(expanded_key));
  131|      2|}
_ZN5Botan23Ed25519_PrivateKey_DataC2ENSt3__16vectorIhNS_16secure_allocatorIhEEEE:
   33|      2|      explicit Ed25519_PrivateKey_Data(secure_vector<uint8_t> key) : m_key(std::move(key)) {}
ed25519_key.cpp:_ZN5Botan12_GLOBAL__N_119ed25519_expand_seedENSt3__14spanIKhLm18446744073709551615EEE:
  134|      2|secure_vector<uint8_t> ed25519_expand_seed(std::span<const uint8_t> seed) {
  135|      2|   BOTAN_ASSERT_NOMSG(seed.size() == 32);
  ------------------
  |  |   77|      2|   do {                                                                     \
  |  |   78|      2|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|      2|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 2]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|      2|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  136|      2|   std::vector<uint8_t> pk(32);  // also written into the expanded private key
  137|      2|   secure_vector<uint8_t> sk(64);
  138|      2|   ed25519_gen_keypair(pk.data(), sk.data(), seed.data());
  139|      2|   return sk;
  140|      2|}
_ZN5Botan22Ed25519_PublicKey_DataC2ENSt3__16vectorIhNS1_9allocatorIhEEEE:
   23|      2|      explicit Ed25519_PublicKey_Data(std::vector<uint8_t> key) : m_key(std::move(key)) {}

_ZN5Botan21ed25519_basepoint_mulENSt3__14spanIhLm32EEEPKh:
 1863|      2|void ed25519_basepoint_mul(std::span<uint8_t, 32> out, const uint8_t a[32]) {
 1864|      2|   std::array<int8_t, 64> e{};
 1865|       |
 1866|      2|   CT::poison(a, 32);
 1867|       |
 1868|       |   // each e[i] is between 0 and 15 except e[63] which is between 0 and 7
 1869|     66|   for(size_t i = 0; i != 32; ++i) {
  ------------------
  |  Branch (1869:22): [True: 64, False: 2]
  ------------------
 1870|     64|      e[2 * i + 0] = (a[i] >> 0) & 0x0F;
 1871|     64|      e[2 * i + 1] = (a[i] >> 4) & 0x0F;
 1872|     64|   }
 1873|       |
 1874|      2|   int8_t carry = 0;
 1875|    128|   for(size_t i = 0; i < 63; ++i) {
  ------------------
  |  Branch (1875:22): [True: 126, False: 2]
  ------------------
 1876|    126|      e[i] += carry;
 1877|    126|      carry = e[i] + 8;
 1878|    126|      carry >>= 4;
 1879|    126|      e[i] -= carry << 4;
 1880|    126|   }
 1881|      2|   e[63] += carry;
 1882|       |   /* each e[i] is between -8 and 8 */
 1883|       |
 1884|      2|   auto h = Ed25519_Point_Extended::identity();
 1885|     66|   for(size_t i = 1; i < 64; i += 2) {
  ------------------
  |  Branch (1885:22): [True: 64, False: 2]
  ------------------
 1886|     64|      h = Ed25519_Point_Extended::from(h + select(B_precomp[i / 2], e[i]));
 1887|     64|   }
 1888|       |
 1889|      2|   auto s = Ed25519_Point_Projective::from(h.dbl());
 1890|      2|   s = Ed25519_Point_Projective::from(s.dbl());
 1891|      2|   s = Ed25519_Point_Projective::from(s.dbl());
 1892|      2|   h = Ed25519_Point_Extended::from(s.dbl());
 1893|       |
 1894|     66|   for(size_t i = 0; i != 64; i += 2) {
  ------------------
  |  Branch (1894:22): [True: 64, False: 2]
  ------------------
 1895|     64|      h = Ed25519_Point_Extended::from(h + select(B_precomp[i / 2], e[i]));
 1896|     64|   }
 1897|       |
 1898|      2|   h.serialize_to(out);
 1899|       |
 1900|      2|   CT::unpoison(a, 32);
 1901|      2|   CT::unpoison(out);
 1902|      2|}
ge.cpp:_ZN5Botan12_GLOBAL__N_122Ed25519_Point_Extended8identityEv:
  109|      2|      static constexpr Ed25519_Point_Extended identity() {
  110|      2|         Ed25519_Point_Extended h;
  111|      2|         h.X = Ed25519_FieldElement::zero();
  112|      2|         h.Y = Ed25519_FieldElement::one();
  113|      2|         h.Z = Ed25519_FieldElement::one();
  114|      2|         h.T = Ed25519_FieldElement::zero();
  115|      2|         return h;
  116|      2|      }
ge.cpp:_ZN5Botan12_GLOBAL__N_122Ed25519_Point_Extended4fromERKNS0_23Ed25519_Point_CompletedE:
  129|    130|      static Ed25519_Point_Extended from(const Ed25519_Point_Completed& p) {
  130|    130|         Ed25519_Point_Extended r;
  131|    130|         r.X = p.X * p.T;
  132|    130|         r.Y = p.Y * p.Z;
  133|    130|         r.Z = p.Z * p.T;
  134|    130|         r.T = p.X * p.Y;
  135|    130|         return r;
  136|    130|      }
ge.cpp:_ZN5Botan12_GLOBAL__N_1plERKNS0_22Ed25519_Point_ExtendedERKNS0_19Ed25519_Point_NielsE:
  220|    128|inline Ed25519_Point_Completed operator+(const Ed25519_Point_Extended& p, const Ed25519_Point_Niels& q) {
  221|    128|   Ed25519_Point_Completed r;
  222|    128|   r.X = p.Y + p.X;        // YpX1 = Y1+X1
  223|    128|   r.Y = p.Y - p.X;        // YmX1 = Y1-X1
  224|    128|   r.Z = r.X * q.yplusx;   // A = YpX1*ypx2
  225|    128|   r.Y = r.Y * q.yminusx;  // B = YmX1*ymx2
  226|    128|   r.T = q.xy2d * p.T;     // C = xy2d2*T1
  227|    128|   auto t0 = p.Z + p.Z;    // D = 2*Z1
  228|    128|   r.X = r.Z - r.Y;        // X3 = A-B
  229|    128|   r.Y = r.Z + r.Y;        // Y3 = A+B
  230|    128|   r.Z = t0 + r.T;         // Z3 = D+C
  231|    128|   r.T = t0 - r.T;         // T3 = D-C
  232|    128|   return r;
  233|    128|}
ge.cpp:_ZN5Botan12_GLOBAL__N_16selectEPKNS0_19Ed25519_Point_NielsEa:
  455|    128|Ed25519_Point_Niels select(const Ed25519_Point_Niels base[8], int8_t b) {
  456|    128|   const uint8_t bnegative = negative(b);
  457|    128|   const uint8_t babs = b - ((-static_cast<int>(bnegative) & b) * 2);
  458|    128|   const uint32_t neg_mask = equal32(bnegative, 1);
  459|       |
  460|    128|   const uint32_t mask1 = equal32(babs, 1);
  461|    128|   const uint32_t mask2 = equal32(babs, 2);
  462|    128|   const uint32_t mask3 = equal32(babs, 3);
  463|    128|   const uint32_t mask4 = equal32(babs, 4);
  464|    128|   const uint32_t mask5 = equal32(babs, 5);
  465|    128|   const uint32_t mask6 = equal32(babs, 6);
  466|    128|   const uint32_t mask7 = equal32(babs, 7);
  467|    128|   const uint32_t mask8 = equal32(babs, 8);
  468|       |
  469|    128|   auto t = Ed25519_Point_Niels::identity();
  470|       |
  471|  1.40k|   for(size_t i = 0; i != 10; ++i) {
  ------------------
  |  Branch (471:22): [True: 1.28k, False: 128]
  ------------------
  472|  1.28k|      t.yplusx[i] = t.yplusx[i] ^ ((t.yplusx[i] ^ base[0].yplusx[i]) & mask1) ^
  473|  1.28k|                    ((t.yplusx[i] ^ base[1].yplusx[i]) & mask2) ^ ((t.yplusx[i] ^ base[2].yplusx[i]) & mask3) ^
  474|  1.28k|                    ((t.yplusx[i] ^ base[3].yplusx[i]) & mask4) ^ ((t.yplusx[i] ^ base[4].yplusx[i]) & mask5) ^
  475|  1.28k|                    ((t.yplusx[i] ^ base[5].yplusx[i]) & mask6) ^ ((t.yplusx[i] ^ base[6].yplusx[i]) & mask7) ^
  476|  1.28k|                    ((t.yplusx[i] ^ base[7].yplusx[i]) & mask8);
  477|       |
  478|  1.28k|      t.yminusx[i] = t.yminusx[i] ^ ((t.yminusx[i] ^ base[0].yminusx[i]) & mask1) ^
  479|  1.28k|                     ((t.yminusx[i] ^ base[1].yminusx[i]) & mask2) ^ ((t.yminusx[i] ^ base[2].yminusx[i]) & mask3) ^
  480|  1.28k|                     ((t.yminusx[i] ^ base[3].yminusx[i]) & mask4) ^ ((t.yminusx[i] ^ base[4].yminusx[i]) & mask5) ^
  481|  1.28k|                     ((t.yminusx[i] ^ base[5].yminusx[i]) & mask6) ^ ((t.yminusx[i] ^ base[6].yminusx[i]) & mask7) ^
  482|  1.28k|                     ((t.yminusx[i] ^ base[7].yminusx[i]) & mask8);
  483|       |
  484|  1.28k|      t.xy2d[i] = t.xy2d[i] ^ ((t.xy2d[i] ^ base[0].xy2d[i]) & mask1) ^ ((t.xy2d[i] ^ base[1].xy2d[i]) & mask2) ^
  485|  1.28k|                  ((t.xy2d[i] ^ base[2].xy2d[i]) & mask3) ^ ((t.xy2d[i] ^ base[3].xy2d[i]) & mask4) ^
  486|  1.28k|                  ((t.xy2d[i] ^ base[4].xy2d[i]) & mask5) ^ ((t.xy2d[i] ^ base[5].xy2d[i]) & mask6) ^
  487|  1.28k|                  ((t.xy2d[i] ^ base[6].xy2d[i]) & mask7) ^ ((t.xy2d[i] ^ base[7].xy2d[i]) & mask8);
  488|  1.28k|   }
  489|       |
  490|    128|   auto minus_xy2d = -t.xy2d;
  491|       |
  492|       |   // If negative have to swap yminusx and yplusx
  493|  1.40k|   for(size_t i = 0; i != 10; ++i) {
  ------------------
  |  Branch (493:22): [True: 1.28k, False: 128]
  ------------------
  494|  1.28k|      const int32_t t_yplusx = t.yplusx[i] ^ ((t.yplusx[i] ^ t.yminusx[i]) & neg_mask);
  495|  1.28k|      const int32_t t_yminusx = t.yminusx[i] ^ ((t.yminusx[i] ^ t.yplusx[i]) & neg_mask);
  496|       |
  497|  1.28k|      t.yplusx[i] = t_yplusx;
  498|  1.28k|      t.yminusx[i] = t_yminusx;
  499|  1.28k|      t.xy2d[i] = t.xy2d[i] ^ ((t.xy2d[i] ^ minus_xy2d[i]) & neg_mask);
  500|  1.28k|   }
  501|       |
  502|    128|   return t;
  503|    128|}
ge.cpp:_ZN5Botan12_GLOBAL__N_18negativeEa:
  451|    128|inline uint8_t negative(int8_t b) {
  452|    128|   return static_cast<uint8_t>(b) >> 7;
  453|    128|}
ge.cpp:_ZN5Botan12_GLOBAL__N_17equal32Ehh:
  447|  1.15k|inline uint32_t equal32(uint8_t b, uint8_t c) {
  448|  1.15k|   return CT::Mask<uint32_t>::is_equal(b, c).value();
  449|  1.15k|}
ge.cpp:_ZN5Botan12_GLOBAL__N_119Ed25519_Point_Niels8identityEv:
  160|    128|      static constexpr Ed25519_Point_Niels identity() {
  161|    128|         Ed25519_Point_Niels h;
  162|    128|         h.yplusx = Ed25519_FieldElement::one();
  163|    128|         h.yminusx = Ed25519_FieldElement::one();
  164|    128|         h.xy2d = Ed25519_FieldElement::zero();
  165|    128|         return h;
  166|    128|      }
ge.cpp:_ZN5Botan12_GLOBAL__N_124Ed25519_Point_Projective4fromERKNS0_23Ed25519_Point_CompletedE:
   56|      6|      static Ed25519_Point_Projective from(const Ed25519_Point_Completed& p) {
   57|      6|         Ed25519_Point_Projective r;
   58|      6|         r.X = p.X * p.T;
   59|      6|         r.Y = p.Y * p.Z;
   60|      6|         r.Z = p.Z * p.T;
   61|      6|         return r;
   62|      6|      }
ge.cpp:_ZNK5Botan12_GLOBAL__N_122Ed25519_Point_Extended3dblEv:
  118|      2|      Ed25519_Point_Completed dbl() const {
  119|      2|         Ed25519_Point_Projective q;
  120|      2|         q.X = X;
  121|      2|         q.Y = Y;
  122|      2|         q.Z = Z;
  123|      2|         return q.dbl();
  124|      2|      }
ge.cpp:_ZNK5Botan12_GLOBAL__N_124Ed25519_Point_Projective3dblEv:
   83|      8|Ed25519_Point_Completed Ed25519_Point_Projective::dbl() const {
   84|      8|   Ed25519_Point_Completed r;
   85|      8|   r.X = X.sqr();        // XX=X1^2
   86|      8|   r.Z = Y.sqr();        // YY=Y1^2
   87|      8|   r.T = Z.sqr2();       // B=2*Z1^2
   88|      8|   r.Y = X + Y;          // A=X1+Y1
   89|      8|   auto t0 = r.Y.sqr();  // AA=A^2
   90|      8|   r.Y = r.Z + r.X;      // Y3=YY+XX
   91|      8|   r.Z = r.Z - r.X;      // Z3=YY-XX
   92|      8|   r.X = t0 - r.Y;       // X3=AA-Y3
   93|      8|   r.T = r.T - r.Z;      // T3=B-Z3
   94|      8|   return r;
   95|      8|}
ge.cpp:_ZNK5Botan12_GLOBAL__N_122Ed25519_Point_Extended12serialize_toENSt3__14spanIhLm32EEE:
  138|      2|      void serialize_to(std::span<uint8_t, 32> out) const {
  139|      2|         auto recip = this->Z.invert();
  140|      2|         auto x = this->X * recip;
  141|      2|         auto y = this->Y * recip;
  142|      2|         y.serialize_to(out);
  143|      2|         out[31] ^= x.is_negative() ? 0x80 : 0x00;
  ------------------
  |  Branch (143:21): [True: 1, False: 1]
  ------------------
  144|      2|      }

_ZN5Botan9KyberModeC2ERKNS_3OIDE:
   86|     34|KyberMode::KyberMode(const OID& oid) : m_mode(kyber_mode_from_oid(oid)) {}
_ZNK5Botan9KyberMode9is_ml_kemEv:
  127|    102|bool KyberMode::is_ml_kem() const {
  128|    102|   return m_mode == KyberMode::ML_KEM_512 || m_mode == KyberMode::ML_KEM_768 || m_mode == KyberMode::ML_KEM_1024;
  ------------------
  |  Branch (128:11): [True: 21, False: 81]
  |  Branch (128:46): [True: 33, False: 48]
  |  Branch (128:81): [True: 48, False: 0]
  ------------------
  129|    102|}
_ZNK5Botan9KyberMode15is_kyber_round3Ev:
  131|    124|bool KyberMode::is_kyber_round3() const {
  132|    124|   return m_mode == KyberMode::Kyber512_R3 || m_mode == KyberMode::Kyber768_R3 || m_mode == KyberMode::Kyber1024_R3 ||
  ------------------
  |  Branch (132:11): [True: 0, False: 124]
  |  Branch (132:47): [True: 0, False: 124]
  |  Branch (132:83): [True: 0, False: 124]
  ------------------
  133|    124|          m_mode == KyberMode::Kyber512_90s || m_mode == KyberMode::Kyber768_90s || m_mode == KyberMode::Kyber1024_90s;
  ------------------
  |  Branch (133:11): [True: 0, False: 124]
  |  Branch (133:48): [True: 0, False: 124]
  |  Branch (133:85): [True: 0, False: 124]
  ------------------
  134|    124|}
_ZN5Botan16Kyber_PrivateKeyC1ERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEE:
  240|     34|      Kyber_PrivateKey(key_bits, KyberMode(alg_id.oid())) {
  241|       |   // The parameter set is identified by the OID; no parameters are defined.
  242|     34|   if(!alg_id.parameters_are_empty()) {
  ------------------
  |  Branch (242:7): [True: 5, False: 29]
  ------------------
  243|      5|      throw Decoding_Error("Unexpected parameters for ML-KEM/Kyber private key");
  244|      5|   }
  245|     34|}
_ZN5Botan16Kyber_PrivateKeyC1ENSt3__14spanIKhLm18446744073709551615EEENS_9KyberModeE:
  247|     34|Kyber_PrivateKey::Kyber_PrivateKey(std::span<const uint8_t> sk, KyberMode m) {
  248|     34|   KyberConstants mode(m);
  249|       |
  250|     34|   if(mode.mode().is_ml_kem() && sk.size() == mode.seed_private_key_bytes()) {
  ------------------
  |  Branch (250:7): [True: 34, False: 0]
  |  Branch (250:7): [True: 28, False: 6]
  |  Branch (250:34): [True: 28, False: 6]
  ------------------
  251|     28|      std::tie(m_public, m_private) = Seed_Expanding_Keypair_Codec().decode_keypair(sk, std::move(mode));
  252|     28|   } else if(sk.size() == mode.expanded_private_key_bytes()) {
  ------------------
  |  Branch (252:14): [True: 0, False: 6]
  ------------------
  253|      0|      std::tie(m_public, m_private) = Expanded_Keypair_Codec().decode_keypair(sk, std::move(mode));
  254|      6|   } else if(!mode.mode().is_ml_kem() && sk.size() == mode.seed_private_key_bytes()) {
  ------------------
  |  Branch (254:14): [True: 0, False: 6]
  |  Branch (254:14): [True: 0, False: 6]
  |  Branch (254:42): [True: 0, False: 0]
  ------------------
  255|      0|      throw Invalid_Argument("Kyber round 3 private keys do not support the seed format");
  256|      6|   } else {
  257|      6|      throw Invalid_Argument("Private key does not have the correct byte count");
  258|      6|   }
  259|     34|}
kyber.cpp:_ZN5Botan12_GLOBAL__N_119kyber_mode_from_oidERKNS_3OIDE:
   74|     34|KyberMode::Mode kyber_mode_from_oid(const OID& oid) {
   75|     34|   if(const auto name = oid.registered_name()) {
  ------------------
  |  Branch (75:18): [True: 34, False: 0]
  ------------------
   76|     34|      return kyber_mode_from_string(*name);
   77|     34|   }
   78|       |
   79|      0|   throw Invalid_Argument(fmt("OID '{}' is not registered as a Kyber/ML-KEM mode", oid));
   80|     34|}
kyber.cpp:_ZN5Botan12_GLOBAL__N_122kyber_mode_from_stringENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   42|     34|KyberMode::Mode kyber_mode_from_string(std::string_view str) {
   43|     34|   if(str == "Kyber-512-90s-r3") {
  ------------------
  |  Branch (43:7): [True: 0, False: 34]
  ------------------
   44|      0|      return KyberMode::Kyber512_90s;
   45|      0|   }
   46|     34|   if(str == "Kyber-768-90s-r3") {
  ------------------
  |  Branch (46:7): [True: 0, False: 34]
  ------------------
   47|      0|      return KyberMode::Kyber768_90s;
   48|      0|   }
   49|     34|   if(str == "Kyber-1024-90s-r3") {
  ------------------
  |  Branch (49:7): [True: 0, False: 34]
  ------------------
   50|      0|      return KyberMode::Kyber1024_90s;
   51|      0|   }
   52|     34|   if(str == "Kyber-512-r3") {
  ------------------
  |  Branch (52:7): [True: 0, False: 34]
  ------------------
   53|      0|      return KyberMode::Kyber512_R3;
   54|      0|   }
   55|     34|   if(str == "Kyber-768-r3") {
  ------------------
  |  Branch (55:7): [True: 0, False: 34]
  ------------------
   56|      0|      return KyberMode::Kyber768_R3;
   57|      0|   }
   58|     34|   if(str == "Kyber-1024-r3") {
  ------------------
  |  Branch (58:7): [True: 0, False: 34]
  ------------------
   59|      0|      return KyberMode::Kyber1024_R3;
   60|      0|   }
   61|     34|   if(str == "ML-KEM-512") {
  ------------------
  |  Branch (61:7): [True: 7, False: 27]
  ------------------
   62|      7|      return KyberMode::ML_KEM_512;
   63|      7|   }
   64|     27|   if(str == "ML-KEM-768") {
  ------------------
  |  Branch (64:7): [True: 11, False: 16]
  ------------------
   65|     11|      return KyberMode::ML_KEM_768;
   66|     11|   }
   67|     16|   if(str == "ML-KEM-1024") {
  ------------------
  |  Branch (67:7): [True: 16, False: 0]
  ------------------
   68|     16|      return KyberMode::ML_KEM_1024;
   69|     16|   }
   70|       |
   71|      0|   throw Invalid_Argument(fmt("'{}' is not a valid Kyber mode name", str));
   72|     16|}

_ZN5Botan11Kyber_Algos24encode_polynomial_vectorENSt3__14spanIhLm18446744073709551615EEERKNS_8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS4_6DomainE1EEE:
  186|     28|void encode_polynomial_vector(std::span<uint8_t> out, const KyberPolyVecNTT& vec) {
  187|     28|   BufferStuffer bs(out);
  188|     93|   for(const auto& v : vec) {
  ------------------
  |  Branch (188:22): [True: 93, False: 28]
  ------------------
  189|     93|      byte_encode(bs, v);
  190|     93|   }
  191|     28|   BOTAN_ASSERT_NOMSG(bs.full());
  ------------------
  |  |   77|     28|   do {                                                                     \
  |  |   78|     28|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|     28|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 28]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|     28|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 28]
  |  |  ------------------
  ------------------
  192|     28|}
_ZN5Botan11Kyber_Algos14expand_keypairENS_19KyberPrivateKeySeedENS_14KyberConstantsE:
  323|     28|KyberInternalKeypair expand_keypair(KyberPrivateKeySeed seed, KyberConstants mode) {
  324|     28|   BOTAN_ARG_CHECK(seed.d.has_value(), "Cannot expand keypair without the full private seed");
  ------------------
  |  |   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]
  |  |  ------------------
  ------------------
  325|     28|   const auto& d = seed.d.value();
  326|       |
  327|     28|   CT::poison(d);
  328|     28|   auto [rho, sigma] = mode.symmetric_primitives().G(d, mode);
  329|     28|   CT::unpoison(rho);  // rho is public (seed for the public matrix A)
  330|       |
  331|       |   // Algorithm 13 (K-PKE.KeyGen) ----------------
  332|       |
  333|     28|   auto A = Kyber_Algos::sample_matrix(rho, false /* not transposed */, mode);
  334|       |
  335|       |   // The nonce N is handled internally by the PolynomialSampler
  336|     28|   Kyber_Algos::PolynomialSampler ps(sigma, mode);
  337|     28|   auto s = ntt(ps.sample_polynomial_vector_cbd_eta1());
  338|     28|   const auto e = ntt(ps.sample_polynomial_vector_cbd_eta1());
  339|       |
  340|     28|   auto t = montgomery(A * s);
  341|     28|   t += e;
  342|     28|   t.reduce();
  343|       |
  344|       |   // Bring s into canonical [0,Q) form (as ByteEncode_12 requires), matching
  345|       |   // the representation produced when decoding a private key. This lets the
  346|       |   // secret key be serialized directly, without reducing a copy at encode time.
  347|     28|   s.reduce();
  348|       |
  349|       |   // End Algorithm 13 ---------------------------
  350|       |
  351|     28|   CT::unpoison_all(d, t, s);
  352|       |
  353|     28|   return {
  354|     28|      std::make_shared<Kyber_PublicKeyInternal>(mode, std::move(t), std::move(rho)),
  355|     28|      std::make_shared<Kyber_PrivateKeyInternal>(std::move(mode), std::move(s), std::move(seed)),
  356|     28|   };
  357|     28|}
_ZN5Botan11Kyber_Algos13sample_matrixENS_10StrongSpanIKNS_6StrongINSt3__16vectorIhNS3_9allocatorIhEEEENS_13KyberSeedRho_EJEEEEEbRKNS_14KyberConstantsE:
  387|     28|KyberPolyMat sample_matrix(StrongSpan<const KyberSeedRho> seed, bool transposed, const KyberConstants& mode) {
  388|     28|   BOTAN_ASSERT(seed.size() == KyberConstants::SEED_BYTES, "unexpected seed size");
  ------------------
  |  |   64|     28|   do {                                                                                 \
  |  |   65|     28|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|     28|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 28]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|     28|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 28]
  |  |  ------------------
  ------------------
  389|       |
  390|     28|   KyberPolyMat mat(mode.k(), mode.k());
  391|       |
  392|     28|   const auto& sym = mode.symmetric_primitives();
  393|     28|   std::unique_ptr<Botan::XOF> xof;
  394|       |
  395|    121|   for(uint8_t i = 0; i < mode.k(); ++i) {
  ------------------
  |  Branch (395:23): [True: 93, False: 28]
  ------------------
  396|    418|      for(uint8_t j = 0; j < mode.k(); ++j) {
  ------------------
  |  Branch (396:26): [True: 325, False: 93]
  ------------------
  397|    325|         const auto pos = (transposed) ? std::tuple(i, j) : std::tuple(j, i);
  ------------------
  |  Branch (397:27): [True: 0, False: 325]
  ------------------
  398|    325|         sym.setup_XOF(xof, seed, pos);
  399|    325|         sample_ntt_uniform(mat[i][j], *xof);
  400|    325|      }
  401|     93|   }
  402|       |
  403|     28|   return mat;
  404|     28|}
_ZN5Botan11Kyber_Algos26sample_polynomial_from_cbdERNS_8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS1_6DomainE0EEENS_14KyberConstants8KyberEtaERKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_24KyberSamplingRandomness_EJEEE:
  414|    186|                                const KyberSamplingRandomness& randomness) {
  415|    186|   switch(eta) {
  ------------------
  |  Branch (415:11): [True: 186, False: 0]
  ------------------
  416|    166|      case KyberConstants::KyberEta::_2:
  ------------------
  |  Branch (416:7): [True: 166, False: 20]
  ------------------
  417|    166|         return sample_poly_cbd<KyberConstants::KyberEta::_2>(poly, randomness);
  418|     20|      case KyberConstants::KyberEta::_3:
  ------------------
  |  Branch (418:7): [True: 20, False: 166]
  ------------------
  419|     20|         return sample_poly_cbd<KyberConstants::KyberEta::_3>(poly, randomness);
  420|    186|   }
  421|       |
  422|      0|   BOTAN_ASSERT_UNREACHABLE();
  ------------------
  |  |  163|      0|#define BOTAN_ASSERT_UNREACHABLE() Botan::assert_unreachable(__FILE__, __LINE__)
  ------------------
  423|      0|}
kyber_algos.cpp:_ZN5Botan11Kyber_Algos12_GLOBAL__N_111byte_encodeERNS_13BufferStufferERKNS_8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS4_6DomainE1EEE:
   44|     93|void byte_encode(BufferStuffer& bs, const KyberPolyNTT& p) {
   45|     93|   CRYSTALS::pack<KyberConstants::Q - 1>(p, bs);
   46|     93|}
kyber_algos.cpp:_ZN5Botan11Kyber_Algos12_GLOBAL__N_118sample_ntt_uniformERNS_8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS2_6DomainE1EEERNS_3XOFE:
   76|    325|void sample_ntt_uniform(KyberPolyNTT& p, XOF& xof) {
   77|       |   // A generator that returns the next coefficient sampled from the XOF. As the
   78|       |   // sampling uses half-bytes, this keeps track of the additionally sampled
   79|       |   // coefficient as needed.
   80|    325|   auto sample = [stashed_coeff = std::optional<uint16_t>{},
   81|    325|                  bounded_xof =
   82|    325|                     Bounded_XOF<KyberConstants::SAMPLE_NTT_POLY_FROM_XOF_BOUND>(xof)]() mutable -> uint16_t {
   83|    325|      auto lowerthan_q = [](uint32_t d) -> std::optional<uint16_t> {
   84|    325|         if(d < KyberConstants::Q) {
   85|    325|            return static_cast<uint16_t>(d);
   86|    325|         } else {
   87|    325|            return std::nullopt;
   88|    325|         }
   89|    325|      };
   90|       |
   91|    325|      if(auto stashed = std::exchange(stashed_coeff, std::nullopt)) {
   92|    325|         return *stashed;  // value retained from a previous invocation
   93|    325|      }
   94|       |
   95|    325|      while(true) {
   96|    325|         const auto [d1, d2] = bounded_xof.next<3>([&](const auto bytes) {
   97|    325|            const auto x = load_le3(bytes);
   98|    325|            return std::pair{lowerthan_q(x & 0x0FFF), lowerthan_q(x >> 12)};
   99|    325|         });
  100|       |
  101|    325|         if(d1.has_value()) {
  102|    325|            stashed_coeff = d2;  // keep candidate d2 for the next invocation
  103|    325|            return *d1;
  104|    325|         } else if(d2.has_value()) {
  105|       |            // d1 was invalid, d2 is valid, nothing to stash
  106|    325|            return *d2;
  107|    325|         }
  108|    325|      }
  109|    325|   };
  110|       |
  111|  83.2k|   for(auto& coeff : p) {
  ------------------
  |  Branch (111:20): [True: 83.2k, False: 325]
  ------------------
  112|  83.2k|      coeff = sample();
  113|  83.2k|   }
  114|    325|}
kyber_algos.cpp:_ZZN5Botan11Kyber_Algos12_GLOBAL__N_118sample_ntt_uniformERNS_8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS2_6DomainE1EEERNS_3XOFEEN3$_0clEv:
   82|  83.2k|                     Bounded_XOF<KyberConstants::SAMPLE_NTT_POLY_FROM_XOF_BOUND>(xof)]() mutable -> uint16_t {
   83|  83.2k|      auto lowerthan_q = [](uint32_t d) -> std::optional<uint16_t> {
   84|  83.2k|         if(d < KyberConstants::Q) {
   85|  83.2k|            return static_cast<uint16_t>(d);
   86|  83.2k|         } else {
   87|  83.2k|            return std::nullopt;
   88|  83.2k|         }
   89|  83.2k|      };
   90|       |
   91|  83.2k|      if(auto stashed = std::exchange(stashed_coeff, std::nullopt)) {
  ------------------
  |  Branch (91:15): [True: 33.4k, False: 49.7k]
  ------------------
   92|  33.4k|         return *stashed;  // value retained from a previous invocation
   93|  33.4k|      }
   94|       |
   95|  51.7k|      while(true) {
  ------------------
  |  Branch (95:13): [True: 51.7k, Folded]
  ------------------
   96|  51.7k|         const auto [d1, d2] = bounded_xof.next<3>([&](const auto bytes) {
   97|  51.7k|            const auto x = load_le3(bytes);
   98|  51.7k|            return std::pair{lowerthan_q(x & 0x0FFF), lowerthan_q(x >> 12)};
   99|  51.7k|         });
  100|       |
  101|  51.7k|         if(d1.has_value()) {
  ------------------
  |  Branch (101:13): [True: 41.4k, False: 10.3k]
  ------------------
  102|  41.4k|            stashed_coeff = d2;  // keep candidate d2 for the next invocation
  103|  41.4k|            return *d1;
  104|  41.4k|         } else if(d2.has_value()) {
  ------------------
  |  Branch (104:20): [True: 8.27k, False: 2.03k]
  ------------------
  105|       |            // d1 was invalid, d2 is valid, nothing to stash
  106|  8.27k|            return *d2;
  107|  8.27k|         }
  108|  51.7k|      }
  109|  49.7k|   };
kyber_algos.cpp:_ZZZN5Botan11Kyber_Algos12_GLOBAL__N_118sample_ntt_uniformERNS_8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS2_6DomainE1EEERNS_3XOFEEN3$_0clEvENKUlT_E_clINSt3__15arrayIhLm3EEEEEDaSB_:
   96|  51.7k|         const auto [d1, d2] = bounded_xof.next<3>([&](const auto bytes) {
   97|  51.7k|            const auto x = load_le3(bytes);
   98|  51.7k|            return std::pair{lowerthan_q(x & 0x0FFF), lowerthan_q(x >> 12)};
   99|  51.7k|         });
kyber_algos.cpp:_ZZZN5Botan11Kyber_Algos12_GLOBAL__N_118sample_ntt_uniformERNS_8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS2_6DomainE1EEERNS_3XOFEEN3$_0clEvENKUljE_clEj:
   83|   103k|      auto lowerthan_q = [](uint32_t d) -> std::optional<uint16_t> {
   84|   103k|         if(d < KyberConstants::Q) {
  ------------------
  |  Branch (84:13): [True: 83.3k, False: 20.2k]
  ------------------
   85|  83.3k|            return static_cast<uint16_t>(d);
   86|  83.3k|         } else {
   87|  20.2k|            return std::nullopt;
   88|  20.2k|         }
   89|   103k|      };
kyber_algos.cpp:_ZN5Botan11Kyber_Algos12_GLOBAL__N_115sample_poly_cbdILNS_14KyberConstants8KyberEtaE2EEEvRNS_8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS5_6DomainE0EEENS_10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_24KyberSamplingRandomness_EJEEEEE:
  130|    166|                                                   StrongSpan<const KyberSamplingRandomness> randomness) {
  131|    166|   BufferSlicer bs(randomness);
  132|       |
  133|  5.47k|   for(size_t i = 0; i < poly.size() / 8; ++i) {
  ------------------
  |  Branch (133:22): [True: 5.31k, False: 166]
  ------------------
  134|  5.31k|      const uint32_t t = Botan::load_le(bs.take<4>());
  135|       |
  136|       |      // SWAR (SIMD within a Register) trick: calculate 16 2-bit-sums in parallel
  137|  5.31k|      constexpr uint32_t operand_bitmask = 0b01010101010101010101010101010101;
  138|       |
  139|       |      // clang-format off
  140|  5.31k|      const uint32_t d = ((t >> 0) & operand_bitmask) +
  141|  5.31k|                         ((t >> 1) & operand_bitmask);
  142|       |      // clang-format on
  143|       |
  144|  47.8k|      for(size_t j = 0; j < 8; ++j) {
  ------------------
  |  Branch (144:25): [True: 42.4k, False: 5.31k]
  ------------------
  145|  42.4k|         const int16_t a = (d >> (4 * j + 0)) & 0x3;
  146|  42.4k|         const int16_t b = (d >> (4 * j + 2)) & 0x3;
  147|  42.4k|         poly[8 * i + j] = a - b;
  148|  42.4k|      }
  149|  5.31k|   }
  150|       |
  151|    166|   BOTAN_ASSERT_NOMSG(bs.empty());
  ------------------
  |  |   77|    166|   do {                                                                     \
  |  |   78|    166|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    166|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 166]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    166|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 166]
  |  |  ------------------
  ------------------
  152|    166|}
kyber_algos.cpp:_ZN5Botan11Kyber_Algos12_GLOBAL__N_115sample_poly_cbdILNS_14KyberConstants8KyberEtaE3EEEvRNS_8CRYSTALS10PolynomialINS_15KyberPolyTraitsELNS5_6DomainE0EEENS_10StrongSpanIKNS_6StrongINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_24KyberSamplingRandomness_EJEEEEE:
  159|     20|                                                   StrongSpan<const KyberSamplingRandomness> randomness) {
  160|     20|   BufferSlicer bs(randomness);
  161|       |
  162|  1.30k|   for(size_t i = 0; i < poly.size() / 4; ++i) {
  ------------------
  |  Branch (162:22): [True: 1.28k, False: 20]
  ------------------
  163|  1.28k|      const uint32_t t = load_le3(bs.take<3>());
  164|       |
  165|       |      // SWAR (SIMD within a Register) trick: calculate 8 3-bit-sums in parallel
  166|  1.28k|      constexpr uint32_t operand_bitmask = 0b00000000001001001001001001001001;
  167|       |
  168|       |      // clang-format off
  169|  1.28k|      const uint32_t d = ((t >> 0) & operand_bitmask) +
  170|  1.28k|                         ((t >> 1) & operand_bitmask) +
  171|  1.28k|                         ((t >> 2) & operand_bitmask);
  172|       |      // clang-format on
  173|       |
  174|  6.40k|      for(size_t j = 0; j < 4; ++j) {
  ------------------
  |  Branch (174:25): [True: 5.12k, False: 1.28k]
  ------------------
  175|  5.12k|         const int16_t a = (d >> (6 * j + 0)) & 0x7;
  176|  5.12k|         const int16_t b = (d >> (6 * j + 3)) & 0x7;
  177|  5.12k|         poly[4 * i + j] = a - b;
  178|  5.12k|      }
  179|  1.28k|   }
  180|       |
  181|     20|   BOTAN_ASSERT_NOMSG(bs.empty());
  ------------------
  |  |   77|     20|   do {                                                                     \
  |  |   78|     20|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|     20|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 20]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|     20|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 20]
  |  |  ------------------
  ------------------
  182|     20|}

_ZN5Botan14KyberConstantsC2ENS_9KyberModeE:
   30|     62|KyberConstants::KyberConstants(KyberMode mode) : m_mode(mode) {
   31|     62|   switch(mode.mode()) {
   32|      0|      case KyberMode::Kyber512_R3:
  ------------------
  |  Branch (32:7): [True: 0, False: 62]
  ------------------
   33|      0|      case KyberMode::Kyber512_90s:
  ------------------
  |  Branch (33:7): [True: 0, False: 62]
  ------------------
   34|     12|      case KyberMode::ML_KEM_512:
  ------------------
  |  Branch (34:7): [True: 12, False: 50]
  ------------------
   35|     12|         m_nist_strength = KyberStrength::_128;
   36|     12|         m_k = 2;
   37|     12|         m_eta1 = KyberEta::_3;
   38|     12|         m_du = KyberDu::_10;
   39|     12|         m_dv = KyberDv::_4;
   40|     12|         break;
   41|       |
   42|      0|      case KyberMode::Kyber768_R3:
  ------------------
  |  Branch (42:7): [True: 0, False: 62]
  ------------------
   43|      0|      case KyberMode::Kyber768_90s:
  ------------------
  |  Branch (43:7): [True: 0, False: 62]
  ------------------
   44|     20|      case KyberMode::ML_KEM_768:
  ------------------
  |  Branch (44:7): [True: 20, False: 42]
  ------------------
   45|     20|         m_nist_strength = KyberStrength::_192;
   46|     20|         m_k = 3;
   47|     20|         m_eta1 = KyberEta::_2;
   48|     20|         m_du = KyberDu::_10;
   49|     20|         m_dv = KyberDv::_4;
   50|     20|         break;
   51|       |
   52|      0|      case KyberMode::Kyber1024_R3:
  ------------------
  |  Branch (52:7): [True: 0, False: 62]
  ------------------
   53|      0|      case KyberMode::Kyber1024_90s:
  ------------------
  |  Branch (53:7): [True: 0, False: 62]
  ------------------
   54|     30|      case KyberMode::ML_KEM_1024:
  ------------------
  |  Branch (54:7): [True: 30, False: 32]
  ------------------
   55|     30|         m_nist_strength = KyberStrength::_256;
   56|     30|         m_k = 4;
   57|     30|         m_eta1 = KyberEta::_2;
   58|     30|         m_du = KyberDu::_11;
   59|     30|         m_dv = KyberDv::_5;
   60|     30|         break;
   61|       |
   62|      0|      default:
  ------------------
  |  Branch (62:7): [True: 0, False: 62]
  ------------------
   63|      0|         BOTAN_ASSERT_UNREACHABLE();
  ------------------
  |  |  163|      0|#define BOTAN_ASSERT_UNREACHABLE() Botan::assert_unreachable(__FILE__, __LINE__)
  ------------------
   64|     62|   }
   65|       |
   66|     62|#ifdef BOTAN_HAS_KYBER_90S
   67|     62|   if(mode.is_kyber_round3() && mode.is_90s()) {
  ------------------
  |  Branch (67:7): [True: 0, False: 62]
  |  Branch (67:33): [True: 0, False: 0]
  ------------------
   68|      0|      m_symmetric_primitives = std::make_unique<Kyber_90s_Symmetric_Primitives>();
   69|      0|   }
   70|     62|#endif
   71|       |
   72|     62|#ifdef BOTAN_HAS_KYBER
   73|     62|   if(mode.is_kyber_round3() && mode.is_modern()) {
  ------------------
  |  Branch (73:7): [True: 0, False: 62]
  |  Branch (73:33): [True: 0, False: 0]
  ------------------
   74|      0|      m_symmetric_primitives = std::make_unique<Kyber_Modern_Symmetric_Primitives>();
   75|      0|   }
   76|     62|#endif
   77|       |
   78|     62|#ifdef BOTAN_HAS_ML_KEM
   79|     62|   if(mode.is_ml_kem()) {
  ------------------
  |  Branch (79:7): [True: 62, False: 0]
  ------------------
   80|     62|      m_symmetric_primitives = std::make_unique<ML_KEM_Symmetric_Primitives>();
   81|     62|   }
   82|     62|#endif
   83|       |
   84|     62|   static_assert(N % 8 == 0);
   85|     62|   m_polynomial_vector_bytes = (bitlen(Q) * (N / 8)) * k();
   86|     62|   m_polynomial_vector_compressed_bytes = d_u() * k() * (N / 8);
   87|     62|   m_polynomial_compressed_bytes = d_v() * (N / 8);
   88|     62|   m_expanded_private_key_bytes =
   89|     62|      static_cast<uint32_t>(m_polynomial_vector_bytes + public_key_bytes() + PUBLIC_KEY_HASH_BYTES + SEED_BYTES);
   90|     62|   m_seed_private_key_bytes = 2 * SEED_BYTES;
   91|       |
   92|     62|   if(!m_symmetric_primitives) {
  ------------------
  |  Branch (92:7): [True: 0, False: 62]
  ------------------
   93|      0|      throw Not_Implemented("requested Kyber mode is not enabled in this build");
   94|      0|   }
   95|     62|}
_ZN5Botan14KyberConstantsD2Ev:
   97|    202|KyberConstants::~KyberConstants() = default;

_ZNK5Botan28Seed_Expanding_Keypair_Codec14decode_keypairENSt3__14spanIKhLm18446744073709551615EEENS_14KyberConstantsE:
   88|     28|                                                                  KyberConstants mode) const {
   89|     28|   BufferSlicer s(private_key);
   90|     28|   auto seed = KyberPrivateKeySeed{
   91|     28|      s.copy<KyberSeedRandomness>(KyberConstants::SEED_BYTES),
   92|     28|      s.copy<KyberImplicitRejectionValue>(KyberConstants::SEED_BYTES),
   93|     28|   };
   94|     28|   BOTAN_ASSERT_NOMSG(s.empty());
  ------------------
  |  |   77|     28|   do {                                                                     \
  |  |   78|     28|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|     28|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 28]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|     28|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 28]
  |  |  ------------------
  ------------------
   95|     28|   return Kyber_Algos::expand_keypair(std::move(seed), std::move(mode));
   96|     28|}
_ZN5Botan23Kyber_PublicKeyInternalC2ENS_14KyberConstantsENS_8CRYSTALS16PolynomialVectorINS_15KyberPolyTraitsELNS2_6DomainE1EEENS_6StrongINSt3__16vectorIhNS8_9allocatorIhEEEENS_13KyberSeedRho_EJEEE:
  114|     28|      m_mode(std::move(mode)),
  115|     28|      m_public_key_bits_raw(concat(Kyber_Algos::encode_polynomial_vector<std::vector<uint8_t>>(t, m_mode), rho)),
  116|     28|      m_H_public_key_bits_raw(m_mode.symmetric_primitives().H(m_public_key_bits_raw)),
  117|     28|      m_t(std::move(t)),
  118|     28|      m_rho(std::move(rho)) {}

_ZN5Botan8PEM_Code6decodeERNS_10DataSourceERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
   62|    254|secure_vector<uint8_t> decode(DataSource& source, std::string& label) {
   63|    254|   const size_t RANDOM_CHAR_LIMIT = 8;
   64|       |
   65|    254|   label.clear();
   66|       |
   67|    254|   const std::string PEM_HEADER1 = "-----BEGIN ";
   68|    254|   const std::string PEM_HEADER2 = "-----";
   69|    254|   size_t position = 0;
   70|       |
   71|  14.3k|   while(position != PEM_HEADER1.length()) {
  ------------------
  |  Branch (71:10): [True: 14.0k, False: 215]
  ------------------
   72|  14.0k|      auto b = source.read_byte();
   73|       |
   74|  14.0k|      if(!b) {
  ------------------
  |  Branch (74:10): [True: 38, False: 14.0k]
  ------------------
   75|     38|         throw Decoding_Error("PEM: No PEM header found");
   76|     38|      }
   77|  14.0k|      if(static_cast<char>(*b) == PEM_HEADER1[position]) {
  ------------------
  |  Branch (77:10): [True: 2.60k, False: 11.4k]
  ------------------
   78|  2.60k|         ++position;
   79|  11.4k|      } else if(position >= RANDOM_CHAR_LIMIT) {
  ------------------
  |  Branch (79:17): [True: 1, False: 11.4k]
  ------------------
   80|      1|         throw Decoding_Error("PEM: Malformed PEM header");
   81|  11.4k|      } else {
   82|  11.4k|         position = 0;
   83|  11.4k|      }
   84|  14.0k|   }
   85|    215|   position = 0;
   86|  2.94k|   while(position != PEM_HEADER2.length()) {
  ------------------
  |  Branch (86:10): [True: 2.76k, False: 178]
  ------------------
   87|  2.76k|      auto b = source.read_byte();
   88|       |
   89|  2.76k|      if(!b) {
  ------------------
  |  Branch (89:10): [True: 34, False: 2.73k]
  ------------------
   90|     34|         throw Decoding_Error("PEM: No PEM header found");
   91|     34|      }
   92|  2.73k|      if(static_cast<char>(*b) == PEM_HEADER2[position]) {
  ------------------
  |  Branch (92:10): [True: 908, False: 1.82k]
  ------------------
   93|    908|         ++position;
   94|  1.82k|      } else if(position > 0) {
  ------------------
  |  Branch (94:17): [True: 2, False: 1.82k]
  ------------------
   95|      2|         throw Decoding_Error("PEM: Malformed PEM header");
   96|      2|      }
   97|       |
   98|  2.73k|      if(position == 0) {
  ------------------
  |  Branch (98:10): [True: 1.82k, False: 908]
  ------------------
   99|  1.82k|         if(label.size() >= 128) {
  ------------------
  |  Branch (99:13): [True: 1, False: 1.82k]
  ------------------
  100|      1|            throw Decoding_Error("PEM: Label too long");
  101|      1|         }
  102|  1.82k|         label += static_cast<char>(*b);
  103|  1.82k|      }
  104|  2.73k|   }
  105|       |
  106|    178|   std::vector<char> b64;
  107|       |
  108|    178|   const std::string PEM_TRAILER = fmt("-----END {}-----", label);
  109|    178|   position = 0;
  110|  41.3k|   while(position != PEM_TRAILER.length()) {
  ------------------
  |  Branch (110:10): [True: 41.2k, False: 112]
  ------------------
  111|  41.2k|      auto b = source.read_byte();
  112|       |
  113|  41.2k|      if(!b) {
  ------------------
  |  Branch (113:10): [True: 56, False: 41.2k]
  ------------------
  114|     56|         throw Decoding_Error("PEM: No PEM trailer found");
  115|     56|      }
  116|  41.2k|      if(static_cast<char>(*b) == PEM_TRAILER[position]) {
  ------------------
  |  Branch (116:10): [True: 2.40k, False: 38.8k]
  ------------------
  117|  2.40k|         ++position;
  118|  38.8k|      } else if(position > 0) {
  ------------------
  |  Branch (118:17): [True: 10, False: 38.8k]
  ------------------
  119|     10|         throw Decoding_Error("PEM: Malformed PEM trailer");
  120|     10|      }
  121|       |
  122|  41.2k|      if(position == 0) {
  ------------------
  |  Branch (122:10): [True: 38.8k, False: 2.40k]
  ------------------
  123|  38.8k|         b64.push_back(*b);
  124|  38.8k|      }
  125|  41.2k|   }
  126|       |
  127|    112|   return base64_decode(b64.data(), b64.size());
  128|    178|}
_ZN5Botan8PEM_Code7matchesERNS_10DataSourceENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEm:
  143|  7.03k|bool matches(DataSource& source, std::string_view extra, size_t search_range) {
  144|  7.03k|   const std::string PEM_HEADER = fmt("-----BEGIN {}", extra);
  145|       |
  146|  7.03k|   secure_vector<uint8_t> search_buf(search_range);
  147|  7.03k|   const size_t got = source.peek(search_buf.data(), search_buf.size(), 0);
  148|       |
  149|  7.03k|   if(got < PEM_HEADER.length()) {
  ------------------
  |  Branch (149:7): [True: 476, False: 6.55k]
  ------------------
  150|    476|      return false;
  151|    476|   }
  152|       |
  153|  6.55k|   size_t index = 0;
  154|       |
  155|  1.12M|   for(size_t j = 0; j != got; ++j) {
  ------------------
  |  Branch (155:22): [True: 1.11M, False: 6.55k]
  ------------------
  156|  1.11M|      if(static_cast<char>(search_buf[j]) == PEM_HEADER[index]) {
  ------------------
  |  Branch (156:10): [True: 6.09k, False: 1.10M]
  ------------------
  157|  6.09k|         ++index;
  158|  1.10M|      } else {
  159|  1.10M|         index = 0;
  160|  1.10M|      }
  161|       |
  162|  1.11M|      if(index == PEM_HEADER.size()) {
  ------------------
  |  Branch (162:10): [True: 3, False: 1.11M]
  ------------------
  163|      3|         return true;
  164|      3|      }
  165|  1.11M|   }
  166|       |
  167|  6.55k|   return false;
  168|  6.55k|}

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

_ZN5Botan5PKCS88load_keyERNS_10DataSourceE:
  350|  7.28k|std::unique_ptr<Private_Key> load_key(DataSource& source) {
  351|  7.28k|   auto fail_fn = []() -> std::string {
  352|  7.28k|      throw PKCS8_Exception("Internal error: Attempt to read password for unencrypted key");
  353|  7.28k|   };
  354|       |
  355|  7.28k|   return load_key(source, fail_fn, false);
  356|  7.28k|}
pkcs8.cpp:_ZN5Botan5PKCS812_GLOBAL__N_18load_keyERNS_10DataSourceERKNSt3__18functionIFNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEvEEEb:
  303|  7.28k|                                      bool is_encrypted) {
  304|  7.28k|   AlgorithmIdentifier alg_id;
  305|  7.28k|   secure_vector<uint8_t> pkcs8_key = PKCS8_decode(source, get_pass, alg_id, is_encrypted);
  306|       |
  307|  7.28k|   if(const auto alg_name = alg_id.oid().registered_name()) {
  ------------------
  |  Branch (307:18): [True: 4.35k, False: 2.92k]
  ------------------
  308|  4.35k|      return load_private_key(alg_id, pkcs8_key);
  309|  4.35k|   } else {
  310|  2.92k|      throw PKCS8_Exception(fmt("Unknown algorithm OID {}", alg_id.oid()));
  311|  2.92k|   }
  312|  7.28k|}
pkcs8.cpp:_ZN5Botan5PKCS812_GLOBAL__N_112PKCS8_decodeERNS_10DataSourceERKNSt3__18functionIFNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEvEEERNS_19AlgorithmIdentifierEb:
   50|  7.28k|                                    bool is_encrypted) {
   51|  7.28k|   AlgorithmIdentifier pbe_alg_id;
   52|  7.28k|   secure_vector<uint8_t> key_data;
   53|  7.28k|   secure_vector<uint8_t> key;
   54|       |
   55|  7.28k|   try {
   56|  7.28k|      if(ASN1::maybe_BER(source) && !PEM_Code::matches(source)) {
  ------------------
  |  Branch (56:10): [True: 7.03k, False: 251]
  |  Branch (56:37): [True: 7.02k, False: 3]
  ------------------
   57|  7.02k|         if(is_encrypted) {
  ------------------
  |  Branch (57:13): [True: 0, False: 7.02k]
  ------------------
   58|      0|            key_data = PKCS8_extract(source, pbe_alg_id);
   59|  7.02k|         } else {
   60|       |            // todo read more efficiently
   61|  1.13M|            while(auto b = source.read_byte()) {
  ------------------
  |  Branch (61:24): [True: 1.12M, False: 7.02k]
  ------------------
   62|  1.12M|               key_data.push_back(*b);
   63|  1.12M|            }
   64|  7.02k|         }
   65|  7.02k|      } else {
   66|    254|         std::string label;
   67|    254|         key_data = PEM_Code::decode(source, label);
   68|       |
   69|       |         // todo remove autodetect for pem as well?
   70|    254|         if(label == "PRIVATE KEY") {
  ------------------
  |  Branch (70:13): [True: 2, False: 252]
  ------------------
   71|      2|            is_encrypted = false;
   72|    252|         } else if(label == "ENCRYPTED PRIVATE KEY") {
  ------------------
  |  Branch (72:20): [True: 4, False: 248]
  ------------------
   73|      4|            DataSource_Memory key_source(key_data);
   74|      4|            key_data = PKCS8_extract(key_source, pbe_alg_id);
   75|    248|         } else {
   76|    248|            throw PKCS8_Exception(fmt("Unknown PEM label '{}'", label));
   77|    248|         }
   78|    254|      }
   79|       |
   80|  7.03k|      if(key_data.empty()) {
  ------------------
  |  Branch (80:10): [True: 1, False: 7.03k]
  ------------------
   81|      1|         throw PKCS8_Exception("No key data found");
   82|      1|      }
   83|  7.03k|   } catch(Decoding_Error& e) {
   84|    196|      throw Decoding_Error("PKCS #8 private key decoding", e);
   85|    196|   }
   86|       |
   87|  7.02k|   try {
   88|  7.02k|      if(is_encrypted) {
  ------------------
  |  Branch (88:10): [True: 0, False: 7.02k]
  ------------------
   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|  7.02k|      } else {
  100|  7.02k|         key = key_data;
  101|  7.02k|      }
  102|       |
  103|  7.02k|      BER_Decoder(key, BER_Decoder::Limits::DER())
  104|  7.02k|         .start_sequence()
  105|  7.02k|         .decode_and_check<size_t>(0, "Unknown PKCS #8 version number")
  106|  7.02k|         .decode(pk_alg_id)
  107|  7.02k|         .decode(key, ASN1_Type::OctetString)
  108|  7.02k|         .discard_remaining()
  109|  7.02k|         .end_cons()
  110|  7.02k|         .verify_end();
  111|  7.02k|   } catch(std::exception& e) {
  112|    941|      throw Decoding_Error("PKCS #8 private key decoding", e);
  113|    941|   }
  114|  6.08k|   return key;
  115|  7.02k|}
pkcs8.cpp:_ZN5Botan5PKCS812_GLOBAL__N_113PKCS8_extractERNS_10DataSourceERNS_19AlgorithmIdentifierE:
   31|      4|secure_vector<uint8_t> PKCS8_extract(DataSource& source, AlgorithmIdentifier& pbe_alg_id) {
   32|      4|   secure_vector<uint8_t> key_data;
   33|       |
   34|      4|   BER_Decoder(source, BER_Decoder::Limits::DER())
   35|      4|      .start_sequence()
   36|      4|      .decode(pbe_alg_id)
   37|      4|      .decode(key_data, ASN1_Type::OctetString)
   38|      4|      .end_cons()
   39|      4|      .verify_end();
   40|       |
   41|      4|   return key_data;
   42|      4|}

_ZN5Botan13RSA_PublicKey4initEONS_6BigIntES2_:
  156|      5|void RSA_PublicKey::init(BigInt&& n, BigInt&& e) {
  157|      5|   if(n.signum() <= 0 || n.is_even() || n.bits() < 384 || n.bits() > 16384) {
  ------------------
  |  Branch (157:7): [True: 2, False: 3]
  |  Branch (157:26): [True: 1, False: 2]
  |  Branch (157:41): [True: 2, False: 0]
  |  Branch (157:59): [True: 0, False: 0]
  ------------------
  158|      5|      throw Decoding_Error("Invalid RSA public key modulus");
  159|      5|   }
  160|      0|   if(e.is_even() || e <= 1 || e >= n || e.bits() > 256) {
  ------------------
  |  Branch (160:7): [True: 0, False: 0]
  |  Branch (160:22): [True: 0, False: 0]
  |  Branch (160:32): [True: 0, False: 0]
  |  Branch (160:42): [True: 0, False: 0]
  ------------------
  161|      0|      throw Decoding_Error("Invalid RSA public key exponent");
  162|      0|   }
  163|      0|   m_public = std::make_shared<RSA_Public_Data>(std::move(n), std::move(e));
  164|      0|}
_ZN5Botan14RSA_PrivateKeyC1ERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEE:
  282|     45|RSA_PrivateKey::RSA_PrivateKey(const AlgorithmIdentifier& alg_id, std::span<const uint8_t> key_bits) {
  283|     45|   if(alg_id.oid().registered_name() == "RSA" && !alg_id.parameters_are_null_or_empty()) {
  ------------------
  |  Branch (283:7): [True: 4, False: 41]
  |  Branch (283:7): [True: 2, False: 43]
  |  Branch (283:50): [True: 2, False: 2]
  ------------------
  284|      2|      throw Decoding_Error("Unexpected parameters for RSA private key");
  285|      2|   }
  286|       |
  287|     43|   BigInt n;
  288|     43|   BigInt e;
  289|     43|   BigInt d;
  290|     43|   BigInt p;
  291|     43|   BigInt q;
  292|     43|   BigInt d1;
  293|     43|   BigInt d2;
  294|     43|   BigInt c;
  295|       |
  296|     43|   BER_Decoder(key_bits, BER_Decoder::Limits::DER())
  297|     43|      .start_sequence()
  298|     43|      .decode_and_check<size_t>(0, "Unknown PKCS #1 key format version")
  299|     43|      .decode(n)
  300|     43|      .decode(e)
  301|     43|      .decode(d)
  302|     43|      .decode(p)
  303|     43|      .decode(q)
  304|     43|      .decode(d1)
  305|     43|      .decode(d2)
  306|     43|      .decode(c)
  307|     43|      .end_cons()
  308|     43|      .verify_end();
  309|       |
  310|     43|   RSA_PublicKey::init(std::move(n), std::move(e));
  311|       |
  312|     43|   RSA_PrivateKey::init(std::move(d), std::move(p), std::move(q), std::move(d1), std::move(d2), std::move(c));
  313|     43|}

_ZN5Botan18Sphincs_ParametersC2ENS_21Sphincs_Parameter_SetENS_17Sphincs_Hash_TypeEjjjjjjj:
  245|     32|      m_set(set), m_hash_type(hash_type), m_n(n), m_h(h), m_d(d), m_a(a), m_k(k), m_w(w), m_bitsec(bitsec) {
  246|     32|   BOTAN_ARG_CHECK(!(hash_type == Sphincs_Hash_Type::Haraka && is_slh_dsa_set(set)),
  ------------------
  |  |   35|     32|   do {                                                          \
  |  |   36|     32|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     32|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 0, False: 32]
  |  |  |  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|     32|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 32]
  |  |  ------------------
  ------------------
  247|     32|                   "Haraka is not available for SLH-DSA");
  248|     32|   BOTAN_ARG_CHECK(w == 4 || w == 16 || w == 256, "Winternitz parameter must be one of 4, 16, 256");
  ------------------
  |  |   35|     32|   do {                                                          \
  |  |   36|     32|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     96|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 0, False: 32]
  |  |  |  Branch (37:12): [True: 32, 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|     32|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 32]
  |  |  ------------------
  ------------------
  249|     32|   BOTAN_ARG_CHECK(n == 16 || n == 24 || n == 32, "n must be one of 16, 24, 32");
  ------------------
  |  |   35|     32|   do {                                                          \
  |  |   36|     32|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     90|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 14, False: 18]
  |  |  |  Branch (37:12): [True: 10, False: 8]
  |  |  |  Branch (37:12): [True: 8, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     32|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 32]
  |  |  ------------------
  ------------------
  250|     32|   BOTAN_ARG_CHECK(m_d > 0, "d must be greater than zero");
  ------------------
  |  |   35|     32|   do {                                                          \
  |  |   36|     32|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|     32|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 32]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|     32|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 32]
  |  |  ------------------
  ------------------
  251|       |
  252|     32|   m_xmss_tree_height = m_h / m_d;
  253|     32|   m_lg_w = ceil_log2(m_w);
  254|       |
  255|       |   // base_2^b algorithm (Fips 205, Algorithm 4) only works
  256|       |   // when m_log_w is a divisor of 8.
  257|     32|   BOTAN_ASSERT_NOMSG(m_lg_w <= 8 && 8 % m_lg_w == 0);
  ------------------
  |  |   77|     32|   do {                                                                     \
  |  |   78|     32|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|     64|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:12): [True: 32, False: 0]
  |  |  |  Branch (79:12): [True: 32, False: 0]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|     32|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 32]
  |  |  ------------------
  ------------------
  258|       |
  259|       |   // # Winternitz blocks of the message (len_1 of FIPS 205, Algorithm 1)
  260|     32|   m_wots_len1 = (m_n * 8) / m_lg_w;
  261|       |
  262|       |   // # Winternitz blocks of the checksum (output of FIPS 205 Algorithm 1)
  263|     32|   m_wots_len2 = ceil_log2(m_wots_len1 * (m_w - 1)) / m_lg_w + 1;
  264|       |
  265|       |   // # Winternitz blocks in the signature (len of FIPS 205, Equation 5.4)
  266|     32|   m_wots_len = m_wots_len1 + m_wots_len2;
  267|       |
  268|       |   // byte length of WOTS+ signature as well as public key
  269|     32|   m_wots_bytes = m_wots_len * m_n;
  270|       |
  271|       |   // # of bytes the WOTS+ checksum consists of
  272|     32|   m_wots_checksum_bytes = ceil_tobytes(m_wots_len2 * m_lg_w);
  273|       |
  274|     32|   m_fors_sig_bytes = (m_a + 1) * m_k * m_n;
  275|       |
  276|       |   // byte length of the FORS input message
  277|     32|   m_fors_message_bytes = ceil_tobytes(m_k * m_a);
  278|       |
  279|     32|   m_xmss_sig_bytes = m_wots_bytes + m_xmss_tree_height * m_n;
  280|     32|   m_ht_sig_bytes = m_d * m_xmss_sig_bytes;
  281|     32|   m_sp_sig_bytes = m_n /* random */ + m_fors_sig_bytes + m_ht_sig_bytes;
  282|       |
  283|     32|   m_tree_digest_bytes = ceil_tobytes(m_h - m_xmss_tree_height);
  284|     32|   m_leaf_digest_bytes = ceil_tobytes(m_xmss_tree_height);
  285|     32|   m_h_msg_digest_bytes = m_fors_message_bytes + m_tree_digest_bytes + m_leaf_digest_bytes;
  286|     32|}
_ZNK5Botan18Sphincs_Parameters12is_availableEv:
  288|      4|bool Sphincs_Parameters::is_available() const {
  289|      4|   [[maybe_unused]] const bool is_slh_dsa = is_slh_dsa_set(m_set);
  290|      4|#ifdef BOTAN_HAS_SLH_DSA_WITH_SHA2
  291|      4|   if(is_slh_dsa && m_hash_type == Sphincs_Hash_Type::Sha256) {
  ------------------
  |  Branch (291:7): [True: 4, False: 0]
  |  Branch (291:21): [True: 2, False: 2]
  ------------------
  292|      2|      return true;
  293|      2|   }
  294|      2|#endif
  295|      2|#ifdef BOTAN_HAS_SLH_DSA_WITH_SHAKE
  296|      2|   if(is_slh_dsa && m_hash_type == Sphincs_Hash_Type::Shake256) {
  ------------------
  |  Branch (296:7): [True: 2, False: 0]
  |  Branch (296:21): [True: 2, False: 0]
  ------------------
  297|      2|      return true;
  298|      2|   }
  299|      0|#endif
  300|      0|#ifdef BOTAN_HAS_SPHINCS_PLUS_WITH_SHA2
  301|      0|   if(!is_slh_dsa && m_hash_type == Sphincs_Hash_Type::Sha256) {
  ------------------
  |  Branch (301:7): [True: 0, False: 0]
  |  Branch (301:22): [True: 0, False: 0]
  ------------------
  302|      0|      return true;
  303|      0|   }
  304|      0|#endif
  305|      0|#ifdef BOTAN_HAS_SPHINCS_PLUS_WITH_SHAKE
  306|      0|   if(!is_slh_dsa && m_hash_type == Sphincs_Hash_Type::Shake256) {
  ------------------
  |  Branch (306:7): [True: 0, False: 0]
  |  Branch (306:22): [True: 0, False: 0]
  ------------------
  307|      0|      return true;
  308|      0|   }
  309|      0|#endif
  310|      0|   return false;
  311|      0|}
_ZN5Botan18Sphincs_Parameters6createENS_21Sphincs_Parameter_SetENS_17Sphincs_Hash_TypeE:
  314|     32|   Sphincs_Parameter_Set set, Sphincs_Hash_Type hash /*, SlhDsaInputMode input_mode [TODO: prehash mode]*/) {
  315|       |   // See FIPS 205, Table 2
  316|     32|   switch(set) {
  ------------------
  |  Branch (316:11): [True: 32, False: 0]
  ------------------
  317|      0|      case Sphincs_Parameter_Set::Sphincs128Small:
  ------------------
  |  Branch (317:7): [True: 0, False: 32]
  ------------------
  318|      8|      case Sphincs_Parameter_Set::SLHDSA128Small:
  ------------------
  |  Branch (318:7): [True: 8, False: 24]
  ------------------
  319|      8|         return Sphincs_Parameters(set, hash, 16, 63, 7, 12, 14, 16, 133);
  320|      0|      case Sphincs_Parameter_Set::Sphincs128Fast:
  ------------------
  |  Branch (320:7): [True: 0, False: 32]
  ------------------
  321|      6|      case Sphincs_Parameter_Set::SLHDSA128Fast:
  ------------------
  |  Branch (321:7): [True: 6, False: 26]
  ------------------
  322|      6|         return Sphincs_Parameters(set, hash, 16, 66, 22, 6, 33, 16, 128);
  323|       |
  324|      0|      case Sphincs_Parameter_Set::Sphincs192Small:
  ------------------
  |  Branch (324:7): [True: 0, False: 32]
  ------------------
  325|      6|      case Sphincs_Parameter_Set::SLHDSA192Small:
  ------------------
  |  Branch (325:7): [True: 6, False: 26]
  ------------------
  326|      6|         return Sphincs_Parameters(set, hash, 24, 63, 7, 14, 17, 16, 193);
  327|      0|      case Sphincs_Parameter_Set::Sphincs192Fast:
  ------------------
  |  Branch (327:7): [True: 0, False: 32]
  ------------------
  328|      4|      case Sphincs_Parameter_Set::SLHDSA192Fast:
  ------------------
  |  Branch (328:7): [True: 4, False: 28]
  ------------------
  329|      4|         return Sphincs_Parameters(set, hash, 24, 66, 22, 8, 33, 16, 194);
  330|       |
  331|      0|      case Sphincs_Parameter_Set::Sphincs256Small:
  ------------------
  |  Branch (331:7): [True: 0, False: 32]
  ------------------
  332|      4|      case Sphincs_Parameter_Set::SLHDSA256Small:
  ------------------
  |  Branch (332:7): [True: 4, False: 28]
  ------------------
  333|      4|         return Sphincs_Parameters(set, hash, 32, 64, 8, 14, 22, 16, 255);
  334|      0|      case Sphincs_Parameter_Set::Sphincs256Fast:
  ------------------
  |  Branch (334:7): [True: 0, False: 32]
  ------------------
  335|      4|      case Sphincs_Parameter_Set::SLHDSA256Fast:
  ------------------
  |  Branch (335:7): [True: 4, False: 28]
  ------------------
  336|      4|         return Sphincs_Parameters(set, hash, 32, 68, 17, 9, 35, 16, 255);
  337|     32|   }
  338|      0|   BOTAN_ASSERT_UNREACHABLE();
  ------------------
  |  |  163|      0|#define BOTAN_ASSERT_UNREACHABLE() Botan::assert_unreachable(__FILE__, __LINE__)
  ------------------
  339|      0|}
_ZN5Botan18Sphincs_Parameters6createENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  341|     32|Sphincs_Parameters Sphincs_Parameters::create(std::string_view name) {
  342|     32|   auto [param_set, hash_type] = set_and_hash_from_name(name);
  343|     32|   return Sphincs_Parameters::create(param_set, hash_type);
  344|     32|}
_ZNK5Botan18Sphincs_Parameters9to_stringEv:
  362|     16|std::string Sphincs_Parameters::to_string() const {
  363|     16|   return name_from_set_and_hash(parameter_set(), hash_type());
  364|     16|}
_ZN5Botan18Sphincs_Parameters6createERKNS_3OIDE:
  366|     32|Sphincs_Parameters Sphincs_Parameters::create(const OID& oid) {
  367|     32|   if(const auto name = oid.registered_name()) {
  ------------------
  |  Branch (367:18): [True: 32, False: 0]
  ------------------
  368|     32|      return Sphincs_Parameters::create(*name);
  369|     32|   }
  370|       |
  371|      0|   throw Lookup_Error(fmt("No SLH-DSA (or SPHINCS+) parameter registered for OID {}", oid));
  372|     32|}
_ZNK5Botan18Sphincs_Parameters17object_identifierEv:
  374|     16|OID Sphincs_Parameters::object_identifier() const {
  375|     16|   return OID::from_string(to_string());
  376|     16|}
sp_parameters.cpp:_ZN5Botan12_GLOBAL__N_114is_slh_dsa_setENS_21Sphincs_Parameter_SetE:
  214|      4|constexpr bool is_slh_dsa_set(Sphincs_Parameter_Set set) {
  215|      4|   switch(set) {
  ------------------
  |  Branch (215:11): [True: 4, False: 0]
  ------------------
  216|      4|      case Sphincs_Parameter_Set::SLHDSA128Small:
  ------------------
  |  Branch (216:7): [True: 4, False: 0]
  ------------------
  217|      4|      case Sphincs_Parameter_Set::SLHDSA128Fast:
  ------------------
  |  Branch (217:7): [True: 0, False: 4]
  ------------------
  218|      4|      case Sphincs_Parameter_Set::SLHDSA192Small:
  ------------------
  |  Branch (218:7): [True: 0, False: 4]
  ------------------
  219|      4|      case Sphincs_Parameter_Set::SLHDSA192Fast:
  ------------------
  |  Branch (219:7): [True: 0, False: 4]
  ------------------
  220|      4|      case Sphincs_Parameter_Set::SLHDSA256Small:
  ------------------
  |  Branch (220:7): [True: 0, False: 4]
  ------------------
  221|      4|      case Sphincs_Parameter_Set::SLHDSA256Fast:
  ------------------
  |  Branch (221:7): [True: 0, False: 4]
  ------------------
  222|      4|         return true;
  223|      0|      case Sphincs_Parameter_Set::Sphincs128Small:
  ------------------
  |  Branch (223:7): [True: 0, False: 4]
  ------------------
  224|      0|      case Sphincs_Parameter_Set::Sphincs128Fast:
  ------------------
  |  Branch (224:7): [True: 0, False: 4]
  ------------------
  225|      0|      case Sphincs_Parameter_Set::Sphincs192Small:
  ------------------
  |  Branch (225:7): [True: 0, False: 4]
  ------------------
  226|      0|      case Sphincs_Parameter_Set::Sphincs192Fast:
  ------------------
  |  Branch (226:7): [True: 0, False: 4]
  ------------------
  227|      0|      case Sphincs_Parameter_Set::Sphincs256Small:
  ------------------
  |  Branch (227:7): [True: 0, False: 4]
  ------------------
  228|      0|      case Sphincs_Parameter_Set::Sphincs256Fast:
  ------------------
  |  Branch (228:7): [True: 0, False: 4]
  ------------------
  229|      0|         return false;
  230|      4|   }
  231|      0|   BOTAN_ASSERT_UNREACHABLE();
  ------------------
  |  |  163|      0|#define BOTAN_ASSERT_UNREACHABLE() Botan::assert_unreachable(__FILE__, __LINE__)
  ------------------
  232|      0|}
sp_parameters.cpp:_ZN5Botan12_GLOBAL__N_122set_and_hash_from_nameENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   20|     32|std::pair<Sphincs_Parameter_Set, Sphincs_Hash_Type> set_and_hash_from_name(std::string_view name) {
   21|       |   // SPHINCS+ Round 3.1 instances
   22|     32|   if(name == "SphincsPlus-sha2-128s-r3.1") {
  ------------------
  |  Branch (22:7): [True: 0, False: 32]
  ------------------
   23|      0|      return {Sphincs_Parameter_Set::Sphincs128Small, Sphincs_Hash_Type::Sha256};
   24|      0|   }
   25|     32|   if(name == "SphincsPlus-sha2-128f-r3.1") {
  ------------------
  |  Branch (25:7): [True: 0, False: 32]
  ------------------
   26|      0|      return {Sphincs_Parameter_Set::Sphincs128Fast, Sphincs_Hash_Type::Sha256};
   27|      0|   }
   28|     32|   if(name == "SphincsPlus-sha2-192s-r3.1") {
  ------------------
  |  Branch (28:7): [True: 0, False: 32]
  ------------------
   29|      0|      return {Sphincs_Parameter_Set::Sphincs192Small, Sphincs_Hash_Type::Sha256};
   30|      0|   }
   31|     32|   if(name == "SphincsPlus-sha2-192f-r3.1") {
  ------------------
  |  Branch (31:7): [True: 0, False: 32]
  ------------------
   32|      0|      return {Sphincs_Parameter_Set::Sphincs192Fast, Sphincs_Hash_Type::Sha256};
   33|      0|   }
   34|     32|   if(name == "SphincsPlus-sha2-256s-r3.1") {
  ------------------
  |  Branch (34:7): [True: 0, False: 32]
  ------------------
   35|      0|      return {Sphincs_Parameter_Set::Sphincs256Small, Sphincs_Hash_Type::Sha256};
   36|      0|   }
   37|     32|   if(name == "SphincsPlus-sha2-256f-r3.1") {
  ------------------
  |  Branch (37:7): [True: 0, False: 32]
  ------------------
   38|      0|      return {Sphincs_Parameter_Set::Sphincs256Fast, Sphincs_Hash_Type::Sha256};
   39|      0|   }
   40|       |
   41|     32|   if(name == "SphincsPlus-shake-128s-r3.1") {
  ------------------
  |  Branch (41:7): [True: 0, False: 32]
  ------------------
   42|      0|      return {Sphincs_Parameter_Set::Sphincs128Small, Sphincs_Hash_Type::Shake256};
   43|      0|   }
   44|     32|   if(name == "SphincsPlus-shake-128f-r3.1") {
  ------------------
  |  Branch (44:7): [True: 0, False: 32]
  ------------------
   45|      0|      return {Sphincs_Parameter_Set::Sphincs128Fast, Sphincs_Hash_Type::Shake256};
   46|      0|   }
   47|     32|   if(name == "SphincsPlus-shake-192s-r3.1") {
  ------------------
  |  Branch (47:7): [True: 0, False: 32]
  ------------------
   48|      0|      return {Sphincs_Parameter_Set::Sphincs192Small, Sphincs_Hash_Type::Shake256};
   49|      0|   }
   50|     32|   if(name == "SphincsPlus-shake-192f-r3.1") {
  ------------------
  |  Branch (50:7): [True: 0, False: 32]
  ------------------
   51|      0|      return {Sphincs_Parameter_Set::Sphincs192Fast, Sphincs_Hash_Type::Shake256};
   52|      0|   }
   53|     32|   if(name == "SphincsPlus-shake-256s-r3.1") {
  ------------------
  |  Branch (53:7): [True: 0, False: 32]
  ------------------
   54|      0|      return {Sphincs_Parameter_Set::Sphincs256Small, Sphincs_Hash_Type::Shake256};
   55|      0|   }
   56|     32|   if(name == "SphincsPlus-shake-256f-r3.1") {
  ------------------
  |  Branch (56:7): [True: 0, False: 32]
  ------------------
   57|      0|      return {Sphincs_Parameter_Set::Sphincs256Fast, Sphincs_Hash_Type::Shake256};
   58|      0|   }
   59|       |
   60|     32|   if(name == "SphincsPlus-haraka-128s-r3.1") {
  ------------------
  |  Branch (60:7): [True: 0, False: 32]
  ------------------
   61|      0|      return {Sphincs_Parameter_Set::Sphincs128Small, Sphincs_Hash_Type::Haraka};
   62|      0|   }
   63|     32|   if(name == "SphincsPlus-haraka-128f-r3.1") {
  ------------------
  |  Branch (63:7): [True: 0, False: 32]
  ------------------
   64|      0|      return {Sphincs_Parameter_Set::Sphincs128Fast, Sphincs_Hash_Type::Haraka};
   65|      0|   }
   66|     32|   if(name == "SphincsPlus-haraka-192s-r3.1") {
  ------------------
  |  Branch (66:7): [True: 0, False: 32]
  ------------------
   67|      0|      return {Sphincs_Parameter_Set::Sphincs192Small, Sphincs_Hash_Type::Haraka};
   68|      0|   }
   69|     32|   if(name == "SphincsPlus-haraka-192f-r3.1") {
  ------------------
  |  Branch (69:7): [True: 0, False: 32]
  ------------------
   70|      0|      return {Sphincs_Parameter_Set::Sphincs192Fast, Sphincs_Hash_Type::Haraka};
   71|      0|   }
   72|     32|   if(name == "SphincsPlus-haraka-256s-r3.1") {
  ------------------
  |  Branch (72:7): [True: 0, False: 32]
  ------------------
   73|      0|      return {Sphincs_Parameter_Set::Sphincs256Small, Sphincs_Hash_Type::Haraka};
   74|      0|   }
   75|     32|   if(name == "SphincsPlus-haraka-256f-r3.1") {
  ------------------
  |  Branch (75:7): [True: 0, False: 32]
  ------------------
   76|      0|      return {Sphincs_Parameter_Set::Sphincs256Fast, Sphincs_Hash_Type::Haraka};
   77|      0|   }
   78|       |
   79|       |   // SLH-DSA instances WITHOUT prehash mode
   80|     32|   if(name == "SLH-DSA-SHA2-128s") {
  ------------------
  |  Branch (80:7): [True: 4, False: 28]
  ------------------
   81|      4|      return {Sphincs_Parameter_Set::SLHDSA128Small, Sphincs_Hash_Type::Sha256};
   82|      4|   }
   83|     28|   if(name == "SLH-DSA-SHA2-128f") {
  ------------------
  |  Branch (83:7): [True: 4, False: 24]
  ------------------
   84|      4|      return {Sphincs_Parameter_Set::SLHDSA128Fast, Sphincs_Hash_Type::Sha256};
   85|      4|   }
   86|     24|   if(name == "SLH-DSA-SHA2-192s") {
  ------------------
  |  Branch (86:7): [True: 4, False: 20]
  ------------------
   87|      4|      return {Sphincs_Parameter_Set::SLHDSA192Small, Sphincs_Hash_Type::Sha256};
   88|      4|   }
   89|     20|   if(name == "SLH-DSA-SHA2-192f") {
  ------------------
  |  Branch (89:7): [True: 2, False: 18]
  ------------------
   90|      2|      return {Sphincs_Parameter_Set::SLHDSA192Fast, Sphincs_Hash_Type::Sha256};
   91|      2|   }
   92|     18|   if(name == "SLH-DSA-SHA2-256s") {
  ------------------
  |  Branch (92:7): [True: 2, False: 16]
  ------------------
   93|      2|      return {Sphincs_Parameter_Set::SLHDSA256Small, Sphincs_Hash_Type::Sha256};
   94|      2|   }
   95|     16|   if(name == "SLH-DSA-SHA2-256f") {
  ------------------
  |  Branch (95:7): [True: 2, False: 14]
  ------------------
   96|      2|      return {Sphincs_Parameter_Set::SLHDSA256Fast, Sphincs_Hash_Type::Sha256};
   97|      2|   }
   98|       |
   99|     14|   if(name == "SLH-DSA-SHAKE-128s") {
  ------------------
  |  Branch (99:7): [True: 4, False: 10]
  ------------------
  100|      4|      return {Sphincs_Parameter_Set::SLHDSA128Small, Sphincs_Hash_Type::Shake256};
  101|      4|   }
  102|     10|   if(name == "SLH-DSA-SHAKE-128f") {
  ------------------
  |  Branch (102:7): [True: 2, False: 8]
  ------------------
  103|      2|      return {Sphincs_Parameter_Set::SLHDSA128Fast, Sphincs_Hash_Type::Shake256};
  104|      2|   }
  105|      8|   if(name == "SLH-DSA-SHAKE-192s") {
  ------------------
  |  Branch (105:7): [True: 2, False: 6]
  ------------------
  106|      2|      return {Sphincs_Parameter_Set::SLHDSA192Small, Sphincs_Hash_Type::Shake256};
  107|      2|   }
  108|      6|   if(name == "SLH-DSA-SHAKE-192f") {
  ------------------
  |  Branch (108:7): [True: 2, False: 4]
  ------------------
  109|      2|      return {Sphincs_Parameter_Set::SLHDSA192Fast, Sphincs_Hash_Type::Shake256};
  110|      2|   }
  111|      4|   if(name == "SLH-DSA-SHAKE-256s") {
  ------------------
  |  Branch (111:7): [True: 2, False: 2]
  ------------------
  112|      2|      return {Sphincs_Parameter_Set::SLHDSA256Small, Sphincs_Hash_Type::Shake256};
  113|      2|   }
  114|      2|   if(name == "SLH-DSA-SHAKE-256f") {
  ------------------
  |  Branch (114:7): [True: 2, False: 0]
  ------------------
  115|      2|      return {Sphincs_Parameter_Set::SLHDSA256Fast, Sphincs_Hash_Type::Shake256};
  116|      2|   }
  117|       |
  118|       |   // The pre-hash variants (HashSLH-DSA) are not currently implemented
  119|      0|   if(name.starts_with("Hash-SLH-DSA-")) {
  ------------------
  |  Branch (119:7): [True: 0, False: 0]
  ------------------
  120|      0|      throw Not_Implemented(fmt("Pre-hash SLH-DSA ({}) is not supported", name));
  121|      0|   }
  122|       |
  123|      0|   throw Lookup_Error(fmt("No SLH-DSA (or SPHINCS+) parameter supported for: {}", name));
  124|      0|}
sp_parameters.cpp:_ZN5Botan12_GLOBAL__N_122name_from_set_and_hashENS_21Sphincs_Parameter_SetENS_17Sphincs_Hash_TypeE:
  126|     16|std::string name_from_set_and_hash(Sphincs_Parameter_Set set, Sphincs_Hash_Type hash) {
  127|     16|   if(hash == Sphincs_Hash_Type::Sha256) {
  ------------------
  |  Branch (127:7): [True: 9, False: 7]
  ------------------
  128|      9|      switch(set) {
  ------------------
  |  Branch (128:14): [True: 9, False: 0]
  ------------------
  129|      0|         case Sphincs_Parameter_Set::Sphincs128Small:
  ------------------
  |  Branch (129:10): [True: 0, False: 9]
  ------------------
  130|      0|            return "SphincsPlus-sha2-128s-r3.1";
  131|      0|         case Sphincs_Parameter_Set::Sphincs128Fast:
  ------------------
  |  Branch (131:10): [True: 0, False: 9]
  ------------------
  132|      0|            return "SphincsPlus-sha2-128f-r3.1";
  133|      0|         case Sphincs_Parameter_Set::Sphincs192Small:
  ------------------
  |  Branch (133:10): [True: 0, False: 9]
  ------------------
  134|      0|            return "SphincsPlus-sha2-192s-r3.1";
  135|      0|         case Sphincs_Parameter_Set::Sphincs192Fast:
  ------------------
  |  Branch (135:10): [True: 0, False: 9]
  ------------------
  136|      0|            return "SphincsPlus-sha2-192f-r3.1";
  137|      0|         case Sphincs_Parameter_Set::Sphincs256Small:
  ------------------
  |  Branch (137:10): [True: 0, False: 9]
  ------------------
  138|      0|            return "SphincsPlus-sha2-256s-r3.1";
  139|      0|         case Sphincs_Parameter_Set::Sphincs256Fast:
  ------------------
  |  Branch (139:10): [True: 0, False: 9]
  ------------------
  140|      0|            return "SphincsPlus-sha2-256f-r3.1";
  141|       |
  142|      2|         case Sphincs_Parameter_Set::SLHDSA128Small:
  ------------------
  |  Branch (142:10): [True: 2, False: 7]
  ------------------
  143|      2|            return "SLH-DSA-SHA2-128s";
  144|      2|         case Sphincs_Parameter_Set::SLHDSA128Fast:
  ------------------
  |  Branch (144:10): [True: 2, False: 7]
  ------------------
  145|      2|            return "SLH-DSA-SHA2-128f";
  146|      2|         case Sphincs_Parameter_Set::SLHDSA192Small:
  ------------------
  |  Branch (146:10): [True: 2, False: 7]
  ------------------
  147|      2|            return "SLH-DSA-SHA2-192s";
  148|      1|         case Sphincs_Parameter_Set::SLHDSA192Fast:
  ------------------
  |  Branch (148:10): [True: 1, False: 8]
  ------------------
  149|      1|            return "SLH-DSA-SHA2-192f";
  150|      1|         case Sphincs_Parameter_Set::SLHDSA256Small:
  ------------------
  |  Branch (150:10): [True: 1, False: 8]
  ------------------
  151|      1|            return "SLH-DSA-SHA2-256s";
  152|      1|         case Sphincs_Parameter_Set::SLHDSA256Fast:
  ------------------
  |  Branch (152:10): [True: 1, False: 8]
  ------------------
  153|      1|            return "SLH-DSA-SHA2-256f";
  154|      9|      }
  155|      9|   }
  156|       |
  157|      7|   if(hash == Sphincs_Hash_Type::Shake256) {
  ------------------
  |  Branch (157:7): [True: 7, False: 0]
  ------------------
  158|      7|      switch(set) {
  ------------------
  |  Branch (158:14): [True: 7, False: 0]
  ------------------
  159|      0|         case Sphincs_Parameter_Set::Sphincs128Small:
  ------------------
  |  Branch (159:10): [True: 0, False: 7]
  ------------------
  160|      0|            return "SphincsPlus-shake-128s-r3.1";
  161|      0|         case Sphincs_Parameter_Set::Sphincs128Fast:
  ------------------
  |  Branch (161:10): [True: 0, False: 7]
  ------------------
  162|      0|            return "SphincsPlus-shake-128f-r3.1";
  163|      0|         case Sphincs_Parameter_Set::Sphincs192Small:
  ------------------
  |  Branch (163:10): [True: 0, False: 7]
  ------------------
  164|      0|            return "SphincsPlus-shake-192s-r3.1";
  165|      0|         case Sphincs_Parameter_Set::Sphincs192Fast:
  ------------------
  |  Branch (165:10): [True: 0, False: 7]
  ------------------
  166|      0|            return "SphincsPlus-shake-192f-r3.1";
  167|      0|         case Sphincs_Parameter_Set::Sphincs256Small:
  ------------------
  |  Branch (167:10): [True: 0, False: 7]
  ------------------
  168|      0|            return "SphincsPlus-shake-256s-r3.1";
  169|      0|         case Sphincs_Parameter_Set::Sphincs256Fast:
  ------------------
  |  Branch (169:10): [True: 0, False: 7]
  ------------------
  170|      0|            return "SphincsPlus-shake-256f-r3.1";
  171|       |
  172|      2|         case Sphincs_Parameter_Set::SLHDSA128Small:
  ------------------
  |  Branch (172:10): [True: 2, False: 5]
  ------------------
  173|      2|            return "SLH-DSA-SHAKE-128s";
  174|      1|         case Sphincs_Parameter_Set::SLHDSA128Fast:
  ------------------
  |  Branch (174:10): [True: 1, False: 6]
  ------------------
  175|      1|            return "SLH-DSA-SHAKE-128f";
  176|      1|         case Sphincs_Parameter_Set::SLHDSA192Small:
  ------------------
  |  Branch (176:10): [True: 1, False: 6]
  ------------------
  177|      1|            return "SLH-DSA-SHAKE-192s";
  178|      1|         case Sphincs_Parameter_Set::SLHDSA192Fast:
  ------------------
  |  Branch (178:10): [True: 1, False: 6]
  ------------------
  179|      1|            return "SLH-DSA-SHAKE-192f";
  180|      1|         case Sphincs_Parameter_Set::SLHDSA256Small:
  ------------------
  |  Branch (180:10): [True: 1, False: 6]
  ------------------
  181|      1|            return "SLH-DSA-SHAKE-256s";
  182|      1|         case Sphincs_Parameter_Set::SLHDSA256Fast:
  ------------------
  |  Branch (182:10): [True: 1, False: 6]
  ------------------
  183|      1|            return "SLH-DSA-SHAKE-256f";
  184|      7|      }
  185|      7|   }
  186|       |
  187|      0|   if(hash == Sphincs_Hash_Type::Haraka) {
  ------------------
  |  Branch (187:7): [True: 0, False: 0]
  ------------------
  188|      0|      switch(set) {
  ------------------
  |  Branch (188:14): [True: 0, False: 0]
  ------------------
  189|      0|         case Sphincs_Parameter_Set::Sphincs128Small:
  ------------------
  |  Branch (189:10): [True: 0, False: 0]
  ------------------
  190|      0|            return "SphincsPlus-haraka-128s-r3.1";
  191|      0|         case Sphincs_Parameter_Set::Sphincs128Fast:
  ------------------
  |  Branch (191:10): [True: 0, False: 0]
  ------------------
  192|      0|            return "SphincsPlus-haraka-128f-r3.1";
  193|      0|         case Sphincs_Parameter_Set::Sphincs192Small:
  ------------------
  |  Branch (193:10): [True: 0, False: 0]
  ------------------
  194|      0|            return "SphincsPlus-haraka-192s-r3.1";
  195|      0|         case Sphincs_Parameter_Set::Sphincs192Fast:
  ------------------
  |  Branch (195:10): [True: 0, False: 0]
  ------------------
  196|      0|            return "SphincsPlus-haraka-192f-r3.1";
  197|      0|         case Sphincs_Parameter_Set::Sphincs256Small:
  ------------------
  |  Branch (197:10): [True: 0, False: 0]
  ------------------
  198|      0|            return "SphincsPlus-haraka-256s-r3.1";
  199|      0|         case Sphincs_Parameter_Set::Sphincs256Fast:
  ------------------
  |  Branch (199:10): [True: 0, False: 0]
  ------------------
  200|      0|            return "SphincsPlus-haraka-256f-r3.1";
  201|       |
  202|      0|         case Sphincs_Parameter_Set::SLHDSA128Small:
  ------------------
  |  Branch (202:10): [True: 0, False: 0]
  ------------------
  203|      0|         case Sphincs_Parameter_Set::SLHDSA128Fast:
  ------------------
  |  Branch (203:10): [True: 0, False: 0]
  ------------------
  204|      0|         case Sphincs_Parameter_Set::SLHDSA192Small:
  ------------------
  |  Branch (204:10): [True: 0, False: 0]
  ------------------
  205|      0|         case Sphincs_Parameter_Set::SLHDSA192Fast:
  ------------------
  |  Branch (205:10): [True: 0, False: 0]
  ------------------
  206|      0|         case Sphincs_Parameter_Set::SLHDSA256Small:
  ------------------
  |  Branch (206:10): [True: 0, False: 0]
  ------------------
  207|      0|         case Sphincs_Parameter_Set::SLHDSA256Fast:
  ------------------
  |  Branch (207:10): [True: 0, False: 0]
  ------------------
  208|      0|            throw Invalid_Argument("SLH-DSA does not support Haraka");
  209|      0|      }
  210|      0|   }
  211|      0|   throw Invalid_Argument("Cannot serialize invalid parameter combination");
  212|      0|}

_ZN5Botan21SphincsPlus_PublicKeyC2ENSt3__14spanIKhLm18446744073709551615EEENS_18Sphincs_ParametersE:
  133|      2|      m_public(std::make_shared<SphincsPlus_PublicKeyInternal>(params, pub_key)) {
  134|      2|   if(!params.is_available()) {
  ------------------
  |  Branch (134:7): [True: 0, False: 2]
  ------------------
  135|      0|      throw Not_Implemented("This SPHINCS+ parameter set is not available in this configuration");
  136|      0|   }
  137|      2|}
_ZN5Botan21SphincsPlus_PublicKeyD2Ev:
  147|      2|SphincsPlus_PublicKey::~SphincsPlus_PublicKey() = default;
_ZN5Botan22SphincsPlus_PrivateKeyC1ERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEE:
  304|     16|      SphincsPlus_PrivateKey(key_bits, Sphincs_Parameters::create(alg_id.oid())) {
  305|       |   // The parameter set is identified by the OID; no parameters are defined.
  306|     16|   if(!alg_id.parameters_are_empty()) {
  ------------------
  |  Branch (306:7): [True: 1, False: 15]
  ------------------
  307|      1|      throw Decoding_Error("Unexpected parameters for SLH-DSA/SPHINCS+ private key");
  308|      1|   }
  309|     16|}
_ZN5Botan22SphincsPlus_PrivateKeyC1ENSt3__14spanIKhLm18446744073709551615EEENS_18Sphincs_ParametersE:
  312|     16|      SphincsPlus_PublicKey(slice_off_public_key(params.object_identifier(), private_key), params) {
  313|     16|   if(!params.is_available()) {
  ------------------
  |  Branch (313:7): [True: 0, False: 16]
  ------------------
  314|      0|      throw Not_Implemented("This SPHINCS+ parameter set is not available in this configuration");
  315|      0|   }
  316|       |
  317|     16|   const auto private_portion_bytes = params.private_key_bytes() - params.public_key_bytes();
  318|     16|   BOTAN_ASSERT_NOMSG(private_key.size() >= private_portion_bytes);
  ------------------
  |  |   77|     16|   do {                                                                     \
  |  |   78|     16|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|     16|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 16]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|     16|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 16]
  |  |  ------------------
  ------------------
  319|       |
  320|     16|   m_private = std::make_shared<SphincsPlus_PrivateKeyInternal>(params, private_key.first(private_portion_bytes));
  321|     16|}
_ZN5Botan22SphincsPlus_PrivateKeyD2Ev:
  345|      2|SphincsPlus_PrivateKey::~SphincsPlus_PrivateKey() = default;
sphincsplus.cpp:_ZN5Botan12_GLOBAL__N_120slice_off_public_keyERKNS_3OIDENSt3__14spanIKhLm18446744073709551615EEE:
  282|     16|std::span<const uint8_t> slice_off_public_key(const OID& oid, std::span<const uint8_t> key_bits) {
  283|     16|   const auto params = Sphincs_Parameters::create(oid);
  284|       |   // Note: We need to transiently instantiate the `Sphincs_Parameters` object
  285|       |   //       to know the size of the public/private key. That's slightly
  286|       |   //       inefficient but was the best we could do. Once we get rid of the
  287|       |   //       PublicKey-PrivateKey inheritance, we might want to reconsider this
  288|       |   //       control flow.
  289|     16|   if(key_bits.size() != params.private_key_bytes()) {
  ------------------
  |  Branch (289:7): [True: 14, False: 2]
  ------------------
  290|     14|      throw Decoding_Error("Sphincs Private Key doesn't have the expected length");
  291|     14|   }
  292|       |
  293|      2|   return key_bits.subspan(params.private_key_bytes() - params.public_key_bytes());
  294|     16|}
_ZN5Botan29SphincsPlus_PublicKeyInternalC2ENS_18Sphincs_ParametersENSt3__14spanIKhLm18446744073709551615EEE:
   73|      2|      SphincsPlus_PublicKeyInternal(Sphincs_Parameters params, std::span<const uint8_t> key_bits) : m_params(params) {
   74|      2|         if(key_bits.size() != m_params.public_key_bytes()) {
  ------------------
  |  Branch (74:13): [True: 0, False: 2]
  ------------------
   75|      0|            throw Decoding_Error("SLH-DSA (or SPHINCS+) Public Key doesn't have the expected length");
   76|      0|         }
   77|       |
   78|      2|         BufferSlicer s(key_bits);
   79|      2|         m_public_seed = s.copy<SphincsPublicSeed>(params.n());
   80|      2|         m_sphincs_root = s.copy<SphincsTreeNode>(params.n());
   81|       |
   82|      2|         BOTAN_ASSERT_NOMSG(s.empty());
  ------------------
  |  |   77|      2|   do {                                                                     \
  |  |   78|      2|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|      2|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 2]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|      2|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
   83|      2|      }
_ZN5Botan30SphincsPlus_PrivateKeyInternalC2ERKNS_18Sphincs_ParametersENSt3__14spanIKhLm18446744073709551615EEE:
  104|      2|      SphincsPlus_PrivateKeyInternal(const Sphincs_Parameters& params, std::span<const uint8_t> key_bits) {
  105|      2|         if(key_bits.size() != params.private_key_bytes() - params.public_key_bytes()) {
  ------------------
  |  Branch (105:13): [True: 0, False: 2]
  ------------------
  106|      0|            throw Decoding_Error("SLH-DSA (or SPHINCS+) Private Key doesn't have the expected length");
  107|      0|         }
  108|       |
  109|      2|         BufferSlicer s(key_bits);
  110|      2|         m_secret_seed = s.copy<SphincsSecretSeed>(params.n());
  111|      2|         m_prf = s.copy<SphincsSecretPRF>(params.n());
  112|       |
  113|      2|         BOTAN_ASSERT_NOMSG(s.empty());
  ------------------
  |  |   77|      2|   do {                                                                     \
  |  |   78|      2|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|      2|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 2]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|      2|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  114|      2|      }

_ZN5Botan14if_work_factorEm:
   37|    105|size_t if_work_factor(size_t bits) {
   38|    105|   if(bits < 512) {
  ------------------
  |  Branch (38:7): [True: 11, False: 94]
  ------------------
   39|     11|      return 0;
   40|     11|   }
   41|       |
   42|       |   // RFC 3766 estimates k at .02 and o(1) to be effectively zero for sizes of interest
   43|       |
   44|     94|   const double log2_k = -5.6438;  // log2(.02)
   45|     94|   return nfs_workfactor(bits, log2_k);
   46|    105|}
_ZN5Botan14dl_work_factorEm:
   48|    105|size_t dl_work_factor(size_t bits) {
   49|       |   // Lacking better estimates...
   50|    105|   return if_work_factor(bits);
   51|    105|}
_ZN5Botan16dl_exponent_sizeEm:
   53|    105|size_t dl_exponent_size(size_t p_bits) {
   54|    105|   BOTAN_ARG_CHECK(p_bits > 1, "Invalid prime length");
  ------------------
  |  |   35|    105|   do {                                                          \
  |  |   36|    105|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|    105|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 105]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|    105|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 105]
  |  |  ------------------
  ------------------
   55|       |
   56|       |   /*
   57|       |   For relevant sizes we follow the suggestions in
   58|       |   NIST SP 800-56B Rev 2 Appendix D
   59|       |   "Maximum Security Strength Estimates for IFC Modulus Lengths"
   60|       |
   61|       |   For sizes outside the range considered in the SP we use some sensible values
   62|       |
   63|       |   Note that we return twice the value given in Table 4 since we are choosing
   64|       |   the exponent size as twice the estimated security strength.
   65|       |
   66|       |   See also NIST SP 800-56A Rev 3 Appendix D, Tables 25 and 26
   67|       |   */
   68|       |
   69|    105|   if(p_bits <= 256) {
  ------------------
  |  Branch (69:7): [True: 10, False: 95]
  ------------------
   70|       |      /*
   71|       |      * For stupidly small groups we might return a value larger than the group
   72|       |      * size if we fell into the conditionals below. Just use the maximum
   73|       |      * possible exponent size - for all the good it will do you with a group
   74|       |      * this weak.
   75|       |      */
   76|     10|      return p_bits - 1;
   77|     95|   } else if(p_bits <= 1024) {
  ------------------
  |  Branch (77:14): [True: 95, False: 0]
  ------------------
   78|       |      /*
   79|       |      Not in the SP, but general estimates are that a 1024 bit group provides at
   80|       |      most 80 bits security, so using an exponent appropriate for 96 bit security
   81|       |      is more than sufficient.
   82|       |      */
   83|     95|      return 192;
   84|     95|   } else if(p_bits <= 2048) {
  ------------------
  |  Branch (84:14): [True: 0, False: 0]
  ------------------
   85|      0|      return 224;  // SP 800-56B
   86|      0|   } else if(p_bits <= 3072) {
  ------------------
  |  Branch (86:14): [True: 0, False: 0]
  ------------------
   87|      0|      return 256;  // SP 800-56B
   88|      0|   } else if(p_bits <= 4096) {
  ------------------
  |  Branch (88:14): [True: 0, False: 0]
  ------------------
   89|      0|      return 304;  // SP 800-56B
   90|      0|   } else if(p_bits <= 6144) {
  ------------------
  |  Branch (90:14): [True: 0, False: 0]
  ------------------
   91|      0|      return 352;  // SP 800-56B
   92|      0|   } else if(p_bits <= 8192) {
  ------------------
  |  Branch (92:14): [True: 0, False: 0]
  ------------------
   93|      0|      return 400;  // SP 800-56B
   94|      0|   } else {
   95|       |      // For values larger than we know about, just saturate to 256 bit security
   96|       |      // which is Good Enough for FFDH
   97|       |      //
   98|       |      // NIST puts 15360 bit groups at exactly 256 bits security
   99|      0|      return 512;
  100|      0|   }
  101|    105|}
workfactor.cpp:_ZN5Botan12_GLOBAL__N_114nfs_workfactorEmd:
   22|     94|size_t nfs_workfactor(size_t bits, double log2_k) {
   23|       |   // approximates natural logarithm of an integer of given bitsize
   24|     94|   const double log_p = static_cast<double>(bits) / std::numbers::log2e;
   25|       |
   26|     94|   const double log_log_p = std::log(log_p);
   27|       |
   28|       |   // RFC 3766: k * e^((1.92 + o(1)) * cubrt(ln(n) * (ln(ln(n)))^2))
   29|     94|   const double est = 1.92 * std::pow(log_p * log_log_p * log_log_p, 1.0 / 3.0);
   30|       |
   31|       |   // return log2 of the workfactor
   32|     94|   return static_cast<size_t>(log2_k + std::numbers::log2e * est);
   33|     94|}

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

_ZN5Botan20curve25519_basepointEPhPKh:
   47|      1|void curve25519_basepoint(uint8_t mypublic[32], const uint8_t secret[32]) {
   48|      1|   const uint8_t basepoint[32] = {9};
   49|      1|   curve25519_donna(mypublic, secret, basepoint);
   50|      1|}
_ZN5Botan17X25519_PrivateKeyC1ERKNS_19AlgorithmIdentifierENSt3__14spanIKhLm18446744073709551615EEE:
  125|      9|X25519_PrivateKey::X25519_PrivateKey(const AlgorithmIdentifier& alg_id, std::span<const uint8_t> key_bits) {
  126|       |   // RFC 8410 Section 3: "the parameters MUST be absent".
  127|      9|   if(!alg_id.parameters_are_empty()) {
  ------------------
  |  Branch (127:7): [True: 1, False: 8]
  ------------------
  128|      1|      throw Decoding_Error("Unexpected parameters for X25519 private key");
  129|      1|   }
  130|       |
  131|      8|   secure_vector<uint8_t> secret_key;
  132|      8|   BER_Decoder(key_bits, BER_Decoder::Limits::DER()).decode(secret_key, ASN1_Type::OctetString).discard_remaining();
  133|       |
  134|      8|   size_check(secret_key.size(), "private key");
  135|      8|   load_x25519_keypair(std::move(secret_key), m_public, m_private);
  136|      8|}
x25519.cpp:_ZN5Botan12_GLOBAL__N_110size_checkEmPKc:
   54|      7|void size_check(size_t size, const char* thing) {
   55|      7|   if(size != 32) {
  ------------------
  |  Branch (55:7): [True: 6, False: 1]
  ------------------
   56|      6|      throw Decoding_Error(fmt("Invalid size {} for X25519 {}", size, thing));
   57|      6|   }
   58|      7|}
x25519.cpp:_ZN5Botan12_GLOBAL__N_119load_x25519_keypairENSt3__16vectorIhNS_16secure_allocatorIhEEEERNS1_10shared_ptrIKNS_21X25519_PublicKey_DataEEERNS6_IKNS_22X25519_PrivateKey_DataEEE:
   70|      1|                         std::shared_ptr<const X25519_PrivateKey_Data>& sk_out) {
   71|      1|   BOTAN_ASSERT_NOMSG(secret.size() == 32);
  ------------------
  |  |   77|      1|   do {                                                                     \
  |  |   78|      1|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|      1|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 1]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|      1|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 1]
  |  |  ------------------
  ------------------
   72|      1|   std::vector<uint8_t> pub(32);
   73|      1|   curve25519_basepoint(pub.data(), secret.data());
   74|      1|   pk_out = std::make_shared<const X25519_PublicKey_Data>(std::move(pub));
   75|      1|   sk_out = std::make_shared<const X25519_PrivateKey_Data>(std::move(secret));
   76|      1|}
_ZN5Botan22X25519_PrivateKey_DataC2ENSt3__16vectorIhNS_16secure_allocatorIhEEEE:
   31|      1|      explicit X25519_PrivateKey_Data(secure_vector<uint8_t> key) : m_key(std::move(key)) {}
_ZN5Botan21X25519_PublicKey_DataC2ENSt3__16vectorIhNS1_9allocatorIhEEEE:
   21|      1|      explicit X25519_PublicKey_Data(std::vector<uint8_t> key) : m_key(std::move(key)) {}

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

_ZN5Botan21is_ascii_control_charEc:
  198|     34|bool is_ascii_control_char(char c) {
  199|     34|   const uint8_t b = static_cast<uint8_t>(c);
  200|     34|   return b < 0x20 || b == 0x7F;
  ------------------
  |  Branch (200:11): [True: 15, False: 19]
  |  Branch (200:23): [True: 1, False: 18]
  ------------------
  201|     34|}
_ZN5Botan23format_char_for_displayEc:
  243|     34|std::string format_char_for_display(char c) {
  244|     34|   std::string out;
  245|     34|   out += '\'';
  246|       |
  247|     34|   if(c == '\t') {
  ------------------
  |  Branch (247:7): [True: 0, False: 34]
  ------------------
  248|      0|      out += "\\t";
  249|     34|   } else if(c == '\n') {
  ------------------
  |  Branch (249:14): [True: 0, False: 34]
  ------------------
  250|      0|      out += "\\n";
  251|     34|   } else if(c == '\r') {
  ------------------
  |  Branch (251:14): [True: 0, False: 34]
  ------------------
  252|      0|      out += "\\r";
  253|     34|   } else if(is_ascii_control_char(c) || static_cast<uint8_t>(c) >= 0x80) {
  ------------------
  |  Branch (253:14): [True: 16, False: 18]
  |  Branch (253:42): [True: 16, False: 2]
  ------------------
  254|     32|      const auto b = static_cast<uint8_t>(c);
  255|     32|      out += "\\x";
  256|     32|      out += nibble_to_hex(b >> 4);
  257|     32|      out += nibble_to_hex(b);
  258|     32|   } else {
  259|      2|      out += c;
  260|      2|   }
  261|       |
  262|     34|   out += '\'';
  263|       |
  264|     34|   return out;
  265|     34|}

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

_ZN5Botan9ExceptionC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   71|  5.42k|Exception::Exception(std::string_view msg) : m_msg(msg) {}
_ZN5Botan9ExceptionC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEERKSt9exception:
   73|  1.13k|Exception::Exception(std::string_view msg, const std::exception& e) : m_msg(fmt("{} failed with {}", msg, e.what())) {}
_ZN5Botan16Invalid_ArgumentC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   77|     66|Invalid_Argument::Invalid_Argument(std::string_view msg) : Exception(msg) {}
_ZN5Botan14Decoding_ErrorC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  125|  3.58k|Decoding_Error::Decoding_Error(std::string_view name) : Exception(name) {}
_ZN5Botan14Decoding_ErrorC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
  128|  1.78k|      Exception(fmt("{}: {}", category, err)) {}
_ZN5Botan14Decoding_ErrorC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEERKSt9exception:
  130|  1.13k|Decoding_Error::Decoding_Error(std::string_view msg, const std::exception& e) : Exception(msg, e) {}

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

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

_ZN5Botan9parse_u32ENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEEb:
   64|     56|std::optional<uint32_t> parse_u32(std::string_view input, bool require_canonical) {
   65|     56|   return parse_decimal_integer<uint32_t>(input, require_canonical);
   66|     56|}
_ZN5Botan9to_u32bitENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
   76|     56|uint32_t to_u32bit(std::string_view input) {
   77|     56|   if(const auto parsed = parse_u32(input)) {
  ------------------
  |  Branch (77:18): [True: 56, False: 0]
  ------------------
   78|     56|      return *parsed;
   79|     56|   } else {
   80|      0|      throw Invalid_Argument(fmt("Failed to parse input '{}' as a 32-bit integer", input));
   81|      0|   }
   82|     56|}
_ZN5Botan8split_onENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEEc:
  141|  4.35k|std::vector<std::string> split_on(std::string_view str, char delim) {
  142|  4.35k|   std::vector<std::string> elems;
  143|  4.35k|   if(str.empty()) {
  ------------------
  |  Branch (143:7): [True: 0, False: 4.35k]
  ------------------
  144|      0|      return elems;
  145|      0|   }
  146|       |
  147|  4.35k|   std::string substr;
  148|  24.4k|   for(const char c : str) {
  ------------------
  |  Branch (148:21): [True: 24.4k, False: 4.35k]
  ------------------
  149|  24.4k|      if(c == delim) {
  ------------------
  |  Branch (149:10): [True: 267, False: 24.1k]
  ------------------
  150|    267|         if(!substr.empty()) {
  ------------------
  |  Branch (150:13): [True: 267, False: 0]
  ------------------
  151|    267|            elems.push_back(substr);
  152|    267|         }
  153|    267|         substr.clear();
  154|  24.1k|      } else {
  155|  24.1k|         substr += c;
  156|  24.1k|      }
  157|  24.4k|   }
  158|       |
  159|  4.35k|   if(substr.empty()) {
  ------------------
  |  Branch (159:7): [True: 0, False: 4.35k]
  ------------------
  160|      0|      throw Invalid_Argument(fmt("Unable to split string '{}", str));
  161|      0|   }
  162|  4.35k|   elems.push_back(substr);
  163|       |
  164|  4.35k|   return elems;
  165|  4.35k|}
parsing.cpp:_ZN5Botan12_GLOBAL__N_116digit_from_asciiEc:
   23|    168|std::optional<size_t> digit_from_ascii(char c) {
   24|    168|   if(c >= '0' && c <= '9') {
  ------------------
  |  Branch (24:7): [True: 168, False: 0]
  |  Branch (24:19): [True: 168, False: 0]
  ------------------
   25|    168|      return c - '0';
   26|    168|   } else {
   27|      0|      return {};
   28|      0|   }
   29|    168|}
parsing.cpp:_ZN5Botan12_GLOBAL__N_121parse_decimal_integerITkNSt3__117unsigned_integralEjEENS2_8optionalIT_EENS2_17basic_string_viewIcNS2_11char_traitsIcEEEEb:
   32|     56|std::optional<T> parse_decimal_integer(std::string_view input, bool require_canonical) {
   33|     56|   if(input.empty() || input.size() > (std::numeric_limits<T>::digits10 + 1)) {
  ------------------
  |  Branch (33:7): [True: 0, False: 56]
  |  Branch (33:24): [True: 0, False: 56]
  ------------------
   34|      0|      return {};
   35|      0|   }
   36|       |
   37|       |   // The canonical encoding of zero is "0"; no other value starts with a zero
   38|     56|   if(require_canonical && input.size() > 1 && input.front() == '0') {
  ------------------
  |  Branch (38:7): [True: 0, False: 56]
  |  Branch (38:28): [True: 0, False: 0]
  |  Branch (38:48): [True: 0, False: 0]
  ------------------
   39|      0|      return {};
   40|      0|   }
   41|       |
   42|     56|   T accum = 0;
   43|       |
   44|    168|   for(const char c : input) {
  ------------------
  |  Branch (44:21): [True: 168, False: 56]
  ------------------
   45|    168|      if(const auto digit = digit_from_ascii(c)) {
  ------------------
  |  Branch (45:21): [True: 168, False: 0]
  ------------------
   46|    168|         if(accum > (std::numeric_limits<T>::max() - static_cast<T>(*digit)) / 10) {
  ------------------
  |  Branch (46:13): [True: 0, False: 168]
  ------------------
   47|      0|            return {};
   48|      0|         }
   49|    168|         accum = accum * 10 + static_cast<T>(*digit);
   50|    168|      } else {
   51|      0|         return {};
   52|      0|      }
   53|    168|   }
   54|       |
   55|     56|   return accum;
   56|     56|}

_ZN5Botan9SCAN_NameC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   58|  4.11k|SCAN_Name::SCAN_Name(std::string_view algo_spec) : m_orig_algo_spec(algo_spec) {
   59|  4.11k|   if(algo_spec.empty()) {
  ------------------
  |  Branch (59:7): [True: 0, False: 4.11k]
  ------------------
   60|      0|      throw Invalid_Argument("Expected algorithm name, got empty string");
   61|      0|   }
   62|       |
   63|  4.11k|   std::vector<std::pair<size_t, std::string>> name;
   64|  4.11k|   size_t level = 0;
   65|  4.11k|   std::pair<size_t, std::string> accum = std::make_pair(level, "");
   66|       |
   67|  4.11k|   const std::string decoding_error = "Bad SCAN name '" + m_orig_algo_spec + "': ";
   68|       |
   69|  37.0k|   for(const char c : algo_spec) {
  ------------------
  |  Branch (69:21): [True: 37.0k, False: 4.11k]
  ------------------
   70|  37.0k|      if(c == '/' || c == ',' || c == '(' || c == ')') {
  ------------------
  |  Branch (70:10): [True: 0, False: 37.0k]
  |  Branch (70:22): [True: 0, False: 37.0k]
  |  Branch (70:34): [True: 56, False: 37.0k]
  |  Branch (70:46): [True: 56, False: 36.9k]
  ------------------
   71|    112|         if(c == '(') {
  ------------------
  |  Branch (71:13): [True: 56, False: 56]
  ------------------
   72|     56|            ++level;
   73|     56|         } else if(c == ')') {
  ------------------
  |  Branch (73:20): [True: 56, False: 0]
  ------------------
   74|     56|            if(level == 0) {
  ------------------
  |  Branch (74:16): [True: 0, False: 56]
  ------------------
   75|      0|               throw Decoding_Error(decoding_error + "Mismatched parens");
   76|      0|            }
   77|     56|            --level;
   78|     56|         }
   79|       |
   80|    112|         if(c == '/' && level > 0) {
  ------------------
  |  Branch (80:13): [True: 0, False: 112]
  |  Branch (80:25): [True: 0, False: 0]
  ------------------
   81|      0|            accum.second.push_back(c);
   82|    112|         } else {
   83|    112|            if(!accum.second.empty()) {
  ------------------
  |  Branch (83:16): [True: 112, False: 0]
  ------------------
   84|    112|               name.push_back(accum);
   85|    112|            }
   86|    112|            accum = std::make_pair(level, "");
   87|    112|         }
   88|  36.9k|      } else {
   89|  36.9k|         accum.second.push_back(c);
   90|  36.9k|      }
   91|  37.0k|   }
   92|       |
   93|  4.11k|   if(!accum.second.empty()) {
  ------------------
  |  Branch (93:7): [True: 4.05k, False: 56]
  ------------------
   94|  4.05k|      name.push_back(accum);
   95|  4.05k|   }
   96|       |
   97|  4.11k|   if(level != 0) {
  ------------------
  |  Branch (97:7): [True: 0, False: 4.11k]
  ------------------
   98|      0|      throw Decoding_Error(decoding_error + "Missing close paren");
   99|      0|   }
  100|       |
  101|  4.11k|   if(name.empty()) {
  ------------------
  |  Branch (101:7): [True: 0, False: 4.11k]
  ------------------
  102|      0|      throw Decoding_Error(decoding_error + "Empty name");
  103|      0|   }
  104|       |
  105|  4.11k|   m_alg_name = name[0].second;
  106|       |
  107|  4.11k|   bool in_modes = false;
  108|       |
  109|  4.17k|   for(size_t i = 1; i != name.size(); ++i) {
  ------------------
  |  Branch (109:22): [True: 56, False: 4.11k]
  ------------------
  110|     56|      if(name[i].first == 0) {
  ------------------
  |  Branch (110:10): [True: 0, False: 56]
  ------------------
  111|      0|         m_mode_info.push_back(make_arg(name, i));
  112|      0|         in_modes = true;
  113|     56|      } else if(name[i].first == 1 && !in_modes) {
  ------------------
  |  Branch (113:17): [True: 56, False: 0]
  |  Branch (113:39): [True: 56, False: 0]
  ------------------
  114|     56|         m_args.push_back(make_arg(name, i));
  115|     56|      }
  116|     56|   }
  117|  4.11k|}
_ZNK5Botan9SCAN_Name14arg_as_integerEmm:
  133|     56|size_t SCAN_Name::arg_as_integer(size_t i, size_t def_value) const {
  134|     56|   if(i >= arg_count()) {
  ------------------
  |  Branch (134:7): [True: 0, False: 56]
  ------------------
  135|      0|      return def_value;
  136|      0|   }
  137|     56|   return to_u32bit(m_args[i]);
  138|     56|}
scan_name.cpp:_ZN5Botan12_GLOBAL__N_18make_argERKNSt3__16vectorINS1_4pairImNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEENS7_ISA_EEEEm:
   17|     56|std::string make_arg(const std::vector<std::pair<size_t, std::string>>& name, size_t start) {
   18|     56|   std::string output = name[start].second;
   19|     56|   size_t level = name[start].first;
   20|       |
   21|     56|   size_t paren_depth = 0;
   22|       |
   23|     56|   for(size_t i = start + 1; i != name.size(); ++i) {
  ------------------
  |  Branch (23:30): [True: 0, False: 56]
  ------------------
   24|      0|      if(name[i].first <= name[start].first) {
  ------------------
  |  Branch (24:10): [True: 0, False: 0]
  ------------------
   25|      0|         break;
   26|      0|      }
   27|       |
   28|      0|      if(name[i].first > level) {
  ------------------
  |  Branch (28:10): [True: 0, False: 0]
  ------------------
   29|      0|         output += "(" + name[i].second;
   30|      0|         ++paren_depth;
   31|      0|      } else if(name[i].first < level) {
  ------------------
  |  Branch (31:17): [True: 0, False: 0]
  ------------------
   32|      0|         for(size_t j = name[i].first; j < level; j++) {
  ------------------
  |  Branch (32:40): [True: 0, False: 0]
  ------------------
   33|      0|            output += ")";
   34|      0|            --paren_depth;
   35|      0|         }
   36|      0|         output += "," + name[i].second;
   37|      0|      } else {
   38|      0|         if(output[output.size() - 1] != '(') {
  ------------------
  |  Branch (38:13): [True: 0, False: 0]
  ------------------
   39|      0|            output += ",";
   40|      0|         }
   41|      0|         output += name[i].second;
   42|      0|      }
   43|       |
   44|      0|      level = name[i].first;
   45|      0|   }
   46|       |
   47|     56|   for(size_t i = 0; i != paren_depth; ++i) {
  ------------------
  |  Branch (47:22): [True: 0, False: 56]
  ------------------
   48|      0|      output += ")";
   49|      0|   }
   50|       |
   51|     56|   return output;
   52|     56|}

_ZN5Botan9SHAKE_XOFC2Em:
   17|  4.05k|      m_keccak({.capacity_bits = capacity, .padding = KeccakPadding::shake()}), m_output_generated(false) {
   18|  4.05k|   BOTAN_ASSERT_NOMSG(capacity == 256 || capacity == 512);
  ------------------
  |  |   77|  4.05k|   do {                                                                     \
  |  |   78|  4.05k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  5.18k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:12): [True: 2.93k, False: 1.12k]
  |  |  |  Branch (79:12): [True: 1.12k, False: 0]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  4.05k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 4.05k]
  |  |  ------------------
  ------------------
   19|  4.05k|}
_ZN5Botan9SHAKE_XOF5resetEv:
   21|    511|void SHAKE_XOF::reset() {
   22|    511|   m_keccak.clear();
   23|    511|   m_output_generated = false;
   24|    511|}
_ZN5Botan9SHAKE_XOF8add_dataENSt3__14spanIKhLm18446744073709551615EEE:
   26|  8.94k|void SHAKE_XOF::add_data(std::span<const uint8_t> input) {
   27|  8.94k|   BOTAN_STATE_CHECK(!m_output_generated);
  ------------------
  |  |   51|  8.94k|   do {                                                         \
  |  |   52|  8.94k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  8.94k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 8.94k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  8.94k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 8.94k]
  |  |  ------------------
  ------------------
   28|  8.94k|   m_keccak.absorb(input);
   29|  8.94k|}
_ZN5Botan9SHAKE_XOF14generate_bytesENSt3__14spanIhLm18446744073709551615EEE:
   31|   965k|void SHAKE_XOF::generate_bytes(std::span<uint8_t> output) {
   32|   965k|   if(!m_output_generated) {
  ------------------
  |  Branch (32:7): [True: 4.51k, False: 960k]
  ------------------
   33|  4.51k|      m_output_generated = true;
   34|  4.51k|      m_keccak.finish();
   35|  4.51k|   }
   36|       |
   37|   965k|   m_keccak.squeeze(output);
   38|   965k|}

_ZN5Botan3XOF6createENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
   28|  4.05k|std::unique_ptr<XOF> XOF::create(std::string_view algo_spec, std::string_view provider) {
   29|  4.05k|   const SCAN_Name req(algo_spec);
   30|       |
   31|  4.05k|   if(!provider.empty() && provider != "base") {
  ------------------
  |  Branch (31:7): [True: 0, False: 4.05k]
  |  Branch (31:28): [True: 0, False: 0]
  ------------------
   32|      0|      return nullptr;  // unknown provider
   33|      0|   }
   34|       |
   35|  4.05k|#if defined(BOTAN_HAS_SHAKE_XOF)
   36|  4.05k|   if(req.algo_name() == "SHAKE-128" && req.arg_count() == 0) {
  ------------------
  |  Branch (36:7): [True: 2.93k, False: 1.12k]
  |  Branch (36:41): [True: 2.93k, False: 0]
  ------------------
   37|  2.93k|      return std::make_unique<SHAKE_128_XOF>();
   38|  2.93k|   }
   39|  1.12k|   if(req.algo_name() == "SHAKE-256" && req.arg_count() == 0) {
  ------------------
  |  Branch (39:7): [True: 1.12k, False: 0]
  |  Branch (39:41): [True: 1.12k, False: 0]
  ------------------
   40|  1.12k|      return std::make_unique<SHAKE_256_XOF>();
   41|  1.12k|   }
   42|      0|#endif
   43|       |
   44|      0|#if defined(BOTAN_HAS_ASCON_XOF128)
   45|      0|   if(req.algo_name() == "Ascon-XOF128" && req.arg_count() == 0) {
  ------------------
  |  Branch (45:7): [True: 0, False: 0]
  |  Branch (45:44): [True: 0, False: 0]
  ------------------
   46|      0|      return std::make_unique<Ascon_XOF128>();
   47|      0|   }
   48|      0|#endif
   49|       |
   50|      0|   return nullptr;
   51|      0|}
_ZN5Botan3XOF15create_or_throwENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
   54|  4.05k|std::unique_ptr<XOF> XOF::create_or_throw(std::string_view algo_spec, std::string_view provider) {
   55|  4.05k|   if(auto xof = XOF::create(algo_spec, provider)) {
  ------------------
  |  Branch (55:12): [True: 4.05k, False: 0]
  ------------------
   56|  4.05k|      return xof;
   57|  4.05k|   }
   58|      0|   throw Lookup_Error("XOF", algo_spec, provider);
   59|  4.05k|}
_ZN5Botan3XOF5startENSt3__14spanIKhLm18446744073709551615EEES4_:
   70|  4.51k|void XOF::start(std::span<const uint8_t> salt, std::span<const uint8_t> key) {
   71|  4.51k|   if(!key_spec().valid_keylength(key.size())) {
  ------------------
  |  Branch (71:7): [True: 0, False: 4.51k]
  ------------------
   72|      0|      throw Invalid_Key_Length(name(), key.size());
   73|      0|   }
   74|       |
   75|  4.51k|   if(!valid_salt_length(salt.size())) {
  ------------------
  |  Branch (75:7): [True: 0, False: 4.51k]
  ------------------
   76|      0|      throw Invalid_Argument(fmt("{} cannot accept a salt length of {}", name(), salt.size()));
   77|      0|   }
   78|       |
   79|  4.51k|   m_xof_started = true;
   80|  4.51k|   start_msg(salt, key);
   81|  4.51k|}
_ZN5Botan3XOF9start_msgENSt3__14spanIKhLm18446744073709551615EEES4_:
   83|  4.51k|void XOF::start_msg(std::span<const uint8_t> salt, std::span<const uint8_t> key) {
   84|  4.51k|   BOTAN_UNUSED(salt, key);
  ------------------
  |  |  144|  4.51k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   85|  4.51k|}

