_ZN5Botan17ct_if_is_zero_retITkNSt3__117unsigned_integralEmEEmT_m:
   45|   177k|BOTAN_FORCE_INLINE constexpr size_t ct_if_is_zero_ret(T x, size_t s) {
   46|       |   /*
   47|       |   Similar to `return ct_is_zero(x) & s` but has to account for possibility that
   48|       |   sizeof(T) is smaller than sizeof(size_t) which would lead to incomplete masking
   49|       |   */
   50|   177k|   const T a = ~x & (x - 1);
   51|   177k|   const size_t a_top = static_cast<size_t>(CT::value_barrier<T>(a >> (sizeof(T) * 8 - 1)));
   52|   177k|   const size_t mask = static_cast<size_t>(0) - a_top;
   53|   177k|   return mask & s;
   54|   177k|}
_ZN5Botan17ct_expand_top_bitITkNSt3__117unsigned_integralEmEET_S2_:
   28|   145k|BOTAN_FORCE_INLINE constexpr T ct_expand_top_bit(T a) {
   29|   145k|   const T top = CT::value_barrier<T>(a >> (sizeof(T) * 8 - 1));
   30|   145k|   return static_cast<T>(0) - top;
   31|   145k|}
_ZN5Botan10ct_is_zeroITkNSt3__117unsigned_integralEmEET_S2_:
   37|   145k|BOTAN_FORCE_INLINE constexpr T ct_is_zero(T x) {
   38|   145k|   return ct_expand_top_bit<T>(~x & (x - 1));
   39|   145k|}
_ZN5Botan8high_bitITkNSt3__117unsigned_integralEmEEmT_:
   73|  29.5k|BOTAN_FORCE_INLINE constexpr size_t high_bit(T n) {
   74|  29.5k|   size_t hb = 0;
   75|       |
   76|   207k|   for(size_t s = 8 * sizeof(T) / 2; s > 0; s /= 2) {
  ------------------
  |  Branch (76:38): [True: 177k, False: 29.5k]
  ------------------
   77|       |      // Equivalent to: ((n >> s) == 0) ? 0 : s;
   78|   177k|      const size_t z = s - ct_if_is_zero_ret<T>(n >> s, s);
   79|   177k|      hb += z;
   80|   177k|      n >>= z;
   81|   177k|   }
   82|       |
   83|  29.5k|   hb += n;
   84|       |
   85|  29.5k|   return hb;
   86|  29.5k|}

_ZN5Botan13reverse_bytesITkNSt3__117unsigned_integralEmQooooooeqstT_Li1EeqstS2_Li2EeqstS2_Li4EeqstS2_Li8EEES2_S2_:
   27|  19.2k|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|  19.2k|   } else if constexpr(sizeof(T) == 8) {
   45|  19.2k|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_bswap64)
   46|  19.2k|      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|  19.2k|   }
   57|  19.2k|}

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

base64.cpp:_ZN5Botan11base_decodeINS_12_GLOBAL__N_16Base64EEEmRKT_PhPKcmRmbb:
  124|    152|                   bool ignore_ws = true) {
  125|       |   // TODO(Botan4) Check if we can use just base. or Base:: here instead
  126|    152|   constexpr size_t decoding_bytes_in = std::remove_reference_t<Base>::decoding_bytes_in();
  127|    152|   constexpr size_t decoding_bytes_out = std::remove_reference_t<Base>::decoding_bytes_out();
  128|       |
  129|    152|   uint8_t* out_ptr = output;
  130|    152|   std::array<uint8_t, decoding_bytes_in> decode_buf{};
  131|    152|   size_t decode_buf_pos = 0;
  132|    152|   size_t final_truncate = 0;
  133|       |
  134|    152|   clear_mem(output, base.decode_max_output(input_length));
  135|       |
  136|  43.6k|   for(size_t i = 0; i != input_length; ++i) {
  ------------------
  |  Branch (136:22): [True: 43.4k, False: 152]
  ------------------
  137|  43.4k|      const uint8_t bin = base.lookup_binary_value(input[i]);
  138|       |
  139|       |      // This call might throw Invalid_Argument
  140|  43.4k|      if(base.check_bad_char(bin, input[i], ignore_ws)) {
  ------------------
  |  Branch (140:10): [True: 15.0k, False: 28.3k]
  ------------------
  141|  15.0k|         decode_buf[decode_buf_pos] = bin;
  142|  15.0k|         ++decode_buf_pos;
  143|  15.0k|      }
  144|       |
  145|       |      /*
  146|       |      * If we're at the end of the input, pad with 0s and truncate
  147|       |      */
  148|  43.4k|      if(final_inputs && (i == input_length - 1)) {
  ------------------
  |  Branch (148:10): [True: 43.4k, False: 29]
  |  Branch (148:26): [True: 83, False: 43.3k]
  ------------------
  149|     83|         if(decode_buf_pos) {
  ------------------
  |  Branch (149:13): [True: 44, False: 39]
  ------------------
  150|    133|            for(size_t j = decode_buf_pos; j < decoding_bytes_in; ++j) {
  ------------------
  |  Branch (150:44): [True: 89, False: 44]
  ------------------
  151|     89|               decode_buf[j] = 0;
  152|     89|            }
  153|       |
  154|     44|            final_truncate = decoding_bytes_in - decode_buf_pos;
  155|     44|            decode_buf_pos = decoding_bytes_in;
  156|     44|         }
  157|     83|      }
  158|       |
  159|  43.4k|      if(decode_buf_pos == decoding_bytes_in) {
  ------------------
  |  Branch (159:10): [True: 3.78k, False: 39.6k]
  ------------------
  160|  3.78k|         base.decode(out_ptr, decode_buf.data());
  161|       |
  162|  3.78k|         out_ptr += decoding_bytes_out;
  163|  3.78k|         decode_buf_pos = 0;
  164|  3.78k|         input_consumed = i + 1;
  165|  3.78k|      }
  166|  43.4k|   }
  167|       |
  168|  2.83k|   while(input_consumed < input_length && base.lookup_binary_value(input[input_consumed]) == 0x80) {
  ------------------
  |  Branch (168:10): [True: 2.70k, False: 130]
  |  Branch (168:43): [True: 2.67k, False: 22]
  ------------------
  169|  2.67k|      ++input_consumed;
  170|  2.67k|   }
  171|       |
  172|    152|   const size_t written = (out_ptr - output) - base.bytes_to_remove(final_truncate);
  173|       |
  174|    152|   return written;
  175|    152|}
base64.cpp:_ZN5Botan16base_decode_fullINS_12_GLOBAL__N_16Base64EEEmRKT_PhPKcmb:
  178|    152|size_t base_decode_full(const Base& base, uint8_t output[], const char input[], size_t input_length, bool ignore_ws) {
  179|    152|   size_t consumed = 0;
  180|    152|   const size_t written = base_decode(base, output, input, input_length, consumed, true, ignore_ws);
  181|       |
  182|    152|   if(consumed != input_length) {
  ------------------
  |  Branch (182:7): [True: 22, False: 130]
  ------------------
  183|     22|      throw Invalid_Argument(base.name() + " decoding failed, input did not have full bytes");
  184|     22|   }
  185|       |
  186|    130|   return written;
  187|    152|}
base64.cpp:_ZN5Botan18base_decode_to_vecINSt3__16vectorIhNS_16secure_allocatorIhEEEENS_12_GLOBAL__N_16Base64EEET_RKT0_PKcmb:
  190|    152|Vector base_decode_to_vec(const Base& base, const char input[], size_t input_length, bool ignore_ws) {
  191|    152|   const size_t output_length = base.decode_max_output(input_length);
  192|    152|   Vector bin(output_length);
  193|       |
  194|    152|   const size_t written = base_decode_full(base, bin.data(), input, input_length, ignore_ws);
  195|       |
  196|    152|   bin.resize(written);
  197|    152|   return bin;
  198|    152|}

_ZN5Botan2CT8unpoisonITkNSt3__18integralEmEEvRKT_:
  112|  47.6k|constexpr void unpoison(const T& p) {
  113|  47.6k|   unpoison(&p, 1);
  114|  47.6k|}
_ZN5Botan2CT8unpoisonImEEvPKT_m:
   67|  66.0k|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|  66.0k|   BOTAN_UNUSED(p, n);
  ------------------
  |  |  144|  66.0k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   75|  66.0k|}

_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|  4.83k|std::string fmt(std::string_view format, const T&... args) {
   54|  4.83k|   std::ostringstream oss;
   55|  4.83k|   oss.imbue(std::locale::classic());
   56|  4.83k|   fmt_detail::do_fmt(oss, format, args...);
   57|  4.83k|   return oss.str();
   58|  4.83k|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|  4.83k|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|  4.83k|   size_t i = 0;
   27|       |
   28|  51.5k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 51.5k, False: 0]
  ------------------
   29|  51.5k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 4.83k, False: 46.7k]
  |  Branch (29:30): [True: 4.83k, False: 0]
  |  Branch (29:59): [True: 4.83k, False: 0]
  ------------------
   30|  4.83k|         oss << val;
   31|  4.83k|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  46.7k|      } else {
   33|  46.7k|         oss << format[i];
   34|  46.7k|      }
   35|       |
   36|  46.7k|      i += 1;
   37|  46.7k|   }
   38|  4.83k|}
_ZN5Botan10fmt_detail6do_fmtERNSt3__119basic_ostringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EE:
   20|  11.7k|inline void do_fmt(std::ostringstream& oss, std::string_view format) {
   21|  11.7k|   oss << format;
   22|  11.7k|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEPKcEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|  3.94k|std::string fmt(std::string_view format, const T&... args) {
   54|  3.94k|   std::ostringstream oss;
   55|  3.94k|   oss.imbue(std::locale::classic());
   56|  3.94k|   fmt_detail::do_fmt(oss, format, args...);
   57|  3.94k|   return oss.str();
   58|  3.94k|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJPKcEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|  3.94k|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|  3.94k|   size_t i = 0;
   27|       |
   28|  3.94k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 3.94k, False: 0]
  ------------------
   29|  3.94k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 3.94k, False: 0]
  |  Branch (29:30): [True: 3.94k, False: 0]
  |  Branch (29:59): [True: 3.94k, False: 0]
  ------------------
   30|  3.94k|         oss << val;
   31|  3.94k|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  3.94k|      } else {
   33|      0|         oss << format[i];
   34|      0|      }
   35|       |
   36|      0|      i += 1;
   37|      0|   }
   38|  3.94k|}
_ZN5Botan10fmt_detail6do_fmtIPKcJEEEvRNSt3__119basic_ostringstreamIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_17basic_string_viewIcS7_EERKT_DpRKT0_:
   25|  3.94k|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|  3.94k|   size_t i = 0;
   27|       |
   28|  55.2k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 55.2k, False: 0]
  ------------------
   29|  55.2k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 3.94k, False: 51.3k]
  |  Branch (29:30): [True: 3.94k, False: 0]
  |  Branch (29:59): [True: 3.94k, False: 0]
  ------------------
   30|  3.94k|         oss << val;
   31|  3.94k|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  51.3k|      } else {
   33|  51.3k|         oss << format[i];
   34|  51.3k|      }
   35|       |
   36|  51.3k|      i += 1;
   37|  51.3k|   }
   38|  3.94k|}
_ZN5Botan10fmt_detail6do_fmtImJEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|     38|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     38|   size_t i = 0;
   27|       |
   28|  1.55k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 1.55k, False: 0]
  ------------------
   29|  1.55k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 38, False: 1.52k]
  |  Branch (29:30): [True: 38, False: 0]
  |  Branch (29:59): [True: 38, False: 0]
  ------------------
   30|     38|         oss << val;
   31|     38|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  1.52k|      } else {
   33|  1.52k|         oss << format[i];
   34|  1.52k|      }
   35|       |
   36|  1.52k|      i += 1;
   37|  1.52k|   }
   38|     38|}
_ZN5Botan3fmtIJmEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EEDpRKT_:
   53|     38|std::string fmt(std::string_view format, const T&... args) {
   54|     38|   std::ostringstream oss;
   55|     38|   oss.imbue(std::locale::classic());
   56|     38|   fmt_detail::do_fmt(oss, format, args...);
   57|     38|   return oss.str();
   58|     38|}
_ZN5Botan10fmt_detail6do_fmtIjJEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    763|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    763|   size_t i = 0;
   27|       |
   28|  1.55k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 1.55k, False: 0]
  ------------------
   29|  1.55k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 763, False: 796]
  |  Branch (29:30): [True: 763, False: 0]
  |  Branch (29:59): [True: 763, False: 0]
  ------------------
   30|    763|         oss << val;
   31|    763|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|    796|      } else {
   33|    796|         oss << format[i];
   34|    796|      }
   35|       |
   36|    796|      i += 1;
   37|    796|   }
   38|    763|}
_ZN5Botan3fmtIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEES7_NS1_17basic_string_viewIcS4_EEDpRKT_:
   53|  2.20k|std::string fmt(std::string_view format, const T&... args) {
   54|  2.20k|   std::ostringstream oss;
   55|  2.20k|   oss.imbue(std::locale::classic());
   56|  2.20k|   fmt_detail::do_fmt(oss, format, args...);
   57|  2.20k|   return oss.str();
   58|  2.20k|}
_ZN5Botan10fmt_detail6do_fmtINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEJEEEvRNS2_19basic_ostringstreamIcS5_S7_EENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|  2.20k|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|  2.20k|   size_t i = 0;
   27|       |
   28|  46.0k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 46.0k, False: 0]
  ------------------
   29|  46.0k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 2.20k, False: 43.8k]
  |  Branch (29:30): [True: 2.20k, False: 0]
  |  Branch (29:59): [True: 2.20k, False: 0]
  ------------------
   30|  2.20k|         oss << val;
   31|  2.20k|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  43.8k|      } else {
   33|  43.8k|         oss << format[i];
   34|  43.8k|      }
   35|       |
   36|  43.8k|      i += 1;
   37|  43.8k|   }
   38|  2.20k|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEjEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|     33|std::string fmt(std::string_view format, const T&... args) {
   54|     33|   std::ostringstream oss;
   55|     33|   oss.imbue(std::locale::classic());
   56|     33|   fmt_detail::do_fmt(oss, format, args...);
   57|     33|   return oss.str();
   58|     33|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJjEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|     33|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     33|   size_t i = 0;
   27|       |
   28|     33|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 33, False: 0]
  ------------------
   29|     33|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 33, False: 0]
  |  Branch (29:30): [True: 33, False: 0]
  |  Branch (29:59): [True: 33, False: 0]
  ------------------
   30|     33|         oss << val;
   31|     33|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|     33|      } else {
   33|      0|         oss << format[i];
   34|      0|      }
   35|       |
   36|      0|      i += 1;
   37|      0|   }
   38|     33|}
_ZN5Botan3fmtIJjjEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EEDpRKT_:
   53|    730|std::string fmt(std::string_view format, const T&... args) {
   54|    730|   std::ostringstream oss;
   55|    730|   oss.imbue(std::locale::classic());
   56|    730|   fmt_detail::do_fmt(oss, format, args...);
   57|    730|   return oss.str();
   58|    730|}
_ZN5Botan10fmt_detail6do_fmtIjJjEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    730|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    730|   size_t i = 0;
   27|       |
   28|  24.8k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 24.8k, False: 0]
  ------------------
   29|  24.8k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 730, False: 24.0k]
  |  Branch (29:30): [True: 730, False: 0]
  |  Branch (29:59): [True: 730, False: 0]
  ------------------
   30|    730|         oss << val;
   31|    730|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  24.0k|      } else {
   33|  24.0k|         oss << format[i];
   34|  24.0k|      }
   35|       |
   36|  24.0k|      i += 1;
   37|  24.0k|   }
   38|    730|}
_ZN5Botan3fmtIJPKcEEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_17basic_string_viewIcS6_EEDpRKT_:
   53|      3|std::string fmt(std::string_view format, const T&... args) {
   54|      3|   std::ostringstream oss;
   55|      3|   oss.imbue(std::locale::classic());
   56|      3|   fmt_detail::do_fmt(oss, format, args...);
   57|      3|   return oss.str();
   58|      3|}
_ZN5Botan3fmtIJPKcS2_S2_EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_17basic_string_viewIcS6_EEDpRKT_:
   53|      1|std::string fmt(std::string_view format, const T&... args) {
   54|      1|   std::ostringstream oss;
   55|      1|   oss.imbue(std::locale::classic());
   56|      1|   fmt_detail::do_fmt(oss, format, args...);
   57|      1|   return oss.str();
   58|      1|}
_ZN5Botan10fmt_detail6do_fmtIPKcJS3_S3_EEEvRNSt3__119basic_ostringstreamIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_17basic_string_viewIcS7_EERKT_DpRKT0_:
   25|      1|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|      1|   size_t i = 0;
   27|       |
   28|      1|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 1, False: 0]
  ------------------
   29|      1|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 1, False: 0]
  |  Branch (29:30): [True: 1, False: 0]
  |  Branch (29:59): [True: 1, False: 0]
  ------------------
   30|      1|         oss << val;
   31|      1|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|      1|      } else {
   33|      0|         oss << format[i];
   34|      0|      }
   35|       |
   36|      0|      i += 1;
   37|      0|   }
   38|      1|}
_ZN5Botan10fmt_detail6do_fmtIPKcJS3_EEEvRNSt3__119basic_ostringstreamIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_17basic_string_viewIcS7_EERKT_DpRKT0_:
   25|      1|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|      1|   size_t i = 0;
   27|       |
   28|      5|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 5, False: 0]
  ------------------
   29|      5|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 1, False: 4]
  |  Branch (29:30): [True: 1, False: 0]
  |  Branch (29:59): [True: 1, False: 0]
  ------------------
   30|      1|         oss << val;
   31|      1|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|      4|      } else {
   33|      4|         oss << format[i];
   34|      4|      }
   35|       |
   36|      4|      i += 1;
   37|      4|   }
   38|      1|}

_ZN5Botan11checked_mulITkNSt3__117unsigned_integralEmEENS1_8optionalIT_EES3_S3_:
   46|  36.0k|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|  36.0k|   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|  36.0k|   if(a != 0 && r / a != b) {
  ------------------
  |  Branch (53:7): [True: 36.0k, False: 0]
  |  Branch (53:17): [True: 0, False: 36.0k]
  ------------------
   54|      0|      return {};
   55|      0|   }
   56|  36.0k|   return r;
   57|  36.0k|}
_ZN5Botan13swar_in_rangeITkNSt3__117unsigned_integralEmEET_S2_S2_S2_:
  114|  46.1k|constexpr T swar_in_range(T v, T lower, T upper) {
  115|       |   // The constant 0x808080... as a T
  116|  46.1k|   constexpr T hi1 = (static_cast<T>(-1) / 255) << 7;
  117|       |   // The constant 0x7F7F7F... as a T
  118|  46.1k|   constexpr T lo7 = ~hi1;
  119|       |
  120|  46.1k|   const T sub = ((v | hi1) - (lower & lo7)) ^ ((v ^ (~lower)) & hi1);
  121|  46.1k|   const T a_lo = sub & lo7;
  122|  46.1k|   const T a_hi = sub & hi1;
  123|  46.1k|   return (lo7 - a_lo + upper) & hi1 & ~a_hi;
  124|  46.1k|}

_ZN5Botan12get_byte_varImEEhmT_:
   69|  48.3k|inline constexpr uint8_t get_byte_var(size_t byte_num, T input) {
   70|  48.3k|   return static_cast<uint8_t>(input >> (((~byte_num) & (sizeof(T) - 1)) << 3));
   71|  48.3k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS0_20unsigned_integralishEmQoosr3stdE7same_asIS4_T0_Esr3stdE7same_asIT1_S5_EEEvS6_Ph:
  711|      6|inline constexpr void store_any(T in, uint8_t out[]) {
  712|       |   // asserts that *out points to enough bytes to write into
  713|      6|   store_any<endianness, InT>(in, std::span<uint8_t, sizeof(T)>(out, sizeof(T)));
  714|      6|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS0_20unsigned_integralishEmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm8EEEQsr3stdE7same_asIS4_T0_EEEvT1_OT2_:
  646|      6|inline constexpr void store_any(T in, OutR&& out_range) {
  647|      6|   store_any<endianness, T>(in, std::forward<OutR>(out_range));
  648|      6|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm8EEEQnt15custom_storableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEEvS9_OT1_:
  525|      6|inline constexpr void store_any(WrappedInT wrapped_in, OutR&& out_range) {
  526|      6|   const auto in = detail::unwrap_strong_type_or_enum(wrapped_in);
  527|      6|   using InT = decltype(in);
  528|      6|   ranges::assert_exact_byte_length<sizeof(in)>(out_range);
  529|      6|   const std::span out{out_range};
  530|       |
  531|       |   // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  532|       |   // internally to copy ranges on a byte-by-byte basis, which is not allowed
  533|       |   // in a `constexpr` context.
  534|      6|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (534:7): [Folded, False: 6]
  ------------------
  535|      0|      return fallback_store_any<endianness, InT>(in, std::forward<OutR>(out_range));
  536|      6|   } else {
  537|       |      if constexpr(sizeof(InT) == 1) {
  538|       |         out[0] = static_cast<uint8_t>(in);
  539|       |      } else if constexpr(endianness == std::endian::native) {
  540|       |         typecast_copy(out, in);
  541|      6|      } else {
  542|      6|         static_assert(opposite(endianness) == std::endian::native);
  543|      6|         typecast_copy(out, reverse_bytes(in));
  544|      6|      }
  545|      6|   }
  546|      6|}
_ZN5Botan6detail26unwrap_strong_type_or_enumITkNS0_20unsigned_integralishEmEEDaT_:
  190|      6|constexpr auto unwrap_strong_type_or_enum(InT t) {
  191|       |   if constexpr(std::is_enum_v<InT>) {
  192|       |      // TODO: C++23: use std::to_underlying(in) instead
  193|       |      return static_cast<std::underlying_type_t<InT>>(t);
  194|      6|   } else {
  195|      6|      return Botan::unwrap_strong_type(t);
  196|      6|   }
  197|      6|}
_ZN5Botan8store_beINS_6detail10AutoDetectEJRKmPhEEEDaDpOT0_:
  745|      6|inline constexpr auto store_be(ParamTs&&... params) {
  746|      6|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|      6|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|  1.20k|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|  1.20k|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|  1.20k|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|  1.20k|   return detail::wrap_strong_type_or_enum<WrappedOutT>([&]() -> OutT {
  283|       |      // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  284|       |      // internally to copy ranges on a byte-by-byte basis, which is not allowed
  285|       |      // in a `constexpr` context.
  286|  1.20k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|  1.20k|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  1.20k|      } else {
  289|  1.20k|         const std::span in{in_range};
  290|  1.20k|         if constexpr(sizeof(OutT) == 1) {
  291|  1.20k|            return static_cast<OutT>(in[0]);
  292|  1.20k|         } else if constexpr(endianness == std::endian::native) {
  293|  1.20k|            return typecast_copy<OutT>(in);
  294|  1.20k|         } else {
  295|  1.20k|            static_assert(opposite(endianness) == std::endian::native);
  296|  1.20k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  1.20k|         }
  298|  1.20k|      }
  299|  1.20k|   }());
  300|  1.20k|}
_ZN5Botan6detail24wrap_strong_type_or_enumITkNS0_20unsigned_integralishEmTkNSt3__117unsigned_integralEmEEDaT0_:
  200|  19.2k|constexpr auto wrap_strong_type_or_enum(T t) {
  201|       |   if constexpr(std::is_enum_v<OutT>) {
  202|       |      return static_cast<OutT>(t);
  203|  19.2k|   } else {
  204|  19.2k|      return Botan::wrap_strong_type<OutT>(t);
  205|  19.2k|   }
  206|  19.2k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|  1.20k|   return detail::wrap_strong_type_or_enum<WrappedOutT>([&]() -> OutT {
  283|       |      // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  284|       |      // internally to copy ranges on a byte-by-byte basis, which is not allowed
  285|       |      // in a `constexpr` context.
  286|  1.20k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 1.20k]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  1.20k|      } else {
  289|  1.20k|         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|  1.20k|         } else {
  295|  1.20k|            static_assert(opposite(endianness) == std::endian::native);
  296|  1.20k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  1.20k|         }
  298|  1.20k|      }
  299|  1.20k|   }());
_ZN5Botan7load_beImJNSt3__14spanIKhLm8EEEEEEDaDpOT0_:
  504|  1.20k|inline constexpr auto load_be(ParamTs&&... params) {
  505|  1.20k|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|  1.20k|}
