_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EED2Ev:
   65|      1|      ~AlignmentBuffer() { secure_scrub_memory(m_buffer.data(), m_buffer.size()); }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EEC2Ev:
   63|      1|      AlignmentBuffer() : m_position(0) {}
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE5clearEv:
   72|      7|      void clear() {
   73|      7|         clear_mem(m_buffer.data(), m_buffer.size());
   74|      7|         m_position = 0;
   75|      7|      }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE21handle_unaligned_dataERNS_12BufferSlicerE:
  167|      9|      [[nodiscard]] std::optional<std::span<const T>> handle_unaligned_data(BufferSlicer& slicer) {
  168|       |         // When the final block is to be deferred, we would need to store and
  169|       |         // hold a buffer that contains exactly one block until more data is
  170|       |         // passed or it is explicitly consumed.
  171|      9|         const size_t defer = (defers_final_block()) ? 1 : 0;
  ------------------
  |  Branch (171:31): [True: 0, False: 9]
  ------------------
  172|       |
  173|      9|         if(in_alignment() && slicer.remaining() >= m_buffer.size() + defer) {
  ------------------
  |  Branch (173:13): [True: 9, False: 0]
  |  Branch (173:31): [True: 6, False: 3]
  ------------------
  174|       |            // We are currently in alignment and the passed-in data source
  175|       |            // contains enough data to benefit from aligned processing.
  176|       |            // Therefore, we don't copy anything into the intermittent buffer.
  177|      6|            return std::nullopt;
  178|      6|         }
  179|       |
  180|       |         // Fill the buffer with as much input data as needed to reach alignment
  181|       |         // or until the input source is depleted.
  182|      3|         const auto elements_to_consume = std::min(m_buffer.size() - m_position, slicer.remaining());
  183|      3|         append(slicer.take(elements_to_consume));
  184|       |
  185|       |         // If we collected enough data, we push out one full block. When
  186|       |         // deferring the final block is enabled, we additionally check that
  187|       |         // more input data is available to continue processing a consecutive
  188|       |         // block.
  189|      3|         if(ready_to_consume() && (!defers_final_block() || !slicer.empty())) {
  ------------------
  |  Branch (189:13): [True: 0, False: 3]
  |  Branch (189:36): [True: 0, False: 0]
  |  Branch (189:61): [True: 0, False: 0]
  ------------------
  190|      0|            return consume();
  191|      3|         } else {
  192|      3|            return std::nullopt;
  193|      3|         }
  194|      3|      }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE18defers_final_blockEv:
  234|     15|      constexpr bool defers_final_block() const {
  235|     15|         return FINAL_BLOCK_STRATEGY == AlignmentBufferFinalBlock::must_be_deferred;
  236|     15|      }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE6appendENSt3__14spanIKhLm18446744073709551615EEE:
   91|      7|      void append(std::span<const T> elements) {
   92|      7|         BOTAN_ASSERT_NOMSG(elements.size() <= elements_until_alignment());
  ------------------
  |  |   60|      7|   do {                                                                     \
  |  |   61|      7|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 7]
  |  |  ------------------
  |  |   62|      7|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|      7|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   93|      7|         std::copy(elements.begin(), elements.end(), m_buffer.begin() + m_position);
   94|      7|         m_position += elements.size();
   95|      7|      }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE24elements_until_alignmentEv:
  222|     19|      size_t elements_until_alignment() const { return m_buffer.size() - m_position; }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE16ready_to_consumeEv:
  232|     15|      bool ready_to_consume() const { return m_position == m_buffer.size(); }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE7consumeEv:
  201|      4|      [[nodiscard]] std::span<const T> consume() {
  202|      4|         BOTAN_ASSERT_NOMSG(ready_to_consume());
  ------------------
  |  |   60|      4|   do {                                                                     \
  |  |   61|      4|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 4]
  |  |  ------------------
  |  |   62|      4|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|      4|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  203|      4|         m_position = 0;
  204|      4|         return m_buffer;
  205|      4|      }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE12in_alignmentEv:
  227|     24|      bool in_alignment() const { return m_position == 0; }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE23aligned_data_to_processERNS_12BufferSlicerE:
  127|      6|      [[nodiscard]] std::tuple<std::span<const uint8_t>, size_t> aligned_data_to_process(BufferSlicer& slicer) const {
  128|      6|         BOTAN_ASSERT_NOMSG(in_alignment());
  ------------------
  |  |   60|      6|   do {                                                                     \
  |  |   61|      6|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 6]
  |  |  ------------------
  |  |   62|      6|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|      6|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  129|       |
  130|       |         // When the final block is to be deferred, the last block must not be
  131|       |         // selected for processing if there is no (unaligned) extra input data.
  132|      6|         const size_t defer = (defers_final_block()) ? 1 : 0;
  ------------------
  |  Branch (132:31): [True: 0, False: 6]
  ------------------
  133|      6|         const size_t full_blocks_to_process = (slicer.remaining() - defer) / m_buffer.size();
  134|      6|         return {slicer.take(full_blocks_to_process * m_buffer.size()), full_blocks_to_process};
  135|      6|      }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE18fill_up_with_zerosEv:
   80|      4|      void fill_up_with_zeros() {
   81|      4|         if(!ready_to_consume()) {
  ------------------
  |  Branch (81:13): [True: 4, False: 0]
  ------------------
   82|      4|            clear_mem(&m_buffer[m_position], elements_until_alignment());
   83|      4|            m_position = m_buffer.size();
   84|      4|         }
   85|      4|      }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE20directly_modify_lastEm:
  114|      4|      std::span<T> directly_modify_last(size_t elements) {
  115|      4|         BOTAN_ASSERT_NOMSG(size() >= elements);
  ------------------
  |  |   60|      4|   do {                                                                     \
  |  |   61|      4|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 4]
  |  |  ------------------
  |  |   62|      4|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|      4|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  116|      4|         return std::span(m_buffer).last(elements);
  117|      4|      }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE4sizeEv:
  218|      4|      constexpr size_t size() const { return m_buffer.size(); }

_ZN5Botan14expand_top_bitImEET_S1_:
   25|   334M|{
   26|   334M|   return static_cast<T>(0) - (a >> (sizeof(T) * 8 - 1));
   27|   334M|}
_ZN5Botan6chooseImEET_S1_S1_S1_:
  180|   379M|inline constexpr T choose(T mask, T a, T b) {
  181|       |   //return (mask & a) | (~mask & b);
  182|   379M|   return (b ^ (mask & (a ^ b)));
  183|   379M|}
_ZN5Botan10ct_is_zeroImEET_S1_:
   35|   254M|{
   36|   254M|   return expand_top_bit<T>(~x & (x - 1));
   37|   254M|}
_ZN5Botan13is_power_of_2ImEEbT_:
   47|   237k|{
   48|   237k|   return (arg != 0) && (arg != 1) && ((arg & static_cast<T>(arg - 1)) == 0);
  ------------------
  |  Branch (48:11): [True: 237k, False: 0]
  |  Branch (48:25): [True: 237k, False: 0]
  |  Branch (48:39): [True: 214k, False: 22.5k]
  ------------------
   49|   237k|}
_ZN5Botan8high_bitImEEmT_:
   60|   342k|{
   61|   342k|   size_t hb = 0;
   62|       |
   63|  2.39M|   for(size_t s = 8 * sizeof(T) / 2; s > 0; s /= 2) {
  ------------------
  |  Branch (63:38): [True: 2.05M, False: 342k]
  ------------------
   64|  2.05M|      const size_t z = s * ((~ct_is_zero(n >> s)) & 1);
   65|  2.05M|      hb += z;
   66|  2.05M|      n >>= z;
   67|  2.05M|   }
   68|       |
   69|   342k|   hb += n;
   70|       |
   71|   342k|   return hb;
   72|   342k|}
_ZN5Botan10ct_is_zeroIhEET_S1_:
   35|   101k|{
   36|   101k|   return expand_top_bit<T>(~x & (x - 1));
   37|   101k|}
_ZN5Botan14expand_top_bitIhEET_S1_:
   25|   103k|{
   26|   103k|   return static_cast<T>(0) - (a >> (sizeof(T) * 8 - 1));
   27|   103k|}
_ZN5Botan6chooseIhEET_S1_S1_S1_:
  180|   103k|inline constexpr T choose(T mask, T a, T b) {
  181|       |   //return (mask & a) | (~mask & b);
  182|   103k|   return (b ^ (mask & (a ^ b)));
  183|   103k|}
_ZN5Botan3ctzImEEmT_:
  104|   796k|{
  105|       |   /*
  106|       |   * If n == 0 then this function will compute 8*sizeof(T)-1, so
  107|       |   * initialize lb to 1 if n == 0 to produce the expected result.
  108|       |   */
  109|   796k|   size_t lb = ct_is_zero(n) & 1;
  110|       |
  111|  5.57M|   for(size_t s = 8 * sizeof(T) / 2; s > 0; s /= 2) {
  ------------------
  |  Branch (111:38): [True: 4.78M, False: 796k]
  ------------------
  112|  4.78M|      const T mask = (static_cast<T>(1) << s) - 1;
  113|  4.78M|      const size_t z = s * (ct_is_zero(n & mask) & 1);
  114|  4.78M|      lb += z;
  115|  4.78M|      n >>= z;
  116|  4.78M|   }
  117|       |
  118|   796k|   return lb;
  119|   796k|}
_ZN5Botan6chooseIjEET_S1_S1_S1_:
  180|  1.28k|inline constexpr T choose(T mask, T a, T b) {
  181|       |   //return (mask & a) | (~mask & b);
  182|  1.28k|   return (b ^ (mask & (a ^ b)));
  183|  1.28k|}
_ZN5Botan8majorityIjEET_S1_S1_S1_:
  186|    640|inline constexpr T majority(T a, T b, T c) {
  187|       |   /*
  188|       |   Considering each bit of a, b, c individually
  189|       |
  190|       |   If a xor b is set, then c is the deciding vote.
  191|       |
  192|       |   If a xor b is not set then either a and b are both set or both unset.
  193|       |   In either case the value of c doesn't matter, and examining b (or a)
  194|       |   allows us to determine which case we are in.
  195|       |   */
  196|    640|   return choose(a ^ b, c, b);
  197|    640|}

_ZN5Botan13reverse_bytesEm:
   48|   318k|inline constexpr uint64_t reverse_bytes(uint64_t x) {
   49|   318k|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_bswap64)
   50|   318k|   return __builtin_bswap64(x);
   51|       |#else
   52|       |   uint32_t hi = static_cast<uint32_t>(x >> 32);
   53|       |   uint32_t lo = static_cast<uint32_t>(x);
   54|       |
   55|       |   hi = reverse_bytes(hi);
   56|       |   lo = reverse_bytes(lo);
   57|       |
   58|       |   return (static_cast<uint64_t>(lo) << 32) | hi;
   59|       |#endif
   60|   318k|}
_ZN5Botan13reverse_bytesEj:
   33|    192|inline constexpr uint32_t reverse_bytes(uint32_t x) {
   34|    192|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_bswap32)
   35|    192|   return __builtin_bswap32(x);
   36|       |#else
   37|       |   // MSVC at least recognizes this as a bswap
   38|       |   return ((x & 0x000000FF) << 24) | ((x & 0x0000FF00) << 8) | ((x & 0x00FF0000) >> 8) | ((x & 0xFF000000) >> 24);
   39|       |#endif
   40|    192|}

_ZN5Botan5CPUID13has_cpuid_bitENS0_10CPUID_bitsE:
  333|  14.9k|      static bool has_cpuid_bit(CPUID_bits elem) {
  334|  14.9k|         const uint32_t elem32 = static_cast<uint32_t>(elem);
  335|  14.9k|         return state().has_bit(elem32);
  336|  14.9k|      }
_ZN5Botan5CPUID5stateEv:
  362|  14.9k|      static CPUID_Data& state() {
  363|  14.9k|         static CPUID::CPUID_Data g_cpuid;
  364|  14.9k|         return g_cpuid;
  365|  14.9k|      }
_ZNK5Botan5CPUID10CPUID_Data7has_bitEj:
  350|  14.9k|            bool has_bit(uint32_t bit) const { return (m_processor_features & bit) == bit; }
_ZN5Botan5CPUID8has_sse2Ev:
  208|  4.97k|      static bool has_sse2() { return has_cpuid_bit(CPUID_SSE2_BIT); }
_ZN5Botan5CPUID8has_avx2Ev:
  218|  4.97k|      static bool has_avx2() { return has_cpuid_bit(CPUID_AVX2_BIT); }
_ZN5Botan5CPUID10has_avx512Ev:
  225|  4.97k|      static bool has_avx512() { return has_cpuid_bit(CPUID_AVX512_BIT); }
_ZN5Botan5CPUID8has_bmi2Ev:
  240|     10|      static bool has_bmi2() { return has_cpuid_bit(CPUID_BMI_BIT); }
_ZN5Botan5CPUID13has_intel_shaEv:
  255|     10|      static bool has_intel_sha() { return has_sse2() && has_cpuid_bit(CPUID_SHA_BIT); }
  ------------------
  |  Branch (255:44): [True: 10, False: 0]
  |  Branch (255:58): [True: 0, False: 10]
  ------------------

_ZN5Botan2CT4MaskImE8is_equalEmm:
  128|  77.3M|      static Mask<T> is_equal(T x, T y) { return Mask<T>::is_zero(static_cast<T>(x ^ y)); }
_ZN5Botan2CT4MaskImE5is_ltEmm:
  133|  79.7M|      static Mask<T> is_lt(T x, T y) { return Mask<T>(expand_top_bit<T>(x ^ ((x ^ y) | ((x - y) ^ x)))); }
_ZN5Botan2CT4MaskImEC2Em:
  280|   398M|      Mask(T m) : m_mask(m) {}
_ZNK5Botan2CT4MaskImE6selectEmm:
  228|   379M|      T select(T x, T y) const { return choose(value(), x, y); }
_ZNK5Botan2CT4MaskImE5valueEv:
  277|   640M|      T value() const { return m_mask; }
_ZN5Botan2CT4MaskImE7is_zeroEm:
  123|   152M|      static Mask<T> is_zero(T x) { return Mask<T>(ct_is_zero<T>(x)); }
_ZN5Botan2CT8unpoisonImEEvRT_:
   64|  20.9M|inline void unpoison(T& p) {
   65|       |#if defined(BOTAN_HAS_VALGRIND)
   66|       |   VALGRIND_MAKE_MEM_DEFINED(&p, sizeof(T));
   67|       |#else
   68|  20.9M|   BOTAN_UNUSED(p);
  ------------------
  |  |  118|  20.9M|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   69|  20.9M|#endif
   70|  20.9M|}
_ZN5Botan2CT4MaskImE6expandEm:
  109|  73.3M|      static Mask<T> expand(T v) { return ~Mask<T>::is_zero(v); }
_ZNK5Botan2CT4MaskImEcoEv:
  213|  85.5M|      Mask<T> operator~() const { return Mask<T>(~value()); }
_ZNK5Botan2CT4MaskImE11select_maskES2_S2_:
  239|  66.8M|      Mask<T> select_mask(Mask<T> x, Mask<T> y) const { return Mask<T>(select(x.value(), y.value())); }
_ZN5Botan2CT4MaskImEoRES2_:
  190|   797k|      Mask<T>& operator|=(Mask<T> o) {
  191|   797k|         m_mask |= o.value();
  192|   797k|         return (*this);
  193|   797k|      }
_ZN5Botan2CT4MaskImEaNES2_:
  174|  14.1k|      Mask<T>& operator&=(Mask<T> o) {
  175|  14.1k|         m_mask &= o.value();
  176|  14.1k|         return (*this);
  177|  14.1k|      }
_ZN5Botan2CT20conditional_swap_ptrIPKmEEvbRT_S5_:
  315|  63.5k|inline void conditional_swap_ptr(bool cnd, T& x, T& y) {
  316|  63.5k|   uintptr_t xp = reinterpret_cast<uintptr_t>(x);
  317|  63.5k|   uintptr_t yp = reinterpret_cast<uintptr_t>(y);
  318|       |
  319|  63.5k|   conditional_swap<uintptr_t>(cnd, xp, yp);
  320|       |
  321|  63.5k|   x = reinterpret_cast<T>(xp);
  322|  63.5k|   y = reinterpret_cast<T>(yp);
  323|  63.5k|}
_ZN5Botan2CT16conditional_swapImEEvbRT_S3_:
  305|   127k|inline void conditional_swap(bool cnd, T& x, T& y) {
  306|   127k|   const auto swap = CT::Mask<T>::expand(cnd);
  307|       |
  308|   127k|   T t0 = swap.select(y, x);
  309|   127k|   T t1 = swap.select(x, y);
  310|   127k|   x = t0;
  311|   127k|   y = t1;
  312|   127k|}
_ZNK5Botan2CT4MaskImE13if_set_returnEm:
  218|   147M|      T if_set_return(T x) const { return m_mask & x; }
_ZN5Botan2CT20conditional_copy_memImEENS0_4MaskIT_EES3_PS3_PKS3_S7_m:
  292|  1.88M|inline Mask<T> conditional_copy_mem(T cnd, T* to, const T* from0, const T* from1, size_t elems) {
  293|  1.88M|   const auto mask = CT::Mask<T>::expand(cnd);
  294|  1.88M|   return CT::conditional_copy_mem(mask, to, from0, from1, elems);
  295|  1.88M|}
_ZN5Botan2CT20conditional_copy_memImEENS0_4MaskIT_EES4_PS3_PKS3_S7_m:
  286|  1.88M|inline Mask<T> conditional_copy_mem(Mask<T> mask, T* to, const T* from0, const T* from1, size_t elems) {
  287|  1.88M|   mask.select_n(to, from0, from1, elems);
  288|  1.88M|   return mask;
  289|  1.88M|}
_ZNK5Botan2CT4MaskImE8select_nEPmPKmS5_m:
  245|  2.10M|      void select_n(T output[], const T x[], const T y[], size_t len) const {
  246|  10.5M|         for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (246:28): [True: 8.47M, False: 2.10M]
  ------------------
  247|  8.47M|            output[i] = this->select(x[i], y[i]);
  248|  8.47M|         }
  249|  2.10M|      }
_ZNK5Botan2CT4MaskImE7as_boolEv:
  272|  13.7M|      bool as_bool() const { return unpoisoned_value() != 0; }
_ZNK5Botan2CT4MaskImE16unpoisoned_valueEv:
  263|  13.7M|      T unpoisoned_value() const {
  264|  13.7M|         T r = value();
  265|  13.7M|         CT::unpoison(r);
  266|  13.7M|         return r;
  267|  13.7M|      }
_ZN5Botan2CT8unpoisonIKmEEvRT_:
   64|   342k|inline void unpoison(T& p) {
   65|       |#if defined(BOTAN_HAS_VALGRIND)
   66|       |   VALGRIND_MAKE_MEM_DEFINED(&p, sizeof(T));
   67|       |#else
   68|   342k|   BOTAN_UNUSED(p);
  ------------------
  |  |  118|   342k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   69|   342k|#endif
   70|   342k|}
_ZN5Botan2CT4MaskIhE6expandEh:
  109|   101k|      static Mask<T> expand(T v) { return ~Mask<T>::is_zero(v); }
_ZN5Botan2CT4MaskIhE7is_zeroEh:
  123|   101k|      static Mask<T> is_zero(T x) { return Mask<T>(ct_is_zero<T>(x)); }
_ZN5Botan2CT4MaskIhEC2Eh:
  280|   206k|      Mask(T m) : m_mask(m) {}
_ZNK5Botan2CT4MaskIhEcoEv:
  213|   102k|      Mask<T> operator~() const { return Mask<T>(~value()); }
_ZNK5Botan2CT4MaskIhE5valueEv:
  277|   206k|      T value() const { return m_mask; }
_ZNK5Botan2CT4MaskIhE6selectEhh:
  228|   103k|      T select(T x, T y) const { return choose(value(), x, y); }
_ZN5Botan2CT4MaskImE6is_gteEmm:
  148|  12.2M|      static Mask<T> is_gte(T x, T y) { return ~Mask<T>::is_lt(x, y); }
_ZN5Botan2CTorENS0_4MaskImEES2_:
  208|  12.2M|      friend Mask<T> operator|(Mask<T> x, Mask<T> y) { return Mask<T>(x.value() | y.value()); }
_ZN5Botan2CT4MaskImE7clearedEv:
  104|  94.0k|      static Mask<T> cleared() { return Mask<T>(0); }
_ZNK5Botan2CT4MaskImE17if_not_set_returnEm:
  223|   796k|      T if_not_set_return(T x) const { return ~m_mask & x; }
_ZN5Botan2CTanENS0_4MaskImEES2_:
  198|  1.10M|      friend Mask<T> operator&(Mask<T> x, Mask<T> y) { return Mask<T>(x.value() & y.value()); }
_ZN5Botan2CT9all_zerosImEENS0_4MaskIT_EEPKS3_m:
  326|  2.21M|inline CT::Mask<T> all_zeros(const T elem[], size_t len) {
  327|  2.21M|   T sum = 0;
  328|  11.0M|   for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (328:22): [True: 8.84M, False: 2.21M]
  ------------------
  329|  8.84M|      sum |= elem[i];
  330|  8.84M|   }
  331|  2.21M|   return CT::Mask<T>::is_zero(sum);
  332|  2.21M|}
_ZN5Botan2CT4MaskIhE15is_within_rangeEhhh:
  150|  1.65k|      static Mask<T> is_within_range(T v, T l, T u) {
  151|       |         //return Mask<T>::is_gte(v, l) & Mask<T>::is_lte(v, u);
  152|       |
  153|  1.65k|         const T v_lt_l = v ^ ((v ^ l) | ((v - l) ^ v));
  154|  1.65k|         const T v_gt_u = u ^ ((u ^ v) | ((u - v) ^ u));
  155|  1.65k|         const T either = v_lt_l | v_gt_u;
  156|  1.65k|         return ~Mask<T>(expand_top_bit(either));
  157|  1.65k|      }
_ZN5Botan2CT4MaskIhE9is_any_ofEhSt16initializer_listIhE:
  159|    552|      static Mask<T> is_any_of(T v, std::initializer_list<T> accepted) {
  160|    552|         T accept = 0;
  161|       |
  162|  2.20k|         for(auto a : accepted) {
  ------------------
  |  Branch (162:21): [True: 2.20k, False: 552]
  ------------------
  163|  2.20k|            const T diff = a ^ v;
  164|  2.20k|            const T eq_zero = ~diff & (diff - 1);
  165|  2.20k|            accept |= eq_zero;
  166|  2.20k|         }
  167|       |
  168|    552|         return Mask<T>(expand_top_bit(accept));
  169|    552|      }
_ZN5Botan2CT4MaskImE6is_lteEmm:
  143|    128|      static Mask<T> is_lte(T x, T y) { return ~Mask<T>::is_gt(x, y); }
_ZN5Botan2CT4MaskImE5is_gtEmm:
  138|    128|      static Mask<T> is_gt(T x, T y) { return Mask<T>::is_lt(y, x); }
_ZN5Botan2CT22conditional_assign_memImEENS0_4MaskIT_EES3_PS3_PKS3_m:
  298|   205k|inline Mask<T> conditional_assign_mem(T cnd, T* sink, const T* src, size_t elems) {
  299|   205k|   const auto mask = CT::Mask<T>::expand(cnd);
  300|   205k|   mask.select_n(sink, src, sink, elems);
  301|   205k|   return mask;
  302|   205k|}
_ZN5Botan2CT8unpoisonIlEEvRT_:
   64|  40.3M|inline void unpoison(T& p) {
   65|       |#if defined(BOTAN_HAS_VALGRIND)
   66|       |   VALGRIND_MAKE_MEM_DEFINED(&p, sizeof(T));
   67|       |#else
   68|  40.3M|   BOTAN_UNUSED(p);
  ------------------
  |  |  118|  40.3M|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   69|  40.3M|#endif
   70|  40.3M|}

_ZN5Botan9ct_divideERKNS_6BigIntES2_:
   49|    742|inline BigInt ct_divide(const BigInt& x, const BigInt& y) {
   50|    742|   BigInt q, r;
   51|    742|   ct_divide(x, y, q, r);
   52|    742|   return q;
   53|    742|}

_ZN5Botan8store_beImEEvT_Ph:
  408|      4|inline constexpr void store_be(T in, uint8_t out[sizeof(T)]) {
  409|      4|   store_be(in, std::span<uint8_t, sizeof(T)>(out, sizeof(T)));
  410|      4|}
_ZN5Botan8store_beImNSt3__14spanIhLm8EEEEEvT_OT0_:
  358|      4|inline constexpr void store_be(T in, OutR&& out_range) {
  359|      4|   ranges::assert_exact_byte_length<sizeof(T)>(out_range);
  360|      4|   std::span out{out_range};
  361|      4|   if constexpr(sizeof(T) == 1) {
  ------------------
  |  Branch (361:17): [Folded - Ignored]
  ------------------
  362|      4|      out[0] = static_cast<uint8_t>(in);
  363|      4|   } else {
  364|       |#if defined(BOTAN_TARGET_CPU_IS_BIG_ENDIAN)
  365|       |      typecast_copy(out, in);
  366|       |#elif defined(BOTAN_TARGET_CPU_IS_LITTLE_ENDIAN)
  367|      4|      typecast_copy(out, reverse_bytes(in));
  368|       |#else
  369|       |      [&]<size_t... i>(std::index_sequence<i...>) {
  370|       |         ((out[i] = get_byte<i>(in)), ...);
  371|       |      }
  372|       |      (std::make_index_sequence<sizeof(T)>());
  373|       |#endif
  374|      4|   }
  375|      4|}
_ZN5Botan7load_beImEET_PKhm:
  226|   318k|inline constexpr T load_be(const uint8_t in[], size_t off) {
  227|       |   // asserts that *in points to the correct amount of memory
  228|   318k|   return load_be<T>(std::span<const uint8_t, sizeof(T)>(in + off * sizeof(T), sizeof(T)));
  229|   318k|}
_ZN5Botan7load_beImNSt3__14spanIKhLm8EEEEET_OT0_:
   92|   318k|inline constexpr T load_be(InR&& in_range) {
   93|   318k|   ranges::assert_exact_byte_length<sizeof(T)>(in_range);
   94|   318k|   std::span in{in_range};
   95|   318k|   if constexpr(sizeof(T) == 1) {
  ------------------
  |  Branch (95:17): [Folded - Ignored]
  ------------------
   96|   318k|      return static_cast<T>(in[0]);
   97|   318k|   } else {
   98|       |#if defined(BOTAN_TARGET_CPU_IS_BIG_ENDIAN)
   99|       |      return typecast_copy<T>(in);
  100|       |#elif defined(BOTAN_TARGET_CPU_IS_LITTLE_ENDIAN)
  101|   318k|      return reverse_bytes(typecast_copy<T>(in));
  102|       |#else
  103|       |      return [&]<size_t... i>(std::index_sequence<i...>) {
  104|       |         return ((static_cast<T>(in[i]) << ((sizeof(T) - i - 1) * 8)) | ...);
  105|       |      }
  106|       |      (std::make_index_sequence<sizeof(T)>());
  107|       |#endif
  108|   318k|   }
  109|   318k|}
_ZN5Botan8store_beIjEEvT_Ph:
  408|     32|inline constexpr void store_be(T in, uint8_t out[sizeof(T)]) {
  409|     32|   store_be(in, std::span<uint8_t, sizeof(T)>(out, sizeof(T)));
  410|     32|}
_ZN5Botan8store_beIjNSt3__14spanIhLm4EEEEEvT_OT0_:
  358|     32|inline constexpr void store_be(T in, OutR&& out_range) {
  359|     32|   ranges::assert_exact_byte_length<sizeof(T)>(out_range);
  360|     32|   std::span out{out_range};
  361|     32|   if constexpr(sizeof(T) == 1) {
  ------------------
  |  Branch (361:17): [Folded - Ignored]
  ------------------
  362|     32|      out[0] = static_cast<uint8_t>(in);
  363|     32|   } else {
  364|       |#if defined(BOTAN_TARGET_CPU_IS_BIG_ENDIAN)
  365|       |      typecast_copy(out, in);
  366|       |#elif defined(BOTAN_TARGET_CPU_IS_LITTLE_ENDIAN)
  367|     32|      typecast_copy(out, reverse_bytes(in));
  368|       |#else
  369|       |      [&]<size_t... i>(std::index_sequence<i...>) {
  370|       |         ((out[i] = get_byte<i>(in)), ...);
  371|       |      }
  372|       |      (std::make_index_sequence<sizeof(T)>());
  373|       |#endif
  374|     32|   }
  375|     32|}
_ZN5Botan7load_beIjNSt3__14spanIKhLm4EEEEET_OT0_:
   92|    160|inline constexpr T load_be(InR&& in_range) {
   93|    160|   ranges::assert_exact_byte_length<sizeof(T)>(in_range);
   94|    160|   std::span in{in_range};
   95|    160|   if constexpr(sizeof(T) == 1) {
  ------------------
  |  Branch (95:17): [Folded - Ignored]
  ------------------
   96|    160|      return static_cast<T>(in[0]);
   97|    160|   } else {
   98|       |#if defined(BOTAN_TARGET_CPU_IS_BIG_ENDIAN)
   99|       |      return typecast_copy<T>(in);
  100|       |#elif defined(BOTAN_TARGET_CPU_IS_LITTLE_ENDIAN)
  101|    160|      return reverse_bytes(typecast_copy<T>(in));
  102|       |#else
  103|       |      return [&]<size_t... i>(std::index_sequence<i...>) {
  104|       |         return ((static_cast<T>(in[i]) << ((sizeof(T) - i - 1) * 8)) | ...);
  105|       |      }
  106|       |      (std::make_index_sequence<sizeof(T)>());
  107|       |#endif
  108|    160|   }
  109|    160|}
_ZN5Botan7load_beIjEET_PKhm:
  226|    160|inline constexpr T load_be(const uint8_t in[], size_t off) {
  227|       |   // asserts that *in points to the correct amount of memory
  228|    160|   return load_be<T>(std::span<const uint8_t, sizeof(T)>(in + off * sizeof(T), sizeof(T)));
  229|    160|}
_ZN5Botan7load_leIjEEvPT_PKhm:
  310|      2|inline constexpr void load_le(T out[], const uint8_t in[], size_t count) {
  311|      2|   if(count > 0) {
  ------------------
  |  Branch (311:7): [True: 2, False: 0]
  ------------------
  312|      2|#if defined(BOTAN_TARGET_CPU_IS_LITTLE_ENDIAN)
  313|      2|      typecast_copy(out, in, count);
  314|       |
  315|       |#elif defined(BOTAN_TARGET_CPU_IS_BIG_ENDIAN)
  316|       |      typecast_copy(out, in, count);
  317|       |
  318|       |      for(size_t i = 0; i != count; ++i)
  319|       |         out[i] = reverse_bytes(out[i]);
  320|       |#else
  321|       |      for(size_t i = 0; i != count; ++i)
  322|       |         out[i] = load_le<T>(in, i);
  323|       |#endif
  324|      2|   }
  325|      2|}
_ZN5Botan15copy_out_vec_beIjNS_16secure_allocatorIjEEEEvPhmRKNSt3__16vectorIT_T0_EE:
  521|      4|void copy_out_vec_be(uint8_t out[], size_t out_bytes, const std::vector<T, Alloc>& in) {
  522|      4|   copy_out_be(out, out_bytes, in.data());
  523|      4|}
_ZN5Botan11copy_out_beIjEEvPhmPKT_:
  507|      4|void copy_out_be(uint8_t out[], size_t out_bytes, const T in[]) {
  508|     36|   while(out_bytes >= sizeof(T)) {
  ------------------
  |  Branch (508:10): [True: 32, False: 4]
  ------------------
  509|     32|      store_be(in[0], out);
  510|     32|      out += sizeof(T);
  511|     32|      out_bytes -= sizeof(T);
  512|     32|      in += 1;
  513|     32|   }
  514|       |
  515|      4|   for(size_t i = 0; i != out_bytes; ++i) {
  ------------------
  |  Branch (515:22): [True: 0, False: 4]
  ------------------
  516|      0|      out[i] = get_byte_var(i % 8, in[0]);
  517|      0|   }
  518|      4|}

_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EEC2Ev:
   42|      1|      MerkleDamgard_Hash() { clear(); }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE5clearEv:
   70|      7|      void clear() {
   71|      7|         MD::init(m_digest);
   72|      7|         m_buffer.clear();
   73|      7|         m_count = 0;
   74|      7|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE6updateENSt3__14spanIKhLm18446744073709551615EEE:
   44|      9|      void update(std::span<const uint8_t> input) {
   45|      9|         BufferSlicer in(input);
   46|       |
   47|     18|         while(!in.empty()) {
  ------------------
  |  Branch (47:16): [True: 9, False: 9]
  ------------------
   48|      9|            if(const auto one_block = m_buffer.handle_unaligned_data(in)) {
  ------------------
  |  Branch (48:27): [True: 0, False: 9]
  ------------------
   49|      0|               MD::compress_n(m_digest, one_block.value(), 1);
   50|      0|            }
   51|       |
   52|      9|            if(m_buffer.in_alignment()) {
  ------------------
  |  Branch (52:16): [True: 6, False: 3]
  ------------------
   53|      6|               const auto [aligned_data, full_blocks] = m_buffer.aligned_data_to_process(in);
   54|      6|               if(full_blocks > 0) {
  ------------------
  |  Branch (54:19): [True: 6, False: 0]
  ------------------
   55|      6|                  MD::compress_n(m_digest, aligned_data, full_blocks);
   56|      6|               }
   57|      6|            }
   58|      9|         }
   59|       |
   60|      9|         m_count += input.size();
   61|      9|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE5finalENSt3__14spanIhLm18446744073709551615EEE:
   63|      4|      void final(std::span<uint8_t> output) {
   64|      4|         append_padding_bit();
   65|      4|         append_counter_and_finalize();
   66|      4|         copy_output(output);
   67|      4|         clear();
   68|      4|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE18append_padding_bitEv:
   77|      4|      void append_padding_bit() {
   78|      4|         BOTAN_ASSERT_NOMSG(!m_buffer.ready_to_consume());
  ------------------
  |  |   60|      4|   do {                                                                     \
  |  |   61|      4|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 4]
  |  |  ------------------
  |  |   62|      4|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|      4|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   79|      4|         if constexpr(MD::bit_endianness == MD_Endian::Big) {
  ------------------
  |  Branch (79:23): [Folded - Ignored]
  ------------------
   80|      4|            const uint8_t final_byte = 0x80;
   81|      4|            m_buffer.append({&final_byte, 1});
   82|      4|         } else {
   83|      4|            const uint8_t final_byte = 0x01;
   84|      4|            m_buffer.append({&final_byte, 1});
   85|      4|         }
   86|      4|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE27append_counter_and_finalizeEv:
   88|      4|      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|      4|         if(m_buffer.elements_until_alignment() < MD::ctr_bytes) {
  ------------------
  |  Branch (91:13): [True: 0, False: 4]
  ------------------
   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|      4|         BOTAN_ASSERT_NOMSG(m_buffer.elements_until_alignment() >= MD::ctr_bytes);
  ------------------
  |  |   60|      4|   do {                                                                     \
  |  |   61|      4|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 4]
  |  |  ------------------
  |  |   62|      4|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|      4|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   98|      4|         m_buffer.fill_up_with_zeros();
   99|       |
  100|       |         // Replace a bunch of the right-most zero-padding with the counter bytes.
  101|      4|         const uint64_t bit_count = m_count * 8;
  102|      4|         auto last_bytes = m_buffer.directly_modify_last(sizeof(bit_count));
  103|      4|         if constexpr(MD::byte_endianness == MD_Endian::Big) {
  ------------------
  |  Branch (103:23): [Folded - Ignored]
  ------------------
  104|      4|            store_be(bit_count, last_bytes.data());
  105|      4|         } else {
  106|      4|            store_le(bit_count, last_bytes.data());
  107|      4|         }
  108|       |
  109|       |         // Compress the very last block.
  110|      4|         MD::compress_n(m_digest, m_buffer.consume(), 1);
  111|      4|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE11copy_outputENSt3__14spanIhLm18446744073709551615EEE:
  113|      4|      void copy_output(std::span<uint8_t> output) {
  114|      4|         BOTAN_ASSERT_NOMSG(output.size() >= MD::output_bytes);
  ------------------
  |  |   60|      4|   do {                                                                     \
  |  |   61|      4|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 4]
  |  |  ------------------
  |  |   62|      4|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|      4|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  115|       |
  116|      4|         if constexpr(MD::byte_endianness == MD_Endian::Big) {
  ------------------
  |  Branch (116:23): [Folded - Ignored]
  ------------------
  117|      4|            copy_out_vec_be(output.data(), MD::output_bytes, m_digest);
  118|      4|         } else {
  119|      4|            copy_out_vec_le(output.data(), MD::output_bytes, m_digest);
  120|      4|         }
  121|      4|      }

_ZNK5Botan14Montgomery_Int19const_time_unpoisonEv:
  124|    741|      void const_time_unpoison() const { return m_v.const_time_unpoison(); }
_ZNK5Botan17Montgomery_Params1pEv:
  148|  1.48k|      const BigInt& p() const { return m_p; }
_ZNK5Botan17Montgomery_Params2R1Ev:
  150|    741|      const BigInt& R1() const { return m_r1; }
_ZNK5Botan17Montgomery_Params2R2Ev:
  152|    741|      const BigInt& R2() const { return m_r2; }
_ZNK5Botan17Montgomery_Params7p_wordsEv:
  158|  11.8k|      size_t p_words() const { return m_p_words; }

_ZN5Botan17monty_exp_vartimeERKNSt3__110shared_ptrIKNS_17Montgomery_ParamsEEERKNS_6BigIntES9_:
   51|    741|                                const BigInt& k) {
   52|    741|   auto precomputed = monty_precompute(params_p, g, 4, false);
   53|    741|   return monty_execute_vartime(*precomputed, k);
   54|    741|}

_ZN5Botan10word8_add2EPmPKmm:
  265|     43|inline word word8_add2(word x[8], const word y[8], word carry) {
  266|       |#if defined(BOTAN_MP_USE_X86_32_ASM)
  267|       |   asm(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB2_OP, "adcl"))
  268|       |       : [carry] "=r"(carry)
  269|       |       : [x] "r"(x), [y] "r"(y), "0"(carry)
  270|       |       : "cc", "memory");
  271|       |
  272|       |#elif defined(BOTAN_MP_USE_X86_64_ASM)
  273|       |
  274|     43|   asm(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB2_OP, "adcq"))
  275|     43|       : [carry] "=r"(carry)
  276|     43|       : [x] "r"(x), [y] "r"(y), "0"(carry)
  277|     43|       : "cc", "memory");
  278|       |
  279|       |#else
  280|       |   x[0] = word_add(x[0], y[0], &carry);
  281|       |   x[1] = word_add(x[1], y[1], &carry);
  282|       |   x[2] = word_add(x[2], y[2], &carry);
  283|       |   x[3] = word_add(x[3], y[3], &carry);
  284|       |   x[4] = word_add(x[4], y[4], &carry);
  285|       |   x[5] = word_add(x[5], y[5], &carry);
  286|       |   x[6] = word_add(x[6], y[6], &carry);
  287|       |   x[7] = word_add(x[7], y[7], &carry);
  288|       |#endif
  289|       |
  290|     43|   return carry;
  291|     43|}
_ZN5Botan8word_addEmmPm:
  237|   275M|inline word word_add(word x, word y, word* carry) {
  238|       |#if defined(BOTAN_MP_USE_X86_32_ASM)
  239|       |   asm(ADD_OR_SUBTRACT(ASM("adcl %[y],%[x]"))
  240|       |       : [x] "=r"(x), [carry] "=r"(*carry)
  241|       |       : "0"(x), [y] "rm"(y), "1"(*carry)
  242|       |       : "cc");
  243|       |   return x;
  244|       |
  245|       |#elif defined(BOTAN_MP_USE_X86_64_ASM)
  246|       |
  247|   275M|   asm(ADD_OR_SUBTRACT(ASM("adcq %[y],%[x]"))
  248|   275M|       : [x] "=r"(x), [carry] "=r"(*carry)
  249|   275M|       : "0"(x), [y] "rm"(y), "1"(*carry)
  250|   275M|       : "cc");
  251|   275M|   return x;
  252|       |
  253|       |#else
  254|       |   word z = x + y;
  255|       |   word c1 = (z < x);
  256|       |   z += *carry;
  257|       |   *carry = c1 | (z < *carry);
  258|       |   return z;
  259|       |#endif
  260|   275M|}
_ZN5Botan10word8_sub2EPmPKmm:
  353|    130|inline word word8_sub2(word x[8], const word y[8], word carry) {
  354|       |#if defined(BOTAN_MP_USE_X86_32_ASM)
  355|       |   asm(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB2_OP, "sbbl"))
  356|       |       : [carry] "=r"(carry)
  357|       |       : [x] "r"(x), [y] "r"(y), "0"(carry)
  358|       |       : "cc", "memory");
  359|       |
  360|       |#elif defined(BOTAN_MP_USE_X86_64_ASM)
  361|    130|   asm(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB2_OP, "sbbq"))
  362|    130|       : [carry] "=r"(carry)
  363|    130|       : [x] "r"(x), [y] "r"(y), "0"(carry)
  364|    130|       : "cc", "memory");
  365|       |
  366|       |#else
  367|       |   x[0] = word_sub(x[0], y[0], &carry);
  368|       |   x[1] = word_sub(x[1], y[1], &carry);
  369|       |   x[2] = word_sub(x[2], y[2], &carry);
  370|       |   x[3] = word_sub(x[3], y[3], &carry);
  371|       |   x[4] = word_sub(x[4], y[4], &carry);
  372|       |   x[5] = word_sub(x[5], y[5], &carry);
  373|       |   x[6] = word_sub(x[6], y[6], &carry);
  374|       |   x[7] = word_sub(x[7], y[7], &carry);
  375|       |#endif
  376|       |
  377|    130|   return carry;
  378|    130|}
_ZN5Botan8word_subEmmPm:
  326|   452M|inline word word_sub(word x, word y, word* carry) {
  327|       |#if defined(BOTAN_MP_USE_X86_32_ASM)
  328|       |   asm(ADD_OR_SUBTRACT(ASM("sbbl %[y],%[x]"))
  329|       |       : [x] "=r"(x), [carry] "=r"(*carry)
  330|       |       : "0"(x), [y] "rm"(y), "1"(*carry)
  331|       |       : "cc");
  332|       |   return x;
  333|       |
  334|       |#elif defined(BOTAN_MP_USE_X86_64_ASM)
  335|   452M|   asm(ADD_OR_SUBTRACT(ASM("sbbq %[y],%[x]"))
  336|   452M|       : [x] "=r"(x), [carry] "=r"(*carry)
  337|   452M|       : "0"(x), [y] "rm"(y), "1"(*carry)
  338|   452M|       : "cc");
  339|   452M|   return x;
  340|       |
  341|       |#else
  342|       |   word t0 = x - y;
  343|       |   word c1 = (t0 > x);
  344|       |   word z = t0 - *carry;
  345|       |   *carry = c1 | (z > t0);
  346|       |   return z;
  347|       |#endif
  348|   452M|}
_ZN5Botan14word8_sub2_revEPmPKmm:
  383|     12|inline word word8_sub2_rev(word x[8], const word y[8], word carry) {
  384|       |#if defined(BOTAN_MP_USE_X86_32_ASM)
  385|       |   asm(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB3_OP, "sbbl"))
  386|       |       : [carry] "=r"(carry)
  387|       |       : [x] "r"(y), [y] "r"(x), [z] "r"(x), "0"(carry)
  388|       |       : "cc", "memory");
  389|       |
  390|       |#elif defined(BOTAN_MP_USE_X86_64_ASM)
  391|     12|   asm(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB3_OP, "sbbq"))
  392|     12|       : [carry] "=r"(carry)
  393|     12|       : [x] "r"(y), [y] "r"(x), [z] "r"(x), "0"(carry)
  394|     12|       : "cc", "memory");
  395|       |
  396|       |#else
  397|       |   x[0] = word_sub(y[0], x[0], &carry);
  398|       |   x[1] = word_sub(y[1], x[1], &carry);
  399|       |   x[2] = word_sub(y[2], x[2], &carry);
  400|       |   x[3] = word_sub(y[3], x[3], &carry);
  401|       |   x[4] = word_sub(y[4], x[4], &carry);
  402|       |   x[5] = word_sub(y[5], x[5], &carry);
  403|       |   x[6] = word_sub(y[6], x[6], &carry);
  404|       |   x[7] = word_sub(y[7], x[7], &carry);
  405|       |#endif
  406|       |
  407|     12|   return carry;
  408|     12|}
_ZN5Botan10word8_sub3EPmPKmS2_m:
  413|     52|inline word word8_sub3(word z[8], const word x[8], const word y[8], word carry) {
  414|       |#if defined(BOTAN_MP_USE_X86_32_ASM)
  415|       |   asm(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB3_OP, "sbbl"))
  416|       |       : [carry] "=r"(carry)
  417|       |       : [x] "r"(x), [y] "r"(y), [z] "r"(z), "0"(carry)
  418|       |       : "cc", "memory");
  419|       |
  420|       |#elif defined(BOTAN_MP_USE_X86_64_ASM)
  421|     52|   asm(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB3_OP, "sbbq"))
  422|     52|       : [carry] "=r"(carry)
  423|     52|       : [x] "r"(x), [y] "r"(y), [z] "r"(z), "0"(carry)
  424|     52|       : "cc", "memory");
  425|       |
  426|       |#else
  427|       |   z[0] = word_sub(x[0], y[0], &carry);
  428|       |   z[1] = word_sub(x[1], y[1], &carry);
  429|       |   z[2] = word_sub(x[2], y[2], &carry);
  430|       |   z[3] = word_sub(x[3], y[3], &carry);
  431|       |   z[4] = word_sub(x[4], y[4], &carry);
  432|       |   z[5] = word_sub(x[5], y[5], &carry);
  433|       |   z[6] = word_sub(x[6], y[6], &carry);
  434|       |   z[7] = word_sub(x[7], y[7], &carry);
  435|       |#endif
  436|       |
  437|     52|   return carry;
  438|     52|}
_ZN5Botan13word8_linmul3EPmPKmmm:
  467|    102|inline word word8_linmul3(word z[8], const word x[8], word y, word carry) {
  468|       |#if defined(BOTAN_MP_USE_X86_32_ASM)
  469|       |   asm(DO_8_TIMES(LINMUL_OP, "z")
  470|       |       : [carry] "=r"(carry)
  471|       |       : [z] "r"(z), [x] "r"(x), [y] "rm"(y), "0"(carry)
  472|       |       : "cc", "%eax", "%edx");
  473|       |
  474|       |#elif defined(BOTAN_MP_USE_X86_64_ASM)
  475|    102|   asm(DO_8_TIMES(LINMUL_OP, "z")
  476|    102|       : [carry] "=r"(carry)
  477|    102|       : [z] "r"(z), [x] "r"(x), [y] "rm"(y), "0"(carry)
  478|    102|       : "cc", "%rax", "%rdx");
  479|       |
  480|       |#else
  481|       |   z[0] = word_madd2(x[0], y, &carry);
  482|       |   z[1] = word_madd2(x[1], y, &carry);
  483|       |   z[2] = word_madd2(x[2], y, &carry);
  484|       |   z[3] = word_madd2(x[3], y, &carry);
  485|       |   z[4] = word_madd2(x[4], y, &carry);
  486|       |   z[5] = word_madd2(x[5], y, &carry);
  487|       |   z[6] = word_madd2(x[6], y, &carry);
  488|       |   z[7] = word_madd2(x[7], y, &carry);
  489|       |#endif
  490|       |
  491|    102|   return carry;
  492|    102|}
_ZN5Botan10word_madd2EmmPm:
   44|  4.17M|inline word word_madd2(word a, word b, word* c) {
   45|       |#if defined(BOTAN_MP_USE_X86_32_ASM)
   46|       |   asm(R"(
   47|       |      mull %[b]
   48|       |      addl %[c],%[a]
   49|       |      adcl $0,%[carry]
   50|       |      )"
   51|       |       : [a] "=a"(a), [b] "=rm"(b), [carry] "=&d"(*c)
   52|       |       : "0"(a), "1"(b), [c] "g"(*c)
   53|       |       : "cc");
   54|       |
   55|       |   return a;
   56|       |
   57|       |#elif defined(BOTAN_MP_USE_X86_64_ASM)
   58|  4.17M|   asm(R"(
   59|  4.17M|      mulq %[b]
   60|  4.17M|      addq %[c],%[a]
   61|  4.17M|      adcq $0,%[carry]
   62|  4.17M|      )"
   63|  4.17M|       : [a] "=a"(a), [b] "=rm"(b), [carry] "=&d"(*c)
   64|  4.17M|       : "0"(a), "1"(b), [c] "g"(*c)
   65|  4.17M|       : "cc");
   66|       |
   67|  4.17M|   return a;
   68|       |
   69|       |#elif defined(BOTAN_MP_DWORD)
   70|       |   const BOTAN_MP_DWORD s = static_cast<BOTAN_MP_DWORD>(a) * b + *c;
   71|       |   *c = static_cast<word>(s >> BOTAN_MP_WORD_BITS);
   72|       |   return static_cast<word>(s);
   73|       |#else
   74|       |   static_assert(BOTAN_MP_WORD_BITS == 64, "Unexpected word size");
   75|       |
   76|       |   word hi = 0, lo = 0;
   77|       |
   78|       |   mul64x64_128(a, b, &lo, &hi);
   79|       |
   80|       |   lo += *c;
   81|       |   hi += (lo < *c);  // carry?
   82|       |
   83|       |   *c = hi;
   84|       |   return lo;
   85|       |#endif
   86|  4.17M|}
_ZN5Botan13word8_linmul2EPmmm:
  443|  11.9M|inline word word8_linmul2(word x[8], word y, word carry) {
  444|       |#if defined(BOTAN_MP_USE_X86_32_ASM)
  445|       |   asm(DO_8_TIMES(LINMUL_OP, "x") : [carry] "=r"(carry) : [x] "r"(x), [y] "rm"(y), "0"(carry) : "cc", "%eax", "%edx");
  446|       |
  447|       |#elif defined(BOTAN_MP_USE_X86_64_ASM)
  448|  11.9M|   asm(DO_8_TIMES(LINMUL_OP, "x") : [carry] "=r"(carry) : [x] "r"(x), [y] "rm"(y), "0"(carry) : "cc", "%rax", "%rdx");
  449|       |
  450|       |#else
  451|       |   x[0] = word_madd2(x[0], y, &carry);
  452|       |   x[1] = word_madd2(x[1], y, &carry);
  453|       |   x[2] = word_madd2(x[2], y, &carry);
  454|       |   x[3] = word_madd2(x[3], y, &carry);
  455|       |   x[4] = word_madd2(x[4], y, &carry);
  456|       |   x[5] = word_madd2(x[5], y, &carry);
  457|       |   x[6] = word_madd2(x[6], y, &carry);
  458|       |   x[7] = word_madd2(x[7], y, &carry);
  459|       |#endif
  460|       |
  461|  11.9M|   return carry;
  462|  11.9M|}
_ZN5Botan10word_madd3EmmmPm:
   91|  40.8k|inline word word_madd3(word a, word b, word c, word* d) {
   92|       |#if defined(BOTAN_MP_USE_X86_32_ASM)
   93|       |   asm(R"(
   94|       |      mull %[b]
   95|       |
   96|       |      addl %[c],%[a]
   97|       |      adcl $0,%[carry]
   98|       |
   99|       |      addl %[d],%[a]
  100|       |      adcl $0,%[carry]
  101|       |      )"
  102|       |       : [a] "=a"(a), [b] "=rm"(b), [carry] "=&d"(*d)
  103|       |       : "0"(a), "1"(b), [c] "g"(c), [d] "g"(*d)
  104|       |       : "cc");
  105|       |
  106|       |   return a;
  107|       |
  108|       |#elif defined(BOTAN_MP_USE_X86_64_ASM)
  109|  40.8k|   asm(R"(
  110|  40.8k|      mulq %[b]
  111|  40.8k|
  112|  40.8k|      addq %[c],%[a]
  113|  40.8k|      adcq $0,%[carry]
  114|  40.8k|
  115|  40.8k|      addq %[d],%[a]
  116|  40.8k|      adcq $0,%[carry]
  117|  40.8k|      )"
  118|  40.8k|       : [a] "=a"(a), [b] "=rm"(b), [carry] "=&d"(*d)
  119|  40.8k|       : "0"(a), "1"(b), [c] "g"(c), [d] "g"(*d)
  120|  40.8k|       : "cc");
  121|       |
  122|  40.8k|   return a;
  123|       |
  124|       |#elif defined(BOTAN_MP_DWORD)
  125|       |   const BOTAN_MP_DWORD s = static_cast<BOTAN_MP_DWORD>(a) * b + c + *d;
  126|       |   *d = static_cast<word>(s >> BOTAN_MP_WORD_BITS);
  127|       |   return static_cast<word>(s);
  128|       |#else
  129|       |   static_assert(BOTAN_MP_WORD_BITS == 64, "Unexpected word size");
  130|       |
  131|       |   word hi = 0, lo = 0;
  132|       |
  133|       |   mul64x64_128(a, b, &lo, &hi);
  134|       |
  135|       |   lo += c;
  136|       |   hi += (lo < c);  // carry?
  137|       |
  138|       |   lo += *d;
  139|       |   hi += (lo < *d);  // carry?
  140|       |
  141|       |   *d = hi;
  142|       |   return lo;
  143|       |#endif
  144|  40.8k|}
_ZN5Botan12word3_muladdEPmS0_S0_mm:
  528|   391M|inline void word3_muladd(word* w2, word* w1, word* w0, word x, word y) {
  529|       |#if defined(BOTAN_MP_USE_X86_32_ASM)
  530|       |   word z0 = 0, z1 = 0;
  531|       |
  532|       |   asm("mull %[y]" : "=a"(z0), "=d"(z1) : "a"(x), [y] "rm"(y) : "cc");
  533|       |
  534|       |   asm(R"(
  535|       |       addl %[z0],%[w0]
  536|       |       adcl %[z1],%[w1]
  537|       |       adcl $0,%[w2]
  538|       |       )"
  539|       |       : [w0] "=r"(*w0), [w1] "=r"(*w1), [w2] "=r"(*w2)
  540|       |       : [z0] "r"(z0), [z1] "r"(z1), "0"(*w0), "1"(*w1), "2"(*w2)
  541|       |       : "cc");
  542|       |
  543|       |#elif defined(BOTAN_MP_USE_X86_64_ASM)
  544|   391M|   word z0 = 0, z1 = 0;
  545|       |
  546|   391M|   asm("mulq %[y]" : "=a"(z0), "=d"(z1) : "a"(x), [y] "rm"(y) : "cc");
  547|       |
  548|   391M|   asm(R"(
  549|   391M|       addq %[z0],%[w0]
  550|   391M|       adcq %[z1],%[w1]
  551|   391M|       adcq $0,%[w2]
  552|   391M|       )"
  553|   391M|       : [w0] "=r"(*w0), [w1] "=r"(*w1), [w2] "=r"(*w2)
  554|   391M|       : [z0] "r"(z0), [z1] "r"(z1), "0"(*w0), "1"(*w1), "2"(*w2)
  555|   391M|       : "cc");
  556|       |
  557|       |#else
  558|       |   word carry = *w0;
  559|       |   *w0 = word_madd2(x, y, &carry);
  560|       |   *w1 += carry;
  561|       |   *w2 += (*w1 < carry);
  562|       |#endif
  563|   391M|}
_ZN5Botan9word3_addEPmS0_S0_m:
  569|  1.44M|inline void word3_add(word* w2, word* w1, word* w0, word x) {
  570|       |#if defined(BOTAN_MP_USE_X86_32_ASM)
  571|       |   asm(R"(
  572|       |      addl %[x],%[w0]
  573|       |      adcl $0,%[w1]
  574|       |      adcl $0,%[w2]
  575|       |      )"
  576|       |       : [w0] "=r"(*w0), [w1] "=r"(*w1), [w2] "=r"(*w2)
  577|       |       : [x] "r"(x), "0"(*w0), "1"(*w1), "2"(*w2)
  578|       |       : "cc");
  579|       |
  580|       |#elif defined(BOTAN_MP_USE_X86_64_ASM)
  581|  1.44M|   asm(R"(
  582|  1.44M|      addq %[x],%[w0]
  583|  1.44M|      adcq $0,%[w1]
  584|  1.44M|      adcq $0,%[w2]
  585|  1.44M|      )"
  586|  1.44M|       : [w0] "=r"(*w0), [w1] "=r"(*w1), [w2] "=r"(*w2)
  587|  1.44M|       : [x] "r"(x), "0"(*w0), "1"(*w1), "2"(*w2)
  588|  1.44M|       : "cc");
  589|       |
  590|       |#else
  591|       |   *w0 += x;
  592|       |   word c1 = (*w0 < x);
  593|       |   *w1 += c1;
  594|       |   word c2 = (*w1 < c1);
  595|       |   *w2 += c2;
  596|       |#endif
  597|  1.44M|}
_ZN5Botan14word3_muladd_2EPmS0_S0_mm:
  603|   129M|inline void word3_muladd_2(word* w2, word* w1, word* w0, word x, word y) {
  604|       |#if defined(BOTAN_MP_USE_X86_32_ASM)
  605|       |   word z0 = 0, z1 = 0;
  606|       |
  607|       |   asm("mull %[y]" : "=a"(z0), "=d"(z1) : "a"(x), [y] "rm"(y) : "cc");
  608|       |
  609|       |   asm(R"(
  610|       |      addl %[z0],%[w0]
  611|       |      adcl %[z1],%[w1]
  612|       |      adcl $0,%[w2]
  613|       |
  614|       |      addl %[z0],%[w0]
  615|       |      adcl %[z1],%[w1]
  616|       |      adcl $0,%[w2]
  617|       |      )"
  618|       |       : [w0] "=r"(*w0), [w1] "=r"(*w1), [w2] "=r"(*w2)
  619|       |       : [z0] "r"(z0), [z1] "r"(z1), "0"(*w0), "1"(*w1), "2"(*w2)
  620|       |       : "cc");
  621|       |
  622|       |#elif defined(BOTAN_MP_USE_X86_64_ASM)
  623|   129M|   word z0 = 0, z1 = 0;
  624|       |
  625|   129M|   asm("mulq %[y]" : "=a"(z0), "=d"(z1) : "a"(x), [y] "rm"(y) : "cc");
  626|       |
  627|   129M|   asm(R"(
  628|   129M|      addq %[z0],%[w0]
  629|   129M|      adcq %[z1],%[w1]
  630|   129M|      adcq $0,%[w2]
  631|   129M|
  632|   129M|      addq %[z0],%[w0]
  633|   129M|      adcq %[z1],%[w1]
  634|   129M|      adcq $0,%[w2]
  635|   129M|      )"
  636|   129M|       : [w0] "=r"(*w0), [w1] "=r"(*w1), [w2] "=r"(*w2)
  637|   129M|       : [z0] "r"(z0), [z1] "r"(z1), "0"(*w0), "1"(*w1), "2"(*w2)
  638|   129M|       : "cc");
  639|       |
  640|       |#else
  641|       |   word carry = 0;
  642|       |   x = word_madd2(x, y, &carry);
  643|       |   y = carry;
  644|       |
  645|       |   word top = (y >> (BOTAN_MP_WORD_BITS - 1));
  646|       |   y <<= 1;
  647|       |   y |= (x >> (BOTAN_MP_WORD_BITS - 1));
  648|       |   x <<= 1;
  649|       |
  650|       |   carry = 0;
  651|       |   *w0 = word_add(*w0, x, &carry);
  652|       |   *w1 = word_add(*w1, y, &carry);
  653|       |   *w2 = word_add(*w2, top, &carry);
  654|       |#endif
  655|   129M|}

_ZN5Botan11bigint_add2EPmmPKmm:
  259|  84.0k|inline void bigint_add2(word x[], size_t x_size, const word y[], size_t y_size) {
  260|  84.0k|   x[x_size] += bigint_add2_nc(x, x_size, y, y_size);
  261|  84.0k|}
_ZN5Botan14bigint_add2_ncEPmmPKmm:
  203|  84.0k|inline word bigint_add2_nc(word x[], size_t x_size, const word y[], size_t y_size) {
  204|  84.0k|   word carry = 0;
  205|       |
  206|  84.0k|   BOTAN_ASSERT(x_size >= y_size, "Expected sizes");
  ------------------
  |  |   51|  84.0k|   do {                                                                                 \
  |  |   52|  84.0k|      if(!(expr))                                                                       \
  |  |  ------------------
  |  |  |  Branch (52:10): [True: 0, False: 84.0k]
  |  |  ------------------
  |  |   53|  84.0k|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   54|  84.0k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (54:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  207|       |
  208|  84.0k|   const size_t blocks = y_size - (y_size % 8);
  209|       |
  210|  84.0k|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (210:22): [True: 43, False: 84.0k]
  ------------------
  211|     43|      carry = word8_add2(x + i, y + i, carry);
  212|     43|   }
  213|       |
  214|   149k|   for(size_t i = blocks; i != y_size; ++i) {
  ------------------
  |  Branch (214:27): [True: 65.7k, False: 84.0k]
  ------------------
  215|  65.7k|      x[i] = word_add(x[i], y[i], &carry);
  216|  65.7k|   }
  217|       |
  218|   709k|   for(size_t i = y_size; i != x_size; ++i) {
  ------------------
  |  Branch (218:27): [True: 625k, False: 84.0k]
  ------------------
  219|   625k|      x[i] = word_add(x[i], 0, &carry);
  220|   625k|   }
  221|       |
  222|  84.0k|   return carry;
  223|  84.0k|}
_ZN5Botan10bigint_cmpEPKmmS1_m:
  490|   203k|inline int32_t bigint_cmp(const word x[], size_t x_size, const word y[], size_t y_size) {
  491|   203k|   static_assert(sizeof(word) >= sizeof(uint32_t), "Size assumption");
  492|       |
  493|   203k|   const word LT = static_cast<word>(-1);
  494|   203k|   const word EQ = 0;
  495|   203k|   const word GT = 1;
  496|       |
  497|   203k|   const size_t common_elems = std::min(x_size, y_size);
  498|       |
  499|   203k|   word result = EQ;  // until found otherwise
  500|       |
  501|   815k|   for(size_t i = 0; i != common_elems; i++) {
  ------------------
  |  Branch (501:22): [True: 611k, False: 203k]
  ------------------
  502|   611k|      const auto is_eq = CT::Mask<word>::is_equal(x[i], y[i]);
  503|   611k|      const auto is_lt = CT::Mask<word>::is_lt(x[i], y[i]);
  504|       |
  505|   611k|      result = is_eq.select(result, is_lt.select(LT, GT));
  506|   611k|   }
  507|       |
  508|   203k|   if(x_size < y_size) {
  ------------------
  |  Branch (508:7): [True: 18.9k, False: 184k]
  ------------------
  509|  18.9k|      word mask = 0;
  510|  68.5k|      for(size_t i = x_size; i != y_size; i++) {
  ------------------
  |  Branch (510:30): [True: 49.6k, False: 18.9k]
  ------------------
  511|  49.6k|         mask |= y[i];
  512|  49.6k|      }
  513|       |
  514|       |      // If any bits were set in high part of y, then x < y
  515|  18.9k|      result = CT::Mask<word>::is_zero(mask).select(result, LT);
  516|   184k|   } else if(y_size < x_size) {
  ------------------
  |  Branch (516:14): [True: 17.0k, False: 167k]
  ------------------
  517|  17.0k|      word mask = 0;
  518|   110k|      for(size_t i = y_size; i != x_size; i++) {
  ------------------
  |  Branch (518:30): [True: 93.6k, False: 17.0k]
  ------------------
  519|  93.6k|         mask |= x[i];
  520|  93.6k|      }
  521|       |
  522|       |      // If any bits were set in high part of x, then x > y
  523|  17.0k|      result = CT::Mask<word>::is_zero(mask).select(result, GT);
  524|  17.0k|   }
  525|       |
  526|   203k|   CT::unpoison(result);
  527|   203k|   BOTAN_DEBUG_ASSERT(result == LT || result == GT || result == EQ);
  ------------------
  |  |   99|   203k|      do {                          \
  |  |  100|   203k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  528|   203k|   return static_cast<int32_t>(result);
  529|   203k|}
_ZN5Botan11bigint_sub2EPmmPKmm:
  273|  40.3M|inline word bigint_sub2(word x[], size_t x_size, const word y[], size_t y_size) {
  274|  40.3M|   word borrow = 0;
  275|       |
  276|  40.3M|   BOTAN_ASSERT(x_size >= y_size, "Expected sizes");
  ------------------
  |  |   51|  40.3M|   do {                                                                                 \
  |  |   52|  40.3M|      if(!(expr))                                                                       \
  |  |  ------------------
  |  |  |  Branch (52:10): [True: 0, False: 40.3M]
  |  |  ------------------
  |  |   53|  40.3M|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   54|  40.3M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (54:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  277|       |
  278|  40.3M|   const size_t blocks = y_size - (y_size % 8);
  279|       |
  280|  40.3M|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (280:22): [True: 130, False: 40.3M]
  ------------------
  281|    130|      borrow = word8_sub2(x + i, y + i, borrow);
  282|    130|   }
  283|       |
  284|   201M|   for(size_t i = blocks; i != y_size; ++i) {
  ------------------
  |  Branch (284:27): [True: 161M, False: 40.3M]
  ------------------
  285|   161M|      x[i] = word_sub(x[i], y[i], &borrow);
  286|   161M|   }
  287|       |
  288|  80.6M|   for(size_t i = y_size; i != x_size; ++i) {
  ------------------
  |  Branch (288:27): [True: 40.3M, False: 40.3M]
  ------------------
  289|  40.3M|      x[i] = word_sub(x[i], 0, &borrow);
  290|  40.3M|   }
  291|       |
  292|  40.3M|   return borrow;
  293|  40.3M|}
_ZN5Botan15bigint_sub2_revEPmPKmm:
  298|     14|inline void bigint_sub2_rev(word x[], const word y[], size_t y_size) {
  299|     14|   word borrow = 0;
  300|       |
  301|     14|   const size_t blocks = y_size - (y_size % 8);
  302|       |
  303|     26|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (303:22): [True: 12, False: 14]
  ------------------
  304|     12|      borrow = word8_sub2_rev(x + i, y + i, borrow);
  305|     12|   }
  306|       |
  307|     53|   for(size_t i = blocks; i != y_size; ++i) {
  ------------------
  |  Branch (307:27): [True: 39, False: 14]
  ------------------
  308|     39|      x[i] = word_sub(y[i], x[i], &borrow);
  309|     39|   }
  310|       |
  311|     14|   BOTAN_ASSERT(borrow == 0, "y must be greater than x");
  ------------------
  |  |   51|     14|   do {                                                                                 \
  |  |   52|     14|      if(!(expr))                                                                       \
  |  |  ------------------
  |  |  |  Branch (52:10): [True: 0, False: 14]
  |  |  ------------------
  |  |   53|     14|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   54|     14|   } while(0)
  |  |  ------------------
  |  |  |  Branch (54:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  312|     14|}
_ZN5Botan11bigint_sub3EPmPKmmS2_m:
  321|  40.8M|inline word bigint_sub3(word z[], const word x[], size_t x_size, const word y[], size_t y_size) {
  322|  40.8M|   word borrow = 0;
  323|       |
  324|  40.8M|   BOTAN_ASSERT(x_size >= y_size, "Expected sizes");
  ------------------
  |  |   51|  40.8M|   do {                                                                                 \
  |  |   52|  40.8M|      if(!(expr))                                                                       \
  |  |  ------------------
  |  |  |  Branch (52:10): [True: 0, False: 40.8M]
  |  |  ------------------
  |  |   53|  40.8M|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   54|  40.8M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (54:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  325|       |
  326|  40.8M|   const size_t blocks = y_size - (y_size % 8);
  327|       |
  328|  40.8M|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (328:22): [True: 52, False: 40.8M]
  ------------------
  329|     52|      borrow = word8_sub3(z + i, x + i, y + i, borrow);
  330|     52|   }
  331|       |
  332|   204M|   for(size_t i = blocks; i != y_size; ++i) {
  ------------------
  |  Branch (332:27): [True: 163M, False: 40.8M]
  ------------------
  333|   163M|      z[i] = word_sub(x[i], y[i], &borrow);
  334|   163M|   }
  335|       |
  336|  62.5M|   for(size_t i = y_size; i != x_size; ++i) {
  ------------------
  |  Branch (336:27): [True: 21.7M, False: 40.8M]
  ------------------
  337|  21.7M|      z[i] = word_sub(x[i], 0, &borrow);
  338|  21.7M|   }
  339|       |
  340|  40.8M|   return borrow;
  341|  40.8M|}
_ZN5Botan14bigint_add3_ncEPmPKmmS2_m:
  228|  1.91M|inline word bigint_add3_nc(word z[], const word x[], size_t x_size, const word y[], size_t y_size) {
  229|  1.91M|   if(x_size < y_size) {
  ------------------
  |  Branch (229:7): [True: 12.8k, False: 1.90M]
  ------------------
  230|  12.8k|      return bigint_add3_nc(z, y, y_size, x, x_size);
  231|  12.8k|   }
  232|       |
  233|  1.90M|   word carry = 0;
  234|       |
  235|  1.90M|   const size_t blocks = y_size - (y_size % 8);
  236|       |
  237|  1.90M|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (237:22): [True: 0, False: 1.90M]
  ------------------
  238|      0|      carry = word8_add3(z + i, x + i, y + i, carry);
  239|      0|   }
  240|       |
  241|  9.47M|   for(size_t i = blocks; i != y_size; ++i) {
  ------------------
  |  Branch (241:27): [True: 7.57M, False: 1.90M]
  ------------------
  242|  7.57M|      z[i] = word_add(x[i], y[i], &carry);
  243|  7.57M|   }
  244|       |
  245|  1.95M|   for(size_t i = y_size; i != x_size; ++i) {
  ------------------
  |  Branch (245:27): [True: 48.4k, False: 1.90M]
  ------------------
  246|  48.4k|      z[i] = word_add(x[i], 0, &carry);
  247|  48.4k|   }
  248|       |
  249|  1.90M|   return carry;
  250|  1.91M|}
_ZN5Botan15bigint_ct_is_ltEPKmmS1_mb:
  537|  16.8M|   const word x[], size_t x_size, const word y[], size_t y_size, bool lt_or_equal = false) {
  538|  16.8M|   const size_t common_elems = std::min(x_size, y_size);
  539|       |
  540|  16.8M|   auto is_lt = CT::Mask<word>::expand(lt_or_equal);
  541|       |
  542|  83.7M|   for(size_t i = 0; i != common_elems; i++) {
  ------------------
  |  Branch (542:22): [True: 66.8M, False: 16.8M]
  ------------------
  543|  66.8M|      const auto eq = CT::Mask<word>::is_equal(x[i], y[i]);
  544|  66.8M|      const auto lt = CT::Mask<word>::is_lt(x[i], y[i]);
  545|  66.8M|      is_lt = eq.select_mask(is_lt, lt);
  546|  66.8M|   }
  547|       |
  548|  16.8M|   if(x_size < y_size) {
  ------------------
  |  Branch (548:7): [True: 931, False: 16.8M]
  ------------------
  549|    931|      word mask = 0;
  550|  4.08k|      for(size_t i = x_size; i != y_size; i++) {
  ------------------
  |  Branch (550:30): [True: 3.15k, False: 931]
  ------------------
  551|  3.15k|         mask |= y[i];
  552|  3.15k|      }
  553|       |      // If any bits were set in high part of y, then is_lt should be forced true
  554|    931|      is_lt |= CT::Mask<word>::expand(mask);
  555|  16.8M|   } else if(y_size < x_size) {
  ------------------
  |  Branch (555:14): [True: 14.1k, False: 16.8M]
  ------------------
  556|  14.1k|      word mask = 0;
  557|  53.4k|      for(size_t i = y_size; i != x_size; i++) {
  ------------------
  |  Branch (557:30): [True: 39.2k, False: 14.1k]
  ------------------
  558|  39.2k|         mask |= x[i];
  559|  39.2k|      }
  560|       |
  561|       |      // If any bits were set in high part of x, then is_lt should be false
  562|  14.1k|      is_lt &= CT::Mask<word>::is_zero(mask);
  563|  14.1k|   }
  564|       |
  565|  16.8M|   return is_lt;
  566|  16.8M|}
_ZN5Botan17bigint_cnd_addsubENS_2CT4MaskImEEPmPKmS5_m:
  158|  16.4M|inline word bigint_cnd_addsub(CT::Mask<word> mask, word x[], const word y[], const word z[], size_t size) {
  159|  16.4M|   const size_t blocks = size - (size % 8);
  160|       |
  161|  16.4M|   word carry = 0;
  162|  16.4M|   word borrow = 0;
  163|       |
  164|  16.4M|   word t0[8] = {0};
  165|  16.4M|   word t1[8] = {0};
  166|       |
  167|  16.4M|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (167:22): [True: 0, False: 16.4M]
  ------------------
  168|      0|      carry = word8_add3(t0, x + i, y + i, carry);
  169|      0|      borrow = word8_sub3(t1, x + i, z + i, borrow);
  170|       |
  171|      0|      for(size_t j = 0; j != 8; ++j) {
  ------------------
  |  Branch (171:25): [True: 0, False: 0]
  ------------------
  172|      0|         x[i + j] = mask.select(t0[j], t1[j]);
  173|      0|      }
  174|      0|   }
  175|       |
  176|  82.4M|   for(size_t i = blocks; i != size; ++i) {
  ------------------
  |  Branch (176:27): [True: 65.9M, False: 16.4M]
  ------------------
  177|  65.9M|      t0[0] = word_add(x[i], y[i], &carry);
  178|  65.9M|      t1[0] = word_sub(x[i], z[i], &borrow);
  179|  65.9M|      x[i] = mask.select(t0[0], t1[0]);
  180|  65.9M|   }
  181|       |
  182|  16.4M|   return mask.select(carry, borrow);
  183|  16.4M|}
_ZN5Botan14bigint_sub_absEPmPKmmS2_m:
  604|  63.5k|inline int32_t bigint_sub_abs(word z[], const word x[], size_t x_size, const word y[], size_t y_size) {
  605|  63.5k|   const int32_t relative_size = bigint_cmp(x, x_size, y, y_size);
  606|       |
  607|       |   // Swap if relative_size == -1
  608|  63.5k|   const bool need_swap = relative_size < 0;
  609|  63.5k|   CT::conditional_swap_ptr(need_swap, x, y);
  610|  63.5k|   CT::conditional_swap(need_swap, x_size, y_size);
  611|       |
  612|       |   /*
  613|       |   * We know at this point that x >= y so if y_size is larger than
  614|       |   * x_size, we are guaranteed they are just leading zeros which can
  615|       |   * be ignored
  616|       |   */
  617|  63.5k|   y_size = std::min(x_size, y_size);
  618|       |
  619|  63.5k|   bigint_sub3(z, x, x_size, y, y_size);
  620|       |
  621|  63.5k|   return relative_size;
  622|  63.5k|}
_ZN5Botan14bigint_linmul3EPmPKmmm:
  468|  79.7k|inline void bigint_linmul3(word z[], const word x[], size_t x_size, word y) {
  469|  79.7k|   const size_t blocks = x_size - (x_size % 8);
  470|       |
  471|  79.7k|   word carry = 0;
  472|       |
  473|  79.9k|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (473:22): [True: 102, False: 79.7k]
  ------------------
  474|    102|      carry = word8_linmul3(z + i, x + i, y, carry);
  475|    102|   }
  476|       |
  477|   323k|   for(size_t i = blocks; i != x_size; ++i) {
  ------------------
  |  Branch (477:27): [True: 243k, False: 79.7k]
  ------------------
  478|   243k|      z[i] = word_madd2(x[i], y, &carry);
  479|   243k|   }
  480|       |
  481|  79.7k|   z[x_size] = carry;
  482|  79.7k|}
_ZN5Botan14bigint_linmul2EPmmm:
  452|  7.93M|[[nodiscard]] inline word bigint_linmul2(word x[], size_t x_size, word y) {
  453|  7.93M|   const size_t blocks = x_size - (x_size % 8);
  454|       |
  455|  7.93M|   word carry = 0;
  456|       |
  457|  19.9M|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (457:22): [True: 11.9M, False: 7.93M]
  ------------------
  458|  11.9M|      carry = word8_linmul2(x + i, y, carry);
  459|  11.9M|   }
  460|       |
  461|  11.5M|   for(size_t i = blocks; i != x_size; ++i) {
  ------------------
  |  Branch (461:27): [True: 3.63M, False: 7.93M]
  ------------------
  462|  3.63M|      x[i] = word_madd2(x[i], y, &carry);
  463|  3.63M|   }
  464|       |
  465|  7.93M|   return carry;
  466|  7.93M|}
_ZN5Botan20bigint_modop_vartimeEmmm:
  697|  23.8k|inline word bigint_modop_vartime(word n1, word n0, word d) {
  698|  23.8k|   if(d == 0) {
  ------------------
  |  Branch (698:7): [True: 0, False: 23.8k]
  ------------------
  699|      0|      throw Invalid_Argument("bigint_modop_vartime divide by zero");
  700|      0|   }
  701|       |
  702|  23.8k|#if defined(BOTAN_MP_DWORD)
  703|  23.8k|   return ((static_cast<BOTAN_MP_DWORD>(n1) << BOTAN_MP_WORD_BITS) | n0) % d;
  ------------------
  |  |   50|  23.8k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  704|       |#else
  705|       |   word z = bigint_divop_vartime(n1, n0, d);
  706|       |   word dummy = 0;
  707|       |   z = word_madd2(z, d, &dummy);
  708|       |   return (n0 - z);
  709|       |#endif
  710|  23.8k|}
_ZN5Botan11bigint_shl1EPmmmmm:
  382|   142k|inline void bigint_shl1(word x[], size_t x_size, size_t x_words, size_t word_shift, size_t bit_shift) {
  383|   142k|   copy_mem(x + word_shift, x, x_words);
  384|   142k|   clear_mem(x, word_shift);
  385|       |
  386|   142k|   const auto carry_mask = CT::Mask<word>::expand(bit_shift);
  387|   142k|   const word carry_shift = carry_mask.if_set_return(BOTAN_MP_WORD_BITS - bit_shift);
  ------------------
  |  |   50|   142k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  388|       |
  389|   142k|   word carry = 0;
  390|   644k|   for(size_t i = word_shift; i != x_size; ++i) {
  ------------------
  |  Branch (390:31): [True: 501k, False: 142k]
  ------------------
  391|   501k|      const word w = x[i];
  392|   501k|      x[i] = (w << bit_shift) | carry;
  393|   501k|      carry = carry_mask.if_set_return(w >> carry_shift);
  394|   501k|   }
  395|   142k|}
_ZN5Botan11bigint_shr1EPmmmm:
  397|   249k|inline void bigint_shr1(word x[], size_t x_size, size_t word_shift, size_t bit_shift) {
  398|   249k|   const size_t top = x_size >= word_shift ? (x_size - word_shift) : 0;
  ------------------
  |  Branch (398:23): [True: 249k, False: 214]
  ------------------
  399|       |
  400|   249k|   if(top > 0) {
  ------------------
  |  Branch (400:7): [True: 249k, False: 214]
  ------------------
  401|   249k|      copy_mem(x, x + word_shift, top);
  402|   249k|   }
  403|   249k|   clear_mem(x + top, std::min(word_shift, x_size));
  404|       |
  405|   249k|   const auto carry_mask = CT::Mask<word>::expand(bit_shift);
  406|   249k|   const word carry_shift = carry_mask.if_set_return(BOTAN_MP_WORD_BITS - bit_shift);
  ------------------
  |  |   50|   249k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  407|       |
  408|   249k|   word carry = 0;
  409|       |
  410|  2.24M|   for(size_t i = 0; i != top; ++i) {
  ------------------
  |  Branch (410:22): [True: 1.99M, False: 249k]
  ------------------
  411|  1.99M|      const word w = x[top - i - 1];
  412|  1.99M|      x[top - i - 1] = (w >> bit_shift) | carry;
  413|  1.99M|      carry = carry_mask.if_set_return(w << carry_shift);
  414|  1.99M|   }
  415|   249k|}
_ZN5Botan16bigint_mod_sub_nILm4EEEvPmPKmS3_S1_:
  648|  16.4M|inline void bigint_mod_sub_n(word t[], const word s[], const word mod[], word ws[]) {
  649|       |   // is t < s or not?
  650|  16.4M|   const auto is_lt = bigint_ct_is_lt(t, N, s, N);
  651|       |
  652|       |   // ws = p - s
  653|  16.4M|   const word borrow = bigint_sub3(ws, mod, N, s, N);
  654|       |
  655|       |   // Compute either (t - s) or (t + (p - s)) depending on mask
  656|  16.4M|   const word carry = bigint_cnd_addsub(is_lt, t, ws, s, N);
  657|       |
  658|  16.4M|   BOTAN_DEBUG_ASSERT(borrow == 0 && carry == 0);
  ------------------
  |  |   99|  16.4M|      do {                          \
  |  |  100|  16.4M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  659|  16.4M|   BOTAN_UNUSED(carry, borrow);
  ------------------
  |  |  118|  16.4M|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  660|  16.4M|}
_ZN5Botan15bigint_cnd_swapEmPmS0_m:
   29|   386k|inline void bigint_cnd_swap(word cnd, word x[], word y[], size_t size) {
   30|   386k|   const auto mask = CT::Mask<word>::expand(cnd);
   31|       |
   32|  3.47M|   for(size_t i = 0; i != size; ++i) {
  ------------------
  |  Branch (32:22): [True: 3.09M, False: 386k]
  ------------------
   33|  3.09M|      const word a = x[i];
   34|  3.09M|      const word b = y[i];
   35|  3.09M|      x[i] = mask.select(b, a);
   36|  3.09M|      y[i] = mask.select(a, b);
   37|  3.09M|   }
   38|   386k|}
_ZN5Botan14bigint_cnd_addEmPmmPKmm:
   40|  40.3M|inline word bigint_cnd_add(word cnd, word x[], word x_size, const word y[], size_t y_size) {
   41|  40.3M|   BOTAN_ASSERT(x_size >= y_size, "Expected sizes");
  ------------------
  |  |   51|  40.3M|   do {                                                                                 \
  |  |   52|  40.3M|      if(!(expr))                                                                       \
  |  |  ------------------
  |  |  |  Branch (52:10): [True: 0, False: 40.3M]
  |  |  ------------------
  |  |   53|  40.3M|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   54|  40.3M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (54:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   42|       |
   43|  40.3M|   const auto mask = CT::Mask<word>::expand(cnd);
   44|       |
   45|  40.3M|   word carry = 0;
   46|       |
   47|  40.3M|   const size_t blocks = y_size - (y_size % 8);
   48|  40.3M|   word z[8] = {0};
   49|       |
   50|  40.3M|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (50:22): [True: 0, False: 40.3M]
  ------------------
   51|      0|      carry = word8_add3(z, x + i, y + i, carry);
   52|      0|      mask.select_n(x + i, z, x + i, 8);
   53|      0|   }
   54|       |
   55|   201M|   for(size_t i = blocks; i != y_size; ++i) {
  ------------------
  |  Branch (55:27): [True: 161M, False: 40.3M]
  ------------------
   56|   161M|      z[0] = word_add(x[i], y[i], &carry);
   57|   161M|      x[i] = mask.select(z[0], x[i]);
   58|   161M|   }
   59|       |
   60|  80.6M|   for(size_t i = y_size; i != x_size; ++i) {
  ------------------
  |  Branch (60:27): [True: 40.3M, False: 40.3M]
  ------------------
   61|  40.3M|      z[0] = word_add(x[i], 0, &carry);
   62|  40.3M|      x[i] = mask.select(z[0], x[i]);
   63|  40.3M|   }
   64|       |
   65|  40.3M|   return mask.if_set_return(carry);
   66|  40.3M|}
_ZN5Botan11bigint_add3EPmPKmmS2_m:
  266|  14.6k|inline void bigint_add3(word z[], const word x[], size_t x_size, const word y[], size_t y_size) {
  267|  14.6k|   z[x_size > y_size ? x_size : y_size] += bigint_add3_nc(z, x, x_size, y, y_size);
  ------------------
  |  Branch (267:6): [True: 787, False: 13.8k]
  ------------------
  268|  14.6k|}
_ZN5Botan11bigint_shl2EPmPKmmmm:
  417|  71.4k|inline void bigint_shl2(word y[], const word x[], size_t x_size, size_t word_shift, size_t bit_shift) {
  418|  71.4k|   copy_mem(y + word_shift, x, x_size);
  419|       |
  420|  71.4k|   const auto carry_mask = CT::Mask<word>::expand(bit_shift);
  421|  71.4k|   const word carry_shift = carry_mask.if_set_return(BOTAN_MP_WORD_BITS - bit_shift);
  ------------------
  |  |   50|  71.4k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  422|       |
  423|  71.4k|   word carry = 0;
  424|   357k|   for(size_t i = word_shift; i != x_size + word_shift + 1; ++i) {
  ------------------
  |  Branch (424:31): [True: 286k, False: 71.4k]
  ------------------
  425|   286k|      const word w = y[i];
  426|   286k|      y[i] = (w << bit_shift) | carry;
  427|   286k|      carry = carry_mask.if_set_return(w >> carry_shift);
  428|   286k|   }
  429|  71.4k|}
_ZN5Botan11bigint_shr2EPmPKmmmm:
  431|    741|inline void bigint_shr2(word y[], const word x[], size_t x_size, size_t word_shift, size_t bit_shift) {
  432|    741|   const size_t new_size = x_size < word_shift ? 0 : (x_size - word_shift);
  ------------------
  |  Branch (432:28): [True: 0, False: 741]
  ------------------
  433|       |
  434|    741|   if(new_size > 0) {
  ------------------
  |  Branch (434:7): [True: 741, False: 0]
  ------------------
  435|    741|      copy_mem(y, x + word_shift, new_size);
  436|    741|   }
  437|       |
  438|    741|   const auto carry_mask = CT::Mask<word>::expand(bit_shift);
  439|    741|   const word carry_shift = carry_mask.if_set_return(BOTAN_MP_WORD_BITS - bit_shift);
  ------------------
  |  |   50|    741|#define BOTAN_MP_WORD_BITS 64
  ------------------
  440|       |
  441|    741|   word carry = 0;
  442|  3.70k|   for(size_t i = new_size; i > 0; --i) {
  ------------------
  |  Branch (442:29): [True: 2.96k, False: 741]
  ------------------
  443|  2.96k|      word w = y[i - 1];
  444|  2.96k|      y[i - 1] = (w >> bit_shift) | carry;
  445|  2.96k|      carry = carry_mask.if_set_return(w << carry_shift);
  446|  2.96k|   }
  447|    741|}
_ZN5Botan15bigint_ct_is_eqEPKmmS1_m:
  568|  19.8k|inline CT::Mask<word> bigint_ct_is_eq(const word x[], size_t x_size, const word y[], size_t y_size) {
  569|  19.8k|   const size_t common_elems = std::min(x_size, y_size);
  570|       |
  571|  19.8k|   word diff = 0;
  572|       |
  573|  99.4k|   for(size_t i = 0; i != common_elems; i++) {
  ------------------
  |  Branch (573:22): [True: 79.5k, False: 19.8k]
  ------------------
  574|  79.5k|      diff |= (x[i] ^ y[i]);
  575|  79.5k|   }
  576|       |
  577|       |   // If any bits were set in high part of x/y, then they are not equal
  578|  19.8k|   if(x_size < y_size) {
  ------------------
  |  Branch (578:7): [True: 0, False: 19.8k]
  ------------------
  579|      0|      for(size_t i = x_size; i != y_size; i++) {
  ------------------
  |  Branch (579:30): [True: 0, False: 0]
  ------------------
  580|      0|         diff |= y[i];
  581|      0|      }
  582|  19.8k|   } else if(y_size < x_size) {
  ------------------
  |  Branch (582:14): [True: 1, False: 19.8k]
  ------------------
  583|      2|      for(size_t i = y_size; i != x_size; i++) {
  ------------------
  |  Branch (583:30): [True: 1, False: 1]
  ------------------
  584|      1|         diff |= x[i];
  585|      1|      }
  586|      1|   }
  587|       |
  588|  19.8k|   return CT::Mask<word>::is_zero(diff);
  589|  19.8k|}
_ZN5Botan20bigint_divop_vartimeEmmm:
  665|  71.8k|inline word bigint_divop_vartime(word n1, word n0, word d) {
  666|  71.8k|   if(d == 0) {
  ------------------
  |  Branch (666:7): [True: 0, False: 71.8k]
  ------------------
  667|      0|      throw Invalid_Argument("bigint_divop_vartime divide by zero");
  668|      0|   }
  669|       |
  670|  71.8k|#if defined(BOTAN_MP_DWORD)
  671|  71.8k|   return static_cast<word>(((static_cast<BOTAN_MP_DWORD>(n1) << BOTAN_MP_WORD_BITS) | n0) / d);
  ------------------
  |  |   50|  71.8k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  672|       |#else
  673|       |
  674|       |   word high = n1 % d;
  675|       |   word quotient = 0;
  676|       |
  677|       |   for(size_t i = 0; i != BOTAN_MP_WORD_BITS; ++i) {
  678|       |      const word high_top_bit = high >> (BOTAN_MP_WORD_BITS - 1);
  679|       |
  680|       |      high <<= 1;
  681|       |      high |= (n0 >> (BOTAN_MP_WORD_BITS - 1 - i)) & 1;
  682|       |      quotient <<= 1;
  683|       |
  684|       |      if(high_top_bit || high >= d) {
  685|       |         high -= d;
  686|       |         quotient |= 1;
  687|       |      }
  688|       |   }
  689|       |
  690|       |   return quotient;
  691|       |#endif
  692|  71.8k|}
_ZN5Botan17bigint_monty_redcEPmPKmmmS0_m:
  757|   205k|inline void bigint_monty_redc(word z[], const word p[], size_t p_size, word p_dash, word ws[], size_t ws_size) {
  758|   205k|   const size_t z_size = 2 * p_size;
  759|       |
  760|   205k|   BOTAN_ARG_CHECK(ws_size >= p_size + 1, "Montgomery workspace too small");
  ------------------
  |  |   30|   205k|   do {                                                          \
  |  |   31|   205k|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 205k]
  |  |  ------------------
  |  |   32|   205k|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|   205k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  761|       |
  762|   205k|   if(p_size == 4) {
  ------------------
  |  Branch (762:7): [True: 205k, False: 0]
  ------------------
  763|   205k|      bigint_monty_redc_4(z, p, p_dash, ws);
  764|   205k|   } else if(p_size == 6) {
  ------------------
  |  Branch (764:14): [True: 0, False: 0]
  ------------------
  765|      0|      bigint_monty_redc_6(z, p, p_dash, ws);
  766|      0|   } else if(p_size == 8) {
  ------------------
  |  Branch (766:14): [True: 0, False: 0]
  ------------------
  767|      0|      bigint_monty_redc_8(z, p, p_dash, ws);
  768|      0|   } else if(p_size == 16) {
  ------------------
  |  Branch (768:14): [True: 0, False: 0]
  ------------------
  769|      0|      bigint_monty_redc_16(z, p, p_dash, ws);
  770|      0|   } else if(p_size == 24) {
  ------------------
  |  Branch (770:14): [True: 0, False: 0]
  ------------------
  771|      0|      bigint_monty_redc_24(z, p, p_dash, ws);
  772|      0|   } else if(p_size == 32) {
  ------------------
  |  Branch (772:14): [True: 0, False: 0]
  ------------------
  773|      0|      bigint_monty_redc_32(z, p, p_dash, ws);
  774|      0|   } else {
  775|      0|      bigint_monty_redc_generic(z, z_size, p, p_size, p_dash, ws);
  776|      0|   }
  777|   205k|}

_ZN5Botan4rotrILm18EjEET0_S1_:
   35|    640|{
   36|    640|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|    640|}
_ZN5Botan4rotrILm6EjEET0_S1_:
   35|    640|{
   36|    640|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|    640|}
_ZN5Botan4rotrILm2EjEET0_S1_:
   35|    640|{
   36|    640|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|    640|}
_ZN5Botan4rotrILm22EjEET0_S1_:
   35|    640|{
   36|    640|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|    640|}
_ZN5Botan4rotrILm7EjEET0_S1_:
   35|    640|{
   36|    640|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|    640|}
_ZN5Botan4rotrILm13EjEET0_S1_:
   35|    640|{
   36|    640|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|    640|}
_ZN5Botan3rhoILm2ELm13ELm22EjEET2_S1_:
   51|    640|inline constexpr T rho(T x) {
   52|    640|   return rotr<R1>(x) ^ rotr<R2>(x) ^ rotr<R3>(x);
   53|    640|}
_ZN5Botan3rhoILm6ELm11ELm25EjEET2_S1_:
   51|    640|inline constexpr T rho(T x) {
   52|    640|   return rotr<R1>(x) ^ rotr<R2>(x) ^ rotr<R3>(x);
   53|    640|}
_ZN5Botan4rotrILm11EjEET0_S1_:
   35|    640|{
   36|    640|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|    640|}
_ZN5Botan4rotrILm25EjEET0_S1_:
   35|    640|{
   36|    640|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|    640|}
_ZN5Botan5sigmaILm7ELm18ELm3EjEET2_S1_:
   43|    640|inline constexpr T sigma(T x) {
   44|    640|   return rotr<R1>(x) ^ rotr<R2>(x) ^ (x >> S);
   45|    640|}
_ZN5Botan5sigmaILm17ELm19ELm10EjEET2_S1_:
   43|    640|inline constexpr T sigma(T x) {
   44|    640|   return rotr<R1>(x) ^ rotr<R2>(x) ^ (x >> S);
   45|    640|}
_ZN5Botan4rotrILm17EjEET0_S1_:
   35|    640|{
   36|    640|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|    640|}
_ZN5Botan4rotrILm19EjEET0_S1_:
   35|    640|{
   36|    640|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|    640|}

_ZN5Botan8round_upEmm:
   21|   177k|inline size_t round_up(size_t n, size_t align_to) {
   22|   177k|   BOTAN_ARG_CHECK(align_to != 0, "align_to must not be 0");
  ------------------
  |  |   30|   177k|   do {                                                          \
  |  |   31|   177k|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 177k]
  |  |  ------------------
  |  |   32|   177k|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|   177k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   23|       |
   24|   177k|   if(n % align_to) {
  ------------------
  |  Branch (24:7): [True: 155k, False: 22.6k]
  ------------------
   25|   155k|      n += align_to - (n % align_to);
   26|   155k|   }
   27|   177k|   return n;
   28|   177k|}

_ZN5Botan11checked_mulEmm:
   47|  2.12M|inline std::optional<size_t> checked_mul(size_t x, size_t y) {
   48|  2.12M|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_add_overflow)
   49|  2.12M|   size_t z;
   50|  2.12M|   if(__builtin_mul_overflow(x, y, &z)) [[unlikely]]
  ------------------
  |  Branch (50:7): [True: 0, False: 2.12M]
  ------------------
   51|       |#elif defined(_MSC_VER)
   52|       |   size_t z;
   53|       |   if(SizeTMult(x, y, &z) != S_OK) [[unlikely]]
   54|       |#else
   55|       |   size_t z = x * y;
   56|       |   if(y && z / y != x) [[unlikely]]
   57|       |#endif
   58|      0|   {
   59|      0|      return std::nullopt;
   60|      0|   }
   61|  2.12M|   return z;
   62|  2.12M|}

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

_ZNK5Botan7SHA_25613output_lengthEv:
   75|      5|      size_t output_length() const override { return output_bytes; }
_ZNK5Botan7SHA_25615hash_block_sizeEv:
   77|      1|      size_t hash_block_size() const override { return block_bytes; }
_ZN5Botan7SHA_2565clearEv:
   83|      2|      void clear() override { m_md.clear(); }

_ZN5Botan9SHA2_32_FEjjjRjjjjS0_S0_jjjj:
   31|    640|                                  uint32_t magic) {
   32|    640|   uint32_t A_rho = rho<2, 13, 22>(A);
   33|    640|   uint32_t E_rho = rho<6, 11, 25>(E);
   34|    640|   uint32_t M2_sigma = sigma<17, 19, 10>(M2);
   35|    640|   uint32_t M4_sigma = sigma<7, 18, 3>(M4);
   36|    640|   H += magic + E_rho + choose(E, F, G) + M1;
   37|    640|   D += H;
   38|    640|   H += A_rho + majority(A, B, C);
   39|    640|   M1 += M2_sigma + M3 + M4_sigma;
   40|    640|}

_ZN5Botan9SIMD_4x32C2EDv2_x:
  597|      2|      explicit SIMD_4x32(native_simd_type x) noexcept : m_simd(x) {}
_ZN5Botan9SIMD_4x32C2Ejjjj:
  113|     96|      SIMD_4x32(uint32_t B0, uint32_t B1, uint32_t B2, uint32_t B3) noexcept {
  114|     96|#if defined(BOTAN_SIMD_USE_SSE2)
  115|     96|         m_simd = _mm_set_epi32(B3, B2, B1, B0);
  116|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  117|       |         __vector unsigned int val = {B0, B1, B2, B3};
  118|       |         m_simd = val;
  119|       |#elif defined(BOTAN_SIMD_USE_NEON)
  120|       |         // Better way to do this?
  121|       |         const uint32_t B[4] = {B0, B1, B2, B3};
  122|       |         m_simd = vld1q_u32(B);
  123|       |#endif
  124|     96|      }
_ZN5Botan9SIMD_4x328splat_u8Eh:
  142|      2|      static SIMD_4x32 splat_u8(uint8_t B) noexcept {
  143|      2|#if defined(BOTAN_SIMD_USE_SSE2)
  144|      2|         return SIMD_4x32(_mm_set1_epi8(B));
  145|       |#elif defined(BOTAN_SIMD_USE_NEON)
  146|       |         return SIMD_4x32(vreinterpretq_u32_u8(vdupq_n_u8(B)));
  147|       |#else
  148|       |         const uint32_t B4 = make_uint32(B, B, B, B);
  149|       |         return SIMD_4x32(B4, B4, B4, B4);
  150|       |#endif
  151|      2|      }

_ZN5Botan9SIMD_8x3215reset_registersEv:
  243|  4.96k|      static void reset_registers() noexcept { _mm256_zeroupper(); }
_ZN5Botan9SIMD_8x32C2EDv4_x:
  251|  1.82M|      SIMD_8x32(__m256i x) noexcept : m_avx2(x) {}
_ZN5Botan9SIMD_8x329transposeERS0_S1_S1_S1_:
  194|  19.8k|      static void transpose(SIMD_8x32& B0, SIMD_8x32& B1, SIMD_8x32& B2, SIMD_8x32& B3) noexcept {
  195|  19.8k|         const __m256i T0 = _mm256_unpacklo_epi32(B0.m_avx2, B1.m_avx2);
  196|  19.8k|         const __m256i T1 = _mm256_unpacklo_epi32(B2.m_avx2, B3.m_avx2);
  197|  19.8k|         const __m256i T2 = _mm256_unpackhi_epi32(B0.m_avx2, B1.m_avx2);
  198|  19.8k|         const __m256i T3 = _mm256_unpackhi_epi32(B2.m_avx2, B3.m_avx2);
  199|       |
  200|  19.8k|         B0.m_avx2 = _mm256_unpacklo_epi64(T0, T1);
  201|  19.8k|         B1.m_avx2 = _mm256_unpackhi_epi64(T0, T1);
  202|  19.8k|         B2.m_avx2 = _mm256_unpacklo_epi64(T2, T3);
  203|  19.8k|         B3.m_avx2 = _mm256_unpackhi_epi64(T2, T3);
  204|  19.8k|      }
_ZNK5Botan9SIMD_8x328store_leEPh:
   59|  79.4k|      void store_le(uint8_t out[]) const noexcept { _mm256_storeu_si256(reinterpret_cast<__m256i*>(out), m_avx2); }
_ZN5Botan9SIMD_8x3214zero_registersEv:
  246|  4.96k|      static void zero_registers() noexcept { _mm256_zeroall(); }
_ZN5Botan9SIMD_8x325splatEj:
   48|   158k|      static SIMD_8x32 splat(uint32_t B) noexcept { return SIMD_8x32(_mm256_set1_epi32(B)); }
_ZN5Botan9SIMD_8x32eOERKS0_:
  149|  1.58M|      void operator^=(const SIMD_8x32& other) { m_avx2 = _mm256_xor_si256(m_avx2, other.m_avx2); }
_ZNK5Botan9SIMD_8x324rotlILm7EEES0_v:
   67|   397k|      {
   68|       |#if defined(__AVX512VL__)
   69|       |         return SIMD_8x32(_mm256_rol_epi32(m_avx2, ROT));
   70|       |#else
   71|   397k|         if constexpr(ROT == 8) {
  ------------------
  |  Branch (71:23): [Folded - Ignored]
  ------------------
   72|   397k|            const __m256i shuf_rotl_8 =
   73|   397k|               _mm256_set_epi64x(0x0e0d0c0f'0a09080b, 0x06050407'02010003, 0x0e0d0c0f'0a09080b, 0x06050407'02010003);
   74|       |
   75|   397k|            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_8));
   76|   397k|         } else if constexpr(ROT == 16) {
  ------------------
  |  Branch (76:30): [Folded - Ignored]
  ------------------
   77|   397k|            const __m256i shuf_rotl_16 =
   78|   397k|               _mm256_set_epi64x(0x0d0c0f0e'09080b0a, 0x05040706'01000302, 0x0d0c0f0e'09080b0a, 0x05040706'01000302);
   79|       |
   80|   397k|            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_16));
   81|   397k|         } else {
   82|   397k|            return SIMD_8x32(_mm256_or_si256(_mm256_slli_epi32(m_avx2, static_cast<int>(ROT)),
   83|   397k|                                             _mm256_srli_epi32(m_avx2, static_cast<int>(32 - ROT))));
   84|   397k|         }
   85|   397k|#endif
   86|   397k|      }
_ZN5Botan9SIMD_8x32C2Ejjjjjjjj:
   43|  9.93k|                         uint32_t B7) noexcept {
   44|  9.93k|         m_avx2 = _mm256_set_epi32(B7, B6, B5, B4, B3, B2, B1, B0);
   45|  9.93k|      }
_ZNK5Botan9SIMD_8x32plERKS0_:
  108|  19.8k|      SIMD_8x32 operator+(const SIMD_8x32& other) const noexcept {
  109|  19.8k|         SIMD_8x32 retval(*this);
  110|  19.8k|         retval += other;
  111|  19.8k|         return retval;
  112|  19.8k|      }
_ZN5Botan9SIMD_8x32pLERKS0_:
  143|  1.68M|      void operator+=(const SIMD_8x32& other) { m_avx2 = _mm256_add_epi32(m_avx2, other.m_avx2); }
_ZN5Botan9SIMD_8x329transposeERS0_S1_S1_S1_S1_S1_S1_S1_:
  214|  9.93k|                            SIMD_8x32& B7) noexcept {
  215|  9.93k|         transpose(B0, B1, B2, B3);
  216|  9.93k|         transpose(B4, B5, B6, B7);
  217|       |
  218|  9.93k|         swap_tops(B0, B4);
  219|  9.93k|         swap_tops(B1, B5);
  220|  9.93k|         swap_tops(B2, B6);
  221|  9.93k|         swap_tops(B3, B7);
  222|  9.93k|      }
_ZNK5Botan9SIMD_8x326handleEv:
  248|   158k|      __m256i BOTAN_AVX2_FN handle() const noexcept { return m_avx2; }
_ZN5Botan9SIMD_8x329swap_topsERS0_S1_:
  255|  39.7k|      static void swap_tops(SIMD_8x32& A, SIMD_8x32& B) {
  256|  39.7k|         SIMD_8x32 T0 = _mm256_permute2x128_si256(A.handle(), B.handle(), 0 + (2 << 4));
  257|  39.7k|         SIMD_8x32 T1 = _mm256_permute2x128_si256(A.handle(), B.handle(), 1 + (3 << 4));
  258|  39.7k|         A = T0;
  259|  39.7k|         B = T1;
  260|  39.7k|      }
_ZNK5Botan9SIMD_8x324rotlILm16EEES0_v:
   67|   397k|      {
   68|       |#if defined(__AVX512VL__)
   69|       |         return SIMD_8x32(_mm256_rol_epi32(m_avx2, ROT));
   70|       |#else
   71|   397k|         if constexpr(ROT == 8) {
  ------------------
  |  Branch (71:23): [Folded - Ignored]
  ------------------
   72|   397k|            const __m256i shuf_rotl_8 =
   73|   397k|               _mm256_set_epi64x(0x0e0d0c0f'0a09080b, 0x06050407'02010003, 0x0e0d0c0f'0a09080b, 0x06050407'02010003);
   74|       |
   75|   397k|            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_8));
   76|   397k|         } else if constexpr(ROT == 16) {
  ------------------
  |  Branch (76:30): [Folded - Ignored]
  ------------------
   77|   397k|            const __m256i shuf_rotl_16 =
   78|   397k|               _mm256_set_epi64x(0x0d0c0f0e'09080b0a, 0x05040706'01000302, 0x0d0c0f0e'09080b0a, 0x05040706'01000302);
   79|       |
   80|   397k|            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_16));
   81|   397k|         } else {
   82|   397k|            return SIMD_8x32(_mm256_or_si256(_mm256_slli_epi32(m_avx2, static_cast<int>(ROT)),
   83|   397k|                                             _mm256_srli_epi32(m_avx2, static_cast<int>(32 - ROT))));
   84|   397k|         }
   85|   397k|#endif
   86|   397k|      }
_ZNK5Botan9SIMD_8x324rotlILm12EEES0_v:
   67|   397k|      {
   68|       |#if defined(__AVX512VL__)
   69|       |         return SIMD_8x32(_mm256_rol_epi32(m_avx2, ROT));
   70|       |#else
   71|   397k|         if constexpr(ROT == 8) {
  ------------------
  |  Branch (71:23): [Folded - Ignored]
  ------------------
   72|   397k|            const __m256i shuf_rotl_8 =
   73|   397k|               _mm256_set_epi64x(0x0e0d0c0f'0a09080b, 0x06050407'02010003, 0x0e0d0c0f'0a09080b, 0x06050407'02010003);
   74|       |
   75|   397k|            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_8));
   76|   397k|         } else if constexpr(ROT == 16) {
  ------------------
  |  Branch (76:30): [Folded - Ignored]
  ------------------
   77|   397k|            const __m256i shuf_rotl_16 =
   78|   397k|               _mm256_set_epi64x(0x0d0c0f0e'09080b0a, 0x05040706'01000302, 0x0d0c0f0e'09080b0a, 0x05040706'01000302);
   79|       |
   80|   397k|            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_16));
   81|   397k|         } else {
   82|   397k|            return SIMD_8x32(_mm256_or_si256(_mm256_slli_epi32(m_avx2, static_cast<int>(ROT)),
   83|   397k|                                             _mm256_srli_epi32(m_avx2, static_cast<int>(32 - ROT))));
   84|   397k|         }
   85|   397k|#endif
   86|   397k|      }
_ZNK5Botan9SIMD_8x324rotlILm8EEES0_v:
   67|   397k|      {
   68|       |#if defined(__AVX512VL__)
   69|       |         return SIMD_8x32(_mm256_rol_epi32(m_avx2, ROT));
   70|       |#else
   71|   397k|         if constexpr(ROT == 8) {
  ------------------
  |  Branch (71:23): [Folded - Ignored]
  ------------------
   72|   397k|            const __m256i shuf_rotl_8 =
   73|   397k|               _mm256_set_epi64x(0x0e0d0c0f'0a09080b, 0x06050407'02010003, 0x0e0d0c0f'0a09080b, 0x06050407'02010003);
   74|       |
   75|   397k|            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_8));
   76|   397k|         } else if constexpr(ROT == 16) {
   77|   397k|            const __m256i shuf_rotl_16 =
   78|   397k|               _mm256_set_epi64x(0x0d0c0f0e'09080b0a, 0x05040706'01000302, 0x0d0c0f0e'09080b0a, 0x05040706'01000302);
   79|       |
   80|   397k|            return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_16));
   81|   397k|         } else {
   82|   397k|            return SIMD_8x32(_mm256_or_si256(_mm256_slli_epi32(m_avx2, static_cast<int>(ROT)),
   83|   397k|                                             _mm256_srli_epi32(m_avx2, static_cast<int>(32 - ROT))));
   84|   397k|         }
   85|   397k|#endif
   86|   397k|      }

_ZN5Botan12BufferSlicerC2ENSt3__14spanIKhLm18446744073709551615EEE:
  143|     19|      BufferSlicer(std::span<const uint8_t> buffer) : m_remaining(buffer) {}
_ZN5Botan12BufferSlicer4takeEm:
  155|     19|      std::span<const uint8_t> take(const size_t count) {
  156|     19|         BOTAN_STATE_CHECK(remaining() >= count);
  ------------------
  |  |   42|     19|   do {                                                         \
  |  |   43|     19|      if(!(expr))                                               \
  |  |  ------------------
  |  |  |  Branch (43:10): [True: 0, False: 19]
  |  |  ------------------
  |  |   44|     19|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   45|     19|   } while(0)
  |  |  ------------------
  |  |  |  Branch (45:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  157|     19|         auto result = m_remaining.first(count);
  158|     19|         m_remaining = m_remaining.subspan(count);
  159|     19|         return result;
  160|     19|      }
_ZNK5Botan12BufferSlicer9remainingEv:
  184|     37|      size_t remaining() const { return m_remaining.size(); }
_ZNK5Botan12BufferSlicer5emptyEv:
  186|     18|      bool empty() const { return m_remaining.empty(); }

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

_ZN5Botan3OIDC2ESt16initializer_listIjE:
  229|    282|      explicit OID(std::initializer_list<uint32_t> init) : m_id(init) {
  230|    282|         BOTAN_ARG_CHECK(m_id.size() > 2 && m_id[0] <= 2 && (m_id[0] != 2 || m_id[1] <= 39), "Invalid OID");
  ------------------
  |  |   30|    282|   do {                                                          \
  |  |   31|  1.48k|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:12): [True: 282, False: 0]
  |  |  |  Branch (31:12): [True: 282, False: 0]
  |  |  |  Branch (31:12): [True: 209, False: 73]
  |  |  |  Branch (31:12): [True: 73, False: 0]
  |  |  ------------------
  |  |   32|    282|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|    282|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  231|    282|      }
_ZNK5Botan3OID9has_valueEv:
  271|      2|      bool has_value() const { return (m_id.empty() == false); }
_ZNK5Botan3OIDeqERKS0_:
  309|      1|      bool operator==(const OID& other) const { return m_id == other.m_id; }
_ZN5Botan11ASN1_ObjectC2Ev:
  117|    282|      ASN1_Object() = default;
_ZN5Botan11ASN1_ObjectD2Ev:
  120|    847|      virtual ~ASN1_Object() = default;
_ZN5Botan11ASN1_ObjectC2ERKS0_:
  118|    565|      ASN1_Object(const ASN1_Object&) = default;

_ZN5Botan13ignore_paramsIJRKmS2_EEEvDpOT_:
  114|  16.4M|void ignore_params(T&&... args) {
  115|  16.4M|   (ignore_param(args), ...);
  116|  16.4M|}
_ZN5Botan12ignore_paramIRKmEEvOT_:
  111|  33.3M|void ignore_param(T&&) {}
_ZN5Botan13ignore_paramsIJRmEEEvDpOT_:
  114|  22.8M|void ignore_params(T&&... args) {
  115|  22.8M|   (ignore_param(args), ...);
  116|  22.8M|}
_ZN5Botan12ignore_paramIRmEEvOT_:
  111|  22.8M|void ignore_param(T&&) {}
_ZN5Botan13ignore_paramsIJRKmEEEvDpOT_:
  114|   342k|void ignore_params(T&&... args) {
  115|   342k|   (ignore_param(args), ...);
  116|   342k|}
_ZN5Botan13ignore_paramsIJRNSt3__16vectorImNS_16secure_allocatorImEEEEEEEvDpOT_:
  114|  40.3M|void ignore_params(T&&... args) {
  115|  40.3M|   (ignore_param(args), ...);
  116|  40.3M|}
_ZN5Botan12ignore_paramIRNSt3__16vectorImNS_16secure_allocatorImEEEEEEvOT_:
  111|  40.3M|void ignore_param(T&&) {}
_ZN5Botan13ignore_paramsIJRlEEEvDpOT_:
  114|  40.3M|void ignore_params(T&&... args) {
  115|  40.3M|   (ignore_param(args), ...);
  116|  40.3M|}
_ZN5Botan12ignore_paramIRlEEvOT_:
  111|  40.3M|void ignore_param(T&&) {}

_ZN5Botan6BigIntC2ERKS0_:
   80|   427k|      BigInt(const BigInt& other) = default;
_ZN5Botan6BigIntC2Ev:
   40|  1.50M|      BigInt() = default;
_ZN5Botan6BigInt6decodeEPKhm:
  776|  2.49k|      static BigInt decode(const uint8_t buf[], size_t length) { return BigInt(buf, length); }
_ZN5BotanplERKNS_6BigIntES2_:
  958|  13.9k|inline BigInt operator+(const BigInt& x, const BigInt& y) {
  959|  13.9k|   return BigInt::add2(x, y.data(), y.sig_words(), y.sign());
  960|  13.9k|}
_ZNK5Botan6BigInt4dataEv:
  615|   140M|      const word* data() const { return m_data.const_data(); }
_ZNK5Botan6BigInt4Data10const_dataEv:
  839|   140M|            const word* const_data() const { return m_reg.data(); }
_ZNK5Botan6BigInt9sig_wordsEv:
  584|  35.1M|      size_t sig_words() const { return m_data.sig_words(); }
_ZNK5Botan6BigInt4Data9sig_wordsEv:
  933|  35.1M|            size_t sig_words() const {
  934|  35.1M|               if(m_sig_words == sig_words_npos) {
  ------------------
  |  Branch (934:19): [True: 7.02M, False: 28.0M]
  ------------------
  935|  7.02M|                  m_sig_words = calc_sig_words();
  936|  28.0M|               } else {
  937|  28.0M|                  BOTAN_DEBUG_ASSERT(m_sig_words == calc_sig_words());
  ------------------
  |  |   99|  28.0M|      do {                          \
  |  |  100|  28.0M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  938|  28.0M|               }
  939|  35.1M|               return m_sig_words;
  940|  35.1M|            }
_ZNK5Botan6BigInt4signEv:
  540|  81.1M|      Sign sign() const { return (m_signedness); }
_ZN5Botan6BigIntpLERKS0_:
  186|  78.0k|      BigInt& operator+=(const BigInt& y) { return add(y.data(), y.sig_words(), y.sign()); }
_ZN5Botan6BigIntaSEOS0_:
  153|   377k|      BigInt& operator=(BigInt&& other) {
  154|   377k|         if(this != &other) {
  ------------------
  |  Branch (154:13): [True: 377k, False: 0]
  ------------------
  155|   377k|            this->swap(other);
  156|   377k|         }
  157|       |
  158|   377k|         return (*this);
  159|   377k|      }
_ZN5Botan6BigInt4swapERS0_:
  170|  17.7M|      void swap(BigInt& other) {
  171|  17.7M|         m_data.swap(other.m_data);
  172|  17.7M|         std::swap(m_signedness, other.m_signedness);
  173|  17.7M|      }
_ZN5Botan6BigInt4Data4swapERS1_:
  921|  17.7M|            void swap(Data& other) {
  922|  17.7M|               m_reg.swap(other.m_reg);
  923|  17.7M|               std::swap(m_sig_words, other.m_sig_words);
  924|  17.7M|            }
_ZN5BotanltERKNS_6BigIntEm:
 1035|  6.93k|inline bool operator<(const BigInt& a, word b) {
 1036|  6.93k|   return (a.cmp_word(b) < 0);
 1037|  6.93k|}
_ZNK5Botan6BigInt7get_bitEm:
  467|  12.8M|      bool get_bit(size_t n) const { return ((word_at(n / BOTAN_MP_WORD_BITS) >> (n % BOTAN_MP_WORD_BITS)) & 1); }
  ------------------
  |  |   50|  12.8M|#define BOTAN_MP_WORD_BITS 64
  ------------------
                    bool get_bit(size_t n) const { return ((word_at(n / BOTAN_MP_WORD_BITS) >> (n % BOTAN_MP_WORD_BITS)) & 1); }
  ------------------
  |  |   50|  12.8M|#define BOTAN_MP_WORD_BITS 64
  ------------------
_ZNK5Botan6BigInt7word_atEm:
  518|  28.7M|      word word_at(size_t n) const { return m_data.get_word_at(n); }
_ZNK5Botan6BigInt4Data11get_word_atEm:
  848|  28.7M|            word get_word_at(size_t n) const {
  849|  28.7M|               if(n < m_reg.size()) {
  ------------------
  |  Branch (849:19): [True: 28.7M, False: 1.48k]
  ------------------
  850|  28.7M|                  return m_reg[n];
  851|  28.7M|               }
  852|  1.48k|               return 0;
  853|  28.7M|            }
_ZN5BotanmiERKNS_6BigIntES2_:
  970|  51.6k|inline BigInt operator-(const BigInt& x, const BigInt& y) {
  971|  51.6k|   return BigInt::add2(x, y.data(), y.sig_words(), y.reverse_sign());
  972|  51.6k|}
_ZNK5Botan6BigInt12reverse_signEv:
  545|  52.8k|      Sign reverse_sign() const {
  546|  52.8k|         if(sign() == Positive) {
  ------------------
  |  Branch (546:13): [True: 52.8k, False: 0]
  ------------------
  547|  52.8k|            return Negative;
  548|  52.8k|         }
  549|      0|         return Positive;
  550|  52.8k|      }
_ZNK5Botan6BigInt7is_zeroEv:
  428|  6.55M|      bool is_zero() const { return (sig_words() == 0); }
_ZN5Botan6BigIntD2Ev:
  148|  2.21M|      ~BigInt() { const_time_unpoison(); }
_ZNK5Botan6BigInt19const_time_unpoisonEv:
  726|  2.21M|      void const_time_unpoison() const {}
_ZN5Botan6BigInt4zeroEv:
   45|  79.6k|      static BigInt zero() { return BigInt(); }
_ZN5Botan6BigIntC2EOS0_:
  146|   226k|      BigInt(BigInt&& other) { this->swap(other); }
_ZN5Botan6BigInt8swap_regERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  177|  12.2M|      void swap_reg(secure_vector<word>& reg) {
  178|  12.2M|         m_data.swap(reg);
  179|       |         // sign left unchanged
  180|  12.2M|      }
_ZN5Botan6BigIntmIERKS0_:
  198|  71.8k|      BigInt& operator-=(const BigInt& y) { return sub(y.data(), y.sig_words(), y.sign()); }
_ZN5Botan6BigInt3subEPKmmNS0_4SignE:
  292|  71.8k|      BigInt& sub(const word y[], size_t y_words, Sign sign) {
  293|  71.8k|         return add(y, y_words, sign == Positive ? Negative : Positive);
  ------------------
  |  Branch (293:33): [True: 71.8k, False: 0]
  ------------------
  294|  71.8k|      }
_ZN5Botan6BigInt5clearEv:
  370|  94.1k|      void clear() {
  371|  94.1k|         m_data.set_to_zero();
  372|  94.1k|         m_signedness = Positive;
  373|  94.1k|      }
_ZNK5Botan6BigInt7is_evenEv:
  410|  1.98k|      bool is_even() const { return (get_bit(0) == 0); }
_ZNK5Botan6BigInt6is_oddEv:
  416|  1.24k|      bool is_odd() const { return (get_bit(0) == 1); }
_ZNK5Botan6BigInt10is_nonzeroEv:
  422|  5.96k|      bool is_nonzero() const { return (!is_zero()); }
_ZN5Botan6BigInt7set_bitEm:
  434|  68.6k|      void set_bit(size_t n) { conditionally_set_bit(n, true); }
_ZN5Botan6BigInt21conditionally_set_bitEmb:
  444|  13.1M|      void conditionally_set_bit(size_t n, bool set_it) {
  445|  13.1M|         const size_t which = n / BOTAN_MP_WORD_BITS;
  ------------------
  |  |   50|  13.1M|#define BOTAN_MP_WORD_BITS 64
  ------------------
  446|  13.1M|         const word mask = static_cast<word>(set_it) << (n % BOTAN_MP_WORD_BITS);
  ------------------
  |  |   50|  13.1M|#define BOTAN_MP_WORD_BITS 64
  ------------------
  447|  13.1M|         m_data.set_word_at(which, word_at(which) | mask);
  448|  13.1M|      }
_ZN5Botan6BigInt9mask_bitsEm:
  460|  40.3M|      void mask_bits(size_t n) { m_data.mask_bits(n); }
_ZN5Botan6BigInt11set_word_atEmm:
  520|  7.96M|      void set_word_at(size_t i, word w) { m_data.set_word_at(i, w); }
_ZN5Botan6BigInt9set_wordsEPKmm:
  522|  1.92M|      void set_words(const word w[], size_t len) { m_data.set_words(w, len); }
_ZNK5Botan6BigInt11is_negativeEv:
  528|  79.5M|      bool is_negative() const { return (sign() == Negative); }
_ZNK5Botan6BigInt11is_positiveEv:
  534|   421k|      bool is_positive() const { return (sign() == Positive); }
_ZN5Botan6BigInt9flip_signEv:
  555|  1.24k|      void flip_sign() { set_sign(reverse_sign()); }
_ZN5Botan6BigInt8set_signENS0_4SignE:
  561|   565k|      void set_sign(Sign sign) {
  562|   565k|         if(sign == Negative && is_zero()) {
  ------------------
  |  Branch (562:13): [True: 1.25k, False: 563k]
  |  Branch (562:33): [True: 0, False: 1.25k]
  ------------------
  563|      0|            sign = Positive;
  564|      0|         }
  565|       |
  566|   565k|         m_signedness = sign;
  567|   565k|      }
_ZNK5Botan6BigInt4sizeEv:
  578|   223M|      size_t size() const { return m_data.size(); }
_ZN5Botan6BigInt12mutable_dataEv:
  609|   187M|      word* mutable_data() { return m_data.mutable_data(); }
_ZN5Botan6BigInt15get_word_vectorEv:
  620|  5.88M|      secure_vector<word>& get_word_vector() { return m_data.mutable_vector(); }
_ZNK5Botan6BigInt7grow_toEm:
  631|  80.8M|      void grow_to(size_t n) const { m_data.grow_to(n); }
_ZN5Botan6BigInt10power_of_2Em:
  742|    741|      static BigInt power_of_2(size_t n) {
  743|    741|         BigInt b;
  744|    741|         b.set_bit(n);
  745|    741|         return b;
  746|    741|      }
_ZN5Botan6BigInt4Data12mutable_dataEv:
  834|   187M|            word* mutable_data() {
  835|   187M|               invalidate_sig_words();
  836|   187M|               return m_reg.data();
  837|   187M|            }
_ZN5Botan6BigInt4Data14mutable_vectorEv:
  841|  5.88M|            secure_vector<word>& mutable_vector() {
  842|  5.88M|               invalidate_sig_words();
  843|  5.88M|               return m_reg;
  844|  5.88M|            }
_ZN5Botan6BigInt4Data11set_word_atEmm:
  855|  21.1M|            void set_word_at(size_t i, word w) {
  856|  21.1M|               invalidate_sig_words();
  857|  21.1M|               if(i >= m_reg.size()) {
  ------------------
  |  Branch (857:19): [True: 8.00M, False: 13.1M]
  ------------------
  858|  8.00M|                  if(w == 0) {
  ------------------
  |  Branch (858:22): [True: 7.97M, False: 32.7k]
  ------------------
  859|  7.97M|                     return;
  860|  7.97M|                  }
  861|  32.7k|                  grow_to(i + 1);
  862|  32.7k|               }
  863|  13.1M|               m_reg[i] = w;
  864|  13.1M|            }
_ZN5Botan6BigInt4Data9set_wordsEPKmm:
  866|  1.92M|            void set_words(const word w[], size_t len) {
  867|  1.92M|               invalidate_sig_words();
  868|  1.92M|               m_reg.assign(w, w + len);
  869|  1.92M|            }
_ZN5Botan6BigInt4Data11set_to_zeroEv:
  871|  94.1k|            void set_to_zero() {
  872|  94.1k|               m_reg.resize(m_reg.capacity());
  873|  94.1k|               clear_mem(m_reg.data(), m_reg.size());
  874|  94.1k|               m_sig_words = 0;
  875|  94.1k|            }
_ZN5Botan6BigInt4Data9mask_bitsEm:
  883|  40.3M|            void mask_bits(size_t n) {
  884|  40.3M|               if(n == 0) {
  ------------------
  |  Branch (884:19): [True: 0, False: 40.3M]
  ------------------
  885|      0|                  return set_to_zero();
  886|      0|               }
  887|       |
  888|  40.3M|               const size_t top_word = n / BOTAN_MP_WORD_BITS;
  ------------------
  |  |   50|  40.3M|#define BOTAN_MP_WORD_BITS 64
  ------------------
  889|       |
  890|       |               // if(top_word < sig_words()) ?
  891|  40.3M|               if(top_word < size()) {
  ------------------
  |  Branch (891:19): [True: 40.3M, False: 107]
  ------------------
  892|  40.3M|                  const word mask = (static_cast<word>(1) << (n % BOTAN_MP_WORD_BITS)) - 1;
  ------------------
  |  |   50|  40.3M|#define BOTAN_MP_WORD_BITS 64
  ------------------
  893|  40.3M|                  const size_t len = size() - (top_word + 1);
  894|  40.3M|                  if(len > 0) {
  ------------------
  |  Branch (894:22): [True: 40.3M, False: 0]
  ------------------
  895|  40.3M|                     clear_mem(&m_reg[top_word + 1], len);
  896|  40.3M|                  }
  897|  40.3M|                  m_reg[top_word] &= mask;
  898|  40.3M|                  invalidate_sig_words();
  899|  40.3M|               }
  900|  40.3M|            }
_ZNK5Botan6BigInt4Data7grow_toEm:
  902|  80.9M|            void grow_to(size_t n) const {
  903|  80.9M|               if(n > size()) {
  ------------------
  |  Branch (903:19): [True: 2.83M, False: 78.1M]
  ------------------
  904|  2.83M|                  if(n <= m_reg.capacity()) {
  ------------------
  |  Branch (904:22): [True: 1.89M, False: 942k]
  ------------------
  905|  1.89M|                     m_reg.resize(n);
  906|  1.89M|                  } else {
  907|   942k|                     m_reg.resize(n + (8 - (n % 8)));
  908|   942k|                  }
  909|  2.83M|               }
  910|  80.9M|            }
_ZNK5Botan6BigInt4Data4sizeEv:
  912|   385M|            size_t size() const { return m_reg.size(); }
_ZN5Botan6BigInt4Data4swapERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  926|  12.3M|            void swap(secure_vector<word>& reg) {
  927|  12.3M|               m_reg.swap(reg);
  928|  12.3M|               invalidate_sig_words();
  929|  12.3M|            }
_ZNK5Botan6BigInt4Data20invalidate_sig_wordsEv:
  931|   269M|            void invalidate_sig_words() const { m_sig_words = sig_words_npos; }
_ZN5BotanplERKNS_6BigIntEm:
  962|    741|inline BigInt operator+(const BigInt& x, word y) {
  963|    741|   return BigInt::add2(x, &y, 1, BigInt::Positive);
  964|    741|}
_ZN5BotanmiERKNS_6BigIntEm:
  974|      1|inline BigInt operator-(const BigInt& x, word y) {
  975|      1|   return BigInt::add2(x, &y, 1, BigInt::Negative);
  976|      1|}
_ZN5BotanmlEmRKNS_6BigIntE:
  981|   143k|inline BigInt operator*(word x, const BigInt& y) {
  982|   143k|   return y * x;
  983|   143k|}
_ZN5BotaneqERKNS_6BigIntES2_:
  995|  19.8k|inline bool operator==(const BigInt& a, const BigInt& b) {
  996|  19.8k|   return a.is_equal(b);
  997|  19.8k|}
_ZN5BotanleERKNS_6BigIntES2_:
 1003|  16.4k|inline bool operator<=(const BigInt& a, const BigInt& b) {
 1004|  16.4k|   return (a.cmp(b) <= 0);
 1005|  16.4k|}
_ZN5BotangeERKNS_6BigIntES2_:
 1007|  10.4k|inline bool operator>=(const BigInt& a, const BigInt& b) {
 1008|  10.4k|   return (a.cmp(b) >= 0);
 1009|  10.4k|}
_ZN5BotanltERKNS_6BigIntES2_:
 1011|   107k|inline bool operator<(const BigInt& a, const BigInt& b) {
 1012|   107k|   return a.is_less_than(b);
 1013|   107k|}
_ZN5BotangtERKNS_6BigIntES2_:
 1015|  94.0k|inline bool operator>(const BigInt& a, const BigInt& b) {
 1016|  94.0k|   return b.is_less_than(a);
 1017|  94.0k|}
_ZN5BotaneqERKNS_6BigIntEm:
 1019|  41.0k|inline bool operator==(const BigInt& a, word b) {
 1020|  41.0k|   return (a.cmp_word(b) == 0);
 1021|  41.0k|}
_ZN5BotanleERKNS_6BigIntEm:
 1027|  1.24k|inline bool operator<=(const BigInt& a, word b) {
 1028|  1.24k|   return (a.cmp_word(b) <= 0);
 1029|  1.24k|}
_ZN5BotangeERKNS_6BigIntEm:
 1031|  1.24k|inline bool operator>=(const BigInt& a, word b) {
 1032|  1.24k|   return (a.cmp_word(b) >= 0);
 1033|  1.24k|}
_ZN5BotangtERKNS_6BigIntEm:
 1039|   113k|inline bool operator>(const BigInt& a, word b) {
 1040|   113k|   return (a.cmp_word(b) > 0);
 1041|   113k|}
_ZN5Botan6BigIntaSERKS0_:
  164|  2.16M|      BigInt& operator=(const BigInt&) = default;
_ZN5Botan6BigInt13binary_decodeINS_16secure_allocatorIhEEEEvRKNSt3__16vectorIhT_EE:
  682|  83.5k|      void binary_decode(const std::vector<uint8_t, Alloc>& buf) {
  683|  83.5k|         binary_decode(buf.data(), buf.size());
  684|  83.5k|      }

_ZN5Botan20Buffered_Computation6updateENSt3__14spanIKhLm18446744073709551615EEE:
   41|     10|      void update(std::span<const uint8_t> in) { add_data(in); }
_ZN5Botan20Buffered_Computation5finalENSt3__14spanIhLm18446744073709551615EEE:
   86|      4|      void final(std::span<uint8_t> out) {
   87|      4|         BOTAN_ARG_CHECK(out.size() >= output_length(), "provided output buffer has insufficient capacity");
  ------------------
  |  |   30|      4|   do {                                                          \
  |  |   31|      4|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 4]
  |  |  ------------------
  |  |   32|      4|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|      4|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   88|      4|         final_result(out);
   89|      4|      }
_ZN5Botan20Buffered_Computation5finalINSt3__16vectorIhNS_16secure_allocatorIhEEEEEET_v:
   78|      2|      T final() {
   79|      2|         T output(output_length());
   80|      2|         final_result(output);
   81|      2|         return output;
   82|      2|      }
_ZN5Botan20Buffered_ComputationD2Ev:
  134|      2|      virtual ~Buffered_Computation() = default;

_ZNK5Botan10ChaCha_RNG31max_number_of_bytes_per_requestEv:
  106|  83.5k|      size_t max_number_of_bytes_per_request() const override { return 0; }

_ZN5Botan6ranges24assert_exact_byte_lengthILm8ERNSt3__14spanIhLm8EEEEEvOT0_:
   86|      4|inline constexpr void assert_exact_byte_length(R&& r) {
   87|      4|   const std::span s{r};
   88|      4|   if constexpr(decltype(s)::extent != std::dynamic_extent) {
  ------------------
  |  Branch (88:17): [Folded - Ignored]
  ------------------
   89|      4|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   90|      4|   } else {
   91|      4|      BOTAN_ASSERT(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   92|      4|   }
   93|      4|}
_ZN5Botan6ranges25assert_equal_byte_lengthsIRNSt3__14spanIhLm8EEEJRNS3_IKmLm1EEEEEEvOT_DpOT0_:
  107|      4|{
  108|      4|   const std::span s0{r0};
  109|       |
  110|      4|   if constexpr(decltype(s0)::extent != std::dynamic_extent) {
  ------------------
  |  Branch (110:17): [Folded - Ignored]
  ------------------
  111|      4|      constexpr size_t expected_size = s0.size_bytes();
  112|      4|      (assert_exact_byte_length<expected_size>(rs), ...);
  113|      4|   } else {
  114|      4|      const size_t expected_size = s0.size_bytes();
  115|      4|      BOTAN_ARG_CHECK(((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...),
  116|      4|                      "memory regions don't have equal lengths");
  117|      4|   }
  118|      4|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ERNSt3__14spanIKmLm1EEEEEvOT0_:
   86|      4|inline constexpr void assert_exact_byte_length(R&& r) {
   87|      4|   const std::span s{r};
   88|      4|   if constexpr(decltype(s)::extent != std::dynamic_extent) {
  ------------------
  |  Branch (88:17): [Folded - Ignored]
  ------------------
   89|      4|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   90|      4|   } else {
   91|      4|      BOTAN_ASSERT(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   92|      4|   }
   93|      4|}
_ZN5Botan6ranges10size_bytesIRNSt3__14spanIhLm8EEEEEmOT_:
   73|      4|inline constexpr size_t size_bytes(spanable_range auto&& r) {
   74|      4|   return std::span{r}.size_bytes();
   75|      4|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ERNSt3__14spanIKhLm8EEEEEvOT0_:
   86|   637k|inline constexpr void assert_exact_byte_length(R&& r) {
   87|   637k|   const std::span s{r};
   88|   637k|   if constexpr(decltype(s)::extent != std::dynamic_extent) {
  ------------------
  |  Branch (88:17): [Folded - Ignored]
  ------------------
   89|   637k|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   90|   637k|   } else {
   91|   637k|      BOTAN_ASSERT(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   92|   637k|   }
   93|   637k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsIRNSt3__14spanImLm1EEEJRNS3_IKhLm8EEEEEEvOT_DpOT0_:
  107|   318k|{
  108|   318k|   const std::span s0{r0};
  109|       |
  110|   318k|   if constexpr(decltype(s0)::extent != std::dynamic_extent) {
  ------------------
  |  Branch (110:17): [Folded - Ignored]
  ------------------
  111|   318k|      constexpr size_t expected_size = s0.size_bytes();
  112|   318k|      (assert_exact_byte_length<expected_size>(rs), ...);
  113|   318k|   } else {
  114|   318k|      const size_t expected_size = s0.size_bytes();
  115|   318k|      BOTAN_ARG_CHECK(((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...),
  116|   318k|                      "memory regions don't have equal lengths");
  117|   318k|   }
  118|   318k|}
_ZN5Botan6ranges10size_bytesIRNSt3__14spanImLm1EEEEEmOT_:
   73|   318k|inline constexpr size_t size_bytes(spanable_range auto&& r) {
   74|   318k|   return std::span{r}.size_bytes();
   75|   318k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ERNSt3__14spanIhLm4EEEEEvOT0_:
   86|     32|inline constexpr void assert_exact_byte_length(R&& r) {
   87|     32|   const std::span s{r};
   88|     32|   if constexpr(decltype(s)::extent != std::dynamic_extent) {
  ------------------
  |  Branch (88:17): [Folded - Ignored]
  ------------------
   89|     32|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   90|     32|   } else {
   91|     32|      BOTAN_ASSERT(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   92|     32|   }
   93|     32|}
_ZN5Botan6ranges25assert_equal_byte_lengthsIRNSt3__14spanIhLm4EEEJRNS3_IKjLm1EEEEEEvOT_DpOT0_:
  107|     32|{
  108|     32|   const std::span s0{r0};
  109|       |
  110|     32|   if constexpr(decltype(s0)::extent != std::dynamic_extent) {
  ------------------
  |  Branch (110:17): [Folded - Ignored]
  ------------------
  111|     32|      constexpr size_t expected_size = s0.size_bytes();
  112|     32|      (assert_exact_byte_length<expected_size>(rs), ...);
  113|     32|   } else {
  114|     32|      const size_t expected_size = s0.size_bytes();
  115|     32|      BOTAN_ARG_CHECK(((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...),
  116|     32|                      "memory regions don't have equal lengths");
  117|     32|   }
  118|     32|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ERNSt3__14spanIKjLm1EEEEEvOT0_:
   86|     32|inline constexpr void assert_exact_byte_length(R&& r) {
   87|     32|   const std::span s{r};
   88|     32|   if constexpr(decltype(s)::extent != std::dynamic_extent) {
  ------------------
  |  Branch (88:17): [Folded - Ignored]
  ------------------
   89|     32|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   90|     32|   } else {
   91|     32|      BOTAN_ASSERT(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   92|     32|   }
   93|     32|}
_ZN5Botan6ranges10size_bytesIRNSt3__14spanIhLm4EEEEEmOT_:
   73|     32|inline constexpr size_t size_bytes(spanable_range auto&& r) {
   74|     32|   return std::span{r}.size_bytes();
   75|     32|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ERNSt3__14spanIKhLm4EEEEEvOT0_:
   86|    320|inline constexpr void assert_exact_byte_length(R&& r) {
   87|    320|   const std::span s{r};
   88|    320|   if constexpr(decltype(s)::extent != std::dynamic_extent) {
  ------------------
  |  Branch (88:17): [Folded - Ignored]
  ------------------
   89|    320|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   90|    320|   } else {
   91|    320|      BOTAN_ASSERT(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   92|    320|   }
   93|    320|}
_ZN5Botan6ranges25assert_equal_byte_lengthsIRNSt3__14spanIjLm1EEEJRNS3_IKhLm4EEEEEEvOT_DpOT0_:
  107|    160|{
  108|    160|   const std::span s0{r0};
  109|       |
  110|    160|   if constexpr(decltype(s0)::extent != std::dynamic_extent) {
  ------------------
  |  Branch (110:17): [Folded - Ignored]
  ------------------
  111|    160|      constexpr size_t expected_size = s0.size_bytes();
  112|    160|      (assert_exact_byte_length<expected_size>(rs), ...);
  113|    160|   } else {
  114|    160|      const size_t expected_size = s0.size_bytes();
  115|    160|      BOTAN_ARG_CHECK(((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...),
  116|    160|                      "memory regions don't have equal lengths");
  117|    160|   }
  118|    160|}
_ZN5Botan6ranges10size_bytesIRNSt3__14spanIjLm1EEEEEmOT_:
   73|    160|inline constexpr size_t size_bytes(spanable_range auto&& r) {
   74|    160|   return std::span{r}.size_bytes();
   75|    160|}
_ZN5Botan6ranges25assert_equal_byte_lengthsIRNSt3__14spanIjLm18446744073709551615EEEJRNS3_IKhLm18446744073709551615EEEEEEvOT_DpOT0_:
  107|      2|{
  108|      2|   const std::span s0{r0};
  109|       |
  110|      2|   if constexpr(decltype(s0)::extent != std::dynamic_extent) {
  ------------------
  |  Branch (110:17): [Folded - Ignored]
  ------------------
  111|      2|      constexpr size_t expected_size = s0.size_bytes();
  112|      2|      (assert_exact_byte_length<expected_size>(rs), ...);
  113|      2|   } else {
  114|      2|      const size_t expected_size = s0.size_bytes();
  115|      2|      BOTAN_ARG_CHECK(((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...),
  ------------------
  |  |   30|      2|   do {                                                          \
  |  |   31|      2|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 2]
  |  |  ------------------
  |  |   32|      2|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|      2|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  116|      2|                      "memory regions don't have equal lengths");
  117|      2|   }
  118|      2|}
_ZN5Botan6ranges10size_bytesIRNSt3__14spanIjLm18446744073709551615EEEEEmOT_:
   73|      2|inline constexpr size_t size_bytes(spanable_range auto&& r) {
   74|      2|   return std::span{r}.size_bytes();
   75|      2|}

_ZN5Botan8CurveGFpC2ERKS0_:
  100|   107k|      CurveGFp(const CurveGFp&) = default;
_ZNK5Botan8CurveGFp5get_pEv:
  118|  2.91M|      const BigInt& get_p() const { return m_repr->get_p(); }
_ZNK5Botan13CurveGFp_Repr9curve_mulERNS_6BigIntERKS1_S4_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   60|  15.6M|      void curve_mul(BigInt& z, const BigInt& x, const BigInt& y, secure_vector<word>& ws) const {
   61|  15.6M|         BOTAN_DEBUG_ASSERT(x.sig_words() <= get_p_words());
  ------------------
  |  |   99|  15.6M|      do {                          \
  |  |  100|  15.6M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
   62|  15.6M|         curve_mul_words(z, x.data(), x.size(), y, ws);
   63|  15.6M|      }
_ZNK5Botan13CurveGFp_Repr9curve_sqrERNS_6BigIntERKS1_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   68|  20.8M|      void curve_sqr(BigInt& z, const BigInt& x, secure_vector<word>& ws) const {
   69|  20.8M|         BOTAN_DEBUG_ASSERT(x.sig_words() <= get_p_words());
  ------------------
  |  |   99|  20.8M|      do {                          \
  |  |  100|  20.8M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
   70|  20.8M|         curve_sqr_words(z, x.data(), x.size(), ws);
   71|  20.8M|      }
_ZN5Botan8CurveGFpC2ERKNS_6BigIntES3_S3_:
   98|      1|      CurveGFp(const BigInt& p, const BigInt& a, const BigInt& b) : m_repr(choose_repr(p, a, b)) {}
_ZNK5Botan8CurveGFp5get_aEv:
  107|  1.24k|      const BigInt& get_a() const { return m_repr->get_a(); }
_ZNK5Botan8CurveGFp5get_bEv:
  112|  1.24k|      const BigInt& get_b() const { return m_repr->get_b(); }
_ZNK5Botan8CurveGFp11get_p_wordsEv:
  120|   197k|      size_t get_p_words() const { return m_repr->get_p_words(); }
_ZNK5Botan8CurveGFp11get_ws_sizeEv:
  122|  2.89M|      size_t get_ws_size() const { return m_repr->get_ws_size(); }
_ZNK5Botan8CurveGFp9get_1_repEv:
  128|  21.9k|      const BigInt& get_1_rep() const { return m_repr->get_1_rep(); }
_ZNK5Botan8CurveGFp12a_is_minus_3Ev:
  130|  1.88M|      bool a_is_minus_3() const { return m_repr->a_is_minus_3(); }
_ZNK5Botan8CurveGFp9a_is_zeroEv:
  132|  1.88M|      bool a_is_zero() const { return m_repr->a_is_zero(); }
_ZNK5Botan8CurveGFp6is_oneERKNS_6BigIntE:
  134|  39.7k|      bool is_one(const BigInt& x) const { return m_repr->is_one(x); }
_ZNK5Botan8CurveGFp14invert_elementERKNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  136|  39.7k|      BigInt invert_element(const BigInt& x, secure_vector<word>& ws) const { return m_repr->invert_element(x, ws); }
_ZNK5Botan8CurveGFp6to_repERNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  138|  1.47k|      void to_rep(BigInt& x, secure_vector<word>& ws) const { m_repr->to_curve_rep(x, ws); }
_ZNK5Botan8CurveGFp8from_repERNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  140|  39.7k|      void from_rep(BigInt& x, secure_vector<word>& ws) const { m_repr->from_curve_rep(x, ws); }
_ZNK5Botan8CurveGFp15from_rep_to_tmpERKNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  142|     50|      BigInt from_rep_to_tmp(const BigInt& x, secure_vector<word>& ws) const {
  143|     50|         BigInt xt(x);
  144|     50|         m_repr->from_curve_rep(xt, ws);
  145|     50|         return xt;
  146|     50|      }
_ZNK5Botan8CurveGFp3mulERNS_6BigIntERKS1_S4_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  150|  15.0M|      void mul(BigInt& z, const BigInt& x, const BigInt& y, secure_vector<word>& ws) const {
  151|  15.0M|         m_repr->curve_mul(z, x, y, ws);
  152|  15.0M|      }
_ZNK5Botan8CurveGFp3mulERNS_6BigIntEPKmmRKS1_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  154|  3.19M|      void mul(BigInt& z, const word x_w[], size_t x_size, const BigInt& y, secure_vector<word>& ws) const {
  155|  3.19M|         m_repr->curve_mul_words(z, x_w, x_size, y, ws);
  156|  3.19M|      }
_ZNK5Botan8CurveGFp3sqrERNS_6BigIntERKS1_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  158|  10.6M|      void sqr(BigInt& z, const BigInt& x, secure_vector<word>& ws) const { m_repr->curve_sqr(z, x, ws); }
_ZNK5Botan8CurveGFp3sqrERNS_6BigIntEPKmmRNSt3__16vectorImNS_16secure_allocatorImEEEE:
  160|   591k|      void sqr(BigInt& z, const word x_w[], size_t x_size, secure_vector<word>& ws) const {
  161|   591k|         m_repr->curve_sqr_words(z, x_w, x_size, ws);
  162|   591k|      }
_ZNK5Botan8CurveGFp10mul_to_tmpERKNS_6BigIntES3_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  168|  55.4k|      BigInt mul_to_tmp(const BigInt& x, const BigInt& y, secure_vector<word>& ws) const {
  169|  55.4k|         BigInt z;
  170|  55.4k|         m_repr->curve_mul(z, x, y, ws);
  171|  55.4k|         return z;
  172|  55.4k|      }
_ZNK5Botan8CurveGFp10sqr_to_tmpERKNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  174|  47.9k|      BigInt sqr_to_tmp(const BigInt& x, secure_vector<word>& ws) const {
  175|  47.9k|         BigInt z;
  176|  47.9k|         m_repr->curve_sqr(z, x, ws);
  177|  47.9k|         return z;
  178|  47.9k|      }
_ZN5Botan8CurveGFp4swapERS0_:
  180|  67.9k|      void swap(CurveGFp& other) { std::swap(m_repr, other.m_repr); }
_ZNK5Botan8CurveGFpeqERKS0_:
  189|   207k|      inline bool operator==(const CurveGFp& other) const {
  190|   207k|         if(m_repr.get() == other.m_repr.get()) {
  ------------------
  |  Branch (190:13): [True: 207k, False: 0]
  ------------------
  191|   207k|            return true;
  192|   207k|         }
  193|       |
  194|      0|         return (get_p() == other.get_p()) && (get_a() == other.get_a()) && (get_b() == other.get_b());
  ------------------
  |  Branch (194:17): [True: 0, False: 0]
  |  Branch (194:47): [True: 0, False: 0]
  |  Branch (194:77): [True: 0, False: 0]
  ------------------
  195|   207k|      }
_ZN5BotanneERKNS_8CurveGFpES2_:
  203|  9.96k|inline bool operator!=(const CurveGFp& lhs, const CurveGFp& rhs) {
  204|  9.96k|   return !(lhs == rhs);
  205|  9.96k|}
_ZN5Botan8CurveGFpaSERKS0_:
  102|  4.99k|      CurveGFp& operator=(const CurveGFp&) = default;
_ZN5Botan8CurveGFpC2Ev:
   90|  72.5k|      CurveGFp() = default;
_ZN5Botan13CurveGFp_ReprD2Ev:
   23|      1|      virtual ~CurveGFp_Repr() = default;

_ZN5Botan8EC_PointC2ERKS0_:
   53|  85.6k|      EC_Point(const EC_Point&) = default;
_ZN5BotanmlERKNS_8EC_PointERKNS_6BigIntE:
  371|  3.73k|inline EC_Point operator*(const EC_Point& point, const BigInt& scalar) {
  372|  3.73k|   return scalar * point;
  373|  3.73k|}
_ZN5BotanplERKNS_8EC_PointES2_:
  361|  7.47k|inline EC_Point operator+(const EC_Point& lhs, const EC_Point& rhs) {
  362|  7.47k|   EC_Point tmp(lhs);
  363|  7.47k|   return tmp += rhs;
  364|  7.47k|}
_ZN5BotanneERKNS_8EC_PointES2_:
  352|  9.96k|inline bool operator!=(const EC_Point& lhs, const EC_Point& rhs) {
  353|  9.96k|   return !(rhs == lhs);
  354|  9.96k|}
_ZNK5Botan8EC_Point7is_zeroEv:
  177|  2.95M|      bool is_zero() const { return m_coord_z.is_zero(); }
_ZN5Botan8EC_PointaSEOS0_:
   68|  67.7k|      EC_Point& operator=(EC_Point&& other) {
   69|  67.7k|         if(this != &other) {
  ------------------
  |  Branch (69:13): [True: 67.7k, False: 0]
  ------------------
   70|  67.7k|            this->swap(other);
   71|  67.7k|         }
   72|  67.7k|         return (*this);
   73|  67.7k|      }
_ZNK5Botan8EC_Point5get_xEv:
  139|   139k|      const BigInt& get_x() const { return m_coord_x; }
_ZNK5Botan8EC_Point5get_yEv:
  146|   139k|      const BigInt& get_y() const { return m_coord_y; }
_ZNK5Botan8EC_Point5get_zEv:
  153|   138k|      const BigInt& get_z() const { return m_coord_z; }
_ZN5Botan8EC_Point11swap_coordsERNS_6BigIntES2_S2_:
  155|  67.1k|      void swap_coords(BigInt& new_x, BigInt& new_y, BigInt& new_z) {
  156|  67.1k|         m_coord_x.swap(new_x);
  157|  67.1k|         m_coord_y.swap(new_y);
  158|  67.1k|         m_coord_z.swap(new_z);
  159|  67.1k|      }
_ZN5Botan8EC_Point3addERKS0_RNSt3__16vectorINS_6BigIntENS3_9allocatorIS5_EEEE:
  216|   197k|      void add(const EC_Point& other, std::vector<BigInt>& workspace) {
  217|   197k|         BOTAN_ARG_CHECK(m_curve == other.m_curve, "cannot add points on different curves");
  ------------------
  |  |   30|   197k|   do {                                                          \
  |  |   31|   197k|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 197k]
  |  |  ------------------
  |  |   32|   197k|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|   197k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  218|       |
  219|   197k|         const size_t p_words = m_curve.get_p_words();
  220|       |
  221|   197k|         add(other.m_coord_x.data(),
  222|   197k|             std::min(p_words, other.m_coord_x.size()),
  223|   197k|             other.m_coord_y.data(),
  224|   197k|             std::min(p_words, other.m_coord_y.size()),
  225|   197k|             other.m_coord_z.data(),
  226|   197k|             std::min(p_words, other.m_coord_z.size()),
  227|   197k|             workspace);
  228|   197k|      }
_ZNK5Botan8EC_Point4plusERKS0_RNSt3__16vectorINS_6BigIntENS3_9allocatorIS5_EEEE:
  297|  31.8k|      EC_Point plus(const EC_Point& other, std::vector<BigInt>& workspace) const {
  298|  31.8k|         EC_Point x = (*this);
  299|  31.8k|         x.add(other, workspace);
  300|  31.8k|         return x;
  301|  31.8k|      }
_ZNK5Botan8EC_Point9double_ofERNSt3__16vectorINS_6BigIntENS1_9allocatorIS3_EEEE:
  308|  31.3k|      EC_Point double_of(std::vector<BigInt>& workspace) const {
  309|  31.3k|         EC_Point x = (*this);
  310|  31.3k|         x.mult2(workspace);
  311|  31.3k|         return x;
  312|  31.3k|      }
_ZNK5Botan8EC_Point4zeroEv:
  317|  11.9k|      EC_Point zero() const { return EC_Point(m_curve); }
_ZNK5Botan8EC_Point9get_curveEv:
  325|  8.95k|      const CurveGFp& get_curve() const { return m_curve; }
_ZN5Botan8EC_PointaSERKS0_:
   63|  4.99k|      EC_Point& operator=(const EC_Point&) = default;
_ZN5Botan8EC_PointC2Ev:
   42|  72.5k|      EC_Point() = default;

_ZN5Botan25MessageAuthenticationCodeD2Ev:
   50|      1|      ~MessageAuthenticationCode() override = default;

_ZN5Botan11clear_bytesEPvm:
  103|  89.7M|inline constexpr void clear_bytes(void* ptr, size_t bytes) {
  104|  89.7M|   if(bytes > 0) {
  ------------------
  |  Branch (104:7): [True: 89.4M, False: 327k]
  ------------------
  105|  89.4M|      std::memset(ptr, 0, bytes);
  106|  89.4M|   }
  107|  89.7M|}
_ZN5Botan22cast_char_ptr_to_uint8EPKc:
  272|      9|inline const uint8_t* cast_char_ptr_to_uint8(const char* s) {
  273|      9|   return reinterpret_cast<const uint8_t*>(s);
  274|      9|}
_ZN5Botan22cast_uint8_ptr_to_charEPKh:
  276|      9|inline const char* cast_uint8_ptr_to_char(const uint8_t* b) {
  277|      9|   return reinterpret_cast<const char*>(b);
  278|      9|}
_ZN5Botan9clear_memImEEvPT_m:
  120|  89.7M|inline constexpr void clear_mem(T* ptr, size_t n) {
  121|  89.7M|   clear_bytes(ptr, sizeof(T) * n);
  122|  89.7M|}
_ZN5Botan8copy_memImEEvPT_PKS1_m:
  146|   874k|inline constexpr void copy_mem(T* out, const T* in, size_t n) {
  147|   874k|   BOTAN_ASSERT_IMPLICATION(n > 0, in != nullptr && out != nullptr, "If n > 0 then args are not null");
  ------------------
  |  |   78|   874k|   do {                                                                                          \
  |  |   79|  1.73M|      if((expr1) && !(expr2))                                                                    \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 865k, False: 9.07k]
  |  |  |  Branch (79:23): [True: 865k, False: 0]
  |  |  |  Branch (79:23): [True: 865k, False: 0]
  |  |  ------------------
  |  |   80|   874k|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |   81|   874k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (81:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  148|       |
  149|   874k|   if(in != nullptr && out != nullptr && n > 0) {
  ------------------
  |  Branch (149:7): [True: 865k, False: 8.95k]
  |  Branch (149:24): [True: 865k, False: 0]
  |  Branch (149:42): [True: 865k, False: 118]
  ------------------
  150|   865k|      std::memmove(out, in, sizeof(T) * n);
  151|   865k|   }
  152|   874k|}
_ZN5Botan13typecast_copyIRNSt3__14spanIhLm8EEEmEEvOT_RKT0_:
  199|      4|inline constexpr void typecast_copy(ToR&& out, const FromT& in) {
  200|      4|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  201|      4|}
_ZN5Botan13typecast_copyIRNSt3__14spanIhLm8EEENS2_IKmLm1EEEEEvOT_OT0_:
  176|      4|inline constexpr void typecast_copy(ToR&& out, FromR&& in) {
  177|      4|   ranges::assert_equal_byte_lengths(out, in);
  178|      4|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|      4|}
_ZN5Botan13typecast_copyImRNSt3__14spanIKhLm8EEEEET_OT0_:
  209|   318k|inline constexpr ToT typecast_copy(FromR&& src) noexcept {
  210|   318k|   ToT dst;
  211|   318k|   typecast_copy(dst, src);
  212|   318k|   return dst;
  213|   318k|}
_ZN5Botan13typecast_copyImRNSt3__14spanIKhLm8EEEEEvRT_OT0_:
  188|   318k|inline constexpr void typecast_copy(ToT& out, FromR&& in) noexcept {
  189|   318k|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|   318k|}
_ZN5Botan13typecast_copyINSt3__14spanImLm1EEERNS2_IKhLm8EEEEEvOT_OT0_:
  176|   318k|inline constexpr void typecast_copy(ToR&& out, FromR&& in) {
  177|   318k|   ranges::assert_equal_byte_lengths(out, in);
  178|   318k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|   318k|}
_ZN5Botan8copy_memIhEEvPT_PKS1_m:
  146|  88.5k|inline constexpr void copy_mem(T* out, const T* in, size_t n) {
  147|  88.5k|   BOTAN_ASSERT_IMPLICATION(n > 0, in != nullptr && out != nullptr, "If n > 0 then args are not null");
  ------------------
  |  |   78|  88.5k|   do {                                                                                          \
  |  |   79|   171k|      if((expr1) && !(expr2))                                                                    \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 85.9k, False: 2.57k]
  |  |  |  Branch (79:23): [True: 85.9k, False: 0]
  |  |  |  Branch (79:23): [True: 85.9k, False: 0]
  |  |  ------------------
  |  |   80|  88.5k|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |   81|  88.5k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (81:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  148|       |
  149|  88.5k|   if(in != nullptr && out != nullptr && n > 0) {
  ------------------
  |  Branch (149:7): [True: 88.5k, False: 0]
  |  Branch (149:24): [True: 88.5k, False: 0]
  |  Branch (149:42): [True: 85.9k, False: 2.57k]
  ------------------
  150|  85.9k|      std::memmove(out, in, sizeof(T) * n);
  151|  85.9k|   }
  152|  88.5k|}
_ZN5Botan9clear_memIhEEvPT_m:
  120|     24|inline constexpr void clear_mem(T* ptr, size_t n) {
  121|     24|   clear_bytes(ptr, sizeof(T) * n);
  122|     24|}
_ZN5Botan13typecast_copyIRNSt3__14spanIhLm4EEEjEEvOT_RKT0_:
  199|     32|inline constexpr void typecast_copy(ToR&& out, const FromT& in) {
  200|     32|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  201|     32|}
_ZN5Botan13typecast_copyIRNSt3__14spanIhLm4EEENS2_IKjLm1EEEEEvOT_OT0_:
  176|     32|inline constexpr void typecast_copy(ToR&& out, FromR&& in) {
  177|     32|   ranges::assert_equal_byte_lengths(out, in);
  178|     32|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|     32|}
_ZN5Botan13typecast_copyIjRNSt3__14spanIKhLm4EEEEET_OT0_:
  209|    160|inline constexpr ToT typecast_copy(FromR&& src) noexcept {
  210|    160|   ToT dst;
  211|    160|   typecast_copy(dst, src);
  212|    160|   return dst;
  213|    160|}
_ZN5Botan13typecast_copyIjRNSt3__14spanIKhLm4EEEEEvRT_OT0_:
  188|    160|inline constexpr void typecast_copy(ToT& out, FromR&& in) noexcept {
  189|    160|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|    160|}
_ZN5Botan13typecast_copyINSt3__14spanIjLm1EEERNS2_IKhLm4EEEEEvOT_OT0_:
  176|    160|inline constexpr void typecast_copy(ToR&& out, FromR&& in) {
  177|    160|   ranges::assert_equal_byte_lengths(out, in);
  178|    160|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|    160|}
_ZN5Botan9clear_memIjEEvPT_m:
  120|      1|inline constexpr void clear_mem(T* ptr, size_t n) {
  121|      1|   clear_bytes(ptr, sizeof(T) * n);
  122|      1|}
_ZN5Botan13typecast_copyIjEEvPT_PKhm:
  228|      2|{
  229|       |   // asserts that *in and *out point to the correct amount of memory
  230|      2|   typecast_copy(std::span<T>(out, N), std::span<const uint8_t>(in, N * sizeof(T)));
  231|      2|}
_ZN5Botan13typecast_copyINSt3__14spanIjLm18446744073709551615EEENS2_IKhLm18446744073709551615EEEEEvOT_OT0_:
  176|      2|inline constexpr void typecast_copy(ToR&& out, 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|}

_ZNK5Botan15Modular_Reducer11get_modulusEv:
   20|      1|      const BigInt& get_modulus() const { return m_modulus; }
_ZNK5Botan15Modular_Reducer8multiplyERKNS_6BigIntES3_:
   30|    741|      BigInt multiply(const BigInt& x, const BigInt& y) const { return reduce(x * y); }
_ZNK5Botan15Modular_Reducer6squareERKNS_6BigIntE:
   43|    741|      BigInt square(const BigInt& x) const { return reduce(Botan::square(x)); }

_ZN5Botan21RandomNumberGeneratorD2Ev:
   32|      1|      virtual ~RandomNumberGenerator() = default;
_ZN5Botan21RandomNumberGenerator9randomizeENSt3__14spanIhLm18446744073709551615EEE:
   52|  83.5k|      void randomize(std::span<uint8_t> output) { this->fill_bytes_with_input(output, {}); }
_ZN5Botan21RandomNumberGenerator11add_entropyENSt3__14spanIKhLm18446744073709551615EEE:
   75|      1|      void add_entropy(std::span<const uint8_t> input) { this->fill_bytes_with_input({}, input); }
_ZN5Botan21RandomNumberGenerator10random_vecENSt3__14spanIhLm18446744073709551615EEE:
  179|  83.5k|      void random_vec(std::span<uint8_t> v) { this->randomize(v); }
_ZN5Botan21RandomNumberGeneratorC2Ev:
   34|      1|      RandomNumberGenerator() = default;
_ZN5Botan21RandomNumberGenerator10random_vecINSt3__16vectorIhNS_16secure_allocatorIhEEEEEET_m:
  205|  83.5k|      T random_vec(size_t bytes) {
  206|  83.5k|         T result;
  207|  83.5k|         random_vec(result, bytes);
  208|  83.5k|         return result;
  209|  83.5k|      }
_ZN5Botan21RandomNumberGenerator10random_vecINSt3__16vectorIhNS_16secure_allocatorIhEEEEEEvRT_m:
  190|  83.5k|      void random_vec(T& v, size_t bytes) {
  191|  83.5k|         v.resize(bytes);
  192|  83.5k|         random_vec(v);
  193|  83.5k|      }

_ZN5Botan16secure_allocatorImE8allocateEm:
   45|  2.03M|      T* allocate(std::size_t n) { return static_cast<T*>(allocate_memory(n, sizeof(T))); }
_ZN5Botan16secure_allocatorIhE8allocateEm:
   45|  83.5k|      T* allocate(std::size_t n) { return static_cast<T*>(allocate_memory(n, sizeof(T))); }
_ZN5Botan16secure_allocatorIhE10deallocateEPhm:
   47|  83.5k|      void deallocate(T* p, std::size_t n) { deallocate_memory(p, n, sizeof(T)); }
_ZN5Botan16secure_allocatorImE10deallocateEPmm:
   47|  2.03M|      void deallocate(T* p, std::size_t n) { deallocate_memory(p, n, sizeof(T)); }
_ZN5BotanneIhhEEbRKNS_16secure_allocatorIT_EERKNS1_IT0_EE:
   56|      9|inline bool operator!=(const secure_allocator<T>&, const secure_allocator<U>&) {
   57|      9|   return false;
   58|      9|}
_ZN5Botan16secure_allocatorIjE10deallocateEPjm:
   47|      3|      void deallocate(T* p, std::size_t n) { deallocate_memory(p, n, sizeof(T)); }
_ZN5Botan16secure_allocatorIjE8allocateEm:
   45|      3|      T* allocate(std::size_t n) { return static_cast<T*>(allocate_memory(n, sizeof(T))); }

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

_ZN5Botan12StreamCipher15write_keystreamENSt3__14spanIhLm18446744073709551615EEE:
   87|  83.5k|      void write_keystream(std::span<uint8_t> out) { generate_keystream(out.data(), out.size()); }
_ZN5Botan12StreamCipher6set_ivEPKhm:
  157|      2|      void set_iv(const uint8_t iv[], size_t iv_len) { set_iv_bytes(iv, iv_len); }
_ZN5Botan12StreamCipher15keystream_bytesINSt3__16vectorIhNS_16secure_allocatorIhEEEEEET_m:
   95|      1|      T keystream_bytes(size_t bytes) {
   96|      1|         T out(bytes);
   97|      1|         write_keystream(out);
   98|      1|         return out;
   99|      1|      }

_ZN5Botan24Key_Length_SpecificationC2Emmm:
   36|      4|            m_min_keylen(min_k), m_max_keylen(max_k ? max_k : min_k), m_keylen_mod(k_mod) {}
_ZNK5Botan24Key_Length_Specification15valid_keylengthEm:
   42|      4|      bool valid_keylength(size_t length) const {
   43|      4|         return ((length >= m_min_keylen) && (length <= m_max_keylen) && (length % m_keylen_mod == 0));
  ------------------
  |  Branch (43:18): [True: 4, False: 0]
  |  Branch (43:46): [True: 4, False: 0]
  |  Branch (43:74): [True: 4, False: 0]
  ------------------
   44|      4|      }
_ZNK5Botan18SymmetricAlgorithm15valid_keylengthEm:
  107|      4|      bool valid_keylength(size_t length) const { return key_spec().valid_keylength(length); }
_ZNK5Botan18SymmetricAlgorithm23assert_key_material_setEv:
  139|  83.5k|      void assert_key_material_set() const { assert_key_material_set(has_keying_material()); }
_ZNK5Botan18SymmetricAlgorithm23assert_key_material_setEb:
  141|  83.5k|      void assert_key_material_set(bool predicate) const {
  142|  83.5k|         if(!predicate) {
  ------------------
  |  Branch (142:13): [True: 0, False: 83.5k]
  ------------------
  143|      0|            throw_key_not_set_error();
  144|      0|         }
  145|  83.5k|      }
_ZN5Botan18SymmetricAlgorithmD2Ev:
   79|      2|      virtual ~SymmetricAlgorithm() = default;

ecc_p256.cpp:_ZN12_GLOBAL__N_114check_ecc_mathERKN5Botan8EC_GroupEPKhm:
   48|  1.24k|inline void check_ecc_math(const Botan::EC_Group& group, const uint8_t in[], size_t len) {
   49|       |   // These depend only on the group, which is also static
   50|  1.24k|   static const Botan::EC_Point base_point = group.get_base_point();
   51|       |
   52|       |   // This is shared across runs to reduce overhead
   53|  1.24k|   static std::vector<Botan::BigInt> ws(Botan::EC_Point::WORKSPACE_SIZE);
   54|       |
   55|  1.24k|   const size_t hlen = len / 2;
   56|  1.24k|   const Botan::BigInt a = Botan::BigInt::decode(in, hlen);
   57|  1.24k|   const Botan::BigInt b = Botan::BigInt::decode(in + hlen, len - hlen);
   58|  1.24k|   const Botan::BigInt c = a + b;
   59|       |
   60|  1.24k|   const Botan::EC_Point P1 = base_point * a;
   61|  1.24k|   const Botan::EC_Point Q1 = base_point * b;
   62|  1.24k|   const Botan::EC_Point R1 = base_point * c;
   63|       |
   64|  1.24k|   const Botan::EC_Point S1 = P1 + Q1;
   65|  1.24k|   const Botan::EC_Point T1 = Q1 + P1;
   66|       |
   67|  1.24k|   FUZZER_ASSERT_EQUAL(S1, R1);
  ------------------
  |  |   60|  1.24k|   do {                                                                                  \
  |  |   61|  1.24k|      if(x != y) {                                                                       \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 1.24k]
  |  |  ------------------
  |  |   62|      0|         FUZZER_WRITE_AND_CRASH(#x << " = " << x << " != " << #y << " = " << y << "\n"); \
  |  |  ------------------
  |  |  |  |   54|      0|   do {                                                                          \
  |  |  |  |   55|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; \
  |  |  |  |   56|      0|      abort();                                                                   \
  |  |  |  |   57|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|      }                                                                                  \
  |  |   64|  1.24k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   68|  1.24k|   FUZZER_ASSERT_EQUAL(T1, R1);
  ------------------
  |  |   60|  1.24k|   do {                                                                                  \
  |  |   61|  1.24k|      if(x != y) {                                                                       \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 1.24k]
  |  |  ------------------
  |  |   62|      0|         FUZZER_WRITE_AND_CRASH(#x << " = " << x << " != " << #y << " = " << y << "\n"); \
  |  |  ------------------
  |  |  |  |   54|      0|   do {                                                                          \
  |  |  |  |   55|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; \
  |  |  |  |   56|      0|      abort();                                                                   \
  |  |  |  |   57|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|      }                                                                                  \
  |  |   64|  1.24k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   69|       |
   70|  1.24k|   const Botan::EC_Point P2 = group.blinded_base_point_multiply(a, fuzzer_rng(), ws);
   71|  1.24k|   const Botan::EC_Point Q2 = group.blinded_base_point_multiply(b, fuzzer_rng(), ws);
   72|  1.24k|   const Botan::EC_Point R2 = group.blinded_base_point_multiply(c, fuzzer_rng(), ws);
   73|  1.24k|   const Botan::EC_Point S2 = P2 + Q2;
   74|  1.24k|   const Botan::EC_Point T2 = Q2 + P2;
   75|       |
   76|  1.24k|   FUZZER_ASSERT_EQUAL(S2, R2);
  ------------------
  |  |   60|  1.24k|   do {                                                                                  \
  |  |   61|  1.24k|      if(x != y) {                                                                       \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 1.24k]
  |  |  ------------------
  |  |   62|      0|         FUZZER_WRITE_AND_CRASH(#x << " = " << x << " != " << #y << " = " << y << "\n"); \
  |  |  ------------------
  |  |  |  |   54|      0|   do {                                                                          \
  |  |  |  |   55|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; \
  |  |  |  |   56|      0|      abort();                                                                   \
  |  |  |  |   57|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|      }                                                                                  \
  |  |   64|  1.24k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   77|  1.24k|   FUZZER_ASSERT_EQUAL(T2, R2);
  ------------------
  |  |   60|  1.24k|   do {                                                                                  \
  |  |   61|  1.24k|      if(x != y) {                                                                       \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 1.24k]
  |  |  ------------------
  |  |   62|      0|         FUZZER_WRITE_AND_CRASH(#x << " = " << x << " != " << #y << " = " << y << "\n"); \
  |  |  ------------------
  |  |  |  |   54|      0|   do {                                                                          \
  |  |  |  |   55|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; \
  |  |  |  |   56|      0|      abort();                                                                   \
  |  |  |  |   57|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|      }                                                                                  \
  |  |   64|  1.24k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   78|       |
   79|  1.24k|   const Botan::EC_Point P3 = group.blinded_var_point_multiply(base_point, a, fuzzer_rng(), ws);
   80|  1.24k|   const Botan::EC_Point Q3 = group.blinded_var_point_multiply(base_point, b, fuzzer_rng(), ws);
   81|  1.24k|   const Botan::EC_Point R3 = group.blinded_var_point_multiply(base_point, c, fuzzer_rng(), ws);
   82|  1.24k|   const Botan::EC_Point S3 = P3 + Q3;
   83|  1.24k|   const Botan::EC_Point T3 = Q3 + P3;
   84|       |
   85|  1.24k|   FUZZER_ASSERT_EQUAL(S3, R3);
  ------------------
  |  |   60|  1.24k|   do {                                                                                  \
  |  |   61|  1.24k|      if(x != y) {                                                                       \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 1.24k]
  |  |  ------------------
  |  |   62|      0|         FUZZER_WRITE_AND_CRASH(#x << " = " << x << " != " << #y << " = " << y << "\n"); \
  |  |  ------------------
  |  |  |  |   54|      0|   do {                                                                          \
  |  |  |  |   55|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; \
  |  |  |  |   56|      0|      abort();                                                                   \
  |  |  |  |   57|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|      }                                                                                  \
  |  |   64|  1.24k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   86|  1.24k|   FUZZER_ASSERT_EQUAL(T3, R3);
  ------------------
  |  |   60|  1.24k|   do {                                                                                  \
  |  |   61|  1.24k|      if(x != y) {                                                                       \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 1.24k]
  |  |  ------------------
  |  |   62|      0|         FUZZER_WRITE_AND_CRASH(#x << " = " << x << " != " << #y << " = " << y << "\n"); \
  |  |  ------------------
  |  |  |  |   54|      0|   do {                                                                          \
  |  |  |  |   55|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; \
  |  |  |  |   56|      0|      abort();                                                                   \
  |  |  |  |   57|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|      }                                                                                  \
  |  |   64|  1.24k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   87|       |
   88|  1.24k|   FUZZER_ASSERT_EQUAL(S1, S2);
  ------------------
  |  |   60|  1.24k|   do {                                                                                  \
  |  |   61|  1.24k|      if(x != y) {                                                                       \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 1.24k]
  |  |  ------------------
  |  |   62|      0|         FUZZER_WRITE_AND_CRASH(#x << " = " << x << " != " << #y << " = " << y << "\n"); \
  |  |  ------------------
  |  |  |  |   54|      0|   do {                                                                          \
  |  |  |  |   55|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; \
  |  |  |  |   56|      0|      abort();                                                                   \
  |  |  |  |   57|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|      }                                                                                  \
  |  |   64|  1.24k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   89|  1.24k|   FUZZER_ASSERT_EQUAL(S1, S3);
  ------------------
  |  |   60|  1.24k|   do {                                                                                  \
  |  |   61|  1.24k|      if(x != y) {                                                                       \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 1.24k]
  |  |  ------------------
  |  |   62|      0|         FUZZER_WRITE_AND_CRASH(#x << " = " << x << " != " << #y << " = " << y << "\n"); \
  |  |  ------------------
  |  |  |  |   54|      0|   do {                                                                          \
  |  |  |  |   55|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; \
  |  |  |  |   56|      0|      abort();                                                                   \
  |  |  |  |   57|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|      }                                                                                  \
  |  |   64|  1.24k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   90|       |
   91|  1.24k|   try {
   92|  1.24k|      const auto yp = decompress_point(true, a, group.get_p(), group.get_a(), group.get_b());
   93|  1.24k|      const auto pt_p = group.blinded_var_point_multiply(group.point(a, yp), b, fuzzer_rng(), ws);
   94|       |
   95|  1.24k|      const auto yn = -yp;
   96|  1.24k|      const auto pt_n = group.blinded_var_point_multiply(group.point(a, yn), b, fuzzer_rng(), ws);
   97|       |
   98|  1.24k|      FUZZER_ASSERT_EQUAL(pt_p, -pt_n);
  ------------------
  |  |   60|  1.24k|   do {                                                                                  \
  |  |   61|  1.24k|      if(x != y) {                                                                       \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 1.24k]
  |  |  ------------------
  |  |   62|      0|         FUZZER_WRITE_AND_CRASH(#x << " = " << x << " != " << #y << " = " << y << "\n"); \
  |  |  ------------------
  |  |  |  |   54|      0|   do {                                                                          \
  |  |  |  |   55|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; \
  |  |  |  |   56|      0|      abort();                                                                   \
  |  |  |  |   57|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|      }                                                                                  \
  |  |   64|  1.24k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   99|  1.24k|   } catch(...) {}
  100|  1.24k|}
ecc_p256.cpp:_ZN12_GLOBAL__N_116decompress_pointEbRKN5Botan6BigIntES3_S3_S3_:
   27|  1.24k|                                      const Botan::BigInt& curve_b) {
   28|  1.24k|   Botan::BigInt xpow3 = x * x * x;
   29|       |
   30|  1.24k|   Botan::BigInt g = curve_a * x;
   31|  1.24k|   g += xpow3;
   32|  1.24k|   g += curve_b;
   33|  1.24k|   g = g % curve_p;
   34|       |
   35|  1.24k|   Botan::BigInt z = sqrt_modulo_prime(g, curve_p);
   36|       |
   37|  1.24k|   if(z < 0) {
  ------------------
  |  Branch (37:7): [True: 505, False: 741]
  ------------------
   38|    505|      throw Botan::Exception("Could not perform square root");
   39|    505|   }
   40|       |
   41|    741|   if(z.get_bit(0) != yMod2) {
  ------------------
  |  Branch (41:7): [True: 408, False: 333]
  ------------------
   42|    408|      z = curve_p - z;
   43|    408|   }
   44|       |
   45|    741|   return z;
   46|  1.24k|}

_Z4fuzzPKhm:
   10|  1.27k|void fuzz(const uint8_t in[], size_t len) {
   11|  1.27k|   if(len > 2 * 256 / 8) {
  ------------------
  |  Branch (11:7): [True: 24, False: 1.24k]
  ------------------
   12|     24|      return;
   13|     24|   }
   14|  1.24k|   static Botan::EC_Group p256("secp256r1");
   15|  1.24k|   return check_ecc_math(p256, in, len);
   16|  1.27k|}

LLVMFuzzerInitialize:
   24|      2|extern "C" int LLVMFuzzerInitialize(int*, char***) {
   25|       |   /*
   26|       |   * This disables the mlock pool, as overwrites within the pool are
   27|       |   * opaque to ASan or other instrumentation.
   28|       |   */
   29|      2|   ::setenv("BOTAN_MLOCK_POOL_SIZE", "0", 1);
   30|      2|   return 0;
   31|      2|}
LLVMFuzzerTestOneInput:
   34|  1.27k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t in[], size_t len) {
   35|  1.27k|   if(len <= max_fuzzer_input_size) {
  ------------------
  |  Branch (35:7): [True: 1.27k, False: 9]
  ------------------
   36|  1.27k|      fuzz(in, len);
   37|  1.27k|   }
   38|  1.27k|   return 0;
   39|  1.27k|}
_Z10fuzzer_rngv:
   49|  8.21k|inline Botan::RandomNumberGenerator& fuzzer_rng() {
   50|  8.21k|   return *fuzzer_rng_as_shared();
   51|  8.21k|}
_Z20fuzzer_rng_as_sharedv:
   43|  8.21k|inline std::shared_ptr<Botan::RandomNumberGenerator> fuzzer_rng_as_shared() {
   44|  8.21k|   static std::shared_ptr<Botan::ChaCha_RNG> rng =
   45|  8.21k|      std::make_shared<Botan::ChaCha_RNG>(Botan::secure_vector<uint8_t>(32));
   46|  8.21k|   return rng;
   47|  8.21k|}

_ZN5Botan3OID11from_stringENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   74|      1|OID OID::from_string(std::string_view str) {
   75|      1|   if(str.empty()) {
  ------------------
  |  Branch (75:7): [True: 0, False: 1]
  ------------------
   76|      0|      throw Invalid_Argument("OID::from_string argument must be non-empty");
   77|      0|   }
   78|       |
   79|      1|   OID o = OID_Map::global_registry().str2oid(str);
   80|      1|   if(o.has_value()) {
  ------------------
  |  Branch (80:7): [True: 1, False: 0]
  ------------------
   81|      1|      return o;
   82|      1|   }
   83|       |
   84|      0|   std::vector<uint32_t> raw = parse_oid_str(str);
   85|       |
   86|      0|   if(!raw.empty()) {
  ------------------
  |  Branch (86:7): [True: 0, False: 0]
  ------------------
   87|      0|      return OID(std::move(raw));
   88|      0|   }
   89|       |
   90|      0|   throw Lookup_Error(fmt("No OID associated with name '{}'", str));
   91|      0|}

_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|      1|OID_Map& OID_Map::global_registry() {
   17|      1|   static OID_Map g_map;
   18|      1|   return g_map;
   19|      1|}
_ZN5Botan7OID_Map7str2oidENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   69|      1|OID OID_Map::str2oid(std::string_view str) {
   70|      1|   lock_guard_type<mutex_type> lock(m_mutex);
   71|      1|   auto i = m_str2oid.find(std::string(str));
   72|      1|   if(i != m_str2oid.end()) {
  ------------------
  |  Branch (72:7): [True: 1, False: 0]
  ------------------
   73|      1|      return i->second;
   74|      1|   }
   75|       |
   76|      0|   return OID();
   77|      1|}

_ZN5Botan7OID_Map16load_oid2str_mapEv:
   17|      1|std::unordered_map<std::string, std::string> OID_Map::load_oid2str_map() {
   18|      1|   return std::unordered_map<std::string, std::string>{
   19|       |
   20|      1|      {"0.3.4401.5.3.1.9.26", "Camellia-192/GCM"},
   21|      1|      {"0.3.4401.5.3.1.9.46", "Camellia-256/GCM"},
   22|      1|      {"0.3.4401.5.3.1.9.6", "Camellia-128/GCM"},
   23|      1|      {"0.4.0.127.0.15.1.1.13.0", "XMSS"},
   24|      1|      {"1.0.14888.3.0.5", "ECKCDSA"},
   25|      1|      {"1.2.156.10197.1.104.100", "SM4/OCB"},
   26|      1|      {"1.2.156.10197.1.104.2", "SM4/CBC"},
   27|      1|      {"1.2.156.10197.1.104.8", "SM4/GCM"},
   28|      1|      {"1.2.156.10197.1.301", "sm2p256v1"},
   29|      1|      {"1.2.156.10197.1.301.1", "SM2"},
   30|      1|      {"1.2.156.10197.1.301.2", "SM2_Kex"},
   31|      1|      {"1.2.156.10197.1.301.3", "SM2_Enc"},
   32|      1|      {"1.2.156.10197.1.401", "SM3"},
   33|      1|      {"1.2.156.10197.1.501", "SM2_Sig/SM3"},
   34|      1|      {"1.2.156.10197.1.504", "RSA/EMSA3(SM3)"},
   35|      1|      {"1.2.250.1.223.101.256.1", "frp256v1"},
   36|      1|      {"1.2.392.200011.61.1.1.1.2", "Camellia-128/CBC"},
   37|      1|      {"1.2.392.200011.61.1.1.1.3", "Camellia-192/CBC"},
   38|      1|      {"1.2.392.200011.61.1.1.1.4", "Camellia-256/CBC"},
   39|      1|      {"1.2.410.200004.1.100.4.3", "ECKCDSA/SHA-1"},
   40|      1|      {"1.2.410.200004.1.100.4.4", "ECKCDSA/SHA-224"},
   41|      1|      {"1.2.410.200004.1.100.4.5", "ECKCDSA/SHA-256"},
   42|      1|      {"1.2.410.200004.1.4", "SEED/CBC"},
   43|      1|      {"1.2.643.100.1", "GOST.OGRN"},
   44|      1|      {"1.2.643.100.111", "GOST.SubjectSigningTool"},
   45|      1|      {"1.2.643.100.112", "GOST.IssuerSigningTool"},
   46|      1|      {"1.2.643.2.2.19", "GOST-34.10"},
   47|      1|      {"1.2.643.2.2.3", "GOST-34.10/GOST-R-34.11-94"},
   48|      1|      {"1.2.643.2.2.35.1", "gost_256A"},
   49|      1|      {"1.2.643.2.2.36.0", "gost_256A"},
   50|      1|      {"1.2.643.3.131.1.1", "GOST.INN"},
   51|      1|      {"1.2.643.7.1.1.1.1", "GOST-34.10-2012-256"},
   52|      1|      {"1.2.643.7.1.1.1.2", "GOST-34.10-2012-512"},
   53|      1|      {"1.2.643.7.1.1.2.2", "Streebog-256"},
   54|      1|      {"1.2.643.7.1.1.2.3", "Streebog-512"},
   55|      1|      {"1.2.643.7.1.1.3.2", "GOST-34.10-2012-256/Streebog-256"},
   56|      1|      {"1.2.643.7.1.1.3.3", "GOST-34.10-2012-512/Streebog-512"},
   57|      1|      {"1.2.643.7.1.2.1.1.1", "gost_256A"},
   58|      1|      {"1.2.643.7.1.2.1.1.2", "gost_256B"},
   59|      1|      {"1.2.643.7.1.2.1.2.1", "gost_512A"},
   60|      1|      {"1.2.643.7.1.2.1.2.2", "gost_512B"},
   61|      1|      {"1.2.840.10040.4.1", "DSA"},
   62|      1|      {"1.2.840.10040.4.3", "DSA/SHA-1"},
   63|      1|      {"1.2.840.10045.2.1", "ECDSA"},
   64|      1|      {"1.2.840.10045.3.1.1", "secp192r1"},
   65|      1|      {"1.2.840.10045.3.1.2", "x962_p192v2"},
   66|      1|      {"1.2.840.10045.3.1.3", "x962_p192v3"},
   67|      1|      {"1.2.840.10045.3.1.4", "x962_p239v1"},
   68|      1|      {"1.2.840.10045.3.1.5", "x962_p239v2"},
   69|      1|      {"1.2.840.10045.3.1.6", "x962_p239v3"},
   70|      1|      {"1.2.840.10045.3.1.7", "secp256r1"},
   71|      1|      {"1.2.840.10045.4.1", "ECDSA/SHA-1"},
   72|      1|      {"1.2.840.10045.4.3.1", "ECDSA/SHA-224"},
   73|      1|      {"1.2.840.10045.4.3.2", "ECDSA/SHA-256"},
   74|      1|      {"1.2.840.10045.4.3.3", "ECDSA/SHA-384"},
   75|      1|      {"1.2.840.10045.4.3.4", "ECDSA/SHA-512"},
   76|      1|      {"1.2.840.10046.2.1", "DH"},
   77|      1|      {"1.2.840.113533.7.66.10", "CAST-128/CBC"},
   78|      1|      {"1.2.840.113533.7.66.15", "KeyWrap.CAST-128"},
   79|      1|      {"1.2.840.113549.1.1.1", "RSA"},
   80|      1|      {"1.2.840.113549.1.1.10", "RSA/EMSA4"},
   81|      1|      {"1.2.840.113549.1.1.11", "RSA/EMSA3(SHA-256)"},
   82|      1|      {"1.2.840.113549.1.1.12", "RSA/EMSA3(SHA-384)"},
   83|      1|      {"1.2.840.113549.1.1.13", "RSA/EMSA3(SHA-512)"},
   84|      1|      {"1.2.840.113549.1.1.14", "RSA/EMSA3(SHA-224)"},
   85|      1|      {"1.2.840.113549.1.1.16", "RSA/EMSA3(SHA-512-256)"},
   86|      1|      {"1.2.840.113549.1.1.4", "RSA/EMSA3(MD5)"},
   87|      1|      {"1.2.840.113549.1.1.5", "RSA/EMSA3(SHA-1)"},
   88|      1|      {"1.2.840.113549.1.1.7", "RSA/OAEP"},
   89|      1|      {"1.2.840.113549.1.1.8", "MGF1"},
   90|      1|      {"1.2.840.113549.1.5.12", "PKCS5.PBKDF2"},
   91|      1|      {"1.2.840.113549.1.5.13", "PBE-PKCS5v20"},
   92|      1|      {"1.2.840.113549.1.9.1", "PKCS9.EmailAddress"},
   93|      1|      {"1.2.840.113549.1.9.14", "PKCS9.ExtensionRequest"},
   94|      1|      {"1.2.840.113549.1.9.16.3.18", "ChaCha20Poly1305"},
   95|      1|      {"1.2.840.113549.1.9.16.3.6", "KeyWrap.TripleDES"},
   96|      1|      {"1.2.840.113549.1.9.16.3.8", "Compression.Zlib"},
   97|      1|      {"1.2.840.113549.1.9.2", "PKCS9.UnstructuredName"},
   98|      1|      {"1.2.840.113549.1.9.3", "PKCS9.ContentType"},
   99|      1|      {"1.2.840.113549.1.9.4", "PKCS9.MessageDigest"},
  100|      1|      {"1.2.840.113549.1.9.7", "PKCS9.ChallengePassword"},
  101|      1|      {"1.2.840.113549.2.10", "HMAC(SHA-384)"},
  102|      1|      {"1.2.840.113549.2.11", "HMAC(SHA-512)"},
  103|      1|      {"1.2.840.113549.2.13", "HMAC(SHA-512-256)"},
  104|      1|      {"1.2.840.113549.2.5", "MD5"},
  105|      1|      {"1.2.840.113549.2.7", "HMAC(SHA-1)"},
  106|      1|      {"1.2.840.113549.2.8", "HMAC(SHA-224)"},
  107|      1|      {"1.2.840.113549.2.9", "HMAC(SHA-256)"},
  108|      1|      {"1.2.840.113549.3.7", "TripleDES/CBC"},
  109|      1|      {"1.3.101.110", "Curve25519"},
  110|      1|      {"1.3.101.112", "Ed25519"},
  111|      1|      {"1.3.132.0.10", "secp256k1"},
  112|      1|      {"1.3.132.0.30", "secp160r2"},
  113|      1|      {"1.3.132.0.31", "secp192k1"},
  114|      1|      {"1.3.132.0.32", "secp224k1"},
  115|      1|      {"1.3.132.0.33", "secp224r1"},
  116|      1|      {"1.3.132.0.34", "secp384r1"},
  117|      1|      {"1.3.132.0.35", "secp521r1"},
  118|      1|      {"1.3.132.0.8", "secp160r1"},
  119|      1|      {"1.3.132.0.9", "secp160k1"},
  120|      1|      {"1.3.132.1.12", "ECDH"},
  121|      1|      {"1.3.14.3.2.26", "SHA-1"},
  122|      1|      {"1.3.14.3.2.7", "DES/CBC"},
  123|      1|      {"1.3.36.3.2.1", "RIPEMD-160"},
  124|      1|      {"1.3.36.3.3.1.2", "RSA/EMSA3(RIPEMD-160)"},
  125|      1|      {"1.3.36.3.3.2.5.2.1", "ECGDSA"},
  126|      1|      {"1.3.36.3.3.2.5.4.1", "ECGDSA/RIPEMD-160"},
  127|      1|      {"1.3.36.3.3.2.5.4.2", "ECGDSA/SHA-1"},
  128|      1|      {"1.3.36.3.3.2.5.4.3", "ECGDSA/SHA-224"},
  129|      1|      {"1.3.36.3.3.2.5.4.4", "ECGDSA/SHA-256"},
  130|      1|      {"1.3.36.3.3.2.5.4.5", "ECGDSA/SHA-384"},
  131|      1|      {"1.3.36.3.3.2.5.4.6", "ECGDSA/SHA-512"},
  132|      1|      {"1.3.36.3.3.2.8.1.1.1", "brainpool160r1"},
  133|      1|      {"1.3.36.3.3.2.8.1.1.11", "brainpool384r1"},
  134|      1|      {"1.3.36.3.3.2.8.1.1.13", "brainpool512r1"},
  135|      1|      {"1.3.36.3.3.2.8.1.1.3", "brainpool192r1"},
  136|      1|      {"1.3.36.3.3.2.8.1.1.5", "brainpool224r1"},
  137|      1|      {"1.3.36.3.3.2.8.1.1.7", "brainpool256r1"},
  138|      1|      {"1.3.36.3.3.2.8.1.1.9", "brainpool320r1"},
  139|      1|      {"1.3.6.1.4.1.11591.15.1", "OpenPGP.Ed25519"},
  140|      1|      {"1.3.6.1.4.1.11591.4.11", "Scrypt"},
  141|      1|      {"1.3.6.1.4.1.25258.1.10.1", "Dilithium-4x4-AES-r3"},
  142|      1|      {"1.3.6.1.4.1.25258.1.10.2", "Dilithium-6x5-AES-r3"},
  143|      1|      {"1.3.6.1.4.1.25258.1.10.3", "Dilithium-8x7-AES-r3"},
  144|      1|      {"1.3.6.1.4.1.25258.1.11.1", "Kyber-512-90s-r3"},
  145|      1|      {"1.3.6.1.4.1.25258.1.11.2", "Kyber-768-90s-r3"},
  146|      1|      {"1.3.6.1.4.1.25258.1.11.3", "Kyber-1024-90s-r3"},
  147|      1|      {"1.3.6.1.4.1.25258.1.12.1.1", "SphincsPlus-shake-128s-r3.1"},
  148|      1|      {"1.3.6.1.4.1.25258.1.12.1.2", "SphincsPlus-shake-128f-r3.1"},
  149|      1|      {"1.3.6.1.4.1.25258.1.12.1.3", "SphincsPlus-shake-192s-r3.1"},
  150|      1|      {"1.3.6.1.4.1.25258.1.12.1.4", "SphincsPlus-shake-192f-r3.1"},
  151|      1|      {"1.3.6.1.4.1.25258.1.12.1.5", "SphincsPlus-shake-256s-r3.1"},
  152|      1|      {"1.3.6.1.4.1.25258.1.12.1.6", "SphincsPlus-shake-256f-r3.1"},
  153|      1|      {"1.3.6.1.4.1.25258.1.12.2.1", "SphincsPlus-sha2-128s-r3.1"},
  154|      1|      {"1.3.6.1.4.1.25258.1.12.2.2", "SphincsPlus-sha2-128f-r3.1"},
  155|      1|      {"1.3.6.1.4.1.25258.1.12.2.3", "SphincsPlus-sha2-192s-r3.1"},
  156|      1|      {"1.3.6.1.4.1.25258.1.12.2.4", "SphincsPlus-sha2-192f-r3.1"},
  157|      1|      {"1.3.6.1.4.1.25258.1.12.2.5", "SphincsPlus-sha2-256s-r3.1"},
  158|      1|      {"1.3.6.1.4.1.25258.1.12.2.6", "SphincsPlus-sha2-256f-r3.1"},
  159|      1|      {"1.3.6.1.4.1.25258.1.12.3.1", "SphincsPlus-haraka-128s-r3.1"},
  160|      1|      {"1.3.6.1.4.1.25258.1.12.3.2", "SphincsPlus-haraka-128f-r3.1"},
  161|      1|      {"1.3.6.1.4.1.25258.1.12.3.3", "SphincsPlus-haraka-192s-r3.1"},
  162|      1|      {"1.3.6.1.4.1.25258.1.12.3.4", "SphincsPlus-haraka-192f-r3.1"},
  163|      1|      {"1.3.6.1.4.1.25258.1.12.3.5", "SphincsPlus-haraka-256s-r3.1"},
  164|      1|      {"1.3.6.1.4.1.25258.1.12.3.6", "SphincsPlus-haraka-256f-r3.1"},
  165|      1|      {"1.3.6.1.4.1.25258.1.14.1", "FrodoKEM-640-SHAKE"},
  166|      1|      {"1.3.6.1.4.1.25258.1.14.2", "FrodoKEM-976-SHAKE"},
  167|      1|      {"1.3.6.1.4.1.25258.1.14.3", "FrodoKEM-1344-SHAKE"},
  168|      1|      {"1.3.6.1.4.1.25258.1.15.1", "FrodoKEM-640-AES"},
  169|      1|      {"1.3.6.1.4.1.25258.1.15.2", "FrodoKEM-976-AES"},
  170|      1|      {"1.3.6.1.4.1.25258.1.15.3", "FrodoKEM-1344-AES"},
  171|      1|      {"1.3.6.1.4.1.25258.1.16.1", "eFrodoKEM-640-SHAKE"},
  172|      1|      {"1.3.6.1.4.1.25258.1.16.2", "eFrodoKEM-976-SHAKE"},
  173|      1|      {"1.3.6.1.4.1.25258.1.16.3", "eFrodoKEM-1344-SHAKE"},
  174|      1|      {"1.3.6.1.4.1.25258.1.17.1", "eFrodoKEM-640-AES"},
  175|      1|      {"1.3.6.1.4.1.25258.1.17.2", "eFrodoKEM-976-AES"},
  176|      1|      {"1.3.6.1.4.1.25258.1.17.3", "eFrodoKEM-1344-AES"},
  177|      1|      {"1.3.6.1.4.1.25258.1.3", "McEliece"},
  178|      1|      {"1.3.6.1.4.1.25258.1.5", "XMSS-draft6"},
  179|      1|      {"1.3.6.1.4.1.25258.1.6.1", "GOST-34.10-2012-256/SHA-256"},
  180|      1|      {"1.3.6.1.4.1.25258.1.7.1", "Kyber-512-r3"},
  181|      1|      {"1.3.6.1.4.1.25258.1.7.2", "Kyber-768-r3"},
  182|      1|      {"1.3.6.1.4.1.25258.1.7.3", "Kyber-1024-r3"},
  183|      1|      {"1.3.6.1.4.1.25258.1.8", "XMSS-draft12"},
  184|      1|      {"1.3.6.1.4.1.25258.1.9.1", "Dilithium-4x4-r3"},
  185|      1|      {"1.3.6.1.4.1.25258.1.9.2", "Dilithium-6x5-r3"},
  186|      1|      {"1.3.6.1.4.1.25258.1.9.3", "Dilithium-8x7-r3"},
  187|      1|      {"1.3.6.1.4.1.25258.3.1", "Serpent/CBC"},
  188|      1|      {"1.3.6.1.4.1.25258.3.101", "Serpent/GCM"},
  189|      1|      {"1.3.6.1.4.1.25258.3.102", "Twofish/GCM"},
  190|      1|      {"1.3.6.1.4.1.25258.3.2", "Threefish-512/CBC"},
  191|      1|      {"1.3.6.1.4.1.25258.3.2.1", "AES-128/OCB"},
  192|      1|      {"1.3.6.1.4.1.25258.3.2.2", "AES-192/OCB"},
  193|      1|      {"1.3.6.1.4.1.25258.3.2.3", "AES-256/OCB"},
  194|      1|      {"1.3.6.1.4.1.25258.3.2.4", "Serpent/OCB"},
  195|      1|      {"1.3.6.1.4.1.25258.3.2.5", "Twofish/OCB"},
  196|      1|      {"1.3.6.1.4.1.25258.3.2.6", "Camellia-128/OCB"},
  197|      1|      {"1.3.6.1.4.1.25258.3.2.7", "Camellia-192/OCB"},
  198|      1|      {"1.3.6.1.4.1.25258.3.2.8", "Camellia-256/OCB"},
  199|      1|      {"1.3.6.1.4.1.25258.3.3", "Twofish/CBC"},
  200|      1|      {"1.3.6.1.4.1.25258.3.4.1", "AES-128/SIV"},
  201|      1|      {"1.3.6.1.4.1.25258.3.4.2", "AES-192/SIV"},
  202|      1|      {"1.3.6.1.4.1.25258.3.4.3", "AES-256/SIV"},
  203|      1|      {"1.3.6.1.4.1.25258.3.4.4", "Serpent/SIV"},
  204|      1|      {"1.3.6.1.4.1.25258.3.4.5", "Twofish/SIV"},
  205|      1|      {"1.3.6.1.4.1.25258.3.4.6", "Camellia-128/SIV"},
  206|      1|      {"1.3.6.1.4.1.25258.3.4.7", "Camellia-192/SIV"},
  207|      1|      {"1.3.6.1.4.1.25258.3.4.8", "Camellia-256/SIV"},
  208|      1|      {"1.3.6.1.4.1.25258.3.4.9", "SM4/SIV"},
  209|      1|      {"1.3.6.1.4.1.3029.1.2.1", "ElGamal"},
  210|      1|      {"1.3.6.1.4.1.3029.1.5.1", "OpenPGP.Curve25519"},
  211|      1|      {"1.3.6.1.4.1.311.20.2.2", "Microsoft SmartcardLogon"},
  212|      1|      {"1.3.6.1.4.1.311.20.2.3", "Microsoft UPN"},
  213|      1|      {"1.3.6.1.4.1.8301.3.1.2.9.0.38", "secp521r1"},
  214|      1|      {"1.3.6.1.5.5.7.1.1", "PKIX.AuthorityInformationAccess"},
  215|      1|      {"1.3.6.1.5.5.7.3.1", "PKIX.ServerAuth"},
  216|      1|      {"1.3.6.1.5.5.7.3.2", "PKIX.ClientAuth"},
  217|      1|      {"1.3.6.1.5.5.7.3.3", "PKIX.CodeSigning"},
  218|      1|      {"1.3.6.1.5.5.7.3.4", "PKIX.EmailProtection"},
  219|      1|      {"1.3.6.1.5.5.7.3.5", "PKIX.IPsecEndSystem"},
  220|      1|      {"1.3.6.1.5.5.7.3.6", "PKIX.IPsecTunnel"},
  221|      1|      {"1.3.6.1.5.5.7.3.7", "PKIX.IPsecUser"},
  222|      1|      {"1.3.6.1.5.5.7.3.8", "PKIX.TimeStamping"},
  223|      1|      {"1.3.6.1.5.5.7.3.9", "PKIX.OCSPSigning"},
  224|      1|      {"1.3.6.1.5.5.7.48.1", "PKIX.OCSP"},
  225|      1|      {"1.3.6.1.5.5.7.48.1.1", "PKIX.OCSP.BasicResponse"},
  226|      1|      {"1.3.6.1.5.5.7.48.1.5", "PKIX.OCSP.NoCheck"},
  227|      1|      {"1.3.6.1.5.5.7.48.2", "PKIX.CertificateAuthorityIssuers"},
  228|      1|      {"1.3.6.1.5.5.7.8.5", "PKIX.XMPPAddr"},
  229|      1|      {"2.16.840.1.101.3.4.1.2", "AES-128/CBC"},
  230|      1|      {"2.16.840.1.101.3.4.1.22", "AES-192/CBC"},
  231|      1|      {"2.16.840.1.101.3.4.1.25", "KeyWrap.AES-192"},
  232|      1|      {"2.16.840.1.101.3.4.1.26", "AES-192/GCM"},
  233|      1|      {"2.16.840.1.101.3.4.1.27", "AES-192/CCM"},
  234|      1|      {"2.16.840.1.101.3.4.1.42", "AES-256/CBC"},
  235|      1|      {"2.16.840.1.101.3.4.1.45", "KeyWrap.AES-256"},
  236|      1|      {"2.16.840.1.101.3.4.1.46", "AES-256/GCM"},
  237|      1|      {"2.16.840.1.101.3.4.1.47", "AES-256/CCM"},
  238|      1|      {"2.16.840.1.101.3.4.1.5", "KeyWrap.AES-128"},
  239|      1|      {"2.16.840.1.101.3.4.1.6", "AES-128/GCM"},
  240|      1|      {"2.16.840.1.101.3.4.1.7", "AES-128/CCM"},
  241|      1|      {"2.16.840.1.101.3.4.2.1", "SHA-256"},
  242|      1|      {"2.16.840.1.101.3.4.2.10", "SHA-3(512)"},
  243|      1|      {"2.16.840.1.101.3.4.2.11", "SHAKE-128"},
  244|      1|      {"2.16.840.1.101.3.4.2.12", "SHAKE-256"},
  245|      1|      {"2.16.840.1.101.3.4.2.2", "SHA-384"},
  246|      1|      {"2.16.840.1.101.3.4.2.3", "SHA-512"},
  247|      1|      {"2.16.840.1.101.3.4.2.4", "SHA-224"},
  248|      1|      {"2.16.840.1.101.3.4.2.6", "SHA-512-256"},
  249|      1|      {"2.16.840.1.101.3.4.2.7", "SHA-3(224)"},
  250|      1|      {"2.16.840.1.101.3.4.2.8", "SHA-3(256)"},
  251|      1|      {"2.16.840.1.101.3.4.2.9", "SHA-3(384)"},
  252|      1|      {"2.16.840.1.101.3.4.3.1", "DSA/SHA-224"},
  253|      1|      {"2.16.840.1.101.3.4.3.10", "ECDSA/SHA-3(256)"},
  254|      1|      {"2.16.840.1.101.3.4.3.11", "ECDSA/SHA-3(384)"},
  255|      1|      {"2.16.840.1.101.3.4.3.12", "ECDSA/SHA-3(512)"},
  256|      1|      {"2.16.840.1.101.3.4.3.13", "RSA/EMSA3(SHA-3(224))"},
  257|      1|      {"2.16.840.1.101.3.4.3.14", "RSA/EMSA3(SHA-3(256))"},
  258|      1|      {"2.16.840.1.101.3.4.3.15", "RSA/EMSA3(SHA-3(384))"},
  259|      1|      {"2.16.840.1.101.3.4.3.16", "RSA/EMSA3(SHA-3(512))"},
  260|      1|      {"2.16.840.1.101.3.4.3.2", "DSA/SHA-256"},
  261|      1|      {"2.16.840.1.101.3.4.3.3", "DSA/SHA-384"},
  262|      1|      {"2.16.840.1.101.3.4.3.4", "DSA/SHA-512"},
  263|      1|      {"2.16.840.1.101.3.4.3.5", "DSA/SHA-3(224)"},
  264|      1|      {"2.16.840.1.101.3.4.3.6", "DSA/SHA-3(256)"},
  265|      1|      {"2.16.840.1.101.3.4.3.7", "DSA/SHA-3(384)"},
  266|      1|      {"2.16.840.1.101.3.4.3.8", "DSA/SHA-3(512)"},
  267|      1|      {"2.16.840.1.101.3.4.3.9", "ECDSA/SHA-3(224)"},
  268|      1|      {"2.16.840.1.113730.1.13", "Certificate Comment"},
  269|      1|      {"2.5.29.14", "X509v3.SubjectKeyIdentifier"},
  270|      1|      {"2.5.29.15", "X509v3.KeyUsage"},
  271|      1|      {"2.5.29.16", "X509v3.PrivateKeyUsagePeriod"},
  272|      1|      {"2.5.29.17", "X509v3.SubjectAlternativeName"},
  273|      1|      {"2.5.29.18", "X509v3.IssuerAlternativeName"},
  274|      1|      {"2.5.29.19", "X509v3.BasicConstraints"},
  275|      1|      {"2.5.29.20", "X509v3.CRLNumber"},
  276|      1|      {"2.5.29.21", "X509v3.ReasonCode"},
  277|      1|      {"2.5.29.23", "X509v3.HoldInstructionCode"},
  278|      1|      {"2.5.29.24", "X509v3.InvalidityDate"},
  279|      1|      {"2.5.29.28", "X509v3.CRLIssuingDistributionPoint"},
  280|      1|      {"2.5.29.30", "X509v3.NameConstraints"},
  281|      1|      {"2.5.29.31", "X509v3.CRLDistributionPoints"},
  282|      1|      {"2.5.29.32", "X509v3.CertificatePolicies"},
  283|      1|      {"2.5.29.32.0", "X509v3.AnyPolicy"},
  284|      1|      {"2.5.29.35", "X509v3.AuthorityKeyIdentifier"},
  285|      1|      {"2.5.29.36", "X509v3.PolicyConstraints"},
  286|      1|      {"2.5.29.37", "X509v3.ExtendedKeyUsage"},
  287|      1|      {"2.5.4.10", "X520.Organization"},
  288|      1|      {"2.5.4.11", "X520.OrganizationalUnit"},
  289|      1|      {"2.5.4.12", "X520.Title"},
  290|      1|      {"2.5.4.3", "X520.CommonName"},
  291|      1|      {"2.5.4.4", "X520.Surname"},
  292|      1|      {"2.5.4.42", "X520.GivenName"},
  293|      1|      {"2.5.4.43", "X520.Initials"},
  294|      1|      {"2.5.4.44", "X520.GenerationalQualifier"},
  295|      1|      {"2.5.4.46", "X520.DNQualifier"},
  296|      1|      {"2.5.4.5", "X520.SerialNumber"},
  297|      1|      {"2.5.4.6", "X520.Country"},
  298|      1|      {"2.5.4.65", "X520.Pseudonym"},
  299|      1|      {"2.5.4.7", "X520.Locality"},
  300|      1|      {"2.5.4.8", "X520.State"},
  301|      1|      {"2.5.4.9", "X520.StreetAddress"},
  302|      1|      {"2.5.8.1.1", "RSA"}};
  303|      1|}
_ZN5Botan7OID_Map16load_str2oid_mapEv:
  305|      1|std::unordered_map<std::string, OID> OID_Map::load_str2oid_map() {
  306|      1|   return std::unordered_map<std::string, OID>{
  307|       |
  308|      1|      {"AES-128/CBC", OID({2, 16, 840, 1, 101, 3, 4, 1, 2})},
  309|      1|      {"AES-128/CCM", OID({2, 16, 840, 1, 101, 3, 4, 1, 7})},
  310|      1|      {"AES-128/GCM", OID({2, 16, 840, 1, 101, 3, 4, 1, 6})},
  311|      1|      {"AES-128/OCB", OID({1, 3, 6, 1, 4, 1, 25258, 3, 2, 1})},
  312|      1|      {"AES-128/SIV", OID({1, 3, 6, 1, 4, 1, 25258, 3, 4, 1})},
  313|      1|      {"AES-192/CBC", OID({2, 16, 840, 1, 101, 3, 4, 1, 22})},
  314|      1|      {"AES-192/CCM", OID({2, 16, 840, 1, 101, 3, 4, 1, 27})},
  315|      1|      {"AES-192/GCM", OID({2, 16, 840, 1, 101, 3, 4, 1, 26})},
  316|      1|      {"AES-192/OCB", OID({1, 3, 6, 1, 4, 1, 25258, 3, 2, 2})},
  317|      1|      {"AES-192/SIV", OID({1, 3, 6, 1, 4, 1, 25258, 3, 4, 2})},
  318|      1|      {"AES-256/CBC", OID({2, 16, 840, 1, 101, 3, 4, 1, 42})},
  319|      1|      {"AES-256/CCM", OID({2, 16, 840, 1, 101, 3, 4, 1, 47})},
  320|      1|      {"AES-256/GCM", OID({2, 16, 840, 1, 101, 3, 4, 1, 46})},
  321|      1|      {"AES-256/OCB", OID({1, 3, 6, 1, 4, 1, 25258, 3, 2, 3})},
  322|      1|      {"AES-256/SIV", OID({1, 3, 6, 1, 4, 1, 25258, 3, 4, 3})},
  323|      1|      {"CAST-128/CBC", OID({1, 2, 840, 113533, 7, 66, 10})},
  324|      1|      {"Camellia-128/CBC", OID({1, 2, 392, 200011, 61, 1, 1, 1, 2})},
  325|      1|      {"Camellia-128/GCM", OID({0, 3, 4401, 5, 3, 1, 9, 6})},
  326|      1|      {"Camellia-128/OCB", OID({1, 3, 6, 1, 4, 1, 25258, 3, 2, 6})},
  327|      1|      {"Camellia-128/SIV", OID({1, 3, 6, 1, 4, 1, 25258, 3, 4, 6})},
  328|      1|      {"Camellia-192/CBC", OID({1, 2, 392, 200011, 61, 1, 1, 1, 3})},
  329|      1|      {"Camellia-192/GCM", OID({0, 3, 4401, 5, 3, 1, 9, 26})},
  330|      1|      {"Camellia-192/OCB", OID({1, 3, 6, 1, 4, 1, 25258, 3, 2, 7})},
  331|      1|      {"Camellia-192/SIV", OID({1, 3, 6, 1, 4, 1, 25258, 3, 4, 7})},
  332|      1|      {"Camellia-256/CBC", OID({1, 2, 392, 200011, 61, 1, 1, 1, 4})},
  333|      1|      {"Camellia-256/GCM", OID({0, 3, 4401, 5, 3, 1, 9, 46})},
  334|      1|      {"Camellia-256/OCB", OID({1, 3, 6, 1, 4, 1, 25258, 3, 2, 8})},
  335|      1|      {"Camellia-256/SIV", OID({1, 3, 6, 1, 4, 1, 25258, 3, 4, 8})},
  336|      1|      {"Certificate Comment", OID({2, 16, 840, 1, 113730, 1, 13})},
  337|      1|      {"ChaCha20Poly1305", OID({1, 2, 840, 113549, 1, 9, 16, 3, 18})},
  338|      1|      {"Compression.Zlib", OID({1, 2, 840, 113549, 1, 9, 16, 3, 8})},
  339|      1|      {"Curve25519", OID({1, 3, 101, 110})},
  340|      1|      {"DES/CBC", OID({1, 3, 14, 3, 2, 7})},
  341|      1|      {"DH", OID({1, 2, 840, 10046, 2, 1})},
  342|      1|      {"DSA", OID({1, 2, 840, 10040, 4, 1})},
  343|      1|      {"DSA/SHA-1", OID({1, 2, 840, 10040, 4, 3})},
  344|      1|      {"DSA/SHA-224", OID({2, 16, 840, 1, 101, 3, 4, 3, 1})},
  345|      1|      {"DSA/SHA-256", OID({2, 16, 840, 1, 101, 3, 4, 3, 2})},
  346|      1|      {"DSA/SHA-3(224)", OID({2, 16, 840, 1, 101, 3, 4, 3, 5})},
  347|      1|      {"DSA/SHA-3(256)", OID({2, 16, 840, 1, 101, 3, 4, 3, 6})},
  348|      1|      {"DSA/SHA-3(384)", OID({2, 16, 840, 1, 101, 3, 4, 3, 7})},
  349|      1|      {"DSA/SHA-3(512)", OID({2, 16, 840, 1, 101, 3, 4, 3, 8})},
  350|      1|      {"DSA/SHA-384", OID({2, 16, 840, 1, 101, 3, 4, 3, 3})},
  351|      1|      {"DSA/SHA-512", OID({2, 16, 840, 1, 101, 3, 4, 3, 4})},
  352|      1|      {"Dilithium-4x4-AES-r3", OID({1, 3, 6, 1, 4, 1, 25258, 1, 10, 1})},
  353|      1|      {"Dilithium-4x4-r3", OID({1, 3, 6, 1, 4, 1, 25258, 1, 9, 1})},
  354|      1|      {"Dilithium-6x5-AES-r3", OID({1, 3, 6, 1, 4, 1, 25258, 1, 10, 2})},
  355|      1|      {"Dilithium-6x5-r3", OID({1, 3, 6, 1, 4, 1, 25258, 1, 9, 2})},
  356|      1|      {"Dilithium-8x7-AES-r3", OID({1, 3, 6, 1, 4, 1, 25258, 1, 10, 3})},
  357|      1|      {"Dilithium-8x7-r3", OID({1, 3, 6, 1, 4, 1, 25258, 1, 9, 3})},
  358|      1|      {"ECDH", OID({1, 3, 132, 1, 12})},
  359|      1|      {"ECDSA", OID({1, 2, 840, 10045, 2, 1})},
  360|      1|      {"ECDSA/SHA-1", OID({1, 2, 840, 10045, 4, 1})},
  361|      1|      {"ECDSA/SHA-224", OID({1, 2, 840, 10045, 4, 3, 1})},
  362|      1|      {"ECDSA/SHA-256", OID({1, 2, 840, 10045, 4, 3, 2})},
  363|      1|      {"ECDSA/SHA-3(224)", OID({2, 16, 840, 1, 101, 3, 4, 3, 9})},
  364|      1|      {"ECDSA/SHA-3(256)", OID({2, 16, 840, 1, 101, 3, 4, 3, 10})},
  365|      1|      {"ECDSA/SHA-3(384)", OID({2, 16, 840, 1, 101, 3, 4, 3, 11})},
  366|      1|      {"ECDSA/SHA-3(512)", OID({2, 16, 840, 1, 101, 3, 4, 3, 12})},
  367|      1|      {"ECDSA/SHA-384", OID({1, 2, 840, 10045, 4, 3, 3})},
  368|      1|      {"ECDSA/SHA-512", OID({1, 2, 840, 10045, 4, 3, 4})},
  369|      1|      {"ECGDSA", OID({1, 3, 36, 3, 3, 2, 5, 2, 1})},
  370|      1|      {"ECGDSA/RIPEMD-160", OID({1, 3, 36, 3, 3, 2, 5, 4, 1})},
  371|      1|      {"ECGDSA/SHA-1", OID({1, 3, 36, 3, 3, 2, 5, 4, 2})},
  372|      1|      {"ECGDSA/SHA-224", OID({1, 3, 36, 3, 3, 2, 5, 4, 3})},
  373|      1|      {"ECGDSA/SHA-256", OID({1, 3, 36, 3, 3, 2, 5, 4, 4})},
  374|      1|      {"ECGDSA/SHA-384", OID({1, 3, 36, 3, 3, 2, 5, 4, 5})},
  375|      1|      {"ECGDSA/SHA-512", OID({1, 3, 36, 3, 3, 2, 5, 4, 6})},
  376|      1|      {"ECKCDSA", OID({1, 0, 14888, 3, 0, 5})},
  377|      1|      {"ECKCDSA/SHA-1", OID({1, 2, 410, 200004, 1, 100, 4, 3})},
  378|      1|      {"ECKCDSA/SHA-224", OID({1, 2, 410, 200004, 1, 100, 4, 4})},
  379|      1|      {"ECKCDSA/SHA-256", OID({1, 2, 410, 200004, 1, 100, 4, 5})},
  380|      1|      {"Ed25519", OID({1, 3, 101, 112})},
  381|      1|      {"ElGamal", OID({1, 3, 6, 1, 4, 1, 3029, 1, 2, 1})},
  382|      1|      {"FrodoKEM-1344-AES", OID({1, 3, 6, 1, 4, 1, 25258, 1, 15, 3})},
  383|      1|      {"FrodoKEM-1344-SHAKE", OID({1, 3, 6, 1, 4, 1, 25258, 1, 14, 3})},
  384|      1|      {"FrodoKEM-640-AES", OID({1, 3, 6, 1, 4, 1, 25258, 1, 15, 1})},
  385|      1|      {"FrodoKEM-640-SHAKE", OID({1, 3, 6, 1, 4, 1, 25258, 1, 14, 1})},
  386|      1|      {"FrodoKEM-976-AES", OID({1, 3, 6, 1, 4, 1, 25258, 1, 15, 2})},
  387|      1|      {"FrodoKEM-976-SHAKE", OID({1, 3, 6, 1, 4, 1, 25258, 1, 14, 2})},
  388|      1|      {"GOST-34.10", OID({1, 2, 643, 2, 2, 19})},
  389|      1|      {"GOST-34.10-2012-256", OID({1, 2, 643, 7, 1, 1, 1, 1})},
  390|      1|      {"GOST-34.10-2012-256/SHA-256", OID({1, 3, 6, 1, 4, 1, 25258, 1, 6, 1})},
  391|      1|      {"GOST-34.10-2012-256/Streebog-256", OID({1, 2, 643, 7, 1, 1, 3, 2})},
  392|      1|      {"GOST-34.10-2012-512", OID({1, 2, 643, 7, 1, 1, 1, 2})},
  393|      1|      {"GOST-34.10-2012-512/Streebog-512", OID({1, 2, 643, 7, 1, 1, 3, 3})},
  394|      1|      {"GOST-34.10/GOST-R-34.11-94", OID({1, 2, 643, 2, 2, 3})},
  395|      1|      {"GOST.INN", OID({1, 2, 643, 3, 131, 1, 1})},
  396|      1|      {"GOST.IssuerSigningTool", OID({1, 2, 643, 100, 112})},
  397|      1|      {"GOST.OGRN", OID({1, 2, 643, 100, 1})},
  398|      1|      {"GOST.SubjectSigningTool", OID({1, 2, 643, 100, 111})},
  399|      1|      {"HMAC(SHA-1)", OID({1, 2, 840, 113549, 2, 7})},
  400|      1|      {"HMAC(SHA-224)", OID({1, 2, 840, 113549, 2, 8})},
  401|      1|      {"HMAC(SHA-256)", OID({1, 2, 840, 113549, 2, 9})},
  402|      1|      {"HMAC(SHA-384)", OID({1, 2, 840, 113549, 2, 10})},
  403|      1|      {"HMAC(SHA-512)", OID({1, 2, 840, 113549, 2, 11})},
  404|      1|      {"HMAC(SHA-512-256)", OID({1, 2, 840, 113549, 2, 13})},
  405|      1|      {"KeyWrap.AES-128", OID({2, 16, 840, 1, 101, 3, 4, 1, 5})},
  406|      1|      {"KeyWrap.AES-192", OID({2, 16, 840, 1, 101, 3, 4, 1, 25})},
  407|      1|      {"KeyWrap.AES-256", OID({2, 16, 840, 1, 101, 3, 4, 1, 45})},
  408|      1|      {"KeyWrap.CAST-128", OID({1, 2, 840, 113533, 7, 66, 15})},
  409|      1|      {"KeyWrap.TripleDES", OID({1, 2, 840, 113549, 1, 9, 16, 3, 6})},
  410|      1|      {"Kyber-1024-90s-r3", OID({1, 3, 6, 1, 4, 1, 25258, 1, 11, 3})},
  411|      1|      {"Kyber-1024-r3", OID({1, 3, 6, 1, 4, 1, 25258, 1, 7, 3})},
  412|      1|      {"Kyber-512-90s-r3", OID({1, 3, 6, 1, 4, 1, 25258, 1, 11, 1})},
  413|      1|      {"Kyber-512-r3", OID({1, 3, 6, 1, 4, 1, 25258, 1, 7, 1})},
  414|      1|      {"Kyber-768-90s-r3", OID({1, 3, 6, 1, 4, 1, 25258, 1, 11, 2})},
  415|      1|      {"Kyber-768-r3", OID({1, 3, 6, 1, 4, 1, 25258, 1, 7, 2})},
  416|      1|      {"MD5", OID({1, 2, 840, 113549, 2, 5})},
  417|      1|      {"MGF1", OID({1, 2, 840, 113549, 1, 1, 8})},
  418|      1|      {"McEliece", OID({1, 3, 6, 1, 4, 1, 25258, 1, 3})},
  419|      1|      {"Microsoft SmartcardLogon", OID({1, 3, 6, 1, 4, 1, 311, 20, 2, 2})},
  420|      1|      {"Microsoft UPN", OID({1, 3, 6, 1, 4, 1, 311, 20, 2, 3})},
  421|      1|      {"OpenPGP.Curve25519", OID({1, 3, 6, 1, 4, 1, 3029, 1, 5, 1})},
  422|      1|      {"OpenPGP.Ed25519", OID({1, 3, 6, 1, 4, 1, 11591, 15, 1})},
  423|      1|      {"PBE-PKCS5v20", OID({1, 2, 840, 113549, 1, 5, 13})},
  424|      1|      {"PBES2", OID({1, 2, 840, 113549, 1, 5, 13})},
  425|      1|      {"PKCS5.PBKDF2", OID({1, 2, 840, 113549, 1, 5, 12})},
  426|      1|      {"PKCS9.ChallengePassword", OID({1, 2, 840, 113549, 1, 9, 7})},
  427|      1|      {"PKCS9.ContentType", OID({1, 2, 840, 113549, 1, 9, 3})},
  428|      1|      {"PKCS9.EmailAddress", OID({1, 2, 840, 113549, 1, 9, 1})},
  429|      1|      {"PKCS9.ExtensionRequest", OID({1, 2, 840, 113549, 1, 9, 14})},
  430|      1|      {"PKCS9.MessageDigest", OID({1, 2, 840, 113549, 1, 9, 4})},
  431|      1|      {"PKCS9.UnstructuredName", OID({1, 2, 840, 113549, 1, 9, 2})},
  432|      1|      {"PKIX.AuthorityInformationAccess", OID({1, 3, 6, 1, 5, 5, 7, 1, 1})},
  433|      1|      {"PKIX.CertificateAuthorityIssuers", OID({1, 3, 6, 1, 5, 5, 7, 48, 2})},
  434|      1|      {"PKIX.ClientAuth", OID({1, 3, 6, 1, 5, 5, 7, 3, 2})},
  435|      1|      {"PKIX.CodeSigning", OID({1, 3, 6, 1, 5, 5, 7, 3, 3})},
  436|      1|      {"PKIX.EmailProtection", OID({1, 3, 6, 1, 5, 5, 7, 3, 4})},
  437|      1|      {"PKIX.IPsecEndSystem", OID({1, 3, 6, 1, 5, 5, 7, 3, 5})},
  438|      1|      {"PKIX.IPsecTunnel", OID({1, 3, 6, 1, 5, 5, 7, 3, 6})},
  439|      1|      {"PKIX.IPsecUser", OID({1, 3, 6, 1, 5, 5, 7, 3, 7})},
  440|      1|      {"PKIX.OCSP", OID({1, 3, 6, 1, 5, 5, 7, 48, 1})},
  441|      1|      {"PKIX.OCSP.BasicResponse", OID({1, 3, 6, 1, 5, 5, 7, 48, 1, 1})},
  442|      1|      {"PKIX.OCSP.NoCheck", OID({1, 3, 6, 1, 5, 5, 7, 48, 1, 5})},
  443|      1|      {"PKIX.OCSPSigning", OID({1, 3, 6, 1, 5, 5, 7, 3, 9})},
  444|      1|      {"PKIX.ServerAuth", OID({1, 3, 6, 1, 5, 5, 7, 3, 1})},
  445|      1|      {"PKIX.TimeStamping", OID({1, 3, 6, 1, 5, 5, 7, 3, 8})},
  446|      1|      {"PKIX.XMPPAddr", OID({1, 3, 6, 1, 5, 5, 7, 8, 5})},
  447|      1|      {"RIPEMD-160", OID({1, 3, 36, 3, 2, 1})},
  448|      1|      {"RSA", OID({1, 2, 840, 113549, 1, 1, 1})},
  449|      1|      {"RSA/EMSA3(MD5)", OID({1, 2, 840, 113549, 1, 1, 4})},
  450|      1|      {"RSA/EMSA3(RIPEMD-160)", OID({1, 3, 36, 3, 3, 1, 2})},
  451|      1|      {"RSA/EMSA3(SHA-1)", OID({1, 2, 840, 113549, 1, 1, 5})},
  452|      1|      {"RSA/EMSA3(SHA-224)", OID({1, 2, 840, 113549, 1, 1, 14})},
  453|      1|      {"RSA/EMSA3(SHA-256)", OID({1, 2, 840, 113549, 1, 1, 11})},
  454|      1|      {"RSA/EMSA3(SHA-3(224))", OID({2, 16, 840, 1, 101, 3, 4, 3, 13})},
  455|      1|      {"RSA/EMSA3(SHA-3(256))", OID({2, 16, 840, 1, 101, 3, 4, 3, 14})},
  456|      1|      {"RSA/EMSA3(SHA-3(384))", OID({2, 16, 840, 1, 101, 3, 4, 3, 15})},
  457|      1|      {"RSA/EMSA3(SHA-3(512))", OID({2, 16, 840, 1, 101, 3, 4, 3, 16})},
  458|      1|      {"RSA/EMSA3(SHA-384)", OID({1, 2, 840, 113549, 1, 1, 12})},
  459|      1|      {"RSA/EMSA3(SHA-512)", OID({1, 2, 840, 113549, 1, 1, 13})},
  460|      1|      {"RSA/EMSA3(SHA-512-256)", OID({1, 2, 840, 113549, 1, 1, 16})},
  461|      1|      {"RSA/EMSA3(SM3)", OID({1, 2, 156, 10197, 1, 504})},
  462|      1|      {"RSA/EMSA4", OID({1, 2, 840, 113549, 1, 1, 10})},
  463|      1|      {"RSA/OAEP", OID({1, 2, 840, 113549, 1, 1, 7})},
  464|      1|      {"SEED/CBC", OID({1, 2, 410, 200004, 1, 4})},
  465|      1|      {"SHA-1", OID({1, 3, 14, 3, 2, 26})},
  466|      1|      {"SHA-224", OID({2, 16, 840, 1, 101, 3, 4, 2, 4})},
  467|      1|      {"SHA-256", OID({2, 16, 840, 1, 101, 3, 4, 2, 1})},
  468|      1|      {"SHA-3(224)", OID({2, 16, 840, 1, 101, 3, 4, 2, 7})},
  469|      1|      {"SHA-3(256)", OID({2, 16, 840, 1, 101, 3, 4, 2, 8})},
  470|      1|      {"SHA-3(384)", OID({2, 16, 840, 1, 101, 3, 4, 2, 9})},
  471|      1|      {"SHA-3(512)", OID({2, 16, 840, 1, 101, 3, 4, 2, 10})},
  472|      1|      {"SHA-384", OID({2, 16, 840, 1, 101, 3, 4, 2, 2})},
  473|      1|      {"SHA-512", OID({2, 16, 840, 1, 101, 3, 4, 2, 3})},
  474|      1|      {"SHA-512-256", OID({2, 16, 840, 1, 101, 3, 4, 2, 6})},
  475|      1|      {"SHAKE-128", OID({2, 16, 840, 1, 101, 3, 4, 2, 11})},
  476|      1|      {"SHAKE-256", OID({2, 16, 840, 1, 101, 3, 4, 2, 12})},
  477|      1|      {"SM2", OID({1, 2, 156, 10197, 1, 301, 1})},
  478|      1|      {"SM2_Enc", OID({1, 2, 156, 10197, 1, 301, 3})},
  479|      1|      {"SM2_Kex", OID({1, 2, 156, 10197, 1, 301, 2})},
  480|      1|      {"SM2_Sig", OID({1, 2, 156, 10197, 1, 301, 1})},
  481|      1|      {"SM2_Sig/SM3", OID({1, 2, 156, 10197, 1, 501})},
  482|      1|      {"SM3", OID({1, 2, 156, 10197, 1, 401})},
  483|      1|      {"SM4/CBC", OID({1, 2, 156, 10197, 1, 104, 2})},
  484|      1|      {"SM4/GCM", OID({1, 2, 156, 10197, 1, 104, 8})},
  485|      1|      {"SM4/OCB", OID({1, 2, 156, 10197, 1, 104, 100})},
  486|      1|      {"SM4/SIV", OID({1, 3, 6, 1, 4, 1, 25258, 3, 4, 9})},
  487|      1|      {"Scrypt", OID({1, 3, 6, 1, 4, 1, 11591, 4, 11})},
  488|      1|      {"Serpent/CBC", OID({1, 3, 6, 1, 4, 1, 25258, 3, 1})},
  489|      1|      {"Serpent/GCM", OID({1, 3, 6, 1, 4, 1, 25258, 3, 101})},
  490|      1|      {"Serpent/OCB", OID({1, 3, 6, 1, 4, 1, 25258, 3, 2, 4})},
  491|      1|      {"Serpent/SIV", OID({1, 3, 6, 1, 4, 1, 25258, 3, 4, 4})},
  492|      1|      {"SphincsPlus-haraka-128f-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 2})},
  493|      1|      {"SphincsPlus-haraka-128s-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 1})},
  494|      1|      {"SphincsPlus-haraka-192f-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 4})},
  495|      1|      {"SphincsPlus-haraka-192s-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 3})},
  496|      1|      {"SphincsPlus-haraka-256f-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 6})},
  497|      1|      {"SphincsPlus-haraka-256s-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 5})},
  498|      1|      {"SphincsPlus-sha2-128f-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 2})},
  499|      1|      {"SphincsPlus-sha2-128s-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 1})},
  500|      1|      {"SphincsPlus-sha2-192f-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 4})},
  501|      1|      {"SphincsPlus-sha2-192s-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 3})},
  502|      1|      {"SphincsPlus-sha2-256f-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 6})},
  503|      1|      {"SphincsPlus-sha2-256s-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 5})},
  504|      1|      {"SphincsPlus-shake-128f-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 2})},
  505|      1|      {"SphincsPlus-shake-128s-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 1})},
  506|      1|      {"SphincsPlus-shake-192f-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 4})},
  507|      1|      {"SphincsPlus-shake-192s-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 3})},
  508|      1|      {"SphincsPlus-shake-256f-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 6})},
  509|      1|      {"SphincsPlus-shake-256s-r3.1", OID({1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 5})},
  510|      1|      {"Streebog-256", OID({1, 2, 643, 7, 1, 1, 2, 2})},
  511|      1|      {"Streebog-512", OID({1, 2, 643, 7, 1, 1, 2, 3})},
  512|      1|      {"Threefish-512/CBC", OID({1, 3, 6, 1, 4, 1, 25258, 3, 2})},
  513|      1|      {"TripleDES/CBC", OID({1, 2, 840, 113549, 3, 7})},
  514|      1|      {"Twofish/CBC", OID({1, 3, 6, 1, 4, 1, 25258, 3, 3})},
  515|      1|      {"Twofish/GCM", OID({1, 3, 6, 1, 4, 1, 25258, 3, 102})},
  516|      1|      {"Twofish/OCB", OID({1, 3, 6, 1, 4, 1, 25258, 3, 2, 5})},
  517|      1|      {"Twofish/SIV", OID({1, 3, 6, 1, 4, 1, 25258, 3, 4, 5})},
  518|      1|      {"X509v3.AnyPolicy", OID({2, 5, 29, 32, 0})},
  519|      1|      {"X509v3.AuthorityKeyIdentifier", OID({2, 5, 29, 35})},
  520|      1|      {"X509v3.BasicConstraints", OID({2, 5, 29, 19})},
  521|      1|      {"X509v3.CRLDistributionPoints", OID({2, 5, 29, 31})},
  522|      1|      {"X509v3.CRLIssuingDistributionPoint", OID({2, 5, 29, 28})},
  523|      1|      {"X509v3.CRLNumber", OID({2, 5, 29, 20})},
  524|      1|      {"X509v3.CertificatePolicies", OID({2, 5, 29, 32})},
  525|      1|      {"X509v3.ExtendedKeyUsage", OID({2, 5, 29, 37})},
  526|      1|      {"X509v3.HoldInstructionCode", OID({2, 5, 29, 23})},
  527|      1|      {"X509v3.InvalidityDate", OID({2, 5, 29, 24})},
  528|      1|      {"X509v3.IssuerAlternativeName", OID({2, 5, 29, 18})},
  529|      1|      {"X509v3.KeyUsage", OID({2, 5, 29, 15})},
  530|      1|      {"X509v3.NameConstraints", OID({2, 5, 29, 30})},
  531|      1|      {"X509v3.PolicyConstraints", OID({2, 5, 29, 36})},
  532|      1|      {"X509v3.PrivateKeyUsagePeriod", OID({2, 5, 29, 16})},
  533|      1|      {"X509v3.ReasonCode", OID({2, 5, 29, 21})},
  534|      1|      {"X509v3.SubjectAlternativeName", OID({2, 5, 29, 17})},
  535|      1|      {"X509v3.SubjectKeyIdentifier", OID({2, 5, 29, 14})},
  536|      1|      {"X520.CommonName", OID({2, 5, 4, 3})},
  537|      1|      {"X520.Country", OID({2, 5, 4, 6})},
  538|      1|      {"X520.DNQualifier", OID({2, 5, 4, 46})},
  539|      1|      {"X520.GenerationalQualifier", OID({2, 5, 4, 44})},
  540|      1|      {"X520.GivenName", OID({2, 5, 4, 42})},
  541|      1|      {"X520.Initials", OID({2, 5, 4, 43})},
  542|      1|      {"X520.Locality", OID({2, 5, 4, 7})},
  543|      1|      {"X520.Organization", OID({2, 5, 4, 10})},
  544|      1|      {"X520.OrganizationalUnit", OID({2, 5, 4, 11})},
  545|      1|      {"X520.Pseudonym", OID({2, 5, 4, 65})},
  546|      1|      {"X520.SerialNumber", OID({2, 5, 4, 5})},
  547|      1|      {"X520.State", OID({2, 5, 4, 8})},
  548|      1|      {"X520.StreetAddress", OID({2, 5, 4, 9})},
  549|      1|      {"X520.Surname", OID({2, 5, 4, 4})},
  550|      1|      {"X520.Title", OID({2, 5, 4, 12})},
  551|      1|      {"XMSS", OID({0, 4, 0, 127, 0, 15, 1, 1, 13, 0})},
  552|      1|      {"XMSS-draft12", OID({1, 3, 6, 1, 4, 1, 25258, 1, 8})},
  553|      1|      {"XMSS-draft6", OID({1, 3, 6, 1, 4, 1, 25258, 1, 5})},
  554|      1|      {"brainpool160r1", OID({1, 3, 36, 3, 3, 2, 8, 1, 1, 1})},
  555|      1|      {"brainpool192r1", OID({1, 3, 36, 3, 3, 2, 8, 1, 1, 3})},
  556|      1|      {"brainpool224r1", OID({1, 3, 36, 3, 3, 2, 8, 1, 1, 5})},
  557|      1|      {"brainpool256r1", OID({1, 3, 36, 3, 3, 2, 8, 1, 1, 7})},
  558|      1|      {"brainpool320r1", OID({1, 3, 36, 3, 3, 2, 8, 1, 1, 9})},
  559|      1|      {"brainpool384r1", OID({1, 3, 36, 3, 3, 2, 8, 1, 1, 11})},
  560|      1|      {"brainpool512r1", OID({1, 3, 36, 3, 3, 2, 8, 1, 1, 13})},
  561|      1|      {"eFrodoKEM-1344-AES", OID({1, 3, 6, 1, 4, 1, 25258, 1, 17, 3})},
  562|      1|      {"eFrodoKEM-1344-SHAKE", OID({1, 3, 6, 1, 4, 1, 25258, 1, 16, 3})},
  563|      1|      {"eFrodoKEM-640-AES", OID({1, 3, 6, 1, 4, 1, 25258, 1, 17, 1})},
  564|      1|      {"eFrodoKEM-640-SHAKE", OID({1, 3, 6, 1, 4, 1, 25258, 1, 16, 1})},
  565|      1|      {"eFrodoKEM-976-AES", OID({1, 3, 6, 1, 4, 1, 25258, 1, 17, 2})},
  566|      1|      {"eFrodoKEM-976-SHAKE", OID({1, 3, 6, 1, 4, 1, 25258, 1, 16, 2})},
  567|      1|      {"frp256v1", OID({1, 2, 250, 1, 223, 101, 256, 1})},
  568|      1|      {"gost_256A", OID({1, 2, 643, 7, 1, 2, 1, 1, 1})},
  569|      1|      {"gost_256B", OID({1, 2, 643, 7, 1, 2, 1, 1, 2})},
  570|      1|      {"gost_512A", OID({1, 2, 643, 7, 1, 2, 1, 2, 1})},
  571|      1|      {"gost_512B", OID({1, 2, 643, 7, 1, 2, 1, 2, 2})},
  572|      1|      {"secp160k1", OID({1, 3, 132, 0, 9})},
  573|      1|      {"secp160r1", OID({1, 3, 132, 0, 8})},
  574|      1|      {"secp160r2", OID({1, 3, 132, 0, 30})},
  575|      1|      {"secp192k1", OID({1, 3, 132, 0, 31})},
  576|      1|      {"secp192r1", OID({1, 2, 840, 10045, 3, 1, 1})},
  577|      1|      {"secp224k1", OID({1, 3, 132, 0, 32})},
  578|      1|      {"secp224r1", OID({1, 3, 132, 0, 33})},
  579|      1|      {"secp256k1", OID({1, 3, 132, 0, 10})},
  580|      1|      {"secp256r1", OID({1, 2, 840, 10045, 3, 1, 7})},
  581|      1|      {"secp384r1", OID({1, 3, 132, 0, 34})},
  582|      1|      {"secp521r1", OID({1, 3, 132, 0, 35})},
  583|      1|      {"sm2p256v1", OID({1, 2, 156, 10197, 1, 301})},
  584|      1|      {"x962_p192v2", OID({1, 2, 840, 10045, 3, 1, 2})},
  585|      1|      {"x962_p192v3", OID({1, 2, 840, 10045, 3, 1, 3})},
  586|      1|      {"x962_p239v1", OID({1, 2, 840, 10045, 3, 1, 4})},
  587|      1|      {"x962_p239v2", OID({1, 2, 840, 10045, 3, 1, 5})},
  588|      1|      {"x962_p239v3", OID({1, 2, 840, 10045, 3, 1, 6})}};
  589|      1|}

_ZN5Botan18SymmetricAlgorithm7set_keyENSt3__14spanIKhLm18446744073709551615EEE:
   17|      4|void SymmetricAlgorithm::set_key(std::span<const uint8_t> key) {
   18|      4|   if(!valid_keylength(key.size())) {
  ------------------
  |  Branch (18:7): [True: 0, False: 4]
  ------------------
   19|      0|      throw Invalid_Key_Length(name(), key.size());
   20|      0|   }
   21|      4|   key_schedule(key);
   22|      4|}

_ZN5Botan10hex_decodeEPhPKcmRmb:
   81|      9|size_t hex_decode(uint8_t output[], const char input[], size_t input_length, size_t& input_consumed, bool ignore_ws) {
   82|      9|   uint8_t* out_ptr = output;
   83|      9|   bool top_nibble = true;
   84|       |
   85|      9|   clear_mem(output, input_length / 2);
   86|       |
   87|    561|   for(size_t i = 0; i != input_length; ++i) {
  ------------------
  |  Branch (87:22): [True: 552, False: 9]
  ------------------
   88|    552|      const uint8_t bin = hex_char_to_bin(input[i]);
   89|       |
   90|    552|      if(bin >= 0x10) {
  ------------------
  |  Branch (90:10): [True: 0, False: 552]
  ------------------
   91|      0|         if(bin == 0x80 && ignore_ws) {
  ------------------
  |  Branch (91:13): [True: 0, False: 0]
  |  Branch (91:28): [True: 0, False: 0]
  ------------------
   92|      0|            continue;
   93|      0|         }
   94|       |
   95|      0|         throw Invalid_Argument(fmt("hex_decode: invalid character '{}'", format_char_for_display(input[i])));
   96|      0|      }
   97|       |
   98|    552|      if(top_nibble) {
  ------------------
  |  Branch (98:10): [True: 276, False: 276]
  ------------------
   99|    276|         *out_ptr |= bin << 4;
  100|    276|      } else {
  101|    276|         *out_ptr |= bin;
  102|    276|      }
  103|       |
  104|    552|      top_nibble = !top_nibble;
  105|    552|      if(top_nibble) {
  ------------------
  |  Branch (105:10): [True: 276, False: 276]
  ------------------
  106|    276|         ++out_ptr;
  107|    276|      }
  108|    552|   }
  109|       |
  110|      9|   input_consumed = input_length;
  111|      9|   size_t written = (out_ptr - output);
  112|       |
  113|       |   /*
  114|       |   * We only got half of a uint8_t at the end; zap the half-written
  115|       |   * output and mark it as unread
  116|       |   */
  117|      9|   if(!top_nibble) {
  ------------------
  |  Branch (117:7): [True: 0, False: 9]
  ------------------
  118|      0|      *out_ptr = 0;
  119|      0|      input_consumed -= 1;
  120|      0|   }
  121|       |
  122|      9|   return written;
  123|      9|}
_ZN5Botan10hex_decodeEPhPKcmb:
  125|      9|size_t hex_decode(uint8_t output[], const char input[], size_t input_length, bool ignore_ws) {
  126|      9|   size_t consumed = 0;
  127|      9|   size_t written = hex_decode(output, input, input_length, consumed, ignore_ws);
  128|       |
  129|      9|   if(consumed != input_length) {
  ------------------
  |  Branch (129:7): [True: 0, False: 9]
  ------------------
  130|      0|      throw Invalid_Argument("hex_decode: input did not have full bytes");
  131|      0|   }
  132|       |
  133|      9|   return written;
  134|      9|}
_ZN5Botan17hex_decode_lockedEPKcmb:
  144|      9|secure_vector<uint8_t> hex_decode_locked(const char input[], size_t input_length, bool ignore_ws) {
  145|      9|   secure_vector<uint8_t> bin(1 + input_length / 2);
  146|       |
  147|      9|   size_t written = hex_decode(bin.data(), input, input_length, ignore_ws);
  148|       |
  149|      9|   bin.resize(written);
  150|      9|   return bin;
  151|      9|}
hex.cpp:_ZN5Botan12_GLOBAL__N_115hex_char_to_binEc:
   55|    552|uint8_t hex_char_to_bin(char input) {
   56|    552|   const uint8_t c = static_cast<uint8_t>(input);
   57|       |
   58|    552|   const auto is_alpha_upper = CT::Mask<uint8_t>::is_within_range(c, uint8_t('A'), uint8_t('F'));
   59|    552|   const auto is_alpha_lower = CT::Mask<uint8_t>::is_within_range(c, uint8_t('a'), uint8_t('f'));
   60|    552|   const auto is_decimal = CT::Mask<uint8_t>::is_within_range(c, uint8_t('0'), uint8_t('9'));
   61|       |
   62|    552|   const auto is_whitespace =
   63|    552|      CT::Mask<uint8_t>::is_any_of(c, {uint8_t(' '), uint8_t('\t'), uint8_t('\n'), uint8_t('\r')});
   64|       |
   65|    552|   const uint8_t c_upper = c - uint8_t('A') + 10;
   66|    552|   const uint8_t c_lower = c - uint8_t('a') + 10;
   67|    552|   const uint8_t c_decim = c - uint8_t('0');
   68|       |
   69|    552|   uint8_t ret = 0xFF;  // default value
   70|       |
   71|    552|   ret = is_alpha_upper.select(c_upper, ret);
   72|    552|   ret = is_alpha_lower.select(c_lower, ret);
   73|    552|   ret = is_decimal.select(c_decim, ret);
   74|    552|   ret = is_whitespace.select(0x80, ret);
   75|       |
   76|    552|   return ret;
   77|    552|}

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

_ZN5Botan7SHA_25615compress_digestERNSt3__16vectorIjNS_16secure_allocatorIjEEEENS1_4spanIKhLm18446744073709551615EEEm:
   49|     10|void SHA_256::compress_digest(digest_type& digest, std::span<const uint8_t> input, size_t blocks) {
   50|     10|#if defined(BOTAN_HAS_SHA2_32_X86)
   51|     10|   if(CPUID::has_intel_sha()) {
  ------------------
  |  Branch (51:7): [True: 0, False: 10]
  ------------------
   52|      0|      return SHA_256::compress_digest_x86(digest, input, blocks);
   53|      0|   }
   54|     10|#endif
   55|       |
   56|     10|#if defined(BOTAN_HAS_SHA2_32_X86_BMI2)
   57|     10|   if(CPUID::has_bmi2()) {
  ------------------
  |  Branch (57:7): [True: 10, False: 0]
  ------------------
   58|     10|      return SHA_256::compress_digest_x86_bmi2(digest, input, blocks);
   59|     10|   }
   60|      0|#endif
   61|       |
   62|       |#if defined(BOTAN_HAS_SHA2_32_ARMV8)
   63|       |   if(CPUID::has_arm_sha2()) {
   64|       |      return SHA_256::compress_digest_armv8(digest, input, blocks);
   65|       |   }
   66|       |#endif
   67|       |
   68|      0|   uint32_t A = digest[0], B = digest[1], C = digest[2], D = digest[3], E = digest[4], F = digest[5], G = digest[6],
   69|      0|            H = digest[7];
   70|       |
   71|      0|   BufferSlicer in(input);
   72|       |
   73|      0|   for(size_t i = 0; i != blocks; ++i) {
  ------------------
  |  Branch (73:22): [True: 0, False: 0]
  ------------------
   74|      0|      const auto block = in.take(block_bytes);
   75|       |
   76|      0|      uint32_t W00 = load_be<uint32_t>(block.data(), 0);
   77|      0|      uint32_t W01 = load_be<uint32_t>(block.data(), 1);
   78|      0|      uint32_t W02 = load_be<uint32_t>(block.data(), 2);
   79|      0|      uint32_t W03 = load_be<uint32_t>(block.data(), 3);
   80|      0|      uint32_t W04 = load_be<uint32_t>(block.data(), 4);
   81|      0|      uint32_t W05 = load_be<uint32_t>(block.data(), 5);
   82|      0|      uint32_t W06 = load_be<uint32_t>(block.data(), 6);
   83|      0|      uint32_t W07 = load_be<uint32_t>(block.data(), 7);
   84|      0|      uint32_t W08 = load_be<uint32_t>(block.data(), 8);
   85|      0|      uint32_t W09 = load_be<uint32_t>(block.data(), 9);
   86|      0|      uint32_t W10 = load_be<uint32_t>(block.data(), 10);
   87|      0|      uint32_t W11 = load_be<uint32_t>(block.data(), 11);
   88|      0|      uint32_t W12 = load_be<uint32_t>(block.data(), 12);
   89|      0|      uint32_t W13 = load_be<uint32_t>(block.data(), 13);
   90|      0|      uint32_t W14 = load_be<uint32_t>(block.data(), 14);
   91|      0|      uint32_t W15 = load_be<uint32_t>(block.data(), 15);
   92|       |
   93|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W00, W14, W09, W01, 0x428A2F98);
   94|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W01, W15, W10, W02, 0x71374491);
   95|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W02, W00, W11, W03, 0xB5C0FBCF);
   96|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W03, W01, W12, W04, 0xE9B5DBA5);
   97|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W04, W02, W13, W05, 0x3956C25B);
   98|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W05, W03, W14, W06, 0x59F111F1);
   99|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W06, W04, W15, W07, 0x923F82A4);
  100|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W07, W05, W00, W08, 0xAB1C5ED5);
  101|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W08, W06, W01, W09, 0xD807AA98);
  102|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W09, W07, W02, W10, 0x12835B01);
  103|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W10, W08, W03, W11, 0x243185BE);
  104|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W11, W09, W04, W12, 0x550C7DC3);
  105|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W12, W10, W05, W13, 0x72BE5D74);
  106|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W13, W11, W06, W14, 0x80DEB1FE);
  107|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W14, W12, W07, W15, 0x9BDC06A7);
  108|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W15, W13, W08, W00, 0xC19BF174);
  109|       |
  110|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W00, W14, W09, W01, 0xE49B69C1);
  111|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W01, W15, W10, W02, 0xEFBE4786);
  112|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W02, W00, W11, W03, 0x0FC19DC6);
  113|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W03, W01, W12, W04, 0x240CA1CC);
  114|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W04, W02, W13, W05, 0x2DE92C6F);
  115|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W05, W03, W14, W06, 0x4A7484AA);
  116|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W06, W04, W15, W07, 0x5CB0A9DC);
  117|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W07, W05, W00, W08, 0x76F988DA);
  118|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W08, W06, W01, W09, 0x983E5152);
  119|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W09, W07, W02, W10, 0xA831C66D);
  120|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W10, W08, W03, W11, 0xB00327C8);
  121|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W11, W09, W04, W12, 0xBF597FC7);
  122|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W12, W10, W05, W13, 0xC6E00BF3);
  123|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W13, W11, W06, W14, 0xD5A79147);
  124|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W14, W12, W07, W15, 0x06CA6351);
  125|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W15, W13, W08, W00, 0x14292967);
  126|       |
  127|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W00, W14, W09, W01, 0x27B70A85);
  128|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W01, W15, W10, W02, 0x2E1B2138);
  129|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W02, W00, W11, W03, 0x4D2C6DFC);
  130|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W03, W01, W12, W04, 0x53380D13);
  131|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W04, W02, W13, W05, 0x650A7354);
  132|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W05, W03, W14, W06, 0x766A0ABB);
  133|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W06, W04, W15, W07, 0x81C2C92E);
  134|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W07, W05, W00, W08, 0x92722C85);
  135|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W08, W06, W01, W09, 0xA2BFE8A1);
  136|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W09, W07, W02, W10, 0xA81A664B);
  137|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W10, W08, W03, W11, 0xC24B8B70);
  138|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W11, W09, W04, W12, 0xC76C51A3);
  139|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W12, W10, W05, W13, 0xD192E819);
  140|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W13, W11, W06, W14, 0xD6990624);
  141|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W14, W12, W07, W15, 0xF40E3585);
  142|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W15, W13, W08, W00, 0x106AA070);
  143|       |
  144|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W00, W14, W09, W01, 0x19A4C116);
  145|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W01, W15, W10, W02, 0x1E376C08);
  146|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W02, W00, W11, W03, 0x2748774C);
  147|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W03, W01, W12, W04, 0x34B0BCB5);
  148|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W04, W02, W13, W05, 0x391C0CB3);
  149|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W05, W03, W14, W06, 0x4ED8AA4A);
  150|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W06, W04, W15, W07, 0x5B9CCA4F);
  151|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W07, W05, W00, W08, 0x682E6FF3);
  152|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W08, W06, W01, W09, 0x748F82EE);
  153|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W09, W07, W02, W10, 0x78A5636F);
  154|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W10, W08, W03, W11, 0x84C87814);
  155|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W11, W09, W04, W12, 0x8CC70208);
  156|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W12, W10, W05, W13, 0x90BEFFFA);
  157|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W13, W11, W06, W14, 0xA4506CEB);
  158|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W14, W12, W07, W15, 0xBEF9A3F7);
  159|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W15, W13, W08, W00, 0xC67178F2);
  160|       |
  161|      0|      A = (digest[0] += A);
  162|      0|      B = (digest[1] += B);
  163|      0|      C = (digest[2] += C);
  164|      0|      D = (digest[3] += D);
  165|      0|      E = (digest[4] += E);
  166|      0|      F = (digest[5] += F);
  167|      0|      G = (digest[6] += G);
  168|      0|      H = (digest[7] += H);
  169|      0|   }
  170|      0|}
_ZN5Botan7SHA_25610compress_nERNSt3__16vectorIjNS_16secure_allocatorIjEEEENS1_4spanIKhLm18446744073709551615EEEm:
  204|     10|void SHA_256::compress_n(digest_type& digest, std::span<const uint8_t> input, size_t blocks) {
  205|     10|   SHA_256::compress_digest(digest, input, blocks);
  206|     10|}
_ZN5Botan7SHA_2564initERNSt3__16vectorIjNS_16secure_allocatorIjEEEE:
  208|      7|void SHA_256::init(digest_type& digest) {
  209|      7|   digest.assign({0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19});
  210|      7|}
_ZN5Botan7SHA_2568add_dataENSt3__14spanIKhLm18446744073709551615EEE:
  220|      9|void SHA_256::add_data(std::span<const uint8_t> input) {
  221|      9|   m_md.update(input);
  222|      9|}
_ZN5Botan7SHA_25612final_resultENSt3__14spanIhLm18446744073709551615EEE:
  224|      4|void SHA_256::final_result(std::span<uint8_t> output) {
  225|      4|   m_md.final(output);
  226|      4|}

_ZN5Botan7SHA_25624compress_digest_x86_bmi2ERNSt3__16vectorIjNS_16secure_allocatorIjEEEENS1_4spanIKhLm18446744073709551615EEEm:
   24|     10|void SHA_256::compress_digest_x86_bmi2(digest_type& digest, std::span<const uint8_t> input, size_t blocks) {
   25|     10|   uint32_t A = digest[0], B = digest[1], C = digest[2], D = digest[3], E = digest[4], F = digest[5], G = digest[6],
   26|     10|            H = digest[7];
   27|       |
   28|     10|   BufferSlicer in(input);
   29|       |
   30|     20|   for(size_t i = 0; i != blocks; ++i) {
  ------------------
  |  Branch (30:22): [True: 10, False: 10]
  ------------------
   31|     10|      const auto block = in.take(block_bytes);
   32|       |
   33|     10|      uint32_t W00 = load_be<uint32_t>(block.data(), 0);
   34|     10|      uint32_t W01 = load_be<uint32_t>(block.data(), 1);
   35|     10|      uint32_t W02 = load_be<uint32_t>(block.data(), 2);
   36|     10|      uint32_t W03 = load_be<uint32_t>(block.data(), 3);
   37|     10|      uint32_t W04 = load_be<uint32_t>(block.data(), 4);
   38|     10|      uint32_t W05 = load_be<uint32_t>(block.data(), 5);
   39|     10|      uint32_t W06 = load_be<uint32_t>(block.data(), 6);
   40|     10|      uint32_t W07 = load_be<uint32_t>(block.data(), 7);
   41|     10|      uint32_t W08 = load_be<uint32_t>(block.data(), 8);
   42|     10|      uint32_t W09 = load_be<uint32_t>(block.data(), 9);
   43|     10|      uint32_t W10 = load_be<uint32_t>(block.data(), 10);
   44|     10|      uint32_t W11 = load_be<uint32_t>(block.data(), 11);
   45|     10|      uint32_t W12 = load_be<uint32_t>(block.data(), 12);
   46|     10|      uint32_t W13 = load_be<uint32_t>(block.data(), 13);
   47|     10|      uint32_t W14 = load_be<uint32_t>(block.data(), 14);
   48|     10|      uint32_t W15 = load_be<uint32_t>(block.data(), 15);
   49|       |
   50|     10|      SHA2_32_F(A, B, C, D, E, F, G, H, W00, W14, W09, W01, 0x428A2F98);
   51|     10|      SHA2_32_F(H, A, B, C, D, E, F, G, W01, W15, W10, W02, 0x71374491);
   52|     10|      SHA2_32_F(G, H, A, B, C, D, E, F, W02, W00, W11, W03, 0xB5C0FBCF);
   53|     10|      SHA2_32_F(F, G, H, A, B, C, D, E, W03, W01, W12, W04, 0xE9B5DBA5);
   54|     10|      SHA2_32_F(E, F, G, H, A, B, C, D, W04, W02, W13, W05, 0x3956C25B);
   55|     10|      SHA2_32_F(D, E, F, G, H, A, B, C, W05, W03, W14, W06, 0x59F111F1);
   56|     10|      SHA2_32_F(C, D, E, F, G, H, A, B, W06, W04, W15, W07, 0x923F82A4);
   57|     10|      SHA2_32_F(B, C, D, E, F, G, H, A, W07, W05, W00, W08, 0xAB1C5ED5);
   58|     10|      SHA2_32_F(A, B, C, D, E, F, G, H, W08, W06, W01, W09, 0xD807AA98);
   59|     10|      SHA2_32_F(H, A, B, C, D, E, F, G, W09, W07, W02, W10, 0x12835B01);
   60|     10|      SHA2_32_F(G, H, A, B, C, D, E, F, W10, W08, W03, W11, 0x243185BE);
   61|     10|      SHA2_32_F(F, G, H, A, B, C, D, E, W11, W09, W04, W12, 0x550C7DC3);
   62|     10|      SHA2_32_F(E, F, G, H, A, B, C, D, W12, W10, W05, W13, 0x72BE5D74);
   63|     10|      SHA2_32_F(D, E, F, G, H, A, B, C, W13, W11, W06, W14, 0x80DEB1FE);
   64|     10|      SHA2_32_F(C, D, E, F, G, H, A, B, W14, W12, W07, W15, 0x9BDC06A7);
   65|     10|      SHA2_32_F(B, C, D, E, F, G, H, A, W15, W13, W08, W00, 0xC19BF174);
   66|       |
   67|     10|      SHA2_32_F(A, B, C, D, E, F, G, H, W00, W14, W09, W01, 0xE49B69C1);
   68|     10|      SHA2_32_F(H, A, B, C, D, E, F, G, W01, W15, W10, W02, 0xEFBE4786);
   69|     10|      SHA2_32_F(G, H, A, B, C, D, E, F, W02, W00, W11, W03, 0x0FC19DC6);
   70|     10|      SHA2_32_F(F, G, H, A, B, C, D, E, W03, W01, W12, W04, 0x240CA1CC);
   71|     10|      SHA2_32_F(E, F, G, H, A, B, C, D, W04, W02, W13, W05, 0x2DE92C6F);
   72|     10|      SHA2_32_F(D, E, F, G, H, A, B, C, W05, W03, W14, W06, 0x4A7484AA);
   73|     10|      SHA2_32_F(C, D, E, F, G, H, A, B, W06, W04, W15, W07, 0x5CB0A9DC);
   74|     10|      SHA2_32_F(B, C, D, E, F, G, H, A, W07, W05, W00, W08, 0x76F988DA);
   75|     10|      SHA2_32_F(A, B, C, D, E, F, G, H, W08, W06, W01, W09, 0x983E5152);
   76|     10|      SHA2_32_F(H, A, B, C, D, E, F, G, W09, W07, W02, W10, 0xA831C66D);
   77|     10|      SHA2_32_F(G, H, A, B, C, D, E, F, W10, W08, W03, W11, 0xB00327C8);
   78|     10|      SHA2_32_F(F, G, H, A, B, C, D, E, W11, W09, W04, W12, 0xBF597FC7);
   79|     10|      SHA2_32_F(E, F, G, H, A, B, C, D, W12, W10, W05, W13, 0xC6E00BF3);
   80|     10|      SHA2_32_F(D, E, F, G, H, A, B, C, W13, W11, W06, W14, 0xD5A79147);
   81|     10|      SHA2_32_F(C, D, E, F, G, H, A, B, W14, W12, W07, W15, 0x06CA6351);
   82|     10|      SHA2_32_F(B, C, D, E, F, G, H, A, W15, W13, W08, W00, 0x14292967);
   83|       |
   84|     10|      SHA2_32_F(A, B, C, D, E, F, G, H, W00, W14, W09, W01, 0x27B70A85);
   85|     10|      SHA2_32_F(H, A, B, C, D, E, F, G, W01, W15, W10, W02, 0x2E1B2138);
   86|     10|      SHA2_32_F(G, H, A, B, C, D, E, F, W02, W00, W11, W03, 0x4D2C6DFC);
   87|     10|      SHA2_32_F(F, G, H, A, B, C, D, E, W03, W01, W12, W04, 0x53380D13);
   88|     10|      SHA2_32_F(E, F, G, H, A, B, C, D, W04, W02, W13, W05, 0x650A7354);
   89|     10|      SHA2_32_F(D, E, F, G, H, A, B, C, W05, W03, W14, W06, 0x766A0ABB);
   90|     10|      SHA2_32_F(C, D, E, F, G, H, A, B, W06, W04, W15, W07, 0x81C2C92E);
   91|     10|      SHA2_32_F(B, C, D, E, F, G, H, A, W07, W05, W00, W08, 0x92722C85);
   92|     10|      SHA2_32_F(A, B, C, D, E, F, G, H, W08, W06, W01, W09, 0xA2BFE8A1);
   93|     10|      SHA2_32_F(H, A, B, C, D, E, F, G, W09, W07, W02, W10, 0xA81A664B);
   94|     10|      SHA2_32_F(G, H, A, B, C, D, E, F, W10, W08, W03, W11, 0xC24B8B70);
   95|     10|      SHA2_32_F(F, G, H, A, B, C, D, E, W11, W09, W04, W12, 0xC76C51A3);
   96|     10|      SHA2_32_F(E, F, G, H, A, B, C, D, W12, W10, W05, W13, 0xD192E819);
   97|     10|      SHA2_32_F(D, E, F, G, H, A, B, C, W13, W11, W06, W14, 0xD6990624);
   98|     10|      SHA2_32_F(C, D, E, F, G, H, A, B, W14, W12, W07, W15, 0xF40E3585);
   99|     10|      SHA2_32_F(B, C, D, E, F, G, H, A, W15, W13, W08, W00, 0x106AA070);
  100|       |
  101|     10|      SHA2_32_F(A, B, C, D, E, F, G, H, W00, W14, W09, W01, 0x19A4C116);
  102|     10|      SHA2_32_F(H, A, B, C, D, E, F, G, W01, W15, W10, W02, 0x1E376C08);
  103|     10|      SHA2_32_F(G, H, A, B, C, D, E, F, W02, W00, W11, W03, 0x2748774C);
  104|     10|      SHA2_32_F(F, G, H, A, B, C, D, E, W03, W01, W12, W04, 0x34B0BCB5);
  105|     10|      SHA2_32_F(E, F, G, H, A, B, C, D, W04, W02, W13, W05, 0x391C0CB3);
  106|     10|      SHA2_32_F(D, E, F, G, H, A, B, C, W05, W03, W14, W06, 0x4ED8AA4A);
  107|     10|      SHA2_32_F(C, D, E, F, G, H, A, B, W06, W04, W15, W07, 0x5B9CCA4F);
  108|     10|      SHA2_32_F(B, C, D, E, F, G, H, A, W07, W05, W00, W08, 0x682E6FF3);
  109|     10|      SHA2_32_F(A, B, C, D, E, F, G, H, W08, W06, W01, W09, 0x748F82EE);
  110|     10|      SHA2_32_F(H, A, B, C, D, E, F, G, W09, W07, W02, W10, 0x78A5636F);
  111|     10|      SHA2_32_F(G, H, A, B, C, D, E, F, W10, W08, W03, W11, 0x84C87814);
  112|     10|      SHA2_32_F(F, G, H, A, B, C, D, E, W11, W09, W04, W12, 0x8CC70208);
  113|     10|      SHA2_32_F(E, F, G, H, A, B, C, D, W12, W10, W05, W13, 0x90BEFFFA);
  114|     10|      SHA2_32_F(D, E, F, G, H, A, B, C, W13, W11, W06, W14, 0xA4506CEB);
  115|     10|      SHA2_32_F(C, D, E, F, G, H, A, B, W14, W12, W07, W15, 0xBEF9A3F7);
  116|     10|      SHA2_32_F(B, C, D, E, F, G, H, A, W15, W13, W08, W00, 0xC67178F2);
  117|       |
  118|     10|      A = (digest[0] += A);
  119|     10|      B = (digest[1] += B);
  120|     10|      C = (digest[2] += C);
  121|     10|      D = (digest[3] += D);
  122|     10|      E = (digest[4] += E);
  123|     10|      F = (digest[5] += F);
  124|     10|      G = (digest[6] += G);
  125|     10|      H = (digest[7] += H);
  126|     10|   }
  127|     10|}

_ZN5Botan4HMAC8add_dataENSt3__14spanIKhLm18446744073709551615EEE:
   19|      1|void HMAC::add_data(std::span<const uint8_t> input) {
   20|      1|   assert_key_material_set();
   21|      1|   m_hash->update(input);
   22|      1|}
_ZN5Botan4HMAC12final_resultENSt3__14spanIhLm18446744073709551615EEE:
   27|      2|void HMAC::final_result(std::span<uint8_t> mac) {
   28|      2|   assert_key_material_set();
   29|      2|   m_hash->final(mac);
   30|      2|   m_hash->update(m_okey);
   31|      2|   m_hash->update(mac.first(m_hash_output_length));
   32|      2|   m_hash->final(mac);
   33|      2|   m_hash->update(m_ikey);
   34|      2|}
_ZNK5Botan4HMAC8key_specEv:
   36|      2|Key_Length_Specification HMAC::key_spec() const {
   37|       |   // Support very long lengths for things like PBKDF2 and the TLS PRF
   38|      2|   return Key_Length_Specification(0, 4096);
   39|      2|}
_ZNK5Botan4HMAC13output_lengthEv:
   41|      4|size_t HMAC::output_length() const {
   42|      4|   return m_hash_output_length;
   43|      4|}
_ZNK5Botan4HMAC19has_keying_materialEv:
   45|      3|bool HMAC::has_keying_material() const {
   46|      3|   return !m_okey.empty();
   47|      3|}
_ZN5Botan4HMAC12key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
   52|      2|void HMAC::key_schedule(std::span<const uint8_t> key) {
   53|      2|   const uint8_t ipad = 0x36;
   54|      2|   const uint8_t opad = 0x5C;
   55|       |
   56|      2|   m_hash->clear();
   57|       |
   58|      2|   m_ikey.resize(m_hash_block_size);
   59|      2|   m_okey.resize(m_hash_block_size);
   60|       |
   61|      2|   clear_mem(m_ikey.data(), m_ikey.size());
   62|      2|   clear_mem(m_okey.data(), m_okey.size());
   63|       |
   64|       |   /*
   65|       |   * Sometimes the HMAC key length itself is sensitive, as with PBKDF2 where it
   66|       |   * reveals the length of the passphrase. Make some attempt to hide this to
   67|       |   * side channels. Clearly if the secret is longer than the block size then the
   68|       |   * branch to hash first reveals that. In addition, counting the number of
   69|       |   * compression functions executed reveals the size at the granularity of the
   70|       |   * hash function's block size.
   71|       |   *
   72|       |   * The greater concern is for smaller keys; being able to detect when a
   73|       |   * passphrase is say 4 bytes may assist choosing weaker targets. Even though
   74|       |   * the loop bounds are constant, we can only actually read key[0..length] so
   75|       |   * it doesn't seem possible to make this computation truly constant time.
   76|       |   *
   77|       |   * We don't mind leaking if the length is exactly zero since that's
   78|       |   * trivial to simply check.
   79|       |   */
   80|       |
   81|      2|   if(key.size() > m_hash_block_size) {
  ------------------
  |  Branch (81:7): [True: 0, False: 2]
  ------------------
   82|      0|      m_hash->update(key);
   83|      0|      m_hash->final(m_ikey.data());
   84|      2|   } else if(!key.empty()) {
  ------------------
  |  Branch (84:14): [True: 2, False: 0]
  ------------------
   85|    130|      for(size_t i = 0, i_mod_length = 0; i != m_hash_block_size; ++i) {
  ------------------
  |  Branch (85:43): [True: 128, False: 2]
  ------------------
   86|       |         /*
   87|       |         access key[i % length] but avoiding division due to variable
   88|       |         time computation on some processors.
   89|       |         */
   90|    128|         auto needs_reduction = CT::Mask<size_t>::is_lte(key.size(), i_mod_length);
   91|    128|         i_mod_length = needs_reduction.select(0, i_mod_length);
   92|    128|         const uint8_t kb = key[i_mod_length];
   93|       |
   94|    128|         auto in_range = CT::Mask<size_t>::is_lt(i, key.size());
   95|    128|         m_ikey[i] = static_cast<uint8_t>(in_range.if_set_return(kb));
   96|    128|         i_mod_length += 1;
   97|    128|      }
   98|      2|   }
   99|       |
  100|    130|   for(size_t i = 0; i != m_hash_block_size; ++i) {
  ------------------
  |  Branch (100:22): [True: 128, False: 2]
  ------------------
  101|    128|      m_ikey[i] ^= ipad;
  102|    128|      m_okey[i] = m_ikey[i] ^ ipad ^ opad;
  103|    128|   }
  104|       |
  105|      2|   m_hash->update(m_ikey);
  106|      2|}
_ZN5Botan4HMACC2ENSt3__110unique_ptrINS_12HashFunctionENS1_14default_deleteIS3_EEEE:
  137|      1|      m_hash_block_size(m_hash->hash_block_size()) {
  138|      1|   BOTAN_ARG_CHECK(m_hash_block_size >= m_hash_output_length, "HMAC is not compatible with this hash function");
  ------------------
  |  |   30|      1|   do {                                                          \
  |  |   31|      1|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 1]
  |  |  ------------------
  |  |   32|      1|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|      1|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  139|      1|}

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

_ZN5Botan6BigInt6decodeEPKhmNS0_4BaseE:
  151|      9|BigInt BigInt::decode(const uint8_t buf[], size_t length, Base base) {
  152|      9|   BigInt r;
  153|      9|   if(base == Binary) {
  ------------------
  |  Branch (153:7): [True: 0, False: 9]
  ------------------
  154|      0|      r.binary_decode(buf, length);
  155|      9|   } else if(base == Hexadecimal) {
  ------------------
  |  Branch (155:14): [True: 9, False: 0]
  ------------------
  156|      9|      secure_vector<uint8_t> binary;
  157|       |
  158|      9|      if(length % 2) {
  ------------------
  |  Branch (158:10): [True: 0, False: 9]
  ------------------
  159|       |         // Handle lack of leading 0
  160|      0|         const char buf0_with_leading_0[2] = {'0', static_cast<char>(buf[0])};
  161|       |
  162|      0|         binary = hex_decode_locked(buf0_with_leading_0, 2);
  163|       |
  164|      0|         binary += hex_decode_locked(cast_uint8_ptr_to_char(&buf[1]), length - 1, false);
  165|      9|      } else {
  166|      9|         binary = hex_decode_locked(cast_uint8_ptr_to_char(buf), length, false);
  167|      9|      }
  168|       |
  169|      9|      r.binary_decode(binary.data(), binary.size());
  170|      9|   } else if(base == Decimal) {
  ------------------
  |  Branch (170:14): [True: 0, False: 0]
  ------------------
  171|       |      // This could be made faster using the same trick as to_dec_string
  172|      0|      for(size_t i = 0; i != length; ++i) {
  ------------------
  |  Branch (172:25): [True: 0, False: 0]
  ------------------
  173|      0|         const char c = buf[i];
  174|       |
  175|      0|         if(c < '0' || c > '9') {
  ------------------
  |  Branch (175:13): [True: 0, False: 0]
  |  Branch (175:24): [True: 0, False: 0]
  ------------------
  176|      0|            throw Invalid_Argument("BigInt::decode: invalid decimal char");
  177|      0|         }
  178|       |
  179|      0|         const uint8_t x = c - '0';
  180|      0|         BOTAN_ASSERT_NOMSG(x < 10);
  ------------------
  |  |   60|      0|   do {                                                                     \
  |  |   61|      0|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   62|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  181|       |
  182|      0|         r *= 10;
  183|      0|         r += x;
  184|      0|      }
  185|      0|   } else {
  186|      0|      throw Invalid_Argument("Unknown BigInt decoding method");
  187|      0|   }
  188|      9|   return r;
  189|      9|}

_ZN5Botan6BigInt3addEPKmmNS0_4SignE:
   16|   155k|BigInt& BigInt::add(const word y[], size_t y_words, Sign y_sign) {
   17|   155k|   const size_t x_sw = sig_words();
   18|       |
   19|   155k|   grow_to(std::max(x_sw, y_words) + 1);
   20|       |
   21|   155k|   if(sign() == y_sign) {
  ------------------
  |  Branch (21:7): [True: 84.0k, False: 71.8k]
  ------------------
   22|  84.0k|      bigint_add2(mutable_data(), size() - 1, y, y_words);
   23|  84.0k|   } else {
   24|  71.8k|      const int32_t relative_size = bigint_cmp(data(), x_sw, y, y_words);
   25|       |
   26|  71.8k|      if(relative_size >= 0) {
  ------------------
  |  Branch (26:10): [True: 71.8k, False: 14]
  ------------------
   27|       |         // *this >= y
   28|  71.8k|         bigint_sub2(mutable_data(), x_sw, y, y_words);
   29|  71.8k|      } else {
   30|       |         // *this < y
   31|     14|         bigint_sub2_rev(mutable_data(), y, y_words);
   32|     14|      }
   33|       |
   34|       |      //this->sign_fixup(relative_size, y_sign);
   35|  71.8k|      if(relative_size < 0) {
  ------------------
  |  Branch (35:10): [True: 14, False: 71.8k]
  ------------------
   36|     14|         set_sign(y_sign);
   37|  71.8k|      } else if(relative_size == 0) {
  ------------------
  |  Branch (37:17): [True: 0, False: 71.8k]
  ------------------
   38|      0|         set_sign(Positive);
   39|      0|      }
   40|  71.8k|   }
   41|       |
   42|   155k|   return (*this);
   43|   155k|}
_ZN5Botan6BigInt7mod_addERKS0_S2_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   45|  1.88M|BigInt& BigInt::mod_add(const BigInt& s, const BigInt& mod, secure_vector<word>& ws) {
   46|  1.88M|   if(this->is_negative() || s.is_negative() || mod.is_negative()) {
  ------------------
  |  Branch (46:7): [True: 0, False: 1.88M]
  |  Branch (46:30): [True: 0, False: 1.88M]
  |  Branch (46:49): [True: 0, False: 1.88M]
  ------------------
   47|      0|      throw Invalid_Argument("BigInt::mod_add expects all arguments are positive");
   48|      0|   }
   49|       |
   50|  1.88M|   BOTAN_DEBUG_ASSERT(*this < mod);
  ------------------
  |  |   99|  1.88M|      do {                          \
  |  |  100|  1.88M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
   51|  1.88M|   BOTAN_DEBUG_ASSERT(s < mod);
  ------------------
  |  |   99|  1.88M|      do {                          \
  |  |  100|  1.88M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
   52|       |
   53|       |   /*
   54|       |   t + s or t + s - p == t - (p - s)
   55|       |
   56|       |   So first compute ws = p - s
   57|       |
   58|       |   Then compute t + s and t - ws
   59|       |
   60|       |   If t - ws does not borrow, then that is the correct valued
   61|       |   */
   62|       |
   63|  1.88M|   const size_t mod_sw = mod.sig_words();
   64|  1.88M|   BOTAN_ARG_CHECK(mod_sw > 0, "BigInt::mod_add modulus must be positive");
  ------------------
  |  |   30|  1.88M|   do {                                                          \
  |  |   31|  1.88M|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 1.88M]
  |  |  ------------------
  |  |   32|  1.88M|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|  1.88M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   65|       |
   66|  1.88M|   this->grow_to(mod_sw);
   67|  1.88M|   s.grow_to(mod_sw);
   68|       |
   69|       |   // First mod_sw for p - s, 2*mod_sw for bigint_addsub workspace
   70|  1.88M|   if(ws.size() < 3 * mod_sw) {
  ------------------
  |  Branch (70:7): [True: 548k, False: 1.34M]
  ------------------
   71|   548k|      ws.resize(3 * mod_sw);
   72|   548k|   }
   73|       |
   74|  1.88M|   word borrow = bigint_sub3(&ws[0], mod.data(), mod_sw, s.data(), mod_sw);
   75|  1.88M|   BOTAN_DEBUG_ASSERT(borrow == 0);
  ------------------
  |  |   99|  1.88M|      do {                          \
  |  |  100|  1.88M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
   76|  1.88M|   BOTAN_UNUSED(borrow);
  ------------------
  |  |  118|  1.88M|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   77|       |
   78|       |   // Compute t - ws
   79|  1.88M|   borrow = bigint_sub3(&ws[mod_sw], this->data(), mod_sw, &ws[0], mod_sw);
   80|       |
   81|       |   // Compute t + s
   82|  1.88M|   bigint_add3_nc(&ws[mod_sw * 2], this->data(), mod_sw, s.data(), mod_sw);
   83|       |
   84|  1.88M|   CT::conditional_copy_mem(borrow, &ws[0], &ws[mod_sw * 2], &ws[mod_sw], mod_sw);
   85|  1.88M|   set_words(&ws[0], mod_sw);
   86|       |
   87|  1.88M|   return (*this);
   88|  1.88M|}
_ZN5Botan6BigInt7mod_subERKS0_S2_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   90|  16.4M|BigInt& BigInt::mod_sub(const BigInt& s, const BigInt& mod, secure_vector<word>& ws) {
   91|  16.4M|   if(this->is_negative() || s.is_negative() || mod.is_negative()) {
  ------------------
  |  Branch (91:7): [True: 0, False: 16.4M]
  |  Branch (91:30): [True: 0, False: 16.4M]
  |  Branch (91:49): [True: 0, False: 16.4M]
  ------------------
   92|      0|      throw Invalid_Argument("BigInt::mod_sub expects all arguments are positive");
   93|      0|   }
   94|       |
   95|       |   // We are assuming in this function that *this and s are no more than mod_sw words long
   96|  16.4M|   BOTAN_DEBUG_ASSERT(*this < mod);
  ------------------
  |  |   99|  16.4M|      do {                          \
  |  |  100|  16.4M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
   97|  16.4M|   BOTAN_DEBUG_ASSERT(s < mod);
  ------------------
  |  |   99|  16.4M|      do {                          \
  |  |  100|  16.4M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
   98|       |
   99|  16.4M|   const size_t mod_sw = mod.sig_words();
  100|       |
  101|  16.4M|   this->grow_to(mod_sw);
  102|  16.4M|   s.grow_to(mod_sw);
  103|       |
  104|  16.4M|   if(ws.size() < mod_sw) {
  ------------------
  |  Branch (104:7): [True: 0, False: 16.4M]
  ------------------
  105|      0|      ws.resize(mod_sw);
  106|      0|   }
  107|       |
  108|  16.4M|   if(mod_sw == 4) {
  ------------------
  |  Branch (108:7): [True: 16.4M, False: 0]
  ------------------
  109|  16.4M|      bigint_mod_sub_n<4>(mutable_data(), s.data(), mod.data(), ws.data());
  110|  16.4M|   } else if(mod_sw == 6) {
  ------------------
  |  Branch (110:14): [True: 0, False: 0]
  ------------------
  111|      0|      bigint_mod_sub_n<6>(mutable_data(), s.data(), mod.data(), ws.data());
  112|      0|   } else {
  113|      0|      bigint_mod_sub(mutable_data(), s.data(), mod.data(), mod_sw, ws.data());
  114|      0|   }
  115|       |
  116|  16.4M|   return (*this);
  117|  16.4M|}
_ZN5Botan6BigInt7mod_mulEhRKS0_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  119|  7.55M|BigInt& BigInt::mod_mul(uint8_t y, const BigInt& mod, secure_vector<word>& ws) {
  120|  7.55M|   BOTAN_ARG_CHECK(this->is_negative() == false, "*this must be positive");
  ------------------
  |  |   30|  7.55M|   do {                                                          \
  |  |   31|  7.55M|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 7.55M]
  |  |  ------------------
  |  |   32|  7.55M|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|  7.55M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  121|  7.55M|   BOTAN_ARG_CHECK(y < 16, "y too large");
  ------------------
  |  |   30|  7.55M|   do {                                                          \
  |  |   31|  7.55M|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 7.55M]
  |  |  ------------------
  |  |   32|  7.55M|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|  7.55M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  122|       |
  123|  7.55M|   BOTAN_DEBUG_ASSERT(*this < mod);
  ------------------
  |  |   99|  7.55M|      do {                          \
  |  |  100|  7.55M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  124|       |
  125|  7.55M|   *this *= static_cast<word>(y);
  126|  7.55M|   this->reduce_below(mod, ws);
  127|  7.55M|   return (*this);
  128|  7.55M|}
_ZN5Botan6BigInt7rev_subEPKmmRNSt3__16vectorImNS_16secure_allocatorImEEEE:
  130|  5.96k|BigInt& BigInt::rev_sub(const word y[], size_t y_sw, secure_vector<word>& ws) {
  131|  5.96k|   if(this->sign() != BigInt::Positive) {
  ------------------
  |  Branch (131:7): [True: 0, False: 5.96k]
  ------------------
  132|      0|      throw Invalid_State("BigInt::sub_rev requires this is positive");
  133|      0|   }
  134|       |
  135|  5.96k|   const size_t x_sw = this->sig_words();
  136|       |
  137|  5.96k|   ws.resize(std::max(x_sw, y_sw));
  138|  5.96k|   clear_mem(ws.data(), ws.size());
  139|       |
  140|  5.96k|   const int32_t relative_size = bigint_sub_abs(ws.data(), data(), x_sw, y, y_sw);
  141|       |
  142|  5.96k|   this->cond_flip_sign(relative_size > 0);
  143|  5.96k|   this->swap_reg(ws);
  144|       |
  145|  5.96k|   return (*this);
  146|  5.96k|}
_ZN5Botan6BigInt3mulERKS0_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  156|  11.9k|BigInt& BigInt::mul(const BigInt& y, secure_vector<word>& ws) {
  157|  11.9k|   const size_t x_sw = sig_words();
  158|  11.9k|   const size_t y_sw = y.sig_words();
  159|  11.9k|   set_sign((sign() == y.sign()) ? Positive : Negative);
  ------------------
  |  Branch (159:13): [True: 11.9k, False: 0]
  ------------------
  160|       |
  161|  11.9k|   if(x_sw == 0 || y_sw == 0) {
  ------------------
  |  Branch (161:7): [True: 7.35k, False: 4.56k]
  |  Branch (161:20): [True: 0, False: 4.56k]
  ------------------
  162|  7.35k|      clear();
  163|  7.35k|      set_sign(Positive);
  164|  7.35k|   } else if(x_sw == 1 && y_sw) {
  ------------------
  |  Branch (164:14): [True: 848, False: 3.71k]
  |  Branch (164:27): [True: 848, False: 0]
  ------------------
  165|    848|      grow_to(y_sw + 1);
  166|    848|      bigint_linmul3(mutable_data(), y.data(), y_sw, word_at(0));
  167|  3.71k|   } else if(y_sw == 1 && x_sw) {
  ------------------
  |  Branch (167:14): [True: 0, False: 3.71k]
  |  Branch (167:27): [True: 0, False: 0]
  ------------------
  168|      0|      word carry = bigint_linmul2(mutable_data(), x_sw, y.word_at(0));
  169|      0|      set_word_at(x_sw, carry);
  170|  3.71k|   } else {
  171|  3.71k|      const size_t new_size = x_sw + y_sw + 1;
  172|  3.71k|      ws.resize(new_size);
  173|  3.71k|      secure_vector<word> z_reg(new_size);
  174|       |
  175|  3.71k|      bigint_mul(z_reg.data(), z_reg.size(), data(), size(), x_sw, y.data(), y.size(), y_sw, ws.data(), ws.size());
  176|       |
  177|  3.71k|      this->swap_reg(z_reg);
  178|  3.71k|   }
  179|       |
  180|  11.9k|   return (*this);
  181|  11.9k|}
_ZN5Botan6BigInt6squareERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  183|    741|BigInt& BigInt::square(secure_vector<word>& ws) {
  184|    741|   const size_t sw = sig_words();
  185|       |
  186|    741|   secure_vector<word> z(2 * sw);
  187|    741|   ws.resize(z.size());
  188|       |
  189|    741|   bigint_sqr(z.data(), z.size(), data(), size(), sw, ws.data(), ws.size());
  190|       |
  191|    741|   swap_reg(z);
  192|    741|   set_sign(BigInt::Positive);
  193|       |
  194|    741|   return (*this);
  195|    741|}
_ZN5Botan6BigIntmLEm:
  197|  7.93M|BigInt& BigInt::operator*=(word y) {
  198|  7.93M|   if(y == 0) {
  ------------------
  |  Branch (198:7): [True: 0, False: 7.93M]
  ------------------
  199|      0|      clear();
  200|      0|      set_sign(Positive);
  201|      0|   }
  202|       |
  203|  7.93M|   const word carry = bigint_linmul2(mutable_data(), size(), y);
  204|  7.93M|   set_word_at(size(), carry);
  205|       |
  206|  7.93M|   return (*this);
  207|  7.93M|}
_ZN5Botan6BigIntrMERKS0_:
  224|  94.0k|BigInt& BigInt::operator%=(const BigInt& mod) {
  225|  94.0k|   return (*this = (*this) % mod);
  226|  94.0k|}
_ZN5Botan6BigIntlSEm:
  260|   142k|BigInt& BigInt::operator<<=(size_t shift) {
  261|   142k|   const size_t shift_words = shift / BOTAN_MP_WORD_BITS;
  ------------------
  |  |   50|   142k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  262|   142k|   const size_t shift_bits = shift % BOTAN_MP_WORD_BITS;
  ------------------
  |  |   50|   142k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  263|   142k|   const size_t size = sig_words();
  264|       |
  265|   142k|   const size_t bits_free = top_bits_free();
  266|       |
  267|   142k|   const size_t new_size = size + shift_words + (bits_free < shift_bits);
  268|       |
  269|   142k|   m_data.grow_to(new_size);
  270|       |
  271|   142k|   bigint_shl1(m_data.mutable_data(), new_size, size, shift_words, shift_bits);
  272|       |
  273|   142k|   return (*this);
  274|   142k|}
_ZN5Botan6BigIntrSEm:
  279|   249k|BigInt& BigInt::operator>>=(size_t shift) {
  280|   249k|   const size_t shift_words = shift / BOTAN_MP_WORD_BITS;
  ------------------
  |  |   50|   249k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  281|   249k|   const size_t shift_bits = shift % BOTAN_MP_WORD_BITS;
  ------------------
  |  |   50|   249k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  282|       |
  283|   249k|   bigint_shr1(m_data.mutable_data(), m_data.size(), shift_words, shift_bits);
  284|       |
  285|   249k|   if(is_negative() && is_zero()) {
  ------------------
  |  Branch (285:7): [True: 0, False: 249k]
  |  Branch (285:24): [True: 0, False: 0]
  ------------------
  286|      0|      set_sign(Positive);
  287|      0|   }
  288|       |
  289|   249k|   return (*this);
  290|   249k|}

_ZN5Botan6BigInt4add2ERKS0_PKmmNS0_4SignE:
   19|  66.3k|BigInt BigInt::add2(const BigInt& x, const word y[], size_t y_words, BigInt::Sign y_sign) {
   20|  66.3k|   const size_t x_sw = x.sig_words();
   21|       |
   22|  66.3k|   BigInt z = BigInt::with_capacity(std::max(x_sw, y_words) + 1);
   23|       |
   24|  66.3k|   if(x.sign() == y_sign) {
  ------------------
  |  Branch (24:7): [True: 14.6k, False: 51.6k]
  ------------------
   25|  14.6k|      bigint_add3(z.mutable_data(), x.data(), x_sw, y, y_words);
   26|  14.6k|      z.set_sign(x.sign());
   27|  51.6k|   } else {
   28|  51.6k|      const int32_t relative_size = bigint_sub_abs(z.mutable_data(), x.data(), x_sw, y, y_words);
   29|       |
   30|       |      //z.sign_fixup(relative_size, y_sign);
   31|  51.6k|      if(relative_size < 0) {
  ------------------
  |  Branch (31:10): [True: 0, False: 51.6k]
  ------------------
   32|      0|         z.set_sign(y_sign);
   33|  51.6k|      } else if(relative_size == 0) {
  ------------------
  |  Branch (33:17): [True: 0, False: 51.6k]
  ------------------
   34|      0|         z.set_sign(BigInt::Positive);
   35|  51.6k|      } else {
   36|  51.6k|         z.set_sign(x.sign());
   37|  51.6k|      }
   38|  51.6k|   }
   39|       |
   40|  66.3k|   return z;
   41|  66.3k|}
_ZN5BotanmlERKNS_6BigIntES2_:
   46|  17.1k|BigInt operator*(const BigInt& x, const BigInt& y) {
   47|  17.1k|   const size_t x_sw = x.sig_words();
   48|  17.1k|   const size_t y_sw = y.sig_words();
   49|       |
   50|  17.1k|   BigInt z = BigInt::with_capacity(x.size() + y.size());
   51|       |
   52|  17.1k|   if(x_sw == 1 && y_sw) {
  ------------------
  |  Branch (52:7): [True: 1.53k, False: 15.6k]
  |  Branch (52:20): [True: 1.53k, False: 0]
  ------------------
   53|  1.53k|      bigint_linmul3(z.mutable_data(), y.data(), y_sw, x.word_at(0));
   54|  15.6k|   } else if(y_sw == 1 && x_sw) {
  ------------------
  |  Branch (54:14): [True: 5.66k, False: 9.96k]
  |  Branch (54:27): [True: 5.66k, False: 0]
  ------------------
   55|  5.66k|      bigint_linmul3(z.mutable_data(), x.data(), x_sw, y.word_at(0));
   56|  9.96k|   } else if(x_sw && y_sw) {
  ------------------
  |  Branch (56:14): [True: 9.73k, False: 236]
  |  Branch (56:22): [True: 9.61k, False: 118]
  ------------------
   57|  9.61k|      secure_vector<word> workspace(z.size());
   58|       |
   59|  9.61k|      bigint_mul(z.mutable_data(),
   60|  9.61k|                 z.size(),
   61|  9.61k|                 x.data(),
   62|  9.61k|                 x.size(),
   63|  9.61k|                 x_sw,
   64|  9.61k|                 y.data(),
   65|  9.61k|                 y.size(),
   66|  9.61k|                 y_sw,
   67|  9.61k|                 workspace.data(),
   68|  9.61k|                 workspace.size());
   69|  9.61k|   }
   70|       |
   71|  17.1k|   z.cond_flip_sign(x_sw > 0 && y_sw > 0 && x.sign() != y.sign());
  ------------------
  |  Branch (71:21): [True: 16.9k, False: 236]
  |  Branch (71:33): [True: 16.8k, False: 118]
  |  Branch (71:45): [True: 0, False: 16.8k]
  ------------------
   72|       |
   73|  17.1k|   return z;
   74|  17.1k|}
_ZN5BotanmlERKNS_6BigIntEm:
   79|   143k|BigInt operator*(const BigInt& x, word y) {
   80|   143k|   const size_t x_sw = x.sig_words();
   81|       |
   82|   143k|   BigInt z = BigInt::with_capacity(x_sw + 1);
   83|       |
   84|   143k|   if(x_sw && y) {
  ------------------
  |  Branch (84:7): [True: 143k, False: 0]
  |  Branch (84:15): [True: 71.7k, False: 71.9k]
  ------------------
   85|  71.7k|      bigint_linmul3(z.mutable_data(), x.data(), x_sw, y);
   86|  71.7k|      z.set_sign(x.sign());
   87|  71.7k|   }
   88|       |
   89|   143k|   return z;
   90|   143k|}
_ZN5BotandvERKNS_6BigIntEm:
  108|  94.0k|BigInt operator/(const BigInt& x, word y) {
  109|  94.0k|   if(y == 0) {
  ------------------
  |  Branch (109:7): [True: 0, False: 94.0k]
  ------------------
  110|      0|      throw Invalid_Argument("BigInt::operator/ divide by zero");
  111|      0|   }
  112|       |
  113|  94.0k|   BigInt q;
  114|  94.0k|   word r;
  115|  94.0k|   ct_divide_word(x, y, q, r);
  116|  94.0k|   return q;
  117|  94.0k|}
_ZN5BotanrmERKNS_6BigIntES2_:
  122|  96.5k|BigInt operator%(const BigInt& n, const BigInt& mod) {
  123|  96.5k|   if(mod.is_zero()) {
  ------------------
  |  Branch (123:7): [True: 0, False: 96.5k]
  ------------------
  124|      0|      throw Invalid_Argument("BigInt::operator% divide by zero");
  125|      0|   }
  126|  96.5k|   if(mod.is_negative()) {
  ------------------
  |  Branch (126:7): [True: 0, False: 96.5k]
  ------------------
  127|      0|      throw Invalid_Argument("BigInt::operator% modulus must be > 0");
  128|      0|   }
  129|  96.5k|   if(n.is_positive() && mod.is_positive() && n < mod) {
  ------------------
  |  Branch (129:7): [True: 96.5k, False: 0]
  |  Branch (129:26): [True: 96.5k, False: 0]
  |  Branch (129:47): [True: 2.61k, False: 93.9k]
  ------------------
  130|  2.61k|      return n;
  131|  2.61k|   }
  132|       |
  133|  93.9k|   if(mod.sig_words() == 1) {
  ------------------
  |  Branch (133:7): [True: 22.5k, False: 71.4k]
  ------------------
  134|  22.5k|      return BigInt::from_word(n % mod.word_at(0));
  135|  22.5k|   }
  136|       |
  137|  71.4k|   BigInt q, r;
  138|  71.4k|   vartime_divide(n, mod, q, r);
  139|  71.4k|   return r;
  140|  93.9k|}
_ZN5BotanrmERKNS_6BigIntEm:
  145|   237k|word operator%(const BigInt& n, word mod) {
  146|   237k|   if(mod == 0) {
  ------------------
  |  Branch (146:7): [True: 0, False: 237k]
  ------------------
  147|      0|      throw Invalid_Argument("BigInt::operator% divide by zero");
  148|      0|   }
  149|       |
  150|   237k|   if(mod == 1) {
  ------------------
  |  Branch (150:7): [True: 0, False: 237k]
  ------------------
  151|      0|      return 0;
  152|      0|   }
  153|       |
  154|   237k|   word remainder = 0;
  155|       |
  156|   237k|   if(is_power_of_2(mod)) {
  ------------------
  |  Branch (156:7): [True: 214k, False: 22.5k]
  ------------------
  157|   214k|      remainder = (n.word_at(0) & (mod - 1));
  158|   214k|   } else {
  159|  22.5k|      const size_t sw = n.sig_words();
  160|  46.3k|      for(size_t i = sw; i > 0; --i) {
  ------------------
  |  Branch (160:26): [True: 23.8k, False: 22.5k]
  ------------------
  161|  23.8k|         remainder = bigint_modop_vartime(remainder, n.word_at(i - 1), mod);
  162|  23.8k|      }
  163|  22.5k|   }
  164|       |
  165|   237k|   if(remainder && n.sign() == BigInt::Negative) {
  ------------------
  |  Branch (165:7): [True: 237k, False: 0]
  |  Branch (165:20): [True: 0, False: 237k]
  ------------------
  166|      0|      return mod - remainder;
  167|      0|   }
  168|   237k|   return remainder;
  169|   237k|}
_ZN5BotanlsERKNS_6BigIntEm:
  174|  71.4k|BigInt operator<<(const BigInt& x, size_t shift) {
  175|  71.4k|   const size_t shift_words = shift / BOTAN_MP_WORD_BITS, shift_bits = shift % BOTAN_MP_WORD_BITS;
  ------------------
  |  |   50|  71.4k|#define BOTAN_MP_WORD_BITS 64
  ------------------
                 const size_t shift_words = shift / BOTAN_MP_WORD_BITS, shift_bits = shift % BOTAN_MP_WORD_BITS;
  ------------------
  |  |   50|  71.4k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  176|       |
  177|  71.4k|   const size_t x_sw = x.sig_words();
  178|       |
  179|  71.4k|   BigInt y = BigInt::with_capacity(x_sw + shift_words + (shift_bits ? 1 : 0));
  ------------------
  |  Branch (179:59): [True: 0, False: 71.4k]
  ------------------
  180|  71.4k|   bigint_shl2(y.mutable_data(), x.data(), x_sw, shift_words, shift_bits);
  181|  71.4k|   y.set_sign(x.sign());
  182|  71.4k|   return y;
  183|  71.4k|}
_ZN5BotanrsERKNS_6BigIntEm:
  188|    741|BigInt operator>>(const BigInt& x, size_t shift) {
  189|    741|   const size_t shift_words = shift / BOTAN_MP_WORD_BITS;
  ------------------
  |  |   50|    741|#define BOTAN_MP_WORD_BITS 64
  ------------------
  190|    741|   const size_t shift_bits = shift % BOTAN_MP_WORD_BITS;
  ------------------
  |  |   50|    741|#define BOTAN_MP_WORD_BITS 64
  ------------------
  191|    741|   const size_t x_sw = x.sig_words();
  192|       |
  193|    741|   if(shift_words >= x_sw) {
  ------------------
  |  Branch (193:7): [True: 0, False: 741]
  ------------------
  194|      0|      return BigInt::zero();
  195|      0|   }
  196|       |
  197|    741|   BigInt y = BigInt::with_capacity(x_sw - shift_words);
  198|    741|   bigint_shr2(y.mutable_data(), x.data(), x_sw, shift_words, shift_bits);
  199|       |
  200|    741|   if(x.is_negative() && y.is_zero()) {
  ------------------
  |  Branch (200:7): [True: 0, False: 741]
  |  Branch (200:26): [True: 0, False: 0]
  ------------------
  201|      0|      y.set_sign(BigInt::Positive);
  202|    741|   } else {
  203|    741|      y.set_sign(x.sign());
  204|    741|   }
  205|       |
  206|    741|   return y;
  207|    741|}

_ZN5Botan6BigInt9randomizeERNS_21RandomNumberGeneratorEmb:
   18|  83.5k|void BigInt::randomize(RandomNumberGenerator& rng, size_t bitsize, bool set_high_bit) {
   19|  83.5k|   set_sign(Positive);
   20|       |
   21|  83.5k|   if(bitsize == 0) {
  ------------------
  |  Branch (21:7): [True: 0, False: 83.5k]
  ------------------
   22|      0|      clear();
   23|  83.5k|   } else {
   24|  83.5k|      secure_vector<uint8_t> array = rng.random_vec(round_up(bitsize, 8) / 8);
   25|       |
   26|       |      // Always cut unwanted bits
   27|  83.5k|      if(bitsize % 8) {
  ------------------
  |  Branch (27:10): [True: 67.1k, False: 16.4k]
  ------------------
   28|  67.1k|         array[0] &= 0xFF >> (8 - (bitsize % 8));
   29|  67.1k|      }
   30|       |
   31|       |      // Set the highest bit if wanted
   32|  83.5k|      if(set_high_bit) {
  ------------------
  |  Branch (32:10): [True: 3.73k, False: 79.8k]
  ------------------
   33|  3.73k|         array[0] |= 0x80 >> ((bitsize % 8) ? (8 - bitsize % 8) : 0);
  ------------------
  |  Branch (33:31): [True: 0, False: 3.73k]
  ------------------
   34|  3.73k|      }
   35|       |
   36|  83.5k|      binary_decode(array);
   37|  83.5k|   }
   38|  83.5k|}
_ZN5Botan6BigInt14random_integerERNS_21RandomNumberGeneratorERKS0_S4_:
   43|  16.4k|BigInt BigInt::random_integer(RandomNumberGenerator& rng, const BigInt& min, const BigInt& max) {
   44|  16.4k|   if(min.is_negative() || max.is_negative() || max <= min) {
  ------------------
  |  Branch (44:7): [True: 0, False: 16.4k]
  |  Branch (44:28): [True: 0, False: 16.4k]
  |  Branch (44:49): [True: 0, False: 16.4k]
  ------------------
   45|      0|      throw Invalid_Argument("BigInt::random_integer invalid range");
   46|      0|   }
   47|       |
   48|       |   /*
   49|       |   If min is > 1 then we generate a random number `r` in [0,max-min)
   50|       |   and return min + r.
   51|       |
   52|       |   This same logic could also be reasonbly chosen for min == 1, but
   53|       |   that breaks certain tests which expect stability of this function
   54|       |   when generating within [1,n)
   55|       |   */
   56|  16.4k|   if(min > 1) {
  ------------------
  |  Branch (56:7): [True: 8.21k, False: 8.21k]
  ------------------
   57|  8.21k|      const BigInt diff = max - min;
   58|       |      // This call is recursive, but will not recurse further
   59|  8.21k|      return min + BigInt::random_integer(rng, BigInt::zero(), diff);
   60|  8.21k|   }
   61|       |
   62|  8.21k|   BOTAN_DEBUG_ASSERT(min <= 1);
  ------------------
  |  |   99|  8.21k|      do {                          \
  |  |  100|  8.21k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
   63|       |
   64|  8.21k|   const size_t bits = max.bits();
   65|       |
   66|  8.21k|   BigInt r;
   67|       |
   68|  8.21k|   do {
   69|  8.21k|      r.randomize(rng, bits, false);
   70|  8.21k|   } while(r < min || r >= max);
  ------------------
  |  Branch (70:12): [True: 0, False: 8.21k]
  |  Branch (70:23): [True: 0, False: 8.21k]
  ------------------
   71|       |
   72|  8.21k|   return r;
   73|  16.4k|}

_ZN5Botan6BigIntC2Em:
   18|  41.0k|BigInt::BigInt(uint64_t n) {
   19|  41.0k|#if BOTAN_MP_WORD_BITS == 64
   20|  41.0k|   m_data.set_word_at(0, n);
   21|       |#else
   22|       |   m_data.set_word_at(1, static_cast<word>(n >> 32));
   23|       |   m_data.set_word_at(0, static_cast<word>(n));
   24|       |#endif
   25|  41.0k|}
_ZN5Botan6BigInt8from_u64Em:
   28|    505|BigInt BigInt::from_u64(uint64_t n) {
   29|    505|   BigInt bn;
   30|       |
   31|    505|#if BOTAN_MP_WORD_BITS == 64
   32|    505|   bn.set_word_at(0, n);
   33|       |#else
   34|       |   bn.set_word_at(1, static_cast<word>(n >> 32));
   35|       |   bn.set_word_at(0, static_cast<word>(n));
   36|       |#endif
   37|       |
   38|    505|   return bn;
   39|    505|}
_ZN5Botan6BigInt9from_wordEm:
   42|  22.5k|BigInt BigInt::from_word(word n) {
   43|  22.5k|   BigInt bn;
   44|  22.5k|   bn.set_word_at(0, n);
   45|  22.5k|   return bn;
   46|  22.5k|}
_ZN5Botan6BigInt8from_s32Ei:
   49|    505|BigInt BigInt::from_s32(int32_t n) {
   50|    505|   if(n >= 0) {
  ------------------
  |  Branch (50:7): [True: 0, False: 505]
  ------------------
   51|      0|      return BigInt::from_u64(static_cast<uint64_t>(n));
   52|    505|   } else {
   53|    505|      return -BigInt::from_u64(static_cast<uint64_t>(-n));
   54|    505|   }
   55|    505|}
_ZN5Botan6BigInt13with_capacityEm:
   58|   406k|BigInt BigInt::with_capacity(size_t size) {
   59|   406k|   BigInt bn;
   60|   406k|   bn.grow_to(size);
   61|   406k|   return bn;
   62|   406k|}
_ZN5Botan6BigIntC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   67|      9|BigInt::BigInt(std::string_view str) {
   68|      9|   Base base = Decimal;
   69|      9|   size_t markers = 0;
   70|      9|   bool negative = false;
   71|       |
   72|      9|   if(str.length() > 0 && str[0] == '-') {
  ------------------
  |  Branch (72:7): [True: 9, False: 0]
  |  Branch (72:27): [True: 0, False: 9]
  ------------------
   73|      0|      markers += 1;
   74|      0|      negative = true;
   75|      0|   }
   76|       |
   77|      9|   if(str.length() > markers + 2 && str[markers] == '0' && str[markers + 1] == 'x') {
  ------------------
  |  Branch (77:7): [True: 9, False: 0]
  |  Branch (77:37): [True: 9, False: 0]
  |  Branch (77:60): [True: 9, False: 0]
  ------------------
   78|      9|      markers += 2;
   79|      9|      base = Hexadecimal;
   80|      9|   }
   81|       |
   82|      9|   *this = decode(cast_char_ptr_to_uint8(str.data()) + markers, str.length() - markers, base);
   83|       |
   84|      9|   if(negative) {
  ------------------
  |  Branch (84:7): [True: 0, False: 9]
  ------------------
   85|      0|      set_sign(Negative);
   86|      9|   } else {
   87|      9|      set_sign(Positive);
   88|      9|   }
   89|      9|}
_ZN5Botan6BigIntC2EPKhm:
   91|  2.49k|BigInt::BigInt(const uint8_t input[], size_t length) {
   92|  2.49k|   binary_decode(input, length);
   93|  2.49k|}
_ZN5Botan6BigIntC2ERNS_21RandomNumberGeneratorEmb:
  121|  8.21k|BigInt::BigInt(RandomNumberGenerator& rng, size_t bits, bool set_high_bit) {
  122|  8.21k|   randomize(rng, bits, set_high_bit);
  123|  8.21k|}
_ZNK5Botan6BigInt8cmp_wordEm:
  129|   164k|int32_t BigInt::cmp_word(word other) const {
  130|   164k|   if(is_negative()) {
  ------------------
  |  Branch (130:7): [True: 1.24k, False: 162k]
  ------------------
  131|  1.24k|      return -1;  // other is positive ...
  132|  1.24k|   }
  133|       |
  134|   162k|   const size_t sw = this->sig_words();
  135|   162k|   if(sw > 1) {
  ------------------
  |  Branch (135:7): [True: 121k, False: 41.5k]
  ------------------
  136|   121k|      return 1;  // must be larger since other is just one word ...
  137|   121k|   }
  138|       |
  139|  41.5k|   return bigint_cmp(this->data(), sw, &other, 1);
  140|   162k|}
_ZNK5Botan6BigInt3cmpERKS0_b:
  145|  26.8k|int32_t BigInt::cmp(const BigInt& other, bool check_signs) const {
  146|  26.8k|   if(check_signs) {
  ------------------
  |  Branch (146:7): [True: 26.8k, False: 0]
  ------------------
  147|  26.8k|      if(other.is_positive() && this->is_negative()) {
  ------------------
  |  Branch (147:10): [True: 26.8k, False: 0]
  |  Branch (147:33): [True: 0, False: 26.8k]
  ------------------
  148|      0|         return -1;
  149|      0|      }
  150|       |
  151|  26.8k|      if(other.is_negative() && this->is_positive()) {
  ------------------
  |  Branch (151:10): [True: 0, False: 26.8k]
  |  Branch (151:33): [True: 0, False: 0]
  ------------------
  152|      0|         return 1;
  153|      0|      }
  154|       |
  155|  26.8k|      if(other.is_negative() && this->is_negative()) {
  ------------------
  |  Branch (155:10): [True: 0, False: 26.8k]
  |  Branch (155:33): [True: 0, False: 0]
  ------------------
  156|      0|         return (-bigint_cmp(this->data(), this->size(), other.data(), other.size()));
  157|      0|      }
  158|  26.8k|   }
  159|       |
  160|  26.8k|   return bigint_cmp(this->data(), this->size(), other.data(), other.size());
  161|  26.8k|}
_ZNK5Botan6BigInt8is_equalERKS0_:
  163|  19.8k|bool BigInt::is_equal(const BigInt& other) const {
  164|  19.8k|   if(this->sign() != other.sign()) {
  ------------------
  |  Branch (164:7): [True: 0, False: 19.8k]
  ------------------
  165|      0|      return false;
  166|      0|   }
  167|       |
  168|  19.8k|   return bigint_ct_is_eq(this->data(), this->sig_words(), other.data(), other.sig_words()).as_bool();
  169|  19.8k|}
_ZNK5Botan6BigInt12is_less_thanERKS0_:
  171|   201k|bool BigInt::is_less_than(const BigInt& other) const {
  172|   201k|   if(this->is_negative() && other.is_positive()) {
  ------------------
  |  Branch (172:7): [True: 0, False: 201k]
  |  Branch (172:30): [True: 0, False: 0]
  ------------------
  173|      0|      return true;
  174|      0|   }
  175|       |
  176|   201k|   if(this->is_positive() && other.is_negative()) {
  ------------------
  |  Branch (176:7): [True: 201k, False: 0]
  |  Branch (176:30): [True: 0, False: 201k]
  ------------------
  177|      0|      return false;
  178|      0|   }
  179|       |
  180|   201k|   if(other.is_negative() && this->is_negative()) {
  ------------------
  |  Branch (180:7): [True: 0, False: 201k]
  |  Branch (180:30): [True: 0, False: 0]
  ------------------
  181|      0|      return bigint_ct_is_lt(other.data(), other.sig_words(), this->data(), this->sig_words()).as_bool();
  182|      0|   }
  183|       |
  184|   201k|   return bigint_ct_is_lt(this->data(), this->sig_words(), other.data(), other.sig_words()).as_bool();
  185|   201k|}
_ZNK5Botan6BigInt12encode_wordsEPmm:
  187|   216k|void BigInt::encode_words(word out[], size_t size) const {
  188|   216k|   const size_t words = sig_words();
  189|       |
  190|   216k|   if(words > size) {
  ------------------
  |  Branch (190:7): [True: 0, False: 216k]
  ------------------
  191|      0|      throw Encoding_Error("BigInt::encode_words value too large to encode");
  192|      0|   }
  193|       |
  194|   216k|   clear_mem(out, size);
  195|   216k|   copy_mem(out, data(), words);
  196|   216k|}
_ZNK5Botan6BigInt4Data14calc_sig_wordsEv:
  198|  7.02M|size_t BigInt::Data::calc_sig_words() const {
  199|  7.02M|   const size_t sz = m_reg.size();
  200|  7.02M|   size_t sig = sz;
  201|       |
  202|  7.02M|   word sub = 1;
  203|       |
  204|   100M|   for(size_t i = 0; i != sz; ++i) {
  ------------------
  |  Branch (204:22): [True: 93.7M, False: 7.02M]
  ------------------
  205|  93.7M|      const word w = m_reg[sz - i - 1];
  206|  93.7M|      sub &= ct_is_zero(w);
  207|  93.7M|      sig -= sub;
  208|  93.7M|   }
  209|       |
  210|       |   /*
  211|       |   * This depends on the data so is poisoned, but unpoison it here as
  212|       |   * later conditionals are made on the size.
  213|       |   */
  214|  7.02M|   CT::unpoison(sig);
  215|       |
  216|  7.02M|   return sig;
  217|  7.02M|}
_ZNK5Botan6BigInt13get_substringEmm:
  222|   955k|uint32_t BigInt::get_substring(size_t offset, size_t length) const {
  223|   955k|   if(length == 0 || length > 32) {
  ------------------
  |  Branch (223:7): [True: 0, False: 955k]
  |  Branch (223:22): [True: 0, False: 955k]
  ------------------
  224|      0|      throw Invalid_Argument("BigInt::get_substring invalid substring length");
  225|      0|   }
  226|       |
  227|   955k|   const uint32_t mask = 0xFFFFFFFF >> (32 - length);
  228|       |
  229|   955k|   const size_t word_offset = offset / BOTAN_MP_WORD_BITS;
  ------------------
  |  |   50|   955k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  230|   955k|   const size_t wshift = (offset % BOTAN_MP_WORD_BITS);
  ------------------
  |  |   50|   955k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  231|       |
  232|       |   /*
  233|       |   * The substring is contained within one or at most two words. The
  234|       |   * offset and length are not secret, so we can perform conditional
  235|       |   * operations on those values.
  236|       |   */
  237|   955k|   const word w0 = word_at(word_offset);
  238|       |
  239|   955k|   if(wshift == 0 || (offset + length) / BOTAN_MP_WORD_BITS == word_offset) {
  ------------------
  |  |   50|   917k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  |  Branch (239:7): [True: 37.2k, False: 917k]
  |  Branch (239:22): [True: 866k, False: 51.9k]
  ------------------
  240|   903k|      return static_cast<uint32_t>(w0 >> wshift) & mask;
  241|   903k|   } else {
  242|  51.9k|      const word w1 = word_at(word_offset + 1);
  243|  51.9k|      return static_cast<uint32_t>((w0 >> wshift) | (w1 << (BOTAN_MP_WORD_BITS - wshift))) & mask;
  ------------------
  |  |   50|  51.9k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  244|  51.9k|   }
  245|   955k|}
_ZNK5Botan6BigInt13top_bits_freeEv:
  281|   342k|size_t BigInt::top_bits_free() const {
  282|   342k|   const size_t words = sig_words();
  283|       |
  284|   342k|   const word top_word = word_at(words - 1);
  285|   342k|   const size_t bits_used = high_bit(top_word);
  286|   342k|   CT::unpoison(bits_used);
  287|   342k|   return BOTAN_MP_WORD_BITS - bits_used;
  ------------------
  |  |   50|   342k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  288|   342k|}
_ZNK5Botan6BigInt4bitsEv:
  290|   128k|size_t BigInt::bits() const {
  291|   128k|   const size_t words = sig_words();
  292|       |
  293|   128k|   if(words == 0) {
  ------------------
  |  Branch (293:7): [True: 151, False: 128k]
  ------------------
  294|    151|      return 0;
  295|    151|   }
  296|       |
  297|   128k|   const size_t full_words = (words - 1) * BOTAN_MP_WORD_BITS;
  ------------------
  |  |   50|   128k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  298|   128k|   const size_t top_bits = BOTAN_MP_WORD_BITS - top_bits_free();
  ------------------
  |  |   50|   128k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  299|       |
  300|   128k|   return full_words + top_bits;
  301|   128k|}
_ZNK5Botan6BigIntngEv:
  306|  1.24k|BigInt BigInt::operator-() const {
  307|  1.24k|   BigInt x = (*this);
  308|  1.24k|   x.flip_sign();
  309|  1.24k|   return x;
  310|  1.24k|}
_ZN5Botan6BigInt12reduce_belowERKS0_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  312|  7.62M|size_t BigInt::reduce_below(const BigInt& p, secure_vector<word>& ws) {
  313|  7.62M|   if(p.is_negative() || this->is_negative()) {
  ------------------
  |  Branch (313:7): [True: 0, False: 7.62M]
  |  Branch (313:26): [True: 0, False: 7.62M]
  ------------------
  314|      0|      throw Invalid_Argument("BigInt::reduce_below both values must be positive");
  315|      0|   }
  316|       |
  317|  7.62M|   const size_t p_words = p.sig_words();
  318|       |
  319|  7.62M|   if(size() < p_words + 1) {
  ------------------
  |  Branch (319:7): [True: 0, False: 7.62M]
  ------------------
  320|      0|      grow_to(p_words + 1);
  321|      0|   }
  322|       |
  323|  7.62M|   if(ws.size() < p_words + 1) {
  ------------------
  |  Branch (323:7): [True: 71.4k, False: 7.55M]
  ------------------
  324|  71.4k|      ws.resize(p_words + 1);
  325|  71.4k|   }
  326|       |
  327|  7.62M|   clear_mem(ws.data(), ws.size());
  328|       |
  329|  7.62M|   size_t reductions = 0;
  330|       |
  331|  19.9M|   for(;;) {
  332|  19.9M|      word borrow = bigint_sub3(ws.data(), data(), p_words + 1, p.data(), p_words);
  333|  19.9M|      if(borrow) {
  ------------------
  |  Branch (333:10): [True: 7.62M, False: 12.2M]
  ------------------
  334|  7.62M|         break;
  335|  7.62M|      }
  336|       |
  337|  12.2M|      ++reductions;
  338|  12.2M|      swap_reg(ws);
  339|  12.2M|   }
  340|       |
  341|  7.62M|   return reductions;
  342|  7.62M|}
_ZN5Botan6BigInt15ct_reduce_belowERKS0_RNSt3__16vectorImNS_16secure_allocatorImEEEEm:
  344|  5.96k|void BigInt::ct_reduce_below(const BigInt& mod, secure_vector<word>& ws, size_t bound) {
  345|  5.96k|   if(mod.is_negative() || this->is_negative()) {
  ------------------
  |  Branch (345:7): [True: 0, False: 5.96k]
  |  Branch (345:28): [True: 0, False: 5.96k]
  ------------------
  346|      0|      throw Invalid_Argument("BigInt::ct_reduce_below both values must be positive");
  347|      0|   }
  348|       |
  349|  5.96k|   const size_t mod_words = mod.sig_words();
  350|       |
  351|  5.96k|   grow_to(mod_words);
  352|       |
  353|  5.96k|   const size_t sz = size();
  354|       |
  355|  5.96k|   ws.resize(sz);
  356|       |
  357|  5.96k|   clear_mem(ws.data(), sz);
  358|       |
  359|  17.8k|   for(size_t i = 0; i != bound; ++i) {
  ------------------
  |  Branch (359:22): [True: 11.9k, False: 5.96k]
  ------------------
  360|  11.9k|      word borrow = bigint_sub3(ws.data(), data(), sz, mod.data(), mod_words);
  361|       |
  362|  11.9k|      CT::Mask<word>::is_zero(borrow).select_n(mutable_data(), ws.data(), data(), sz);
  363|  11.9k|   }
  364|  5.96k|}
_ZN5Botan6BigInt13binary_decodeEPKhm:
  403|  86.0k|void BigInt::binary_decode(const uint8_t buf[], size_t length) {
  404|  86.0k|   clear();
  405|       |
  406|  86.0k|   const size_t full_words = length / sizeof(word);
  407|  86.0k|   const size_t extra_bytes = length % sizeof(word);
  408|       |
  409|  86.0k|   secure_vector<word> reg((round_up(full_words + (extra_bytes > 0 ? 1 : 0), 8)));
  ------------------
  |  Branch (409:52): [True: 2.04k, False: 84.0k]
  ------------------
  410|       |
  411|   404k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (411:22): [True: 318k, False: 86.0k]
  ------------------
  412|   318k|      reg[i] = load_be<word>(buf + length - sizeof(word) * (i + 1), 0);
  413|   318k|   }
  414|       |
  415|  86.0k|   if(extra_bytes > 0) {
  ------------------
  |  Branch (415:7): [True: 2.04k, False: 84.0k]
  ------------------
  416|  8.12k|      for(size_t i = 0; i != extra_bytes; ++i) {
  ------------------
  |  Branch (416:25): [True: 6.07k, False: 2.04k]
  ------------------
  417|  6.07k|         reg[full_words] = (reg[full_words] << 8) | buf[i];
  418|  6.07k|      }
  419|  2.04k|   }
  420|       |
  421|  86.0k|   m_data.swap(reg);
  422|  86.0k|}
_ZN5Botan6BigInt12ct_cond_swapEbRS0_:
  467|   380k|void BigInt::ct_cond_swap(bool predicate, BigInt& other) {
  468|   380k|   const size_t max_words = std::max(size(), other.size());
  469|   380k|   grow_to(max_words);
  470|   380k|   other.grow_to(max_words);
  471|       |
  472|   380k|   bigint_cnd_swap(predicate, this->mutable_data(), other.mutable_data(), max_words);
  473|   380k|}
_ZN5Botan6BigInt14cond_flip_signEb:
  475|   101k|void BigInt::cond_flip_sign(bool predicate) {
  476|       |   // This code is assuming Negative == 0, Positive == 1
  477|       |
  478|   101k|   const auto mask = CT::Mask<uint8_t>::expand(predicate);
  479|       |
  480|   101k|   const uint8_t current_sign = static_cast<uint8_t>(sign());
  481|       |
  482|   101k|   const uint8_t new_sign = mask.select(current_sign ^ 1, current_sign);
  483|       |
  484|   101k|   set_sign(static_cast<Sign>(new_sign));
  485|   101k|}

_ZN5Botan9ct_divideERKNS_6BigIntES2_RS0_S3_:
   48|    742|void ct_divide(const BigInt& x, const BigInt& y, BigInt& q_out, BigInt& r_out) {
   49|    742|   if(y.is_zero()) {
  ------------------
  |  Branch (49:7): [True: 0, False: 742]
  ------------------
   50|      0|      throw Invalid_Argument("ct_divide: cannot divide by zero");
   51|      0|   }
   52|       |
   53|    742|   const size_t x_words = x.sig_words();
   54|    742|   const size_t y_words = y.sig_words();
   55|       |
   56|    742|   const size_t x_bits = x.bits();
   57|       |
   58|    742|   BigInt q = BigInt::with_capacity(x_words);
   59|    742|   BigInt r = BigInt::with_capacity(y_words);
   60|    742|   BigInt t = BigInt::with_capacity(y_words);  // a temporary
   61|       |
   62|   381k|   for(size_t i = 0; i != x_bits; ++i) {
  ------------------
  |  Branch (62:22): [True: 380k, False: 742]
  ------------------
   63|   380k|      const size_t b = x_bits - 1 - i;
   64|   380k|      const bool x_b = x.get_bit(b);
   65|       |
   66|   380k|      r *= 2;
   67|   380k|      r.conditionally_set_bit(0, x_b);
   68|       |
   69|   380k|      const bool r_gte_y = bigint_sub3(t.mutable_data(), r.data(), r.size(), y.data(), y_words) == 0;
   70|       |
   71|   380k|      q.conditionally_set_bit(b, r_gte_y);
   72|   380k|      r.ct_cond_swap(r_gte_y, t);
   73|   380k|   }
   74|       |
   75|    742|   sign_fixup(x, y, q, r);
   76|    742|   r_out = r;
   77|    742|   q_out = q;
   78|    742|}
_ZN5Botan14ct_divide_wordERKNS_6BigIntEmRS0_Rm:
   80|  94.0k|void ct_divide_word(const BigInt& x, word y, BigInt& q_out, word& r_out) {
   81|  94.0k|   if(y == 0) {
  ------------------
  |  Branch (81:7): [True: 0, False: 94.0k]
  ------------------
   82|      0|      throw Invalid_Argument("ct_divide_word: cannot divide by zero");
   83|      0|   }
   84|       |
   85|  94.0k|   const size_t x_words = x.sig_words();
   86|  94.0k|   const size_t x_bits = x.bits();
   87|       |
   88|  94.0k|   BigInt q = BigInt::with_capacity(x_words);
   89|  94.0k|   word r = 0;
   90|       |
   91|  12.3M|   for(size_t i = 0; i != x_bits; ++i) {
  ------------------
  |  Branch (91:22): [True: 12.2M, False: 94.0k]
  ------------------
   92|  12.2M|      const size_t b = x_bits - 1 - i;
   93|  12.2M|      const bool x_b = x.get_bit(b);
   94|       |
   95|  12.2M|      const auto r_carry = CT::Mask<word>::expand(r >> (BOTAN_MP_WORD_BITS - 1));
  ------------------
  |  |   50|  12.2M|#define BOTAN_MP_WORD_BITS 64
  ------------------
   96|       |
   97|  12.2M|      r *= 2;
   98|  12.2M|      r += x_b;
   99|       |
  100|  12.2M|      const auto r_gte_y = CT::Mask<word>::is_gte(r, y) | r_carry;
  101|  12.2M|      q.conditionally_set_bit(b, r_gte_y.as_bool());
  102|  12.2M|      r = r_gte_y.select(r - y, r);
  103|  12.2M|   }
  104|       |
  105|  94.0k|   if(x.is_negative()) {
  ------------------
  |  Branch (105:7): [True: 0, False: 94.0k]
  ------------------
  106|      0|      q.flip_sign();
  107|      0|      if(r != 0) {
  ------------------
  |  Branch (107:10): [True: 0, False: 0]
  ------------------
  108|      0|         --q;
  109|      0|         r = y - r;
  110|      0|      }
  111|      0|   }
  112|       |
  113|  94.0k|   r_out = r;
  114|  94.0k|   q_out = q;
  115|  94.0k|}
_ZN5Botan14vartime_divideERKNS_6BigIntES2_RS0_S3_:
  155|  71.4k|void vartime_divide(const BigInt& x, const BigInt& y_arg, BigInt& q_out, BigInt& r_out) {
  156|  71.4k|   if(y_arg.is_zero()) {
  ------------------
  |  Branch (156:7): [True: 0, False: 71.4k]
  ------------------
  157|      0|      throw Invalid_Argument("vartime_divide: cannot divide by zero");
  158|      0|   }
  159|       |
  160|  71.4k|   const size_t y_words = y_arg.sig_words();
  161|       |
  162|  71.4k|   BOTAN_ASSERT_NOMSG(y_words > 0);
  ------------------
  |  |   60|  71.4k|   do {                                                                     \
  |  |   61|  71.4k|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 71.4k]
  |  |  ------------------
  |  |   62|  71.4k|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|  71.4k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  163|       |
  164|  71.4k|   BigInt y = y_arg;
  165|       |
  166|  71.4k|   BigInt r = x;
  167|  71.4k|   BigInt q = BigInt::zero();
  168|  71.4k|   secure_vector<word> ws;
  169|       |
  170|  71.4k|   r.set_sign(BigInt::Positive);
  171|  71.4k|   y.set_sign(BigInt::Positive);
  172|       |
  173|       |   // Calculate shifts needed to normalize y with high bit set
  174|  71.4k|   const size_t shifts = y.top_bits_free();
  175|       |
  176|  71.4k|   y <<= shifts;
  177|  71.4k|   r <<= shifts;
  178|       |
  179|       |   // we know y has not changed size, since we only shifted up to set high bit
  180|  71.4k|   const size_t t = y_words - 1;
  181|  71.4k|   const size_t n = std::max(y_words, r.sig_words()) - 1;  // r may have changed size however
  182|       |
  183|  71.4k|   BOTAN_ASSERT_NOMSG(n >= t);
  ------------------
  |  |   60|  71.4k|   do {                                                                     \
  |  |   61|  71.4k|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 71.4k]
  |  |  ------------------
  |  |   62|  71.4k|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|  71.4k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  184|       |
  185|  71.4k|   q.grow_to(n - t + 1);
  186|       |
  187|  71.4k|   word* q_words = q.mutable_data();
  188|       |
  189|  71.4k|   BigInt shifted_y = y << (BOTAN_MP_WORD_BITS * (n - t));
  ------------------
  |  |   50|  71.4k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  190|       |
  191|       |   // Set q_{n-t} to number of times r > shifted_y
  192|  71.4k|   q_words[n - t] = r.reduce_below(shifted_y, ws);
  193|       |
  194|  71.4k|   const word y_t0 = y.word_at(t);
  195|  71.4k|   const word y_t1 = y.word_at(t - 1);
  196|  71.4k|   BOTAN_DEBUG_ASSERT((y_t0 >> (BOTAN_MP_WORD_BITS - 1)) == 1);
  ------------------
  |  |   99|  71.4k|      do {                          \
  |  |  100|  71.4k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  197|       |
  198|   143k|   for(size_t j = n; j != t; --j) {
  ------------------
  |  Branch (198:22): [True: 71.8k, False: 71.4k]
  ------------------
  199|  71.8k|      const word x_j0 = r.word_at(j);
  200|  71.8k|      const word x_j1 = r.word_at(j - 1);
  201|  71.8k|      const word x_j2 = r.word_at(j - 2);
  202|       |
  203|  71.8k|      word qjt = bigint_divop_vartime(x_j0, x_j1, y_t0);
  204|       |
  205|  71.8k|      qjt = CT::Mask<word>::is_equal(x_j0, y_t0).select(MP_WORD_MAX, qjt);
  206|       |
  207|       |      // Per HAC 14.23, this operation is required at most twice
  208|  71.8k|      qjt -= division_check(qjt, y_t0, y_t1, x_j0, x_j1, x_j2);
  209|  71.8k|      qjt -= division_check(qjt, y_t0, y_t1, x_j0, x_j1, x_j2);
  210|  71.8k|      BOTAN_DEBUG_ASSERT(division_check(qjt, y_t0, y_t1, x_j0, x_j1, x_j2) == false);
  ------------------
  |  |   99|  71.8k|      do {                          \
  |  |  100|  71.8k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  211|       |
  212|  71.8k|      shifted_y >>= BOTAN_MP_WORD_BITS;
  ------------------
  |  |   50|  71.8k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  213|       |      // Now shifted_y == y << (BOTAN_MP_WORD_BITS * (j-t-1))
  214|       |
  215|       |      // TODO this sequence could be better
  216|  71.8k|      r -= qjt * shifted_y;
  217|  71.8k|      qjt -= r.is_negative();
  218|  71.8k|      r += static_cast<word>(r.is_negative()) * shifted_y;
  219|       |
  220|  71.8k|      q_words[j - t - 1] = qjt;
  221|  71.8k|   }
  222|       |
  223|  71.4k|   r >>= shifts;
  224|       |
  225|  71.4k|   sign_fixup(x, y_arg, q, r);
  226|       |
  227|  71.4k|   r_out = r;
  228|  71.4k|   q_out = q;
  229|  71.4k|}
divide.cpp:_ZN5Botan12_GLOBAL__N_110sign_fixupERKNS_6BigIntES3_RS1_S4_:
   21|  72.1k|void sign_fixup(const BigInt& x, const BigInt& y, BigInt& q, BigInt& r) {
   22|  72.1k|   q.cond_flip_sign(x.sign() != y.sign());
   23|       |
   24|  72.1k|   if(x.is_negative() && r.is_nonzero()) {
  ------------------
  |  Branch (24:7): [True: 0, False: 72.1k]
  |  Branch (24:26): [True: 0, False: 0]
  ------------------
   25|      0|      q -= 1;
   26|      0|      r = y.abs() - r;
   27|      0|   }
   28|  72.1k|}
divide.cpp:_ZN5Botan12_GLOBAL__N_114division_checkEmmmmmm:
   30|   143k|inline bool division_check(word q, word y2, word y1, word x3, word x2, word x1) {
   31|       |   /*
   32|       |   Compute (y3,y2,y1) = (y2,y1) * q
   33|       |   and return true if (y3,y2,y1) > (x3,x2,x1)
   34|       |   */
   35|       |
   36|   143k|   word y3 = 0;
   37|   143k|   y1 = word_madd2(q, y1, &y3);
   38|   143k|   y2 = word_madd2(q, y2, &y3);
   39|       |
   40|   143k|   const word x[3] = {x1, x2, x3};
   41|   143k|   const word y[3] = {y1, y2, y3};
   42|       |
   43|   143k|   return bigint_ct_is_lt(x, 3, y, 3).as_bool();
   44|   143k|}

_ZN5Botan17bigint_comba_sqr4EPmPKm:
   16|  21.6M|void bigint_comba_sqr4(word z[8], const word x[4]) {
   17|  21.6M|   word w2 = 0, w1 = 0, w0 = 0;
   18|       |
   19|  21.6M|   word3_muladd(&w2, &w1, &w0, x[0], x[0]);
   20|  21.6M|   z[0] = w0;
   21|  21.6M|   w0 = 0;
   22|       |
   23|  21.6M|   word3_muladd_2(&w0, &w2, &w1, x[0], x[1]);
   24|  21.6M|   z[1] = w1;
   25|  21.6M|   w1 = 0;
   26|       |
   27|  21.6M|   word3_muladd_2(&w1, &w0, &w2, x[0], x[2]);
   28|  21.6M|   word3_muladd(&w1, &w0, &w2, x[1], x[1]);
   29|  21.6M|   z[2] = w2;
   30|  21.6M|   w2 = 0;
   31|       |
   32|  21.6M|   word3_muladd_2(&w2, &w1, &w0, x[0], x[3]);
   33|  21.6M|   word3_muladd_2(&w2, &w1, &w0, x[1], x[2]);
   34|  21.6M|   z[3] = w0;
   35|  21.6M|   w0 = 0;
   36|       |
   37|  21.6M|   word3_muladd_2(&w0, &w2, &w1, x[1], x[3]);
   38|  21.6M|   word3_muladd(&w0, &w2, &w1, x[2], x[2]);
   39|  21.6M|   z[4] = w1;
   40|  21.6M|   w1 = 0;
   41|       |
   42|  21.6M|   word3_muladd_2(&w1, &w0, &w2, x[2], x[3]);
   43|  21.6M|   z[5] = w2;
   44|  21.6M|   w2 = 0;
   45|       |
   46|  21.6M|   word3_muladd(&w2, &w1, &w0, x[3], x[3]);
   47|  21.6M|   z[6] = w0;
   48|  21.6M|   z[7] = w1;
   49|  21.6M|}
_ZN5Botan17bigint_comba_mul4EPmPKmS2_:
   54|  18.8M|void bigint_comba_mul4(word z[8], const word x[4], const word y[4]) {
   55|  18.8M|   word w2 = 0, w1 = 0, w0 = 0;
   56|       |
   57|  18.8M|   word3_muladd(&w2, &w1, &w0, x[0], y[0]);
   58|  18.8M|   z[0] = w0;
   59|  18.8M|   w0 = 0;
   60|       |
   61|  18.8M|   word3_muladd(&w0, &w2, &w1, x[0], y[1]);
   62|  18.8M|   word3_muladd(&w0, &w2, &w1, x[1], y[0]);
   63|  18.8M|   z[1] = w1;
   64|  18.8M|   w1 = 0;
   65|       |
   66|  18.8M|   word3_muladd(&w1, &w0, &w2, x[0], y[2]);
   67|  18.8M|   word3_muladd(&w1, &w0, &w2, x[1], y[1]);
   68|  18.8M|   word3_muladd(&w1, &w0, &w2, x[2], y[0]);
   69|  18.8M|   z[2] = w2;
   70|  18.8M|   w2 = 0;
   71|       |
   72|  18.8M|   word3_muladd(&w2, &w1, &w0, x[0], y[3]);
   73|  18.8M|   word3_muladd(&w2, &w1, &w0, x[1], y[2]);
   74|  18.8M|   word3_muladd(&w2, &w1, &w0, x[2], y[1]);
   75|  18.8M|   word3_muladd(&w2, &w1, &w0, x[3], y[0]);
   76|  18.8M|   z[3] = w0;
   77|  18.8M|   w0 = 0;
   78|       |
   79|  18.8M|   word3_muladd(&w0, &w2, &w1, x[1], y[3]);
   80|  18.8M|   word3_muladd(&w0, &w2, &w1, x[2], y[2]);
   81|  18.8M|   word3_muladd(&w0, &w2, &w1, x[3], y[1]);
   82|  18.8M|   z[4] = w1;
   83|  18.8M|   w1 = 0;
   84|       |
   85|  18.8M|   word3_muladd(&w1, &w0, &w2, x[2], y[3]);
   86|  18.8M|   word3_muladd(&w1, &w0, &w2, x[3], y[2]);
   87|  18.8M|   z[5] = w2;
   88|  18.8M|   w2 = 0;
   89|       |
   90|  18.8M|   word3_muladd(&w2, &w1, &w0, x[3], y[3]);
   91|  18.8M|   z[6] = w0;
   92|  18.8M|   z[7] = w1;
   93|  18.8M|}
_ZN5Botan17bigint_comba_mul6EPmPKmS2_:
  159|     23|void bigint_comba_mul6(word z[12], const word x[6], const word y[6]) {
  160|     23|   word w2 = 0, w1 = 0, w0 = 0;
  161|       |
  162|     23|   word3_muladd(&w2, &w1, &w0, x[0], y[0]);
  163|     23|   z[0] = w0;
  164|     23|   w0 = 0;
  165|       |
  166|     23|   word3_muladd(&w0, &w2, &w1, x[0], y[1]);
  167|     23|   word3_muladd(&w0, &w2, &w1, x[1], y[0]);
  168|     23|   z[1] = w1;
  169|     23|   w1 = 0;
  170|       |
  171|     23|   word3_muladd(&w1, &w0, &w2, x[0], y[2]);
  172|     23|   word3_muladd(&w1, &w0, &w2, x[1], y[1]);
  173|     23|   word3_muladd(&w1, &w0, &w2, x[2], y[0]);
  174|     23|   z[2] = w2;
  175|     23|   w2 = 0;
  176|       |
  177|     23|   word3_muladd(&w2, &w1, &w0, x[0], y[3]);
  178|     23|   word3_muladd(&w2, &w1, &w0, x[1], y[2]);
  179|     23|   word3_muladd(&w2, &w1, &w0, x[2], y[1]);
  180|     23|   word3_muladd(&w2, &w1, &w0, x[3], y[0]);
  181|     23|   z[3] = w0;
  182|     23|   w0 = 0;
  183|       |
  184|     23|   word3_muladd(&w0, &w2, &w1, x[0], y[4]);
  185|     23|   word3_muladd(&w0, &w2, &w1, x[1], y[3]);
  186|     23|   word3_muladd(&w0, &w2, &w1, x[2], y[2]);
  187|     23|   word3_muladd(&w0, &w2, &w1, x[3], y[1]);
  188|     23|   word3_muladd(&w0, &w2, &w1, x[4], y[0]);
  189|     23|   z[4] = w1;
  190|     23|   w1 = 0;
  191|       |
  192|     23|   word3_muladd(&w1, &w0, &w2, x[0], y[5]);
  193|     23|   word3_muladd(&w1, &w0, &w2, x[1], y[4]);
  194|     23|   word3_muladd(&w1, &w0, &w2, x[2], y[3]);
  195|     23|   word3_muladd(&w1, &w0, &w2, x[3], y[2]);
  196|     23|   word3_muladd(&w1, &w0, &w2, x[4], y[1]);
  197|     23|   word3_muladd(&w1, &w0, &w2, x[5], y[0]);
  198|     23|   z[5] = w2;
  199|     23|   w2 = 0;
  200|       |
  201|     23|   word3_muladd(&w2, &w1, &w0, x[1], y[5]);
  202|     23|   word3_muladd(&w2, &w1, &w0, x[2], y[4]);
  203|     23|   word3_muladd(&w2, &w1, &w0, x[3], y[3]);
  204|     23|   word3_muladd(&w2, &w1, &w0, x[4], y[2]);
  205|     23|   word3_muladd(&w2, &w1, &w0, x[5], y[1]);
  206|     23|   z[6] = w0;
  207|     23|   w0 = 0;
  208|       |
  209|     23|   word3_muladd(&w0, &w2, &w1, x[2], y[5]);
  210|     23|   word3_muladd(&w0, &w2, &w1, x[3], y[4]);
  211|     23|   word3_muladd(&w0, &w2, &w1, x[4], y[3]);
  212|     23|   word3_muladd(&w0, &w2, &w1, x[5], y[2]);
  213|     23|   z[7] = w1;
  214|     23|   w1 = 0;
  215|       |
  216|     23|   word3_muladd(&w1, &w0, &w2, x[3], y[5]);
  217|     23|   word3_muladd(&w1, &w0, &w2, x[4], y[4]);
  218|     23|   word3_muladd(&w1, &w0, &w2, x[5], y[3]);
  219|     23|   z[8] = w2;
  220|     23|   w2 = 0;
  221|       |
  222|     23|   word3_muladd(&w2, &w1, &w0, x[4], y[5]);
  223|     23|   word3_muladd(&w2, &w1, &w0, x[5], y[4]);
  224|     23|   z[9] = w0;
  225|     23|   w0 = 0;
  226|       |
  227|     23|   word3_muladd(&w0, &w2, &w1, x[5], y[5]);
  228|     23|   z[10] = w1;
  229|     23|   z[11] = w2;
  230|     23|}
_ZN5Botan17bigint_comba_mul8EPmPKmS2_:
  323|     26|void bigint_comba_mul8(word z[16], const word x[8], const word y[8]) {
  324|     26|   word w2 = 0, w1 = 0, w0 = 0;
  325|       |
  326|     26|   word3_muladd(&w2, &w1, &w0, x[0], y[0]);
  327|     26|   z[0] = w0;
  328|     26|   w0 = 0;
  329|       |
  330|     26|   word3_muladd(&w0, &w2, &w1, x[0], y[1]);
  331|     26|   word3_muladd(&w0, &w2, &w1, x[1], y[0]);
  332|     26|   z[1] = w1;
  333|     26|   w1 = 0;
  334|       |
  335|     26|   word3_muladd(&w1, &w0, &w2, x[0], y[2]);
  336|     26|   word3_muladd(&w1, &w0, &w2, x[1], y[1]);
  337|     26|   word3_muladd(&w1, &w0, &w2, x[2], y[0]);
  338|     26|   z[2] = w2;
  339|     26|   w2 = 0;
  340|       |
  341|     26|   word3_muladd(&w2, &w1, &w0, x[0], y[3]);
  342|     26|   word3_muladd(&w2, &w1, &w0, x[1], y[2]);
  343|     26|   word3_muladd(&w2, &w1, &w0, x[2], y[1]);
  344|     26|   word3_muladd(&w2, &w1, &w0, x[3], y[0]);
  345|     26|   z[3] = w0;
  346|     26|   w0 = 0;
  347|       |
  348|     26|   word3_muladd(&w0, &w2, &w1, x[0], y[4]);
  349|     26|   word3_muladd(&w0, &w2, &w1, x[1], y[3]);
  350|     26|   word3_muladd(&w0, &w2, &w1, x[2], y[2]);
  351|     26|   word3_muladd(&w0, &w2, &w1, x[3], y[1]);
  352|     26|   word3_muladd(&w0, &w2, &w1, x[4], y[0]);
  353|     26|   z[4] = w1;
  354|     26|   w1 = 0;
  355|       |
  356|     26|   word3_muladd(&w1, &w0, &w2, x[0], y[5]);
  357|     26|   word3_muladd(&w1, &w0, &w2, x[1], y[4]);
  358|     26|   word3_muladd(&w1, &w0, &w2, x[2], y[3]);
  359|     26|   word3_muladd(&w1, &w0, &w2, x[3], y[2]);
  360|     26|   word3_muladd(&w1, &w0, &w2, x[4], y[1]);
  361|     26|   word3_muladd(&w1, &w0, &w2, x[5], y[0]);
  362|     26|   z[5] = w2;
  363|     26|   w2 = 0;
  364|       |
  365|     26|   word3_muladd(&w2, &w1, &w0, x[0], y[6]);
  366|     26|   word3_muladd(&w2, &w1, &w0, x[1], y[5]);
  367|     26|   word3_muladd(&w2, &w1, &w0, x[2], y[4]);
  368|     26|   word3_muladd(&w2, &w1, &w0, x[3], y[3]);
  369|     26|   word3_muladd(&w2, &w1, &w0, x[4], y[2]);
  370|     26|   word3_muladd(&w2, &w1, &w0, x[5], y[1]);
  371|     26|   word3_muladd(&w2, &w1, &w0, x[6], y[0]);
  372|     26|   z[6] = w0;
  373|     26|   w0 = 0;
  374|       |
  375|     26|   word3_muladd(&w0, &w2, &w1, x[0], y[7]);
  376|     26|   word3_muladd(&w0, &w2, &w1, x[1], y[6]);
  377|     26|   word3_muladd(&w0, &w2, &w1, x[2], y[5]);
  378|     26|   word3_muladd(&w0, &w2, &w1, x[3], y[4]);
  379|     26|   word3_muladd(&w0, &w2, &w1, x[4], y[3]);
  380|     26|   word3_muladd(&w0, &w2, &w1, x[5], y[2]);
  381|     26|   word3_muladd(&w0, &w2, &w1, x[6], y[1]);
  382|     26|   word3_muladd(&w0, &w2, &w1, x[7], y[0]);
  383|     26|   z[7] = w1;
  384|     26|   w1 = 0;
  385|       |
  386|     26|   word3_muladd(&w1, &w0, &w2, x[1], y[7]);
  387|     26|   word3_muladd(&w1, &w0, &w2, x[2], y[6]);
  388|     26|   word3_muladd(&w1, &w0, &w2, x[3], y[5]);
  389|     26|   word3_muladd(&w1, &w0, &w2, x[4], y[4]);
  390|     26|   word3_muladd(&w1, &w0, &w2, x[5], y[3]);
  391|     26|   word3_muladd(&w1, &w0, &w2, x[6], y[2]);
  392|     26|   word3_muladd(&w1, &w0, &w2, x[7], y[1]);
  393|     26|   z[8] = w2;
  394|     26|   w2 = 0;
  395|       |
  396|     26|   word3_muladd(&w2, &w1, &w0, x[2], y[7]);
  397|     26|   word3_muladd(&w2, &w1, &w0, x[3], y[6]);
  398|     26|   word3_muladd(&w2, &w1, &w0, x[4], y[5]);
  399|     26|   word3_muladd(&w2, &w1, &w0, x[5], y[4]);
  400|     26|   word3_muladd(&w2, &w1, &w0, x[6], y[3]);
  401|     26|   word3_muladd(&w2, &w1, &w0, x[7], y[2]);
  402|     26|   z[9] = w0;
  403|     26|   w0 = 0;
  404|       |
  405|     26|   word3_muladd(&w0, &w2, &w1, x[3], y[7]);
  406|     26|   word3_muladd(&w0, &w2, &w1, x[4], y[6]);
  407|     26|   word3_muladd(&w0, &w2, &w1, x[5], y[5]);
  408|     26|   word3_muladd(&w0, &w2, &w1, x[6], y[4]);
  409|     26|   word3_muladd(&w0, &w2, &w1, x[7], y[3]);
  410|     26|   z[10] = w1;
  411|     26|   w1 = 0;
  412|       |
  413|     26|   word3_muladd(&w1, &w0, &w2, x[4], y[7]);
  414|     26|   word3_muladd(&w1, &w0, &w2, x[5], y[6]);
  415|     26|   word3_muladd(&w1, &w0, &w2, x[6], y[5]);
  416|     26|   word3_muladd(&w1, &w0, &w2, x[7], y[4]);
  417|     26|   z[11] = w2;
  418|     26|   w2 = 0;
  419|       |
  420|     26|   word3_muladd(&w2, &w1, &w0, x[5], y[7]);
  421|     26|   word3_muladd(&w2, &w1, &w0, x[6], y[6]);
  422|     26|   word3_muladd(&w2, &w1, &w0, x[7], y[5]);
  423|     26|   z[12] = w0;
  424|     26|   w0 = 0;
  425|       |
  426|     26|   word3_muladd(&w0, &w2, &w1, x[6], y[7]);
  427|     26|   word3_muladd(&w0, &w2, &w1, x[7], y[6]);
  428|     26|   z[13] = w1;
  429|     26|   w1 = 0;
  430|       |
  431|     26|   word3_muladd(&w1, &w0, &w2, x[7], y[7]);
  432|     26|   z[14] = w2;
  433|     26|   z[15] = w0;
  434|     26|}

_ZN5Botan12basecase_mulEPmmPKmmS2_m:
   20|  2.23k|void basecase_mul(word z[], size_t z_size, const word x[], size_t x_size, const word y[], size_t y_size) {
   21|  2.23k|   if(z_size < x_size + y_size) {
  ------------------
  |  Branch (21:7): [True: 0, False: 2.23k]
  ------------------
   22|      0|      throw Invalid_Argument("basecase_mul z_size too small");
   23|      0|   }
   24|       |
   25|  2.23k|   const size_t x_size_8 = x_size - (x_size % 8);
   26|       |
   27|  2.23k|   clear_mem(z, z_size);
   28|       |
   29|  13.4k|   for(size_t i = 0; i != y_size; ++i) {
  ------------------
  |  Branch (29:22): [True: 11.1k, False: 2.23k]
  ------------------
   30|  11.1k|      const word y_i = y[i];
   31|       |
   32|  11.1k|      word carry = 0;
   33|       |
   34|  11.1k|      for(size_t j = 0; j != x_size_8; j += 8) {
  ------------------
  |  Branch (34:25): [True: 0, False: 11.1k]
  ------------------
   35|      0|         carry = word8_madd3(z + i + j, x + j, y_i, carry);
   36|      0|      }
   37|       |
   38|  52.0k|      for(size_t j = x_size_8; j != x_size; ++j) {
  ------------------
  |  Branch (38:32): [True: 40.8k, False: 11.1k]
  ------------------
   39|  40.8k|         z[i + j] = word_madd3(x[j], y_i, z[i + j], &carry);
   40|  40.8k|      }
   41|       |
   42|  11.1k|      z[x_size + i] = carry;
   43|  11.1k|   }
   44|  2.23k|}
_ZN5Botan10bigint_mulEPmmPKmmmS2_mmS0_m:
  291|  18.8M|                size_t ws_size) {
  292|  18.8M|   clear_mem(z, z_size);
  293|       |
  294|  18.8M|   if(x_sw == 1) {
  ------------------
  |  Branch (294:7): [True: 0, False: 18.8M]
  ------------------
  295|      0|      bigint_linmul3(z, y, y_sw, x[0]);
  296|  18.8M|   } else if(y_sw == 1) {
  ------------------
  |  Branch (296:14): [True: 0, False: 18.8M]
  ------------------
  297|      0|      bigint_linmul3(z, x, x_sw, y[0]);
  298|  18.8M|   } else if(sized_for_comba_mul<4>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (298:14): [True: 18.8M, False: 2.28k]
  ------------------
  299|  18.8M|      bigint_comba_mul4(z, x, y);
  300|  18.8M|   } else if(sized_for_comba_mul<6>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (300:14): [True: 23, False: 2.26k]
  ------------------
  301|     23|      bigint_comba_mul6(z, x, y);
  302|  2.26k|   } else if(sized_for_comba_mul<8>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (302:14): [True: 26, False: 2.23k]
  ------------------
  303|     26|      bigint_comba_mul8(z, x, y);
  304|  2.23k|   } else if(sized_for_comba_mul<9>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (304:14): [True: 0, False: 2.23k]
  ------------------
  305|      0|      bigint_comba_mul9(z, x, y);
  306|  2.23k|   } else if(sized_for_comba_mul<16>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (306:14): [True: 0, False: 2.23k]
  ------------------
  307|      0|      bigint_comba_mul16(z, x, y);
  308|  2.23k|   } else if(sized_for_comba_mul<24>(x_sw, x_size, y_sw, y_size, z_size)) {
  ------------------
  |  Branch (308:14): [True: 0, False: 2.23k]
  ------------------
  309|      0|      bigint_comba_mul24(z, x, y);
  310|  2.23k|   } else if(x_sw < KARATSUBA_MULTIPLY_THRESHOLD || y_sw < KARATSUBA_MULTIPLY_THRESHOLD || !workspace) {
  ------------------
  |  Branch (310:14): [True: 2.23k, False: 0]
  |  Branch (310:53): [True: 0, False: 0]
  |  Branch (310:92): [True: 0, False: 0]
  ------------------
  311|  2.23k|      basecase_mul(z, z_size, x, x_sw, y, y_sw);
  312|  2.23k|   } else {
  313|      0|      const size_t N = karatsuba_size(z_size, x_size, x_sw, y_size, y_sw);
  314|       |
  315|      0|      if(N && z_size >= 2 * N && ws_size >= 2 * N) {
  ------------------
  |  Branch (315:10): [True: 0, False: 0]
  |  Branch (315:15): [True: 0, False: 0]
  |  Branch (315:34): [True: 0, False: 0]
  ------------------
  316|      0|         karatsuba_mul(z, x, y, N, workspace);
  317|      0|      } else {
  318|      0|         basecase_mul(z, z_size, x, x_sw, y, y_sw);
  319|      0|      }
  320|      0|   }
  321|  18.8M|}
_ZN5Botan10bigint_sqrEPmmPKmmmS0_m:
  326|  21.6M|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) {
  327|  21.6M|   clear_mem(z, z_size);
  328|       |
  329|  21.6M|   BOTAN_ASSERT(z_size / 2 >= x_sw, "Output size is sufficient");
  ------------------
  |  |   51|  21.6M|   do {                                                                                 \
  |  |   52|  21.6M|      if(!(expr))                                                                       \
  |  |  ------------------
  |  |  |  Branch (52:10): [True: 0, False: 21.6M]
  |  |  ------------------
  |  |   53|  21.6M|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   54|  21.6M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (54:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  330|       |
  331|  21.6M|   if(x_sw == 1) {
  ------------------
  |  Branch (331:7): [True: 0, False: 21.6M]
  ------------------
  332|      0|      bigint_linmul3(z, x, x_sw, x[0]);
  333|  21.6M|   } else if(sized_for_comba_sqr<4>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (333:14): [True: 21.6M, False: 0]
  ------------------
  334|  21.6M|      bigint_comba_sqr4(z, x);
  335|  21.6M|   } else if(sized_for_comba_sqr<6>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (335:14): [True: 0, False: 0]
  ------------------
  336|      0|      bigint_comba_sqr6(z, x);
  337|      0|   } else if(sized_for_comba_sqr<8>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (337:14): [True: 0, False: 0]
  ------------------
  338|      0|      bigint_comba_sqr8(z, x);
  339|      0|   } else if(sized_for_comba_sqr<9>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (339:14): [True: 0, False: 0]
  ------------------
  340|      0|      bigint_comba_sqr9(z, x);
  341|      0|   } else if(sized_for_comba_sqr<16>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (341:14): [True: 0, False: 0]
  ------------------
  342|      0|      bigint_comba_sqr16(z, x);
  343|      0|   } else if(sized_for_comba_sqr<24>(x_sw, x_size, z_size)) {
  ------------------
  |  Branch (343:14): [True: 0, False: 0]
  ------------------
  344|      0|      bigint_comba_sqr24(z, x);
  345|      0|   } else if(x_size < KARATSUBA_SQUARE_THRESHOLD || !workspace) {
  ------------------
  |  Branch (345:14): [True: 0, False: 0]
  |  Branch (345:53): [True: 0, False: 0]
  ------------------
  346|      0|      basecase_sqr(z, z_size, x, x_sw);
  347|      0|   } else {
  348|      0|      const size_t N = karatsuba_size(z_size, x_size, x_sw);
  349|       |
  350|      0|      if(N && z_size >= 2 * N && ws_size >= 2 * N) {
  ------------------
  |  Branch (350:10): [True: 0, False: 0]
  |  Branch (350:15): [True: 0, False: 0]
  |  Branch (350:34): [True: 0, False: 0]
  ------------------
  351|      0|         karatsuba_sqr(z, x, N, workspace);
  352|      0|      } else {
  353|      0|         basecase_sqr(z, z_size, x, x_sw);
  354|      0|      }
  355|      0|   }
  356|  21.6M|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm4EEEbmmmmm:
  271|  18.8M|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) {
  272|  18.8M|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (272:12): [True: 18.8M, False: 790]
  |  Branch (272:26): [True: 18.8M, False: 0]
  |  Branch (272:42): [True: 18.8M, False: 1.49k]
  |  Branch (272:56): [True: 18.8M, False: 0]
  |  Branch (272:72): [True: 18.8M, False: 0]
  ------------------
  273|  18.8M|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm6EEEbmmmmm:
  271|  2.28k|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) {
  272|  2.28k|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (272:12): [True: 2.25k, False: 26]
  |  Branch (272:26): [True: 2.25k, False: 0]
  |  Branch (272:42): [True: 2.25k, False: 0]
  |  Branch (272:56): [True: 2.25k, False: 0]
  |  Branch (272:72): [True: 23, False: 2.23k]
  ------------------
  273|  2.28k|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm8EEEbmmmmm:
  271|  2.26k|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) {
  272|  2.26k|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (272:12): [True: 2.26k, False: 0]
  |  Branch (272:26): [True: 2.26k, False: 0]
  |  Branch (272:42): [True: 2.26k, False: 0]
  |  Branch (272:56): [True: 2.26k, False: 0]
  |  Branch (272:72): [True: 26, False: 2.23k]
  ------------------
  273|  2.26k|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm9EEEbmmmmm:
  271|  2.23k|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) {
  272|  2.23k|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (272:12): [True: 2.23k, False: 0]
  |  Branch (272:26): [True: 741, False: 1.49k]
  |  Branch (272:42): [True: 741, False: 0]
  |  Branch (272:56): [True: 741, False: 0]
  |  Branch (272:72): [True: 0, False: 741]
  ------------------
  273|  2.23k|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm16EEEbmmmmm:
  271|  2.23k|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) {
  272|  2.23k|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (272:12): [True: 2.23k, False: 0]
  |  Branch (272:26): [True: 741, False: 1.49k]
  |  Branch (272:42): [True: 741, False: 0]
  |  Branch (272:56): [True: 741, False: 0]
  |  Branch (272:72): [True: 0, False: 741]
  ------------------
  273|  2.23k|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_mulILm24EEEbmmmmm:
  271|  2.23k|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) {
  272|  2.23k|   return (x_sw <= SZ && x_size >= SZ && y_sw <= SZ && y_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (272:12): [True: 2.23k, False: 0]
  |  Branch (272:26): [True: 741, False: 1.49k]
  |  Branch (272:42): [True: 741, False: 0]
  |  Branch (272:56): [True: 0, False: 741]
  |  Branch (272:72): [True: 0, False: 0]
  ------------------
  273|  2.23k|}
mp_karat.cpp:_ZN5Botan12_GLOBAL__N_119sized_for_comba_sqrILm4EEEbmmm:
  276|  21.6M|inline bool sized_for_comba_sqr(size_t x_sw, size_t x_size, size_t z_size) {
  277|  21.6M|   return (x_sw <= SZ && x_size >= SZ && z_size >= 2 * SZ);
  ------------------
  |  Branch (277:12): [True: 21.6M, False: 0]
  |  Branch (277:26): [True: 21.6M, False: 0]
  |  Branch (277:42): [True: 21.6M, False: 0]
  ------------------
  278|  21.6M|}

_ZN5Botan19bigint_monty_redc_4EPmPKmmS0_:
   14|   205k|void bigint_monty_redc_4(word z[8], const word p[4], word p_dash, word ws[]) {
   15|   205k|   word w2 = 0, w1 = 0, w0 = 0;
   16|   205k|   w0 = z[0];
   17|   205k|   ws[0] = w0 * p_dash;
   18|   205k|   word3_muladd(&w2, &w1, &w0, ws[0], p[0]);
   19|   205k|   w0 = w1;
   20|   205k|   w1 = w2;
   21|   205k|   w2 = 0;
   22|   205k|   word3_muladd(&w2, &w1, &w0, ws[0], p[1]);
   23|   205k|   word3_add(&w2, &w1, &w0, z[1]);
   24|   205k|   ws[1] = w0 * p_dash;
   25|   205k|   word3_muladd(&w2, &w1, &w0, ws[1], p[0]);
   26|   205k|   w0 = w1;
   27|   205k|   w1 = w2;
   28|   205k|   w2 = 0;
   29|   205k|   word3_muladd(&w2, &w1, &w0, ws[0], p[2]);
   30|   205k|   word3_muladd(&w2, &w1, &w0, ws[1], p[1]);
   31|   205k|   word3_add(&w2, &w1, &w0, z[2]);
   32|   205k|   ws[2] = w0 * p_dash;
   33|   205k|   word3_muladd(&w2, &w1, &w0, ws[2], p[0]);
   34|   205k|   w0 = w1;
   35|   205k|   w1 = w2;
   36|   205k|   w2 = 0;
   37|   205k|   word3_muladd(&w2, &w1, &w0, ws[0], p[3]);
   38|   205k|   word3_muladd(&w2, &w1, &w0, ws[1], p[2]);
   39|   205k|   word3_muladd(&w2, &w1, &w0, ws[2], p[1]);
   40|   205k|   word3_add(&w2, &w1, &w0, z[3]);
   41|   205k|   ws[3] = w0 * p_dash;
   42|   205k|   word3_muladd(&w2, &w1, &w0, ws[3], p[0]);
   43|   205k|   w0 = w1;
   44|   205k|   w1 = w2;
   45|   205k|   w2 = 0;
   46|   205k|   word3_muladd(&w2, &w1, &w0, ws[1], p[3]);
   47|   205k|   word3_muladd(&w2, &w1, &w0, ws[2], p[2]);
   48|   205k|   word3_muladd(&w2, &w1, &w0, ws[3], p[1]);
   49|   205k|   word3_add(&w2, &w1, &w0, z[4]);
   50|   205k|   ws[0] = w0;
   51|   205k|   w0 = w1;
   52|   205k|   w1 = w2;
   53|   205k|   w2 = 0;
   54|   205k|   word3_muladd(&w2, &w1, &w0, ws[2], p[3]);
   55|   205k|   word3_muladd(&w2, &w1, &w0, ws[3], p[2]);
   56|   205k|   word3_add(&w2, &w1, &w0, z[5]);
   57|   205k|   ws[1] = w0;
   58|   205k|   w0 = w1;
   59|   205k|   w1 = w2;
   60|   205k|   w2 = 0;
   61|   205k|   word3_muladd(&w2, &w1, &w0, ws[3], p[3]);
   62|   205k|   word3_add(&w2, &w1, &w0, z[6]);
   63|   205k|   ws[2] = w0;
   64|   205k|   w0 = w1;
   65|   205k|   w1 = w2;
   66|   205k|   w2 = 0;
   67|   205k|   word3_add(&w2, &w1, &w0, z[7]);
   68|   205k|   ws[3] = w0;
   69|   205k|   ws[4] = w1;
   70|   205k|   word borrow = bigint_sub3(z, ws, 4 + 1, p, 4);
   71|   205k|   CT::conditional_assign_mem(borrow, z, ws, 4);
   72|   205k|   clear_mem(z + 4, 4);
   73|   205k|}

_ZN5Botan13monty_inverseEm:
   16|    741|word monty_inverse(word a) {
   17|    741|   if(a % 2 == 0) {
  ------------------
  |  Branch (17:7): [True: 0, False: 741]
  ------------------
   18|      0|      throw Invalid_Argument("monty_inverse only valid for odd integers");
   19|      0|   }
   20|       |
   21|       |   /*
   22|       |   * From "A New Algorithm for Inversion mod p^k" by Çetin Kaya Koç
   23|       |   * https://eprint.iacr.org/2017/411.pdf sections 5 and 7.
   24|       |   */
   25|       |
   26|    741|   word b = 1;
   27|    741|   word r = 0;
   28|       |
   29|  48.1k|   for(size_t i = 0; i != BOTAN_MP_WORD_BITS; ++i) {
  ------------------
  |  |   50|  48.1k|#define BOTAN_MP_WORD_BITS 64
  ------------------
  |  Branch (29:22): [True: 47.4k, False: 741]
  ------------------
   30|  47.4k|      const word bi = b % 2;
   31|  47.4k|      r >>= 1;
   32|  47.4k|      r += bi << (BOTAN_MP_WORD_BITS - 1);
  ------------------
  |  |   50|  47.4k|#define BOTAN_MP_WORD_BITS 64
  ------------------
   33|       |
   34|  47.4k|      b -= a * bi;
   35|  47.4k|      b >>= 1;
   36|  47.4k|   }
   37|       |
   38|       |   // Now invert in addition space
   39|    741|   r = (MP_WORD_MAX - r) + 1;
   40|       |
   41|    741|   return r;
   42|    741|}
_ZN5Botan17Montgomery_ParamsC2ERKNS_6BigIntERKNS_15Modular_ReducerE:
   44|    741|Montgomery_Params::Montgomery_Params(const BigInt& p, const Modular_Reducer& mod_p) {
   45|    741|   if(p.is_even() || p < 3) {
  ------------------
  |  Branch (45:7): [True: 0, False: 741]
  |  Branch (45:22): [True: 0, False: 741]
  ------------------
   46|      0|      throw Invalid_Argument("Montgomery_Params invalid modulus");
   47|      0|   }
   48|       |
   49|    741|   m_p = p;
   50|    741|   m_p_words = m_p.sig_words();
   51|    741|   m_p_dash = monty_inverse(m_p.word_at(0));
   52|       |
   53|    741|   const BigInt r = BigInt::power_of_2(m_p_words * BOTAN_MP_WORD_BITS);
  ------------------
  |  |   50|    741|#define BOTAN_MP_WORD_BITS 64
  ------------------
   54|       |
   55|    741|   m_r1 = mod_p.reduce(r);
   56|    741|   m_r2 = mod_p.square(m_r1);
   57|    741|   m_r3 = mod_p.multiply(m_r1, m_r2);
   58|    741|}
_ZNK5Botan17Montgomery_Params4redcERKNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
   84|    741|BigInt Montgomery_Params::redc(const BigInt& x, secure_vector<word>& ws) const {
   85|    741|   const size_t output_size = m_p_words + 1;
   86|       |
   87|    741|   if(ws.size() < output_size) {
  ------------------
  |  Branch (87:7): [True: 741, False: 0]
  ------------------
   88|    741|      ws.resize(output_size);
   89|    741|   }
   90|       |
   91|    741|   BigInt z = x;
   92|    741|   z.grow_to(2 * m_p_words);
   93|       |
   94|    741|   bigint_monty_redc(z.mutable_data(), m_p.data(), m_p_words, m_p_dash, ws.data(), ws.size());
   95|       |
   96|    741|   return z;
   97|    741|}
_ZNK5Botan17Montgomery_Params3mulERKNS_6BigIntES3_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   99|  11.1k|BigInt Montgomery_Params::mul(const BigInt& x, const BigInt& y, secure_vector<word>& ws) const {
  100|  11.1k|   const size_t output_size = 2 * m_p_words + 2;
  101|       |
  102|  11.1k|   if(ws.size() < output_size) {
  ------------------
  |  Branch (102:7): [True: 11.1k, False: 0]
  ------------------
  103|  11.1k|      ws.resize(output_size);
  104|  11.1k|   }
  105|       |
  106|  11.1k|   BOTAN_DEBUG_ASSERT(x.sig_words() <= m_p_words);
  ------------------
  |  |   99|  11.1k|      do {                          \
  |  |  100|  11.1k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  107|  11.1k|   BOTAN_DEBUG_ASSERT(y.sig_words() <= m_p_words);
  ------------------
  |  |   99|  11.1k|      do {                          \
  |  |  100|  11.1k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  108|       |
  109|  11.1k|   BigInt z = BigInt::with_capacity(output_size);
  110|  11.1k|   bigint_mul(z.mutable_data(),
  111|  11.1k|              z.size(),
  112|  11.1k|              x.data(),
  113|  11.1k|              x.size(),
  114|  11.1k|              std::min(m_p_words, x.size()),
  115|  11.1k|              y.data(),
  116|  11.1k|              y.size(),
  117|  11.1k|              std::min(m_p_words, y.size()),
  118|  11.1k|              ws.data(),
  119|  11.1k|              ws.size());
  120|       |
  121|  11.1k|   bigint_monty_redc(z.mutable_data(), m_p.data(), m_p_words, m_p_dash, ws.data(), ws.size());
  122|       |
  123|  11.1k|   return z;
  124|  11.1k|}
_ZNK5Botan17Montgomery_Params6mul_byERNS_6BigIntERKS1_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  182|  7.41k|void Montgomery_Params::mul_by(BigInt& x, const BigInt& y, secure_vector<word>& ws) const {
  183|  7.41k|   const size_t output_size = 2 * m_p_words;
  184|       |
  185|  7.41k|   if(ws.size() < 2 * output_size) {
  ------------------
  |  Branch (185:7): [True: 0, False: 7.41k]
  ------------------
  186|      0|      ws.resize(2 * output_size);
  187|      0|   }
  188|       |
  189|  7.41k|   word* z_data = &ws[0];
  190|  7.41k|   word* ws_data = &ws[output_size];
  191|       |
  192|  7.41k|   BOTAN_DEBUG_ASSERT(x.sig_words() <= m_p_words);
  ------------------
  |  |   99|  7.41k|      do {                          \
  |  |  100|  7.41k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  193|       |
  194|  7.41k|   bigint_mul(z_data,
  195|  7.41k|              output_size,
  196|  7.41k|              x.data(),
  197|  7.41k|              x.size(),
  198|  7.41k|              std::min(m_p_words, x.size()),
  199|  7.41k|              y.data(),
  200|  7.41k|              y.size(),
  201|  7.41k|              std::min(m_p_words, y.size()),
  202|  7.41k|              ws_data,
  203|  7.41k|              output_size);
  204|       |
  205|  7.41k|   bigint_monty_redc(z_data, m_p.data(), m_p_words, m_p_dash, ws_data, output_size);
  206|       |
  207|  7.41k|   if(x.size() < output_size) {
  ------------------
  |  Branch (207:7): [True: 0, False: 7.41k]
  ------------------
  208|      0|      x.grow_to(output_size);
  209|      0|   }
  210|  7.41k|   copy_mem(x.mutable_data(), z_data, output_size);
  211|  7.41k|}
_ZNK5Botan17Montgomery_Params11square_thisERNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  231|   186k|void Montgomery_Params::square_this(BigInt& x, secure_vector<word>& ws) const {
  232|   186k|   const size_t output_size = 2 * m_p_words;
  233|       |
  234|   186k|   if(ws.size() < 2 * output_size) {
  ------------------
  |  Branch (234:7): [True: 741, False: 185k]
  ------------------
  235|    741|      ws.resize(2 * output_size);
  236|    741|   }
  237|       |
  238|   186k|   word* z_data = &ws[0];
  239|   186k|   word* ws_data = &ws[output_size];
  240|       |
  241|   186k|   BOTAN_DEBUG_ASSERT(x.sig_words() <= m_p_words);
  ------------------
  |  |   99|   186k|      do {                          \
  |  |  100|   186k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  242|       |
  243|   186k|   bigint_sqr(z_data, output_size, x.data(), x.size(), std::min(m_p_words, x.size()), ws_data, output_size);
  244|       |
  245|   186k|   bigint_monty_redc(z_data, m_p.data(), m_p_words, m_p_dash, ws_data, output_size);
  246|       |
  247|   186k|   if(x.size() < output_size) {
  ------------------
  |  Branch (247:7): [True: 0, False: 186k]
  ------------------
  248|      0|      x.grow_to(output_size);
  249|      0|   }
  250|   186k|   copy_mem(x.mutable_data(), z_data, output_size);
  251|   186k|}
_ZN5Botan14Montgomery_IntC2ERKNSt3__110shared_ptrIKNS_17Montgomery_ParamsEEERKNS_6BigIntEb:
  256|  11.8k|      m_params(params) {
  257|  11.8k|   if(redc_needed == false) {
  ------------------
  |  Branch (257:7): [True: 11.1k, False: 741]
  ------------------
  258|  11.1k|      m_v = v;
  259|  11.1k|   } else {
  260|    741|      BOTAN_ASSERT_NOMSG(m_v < m_params->p());
  ------------------
  |  |   60|    741|   do {                                                                     \
  |  |   61|    741|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 741]
  |  |  ------------------
  |  |   62|    741|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|    741|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  261|    741|      secure_vector<word> ws;
  262|    741|      m_v = m_params->mul(v, m_params->R2(), ws);
  263|    741|   }
  264|  11.8k|}
_ZN5Botan14Montgomery_Int8fix_sizeEv:
  292|  11.8k|void Montgomery_Int::fix_size() {
  293|  11.8k|   const size_t p_words = m_params->p_words();
  294|       |
  295|  11.8k|   if(m_v.sig_words() > p_words) {
  ------------------
  |  Branch (295:7): [True: 0, False: 11.8k]
  ------------------
  296|      0|      throw Internal_Error("Montgomery_Int::fix_size v too large");
  297|      0|   }
  298|       |
  299|  11.8k|   m_v.grow_to(p_words);
  300|  11.8k|}
_ZNK5Botan14Montgomery_Int5valueEv:
  324|    741|BigInt Montgomery_Int::value() const {
  325|    741|   secure_vector<word> ws;
  326|    741|   return m_params->redc(m_v, ws);
  327|    741|}
_ZNK5Botan14Montgomery_IntmlERKS0_:
  363|  10.3k|Montgomery_Int Montgomery_Int::operator*(const Montgomery_Int& other) const {
  364|  10.3k|   secure_vector<word> ws;
  365|  10.3k|   return Montgomery_Int(m_params, m_params->mul(m_v, other.m_v, ws), false);
  366|  10.3k|}
_ZN5Botan14Montgomery_Int6mul_byERKS0_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  372|  7.41k|Montgomery_Int& Montgomery_Int::mul_by(const Montgomery_Int& other, secure_vector<word>& ws) {
  373|  7.41k|   m_params->mul_by(m_v, other.m_v, ws);
  374|  7.41k|   return (*this);
  375|  7.41k|}
_ZN5Botan14Montgomery_Int19square_this_n_timesERNSt3__16vectorImNS_16secure_allocatorImEEEEm:
  392|  46.6k|Montgomery_Int& Montgomery_Int::square_this_n_times(secure_vector<word>& ws, size_t n) {
  393|   233k|   for(size_t i = 0; i != n; ++i) {
  ------------------
  |  Branch (393:22): [True: 186k, False: 46.6k]
  ------------------
  394|   186k|      m_params->square_this(m_v, ws);
  395|   186k|   }
  396|  46.6k|   return (*this);
  397|  46.6k|}

_ZN5Botan30Montgomery_Exponentation_StateC2ERKNSt3__110shared_ptrIKNS_17Montgomery_ParamsEEERKNS_6BigIntEmb:
   40|    741|      m_params(params), m_window_bits(window_bits == 0 ? 4 : window_bits) {
   41|    741|   BOTAN_ARG_CHECK(g < m_params->p(), "Montgomery base too big");
  ------------------
  |  |   30|    741|   do {                                                          \
  |  |   31|    741|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 741]
  |  |  ------------------
  |  |   32|    741|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|    741|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   42|       |
   43|    741|   if(m_window_bits < 1 || m_window_bits > 12) {  // really even 8 is too large ...
  ------------------
  |  Branch (43:7): [True: 0, False: 741]
  |  Branch (43:28): [True: 0, False: 741]
  ------------------
   44|      0|      throw Invalid_Argument("Invalid window bits for Montgomery exponentiation");
   45|      0|   }
   46|       |
   47|    741|   const size_t window_size = (static_cast<size_t>(1) << m_window_bits);
   48|       |
   49|    741|   m_g.reserve(window_size);
   50|       |
   51|    741|   m_g.push_back(Montgomery_Int(m_params, m_params->R1(), false));
   52|       |
   53|    741|   m_g.push_back(Montgomery_Int(m_params, g));
   54|       |
   55|  11.1k|   for(size_t i = 2; i != window_size; ++i) {
  ------------------
  |  Branch (55:22): [True: 10.3k, False: 741]
  ------------------
   56|  10.3k|      m_g.push_back(m_g[1] * m_g[i - 1]);
   57|  10.3k|   }
   58|       |
   59|       |   // Resize each element to exactly p words
   60|  12.5k|   for(size_t i = 0; i != window_size; ++i) {
  ------------------
  |  Branch (60:22): [True: 11.8k, False: 741]
  ------------------
   61|  11.8k|      m_g[i].fix_size();
   62|  11.8k|      if(const_time) {
  ------------------
  |  Branch (62:10): [True: 0, False: 11.8k]
  ------------------
   63|      0|         m_g[i].const_time_poison();
   64|      0|      }
   65|  11.8k|   }
   66|    741|}
_ZNK5Botan30Montgomery_Exponentation_State22exponentiation_vartimeERKNS_6BigIntE:
  121|    741|BigInt Montgomery_Exponentation_State::exponentiation_vartime(const BigInt& scalar) const {
  122|    741|   const size_t exp_nibbles = (scalar.bits() + m_window_bits - 1) / m_window_bits;
  123|       |
  124|    741|   secure_vector<word> ws;
  125|       |
  126|    741|   if(exp_nibbles == 0) {
  ------------------
  |  Branch (126:7): [True: 0, False: 741]
  ------------------
  127|      0|      return BigInt::one();
  128|      0|   }
  129|       |
  130|    741|   Montgomery_Int x = m_g[scalar.get_substring(m_window_bits * (exp_nibbles - 1), m_window_bits)];
  131|       |
  132|  47.4k|   for(size_t i = exp_nibbles - 1; i > 0; --i) {
  ------------------
  |  Branch (132:36): [True: 46.6k, False: 741]
  ------------------
  133|  46.6k|      x.square_this_n_times(ws, m_window_bits);
  134|       |
  135|  46.6k|      const uint32_t nibble = scalar.get_substring(m_window_bits * (i - 1), m_window_bits);
  136|  46.6k|      if(nibble > 0) {
  ------------------
  |  Branch (136:10): [True: 7.41k, False: 39.2k]
  ------------------
  137|  7.41k|         x.mul_by(m_g[nibble], ws);
  138|  7.41k|      }
  139|  46.6k|   }
  140|       |
  141|    741|   x.const_time_unpoison();
  142|    741|   return x.value();
  143|    741|}
_ZN5Botan16monty_precomputeERKNSt3__110shared_ptrIKNS_17Montgomery_ParamsEEERKNS_6BigIntEmb:
  146|    741|   const std::shared_ptr<const Montgomery_Params>& params, const BigInt& g, size_t window_bits, bool const_time) {
  147|    741|   return std::make_shared<const Montgomery_Exponentation_State>(params, g, window_bits, const_time);
  148|    741|}
_ZN5Botan21monty_execute_vartimeERKNS_30Montgomery_Exponentation_StateERKNS_6BigIntE:
  154|    741|BigInt monty_execute_vartime(const Montgomery_Exponentation_State& precomputed_state, const BigInt& k) {
  155|    741|   return precomputed_state.exponentiation_vartime(k);
  156|    741|}

_ZN5Botan10prime_p192Ev:
  122|      1|const BigInt& prime_p192() {
  123|      1|   static const BigInt p192("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF");
  124|      1|   return p192;
  125|      1|}
_ZN5Botan10prime_p224Ev:
  217|      1|const BigInt& prime_p224() {
  218|      1|   static const BigInt p224("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001");
  219|      1|   return p224;
  220|      1|}
_ZN5Botan10prime_p256Ev:
  319|  2.91M|const BigInt& prime_p256() {
  320|  2.91M|   static const BigInt p256("0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF");
  321|  2.91M|   return p256;
  322|  2.91M|}
_ZN5Botan9redc_p256ERNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  324|  40.3M|void redc_p256(BigInt& x, secure_vector<word>& ws) {
  325|  40.3M|   BOTAN_DEBUG_ASSERT(x.is_positive());
  ------------------
  |  |   99|  40.3M|      do {                          \
  |  |  100|  40.3M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  326|       |
  327|  40.3M|   static const size_t p256_limbs = (BOTAN_MP_WORD_BITS == 32) ? 8 : 4;
  ------------------
  |  |   50|  40.3M|#define BOTAN_MP_WORD_BITS 64
  ------------------
  |  Branch (327:37): [Folded - Ignored]
  ------------------
  328|       |
  329|  40.3M|   BOTAN_UNUSED(ws);
  ------------------
  |  |  118|  40.3M|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  330|       |
  331|  40.3M|   x.grow_to(2 * p256_limbs);
  332|  40.3M|   word* xw = x.mutable_data();
  333|       |
  334|  40.3M|   const int64_t X00 = get_uint32(xw, 0);
  335|  40.3M|   const int64_t X01 = get_uint32(xw, 1);
  336|  40.3M|   const int64_t X02 = get_uint32(xw, 2);
  337|  40.3M|   const int64_t X03 = get_uint32(xw, 3);
  338|  40.3M|   const int64_t X04 = get_uint32(xw, 4);
  339|  40.3M|   const int64_t X05 = get_uint32(xw, 5);
  340|  40.3M|   const int64_t X06 = get_uint32(xw, 6);
  341|  40.3M|   const int64_t X07 = get_uint32(xw, 7);
  342|  40.3M|   const int64_t X08 = get_uint32(xw, 8);
  343|  40.3M|   const int64_t X09 = get_uint32(xw, 9);
  344|  40.3M|   const int64_t X10 = get_uint32(xw, 10);
  345|  40.3M|   const int64_t X11 = get_uint32(xw, 11);
  346|  40.3M|   const int64_t X12 = get_uint32(xw, 12);
  347|  40.3M|   const int64_t X13 = get_uint32(xw, 13);
  348|  40.3M|   const int64_t X14 = get_uint32(xw, 14);
  349|  40.3M|   const int64_t X15 = get_uint32(xw, 15);
  350|       |
  351|       |   // Adds 6 * P-256 to prevent underflow
  352|  40.3M|   const int64_t S0 = 0xFFFFFFFA + X00 + X08 + X09 - (X11 + X12 + X13) - X14;
  353|  40.3M|   const int64_t S1 = 0xFFFFFFFF + X01 + X09 + X10 - X12 - (X13 + X14 + X15);
  354|  40.3M|   const int64_t S2 = 0xFFFFFFFF + X02 + X10 + X11 - (X13 + X14 + X15);
  355|  40.3M|   const int64_t S3 = 0x00000005 + X03 + (X11 + X12) * 2 + X13 - X15 - X08 - X09;
  356|  40.3M|   const int64_t S4 = 0x00000000 + X04 + (X12 + X13) * 2 + X14 - X09 - X10;
  357|  40.3M|   const int64_t S5 = 0x00000000 + X05 + (X13 + X14) * 2 + X15 - X10 - X11;
  358|  40.3M|   const int64_t S6 = 0x00000006 + X06 + X13 + X14 * 3 + X15 * 2 - X08 - X09;
  359|  40.3M|   const int64_t S7 = 0xFFFFFFFA + X07 + X15 * 3 + X08 - X10 - (X11 + X12 + X13);
  360|       |
  361|  40.3M|   int64_t S = 0;
  362|       |
  363|  40.3M|   uint32_t R0 = 0, R1 = 0;
  364|       |
  365|  40.3M|   S += S0;
  366|  40.3M|   R0 = static_cast<uint32_t>(S);
  367|  40.3M|   S >>= 32;
  368|       |
  369|  40.3M|   S += S1;
  370|  40.3M|   R1 = static_cast<uint32_t>(S);
  371|  40.3M|   S >>= 32;
  372|       |
  373|  40.3M|   set_words(xw, 0, R0, R1);
  374|       |
  375|  40.3M|   S += S2;
  376|  40.3M|   R0 = static_cast<uint32_t>(S);
  377|  40.3M|   S >>= 32;
  378|       |
  379|  40.3M|   S += S3;
  380|  40.3M|   R1 = static_cast<uint32_t>(S);
  381|  40.3M|   S >>= 32;
  382|       |
  383|  40.3M|   set_words(xw, 2, R0, R1);
  384|       |
  385|  40.3M|   S += S4;
  386|  40.3M|   R0 = static_cast<uint32_t>(S);
  387|  40.3M|   S >>= 32;
  388|       |
  389|  40.3M|   S += S5;
  390|  40.3M|   R1 = static_cast<uint32_t>(S);
  391|  40.3M|   S >>= 32;
  392|       |
  393|  40.3M|   set_words(xw, 4, R0, R1);
  394|       |
  395|  40.3M|   S += S6;
  396|  40.3M|   R0 = static_cast<uint32_t>(S);
  397|  40.3M|   S >>= 32;
  398|       |
  399|  40.3M|   S += S7;
  400|  40.3M|   R1 = static_cast<uint32_t>(S);
  401|  40.3M|   S >>= 32;
  402|  40.3M|   set_words(xw, 6, R0, R1);
  403|       |
  404|  40.3M|   S += 5;  // the top digits of 6*P-256
  405|       |
  406|       |   /*
  407|       |   This is a table of (i*P-256) % 2**256 for i in 1...10
  408|       |   */
  409|  40.3M|   static const word p256_mults[11][p256_limbs] = {
  410|  40.3M|#if(BOTAN_MP_WORD_BITS == 64)
  411|  40.3M|      {0xFFFFFFFFFFFFFFFF, 0x00000000FFFFFFFF, 0x0000000000000000, 0xFFFFFFFF00000001},
  412|  40.3M|      {0xFFFFFFFFFFFFFFFE, 0x00000001FFFFFFFF, 0x0000000000000000, 0xFFFFFFFE00000002},
  413|  40.3M|      {0xFFFFFFFFFFFFFFFD, 0x00000002FFFFFFFF, 0x0000000000000000, 0xFFFFFFFD00000003},
  414|  40.3M|      {0xFFFFFFFFFFFFFFFC, 0x00000003FFFFFFFF, 0x0000000000000000, 0xFFFFFFFC00000004},
  415|  40.3M|      {0xFFFFFFFFFFFFFFFB, 0x00000004FFFFFFFF, 0x0000000000000000, 0xFFFFFFFB00000005},
  416|  40.3M|      {0xFFFFFFFFFFFFFFFA, 0x00000005FFFFFFFF, 0x0000000000000000, 0xFFFFFFFA00000006},
  417|  40.3M|      {0xFFFFFFFFFFFFFFF9, 0x00000006FFFFFFFF, 0x0000000000000000, 0xFFFFFFF900000007},
  418|  40.3M|      {0xFFFFFFFFFFFFFFF8, 0x00000007FFFFFFFF, 0x0000000000000000, 0xFFFFFFF800000008},
  419|  40.3M|      {0xFFFFFFFFFFFFFFF7, 0x00000008FFFFFFFF, 0x0000000000000000, 0xFFFFFFF700000009},
  420|  40.3M|      {0xFFFFFFFFFFFFFFF6, 0x00000009FFFFFFFF, 0x0000000000000000, 0xFFFFFFF60000000A},
  421|  40.3M|      {0xFFFFFFFFFFFFFFF5, 0x0000000AFFFFFFFF, 0x0000000000000000, 0xFFFFFFF50000000B},
  422|       |#else
  423|       |      {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0xFFFFFFFF},
  424|       |      {0xFFFFFFFE, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000001, 0x00000000, 0x00000000, 0x00000002, 0xFFFFFFFE},
  425|       |      {0xFFFFFFFD, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000002, 0x00000000, 0x00000000, 0x00000003, 0xFFFFFFFD},
  426|       |      {0xFFFFFFFC, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000003, 0x00000000, 0x00000000, 0x00000004, 0xFFFFFFFC},
  427|       |      {0xFFFFFFFB, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000004, 0x00000000, 0x00000000, 0x00000005, 0xFFFFFFFB},
  428|       |      {0xFFFFFFFA, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000005, 0x00000000, 0x00000000, 0x00000006, 0xFFFFFFFA},
  429|       |      {0xFFFFFFF9, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000006, 0x00000000, 0x00000000, 0x00000007, 0xFFFFFFF9},
  430|       |      {0xFFFFFFF8, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000007, 0x00000000, 0x00000000, 0x00000008, 0xFFFFFFF8},
  431|       |      {0xFFFFFFF7, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000008, 0x00000000, 0x00000000, 0x00000009, 0xFFFFFFF7},
  432|       |      {0xFFFFFFF6, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000009, 0x00000000, 0x00000000, 0x0000000A, 0xFFFFFFF6},
  433|       |      {0xFFFFFFF5, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000000A, 0x00000000, 0x00000000, 0x0000000B, 0xFFFFFFF5},
  434|       |#endif
  435|  40.3M|   };
  436|       |
  437|  40.3M|   CT::unpoison(S);
  438|  40.3M|   BOTAN_ASSERT(S >= 0 && S <= 10, "Expected overflow");
  ------------------
  |  |   51|  40.3M|   do {                                                                                 \
  |  |   52|  80.6M|      if(!(expr))                                                                       \
  |  |  ------------------
  |  |  |  Branch (52:12): [True: 40.3M, False: 0]
  |  |  |  Branch (52:12): [True: 40.3M, False: 0]
  |  |  ------------------
  |  |   53|  40.3M|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   54|  40.3M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (54:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  439|       |
  440|  40.3M|   BOTAN_ASSERT_NOMSG(x.size() >= p256_limbs + 1);
  ------------------
  |  |   60|  40.3M|   do {                                                                     \
  |  |   61|  40.3M|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 40.3M]
  |  |  ------------------
  |  |   62|  40.3M|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|  40.3M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  441|  40.3M|   x.mask_bits(256);
  442|  40.3M|   word borrow = bigint_sub2(x.mutable_data(), p256_limbs + 1, p256_mults[S], p256_limbs);
  443|  40.3M|   BOTAN_DEBUG_ASSERT(borrow == 0 || borrow == 1);
  ------------------
  |  |   99|  40.3M|      do {                          \
  |  |  100|  40.3M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  444|  40.3M|   bigint_cnd_add(borrow, x.mutable_data(), p256_limbs + 1, p256_mults[0], p256_limbs);
  445|  40.3M|}
nistp_redc.cpp:_ZN5Botan12_GLOBAL__N_110get_uint32EPKmm:
  103|   644M|inline uint32_t get_uint32(const word xw[], size_t i) {
  104|       |#if(BOTAN_MP_WORD_BITS == 32)
  105|       |   return xw[i];
  106|       |#else
  107|   644M|   return static_cast<uint32_t>(xw[i / 2] >> ((i % 2) * 32));
  108|   644M|#endif
  109|   644M|}
nistp_redc.cpp:_ZN5Botan12_GLOBAL__N_19set_wordsEPmmjj:
  111|   161M|inline void set_words(word x[], size_t i, uint32_t R0, uint32_t R1) {
  112|       |#if(BOTAN_MP_WORD_BITS == 32)
  113|       |   x[i] = R0;
  114|       |   x[i + 1] = R1;
  115|       |#else
  116|   161M|   x[i / 2] = (static_cast<uint64_t>(R1) << 32) | R0;
  117|   161M|#endif
  118|   161M|}

_ZN5Botan17sqrt_modulo_primeERKNS_6BigIntES2_:
   26|  1.24k|BigInt sqrt_modulo_prime(const BigInt& a, const BigInt& p) {
   27|  1.24k|   BOTAN_ARG_CHECK(p > 1, "invalid prime");
  ------------------
  |  |   30|  1.24k|   do {                                                          \
  |  |   31|  1.24k|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 1.24k]
  |  |  ------------------
  |  |   32|  1.24k|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|  1.24k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   28|  1.24k|   BOTAN_ARG_CHECK(a < p, "value to solve for must be less than p");
  ------------------
  |  |   30|  1.24k|   do {                                                          \
  |  |   31|  1.24k|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 1.24k]
  |  |  ------------------
  |  |   32|  1.24k|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|  1.24k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   29|  1.24k|   BOTAN_ARG_CHECK(a >= 0, "value to solve for must not be negative");
  ------------------
  |  |   30|  1.24k|   do {                                                          \
  |  |   31|  1.24k|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 1.24k]
  |  |  ------------------
  |  |   32|  1.24k|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|  1.24k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   30|       |
   31|       |   // some very easy cases
   32|  1.24k|   if(p == 2 || a <= 1) {
  ------------------
  |  Branch (32:7): [True: 0, False: 1.24k]
  |  Branch (32:17): [True: 0, False: 1.24k]
  ------------------
   33|      0|      return a;
   34|      0|   }
   35|       |
   36|  1.24k|   BOTAN_ARG_CHECK(p.is_odd(), "invalid prime");
  ------------------
  |  |   30|  1.24k|   do {                                                          \
  |  |   31|  1.24k|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 1.24k]
  |  |  ------------------
  |  |   32|  1.24k|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|  1.24k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   37|       |
   38|  1.24k|   if(jacobi(a, p) != 1) {  // not a quadratic residue
  ------------------
  |  Branch (38:7): [True: 505, False: 741]
  ------------------
   39|    505|      return BigInt::from_s32(-1);
   40|    505|   }
   41|       |
   42|    741|   Modular_Reducer mod_p(p);
   43|    741|   auto monty_p = std::make_shared<Montgomery_Params>(p, mod_p);
   44|       |
   45|       |   // If p == 3 (mod 4) there is a simple solution
   46|    741|   if(p % 4 == 3) {
  ------------------
  |  Branch (46:7): [True: 741, False: 0]
  ------------------
   47|    741|      return monty_exp_vartime(monty_p, a, ((p + 1) >> 2));
   48|    741|   }
   49|       |
   50|       |   // Otherwise we have to use Shanks-Tonelli
   51|      0|   size_t s = low_zero_bits(p - 1);
   52|      0|   BigInt q = p >> s;
   53|       |
   54|      0|   q -= 1;
   55|      0|   q >>= 1;
   56|       |
   57|      0|   BigInt r = monty_exp_vartime(monty_p, a, q);
   58|      0|   BigInt n = mod_p.multiply(a, mod_p.square(r));
   59|      0|   r = mod_p.multiply(r, a);
   60|       |
   61|      0|   if(n == 1) {
  ------------------
  |  Branch (61:7): [True: 0, False: 0]
  ------------------
   62|      0|      return r;
   63|      0|   }
   64|       |
   65|       |   // find random quadratic nonresidue z
   66|      0|   word z = 2;
   67|      0|   for(;;) {
   68|      0|      if(jacobi(BigInt::from_word(z), p) == -1) {  // found one
  ------------------
  |  Branch (68:10): [True: 0, False: 0]
  ------------------
   69|      0|         break;
   70|      0|      }
   71|       |
   72|      0|      z += 1;  // try next z
   73|       |
   74|       |      /*
   75|       |      * The expected number of tests to find a non-residue modulo a
   76|       |      * prime is 2. If we have not found one after 256 then almost
   77|       |      * certainly we have been given a non-prime p.
   78|       |      */
   79|      0|      if(z >= 256) {
  ------------------
  |  Branch (79:10): [True: 0, False: 0]
  ------------------
   80|      0|         return BigInt::from_s32(-1);
   81|      0|      }
   82|      0|   }
   83|       |
   84|      0|   BigInt c = monty_exp_vartime(monty_p, BigInt::from_word(z), (q << 1) + 1);
   85|       |
   86|      0|   while(n > 1) {
  ------------------
  |  Branch (86:10): [True: 0, False: 0]
  ------------------
   87|      0|      q = n;
   88|       |
   89|      0|      size_t i = 0;
   90|      0|      while(q != 1) {
  ------------------
  |  Branch (90:13): [True: 0, False: 0]
  ------------------
   91|      0|         q = mod_p.square(q);
   92|      0|         ++i;
   93|       |
   94|      0|         if(i >= s) {
  ------------------
  |  Branch (94:13): [True: 0, False: 0]
  ------------------
   95|      0|            return BigInt::from_s32(-1);
   96|      0|         }
   97|      0|      }
   98|       |
   99|      0|      BOTAN_ASSERT_NOMSG(s >= (i + 1));  // No underflow!
  ------------------
  |  |   60|      0|   do {                                                                     \
  |  |   61|      0|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   62|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  100|      0|      c = monty_exp_vartime(monty_p, c, BigInt::power_of_2(s - i - 1));
  101|      0|      r = mod_p.multiply(r, c);
  102|      0|      c = mod_p.square(c);
  103|      0|      n = mod_p.multiply(n, c);
  104|       |
  105|       |      // s decreases as the algorithm proceeds
  106|      0|      BOTAN_ASSERT_NOMSG(s >= i);
  ------------------
  |  |   60|      0|   do {                                                                     \
  |  |   61|      0|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   62|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  107|      0|      s = i;
  108|      0|   }
  109|       |
  110|      0|   return r;
  111|      0|}
_ZN5Botan6jacobiERKNS_6BigIntES2_:
  116|  1.24k|int32_t jacobi(const BigInt& a, const BigInt& n) {
  117|  1.24k|   if(n.is_even() || n < 2) {
  ------------------
  |  Branch (117:7): [True: 0, False: 1.24k]
  |  Branch (117:22): [True: 0, False: 1.24k]
  ------------------
  118|      0|      throw Invalid_Argument("jacobi: second argument must be odd and > 1");
  119|      0|   }
  120|       |
  121|  1.24k|   BigInt x = a % n;
  122|  1.24k|   BigInt y = n;
  123|  1.24k|   int32_t J = 1;
  124|       |
  125|  95.3k|   while(y > 1) {
  ------------------
  |  Branch (125:10): [True: 94.0k, False: 1.24k]
  ------------------
  126|  94.0k|      x %= y;
  127|  94.0k|      if(x > y / 2) {
  ------------------
  |  Branch (127:10): [True: 43.0k, False: 51.0k]
  ------------------
  128|  43.0k|         x = y - x;
  129|  43.0k|         if(y % 4 == 3) {
  ------------------
  |  Branch (129:13): [True: 22.3k, False: 20.7k]
  ------------------
  130|  22.3k|            J = -J;
  131|  22.3k|         }
  132|  43.0k|      }
  133|  94.0k|      if(x.is_zero()) {
  ------------------
  |  Branch (133:10): [True: 0, False: 94.0k]
  ------------------
  134|      0|         return 0;
  135|      0|      }
  136|       |
  137|  94.0k|      size_t shifts = low_zero_bits(x);
  138|  94.0k|      x >>= shifts;
  139|  94.0k|      if(shifts % 2) {
  ------------------
  |  Branch (139:10): [True: 30.0k, False: 64.0k]
  ------------------
  140|  30.0k|         word y_mod_8 = y % 8;
  141|  30.0k|         if(y_mod_8 == 3 || y_mod_8 == 5) {
  ------------------
  |  Branch (141:13): [True: 8.49k, False: 21.5k]
  |  Branch (141:29): [True: 7.57k, False: 13.9k]
  ------------------
  142|  16.0k|            J = -J;
  143|  16.0k|         }
  144|  30.0k|      }
  145|       |
  146|  94.0k|      if(x % 4 == 3 && y % 4 == 3) {
  ------------------
  |  Branch (146:10): [True: 47.0k, False: 47.0k]
  |  Branch (146:24): [True: 24.1k, False: 22.8k]
  ------------------
  147|  24.1k|         J = -J;
  148|  24.1k|      }
  149|  94.0k|      std::swap(x, y);
  150|  94.0k|   }
  151|  1.24k|   return J;
  152|  1.24k|}
_ZN5Botan6squareERKNS_6BigIntE:
  157|    741|BigInt square(const BigInt& x) {
  158|    741|   BigInt z = x;
  159|    741|   secure_vector<word> ws;
  160|    741|   z.square(ws);
  161|    741|   return z;
  162|    741|}
_ZN5Botan13low_zero_bitsERKNS_6BigIntE:
  167|  94.0k|size_t low_zero_bits(const BigInt& n) {
  168|  94.0k|   size_t low_zero = 0;
  169|       |
  170|  94.0k|   auto seen_nonempty_word = CT::Mask<word>::cleared();
  171|       |
  172|   891k|   for(size_t i = 0; i != n.size(); ++i) {
  ------------------
  |  Branch (172:22): [True: 796k, False: 94.0k]
  ------------------
  173|   796k|      const word x = n.word_at(i);
  174|       |
  175|       |      // ctz(0) will return sizeof(word)
  176|   796k|      const size_t tz_x = ctz(x);
  177|       |
  178|       |      // if x > 0 we want to count tz_x in total but not any
  179|       |      // further words, so set the mask after the addition
  180|   796k|      low_zero += seen_nonempty_word.if_not_set_return(tz_x);
  181|       |
  182|   796k|      seen_nonempty_word |= CT::Mask<word>::expand(x);
  183|   796k|   }
  184|       |
  185|       |   // if we saw no words with x > 0 then n == 0 and the value we have
  186|       |   // computed is meaningless. Instead return BigInt::zero() in that case.
  187|  94.0k|   return static_cast<size_t>(seen_nonempty_word.if_set_return(low_zero));
  188|  94.0k|}

_ZN5Botan15Modular_ReducerC2ERKNS_6BigIntE:
   19|    742|Modular_Reducer::Modular_Reducer(const BigInt& mod) {
   20|    742|   if(mod < 0) {
  ------------------
  |  Branch (20:7): [True: 0, False: 742]
  ------------------
   21|      0|      throw Invalid_Argument("Modular_Reducer: modulus must be positive");
   22|      0|   }
   23|       |
   24|       |   // Left uninitialized if mod == 0
   25|    742|   m_mod_words = 0;
   26|       |
   27|    742|   if(mod > 0) {
  ------------------
  |  Branch (27:7): [True: 742, False: 0]
  ------------------
   28|    742|      m_modulus = mod;
   29|    742|      m_mod_words = m_modulus.sig_words();
   30|       |
   31|       |      // Compute mu = floor(2^{2k} / m)
   32|    742|      m_mu.set_bit(2 * BOTAN_MP_WORD_BITS * m_mod_words);
  ------------------
  |  |   50|    742|#define BOTAN_MP_WORD_BITS 64
  ------------------
   33|    742|      m_mu = ct_divide(m_mu, m_modulus);
   34|    742|   }
   35|    742|}
_ZNK5Botan15Modular_Reducer6reduceERKNS_6BigIntE:
   37|  5.96k|BigInt Modular_Reducer::reduce(const BigInt& x) const {
   38|  5.96k|   BigInt r;
   39|  5.96k|   secure_vector<word> ws;
   40|  5.96k|   reduce(r, x, ws);
   41|  5.96k|   return r;
   42|  5.96k|}
_ZNK5Botan15Modular_Reducer6reduceERNS_6BigIntERKS1_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
   69|  5.96k|void Modular_Reducer::reduce(BigInt& t1, const BigInt& x, secure_vector<word>& ws) const {
   70|  5.96k|   if(&t1 == &x) {
  ------------------
  |  Branch (70:7): [True: 0, False: 5.96k]
  ------------------
   71|      0|      throw Invalid_State("Modular_Reducer arguments cannot alias");
   72|      0|   }
   73|  5.96k|   if(m_mod_words == 0) {
  ------------------
  |  Branch (73:7): [True: 0, False: 5.96k]
  ------------------
   74|      0|      throw Invalid_State("Modular_Reducer: Never initalized");
   75|      0|   }
   76|       |
   77|  5.96k|   const size_t x_sw = x.sig_words();
   78|       |
   79|  5.96k|   if(x_sw > 2 * m_mod_words) {
  ------------------
  |  Branch (79:7): [True: 0, False: 5.96k]
  ------------------
   80|       |      // too big, fall back to slow boat division
   81|      0|      t1 = ct_modulo(x, m_modulus);
   82|      0|      return;
   83|      0|   }
   84|       |
   85|  5.96k|   t1 = x;
   86|  5.96k|   t1.set_sign(BigInt::Positive);
   87|  5.96k|   t1 >>= (BOTAN_MP_WORD_BITS * (m_mod_words - 1));
  ------------------
  |  |   50|  5.96k|#define BOTAN_MP_WORD_BITS 64
  ------------------
   88|       |
   89|  5.96k|   t1.mul(m_mu, ws);
   90|  5.96k|   t1 >>= (BOTAN_MP_WORD_BITS * (m_mod_words + 1));
  ------------------
  |  |   50|  5.96k|#define BOTAN_MP_WORD_BITS 64
  ------------------
   91|       |
   92|       |   // TODO add masked mul to avoid computing high bits
   93|  5.96k|   t1.mul(m_modulus, ws);
   94|  5.96k|   t1.mask_bits(BOTAN_MP_WORD_BITS * (m_mod_words + 1));
  ------------------
  |  |   50|  5.96k|#define BOTAN_MP_WORD_BITS 64
  ------------------
   95|       |
   96|  5.96k|   t1.rev_sub(x.data(), std::min(x_sw, m_mod_words + 1), ws);
   97|       |
   98|       |   /*
   99|       |   * If t1 < 0 then we must add b^(k+1) where b = 2^w. To avoid a
  100|       |   * side channel perform the addition unconditionally, with ws set
  101|       |   * to either b^(k+1) or else 0.
  102|       |   */
  103|  5.96k|   const word t1_neg = t1.is_negative();
  104|       |
  105|  5.96k|   if(ws.size() < m_mod_words + 2) {
  ------------------
  |  Branch (105:7): [True: 107, False: 5.85k]
  ------------------
  106|    107|      ws.resize(m_mod_words + 2);
  107|    107|   }
  108|  5.96k|   clear_mem(ws.data(), ws.size());
  109|  5.96k|   ws[m_mod_words + 1] = t1_neg;
  110|       |
  111|  5.96k|   t1.add(ws.data(), m_mod_words + 2, BigInt::Positive);
  112|       |
  113|       |   // Per HAC this step requires at most 2 subtractions
  114|  5.96k|   t1.ct_reduce_below(m_modulus, ws, 2);
  115|       |
  116|  5.96k|   cnd_rev_sub(t1.is_nonzero() && x.is_negative(), t1, m_modulus.data(), m_modulus.size(), ws);
  ------------------
  |  Branch (116:16): [True: 5.81k, False: 151]
  |  Branch (116:35): [True: 0, False: 5.81k]
  ------------------
  117|  5.96k|}
reducer.cpp:_ZN5Botan12_GLOBAL__N_111cnd_rev_subEbRNS_6BigIntEPKmmRNSt3__16vectorImNS_16secure_allocatorImEEEE:
   49|  5.96k|void cnd_rev_sub(bool cnd, BigInt& x, const word y[], size_t y_sw, secure_vector<word>& ws) {
   50|  5.96k|   if(x.sign() != BigInt::Positive) {
  ------------------
  |  Branch (50:7): [True: 0, False: 5.96k]
  ------------------
   51|      0|      throw Invalid_State("BigInt::sub_rev requires this is positive");
   52|      0|   }
   53|       |
   54|  5.96k|   const size_t x_sw = x.sig_words();
   55|       |
   56|  5.96k|   const size_t max_words = std::max(x_sw, y_sw);
   57|  5.96k|   ws.resize(std::max(x_sw, y_sw));
   58|  5.96k|   clear_mem(ws.data(), ws.size());
   59|  5.96k|   x.grow_to(max_words);
   60|       |
   61|  5.96k|   const int32_t relative_size = bigint_sub_abs(ws.data(), x.data(), x_sw, y, y_sw);
   62|       |
   63|  5.96k|   x.cond_flip_sign((relative_size > 0) && cnd);
  ------------------
  |  Branch (63:21): [True: 0, False: 5.96k]
  |  Branch (63:44): [True: 0, False: 0]
  ------------------
   64|  5.96k|   bigint_cnd_swap(cnd, x.mutable_data(), ws.data(), max_words);
   65|  5.96k|}

_ZN5Botan8CurveGFp11choose_reprERKNS_6BigIntES3_S3_:
  564|      1|std::shared_ptr<CurveGFp_Repr> CurveGFp::choose_repr(const BigInt& p, const BigInt& a, const BigInt& b) {
  565|      1|   if(p == prime_p192()) {
  ------------------
  |  Branch (565:7): [True: 0, False: 1]
  ------------------
  566|      0|      return std::make_shared<CurveGFp_P192>(a, b);
  567|      0|   }
  568|      1|   if(p == prime_p224()) {
  ------------------
  |  Branch (568:7): [True: 0, False: 1]
  ------------------
  569|      0|      return std::make_shared<CurveGFp_P224>(a, b);
  570|      0|   }
  571|      1|   if(p == prime_p256()) {
  ------------------
  |  Branch (571:7): [True: 1, False: 0]
  ------------------
  572|      1|      return std::make_shared<CurveGFp_P256>(a, b);
  573|      1|   }
  574|      0|   if(p == prime_p384()) {
  ------------------
  |  Branch (574:7): [True: 0, False: 0]
  ------------------
  575|      0|      return std::make_shared<CurveGFp_P384>(a, b);
  576|      0|   }
  577|      0|   if(p == prime_p521()) {
  ------------------
  |  Branch (577:7): [True: 0, False: 0]
  ------------------
  578|      0|      return std::make_shared<CurveGFp_P521>(a, b);
  579|      0|   }
  580|       |
  581|      0|   return std::make_shared<CurveGFp_Montgomery>(p, a, b);
  582|      0|}
curve_gfp.cpp:_ZN5Botan12_GLOBAL__N_113CurveGFp_NISTC2EmRKNS_6BigIntES4_:
  157|      1|            m_1(1), m_a(a), m_b(b), m_p_words((p_bits + BOTAN_MP_WORD_BITS - 1) / BOTAN_MP_WORD_BITS) {
  158|       |         // All Solinas prime curves are assumed a == -3
  159|      1|      }
curve_gfp.cpp:_ZNK5Botan12_GLOBAL__N_113CurveGFp_NIST5get_aEv:
  165|  1.24k|      const BigInt& get_a() const override { return m_a; }
curve_gfp.cpp:_ZNK5Botan12_GLOBAL__N_113CurveGFp_NIST5get_bEv:
  167|  1.24k|      const BigInt& get_b() const override { return m_b; }
curve_gfp.cpp:_ZNK5Botan12_GLOBAL__N_113CurveGFp_NIST11get_p_wordsEv:
  171|   197k|      size_t get_p_words() const override { return m_p_words; }
curve_gfp.cpp:_ZNK5Botan12_GLOBAL__N_113CurveGFp_NIST11get_ws_sizeEv:
  173|  43.2M|      size_t get_ws_size() const override { return 2 * m_p_words; }
curve_gfp.cpp:_ZNK5Botan12_GLOBAL__N_113CurveGFp_NIST6is_oneERKNS_6BigIntE:
  179|  39.7k|      bool is_one(const BigInt& x) const override { return x == 1; }
curve_gfp.cpp:_ZNK5Botan12_GLOBAL__N_113CurveGFp_NIST9a_is_zeroEv:
  161|  1.88M|      bool a_is_zero() const override { return false; }
curve_gfp.cpp:_ZNK5Botan12_GLOBAL__N_113CurveGFp_NIST12a_is_minus_3Ev:
  163|  1.88M|      bool a_is_minus_3() const override { return true; }
curve_gfp.cpp:_ZNK5Botan12_GLOBAL__N_113CurveGFp_NIST9get_1_repEv:
  169|  21.9k|      const BigInt& get_1_rep() const override { return m_1; }
curve_gfp.cpp:_ZNK5Botan12_GLOBAL__N_113CurveGFp_NIST12to_curve_repERNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  181|  1.47k|      void to_curve_rep(BigInt& x, secure_vector<word>& ws) const override { redc_mod_p(x, ws); }
curve_gfp.cpp:_ZNK5Botan12_GLOBAL__N_113CurveGFp_NIST14from_curve_repERNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  183|  39.7k|      void from_curve_rep(BigInt& x, secure_vector<word>& ws) const override { redc_mod_p(x, ws); }
curve_gfp.cpp:_ZNK5Botan12_GLOBAL__N_113CurveGFp_NIST15curve_mul_wordsERNS_6BigIntEPKmmRKS2_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  217|  18.8M|   BigInt& z, const word x_w[], size_t x_size, const BigInt& y, secure_vector<word>& ws) const {
  218|  18.8M|   BOTAN_DEBUG_ASSERT(y.sig_words() <= m_p_words);
  ------------------
  |  |   99|  18.8M|      do {                          \
  |  |  100|  18.8M|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  219|       |
  220|  18.8M|   if(ws.size() < get_ws_size()) {
  ------------------
  |  Branch (220:7): [True: 0, False: 18.8M]
  ------------------
  221|      0|      ws.resize(get_ws_size());
  222|      0|   }
  223|       |
  224|  18.8M|   const size_t output_size = 2 * m_p_words;
  225|  18.8M|   if(z.size() < output_size) {
  ------------------
  |  Branch (225:7): [True: 300k, False: 18.5M]
  ------------------
  226|   300k|      z.grow_to(output_size);
  227|   300k|   }
  228|       |
  229|  18.8M|   bigint_mul(z.mutable_data(),
  230|  18.8M|              z.size(),
  231|  18.8M|              x_w,
  232|  18.8M|              x_size,
  233|  18.8M|              std::min(m_p_words, x_size),
  234|  18.8M|              y.data(),
  235|  18.8M|              y.size(),
  236|  18.8M|              std::min(m_p_words, y.size()),
  237|  18.8M|              ws.data(),
  238|  18.8M|              ws.size());
  239|       |
  240|  18.8M|   this->redc_mod_p(z, ws);
  241|  18.8M|}
curve_gfp.cpp:_ZNK5Botan12_GLOBAL__N_113CurveGFp_NIST15curve_sqr_wordsERNS_6BigIntEPKmmRNSt3__16vectorImNS_16secure_allocatorImEEEE:
  243|  21.4M|void CurveGFp_NIST::curve_sqr_words(BigInt& z, const word x[], size_t x_size, secure_vector<word>& ws) const {
  244|  21.4M|   if(ws.size() < get_ws_size()) {
  ------------------
  |  Branch (244:7): [True: 39.7k, False: 21.3M]
  ------------------
  245|  39.7k|      ws.resize(get_ws_size());
  246|  39.7k|   }
  247|       |
  248|  21.4M|   const size_t output_size = 2 * m_p_words;
  249|  21.4M|   if(z.size() < output_size) {
  ------------------
  |  Branch (249:7): [True: 2.02M, False: 19.3M]
  ------------------
  250|  2.02M|      z.grow_to(output_size);
  251|  2.02M|   }
  252|       |
  253|  21.4M|   bigint_sqr(z.mutable_data(), output_size, x, x_size, std::min(m_p_words, x_size), ws.data(), ws.size());
  254|       |
  255|  21.4M|   this->redc_mod_p(z, ws);
  256|  21.4M|}
curve_gfp.cpp:_ZN5Botan12_GLOBAL__N_113CurveGFp_P256C2ERKNS_6BigIntES4_:
  289|      1|      CurveGFp_P256(const BigInt& a, const BigInt& b) : CurveGFp_NIST(256, a, b) {}
curve_gfp.cpp:_ZNK5Botan12_GLOBAL__N_113CurveGFp_P2565get_pEv:
  291|  2.91M|      const BigInt& get_p() const override { return prime_p256(); }
curve_gfp.cpp:_ZNK5Botan12_GLOBAL__N_113CurveGFp_P25614invert_elementERKNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  299|  39.7k|BigInt CurveGFp_P256::invert_element(const BigInt& x, secure_vector<word>& ws) const {
  300|  39.7k|   BigInt r, p2, p4, p8, p16, p32, tmp;
  301|       |
  302|  39.7k|   curve_sqr(r, x, ws);
  303|       |
  304|  39.7k|   curve_mul(p2, r, x, ws);
  305|  39.7k|   curve_sqr(r, p2, ws);
  306|  39.7k|   curve_sqr_tmp(r, tmp, ws);
  307|       |
  308|  39.7k|   curve_mul(p4, r, p2, ws);
  309|       |
  310|  39.7k|   curve_sqr(r, p4, ws);
  311|   158k|   for(size_t i = 0; i != 3; ++i) {
  ------------------
  |  Branch (311:22): [True: 119k, False: 39.7k]
  ------------------
  312|   119k|      curve_sqr_tmp(r, tmp, ws);
  313|   119k|   }
  314|  39.7k|   curve_mul(p8, r, p4, ws);
  315|       |
  316|  39.7k|   curve_sqr(r, p8, ws);
  317|   317k|   for(size_t i = 0; i != 7; ++i) {
  ------------------
  |  Branch (317:22): [True: 278k, False: 39.7k]
  ------------------
  318|   278k|      curve_sqr_tmp(r, tmp, ws);
  319|   278k|   }
  320|  39.7k|   curve_mul(p16, r, p8, ws);
  321|       |
  322|  39.7k|   curve_sqr(r, p16, ws);
  323|   635k|   for(size_t i = 0; i != 15; ++i) {
  ------------------
  |  Branch (323:22): [True: 595k, False: 39.7k]
  ------------------
  324|   595k|      curve_sqr_tmp(r, tmp, ws);
  325|   595k|   }
  326|  39.7k|   curve_mul(p32, r, p16, ws);
  327|       |
  328|  39.7k|   curve_sqr(r, p32, ws);
  329|  1.27M|   for(size_t i = 0; i != 31; ++i) {
  ------------------
  |  Branch (329:22): [True: 1.23M, False: 39.7k]
  ------------------
  330|  1.23M|      curve_sqr_tmp(r, tmp, ws);
  331|  1.23M|   }
  332|  39.7k|   curve_mul_tmp(r, x, tmp, ws);
  333|       |
  334|  5.12M|   for(size_t i = 0; i != 32 * 4; ++i) {
  ------------------
  |  Branch (334:22): [True: 5.08M, False: 39.7k]
  ------------------
  335|  5.08M|      curve_sqr_tmp(r, tmp, ws);
  336|  5.08M|   }
  337|  39.7k|   curve_mul_tmp(r, p32, tmp, ws);
  338|       |
  339|  1.31M|   for(size_t i = 0; i != 32; ++i) {
  ------------------
  |  Branch (339:22): [True: 1.27M, False: 39.7k]
  ------------------
  340|  1.27M|      curve_sqr_tmp(r, tmp, ws);
  341|  1.27M|   }
  342|  39.7k|   curve_mul_tmp(r, p32, tmp, ws);
  343|       |
  344|   675k|   for(size_t i = 0; i != 16; ++i) {
  ------------------
  |  Branch (344:22): [True: 635k, False: 39.7k]
  ------------------
  345|   635k|      curve_sqr_tmp(r, tmp, ws);
  346|   635k|   }
  347|  39.7k|   curve_mul_tmp(r, p16, tmp, ws);
  348|   357k|   for(size_t i = 0; i != 8; ++i) {
  ------------------
  |  Branch (348:22): [True: 317k, False: 39.7k]
  ------------------
  349|   317k|      curve_sqr_tmp(r, tmp, ws);
  350|   317k|   }
  351|  39.7k|   curve_mul_tmp(r, p8, tmp, ws);
  352|       |
  353|   198k|   for(size_t i = 0; i != 4; ++i) {
  ------------------
  |  Branch (353:22): [True: 158k, False: 39.7k]
  ------------------
  354|   158k|      curve_sqr_tmp(r, tmp, ws);
  355|   158k|   }
  356|  39.7k|   curve_mul_tmp(r, p4, tmp, ws);
  357|       |
  358|   119k|   for(size_t i = 0; i != 2; ++i) {
  ------------------
  |  Branch (358:22): [True: 79.4k, False: 39.7k]
  ------------------
  359|  79.4k|      curve_sqr_tmp(r, tmp, ws);
  360|  79.4k|   }
  361|  39.7k|   curve_mul_tmp(r, p2, tmp, ws);
  362|       |
  363|   119k|   for(size_t i = 0; i != 2; ++i) {
  ------------------
  |  Branch (363:22): [True: 79.4k, False: 39.7k]
  ------------------
  364|  79.4k|      curve_sqr_tmp(r, tmp, ws);
  365|  79.4k|   }
  366|  39.7k|   curve_mul_tmp(r, x, tmp, ws);
  367|       |
  368|  39.7k|   return r;
  369|  39.7k|}
curve_gfp.cpp:_ZNK5Botan12_GLOBAL__N_113CurveGFp_NIST13curve_sqr_tmpERNS_6BigIntES3_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  197|  9.89M|      void curve_sqr_tmp(BigInt& x, BigInt& tmp, secure_vector<word>& ws) const {
  198|  9.89M|         curve_sqr(tmp, x, ws);
  199|  9.89M|         x.swap(tmp);
  200|  9.89M|      }
curve_gfp.cpp:_ZNK5Botan12_GLOBAL__N_113CurveGFp_NIST13curve_mul_tmpERNS_6BigIntERKS2_S3_RNSt3__16vectorImNS_16secure_allocatorImEEEE:
  192|   317k|      void curve_mul_tmp(BigInt& x, const BigInt& y, BigInt& tmp, secure_vector<word>& ws) const {
  193|   317k|         curve_mul(tmp, x, y, ws);
  194|   317k|         x.swap(tmp);
  195|   317k|      }
curve_gfp.cpp:_ZNK5Botan12_GLOBAL__N_113CurveGFp_P25610redc_mod_pERNS_6BigIntERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  294|  40.3M|      void redc_mod_p(BigInt& x, secure_vector<word>& ws) const override { redc_p256(x, ws); }

_ZN5Botan8EC_Group13ec_group_dataEv:
  289|      1|EC_Group_Data_Map& EC_Group::ec_group_data() {
  290|       |   /*
  291|       |   * This exists purely to ensure the allocator is constructed before g_ec_data,
  292|       |   * which ensures that its destructor runs after ~g_ec_data is complete.
  293|       |   */
  294|       |
  295|      1|   static Allocator_Initializer g_init_allocator;
  296|      1|   static EC_Group_Data_Map g_ec_data;
  297|      1|   return g_ec_data;
  298|      1|}
_ZN5Botan8EC_Group18load_EC_group_infoEPKcS2_S2_S2_S2_S2_RKNS_3OIDE:
  312|      1|                                                            const OID& oid) {
  313|      1|   const BigInt p(p_str);
  314|      1|   const BigInt a(a_str);
  315|      1|   const BigInt b(b_str);
  316|      1|   const BigInt g_x(g_x_str);
  317|      1|   const BigInt g_y(g_y_str);
  318|      1|   const BigInt order(order_str);
  319|      1|   const BigInt cofactor(1);  // implicit
  320|       |
  321|      1|   return std::make_shared<EC_Group_Data>(p, a, b, g_x, g_y, order, cofactor, oid, EC_Group_Source::Builtin);
  322|      1|}
_ZN5Botan8EC_GroupD2Ev:
  400|      1|EC_Group::~EC_Group() = default;
_ZN5Botan8EC_GroupC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  409|      1|EC_Group::EC_Group(std::string_view str) {
  410|      1|   if(str.empty()) {
  ------------------
  |  Branch (410:7): [True: 0, False: 1]
  ------------------
  411|      0|      return;  // no initialization / uninitialized
  412|      0|   }
  413|       |
  414|      1|   try {
  415|      1|      const OID oid = OID::from_string(str);
  416|      1|      if(oid.has_value()) {
  ------------------
  |  Branch (416:10): [True: 1, False: 0]
  ------------------
  417|      1|         m_data = ec_group_data().lookup(oid);
  418|      1|      }
  419|      1|   } catch(...) {}
  420|       |
  421|      1|   if(m_data == nullptr) {
  ------------------
  |  Branch (421:7): [True: 0, False: 1]
  ------------------
  422|      0|      if(str.size() > 30 && str.substr(0, 29) == "-----BEGIN EC PARAMETERS-----") {
  ------------------
  |  Branch (422:10): [True: 0, False: 0]
  |  Branch (422:29): [True: 0, False: 0]
  ------------------
  423|       |         // OK try it as PEM ...
  424|      0|         secure_vector<uint8_t> ber = PEM_Code::decode_check_label(str, "EC PARAMETERS");
  425|       |
  426|      0|         auto data = BER_decode_EC_group(ber.data(), ber.size(), EC_Group_Source::ExternalSource);
  427|      0|         this->m_data = data.first;
  428|      0|         this->m_explicit_encoding = data.second;
  429|      0|      }
  430|      0|   }
  431|       |
  432|      1|   if(m_data == nullptr) {
  ------------------
  |  Branch (432:7): [True: 0, False: 1]
  ------------------
  433|      0|      throw Invalid_Argument(fmt("Unknown ECC group '{}'", str));
  434|      0|   }
  435|      1|}
_ZNK5Botan8EC_Group4dataEv:
  461|  17.9k|const EC_Group_Data& EC_Group::data() const {
  462|  17.9k|   if(m_data == nullptr) {
  ------------------
  |  Branch (462:7): [True: 0, False: 17.9k]
  ------------------
  463|      0|      throw Invalid_State("EC_Group uninitialized");
  464|      0|   }
  465|  17.9k|   return *m_data;
  466|  17.9k|}
_ZNK5Botan8EC_Group5get_pEv:
  492|  1.24k|const BigInt& EC_Group::get_p() const {
  493|  1.24k|   return data().p();
  494|  1.24k|}
_ZNK5Botan8EC_Group5get_aEv:
  496|  1.24k|const BigInt& EC_Group::get_a() const {
  497|  1.24k|   return data().a();
  498|  1.24k|}
_ZNK5Botan8EC_Group5get_bEv:
  500|  1.24k|const BigInt& EC_Group::get_b() const {
  501|  1.24k|   return data().b();
  502|  1.24k|}
_ZNK5Botan8EC_Group14get_base_pointEv:
  504|      1|const EC_Point& EC_Group::get_base_point() const {
  505|      1|   return data().base_point();
  506|      1|}
_ZNK5Botan8EC_Group9get_orderEv:
  508|  4.47k|const BigInt& EC_Group::get_order() const {
  509|  4.47k|   return data().order();
  510|  4.47k|}
_ZNK5Botan8EC_Group12get_cofactorEv:
  520|  4.47k|const BigInt& EC_Group::get_cofactor() const {
  521|  4.47k|   return data().cofactor();
  522|  4.47k|}
_ZNK5Botan8EC_Group5pointERKNS_6BigIntES3_:
  565|  1.47k|EC_Point EC_Group::point(const BigInt& x, const BigInt& y) const {
  566|       |   // TODO: randomize the representation?
  567|  1.47k|   return EC_Point(data().curve(), x, y);
  568|  1.47k|}
_ZNK5Botan8EC_Group27blinded_base_point_multiplyERKNS_6BigIntERNS_21RandomNumberGeneratorERNSt3__16vectorIS1_NS6_9allocatorIS1_EEEE:
  577|  3.73k|                                               std::vector<BigInt>& ws) const {
  578|  3.73k|   return data().blinded_base_point_multiply(k, rng, ws);
  579|  3.73k|}
_ZNK5Botan8EC_Group26blinded_var_point_multiplyERKNS_8EC_PointERKNS_6BigIntERNS_21RandomNumberGeneratorERNSt3__16vectorIS4_NS9_9allocatorIS4_EEEE:
  599|  4.47k|                                              std::vector<BigInt>& ws) const {
  600|  4.47k|   EC_Point_Var_Point_Precompute mul(point, rng, ws);
  601|       |   // We pass order*cofactor here to "correctly" handle the case where the
  602|       |   // point is on the curve but not in the prime order subgroup. This only
  603|       |   // matters for groups with cofactor > 1
  604|       |   // See https://github.com/randombit/botan/issues/3800
  605|  4.47k|   return mul.mul(k, rng, get_order() * get_cofactor(), ws);
  606|  4.47k|}
_ZN5Botan17EC_Group_Data_MapC2Ev:
  147|      1|      EC_Group_Data_Map() = default;
_ZN5Botan17EC_Group_Data_Map6lookupERKNS_3OIDE:
  156|      1|      std::shared_ptr<EC_Group_Data> lookup(const OID& oid) {
  157|      1|         lock_guard_type<mutex_type> lock(m_mutex);
  158|       |
  159|      1|         for(auto i : m_registered_curves) {
  ------------------
  |  Branch (159:21): [True: 0, False: 1]
  ------------------
  160|      0|            if(i->oid() == oid) {
  ------------------
  |  Branch (160:16): [True: 0, False: 0]
  ------------------
  161|      0|               return i;
  162|      0|            }
  163|      0|         }
  164|       |
  165|       |         // Not found, check hardcoded data
  166|      1|         std::shared_ptr<EC_Group_Data> data = EC_Group::EC_group_info(oid);
  167|       |
  168|      1|         if(data) {
  ------------------
  |  Branch (168:13): [True: 1, False: 0]
  ------------------
  169|      1|            for(auto curve : m_registered_curves) {
  ------------------
  |  Branch (169:28): [True: 0, False: 1]
  ------------------
  170|      0|               if(curve->oid().empty() == true && curve->params_match(*data)) {
  ------------------
  |  Branch (170:19): [True: 0, False: 0]
  |  Branch (170:51): [True: 0, False: 0]
  ------------------
  171|      0|                  curve->set_oid(oid);
  172|      0|                  return curve;
  173|      0|               }
  174|      0|            }
  175|       |
  176|      1|            m_registered_curves.push_back(data);
  177|      1|            return data;
  178|      1|         }
  179|       |
  180|       |         // Nope, unknown curve
  181|      0|         return std::shared_ptr<EC_Group_Data>();
  182|      1|      }
_ZN5Botan13EC_Group_DataC2ERKNS_6BigIntES3_S3_S3_S3_S3_S3_RKNS_3OIDENS_15EC_Group_SourceE:
   54|      1|            m_source(source) {}
_ZNK5Botan13EC_Group_Data1pEv:
   79|  1.24k|      const BigInt& p() const { return m_curve.get_p(); }
_ZNK5Botan13EC_Group_Data1aEv:
   81|  1.24k|      const BigInt& a() const { return m_curve.get_a(); }
_ZNK5Botan13EC_Group_Data1bEv:
   83|  1.24k|      const BigInt& b() const { return m_curve.get_b(); }
_ZNK5Botan13EC_Group_Data10base_pointEv:
  103|      1|      const EC_Point& base_point() const { return m_base_point; }
_ZNK5Botan13EC_Group_Data5orderEv:
   85|  4.47k|      const BigInt& order() const { return m_order; }
_ZNK5Botan13EC_Group_Data8cofactorEv:
   87|  4.47k|      const BigInt& cofactor() const { return m_cofactor; }
_ZNK5Botan13EC_Group_Data5curveEv:
  101|  1.47k|      const CurveGFp& curve() const { return m_curve; }
_ZNK5Botan13EC_Group_Data27blinded_base_point_multiplyERKNS_6BigIntERNS_21RandomNumberGeneratorERNSt3__16vectorIS1_NS6_9allocatorIS1_EEEE:
  121|  3.73k|      EC_Point blinded_base_point_multiply(const BigInt& k, RandomNumberGenerator& rng, std::vector<BigInt>& ws) const {
  122|  3.73k|         return m_base_mult.mul(k, rng, m_order, ws);
  123|  3.73k|      }

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

_ZN5Botan8EC_PointC2ERKNS_8CurveGFpE:
   18|  16.4k|EC_Point::EC_Point(const CurveGFp& curve) : m_curve(curve), m_coord_x(0), m_coord_y(curve.get_1_rep()), m_coord_z(0) {
   19|       |   // Assumes Montgomery rep of zero is zero
   20|  16.4k|}
_ZN5Botan8EC_PointC2ERKNS_8CurveGFpERKNS_6BigIntES6_:
   23|  1.48k|      m_curve(curve), m_coord_x(x), m_coord_y(y), m_coord_z(m_curve.get_1_rep()) {
   24|  1.48k|   if(x < 0 || x >= curve.get_p()) {
  ------------------
  |  Branch (24:7): [True: 0, False: 1.48k]
  |  Branch (24:16): [True: 3, False: 1.47k]
  ------------------
   25|      3|      throw Invalid_Argument("Invalid EC_Point affine x");
   26|      3|   }
   27|  1.47k|   if(y < 0 || y >= curve.get_p()) {
  ------------------
  |  Branch (27:7): [True: 738, False: 739]
  |  Branch (27:16): [True: 0, False: 739]
  ------------------
   28|    738|      throw Invalid_Argument("Invalid EC_Point affine y");
   29|    738|   }
   30|       |
   31|    739|   secure_vector<word> monty_ws(m_curve.get_ws_size());
   32|    739|   m_curve.to_rep(m_coord_x, monty_ws);
   33|    739|   m_curve.to_rep(m_coord_y, monty_ws);
   34|    739|}
_ZN5Botan8EC_Point14randomize_reprERNS_21RandomNumberGeneratorERNSt3__16vectorImNS_16secure_allocatorImEEEE:
   41|  8.21k|void EC_Point::randomize_repr(RandomNumberGenerator& rng, secure_vector<word>& ws) {
   42|  8.21k|   const BigInt mask = BigInt::random_integer(rng, 2, m_curve.get_p());
   43|       |
   44|       |   /*
   45|       |   * No reason to convert this to Montgomery representation first,
   46|       |   * just pretend the random mask was chosen as Redc(mask) and the
   47|       |   * random mask we generated above is in the Montgomery
   48|       |   * representation.
   49|       |   * //m_curve.to_rep(mask, ws);
   50|       |   */
   51|  8.21k|   const BigInt mask2 = m_curve.sqr_to_tmp(mask, ws);
   52|  8.21k|   const BigInt mask3 = m_curve.mul_to_tmp(mask2, mask, ws);
   53|       |
   54|  8.21k|   m_coord_x = m_curve.mul_to_tmp(m_coord_x, mask2, ws);
   55|  8.21k|   m_coord_y = m_curve.mul_to_tmp(m_coord_y, mask3, ws);
   56|  8.21k|   m_coord_z = m_curve.mul_to_tmp(m_coord_z, mask, ws);
   57|  8.21k|}
_ZN5Botan8EC_Point10add_affineEPKmmS2_mRNSt3__16vectorINS_6BigIntENS3_9allocatorIS5_EEEE:
   74|   478k|   const word x_words[], size_t x_size, const word y_words[], size_t y_size, std::vector<BigInt>& ws_bn) {
   75|   478k|   if((CT::all_zeros(x_words, x_size) & CT::all_zeros(y_words, y_size)).as_bool()) {
  ------------------
  |  Branch (75:7): [True: 59.2k, False: 419k]
  ------------------
   76|  59.2k|      return;
   77|  59.2k|   }
   78|       |
   79|   419k|   if(is_zero()) {
  ------------------
  |  Branch (79:7): [True: 3.74k, False: 415k]
  ------------------
   80|  3.74k|      m_coord_x.set_words(x_words, x_size);
   81|  3.74k|      m_coord_y.set_words(y_words, y_size);
   82|  3.74k|      m_coord_z = m_curve.get_1_rep();
   83|  3.74k|      return;
   84|  3.74k|   }
   85|       |
   86|   415k|   resize_ws(ws_bn, m_curve.get_ws_size());
   87|       |
   88|   415k|   secure_vector<word>& ws = ws_bn[0].get_word_vector();
   89|   415k|   secure_vector<word>& sub_ws = ws_bn[1].get_word_vector();
   90|       |
   91|   415k|   BigInt& T0 = ws_bn[2];
   92|   415k|   BigInt& T1 = ws_bn[3];
   93|   415k|   BigInt& T2 = ws_bn[4];
   94|   415k|   BigInt& T3 = ws_bn[5];
   95|   415k|   BigInt& T4 = ws_bn[6];
   96|       |
   97|       |   /*
   98|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-1998-cmo-2
   99|       |   simplified with Z2 = 1
  100|       |   */
  101|       |
  102|   415k|   const BigInt& p = m_curve.get_p();
  103|       |
  104|   415k|   m_curve.sqr(T3, m_coord_z, ws);            // z1^2
  105|   415k|   m_curve.mul(T4, x_words, x_size, T3, ws);  // x2*z1^2
  106|       |
  107|   415k|   m_curve.mul(T2, m_coord_z, T3, ws);        // z1^3
  108|   415k|   m_curve.mul(T0, y_words, y_size, T2, ws);  // y2*z1^3
  109|       |
  110|   415k|   T4.mod_sub(m_coord_x, p, sub_ws);  // x2*z1^2 - x1*z2^2
  111|       |
  112|   415k|   T0.mod_sub(m_coord_y, p, sub_ws);
  113|       |
  114|   415k|   if(T4.is_zero()) {
  ------------------
  |  Branch (114:7): [True: 173, False: 415k]
  ------------------
  115|    173|      if(T0.is_zero()) {
  ------------------
  |  Branch (115:10): [True: 12, False: 161]
  ------------------
  116|     12|         mult2(ws_bn);
  117|     12|         return;
  118|     12|      }
  119|       |
  120|       |      // setting to zero:
  121|    161|      m_coord_x.clear();
  122|    161|      m_coord_y = m_curve.get_1_rep();
  123|    161|      m_coord_z.clear();
  124|    161|      return;
  125|    173|   }
  126|       |
  127|   415k|   m_curve.sqr(T2, T4, ws);
  128|       |
  129|   415k|   m_curve.mul(T3, m_coord_x, T2, ws);
  130|       |
  131|   415k|   m_curve.mul(T1, T2, T4, ws);
  132|       |
  133|   415k|   m_curve.sqr(m_coord_x, T0, ws);
  134|   415k|   m_coord_x.mod_sub(T1, p, sub_ws);
  135|       |
  136|   415k|   m_coord_x.mod_sub(T3, p, sub_ws);
  137|   415k|   m_coord_x.mod_sub(T3, p, sub_ws);
  138|       |
  139|   415k|   T3.mod_sub(m_coord_x, p, sub_ws);
  140|       |
  141|   415k|   m_curve.mul(T2, T0, T3, ws);
  142|   415k|   m_curve.mul(T0, m_coord_y, T1, ws);
  143|   415k|   T2.mod_sub(T0, p, sub_ws);
  144|   415k|   m_coord_y.swap(T2);
  145|       |
  146|   415k|   m_curve.mul(T0, m_coord_z, T4, ws);
  147|   415k|   m_coord_z.swap(T0);
  148|   415k|}
_ZN5Botan8EC_Point3addEPKmmS2_mS2_mRNSt3__16vectorINS_6BigIntENS3_9allocatorIS5_EEEE:
  156|   626k|                   std::vector<BigInt>& ws_bn) {
  157|   626k|   if((CT::all_zeros(x_words, x_size) & CT::all_zeros(z_words, z_size)).as_bool()) {
  ------------------
  |  Branch (157:7): [True: 27.1k, False: 599k]
  ------------------
  158|  27.1k|      return;
  159|  27.1k|   }
  160|       |
  161|   599k|   if(is_zero()) {
  ------------------
  |  Branch (161:7): [True: 8.50k, False: 591k]
  ------------------
  162|  8.50k|      m_coord_x.set_words(x_words, x_size);
  163|  8.50k|      m_coord_y.set_words(y_words, y_size);
  164|  8.50k|      m_coord_z.set_words(z_words, z_size);
  165|  8.50k|      return;
  166|  8.50k|   }
  167|       |
  168|   591k|   resize_ws(ws_bn, m_curve.get_ws_size());
  169|       |
  170|   591k|   secure_vector<word>& ws = ws_bn[0].get_word_vector();
  171|   591k|   secure_vector<word>& sub_ws = ws_bn[1].get_word_vector();
  172|       |
  173|   591k|   BigInt& T0 = ws_bn[2];
  174|   591k|   BigInt& T1 = ws_bn[3];
  175|   591k|   BigInt& T2 = ws_bn[4];
  176|   591k|   BigInt& T3 = ws_bn[5];
  177|   591k|   BigInt& T4 = ws_bn[6];
  178|   591k|   BigInt& T5 = ws_bn[7];
  179|       |
  180|       |   /*
  181|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-1998-cmo-2
  182|       |   */
  183|       |
  184|   591k|   const BigInt& p = m_curve.get_p();
  185|       |
  186|   591k|   m_curve.sqr(T0, z_words, z_size, ws);      // z2^2
  187|   591k|   m_curve.mul(T1, m_coord_x, T0, ws);        // x1*z2^2
  188|   591k|   m_curve.mul(T3, z_words, z_size, T0, ws);  // z2^3
  189|   591k|   m_curve.mul(T2, m_coord_y, T3, ws);        // y1*z2^3
  190|       |
  191|   591k|   m_curve.sqr(T3, m_coord_z, ws);            // z1^2
  192|   591k|   m_curve.mul(T4, x_words, x_size, T3, ws);  // x2*z1^2
  193|       |
  194|   591k|   m_curve.mul(T5, m_coord_z, T3, ws);        // z1^3
  195|   591k|   m_curve.mul(T0, y_words, y_size, T5, ws);  // y2*z1^3
  196|       |
  197|   591k|   T4.mod_sub(T1, p, sub_ws);  // x2*z1^2 - x1*z2^2
  198|       |
  199|   591k|   T0.mod_sub(T2, p, sub_ws);
  200|       |
  201|   591k|   if(T4.is_zero()) {
  ------------------
  |  Branch (201:7): [True: 360, False: 590k]
  ------------------
  202|    360|      if(T0.is_zero()) {
  ------------------
  |  Branch (202:10): [True: 183, False: 177]
  ------------------
  203|    183|         mult2(ws_bn);
  204|    183|         return;
  205|    183|      }
  206|       |
  207|       |      // setting to zero:
  208|    177|      m_coord_x.clear();
  209|    177|      m_coord_y = m_curve.get_1_rep();
  210|    177|      m_coord_z.clear();
  211|    177|      return;
  212|    360|   }
  213|       |
  214|   590k|   m_curve.sqr(T5, T4, ws);
  215|       |
  216|   590k|   m_curve.mul(T3, T1, T5, ws);
  217|       |
  218|   590k|   m_curve.mul(T1, T5, T4, ws);
  219|       |
  220|   590k|   m_curve.sqr(m_coord_x, T0, ws);
  221|   590k|   m_coord_x.mod_sub(T1, p, sub_ws);
  222|   590k|   m_coord_x.mod_sub(T3, p, sub_ws);
  223|   590k|   m_coord_x.mod_sub(T3, p, sub_ws);
  224|       |
  225|   590k|   T3.mod_sub(m_coord_x, p, sub_ws);
  226|       |
  227|   590k|   m_curve.mul(m_coord_y, T0, T3, ws);
  228|   590k|   m_curve.mul(T3, T2, T1, ws);
  229|       |
  230|   590k|   m_coord_y.mod_sub(T3, p, sub_ws);
  231|       |
  232|   590k|   m_curve.mul(T3, z_words, z_size, m_coord_z, ws);
  233|   590k|   m_curve.mul(m_coord_z, T3, T4, ws);
  234|   590k|}
_ZN5Botan8EC_Point6mult2iEmRNSt3__16vectorINS_6BigIntENS1_9allocatorIS3_EEEE:
  236|   424k|void EC_Point::mult2i(size_t iterations, std::vector<BigInt>& ws_bn) {
  237|   424k|   if(iterations == 0) {
  ------------------
  |  Branch (237:7): [True: 0, False: 424k]
  ------------------
  238|      0|      return;
  239|      0|   }
  240|       |
  241|   424k|   if(m_coord_y.is_zero()) {
  ------------------
  |  Branch (241:7): [True: 0, False: 424k]
  ------------------
  242|      0|      *this = EC_Point(m_curve);  // setting myself to zero
  243|      0|      return;
  244|      0|   }
  245|       |
  246|       |   /*
  247|       |   TODO we can save 2 squarings per iteration by computing
  248|       |   a*Z^4 using values cached from previous iteration
  249|       |   */
  250|  2.12M|   for(size_t i = 0; i != iterations; ++i) {
  ------------------
  |  Branch (250:22): [True: 1.69M, False: 424k]
  ------------------
  251|  1.69M|      mult2(ws_bn);
  252|  1.69M|   }
  253|   424k|}
_ZN5Botan8EC_Point5mult2ERNSt3__16vectorINS_6BigIntENS1_9allocatorIS3_EEEE:
  256|  1.88M|void EC_Point::mult2(std::vector<BigInt>& ws_bn) {
  257|  1.88M|   if(is_zero()) {
  ------------------
  |  Branch (257:7): [True: 96, False: 1.88M]
  ------------------
  258|     96|      return;
  259|     96|   }
  260|       |
  261|  1.88M|   if(m_coord_y.is_zero()) {
  ------------------
  |  Branch (261:7): [True: 0, False: 1.88M]
  ------------------
  262|      0|      *this = EC_Point(m_curve);  // setting myself to zero
  263|      0|      return;
  264|      0|   }
  265|       |
  266|  1.88M|   resize_ws(ws_bn, m_curve.get_ws_size());
  267|       |
  268|  1.88M|   secure_vector<word>& ws = ws_bn[0].get_word_vector();
  269|  1.88M|   secure_vector<word>& sub_ws = ws_bn[1].get_word_vector();
  270|       |
  271|  1.88M|   BigInt& T0 = ws_bn[2];
  272|  1.88M|   BigInt& T1 = ws_bn[3];
  273|  1.88M|   BigInt& T2 = ws_bn[4];
  274|  1.88M|   BigInt& T3 = ws_bn[5];
  275|  1.88M|   BigInt& T4 = ws_bn[6];
  276|       |
  277|       |   /*
  278|       |   https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-1986-cc
  279|       |   */
  280|  1.88M|   const BigInt& p = m_curve.get_p();
  281|       |
  282|  1.88M|   m_curve.sqr(T0, m_coord_y, ws);
  283|       |
  284|  1.88M|   m_curve.mul(T1, m_coord_x, T0, ws);
  285|  1.88M|   T1.mod_mul(4, p, sub_ws);
  286|       |
  287|  1.88M|   if(m_curve.a_is_zero()) {
  ------------------
  |  Branch (287:7): [True: 0, False: 1.88M]
  ------------------
  288|       |      // if a == 0 then 3*x^2 + a*z^4 is just 3*x^2
  289|      0|      m_curve.sqr(T4, m_coord_x, ws);  // x^2
  290|      0|      T4.mod_mul(3, p, sub_ws);        // 3*x^2
  291|  1.88M|   } else if(m_curve.a_is_minus_3()) {
  ------------------
  |  Branch (291:14): [True: 1.88M, False: 0]
  ------------------
  292|       |      /*
  293|       |      if a == -3 then
  294|       |        3*x^2 + a*z^4 == 3*x^2 - 3*z^4 == 3*(x^2-z^4) == 3*(x-z^2)*(x+z^2)
  295|       |      */
  296|  1.88M|      m_curve.sqr(T3, m_coord_z, ws);  // z^2
  297|       |
  298|       |      // (x-z^2)
  299|  1.88M|      T2 = m_coord_x;
  300|  1.88M|      T2.mod_sub(T3, p, sub_ws);
  301|       |
  302|       |      // (x+z^2)
  303|  1.88M|      T3.mod_add(m_coord_x, p, sub_ws);
  304|       |
  305|  1.88M|      m_curve.mul(T4, T2, T3, ws);  // (x-z^2)*(x+z^2)
  306|       |
  307|  1.88M|      T4.mod_mul(3, p, sub_ws);  // 3*(x-z^2)*(x+z^2)
  308|  1.88M|   } else {
  309|      0|      m_curve.sqr(T3, m_coord_z, ws);                // z^2
  310|      0|      m_curve.sqr(T4, T3, ws);                       // z^4
  311|      0|      m_curve.mul(T3, m_curve.get_a_rep(), T4, ws);  // a*z^4
  312|       |
  313|      0|      m_curve.sqr(T4, m_coord_x, ws);  // x^2
  314|      0|      T4.mod_mul(3, p, sub_ws);
  315|      0|      T4.mod_add(T3, p, sub_ws);  // 3*x^2 + a*z^4
  316|      0|   }
  317|       |
  318|  1.88M|   m_curve.sqr(T2, T4, ws);
  319|  1.88M|   T2.mod_sub(T1, p, sub_ws);
  320|  1.88M|   T2.mod_sub(T1, p, sub_ws);
  321|       |
  322|  1.88M|   m_curve.sqr(T3, T0, ws);
  323|  1.88M|   T3.mod_mul(8, p, sub_ws);
  324|       |
  325|  1.88M|   T1.mod_sub(T2, p, sub_ws);
  326|       |
  327|  1.88M|   m_curve.mul(T0, T4, T1, ws);
  328|  1.88M|   T0.mod_sub(T3, p, sub_ws);
  329|       |
  330|  1.88M|   m_coord_x.swap(T2);
  331|       |
  332|  1.88M|   m_curve.mul(T2, m_coord_y, m_coord_z, ws);
  333|  1.88M|   T2.mod_mul(2, p, sub_ws);
  334|       |
  335|  1.88M|   m_coord_y.swap(T0);
  336|  1.88M|   m_coord_z.swap(T2);
  337|  1.88M|}
_ZN5Botan8EC_PointpLERKS0_:
  340|  7.47k|EC_Point& EC_Point::operator+=(const EC_Point& rhs) {
  341|  7.47k|   std::vector<BigInt> ws(EC_Point::WORKSPACE_SIZE);
  342|  7.47k|   add(rhs, ws);
  343|  7.47k|   return *this;
  344|  7.47k|}
_ZN5BotanmlERKNS_6BigIntERKNS_8EC_PointE:
  363|  3.73k|EC_Point operator*(const BigInt& scalar, const EC_Point& point) {
  364|  3.73k|   BOTAN_DEBUG_ASSERT(point.on_the_curve());
  ------------------
  |  |   99|  3.73k|      do {                          \
  |  |  100|  3.73k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  365|       |
  366|  3.73k|   const size_t scalar_bits = scalar.bits();
  367|       |
  368|  3.73k|   std::vector<BigInt> ws(EC_Point::WORKSPACE_SIZE);
  369|       |
  370|  3.73k|   EC_Point R[2] = {point.zero(), point};
  371|       |
  372|   161k|   for(size_t i = scalar_bits; i > 0; i--) {
  ------------------
  |  Branch (372:32): [True: 158k, False: 3.73k]
  ------------------
  373|   158k|      const size_t b = scalar.get_bit(i - 1);
  374|   158k|      R[b ^ 1].add(R[b], ws);
  375|   158k|      R[b].mult2(ws);
  376|   158k|   }
  377|       |
  378|  3.73k|   if(scalar.is_negative()) {
  ------------------
  |  Branch (378:7): [True: 0, False: 3.73k]
  ------------------
  379|      0|      R[0].negate();
  380|      0|   }
  381|       |
  382|  3.73k|   BOTAN_DEBUG_ASSERT(R[0].on_the_curve());
  ------------------
  |  |   99|  3.73k|      do {                          \
  |  |  100|  3.73k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  383|       |
  384|  3.73k|   return R[0];
  385|  3.73k|}
_ZN5Botan8EC_Point16force_all_affineERNSt3__16vectorIS0_NS1_9allocatorIS0_EEEERNS2_ImNS_16secure_allocatorImEEEE:
  388|      1|void EC_Point::force_all_affine(std::vector<EC_Point>& points, secure_vector<word>& ws) {
  389|      1|   if(points.size() <= 1) {
  ------------------
  |  Branch (389:7): [True: 0, False: 1]
  ------------------
  390|      0|      for(auto& point : points) {
  ------------------
  |  Branch (390:23): [True: 0, False: 0]
  ------------------
  391|      0|         point.force_affine();
  392|      0|      }
  393|      0|      return;
  394|      0|   }
  395|       |
  396|    903|   for(auto& point : points) {
  ------------------
  |  Branch (396:20): [True: 903, False: 1]
  ------------------
  397|    903|      if(point.is_zero()) {
  ------------------
  |  Branch (397:10): [True: 0, False: 903]
  ------------------
  398|      0|         throw Invalid_State("Cannot convert zero ECC point to affine");
  399|      0|      }
  400|    903|   }
  401|       |
  402|       |   /*
  403|       |   For >= 2 points use Montgomery's trick
  404|       |
  405|       |   See Algorithm 2.26 in "Guide to Elliptic Curve Cryptography"
  406|       |   (Hankerson, Menezes, Vanstone)
  407|       |
  408|       |   TODO is it really necessary to save all k points in c?
  409|       |   */
  410|       |
  411|      1|   const CurveGFp& curve = points[0].m_curve;
  412|      1|   const BigInt& rep_1 = curve.get_1_rep();
  413|       |
  414|      1|   if(ws.size() < curve.get_ws_size()) {
  ------------------
  |  Branch (414:7): [True: 0, False: 1]
  ------------------
  415|      0|      ws.resize(curve.get_ws_size());
  416|      0|   }
  417|       |
  418|      1|   std::vector<BigInt> c(points.size());
  419|      1|   c[0] = points[0].m_coord_z;
  420|       |
  421|    903|   for(size_t i = 1; i != points.size(); ++i) {
  ------------------
  |  Branch (421:22): [True: 902, False: 1]
  ------------------
  422|    902|      curve.mul(c[i], c[i - 1], points[i].m_coord_z, ws);
  423|    902|   }
  424|       |
  425|      1|   BigInt s_inv = curve.invert_element(c[c.size() - 1], ws);
  426|       |
  427|      1|   BigInt z_inv, z2_inv, z3_inv;
  428|       |
  429|    903|   for(size_t i = points.size() - 1; i != 0; i--) {
  ------------------
  |  Branch (429:38): [True: 902, False: 1]
  ------------------
  430|    902|      EC_Point& point = points[i];
  431|       |
  432|    902|      curve.mul(z_inv, s_inv, c[i - 1], ws);
  433|       |
  434|    902|      s_inv = curve.mul_to_tmp(s_inv, point.m_coord_z, ws);
  435|       |
  436|    902|      curve.sqr(z2_inv, z_inv, ws);
  437|    902|      curve.mul(z3_inv, z2_inv, z_inv, ws);
  438|    902|      point.m_coord_x = curve.mul_to_tmp(point.m_coord_x, z2_inv, ws);
  439|    902|      point.m_coord_y = curve.mul_to_tmp(point.m_coord_y, z3_inv, ws);
  440|    902|      point.m_coord_z = rep_1;
  441|    902|   }
  442|       |
  443|      1|   curve.sqr(z2_inv, s_inv, ws);
  444|      1|   curve.mul(z3_inv, z2_inv, s_inv, ws);
  445|      1|   points[0].m_coord_x = curve.mul_to_tmp(points[0].m_coord_x, z2_inv, ws);
  446|      1|   points[0].m_coord_y = curve.mul_to_tmp(points[0].m_coord_y, z3_inv, ws);
  447|      1|   points[0].m_coord_z = rep_1;
  448|      1|}
_ZNK5Botan8EC_Point9is_affineEv:
  465|  39.7k|bool EC_Point::is_affine() const {
  466|  39.7k|   return m_curve.is_one(m_coord_z);
  467|  39.7k|}
_ZNK5Botan8EC_Point12get_affine_xEv:
  469|  19.8k|BigInt EC_Point::get_affine_x() const {
  470|  19.8k|   if(is_zero()) {
  ------------------
  |  Branch (470:7): [True: 0, False: 19.8k]
  ------------------
  471|      0|      throw Invalid_State("Cannot convert zero point to affine");
  472|      0|   }
  473|       |
  474|  19.8k|   secure_vector<word> monty_ws;
  475|       |
  476|  19.8k|   if(is_affine()) {
  ------------------
  |  Branch (476:7): [True: 25, False: 19.8k]
  ------------------
  477|     25|      return m_curve.from_rep_to_tmp(m_coord_x, monty_ws);
  478|     25|   }
  479|       |
  480|  19.8k|   BigInt z2 = m_curve.sqr_to_tmp(m_coord_z, monty_ws);
  481|  19.8k|   z2 = m_curve.invert_element(z2, monty_ws);
  482|       |
  483|  19.8k|   BigInt r;
  484|  19.8k|   m_curve.mul(r, m_coord_x, z2, monty_ws);
  485|  19.8k|   m_curve.from_rep(r, monty_ws);
  486|  19.8k|   return r;
  487|  19.8k|}
_ZNK5Botan8EC_Point12get_affine_yEv:
  489|  19.8k|BigInt EC_Point::get_affine_y() const {
  490|  19.8k|   if(is_zero()) {
  ------------------
  |  Branch (490:7): [True: 0, False: 19.8k]
  ------------------
  491|      0|      throw Invalid_State("Cannot convert zero point to affine");
  492|      0|   }
  493|       |
  494|  19.8k|   secure_vector<word> monty_ws;
  495|       |
  496|  19.8k|   if(is_affine()) {
  ------------------
  |  Branch (496:7): [True: 25, False: 19.8k]
  ------------------
  497|     25|      return m_curve.from_rep_to_tmp(m_coord_y, monty_ws);
  498|     25|   }
  499|       |
  500|  19.8k|   const BigInt z2 = m_curve.sqr_to_tmp(m_coord_z, monty_ws);
  501|  19.8k|   const BigInt z3 = m_curve.mul_to_tmp(m_coord_z, z2, monty_ws);
  502|  19.8k|   const BigInt z3_inv = m_curve.invert_element(z3, monty_ws);
  503|       |
  504|  19.8k|   BigInt r;
  505|  19.8k|   m_curve.mul(r, m_coord_y, z3_inv, monty_ws);
  506|  19.8k|   m_curve.from_rep(r, monty_ws);
  507|  19.8k|   return r;
  508|  19.8k|}
_ZN5Botan8EC_Point4swapERS0_:
  547|  67.9k|void EC_Point::swap(EC_Point& other) {
  548|  67.9k|   m_curve.swap(other.m_curve);
  549|  67.9k|   m_coord_x.swap(other.m_coord_x);
  550|  67.9k|   m_coord_y.swap(other.m_coord_y);
  551|  67.9k|   m_coord_z.swap(other.m_coord_z);
  552|  67.9k|}
_ZNK5Botan8EC_PointeqERKS0_:
  554|  9.96k|bool EC_Point::operator==(const EC_Point& other) const {
  555|  9.96k|   if(m_curve != other.m_curve) {
  ------------------
  |  Branch (555:7): [True: 0, False: 9.96k]
  ------------------
  556|      0|      return false;
  557|      0|   }
  558|       |
  559|       |   // If this is zero, only equal if other is also zero
  560|  9.96k|   if(is_zero()) {
  ------------------
  |  Branch (560:7): [True: 24, False: 9.94k]
  ------------------
  561|     24|      return other.is_zero();
  562|     24|   }
  563|       |
  564|  9.94k|   return (get_affine_x() == other.get_affine_x() && get_affine_y() == other.get_affine_y());
  ------------------
  |  Branch (564:12): [True: 9.94k, False: 0]
  |  Branch (564:54): [True: 9.94k, False: 0]
  ------------------
  565|  9.96k|}
ec_point.cpp:_ZN5Botan12_GLOBAL__N_19resize_wsERNSt3__16vectorINS_6BigIntENS1_9allocatorIS3_EEEEm:
   61|  2.89M|inline void resize_ws(std::vector<BigInt>& ws_bn, size_t cap_size) {
   62|  2.89M|   BOTAN_ASSERT(ws_bn.size() >= EC_Point::WORKSPACE_SIZE, "Expected size for EC_Point workspace");
  ------------------
  |  |   51|  2.89M|   do {                                                                                 \
  |  |   52|  2.89M|      if(!(expr))                                                                       \
  |  |  ------------------
  |  |  |  Branch (52:10): [True: 0, False: 2.89M]
  |  |  ------------------
  |  |   53|  2.89M|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   54|  2.89M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (54:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   63|       |
   64|  23.1M|   for(auto& ws : ws_bn) {
  ------------------
  |  Branch (64:17): [True: 23.1M, False: 2.89M]
  ------------------
   65|  23.1M|      if(ws.size() < cap_size) {
  ------------------
  |  Branch (65:10): [True: 84.7k, False: 23.0M]
  ------------------
   66|  84.7k|         ws.get_word_vector().resize(cap_size);
   67|  84.7k|      }
   68|  23.1M|   }
   69|  2.89M|}

_ZN5Botan30EC_Point_Base_Point_PrecomputeC2ERKNS_8EC_PointERKNS_15Modular_ReducerE:
   30|      1|      m_base_point(base), m_mod_order(mod_order), m_p_words(base.get_curve().get_p().sig_words()) {
   31|      1|   std::vector<BigInt> ws(EC_Point::WORKSPACE_SIZE);
   32|       |
   33|      1|   const size_t p_bits = base.get_curve().get_p().bits();
   34|       |
   35|       |   /*
   36|       |   * Some of the curves (eg secp160k1) have an order slightly larger than
   37|       |   * the size of the prime modulus. In all cases they are at most 1 bit
   38|       |   * longer. The +1 compensates for this.
   39|       |   */
   40|      1|   const size_t T_bits = round_up(p_bits + blinding_size(mod_order.get_modulus()) + 1, WINDOW_BITS) / WINDOW_BITS;
   41|       |
   42|      1|   std::vector<EC_Point> T(WINDOW_SIZE * T_bits);
   43|       |
   44|      1|   EC_Point g = base;
   45|      1|   EC_Point g2, g4;
   46|       |
   47|    130|   for(size_t i = 0; i != T_bits; i++) {
  ------------------
  |  Branch (47:22): [True: 129, False: 1]
  ------------------
   48|    129|      g2 = g;
   49|    129|      g2.mult2(ws);
   50|    129|      g4 = g2;
   51|    129|      g4.mult2(ws);
   52|       |
   53|    129|      T[7 * i + 0] = g;
   54|    129|      T[7 * i + 1] = std::move(g2);
   55|    129|      T[7 * i + 2] = T[7 * i + 1].plus(T[7 * i + 0], ws);  // g2+g
   56|    129|      T[7 * i + 3] = g4;
   57|    129|      T[7 * i + 4] = T[7 * i + 3].plus(T[7 * i + 0], ws);  // g4+g
   58|    129|      T[7 * i + 5] = T[7 * i + 3].plus(T[7 * i + 1], ws);  // g4+g2
   59|    129|      T[7 * i + 6] = T[7 * i + 3].plus(T[7 * i + 2], ws);  // g4+g2+g
   60|       |
   61|    129|      g.swap(g4);
   62|    129|      g.mult2(ws);
   63|    129|   }
   64|       |
   65|      1|   EC_Point::force_all_affine(T, ws[0].get_word_vector());
   66|       |
   67|      1|   m_W.resize(T.size() * 2 * m_p_words);
   68|       |
   69|      1|   word* p = &m_W[0];
   70|    904|   for(size_t i = 0; i != T.size(); ++i) {
  ------------------
  |  Branch (70:22): [True: 903, False: 1]
  ------------------
   71|    903|      T[i].get_x().encode_words(p, m_p_words);
   72|    903|      p += m_p_words;
   73|    903|      T[i].get_y().encode_words(p, m_p_words);
   74|    903|      p += m_p_words;
   75|    903|   }
   76|      1|}
_ZNK5Botan30EC_Point_Base_Point_Precompute3mulERKNS_6BigIntERNS_21RandomNumberGeneratorES3_RNSt3__16vectorIS1_NS6_9allocatorIS1_EEEE:
   81|  3.73k|                                             std::vector<BigInt>& ws) const {
   82|  3.73k|   if(k.is_negative()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 3.73k]
  ------------------
   83|      0|      throw Invalid_Argument("EC_Point_Base_Point_Precompute scalar must be positive");
   84|      0|   }
   85|       |
   86|       |   // Instead of reducing k mod group order should we alter the mask size??
   87|  3.73k|   BigInt scalar = m_mod_order.reduce(k);
   88|       |
   89|  3.73k|   if(rng.is_seeded()) {
  ------------------
  |  Branch (89:7): [True: 3.73k, False: 0]
  ------------------
   90|       |      // Choose a small mask m and use k' = k + m*order (Coron's 1st countermeasure)
   91|  3.73k|      const BigInt mask(rng, blinding_size(group_order));
   92|  3.73k|      scalar += group_order * mask;
   93|  3.73k|   } else {
   94|       |      /*
   95|       |      When we don't have an RNG we cannot do scalar blinding. Instead use the
   96|       |      same trick as OpenSSL and add one or two copies of the order to normalize
   97|       |      the length of the scalar at order.bits()+1. This at least ensures the loop
   98|       |      bound does not leak information about the high bits of the scalar.
   99|       |      */
  100|      0|      scalar += group_order;
  101|      0|      if(scalar.bits() == group_order.bits()) {
  ------------------
  |  Branch (101:10): [True: 0, False: 0]
  ------------------
  102|      0|         scalar += group_order;
  103|      0|      }
  104|      0|      BOTAN_DEBUG_ASSERT(scalar.bits() == group_order.bits() + 1);
  ------------------
  |  |   99|      0|      do {                          \
  |  |  100|      0|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  105|      0|   }
  106|       |
  107|  3.73k|   const size_t windows = round_up(scalar.bits(), WINDOW_BITS) / WINDOW_BITS;
  108|       |
  109|  3.73k|   const size_t elem_size = 2 * m_p_words;
  110|       |
  111|  3.73k|   BOTAN_ASSERT(windows <= m_W.size() / (3 * elem_size), "Precomputed sufficient values for scalar mult");
  ------------------
  |  |   51|  3.73k|   do {                                                                                 \
  |  |   52|  3.73k|      if(!(expr))                                                                       \
  |  |  ------------------
  |  |  |  Branch (52:10): [True: 0, False: 3.73k]
  |  |  ------------------
  |  |   53|  3.73k|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   54|  3.73k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (54:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  112|       |
  113|  3.73k|   EC_Point R = m_base_point.zero();
  114|       |
  115|  3.73k|   if(ws.size() < EC_Point::WORKSPACE_SIZE) {
  ------------------
  |  Branch (115:7): [True: 0, False: 3.73k]
  ------------------
  116|      0|      ws.resize(EC_Point::WORKSPACE_SIZE);
  117|      0|   }
  118|       |
  119|       |   // the precomputed multiples are not secret so use std::vector
  120|  3.73k|   std::vector<word> Wt(elem_size);
  121|       |
  122|   482k|   for(size_t i = 0; i != windows; ++i) {
  ------------------
  |  Branch (122:22): [True: 478k, False: 3.73k]
  ------------------
  123|   478k|      const size_t window = windows - i - 1;
  124|   478k|      const size_t base_addr = (WINDOW_SIZE * window) * elem_size;
  125|       |
  126|   478k|      const word w = scalar.get_substring(WINDOW_BITS * window, WINDOW_BITS);
  127|       |
  128|   478k|      const auto w_is_1 = CT::Mask<word>::is_equal(w, 1);
  129|   478k|      const auto w_is_2 = CT::Mask<word>::is_equal(w, 2);
  130|   478k|      const auto w_is_3 = CT::Mask<word>::is_equal(w, 3);
  131|   478k|      const auto w_is_4 = CT::Mask<word>::is_equal(w, 4);
  132|   478k|      const auto w_is_5 = CT::Mask<word>::is_equal(w, 5);
  133|   478k|      const auto w_is_6 = CT::Mask<word>::is_equal(w, 6);
  134|   478k|      const auto w_is_7 = CT::Mask<word>::is_equal(w, 7);
  135|       |
  136|  4.30M|      for(size_t j = 0; j != elem_size; ++j) {
  ------------------
  |  Branch (136:25): [True: 3.82M, False: 478k]
  ------------------
  137|  3.82M|         const word w1 = w_is_1.if_set_return(m_W[base_addr + 0 * elem_size + j]);
  138|  3.82M|         const word w2 = w_is_2.if_set_return(m_W[base_addr + 1 * elem_size + j]);
  139|  3.82M|         const word w3 = w_is_3.if_set_return(m_W[base_addr + 2 * elem_size + j]);
  140|  3.82M|         const word w4 = w_is_4.if_set_return(m_W[base_addr + 3 * elem_size + j]);
  141|  3.82M|         const word w5 = w_is_5.if_set_return(m_W[base_addr + 4 * elem_size + j]);
  142|  3.82M|         const word w6 = w_is_6.if_set_return(m_W[base_addr + 5 * elem_size + j]);
  143|  3.82M|         const word w7 = w_is_7.if_set_return(m_W[base_addr + 6 * elem_size + j]);
  144|       |
  145|  3.82M|         Wt[j] = w1 | w2 | w3 | w4 | w5 | w6 | w7;
  146|  3.82M|      }
  147|       |
  148|   478k|      R.add_affine(&Wt[0], m_p_words, &Wt[m_p_words], m_p_words, ws);
  149|       |
  150|   478k|      if(i == 0 && rng.is_seeded()) {
  ------------------
  |  Branch (150:10): [True: 3.73k, False: 474k]
  |  Branch (150:20): [True: 3.73k, False: 0]
  ------------------
  151|       |         /*
  152|       |         * Since we start with the top bit of the exponent we know the
  153|       |         * first window must have a non-zero element, and thus R is
  154|       |         * now a point other than the point at infinity.
  155|       |         */
  156|  3.73k|         BOTAN_DEBUG_ASSERT(w != 0);
  ------------------
  |  |   99|  3.73k|      do {                          \
  |  |  100|  3.73k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  157|  3.73k|         R.randomize_repr(rng, ws[0].get_word_vector());
  158|  3.73k|      }
  159|   478k|   }
  160|       |
  161|  3.73k|   BOTAN_DEBUG_ASSERT(R.on_the_curve());
  ------------------
  |  |   99|  3.73k|      do {                          \
  |  |  100|  3.73k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  162|       |
  163|  3.73k|   return R;
  164|  3.73k|}
_ZN5Botan29EC_Point_Var_Point_PrecomputeC2ERKNS_8EC_PointERNS_21RandomNumberGeneratorERNSt3__16vectorINS_6BigIntENS6_9allocatorIS8_EEEE:
  169|  4.47k|      m_curve(point.get_curve()), m_p_words(m_curve.get_p().sig_words()), m_window_bits(4) {
  170|  4.47k|   if(ws.size() < EC_Point::WORKSPACE_SIZE) {
  ------------------
  |  Branch (170:7): [True: 0, False: 4.47k]
  ------------------
  171|      0|      ws.resize(EC_Point::WORKSPACE_SIZE);
  172|      0|   }
  173|       |
  174|  4.47k|   std::vector<EC_Point> U(static_cast<size_t>(1) << m_window_bits);
  175|  4.47k|   U[0] = point.zero();
  176|  4.47k|   U[1] = point;
  177|       |
  178|  35.8k|   for(size_t i = 2; i < U.size(); i += 2) {
  ------------------
  |  Branch (178:22): [True: 31.3k, False: 4.47k]
  ------------------
  179|  31.3k|      U[i] = U[i / 2].double_of(ws);
  180|  31.3k|      U[i + 1] = U[i].plus(point, ws);
  181|  31.3k|   }
  182|       |
  183|       |   // Hack to handle Blinded_Point_Multiply
  184|  4.47k|   if(rng.is_seeded()) {
  ------------------
  |  Branch (184:7): [True: 4.47k, False: 0]
  ------------------
  185|  4.47k|      BigInt& mask = ws[0];
  186|  4.47k|      BigInt& mask2 = ws[1];
  187|  4.47k|      BigInt& mask3 = ws[2];
  188|  4.47k|      BigInt& new_x = ws[3];
  189|  4.47k|      BigInt& new_y = ws[4];
  190|  4.47k|      BigInt& new_z = ws[5];
  191|  4.47k|      secure_vector<word>& tmp = ws[6].get_word_vector();
  192|       |
  193|  4.47k|      const CurveGFp& curve = U[0].get_curve();
  194|       |
  195|  4.47k|      const size_t p_bits = curve.get_p().bits();
  196|       |
  197|       |      // Skipping zero point since it can't be randomized
  198|  71.6k|      for(size_t i = 1; i != U.size(); ++i) {
  ------------------
  |  Branch (198:25): [True: 67.1k, False: 4.47k]
  ------------------
  199|  67.1k|         mask.randomize(rng, p_bits - 1, false);
  200|       |         // Easy way of ensuring mask != 0
  201|  67.1k|         mask.set_bit(0);
  202|       |
  203|  67.1k|         curve.sqr(mask2, mask, tmp);
  204|  67.1k|         curve.mul(mask3, mask, mask2, tmp);
  205|       |
  206|  67.1k|         curve.mul(new_x, U[i].get_x(), mask2, tmp);
  207|  67.1k|         curve.mul(new_y, U[i].get_y(), mask3, tmp);
  208|  67.1k|         curve.mul(new_z, U[i].get_z(), mask, tmp);
  209|       |
  210|  67.1k|         U[i].swap_coords(new_x, new_y, new_z);
  211|  67.1k|      }
  212|  4.47k|   }
  213|       |
  214|  4.47k|   m_T.resize(U.size() * 3 * m_p_words);
  215|       |
  216|  4.47k|   word* p = &m_T[0];
  217|  76.0k|   for(size_t i = 0; i != U.size(); ++i) {
  ------------------
  |  Branch (217:22): [True: 71.6k, False: 4.47k]
  ------------------
  218|  71.6k|      U[i].get_x().encode_words(p, m_p_words);
  219|  71.6k|      U[i].get_y().encode_words(p + m_p_words, m_p_words);
  220|  71.6k|      U[i].get_z().encode_words(p + 2 * m_p_words, m_p_words);
  221|  71.6k|      p += 3 * m_p_words;
  222|  71.6k|   }
  223|  4.47k|}
_ZNK5Botan29EC_Point_Var_Point_Precompute3mulERKNS_6BigIntERNS_21RandomNumberGeneratorES3_RNSt3__16vectorIS1_NS6_9allocatorIS1_EEEE:
  228|  4.47k|                                            std::vector<BigInt>& ws) const {
  229|  4.47k|   if(k.is_negative()) {
  ------------------
  |  Branch (229:7): [True: 0, False: 4.47k]
  ------------------
  230|      0|      throw Invalid_Argument("EC_Point_Var_Point_Precompute scalar must be positive");
  231|      0|   }
  232|  4.47k|   if(ws.size() < EC_Point::WORKSPACE_SIZE) {
  ------------------
  |  Branch (232:7): [True: 0, False: 4.47k]
  ------------------
  233|      0|      ws.resize(EC_Point::WORKSPACE_SIZE);
  234|      0|   }
  235|       |
  236|       |   // Choose a small mask m and use k' = k + m*order (Coron's 1st countermeasure)
  237|  4.47k|   const BigInt mask(rng, blinding_size(group_order), false);
  238|  4.47k|   const BigInt scalar = k + group_order * mask;
  239|       |
  240|  4.47k|   const size_t elem_size = 3 * m_p_words;
  241|  4.47k|   const size_t window_elems = static_cast<size_t>(1) << m_window_bits;
  242|       |
  243|  4.47k|   size_t windows = round_up(scalar.bits(), m_window_bits) / m_window_bits;
  244|  4.47k|   EC_Point R(m_curve);
  245|  4.47k|   secure_vector<word> e(elem_size);
  246|       |
  247|  4.47k|   if(windows > 0) {
  ------------------
  |  Branch (247:7): [True: 4.47k, False: 0]
  ------------------
  248|  4.47k|      windows--;
  249|       |
  250|  4.47k|      const uint32_t w = scalar.get_substring(windows * m_window_bits, m_window_bits);
  251|       |
  252|  4.47k|      clear_mem(e.data(), e.size());
  253|  71.6k|      for(size_t i = 1; i != window_elems; ++i) {
  ------------------
  |  Branch (253:25): [True: 67.1k, False: 4.47k]
  ------------------
  254|  67.1k|         const auto wmask = CT::Mask<word>::is_equal(w, i);
  255|       |
  256|   872k|         for(size_t j = 0; j != elem_size; ++j) {
  ------------------
  |  Branch (256:28): [True: 805k, False: 67.1k]
  ------------------
  257|   805k|            e[j] |= wmask.if_set_return(m_T[i * elem_size + j]);
  258|   805k|         }
  259|  67.1k|      }
  260|       |
  261|  4.47k|      R.add(&e[0], m_p_words, &e[m_p_words], m_p_words, &e[2 * m_p_words], m_p_words, ws);
  262|       |
  263|       |      /*
  264|       |      Randomize after adding the first nibble as before the addition R
  265|       |      is zero, and we cannot effectively randomize the point
  266|       |      representation of the zero point.
  267|       |      */
  268|  4.47k|      R.randomize_repr(rng, ws[0].get_word_vector());
  269|  4.47k|   }
  270|       |
  271|   429k|   while(windows) {
  ------------------
  |  Branch (271:10): [True: 424k, False: 4.47k]
  ------------------
  272|   424k|      R.mult2i(m_window_bits, ws);
  273|       |
  274|   424k|      const uint32_t w = scalar.get_substring((windows - 1) * m_window_bits, m_window_bits);
  275|       |
  276|   424k|      clear_mem(e.data(), e.size());
  277|  6.79M|      for(size_t i = 1; i != window_elems; ++i) {
  ------------------
  |  Branch (277:25): [True: 6.37M, False: 424k]
  ------------------
  278|  6.37M|         const auto wmask = CT::Mask<word>::is_equal(w, i);
  279|       |
  280|  82.8M|         for(size_t j = 0; j != elem_size; ++j) {
  ------------------
  |  Branch (280:28): [True: 76.4M, False: 6.37M]
  ------------------
  281|  76.4M|            e[j] |= wmask.if_set_return(m_T[i * elem_size + j]);
  282|  76.4M|         }
  283|  6.37M|      }
  284|       |
  285|   424k|      R.add(&e[0], m_p_words, &e[m_p_words], m_p_words, &e[2 * m_p_words], m_p_words, ws);
  286|       |
  287|   424k|      windows--;
  288|   424k|   }
  289|       |
  290|  4.47k|   BOTAN_DEBUG_ASSERT(R.on_the_curve());
  ------------------
  |  |   99|  4.47k|      do {                          \
  |  |  100|  4.47k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (100:15): [Folded - Ignored]
  |  |  ------------------
  ------------------
  291|       |
  292|  4.47k|   return R;
  293|  4.47k|}
point_mul.cpp:_ZN5Botan12_GLOBAL__N_113blinding_sizeERKNS_6BigIntE:
   18|  8.21k|size_t blinding_size(const BigInt& group_order) {
   19|  8.21k|   return (group_order.bits() + 1) / 2;
   20|  8.21k|}

_ZN5Botan10ChaCha_RNGC2ENSt3__14spanIKhLm18446744073709551615EEE:
   18|      1|ChaCha_RNG::ChaCha_RNG(std::span<const uint8_t> seed) : Stateful_RNG() {
   19|      1|   m_hmac = MessageAuthenticationCode::create_or_throw("HMAC(SHA-256)");
   20|      1|   m_chacha = StreamCipher::create_or_throw("ChaCha(20)");
   21|      1|   clear();
   22|      1|   add_entropy(seed);
   23|      1|}
_ZN5Botan10ChaCha_RNG11clear_stateEv:
   48|      1|void ChaCha_RNG::clear_state() {
   49|      1|   m_hmac->set_key(std::vector<uint8_t>(m_hmac->output_length(), 0x00));
   50|      1|   m_chacha->set_key(m_hmac->final());
   51|      1|}
_ZN5Botan10ChaCha_RNG15generate_outputENSt3__14spanIhLm18446744073709551615EEENS2_IKhLm18446744073709551615EEE:
   53|  83.5k|void ChaCha_RNG::generate_output(std::span<uint8_t> output, std::span<const uint8_t> input) {
   54|  83.5k|   BOTAN_ASSERT_NOMSG(!output.empty());
  ------------------
  |  |   60|  83.5k|   do {                                                                     \
  |  |   61|  83.5k|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 83.5k]
  |  |  ------------------
  |  |   62|  83.5k|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|  83.5k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   55|       |
   56|  83.5k|   if(!input.empty()) {
  ------------------
  |  Branch (56:7): [True: 0, False: 83.5k]
  ------------------
   57|      0|      update(input);
   58|      0|   }
   59|       |
   60|  83.5k|   m_chacha->write_keystream(output);
   61|  83.5k|}
_ZN5Botan10ChaCha_RNG6updateENSt3__14spanIKhLm18446744073709551615EEE:
   63|      1|void ChaCha_RNG::update(std::span<const uint8_t> input) {
   64|      1|   m_hmac->update(input);
   65|      1|   m_chacha->set_key(m_hmac->final());
   66|      1|   const auto mac_key = m_chacha->keystream_bytes(m_hmac->output_length());
   67|      1|   m_hmac->set_key(mac_key);
   68|      1|}
_ZNK5Botan10ChaCha_RNG14security_levelEv:
   70|      1|size_t ChaCha_RNG::security_level() const {
   71|      1|   return 256;
   72|      1|}

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

_ZN5Botan6ChaChaC2Em:
   69|      1|ChaCha::ChaCha(size_t rounds) : m_rounds(rounds) {
   70|      1|   BOTAN_ARG_CHECK(m_rounds == 8 || m_rounds == 12 || m_rounds == 20, "ChaCha only supports 8, 12 or 20 rounds");
  ------------------
  |  |   30|      1|   do {                                                          \
  |  |   31|      4|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:12): [True: 0, False: 1]
  |  |  |  Branch (31:12): [True: 0, False: 1]
  |  |  |  Branch (31:12): [True: 1, False: 0]
  |  |  ------------------
  |  |   32|      1|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|      1|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   71|      1|}
_ZN5Botan6ChaCha11parallelismEv:
   73|      2|size_t ChaCha::parallelism() {
   74|      2|#if defined(BOTAN_HAS_CHACHA_AVX512)
   75|      2|   if(CPUID::has_avx512()) {
  ------------------
  |  Branch (75:7): [True: 0, False: 2]
  ------------------
   76|      0|      return 16;
   77|      0|   }
   78|      2|#endif
   79|       |
   80|      2|#if defined(BOTAN_HAS_CHACHA_AVX2)
   81|      2|   if(CPUID::has_avx2()) {
  ------------------
  |  Branch (81:7): [True: 2, False: 0]
  ------------------
   82|      2|      return 8;
   83|      2|   }
   84|      0|#endif
   85|       |
   86|      0|   return 4;
   87|      2|}
_ZN5Botan6ChaCha6chachaEPhmPjm:
  111|  4.96k|void ChaCha::chacha(uint8_t output[], size_t output_blocks, uint32_t state[16], size_t rounds) {
  112|  4.96k|   BOTAN_ASSERT(rounds % 2 == 0, "Valid rounds");
  ------------------
  |  |   51|  4.96k|   do {                                                                                 \
  |  |   52|  4.96k|      if(!(expr))                                                                       \
  |  |  ------------------
  |  |  |  Branch (52:10): [True: 0, False: 4.96k]
  |  |  ------------------
  |  |   53|  4.96k|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   54|  4.96k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (54:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  113|       |
  114|  4.96k|#if defined(BOTAN_HAS_CHACHA_AVX512)
  115|  4.96k|   if(CPUID::has_avx512()) {
  ------------------
  |  Branch (115:7): [True: 0, False: 4.96k]
  ------------------
  116|      0|      while(output_blocks >= 16) {
  ------------------
  |  Branch (116:13): [True: 0, False: 0]
  ------------------
  117|      0|         ChaCha::chacha_avx512_x16(output, state, rounds);
  118|      0|         output += 16 * 64;
  119|      0|         output_blocks -= 16;
  120|      0|      }
  121|      0|   }
  122|  4.96k|#endif
  123|       |
  124|  4.96k|#if defined(BOTAN_HAS_CHACHA_AVX2)
  125|  4.96k|   if(CPUID::has_avx2()) {
  ------------------
  |  Branch (125:7): [True: 4.96k, False: 0]
  ------------------
  126|  9.93k|      while(output_blocks >= 8) {
  ------------------
  |  Branch (126:13): [True: 4.96k, False: 4.96k]
  ------------------
  127|  4.96k|         ChaCha::chacha_avx2_x8(output, state, rounds);
  128|  4.96k|         output += 8 * 64;
  129|  4.96k|         output_blocks -= 8;
  130|  4.96k|      }
  131|  4.96k|   }
  132|  4.96k|#endif
  133|       |
  134|  4.96k|#if defined(BOTAN_HAS_CHACHA_SIMD32)
  135|  4.96k|   if(CPUID::has_simd_32()) {
  ------------------
  |  Branch (135:7): [True: 4.96k, False: 0]
  ------------------
  136|  4.96k|      while(output_blocks >= 4) {
  ------------------
  |  Branch (136:13): [True: 0, False: 4.96k]
  ------------------
  137|      0|         ChaCha::chacha_simd32_x4(output, state, rounds);
  138|      0|         output += 4 * 64;
  139|      0|         output_blocks -= 4;
  140|      0|      }
  141|  4.96k|   }
  142|  4.96k|#endif
  143|       |
  144|       |   // TODO interleave rounds
  145|  4.96k|   for(size_t i = 0; i != output_blocks; ++i) {
  ------------------
  |  Branch (145:22): [True: 0, False: 4.96k]
  ------------------
  146|      0|      uint32_t x00 = state[0], x01 = state[1], x02 = state[2], x03 = state[3], x04 = state[4], x05 = state[5],
  147|      0|               x06 = state[6], x07 = state[7], x08 = state[8], x09 = state[9], x10 = state[10], x11 = state[11],
  148|      0|               x12 = state[12], x13 = state[13], x14 = state[14], x15 = state[15];
  149|       |
  150|      0|      for(size_t r = 0; r != rounds / 2; ++r) {
  ------------------
  |  Branch (150:25): [True: 0, False: 0]
  ------------------
  151|      0|         chacha_quarter_round(x00, x04, x08, x12);
  152|      0|         chacha_quarter_round(x01, x05, x09, x13);
  153|      0|         chacha_quarter_round(x02, x06, x10, x14);
  154|      0|         chacha_quarter_round(x03, x07, x11, x15);
  155|       |
  156|      0|         chacha_quarter_round(x00, x05, x10, x15);
  157|      0|         chacha_quarter_round(x01, x06, x11, x12);
  158|      0|         chacha_quarter_round(x02, x07, x08, x13);
  159|      0|         chacha_quarter_round(x03, x04, x09, x14);
  160|      0|      }
  161|       |
  162|      0|      x00 += state[0];
  163|      0|      x01 += state[1];
  164|      0|      x02 += state[2];
  165|      0|      x03 += state[3];
  166|      0|      x04 += state[4];
  167|      0|      x05 += state[5];
  168|      0|      x06 += state[6];
  169|      0|      x07 += state[7];
  170|      0|      x08 += state[8];
  171|      0|      x09 += state[9];
  172|      0|      x10 += state[10];
  173|      0|      x11 += state[11];
  174|      0|      x12 += state[12];
  175|      0|      x13 += state[13];
  176|      0|      x14 += state[14];
  177|      0|      x15 += state[15];
  178|       |
  179|      0|      store_le(x00, output + 64 * i + 4 * 0);
  180|      0|      store_le(x01, output + 64 * i + 4 * 1);
  181|      0|      store_le(x02, output + 64 * i + 4 * 2);
  182|      0|      store_le(x03, output + 64 * i + 4 * 3);
  183|      0|      store_le(x04, output + 64 * i + 4 * 4);
  184|      0|      store_le(x05, output + 64 * i + 4 * 5);
  185|      0|      store_le(x06, output + 64 * i + 4 * 6);
  186|      0|      store_le(x07, output + 64 * i + 4 * 7);
  187|      0|      store_le(x08, output + 64 * i + 4 * 8);
  188|      0|      store_le(x09, output + 64 * i + 4 * 9);
  189|      0|      store_le(x10, output + 64 * i + 4 * 10);
  190|      0|      store_le(x11, output + 64 * i + 4 * 11);
  191|      0|      store_le(x12, output + 64 * i + 4 * 12);
  192|      0|      store_le(x13, output + 64 * i + 4 * 13);
  193|      0|      store_le(x14, output + 64 * i + 4 * 14);
  194|      0|      store_le(x15, output + 64 * i + 4 * 15);
  195|       |
  196|      0|      state[12]++;
  197|      0|      state[13] += (state[12] == 0);
  198|      0|   }
  199|  4.96k|}
_ZN5Botan6ChaCha18generate_keystreamEPhm:
  224|  83.5k|void ChaCha::generate_keystream(uint8_t out[], size_t length) {
  225|  83.5k|   assert_key_material_set();
  226|       |
  227|  88.5k|   while(length >= m_buffer.size() - m_position) {
  ------------------
  |  Branch (227:10): [True: 4.96k, False: 83.5k]
  ------------------
  228|  4.96k|      const size_t available = m_buffer.size() - m_position;
  229|       |
  230|       |      // TODO: this could write directly to the output buffer
  231|       |      // instead of bouncing it through m_buffer first
  232|  4.96k|      copy_mem(out, &m_buffer[m_position], available);
  233|  4.96k|      chacha(m_buffer.data(), m_buffer.size() / 64, m_state.data(), m_rounds);
  234|       |
  235|  4.96k|      length -= available;
  236|  4.96k|      out += available;
  237|  4.96k|      m_position = 0;
  238|  4.96k|   }
  239|       |
  240|  83.5k|   copy_mem(out, &m_buffer[m_position], length);
  241|       |
  242|  83.5k|   m_position += length;
  243|  83.5k|}
_ZN5Botan6ChaCha16initialize_stateEv:
  245|      2|void ChaCha::initialize_state() {
  246|      2|   static const uint32_t TAU[] = {0x61707865, 0x3120646e, 0x79622d36, 0x6b206574};
  247|       |
  248|      2|   static const uint32_t SIGMA[] = {0x61707865, 0x3320646e, 0x79622d32, 0x6b206574};
  249|       |
  250|      2|   m_state[4] = m_key[0];
  251|      2|   m_state[5] = m_key[1];
  252|      2|   m_state[6] = m_key[2];
  253|      2|   m_state[7] = m_key[3];
  254|       |
  255|      2|   if(m_key.size() == 4) {
  ------------------
  |  Branch (255:7): [True: 0, False: 2]
  ------------------
  256|      0|      m_state[0] = TAU[0];
  257|      0|      m_state[1] = TAU[1];
  258|      0|      m_state[2] = TAU[2];
  259|      0|      m_state[3] = TAU[3];
  260|       |
  261|      0|      m_state[8] = m_key[0];
  262|      0|      m_state[9] = m_key[1];
  263|      0|      m_state[10] = m_key[2];
  264|      0|      m_state[11] = m_key[3];
  265|      2|   } else {
  266|      2|      m_state[0] = SIGMA[0];
  267|      2|      m_state[1] = SIGMA[1];
  268|      2|      m_state[2] = SIGMA[2];
  269|      2|      m_state[3] = SIGMA[3];
  270|       |
  271|      2|      m_state[8] = m_key[4];
  272|      2|      m_state[9] = m_key[5];
  273|      2|      m_state[10] = m_key[6];
  274|      2|      m_state[11] = m_key[7];
  275|      2|   }
  276|       |
  277|      2|   m_state[12] = 0;
  278|      2|   m_state[13] = 0;
  279|      2|   m_state[14] = 0;
  280|      2|   m_state[15] = 0;
  281|       |
  282|      2|   m_position = 0;
  283|      2|}
_ZNK5Botan6ChaCha19has_keying_materialEv:
  285|  83.5k|bool ChaCha::has_keying_material() const {
  286|  83.5k|   return !m_state.empty();
  287|  83.5k|}
_ZN5Botan6ChaCha12key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
  296|      2|void ChaCha::key_schedule(std::span<const uint8_t> key) {
  297|      2|   m_key.resize(key.size() / 4);
  298|      2|   load_le<uint32_t>(m_key.data(), key.data(), m_key.size());
  299|       |
  300|      2|   m_state.resize(16);
  301|       |
  302|      2|   const size_t chacha_block = 64;
  303|      2|   m_buffer.resize(parallelism() * chacha_block);
  304|       |
  305|      2|   set_iv(nullptr, 0);
  306|      2|}
_ZNK5Botan6ChaCha8key_specEv:
  312|      2|Key_Length_Specification ChaCha::key_spec() const {
  313|      2|   return Key_Length_Specification(16, 32, 16);
  314|      2|}
_ZNK5Botan6ChaCha15valid_iv_lengthEm:
  320|      2|bool ChaCha::valid_iv_length(size_t iv_len) const {
  321|      2|   return (iv_len == 0 || iv_len == 8 || iv_len == 12 || iv_len == 24);
  ------------------
  |  Branch (321:12): [True: 2, False: 0]
  |  Branch (321:27): [True: 0, False: 0]
  |  Branch (321:42): [True: 0, False: 0]
  |  Branch (321:58): [True: 0, False: 0]
  ------------------
  322|      2|}
_ZN5Botan6ChaCha12set_iv_bytesEPKhm:
  324|      2|void ChaCha::set_iv_bytes(const uint8_t iv[], size_t length) {
  325|      2|   assert_key_material_set();
  326|       |
  327|      2|   if(!valid_iv_length(length)) {
  ------------------
  |  Branch (327:7): [True: 0, False: 2]
  ------------------
  328|      0|      throw Invalid_IV_Length(name(), length);
  329|      0|   }
  330|       |
  331|      2|   initialize_state();
  332|       |
  333|      2|   if(length == 0) {
  ------------------
  |  Branch (333:7): [True: 2, False: 0]
  ------------------
  334|       |      // Treat zero length IV same as an all-zero IV
  335|      2|      m_state[14] = 0;
  336|      2|      m_state[15] = 0;
  337|      2|   } else if(length == 8) {
  ------------------
  |  Branch (337:14): [True: 0, False: 0]
  ------------------
  338|      0|      m_state[14] = load_le<uint32_t>(iv, 0);
  339|      0|      m_state[15] = load_le<uint32_t>(iv, 1);
  340|      0|   } else if(length == 12) {
  ------------------
  |  Branch (340:14): [True: 0, False: 0]
  ------------------
  341|      0|      m_state[13] = load_le<uint32_t>(iv, 0);
  342|      0|      m_state[14] = load_le<uint32_t>(iv, 1);
  343|      0|      m_state[15] = load_le<uint32_t>(iv, 2);
  344|      0|   } else if(length == 24) {
  ------------------
  |  Branch (344:14): [True: 0, False: 0]
  ------------------
  345|      0|      m_state[12] = load_le<uint32_t>(iv, 0);
  346|      0|      m_state[13] = load_le<uint32_t>(iv, 1);
  347|      0|      m_state[14] = load_le<uint32_t>(iv, 2);
  348|      0|      m_state[15] = load_le<uint32_t>(iv, 3);
  349|       |
  350|      0|      secure_vector<uint32_t> hc(8);
  351|      0|      hchacha(hc.data(), m_state.data(), m_rounds);
  352|       |
  353|      0|      m_state[4] = hc[0];
  354|      0|      m_state[5] = hc[1];
  355|      0|      m_state[6] = hc[2];
  356|      0|      m_state[7] = hc[3];
  357|      0|      m_state[8] = hc[4];
  358|      0|      m_state[9] = hc[5];
  359|      0|      m_state[10] = hc[6];
  360|      0|      m_state[11] = hc[7];
  361|      0|      m_state[12] = 0;
  362|      0|      m_state[13] = 0;
  363|      0|      m_state[14] = load_le<uint32_t>(iv, 4);
  364|      0|      m_state[15] = load_le<uint32_t>(iv, 5);
  365|      0|   }
  366|       |
  367|      2|   chacha(m_buffer.data(), m_buffer.size() / 64, m_state.data(), m_rounds);
  368|      2|   m_position = 0;
  369|      2|}

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

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

_ZN5Botan15allocate_memoryEmm:
   20|  2.12M|BOTAN_MALLOC_FN void* allocate_memory(size_t elems, size_t elem_size) {
   21|  2.12M|   if(elems == 0 || elem_size == 0) {
  ------------------
  |  Branch (21:7): [True: 0, False: 2.12M]
  |  Branch (21:21): [True: 0, False: 2.12M]
  ------------------
   22|      0|      return nullptr;
   23|      0|   }
   24|       |
   25|       |   // Some calloc implementations do not check for overflow (?!?)
   26|       |
   27|  2.12M|   if(!BOTAN_CHECKED_MUL(elems, elem_size).has_value()) {
  ------------------
  |  |   74|  2.12M|#define BOTAN_CHECKED_MUL(x, y) checked_mul(x, y)
  ------------------
  |  Branch (27:7): [True: 0, False: 2.12M]
  ------------------
   28|      0|      throw std::bad_alloc();
   29|      0|   }
   30|       |
   31|       |#if defined(BOTAN_HAS_LOCKING_ALLOCATOR)
   32|       |   if(void* p = mlock_allocator::instance().allocate(elems, elem_size)) {
   33|       |      return p;
   34|       |   }
   35|       |#endif
   36|       |
   37|       |#if defined(BOTAN_TARGET_OS_HAS_ALLOC_CONCEAL)
   38|       |   void* ptr = ::calloc_conceal(elems, elem_size);
   39|       |#else
   40|  2.12M|   void* ptr = std::calloc(elems, elem_size);  // NOLINT(*-no-malloc)
   41|  2.12M|#endif
   42|  2.12M|   if(!ptr) {
  ------------------
  |  Branch (42:7): [True: 0, False: 2.12M]
  ------------------
   43|      0|      [[unlikely]] throw std::bad_alloc();
   44|      0|   }
   45|  2.12M|   return ptr;
   46|  2.12M|}
_ZN5Botan17deallocate_memoryEPvmm:
   48|  2.12M|void deallocate_memory(void* p, size_t elems, size_t elem_size) {
   49|  2.12M|   if(p == nullptr) {
  ------------------
  |  Branch (49:7): [True: 0, False: 2.12M]
  ------------------
   50|      0|      [[unlikely]] return;
   51|      0|   }
   52|       |
   53|  2.12M|   secure_scrub_memory(p, elems * elem_size);
   54|       |
   55|       |#if defined(BOTAN_HAS_LOCKING_ALLOCATOR)
   56|       |   if(mlock_allocator::instance().deallocate(p, elems, elem_size)) {
   57|       |      return;
   58|       |   }
   59|       |#endif
   60|       |
   61|  2.12M|   std::free(p);  // NOLINT(*-no-malloc)
   62|  2.12M|}
_ZN5Botan20initialize_allocatorEv:
   64|      1|void initialize_allocator() {
   65|       |#if defined(BOTAN_HAS_LOCKING_ALLOCATOR)
   66|       |   mlock_allocator::instance();
   67|       |#endif
   68|      1|}

_ZN5Botan5CPUID11has_simd_32Ev:
   18|  4.96k|bool CPUID::has_simd_32() {
   19|  4.96k|#if defined(BOTAN_TARGET_SUPPORTS_SSE2)
   20|  4.96k|   return CPUID::has_sse2();
   21|       |#elif defined(BOTAN_TARGET_SUPPORTS_ALTIVEC)
   22|       |   return CPUID::has_altivec();
   23|       |#elif defined(BOTAN_TARGET_SUPPORTS_NEON)
   24|       |   return CPUID::has_neon();
   25|       |#else
   26|       |   return true;
   27|       |#endif
   28|  4.96k|}
_ZN5Botan5CPUID10CPUID_DataC2Ev:
  122|      1|CPUID::CPUID_Data::CPUID_Data() {
  123|      1|   m_processor_features = 0;
  124|       |
  125|      1|#if defined(BOTAN_TARGET_CPU_IS_PPC_FAMILY) || defined(BOTAN_TARGET_CPU_IS_ARM_FAMILY) || \
  126|      1|   defined(BOTAN_TARGET_CPU_IS_X86_FAMILY)
  127|       |
  128|      1|   m_processor_features = detect_cpu_features();
  129|       |
  130|      1|#endif
  131|       |
  132|      1|   m_processor_features |= CPUID::CPUID_INITIALIZED_BIT;
  133|       |
  134|      1|   if(runtime_check_if_big_endian()) {
  ------------------
  |  Branch (134:7): [True: 0, False: 1]
  ------------------
  135|      0|      m_processor_features |= CPUID::CPUID_IS_BIG_ENDIAN_BIT;
  136|      0|   }
  137|       |
  138|      1|   std::string clear_cpuid_env;
  139|      1|   if(OS::read_env_variable(clear_cpuid_env, "BOTAN_CLEAR_CPUID")) {
  ------------------
  |  Branch (139:7): [True: 0, False: 1]
  ------------------
  140|      0|      for(const auto& cpuid : split_on(clear_cpuid_env, ',')) {
  ------------------
  |  Branch (140:29): [True: 0, False: 0]
  ------------------
  141|      0|         for(auto& bit : CPUID::bit_from_string(cpuid)) {
  ------------------
  |  Branch (141:24): [True: 0, False: 0]
  ------------------
  142|      0|            const uint32_t cleared = ~static_cast<uint32_t>(bit);
  143|      0|            m_processor_features &= cleared;
  144|      0|         }
  145|      0|      }
  146|      0|   }
  147|      1|}
cpuid.cpp:_ZN5Botan12_GLOBAL__N_127runtime_check_if_big_endianEv:
   95|      1|bool runtime_check_if_big_endian() {
   96|       |   // Check runtime endian
   97|      1|   const uint32_t endian32 = 0x01234567;
   98|      1|   const uint8_t* e8 = reinterpret_cast<const uint8_t*>(&endian32);
   99|       |
  100|      1|   bool is_big_endian = false;
  101|       |
  102|      1|   if(e8[0] == 0x01 && e8[1] == 0x23 && e8[2] == 0x45 && e8[3] == 0x67) {
  ------------------
  |  Branch (102:7): [True: 0, False: 1]
  |  Branch (102:24): [True: 0, False: 0]
  |  Branch (102:41): [True: 0, False: 0]
  |  Branch (102:58): [True: 0, False: 0]
  ------------------
  103|      0|      is_big_endian = true;
  104|      1|   } else if(e8[0] == 0x67 && e8[1] == 0x45 && e8[2] == 0x23 && e8[3] == 0x01) {
  ------------------
  |  Branch (104:14): [True: 1, False: 0]
  |  Branch (104:31): [True: 1, False: 0]
  |  Branch (104:48): [True: 1, False: 0]
  |  Branch (104:65): [True: 1, False: 0]
  ------------------
  105|      1|      is_big_endian = false;
  106|      1|   } else {
  107|      0|      throw Internal_Error("Unexpected endian at runtime, neither big nor little");
  108|      0|   }
  109|       |
  110|       |   // If we were compiled with a known endian, verify it matches at runtime
  111|      1|#if defined(BOTAN_TARGET_CPU_IS_LITTLE_ENDIAN)
  112|      1|   BOTAN_ASSERT(!is_big_endian, "Build and runtime endian match");
  ------------------
  |  |   51|      1|   do {                                                                                 \
  |  |   52|      1|      if(!(expr))                                                                       \
  |  |  ------------------
  |  |  |  Branch (52:10): [True: 0, False: 1]
  |  |  ------------------
  |  |   53|      1|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   54|      1|   } while(0)
  |  |  ------------------
  |  |  |  Branch (54:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  113|       |#elif defined(BOTAN_TARGET_CPU_IS_BIG_ENDIAN)
  114|       |   BOTAN_ASSERT(is_big_endian, "Build and runtime endian match");
  115|       |#endif
  116|       |
  117|      1|   return is_big_endian;
  118|      1|}

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

_ZN5Botan9ExceptionC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   71|  1.24k|Exception::Exception(std::string_view msg) : m_msg(msg) {}
_ZN5Botan16Invalid_ArgumentC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   77|    741|Invalid_Argument::Invalid_Argument(std::string_view msg) : Exception(msg) {}

_ZN5Botan19secure_scrub_memoryEPvm:
   87|  2.12M|void secure_scrub_memory(void* ptr, size_t n) {
   88|       |#if defined(BOTAN_TARGET_OS_HAS_RTLSECUREZEROMEMORY)
   89|       |   ::RtlSecureZeroMemory(ptr, n);
   90|       |
   91|       |#elif defined(BOTAN_TARGET_OS_HAS_EXPLICIT_BZERO)
   92|  2.12M|   ::explicit_bzero(ptr, n);
   93|       |
   94|       |#elif defined(BOTAN_TARGET_OS_HAS_EXPLICIT_MEMSET)
   95|       |   (void)::explicit_memset(ptr, 0, n);
   96|       |
   97|       |#elif defined(BOTAN_USE_VOLATILE_MEMSET_FOR_ZERO) && (BOTAN_USE_VOLATILE_MEMSET_FOR_ZERO == 1)
   98|       |   /*
   99|       |   Call memset through a static volatile pointer, which the compiler
  100|       |   should not elide. This construct should be safe in conforming
  101|       |   compilers, but who knows. I did confirm that on x86-64 GCC 6.1 and
  102|       |   Clang 3.8 both create code that saves the memset address in the
  103|       |   data segment and unconditionally loads and jumps to that address.
  104|       |   */
  105|       |   static void* (*const volatile memset_ptr)(void*, int, size_t) = std::memset;
  106|       |   (memset_ptr)(ptr, 0, n);
  107|       |#else
  108|       |
  109|       |   volatile uint8_t* p = reinterpret_cast<volatile uint8_t*>(ptr);
  110|       |
  111|       |   for(size_t i = 0; i != n; ++i)
  112|       |      p[i] = 0;
  113|       |#endif
  114|  2.12M|}
_ZN5Botan2OS14get_process_idEv:
  116|  83.5k|uint32_t OS::get_process_id() {
  117|  83.5k|#if defined(BOTAN_TARGET_OS_HAS_POSIX1)
  118|  83.5k|   return ::getpid();
  119|       |#elif defined(BOTAN_TARGET_OS_HAS_WIN32)
  120|       |   return ::GetCurrentProcessId();
  121|       |#elif defined(BOTAN_TARGET_OS_IS_LLVM) || defined(BOTAN_TARGET_OS_IS_NONE)
  122|       |   return 0;  // truly no meaningful value
  123|       |#else
  124|       |   #error "Missing get_process_id"
  125|       |#endif
  126|  83.5k|}
_ZN5Botan2OS10get_auxvalEm:
  128|      1|unsigned long OS::get_auxval(unsigned long id) {
  129|      1|#if defined(BOTAN_TARGET_OS_HAS_GETAUXVAL)
  130|      1|   return ::getauxval(id);
  131|       |#elif defined(BOTAN_TARGET_OS_IS_ANDROID) && defined(BOTAN_TARGET_ARCH_IS_ARM32)
  132|       |
  133|       |   if(id == 0)
  134|       |      return 0;
  135|       |
  136|       |   char** p = environ;
  137|       |
  138|       |   while(*p++ != nullptr)
  139|       |      ;
  140|       |
  141|       |   Elf32_auxv_t* e = reinterpret_cast<Elf32_auxv_t*>(p);
  142|       |
  143|       |   while(e != nullptr) {
  144|       |      if(e->a_type == id)
  145|       |         return e->a_un.a_val;
  146|       |      e++;
  147|       |   }
  148|       |
  149|       |   return 0;
  150|       |#elif defined(BOTAN_TARGET_OS_HAS_ELF_AUX_INFO)
  151|       |   unsigned long auxinfo = 0;
  152|       |   ::elf_aux_info(static_cast<int>(id), &auxinfo, sizeof(auxinfo));
  153|       |   return auxinfo;
  154|       |#elif defined(BOTAN_TARGET_OS_HAS_AUXINFO)
  155|       |   for(const AuxInfo* auxinfo = static_cast<AuxInfo*>(::_dlauxinfo()); auxinfo != AT_NULL; ++auxinfo) {
  156|       |      if(id == auxinfo->a_type)
  157|       |         return auxinfo->a_v;
  158|       |   }
  159|       |
  160|       |   return 0;
  161|       |#else
  162|       |   BOTAN_UNUSED(id);
  163|       |   return 0;
  164|       |#endif
  165|      1|}
_ZN5Botan2OS27running_in_privileged_stateEv:
  167|      1|bool OS::running_in_privileged_state() {
  168|      1|#if defined(AT_SECURE)
  169|      1|   return OS::get_auxval(AT_SECURE) != 0;
  170|       |#elif defined(BOTAN_TARGET_OS_HAS_POSIX1)
  171|       |   return (::getuid() != ::geteuid()) || (::getgid() != ::getegid());
  172|       |#else
  173|       |   return false;
  174|       |#endif
  175|      1|}
_ZN5Botan2OS17read_env_variableERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EE:
  409|      1|bool OS::read_env_variable(std::string& value_out, std::string_view name_view) {
  410|      1|   value_out = "";
  411|       |
  412|      1|   if(running_in_privileged_state()) {
  ------------------
  |  Branch (412:7): [True: 0, False: 1]
  ------------------
  413|      0|      return false;
  414|      0|   }
  415|       |
  416|       |#if defined(BOTAN_TARGET_OS_HAS_WIN32) && defined(BOTAN_BUILD_COMPILER_IS_MSVC)
  417|       |   const std::string name(name_view);
  418|       |   char val[128] = {0};
  419|       |   size_t req_size = 0;
  420|       |   if(getenv_s(&req_size, val, sizeof(val), name.c_str()) == 0) {
  421|       |      // Microsoft's implementation always writes a terminating \0,
  422|       |      // and includes it in the reported length of the environment variable
  423|       |      // if a value exists.
  424|       |      if(req_size > 0 && val[req_size - 1] == '\0') {
  425|       |         value_out = std::string(val);
  426|       |      } else {
  427|       |         value_out = std::string(val, req_size);
  428|       |      }
  429|       |      return true;
  430|       |   }
  431|       |#else
  432|      1|   const std::string name(name_view);
  433|      1|   if(const char* val = std::getenv(name.c_str())) {
  ------------------
  |  Branch (433:19): [True: 0, False: 1]
  ------------------
  434|      0|      value_out = val;
  435|      0|      return true;
  436|      0|   }
  437|      1|#endif
  438|       |
  439|      1|   return false;
  440|      1|}

_ZN5Botan9to_u32bitENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
   32|      1|uint32_t to_u32bit(std::string_view str_view) {
   33|      1|   const std::string str(str_view);
   34|       |
   35|       |   // std::stoul is not strict enough. Ensure that str is digit only [0-9]*
   36|      2|   for(const char chr : str) {
  ------------------
  |  Branch (36:23): [True: 2, False: 1]
  ------------------
   37|      2|      if(chr < '0' || chr > '9') {
  ------------------
  |  Branch (37:10): [True: 0, False: 2]
  |  Branch (37:23): [True: 0, False: 2]
  ------------------
   38|      0|         throw Invalid_Argument("to_u32bit invalid decimal string '" + str + "'");
   39|      0|      }
   40|      2|   }
   41|       |
   42|      1|   const unsigned long int x = std::stoul(str);
   43|       |
   44|      1|   if constexpr(sizeof(unsigned long int) > 4) {
  ------------------
  |  Branch (44:17): [Folded - Ignored]
  ------------------
   45|       |      // x might be uint64
   46|      1|      if(x > std::numeric_limits<uint32_t>::max()) {
  ------------------
  |  Branch (46:10): [True: 0, False: 1]
  ------------------
   47|      0|         throw Invalid_Argument("Integer value of " + str + " exceeds 32 bit range");
   48|      0|      }
   49|      1|   }
   50|       |
   51|      1|   return static_cast<uint32_t>(x);
   52|      1|}

_ZN5Botan9SCAN_NameC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   58|      2|SCAN_Name::SCAN_Name(std::string_view algo_spec) : m_orig_algo_spec(algo_spec), m_alg_name(), m_args(), m_mode_info() {
   59|      2|   if(algo_spec.empty()) {
  ------------------
  |  Branch (59:7): [True: 0, False: 2]
  ------------------
   60|      0|      throw Invalid_Argument("Expected algorithm name, got empty string");
   61|      0|   }
   62|       |
   63|      2|   std::vector<std::pair<size_t, std::string>> name;
   64|      2|   size_t level = 0;
   65|      2|   std::pair<size_t, std::string> accum = std::make_pair(level, "");
   66|       |
   67|      2|   const std::string decoding_error = "Bad SCAN name '" + m_orig_algo_spec + "': ";
   68|       |
   69|     23|   for(char c : algo_spec) {
  ------------------
  |  Branch (69:15): [True: 23, False: 2]
  ------------------
   70|     23|      if(c == '/' || c == ',' || c == '(' || c == ')') {
  ------------------
  |  Branch (70:10): [True: 0, False: 23]
  |  Branch (70:22): [True: 0, False: 23]
  |  Branch (70:34): [True: 2, False: 21]
  |  Branch (70:46): [True: 2, False: 19]
  ------------------
   71|      4|         if(c == '(') {
  ------------------
  |  Branch (71:13): [True: 2, False: 2]
  ------------------
   72|      2|            ++level;
   73|      2|         } else if(c == ')') {
  ------------------
  |  Branch (73:20): [True: 2, False: 0]
  ------------------
   74|      2|            if(level == 0) {
  ------------------
  |  Branch (74:16): [True: 0, False: 2]
  ------------------
   75|      0|               throw Decoding_Error(decoding_error + "Mismatched parens");
   76|      0|            }
   77|      2|            --level;
   78|      2|         }
   79|       |
   80|      4|         if(c == '/' && level > 0) {
  ------------------
  |  Branch (80:13): [True: 0, False: 4]
  |  Branch (80:25): [True: 0, False: 0]
  ------------------
   81|      0|            accum.second.push_back(c);
   82|      4|         } else {
   83|      4|            if(!accum.second.empty()) {
  ------------------
  |  Branch (83:16): [True: 4, False: 0]
  ------------------
   84|      4|               name.push_back(accum);
   85|      4|            }
   86|      4|            accum = std::make_pair(level, "");
   87|      4|         }
   88|     19|      } else {
   89|     19|         accum.second.push_back(c);
   90|     19|      }
   91|     23|   }
   92|       |
   93|      2|   if(!accum.second.empty()) {
  ------------------
  |  Branch (93:7): [True: 0, False: 2]
  ------------------
   94|      0|      name.push_back(accum);
   95|      0|   }
   96|       |
   97|      2|   if(level != 0) {
  ------------------
  |  Branch (97:7): [True: 0, False: 2]
  ------------------
   98|      0|      throw Decoding_Error(decoding_error + "Missing close paren");
   99|      0|   }
  100|       |
  101|      2|   if(name.empty()) {
  ------------------
  |  Branch (101:7): [True: 0, False: 2]
  ------------------
  102|      0|      throw Decoding_Error(decoding_error + "Empty name");
  103|      0|   }
  104|       |
  105|      2|   m_alg_name = name[0].second;
  106|       |
  107|      2|   bool in_modes = false;
  108|       |
  109|      4|   for(size_t i = 1; i != name.size(); ++i) {
  ------------------
  |  Branch (109:22): [True: 2, False: 2]
  ------------------
  110|      2|      if(name[i].first == 0) {
  ------------------
  |  Branch (110:10): [True: 0, False: 2]
  ------------------
  111|      0|         m_mode_info.push_back(make_arg(name, i));
  112|      0|         in_modes = true;
  113|      2|      } else if(name[i].first == 1 && !in_modes) {
  ------------------
  |  Branch (113:17): [True: 2, False: 0]
  |  Branch (113:39): [True: 2, False: 0]
  ------------------
  114|      2|         m_args.push_back(make_arg(name, i));
  115|      2|      }
  116|      2|   }
  117|      2|}
_ZNK5Botan9SCAN_Name3argEm:
  119|      1|std::string SCAN_Name::arg(size_t i) const {
  120|      1|   if(i >= arg_count()) {
  ------------------
  |  Branch (120:7): [True: 0, False: 1]
  ------------------
  121|      0|      throw Invalid_Argument("SCAN_Name::arg " + std::to_string(i) + " out of range for '" + to_string() + "'");
  122|      0|   }
  123|      1|   return m_args[i];
  124|      1|}
_ZNK5Botan9SCAN_Name14arg_as_integerEmm:
  133|      1|size_t SCAN_Name::arg_as_integer(size_t i, size_t def_value) const {
  134|      1|   if(i >= arg_count()) {
  ------------------
  |  Branch (134:7): [True: 0, False: 1]
  ------------------
  135|      0|      return def_value;
  136|      0|   }
  137|      1|   return to_u32bit(m_args[i]);
  138|      1|}
scan_name.cpp:_ZN5Botan12_GLOBAL__N_18make_argERKNSt3__16vectorINS1_4pairImNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEENS7_ISA_EEEEm:
   17|      2|std::string make_arg(const std::vector<std::pair<size_t, std::string>>& name, size_t start) {
   18|      2|   std::string output = name[start].second;
   19|      2|   size_t level = name[start].first;
   20|       |
   21|      2|   size_t paren_depth = 0;
   22|       |
   23|      2|   for(size_t i = start + 1; i != name.size(); ++i) {
  ------------------
  |  Branch (23:30): [True: 0, False: 2]
  ------------------
   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|      2|   for(size_t i = 0; i != paren_depth; ++i) {
  ------------------
  |  Branch (47:22): [True: 0, False: 2]
  ------------------
   48|      0|      output += ")";
   49|      0|   }
   50|       |
   51|      2|   return output;
   52|      2|}

