_ZN5Botan17ct_expand_top_bitITkNSt3__117unsigned_integralEmEET_S2_:
   28|  45.5k|BOTAN_FORCE_INLINE constexpr T ct_expand_top_bit(T a) {
   29|  45.5k|   const T top = CT::value_barrier<T>(a >> (sizeof(T) * 8 - 1));
   30|  45.5k|   return static_cast<T>(0) - top;
   31|  45.5k|}
_ZN5Botan6chooseITkNSt3__117unsigned_integralEmEET_S2_S2_S2_:
  216|  25.7k|BOTAN_FORCE_INLINE constexpr T choose(T mask, T a, T b) {
  217|       |   //return (mask & a) | (~mask & b);
  218|  25.7k|   return (b ^ (mask & (a ^ b)));
  219|  25.7k|}
_ZN5Botan10ct_is_zeroITkNSt3__117unsigned_integralEmEET_S2_:
   37|  29.8k|BOTAN_FORCE_INLINE constexpr T ct_is_zero(T x) {
   38|  29.8k|   return ct_expand_top_bit<T>(~x & (x - 1));
   39|  29.8k|}

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

_ZN5Botan2CT4MaskImE8is_equalEmm:
  442|  15.6k|      static constexpr Mask<T> is_equal(T x, T y) {
  443|  15.6k|         const T diff = value_barrier(x) ^ value_barrier(y);
  444|  15.6k|         return Mask<T>::is_zero(diff);
  445|  15.6k|      }
_ZN5Botan2CT4MaskImE5is_ltEmm:
  450|  15.6k|      static constexpr Mask<T> is_lt(T x, T y) {
  451|  15.6k|         T u = x ^ ((x ^ y) | ((x - y) ^ x));
  452|  15.6k|         return Mask<T>::expand_top_bit(u);
  453|  15.6k|      }
_ZN5Botan2CT4MaskImE14expand_top_bitEm:
  415|  15.6k|      static constexpr Mask<T> expand_top_bit(T v) { return Mask<T>(ct_expand_top_bit<T>(v)); }
_ZN5Botan2CT4MaskImEC2Em:
  637|  39.3k|      constexpr explicit Mask(T m) : m_mask(m) {}
_ZNK5Botan2CT4MaskImE6selectEmm:
  548|  25.7k|      constexpr T select(T x, T y) const { return choose(value(), x, y); }
_ZNK5Botan2CT4MaskImE5valueEv:
  630|  39.3k|      constexpr T value() const { return value_barrier<T>(m_mask); }
_ZN5Botan2CT4MaskImE7is_zeroEm:
  437|  17.0k|      static constexpr Mask<T> is_zero(T x) { return Mask<T>(ct_is_zero<T>(value_barrier<T>(x))); }
_ZN5Botan2CT8unpoisonITkNSt3__18integralEmEEvRKT_:
  112|  4.53k|constexpr void unpoison(const T& p) {
  113|  4.53k|   unpoison(&p, 1);
  114|  4.53k|}
_ZN5Botan2CT8unpoisonImEEvPKT_m:
   67|  6.10k|constexpr inline void unpoison(const T* p, size_t n) {
   68|       |#if defined(BOTAN_HAS_VALGRIND)
   69|       |   if(!std::is_constant_evaluated()) {
   70|       |      VALGRIND_MAKE_MEM_DEFINED(p, n * sizeof(T));
   71|       |   }
   72|       |#endif
   73|       |
   74|  6.10k|   BOTAN_UNUSED(p, n);
  ------------------
  |  |  144|  6.10k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   75|  6.10k|}
_ZN5Botan2CT4MaskImE6expandEm:
  392|    738|      static constexpr Mask<T> expand(T v) { return ~Mask<T>::is_zero(value_barrier<T>(v)); }
_ZNK5Botan2CT4MaskImEcoEv:
  533|    738|      constexpr Mask<T> operator~() const { return Mask<T>(~value()); }
_ZNK5Botan2CT4MaskImE7as_boolEv:
  614|  1.10k|      constexpr bool as_bool() const { return unpoisoned_value() != 0; }
_ZNK5Botan2CT4MaskImE16unpoisoned_valueEv:
  598|  1.10k|      constexpr T unpoisoned_value() const {
  599|  1.10k|         T r = value();
  600|  1.10k|         CT::unpoison(r);
  601|  1.10k|         return r;
  602|  1.10k|      }
_ZNK5Botan2CT4MaskImE11select_maskES2_S2_:
  559|  5.90k|      Mask<T> select_mask(Mask<T> x, Mask<T> y) const { return Mask<T>(select(x.value(), y.value())); }

_ZN5Botan11checked_mulITkNSt3__117unsigned_integralEmEENS1_8optionalIT_EES3_S3_:
   46|  1.56k|constexpr inline std::optional<T> checked_mul(T a, T b) {
   47|       |   // Multiplication by 1U is a hack to work around C's insane
   48|       |   // integer promotion rules.
   49|       |   // https://stackoverflow.com/questions/24795651
   50|  1.56k|   const T r = (1U * a) * b;
   51|       |   // If a == 0 then the multiply certainly did not overflow
   52|       |   // Otherwise r / a == b unless overflow occurred
   53|  1.56k|   if(a != 0 && r / a != b) {
  ------------------
  |  Branch (53:7): [True: 1.56k, False: 0]
  |  Branch (53:17): [True: 0, False: 1.56k]
  ------------------
   54|      0|      return {};
   55|      0|   }
   56|  1.56k|   return r;
   57|  1.56k|}

_ZN5Botan7load_beImJNSt3__14spanIKhLm8EEEEEEDaDpOT0_:
  504|    559|inline constexpr auto load_be(ParamTs&&... params) {
  505|    559|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|    559|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|    559|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|    559|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|    559|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|    559|   return detail::wrap_strong_type_or_enum<WrappedOutT>([&]() -> OutT {
  283|       |      // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  284|       |      // internally to copy ranges on a byte-by-byte basis, which is not allowed
  285|       |      // in a `constexpr` context.
  286|    559|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|    559|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|    559|      } else {
  289|    559|         const std::span in{in_range};
  290|    559|         if constexpr(sizeof(OutT) == 1) {
  291|    559|            return static_cast<OutT>(in[0]);
  292|    559|         } else if constexpr(endianness == std::endian::native) {
  293|    559|            return typecast_copy<OutT>(in);
  294|    559|         } else {
  295|    559|            static_assert(opposite(endianness) == std::endian::native);
  296|    559|            return reverse_bytes(typecast_copy<OutT>(in));
  297|    559|         }
  298|    559|      }
  299|    559|   }());
  300|    559|}
_ZN5Botan6detail24wrap_strong_type_or_enumITkNS0_20unsigned_integralishEmTkNSt3__117unsigned_integralEmEEDaT0_:
  200|  1.13k|constexpr auto wrap_strong_type_or_enum(T t) {
  201|       |   if constexpr(std::is_enum_v<OutT>) {
  202|       |      return static_cast<OutT>(t);
  203|  1.13k|   } else {
  204|  1.13k|      return Botan::wrap_strong_type<OutT>(t);
  205|  1.13k|   }
  206|  1.13k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|    559|   return detail::wrap_strong_type_or_enum<WrappedOutT>([&]() -> OutT {
  283|       |      // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  284|       |      // internally to copy ranges on a byte-by-byte basis, which is not allowed
  285|       |      // in a `constexpr` context.
  286|    559|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 559]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|    559|      } else {
  289|    559|         const std::span in{in_range};
  290|       |         if constexpr(sizeof(OutT) == 1) {
  291|       |            return static_cast<OutT>(in[0]);
  292|       |         } else if constexpr(endianness == std::endian::native) {
  293|       |            return typecast_copy<OutT>(in);
  294|    559|         } else {
  295|    559|            static_assert(opposite(endianness) == std::endian::native);
  296|    559|            return reverse_bytes(typecast_copy<OutT>(in));
  297|    559|         }
  298|    559|      }
  299|    559|   }());