_ZN5Botan7load_beImJRNSt3__15arrayIhLm8EEEEEEDaDpOT0_:
  504|  18.0k|inline constexpr auto load_be(ParamTs&&... params) {
  505|  18.0k|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|  18.0k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEERNS2_5arrayIhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|  18.0k|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|  18.0k|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|  18.0k|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|  18.0k|   return detail::wrap_strong_type_or_enum<WrappedOutT>([&]() -> OutT {
  283|       |      // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  284|       |      // internally to copy ranges on a byte-by-byte basis, which is not allowed
  285|       |      // in a `constexpr` context.
  286|  18.0k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|  18.0k|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  18.0k|      } else {
  289|  18.0k|         const std::span in{in_range};
  290|  18.0k|         if constexpr(sizeof(OutT) == 1) {
  291|  18.0k|            return static_cast<OutT>(in[0]);
  292|  18.0k|         } else if constexpr(endianness == std::endian::native) {
  293|  18.0k|            return typecast_copy<OutT>(in);
  294|  18.0k|         } else {
  295|  18.0k|            static_assert(opposite(endianness) == std::endian::native);
  296|  18.0k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  18.0k|         }
  298|  18.0k|      }
  299|  18.0k|   }());
  300|  18.0k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges16contiguous_rangeIhEERNS2_5arrayIhLm8EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|  18.0k|   return detail::wrap_strong_type_or_enum<WrappedOutT>([&]() -> OutT {
  283|       |      // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  284|       |      // internally to copy ranges on a byte-by-byte basis, which is not allowed
  285|       |      // in a `constexpr` context.
  286|  18.0k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 18.0k]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  18.0k|      } else {
  289|  18.0k|         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|  18.0k|         } else {
  295|  18.0k|            static_assert(opposite(endianness) == std::endian::native);
  296|  18.0k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  18.0k|         }
  298|  18.0k|      }
  299|  18.0k|   }());

_ZN5Botan15bytes_to_stringENSt3__14spanIKhLm18446744073709551615EEE:
   76|  14.2k|inline std::string bytes_to_string(std::span<const uint8_t> bytes) {
   77|  14.2k|   return std::string(reinterpret_cast<const char*>(bytes.data()), bytes.size());
   78|  14.2k|}

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

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

_ZN5Botan17is_sub_element_ofERKNS_3OIDESt16initializer_listIjE:
   16|  26.9k|inline std::optional<uint32_t> is_sub_element_of(const OID& oid, std::initializer_list<uint32_t> prefix) {
   17|  26.9k|   const auto& c = oid.get_components();
   18|       |
   19|  26.9k|   if(c.size() != prefix.size() + 1) {
  ------------------
  |  Branch (19:7): [True: 11.5k, False: 15.3k]
  ------------------
   20|  11.5k|      return {};
   21|  11.5k|   }
   22|       |
   23|  15.3k|   if(!std::equal(c.begin(), c.end() - 1, prefix.begin(), prefix.end())) {
  ------------------
  |  Branch (23:7): [True: 472, False: 14.8k]
  ------------------
   24|    472|      return {};
   25|    472|   }
   26|       |
   27|  14.8k|   return c[c.size() - 1];
   28|  15.3k|}

_ZN5Botan11ASN1_ObjectD2Ev:
  122|   191k|      virtual ~ASN1_Object() = default;
_ZNK5Botan10BER_Object6is_setEv:
  138|   384k|      bool is_set() const { return m_type_tag != ASN1_Type::NoObject; }
_ZNK5Botan10BER_Object7taggingEv:
  140|   162k|      uint32_t tagging() const { return type_tag() | class_tag(); }
_ZNK5Botan10BER_Object8type_tagEv:
  142|   162k|      ASN1_Type type_tag() const { return m_type_tag; }
_ZNK5Botan10BER_Object9class_tagEv:
  144|   181k|      ASN1_Class class_tag() const { return m_class_tag; }
_ZNK5Botan10BER_Object4typeEv:
  146|  29.2k|      ASN1_Type type() const { return m_type_tag; }
_ZNK5Botan10BER_Object9get_classEv:
  148|  15.7k|      ASN1_Class get_class() const { return m_class_tag; }
_ZNK5Botan10BER_Object4bitsEv:
  150|  3.91M|      const uint8_t* bits() const { return m_value.data(); }
_ZNK5Botan10BER_Object6lengthEv:
  152|  8.07M|      size_t length() const { return m_value.size(); }
_ZNK5Botan10BER_Object4dataEv:
  154|  57.0k|      std::span<const uint8_t> data() const { return std::span{m_value}; }
_ZN5Botan10BER_Object12mutable_bitsEm:
  171|   137k|      uint8_t* mutable_bits(size_t length) {
  172|   137k|         m_value.resize(length);
  173|   137k|         return m_value.data();
  174|   137k|      }
_ZNK5Botan3OIDeqERKS0_:
  301|  14.4k|      bool operator==(const OID& other) const { return m_id == other.m_id; }
_ZNK5Botan3OID14get_componentsEv:
  321|  90.1k|      const std::vector<uint32_t>& get_components() const {
  322|  90.1k|         return m_id;
  323|  90.1k|      }
_ZNK5Botan11ASN1_String5emptyEv:
  369|    511|      bool empty() const { return m_utf8_str.empty(); }
_ZNK5Botan19AlgorithmIdentifier3oidEv:
  407|  5.78k|      const OID& oid() const { return m_oid; }
_ZNK5Botan19AlgorithmIdentifier10parametersEv:
  409|    392|      const std::vector<uint8_t>& parameters() const { return m_parameters; }
_ZNK5Botan19AlgorithmIdentifier20parameters_are_emptyEv:
  419|  5.54k|      bool parameters_are_empty() const { return m_parameters.empty(); }
_ZNK5Botan19AlgorithmIdentifier28parameters_are_null_or_emptyEv:
  421|  5.54k|      bool parameters_are_null_or_empty() const { return parameters_are_empty() || parameters_are_null(); }
  ------------------
  |  Branch (421:58): [True: 4.68k, False: 857]
  |  Branch (421:84): [True: 661, False: 196]
  ------------------
_ZN5BotanorENS_10ASN1_ClassES0_:
   78|  61.2k|inline ASN1_Class operator|(ASN1_Class x, ASN1_Class y) {
   79|  61.2k|   return static_cast<ASN1_Class>(static_cast<uint32_t>(x) | static_cast<uint32_t>(y));
   80|  61.2k|}
_ZN5BotanorENS_9ASN1_TypeENS_10ASN1_ClassE:
   82|   162k|inline uint32_t operator|(ASN1_Type x, ASN1_Class y) {
   83|   162k|   return static_cast<uint32_t>(x) | static_cast<uint32_t>(y);
   84|   162k|}
_ZN5BotanorENS_10ASN1_ClassENS_9ASN1_TypeE:
   86|  24.7k|inline uint32_t operator|(ASN1_Class x, ASN1_Type y) {
   87|  24.7k|   return static_cast<uint32_t>(x) | static_cast<uint32_t>(y);
   88|  24.7k|}
_ZN5BotanneERKNS_3OIDES2_:
  342|  2.89k|inline bool operator!=(const OID& a, const OID& b) {
  343|  2.89k|   return !(a == b);
  344|  2.89k|}
_ZN5Botan11ASN1_ObjectC2Ev:
  117|   109k|      ASN1_Object() = default;
_ZN5Botan19AlgorithmIdentifierC2Ev:
  399|  6.66k|      AlgorithmIdentifier() = default;
_ZN5Botan3OIDC2Ev:
  220|  25.2k|      explicit OID() = default;
_ZN5Botan11ASN1_ObjectC2ERKS0_:
  118|  55.2k|      ASN1_Object(const ASN1_Object&) = default;
_ZN5Botan11ASN1_ObjectC2EOS0_:
  120|  26.1k|      ASN1_Object(ASN1_Object&&) = default;
_ZN5Botan10BER_ObjectaSEOS0_:
  135|  56.4k|      BER_Object& operator=(BER_Object&& other) = default;
_ZN5Botan10BER_ObjectC2Ev:
  130|   231k|      BER_Object() = default;
_ZN5Botan10BER_ObjectC2EOS0_:
  133|  79.6k|      BER_Object(BER_Object&& other) = default;

_ZN5Botan9ASN1_TimeC2Ev:
   39|  17.7k|      ASN1_Time() = default;

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

_ZN5Botan11BER_Decoder6Limits3DEREv:
   35|  10.6k|            static Limits DER() { return Limits(false, 0); }
_ZN5Botan11BER_Decoder6LimitsC2Ebm:
   54|  10.6k|                  m_allow_ber(allow_ber), m_max_nested_indef(max_nested_indef) {}
_ZN5Botan11BER_Decoder15decode_optionalImEERS0_RT_NS_9ASN1_TypeENS_10ASN1_ClassERKS3_:
  285|  3.08k|      BER_Decoder& decode_optional(T& out, ASN1_Type type_tag, ASN1_Class class_tag, const T& default_value = T()) {
  286|  3.08k|         std::optional<T> optval;
  287|  3.08k|         this->decode_optional(optval, type_tag, class_tag);
  288|  3.08k|         out = optval ? *optval : default_value;
  ------------------
  |  Branch (288:16): [True: 2.93k, False: 152]
  ------------------
  289|  3.08k|         return (*this);
  290|  3.08k|      }
_ZN5Botan11BER_Decoder15decode_optionalImEERS0_RNSt3__18optionalIT_EENS_9ASN1_TypeENS_10ASN1_ClassE:
  394|  3.08k|BER_Decoder& BER_Decoder::decode_optional(std::optional<T>& optval, ASN1_Type type_tag, ASN1_Class class_tag) {
  395|  3.08k|   BER_Object obj = get_next_object();
  396|       |
  397|  3.08k|   if(obj.is_a(type_tag, class_tag)) {
  ------------------
  |  Branch (397:7): [True: 3.05k, False: 32]
  ------------------
  398|  3.05k|      T out{};
  399|  3.05k|      if(class_tag == ASN1_Class::ExplicitContextSpecific) {
  ------------------
  |  Branch (399:10): [True: 0, False: 3.05k]
  ------------------
  400|      0|         BER_Decoder(obj, m_limits).decode(out).verify_end();
  401|  3.05k|      } else {
  402|  3.05k|         this->push_back(std::move(obj));
  403|  3.05k|         this->decode(out, type_tag, class_tag);
  404|  3.05k|      }
  405|  3.05k|      optval = std::move(out);
  406|  3.05k|   } else {
  407|     32|      this->push_back(std::move(obj));
  408|     32|      optval = std::nullopt;
  409|     32|   }
  410|       |
  411|  3.08k|   return (*this);
  412|  3.08k|}
_ZN5Botan11BER_Decoder6decodeERm:
  225|     74|      BER_Decoder& decode(size_t& out) { return decode(out, ASN1_Type::Integer, ASN1_Class::Universal); }
_ZNK5Botan11BER_Decoder6limitsEv:
   98|  63.9k|      Limits limits() const { return m_limits; }
_ZN5Botan11BER_DecoderC2ERKNS_10BER_ObjectENS0_6LimitsE:
   81|    196|            BER_Decoder(obj.data(), limits) {}
_ZNK5Botan11BER_Decoder6Limits18allow_ber_encodingEv:
   44|   313k|            bool allow_ber_encoding() const { return m_allow_ber; }
_ZNK5Botan11BER_Decoder6Limits20require_der_encodingEv:
   46|   175k|            bool require_der_encoding() const { return !allow_ber_encoding(); }
_ZN5Botan11BER_Decoder14start_sequenceEv:
  160|  58.2k|      BER_Decoder start_sequence() { return start_cons(ASN1_Type::Sequence, ASN1_Class::Universal); }
_ZN5Botan11BER_Decoder9start_setEv:
  162|  3.18k|      BER_Decoder start_set() { return start_cons(ASN1_Type::Set, ASN1_Class::Universal); }
_ZN5Botan11BER_Decoder6decodeERNS_6BigIntE:
  230|  11.6k|      BER_Decoder& decode(BigInt& out) { return decode(out, ASN1_Type::Integer, ASN1_Class::Universal); }
_ZN5Botan11BER_Decoder6decodeINSt3__19allocatorIhEEEERS0_RNS2_6vectorIhT_EENS_9ASN1_TypeE:
  242|  18.5k|      BER_Decoder& decode(std::vector<uint8_t, Alloc>& out, ASN1_Type real_type) {
  243|  18.5k|         return decode(out, real_type, real_type, ASN1_Class::Universal);
  244|  18.5k|      }
_ZN5Botan11BER_Decoder9raw_bytesINSt3__19allocatorIhEEEERS0_RNS2_6vectorIhT_EE:
  203|  12.1k|      BER_Decoder& raw_bytes(std::vector<uint8_t, Alloc>& out) {
  204|  12.1k|         out.clear();
  205|  3.49M|         for(;;) {
  206|  3.49M|            if(auto next = this->read_next_byte()) {
  ------------------
  |  Branch (206:21): [True: 3.48M, False: 12.1k]
  ------------------
  207|  3.48M|               out.push_back(*next);
  208|  3.48M|            } else {
  209|  12.1k|               break;
  210|  12.1k|            }
  211|  3.49M|         }
  212|  12.1k|         return (*this);
  213|  12.1k|      }
_ZN5Botan11BER_Decoder15decode_optionalIbEERS0_RT_NS_9ASN1_TypeENS_10ASN1_ClassERKS3_:
  285|  15.3k|      BER_Decoder& decode_optional(T& out, ASN1_Type type_tag, ASN1_Class class_tag, const T& default_value = T()) {
  286|  15.3k|         std::optional<T> optval;
  287|  15.3k|         this->decode_optional(optval, type_tag, class_tag);
  288|  15.3k|         out = optval ? *optval : default_value;
  ------------------
  |  Branch (288:16): [True: 0, False: 15.3k]
  ------------------
  289|  15.3k|         return (*this);
  290|  15.3k|      }
_ZN5Botan11BER_Decoder15decode_optionalIbEERS0_RNSt3__18optionalIT_EENS_9ASN1_TypeENS_10ASN1_ClassE:
  394|  15.3k|BER_Decoder& BER_Decoder::decode_optional(std::optional<T>& optval, ASN1_Type type_tag, ASN1_Class class_tag) {
  395|  15.3k|   BER_Object obj = get_next_object();
  396|       |
  397|  15.3k|   if(obj.is_a(type_tag, class_tag)) {
  ------------------
  |  Branch (397:7): [True: 0, False: 15.3k]
  ------------------
  398|      0|      T out{};
  399|      0|      if(class_tag == ASN1_Class::ExplicitContextSpecific) {
  ------------------
  |  Branch (399:10): [True: 0, False: 0]
  ------------------
  400|      0|         BER_Decoder(obj, m_limits).decode(out).verify_end();
  401|      0|      } else {
  402|      0|         this->push_back(std::move(obj));
  403|      0|         this->decode(out, type_tag, class_tag);
  404|      0|      }
  405|      0|      optval = std::move(out);
  406|  15.3k|   } else {
  407|  15.3k|      this->push_back(std::move(obj));
  408|  15.3k|      optval = std::nullopt;
  409|  15.3k|   }
  410|       |
  411|  15.3k|   return (*this);
  412|  15.3k|}
_ZN5Botan11BER_Decoder22decode_optional_stringINSt3__19allocatorIhEEEERS0_RNS2_6vectorIhT_EENS_9ASN1_TypeEjNS_10ASN1_ClassE:
  345|     71|                                          ASN1_Class class_tag = ASN1_Class::ContextSpecific) {
  346|     71|         BER_Object obj = get_next_object();
  347|       |
  348|     71|         const ASN1_Type type_tag = static_cast<ASN1_Type>(expected_tag);
  349|       |
  350|     71|         if(obj.is_a(type_tag, class_tag)) {
  ------------------
  |  Branch (350:13): [True: 71, False: 0]
  ------------------
  351|     71|            if(class_tag == ASN1_Class::ExplicitContextSpecific) {
  ------------------
  |  Branch (351:16): [True: 0, False: 71]
  ------------------
  352|      0|               BER_Decoder(obj, m_limits).decode(out, real_type).verify_end();
  353|     71|            } else {
  354|     71|               push_back(std::move(obj));
  355|     71|               decode(out, real_type, type_tag, class_tag);
  356|     71|            }
  357|     71|         } else {
  358|      0|            out.clear();
  359|      0|            push_back(std::move(obj));
  360|      0|         }
  361|       |
  362|     71|         return (*this);
  363|     71|      }
_ZN5Botan11BER_Decoder11decode_listINS_3OIDEEERS0_RNSt3__16vectorIT_NS4_9allocatorIS6_EEEENS_9ASN1_TypeENS_10ASN1_ClassE:
  443|      1|BER_Decoder& BER_Decoder::decode_list(std::vector<T>& vec, ASN1_Type type_tag, ASN1_Class class_tag) {
  444|      1|   BER_Decoder list = start_cons(type_tag, class_tag);
  445|       |
  446|      1|   while(list.more_items()) {
  ------------------
  |  Branch (446:10): [True: 0, False: 1]
  ------------------
  447|      0|      T value;
  448|      0|      list.decode(value);
  449|      0|      vec.push_back(std::move(value));
  450|      0|   }
  451|       |
  452|      1|   list.end_cons();
  453|       |
  454|      1|   return (*this);
  455|      1|}

_ZN5Botan6BigIntC2Ev:
   45|  18.3k|      BigInt() = default;
_ZNK5Botan6BigInt9serializeINSt3__16vectorIhNS2_9allocatorIhEEEEEET_v:
  760|  11.5k|      T serialize() const {
  761|  11.5k|         return serialize<T>(this->bytes());
  762|  11.5k|      }
_ZNK5Botan6BigInt9serializeINSt3__16vectorIhNS2_9allocatorIhEEEEEET_m:
  747|  11.5k|      T serialize(size_t len) const {
  748|       |         // TODO this supports std::vector and secure_vector
  749|       |         // it would be nice if this also could work with std::array as in
  750|       |         //   bn.serialize_to<std::array<uint8_t, 32>>(32);
  751|  11.5k|         T out(len);
  752|  11.5k|         this->serialize_to(out);
  753|  11.5k|         return out;
  754|  11.5k|      }
_ZNK5Botan6BigInt6signumEv:
  467|  6.51k|      int signum() const {
  468|  6.51k|         if(sig_words() == 0) {
  ------------------
  |  Branch (468:13): [True: 7, False: 6.50k]
  ------------------
  469|      7|            return 0;
  470|      7|         }
  471|  6.50k|         return (sign() == Negative) ? -1 : 1;
  ------------------
  |  Branch (471:17): [True: 67, False: 6.43k]
  ------------------
  472|  6.51k|      }
_ZNK5Botan6BigInt9sig_wordsEv:
  648|  65.8k|      size_t sig_words() const { return m_data.sig_words(); }
_ZNK5Botan6BigInt4Data9sig_wordsEv:
 1102|  65.8k|            size_t sig_words() const {
 1103|  65.8k|               if(m_sig_words == sig_words_npos) {
  ------------------
  |  Branch (1103:19): [True: 18.0k, False: 47.7k]
  ------------------
 1104|  18.0k|                  m_sig_words = calc_sig_words();
 1105|  18.0k|               }
 1106|  65.8k|               return m_sig_words;
 1107|  65.8k|            }
_ZNK5Botan6BigInt4signEv:
  604|  6.64k|      Sign sign() const { return (m_signedness); }
_ZN5Botan6BigIntD2Ev:
  185|  18.3k|      ~BigInt() { _const_time_unpoison(); }
_ZN5Botan6BigInt5clearEv:
  415|  18.0k|      void clear() {
  416|  18.0k|         m_data.set_to_zero();
  417|  18.0k|         m_signedness = Positive;
  418|  18.0k|      }
_ZNK5Botan6BigInt7is_zeroEv:
  484|    141|      bool is_zero() const { return sig_words() == 0; }
_ZNK5Botan6BigInt7word_atEm:
  574|  66.7k|      word word_at(size_t n) const { return m_data.get_word_at(n); }
_ZNK5Botan6BigInt12reverse_signEv:
  609|    141|      Sign reverse_sign() const {
  610|    141|         if(sign() == Positive) {
  ------------------
  |  Branch (610:13): [True: 141, False: 0]
  ------------------
  611|    141|            return Negative;
  612|    141|         }
  613|      0|         return Positive;
  614|    141|      }
_ZN5Botan6BigInt9flip_signEv:
  619|    141|      BOTAN_DEPRECATED("Deprecated no replacement") void flip_sign() { set_sign(reverse_sign()); }
_ZN5Botan6BigInt8set_signENS0_4SignE:
  625|    141|      void set_sign(Sign sign) {
  626|    141|         if(sign == Negative && is_zero()) {
  ------------------
  |  Branch (626:13): [True: 141, False: 0]
  |  Branch (626:33): [True: 0, False: 141]
  ------------------
  627|      0|            sign = Positive;
  628|      0|         }
  629|       |
  630|    141|         m_signedness = sign;
  631|    141|      }
_ZN5Botan6BigInt18_assign_from_bytesENSt3__14spanIKhLm18446744073709551615EEE:
  983|  18.0k|      void _assign_from_bytes(std::span<const uint8_t> bytes) { assign_from_bytes(bytes); }
_ZNK5Botan6BigInt4Data10const_dataEv:
 1027|  18.3k|            const word* const_data() const { return m_reg.data(); }
_ZNK5Botan6BigInt4Data11get_word_atEm:
 1038|  66.7k|            word get_word_at(size_t n) const {
 1039|  66.7k|               if(n < m_reg.size()) {
  ------------------
  |  Branch (1039:19): [True: 66.7k, False: 0]
  ------------------
 1040|  66.7k|                  return m_reg[n];
 1041|  66.7k|               }
 1042|      0|               return 0;
 1043|  66.7k|            }
_ZNK5Botan6BigInt4Data4sizeEv:
 1075|  18.3k|            size_t size() const { return m_reg.size(); }
_ZN5Botan6BigInt4Data4swapERNSt3__16vectorImNS_16secure_allocatorImEEEE:
 1095|  18.0k|            void swap(secure_vector<word>& reg) noexcept {
 1096|  18.0k|               m_reg.swap(reg);
 1097|  18.0k|               invalidate_sig_words();
 1098|  18.0k|            }
_ZNK5Botan6BigInt4Data20invalidate_sig_wordsEv:
 1100|  18.0k|            void invalidate_sig_words() const noexcept { m_sig_words = sig_words_npos; }

_ZN5Botan17DataSource_MemoryC2ENSt3__14spanIKhLm18446744073709551615EEE:
  141|  13.9k|      explicit DataSource_Memory(std::span<const uint8_t> in) : m_source(in.begin(), in.end()), m_offset(0) {}
_ZN5Botan10DataSourceC2Ev:
  100|  74.9k|      DataSource() = default;
_ZN5Botan10DataSourceD2Ev:
  101|  74.9k|      virtual ~DataSource() = default;
_ZN5Botan17DataSource_MemoryC2ENSt3__16vectorIhNS_16secure_allocatorIhEEEE:
  135|    101|      explicit DataSource_Memory(secure_vector<uint8_t> in) : m_source(std::move(in)), m_offset(0) {}

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

_ZN5Botan11clear_bytesEPvm:
  101|  18.2k|inline constexpr void clear_bytes(void* ptr, size_t bytes) {
  102|  18.2k|   if(bytes > 0) {
  ------------------
  |  Branch (102:7): [True: 112, False: 18.1k]
  ------------------
  103|    112|      std::memset(ptr, 0, bytes);
  104|    112|   }
  105|  18.2k|}