_ZN5Botan7load_beImJRNSt3__15arrayIhLm8EEEEEEDaDpOT0_:
  504|    571|inline constexpr auto load_be(ParamTs&&... params) {
  505|    571|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|    571|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEERNS2_5arrayIhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|    571|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|    571|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|    571|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|    571|   return detail::wrap_strong_type_or_enum<WrappedOutT>([&]() -> OutT {
  283|       |      // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  284|       |      // internally to copy ranges on a byte-by-byte basis, which is not allowed
  285|       |      // in a `constexpr` context.
  286|    571|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|    571|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|    571|      } else {
  289|    571|         const std::span in{in_range};
  290|    571|         if constexpr(sizeof(OutT) == 1) {
  291|    571|            return static_cast<OutT>(in[0]);
  292|    571|         } else if constexpr(endianness == std::endian::native) {
  293|    571|            return typecast_copy<OutT>(in);
  294|    571|         } else {
  295|    571|            static_assert(opposite(endianness) == std::endian::native);
  296|    571|            return reverse_bytes(typecast_copy<OutT>(in));
  297|    571|         }
  298|    571|      }
  299|    571|   }());
  300|    571|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEERNS2_5arrayIhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|    571|   return detail::wrap_strong_type_or_enum<WrappedOutT>([&]() -> OutT {
  283|       |      // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  284|       |      // internally to copy ranges on a byte-by-byte basis, which is not allowed
  285|       |      // in a `constexpr` context.
  286|    571|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 571]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|    571|      } else {
  289|    571|         const std::span in{in_range};
  290|       |         if constexpr(sizeof(OutT) == 1) {
  291|       |            return static_cast<OutT>(in[0]);
  292|       |         } else if constexpr(endianness == std::endian::native) {
  293|       |            return typecast_copy<OutT>(in);
  294|    571|         } else {
  295|    571|            static_assert(opposite(endianness) == std::endian::native);
  296|    571|            return reverse_bytes(typecast_copy<OutT>(in));
  297|    571|         }
  298|    571|      }
  299|    571|   }());

_ZN5Botan10word8_add3ITkNS_8WordTypeEmEET_PS1_PKS1_S4_S1_:
  294|      2|inline constexpr auto word8_add3(W z[8], const W x[8], const W y[8], W carry) -> W {
  295|      2|#if defined(BOTAN_MP_USE_X86_64_ASM)
  296|      2|   if(std::same_as<W, uint64_t> && !std::is_constant_evaluated()) {
  ------------------
  |  Branch (296:7): [True: 0, Folded]
  |  Branch (296:36): [True: 0, Folded]
  ------------------
  297|      2|      asm volatile(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB3_OP, "adcq"))
  298|      2|                   : [carry] "=r"(carry)
  299|      2|                   : [x] "r"(x), [y] "r"(y), [z] "r"(z), "0"(carry)
  300|      2|                   : "cc", "memory");
  301|      2|      return carry;
  302|      2|   }
  303|      0|#endif
  304|       |
  305|      0|   z[0] = word_add(x[0], y[0], &carry);
  306|      0|   z[1] = word_add(x[1], y[1], &carry);
  307|      0|   z[2] = word_add(x[2], y[2], &carry);
  308|      0|   z[3] = word_add(x[3], y[3], &carry);
  309|      0|   z[4] = word_add(x[4], y[4], &carry);
  310|      0|   z[5] = word_add(x[5], y[5], &carry);
  311|      0|   z[6] = word_add(x[6], y[6], &carry);
  312|      0|   z[7] = word_add(x[7], y[7], &carry);
  313|      0|   return carry;
  314|      2|}
_ZN5Botan8word_addITkNS_8WordTypeEmEET_S1_S1_PS1_:
  231|    142|inline constexpr auto word_add(W x, W y, W* carry) -> W {
  232|    142|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_addc)
  233|    142|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (233:7): [True: 142, Folded]
  ------------------
  234|       |      if constexpr(std::same_as<W, unsigned int>) {
  235|       |         return __builtin_addc(x, y, *carry & 1, carry);
  236|    142|      } else if constexpr(std::same_as<W, unsigned long>) {
  237|    142|         return __builtin_addcl(x, y, *carry & 1, carry);
  238|       |      } else if constexpr(std::same_as<W, unsigned long long>) {
  239|       |         return __builtin_addcll(x, y, *carry & 1, carry);
  240|       |      }
  241|    142|   }
  242|      0|#endif
  243|       |
  244|       |   if constexpr(WordInfo<W>::dword_is_native && use_dword_for_word_add) {
  245|       |      /*
  246|       |      TODO(Botan4) this is largely a performance hack for GCCs that don't
  247|       |      support __builtin_addc, if we increase the minimum supported version of
  248|       |      GCC to GCC 14 then we can remove this and not worry about it
  249|       |      */
  250|       |      const W cb = *carry & 1;
  251|       |      const auto s = typename WordInfo<W>::dword(x) + y + cb;
  252|       |      *carry = static_cast<W>(s >> WordInfo<W>::bits);
  253|       |      return static_cast<W>(s);
  254|    142|   } else {
  255|    142|      const W cb = *carry & 1;
  256|    142|      W z = x + y;
  257|    142|      W c1 = (z < x);
  258|    142|      z += cb;
  259|    142|      *carry = c1 | (z < cb);
  260|    142|      return z;
  261|    142|   }
  262|    142|}
_ZN5Botan10word8_sub3ITkNS_8WordTypeEmEET_PS1_PKS1_S4_S1_:
  371|      4|inline constexpr auto word8_sub3(W z[8], const W x[8], const W y[8], W carry) -> W {
  372|      4|#if defined(BOTAN_MP_USE_X86_64_ASM)
  373|      4|   if(std::same_as<W, uint64_t> && !std::is_constant_evaluated()) {
  ------------------
  |  Branch (373:7): [True: 0, Folded]
  |  Branch (373:36): [True: 0, Folded]
  ------------------
  374|      4|      asm volatile(ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB3_OP, "sbbq"))
  375|      4|                   : [carry] "=r"(carry)
  376|      4|                   : [x] "r"(x), [y] "r"(y), [z] "r"(z), "0"(carry)
  377|      4|                   : "cc", "memory");
  378|      4|      return carry;
  379|      4|   }
  380|      0|#endif
  381|       |
  382|      0|   z[0] = word_sub(x[0], y[0], &carry);
  383|      0|   z[1] = word_sub(x[1], y[1], &carry);
  384|      0|   z[2] = word_sub(x[2], y[2], &carry);
  385|      0|   z[3] = word_sub(x[3], y[3], &carry);
  386|      0|   z[4] = word_sub(x[4], y[4], &carry);
  387|      0|   z[5] = word_sub(x[5], y[5], &carry);
  388|      0|   z[6] = word_sub(x[6], y[6], &carry);
  389|      0|   z[7] = word_sub(x[7], y[7], &carry);
  390|      0|   return carry;
  391|      4|}
_ZN5Botan8word_subITkNS_8WordTypeEmEET_S1_S1_PS1_:
  320|    950|inline constexpr auto word_sub(W x, W y, W* carry) -> W {
  321|    950|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_subc)
  322|    950|   if(!std::is_constant_evaluated()) {
  ------------------
  |  Branch (322:7): [True: 950, Folded]
  ------------------
  323|       |      if constexpr(std::same_as<W, unsigned int>) {
  324|       |         return __builtin_subc(x, y, *carry & 1, carry);
  325|    950|      } else if constexpr(std::same_as<W, unsigned long>) {
  326|    950|         return __builtin_subcl(x, y, *carry & 1, carry);
  327|       |      } else if constexpr(std::same_as<W, unsigned long long>) {
  328|       |         return __builtin_subcll(x, y, *carry & 1, carry);
  329|       |      }
  330|    950|   }
  331|      0|#endif
  332|       |
  333|      0|   const W cb = *carry & 1;
  334|    950|   W t0 = x - y;
  335|    950|   W c1 = (t0 > x);
  336|    950|   W z = t0 - cb;
  337|    950|   *carry = c1 | (z > t0);
  338|    950|   return z;
  339|    950|}

_ZN5Botan11bigint_add3ITkNS_8WordTypeEmEET_PS1_PKS1_mS4_m:
  120|     55|inline constexpr auto bigint_add3(W z[], const W x[], size_t x_size, const W y[], size_t y_size) -> W {
  121|     55|   if(x_size < y_size) {
  ------------------
  |  Branch (121:7): [True: 11, False: 44]
  ------------------
  122|     11|      return bigint_add3(z, y, y_size, x, x_size);
  123|     11|   }
  124|       |
  125|     44|   W carry = 0;
  126|       |
  127|     44|   const size_t blocks = y_size - (y_size % 8);
  128|       |
  129|     46|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (129:22): [True: 2, False: 44]
  ------------------
  130|      2|      carry = word8_add3(z + i, x + i, y + i, carry);
  131|      2|   }
  132|       |
  133|    150|   for(size_t i = blocks; i != y_size; ++i) {
  ------------------
  |  Branch (133:27): [True: 106, False: 44]
  ------------------
  134|    106|      z[i] = word_add(x[i], y[i], &carry);
  135|    106|   }
  136|       |
  137|     80|   for(size_t i = y_size; i != x_size; ++i) {
  ------------------
  |  Branch (137:27): [True: 36, False: 44]
  ------------------
  138|     36|      z[i] = word_add(x[i], static_cast<W>(0), &carry);
  139|     36|   }
  140|       |
  141|     44|   return carry;
  142|     55|}
_ZN5Botan10bigint_cmpITkNS_8WordTypeEmEEiPKT_mS3_m:
  439|  1.86k|inline constexpr int32_t bigint_cmp(const W x[], size_t x_size, const W y[], size_t y_size) {
  440|  1.86k|   static_assert(sizeof(W) >= sizeof(uint32_t), "Size assumption");
  441|       |
  442|  1.86k|   const W LT = static_cast<W>(-1);
  443|  1.86k|   const W EQ = 0;
  444|  1.86k|   const W GT = 1;
  445|       |
  446|  1.86k|   const size_t common_elems = std::min(x_size, y_size);
  447|       |
  448|  1.86k|   W result = EQ;  // until found otherwise
  449|       |
  450|  11.6k|   for(size_t i = 0; i != common_elems; i++) {
  ------------------
  |  Branch (450:22): [True: 9.78k, False: 1.86k]
  ------------------
  451|  9.78k|      const auto is_eq = CT::Mask<W>::is_equal(x[i], y[i]);
  452|  9.78k|      const auto is_lt = CT::Mask<W>::is_lt(x[i], y[i]);
  453|       |
  454|  9.78k|      result = is_eq.select(result, is_lt.select(LT, GT));
  455|  9.78k|   }
  456|       |
  457|  1.86k|   if(x_size < y_size) {
  ------------------
  |  Branch (457:7): [True: 141, False: 1.72k]
  ------------------
  458|    141|      W mask = 0;
  459|    320|      for(size_t i = x_size; i != y_size; i++) {
  ------------------
  |  Branch (459:30): [True: 179, False: 141]
  ------------------
  460|    179|         mask |= y[i];
  461|    179|      }
  462|       |
  463|       |      // If any bits were set in high part of y, then x < y
  464|    141|      result = CT::Mask<W>::is_zero(mask).select(result, LT);
  465|  1.72k|   } else if(y_size < x_size) {
  ------------------
  |  Branch (465:14): [True: 141, False: 1.58k]
  ------------------
  466|    141|      W mask = 0;
  467|    320|      for(size_t i = y_size; i != x_size; i++) {
  ------------------
  |  Branch (467:30): [True: 179, False: 141]
  ------------------
  468|    179|         mask |= x[i];
  469|    179|      }
  470|       |
  471|       |      // If any bits were set in high part of x, then x > y
  472|    141|      result = CT::Mask<W>::is_zero(mask).select(result, GT);
  473|    141|   }
  474|       |
  475|  1.86k|   CT::unpoison(result);
  476|  1.86k|   BOTAN_DEBUG_ASSERT(result == LT || result == GT || result == EQ);
  ------------------
  |  |  130|  1.86k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  1.86k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 1.86k]
  |  |  ------------------
  ------------------
  477|  1.86k|   return static_cast<int32_t>(result);
  478|  1.86k|}
_ZN5Botan11bigint_sub3ITkNS_8WordTypeEmEET_PS1_PKS1_mS4_m:
  192|    732|inline constexpr auto bigint_sub3(W z[], const W x[], size_t x_size, const W y[], size_t y_size) -> W {
  193|    732|   W borrow = 0;
  194|       |
  195|    732|   BOTAN_ASSERT(x_size >= y_size, "Expected sizes");
  ------------------
  |  |   64|    732|   do {                                                                                 \
  |  |   65|    732|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                     \
  |  |   66|    732|      if(!(expr)) {                                                                     \
  |  |  ------------------
  |  |  |  Branch (66:10): [True: 0, False: 732]
  |  |  ------------------
  |  |   67|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                            \
  |  |   68|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   69|      0|      }                                                                                 \
  |  |   70|    732|   } while(0)
  |  |  ------------------
  |  |  |  Branch (70:12): [Folded, False: 732]
  |  |  ------------------
  ------------------
  196|       |
  197|    732|   const size_t blocks = y_size - (y_size % 8);
  198|       |
  199|    736|   for(size_t i = 0; i != blocks; i += 8) {
  ------------------
  |  Branch (199:22): [True: 4, False: 732]
  ------------------
  200|      4|      borrow = word8_sub3(z + i, x + i, y + i, borrow);
  201|      4|   }
  202|       |
  203|  1.32k|   for(size_t i = blocks; i != y_size; ++i) {
  ------------------
  |  Branch (203:27): [True: 592, False: 732]
  ------------------
  204|    592|      z[i] = word_sub(x[i], y[i], &borrow);
  205|    592|   }
  206|       |
  207|  1.09k|   for(size_t i = y_size; i != x_size; ++i) {
  ------------------
  |  Branch (207:27): [True: 358, False: 732]
  ------------------
  208|    358|      z[i] = word_sub(x[i], static_cast<W>(0), &borrow);
  209|    358|   }
  210|       |
  211|    732|   return borrow;
  212|    732|}
_ZN5Botan15bigint_ct_is_eqITkNS_8WordTypeEmEENS_2CT4MaskIT_EEPKS3_mS6_m:
  519|    369|inline constexpr auto bigint_ct_is_eq(const W x[], size_t x_size, const W y[], size_t y_size) -> CT::Mask<W> {
  520|    369|   const size_t common_elems = std::min(x_size, y_size);
  521|       |
  522|    369|   W diff = 0;
  523|       |
  524|  3.32k|   for(size_t i = 0; i != common_elems; i++) {
  ------------------
  |  Branch (524:22): [True: 2.95k, False: 369]
  ------------------
  525|  2.95k|      diff |= (x[i] ^ y[i]);
  526|  2.95k|   }
  527|       |
  528|       |   // If any bits were set in high part of x/y, then they are not equal
  529|    369|   if(x_size < y_size) {
  ------------------
  |  Branch (529:7): [True: 0, False: 369]
  ------------------
  530|      0|      for(size_t i = x_size; i != y_size; i++) {
  ------------------
  |  Branch (530:30): [True: 0, False: 0]
  ------------------
  531|      0|         diff |= y[i];
  532|      0|      }
  533|    369|   } else if(y_size < x_size) {
  ------------------
  |  Branch (533:14): [True: 0, False: 369]
  ------------------
  534|      0|      for(size_t i = y_size; i != x_size; i++) {
  ------------------
  |  Branch (534:30): [True: 0, False: 0]
  ------------------
  535|      0|         diff |= x[i];
  536|      0|      }
  537|      0|   }
  538|       |
  539|    369|   return CT::Mask<W>::is_zero(diff);
  540|    369|}