_ZN5Botan8copy_memIhQsr3stdE12is_trivial_vIu7__decayIT_EEEEvPS1_PKS1_m:
  144|  4.02M|inline constexpr void copy_mem(T* out, const T* in, size_t n) {
  145|  4.02M|   BOTAN_ASSERT_IMPLICATION(n > 0, in != nullptr && out != nullptr, "If n > 0 then args are not null");
  ------------------
  |  |  103|  4.02M|   do {                                                                                          \
  |  |  104|  4.02M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                              \
  |  |  105|  8.02M|      if((expr1) && !(expr2)) {                                                                  \
  |  |  ------------------
  |  |  |  Branch (105:10): [True: 4.01M, False: 12.9k]
  |  |  |  Branch (105:23): [True: 4.01M, False: 0]
  |  |  |  Branch (105:23): [True: 4.01M, False: 0]
  |  |  ------------------
  |  |  106|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                     \
  |  |  107|      0|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |  108|      0|      }                                                                                          \
  |  |  109|  4.02M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (109:12): [Folded, False: 4.02M]
  |  |  ------------------
  ------------------
  146|       |
  147|  4.02M|   if(in != nullptr && out != nullptr && n > 0) {
  ------------------
  |  Branch (147:7): [True: 4.02M, False: 133]
  |  Branch (147:24): [True: 4.02M, False: 334]
  |  Branch (147:42): [True: 4.01M, False: 12.4k]
  ------------------
  148|  4.01M|      std::memmove(out, in, sizeof(T) * n);
  149|  4.01M|   }
  150|  4.02M|}
_ZN5Botan19secure_scrub_memoryITkNS_6ranges23contiguous_output_rangeERNSt3__16vectorIhNS2_9allocatorIhEEEEEEvOT_:
   59|   311k|void secure_scrub_memory(ranges::contiguous_output_range auto&& data) {
   60|   311k|   secure_scrub_memory(std::ranges::data(data), ranges::size_bytes(data));
   61|   311k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERKNSt3__14spanIhLm8EEEmQaaaasr3stdE23is_trivially_copyable_vIT0_Entsr3std6rangesE5rangeIS7_Esr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISF_EESG_E4type10value_typeEEEEvOSC_RKS7_:
  199|      6|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromT& in) {
  200|      6|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  201|      6|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERKNSt3__14spanIhLm8EEETkNS1_16contiguous_rangeENS3_IKmLm1EEEQaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISG_EESH_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINS9_IXsr21__is_primary_templateINSA_Iu14__remove_cvrefIDTclL_ZNSC_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSI_ISQ_EESR_E4type10value_typeEEEEvOSN_RKSD_:
  176|      6|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|      6|   ranges::assert_equal_byte_lengths(out, in);
  178|      6|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|      6|}
_ZN5Botan9clear_memIhEEvPT_m:
  118|    152|inline constexpr void clear_mem(T* ptr, size_t n) {
  119|    152|   clear_bytes(ptr, sizeof(T) * n);
  120|    152|}
_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|  1.20k|inline constexpr ToT typecast_copy(const FromR& src) {
  211|  1.20k|   ToT dst;  // NOLINT(*-member-init)
  212|  1.20k|   typecast_copy(dst, src);
  213|  1.20k|   return dst;
  214|  1.20k|}
_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|  1.20k|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|  1.20k|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|  1.20k|}
_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|  1.20k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  1.20k|   ranges::assert_equal_byte_lengths(out, in);
  178|  1.20k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  1.20k|}
_ZN5Botan9clear_memImEEvPT_m:
  118|  18.0k|inline constexpr void clear_mem(T* ptr, size_t n) {
  119|  18.0k|   clear_bytes(ptr, sizeof(T) * n);
  120|  18.0k|}
_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|  18.0k|inline constexpr void copy_mem(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  161|  18.0k|   ranges::assert_equal_byte_lengths(out, in);
  162|  18.0k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (162:7): [Folded, False: 18.0k]
  ------------------
  163|      0|      std::copy(std::ranges::begin(in), std::ranges::end(in), std::ranges::begin(out));
  164|  18.0k|   } else if(ranges::size_bytes(out) > 0) {
  ------------------
  |  Branch (164:14): [True: 18.0k, False: 0]
  ------------------
  165|  18.0k|      std::memmove(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  166|  18.0k|   }
  167|  18.0k|}
_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|  18.0k|inline constexpr ToT typecast_copy(const FromR& src) {
  211|  18.0k|   ToT dst;  // NOLINT(*-member-init)
  212|  18.0k|   typecast_copy(dst, src);
  213|  18.0k|   return dst;
  214|  18.0k|}
_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|  18.0k|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|  18.0k|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|  18.0k|}
_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|  18.0k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  18.0k|   ranges::assert_equal_byte_lengths(out, in);
  178|  18.0k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  18.0k|}

_ZN5Botan7X509_DNC2Ev:
   45|  3.08k|      X509_DN() = default;
_ZN5Botan10ExtensionsC2Ev:
  720|  14.6k|      Extensions() = default;
_ZNK5Botan10Extensions23get_extension_object_asINS_14Cert_Extension10CRL_NumberEEEPKT_RKNS_3OIDE:
  594|     75|      const T* get_extension_object_as(const OID& oid = T::static_oid()) const {
  595|     75|         if(const Certificate_Extension* extn = get_extension_object(oid)) {
  ------------------
  |  Branch (595:42): [True: 73, False: 2]
  ------------------
  596|       |            // Unknown_Extension oid_name is empty
  597|     73|            if(extn->oid_name().empty()) {
  ------------------
  |  Branch (597:16): [True: 4, False: 69]
  ------------------
  598|      4|               return nullptr;
  599|     69|            } else if(const T* extn_as_T = dynamic_cast<const T*>(extn)) {
  ------------------
  |  Branch (599:32): [True: 69, False: 0]
  ------------------
  600|     69|               return extn_as_T;
  601|     69|            } else {
  602|      0|               throw Decoding_Error("Exception::get_extension_object_as dynamic_cast failed");
  603|      0|            }
  604|     73|         }
  605|       |
  606|      2|         return nullptr;
  607|     75|      }
_ZNK5Botan10Extensions23get_extension_object_asINS_14Cert_Extension16Authority_Key_IDEEEPKT_RKNS_3OIDE:
  594|     75|      const T* get_extension_object_as(const OID& oid = T::static_oid()) const {
  595|     75|         if(const Certificate_Extension* extn = get_extension_object(oid)) {
  ------------------
  |  Branch (595:42): [True: 72, False: 3]
  ------------------
  596|       |            // Unknown_Extension oid_name is empty
  597|     72|            if(extn->oid_name().empty()) {
  ------------------
  |  Branch (597:16): [True: 1, False: 71]
  ------------------
  598|      1|               return nullptr;
  599|     71|            } else if(const T* extn_as_T = dynamic_cast<const T*>(extn)) {
  ------------------
  |  Branch (599:32): [True: 71, False: 0]
  ------------------
  600|     71|               return extn_as_T;
  601|     71|            } else {
  602|      0|               throw Decoding_Error("Exception::get_extension_object_as dynamic_cast failed");
  603|      0|            }
  604|     72|         }
  605|       |
  606|      3|         return nullptr;
  607|     75|      }
_ZN5Botan10ExtensionsD2Ev:
  728|  14.6k|      ~Extensions() override = default;
_ZNK5Botan10Extensions23get_extension_object_asINS_14Cert_Extension30CRL_Issuing_Distribution_PointEEEPKT_RKNS_3OIDE:
  594|     75|      const T* get_extension_object_as(const OID& oid = T::static_oid()) const {
  595|     75|         if(const Certificate_Extension* extn = get_extension_object(oid)) {
  ------------------
  |  Branch (595:42): [True: 0, False: 75]
  ------------------
  596|       |            // Unknown_Extension oid_name is empty
  597|      0|            if(extn->oid_name().empty()) {
  ------------------
  |  Branch (597:16): [True: 0, False: 0]
  ------------------
  598|      0|               return nullptr;
  599|      0|            } else if(const T* extn_as_T = dynamic_cast<const T*>(extn)) {
  ------------------
  |  Branch (599:32): [True: 0, False: 0]
  ------------------
  600|      0|               return extn_as_T;
  601|      0|            } else {
  602|      0|               throw Decoding_Error("Exception::get_extension_object_as dynamic_cast failed");
  603|      0|            }
  604|      0|         }
  605|       |
  606|     75|         return nullptr;
  607|     75|      }
_ZN5Botan10Extensions15Extensions_InfoC2EbRKNSt3__16vectorIhNS2_9allocatorIhEEEENS2_10unique_ptrINS_21Certificate_ExtensionENS2_14default_deleteISA_EEEE:
  743|  15.3k|                  m_obj(std::move(ext)), m_bits(encoding), m_critical(critical) {}
_ZN5Botan21Certificate_ExtensionD2Ev:
  568|  15.7k|      virtual ~Certificate_Extension() = default;
_ZN5Botan15AlternativeNameC2Ev:
  176|      4|      AlternativeName() = default;
_ZNK5Botan10Extensions23get_extension_object_asINS_14Cert_Extension14CRL_ReasonCodeEEEPKT_RKNS_3OIDE:
  594|  11.5k|      const T* get_extension_object_as(const OID& oid = T::static_oid()) const {
  595|  11.5k|         if(const Certificate_Extension* extn = get_extension_object(oid)) {
  ------------------
  |  Branch (595:42): [True: 3.63k, False: 7.92k]
  ------------------
  596|       |            // Unknown_Extension oid_name is empty
  597|  3.63k|            if(extn->oid_name().empty()) {
  ------------------
  |  Branch (597:16): [True: 286, False: 3.35k]
  ------------------
  598|    286|               return nullptr;
  599|  3.35k|            } else if(const T* extn_as_T = dynamic_cast<const T*>(extn)) {
  ------------------
  |  Branch (599:32): [True: 3.35k, False: 0]
  ------------------
  600|  3.35k|               return extn_as_T;
  601|  3.35k|            } else {
  602|      0|               throw Decoding_Error("Exception::get_extension_object_as dynamic_cast failed");
  603|      0|            }
  604|  3.63k|         }
  605|       |
  606|  7.92k|         return nullptr;
  607|  11.5k|      }

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

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

_ZN5Botan18unwrap_strong_typeIRmEEDcOT_:
  243|      6|[[nodiscard]] constexpr decltype(auto) unwrap_strong_type(T&& t) {
  244|      6|   if constexpr(!concepts::strong_type<std::remove_cvref_t<T>>) {
  245|       |      // If the parameter type isn't a strong type, return it as is.
  246|      6|      return std::forward<T>(t);
  247|       |   } else {
  248|       |      // Unwrap the strong type and return the underlying value.
  249|       |      return std::forward<T>(t).get();
  250|       |   }
  251|      6|}
_ZN5Botan16wrap_strong_typeImRmQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  268|  19.2k|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  269|  19.2k|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  270|       |      // Noop, if the parameter type already is the desired return type.
  271|  19.2k|      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|  19.2k|}

_ZN5Botan9CRL_EntryC2Ev:
   60|  11.6k|      CRL_Entry() = default;

_ZN5Botan14Cert_Extension10CRL_Number10static_oidEv:
  379|     75|      static OID static_oid() { return OID({2, 5, 29, 20}); }
_ZN5Botan14Cert_Extension16Authority_Key_ID10static_oidEv:
  146|     75|      static OID static_oid() { return OID({2, 5, 29, 35}); }
_ZNK5Botan14Cert_Extension16Authority_Key_ID10get_key_idEv:
  144|     71|      const std::vector<uint8_t>& get_key_id() const { return m_key_id; }
_ZN5Botan14Cert_Extension30CRL_Issuing_Distribution_Point10static_oidEv:
  487|     75|      static OID static_oid() { return OID({2, 5, 29, 28}); }
_ZNK5Botan14Cert_Extension16Authority_Key_ID8oid_nameEv:
  151|     71|      std::string oid_name() const override { return "X509v3.AuthorityKeyIdentifier"; }
_ZN5Botan14Cert_Extension10CRL_NumberC2Ev:
  373|     74|      CRL_Number() : m_has_value(false), m_crl_number(0) {}
_ZNK5Botan14Cert_Extension10CRL_Number8oid_nameEv:
  384|     69|      std::string oid_name() const override { return "X509v3.CRLNumber"; }
_ZN5Botan14Cert_Extension14CRL_ReasonCodeC2ENS_8CRL_CodeE:
  404|  3.63k|      explicit CRL_ReasonCode(CRL_Code r = CRL_Code::Unspecified) : m_reason(r) {}
_ZNK5Botan14Cert_Extension14CRL_ReasonCode10get_reasonEv:
  406|  3.35k|      CRL_Code get_reason() const { return m_reason; }
_ZN5Botan14Cert_Extension14CRL_ReasonCode10static_oidEv:
  408|  11.5k|      static OID static_oid() { return OID({2, 5, 29, 21}); }
_ZNK5Botan14Cert_Extension14CRL_ReasonCode8oid_nameEv:
  413|  3.35k|      std::string oid_name() const override { return "X509v3.ReasonCode"; }
_ZN5Botan14Cert_Extension23CRL_Distribution_Points18Distribution_PointC2ERKNS_15AlternativeNameE:
  434|      4|            explicit Distribution_Point(const AlternativeName& name = AlternativeName()) : m_point(name) {}
_ZN5Botan14Cert_Extension12OCSP_NoCheck10static_oidEv:
  519|  11.5k|      static OID static_oid() { return OID({1, 3, 6, 1, 5, 5, 7, 48, 1, 5}); }
_ZN5Botan14Cert_Extension17Unknown_ExtensionC2ERKNS_3OIDEbb:
  985|  11.8k|            m_oid(oid), m_critical(critical), m_failed_to_decode(failed_to_decode) {}
_ZNK5Botan14Cert_Extension17Unknown_Extension8oid_nameEv:
 1027|    291|      std::string oid_name() const override { return ""; }
_ZN5Botan14Cert_Extension30CRL_Issuing_Distribution_PointC2Ev:
  476|      4|      CRL_Issuing_Distribution_Point() = default;
_ZN5Botan14Cert_Extension16Authority_Key_IDC2Ev:
  140|    100|      Authority_Key_ID() = default;
_ZN5Botan14Cert_Extension18Extended_Key_UsageC2Ev:
  226|      1|      Extended_Key_Usage() = default;

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

_Z4fuzzNSt3__14spanIKhLm18446744073709551615EEE:
   12|  4.06k|void fuzz(std::span<const uint8_t> in) {
   13|  4.06k|   try {
   14|  4.06k|      Botan::DataSource_Memory input(in);
   15|  4.06k|      const Botan::X509_CRL crl(input);
   16|  4.06k|   } catch(const Botan::Exception& e) {}
   17|  4.06k|}

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

_ZNK5Botan19AlgorithmIdentifier19parameters_are_nullEv:
   49|    857|bool AlgorithmIdentifier::parameters_are_null() const {
   50|    857|   return (m_parameters.size() == 2 && (m_parameters[0] == 0x05) && (m_parameters[1] == 0x00));
  ------------------
  |  Branch (50:12): [True: 847, False: 10]
  |  Branch (50:40): [True: 823, False: 24]
  |  Branch (50:69): [True: 661, False: 162]
  ------------------
   51|    857|}
_ZN5BotaneqERKNS_19AlgorithmIdentifierES2_:
   53|  2.89k|bool operator==(const AlgorithmIdentifier& a1, const AlgorithmIdentifier& a2) {
   54|  2.89k|   if(a1.oid() != a2.oid()) {
  ------------------
  |  Branch (54:7): [True: 38, False: 2.85k]
  ------------------
   55|     38|      return false;
   56|     38|   }
   57|       |
   58|       |   /*
   59|       |   * Treat NULL and empty as equivalent
   60|       |   */
   61|  2.85k|   if(a1.parameters_are_null_or_empty() && a2.parameters_are_null_or_empty()) {
  ------------------
  |  Branch (61:7): [True: 2.68k, False: 171]
  |  Branch (61:44): [True: 2.66k, False: 25]
  ------------------
   62|  2.66k|      return true;
   63|  2.66k|   }
   64|       |
   65|    196|   return (a1.parameters() == a2.parameters());
   66|  2.85k|}
_ZN5BotanneERKNS_19AlgorithmIdentifierES2_:
   68|  2.89k|bool operator!=(const AlgorithmIdentifier& a1, const AlgorithmIdentifier& a2) {
   69|  2.89k|   return !(a1 == a2);
   70|  2.89k|}
_ZN5Botan19AlgorithmIdentifier11decode_fromERNS_11BER_DecoderE:
   82|  6.21k|void AlgorithmIdentifier::decode_from(BER_Decoder& codec) {
   83|  6.21k|   codec.start_sequence().decode(m_oid).raw_bytes(m_parameters).end_cons();
   84|  6.21k|}

_ZN5Botan10BER_ObjectD2Ev:
   27|   311k|BER_Object::~BER_Object() {
   28|   311k|   secure_scrub_memory(m_value);
   29|   311k|}
_ZNK5Botan10BER_Object11assert_is_aENS_9ASN1_TypeENS_10ASN1_ClassENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   34|  98.1k|void BER_Object::assert_is_a(ASN1_Type expected_type_tag, ASN1_Class expected_class_tag, std::string_view descr) const {
   35|  98.1k|   if(!this->is_a(expected_type_tag, expected_class_tag)) {
  ------------------
  |  Branch (35:7): [True: 495, False: 97.6k]
  ------------------
   36|    495|      std::stringstream msg;
   37|       |
   38|    495|      msg << "Tag mismatch when decoding " << descr << " got ";
   39|       |
   40|    495|      if(m_class_tag == ASN1_Class::NoObject && m_type_tag == ASN1_Type::NoObject) {
  ------------------
  |  Branch (40:10): [True: 60, False: 435]
  |  Branch (40:49): [True: 60, False: 0]
  ------------------
   41|     60|         msg << "EOF";
   42|    435|      } else {
   43|    435|         if(m_class_tag == ASN1_Class::Universal || m_class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (43:13): [True: 256, False: 179]
  |  Branch (43:53): [True: 136, False: 43]
  ------------------
   44|    392|            msg << asn1_tag_to_string(m_type_tag);
   45|    392|         } else {
   46|     43|            msg << std::to_string(static_cast<uint32_t>(m_type_tag));
   47|     43|         }
   48|       |
   49|    435|         msg << "/" << asn1_class_to_string(m_class_tag);
   50|    435|      }
   51|       |
   52|    495|      msg << " expected ";
   53|       |
   54|    495|      if(expected_class_tag == ASN1_Class::Universal || expected_class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (54:10): [True: 266, False: 229]
  |  Branch (54:57): [True: 229, False: 0]
  ------------------
   55|    495|         msg << asn1_tag_to_string(expected_type_tag);
   56|    495|      } else {
   57|      0|         msg << std::to_string(static_cast<uint32_t>(expected_type_tag));
   58|      0|      }
   59|       |
   60|    495|      msg << "/" << asn1_class_to_string(expected_class_tag);
   61|       |
   62|    495|      throw BER_Decoding_Error(msg.str());
   63|    495|   }
   64|  98.1k|}
_ZNK5Botan10BER_Object4is_aENS_9ASN1_TypeENS_10ASN1_ClassE:
   66|   117k|bool BER_Object::is_a(ASN1_Type expected_type_tag, ASN1_Class expected_class_tag) const {
   67|   117k|   return (m_type_tag == expected_type_tag && m_class_tag == expected_class_tag);
  ------------------
  |  Branch (67:12): [True: 101k, False: 15.8k]
  |  Branch (67:47): [True: 101k, False: 21]
  ------------------
   68|   117k|}
_ZNK5Botan10BER_Object4is_aEiNS_10ASN1_ClassE:
   70|    146|bool BER_Object::is_a(int expected_type_tag, ASN1_Class expected_class_tag) const {
   71|    146|   return is_a(ASN1_Type(expected_type_tag), expected_class_tag);
   72|    146|}
_ZN5Botan10BER_Object11set_taggingENS_9ASN1_TypeENS_10ASN1_ClassE:
   74|   138k|void BER_Object::set_tagging(ASN1_Type type_tag, ASN1_Class class_tag) {
   75|   138k|   m_type_tag = type_tag;
   76|   138k|   m_class_tag = class_tag;
   77|   138k|}
_ZN5Botan20asn1_class_to_stringENS_10ASN1_ClassE:
   79|    930|std::string asn1_class_to_string(ASN1_Class type) {
   80|    930|   switch(type) {
   81|    522|      case ASN1_Class::Universal:
  ------------------
  |  Branch (81:7): [True: 522, False: 408]
  ------------------
   82|    522|         return "UNIVERSAL";
   83|    365|      case ASN1_Class::Constructed:
  ------------------
  |  Branch (83:7): [True: 365, False: 565]
  ------------------
   84|    365|         return "CONSTRUCTED";
   85|      5|      case ASN1_Class::ContextSpecific:
  ------------------
  |  Branch (85:7): [True: 5, False: 925]
  ------------------
   86|      5|         return "CONTEXT_SPECIFIC";
   87|      5|      case ASN1_Class::Application:
  ------------------
  |  Branch (87:7): [True: 5, False: 925]
  ------------------
   88|      5|         return "APPLICATION";
   89|      3|      case ASN1_Class::Private:
  ------------------
  |  Branch (89:7): [True: 3, False: 927]
  ------------------
   90|      3|         return "PRIVATE";
   91|      0|      case ASN1_Class::NoObject:
  ------------------
  |  Branch (91:7): [True: 0, False: 930]
  ------------------
   92|      0|         return "NO_OBJECT";
   93|     30|      default:
  ------------------
  |  Branch (93:7): [True: 30, False: 900]
  ------------------
   94|     30|         return "CLASS(" + std::to_string(static_cast<size_t>(type)) + ")";
   95|    930|   }
   96|    930|}
_ZN5Botan18asn1_tag_to_stringENS_9ASN1_TypeE:
   98|  2.82k|std::string asn1_tag_to_string(ASN1_Type type) {
   99|  2.82k|   switch(type) {
  100|    230|      case ASN1_Type::Sequence:
  ------------------
  |  Branch (100:7): [True: 230, False: 2.59k]
  ------------------
  101|    230|         return "SEQUENCE";
  102|       |
  103|      6|      case ASN1_Type::Set:
  ------------------
  |  Branch (103:7): [True: 6, False: 2.82k]
  ------------------
  104|      6|         return "SET";
  105|       |
  106|     18|      case ASN1_Type::PrintableString:
  ------------------
  |  Branch (106:7): [True: 18, False: 2.80k]
  ------------------
  107|     18|         return "PRINTABLE STRING";
  108|       |
  109|  1.89k|      case ASN1_Type::NumericString:
  ------------------
  |  Branch (109:7): [True: 1.89k, False: 936]
  ------------------
  110|  1.89k|         return "NUMERIC STRING";
  111|       |
  112|      3|      case ASN1_Type::Ia5String:
  ------------------
  |  Branch (112:7): [True: 3, False: 2.82k]
  ------------------
  113|      3|         return "IA5 STRING";
  114|       |
  115|      1|      case ASN1_Type::TeletexString:
  ------------------
  |  Branch (115:7): [True: 1, False: 2.82k]
  ------------------
  116|      1|         return "T61 STRING";
  117|       |
  118|     36|      case ASN1_Type::Utf8String:
  ------------------
  |  Branch (118:7): [True: 36, False: 2.79k]
  ------------------
  119|     36|         return "UTF8 STRING";
  120|       |
  121|      2|      case ASN1_Type::VisibleString:
  ------------------
  |  Branch (121:7): [True: 2, False: 2.82k]
  ------------------
  122|      2|         return "VISIBLE STRING";
  123|       |
  124|      1|      case ASN1_Type::BmpString:
  ------------------
  |  Branch (124:7): [True: 1, False: 2.82k]
  ------------------
  125|      1|         return "BMP STRING";
  126|       |
  127|      1|      case ASN1_Type::UniversalString:
  ------------------
  |  Branch (127:7): [True: 1, False: 2.82k]
  ------------------
  128|      1|         return "UNIVERSAL STRING";
  129|       |
  130|      1|      case ASN1_Type::UtcTime:
  ------------------
  |  Branch (130:7): [True: 1, False: 2.82k]
  ------------------
  131|      1|         return "UTC TIME";
  132|       |
  133|     39|      case ASN1_Type::GeneralizedTime:
  ------------------
  |  Branch (133:7): [True: 39, False: 2.78k]
  ------------------
  134|     39|         return "GENERALIZED TIME";
  135|       |
  136|      4|      case ASN1_Type::OctetString:
  ------------------
  |  Branch (136:7): [True: 4, False: 2.82k]
  ------------------
  137|      4|         return "OCTET STRING";
  138|       |
  139|     55|      case ASN1_Type::BitString:
  ------------------
  |  Branch (139:7): [True: 55, False: 2.77k]
  ------------------
  140|     55|         return "BIT STRING";
  141|       |
  142|    231|      case ASN1_Type::Enumerated:
  ------------------
  |  Branch (142:7): [True: 231, False: 2.59k]
  ------------------
  143|    231|         return "ENUMERATED";
  144|       |
  145|      3|      case ASN1_Type::Integer:
  ------------------
  |  Branch (145:7): [True: 3, False: 2.82k]
  ------------------
  146|      3|         return "INTEGER";
  147|       |
  148|      1|      case ASN1_Type::Null:
  ------------------
  |  Branch (148:7): [True: 1, False: 2.82k]
  ------------------
  149|      1|         return "NULL";
  150|       |
  151|      2|      case ASN1_Type::ObjectId:
  ------------------
  |  Branch (151:7): [True: 2, False: 2.82k]
  ------------------
  152|      2|         return "OBJECT";
  153|       |
  154|      1|      case ASN1_Type::Boolean:
  ------------------
  |  Branch (154:7): [True: 1, False: 2.82k]
  ------------------
  155|      1|         return "BOOLEAN";
  156|       |
  157|      0|      case ASN1_Type::NoObject:
  ------------------
  |  Branch (157:7): [True: 0, False: 2.82k]
  ------------------
  158|      0|         return "NO_OBJECT";
  159|       |
  160|    301|      default:
  ------------------
  |  Branch (160:7): [True: 301, False: 2.52k]
  ------------------
  161|    301|         return "TAG(" + std::to_string(static_cast<uint32_t>(type)) + ")";
  162|  2.82k|   }
  163|  2.82k|}