_ZN5Botan15bigint_ct_is_ltITkNS_8WordTypeEmEENS_2CT4MaskIT_EEPKS3_mS6_mb:
  487|    738|   -> CT::Mask<W> {
  488|    738|   const size_t common_elems = std::min(x_size, y_size);
  489|       |
  490|    738|   auto is_lt = CT::Mask<W>::expand(lt_or_equal);
  491|       |
  492|  6.64k|   for(size_t i = 0; i != common_elems; i++) {
  ------------------
  |  Branch (492:22): [True: 5.90k, False: 738]
  ------------------
  493|  5.90k|      const auto eq = CT::Mask<W>::is_equal(x[i], y[i]);
  494|  5.90k|      const auto lt = CT::Mask<W>::is_lt(x[i], y[i]);
  495|  5.90k|      is_lt = eq.select_mask(is_lt, lt);
  496|  5.90k|   }
  497|       |
  498|    738|   if(x_size < y_size) {
  ------------------
  |  Branch (498:7): [True: 0, False: 738]
  ------------------
  499|      0|      W mask = 0;
  500|      0|      for(size_t i = x_size; i != y_size; i++) {
  ------------------
  |  Branch (500:30): [True: 0, False: 0]
  ------------------
  501|      0|         mask |= y[i];
  502|      0|      }
  503|       |      // If any bits were set in high part of y, then is_lt should be forced true
  504|      0|      is_lt |= CT::Mask<W>::expand(mask);
  505|    738|   } else if(y_size < x_size) {
  ------------------
  |  Branch (505:14): [True: 0, False: 738]
  ------------------
  506|      0|      W mask = 0;
  507|      0|      for(size_t i = y_size; i != x_size; i++) {
  ------------------
  |  Branch (507:30): [True: 0, False: 0]
  ------------------
  508|      0|         mask |= x[i];
  509|      0|      }
  510|       |
  511|       |      // If any bits were set in high part of x, then is_lt should be false
  512|      0|      is_lt &= CT::Mask<W>::is_zero(mask);
  513|      0|   }
  514|       |
  515|    738|   return is_lt;
  516|    738|}

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

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

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

_ZN5Botan6BigInt9flip_signEv:
  619|    319|      BOTAN_DEPRECATED("Deprecated no replacement") void flip_sign() { set_sign(reverse_sign()); }
_ZN5Botan6BigInt8set_signENS0_4SignE:
  625|  1.09k|      void set_sign(Sign sign) {
  626|  1.09k|         if(sign == Negative && is_zero()) {
  ------------------
  |  Branch (626:13): [True: 707, False: 388]
  |  Branch (626:33): [True: 19, False: 688]
  ------------------
  627|     19|            sign = Positive;
  628|     19|         }
  629|       |
  630|  1.09k|         m_signedness = sign;
  631|  1.09k|      }
_ZNK5Botan6BigInt12reverse_signEv:
  609|  1.10k|      Sign reverse_sign() const {
  610|  1.10k|         if(sign() == Positive) {
  ------------------
  |  Branch (610:13): [True: 801, False: 300]
  ------------------
  611|    801|            return Negative;
  612|    801|         }
  613|    300|         return Positive;
  614|  1.10k|      }
_ZNK5Botan6BigInt4signEv:
  604|  10.4k|      Sign sign() const { return (m_signedness); }
_ZN5BotanmiERKNS_6BigIntES2_:
 1137|    782|inline BigInt operator-(const BigInt& x, const BigInt& y) {
 1138|    782|   return BigInt::add2(x, y._data(), y.sig_words(), y.reverse_sign());
 1139|    782|}
_ZNK5Botan6BigInt5_dataEv:
  972|  5.29k|      const word* _data() const { return m_data.const_data(); }
_ZNK5Botan6BigInt4Data10const_dataEv:
 1027|  8.33k|            const word* const_data() const { return m_reg.data(); }
_ZNK5Botan6BigInt9sig_wordsEv:
  648|  10.5k|      size_t sig_words() const { return m_data.sig_words(); }
_ZNK5Botan6BigInt4Data9sig_wordsEv:
 1102|  10.5k|            size_t sig_words() const {
 1103|  10.5k|               if(m_sig_words == sig_words_npos) {
  ------------------
  |  Branch (1103:19): [True: 1.56k, False: 8.95k]
  ------------------
 1104|  1.56k|                  m_sig_words = calc_sig_words();
 1105|  1.56k|               }
 1106|  10.5k|               return m_sig_words;
 1107|  10.5k|            }
_ZN5BotaneqERKNS_6BigIntES2_:
 1162|    391|inline bool operator==(const BigInt& a, const BigInt& b) {
 1163|    391|   return a.is_equal(b);
 1164|    391|}
_ZN5BotanltERKNS_6BigIntES2_:
 1178|    391|inline bool operator<(const BigInt& a, const BigInt& b) {
 1179|    391|   return a.is_less_than(b);
 1180|    391|}
_ZN5BotangtERKNS_6BigIntES2_:
 1182|    391|inline bool operator>(const BigInt& a, const BigInt& b) {
 1183|    391|   return b.is_less_than(a);
 1184|    391|}
_ZN5BotanleERKNS_6BigIntES2_:
 1170|    391|inline bool operator<=(const BigInt& a, const BigInt& b) {
 1171|    391|   return (a.cmp(b) <= 0);
 1172|    391|}
_ZN5BotangeERKNS_6BigIntES2_:
 1174|    391|inline bool operator>=(const BigInt& a, const BigInt& b) {
 1175|    391|   return (a.cmp(b) >= 0);
 1176|    391|}
_ZNK5Botan6BigInt7is_zeroEv:
  484|    713|      bool is_zero() const { return sig_words() == 0; }
_ZNK5Botan6BigInt6signumEv:
  467|  8.23k|      int signum() const {
  468|  8.23k|         if(sig_words() == 0) {
  ------------------
  |  Branch (468:13): [True: 836, False: 7.40k]
  ------------------
  469|    836|            return 0;
  470|    836|         }
  471|  7.40k|         return (sign() == Negative) ? -1 : 1;
  ------------------
  |  Branch (471:17): [True: 3.67k, False: 3.73k]
  ------------------
  472|  8.23k|      }
_ZN5Botan6BigIntD2Ev:
  185|  1.56k|      ~BigInt() { _const_time_unpoison(); }
_ZN5Botan6BigInt5clearEv:
  415|    782|      void clear() {
  416|    782|         m_data.set_to_zero();
  417|    782|         m_signedness = Positive;
  418|    782|      }
_ZNK5Botan6BigInt4sizeEv:
  642|  4.47k|      size_t size() const { return m_data.size(); }
_ZN5Botan6BigInt12mutable_dataEv:
  673|    820|      BOTAN_DEPRECATED("Deprecated no replacement") word* mutable_data() { return m_data.mutable_data(); }
_ZNK5Botan6BigInt4dataEv:
  679|  1.47k|      BOTAN_DEPRECATED("Deprecated no replacement") const word* data() const { return m_data.const_data(); }
_ZNK5Botan6BigInt7grow_toEm:
  699|    782|      BOTAN_DEPRECATED("Deprecated no replacement") void grow_to(size_t n) const { m_data.grow_to(n); }
_ZN5Botan6BigInt4Data12mutable_dataEv:
 1022|    820|            word* mutable_data() {
 1023|    820|               invalidate_sig_words();
 1024|    820|               return m_reg.data();
 1025|    820|            }
_ZNK5Botan6BigInt4Data7grow_toEm:
 1065|    782|            void grow_to(size_t n) const {
 1066|    782|               if(n > size()) {
  ------------------
  |  Branch (1066:19): [True: 782, False: 0]
  ------------------
 1067|    782|                  if(n <= m_reg.capacity()) {
  ------------------
  |  Branch (1067:22): [True: 0, False: 782]
  ------------------
 1068|      0|                     m_reg.resize(n);
 1069|    782|                  } else {
 1070|    782|                     m_reg.resize(n + (8 - (n % 8)));
 1071|    782|                  }
 1072|    782|               }
 1073|    782|            }
_ZNK5Botan6BigInt4Data4sizeEv:
 1075|  6.81k|            size_t size() const { return m_reg.size(); }
_ZN5Botan6BigInt4Data4swapERNSt3__16vectorImNS_16secure_allocatorImEEEE:
 1095|    782|            void swap(secure_vector<word>& reg) noexcept {
 1096|    782|               m_reg.swap(reg);
 1097|    782|               invalidate_sig_words();
 1098|    782|            }
_ZNK5Botan6BigInt4Data20invalidate_sig_wordsEv:
 1100|  1.60k|            void invalidate_sig_words() const noexcept { m_sig_words = sig_words_npos; }
_ZN5Botan6BigIntC2Ev:
   45|  1.56k|      BigInt() = default;

_ZN5Botan9clear_memImEEvPT_m:
  118|    782|inline constexpr void clear_mem(T* ptr, size_t n) {
  119|    782|   clear_bytes(ptr, sizeof(T) * n);
  120|    782|}
_ZN5Botan11clear_bytesEPvm:
  101|    782|inline constexpr void clear_bytes(void* ptr, size_t bytes) {
  102|    782|   if(bytes > 0) {
  ------------------
  |  Branch (102:7): [True: 0, False: 782]
  ------------------
  103|      0|      std::memset(ptr, 0, bytes);
  104|      0|   }
  105|    782|}
_ZN5Botan13typecast_copyImTkNS_6ranges16contiguous_rangeENSt3__14spanIKhLm8EEEQaaaasr3stdE26is_default_constructible_vIT_Esr3stdE23is_trivially_copyable_vIS6_Esr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeEEEES6_RKSB_:
  210|    559|inline constexpr ToT typecast_copy(const FromR& src) {
  211|    559|   ToT dst;  // NOLINT(*-member-init)
  212|    559|   typecast_copy(dst, src);
  213|    559|   return dst;
  214|    559|}
_ZN5Botan13typecast_copyImTkNS_6ranges16contiguous_rangeENSt3__14spanIKhLm8EEEQaaaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEsr3stdE23is_trivially_copyable_vIT_Entsr3std6rangesE5rangeISK_EEEvRSK_RKSA_:
  188|    559|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|    559|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|    559|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeENSt3__14spanImLm1EEETkNS1_16contiguous_rangeENS3_IKhLm8EEEQaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINS7_IXsr21__is_primary_templateINS8_Iu14__remove_cvrefIDTclL_ZNSA_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSG_ISO_EESP_E4type10value_typeEEEEvOSL_RKSB_:
  176|    559|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|    559|   ranges::assert_equal_byte_lengths(out, in);
  178|    559|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|    559|}
_ZN5Botan8copy_memITkNS_6ranges23contiguous_output_rangeENSt3__14spanIhLm18446744073709551615EEETkNS1_16contiguous_rangeENS3_IKhLm18446744073709551615EEEQaasr3stdE9is_same_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeENS7_IXsr21__is_primary_templateINS8_Iu14__remove_cvrefIDTclL_ZNSA_5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENSG_ISO_EESP_E4type10value_typeEEsr3stdE23is_trivially_copyable_vIST_EEEvOSB_RKSL_:
  160|    571|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|    571|   ranges::assert_equal_byte_lengths(out, in);
  162|    571|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 571]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|    571|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 571, False: 0]
  ------------------
  165|    571|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|    571|   }
  167|    571|}
_ZN5Botan13typecast_copyImTkNS_6ranges16contiguous_rangeENSt3__14spanIhLm8EEEQaaaasr3stdE26is_default_constructible_vIT_Esr3stdE23is_trivially_copyable_vIS5_Esr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEEES5_RKSA_:
  210|    571|inline constexpr ToT typecast_copy(const FromR& src) {
  211|    571|   ToT dst;  // NOLINT(*-member-init)
  212|    571|   typecast_copy(dst, src);
  213|    571|   return dst;
  214|    571|}
_ZN5Botan13typecast_copyImTkNS_6ranges16contiguous_rangeENSt3__14spanIhLm8EEEQaaaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISC_EESD_E4type10value_typeEEsr3stdE23is_trivially_copyable_vIT_Entsr3std6rangesE5rangeISJ_EEEvRSJ_RKS9_:
  188|    571|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|    571|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|    571|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeENSt3__14spanImLm1EEETkNS1_16contiguous_rangeENS3_IhLm8EEEQaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINS6_IXsr21__is_primary_templateINS7_Iu14__remove_cvrefIDTclL_ZNS9_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSF_ISN_EESO_E4type10value_typeEEEEvOSK_RKSA_:
  176|    571|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|    571|   ranges::assert_equal_byte_lengths(out, in);
  178|    571|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|    571|}

_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIhLm8EEEEEvRKT0_:
   77|    571|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    571|   const std::span s{r};
   79|    571|   if constexpr(statically_spanable_range<R>) {
   80|    571|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|       |   } else {
   82|       |      if(s.size_bytes() != expected) {
   83|       |         memory_region_size_violation();
   84|       |      }
   85|       |   }
   86|    571|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIKhLm8EEEEEvRKT0_:
   77|  1.11k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  1.11k|   const std::span s{r};
   79|  1.11k|   if constexpr(statically_spanable_range<R>) {
   80|  1.11k|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|       |   } else {
   82|       |      if(s.size_bytes() != expected) {
   83|       |         memory_region_size_violation();
   84|       |      }
   85|       |   }
   86|  1.11k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm1EEETpTkNS0_14spanable_rangeEJNS3_IKhLm8EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    559|{
  101|    559|   const std::span s0{r0};
  102|       |
  103|    559|   if constexpr(statically_spanable_range<R0>) {
  104|    559|      constexpr size_t expected_size = s0.size_bytes();
  105|    559|      (assert_exact_byte_length<expected_size>(rs), ...);
  106|       |   } else {
  107|       |      const size_t expected_size = s0.size_bytes();
  108|       |      const bool correct_size =
  109|       |         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|       |      if(!correct_size) {
  112|       |         memory_region_size_violation();
  113|       |      }
  114|       |   }
  115|    559|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm1EEEEEmRKT_:
   59|  1.13k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  1.13k|   return std::span{r}.size_bytes();
   61|  1.13k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKhLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    571|{
  101|    571|   const std::span s0{r0};
  102|       |
  103|       |   if constexpr(statically_spanable_range<R0>) {
  104|       |      constexpr size_t expected_size = s0.size_bytes();
  105|       |      (assert_exact_byte_length<expected_size>(rs), ...);
  106|    571|   } else {
  107|    571|      const size_t expected_size = s0.size_bytes();
  108|    571|      const bool correct_size =
  109|    571|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|    571|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 571]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|    571|   }
  115|    571|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEEEEmRKT_:
   59|  1.14k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  1.14k|   return std::span{r}.size_bytes();
   61|  1.14k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__15arrayIhLm8EEEEEvRKT0_:
   77|    571|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    571|   const std::span s{r};
   79|    571|   if constexpr(statically_spanable_range<R>) {
   80|    571|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|       |   } else {
   82|       |      if(s.size_bytes() != expected) {
   83|       |         memory_region_size_violation();
   84|       |      }
   85|       |   }
   86|    571|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm1EEETpTkNS0_14spanable_rangeEJNS3_IhLm8EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    571|{
  101|    571|   const std::span s0{r0};
  102|       |
  103|    571|   if constexpr(statically_spanable_range<R0>) {
  104|    571|      constexpr size_t expected_size = s0.size_bytes();
  105|    571|      (assert_exact_byte_length<expected_size>(rs), ...);
  106|       |   } else {
  107|       |      const size_t expected_size = s0.size_bytes();
  108|       |      const bool correct_size =
  109|       |         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|       |      if(!correct_size) {
  112|       |         memory_region_size_violation();
  113|       |      }
  114|       |   }
  115|    571|}

_ZN5Botan16secure_allocatorImE10deallocateEPmm:
   54|  1.56k|      void deallocate(T* p, std::size_t n) { deallocate_memory(p, n, sizeof(T)); }
_ZN5Botan16secure_allocatorImE8allocateEm:
   52|  1.56k|      T* allocate(std::size_t n) { return static_cast<T*>(allocate_memory(n, sizeof(T))); }

_ZN5Botan16wrap_strong_typeImRmQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  268|  1.13k|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  269|  1.13k|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  270|       |      // Noop, if the parameter type already is the desired return type.
  271|  1.13k|      return std::forward<ParamT>(t);
  272|       |   } else if constexpr(std::constructible_from<T, ParamT>) {
  273|       |      // Implicit conversion from the parameter type to the return type.
  274|       |      return T{std::forward<ParamT>(t)};
  275|       |   } else {
  276|       |      // Explicitly calling the wrapped type's constructor to support
  277|       |      // implicit conversions on types that mark their constructors as explicit.
  278|       |      static_assert(concepts::strong_type<T> && std::constructible_from<typename T::wrapped_type, ParamT>);
  279|       |      return T{typename T::wrapped_type{std::forward<ParamT>(t)}};
  280|       |   }
  281|  1.13k|}