_ZN5Botan18BER_Decoding_ErrorC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  168|  1.07k|BER_Decoding_Error::BER_Decoding_Error(std::string_view err) : Decoding_Error(fmt("BER: {}", err)) {}
_ZN5Botan11BER_Bad_TagC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEj:
  170|     33|BER_Bad_Tag::BER_Bad_Tag(std::string_view str, uint32_t tagging) : BER_Decoding_Error(fmt("{}: {}", str, tagging)) {}
_ZN5Botan4ASN19to_stringERKNS_10BER_ObjectE:
  190|  14.2k|std::string to_string(const BER_Object& obj) {
  191|  14.2k|   return bytes_to_string(obj.data());
  192|  14.2k|}
_ZN5Botan4ASN19maybe_BERERNS_10DataSourceE:
  197|  4.06k|bool maybe_BER(DataSource& source) {
  198|  4.06k|   uint8_t first_u8 = 0;
  199|  4.06k|   if(source.peek_byte(first_u8) == 0) {
  ------------------
  |  Branch (199:7): [True: 0, False: 4.06k]
  ------------------
  200|      0|      BOTAN_ASSERT_EQUAL(source.read_byte(first_u8), 0, "Expected EOF");
  ------------------
  |  |   90|      0|   do {                                                                                                \
  |  |   91|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                                    \
  |  |   92|      0|      if((expr1) != (expr2)) {                                                                         \
  |  |  ------------------
  |  |  |  Branch (92:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   93|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                           \
  |  |   94|      0|         Botan::assertion_failure(#expr1 " == " #expr2, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   95|      0|      }                                                                                                \
  |  |   96|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (96:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  201|      0|      throw Stream_IO_Error("ASN1::maybe_BER: Source was empty");
  202|      0|   }
  203|       |
  204|  4.06k|   const auto cons_seq = static_cast<uint8_t>(ASN1_Class::Constructed) | static_cast<uint8_t>(ASN1_Type::Sequence);
  205|  4.06k|   return first_u8 == cons_seq;
  206|  4.06k|}

_ZN5Botan3OIDC2ESt16initializer_listIjE:
  104|  23.3k|OID::OID(std::initializer_list<uint32_t> init) : m_id(init) {
  105|  23.3k|   oid_valid_check(m_id);
  106|  23.3k|}
_ZN5BotanltERKNS_3OIDES2_:
  173|  31.5k|bool operator<(const OID& a, const OID& b) {
  174|  31.5k|   const std::vector<uint32_t>& oid1 = a.get_components();
  175|  31.5k|   const std::vector<uint32_t>& oid2 = b.get_components();
  176|       |
  177|  31.5k|   return std::lexicographical_compare(oid1.begin(), oid1.end(), oid2.begin(), oid2.end());
  178|  31.5k|}
_ZN5Botan3OID11decode_fromERNS_11BER_DecoderE:
  223|  24.7k|void OID::decode_from(BER_Decoder& decoder) {
  224|  24.7k|   const BER_Object obj = decoder.get_next_object();
  225|  24.7k|   if(obj.tagging() != (ASN1_Class::Universal | ASN1_Type::ObjectId)) {
  ------------------
  |  Branch (225:7): [True: 33, False: 24.6k]
  ------------------
  226|     33|      throw BER_Bad_Tag("Error decoding OID, unknown tag", obj.tagging());
  227|     33|   }
  228|       |
  229|  24.6k|   if(obj.length() == 0) {
  ------------------
  |  Branch (229:7): [True: 1, False: 24.6k]
  ------------------
  230|      1|      throw BER_Decoding_Error("OID encoding is too short");
  231|      1|   }
  232|       |
  233|  24.6k|   auto consume = [](BufferSlicer& data) -> uint32_t {
  234|  24.6k|      BOTAN_ASSERT_NOMSG(!data.empty());
  235|  24.6k|      uint32_t b = data.take_byte();
  236|       |
  237|  24.6k|      if(b > 0x7F) {
  238|  24.6k|         b &= 0x7F;
  239|       |
  240|       |         // Even BER requires that the OID have minimal length, ie that
  241|       |         // the first byte of a multibyte encoding cannot be zero
  242|       |         // See X.690 section 8.19.2
  243|  24.6k|         if(b == 0) {
  244|  24.6k|            throw Decoding_Error("Leading zero byte in multibyte OID encoding");
  245|  24.6k|         }
  246|       |
  247|  24.6k|         while(true) {
  248|  24.6k|            if(data.empty()) {
  249|  24.6k|               throw Decoding_Error("Truncated OID value");
  250|  24.6k|            }
  251|       |
  252|  24.6k|            const uint8_t next = data.take_byte();
  253|  24.6k|            const bool more = (next & 0x80) == 0x80;
  254|  24.6k|            const uint8_t value = next & 0x7F;
  255|       |
  256|  24.6k|            if((b >> (32 - 7)) != 0) {
  257|  24.6k|               throw Decoding_Error("OID component overflow");
  258|  24.6k|            }
  259|       |
  260|  24.6k|            b = (b << 7) | value;
  261|       |
  262|  24.6k|            if(!more) {
  263|  24.6k|               break;
  264|  24.6k|            }
  265|  24.6k|         }
  266|  24.6k|      }
  267|       |
  268|  24.6k|      return b;
  269|  24.6k|   };
  270|       |
  271|  24.6k|   BufferSlicer data(obj.data());
  272|  24.6k|   std::vector<uint32_t> parts;
  273|   117k|   while(!data.empty()) {
  ------------------
  |  Branch (273:10): [True: 92.6k, False: 24.6k]
  ------------------
  274|  92.6k|      const uint32_t comp = consume(data);
  275|       |
  276|  92.6k|      if(parts.empty()) {
  ------------------
  |  Branch (276:10): [True: 24.6k, False: 67.9k]
  ------------------
  277|       |         // divide into root and second arc
  278|       |
  279|  24.6k|         const uint32_t root_arc = [](uint32_t b0) -> uint32_t {
  280|  24.6k|            if(b0 < 40) {
  281|  24.6k|               return 0;
  282|  24.6k|            } else if(b0 < 80) {
  283|  24.6k|               return 1;
  284|  24.6k|            } else {
  285|  24.6k|               return 2;
  286|  24.6k|            }
  287|  24.6k|         }(comp);
  288|       |
  289|  24.6k|         parts.push_back(root_arc);
  290|  24.6k|         BOTAN_ASSERT_NOMSG(comp >= 40 * root_arc);
  ------------------
  |  |   77|  24.6k|   do {                                                                     \
  |  |   78|  24.6k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  24.6k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 24.6k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  24.6k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 24.6k]
  |  |  ------------------
  ------------------
  291|  24.6k|         parts.push_back(comp - 40 * root_arc);
  292|  67.9k|      } else {
  293|  67.9k|         parts.push_back(comp);
  294|  67.9k|      }
  295|  92.6k|   }
  296|       |
  297|  24.6k|   m_id = parts;
  298|  24.6k|}
asn1_oid.cpp:_ZN5Botan12_GLOBAL__N_115oid_valid_checkENSt3__14spanIKjLm18446744073709551615EEE:
   26|  23.3k|void oid_valid_check(std::span<const uint32_t> oid) {
   27|  23.3k|   BOTAN_ARG_CHECK(oid.size() >= 2, "OID too short to be valid");
  ------------------
  |  |   35|  23.3k|   do {                                                          \
  |  |   36|  23.3k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  23.3k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 23.3k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  23.3k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 23.3k]
  |  |  ------------------
  ------------------
   28|  23.3k|   BOTAN_ARG_CHECK(oid[0] <= 2, "OID root out of range");
  ------------------
  |  |   35|  23.3k|   do {                                                          \
  |  |   36|  23.3k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  23.3k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 23.3k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  23.3k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 23.3k]
  |  |  ------------------
  ------------------
   29|  23.3k|   BOTAN_ARG_CHECK(oid[1] <= 39 || oid[0] == 2, "OID second arc too large");
  ------------------
  |  |   35|  23.3k|   do {                                                          \
  |  |   36|  23.3k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  23.3k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 23.3k, False: 0]
  |  |  |  Branch (37:12): [True: 0, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  23.3k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 23.3k]
  |  |  ------------------
  ------------------
   30|       |   // This last is a limitation of using 32 bit integers when decoding
   31|       |   // not a limitation of ASN.1 object identifiers in general
   32|  23.3k|   BOTAN_ARG_CHECK(oid[1] <= 0xFFFFFFAF, "OID second arc too large");
  ------------------
  |  |   35|  23.3k|   do {                                                          \
  |  |   36|  23.3k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  23.3k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 23.3k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  23.3k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 23.3k]
  |  |  ------------------
  ------------------
   33|  23.3k|}
asn1_oid.cpp:_ZZN5Botan3OID11decode_fromERNS_11BER_DecoderEENK3$_0clERNS_12BufferSlicerE:
  233|  92.6k|   auto consume = [](BufferSlicer& data) -> uint32_t {
  234|  92.6k|      BOTAN_ASSERT_NOMSG(!data.empty());
  ------------------
  |  |   77|  92.6k|   do {                                                                     \
  |  |   78|  92.6k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  92.6k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 92.6k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  92.6k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 92.6k]
  |  |  ------------------
  ------------------
  235|  92.6k|      uint32_t b = data.take_byte();
  236|       |
  237|  92.6k|      if(b > 0x7F) {
  ------------------
  |  Branch (237:10): [True: 12.4k, False: 80.1k]
  ------------------
  238|  12.4k|         b &= 0x7F;
  239|       |
  240|       |         // Even BER requires that the OID have minimal length, ie that
  241|       |         // the first byte of a multibyte encoding cannot be zero
  242|       |         // See X.690 section 8.19.2
  243|  12.4k|         if(b == 0) {
  ------------------
  |  Branch (243:13): [True: 2, False: 12.4k]
  ------------------
  244|      2|            throw Decoding_Error("Leading zero byte in multibyte OID encoding");
  245|      2|         }
  246|       |
  247|  18.7k|         while(true) {
  ------------------
  |  Branch (247:16): [True: 18.7k, Folded]
  ------------------
  248|  18.7k|            if(data.empty()) {
  ------------------
  |  Branch (248:16): [True: 35, False: 18.7k]
  ------------------
  249|     35|               throw Decoding_Error("Truncated OID value");
  250|     35|            }
  251|       |
  252|  18.7k|            const uint8_t next = data.take_byte();
  253|  18.7k|            const bool more = (next & 0x80) == 0x80;
  254|  18.7k|            const uint8_t value = next & 0x7F;
  255|       |
  256|  18.7k|            if((b >> (32 - 7)) != 0) {
  ------------------
  |  Branch (256:16): [True: 18, False: 18.7k]
  ------------------
  257|     18|               throw Decoding_Error("OID component overflow");
  258|     18|            }
  259|       |
  260|  18.7k|            b = (b << 7) | value;
  261|       |
  262|  18.7k|            if(!more) {
  ------------------
  |  Branch (262:16): [True: 12.3k, False: 6.35k]
  ------------------
  263|  12.3k|               break;
  264|  12.3k|            }
  265|  18.7k|         }
  266|  12.4k|      }
  267|       |
  268|  92.5k|      return b;
  269|  92.6k|   };
asn1_oid.cpp:_ZZN5Botan3OID11decode_fromERNS_11BER_DecoderEENK3$_1clEj:
  279|  24.6k|         const uint32_t root_arc = [](uint32_t b0) -> uint32_t {
  280|  24.6k|            if(b0 < 40) {
  ------------------
  |  Branch (280:16): [True: 183, False: 24.4k]
  ------------------
  281|    183|               return 0;
  282|  24.4k|            } else if(b0 < 80) {
  ------------------
  |  Branch (282:23): [True: 6.25k, False: 18.2k]
  ------------------
  283|  6.25k|               return 1;
  284|  18.2k|            } else {
  285|  18.2k|               return 2;
  286|  18.2k|            }
  287|  24.6k|         }(comp);

_ZN5Botan11ASN1_StringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS_9ASN1_TypeE:
  135|  3.18k|ASN1_String::ASN1_String(std::string_view str, ASN1_Type t) : m_utf8_str(str), m_tag(t) {
  136|  3.18k|   if(!is_utf8_subset_string_type(m_tag)) {
  ------------------
  |  Branch (136:7): [True: 0, False: 3.18k]
  ------------------
  137|      0|      throw Invalid_Argument("ASN1_String only supports encoding to UTF-8 or a UTF-8 subset");
  138|      0|   }
  139|       |
  140|  3.18k|   if(!is_valid_asn1_string_content(m_utf8_str, m_tag)) {
  ------------------
  |  Branch (140:7): [True: 0, False: 3.18k]
  ------------------
  141|      0|      throw Invalid_Argument(fmt("ASN1_String: Invalid {} encoding", asn1_tag_to_string(m_tag)));
  142|      0|   }
  143|  3.18k|}
_ZN5Botan11ASN1_StringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  145|  3.18k|ASN1_String::ASN1_String(std::string_view str) : ASN1_String(str, choose_encoding(str)) {}
_ZN5Botan11ASN1_String11decode_fromERNS_11BER_DecoderE:
  162|  3.18k|void ASN1_String::decode_from(BER_Decoder& source) {
  163|  3.18k|   const BER_Object obj = source.get_next_object();
  164|       |
  165|  3.18k|   if(obj.get_class() != ASN1_Class::Universal || !is_asn1_string_type(obj.type())) {
  ------------------
  |  Branch (165:7): [True: 730, False: 2.45k]
  |  Branch (165:51): [True: 0, False: 2.45k]
  ------------------
  166|    730|      auto typ = static_cast<uint32_t>(obj.type());
  167|    730|      auto cls = static_cast<uint32_t>(obj.get_class());
  168|    730|      throw Decoding_Error(fmt("ASN1_String: Unknown string type {}/{}", typ, cls));
  169|    730|   }
  170|       |
  171|  2.45k|   m_tag = obj.type();
  172|  2.45k|   m_data.assign(obj.bits(), obj.bits() + obj.length());
  173|       |
  174|  2.45k|   if(m_tag == ASN1_Type::BmpString) {
  ------------------
  |  Branch (174:7): [True: 0, False: 2.45k]
  ------------------
  175|      0|      m_utf8_str = ucs2_to_utf8(m_data.data(), m_data.size());
  176|  2.45k|   } else if(m_tag == ASN1_Type::UniversalString) {
  ------------------
  |  Branch (176:14): [True: 0, False: 2.45k]
  ------------------
  177|      0|      m_utf8_str = ucs4_to_utf8(m_data.data(), m_data.size());
  178|  2.45k|   } else if(m_tag == ASN1_Type::TeletexString) {
  ------------------
  |  Branch (178:14): [True: 5, False: 2.44k]
  ------------------
  179|       |      /*
  180|       |      TeletexString is nominally ITU T.61 not ISO-8859-1 but it seems
  181|       |      the majority of implementations actually used that charset here.
  182|       |      */
  183|      5|      m_utf8_str = latin1_to_utf8(m_data.data(), m_data.size());
  184|  2.44k|   } else {
  185|       |      // All other supported string types are UTF-8 or some subset thereof
  186|  2.44k|      m_utf8_str = ASN1::to_string(obj);
  187|       |
  188|  2.44k|      if(!is_valid_asn1_string_content(m_utf8_str, m_tag)) {
  ------------------
  |  Branch (188:10): [True: 1.94k, False: 508]
  ------------------
  189|  1.94k|         throw Decoding_Error(fmt("ASN1_String: Invalid {} encoding", asn1_tag_to_string(m_tag)));
  190|  1.94k|      }
  191|  2.44k|   }
  192|  2.45k|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_119is_asn1_string_typeENS_9ASN1_TypeE:
   99|  2.45k|bool is_asn1_string_type(ASN1_Type tag) {
  100|  2.45k|   return (is_utf8_subset_string_type(tag) || tag == ASN1_Type::TeletexString || tag == ASN1_Type::BmpString ||
  ------------------
  |  Branch (100:12): [True: 2.44k, False: 5]
  |  Branch (100:47): [True: 5, False: 0]
  |  Branch (100:82): [True: 0, False: 0]
  ------------------
  101|      0|           tag == ASN1_Type::UniversalString);
  ------------------
  |  Branch (101:12): [True: 0, False: 0]
  ------------------
  102|  2.45k|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_126is_utf8_subset_string_typeENS_9ASN1_TypeE:
   94|  11.2k|bool is_utf8_subset_string_type(ASN1_Type tag) {
   95|  11.2k|   return (tag == ASN1_Type::NumericString || tag == ASN1_Type::PrintableString || tag == ASN1_Type::VisibleString ||
  ------------------
  |  Branch (95:12): [True: 3.77k, False: 7.49k]
  |  Branch (95:47): [True: 7.38k, False: 109]
  |  Branch (95:84): [True: 24, False: 85]
  ------------------
   96|     85|           tag == ASN1_Type::Ia5String || tag == ASN1_Type::Utf8String);
  ------------------
  |  Branch (96:12): [True: 10, False: 75]
  |  Branch (96:43): [True: 70, False: 5]
  ------------------
   97|  11.2k|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_128is_valid_asn1_string_contentERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_9ASN1_TypeE:
  104|  5.63k|bool is_valid_asn1_string_content(const std::string& str, ASN1_Type tag) {
  105|  5.63k|   BOTAN_ASSERT_NOMSG(is_utf8_subset_string_type(tag));
  ------------------
  |  |   77|  5.63k|   do {                                                                     \
  |  |   78|  5.63k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  5.63k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 5.63k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  5.63k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 5.63k]
  |  |  ------------------
  ------------------
  106|       |
  107|  5.63k|   switch(tag) {
  108|     35|      case ASN1_Type::Utf8String:
  ------------------
  |  Branch (108:7): [True: 35, False: 5.59k]
  ------------------
  109|     35|         return is_valid_utf8(str);
  110|  1.88k|      case ASN1_Type::NumericString:
  ------------------
  |  Branch (110:7): [True: 1.88k, False: 3.74k]
  ------------------
  111|  5.57k|      case ASN1_Type::PrintableString:
  ------------------
  |  Branch (111:7): [True: 3.69k, False: 1.94k]
  ------------------
  112|  5.58k|      case ASN1_Type::Ia5String:
  ------------------
  |  Branch (112:7): [True: 5, False: 5.62k]
  ------------------
  113|  5.59k|      case ASN1_Type::VisibleString:
  ------------------
  |  Branch (113:7): [True: 12, False: 5.61k]
  ------------------
  114|  5.59k|         return g_char_validator.valid_encoding(str, tag);
  115|      0|      default:
  ------------------
  |  Branch (115:7): [True: 0, False: 5.63k]
  ------------------
  116|      0|         return false;
  117|  5.63k|   }
  118|  5.63k|}
asn1_str.cpp:_ZNK5Botan12_GLOBAL__N_131ASN1_String_Codepoint_Validator14valid_encodingENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_9ASN1_TypeE:
   25|  8.77k|      constexpr bool valid_encoding(std::string_view str, ASN1_Type tag) const {
   26|  8.77k|         const uint8_t mask = mask_for(tag);
   27|  8.77k|         for(const char c : str) {
  ------------------
  |  Branch (27:27): [True: 8.65k, False: 6.87k]
  ------------------
   28|  8.65k|            const uint8_t codepoint = static_cast<uint8_t>(c);
   29|  8.65k|            const bool is_valid = (m_table[codepoint] & mask) != 0;
   30|       |
   31|  8.65k|            if(!is_valid) {
  ------------------
  |  Branch (31:16): [True: 1.90k, False: 6.75k]
  ------------------
   32|  1.90k|               return false;
   33|  1.90k|            }
   34|  8.65k|         }
   35|       |
   36|  6.87k|         return true;
   37|  8.77k|      }
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_131ASN1_String_Codepoint_Validator8mask_forENS_9ASN1_TypeE:
   45|  8.77k|      static constexpr uint8_t mask_for(ASN1_Type tag) {
   46|  8.77k|         switch(tag) {
   47|  1.88k|            case ASN1_Type::NumericString:
  ------------------
  |  Branch (47:13): [True: 1.88k, False: 6.89k]
  ------------------
   48|  1.88k|               return Numeric_String;
   49|  6.87k|            case ASN1_Type::PrintableString:
  ------------------
  |  Branch (49:13): [True: 6.87k, False: 1.90k]
  ------------------
   50|  6.87k|               return Printable_String;
   51|      5|            case ASN1_Type::Ia5String:
  ------------------
  |  Branch (51:13): [True: 5, False: 8.77k]
  ------------------
   52|      5|               return IA5_String;
   53|     12|            case ASN1_Type::VisibleString:
  ------------------
  |  Branch (53:13): [True: 12, False: 8.76k]
  ------------------
   54|     12|               return Visible_String;
   55|      0|            default:
  ------------------
  |  Branch (55:13): [True: 0, False: 8.77k]
  ------------------
   56|      0|               return 0;
   57|  8.77k|         }
   58|  8.77k|      }
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_115choose_encodingENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  120|  3.18k|ASN1_Type choose_encoding(std::string_view str) {
  121|  3.18k|   if(g_char_validator.valid_encoding(str, ASN1_Type::PrintableString)) {
  ------------------
  |  Branch (121:7): [True: 3.18k, False: 0]
  ------------------
  122|  3.18k|      return ASN1_Type::PrintableString;
  123|  3.18k|   } else {
  124|      0|      return ASN1_Type::Utf8String;
  125|      0|   }
  126|  3.18k|}

_ZN5Botan9ASN1_Time11decode_fromERNS_11BER_DecoderE:
   59|  11.8k|void ASN1_Time::decode_from(BER_Decoder& source) {
   60|  11.8k|   const BER_Object ber_time = source.get_next_object();
   61|       |
   62|  11.8k|   if(ber_time.get_class() != ASN1_Class::Universal ||
  ------------------
  |  Branch (62:7): [True: 1, False: 11.8k]
  ------------------
   63|  11.8k|      (ber_time.type() != ASN1_Type::UtcTime && ber_time.type() != ASN1_Type::GeneralizedTime)) {
  ------------------
  |  Branch (63:8): [True: 2, False: 11.8k]
  |  Branch (63:49): [True: 0, False: 2]
  ------------------
   64|      0|      throw Decoding_Error(fmt("ASN1_Time: Unexpected tag {}/{}",
   65|      0|                               static_cast<uint32_t>(ber_time.type()),
   66|      0|                               static_cast<uint32_t>(ber_time.get_class())));
   67|      0|   }
   68|       |
   69|  11.8k|   try {
   70|  11.8k|      set_to(ASN1::to_string(ber_time), ber_time.type());
   71|  11.8k|   } catch(Invalid_Argument& e) {
   72|      3|      throw Decoding_Error(fmt("Invalid ASN1_Time encoding: {}", e.what()));
   73|      3|   }
   74|  11.8k|}
_ZN5Botan9ASN1_Time6set_toENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS_9ASN1_TypeE:
  176|  11.8k|void ASN1_Time::set_to(std::string_view t_spec, ASN1_Type spec_tag) {
  177|  11.8k|   BOTAN_ARG_CHECK(spec_tag == ASN1_Type::UtcTime || spec_tag == ASN1_Type::GeneralizedTime,
  ------------------
  |  |   35|  11.8k|   do {                                                          \
  |  |   36|  11.8k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  11.8k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:12): [True: 11.8k, False: 2]
  |  |  |  Branch (37:12): [True: 2, False: 0]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  11.8k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 11.8k]
  |  |  ------------------
  ------------------
  178|  11.8k|                   "Invalid tag for ASN1_Time");
  179|       |
  180|  11.8k|   if(spec_tag == ASN1_Type::GeneralizedTime) {
  ------------------
  |  Branch (180:7): [True: 2, False: 11.8k]
  ------------------
  181|      2|      BOTAN_ARG_CHECK(t_spec.size() == 15, "Invalid GeneralizedTime input string");
  ------------------
  |  |   35|      2|   do {                                                          \
  |  |   36|      2|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|      2|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 2]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|      2|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  182|  11.8k|   } else if(spec_tag == ASN1_Type::UtcTime) {
  ------------------
  |  Branch (182:14): [True: 11.8k, False: 0]
  ------------------
  183|  11.8k|      BOTAN_ARG_CHECK(t_spec.size() == 13, "Invalid UTCTime input string");
  ------------------
  |  |   35|  11.8k|   do {                                                          \
  |  |   36|  11.8k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  11.8k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 1, False: 11.8k]
  |  |  ------------------
  |  |   38|      1|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      1|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      1|      }                                                          \
  |  |   41|  11.8k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 11.8k]
  |  |  ------------------
  ------------------
  184|  11.8k|   }
  185|       |
  186|  11.8k|   BOTAN_ARG_CHECK(t_spec.back() == 'Z', "Botan does not support ASN1 times with timezones other than Z");
  ------------------
  |  |   35|  11.8k|   do {                                                          \
  |  |   36|  11.8k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  11.8k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 11.8k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  11.8k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 11.8k]
  |  |  ------------------
  ------------------
  187|       |
  188|  11.8k|   const size_t field_len = 2;
  189|       |
  190|  11.8k|   const size_t year_start = 0;
  191|  11.8k|   const size_t year_len = (spec_tag == ASN1_Type::UtcTime) ? 2 : 4;
  ------------------
  |  Branch (191:28): [True: 11.8k, False: 3]
  ------------------
  192|  11.8k|   const size_t month_start = year_start + year_len;
  193|  11.8k|   const size_t day_start = month_start + field_len;
  194|  11.8k|   const size_t hour_start = day_start + field_len;
  195|  11.8k|   const size_t min_start = hour_start + field_len;
  196|  11.8k|   const size_t sec_start = min_start + field_len;
  197|       |
  198|  11.8k|   m_year = to_u32bit(t_spec.substr(year_start, year_len));
  199|  11.8k|   m_month = to_u32bit(t_spec.substr(month_start, field_len));
  200|  11.8k|   m_day = to_u32bit(t_spec.substr(day_start, field_len));
  201|  11.8k|   m_hour = to_u32bit(t_spec.substr(hour_start, field_len));
  202|  11.8k|   m_minute = to_u32bit(t_spec.substr(min_start, field_len));
  203|  11.8k|   m_second = to_u32bit(t_spec.substr(sec_start, field_len));
  204|  11.8k|   m_tag = spec_tag;
  205|       |
  206|  11.8k|   if(spec_tag == ASN1_Type::UtcTime) {
  ------------------
  |  Branch (206:7): [True: 11.8k, False: 3]
  ------------------
  207|  11.8k|      if(m_year >= 50) {
  ------------------
  |  Branch (207:10): [True: 1, False: 11.8k]
  ------------------
  208|      1|         m_year += 1900;
  209|  11.8k|      } else {
  210|  11.8k|         m_year += 2000;
  211|  11.8k|      }
  212|  11.8k|   }
  213|       |
  214|  11.8k|   if(!passes_sanity_check()) {
  ------------------
  |  Branch (214:7): [True: 2, False: 11.8k]
  ------------------
  215|      2|      throw Invalid_Argument(fmt("ASN1_Time string '{}' does not seem to be valid", t_spec));
  216|      2|   }
  217|  11.8k|}
_ZNK5Botan9ASN1_Time19passes_sanity_checkEv:
  222|  11.8k|bool ASN1_Time::passes_sanity_check() const {
  223|       |   // AppVeyor's trust store includes a cert with expiration date in 3016 ...
  224|  11.8k|   if(m_year < 1950 || m_year > 3100) {
  ------------------
  |  Branch (224:7): [True: 0, False: 11.8k]
  |  Branch (224:24): [True: 0, False: 11.8k]
  ------------------
  225|      0|      return false;
  226|      0|   }
  227|  11.8k|   if(m_month == 0 || m_month > 12) {
  ------------------
  |  Branch (227:7): [True: 0, False: 11.8k]
  |  Branch (227:23): [True: 0, False: 11.8k]
  ------------------
  228|      0|      return false;
  229|      0|   }
  230|       |
  231|  11.8k|   const uint32_t days_in_month[12] = {31, 28 + 1, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  232|       |
  233|  11.8k|   if(m_day == 0 || m_day > days_in_month[m_month - 1]) {
  ------------------
  |  Branch (233:7): [True: 0, False: 11.8k]
  |  Branch (233:21): [True: 2, False: 11.8k]
  ------------------
  234|      2|      return false;
  235|      2|   }
  236|       |
  237|  11.8k|   if(m_month == 2 && m_day == 29) {
  ------------------
  |  Branch (237:7): [True: 478, False: 11.3k]
  |  Branch (237:23): [True: 45, False: 433]
  ------------------
  238|     45|      if(m_year % 4 != 0) {
  ------------------
  |  Branch (238:10): [True: 0, False: 45]
  ------------------
  239|      0|         return false;  // not a leap year
  240|      0|      }
  241|       |
  242|     45|      if(m_year % 100 == 0 && m_year % 400 != 0) {
  ------------------
  |  Branch (242:10): [True: 0, False: 45]
  |  Branch (242:31): [True: 0, False: 0]
  ------------------
  243|      0|         return false;
  244|      0|      }
  245|     45|   }
  246|       |
  247|  11.8k|   if(m_hour >= 24 || m_minute >= 60 || m_second > 60) {
  ------------------
  |  Branch (247:7): [True: 0, False: 11.8k]
  |  Branch (247:23): [True: 0, False: 11.8k]
  |  Branch (247:41): [True: 0, False: 11.8k]
  ------------------
  248|      0|      return false;
  249|      0|   }
  250|       |
  251|  11.8k|   if(m_tag == ASN1_Type::UtcTime) {
  ------------------
  |  Branch (251:7): [True: 11.8k, False: 2]
  ------------------
  252|       |      /*
  253|       |      UTCTime limits the value of components such that leap seconds
  254|       |      are not covered. See "UNIVERSAL 23" in "Information technology
  255|       |      Abstract Syntax Notation One (ASN.1): Specification of basic notation"
  256|       |
  257|       |      http://www.itu.int/ITU-T/studygroups/com17/languages/
  258|       |      */
  259|  11.8k|      if(m_second > 59) {
  ------------------
  |  Branch (259:10): [True: 0, False: 11.8k]
  ------------------
  260|      0|         return false;
  261|      0|      }
  262|  11.8k|   }
  263|       |
  264|  11.8k|   return true;
  265|  11.8k|}

_ZN5Botan11BER_DecoderD2Ev:
  366|  74.5k|BER_Decoder::~BER_Decoder() = default;
_ZNK5Botan11BER_Decoder10more_itemsEv:
  371|  57.2k|bool BER_Decoder::more_items() const {
  372|  57.2k|   if(m_source->end_of_data() && !m_pushed.is_set()) {
  ------------------
  |  Branch (372:7): [True: 12.3k, False: 44.9k]
  |  Branch (372:34): [True: 12.3k, False: 0]
  ------------------
  373|  12.3k|      return false;
  374|  12.3k|   }
  375|  44.9k|   return true;
  376|  57.2k|}
_ZN5Botan11BER_Decoder10verify_endEv:
  381|  15.3k|BER_Decoder& BER_Decoder::verify_end() {
  382|  15.3k|   return verify_end("BER_Decoder::verify_end called, but data remains");
  383|  15.3k|}
_ZN5Botan11BER_Decoder10verify_endENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  388|  15.3k|BER_Decoder& BER_Decoder::verify_end(std::string_view err) {
  389|  15.3k|   if(!m_source->end_of_data() || m_pushed.is_set()) {
  ------------------
  |  Branch (389:7): [True: 0, False: 15.3k]
  |  Branch (389:35): [True: 0, False: 15.3k]
  ------------------
  390|      0|      throw Decoding_Error(err);
  391|      0|   }
  392|  15.3k|   return (*this);
  393|  15.3k|}
_ZN5Botan11BER_Decoder17discard_remainingEv:
  398|     71|BER_Decoder& BER_Decoder::discard_remaining() {
  399|     71|   m_pushed = BER_Object();
  400|     71|   uint8_t buf = 0;
  401|     71|   while(m_source->read_byte(buf) != 0) {}
  ------------------
  |  Branch (401:10): [True: 0, False: 71]
  ------------------
  402|     71|   return (*this);
  403|     71|}
_ZN5Botan11BER_Decoder14read_next_byteEv:
  405|  3.49M|std::optional<uint8_t> BER_Decoder::read_next_byte() {
  406|  3.49M|   BOTAN_ASSERT_NOMSG(m_source != nullptr);
  ------------------
  |  |   77|  3.49M|   do {                                                                     \
  |  |   78|  3.49M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  3.49M|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 3.49M]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  3.49M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 3.49M]
  |  |  ------------------
  ------------------
  407|  3.49M|   uint8_t b = 0;
  408|  3.49M|   if(m_source->read_byte(b) != 0) {
  ------------------
  |  Branch (408:7): [True: 3.48M, False: 12.1k]
  ------------------
  409|  3.48M|      return b;
  410|  3.48M|   } else {
  411|  12.1k|      return {};
  412|  12.1k|   }
  413|  3.49M|}
_ZN5Botan11BER_Decoder16peek_next_objectEv:
  415|    194|const BER_Object& BER_Decoder::peek_next_object() {
  416|    194|   if(!m_pushed.is_set()) {
  ------------------
  |  Branch (416:7): [True: 194, False: 0]
  ------------------
  417|    194|      m_pushed = get_next_object();
  418|    194|   }
  419|       |
  420|    194|   return m_pushed;
  421|    194|}
_ZN5Botan11BER_Decoder15get_next_objectEv:
  426|   157k|BER_Object BER_Decoder::get_next_object() {
  427|   157k|   BER_Object next;
  428|       |
  429|   157k|   if(m_pushed.is_set()) {
  ------------------
  |  Branch (429:7): [True: 18.7k, False: 138k]
  ------------------
  430|  18.7k|      std::swap(next, m_pushed);
  431|  18.7k|      return next;
  432|  18.7k|   }
  433|       |
  434|   138k|   for(;;) {
  435|   138k|      ASN1_Type type_tag = ASN1_Type::NoObject;
  436|   138k|      ASN1_Class class_tag = ASN1_Class::NoObject;
  437|   138k|      decode_tag(m_source, type_tag, class_tag);
  438|   138k|      next.set_tagging(type_tag, class_tag);
  439|   138k|      if(next.is_set() == false) {  // no more objects
  ------------------
  |  Branch (439:10): [True: 137, False: 138k]
  ------------------
  440|    137|         return next;
  441|    137|      }
  442|       |
  443|   138k|      const size_t allow_indef = m_limits.allow_ber_encoding() ? m_limits.max_nested_indefinite_length() : 0;
  ------------------
  |  Branch (443:34): [True: 0, False: 138k]
  ------------------
  444|   138k|      const bool der_mode = m_limits.require_der_encoding();
  445|   138k|      const auto dl = decode_length(m_source, allow_indef, der_mode, is_constructed(class_tag));
  446|       |
  447|       |      // Per X.690 8.1.5 the only valid EOC encoding is the two-octet
  448|       |      // sequence 0x00 0x00. Reject any other length encoding on a tag of
  449|       |      // (Eoc, Universal) before we consume the "content" bytes.
  450|   138k|      if(type_tag == ASN1_Type::Eoc && class_tag == ASN1_Class::Universal &&
  ------------------
  |  Branch (450:10): [True: 178, False: 138k]
  |  Branch (450:40): [True: 27, False: 151]
  ------------------
  451|     27|         (dl.content_length() != 0 || dl.indefinite_length())) {
  ------------------
  |  Branch (451:11): [True: 13, False: 14]
  |  Branch (451:39): [True: 0, False: 14]
  ------------------
  452|     13|         throw BER_Decoding_Error("EOC marker with non-zero length");
  453|     13|      }
  454|       |
  455|   138k|      if(!m_source->check_available(dl.total_length())) {
  ------------------
  |  Branch (455:10): [True: 137, False: 138k]
  ------------------
  456|    137|         throw BER_Decoding_Error("Value truncated");
  457|    137|      }
  458|       |
  459|   138k|      uint8_t* out = next.mutable_bits(dl.content_length());
  460|   138k|      if(m_source->read(out, dl.content_length()) != dl.content_length()) {
  ------------------
  |  Branch (460:10): [True: 0, False: 138k]
  ------------------
  461|      0|         throw BER_Decoding_Error("Value truncated");
  462|      0|      }
  463|       |
  464|   138k|      if(dl.indefinite_length()) {
  ------------------
  |  Branch (464:10): [True: 0, False: 138k]
  ------------------
  465|       |         // After reading the data consume the 2-byte EOC
  466|      0|         uint8_t eoc[2] = {0xFF, 0xFF};
  467|      0|         if(m_source->read(eoc, 2) != 2 || eoc[0] != 0x00 || eoc[1] != 0x00) {
  ------------------
  |  Branch (467:13): [True: 0, False: 0]
  |  Branch (467:44): [True: 0, False: 0]
  |  Branch (467:62): [True: 0, False: 0]
  ------------------
  468|      0|            throw BER_Decoding_Error("Missing or malformed EOC marker");
  469|      0|         }
  470|      0|      }
  471|       |
  472|   138k|      if(next.tagging() == static_cast<uint32_t>(ASN1_Type::Eoc)) {
  ------------------
  |  Branch (472:10): [True: 14, False: 138k]
  ------------------
  473|     14|         if(m_limits.require_der_encoding()) {
  ------------------
  |  Branch (473:13): [True: 14, False: 0]
  ------------------
  474|     14|            throw BER_Decoding_Error("Detected EOC marker in DER structure");
  475|     14|         }
  476|      0|         continue;
  477|   138k|      } else {
  478|   138k|         break;
  479|   138k|      }
  480|   138k|   }
  481|       |
  482|   138k|   return next;
  483|   138k|}
_ZN5Botan11BER_Decoder9push_backEONS_10BER_ObjectE:
  507|  18.5k|void BER_Decoder::push_back(BER_Object&& obj) {
  508|  18.5k|   if(m_pushed.is_set()) {
  ------------------
  |  Branch (508:7): [True: 0, False: 18.5k]
  ------------------
  509|      0|      throw Invalid_State("BER_Decoder: Only one push back is allowed");
  510|      0|   }
  511|  18.5k|   m_pushed = std::move(obj);
  512|  18.5k|}
_ZN5Botan11BER_Decoder10start_consENS_9ASN1_TypeENS_10ASN1_ClassE:
  514|  61.4k|BER_Decoder BER_Decoder::start_cons(ASN1_Type type_tag, ASN1_Class class_tag) {
  515|  61.4k|   BER_Object obj = get_next_object();
  516|  61.4k|   obj.assert_is_a(type_tag, class_tag | ASN1_Class::Constructed);
  517|  61.4k|   BER_Decoder child(std::move(obj), this);
  518|  61.4k|   return child;
  519|  61.4k|}
_ZN5Botan11BER_Decoder8end_consEv:
  524|  42.7k|BER_Decoder& BER_Decoder::end_cons() {
  525|  42.7k|   if(m_parent == nullptr) {
  ------------------
  |  Branch (525:7): [True: 0, False: 42.7k]
  ------------------
  526|      0|      throw Invalid_State("BER_Decoder::end_cons called with null parent");
  527|      0|   }
  528|  42.7k|   if(!m_source->end_of_data() || m_pushed.is_set()) {
  ------------------
  |  Branch (528:7): [True: 14, False: 42.7k]
  |  Branch (528:35): [True: 0, False: 42.7k]
  ------------------
  529|     14|      throw Decoding_Error("BER_Decoder::end_cons called with data left");
  530|     14|   }
  531|  42.7k|   return (*m_parent);
  532|  42.7k|}
_ZN5Botan11BER_DecoderC2EONS_10BER_ObjectEPS0_:
  535|  60.9k|      m_limits(parent != nullptr ? parent->limits() : BER_Decoder::Limits::BER()), m_parent(parent) {
  ------------------
  |  Branch (535:16): [True: 60.9k, False: 0]
  ------------------
  536|  60.9k|   m_data_src = std::make_unique<DataSource_BERObject>(std::move(obj));
  537|  60.9k|   m_source = m_data_src.get();
  538|  60.9k|}
_ZN5Botan11BER_DecoderC2ERNS_10DataSourceENS0_6LimitsE:
  543|  3.74k|BER_Decoder::BER_Decoder(DataSource& src, Limits limits) : m_limits(limits), m_source(&src) {}
_ZN5Botan11BER_DecoderC2ENSt3__14spanIKhLm18446744073709551615EEENS0_6LimitsE:
  548|  9.90k|BER_Decoder::BER_Decoder(std::span<const uint8_t> buf, Limits limits) : m_limits(limits) {
  549|  9.90k|   m_data_src = std::make_unique<DataSource_Memory>(buf);
  550|  9.90k|   m_source = m_data_src.get();
  551|  9.90k|}
_ZN5Botan11BER_Decoder6decodeERNS_11ASN1_ObjectENS_9ASN1_TypeENS_10ASN1_ClassE:
  560|  71.9k|BER_Decoder& BER_Decoder::decode(ASN1_Object& obj, ASN1_Type /*unused*/, ASN1_Class /*unused*/) {
  561|  71.9k|   obj.decode_from(*this);
  562|  71.9k|   return (*this);
  563|  71.9k|}
_ZN5Botan11BER_Decoder6decodeERmNS_9ASN1_TypeENS_10ASN1_ClassE:
  610|  6.76k|BER_Decoder& BER_Decoder::decode(size_t& out, ASN1_Type type_tag, ASN1_Class class_tag) {
  611|  6.76k|   BigInt integer;
  612|  6.76k|   decode(integer, type_tag, class_tag);
  613|       |
  614|  6.76k|   if(integer.signum() < 0) {
  ------------------
  |  Branch (614:7): [True: 67, False: 6.69k]
  ------------------
  615|     67|      throw BER_Decoding_Error("Decoded small integer value was negative");
  616|     67|   }
  617|       |
  618|  6.69k|   if(integer.bits() > 32) {
  ------------------
  |  Branch (618:7): [True: 51, False: 6.64k]
  ------------------
  619|     51|      throw BER_Decoding_Error("Decoded integer value larger than expected");
  620|     51|   }
  621|       |
  622|  6.64k|   out = 0;
  623|  32.2k|   for(size_t i = 0; i != 4; ++i) {
  ------------------
  |  Branch (623:22): [True: 25.5k, False: 6.64k]
  ------------------
  624|  25.5k|      out = (out << 8) | integer.byte_at(3 - i);
  625|  25.5k|   }
  626|       |
  627|  6.64k|   return (*this);
  628|  6.69k|}
_ZN5Botan11BER_Decoder6decodeERNS_6BigIntENS_9ASN1_TypeENS_10ASN1_ClassE:
  660|  18.3k|BER_Decoder& BER_Decoder::decode(BigInt& out, ASN1_Type type_tag, ASN1_Class class_tag) {
  661|  18.3k|   const BER_Object obj = get_next_object();
  662|  18.3k|   obj.assert_is_a(type_tag, class_tag);
  663|       |
  664|       |   // DER requires minimal INTEGER encoding (X.690 section 8.3.2)
  665|  18.3k|   if(m_limits.require_der_encoding()) {
  ------------------
  |  Branch (665:7): [True: 18.1k, False: 244]
  ------------------
  666|  18.1k|      if(obj.length() == 0) {
  ------------------
  |  Branch (666:10): [True: 2, False: 18.1k]
  ------------------
  667|      2|         throw BER_Decoding_Error("Detected empty INTEGER encoding in DER structure");
  668|      2|      }
  669|  18.1k|      if(obj.length() > 1) {
  ------------------
  |  Branch (669:10): [True: 11.7k, False: 6.36k]
  ------------------
  670|  11.7k|         if(obj.bits()[0] == 0x00 && (obj.bits()[1] & 0x80) == 0) {
  ------------------
  |  Branch (670:13): [True: 334, False: 11.4k]
  |  Branch (670:38): [True: 39, False: 295]
  ------------------
  671|     39|            throw BER_Decoding_Error("Detected non-minimal INTEGER encoding in DER structure");
  672|     39|         }
  673|  11.7k|         if(obj.bits()[0] == 0xFF && (obj.bits()[1] & 0x80) != 0) {
  ------------------
  |  Branch (673:13): [True: 40, False: 11.6k]
  |  Branch (673:38): [True: 12, False: 28]
  ------------------
  674|     12|            throw BER_Decoding_Error("Detected non-minimal INTEGER encoding in DER structure");
  675|     12|         }
  676|  11.7k|      }
  677|  18.1k|   }
  678|       |
  679|  18.3k|   if(obj.length() == 0) {
  ------------------
  |  Branch (679:7): [True: 0, False: 18.3k]
  ------------------
  680|      0|      out.clear();
  681|  18.3k|   } else {
  682|  18.3k|      const uint8_t first = obj.bits()[0];
  683|  18.3k|      const bool negative = (first & 0x80) == 0x80;
  684|       |
  685|  18.3k|      if(negative) {
  ------------------
  |  Branch (685:10): [True: 141, False: 18.1k]
  ------------------
  686|    141|         secure_vector<uint8_t> vec(obj.bits(), obj.bits() + obj.length());
  687|    521|         for(size_t i = obj.length(); i > 0; --i) {
  ------------------
  |  Branch (687:39): [True: 521, False: 0]
  ------------------
  688|    521|            const bool gt0 = (vec[i - 1] > 0);
  689|    521|            vec[i - 1] -= 1;
  690|    521|            if(gt0) {
  ------------------
  |  Branch (690:16): [True: 141, False: 380]
  ------------------
  691|    141|               break;
  692|    141|            }
  693|    521|         }
  694|  4.20k|         for(size_t i = 0; i != obj.length(); ++i) {
  ------------------
  |  Branch (694:28): [True: 4.06k, False: 141]
  ------------------
  695|  4.06k|            vec[i] = ~vec[i];
  696|  4.06k|         }
  697|    141|         out._assign_from_bytes(vec);
  698|    141|         out.flip_sign();
  699|  18.1k|      } else {
  700|  18.1k|         out._assign_from_bytes(obj.data());
  701|  18.1k|      }
  702|  18.3k|   }
  703|       |
  704|  18.3k|   return (*this);
  705|  18.3k|}
_ZN5Botan11BER_Decoder6decodeERNSt3__16vectorIhNS1_9allocatorIhEEEENS_9ASN1_TypeES7_NS_10ASN1_ClassE:
  782|  18.6k|                                 ASN1_Class class_tag) {
  783|  18.6k|   if(real_type != ASN1_Type::OctetString && real_type != ASN1_Type::BitString) {
  ------------------
  |  Branch (783:7): [True: 3.17k, False: 15.4k]
  |  Branch (783:46): [True: 0, False: 3.17k]
  ------------------
  784|      0|      throw BER_Bad_Tag("Bad tag for {BIT,OCTET} STRING", static_cast<uint32_t>(real_type));
  785|      0|   }
  786|       |
  787|  18.6k|   asn1_decode_binary_string(
  788|  18.6k|      buffer, get_next_object(), real_type, type_tag, class_tag, m_limits.require_der_encoding());
  789|  18.6k|   return (*this);
  790|  18.6k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_110decode_tagEPNS_10DataSourceERNS_9ASN1_TypeERNS_10ASN1_ClassE:
   27|   138k|size_t decode_tag(DataSource* ber, ASN1_Type& type_tag, ASN1_Class& class_tag) {
   28|   138k|   auto b = ber->read_byte();
   29|       |
   30|   138k|   if(!b) {
  ------------------
  |  Branch (30:7): [True: 137, False: 138k]
  ------------------
   31|    137|      type_tag = ASN1_Type::NoObject;
   32|    137|      class_tag = ASN1_Class::NoObject;
   33|    137|      return 0;
   34|    137|   }
   35|       |
   36|   138k|   if((*b & 0x1F) != 0x1F) {
  ------------------
  |  Branch (36:7): [True: 138k, False: 259]
  ------------------
   37|   138k|      type_tag = ASN1_Type(*b & 0x1F);
   38|   138k|      class_tag = ASN1_Class(*b & 0xE0);
   39|   138k|      return 1;
   40|   138k|   }
   41|       |
   42|    259|   size_t tag_bytes = 1;
   43|    259|   class_tag = ASN1_Class(*b & 0xE0);
   44|       |
   45|    259|   uint32_t tag_buf = 0;
   46|    884|   while(true) {
  ------------------
  |  Branch (46:10): [True: 884, Folded]
  ------------------
   47|    884|      b = ber->read_byte();
   48|    884|      if(!b) {
  ------------------
  |  Branch (48:10): [True: 14, False: 870]
  ------------------
   49|     14|         throw BER_Decoding_Error("Long-form tag truncated");
   50|     14|      }
   51|    870|      if((tag_buf >> 24) != 0) {
  ------------------
  |  Branch (51:10): [True: 10, False: 860]
  ------------------
   52|     10|         throw BER_Decoding_Error("Long-form tag overflowed 32 bits");
   53|     10|      }
   54|       |      // This is required even by BER (see X.690 section 8.1.2.4.2 sentence c).
   55|       |      // Bits 7-1 of the first subsequent octet must not be all zero; this rules
   56|       |      // out both 0x80 (continuation with no data) and 0x00 (a long-form encoding
   57|       |      // of tag value 0, which collides with the EOC marker).
   58|    860|      if(tag_bytes == 1 && (*b & 0x7F) == 0) {
  ------------------
  |  Branch (58:10): [True: 257, False: 603]
  |  Branch (58:28): [True: 2, False: 255]
  ------------------
   59|      2|         throw BER_Decoding_Error("Long form tag with leading zero");
   60|      2|      }
   61|    858|      ++tag_bytes;
   62|    858|      tag_buf = (tag_buf << 7) | (*b & 0x7F);
   63|    858|      if((*b & 0x80) == 0) {
  ------------------
  |  Branch (63:10): [True: 233, False: 625]
  ------------------
   64|    233|         break;
   65|    233|      }
   66|    858|   }
   67|       |   // Per X.690 8.1.2.2, tag values 0-30 shall be encoded in the short form.
   68|       |   // Long-form encoding is reserved for tag values >= 31 (X.690 8.1.2.3).
   69|       |   // This is unconditional and applies to BER as well as DER.
   70|    233|   if(tag_buf <= 30) {
  ------------------
  |  Branch (70:7): [True: 4, False: 229]
  ------------------
   71|      4|      throw BER_Decoding_Error("Long-form tag encoding used for small tag value");
   72|      4|   }
   73|       |
   74|    229|   if(tag_buf == static_cast<uint32_t>(ASN1_Type::NoObject)) {
  ------------------
  |  Branch (74:7): [True: 1, False: 228]
  ------------------
   75|      1|      throw BER_Decoding_Error("Tag value collides with internal sentinel");
   76|      1|   }
   77|       |
   78|       |   // NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange)
   79|    228|   type_tag = ASN1_Type(tag_buf);
   80|    228|   return tag_bytes;
   81|    229|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_113decode_lengthEPNS_10DataSourceEmbb:
  126|   138k|BerDecodedLength decode_length(DataSource* ber, size_t allow_indef, bool der_mode, bool constructed) {
  127|   138k|   uint8_t b = 0;
  128|   138k|   if(ber->read_byte(b) == 0) {
  ------------------
  |  Branch (128:7): [True: 60, False: 138k]
  ------------------
  129|     60|      throw BER_Decoding_Error("Length field not found");
  130|     60|   }
  131|   138k|   if((b & 0x80) == 0) {
  ------------------
  |  Branch (131:7): [True: 131k, False: 7.06k]
  ------------------
  132|   131k|      return BerDecodedLength(b, 1);
  133|   131k|   }
  134|       |
  135|  7.06k|   const size_t num_length_bytes = (b & 0x7F);
  136|  7.06k|   if(num_length_bytes > 4) {
  ------------------
  |  Branch (136:7): [True: 46, False: 7.01k]
  ------------------
  137|     46|      throw BER_Decoding_Error("Length field is too large");
  138|     46|   }
  139|       |
  140|  7.01k|   const size_t field_size = 1 + num_length_bytes;
  141|       |
  142|  7.01k|   if(num_length_bytes == 0) {
  ------------------
  |  Branch (142:7): [True: 26, False: 6.98k]
  ------------------
  143|     26|      if(der_mode) {
  ------------------
  |  Branch (143:10): [True: 26, False: 0]
  ------------------
  144|     26|         throw BER_Decoding_Error("Detected indefinite-length encoding in DER structure");
  145|     26|      } else if(!constructed) {
  ------------------
  |  Branch (145:17): [True: 0, False: 0]
  ------------------
  146|       |         // Indefinite length is only valid for constructed types (X.690 8.1.3.2)
  147|      0|         throw BER_Decoding_Error("Indefinite-length encoding used with non-constructed type");
  148|      0|      } else if(allow_indef == 0) {
  ------------------
  |  Branch (148:17): [True: 0, False: 0]
  ------------------
  149|      0|         throw BER_Decoding_Error("Nested EOC markers too deep, rejecting to avoid stack exhaustion");
  150|      0|      } else {
  151|       |         // find_eoc returns bytes up to and including the EOC marker.
  152|       |         // Return the content length; the caller consumes the EOC separately.
  153|      0|         const size_t eoc_len = find_eoc(ber, /*base_offset=*/0, allow_indef - 1);
  154|      0|         if(eoc_len < 2) {
  ------------------
  |  Branch (154:13): [True: 0, False: 0]
  ------------------
  155|      0|            throw BER_Decoding_Error("Invalid EOC encoding");
  156|      0|         }
  157|      0|         return BerDecodedLength::indefinite(eoc_len - 2, field_size);
  158|      0|      }
  159|     26|   }
  160|       |
  161|  6.98k|   size_t length = 0;
  162|       |
  163|  21.0k|   for(size_t i = 0; i != num_length_bytes; ++i) {
  ------------------
  |  Branch (163:22): [True: 14.0k, False: 6.96k]
  ------------------
  164|  14.0k|      if(ber->read_byte(b) == 0) {
  ------------------
  |  Branch (164:10): [True: 26, False: 14.0k]
  ------------------
  165|     26|         throw BER_Decoding_Error("Corrupted length field");
  166|     26|      }
  167|       |      // Can't overflow since we already checked that num_length_bytes <= 4
  168|  14.0k|      length = (length << 8) | b;
  169|  14.0k|   }
  170|       |
  171|       |   // DER requires shortest possible length encoding
  172|  6.96k|   if(der_mode) {
  ------------------
  |  Branch (172:7): [True: 6.96k, False: 0]
  ------------------
  173|  6.96k|      if(length < 128) {
  ------------------
  |  Branch (173:10): [True: 11, False: 6.95k]
  ------------------
  174|     11|         throw BER_Decoding_Error("Detected non-canonical length encoding in DER structure");
  175|     11|      }
  176|  6.95k|      if(num_length_bytes > 1 && length < (size_t(1) << ((num_length_bytes - 1) * 8))) {
  ------------------
  |  Branch (176:10): [True: 6.91k, False: 36]
  |  Branch (176:34): [True: 1, False: 6.91k]
  ------------------
  177|      1|         throw BER_Decoding_Error("Detected non-canonical length encoding in DER structure");
  178|      1|      }
  179|  6.95k|   }
  180|       |
  181|  6.95k|   return BerDecodedLength(length, field_size);
  182|  6.96k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_116BerDecodedLengthC2Emm:
   99|   138k|            BerDecodedLength(content_length, field_length, false) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_116BerDecodedLengthC2Emmb:
  116|   138k|            m_content_length(content_length), m_field_length(field_length), m_indefinite(indefinite) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_114is_constructedENS_10ASN1_ClassE:
   20|   156k|bool is_constructed(ASN1_Class class_tag) {
   21|   156k|   return (static_cast<uint32_t>(class_tag) & static_cast<uint32_t>(ASN1_Class::Constructed)) != 0;
   22|   156k|}
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength14content_lengthEv:
  105|   413k|      size_t content_length() const { return m_content_length; }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength17indefinite_lengthEv:
  112|   137k|      bool indefinite_length() const { return m_indefinite; }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength12total_lengthEv:
  108|   138k|      size_t total_length() const { return m_indefinite ? m_content_length + 2 : m_content_length; }
  ------------------
  |  Branch (108:44): [True: 0, False: 138k]
  ------------------
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObjectC2EONS_10BER_ObjectE:
  357|  60.9k|      explicit DataSource_BERObject(BER_Object&& obj) : m_obj(std::move(obj)) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObject4readEPhm:
  327|  3.82M|      size_t read(uint8_t out[], size_t length) override {
  328|  3.82M|         BOTAN_ASSERT_NOMSG(m_offset <= m_obj.length());
  ------------------
  |  |   77|  3.82M|   do {                                                                     \
  |  |   78|  3.82M|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  3.82M|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 3.82M]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  3.82M|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 3.82M]
  |  |  ------------------
  ------------------
  329|  3.82M|         const size_t got = std::min<size_t>(m_obj.length() - m_offset, length);
  330|  3.82M|         copy_mem(out, m_obj.bits() + m_offset, got);
  331|  3.82M|         m_offset += got;
  332|  3.82M|         return got;
  333|  3.82M|      }
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObject15check_availableEm:
  348|   106k|      bool check_available(size_t n) override {
  349|   106k|         BOTAN_ASSERT_NOMSG(m_offset <= m_obj.length());
  ------------------
  |  |   77|   106k|   do {                                                                     \
  |  |   78|   106k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|   106k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 106k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|   106k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 106k]
  |  |  ------------------
  ------------------
  350|   106k|         return (n <= (m_obj.length() - m_offset));
  351|   106k|      }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_120DataSource_BERObject11end_of_dataEv:
  353|  96.7k|      bool end_of_data() const override { return get_bytes_read() == m_obj.length(); }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_120DataSource_BERObject14get_bytes_readEv:
  355|  96.7k|      size_t get_bytes_read() const override { return m_offset; }
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_114is_constructedERKNS_10BER_ObjectE:
  709|  18.5k|bool is_constructed(const BER_Object& obj) {
  710|  18.5k|   return is_constructed(obj.class_tag());
  711|  18.5k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_125asn1_decode_binary_stringINSt3__19allocatorIhEEEEvRNS2_6vectorIhT_EERKNS_10BER_ObjectENS_9ASN1_TypeESC_NS_10ASN1_ClassEb:
  719|  18.6k|                               bool require_der) {
  720|  18.6k|   obj.assert_is_a(type_tag, class_tag);
  721|       |
  722|       |   // DER requires BIT STRING and OCTET STRING to use primitive encoding
  723|  18.6k|   if(require_der && is_constructed(obj)) {
  ------------------
  |  Branch (723:7): [True: 18.5k, False: 54]
  |  Branch (723:22): [True: 0, False: 18.5k]
  ------------------
  724|      0|      throw BER_Decoding_Error("Detected constructed string encoding in DER structure");
  725|      0|   }
  726|       |
  727|  18.6k|   if(real_type == ASN1_Type::OctetString) {
  ------------------
  |  Branch (727:7): [True: 15.4k, False: 3.16k]
  ------------------
  728|  15.4k|      buffer.assign(obj.bits(), obj.bits() + obj.length());
  729|  15.4k|   } else {
  730|  3.16k|      if(obj.length() == 0) {
  ------------------
  |  Branch (730:10): [True: 2, False: 3.16k]
  ------------------
  731|      2|         throw BER_Decoding_Error("Invalid BIT STRING");
  732|      2|      }
  733|       |
  734|  3.16k|      const uint8_t unused_bits = obj.bits()[0];
  735|       |
  736|  3.16k|      if(unused_bits >= 8) {
  ------------------
  |  Branch (736:10): [True: 1, False: 3.16k]
  ------------------
  737|      1|         throw BER_Decoding_Error("Bad number of unused bits in BIT STRING");
  738|      1|      }
  739|       |
  740|       |      // Empty BIT STRING with unused bits > 0 ...
  741|  3.16k|      if(unused_bits > 0 && obj.length() < 2) {
  ------------------
  |  Branch (741:10): [True: 669, False: 2.49k]
  |  Branch (741:29): [True: 2, False: 667]
  ------------------
  742|      2|         throw BER_Decoding_Error("Invalid BIT STRING");
  743|      2|      }
  744|       |
  745|       |      // DER requires unused bits in BIT STRING to be zero (X.690 section 11.2.2)
  746|  3.16k|      if(require_der && unused_bits > 0) {
  ------------------
  |  Branch (746:10): [True: 3.10k, False: 54]
  |  Branch (746:25): [True: 667, False: 2.43k]
  ------------------
  747|    667|         const uint8_t last_byte = obj.bits()[obj.length() - 1];
  748|    667|         if((last_byte & ((1 << unused_bits) - 1)) != 0) {
  ------------------
  |  Branch (748:13): [True: 9, False: 658]
  ------------------
  749|      9|            throw BER_Decoding_Error("Detected non-zero padding bits in BIT STRING in DER structure");
  750|      9|         }
  751|    667|      }
  752|       |
  753|  3.15k|      buffer.resize(obj.length() - 1);
  754|       |
  755|  3.15k|      if(obj.length() > 1) {
  ------------------
  |  Branch (755:10): [True: 3.09k, False: 55]
  ------------------
  756|  3.09k|         copy_mem(buffer.data(), obj.bits() + 1, obj.length() - 1);
  757|  3.09k|      }
  758|  3.15k|   }
  759|  18.6k|}

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

_ZNK5Botan6BigInt7byte_atEm:
  118|  25.5k|uint8_t BigInt::byte_at(size_t n) const {
  119|  25.5k|   return get_byte_var(sizeof(word) - (n % sizeof(word)) - 1, word_at(n / sizeof(word)));
  120|  25.5k|}
_ZN5Botan6BigInt4Data11set_to_zeroEv:
  191|  18.0k|void BigInt::Data::set_to_zero() {
  192|  18.0k|   m_reg.resize(m_reg.capacity());
  193|  18.0k|   clear_mem(m_reg.data(), m_reg.size());
  194|  18.0k|   m_sig_words = 0;
  195|  18.0k|}
_ZNK5Botan6BigInt4Data14calc_sig_wordsEv:
  215|  18.0k|size_t BigInt::Data::calc_sig_words() const {
  216|  18.0k|   const size_t sz = m_reg.size();
  217|  18.0k|   size_t sig = sz;
  218|       |
  219|  18.0k|   word sub = 1;
  220|       |
  221|   163k|   for(size_t i = 0; i != sz; ++i) {
  ------------------
  |  Branch (221:22): [True: 145k, False: 18.0k]
  ------------------
  222|   145k|      const word w = m_reg[sz - i - 1];
  223|   145k|      sub &= ct_is_zero(w);
  224|   145k|      sig -= sub;
  225|   145k|   }
  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|  18.0k|   CT::unpoison(sig);
  232|       |
  233|  18.0k|   return sig;
  234|  18.0k|}
_ZNK5Botan6BigInt5bytesEv:
  294|  23.1k|size_t BigInt::bytes() const {
  295|  23.1k|   return round_up(bits(), 8) / 8;
  296|  23.1k|}
_ZNK5Botan6BigInt13top_bits_freeEv:
  298|  29.5k|size_t BigInt::top_bits_free() const {
  299|  29.5k|   const size_t words = sig_words();
  300|       |
  301|  29.5k|   const word top_word = word_at(words - 1);
  302|  29.5k|   const size_t bits_used = high_bit(CT::value_barrier(top_word));
  303|  29.5k|   CT::unpoison(bits_used);
  304|  29.5k|   return WordInfo<word>::bits - bits_used;
  305|  29.5k|}
_ZNK5Botan6BigInt4bitsEv:
  307|  29.5k|size_t BigInt::bits() const {
  308|  29.5k|   const size_t words = sig_words();
  309|       |
  310|  29.5k|   if(words == 0) {
  ------------------
  |  Branch (310:7): [True: 9, False: 29.5k]
  ------------------
  311|      9|      return 0;
  312|      9|   }
  313|       |
  314|  29.5k|   const size_t full_words = (words - 1) * WordInfo<word>::bits;
  315|  29.5k|   const size_t top_bits = WordInfo<word>::bits - top_bits_free();
  316|       |
  317|  29.5k|   return full_words + top_bits;
  318|  29.5k|}
_ZNK5Botan6BigInt12serialize_toENSt3__14spanIhLm18446744073709551615EEE:
  395|  11.5k|void BigInt::serialize_to(std::span<uint8_t> output) const {
  396|  11.5k|   BOTAN_ARG_CHECK(this->bytes() <= output.size(), "Insufficient output space");
  ------------------
  |  |   35|  11.5k|   do {                                                          \
  |  |   36|  11.5k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */              \
  |  |   37|  11.5k|      if(!(expr)) {                                              \
  |  |  ------------------
  |  |  |  Branch (37:10): [True: 0, False: 11.5k]
  |  |  ------------------
  |  |   38|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */     \
  |  |   39|      0|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   40|      0|      }                                                          \
  |  |   41|  11.5k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (41:12): [Folded, False: 11.5k]
  |  |  ------------------
  ------------------
  397|       |
  398|  11.5k|   this->binary_encode(output.data(), output.size());
  399|  11.5k|}
_ZNK5Botan6BigInt13binary_encodeEPhm:
  404|  11.5k|void BigInt::binary_encode(uint8_t output[], size_t len) const {
  405|  11.5k|   const size_t full_words = len / sizeof(word);
  406|  11.5k|   const size_t extra_bytes = len % sizeof(word);
  407|       |
  408|  11.5k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (408:22): [True: 6, False: 11.5k]
  ------------------
  409|      6|      const word w = word_at(i);
  410|      6|      store_be(w, output + (len - (i + 1) * sizeof(word)));
  411|      6|   }
  412|       |
  413|  11.5k|   if(extra_bytes > 0) {
  ------------------
  |  Branch (413:7): [True: 11.5k, False: 1]
  ------------------
  414|  11.5k|      const word w = word_at(full_words);
  415|       |
  416|  34.3k|      for(size_t i = 0; i != extra_bytes; ++i) {
  ------------------
  |  Branch (416:25): [True: 22.7k, False: 11.5k]
  ------------------
  417|  22.7k|         output[extra_bytes - i - 1] = get_byte_var(sizeof(word) - i - 1, w);
  418|  22.7k|      }
  419|  11.5k|   }
  420|  11.5k|}
_ZN5Botan6BigInt17assign_from_bytesENSt3__14spanIKhLm18446744073709551615EEE:
  425|  18.0k|void BigInt::assign_from_bytes(std::span<const uint8_t> bytes) {
  426|  18.0k|   clear();
  427|       |
  428|  18.0k|   const size_t length = bytes.size();
  429|  18.0k|   const size_t full_words = length / sizeof(word);
  430|  18.0k|   const size_t extra_bytes = length % sizeof(word);
  431|       |
  432|  18.0k|   secure_vector<word> reg((round_up(full_words + (extra_bytes > 0 ? 1 : 0), 8)));
  ------------------
  |  Branch (432:52): [True: 18.0k, False: 27]
  ------------------
  433|       |
  434|  19.2k|   for(size_t i = 0; i != full_words; ++i) {
  ------------------
  |  Branch (434:22): [True: 1.20k, False: 18.0k]
  ------------------
  435|  1.20k|      reg[i] = load_be<word>(bytes.last<sizeof(word)>());
  436|  1.20k|      bytes = bytes.first(bytes.size() - sizeof(word));
  437|  1.20k|   }
  438|       |
  439|  18.0k|   if(!bytes.empty()) {
  ------------------
  |  Branch (439:7): [True: 18.0k, False: 27]
  ------------------
  440|  18.0k|      BOTAN_ASSERT_NOMSG(extra_bytes == bytes.size());
  ------------------
  |  |   77|  18.0k|   do {                                                                     \
  |  |   78|  18.0k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  18.0k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 18.0k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  18.0k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 18.0k]
  |  |  ------------------
  ------------------
  441|  18.0k|      std::array<uint8_t, sizeof(word)> last_partial_word = {0};
  442|  18.0k|      copy_mem(std::span{last_partial_word}.last(extra_bytes), bytes);
  443|  18.0k|      reg[full_words] = load_be<word>(last_partial_word);
  444|  18.0k|   }
  445|       |
  446|  18.0k|   m_data.swap(reg);
  447|  18.0k|}
_ZNK5Botan6BigInt20_const_time_unpoisonEv:
  559|  18.3k|void BigInt::_const_time_unpoison() const {
  560|  18.3k|   CT::unpoison(m_data.const_data(), m_data.size());
  561|  18.3k|}

_ZN5Botan8PEM_Code6decodeERNS_10DataSourceERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
   62|    324|secure_vector<uint8_t> decode(DataSource& source, std::string& label) {
   63|    324|   const size_t RANDOM_CHAR_LIMIT = 8;
   64|       |
   65|    324|   label.clear();
   66|       |
   67|    324|   const std::string PEM_HEADER1 = "-----BEGIN ";
   68|    324|   const std::string PEM_HEADER2 = "-----";
   69|    324|   size_t position = 0;
   70|       |
   71|  14.1k|   while(position != PEM_HEADER1.length()) {
  ------------------
  |  Branch (71:10): [True: 13.8k, False: 278]
  ------------------
   72|  13.8k|      auto b = source.read_byte();
   73|       |
   74|  13.8k|      if(!b) {
  ------------------
  |  Branch (74:10): [True: 45, False: 13.8k]
  ------------------
   75|     45|         throw Decoding_Error("PEM: No PEM header found");
   76|     45|      }
   77|  13.8k|      if(static_cast<char>(*b) == PEM_HEADER1[position]) {
  ------------------
  |  Branch (77:10): [True: 3.31k, False: 10.5k]
  ------------------
   78|  3.31k|         ++position;
   79|  10.5k|      } else if(position >= RANDOM_CHAR_LIMIT) {
  ------------------
  |  Branch (79:17): [True: 1, False: 10.5k]
  ------------------
   80|      1|         throw Decoding_Error("PEM: Malformed PEM header");
   81|  10.5k|      } else {
   82|  10.5k|         position = 0;
   83|  10.5k|      }
   84|  13.8k|   }
   85|    278|   position = 0;
   86|  3.80k|   while(position != PEM_HEADER2.length()) {
  ------------------
  |  Branch (86:10): [True: 3.56k, False: 236]
  ------------------
   87|  3.56k|      auto b = source.read_byte();
   88|       |
   89|  3.56k|      if(!b) {
  ------------------
  |  Branch (89:10): [True: 39, False: 3.52k]
  ------------------
   90|     39|         throw Decoding_Error("PEM: No PEM header found");
   91|     39|      }
   92|  3.52k|      if(static_cast<char>(*b) == PEM_HEADER2[position]) {
  ------------------
  |  Branch (92:10): [True: 1.19k, False: 2.32k]
  ------------------
   93|  1.19k|         ++position;
   94|  2.32k|      } else if(position > 0) {
  ------------------
  |  Branch (94:17): [True: 2, False: 2.32k]
  ------------------
   95|      2|         throw Decoding_Error("PEM: Malformed PEM header");
   96|      2|      }
   97|       |
   98|  3.52k|      if(position == 0) {
  ------------------
  |  Branch (98:10): [True: 2.32k, False: 1.19k]
  ------------------
   99|  2.32k|         if(label.size() >= 128) {
  ------------------
  |  Branch (99:13): [True: 1, False: 2.32k]
  ------------------
  100|      1|            throw Decoding_Error("PEM: Label too long");
  101|      1|         }
  102|  2.32k|         label += static_cast<char>(*b);
  103|  2.32k|      }
  104|  3.52k|   }
  105|       |
  106|    236|   std::vector<char> b64;
  107|       |
  108|    236|   const std::string PEM_TRAILER = fmt("-----END {}-----", label);
  109|    236|   position = 0;
  110|  71.0k|   while(position != PEM_TRAILER.length()) {
  ------------------
  |  Branch (110:10): [True: 70.8k, False: 152]
  ------------------
  111|  70.8k|      auto b = source.read_byte();
  112|       |
  113|  70.8k|      if(!b) {
  ------------------
  |  Branch (113:10): [True: 73, False: 70.8k]
  ------------------
  114|     73|         throw Decoding_Error("PEM: No PEM trailer found");
  115|     73|      }
  116|  70.8k|      if(static_cast<char>(*b) == PEM_TRAILER[position]) {
  ------------------
  |  Branch (116:10): [True: 3.01k, False: 67.7k]
  ------------------
  117|  3.01k|         ++position;
  118|  67.7k|      } else if(position > 0) {
  ------------------
  |  Branch (118:17): [True: 11, False: 67.7k]
  ------------------
  119|     11|         throw Decoding_Error("PEM: Malformed PEM trailer");
  120|     11|      }
  121|       |
  122|  70.7k|      if(position == 0) {
  ------------------
  |  Branch (122:10): [True: 67.7k, False: 3.01k]
  ------------------
  123|  67.7k|         b64.push_back(*b);
  124|  67.7k|      }
  125|  70.7k|   }
  126|       |
  127|    152|   return base64_decode(b64.data(), b64.size());
  128|    236|}
_ZN5Botan8PEM_Code7matchesERNS_10DataSourceENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEm:
  143|  3.75k|bool matches(DataSource& source, std::string_view extra, size_t search_range) {
  144|  3.75k|   const std::string PEM_HEADER = fmt("-----BEGIN {}", extra);
  145|       |
  146|  3.75k|   secure_vector<uint8_t> search_buf(search_range);
  147|  3.75k|   const size_t got = source.peek(search_buf.data(), search_buf.size(), 0);
  148|       |
  149|  3.75k|   if(got < PEM_HEADER.length()) {
  ------------------
  |  Branch (149:7): [True: 371, False: 3.38k]
  ------------------
  150|    371|      return false;
  151|    371|   }
  152|       |
  153|  3.38k|   size_t index = 0;
  154|       |
  155|  3.09M|   for(size_t j = 0; j != got; ++j) {
  ------------------
  |  Branch (155:22): [True: 3.09M, False: 3.37k]
  ------------------
  156|  3.09M|      if(static_cast<char>(search_buf[j]) == PEM_HEADER[index]) {
  ------------------
  |  Branch (156:10): [True: 11.9k, False: 3.07M]
  ------------------
  157|  11.9k|         ++index;
  158|  3.07M|      } else {
  159|  3.07M|         index = 0;
  160|  3.07M|      }
  161|       |
  162|  3.09M|      if(index == PEM_HEADER.size()) {
  ------------------
  |  Branch (162:10): [True: 10, False: 3.09M]
  ------------------
  163|     10|         return true;
  164|     10|      }
  165|  3.09M|   }
  166|       |
  167|  3.37k|   return false;
  168|  3.38k|}

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

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

_ZN5Botan13is_valid_utf8ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  106|     35|bool is_valid_utf8(const std::string& utf8) {
  107|     35|   try {
  108|     35|      size_t pos = 0;
  109|    239|      while(pos < utf8.size()) {
  ------------------
  |  Branch (109:13): [True: 204, False: 35]
  ------------------
  110|    204|         const uint32_t c = next_utf8_codepoint(utf8, pos);
  111|    204|         BOTAN_UNUSED(c);
  ------------------
  |  |  144|    204|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  112|    204|      }
  113|     35|   } catch(Decoding_Error&) {
  114|     35|      return false;
  115|     35|   }
  116|      0|   return true;
  117|     35|}
_ZN5Botan14latin1_to_utf8EPKhm:
  188|      5|std::string latin1_to_utf8(const uint8_t chars[], size_t len) {
  189|      5|   std::string s;
  190|     35|   for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (190:22): [True: 30, False: 5]
  ------------------
  191|     30|      const uint32_t c = static_cast<uint8_t>(chars[i]);
  192|     30|      append_utf8_for(s, c);
  193|     30|   }
  194|      5|   return s;
  195|      5|}
_ZN5Botan23format_char_for_displayEc:
  197|     29|std::string format_char_for_display(char c) {
  198|     29|   std::ostringstream oss;
  199|       |
  200|     29|   oss << "'";
  201|       |
  202|     29|   if(c == '\t') {
  ------------------
  |  Branch (202:7): [True: 0, False: 29]
  ------------------
  203|      0|      oss << "\\t";
  204|     29|   } else if(c == '\n') {
  ------------------
  |  Branch (204:14): [True: 0, False: 29]
  ------------------
  205|      0|      oss << "\\n";
  206|     29|   } else if(c == '\r') {
  ------------------
  |  Branch (206:14): [True: 0, False: 29]
  ------------------
  207|      0|      oss << "\\r";
  208|     29|   } else if(static_cast<unsigned char>(c) >= 128) {
  ------------------
  |  Branch (208:14): [True: 13, False: 16]
  ------------------
  209|     13|      const unsigned char z = static_cast<unsigned char>(c);
  210|     13|      oss << "\\x" << std::hex << std::uppercase << static_cast<int>(z);
  211|     16|   } else {
  212|     16|      oss << c;
  213|     16|   }
  214|       |
  215|     29|   oss << "'";
  216|       |
  217|     29|   return oss.str();
  218|     29|}
charset.cpp:_ZN5Botan12_GLOBAL__N_119next_utf8_codepointERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   52|    204|uint32_t next_utf8_codepoint(const std::string& utf8, size_t& pos) {
   53|    204|   auto read_continuation = [&]() -> uint32_t {
   54|    204|      if(pos >= utf8.size()) {
   55|    204|         throw Decoding_Error("Invalid UTF-8 sequence");
   56|    204|      }
   57|    204|      const uint8_t b = static_cast<uint8_t>(utf8[pos++]);
   58|    204|      if((b & 0xC0) != 0x80) {
   59|    204|         throw Decoding_Error("Invalid UTF-8 sequence");
   60|    204|      }
   61|    204|      return b & 0x3F;
   62|    204|   };
   63|       |
   64|    204|   const uint8_t lead = static_cast<uint8_t>(utf8[pos++]);
   65|    204|   uint32_t c = 0;
   66|       |
   67|    204|   if(lead <= 0x7F) {
  ------------------
  |  Branch (67:7): [True: 169, False: 35]
  ------------------
   68|    169|      c = lead;
   69|    169|   } else if((lead & 0xE0) == 0xC0) {
  ------------------
  |  Branch (69:14): [True: 17, False: 18]
  ------------------
   70|     17|      c = (lead & 0x1F) << 6;
   71|     17|      c |= read_continuation();
   72|     17|      if(c < 0x80) {
  ------------------
  |  Branch (72:10): [True: 0, False: 17]
  ------------------
   73|      0|         throw Decoding_Error("Overlong UTF-8 sequence");
   74|      0|      }
   75|     18|   } else if((lead & 0xF0) == 0xE0) {
  ------------------
  |  Branch (75:14): [True: 0, False: 18]
  ------------------
   76|      0|      c = (lead & 0x0F) << 12;
   77|      0|      c |= read_continuation() << 6;
   78|      0|      c |= read_continuation();
   79|      0|      if(c < 0x800) {
  ------------------
  |  Branch (79:10): [True: 0, False: 0]
  ------------------
   80|      0|         throw Decoding_Error("Overlong UTF-8 sequence");
   81|      0|      }
   82|     18|   } else if((lead & 0xF8) == 0xF0) {
  ------------------
  |  Branch (82:14): [True: 0, False: 18]
  ------------------
   83|      0|      c = (lead & 0x07) << 18;
   84|      0|      c |= read_continuation() << 12;
   85|      0|      c |= read_continuation() << 6;
   86|      0|      c |= read_continuation();
   87|      0|      if(c < 0x10000) {
  ------------------
  |  Branch (87:10): [True: 0, False: 0]
  ------------------
   88|      0|         throw Decoding_Error("Overlong UTF-8 sequence");
   89|      0|      }
   90|     18|   } else {
   91|     18|      throw Decoding_Error("Invalid UTF-8 sequence");
   92|     18|   }
   93|       |
   94|    186|   if(c > 0x10FFFF) {
  ------------------
  |  Branch (94:7): [True: 0, False: 186]
  ------------------
   95|      0|      throw Decoding_Error("UTF-8 sequence encodes value outside Unicode range");
   96|      0|   }
   97|    186|   if(c >= 0xD800 && c < 0xE000) {
  ------------------
  |  Branch (97:7): [True: 0, False: 186]
  |  Branch (97:22): [True: 0, False: 0]
  ------------------
   98|      0|      throw Decoding_Error("UTF-8 sequence encodes surrogate code point");
   99|      0|   }
  100|       |
  101|    186|   return c;
  102|    186|}
charset.cpp:_ZZN5Botan12_GLOBAL__N_119next_utf8_codepointERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERmENK3$_0clEv:
   53|     17|   auto read_continuation = [&]() -> uint32_t {
   54|     17|      if(pos >= utf8.size()) {
  ------------------
  |  Branch (54:10): [True: 16, False: 1]
  ------------------
   55|     16|         throw Decoding_Error("Invalid UTF-8 sequence");
   56|     16|      }
   57|      1|      const uint8_t b = static_cast<uint8_t>(utf8[pos++]);
   58|      1|      if((b & 0xC0) != 0x80) {
  ------------------
  |  Branch (58:10): [True: 1, False: 0]
  ------------------
   59|      1|         throw Decoding_Error("Invalid UTF-8 sequence");
   60|      1|      }
   61|      0|      return b & 0x3F;
   62|      1|   };
charset.cpp:_ZN5Botan12_GLOBAL__N_115append_utf8_forERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEj:
   18|     30|void append_utf8_for(std::string& s, uint32_t c) {
   19|     30|   if(c >= 0xD800 && c < 0xE000) {
  ------------------
  |  Branch (19:7): [True: 0, False: 30]
  |  Branch (19:22): [True: 0, False: 0]
  ------------------
   20|      0|      throw Decoding_Error("Invalid Unicode character");
   21|      0|   }
   22|       |
   23|     30|   if(c <= 0x7F) {
  ------------------
  |  Branch (23:7): [True: 26, False: 4]
  ------------------
   24|     26|      const uint8_t b0 = static_cast<uint8_t>(c);
   25|     26|      s.push_back(static_cast<char>(b0));
   26|     26|   } else if(c <= 0x7FF) {
  ------------------
  |  Branch (26:14): [True: 4, False: 0]
  ------------------
   27|      4|      const uint8_t b0 = 0xC0 | static_cast<uint8_t>(c >> 6);
   28|      4|      const uint8_t b1 = 0x80 | static_cast<uint8_t>(c & 0x3F);
   29|      4|      s.push_back(static_cast<char>(b0));
   30|      4|      s.push_back(static_cast<char>(b1));
   31|      4|   } else if(c <= 0xFFFF) {
  ------------------
  |  Branch (31:14): [True: 0, False: 0]
  ------------------
   32|      0|      const uint8_t b0 = 0xE0 | static_cast<uint8_t>(c >> 12);
   33|      0|      const uint8_t b1 = 0x80 | static_cast<uint8_t>((c >> 6) & 0x3F);
   34|      0|      const uint8_t b2 = 0x80 | static_cast<uint8_t>(c & 0x3F);
   35|      0|      s.push_back(static_cast<char>(b0));
   36|      0|      s.push_back(static_cast<char>(b1));
   37|      0|      s.push_back(static_cast<char>(b2));
   38|      0|   } else if(c <= 0x10FFFF) {
  ------------------
  |  Branch (38:14): [True: 0, False: 0]
  ------------------
   39|      0|      const uint8_t b0 = 0xF0 | static_cast<uint8_t>(c >> 18);
   40|      0|      const uint8_t b1 = 0x80 | static_cast<uint8_t>((c >> 12) & 0x3F);
   41|      0|      const uint8_t b2 = 0x80 | static_cast<uint8_t>((c >> 6) & 0x3F);
   42|      0|      const uint8_t b3 = 0x80 | static_cast<uint8_t>(c & 0x3F);
   43|      0|      s.push_back(static_cast<char>(b0));
   44|      0|      s.push_back(static_cast<char>(b1));
   45|      0|      s.push_back(static_cast<char>(b2));
   46|      0|      s.push_back(static_cast<char>(b3));
   47|      0|   } else {
   48|      0|      throw Decoding_Error("Invalid Unicode character");
   49|      0|   }
   50|     30|}

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

_ZN5Botan9ExceptionC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   71|  4.36k|Exception::Exception(std::string_view msg) : m_msg(msg) {}
_ZN5Botan9ExceptionC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEERKSt9exception:
   73|  3.94k|Exception::Exception(std::string_view msg, const std::exception& e) : m_msg(fmt("{} failed with {}", msg, e.what())) {}
_ZN5Botan16Invalid_ArgumentC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   77|     54|Invalid_Argument::Invalid_Argument(std::string_view msg) : Exception(msg) {}
_ZN5Botan14Decoding_ErrorC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  125|  4.30k|Decoding_Error::Decoding_Error(std::string_view name) : Exception(name) {}
_ZN5Botan14Decoding_ErrorC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEERKSt9exception:
  130|  3.94k|Decoding_Error::Decoding_Error(std::string_view msg, const std::exception& e) : Exception(msg, e) {}

_ZN5Botan19secure_scrub_memoryEPvm:
   25|   347k|void secure_scrub_memory(void* ptr, size_t n) {
   26|   347k|   return secure_zeroize_buffer(ptr, n);
   27|   347k|}
_ZN5Botan21secure_zeroize_bufferEPvm:
   29|   347k|void secure_zeroize_buffer(void* ptr, size_t n) {
   30|   347k|   if(n == 0) {
  ------------------
  |  Branch (30:7): [True: 173k, False: 173k]
  ------------------
   31|   173k|      return;
   32|   173k|   }
   33|       |
   34|       |#if defined(BOTAN_TARGET_OS_HAS_RTLSECUREZEROMEMORY)
   35|       |   ::RtlSecureZeroMemory(ptr, n);
   36|       |
   37|       |#elif defined(BOTAN_TARGET_OS_HAS_EXPLICIT_BZERO)
   38|   173k|   ::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|   173k|}

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

_ZN5Botan9CRL_Entry11decode_fromERNS_11BER_DecoderE:
   85|  11.6k|void CRL_Entry::decode_from(BER_Decoder& source) {
   86|  11.6k|   auto data = std::make_unique<CRL_Entry_Data>();
   87|       |
   88|  11.6k|   BER_Decoder entry = source.start_sequence();
   89|       |
   90|  11.6k|   BigInt serial;
   91|  11.6k|   entry.decode(serial);
   92|  11.6k|   data->m_serial = serial.serialize();
   93|       |
   94|  11.6k|   entry.decode(data->m_time);
   95|       |
   96|  11.6k|   if(entry.more_items()) {
  ------------------
  |  Branch (96:7): [True: 11.5k, False: 47]
  ------------------
   97|  11.5k|      entry.decode(data->m_extensions);
   98|  11.5k|      if(const auto* ext = data->m_extensions.get_extension_object_as<Cert_Extension::CRL_ReasonCode>()) {
  ------------------
  |  Branch (98:22): [True: 3.35k, False: 8.21k]
  ------------------
   99|  3.35k|         data->m_reason = ext->get_reason();
  100|  8.21k|      } else {
  101|  8.21k|         data->m_reason = CRL_Code::Unspecified;
  102|  8.21k|      }
  103|  11.5k|   }
  104|       |
  105|  11.6k|   entry.end_cons();
  106|       |
  107|  11.6k|   m_data = std::move(data);
  108|  11.6k|}
_ZNK5Botan9CRL_Entry4dataEv:
  110|  21.0k|const CRL_Entry_Data& CRL_Entry::data() const {
  111|  21.0k|   if(!m_data) {
  ------------------
  |  Branch (111:7): [True: 0, False: 21.0k]
  ------------------
  112|      0|      throw Invalid_State("CRL_Entry_Data uninitialized");
  113|      0|   }
  114|       |
  115|  21.0k|   return *m_data;
  116|  21.0k|}
_ZNK5Botan9CRL_Entry13serial_numberEv:
  118|  10.5k|const std::vector<uint8_t>& CRL_Entry::serial_number() const {
  119|  10.5k|   return data().m_serial;
  120|  10.5k|}
_ZNK5Botan9CRL_Entry11reason_codeEv:
  126|  10.5k|CRL_Code CRL_Entry::reason_code() const {
  127|  10.5k|   return data().m_reason;
  128|  10.5k|}
_ZN5Botan14CRL_Entry_DataC2Ev:
   29|  11.6k|      CRL_Entry_Data() = default;

_ZNK5Botan8X509_CRL9PEM_labelEv:
   62|  4.13k|std::string X509_CRL::PEM_label() const {
   63|  4.13k|   return "X509 CRL";
   64|  4.13k|}
_ZNK5Botan8X509_CRL20alternate_PEM_labelsEv:
   66|     97|std::vector<std::string> X509_CRL::alternate_PEM_labels() const {
   67|     97|   return {"CRL"};
   68|     97|}
_ZN5Botan8X509_CRLC2ERNS_10DataSourceE:
   70|  4.06k|X509_CRL::X509_CRL(DataSource& src) {
   71|  4.06k|   load_data(src);
   72|  4.06k|}
_ZN5Botan8X509_CRL12force_decodeEv:
  202|  3.08k|void X509_CRL::force_decode() {
  203|  3.08k|   m_data.reset(decode_crl_body(signed_body(), signature_algorithm()).release());
  204|  3.08k|}
x509_crl.cpp:_ZN5Botan12_GLOBAL__N_115decode_crl_bodyERKNSt3__16vectorIhNS1_9allocatorIhEEEERKNS_19AlgorithmIdentifierE:
  122|  3.08k|std::unique_ptr<CRL_Data> decode_crl_body(const std::vector<uint8_t>& body, const AlgorithmIdentifier& sig_algo) {
  123|  3.08k|   auto data = std::make_unique<CRL_Data>();
  124|       |
  125|  3.08k|   BER_Decoder tbs_crl(body, BER_Decoder::Limits::DER());
  126|       |
  127|  3.08k|   tbs_crl.decode_optional(data->m_version, ASN1_Type::Integer, ASN1_Class::Universal);
  128|  3.08k|   data->m_version += 1;  // wire-format is 0-based
  129|       |
  130|  3.08k|   if(data->m_version != 1 && data->m_version != 2) {
  ------------------
  |  Branch (130:7): [True: 2.92k, False: 159]
  |  Branch (130:31): [True: 47, False: 2.87k]
  ------------------
  131|     47|      throw Decoding_Error("Unknown X.509 CRL version " + std::to_string(data->m_version));
  132|     47|   }
  133|       |
  134|  3.03k|   AlgorithmIdentifier sig_algo_inner;
  135|  3.03k|   tbs_crl.decode(sig_algo_inner);
  136|       |
  137|  3.03k|   if(sig_algo != sig_algo_inner) {
  ------------------
  |  Branch (137:7): [True: 97, False: 2.94k]
  ------------------
  138|     97|      throw Decoding_Error("Algorithm identifier mismatch in CRL");
  139|     97|   }
  140|       |
  141|  2.94k|   tbs_crl.decode(data->m_issuer).decode(data->m_this_update);
  142|       |
  143|       |   // According to RFC 5280 Section 5.1, nextUpdate is OPTIONAL and may be
  144|       |   // encoded as either a UTCTime or a GeneralizedTime. Section 5.1.2.5
  145|       |   // further states that "[c]onforming CRL issuers MUST include the nextUpdate
  146|       |   // field in all CRLs". Obviously, not everyone complies...
  147|       |   //
  148|       |   // See https://github.com/randombit/botan/issues/4722 for more details.
  149|  2.94k|   {
  150|  2.94k|      const auto& next_update = tbs_crl.peek_next_object();
  151|  2.94k|      if(next_update.is_a(ASN1_Type::UtcTime, ASN1_Class::Universal) ||
  ------------------
  |  Branch (151:10): [True: 2.94k, False: 0]
  ------------------
  152|    122|         next_update.is_a(ASN1_Type::GeneralizedTime, ASN1_Class::Universal)) {
  ------------------
  |  Branch (152:10): [True: 0, False: 0]
  ------------------
  153|    122|         tbs_crl.decode(data->m_next_update);
  154|    122|      }
  155|  2.94k|   }
  156|       |
  157|  2.94k|   BER_Object next = tbs_crl.get_next_object();
  158|       |
  159|  2.94k|   if(next.is_a(ASN1_Type::Sequence, ASN1_Class::Constructed)) {
  ------------------
  |  Branch (159:7): [True: 121, False: 2.82k]
  ------------------
  160|    121|      BER_Decoder cert_list(next, tbs_crl.limits());
  161|       |
  162|  11.7k|      while(cert_list.more_items()) {
  ------------------
  |  Branch (162:13): [True: 11.6k, False: 121]
  ------------------
  163|  11.6k|         CRL_Entry entry;
  164|  11.6k|         cert_list.decode(entry);
  165|  11.6k|         data->m_entries.push_back(entry);
  166|  11.6k|      }
  167|    121|      next = tbs_crl.get_next_object();
  168|    121|   }
  169|       |
  170|  2.94k|   if(next.is_a(0, ASN1_Class::Constructed | ASN1_Class::ContextSpecific)) {
  ------------------
  |  Branch (170:7): [True: 75, False: 2.86k]
  ------------------
  171|     75|      BER_Decoder crl_options(next, tbs_crl.limits());
  172|     75|      crl_options.decode(data->m_extensions).verify_end();
  173|     75|      next = tbs_crl.get_next_object();
  174|     75|   }
  175|       |
  176|  2.94k|   if(next.is_set()) {
  ------------------
  |  Branch (176:7): [True: 0, False: 2.94k]
  ------------------
  177|      0|      throw Decoding_Error("Unknown tag following extensions in CRL");
  178|      0|   }
  179|       |
  180|  2.94k|   tbs_crl.verify_end();
  181|       |
  182|       |   // Now cache some fields from the extensions
  183|  2.94k|   if(const auto* ext = data->m_extensions.get_extension_object_as<Cert_Extension::CRL_Number>()) {
  ------------------
  |  Branch (183:19): [True: 69, False: 2.87k]
  ------------------
  184|     69|      data->m_crl_number = ext->get_crl_number();
  185|     69|   }
  186|  2.94k|   if(const auto* ext = data->m_extensions.get_extension_object_as<Cert_Extension::Authority_Key_ID>()) {
  ------------------
  |  Branch (186:19): [True: 71, False: 2.87k]
  ------------------
  187|     71|      data->m_auth_key_id = ext->get_key_id();
  188|     71|   }
  189|  2.94k|   if(const auto* ext = data->m_extensions.get_extension_object_as<Cert_Extension::CRL_Issuing_Distribution_Point>()) {
  ------------------
  |  Branch (189:19): [True: 0, False: 2.94k]
  ------------------
  190|      0|      for(const auto& uri : ext->get_point().uris()) {
  ------------------
  |  Branch (190:27): [True: 0, False: 0]
  ------------------
  191|      0|         data->m_idp_urls.push_back(uri);
  192|      0|      }
  193|      0|   }
  194|       |
  195|  2.94k|   data->update_index();
  196|       |
  197|  2.94k|   return data;
  198|  2.94k|}
_ZN5Botan8CRL_DataC2Ev:
   31|  3.08k|      CRL_Data() = default;
_ZN5Botan8CRL_Data12update_indexEv:
   33|     75|      void update_index() {
   34|     75|         m_revoked_serials.clear();
   35|  10.5k|         for(const auto& entry : m_entries) {
  ------------------
  |  Branch (35:32): [True: 10.5k, False: 75]
  ------------------
   36|  10.5k|            if(entry.reason_code() == CRL_Code::RemoveFromCrl) {
  ------------------
  |  Branch (36:16): [True: 227, False: 10.2k]
  ------------------
   37|    227|               m_revoked_serials.erase(entry.serial_number());
   38|  10.2k|            } else {
   39|  10.2k|               m_revoked_serials.insert(entry.serial_number());
   40|  10.2k|            }
   41|  10.5k|         }
   42|     75|      }

_ZN5Botan7X509_DN13add_attributeERKNS_3OIDERKNS_11ASN1_StringE:
  109|    511|void X509_DN::add_attribute(const OID& oid, const ASN1_String& str) {
  110|    511|   if(str.empty()) {
  ------------------
  |  Branch (110:7): [True: 0, False: 511]
  ------------------
  111|      0|      return;
  112|      0|   }
  113|       |
  114|    511|   m_rdn.push_back(std::make_pair(oid, str));
  115|    511|   m_dn_bits.clear();
  116|    511|}
_ZN5Botan7X509_DN11decode_fromERNS_11BER_DecoderE:
  338|  2.79k|void X509_DN::decode_from(BER_Decoder& source) {
  339|  2.79k|   std::vector<uint8_t> bits;
  340|       |
  341|  2.79k|   source.start_sequence().raw_bytes(bits).end_cons();
  342|       |
  343|  2.79k|   BER_Decoder sequence(bits, source.limits());
  344|       |
  345|  2.79k|   m_rdn.clear();
  346|       |
  347|  5.98k|   while(sequence.more_items()) {
  ------------------
  |  Branch (347:10): [True: 3.18k, False: 2.79k]
  ------------------
  348|  3.18k|      BER_Decoder rdn = sequence.start_set();
  349|       |
  350|  6.36k|      while(rdn.more_items()) {
  ------------------
  |  Branch (350:13): [True: 3.18k, False: 3.18k]
  ------------------
  351|  3.18k|         OID oid;
  352|  3.18k|         ASN1_String str;
  353|       |
  354|  3.18k|         rdn.start_sequence()
  355|  3.18k|            .decode(oid)
  356|  3.18k|            .decode(str)  // TODO support Any
  357|  3.18k|            .end_cons();
  358|       |
  359|  3.18k|         add_attribute(oid, str);
  360|  3.18k|      }
  361|  3.18k|   }
  362|       |
  363|       |   // Have to assign last as add_attribute zaps m_dn_bits
  364|  2.79k|   m_dn_bits = bits;
  365|  2.79k|}

_ZN5Botan10Extensions15create_extn_objERKNS_3OIDEbRKNSt3__16vectorIhNS4_9allocatorIhEEEE:
  130|  15.3k|                                                                   const std::vector<uint8_t>& body) {
  131|  15.3k|   auto extn = extension_from_oid(oid);
  132|       |
  133|  15.3k|   if(!extn) {
  ------------------
  |  Branch (133:7): [True: 11.5k, False: 3.82k]
  ------------------
  134|       |      // some other unknown extension type
  135|  11.5k|      extn = std::make_unique<Cert_Extension::Unknown_Extension>(oid, critical);
  136|  11.5k|   } else {
  137|  3.82k|      try {
  138|  3.82k|         extn->decode_inner(body);
  139|  3.82k|         return extn;
  140|  3.82k|      } catch(const Exception&) {
  141|       |         // OID was recognized but contents failed to decode
  142|    330|         extn = std::make_unique<Cert_Extension::Unknown_Extension>(oid, critical, /*failed_to_decode=*/true);
  143|    330|      }
  144|  3.82k|   }
  145|       |
  146|       |   // This is always Unknown_Extension:
  147|  11.8k|   extn->decode_inner(body);
  148|  11.8k|   return extn;
  149|  15.3k|}
_ZNK5Botan10Extensions15Extensions_Info3objEv:
  151|  3.78k|const Certificate_Extension& Extensions::Extensions_Info::obj() const {
  152|  3.78k|   BOTAN_ASSERT_NONNULL(m_obj.get());
  ------------------
  |  |  116|  3.78k|   do {                                                                                   \
  |  |  117|  3.78k|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (117:10): [True: 0, False: 3.78k]
  |  |  ------------------
  |  |  118|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  119|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  120|      0|      }                                                                                   \
  |  |  121|  3.78k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (121:12): [Folded, False: 3.78k]
  |  |  ------------------
  ------------------
  153|  3.78k|   return *m_obj;
  154|  3.78k|}
_ZNK5Botan10Extensions20get_extension_objectERKNS_3OIDE:
  234|  11.7k|const Certificate_Extension* Extensions::get_extension_object(const OID& oid) const {
  235|  11.7k|   auto extn = m_extension_info.find(oid);
  236|  11.7k|   if(extn == m_extension_info.end()) {
  ------------------
  |  Branch (236:7): [True: 8.00k, False: 3.78k]
  ------------------
  237|  8.00k|      return nullptr;
  238|  8.00k|   }
  239|       |
  240|  3.78k|   return &extn->second.obj();
  241|  11.7k|}
_ZN5Botan10Extensions11decode_fromERNS_11BER_DecoderE:
  290|  11.6k|void Extensions::decode_from(BER_Decoder& from_source) {
  291|  11.6k|   m_extension_oids.clear();
  292|  11.6k|   m_extension_info.clear();
  293|       |
  294|  11.6k|   BER_Decoder sequence = from_source.start_sequence();
  295|       |
  296|  27.0k|   while(sequence.more_items()) {
  ------------------
  |  Branch (296:10): [True: 15.3k, False: 11.6k]
  ------------------
  297|  15.3k|      OID oid;
  298|  15.3k|      bool critical = false;
  299|  15.3k|      std::vector<uint8_t> bits;
  300|       |
  301|  15.3k|      sequence.start_sequence()
  302|  15.3k|         .decode(oid)
  303|  15.3k|         .decode_optional(critical, ASN1_Type::Boolean, ASN1_Class::Universal, false)
  304|  15.3k|         .decode(bits, ASN1_Type::OctetString)
  305|  15.3k|         .end_cons();
  306|       |
  307|  15.3k|      auto obj = create_extn_obj(oid, critical, bits);
  308|  15.3k|      Extensions_Info info(critical, bits, std::move(obj));
  309|       |
  310|       |      // RFC 5280 4.2: "A certificate MUST NOT include more than one
  311|       |      // instance of a particular extension."
  312|  15.3k|      if(!m_extension_info.emplace(oid, info).second) {
  ------------------
  |  Branch (312:10): [True: 0, False: 15.3k]
  ------------------
  313|      0|         throw Decoding_Error("Duplicate certificate extension encountered");
  314|      0|      }
  315|  15.3k|      m_extension_oids.push_back(oid);
  316|  15.3k|   }
  317|  11.6k|   sequence.verify_end();
  318|  11.6k|}
_ZN5Botan14Cert_Extension17Basic_ConstraintsC2Ebm:
  323|      5|      Basic_Constraints(is_ca, is_ca ? std::optional<size_t>(path_length_constraint) : std::nullopt) {}
  ------------------
  |  Branch (323:32): [True: 0, False: 5]
  ------------------
_ZN5Botan14Cert_Extension17Basic_ConstraintsC2EbNSt3__18optionalImEE:
  326|      5|      m_is_ca(is_ca), m_path_length_constraint(path_length_constraint) {
  327|      5|   if(!m_is_ca && m_path_length_constraint.has_value()) {
  ------------------
  |  Branch (327:7): [True: 5, False: 0]
  |  Branch (327:19): [True: 0, False: 5]
  ------------------
  328|       |      // RFC 5280 Sec 4.2.1.9 "CAs MUST NOT include the pathLenConstraint field unless the cA boolean is asserted"
  329|      0|      throw Invalid_Argument(
  330|      0|         "Basic_Constraints nonsensical to set a path length constraint for a non-CA basicConstraints");
  331|      0|   }
  332|      5|}
_ZN5Botan14Cert_Extension17Basic_Constraints12decode_innerERKNSt3__16vectorIhNS2_9allocatorIhEEEE:
  363|      5|void Basic_Constraints::decode_inner(const std::vector<uint8_t>& in) {
  364|       |   /*
  365|       |   * RFC 5280 Section 4.2.1.9
  366|       |   *
  367|       |   * BasicConstraints ::= SEQUENCE {
  368|       |   *    cA                      BOOLEAN DEFAULT FALSE,
  369|       |   *    pathLenConstraint       INTEGER (0..MAX) OPTIONAL }
  370|       |   */
  371|      5|   BER_Decoder(in, BER_Decoder::Limits::DER())
  372|      5|      .start_sequence()
  373|      5|      .decode_optional(m_is_ca, ASN1_Type::Boolean, ASN1_Class::Universal, false)
  374|      5|      .decode_optional(m_path_length_constraint, ASN1_Type::Integer, ASN1_Class::Universal)
  375|      5|      .end_cons()
  376|      5|      .verify_end();
  377|       |
  378|       |   /* RFC 5280 Section 4.2.1.9:
  379|       |   *  "CAs MUST NOT include the pathLenConstraint field unless the cA boolean
  380|       |   *  is asserted and the key usage extension asserts the keyCertSign bit" */
  381|      5|   if(!m_is_ca && m_path_length_constraint.has_value()) {
  ------------------
  |  Branch (381:7): [True: 0, False: 5]
  |  Branch (381:19): [True: 0, False: 0]
  ------------------
  382|      0|      throw Decoding_Error("BasicConstraints pathLenConstraint must not be present when cA is FALSE");
  383|      0|   }
  384|      5|}
_ZN5Botan14Cert_Extension16Authority_Key_ID12decode_innerERKNSt3__16vectorIhNS2_9allocatorIhEEEE:
  500|    100|void Authority_Key_ID::decode_inner(const std::vector<uint8_t>& in) {
  501|       |   /*
  502|       |   * RFC 5280 Section 4.2.1.1
  503|       |   *
  504|       |   * AuthorityKeyIdentifier ::= SEQUENCE {
  505|       |   *    keyIdentifier             [0] KeyIdentifier           OPTIONAL,
  506|       |   *    authorityCertIssuer       [1] GeneralNames            OPTIONAL,
  507|       |   *    authorityCertSerialNumber [2] CertificateSerialNumber OPTIONAL }
  508|       |   */
  509|    100|   BER_Decoder ber(in, BER_Decoder::Limits::DER());
  510|    100|   BER_Decoder seq = ber.start_sequence();
  511|       |
  512|    100|   const bool key_id_present = seq.peek_next_object().is_a(0, ASN1_Class::ContextSpecific);
  513|       |
  514|    100|   seq.decode_optional_string(m_key_id, ASN1_Type::OctetString, 0).discard_remaining().end_cons();
  515|    100|   ber.verify_end();
  516|       |
  517|    100|   if(key_id_present) {
  ------------------
  |  Branch (517:7): [True: 71, False: 29]
  ------------------
  518|     71|      if(m_key_id.empty()) {
  ------------------
  |  Branch (518:10): [True: 0, False: 71]
  ------------------
  519|      0|         throw Decoding_Error("AuthorityKeyIdentifier keyIdentifier must not be empty");
  520|      0|      }
  521|     71|      if(m_key_id.size() > MaximumKeyIdentifierLength) {
  ------------------
  |  Branch (521:10): [True: 0, False: 71]
  ------------------
  522|      0|         throw Decoding_Error(fmt("AuthorityKeyIdentifier keyIdentifier length {} exceeds limit of {} bytes",
  523|      0|                                  m_key_id.size(),
  524|      0|                                  MaximumKeyIdentifierLength));
  525|      0|      }
  526|     71|   }
  527|    100|}
_ZN5Botan14Cert_Extension18Extended_Key_Usage12decode_innerERKNSt3__16vectorIhNS2_9allocatorIhEEEE:
  583|      1|void Extended_Key_Usage::decode_inner(const std::vector<uint8_t>& in) {
  584|       |   /* RFC 5280 Section 4.2.1.12 - ExtKeyUsageSyntax ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId */
  585|      1|   BER_Decoder(in, BER_Decoder::Limits::DER()).decode_list(m_oids).verify_end();
  586|      1|   if(m_oids.empty()) {
  ------------------
  |  Branch (586:7): [True: 0, False: 1]
  ------------------
  587|      0|      throw Decoding_Error("ExtendedKeyUsage extension must contain at least one KeyPurposeId");
  588|      0|   }
  589|      1|}
_ZNK5Botan14Cert_Extension10CRL_Number14get_crl_numberEv:
  813|     69|size_t CRL_Number::get_crl_number() const {
  814|     69|   if(!m_has_value) {
  ------------------
  |  Branch (814:7): [True: 0, False: 69]
  ------------------
  815|      0|      throw Invalid_State("CRL_Number::get_crl_number: Not set");
  816|      0|   }
  817|     69|   return m_crl_number;
  818|     69|}
_ZN5Botan14Cert_Extension10CRL_Number12decode_innerERKNSt3__16vectorIhNS2_9allocatorIhEEEE:
  842|     74|void CRL_Number::decode_inner(const std::vector<uint8_t>& in) {
  843|       |   /* RFC 5280 Section 5.2.3 - CRLNumber ::= INTEGER (0..MAX) */
  844|     74|   BER_Decoder(in, BER_Decoder::Limits::DER()).decode(m_crl_number).verify_end();
  845|     74|   m_has_value = true;
  846|     74|}
_ZN5Botan14Cert_Extension14CRL_ReasonCode12decode_innerERKNSt3__16vectorIhNS2_9allocatorIhEEEE:
  860|  3.63k|void CRL_ReasonCode::decode_inner(const std::vector<uint8_t>& in) {
  861|       |   /*
  862|       |   * RFC 5280 Section 5.3.1
  863|       |   *
  864|       |   * CRLReason ::= ENUMERATED {
  865|       |   *      unspecified             (0),
  866|       |   *      keyCompromise           (1),
  867|       |   *      cACompromise            (2),
  868|       |   *      affiliationChanged      (3),
  869|       |   *      superseded              (4),
  870|       |   *      cessationOfOperation    (5),
  871|       |   *      certificateHold         (6),
  872|       |   *           -- value 7 is not used
  873|       |   *      removeFromCRL           (8),
  874|       |   *      privilegeWithdrawn      (9),
  875|       |   *      aACompromise           (10) }
  876|       |   */
  877|  3.63k|   size_t reason_code = 0;
  878|  3.63k|   BER_Decoder(in, BER_Decoder::Limits::DER())
  879|  3.63k|      .decode(reason_code, ASN1_Type::Enumerated, ASN1_Class::Universal)
  880|  3.63k|      .verify_end();
  881|       |
  882|  3.63k|   if(reason_code == 7 || reason_code > 10) {
  ------------------
  |  Branch (882:7): [True: 248, False: 3.39k]
  |  Branch (882:27): [True: 38, False: 3.35k]
  ------------------
  883|     38|      throw Decoding_Error(fmt("CRLReason has unknown enumeration value {}", reason_code));
  884|     38|   }
  885|       |
  886|  3.60k|   m_reason = static_cast<CRL_Code>(reason_code);
  887|  3.60k|}
_ZN5Botan14Cert_Extension23CRL_Distribution_Points18Distribution_Point11decode_fromERNS_11BER_DecoderE:
  932|      4|void CRL_Distribution_Points::Distribution_Point::decode_from(BER_Decoder& ber) {
  933|      4|   ber.start_sequence()
  934|      4|      .start_context_specific(0)
  935|      4|      .decode_optional_implicit(m_point,
  936|      4|                                ASN1_Type(0),
  937|      4|                                ASN1_Class::ContextSpecific | ASN1_Class::Constructed,
  938|      4|                                ASN1_Type::Sequence,
  939|      4|                                ASN1_Class::Constructed)
  940|      4|      .end_cons()
  941|      4|      .end_cons();
  942|      4|}
_ZN5Botan14Cert_Extension30CRL_Issuing_Distribution_Point12decode_innerERKNSt3__16vectorIhNS2_9allocatorIhEEEE:
  948|      4|void CRL_Issuing_Distribution_Point::decode_inner(const std::vector<uint8_t>& buf) {
  949|       |   /* RFC 5280 Section 5.2.5 - IssuingDistributionPoint ::= SEQUENCE { ... } */
  950|      4|   BER_Decoder(buf, BER_Decoder::Limits::DER()).decode(m_distribution_point).verify_end();
  951|      4|}
_ZN5Botan14Cert_Extension17Unknown_Extension12decode_innerERKNSt3__16vectorIhNS2_9allocatorIhEEEE:
 1941|  11.8k|void Unknown_Extension::decode_inner(const std::vector<uint8_t>& bytes) {
 1942|       |   // Just treat as an opaque blob at this level
 1943|  11.8k|   m_bytes = bytes;
 1944|  11.8k|}
x509_ext.cpp:_ZN5Botan12_GLOBAL__N_118extension_from_oidERKNS_3OIDE:
   38|  15.3k|std::unique_ptr<Certificate_Extension> extension_from_oid(const OID& oid) {
   39|  15.3k|   if(auto iso_ext = is_sub_element_of(oid, {2, 5, 29})) {
  ------------------
  |  Branch (39:12): [True: 14.8k, False: 504]
  ------------------
   40|       |      // NOLINTNEXTLINE(*-switch-missing-default-case)
   41|  14.8k|      switch(*iso_ext) {
  ------------------
  |  Branch (41:14): [True: 3.82k, False: 11.0k]
  ------------------
   42|      0|         case 14:
  ------------------
  |  Branch (42:10): [True: 0, False: 14.8k]
  ------------------
   43|      0|            return make_extension<Cert_Extension::Subject_Key_ID>(oid);
   44|      0|         case 15:
  ------------------
  |  Branch (44:10): [True: 0, False: 14.8k]
  ------------------
   45|      0|            return make_extension<Cert_Extension::Key_Usage>(oid);
   46|      0|         case 17:
  ------------------
  |  Branch (46:10): [True: 0, False: 14.8k]
  ------------------
   47|      0|            return make_extension<Cert_Extension::Subject_Alternative_Name>(oid);
   48|      0|         case 18:
  ------------------
  |  Branch (48:10): [True: 0, False: 14.8k]
  ------------------
   49|      0|            return make_extension<Cert_Extension::Issuer_Alternative_Name>(oid);
   50|      5|         case 19:
  ------------------
  |  Branch (50:10): [True: 5, False: 14.8k]
  ------------------
   51|      5|            return make_extension<Cert_Extension::Basic_Constraints>(oid);
   52|     74|         case 20:
  ------------------
  |  Branch (52:10): [True: 74, False: 14.8k]
  ------------------
   53|     74|            return make_extension<Cert_Extension::CRL_Number>(oid);
   54|  3.63k|         case 21:
  ------------------
  |  Branch (54:10): [True: 3.63k, False: 11.2k]
  ------------------
   55|  3.63k|            return make_extension<Cert_Extension::CRL_ReasonCode>(oid);
   56|      4|         case 28:
  ------------------
  |  Branch (56:10): [True: 4, False: 14.8k]
  ------------------
   57|      4|            return make_extension<Cert_Extension::CRL_Issuing_Distribution_Point>(oid);
   58|      0|         case 30:
  ------------------
  |  Branch (58:10): [True: 0, False: 14.8k]
  ------------------
   59|      0|            return make_extension<Cert_Extension::Name_Constraints>(oid);
   60|      0|         case 31:
  ------------------
  |  Branch (60:10): [True: 0, False: 14.8k]
  ------------------
   61|      0|            return make_extension<Cert_Extension::CRL_Distribution_Points>(oid);
   62|      0|         case 32:
  ------------------
  |  Branch (62:10): [True: 0, False: 14.8k]
  ------------------
   63|      0|            return make_extension<Cert_Extension::Certificate_Policies>(oid);
   64|    100|         case 35:
  ------------------
  |  Branch (64:10): [True: 100, False: 14.7k]
  ------------------
   65|    100|            return make_extension<Cert_Extension::Authority_Key_ID>(oid);
   66|      1|         case 37:
  ------------------
  |  Branch (66:10): [True: 1, False: 14.8k]
  ------------------
   67|      1|            return make_extension<Cert_Extension::Extended_Key_Usage>(oid);
   68|      0|         case 56:
  ------------------
  |  Branch (68:10): [True: 0, False: 14.8k]
  ------------------
   69|      0|            return make_extension<Cert_Extension::NoRevocationAvailable>(oid);
   70|  14.8k|      }
   71|  14.8k|   }
   72|       |
   73|  11.5k|   if(auto pkix_ext = is_sub_element_of(oid, {1, 3, 6, 1, 5, 5, 7, 1})) {
  ------------------
  |  Branch (73:12): [True: 0, False: 11.5k]
  ------------------
   74|       |      // NOLINTNEXTLINE(*-switch-missing-default-case)
   75|      0|      switch(*pkix_ext) {
  ------------------
  |  Branch (75:14): [True: 0, False: 0]
  ------------------
   76|      0|         case 1:
  ------------------
  |  Branch (76:10): [True: 0, False: 0]
  ------------------
   77|      0|            return make_extension<Cert_Extension::Authority_Information_Access>(oid);
   78|      0|         case 7:
  ------------------
  |  Branch (78:10): [True: 0, False: 0]
  ------------------
   79|      0|            return make_extension<Cert_Extension::IPAddressBlocks>(oid);
   80|      0|         case 8:
  ------------------
  |  Branch (80:10): [True: 0, False: 0]
  ------------------
   81|      0|            return make_extension<Cert_Extension::ASBlocks>(oid);
   82|      0|         case 26:
  ------------------
  |  Branch (82:10): [True: 0, False: 0]
  ------------------
   83|      0|            return make_extension<Cert_Extension::TNAuthList>(oid);
   84|      0|      }
   85|      0|   }
   86|       |
   87|  11.5k|   if(oid == Cert_Extension::OCSP_NoCheck::static_oid()) {
  ------------------
  |  Branch (87:7): [True: 0, False: 11.5k]
  ------------------
   88|      0|      return make_extension<Cert_Extension::OCSP_NoCheck>(oid);
   89|      0|   }
   90|       |
   91|  11.5k|   return nullptr;  // unknown
   92|  11.5k|}
x509_ext.cpp:_ZN5Botan12_GLOBAL__N_114make_extensionITkNSt3__112derived_fromINS_21Certificate_ExtensionEEENS_14Cert_Extension17Basic_ConstraintsEEEDaRKNS_3OIDE:
   33|      5|auto make_extension([[maybe_unused]] const OID& oid) {
   34|      5|   BOTAN_DEBUG_ASSERT(oid == T::static_oid());
  ------------------
  |  |  130|      5|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|      5|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 5]
  |  |  ------------------
  ------------------
   35|      5|   return std::make_unique<T>();
   36|      5|}
x509_ext.cpp:_ZN5Botan12_GLOBAL__N_114make_extensionITkNSt3__112derived_fromINS_21Certificate_ExtensionEEENS_14Cert_Extension10CRL_NumberEEEDaRKNS_3OIDE:
   33|     74|auto make_extension([[maybe_unused]] const OID& oid) {
   34|     74|   BOTAN_DEBUG_ASSERT(oid == T::static_oid());
  ------------------
  |  |  130|     74|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|     74|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 74]
  |  |  ------------------
  ------------------
   35|     74|   return std::make_unique<T>();
   36|     74|}
x509_ext.cpp:_ZN5Botan12_GLOBAL__N_114make_extensionITkNSt3__112derived_fromINS_21Certificate_ExtensionEEENS_14Cert_Extension14CRL_ReasonCodeEEEDaRKNS_3OIDE:
   33|  3.63k|auto make_extension([[maybe_unused]] const OID& oid) {
   34|  3.63k|   BOTAN_DEBUG_ASSERT(oid == T::static_oid());
  ------------------
  |  |  130|  3.63k|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|  3.63k|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 3.63k]
  |  |  ------------------
  ------------------
   35|  3.63k|   return std::make_unique<T>();
   36|  3.63k|}
x509_ext.cpp:_ZN5Botan12_GLOBAL__N_114make_extensionITkNSt3__112derived_fromINS_21Certificate_ExtensionEEENS_14Cert_Extension30CRL_Issuing_Distribution_PointEEEDaRKNS_3OIDE:
   33|      4|auto make_extension([[maybe_unused]] const OID& oid) {
   34|      4|   BOTAN_DEBUG_ASSERT(oid == T::static_oid());
  ------------------
  |  |  130|      4|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|      4|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 4]
  |  |  ------------------
  ------------------
   35|      4|   return std::make_unique<T>();
   36|      4|}