_Z4fuzzNSt3__14spanIKhLm18446744073709551615EEE:
   11|    422|void fuzz(const std::span<const uint8_t> in) {
   12|    422|   const size_t max_bits = 512;
   13|       |
   14|    422|   if(in.size() < 3 || in.size() > 1 + 2 * (max_bits / 8)) {
  ------------------
  |  Branch (14:7): [True: 2, False: 420]
  |  Branch (14:24): [True: 29, False: 391]
  ------------------
   15|     31|      return;
   16|     31|   }
   17|       |
   18|    391|   const uint8_t signs = in[0];
   19|    391|   const size_t x_len = (in.size() - 1) / 2;
   20|       |
   21|    391|   Botan::BigInt x = Botan::BigInt::from_bytes(in.subspan(1, x_len));
   22|    391|   Botan::BigInt y = Botan::BigInt::from_bytes(in.subspan(1 + x_len, in.size() - x_len - 1));
   23|       |
   24|    391|   if((signs & 1) != 0) {
  ------------------
  |  Branch (24:7): [True: 162, False: 229]
  ------------------
   25|    162|      x.flip_sign();
   26|    162|   }
   27|    391|   if((signs & 2) != 0) {
  ------------------
  |  Branch (27:7): [True: 157, False: 234]
  ------------------
   28|    157|      y.flip_sign();
   29|    157|   }
   30|       |
   31|    391|   const Botan::BigInt d1 = x - y;
   32|    391|   const Botan::BigInt d2 = y - x;
   33|       |
   34|    391|   FUZZER_ASSERT_TRUE(d1.cmp(d2, false) == 0);
  ------------------
  |  |   89|    391|   do {                                                               \
  |  |   90|    391|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                   \
  |  |   91|    391|      if(!(e)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (91:10): [True: 0, False: 391]
  |  |  ------------------
  |  |   92|      0|         FUZZER_WRITE_AND_CRASH("Expression " << #e << " was false"); \
  |  |  ------------------
  |  |  |  |   70|      0|   do {                                                                                                       \
  |  |  |  |   71|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; /* NOLINT(*-macro-paren*) */ \
  |  |  |  |   72|      0|      abort();                                                                                                \
  |  |  |  |   73|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|      }                                                               \
  |  |   94|    391|   } while(0)
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 391]
  |  |  ------------------
  ------------------
   35|       |
   36|    391|   const bool is_eq = (x == y);
   37|    391|   const bool is_lt = (x < y);
   38|    391|   const bool is_gt = (x > y);
   39|    391|   const bool is_lte = (x <= y);
   40|    391|   const bool is_gte = (x >= y);
   41|       |
   42|    391|   if(is_eq) {
  ------------------
  |  Branch (42:7): [True: 3, False: 388]
  ------------------
   43|      3|      FUZZER_ASSERT_TRUE(d1.is_zero());
  ------------------
  |  |   89|      3|   do {                                                               \
  |  |   90|      3|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                   \
  |  |   91|      3|      if(!(e)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (91:10): [True: 0, False: 3]
  |  |  ------------------
  |  |   92|      0|         FUZZER_WRITE_AND_CRASH("Expression " << #e << " was false"); \
  |  |  ------------------
  |  |  |  |   70|      0|   do {                                                                                                       \
  |  |  |  |   71|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; /* NOLINT(*-macro-paren*) */ \
  |  |  |  |   72|      0|      abort();                                                                                                \
  |  |  |  |   73|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|      }                                                               \
  |  |   94|      3|   } while(0)
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 3]
  |  |  ------------------
  ------------------
   44|      3|      FUZZER_ASSERT_TRUE(d2.is_zero());
  ------------------
  |  |   89|      3|   do {                                                               \
  |  |   90|      3|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                   \
  |  |   91|      3|      if(!(e)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (91:10): [True: 0, False: 3]
  |  |  ------------------
  |  |   92|      0|         FUZZER_WRITE_AND_CRASH("Expression " << #e << " was false"); \
  |  |  ------------------
  |  |  |  |   70|      0|   do {                                                                                                       \
  |  |  |  |   71|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; /* NOLINT(*-macro-paren*) */ \
  |  |  |  |   72|      0|      abort();                                                                                                \
  |  |  |  |   73|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|      }                                                               \
  |  |   94|      3|   } while(0)
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 3]
  |  |  ------------------
  ------------------
   45|      3|   }
   46|       |
   47|    391|   if(is_lte) {
  ------------------
  |  Branch (47:7): [True: 239, False: 152]
  ------------------
   48|    239|      FUZZER_ASSERT_TRUE(is_lt || is_eq);
  ------------------
  |  |   89|    239|   do {                                                               \
  |  |   90|    239|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                   \
  |  |   91|    242|      if(!(e)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (91:12): [True: 236, False: 3]
  |  |  |  Branch (91:12): [True: 3, False: 0]
  |  |  ------------------
  |  |   92|      0|         FUZZER_WRITE_AND_CRASH("Expression " << #e << " was false"); \
  |  |  ------------------
  |  |  |  |   70|      0|   do {                                                                                                       \
  |  |  |  |   71|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; /* NOLINT(*-macro-paren*) */ \
  |  |  |  |   72|      0|      abort();                                                                                                \
  |  |  |  |   73|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|      }                                                               \
  |  |   94|    239|   } while(0)
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 239]
  |  |  ------------------
  ------------------
   49|    239|   }
   50|       |
   51|    391|   if(is_gte) {
  ------------------
  |  Branch (51:7): [True: 155, False: 236]
  ------------------
   52|    155|      FUZZER_ASSERT_TRUE(is_gt || is_eq);
  ------------------
  |  |   89|    155|   do {                                                               \
  |  |   90|    155|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                   \
  |  |   91|    158|      if(!(e)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (91:12): [True: 152, False: 3]
  |  |  |  Branch (91:12): [True: 3, False: 0]
  |  |  ------------------
  |  |   92|      0|         FUZZER_WRITE_AND_CRASH("Expression " << #e << " was false"); \
  |  |  ------------------
  |  |  |  |   70|      0|   do {                                                                                                       \
  |  |  |  |   71|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; /* NOLINT(*-macro-paren*) */ \
  |  |  |  |   72|      0|      abort();                                                                                                \
  |  |  |  |   73|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|      }                                                               \
  |  |   94|    155|   } while(0)
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 155]
  |  |  ------------------
  ------------------
   53|    155|   }
   54|       |
   55|    391|   if(is_lt) {
  ------------------
  |  Branch (55:7): [True: 236, False: 155]
  ------------------
   56|    236|      FUZZER_ASSERT_TRUE(!is_gt);
  ------------------
  |  |   89|    236|   do {                                                               \
  |  |   90|    236|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                   \
  |  |   91|    236|      if(!(e)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (91:10): [True: 0, False: 236]
  |  |  ------------------
  |  |   92|      0|         FUZZER_WRITE_AND_CRASH("Expression " << #e << " was false"); \
  |  |  ------------------
  |  |  |  |   70|      0|   do {                                                                                                       \
  |  |  |  |   71|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; /* NOLINT(*-macro-paren*) */ \
  |  |  |  |   72|      0|      abort();                                                                                                \
  |  |  |  |   73|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|      }                                                               \
  |  |   94|    236|   } while(0)
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 236]
  |  |  ------------------
  ------------------
   57|    236|      FUZZER_ASSERT_TRUE(d1.signum() != 0);
  ------------------
  |  |   89|    236|   do {                                                               \
  |  |   90|    236|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                   \
  |  |   91|    236|      if(!(e)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (91:10): [True: 0, False: 236]
  |  |  ------------------
  |  |   92|      0|         FUZZER_WRITE_AND_CRASH("Expression " << #e << " was false"); \
  |  |  ------------------
  |  |  |  |   70|      0|   do {                                                                                                       \
  |  |  |  |   71|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; /* NOLINT(*-macro-paren*) */ \
  |  |  |  |   72|      0|      abort();                                                                                                \
  |  |  |  |   73|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|      }                                                               \
  |  |   94|    236|   } while(0)
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 236]
  |  |  ------------------
  ------------------
   58|    236|      FUZZER_ASSERT_TRUE(d2.signum() != 0);
  ------------------
  |  |   89|    236|   do {                                                               \
  |  |   90|    236|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                   \
  |  |   91|    236|      if(!(e)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (91:10): [True: 0, False: 236]
  |  |  ------------------
  |  |   92|      0|         FUZZER_WRITE_AND_CRASH("Expression " << #e << " was false"); \
  |  |  ------------------
  |  |  |  |   70|      0|   do {                                                                                                       \
  |  |  |  |   71|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; /* NOLINT(*-macro-paren*) */ \
  |  |  |  |   72|      0|      abort();                                                                                                \
  |  |  |  |   73|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|      }                                                               \
  |  |   94|    236|   } while(0)
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 236]
  |  |  ------------------
  ------------------
   59|    236|      FUZZER_ASSERT_TRUE(d1.signum() < 0);
  ------------------
  |  |   89|    236|   do {                                                               \
  |  |   90|    236|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                   \
  |  |   91|    236|      if(!(e)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (91:10): [True: 0, False: 236]
  |  |  ------------------
  |  |   92|      0|         FUZZER_WRITE_AND_CRASH("Expression " << #e << " was false"); \
  |  |  ------------------
  |  |  |  |   70|      0|   do {                                                                                                       \
  |  |  |  |   71|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; /* NOLINT(*-macro-paren*) */ \
  |  |  |  |   72|      0|      abort();                                                                                                \
  |  |  |  |   73|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|      }                                                               \
  |  |   94|    236|   } while(0)
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 236]
  |  |  ------------------
  ------------------
   60|    236|      FUZZER_ASSERT_TRUE(d2.signum() > 0);
  ------------------
  |  |   89|    236|   do {                                                               \
  |  |   90|    236|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                   \
  |  |   91|    236|      if(!(e)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (91:10): [True: 0, False: 236]
  |  |  ------------------
  |  |   92|      0|         FUZZER_WRITE_AND_CRASH("Expression " << #e << " was false"); \
  |  |  ------------------
  |  |  |  |   70|      0|   do {                                                                                                       \
  |  |  |  |   71|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; /* NOLINT(*-macro-paren*) */ \
  |  |  |  |   72|      0|      abort();                                                                                                \
  |  |  |  |   73|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|      }                                                               \
  |  |   94|    236|   } while(0)
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 236]
  |  |  ------------------
  ------------------
   61|    236|   }
   62|       |
   63|    391|   if(is_gt) {
  ------------------
  |  Branch (63:7): [True: 152, False: 239]
  ------------------
   64|    152|      FUZZER_ASSERT_TRUE(!is_lt);
  ------------------
  |  |   89|    152|   do {                                                               \
  |  |   90|    152|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                   \
  |  |   91|    152|      if(!(e)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (91:10): [True: 0, False: 152]
  |  |  ------------------
  |  |   92|      0|         FUZZER_WRITE_AND_CRASH("Expression " << #e << " was false"); \
  |  |  ------------------
  |  |  |  |   70|      0|   do {                                                                                                       \
  |  |  |  |   71|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; /* NOLINT(*-macro-paren*) */ \
  |  |  |  |   72|      0|      abort();                                                                                                \
  |  |  |  |   73|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|      }                                                               \
  |  |   94|    152|   } while(0)
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 152]
  |  |  ------------------
  ------------------
   65|    152|      FUZZER_ASSERT_TRUE(d1.signum() != 0);
  ------------------
  |  |   89|    152|   do {                                                               \
  |  |   90|    152|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                   \
  |  |   91|    152|      if(!(e)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (91:10): [True: 0, False: 152]
  |  |  ------------------
  |  |   92|      0|         FUZZER_WRITE_AND_CRASH("Expression " << #e << " was false"); \
  |  |  ------------------
  |  |  |  |   70|      0|   do {                                                                                                       \
  |  |  |  |   71|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; /* NOLINT(*-macro-paren*) */ \
  |  |  |  |   72|      0|      abort();                                                                                                \
  |  |  |  |   73|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|      }                                                               \
  |  |   94|    152|   } while(0)
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 152]
  |  |  ------------------
  ------------------
   66|    152|      FUZZER_ASSERT_TRUE(d2.signum() != 0);
  ------------------
  |  |   89|    152|   do {                                                               \
  |  |   90|    152|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                   \
  |  |   91|    152|      if(!(e)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (91:10): [True: 0, False: 152]
  |  |  ------------------
  |  |   92|      0|         FUZZER_WRITE_AND_CRASH("Expression " << #e << " was false"); \
  |  |  ------------------
  |  |  |  |   70|      0|   do {                                                                                                       \
  |  |  |  |   71|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; /* NOLINT(*-macro-paren*) */ \
  |  |  |  |   72|      0|      abort();                                                                                                \
  |  |  |  |   73|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|      }                                                               \
  |  |   94|    152|   } while(0)
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 152]
  |  |  ------------------
  ------------------
   67|    152|      FUZZER_ASSERT_TRUE(d1.signum() > 0);
  ------------------
  |  |   89|    152|   do {                                                               \
  |  |   90|    152|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                   \
  |  |   91|    152|      if(!(e)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (91:10): [True: 0, False: 152]
  |  |  ------------------
  |  |   92|      0|         FUZZER_WRITE_AND_CRASH("Expression " << #e << " was false"); \
  |  |  ------------------
  |  |  |  |   70|      0|   do {                                                                                                       \
  |  |  |  |   71|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; /* NOLINT(*-macro-paren*) */ \
  |  |  |  |   72|      0|      abort();                                                                                                \
  |  |  |  |   73|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|      }                                                               \
  |  |   94|    152|   } while(0)
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 152]
  |  |  ------------------
  ------------------
   68|    152|      FUZZER_ASSERT_TRUE(d2.signum() < 0);
  ------------------
  |  |   89|    152|   do {                                                               \
  |  |   90|    152|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                   \
  |  |   91|    152|      if(!(e)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (91:10): [True: 0, False: 152]
  |  |  ------------------
  |  |   92|      0|         FUZZER_WRITE_AND_CRASH("Expression " << #e << " was false"); \
  |  |  ------------------
  |  |  |  |   70|      0|   do {                                                                                                       \
  |  |  |  |   71|      0|      std::cerr << expr << " @ Line " << __LINE__ << " in " << __FILE__ << "\n"; /* NOLINT(*-macro-paren*) */ \
  |  |  |  |   72|      0|      abort();                                                                                                \
  |  |  |  |   73|      0|   } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|      }                                                               \
  |  |   94|    152|   } while(0)
  |  |  ------------------
  |  |  |  Branch (94:12): [Folded, False: 152]
  |  |  ------------------
  ------------------
   69|    152|   }
   70|    391|}

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

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

_ZN5Botan6BigInt13with_capacityEm:
   51|    782|BigInt BigInt::with_capacity(size_t size) {
   52|    782|   BigInt bn;
   53|    782|   bn.grow_to(size);
   54|    782|   return bn;
   55|    782|}
_ZN5Botan6BigInt10from_bytesENSt3__14spanIKhLm18446744073709551615EEE:
   83|    782|BigInt BigInt::from_bytes(std::span<const uint8_t> input) {
   84|    782|   BigInt r;
   85|    782|   r.assign_from_bytes(input);
   86|    782|   return r;
   87|    782|}
_ZNK5Botan6BigInt3cmpERKS0_b:
  138|  1.17k|int32_t BigInt::cmp(const BigInt& other, bool check_signs) const {
  139|  1.17k|   if(check_signs) {
  ------------------
  |  Branch (139:7): [True: 782, False: 391]
  ------------------
  140|    782|      if(other.signum() >= 0 && this->signum() < 0) {
  ------------------
  |  Branch (140:10): [True: 476, False: 306]
  |  Branch (140:33): [True: 16, False: 460]
  ------------------
  141|     16|         return -1;
  142|     16|      }
  143|       |
  144|    766|      if(other.signum() < 0 && this->signum() >= 0) {
  ------------------
  |  Branch (144:10): [True: 306, False: 460]
  |  Branch (144:32): [True: 28, False: 278]
  ------------------
  145|     28|         return 1;
  146|     28|      }
  147|       |
  148|    738|      if(other.signum() < 0 && this->signum() < 0) {
  ------------------
  |  Branch (148:10): [True: 278, False: 460]
  |  Branch (148:32): [True: 278, False: 0]
  ------------------
  149|    278|         return (-bigint_cmp(this->_data(), this->size(), other._data(), other.size()));
  150|    278|      }
  151|    738|   }
  152|       |
  153|    851|   return bigint_cmp(this->_data(), this->size(), other._data(), other.size());
  154|  1.17k|}
_ZNK5Botan6BigInt8is_equalERKS0_:
  156|    391|bool BigInt::is_equal(const BigInt& other) const {
  157|    391|   if(this->sign() != other.sign()) {
  ------------------
  |  Branch (157:7): [True: 22, False: 369]
  ------------------
  158|     22|      return false;
  159|     22|   }
  160|       |
  161|    369|   return bigint_ct_is_eq(this->_data(), this->size(), other._data(), other.size()).as_bool();
  162|    391|}
_ZNK5Botan6BigInt12is_less_thanERKS0_:
  164|    782|bool BigInt::is_less_than(const BigInt& other) const {
  165|    782|   if(this->signum() < 0 && other.signum() >= 0) {
  ------------------
  |  Branch (165:7): [True: 300, False: 482]
  |  Branch (165:29): [True: 22, False: 278]
  ------------------
  166|     22|      return true;
  167|     22|   }
  168|       |
  169|    760|   if(this->signum() >= 0 && other.signum() < 0) {
  ------------------
  |  Branch (169:7): [True: 482, False: 278]
  |  Branch (169:30): [True: 22, False: 460]
  ------------------
  170|     22|      return false;
  171|     22|   }
  172|       |
  173|    738|   if(other.signum() < 0 && this->signum() < 0) {
  ------------------
  |  Branch (173:7): [True: 278, False: 460]
  |  Branch (173:29): [True: 278, False: 0]
  ------------------
  174|    278|      return bigint_ct_is_lt(other._data(), other.size(), this->_data(), this->size()).as_bool();
  175|    278|   }
  176|       |
  177|    460|   return bigint_ct_is_lt(this->_data(), this->size(), other._data(), other.size()).as_bool();
  178|    738|}
_ZN5Botan6BigInt4Data11set_to_zeroEv:
  191|    782|void BigInt::Data::set_to_zero() {
  192|    782|   m_reg.resize(m_reg.capacity());
  193|    782|   clear_mem(m_reg.data(), m_reg.size());
  194|    782|   m_sig_words = 0;
  195|    782|}
_ZNK5Botan6BigInt4Data14calc_sig_wordsEv:
  215|  1.56k|size_t BigInt::Data::calc_sig_words() const {
  216|  1.56k|   const size_t sz = m_reg.size();
  217|  1.56k|   size_t sig = sz;
  218|       |
  219|  1.56k|   word sub = 1;
  220|       |
  221|  14.3k|   for(size_t i = 0; i != sz; ++i) {
  ------------------
  |  Branch (221:22): [True: 12.7k, False: 1.56k]
  ------------------
  222|  12.7k|      const word w = m_reg[sz - i - 1];
  223|  12.7k|      sub &= ct_is_zero(w);
  224|  12.7k|      sig -= sub;
  225|  12.7k|   }
  226|       |
  227|       |   /*
  228|       |   * This depends on the data so is poisoned, but unpoison it here as
  229|       |   * later conditionals are made on the size.
  230|       |   */
  231|  1.56k|   CT::unpoison(sig);
  232|       |
  233|  1.56k|   return sig;
  234|  1.56k|}
_ZN5Botan6BigInt17assign_from_bytesENSt3__14spanIKhLm18446744073709551615EEE:
  425|    782|void BigInt::assign_from_bytes(std::span<const uint8_t> bytes) {
  426|    782|   clear();
  427|       |
  428|    782|   const size_t length = bytes.size();
  429|    782|   const size_t full_words = length / sizeof(word);
  430|    782|   const size_t extra_bytes = length % sizeof(word);
  431|       |
  432|    782|   secure_vector<word> reg((round_up(full_words + (extra_bytes > 0 ? 1 : 0), 8)));
  ------------------
  |  Branch (432:52): [True: 571, False: 211]
  ------------------
  433|       |
  434|  1.34k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (434:22): [True: 559, False: 782]
  ------------------
  435|    559|      reg[i] = load_be<word>(bytes.last<sizeof(word)>());
  436|    559|      bytes = bytes.first(bytes.size() - sizeof(word));
  437|    559|   }
  438|       |
  439|    782|   if(!bytes.empty()) {
  ------------------
  |  Branch (439:7): [True: 571, False: 211]
  ------------------
  440|    571|      BOTAN_ASSERT_NOMSG(extra_bytes == bytes.size());
  ------------------
  |  |   77|    571|   do {                                                                     \
  |  |   78|    571|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    571|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 571]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    571|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 571]
  |  |  ------------------
  ------------------
  441|    571|      std::array<uint8_t, sizeof(word)> last_partial_word = {0};
  442|    571|      copy_mem(std::span{last_partial_word}.last(extra_bytes), bytes);
  443|    571|      reg[full_words] = load_be<word>(last_partial_word);
  444|    571|   }
  445|       |
  446|    782|   m_data.swap(reg);
  447|    782|}
_ZNK5Botan6BigInt20_const_time_unpoisonEv:
  559|  1.56k|void BigInt::_const_time_unpoison() const {
  560|  1.56k|   CT::unpoison(m_data.const_data(), m_data.size());
  561|  1.56k|}

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

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