x509_ext.cpp:_ZN5Botan12_GLOBAL__N_114make_extensionITkNSt3__112derived_fromINS_21Certificate_ExtensionEEENS_14Cert_Extension16Authority_Key_IDEEEDaRKNS_3OIDE:
   33|    100|auto make_extension([[maybe_unused]] const OID& oid) {
   34|    100|   BOTAN_DEBUG_ASSERT(oid == T::static_oid());
  ------------------
  |  |  130|    100|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|    100|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 100]
  |  |  ------------------
  ------------------
   35|    100|   return std::make_unique<T>();
   36|    100|}
x509_ext.cpp:_ZN5Botan12_GLOBAL__N_114make_extensionITkNSt3__112derived_fromINS_21Certificate_ExtensionEEENS_14Cert_Extension18Extended_Key_UsageEEEDaRKNS_3OIDE:
   33|      1|auto make_extension([[maybe_unused]] const OID& oid) {
   34|      1|   BOTAN_DEBUG_ASSERT(oid == T::static_oid());
  ------------------
  |  |  130|      1|      do { /* NOLINT(*-avoid-do-while) */ \
  |  |  131|      1|      } while(0)
  |  |  ------------------
  |  |  |  Branch (131:15): [Folded, False: 1]
  |  |  ------------------
  ------------------
   35|      1|   return std::make_unique<T>();
   36|      1|}

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

