_ZN5Botan10BER_ObjectC2Ev:
  122|  38.9k|      BER_Object() : m_type_tag(ASN1_Type::NoObject), m_class_tag(ASN1_Class::Universal) {}
_ZNK5Botan10BER_Object6is_setEv:
  132|  50.2k|      bool is_set() const { return m_type_tag != ASN1_Type::NoObject; }
_ZNK5Botan10BER_Object7taggingEv:
  134|  30.2k|      uint32_t tagging() const { return type_tag() | class_tag(); }
_ZNK5Botan10BER_Object8type_tagEv:
  136|  30.2k|      ASN1_Type type_tag() const { return m_type_tag; }
_ZNK5Botan10BER_Object9class_tagEv:
  138|  30.2k|      ASN1_Class class_tag() const { return m_class_tag; }
_ZNK5Botan10BER_Object4typeEv:
  140|  10.5k|      ASN1_Type type() const { return m_type_tag; }
_ZNK5Botan10BER_Object4bitsEv:
  144|   231k|      const uint8_t* bits() const { return m_value.data(); }
_ZNK5Botan10BER_Object6lengthEv:
  146|   492k|      size_t length() const { return m_value.size(); }
_ZN5Botan10BER_Object12mutable_bitsEm:
  163|  24.7k|      uint8_t* mutable_bits(size_t length) {
  164|  24.7k|         m_value.resize(length);
  165|  24.7k|         return m_value.data();
  166|  24.7k|      }
_ZN5Botan3OIDC2Ev:
  212|  5.53k|      explicit OID() {}
_ZNK5Botan11ASN1_String5emptyEv:
  411|  4.94k|      bool empty() const { return m_utf8_str.empty(); }
_ZN5BotanorENS_10ASN1_ClassES0_:
   76|  10.6k|inline ASN1_Class operator|(ASN1_Class x, ASN1_Class y) {
   77|  10.6k|   return static_cast<ASN1_Class>(static_cast<uint32_t>(x) | static_cast<uint32_t>(y));
   78|  10.6k|}
_ZN5BotanorENS_9ASN1_TypeENS_10ASN1_ClassE:
   80|  30.2k|inline uint32_t operator|(ASN1_Type x, ASN1_Class y) { return static_cast<uint32_t>(x) | static_cast<uint32_t>(y); }
_ZN5BotanorENS_10ASN1_ClassENS_9ASN1_TypeE:
   82|  5.43k|inline uint32_t operator|(ASN1_Class x, ASN1_Type y) { return static_cast<uint32_t>(x) | static_cast<uint32_t>(y); }
_ZN5Botan11ASN1_ObjectC2ERKS0_:
  112|  20.5k|      ASN1_Object(const ASN1_Object&) = default;
_ZN5Botan11ASN1_ObjectD2Ev:
  114|  35.2k|      virtual ~ASN1_Object() = default;
_ZN5Botan11ASN1_ObjectC2Ev:
  111|  14.7k|      ASN1_Object() = default;
_ZN5Botan10BER_ObjectC2EOS0_:
  128|  10.3k|      BER_Object(BER_Object&& other) = default;

_ZN5Botan13ignore_paramsIJRhEEEvDpOT_:
  114|  5.53k|void ignore_params(T&&... args) {
  115|  5.53k|   (ignore_param(args), ...);
  116|  5.53k|}
_ZN5Botan12ignore_paramIRhEEvOT_:
  111|  5.53k|void ignore_param(T&&) {}

_ZN5Botan11BER_Decoder14start_sequenceEv:
  112|  9.22k|      BER_Decoder start_sequence() { return start_cons(ASN1_Type::Sequence, ASN1_Class::Universal); }
_ZN5Botan11BER_Decoder9start_setEv:
  114|  1.61k|      BER_Decoder start_set() { return start_cons(ASN1_Type::Set, ASN1_Class::Universal); }
_ZN5Botan11BER_Decoder9raw_bytesINSt3__19allocatorIhEEEERS0_RNS2_6vectorIhT_EE:
  160|  3.33k|      BER_Decoder& raw_bytes(std::vector<uint8_t, Alloc>& out) {
  161|  3.33k|         out.clear();
  162|  3.33k|         uint8_t buf;
  163|   159k|         while(m_source->read_byte(buf))
  ------------------
  |  Branch (163:16): [True: 155k, False: 3.33k]
  ------------------
  164|   155k|            out.push_back(buf);
  165|  3.33k|         return (*this);
  166|  3.33k|      }

_ZN5Botan20Buffered_Computation6updateENSt3__14spanIKhLm18446744073709551615EEE:
   40|    280|      void update(std::span<const uint8_t> in) { add_data(in.data(), in.size()); }
_ZN5Botan20Buffered_Computation12final_stdvecEv:
   83|    137|      std::vector<uint8_t> final_stdvec() { return final<std::vector<uint8_t>>(); }
_ZN5Botan20Buffered_Computation5finalINSt3__16vectorIhNS2_9allocatorIhEEEEEET_v:
   77|    137|      T final() {
   78|    137|         T output(output_length());
   79|    137|         final_result(output.data());
   80|    137|         return output;
   81|    137|      }
_ZN5Botan20Buffered_ComputationD2Ev:
  133|    143|      virtual ~Buffered_Computation() = default;

_ZN5Botan17DataSource_MemoryC2EPKhm:
  118|  7.02k|      DataSource_Memory(const uint8_t in[], size_t length) : m_source(in, in + length), m_offset(0) {}
_ZN5Botan17DataSource_MemoryC2ENSt3__16vectorIhNS_16secure_allocatorIhEEEE:
  124|  14.0k|      explicit DataSource_Memory(secure_vector<uint8_t> in) : m_source(std::move(in)), m_offset(0) {}
_ZN5Botan10DataSourceC2Ev:
   91|  31.3k|      DataSource() = default;
_ZN5Botan10DataSourceD2Ev:
   92|  31.3k|      virtual ~DataSource() = default;

_ZN5Botan13Invalid_StateC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  208|     13|      explicit Invalid_State(std::string_view err) : Exception(err) {}

_ZN5Botan6chooseIjEET_S1_S1_S1_:
  168|   390k|inline constexpr T choose(T mask, T a, T b) {
  169|       |   //return (mask & a) | (~mask & b);
  170|   390k|   return (b ^ (mask & (a ^ b)));
  171|   390k|}
_ZN5Botan8majorityIjEET_S1_S1_S1_:
  174|   195k|inline constexpr T majority(T a, T b, T c) {
  175|       |   /*
  176|       |   Considering each bit of a, b, c individually
  177|       |
  178|       |   If a xor b is set, then c is the deciding vote.
  179|       |
  180|       |   If a xor b is not set then either a and b are both set or both unset.
  181|       |   In either case the value of c doesn't matter, and examining b (or a)
  182|       |   allows us to determine which case we are in.
  183|       |   */
  184|   195k|   return choose(a ^ b, c, b);
  185|   195k|}
_ZN5Botan9ceil_log2ImEEhT_:
  124|    143|{
  125|    143|   if(x >> (sizeof(T) * 8 - 1))
  ------------------
  |  Branch (125:7): [True: 0, False: 143]
  ------------------
  126|      0|      return sizeof(T) * 8;
  127|       |
  128|    143|   uint8_t result = 0;
  129|    143|   T compare = 1;
  130|       |
  131|  1.00k|   while(compare < x) {
  ------------------
  |  Branch (131:10): [True: 858, False: 143]
  ------------------
  132|    858|      compare <<= 1;
  133|    858|      result++;
  134|    858|   }
  135|       |
  136|    143|   return result;
  137|    143|}
_ZN5Botan13is_power_of_2ImEEbT_:
   47|    143|{
   48|    143|   return (arg != 0) && (arg != 1) && ((arg & static_cast<T>(arg - 1)) == 0);
  ------------------
  |  Branch (48:11): [True: 143, False: 0]
  |  Branch (48:25): [True: 143, False: 0]
  |  Branch (48:39): [True: 143, False: 0]
  ------------------
   49|    143|}

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

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

_ZN5Botan2CT4MaskIhEC2Eh:
  279|  5.53k|      Mask(T m) : m_mask(m) {}
_ZNK5Botan2CT4MaskIhE6is_setEv:
  271|  5.53k|      bool is_set() const { return unpoisoned_value() != 0; }
_ZNK5Botan2CT4MaskIhE16unpoisoned_valueEv:
  262|  5.53k|      T unpoisoned_value() const {
  263|  5.53k|         T r = value();
  264|  5.53k|         CT::unpoison(r);
  265|  5.53k|         return r;
  266|  5.53k|      }
_ZNK5Botan2CT4MaskIhE5valueEv:
  276|  5.53k|      T value() const { return m_mask; }
_ZN5Botan2CT8unpoisonIhEEvRT_:
   66|  5.53k|inline void unpoison(T& p) {
   67|       |#if defined(BOTAN_HAS_VALGRIND)
   68|       |   VALGRIND_MAKE_MEM_DEFINED(&p, sizeof(T));
   69|       |#else
   70|  5.53k|   BOTAN_UNUSED(p);
  ------------------
  |  |  118|  5.53k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
   71|  5.53k|#endif
   72|  5.53k|}
_ZN5Botan2CT4MaskIhE3setEv:
   99|  5.53k|      static Mask<T> set() { return Mask<T>(static_cast<T>(~0)); }

_ZN5Botan8FE_25519C2ESt16initializer_listIiE:
   36|  1.53k|      FE_25519(std::initializer_list<int32_t> x) {
   37|  1.53k|         if(x.size() != 10)
  ------------------
  |  Branch (37:13): [True: 0, False: 1.53k]
  ------------------
   38|      0|            throw Invalid_Argument("Invalid FE_25519 initializer list");
   39|  1.53k|         copy_mem(m_fe, x.begin(), 10);
   40|  1.53k|      }

_ZN5Botan3fmtIJPKcNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEEENS3_12basic_stringIcS6_NS3_9allocatorIcEEEES7_DpRKT_:
   51|    584|std::string fmt(std::string_view format, const T&... args) {
   52|    584|   std::ostringstream oss;
   53|    584|   oss.imbue(std::locale::classic());
   54|    584|   fmt_detail::do_fmt(oss, format, args...);
   55|    584|   return oss.str();
   56|    584|}
_ZN5Botan10fmt_detail6do_fmtIPKcJNSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEEEEvRNS4_19basic_ostringstreamIcS7_NS4_9allocatorIcEEEES8_RKT_DpRKT0_:
   23|    584|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   24|    584|   size_t i = 0;
   25|       |
   26|  5.25k|   while(i < format.size()) {
  ------------------
  |  Branch (26:10): [True: 5.25k, False: 0]
  ------------------
   27|  5.25k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (27:10): [True: 584, False: 4.67k]
  |  Branch (27:30): [True: 584, False: 0]
  |  Branch (27:59): [True: 584, False: 0]
  ------------------
   28|    584|         oss << val;
   29|    584|         return do_fmt(oss, format.substr(i + 2), rest...);
   30|  4.67k|      } else {
   31|  4.67k|         oss << format[i];
   32|  4.67k|      }
   33|       |
   34|  4.67k|      i += 1;
   35|  4.67k|   }
   36|    584|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   23|  1.22k|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   24|  1.22k|   size_t i = 0;
   25|       |
   26|  5.61k|   while(i < format.size()) {
  ------------------
  |  Branch (26:10): [True: 5.61k, False: 0]
  ------------------
   27|  5.61k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (27:10): [True: 1.22k, False: 4.38k]
  |  Branch (27:30): [True: 1.22k, False: 0]
  |  Branch (27:59): [True: 1.22k, False: 0]
  ------------------
   28|  1.22k|         oss << val;
   29|  1.22k|         return do_fmt(oss, format.substr(i + 2), rest...);
   30|  4.38k|      } else {
   31|  4.38k|         oss << format[i];
   32|  4.38k|      }
   33|       |
   34|  4.38k|      i += 1;
   35|  4.38k|   }
   36|  1.22k|}
_ZN5Botan10fmt_detail6do_fmtERNSt3__119basic_ostringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EE:
   20|  1.45k|inline void do_fmt(std::ostringstream& oss, std::string_view format) { oss << format; }
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   51|    643|std::string fmt(std::string_view format, const T&... args) {
   52|    643|   std::ostringstream oss;
   53|    643|   oss.imbue(std::locale::classic());
   54|    643|   fmt_detail::do_fmt(oss, format, args...);
   55|    643|   return oss.str();
   56|    643|}
_ZN5Botan3fmtIJPKcS2_S2_EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_17basic_string_viewIcS6_EEDpRKT_:
   51|     13|std::string fmt(std::string_view format, const T&... args) {
   52|     13|   std::ostringstream oss;
   53|     13|   oss.imbue(std::locale::classic());
   54|     13|   fmt_detail::do_fmt(oss, format, args...);
   55|     13|   return oss.str();
   56|     13|}
_ZN5Botan10fmt_detail6do_fmtIPKcJS3_S3_EEEvRNSt3__119basic_ostringstreamIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_17basic_string_viewIcS7_EERKT_DpRKT0_:
   23|     13|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   24|     13|   size_t i = 0;
   25|       |
   26|    273|   while(i < format.size()) {
  ------------------
  |  Branch (26:10): [True: 273, False: 0]
  ------------------
   27|    273|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (27:10): [True: 13, False: 260]
  |  Branch (27:30): [True: 13, False: 0]
  |  Branch (27:59): [True: 13, False: 0]
  ------------------
   28|     13|         oss << val;
   29|     13|         return do_fmt(oss, format.substr(i + 2), rest...);
   30|    260|      } else {
   31|    260|         oss << format[i];
   32|    260|      }
   33|       |
   34|    260|      i += 1;
   35|    260|   }
   36|     13|}
_ZN5Botan10fmt_detail6do_fmtIPKcJS3_EEEvRNSt3__119basic_ostringstreamIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_17basic_string_viewIcS7_EERKT_DpRKT0_:
   23|     13|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   24|     13|   size_t i = 0;
   25|       |
   26|    195|   while(i < format.size()) {
  ------------------
  |  Branch (26:10): [True: 195, False: 0]
  ------------------
   27|    195|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (27:10): [True: 13, False: 182]
  |  Branch (27:30): [True: 13, False: 0]
  |  Branch (27:59): [True: 13, False: 0]
  ------------------
   28|     13|         oss << val;
   29|     13|         return do_fmt(oss, format.substr(i + 2), rest...);
   30|    182|      } else {
   31|    182|         oss << format[i];
   32|    182|      }
   33|       |
   34|    182|      i += 1;
   35|    182|   }
   36|     13|}
_ZN5Botan10fmt_detail6do_fmtIPKcJEEEvRNSt3__119basic_ostringstreamIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_17basic_string_viewIcS7_EERKT_DpRKT0_:
   23|     13|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   24|     13|   size_t i = 0;
   25|       |
   26|     26|   while(i < format.size()) {
  ------------------
  |  Branch (26:10): [True: 26, False: 0]
  ------------------
   27|     26|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (27:10): [True: 13, False: 13]
  |  Branch (27:30): [True: 13, False: 0]
  |  Branch (27:59): [True: 13, False: 0]
  ------------------
   28|     13|         oss << val;
   29|     13|         return do_fmt(oss, format.substr(i + 2), rest...);
   30|     13|      } else {
   31|     13|         oss << format[i];
   32|     13|      }
   33|       |
   34|     13|      i += 1;
   35|     13|   }
   36|     13|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEjEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   51|     63|std::string fmt(std::string_view format, const T&... args) {
   52|     63|   std::ostringstream oss;
   53|     63|   oss.imbue(std::locale::classic());
   54|     63|   fmt_detail::do_fmt(oss, format, args...);
   55|     63|   return oss.str();
   56|     63|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJjEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   23|     63|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   24|     63|   size_t i = 0;
   25|       |
   26|     63|   while(i < format.size()) {
  ------------------
  |  Branch (26:10): [True: 63, False: 0]
  ------------------
   27|     63|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (27:10): [True: 63, False: 0]
  |  Branch (27:30): [True: 63, False: 0]
  |  Branch (27:59): [True: 63, False: 0]
  ------------------
   28|     63|         oss << val;
   29|     63|         return do_fmt(oss, format.substr(i + 2), rest...);
   30|     63|      } else {
   31|      0|         oss << format[i];
   32|      0|      }
   33|       |
   34|      0|      i += 1;
   35|      0|   }
   36|     63|}
_ZN5Botan10fmt_detail6do_fmtIjJEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   23|    214|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   24|    214|   size_t i = 0;
   25|       |
   26|  5.32k|   while(i < format.size()) {
  ------------------
  |  Branch (26:10): [True: 5.32k, False: 0]
  ------------------
   27|  5.32k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (27:10): [True: 214, False: 5.10k]
  |  Branch (27:30): [True: 214, False: 0]
  |  Branch (27:59): [True: 214, False: 0]
  ------------------
   28|    214|         oss << val;
   29|    214|         return do_fmt(oss, format.substr(i + 2), rest...);
   30|  5.10k|      } else {
   31|  5.10k|         oss << format[i];
   32|  5.10k|      }
   33|       |
   34|  5.10k|      i += 1;
   35|  5.10k|   }
   36|    214|}
_ZN5Botan3fmtIJjEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EEDpRKT_:
   51|    151|std::string fmt(std::string_view format, const T&... args) {
   52|    151|   std::ostringstream oss;
   53|    151|   oss.imbue(std::locale::classic());
   54|    151|   fmt_detail::do_fmt(oss, format, args...);
   55|    151|   return oss.str();
   56|    151|}

_ZN5Botan8store_beEjPh:
  437|  1.09k|inline constexpr void store_be(uint32_t in, uint8_t out[4]) {
  438|  1.09k|#if defined(BOTAN_ENDIAN_B2N)
  439|  1.09k|   uint32_t o = BOTAN_ENDIAN_B2N(in);
  ------------------
  |  |   27|  1.09k|   #define BOTAN_ENDIAN_B2N(x) reverse_bytes(x)
  ------------------
  440|  1.09k|   typecast_copy(out, o);
  441|       |#else
  442|       |   out[0] = get_byte<0>(in);
  443|       |   out[1] = get_byte<1>(in);
  444|       |   out[2] = get_byte<2>(in);
  445|       |   out[3] = get_byte<3>(in);
  446|       |#endif
  447|  1.09k|}
_ZN5Botan7load_beIhEET_PKhm:
  106|   943k|inline constexpr T load_be(const uint8_t in[], size_t off) {
  107|   943k|   in += off * sizeof(T);
  108|   943k|   T out = 0;
  109|  1.88M|   for(size_t i = 0; i != sizeof(T); ++i)
  ------------------
  |  Branch (109:22): [True: 943k, False: 943k]
  ------------------
  110|   943k|      out = static_cast<T>((out << 8) | in[i]);
  111|   943k|   return out;
  112|   943k|}
_ZN5Botan11make_uint16Ehh:
   63|  33.7k|inline constexpr uint16_t make_uint16(uint8_t i0, uint8_t i1) {
   64|  33.7k|   return static_cast<uint16_t>((static_cast<uint16_t>(i0) << 8) | i1);
   65|  33.7k|}
_ZN5Botan11make_uint32Ehhhh:
   75|  2.96k|inline constexpr uint32_t make_uint32(uint8_t i0, uint8_t i1, uint8_t i2, uint8_t i3) {
   76|  2.96k|   return ((static_cast<uint32_t>(i0) << 24) | (static_cast<uint32_t>(i1) << 16) | (static_cast<uint32_t>(i2) << 8) |
   77|  2.96k|           (static_cast<uint32_t>(i3)));
   78|  2.96k|}
_ZN5Botan7load_beItEET_PKhm:
  136|  23.4k|inline constexpr uint16_t load_be<uint16_t>(const uint8_t in[], size_t off) {
  137|  23.4k|   in += off * sizeof(uint16_t);
  138|       |
  139|  23.4k|#if defined(BOTAN_ENDIAN_N2B)
  140|  23.4k|   uint16_t x = 0;
  141|  23.4k|   typecast_copy(x, in);
  142|  23.4k|   return BOTAN_ENDIAN_N2B(x);
  ------------------
  |  |   26|  23.4k|   #define BOTAN_ENDIAN_N2B(x) reverse_bytes(x)
  ------------------
  143|       |#else
  144|       |   return make_uint16(in[0], in[1]);
  145|       |#endif
  146|  23.4k|}
_ZN5Botan7load_beIjEET_PKhm:
  174|  49.5k|inline constexpr uint32_t load_be<uint32_t>(const uint8_t in[], size_t off) {
  175|  49.5k|   in += off * sizeof(uint32_t);
  176|  49.5k|#if defined(BOTAN_ENDIAN_N2B)
  177|  49.5k|   uint32_t x = 0;
  178|  49.5k|   typecast_copy(x, in);
  179|  49.5k|   return BOTAN_ENDIAN_N2B(x);
  ------------------
  |  |   26|  49.5k|   #define BOTAN_ENDIAN_N2B(x) reverse_bytes(x)
  ------------------
  180|       |#else
  181|       |   return make_uint32(in[0], in[1], in[2], in[3]);
  182|       |#endif
  183|  49.5k|}
_ZN5Botan8store_beEmPh:
  471|    137|inline constexpr void store_be(uint64_t in, uint8_t out[8]) {
  472|    137|#if defined(BOTAN_ENDIAN_B2N)
  473|    137|   uint64_t o = BOTAN_ENDIAN_B2N(in);
  ------------------
  |  |   27|    137|   #define BOTAN_ENDIAN_B2N(x) reverse_bytes(x)
  ------------------
  474|    137|   typecast_copy(out, o);
  475|       |#else
  476|       |   out[0] = get_byte<0>(in);
  477|       |   out[1] = get_byte<1>(in);
  478|       |   out[2] = get_byte<2>(in);
  479|       |   out[3] = get_byte<3>(in);
  480|       |   out[4] = get_byte<4>(in);
  481|       |   out[5] = get_byte<5>(in);
  482|       |   out[6] = get_byte<6>(in);
  483|       |   out[7] = get_byte<7>(in);
  484|       |#endif
  485|    137|}
_ZN5Botan8get_byteILm0EmEEhT0_:
   52|  2.94k|{
   53|  2.94k|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   54|  2.94k|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   55|  2.94k|}
_ZN5Botan15copy_out_vec_beIjNS_16secure_allocatorIjEEEEvPhmRKNSt3__16vectorIT_T0_EE:
  626|    137|void copy_out_vec_be(uint8_t out[], size_t out_bytes, const std::vector<T, Alloc>& in) {
  627|    137|   copy_out_be(out, out_bytes, in.data());
  628|    137|}
_ZN5Botan11copy_out_beIjEEvPhmPKT_:
  613|    137|void copy_out_be(uint8_t out[], size_t out_bytes, const T in[]) {
  614|  1.23k|   while(out_bytes >= sizeof(T)) {
  ------------------
  |  Branch (614:10): [True: 1.09k, False: 137]
  ------------------
  615|  1.09k|      store_be(in[0], out);
  616|  1.09k|      out += sizeof(T);
  617|  1.09k|      out_bytes -= sizeof(T);
  618|  1.09k|      in += 1;
  619|  1.09k|   }
  620|       |
  621|    137|   for(size_t i = 0; i != out_bytes; ++i)
  ------------------
  |  Branch (621:22): [True: 0, False: 137]
  ------------------
  622|      0|      out[i] = get_byte_var(i % 8, in[0]);
  623|    137|}

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

_ZN5Botan11checked_mulEmm:
   47|  56.1k|inline std::optional<size_t> checked_mul(size_t x, size_t y) {
   48|  56.1k|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_add_overflow)
   49|  56.1k|   size_t z;
   50|  56.1k|   if(__builtin_mul_overflow(x, y, &z)) [[unlikely]]
  ------------------
  |  Branch (50:7): [True: 0, False: 56.1k]
  ------------------
   51|       |#elif defined(_MSC_VER)
   52|       |   size_t z;
   53|       |   if(SizeTMult(x, y, &z) != S_OK) [[unlikely]]
   54|       |#else
   55|       |   size_t z = x * y;
   56|       |   if(y && z / y != x) [[unlikely]]
   57|       |#endif
   58|      0|   {
   59|      0|      return std::nullopt;
   60|      0|   }
   61|  56.1k|   return z;
   62|  56.1k|}
_ZN5Botan11checked_addEmmPKci:
   30|   144k|inline size_t checked_add(size_t x, size_t y, const char* file, int line) {
   31|   144k|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_add_overflow)
   32|   144k|   size_t z;
   33|   144k|   if(__builtin_add_overflow(x, y, &z)) [[unlikely]]
  ------------------
  |  Branch (33:7): [True: 0, False: 144k]
  ------------------
   34|       |#elif defined(_MSC_VER)
   35|       |   size_t z;
   36|       |   if(SizeTAdd(x, y, &z) != S_OK) [[unlikely]]
   37|       |#else
   38|       |   size_t z = x + y;
   39|       |   if(z < x) [[unlikely]]
   40|       |#endif
   41|      0|   {
   42|      0|      throw Integer_Overflow_Detected(file, line);
   43|      0|   }
   44|   144k|   return z;
   45|   144k|}

_ZN5Botan7SHA_256C2Ev:
   59|    143|      SHA_256() : MDx_HashFunction(64, true, true), m_digest(8) { clear(); }
_ZNK5Botan7SHA_25613output_lengthEv:
   49|    411|      size_t output_length() const override { return 32; }

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

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

_ZN5Botan12value_existsINS_3TLS12Group_ParamsES2_EEbRKNSt3__16vectorIT_NS3_9allocatorIS5_EEEERKT0_:
   89|  4.52k|bool value_exists(const std::vector<T>& vec, const OT& val) {
   90|   797k|   for(size_t i = 0; i != vec.size(); ++i)
  ------------------
  |  Branch (90:22): [True: 794k, False: 2.85k]
  ------------------
   91|   794k|      if(vec[i] == val)
  ------------------
  |  Branch (91:10): [True: 1.66k, False: 792k]
  ------------------
   92|  1.66k|         return true;
   93|  2.85k|   return false;
   94|  4.52k|}

_ZN5Botan3TLS15TLS_Data_ReaderC2EPKcNSt3__14spanIKhLm18446744073709551615EEE:
   29|  8.42k|            m_typename(type), m_buf(buf_in), m_offset(0) {}
_ZN5Botan3TLS15TLS_Data_Reader8get_byteEv:
   79|  29.7k|      uint8_t get_byte() {
   80|  29.7k|         assert_at_least(1);
   81|  29.7k|         uint8_t result = m_buf[m_offset];
   82|  29.7k|         m_offset += 1;
   83|  29.7k|         return result;
   84|  29.7k|      }
_ZNK5Botan3TLS15TLS_Data_Reader15assert_at_leastEm:
  157|   117k|      void assert_at_least(size_t n) const {
  158|   117k|         if(m_buf.size() - m_offset < n)
  ------------------
  |  Branch (158:13): [True: 460, False: 117k]
  ------------------
  159|    460|            throw_decode_error("Expected " + std::to_string(n) + " bytes remaining, only " +
  160|    460|                               std::to_string(m_buf.size() - m_offset) + " left");
  161|   117k|      }
_ZNK5Botan3TLS15TLS_Data_Reader18throw_decode_errorENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  163|    584|      [[noreturn]] void throw_decode_error(std::string_view why) const {
  164|    584|         throw Decoding_Error(fmt("Invalid {}: {}", m_typename, why));
  165|    584|      }
_ZN5Botan3TLS15TLS_Data_Reader9get_fixedIhEENSt3__16vectorIT_NS3_9allocatorIS5_EEEEm:
  125|  19.4k|      std::vector<T> get_fixed(size_t size) {
  126|  19.4k|         return get_elem<T, std::vector<T>>(size);
  127|  19.4k|      }
_ZN5Botan3TLS15TLS_Data_Reader8get_elemIhNSt3__16vectorIhNS3_9allocatorIhEEEEEET0_m:
   87|  28.5k|      Container get_elem(size_t num_elems) {
   88|  28.5k|         assert_at_least(num_elems * sizeof(T));
   89|       |
   90|  28.5k|         Container result(num_elems);
   91|       |
   92|   972k|         for(size_t i = 0; i != num_elems; ++i)
  ------------------
  |  Branch (92:28): [True: 943k, False: 28.5k]
  ------------------
   93|   943k|            result[i] = load_be<T>(&m_buf[m_offset], i);
   94|       |
   95|  28.5k|         m_offset += num_elems * sizeof(T);
   96|       |
   97|  28.5k|         return result;
   98|  28.5k|      }
_ZN5Botan3TLS15TLS_Data_Reader9get_rangeIhEENSt3__16vectorIT_NS3_9allocatorIS5_EEEEmmm:
  105|  2.95k|      std::vector<T> get_range(size_t len_bytes, size_t min_elems, size_t max_elems) {
  106|  2.95k|         const size_t num_elems = get_num_elems(len_bytes, sizeof(T), min_elems, max_elems);
  107|       |
  108|  2.95k|         return get_elem<T, std::vector<T>>(num_elems);
  109|  2.95k|      }
_ZN5Botan3TLS15TLS_Data_Reader13get_num_elemsEmmmm:
  143|  11.9k|      size_t get_num_elems(size_t len_bytes, size_t T_size, size_t min_elems, size_t max_elems) {
  144|  11.9k|         const size_t byte_length = get_length_field(len_bytes);
  145|       |
  146|  11.9k|         if(byte_length % T_size != 0)
  ------------------
  |  Branch (146:13): [True: 19, False: 11.9k]
  ------------------
  147|     19|            throw_decode_error("Size isn't multiple of T");
  148|       |
  149|  11.9k|         const size_t num_elems = byte_length / T_size;
  150|       |
  151|  11.9k|         if(num_elems < min_elems || num_elems > max_elems)
  ------------------
  |  Branch (151:13): [True: 123, False: 11.8k]
  |  Branch (151:38): [True: 3, False: 11.8k]
  ------------------
  152|     51|            throw_decode_error("Length field outside parameters");
  153|       |
  154|  11.9k|         return num_elems;
  155|  11.9k|      }
_ZN5Botan3TLS15TLS_Data_Reader16get_length_fieldEm:
  130|  19.9k|      size_t get_length_field(size_t len_bytes) {
  131|  19.9k|         assert_at_least(len_bytes);
  132|       |
  133|  19.9k|         if(len_bytes == 1)
  ------------------
  |  Branch (133:13): [True: 9.32k, False: 10.5k]
  ------------------
  134|  9.32k|            return get_byte();
  135|  10.5k|         else if(len_bytes == 2)
  ------------------
  |  Branch (135:18): [True: 10.5k, False: 91]
  ------------------
  136|  10.5k|            return get_uint16_t();
  137|     91|         else if(len_bytes == 3)
  ------------------
  |  Branch (137:18): [True: 0, False: 91]
  ------------------
  138|      0|            return get_uint24_t();
  139|       |
  140|     91|         throw_decode_error("Bad length size");
  141|     91|      }
_ZN5Botan3TLS15TLS_Data_Reader12get_uint16_tEv:
   67|  33.8k|      uint16_t get_uint16_t() {
   68|  33.8k|         assert_at_least(2);
   69|  33.8k|         uint16_t result = make_uint16(m_buf[m_offset], m_buf[m_offset + 1]);
   70|  33.8k|         m_offset += 2;
   71|  33.8k|         return result;
   72|  33.8k|      }
_ZN5Botan3TLS15TLS_Data_Reader20get_data_read_so_farEv:
   44|    143|      std::vector<uint8_t> get_data_read_so_far() {
   45|    143|         return std::vector<uint8_t>(m_buf.begin(), m_buf.begin() + m_offset);
   46|    143|      }
_ZN5Botan3TLS15TLS_Data_Reader13get_remainingEv:
   42|    137|      std::vector<uint8_t> get_remaining() { return std::vector<uint8_t>(m_buf.begin() + m_offset, m_buf.end()); }
_ZN5Botan3TLS15TLS_Data_Reader16get_range_vectorItEENSt3__16vectorIT_NS3_9allocatorIS5_EEEEmmm:
  112|  2.75k|      std::vector<T> get_range_vector(size_t len_bytes, size_t min_elems, size_t max_elems) {
  113|  2.75k|         const size_t num_elems = get_num_elems(len_bytes, sizeof(T), min_elems, max_elems);
  114|       |
  115|  2.75k|         return get_elem<T, std::vector<T>>(num_elems);
  116|  2.75k|      }
_ZN5Botan3TLS15TLS_Data_Reader8get_elemItNSt3__16vectorItNS3_9allocatorItEEEEEET0_m:
   87|  2.74k|      Container get_elem(size_t num_elems) {
   88|  2.74k|         assert_at_least(num_elems * sizeof(T));
   89|       |
   90|  2.74k|         Container result(num_elems);
   91|       |
   92|  22.3k|         for(size_t i = 0; i != num_elems; ++i)
  ------------------
  |  Branch (92:28): [True: 19.6k, False: 2.74k]
  ------------------
   93|  19.6k|            result[i] = load_be<T>(&m_buf[m_offset], i);
   94|       |
   95|  2.74k|         m_offset += num_elems * sizeof(T);
   96|       |
   97|  2.74k|         return result;
   98|  2.74k|      }
_ZN5Botan3TLS15TLS_Data_Reader16get_range_vectorIhEENSt3__16vectorIT_NS3_9allocatorIS5_EEEEmmm:
  112|  6.19k|      std::vector<T> get_range_vector(size_t len_bytes, size_t min_elems, size_t max_elems) {
  113|  6.19k|         const size_t num_elems = get_num_elems(len_bytes, sizeof(T), min_elems, max_elems);
  114|       |
  115|  6.19k|         return get_elem<T, std::vector<T>>(num_elems);
  116|  6.19k|      }
_ZNK5Botan3TLS15TLS_Data_Reader11assert_doneEv:
   31|  3.81k|      void assert_done() const {
   32|  3.81k|         if(has_remaining())
  ------------------
  |  Branch (32:13): [True: 54, False: 3.76k]
  ------------------
   33|     54|            throw_decode_error("Extra bytes at end of message");
   34|  3.81k|      }
_ZNK5Botan3TLS15TLS_Data_Reader11read_so_farEv:
   36|  5.74k|      size_t read_so_far() const { return m_offset; }
_ZNK5Botan3TLS15TLS_Data_Reader15remaining_bytesEv:
   38|  30.4k|      size_t remaining_bytes() const { return m_buf.size() - m_offset; }
_ZNK5Botan3TLS15TLS_Data_Reader13has_remainingEv:
   40|  21.0k|      bool has_remaining() const { return (remaining_bytes() > 0); }
_ZN5Botan3TLS15TLS_Data_Reader12discard_nextEm:
   48|     63|      void discard_next(size_t bytes) {
   49|     63|         assert_at_least(bytes);
   50|     63|         m_offset += bytes;
   51|     63|      }
_ZN5Botan3TLS15TLS_Data_Reader12get_uint32_tEv:
   53|  2.97k|      uint32_t get_uint32_t() {
   54|  2.97k|         assert_at_least(4);
   55|  2.97k|         uint32_t result = make_uint32(m_buf[m_offset], m_buf[m_offset + 1], m_buf[m_offset + 2], m_buf[m_offset + 3]);
   56|  2.97k|         m_offset += 4;
   57|  2.97k|         return result;
   58|  2.97k|      }
_ZN5Botan3TLS15TLS_Data_Reader20get_tls_length_valueEm:
  100|  7.95k|      std::vector<uint8_t> get_tls_length_value(size_t len_bytes) {
  101|  7.95k|         return get_fixed<uint8_t>(get_length_field(len_bytes));
  102|  7.95k|      }
_ZN5Botan3TLS15TLS_Data_Reader10get_stringEmmm:
  118|  3.55k|      std::string get_string(size_t len_bytes, size_t min_bytes, size_t max_bytes) {
  119|  3.55k|         std::vector<uint8_t> v = get_range_vector<uint8_t>(len_bytes, min_bytes, max_bytes);
  120|       |
  121|  3.55k|         return std::string(cast_uint8_ptr_to_char(v.data()), v.size());
  122|  3.55k|      }
_ZN5Botan3TLS15TLS_Data_Reader9get_rangeItEENSt3__16vectorIT_NS3_9allocatorIS5_EEEEmmm:
  105|     75|      std::vector<T> get_range(size_t len_bytes, size_t min_elems, size_t max_elems) {
  106|     75|         const size_t num_elems = get_num_elems(len_bytes, sizeof(T), min_elems, max_elems);
  107|       |
  108|     75|         return get_elem<T, std::vector<T>>(num_elems);
  109|     75|      }

_ZN5Botan13typecast_copyImEEvPhPT_m:
  133|    137|{
  134|    137|   std::memcpy(out, in, sizeof(T) * N);
  135|    137|}
_ZN5Botan11clear_bytesEPvm:
   92|    450|inline constexpr void clear_bytes(void* ptr, size_t bytes) {
   93|    450|   if(bytes > 0) {
  ------------------
  |  Branch (93:7): [True: 450, False: 0]
  ------------------
   94|    450|      std::memset(ptr, 0, bytes);
   95|    450|   }
   96|    450|}
_ZN5Botan22cast_uint8_ptr_to_charEPKh:
  179|  2.52k|inline const char* cast_uint8_ptr_to_char(const uint8_t* b) { return reinterpret_cast<const char*>(b); }
_ZN5Botan22cast_uint8_ptr_to_charEPh:
  183|  3.49k|inline char* cast_uint8_ptr_to_char(uint8_t* b) { return reinterpret_cast<char*>(b); }
_ZN5Botan9clear_memIhEEvPT_m:
  109|    449|inline constexpr void clear_mem(T* ptr, size_t n) {
  110|    449|   clear_bytes(ptr, sizeof(T) * n);
  111|    449|}
_ZN5Botan13typecast_copyIjEEvPhT_:
  145|  1.09k|inline constexpr void typecast_copy(uint8_t out[], T in) {
  146|  1.09k|   typecast_copy(out, &in, 1);
  147|  1.09k|}
_ZN5Botan13typecast_copyIjEEvPhPT_m:
  133|  1.09k|{
  134|  1.09k|   std::memcpy(out, in, sizeof(T) * N);
  135|  1.09k|}
_ZN5Botan13typecast_copyItEEvRT_PKh:
  152|  23.4k|{
  153|  23.4k|   typecast_copy(&out, in, 1);
  154|  23.4k|}
_ZN5Botan13typecast_copyItEEvPT_PKhm:
  140|  23.4k|{
  141|  23.4k|   std::memcpy(out, in, sizeof(T) * N);
  142|  23.4k|}
_ZN5Botan13typecast_copyIjEEvPT_PKhm:
  140|  49.5k|{
  141|  49.5k|   std::memcpy(out, in, sizeof(T) * N);
  142|  49.5k|}
_ZN5Botan13typecast_copyIjEEvRT_PKh:
  152|  49.5k|{
  153|  49.5k|   typecast_copy(&out, in, 1);
  154|  49.5k|}
_ZN5Botan13typecast_copyImEEvPhT_:
  145|    137|inline constexpr void typecast_copy(uint8_t out[], T in) {
  146|    137|   typecast_copy(out, &in, 1);
  147|    137|}
_ZN5Botan8copy_memIhEEvPT_PKS1_m:
  122|   417k|{
  123|   417k|   BOTAN_ASSERT_IMPLICATION(n > 0, in != nullptr && out != nullptr, "If n > 0 then args are not null");
  ------------------
  |  |   78|   417k|   do {                                                                                          \
  |  |   79|   796k|      if((expr1) && !(expr2))                                                                    \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 398k, False: 19.7k]
  |  |  |  Branch (79:23): [True: 398k, False: 0]
  |  |  |  Branch (79:23): [True: 398k, False: 0]
  |  |  ------------------
  |  |   80|   417k|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |   81|   417k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (81:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  124|       |
  125|   417k|   if(in != nullptr && out != nullptr && n > 0) {
  ------------------
  |  Branch (125:7): [True: 411k, False: 5.96k]
  |  Branch (125:24): [True: 406k, False: 5.63k]
  |  Branch (125:42): [True: 398k, False: 8.13k]
  ------------------
  126|   398k|      std::memmove(out, in, sizeof(T) * n);
  127|   398k|   }
  128|   417k|}
_ZN5Botan9clear_memIjEEvPT_m:
  109|      1|inline constexpr void clear_mem(T* ptr, size_t n) {
  110|      1|   clear_bytes(ptr, sizeof(T) * n);
  111|      1|}
_ZN5Botan13buffer_insertIhNS_16secure_allocatorIhEEEEmRNSt3__16vectorIT_T0_EEmPKS5_m:
  203|    414|size_t buffer_insert(std::vector<T, Alloc>& buf, size_t buf_offset, const T input[], size_t input_length) {
  204|    414|   BOTAN_ASSERT_NOMSG(buf_offset <= buf.size());
  ------------------
  |  |   60|    414|   do {                                                                     \
  |  |   61|    414|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 414]
  |  |  ------------------
  |  |   62|    414|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|    414|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  205|    414|   const size_t to_copy = std::min(input_length, buf.size() - buf_offset);
  206|    414|   if(to_copy > 0) {
  ------------------
  |  Branch (206:7): [True: 368, False: 46]
  ------------------
  207|    368|      copy_mem(&buf[buf_offset], input, to_copy);
  208|    368|   }
  209|    414|   return to_copy;
  210|    414|}
_ZN5Botan8copy_memIiEEvPT_PKS1_m:
  122|  1.53k|{
  123|  1.53k|   BOTAN_ASSERT_IMPLICATION(n > 0, in != nullptr && out != nullptr, "If n > 0 then args are not null");
  ------------------
  |  |   78|  1.53k|   do {                                                                                          \
  |  |   79|  3.07k|      if((expr1) && !(expr2))                                                                    \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 1.53k, False: 0]
  |  |  |  Branch (79:23): [True: 1.53k, False: 0]
  |  |  |  Branch (79:23): [True: 1.53k, False: 0]
  |  |  ------------------
  |  |   80|  1.53k|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |   81|  1.53k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (81:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  124|       |
  125|  1.53k|   if(in != nullptr && out != nullptr && n > 0) {
  ------------------
  |  Branch (125:7): [True: 1.53k, False: 0]
  |  Branch (125:24): [True: 1.53k, False: 0]
  |  Branch (125:42): [True: 1.53k, False: 0]
  ------------------
  126|  1.53k|      std::memmove(out, in, sizeof(T) * n);
  127|  1.53k|   }
  128|  1.53k|}

_ZN5Botan7X509_DNC2Ev:
   37|  3.68k|      X509_DN() = default;

_ZN5Botan16secure_allocatorIhE8allocateEm:
   45|  55.9k|      T* allocate(std::size_t n) { return static_cast<T*>(allocate_memory(n, sizeof(T))); }
_ZN5Botan16secure_allocatorIhE10deallocateEPhm:
   47|  55.9k|      void deallocate(T* p, std::size_t n) { deallocate_memory(p, n, sizeof(T)); }
_ZN5BotanpLIhNS_16secure_allocatorIhEEmEERNSt3__16vectorIT_T0_EES8_RKNS3_4pairIPS5_T1_EE:
   98|  10.0k|std::vector<T, Alloc>& operator+=(std::vector<T, Alloc>& out, const std::pair<T*, L>& in) {
   99|  10.0k|   out.insert(out.end(), in.first, in.first + in.second);
  100|  10.0k|   return out;
  101|  10.0k|}
_ZN5Botan16secure_allocatorIjE10deallocateEPjm:
   47|    143|      void deallocate(T* p, std::size_t n) { deallocate_memory(p, n, sizeof(T)); }
_ZN5Botan16secure_allocatorIjE8allocateEm:
   45|    143|      T* allocate(std::size_t n) { return static_cast<T*>(allocate_memory(n, sizeof(T))); }
_ZN5Botan7zeroiseIhNS_16secure_allocatorIhEEEEvRNSt3__16vectorIT_T0_EE:
  108|    312|void zeroise(std::vector<T, Alloc>& vec) {
  109|    312|   clear_mem(vec.data(), vec.size());
  110|    312|}

_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2Ev:
   42|  2.77k|      Strong_Base() = default;
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2EOS7_:
   44|  13.8k|      Strong_Base(Strong_Base&&) = default;
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2ES6_:
   48|  5.77k|      constexpr explicit Strong_Base(T v) : m_value(std::move(v)) {}
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEaSEOS7_:
   46|  2.75k|      Strong_Base& operator=(Strong_Base&&) = default;

_ZN5Botan3TLS13TLS_ExceptionC2ENS0_9AlertTypeENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   26|    195|            Exception(err_msg), m_alert_type(type) {}

_ZN5Botan3TLS21Server_Name_Indicator11static_typeEv:
  119|  2.18k|      static Extension_Code static_type() { return Extension_Code::ServerNameIndication; }
_ZNK5Botan3TLS21Server_Name_Indicator4typeEv:
  121|  2.18k|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS23Renegotiation_Extension11static_typeEv:
  142|    635|      static Extension_Code static_type() { return Extension_Code::SafeRenegotiation; }
_ZNK5Botan3TLS23Renegotiation_Extension4typeEv:
  144|    413|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS23Renegotiation_Extension18renegotiation_infoEv:
  152|      7|      const std::vector<uint8_t>& renegotiation_info() const { return m_reneg_data; }
_ZN5Botan3TLS39Application_Layer_Protocol_Notification11static_typeEv:
  167|  2.21k|      static Extension_Code static_type() { return Extension_Code::ApplicationLayerProtocolNegotiation; }
_ZNK5Botan3TLS39Application_Layer_Protocol_Notification4typeEv:
  169|  2.21k|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS24Session_Ticket_Extension11static_typeEv:
  202|  1.59k|      static Extension_Code static_type() { return Extension_Code::SessionTicket; }
_ZNK5Botan3TLS24Session_Ticket_Extension4typeEv:
  204|  1.59k|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS16Supported_Groups11static_typeEv:
  239|    517|      static Extension_Code static_type() { return Extension_Code::SupportedGroups; }
_ZNK5Botan3TLS16Supported_Groups4typeEv:
  241|    517|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS23Supported_Point_Formats11static_typeEv:
  273|    214|      static Extension_Code static_type() { return Extension_Code::EcPointFormats; }
_ZNK5Botan3TLS23Supported_Point_Formats4typeEv:
  275|    214|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS20Signature_Algorithms11static_typeEv:
  296|    222|      static Extension_Code static_type() { return Extension_Code::SignatureAlgorithms; }
_ZNK5Botan3TLS20Signature_Algorithms4typeEv:
  298|    222|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS25Signature_Algorithms_Cert11static_typeEv:
  329|    213|      static Extension_Code static_type() { return Extension_Code::CertSignatureAlgorithms; }
_ZNK5Botan3TLS25Signature_Algorithms_Cert4typeEv:
  331|    213|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS24SRTP_Protection_Profiles11static_typeEv:
  352|    253|      static Extension_Code static_type() { return Extension_Code::UseSrtp; }
_ZNK5Botan3TLS24SRTP_Protection_Profiles4typeEv:
  354|    253|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS22Extended_Master_Secret11static_typeEv:
  377|  1.19k|      static Extension_Code static_type() { return Extension_Code::ExtendedMasterSecret; }
_ZNK5Botan3TLS22Extended_Master_Secret4typeEv:
  379|  1.19k|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS16Encrypt_then_MAC11static_typeEv:
  395|    890|      static Extension_Code static_type() { return Extension_Code::EncryptThenMac; }
_ZNK5Botan3TLS16Encrypt_then_MAC4typeEv:
  397|    890|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS26Certificate_Status_Request11static_typeEv:
  415|    255|      static Extension_Code static_type() { return Extension_Code::CertificateStatusRequest; }
_ZNK5Botan3TLS26Certificate_Status_Request4typeEv:
  417|    255|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS18Supported_Versions11static_typeEv:
  453|    220|      static Extension_Code static_type() { return Extension_Code::SupportedVersions; }
_ZNK5Botan3TLS18Supported_Versions4typeEv:
  455|    220|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS17Record_Size_Limit11static_typeEv:
  484|    238|      static Extension_Code static_type() { return Extension_Code::RecordSizeLimit; }
_ZNK5Botan3TLS17Record_Size_Limit4typeEv:
  486|    238|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS6Cookie11static_typeEv:
  510|  1.68k|      static Extension_Code static_type() { return Extension_Code::Cookie; }
_ZNK5Botan3TLS6Cookie4typeEv:
  512|  1.68k|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS22PSK_Key_Exchange_Modes11static_typeEv:
  533|    795|      static Extension_Code static_type() { return Extension_Code::PskKeyExchangeModes; }
_ZNK5Botan3TLS22PSK_Key_Exchange_Modes4typeEv:
  535|    795|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS23Certificate_Authorities11static_typeEv:
  556|    279|      static Extension_Code static_type() { return Extension_Code::CertificateAuthorities; }
_ZNK5Botan3TLS23Certificate_Authorities4typeEv:
  558|    279|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS3PSK11static_typeEv:
  578|    208|      static Extension_Code static_type() { return Extension_Code::PresharedKey; }
_ZNK5Botan3TLS3PSK4typeEv:
  580|    208|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS9Key_Share11static_typeEv:
  657|    214|      static Extension_Code static_type() { return Extension_Code::KeyShare; }
_ZNK5Botan3TLS9Key_Share4typeEv:
  659|    214|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS19EarlyDataIndication11static_typeEv:
  723|  1.56k|      static Extension_Code static_type() { return Extension_Code::EarlyData; }
_ZNK5Botan3TLS19EarlyDataIndication4typeEv:
  725|  1.56k|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS17Unknown_Extension4typeEv:
  762|   183k|      Extension_Code type() const override { return m_type; }
_ZNK5Botan3TLS10Extensions3hasENS0_14Extension_CodeE:
  790|  9.74k|      bool has(Extension_Code type) const { return get(type) != nullptr; }
_ZN5Botan3TLS10Extensions3addEPNS0_9ExtensionE:
  796|    215|      void add(Extension* extn) { add(std::unique_ptr<Extension>(extn)); }
_ZZNK5Botan3TLS10Extensions3getENS0_14Extension_CodeEENKUlRKT_E_clINSt3__110unique_ptrINS0_9ExtensionENS8_14default_deleteISA_EEEEEEDaS5_:
  800|   195k|            m_extensions.cbegin(), m_extensions.cend(), [type](const auto& ext) { return ext->type() == type; });
_ZNK5Botan3TLS10Extensions3getENS0_14Extension_CodeE:
  798|  9.96k|      Extension* get(Extension_Code type) const {
  799|  9.96k|         const auto i = std::find_if(
  800|  9.96k|            m_extensions.cbegin(), m_extensions.cend(), [type](const auto& ext) { return ext->type() == type; });
  801|       |
  802|  9.96k|         return (i != m_extensions.end()) ? i->get() : nullptr;
  ------------------
  |  Branch (802:17): [True: 16, False: 9.94k]
  ------------------
  803|  9.96k|      }
_ZN5Botan3TLS23Renegotiation_ExtensionC2Ev:
  146|    215|      Renegotiation_Extension() = default;
_ZN5Botan3TLS9ExtensionD2Ev:
  111|  5.88k|      virtual ~Extension() = default;
_ZN5Botan3TLS10ExtensionsC2Ev:
  859|  2.77k|      Extensions() = default;
_ZNK5Botan3TLS10Extensions3getINS0_23Renegotiation_ExtensionEEEPT_v:
  781|    222|      T* get() const {
  782|    222|         return dynamic_cast<T*>(get(T::static_type()));
  783|    222|      }

_ZN5Botan3TLS17Handshake_MessageD2Ev:
   52|    562|      virtual ~Handshake_Message() = default;
_ZN5Botan3TLS17Handshake_MessageC2Ev:
   53|    562|      Handshake_Message() = default;

_ZN5Botan3TLS6TicketC2ENS_6StrongINSt3__16vectorIhNS3_9allocatorIhEEEENS0_22Opaque_Session_Handle_EJEEEj:
   32|  2.96k|            m_identity(std::move(identity)), m_obfuscated_age(obfuscated_age) {}

_ZN5Botan3TLS16Protocol_VersionC2Ev:
   51|  2.77k|      Protocol_Version() : m_version(0) {}
_ZN5Botan3TLS16Protocol_VersionC2Et:
   53|  3.52k|      explicit Protocol_Version(uint16_t code) : m_version(code) {}
_ZN5Botan3TLS16Protocol_VersionC2Ehh:
   65|  2.76k|            Protocol_Version(static_cast<uint16_t>((static_cast<uint16_t>(major) << 8) | minor)) {}
_ZNK5Botan3TLS16Protocol_Version13major_versionEv:
   80|  2.75k|      uint8_t major_version() const { return static_cast<uint8_t>(m_version >> 8); }

LLVMFuzzerInitialize:
   24|      2|extern "C" int LLVMFuzzerInitialize(int*, char***) {
   25|       |   /*
   26|       |   * This disables the mlock pool, as overwrites within the pool are
   27|       |   * opaque to ASan or other instrumentation.
   28|       |   */
   29|      2|   ::setenv("BOTAN_MLOCK_POOL_SIZE", "0", 1);
   30|      2|   return 0;
   31|      2|}
LLVMFuzzerTestOneInput:
   34|  2.78k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t in[], size_t len) {
   35|  2.78k|   if(len <= max_fuzzer_input_size) {
  ------------------
  |  Branch (35:7): [True: 2.77k, False: 6]
  ------------------
   36|  2.77k|      fuzz(in, len);
   37|  2.77k|   }
   38|  2.78k|   return 0;
   39|  2.78k|}

_Z4fuzzPKhm:
   11|  2.77k|void fuzz(const uint8_t in[], size_t len) {
   12|  2.77k|   try {
   13|  2.77k|      std::vector<uint8_t> v(in, in + len);
   14|  2.77k|      Botan::TLS::Client_Hello_12 ch(v);  // TODO: We might want to do that for TLS 1.3 as well
   15|  2.77k|   } catch(Botan::Exception& e) {}
   16|  2.77k|}

_ZNK5Botan10BER_Object11assert_is_aENS_9ASN1_TypeENS_10ASN1_ClassENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   28|  10.6k|void BER_Object::assert_is_a(ASN1_Type expected_type_tag, ASN1_Class expected_class_tag, std::string_view descr) const {
   29|  10.6k|   if(this->is_a(expected_type_tag, expected_class_tag) == false) {
  ------------------
  |  Branch (29:7): [True: 302, False: 10.3k]
  ------------------
   30|    302|      std::stringstream msg;
   31|       |
   32|    302|      msg << "Tag mismatch when decoding " << descr << " got ";
   33|       |
   34|    302|      if(m_class_tag == ASN1_Class::NoObject && m_type_tag == ASN1_Type::NoObject) {
  ------------------
  |  Branch (34:10): [True: 54, False: 248]
  |  Branch (34:49): [True: 54, False: 0]
  ------------------
   35|     54|         msg << "EOF";
   36|    248|      } else {
   37|    248|         if(m_class_tag == ASN1_Class::Universal || m_class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (37:13): [True: 38, False: 210]
  |  Branch (37:53): [True: 148, False: 62]
  ------------------
   38|    186|            msg << asn1_tag_to_string(m_type_tag);
   39|    186|         } else {
   40|     62|            msg << std::to_string(static_cast<uint32_t>(m_type_tag));
   41|     62|         }
   42|       |
   43|    248|         msg << "/" << asn1_class_to_string(m_class_tag);
   44|    248|      }
   45|       |
   46|    302|      msg << " expected ";
   47|       |
   48|    302|      if(expected_class_tag == ASN1_Class::Universal || expected_class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (48:10): [True: 0, False: 302]
  |  Branch (48:57): [True: 302, False: 0]
  ------------------
   49|    302|         msg << asn1_tag_to_string(expected_type_tag);
   50|    302|      } else {
   51|      0|         msg << std::to_string(static_cast<uint32_t>(expected_type_tag));
   52|      0|      }
   53|       |
   54|    302|      msg << "/" << asn1_class_to_string(expected_class_tag);
   55|       |
   56|    302|      throw BER_Decoding_Error(msg.str());
   57|    302|   }
   58|  10.6k|}
_ZNK5Botan10BER_Object4is_aENS_9ASN1_TypeENS_10ASN1_ClassE:
   60|  10.6k|bool BER_Object::is_a(ASN1_Type expected_type_tag, ASN1_Class expected_class_tag) const {
   61|  10.6k|   return (m_type_tag == expected_type_tag && m_class_tag == expected_class_tag);
  ------------------
  |  Branch (61:12): [True: 10.3k, False: 285]
  |  Branch (61:47): [True: 10.3k, False: 17]
  ------------------
   62|  10.6k|}
_ZN5Botan10BER_Object11set_taggingENS_9ASN1_TypeENS_10ASN1_ClassE:
   68|  25.1k|void BER_Object::set_tagging(ASN1_Type type_tag, ASN1_Class class_tag) {
   69|  25.1k|   m_type_tag = type_tag;
   70|  25.1k|   m_class_tag = class_tag;
   71|  25.1k|}
_ZN5Botan20asn1_class_to_stringENS_10ASN1_ClassE:
   73|    550|std::string asn1_class_to_string(ASN1_Class type) {
   74|    550|   switch(type) {
   75|     38|      case ASN1_Class::Universal:
  ------------------
  |  Branch (75:7): [True: 38, False: 512]
  ------------------
   76|     38|         return "UNIVERSAL";
   77|    450|      case ASN1_Class::Constructed:
  ------------------
  |  Branch (77:7): [True: 450, False: 100]
  ------------------
   78|    450|         return "CONSTRUCTED";
   79|      9|      case ASN1_Class::ContextSpecific:
  ------------------
  |  Branch (79:7): [True: 9, False: 541]
  ------------------
   80|      9|         return "CONTEXT_SPECIFIC";
   81|      9|      case ASN1_Class::Application:
  ------------------
  |  Branch (81:7): [True: 9, False: 541]
  ------------------
   82|      9|         return "APPLICATION";
   83|      4|      case ASN1_Class::Private:
  ------------------
  |  Branch (83:7): [True: 4, False: 546]
  ------------------
   84|      4|         return "PRIVATE";
   85|      0|      case ASN1_Class::NoObject:
  ------------------
  |  Branch (85:7): [True: 0, False: 550]
  ------------------
   86|      0|         return "NO_OBJECT";
   87|     40|      default:
  ------------------
  |  Branch (87:7): [True: 40, False: 510]
  ------------------
   88|     40|         return "CLASS(" + std::to_string(static_cast<size_t>(type)) + ")";
   89|    550|   }
   90|    550|}
_ZN5Botan18asn1_tag_to_stringENS_9ASN1_TypeE:
   92|    488|std::string asn1_tag_to_string(ASN1_Type type) {
   93|    488|   switch(type) {
   94|    236|      case ASN1_Type::Sequence:
  ------------------
  |  Branch (94:7): [True: 236, False: 252]
  ------------------
   95|    236|         return "SEQUENCE";
   96|       |
   97|     84|      case ASN1_Type::Set:
  ------------------
  |  Branch (97:7): [True: 84, False: 404]
  ------------------
   98|     84|         return "SET";
   99|       |
  100|      2|      case ASN1_Type::PrintableString:
  ------------------
  |  Branch (100:7): [True: 2, False: 486]
  ------------------
  101|      2|         return "PRINTABLE STRING";
  102|       |
  103|      3|      case ASN1_Type::NumericString:
  ------------------
  |  Branch (103:7): [True: 3, False: 485]
  ------------------
  104|      3|         return "NUMERIC STRING";
  105|       |
  106|      2|      case ASN1_Type::Ia5String:
  ------------------
  |  Branch (106:7): [True: 2, False: 486]
  ------------------
  107|      2|         return "IA5 STRING";
  108|       |
  109|      2|      case ASN1_Type::TeletexString:
  ------------------
  |  Branch (109:7): [True: 2, False: 486]
  ------------------
  110|      2|         return "T61 STRING";
  111|       |
  112|      3|      case ASN1_Type::Utf8String:
  ------------------
  |  Branch (112:7): [True: 3, False: 485]
  ------------------
  113|      3|         return "UTF8 STRING";
  114|       |
  115|      2|      case ASN1_Type::VisibleString:
  ------------------
  |  Branch (115:7): [True: 2, False: 486]
  ------------------
  116|      2|         return "VISIBLE STRING";
  117|       |
  118|      2|      case ASN1_Type::BmpString:
  ------------------
  |  Branch (118:7): [True: 2, False: 486]
  ------------------
  119|      2|         return "BMP STRING";
  120|       |
  121|      4|      case ASN1_Type::UniversalString:
  ------------------
  |  Branch (121:7): [True: 4, False: 484]
  ------------------
  122|      4|         return "UNIVERSAL STRING";
  123|       |
  124|      1|      case ASN1_Type::UtcTime:
  ------------------
  |  Branch (124:7): [True: 1, False: 487]
  ------------------
  125|      1|         return "UTC TIME";
  126|       |
  127|      4|      case ASN1_Type::GeneralizedTime:
  ------------------
  |  Branch (127:7): [True: 4, False: 484]
  ------------------
  128|      4|         return "GENERALIZED TIME";
  129|       |
  130|      2|      case ASN1_Type::OctetString:
  ------------------
  |  Branch (130:7): [True: 2, False: 486]
  ------------------
  131|      2|         return "OCTET STRING";
  132|       |
  133|      3|      case ASN1_Type::BitString:
  ------------------
  |  Branch (133:7): [True: 3, False: 485]
  ------------------
  134|      3|         return "BIT STRING";
  135|       |
  136|      2|      case ASN1_Type::Enumerated:
  ------------------
  |  Branch (136:7): [True: 2, False: 486]
  ------------------
  137|      2|         return "ENUMERATED";
  138|       |
  139|      3|      case ASN1_Type::Integer:
  ------------------
  |  Branch (139:7): [True: 3, False: 485]
  ------------------
  140|      3|         return "INTEGER";
  141|       |
  142|      2|      case ASN1_Type::Null:
  ------------------
  |  Branch (142:7): [True: 2, False: 486]
  ------------------
  143|      2|         return "NULL";
  144|       |
  145|      7|      case ASN1_Type::ObjectId:
  ------------------
  |  Branch (145:7): [True: 7, False: 481]
  ------------------
  146|      7|         return "OBJECT";
  147|       |
  148|      4|      case ASN1_Type::Boolean:
  ------------------
  |  Branch (148:7): [True: 4, False: 484]
  ------------------
  149|      4|         return "BOOLEAN";
  150|       |
  151|      1|      case ASN1_Type::NoObject:
  ------------------
  |  Branch (151:7): [True: 1, False: 487]
  ------------------
  152|      1|         return "NO_OBJECT";
  153|       |
  154|    119|      default:
  ------------------
  |  Branch (154:7): [True: 119, False: 369]
  ------------------
  155|    119|         return "TAG(" + std::to_string(static_cast<uint32_t>(type)) + ")";
  156|    488|   }
  157|    488|}
_ZN5Botan18BER_Decoding_ErrorC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  162|    643|BER_Decoding_Error::BER_Decoding_Error(std::string_view str) : Decoding_Error(fmt("BER: {}", str)) {}
_ZN5Botan11BER_Bad_TagC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEj:
  164|     63|BER_Bad_Tag::BER_Bad_Tag(std::string_view str, uint32_t tagging) : BER_Decoding_Error(fmt("{}: {}", str, tagging)) {}
_ZN5Botan4ASN19to_stringERKNS_10BER_ObjectE:
  184|  2.52k|std::string to_string(const BER_Object& obj) { return std::string(cast_uint8_ptr_to_char(obj.bits()), obj.length()); }

_ZN5Botan3OID11decode_fromERNS_11BER_DecoderE:
  185|  5.43k|void OID::decode_from(BER_Decoder& decoder) {
  186|  5.43k|   BER_Object obj = decoder.get_next_object();
  187|  5.43k|   if(obj.tagging() != (ASN1_Class::Universal | ASN1_Type::ObjectId)) {
  ------------------
  |  Branch (187:7): [True: 63, False: 5.37k]
  ------------------
  188|     63|      throw BER_Bad_Tag("Error decoding OID, unknown tag", obj.tagging());
  189|     63|   }
  190|       |
  191|  5.37k|   const size_t length = obj.length();
  192|  5.37k|   const uint8_t* bits = obj.bits();
  193|       |
  194|  5.37k|   if(length < 2 && !(length == 1 && bits[0] == 0)) {
  ------------------
  |  Branch (194:7): [True: 3.37k, False: 2.00k]
  |  Branch (194:23): [True: 3.37k, False: 5]
  |  Branch (194:38): [True: 3.35k, False: 14]
  ------------------
  195|     19|      throw BER_Decoding_Error("OID encoding is too short");
  196|     19|   }
  197|       |
  198|  5.35k|   m_id.clear();
  199|  5.35k|   m_id.push_back(bits[0] / 40);
  200|  5.35k|   m_id.push_back(bits[0] % 40);
  201|       |
  202|  5.35k|   size_t i = 0;
  203|  29.2k|   while(i != length - 1) {
  ------------------
  |  Branch (203:10): [True: 23.9k, False: 5.32k]
  ------------------
  204|  23.9k|      uint32_t component = 0;
  205|  29.1k|      while(i != length - 1) {
  ------------------
  |  Branch (205:13): [True: 27.8k, False: 1.23k]
  ------------------
  206|  27.8k|         ++i;
  207|       |
  208|  27.8k|         if(component >> (32 - 7)) {
  ------------------
  |  Branch (208:13): [True: 32, False: 27.8k]
  ------------------
  209|     32|            throw Decoding_Error("OID component overflow");
  210|     32|         }
  211|       |
  212|  27.8k|         component = (component << 7) + (bits[i] & 0x7F);
  213|       |
  214|  27.8k|         if(!(bits[i] & 0x80)) {
  ------------------
  |  Branch (214:13): [True: 22.6k, False: 5.22k]
  ------------------
  215|  22.6k|            break;
  216|  22.6k|         }
  217|  27.8k|      }
  218|  23.8k|      m_id.push_back(component);
  219|  23.8k|   }
  220|  5.35k|}

_ZN5Botan11ASN1_StringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS_9ASN1_TypeE:
   62|  5.53k|ASN1_String::ASN1_String(std::string_view str, ASN1_Type t) : m_utf8_str(str), m_tag(t) {
   63|  5.53k|   if(!is_utf8_subset_string_type(m_tag)) {
  ------------------
  |  Branch (63:7): [True: 0, False: 5.53k]
  ------------------
   64|      0|      throw Invalid_Argument("ASN1_String only supports encoding to UTF-8 or a UTF-8 subset");
   65|      0|   }
   66|  5.53k|}
_ZN5Botan11ASN1_StringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   68|  5.53k|ASN1_String::ASN1_String(std::string_view str) : ASN1_String(str, choose_encoding(str)) {}
_ZN5Botan11ASN1_String11decode_fromERNS_11BER_DecoderE:
   86|  5.31k|void ASN1_String::decode_from(BER_Decoder& source) {
   87|  5.31k|   BER_Object obj = source.get_next_object();
   88|       |
   89|  5.31k|   if(!is_asn1_string_type(obj.type())) {
  ------------------
  |  Branch (89:7): [True: 151, False: 5.16k]
  ------------------
   90|    151|      auto typ = static_cast<uint32_t>(obj.type());
   91|    151|      throw Decoding_Error(fmt("ASN1_String: Unknown string type {}", typ));
   92|    151|   }
   93|       |
   94|  5.16k|   m_tag = obj.type();
   95|  5.16k|   m_data.assign(obj.bits(), obj.bits() + obj.length());
   96|       |
   97|  5.16k|   if(m_tag == ASN1_Type::BmpString) {
  ------------------
  |  Branch (97:7): [True: 510, False: 4.65k]
  ------------------
   98|    510|      m_utf8_str = ucs2_to_utf8(m_data.data(), m_data.size());
   99|  4.65k|   } else if(m_tag == ASN1_Type::UniversalString) {
  ------------------
  |  Branch (99:14): [True: 729, False: 3.92k]
  ------------------
  100|    729|      m_utf8_str = ucs4_to_utf8(m_data.data(), m_data.size());
  101|  3.92k|   } else if(m_tag == ASN1_Type::TeletexString) {
  ------------------
  |  Branch (101:14): [True: 1.37k, False: 2.55k]
  ------------------
  102|       |      /*
  103|       |      TeletexString is nominally ITU T.61 not ISO-8859-1 but it seems
  104|       |      the majority of implementations actually used that charset here.
  105|       |      */
  106|  1.37k|      m_utf8_str = latin1_to_utf8(m_data.data(), m_data.size());
  107|  2.55k|   } else {
  108|       |      // All other supported string types are UTF-8 or some subset thereof
  109|  2.55k|      m_utf8_str = ASN1::to_string(obj);
  110|  2.55k|   }
  111|  5.16k|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_119is_asn1_string_typeENS_9ASN1_TypeE:
   52|  5.29k|bool is_asn1_string_type(ASN1_Type tag) {
   53|  5.29k|   return (is_utf8_subset_string_type(tag) || tag == ASN1_Type::TeletexString || tag == ASN1_Type::BmpString ||
  ------------------
  |  Branch (53:12): [True: 2.52k, False: 2.76k]
  |  Branch (53:47): [True: 1.37k, False: 1.39k]
  |  Branch (53:82): [True: 510, False: 880]
  ------------------
   54|  5.29k|           tag == ASN1_Type::UniversalString);
  ------------------
  |  Branch (54:12): [True: 729, False: 151]
  ------------------
   55|  5.29k|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_126is_utf8_subset_string_typeENS_9ASN1_TypeE:
   47|  10.8k|bool is_utf8_subset_string_type(ASN1_Type tag) {
   48|  10.8k|   return (tag == ASN1_Type::NumericString || tag == ASN1_Type::PrintableString || tag == ASN1_Type::VisibleString ||
  ------------------
  |  Branch (48:12): [True: 845, False: 9.98k]
  |  Branch (48:47): [True: 6.20k, False: 3.77k]
  |  Branch (48:84): [True: 468, False: 3.30k]
  ------------------
   49|  10.8k|           tag == ASN1_Type::Ia5String || tag == ASN1_Type::Utf8String);
  ------------------
  |  Branch (49:12): [True: 448, False: 2.86k]
  |  Branch (49:43): [True: 98, False: 2.76k]
  ------------------
   50|  10.8k|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_115choose_encodingENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   23|  5.53k|ASN1_Type choose_encoding(std::string_view str) {
   24|  5.53k|   auto all_printable = CT::Mask<uint8_t>::set();
   25|       |
   26|  5.53k|   for(size_t i = 0; i != str.size(); ++i) {
  ------------------
  |  Branch (26:22): [True: 0, False: 5.53k]
  ------------------
   27|      0|      const uint8_t c = static_cast<uint8_t>(str[i]);
   28|       |
   29|      0|      auto is_alpha_lower = CT::Mask<uint8_t>::is_within_range(c, 'a', 'z');
   30|      0|      auto is_alpha_upper = CT::Mask<uint8_t>::is_within_range(c, 'A', 'Z');
   31|      0|      auto is_decimal = CT::Mask<uint8_t>::is_within_range(c, '0', '9');
   32|       |
   33|      0|      auto is_print_punc = CT::Mask<uint8_t>::is_any_of(c, {' ', '(', ')', '+', ',', '-', '.', '/', ':', '=', '?'});
   34|       |
   35|      0|      auto is_printable = is_alpha_lower | is_alpha_upper | is_decimal | is_print_punc;
   36|       |
   37|      0|      all_printable &= is_printable;
   38|      0|   }
   39|       |
   40|  5.53k|   if(all_printable.is_set()) {
  ------------------
  |  Branch (40:7): [True: 5.53k, False: 0]
  ------------------
   41|  5.53k|      return ASN1_Type::PrintableString;
   42|  5.53k|   } else {
   43|      0|      return ASN1_Type::Utf8String;
   44|      0|   }
   45|  5.53k|}

_ZNK5Botan11BER_Decoder10more_itemsEv:
  195|  10.7k|bool BER_Decoder::more_items() const {
  196|  10.7k|   if(m_source->end_of_data() && !m_pushed.is_set()) {
  ------------------
  |  Branch (196:7): [True: 3.59k, False: 7.15k]
  |  Branch (196:34): [True: 3.59k, False: 0]
  ------------------
  197|  3.59k|      return false;
  198|  3.59k|   }
  199|  7.15k|   return true;
  200|  10.7k|}
_ZN5Botan11BER_Decoder15get_next_objectEv:
  229|  21.5k|BER_Object BER_Decoder::get_next_object() {
  230|  21.5k|   BER_Object next;
  231|       |
  232|  21.5k|   if(m_pushed.is_set()) {
  ------------------
  |  Branch (232:7): [True: 0, False: 21.5k]
  ------------------
  233|      0|      std::swap(next, m_pushed);
  234|      0|      return next;
  235|      0|   }
  236|       |
  237|  25.1k|   for(;;) {
  238|  25.1k|      ASN1_Type type_tag;
  239|  25.1k|      ASN1_Class class_tag;
  240|  25.1k|      decode_tag(m_source, type_tag, class_tag);
  241|  25.1k|      next.set_tagging(type_tag, class_tag);
  242|  25.1k|      if(next.is_set() == false) {  // no more objects
  ------------------
  |  Branch (242:10): [True: 108, False: 25.0k]
  ------------------
  243|    108|         return next;
  244|    108|      }
  245|       |
  246|  25.0k|      size_t field_size;
  247|  25.0k|      const size_t length = decode_length(m_source, field_size, ALLOWED_EOC_NESTINGS);
  248|  25.0k|      if(!m_source->check_available(length)) {
  ------------------
  |  Branch (248:10): [True: 140, False: 24.8k]
  ------------------
  249|    140|         throw BER_Decoding_Error("Value truncated");
  250|    140|      }
  251|       |
  252|  24.8k|      uint8_t* out = next.mutable_bits(length);
  253|  24.8k|      if(m_source->read(out, length) != length) {
  ------------------
  |  Branch (253:10): [True: 0, False: 24.8k]
  ------------------
  254|      0|         throw BER_Decoding_Error("Value truncated");
  255|      0|      }
  256|       |
  257|  24.8k|      if(next.tagging() == static_cast<uint32_t>(ASN1_Type::Eoc)) {
  ------------------
  |  Branch (257:10): [True: 3.52k, False: 21.3k]
  ------------------
  258|  3.52k|         continue;
  259|  21.3k|      } else {
  260|  21.3k|         break;
  261|  21.3k|      }
  262|  24.8k|   }
  263|       |
  264|  21.3k|   return next;
  265|  21.5k|}
_ZN5Botan11BER_Decoder10start_consENS_9ASN1_TypeENS_10ASN1_ClassE:
  284|  10.8k|BER_Decoder BER_Decoder::start_cons(ASN1_Type type_tag, ASN1_Class class_tag) {
  285|  10.8k|   BER_Object obj = get_next_object();
  286|  10.8k|   obj.assert_is_a(type_tag, class_tag | ASN1_Class::Constructed);
  287|  10.8k|   return BER_Decoder(std::move(obj), this);
  288|  10.8k|}
_ZN5Botan11BER_Decoder8end_consEv:
  293|  8.38k|BER_Decoder& BER_Decoder::end_cons() {
  294|  8.38k|   if(!m_parent) {
  ------------------
  |  Branch (294:7): [True: 0, False: 8.38k]
  ------------------
  295|      0|      throw Invalid_State("BER_Decoder::end_cons called with null parent");
  296|      0|   }
  297|  8.38k|   if(!m_source->end_of_data()) {
  ------------------
  |  Branch (297:7): [True: 102, False: 8.27k]
  ------------------
  298|    102|      throw Decoding_Error("BER_Decoder::end_cons called with data left");
  299|    102|   }
  300|  8.27k|   return (*m_parent);
  301|  8.38k|}
_ZN5Botan11BER_DecoderC2EONS_10BER_ObjectEPS0_:
  303|  10.3k|BER_Decoder::BER_Decoder(BER_Object&& obj, BER_Decoder* parent) {
  304|  10.3k|   m_data_src = std::make_unique<DataSource_BERObject>(std::move(obj));
  305|  10.3k|   m_source = m_data_src.get();
  306|  10.3k|   m_parent = parent;
  307|  10.3k|}
_ZN5Botan11BER_DecoderC2EPKhm:
  317|  3.68k|BER_Decoder::BER_Decoder(const uint8_t data[], size_t length) {
  318|  3.68k|   m_data_src = std::make_unique<DataSource_Memory>(data, length);
  319|  3.68k|   m_source = m_data_src.get();
  320|  3.68k|}
_ZN5Botan11BER_DecoderC2ERKNSt3__16vectorIhNS1_9allocatorIhEEEE:
  333|  3.33k|BER_Decoder::BER_Decoder(const std::vector<uint8_t>& data) {
  334|  3.33k|   m_data_src = std::make_unique<DataSource_Memory>(data.data(), data.size());
  335|  3.33k|   m_source = m_data_src.get();
  336|  3.33k|}
_ZN5Botan11BER_Decoder6decodeERNS_11ASN1_ObjectENS_9ASN1_TypeENS_10ASN1_ClassE:
  352|  14.4k|BER_Decoder& BER_Decoder::decode(ASN1_Object& obj, ASN1_Type /*unused*/, ASN1_Class /*unused*/) {
  353|  14.4k|   obj.decode_from(*this);
  354|  14.4k|   return (*this);
  355|  14.4k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_110decode_tagEPNS_10DataSourceERNS_9ASN1_TypeERNS_10ASN1_ClassE:
   29|  82.2k|size_t decode_tag(DataSource* ber, ASN1_Type& type_tag, ASN1_Class& class_tag) {
   30|  82.2k|   uint8_t b;
   31|  82.2k|   if(!ber->read_byte(b)) {
  ------------------
  |  Branch (31:7): [True: 9.08k, False: 73.1k]
  ------------------
   32|  9.08k|      type_tag = ASN1_Type::NoObject;
   33|  9.08k|      class_tag = ASN1_Class::NoObject;
   34|  9.08k|      return 0;
   35|  9.08k|   }
   36|       |
   37|  73.1k|   if((b & 0x1F) != 0x1F) {
  ------------------
  |  Branch (37:7): [True: 71.2k, False: 1.90k]
  ------------------
   38|  71.2k|      type_tag = ASN1_Type(b & 0x1F);
   39|  71.2k|      class_tag = ASN1_Class(b & 0xE0);
   40|  71.2k|      return 1;
   41|  71.2k|   }
   42|       |
   43|  1.90k|   size_t tag_bytes = 1;
   44|  1.90k|   class_tag = ASN1_Class(b & 0xE0);
   45|       |
   46|  1.90k|   size_t tag_buf = 0;
   47|  4.63k|   while(true) {
  ------------------
  |  Branch (47:10): [Folded - Ignored]
  ------------------
   48|  4.63k|      if(!ber->read_byte(b)) {
  ------------------
  |  Branch (48:10): [True: 14, False: 4.61k]
  ------------------
   49|     14|         throw BER_Decoding_Error("Long-form tag truncated");
   50|     14|      }
   51|  4.61k|      if(tag_buf & 0xFF000000) {
  ------------------
  |  Branch (51:10): [True: 5, False: 4.61k]
  ------------------
   52|      5|         throw BER_Decoding_Error("Long-form tag overflowed 32 bits");
   53|      5|      }
   54|  4.61k|      ++tag_bytes;
   55|  4.61k|      tag_buf = (tag_buf << 7) | (b & 0x7F);
   56|  4.61k|      if((b & 0x80) == 0) {
  ------------------
  |  Branch (56:10): [True: 1.88k, False: 2.73k]
  ------------------
   57|  1.88k|         break;
   58|  1.88k|      }
   59|  4.61k|   }
   60|  1.88k|   type_tag = ASN1_Type(tag_buf);
   61|  1.88k|   return tag_bytes;
   62|  1.90k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_113decode_lengthEPNS_10DataSourceERmm:
   72|  73.1k|size_t decode_length(DataSource* ber, size_t& field_size, size_t allow_indef) {
   73|  73.1k|   uint8_t b;
   74|  73.1k|   if(!ber->read_byte(b)) {
  ------------------
  |  Branch (74:7): [True: 70, False: 73.0k]
  ------------------
   75|     70|      throw BER_Decoding_Error("Length field not found");
   76|     70|   }
   77|  73.0k|   field_size = 1;
   78|  73.0k|   if((b & 0x80) == 0) {
  ------------------
  |  Branch (78:7): [True: 56.7k, False: 16.3k]
  ------------------
   79|  56.7k|      return b;
   80|  56.7k|   }
   81|       |
   82|  16.3k|   field_size += (b & 0x7F);
   83|  16.3k|   if(field_size > 5) {
  ------------------
  |  Branch (83:7): [True: 14, False: 16.2k]
  ------------------
   84|     14|      throw BER_Decoding_Error("Length field is too large");
   85|     14|   }
   86|       |
   87|  16.2k|   if(field_size == 1) {
  ------------------
  |  Branch (87:7): [True: 14.0k, False: 2.22k]
  ------------------
   88|  14.0k|      if(allow_indef == 0) {
  ------------------
  |  Branch (88:10): [True: 1, False: 14.0k]
  ------------------
   89|      1|         throw BER_Decoding_Error("Nested EOC markers too deep, rejecting to avoid stack exhaustion");
   90|  14.0k|      } else {
   91|  14.0k|         return find_eoc(ber, allow_indef - 1);
   92|  14.0k|      }
   93|  14.0k|   }
   94|       |
   95|  2.22k|   size_t length = 0;
   96|       |
   97|  5.15k|   for(size_t i = 0; i != field_size - 1; ++i) {
  ------------------
  |  Branch (97:22): [True: 2.94k, False: 2.21k]
  ------------------
   98|  2.94k|      if(get_byte<0>(length) != 0) {
  ------------------
  |  Branch (98:10): [True: 0, False: 2.94k]
  ------------------
   99|      0|         throw BER_Decoding_Error("Field length overflow");
  100|      0|      }
  101|  2.94k|      if(!ber->read_byte(b)) {
  ------------------
  |  Branch (101:10): [True: 15, False: 2.92k]
  ------------------
  102|     15|         throw BER_Decoding_Error("Corrupted length field");
  103|     15|      }
  104|  2.92k|      length = (length << 8) | b;
  105|  2.92k|   }
  106|  2.21k|   return length;
  107|  2.22k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_18find_eocEPNS_10DataSourceEm:
  112|  14.0k|size_t find_eoc(DataSource* ber, size_t allow_indef) {
  113|  14.0k|   secure_vector<uint8_t> buffer(BOTAN_DEFAULT_BUFFER_SIZE), data;
  ------------------
  |  |  372|  14.0k|#define BOTAN_DEFAULT_BUFFER_SIZE 4096
  ------------------
  114|       |
  115|  24.0k|   while(true) {
  ------------------
  |  Branch (115:10): [Folded - Ignored]
  ------------------
  116|  24.0k|      const size_t got = ber->peek(buffer.data(), buffer.size(), data.size());
  117|  24.0k|      if(got == 0) {
  ------------------
  |  Branch (117:10): [True: 14.0k, False: 10.0k]
  ------------------
  118|  14.0k|         break;
  119|  14.0k|      }
  120|       |
  121|  10.0k|      data += std::make_pair(buffer.data(), got);
  122|  10.0k|   }
  123|       |
  124|  14.0k|   DataSource_Memory source(data);
  125|  14.0k|   data.clear();
  126|       |
  127|  14.0k|   size_t length = 0;
  128|  57.1k|   while(true) {
  ------------------
  |  Branch (128:10): [Folded - Ignored]
  ------------------
  129|  57.1k|      ASN1_Type type_tag;
  130|  57.1k|      ASN1_Class class_tag;
  131|  57.1k|      size_t tag_size = decode_tag(&source, type_tag, class_tag);
  132|  57.1k|      if(type_tag == ASN1_Type::NoObject) {
  ------------------
  |  Branch (132:10): [True: 8.97k, False: 48.1k]
  ------------------
  133|  8.97k|         break;
  134|  8.97k|      }
  135|       |
  136|  48.1k|      size_t length_size = 0;
  137|  48.1k|      size_t item_size = decode_length(&source, length_size, allow_indef);
  138|  48.1k|      source.discard_next(item_size);
  139|       |
  140|  48.1k|      length = BOTAN_CHECKED_ADD(length, item_size);
  ------------------
  |  |   72|  48.1k|#define BOTAN_CHECKED_ADD(x, y) checked_add(x, y, __FILE__, __LINE__)
  ------------------
  141|  48.1k|      length = BOTAN_CHECKED_ADD(length, tag_size);
  ------------------
  |  |   72|  48.1k|#define BOTAN_CHECKED_ADD(x, y) checked_add(x, y, __FILE__, __LINE__)
  ------------------
  142|  48.1k|      length = BOTAN_CHECKED_ADD(length, length_size);
  ------------------
  |  |   72|  48.1k|#define BOTAN_CHECKED_ADD(x, y) checked_add(x, y, __FILE__, __LINE__)
  ------------------
  143|       |
  144|  48.1k|      if(type_tag == ASN1_Type::Eoc && class_tag == ASN1_Class::Universal) {
  ------------------
  |  Branch (144:10): [True: 6.44k, False: 41.6k]
  |  Branch (144:40): [True: 5.00k, False: 1.44k]
  ------------------
  145|  5.00k|         break;
  146|  5.00k|      }
  147|  48.1k|   }
  148|  14.0k|   return length;
  149|  14.0k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObjectC2EONS_10BER_ObjectE:
  183|  10.3k|      explicit DataSource_BERObject(BER_Object&& obj) : m_obj(std::move(obj)), m_offset(0) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObject4readEPhm:
  153|   212k|      size_t read(uint8_t out[], size_t length) override {
  154|   212k|         BOTAN_ASSERT_NOMSG(m_offset <= m_obj.length());
  ------------------
  |  |   60|   212k|   do {                                                                     \
  |  |   61|   212k|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 212k]
  |  |  ------------------
  |  |   62|   212k|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|   212k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  155|   212k|         const size_t got = std::min<size_t>(m_obj.length() - m_offset, length);
  156|   212k|         copy_mem(out, m_obj.bits() + m_offset, got);
  157|   212k|         m_offset += got;
  158|   212k|         return got;
  159|   212k|      }
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObject15check_availableEm:
  174|  17.3k|      bool check_available(size_t n) override {
  175|  17.3k|         BOTAN_ASSERT_NOMSG(m_offset <= m_obj.length());
  ------------------
  |  |   60|  17.3k|   do {                                                                     \
  |  |   61|  17.3k|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 17.3k]
  |  |  ------------------
  |  |   62|  17.3k|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|  17.3k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  176|  17.3k|         return (n <= (m_obj.length() - m_offset));
  177|  17.3k|      }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_120DataSource_BERObject4peekEPhmm:
  161|  2.90k|      size_t peek(uint8_t out[], size_t length, size_t peek_offset) const override {
  162|  2.90k|         BOTAN_ASSERT_NOMSG(m_offset <= m_obj.length());
  ------------------
  |  |   60|  2.90k|   do {                                                                     \
  |  |   61|  2.90k|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 2.90k]
  |  |  ------------------
  |  |   62|  2.90k|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|  2.90k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  163|  2.90k|         const size_t bytes_left = m_obj.length() - m_offset;
  164|       |
  165|  2.90k|         if(peek_offset >= bytes_left) {
  ------------------
  |  Branch (165:13): [True: 2.22k, False: 678]
  ------------------
  166|  2.22k|            return 0;
  167|  2.22k|         }
  168|       |
  169|    678|         const size_t got = std::min(bytes_left - peek_offset, length);
  170|    678|         copy_mem(out, m_obj.bits() + m_offset + peek_offset, got);
  171|    678|         return got;
  172|  2.90k|      }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_120DataSource_BERObject11end_of_dataEv:
  179|  14.8k|      bool end_of_data() const override { return get_bytes_read() == m_obj.length(); }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_120DataSource_BERObject14get_bytes_readEv:
  181|  14.8k|      size_t get_bytes_read() const override { return m_offset; }

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

_ZN5Botan16MDx_HashFunctionC2Embbh:
   26|    143|      m_position(0) {
   27|    143|   if(!is_power_of_2(block_len)) {
  ------------------
  |  Branch (27:7): [True: 0, False: 143]
  ------------------
   28|      0|      throw Invalid_Argument("MDx_HashFunction block length must be a power of 2");
   29|      0|   }
   30|    143|   if(m_block_bits < 3 || m_block_bits > 16) {
  ------------------
  |  Branch (30:7): [True: 0, False: 143]
  |  Branch (30:27): [True: 0, False: 143]
  ------------------
   31|      0|      throw Invalid_Argument("MDx_HashFunction block size too large or too small");
   32|      0|   }
   33|    143|   if(m_counter_size < 8 || m_counter_size > block_len) {
  ------------------
  |  Branch (33:7): [True: 0, False: 143]
  |  Branch (33:29): [True: 0, False: 143]
  ------------------
   34|      0|      throw Invalid_State("MDx_HashFunction invalid counter length");
   35|      0|   }
   36|    143|}
_ZN5Botan16MDx_HashFunction5clearEv:
   41|    280|void MDx_HashFunction::clear() {
   42|    280|   zeroise(m_buffer);
   43|    280|   m_count = m_position = 0;
   44|    280|}
_ZN5Botan16MDx_HashFunction8add_dataEPKhm:
   49|    280|void MDx_HashFunction::add_data(const uint8_t input[], size_t length) {
   50|    280|   const size_t block_len = static_cast<size_t>(1) << m_block_bits;
   51|       |
   52|    280|   m_count += length;
   53|       |
   54|    280|   if(m_position) {
  ------------------
  |  Branch (54:7): [True: 134, False: 146]
  ------------------
   55|    134|      buffer_insert(m_buffer, m_position, input, length);
   56|       |
   57|    134|      if(m_position + length >= block_len) {
  ------------------
  |  Branch (57:10): [True: 78, False: 56]
  ------------------
   58|     78|         compress_n(m_buffer.data(), 1);
   59|     78|         input += (block_len - m_position);
   60|     78|         length -= (block_len - m_position);
   61|     78|         m_position = 0;
   62|     78|      }
   63|    134|   }
   64|       |
   65|       |   // Just in case the compiler can't figure out block_len is a power of 2
   66|    280|   const size_t full_blocks = length >> m_block_bits;
   67|    280|   const size_t remaining = length & (block_len - 1);
   68|       |
   69|    280|   if(full_blocks > 0) {
  ------------------
  |  Branch (69:7): [True: 80, False: 200]
  ------------------
   70|     80|      compress_n(input, full_blocks);
   71|     80|   }
   72|       |
   73|    280|   buffer_insert(m_buffer, m_position, input + full_blocks * block_len, remaining);
   74|    280|   m_position += remaining;
   75|    280|}
_ZN5Botan16MDx_HashFunction12final_resultEPh:
   80|    137|void MDx_HashFunction::final_result(uint8_t output[]) {
   81|    137|   const size_t block_len = static_cast<size_t>(1) << m_block_bits;
   82|       |
   83|    137|   clear_mem(&m_buffer[m_position], block_len - m_position);
   84|    137|   m_buffer[m_position] = m_pad_char;
   85|       |
   86|    137|   if(m_position >= block_len - m_counter_size) {
  ------------------
  |  Branch (86:7): [True: 32, False: 105]
  ------------------
   87|     32|      compress_n(m_buffer.data(), 1);
   88|     32|      zeroise(m_buffer);
   89|     32|   }
   90|       |
   91|    137|   BOTAN_ASSERT_NOMSG(m_counter_size <= output_length());
  ------------------
  |  |   60|    137|   do {                                                                     \
  |  |   61|    137|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 137]
  |  |  ------------------
  |  |   62|    137|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|    137|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   92|    137|   BOTAN_ASSERT_NOMSG(m_counter_size >= 8);
  ------------------
  |  |   60|    137|   do {                                                                     \
  |  |   61|    137|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 137]
  |  |  ------------------
  |  |   62|    137|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|    137|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   93|       |
   94|    137|   const uint64_t bit_count = m_count * 8;
   95|       |
   96|    137|   if(m_count_big_endian) {
  ------------------
  |  Branch (96:7): [True: 137, False: 0]
  ------------------
   97|    137|      store_be(bit_count, &m_buffer[block_len - 8]);
   98|    137|   } else {
   99|      0|      store_le(bit_count, &m_buffer[block_len - 8]);
  100|      0|   }
  101|       |
  102|    137|   compress_n(m_buffer.data(), 1);
  103|    137|   copy_out(output);
  104|    137|   clear();
  105|    137|}

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

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

_ZN5Botan3TLS12Client_HelloD2Ev:
  171|    562|Client_Hello::~Client_Hello() = default;
_ZN5Botan3TLS12Client_HelloC2ENSt3__110unique_ptrINS0_21Client_Hello_InternalENS2_14default_deleteIS4_EEEE:
  178|    562|Client_Hello::Client_Hello(std::unique_ptr<Client_Hello_Internal> data) : m_data(std::move(data)) {
  179|    562|   BOTAN_ASSERT_NONNULL(m_data);
  ------------------
  |  |   87|    562|   do {                                                                                   \
  |  |   88|    562|      if((ptr) == nullptr)                                                                \
  |  |  ------------------
  |  |  |  Branch (88:10): [True: 0, False: 562]
  |  |  ------------------
  |  |   89|    562|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |   90|    562|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  180|    562|}
_ZNK5Botan3TLS12Client_Hello13offered_suiteEt:
  244|    562|bool Client_Hello::offered_suite(uint16_t ciphersuite) const {
  245|    562|   return std::find(m_data->ciphersuites().cbegin(), m_data->ciphersuites().cend(), ciphersuite) !=
  246|    562|          m_data->ciphersuites().cend();
  247|    562|}
_ZN5Botan3TLS15Client_Hello_12C2ENSt3__110unique_ptrINS0_21Client_Hello_InternalENS2_14default_deleteIS4_EEEE:
  384|    562|Client_Hello_12::Client_Hello_12(std::unique_ptr<Client_Hello_Internal> data) : Client_Hello(std::move(data)) {
  385|    562|   if(offered_suite(static_cast<uint16_t>(TLS_EMPTY_RENEGOTIATION_INFO_SCSV))) {
  ------------------
  |  Branch (385:7): [True: 222, False: 340]
  ------------------
  386|    222|      if(Renegotiation_Extension* reneg = m_data->extensions().get<Renegotiation_Extension>()) {
  ------------------
  |  Branch (386:35): [True: 7, False: 215]
  ------------------
  387|      7|         if(!reneg->renegotiation_info().empty()) {
  ------------------
  |  Branch (387:13): [True: 2, False: 5]
  ------------------
  388|      2|            throw TLS_Exception(Alert::HandshakeFailure, "Client sent renegotiation SCSV and non-empty extension");
  389|      2|         }
  390|    215|      } else {
  391|       |         // add fake extension
  392|    215|         m_data->extensions().add(new Renegotiation_Extension());
  393|    215|      }
  394|    222|   }
  395|    562|}
_ZN5Botan3TLS15Client_Hello_12C2ERKNSt3__16vectorIhNS2_9allocatorIhEEEE:
  400|  2.77k|      Client_Hello_12(std::make_unique<Client_Hello_Internal>(buf)) {}
_ZNK5Botan3TLS21Client_Hello_Internal12ciphersuitesEv:
  144|  1.68k|      const std::vector<uint16_t>& ciphersuites() const { return m_suites; }
_ZN5Botan3TLS21Client_Hello_Internal10extensionsEv:
  154|    437|      Extensions& extensions() { return m_extensions; }
_ZN5Botan3TLS21Client_Hello_InternalC2ERKNSt3__16vectorIhNS2_9allocatorIhEEEE:
   71|  2.77k|      Client_Hello_Internal(const std::vector<uint8_t>& buf) {
   72|  2.77k|         if(buf.size() < 41) {
  ------------------
  |  Branch (72:13): [True: 16, False: 2.76k]
  ------------------
   73|     16|            throw Decoding_Error("Client_Hello: Packet corrupted");
   74|     16|         }
   75|       |
   76|  2.76k|         TLS_Data_Reader reader("ClientHello", buf);
   77|       |
   78|  2.76k|         const uint8_t major_version = reader.get_byte();
   79|  2.76k|         const uint8_t minor_version = reader.get_byte();
   80|       |
   81|  2.76k|         m_legacy_version = Protocol_Version(major_version, minor_version);
   82|  2.76k|         m_random = reader.get_fixed<uint8_t>(32);
   83|  2.76k|         m_session_id = Session_ID(reader.get_range<uint8_t>(1, 0, 32));
   84|       |
   85|  2.76k|         if(m_legacy_version.is_datagram_protocol()) {
  ------------------
  |  Branch (85:13): [True: 143, False: 2.62k]
  ------------------
   86|    143|            auto sha256 = HashFunction::create_or_throw("SHA-256");
   87|    143|            sha256->update(reader.get_data_read_so_far());
   88|       |
   89|    143|            m_hello_cookie = reader.get_range<uint8_t>(1, 0, 255);
   90|       |
   91|    143|            sha256->update(reader.get_remaining());
   92|    143|            m_cookie_input_bits = sha256->final_stdvec();
   93|    143|         }
   94|       |
   95|  2.76k|         m_suites = reader.get_range_vector<uint16_t>(2, 1, 32767);
   96|  2.76k|         m_comp_methods = reader.get_range_vector<uint8_t>(1, 1, 255);
   97|       |
   98|  2.76k|         m_extensions.deserialize(reader, Connection_Side::Client, Handshake_Type::ClientHello);
   99|  2.76k|      }

_ZN5Botan3TLS9Key_ShareC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeE:
  391|    149|Key_Share::Key_Share(TLS_Data_Reader& reader, uint16_t extension_size, Handshake_Type message_type) {
  392|    149|   if(message_type == Handshake_Type::ClientHello) {
  ------------------
  |  Branch (392:7): [True: 149, False: 0]
  ------------------
  393|    149|      m_impl = std::make_unique<Key_Share_Impl>(Key_Share_ClientHello(reader, extension_size));
  394|    149|   } else if(message_type == Handshake_Type::HelloRetryRequest)  // Connection_Side::Server
  ------------------
  |  Branch (394:14): [True: 0, False: 0]
  ------------------
  395|      0|   {
  396|      0|      m_impl = std::make_unique<Key_Share_Impl>(Key_Share_HelloRetryRequest(reader, extension_size));
  397|      0|   } else if(message_type == Handshake_Type::ServerHello)  // Connection_Side::Server
  ------------------
  |  Branch (397:14): [True: 0, False: 0]
  ------------------
  398|      0|   {
  399|      0|      m_impl = std::make_unique<Key_Share_Impl>(Key_Share_ServerHello(reader, extension_size));
  400|      0|   } else {
  401|      0|      throw Invalid_Argument(std::string("cannot create a Key_Share extension for message of type: ") +
  402|      0|                             handshake_type_to_string(message_type));
  403|      0|   }
  404|    149|}
_ZN5Botan3TLS9Key_ShareD2Ev:
  418|     18|Key_Share::~Key_Share() = default;
tls_extensions_key_share.cpp:_ZN5Botan3TLS12_GLOBAL__N_121Key_Share_ClientHelloC2ERNS0_15TLS_Data_ReaderEt:
  161|    149|      Key_Share_ClientHello(TLS_Data_Reader& reader, uint16_t /* extension_size */) {
  162|       |         // This construction is a crutch to make working with the incoming
  163|       |         // TLS_Data_Reader bearable. Currently, this reader spans the entire
  164|       |         // Client_Hello message. Hence, if offset or length fields are skewed
  165|       |         // or maliciously fabricated, it is possible to read further than the
  166|       |         // bounds of the current extension.
  167|       |         // Note that this aplies to many locations in the code base.
  168|       |         //
  169|       |         // TODO: Overhaul the TLS_Data_Reader to allow for cheap "sub-readers"
  170|       |         //       that enforce read bounds of sub-structures while parsing.
  171|    149|         const auto client_key_share_length = reader.get_uint16_t();
  172|    149|         const auto read_bytes_so_far_begin = reader.read_so_far();
  173|    149|         auto remaining = [&] {
  174|    149|            const auto read_so_far = reader.read_so_far() - read_bytes_so_far_begin;
  175|    149|            BOTAN_STATE_CHECK(read_so_far <= client_key_share_length);
  176|    149|            return client_key_share_length - read_so_far;
  177|    149|         };
  178|       |
  179|    873|         while(reader.has_remaining() && remaining() > 0) {
  ------------------
  |  Branch (179:16): [True: 753, False: 120]
  |  Branch (179:42): [True: 734, False: 19]
  ------------------
  180|    734|            if(remaining() < 4) {
  ------------------
  |  Branch (180:16): [True: 4, False: 730]
  ------------------
  181|      4|               throw TLS_Exception(Alert::DecodeError, "Not enough data to read another KeyShareEntry");
  182|      4|            }
  183|       |
  184|    730|            Key_Share_Entry new_entry(reader);
  185|       |
  186|       |            // RFC 8446 4.2.8
  187|       |            //    Clients MUST NOT offer multiple KeyShareEntry values for the same
  188|       |            //    group. [...]
  189|       |            //    Servers MAY check for violations of these rules and abort the
  190|       |            //    handshake with an "illegal_parameter" alert if one is violated.
  191|    730|            if(std::find_if(m_client_shares.begin(), m_client_shares.end(), [&](const auto& entry) {
  ------------------
  |  Branch (191:16): [True: 6, False: 724]
  ------------------
  192|    730|                  return entry.group() == new_entry.group();
  193|    730|               }) != m_client_shares.end()) {
  194|      6|               throw TLS_Exception(Alert::IllegalParameter, "Received multiple key share entries for the same group");
  195|      6|            }
  196|       |
  197|    724|            m_client_shares.emplace_back(std::move(new_entry));
  198|    724|         }
  199|       |
  200|    139|         if((reader.read_so_far() - read_bytes_so_far_begin) != client_key_share_length) {
  ------------------
  |  Branch (200:13): [True: 63, False: 76]
  ------------------
  201|     63|            throw Decoding_Error("Read bytes are not equal client KeyShare length");
  202|     63|         }
  203|    139|      }
tls_extensions_key_share.cpp:_ZZN5Botan3TLS12_GLOBAL__N_121Key_Share_ClientHelloC1ERNS0_15TLS_Data_ReaderEtENKUlvE_clEv:
  173|  1.48k|         auto remaining = [&] {
  174|  1.48k|            const auto read_so_far = reader.read_so_far() - read_bytes_so_far_begin;
  175|  1.48k|            BOTAN_STATE_CHECK(read_so_far <= client_key_share_length);
  ------------------
  |  |   42|  1.48k|   do {                                                         \
  |  |   43|  1.48k|      if(!(expr))                                               \
  |  |  ------------------
  |  |  |  Branch (43:10): [True: 13, False: 1.47k]
  |  |  ------------------
  |  |   44|  1.48k|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   45|  1.48k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (45:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  176|  1.48k|            return client_key_share_length - read_so_far;
  177|  1.48k|         };
tls_extensions_key_share.cpp:_ZN5Botan3TLS12_GLOBAL__N_115Key_Share_EntryC2ERNS0_15TLS_Data_ReaderE:
   38|    730|      Key_Share_Entry(TLS_Data_Reader& reader) {
   39|       |         // TODO check that the group actually exists before casting...
   40|    730|         m_group = static_cast<Named_Group>(reader.get_uint16_t());
   41|    730|         m_key_exchange = reader.get_tls_length_value(2);
   42|    730|      }
tls_extensions_key_share.cpp:_ZZN5Botan3TLS12_GLOBAL__N_121Key_Share_ClientHelloC1ERNS0_15TLS_Data_ReaderEtENKUlRKT_E_clINS1_15Key_Share_EntryEEEDaS7_:
  191|  15.6k|            if(std::find_if(m_client_shares.begin(), m_client_shares.end(), [&](const auto& entry) {
  192|  15.6k|                  return entry.group() == new_entry.group();
  193|  15.6k|               }) != m_client_shares.end()) {
tls_extensions_key_share.cpp:_ZNK5Botan3TLS12_GLOBAL__N_115Key_Share_Entry5groupEv:
   84|  31.2k|      Named_Group group() const { return m_group; }
tls_extensions_key_share.cpp:_ZN5Botan3TLS12_GLOBAL__N_121Key_Share_ClientHelloD2Ev:
  228|     54|      ~Key_Share_ClientHello() = default;
tls_extensions_key_share.cpp:_ZN5Botan3TLS12_GLOBAL__N_121Key_Share_ClientHelloC2EOS2_:
  233|     36|      Key_Share_ClientHello(Key_Share_ClientHello&&) = default;
tls_extensions_key_share.cpp:_ZN5Botan3TLS9Key_Share14Key_Share_ImplC2ENSt3__17variantIJNS0_12_GLOBAL__N_121Key_Share_ClientHelloENS5_21Key_Share_ServerHelloENS5_27Key_Share_HelloRetryRequestEEEE:
  386|     18|      Key_Share_Impl(Key_Share_Type ks) : key_share(std::move(ks)) {}

_ZN5Botan3TLS3PSKC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeE:
   56|    175|PSK::PSK(TLS_Data_Reader& reader, uint16_t extension_size, Handshake_Type message_type) {
   57|    175|   if(message_type == Handshake_Type::ServerHello) {
  ------------------
  |  Branch (57:7): [True: 0, False: 175]
  ------------------
   58|      0|      if(extension_size != 2) {
  ------------------
  |  Branch (58:10): [True: 0, False: 0]
  ------------------
   59|      0|         throw TLS_Exception(Alert::DecodeError, "Server provided a malformed PSK extension");
   60|      0|      }
   61|       |
   62|      0|      m_impl = std::make_unique<PSK_Internal>(
   63|      0|         Server_PSK{.selected_identity = reader.get_uint16_t(), .session_to_resume = std::nullopt});
   64|    175|   } else if(message_type == Handshake_Type::ClientHello) {
  ------------------
  |  Branch (64:14): [True: 175, False: 0]
  ------------------
   65|    175|      std::vector<Client_PSK> psks;
   66|       |
   67|    175|      const auto identities_length = reader.get_uint16_t();
   68|    175|      const auto identities_offset = reader.read_so_far();
   69|       |
   70|  3.18k|      while(reader.has_remaining() && (reader.read_so_far() - identities_offset) < identities_length) {
  ------------------
  |  Branch (70:13): [True: 3.10k, False: 84]
  |  Branch (70:39): [True: 3.00k, False: 91]
  ------------------
   71|  3.00k|         auto identity = Opaque_Session_Handle(reader.get_tls_length_value(2));
   72|  3.00k|         const auto obfuscated_ticket_age = reader.get_uint32_t();
   73|       |
   74|  3.00k|         psks.emplace_back(Client_PSK{
   75|  3.00k|            .ticket = Ticket(std::move(identity), obfuscated_ticket_age), .binder = {}, .cipher_state = nullptr});
   76|  3.00k|      }
   77|       |
   78|    175|      if(psks.empty()) {
  ------------------
  |  Branch (78:10): [True: 3, False: 172]
  ------------------
   79|      3|         throw TLS_Exception(Alert::DecodeError, "Empty PSK list");
   80|      3|      }
   81|       |
   82|    172|      if(reader.read_so_far() - identities_offset != identities_length) {
  ------------------
  |  Branch (82:10): [True: 44, False: 128]
  ------------------
   83|     44|         throw TLS_Exception(Alert::DecodeError, "Inconsistent PSK identity list");
   84|     44|      }
   85|       |
   86|    128|      const auto binders_length = reader.get_uint16_t();
   87|    128|      const auto binders_offset = reader.read_so_far();
   88|       |
   89|    128|      if(binders_length == 0) {
  ------------------
  |  Branch (89:10): [True: 1, False: 127]
  ------------------
   90|      1|         throw TLS_Exception(Alert::DecodeError, "Empty PSK binders list");
   91|      1|      }
   92|       |
   93|    526|      for(auto& psk : psks) {
  ------------------
  |  Branch (93:21): [True: 526, False: 104]
  ------------------
   94|    526|         if(!reader.has_remaining() || reader.read_so_far() - binders_offset >= binders_length) {
  ------------------
  |  Branch (94:13): [True: 14, False: 512]
  |  Branch (94:40): [True: 9, False: 503]
  ------------------
   95|     23|            throw TLS_Exception(Alert::IllegalParameter, "Not enough PSK binders");
   96|     23|         }
   97|       |
   98|    503|         psk.binder = reader.get_tls_length_value(1);
   99|    503|      }
  100|       |
  101|    104|      if(reader.read_so_far() - binders_offset != binders_length) {
  ------------------
  |  Branch (101:10): [True: 34, False: 70]
  ------------------
  102|     34|         throw TLS_Exception(Alert::IllegalParameter, "Too many PSK binders");
  103|     34|      }
  104|       |
  105|     70|      m_impl = std::make_unique<PSK_Internal>(std::move(psks));
  106|     70|   } else {
  107|      0|      throw TLS_Exception(Alert::DecodeError, "Found a PSK extension in an unexpected handshake message");
  108|      0|   }
  109|    175|}
_ZN5Botan3TLS3PSKD2Ev:
  151|     12|PSK::~PSK() = default;
tls_extensions_psk.cpp:_ZN5Botan3TLS3PSK12PSK_InternalC2ENSt3__16vectorINS0_12_GLOBAL__N_110Client_PSKENS3_9allocatorIS6_EEEE:
   51|     12|      PSK_Internal(std::vector<Client_PSK> clt_psks) : psk(std::move(clt_psks)) {}

_ZN5Botan3TLS10Extensions3addENSt3__110unique_ptrINS0_9ExtensionENS2_14default_deleteIS4_EEEE:
  101|  4.02k|void Extensions::add(std::unique_ptr<Extension> extn) {
  102|  4.02k|   if(has(extn->type())) {
  ------------------
  |  Branch (102:7): [True: 0, False: 4.02k]
  ------------------
  103|      0|      throw Invalid_Argument("cannot add the same extension twice: " +
  104|      0|                             std::to_string(static_cast<uint16_t>(extn->type())));
  105|      0|   }
  106|       |
  107|  4.02k|   m_extensions.emplace_back(extn.release());
  108|  4.02k|}
_ZN5Botan3TLS10Extensions11deserializeERNS0_15TLS_Data_ReaderENS0_15Connection_SideENS0_14Handshake_TypeE:
  110|  2.61k|void Extensions::deserialize(TLS_Data_Reader& reader, const Connection_Side from, const Handshake_Type message_type) {
  111|  2.61k|   if(reader.has_remaining()) {
  ------------------
  |  Branch (111:7): [True: 2.57k, False: 35]
  ------------------
  112|  2.57k|      const uint16_t all_extn_size = reader.get_uint16_t();
  113|       |
  114|  2.57k|      if(reader.remaining_bytes() != all_extn_size) {
  ------------------
  |  Branch (114:10): [True: 57, False: 2.52k]
  ------------------
  115|     57|         throw Decoding_Error("Bad extension size");
  116|     57|      }
  117|       |
  118|  8.25k|      while(reader.has_remaining()) {
  ------------------
  |  Branch (118:13): [True: 5.74k, False: 2.51k]
  ------------------
  119|  5.74k|         const uint16_t extension_code = reader.get_uint16_t();
  120|  5.74k|         const uint16_t extension_size = reader.get_uint16_t();
  121|       |
  122|  5.74k|         const auto type = static_cast<Extension_Code>(extension_code);
  123|       |
  124|  5.74k|         if(this->has(type)) {
  ------------------
  |  Branch (124:13): [True: 9, False: 5.73k]
  ------------------
  125|      9|            throw TLS_Exception(TLS::Alert::DecodeError, "Peer sent duplicated extensions");
  126|      9|         }
  127|       |
  128|       |         // TODO offer a function on reader that returns a byte range as a reference
  129|       |         // to avoid this copy of the extension data
  130|  5.73k|         const std::vector<uint8_t> extn_data = reader.get_fixed<uint8_t>(extension_size);
  131|  5.73k|         TLS_Data_Reader extn_reader("Extension", extn_data);
  132|  5.73k|         this->add(make_extension(extn_reader, type, from, message_type));
  133|  5.73k|         extn_reader.assert_done();
  134|  5.73k|      }
  135|  2.52k|   }
  136|  2.61k|}
_ZN5Botan3TLS17Unknown_ExtensionC2ENS0_14Extension_CodeERNS0_15TLS_Data_ReaderEt:
  218|  3.02k|      m_type(type), m_value(reader.get_fixed<uint8_t>(extension_size)) {}
_ZN5Botan3TLS21Server_Name_IndicatorC2ERNS0_15TLS_Data_ReaderEt:
  222|    191|Server_Name_Indicator::Server_Name_Indicator(TLS_Data_Reader& reader, uint16_t extension_size) {
  223|       |   /*
  224|       |   * This is used by the server to confirm that it knew the name
  225|       |   */
  226|    191|   if(extension_size == 0) {
  ------------------
  |  Branch (226:7): [True: 90, False: 101]
  ------------------
  227|     90|      return;
  228|     90|   }
  229|       |
  230|    101|   uint16_t name_bytes = reader.get_uint16_t();
  231|       |
  232|    101|   if(name_bytes + 2 != extension_size) {
  ------------------
  |  Branch (232:7): [True: 30, False: 71]
  ------------------
  233|     30|      throw Decoding_Error("Bad encoding of SNI extension");
  234|     30|   }
  235|       |
  236|    441|   while(name_bytes) {
  ------------------
  |  Branch (236:10): [True: 370, False: 71]
  ------------------
  237|    370|      uint8_t name_type = reader.get_byte();
  238|    370|      name_bytes--;
  239|       |
  240|    370|      if(name_type == 0)  // DNS
  ------------------
  |  Branch (240:10): [True: 342, False: 28]
  ------------------
  241|    342|      {
  242|    342|         m_sni_host_name = reader.get_string(2, 1, 65535);
  243|    342|         name_bytes -= static_cast<uint16_t>(2 + m_sni_host_name.size());
  244|    342|      } else  // some other unknown name type
  245|     28|      {
  246|     28|         reader.discard_next(name_bytes);
  247|     28|         name_bytes = 0;
  248|     28|      }
  249|    370|   }
  250|     71|}
_ZN5Botan3TLS23Renegotiation_ExtensionC2ERNS0_15TLS_Data_ReaderEt:
  278|     22|      m_reneg_data(reader.get_range<uint8_t>(1, 0, 255)) {
  279|     22|   if(m_reneg_data.size() + 1 != extension_size) {
  ------------------
  |  Branch (279:7): [True: 12, False: 10]
  ------------------
  280|     12|      throw Decoding_Error("Bad encoding for secure renegotiation extn");
  281|     12|   }
  282|     22|}
_ZN5Botan3TLS39Application_Layer_Protocol_NotificationC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  292|    172|                                                                                 Connection_Side from) {
  293|    172|   if(extension_size == 0) {
  ------------------
  |  Branch (293:7): [True: 52, False: 120]
  ------------------
  294|     52|      return;  // empty extension
  295|     52|   }
  296|       |
  297|    120|   const uint16_t name_bytes = reader.get_uint16_t();
  298|       |
  299|    120|   size_t bytes_remaining = extension_size - 2;
  300|       |
  301|    120|   if(name_bytes != bytes_remaining) {
  ------------------
  |  Branch (301:7): [True: 29, False: 91]
  ------------------
  302|     29|      throw Decoding_Error("Bad encoding of ALPN extension, bad length field");
  303|     29|   }
  304|       |
  305|  3.27k|   while(bytes_remaining) {
  ------------------
  |  Branch (305:10): [True: 3.21k, False: 64]
  ------------------
  306|  3.21k|      const std::string p = reader.get_string(1, 0, 255);
  307|       |
  308|  3.21k|      if(bytes_remaining < p.size() + 1) {
  ------------------
  |  Branch (308:10): [True: 0, False: 3.21k]
  ------------------
  309|      0|         throw Decoding_Error("Bad encoding of ALPN, length field too long");
  310|      0|      }
  311|       |
  312|  3.21k|      if(p.empty()) {
  ------------------
  |  Branch (312:10): [True: 27, False: 3.18k]
  ------------------
  313|     27|         throw Decoding_Error("Empty ALPN protocol not allowed");
  314|     27|      }
  315|       |
  316|  3.18k|      bytes_remaining -= (p.size() + 1);
  317|       |
  318|  3.18k|      m_protocols.push_back(p);
  319|  3.18k|   }
  320|       |
  321|       |   // RFC 7301 3.1
  322|       |   //    The "extension_data" field of the [...] extension is structured the
  323|       |   //    same as described above for the client "extension_data", except that
  324|       |   //    the "ProtocolNameList" MUST contain exactly one "ProtocolName".
  325|     64|   if(from == Connection_Side::Server && m_protocols.size() != 1) {
  ------------------
  |  Branch (325:7): [True: 0, False: 64]
  |  Branch (325:42): [True: 0, False: 0]
  ------------------
  326|      0|      throw TLS_Exception(
  327|      0|         Alert::DecodeError,
  328|      0|         "Server sent " + std::to_string(m_protocols.size()) + " protocols in ALPN extension response");
  329|      0|   }
  330|     64|}
_ZN5Botan3TLS16Supported_GroupsC2ERNS0_15TLS_Data_ReaderEt:
  397|    103|Supported_Groups::Supported_Groups(TLS_Data_Reader& reader, uint16_t extension_size) {
  398|    103|   const uint16_t len = reader.get_uint16_t();
  399|       |
  400|    103|   if(len + 2 != extension_size) {
  ------------------
  |  Branch (400:7): [True: 22, False: 81]
  ------------------
  401|     22|      throw Decoding_Error("Inconsistent length field in supported groups list");
  402|     22|   }
  403|       |
  404|     81|   if(len % 2 == 1) {
  ------------------
  |  Branch (404:7): [True: 1, False: 80]
  ------------------
  405|      1|      throw Decoding_Error("Supported groups list of strange size");
  406|      1|   }
  407|       |
  408|     80|   const size_t elems = len / 2;
  409|       |
  410|  4.60k|   for(size_t i = 0; i != elems; ++i) {
  ------------------
  |  Branch (410:22): [True: 4.52k, False: 80]
  ------------------
  411|  4.52k|      const auto group = static_cast<Group_Params>(reader.get_uint16_t());
  412|       |      // Note: RFC 8446 does not explicitly enforce that groups must be unique.
  413|  4.52k|      if(!value_exists(m_groups, group)) {
  ------------------
  |  Branch (413:10): [True: 2.85k, False: 1.66k]
  ------------------
  414|  2.85k|         m_groups.push_back(group);
  415|  2.85k|      }
  416|  4.52k|   }
  417|     80|}
_ZN5Botan3TLS23Supported_Point_FormatsC2ERNS0_15TLS_Data_ReaderEt:
  428|     68|Supported_Point_Formats::Supported_Point_Formats(TLS_Data_Reader& reader, uint16_t extension_size) {
  429|     68|   uint8_t len = reader.get_byte();
  430|       |
  431|     68|   if(len + 1 != extension_size) {
  ------------------
  |  Branch (431:7): [True: 16, False: 52]
  ------------------
  432|     16|      throw Decoding_Error("Inconsistent length field in supported point formats list");
  433|     16|   }
  434|       |
  435|     52|   bool includes_uncompressed = false;
  436|    377|   for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (436:22): [True: 360, False: 17]
  ------------------
  437|    360|      uint8_t format = reader.get_byte();
  438|       |
  439|    360|      if(static_cast<ECPointFormat>(format) == UNCOMPRESSED) {
  ------------------
  |  Branch (439:10): [True: 12, False: 348]
  ------------------
  440|     12|         m_prefers_compressed = false;
  441|     12|         reader.discard_next(len - i - 1);
  442|     12|         return;
  443|    348|      } else if(static_cast<ECPointFormat>(format) == ANSIX962_COMPRESSED_PRIME) {
  ------------------
  |  Branch (443:17): [True: 23, False: 325]
  ------------------
  444|     23|         m_prefers_compressed = true;
  445|     23|         std::vector<uint8_t> remaining_formats = reader.get_fixed<uint8_t>(len - i - 1);
  446|     23|         includes_uncompressed =
  447|     23|            std::any_of(std::begin(remaining_formats), std::end(remaining_formats), [](uint8_t remaining_format) {
  448|     23|               return static_cast<ECPointFormat>(remaining_format) == UNCOMPRESSED;
  449|     23|            });
  450|     23|         break;
  451|     23|      }
  452|       |
  453|       |      // ignore ANSIX962_COMPRESSED_CHAR2, we don't support these curves
  454|    360|   }
  455|       |
  456|       |   // RFC 4492 5.1.:
  457|       |   //   If the Supported Point Formats Extension is indeed sent, it MUST contain the value 0 (uncompressed)
  458|       |   //   as one of the items in the list of point formats.
  459|       |   // Note:
  460|       |   //   RFC 8422 5.1.2. explicitly requires this check,
  461|       |   //   but only if the Supported Groups extension was sent.
  462|     40|   if(!includes_uncompressed) {
  ------------------
  |  Branch (462:7): [True: 36, False: 4]
  ------------------
  463|     36|      throw TLS_Exception(Alert::IllegalParameter,
  464|     36|                          "Supported Point Formats Extension must contain the uncompressed point format");
  465|     36|   }
  466|     40|}
_ZN5Botan3TLS20Signature_AlgorithmsC2ERNS0_15TLS_Data_ReaderEt:
  512|     24|      m_schemes(parse_signature_algorithms(reader, extension_size)) {}
_ZN5Botan3TLS25Signature_Algorithms_CertC2ERNS0_15TLS_Data_ReaderEt:
  519|     43|      m_schemes(parse_signature_algorithms(reader, extension_size)) {}
_ZN5Botan3TLS24Session_Ticket_ExtensionC2ERNS0_15TLS_Data_ReaderEt:
  522|     39|      m_ticket(Session_Ticket(reader.get_elem<uint8_t, std::vector<uint8_t>>(extension_size))) {}
_ZN5Botan3TLS24SRTP_Protection_ProfilesC2ERNS0_15TLS_Data_ReaderEt:
  525|     27|      m_pp(reader.get_range<uint16_t>(2, 0, 65535)) {
  526|     27|   const std::vector<uint8_t> mki = reader.get_range<uint8_t>(1, 0, 255);
  527|       |
  528|     27|   if(m_pp.size() * 2 + mki.size() + 3 != extension_size) {
  ------------------
  |  Branch (528:7): [True: 11, False: 16]
  ------------------
  529|     11|      throw Decoding_Error("Bad encoding for SRTP protection extension");
  530|     11|   }
  531|       |
  532|     16|   if(!mki.empty()) {
  ------------------
  |  Branch (532:7): [True: 1, False: 15]
  ------------------
  533|      1|      throw Decoding_Error("Unhandled non-empty MKI for SRTP protection extension");
  534|      1|   }
  535|     16|}
_ZN5Botan3TLS22Extended_Master_SecretC2ERNS0_15TLS_Data_ReaderEt:
  554|     36|Extended_Master_Secret::Extended_Master_Secret(TLS_Data_Reader& /*unused*/, uint16_t extension_size) {
  555|     36|   if(extension_size != 0) {
  ------------------
  |  Branch (555:7): [True: 12, False: 24]
  ------------------
  556|     12|      throw Decoding_Error("Invalid extended_master_secret extension");
  557|     12|   }
  558|     36|}
_ZN5Botan3TLS16Encrypt_then_MACC2ERNS0_15TLS_Data_ReaderEt:
  564|     38|Encrypt_then_MAC::Encrypt_then_MAC(TLS_Data_Reader& /*unused*/, uint16_t extension_size) {
  565|     38|   if(extension_size != 0) {
  ------------------
  |  Branch (565:7): [True: 11, False: 27]
  ------------------
  566|     11|      throw Decoding_Error("Invalid encrypt_then_mac extension");
  567|     11|   }
  568|     38|}
_ZN5Botan3TLS18Supported_VersionsC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  615|     48|Supported_Versions::Supported_Versions(TLS_Data_Reader& reader, uint16_t extension_size, Connection_Side from) {
  616|     48|   if(from == Connection_Side::Server) {
  ------------------
  |  Branch (616:7): [True: 0, False: 48]
  ------------------
  617|      0|      if(extension_size != 2) {
  ------------------
  |  Branch (617:10): [True: 0, False: 0]
  ------------------
  618|      0|         throw Decoding_Error("Server sent invalid supported_versions extension");
  619|      0|      }
  620|      0|      m_versions.push_back(Protocol_Version(reader.get_uint16_t()));
  621|     48|   } else {
  622|     48|      auto versions = reader.get_range<uint16_t>(1, 1, 127);
  623|       |
  624|    762|      for(auto v : versions) {
  ------------------
  |  Branch (624:18): [True: 762, False: 48]
  ------------------
  625|    762|         m_versions.push_back(Protocol_Version(v));
  626|    762|      }
  627|       |
  628|     48|      if(extension_size != 1 + 2 * versions.size()) {
  ------------------
  |  Branch (628:10): [True: 12, False: 36]
  ------------------
  629|     12|         throw Decoding_Error("Client sent invalid supported_versions extension");
  630|     12|      }
  631|     48|   }
  632|     48|}
_ZN5Botan3TLS17Record_Size_LimitC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  649|     54|Record_Size_Limit::Record_Size_Limit(TLS_Data_Reader& reader, uint16_t extension_size, Connection_Side from) {
  650|     54|   if(extension_size != 2) {
  ------------------
  |  Branch (650:7): [True: 13, False: 41]
  ------------------
  651|     13|      throw TLS_Exception(Alert::DecodeError, "invalid record_size_limit extension");
  652|     13|   }
  653|       |
  654|     41|   m_limit = reader.get_uint16_t();
  655|       |
  656|       |   // RFC 8449 4.
  657|       |   //    This value is the length of the plaintext of a protected record.
  658|       |   //    The value includes the content type and padding added in TLS 1.3 (that
  659|       |   //    is, the complete length of TLSInnerPlaintext).
  660|       |   //
  661|       |   //    A server MUST NOT enforce this restriction; a client might advertise
  662|       |   //    a higher limit that is enabled by an extension or version the server
  663|       |   //    does not understand. A client MAY abort the handshake with an
  664|       |   //    "illegal_parameter" alert.
  665|       |   //
  666|       |   // Note: We are currently supporting this extension in TLS 1.3 only, hence
  667|       |   //       we check for the TLS 1.3 limit. The TLS 1.2 limit would not include
  668|       |   //       the "content type byte" and hence be one byte less!
  669|     41|   if(m_limit > MAX_PLAINTEXT_SIZE + 1 /* encrypted content type byte */ && from == Connection_Side::Server) {
  ------------------
  |  Branch (669:7): [True: 9, False: 32]
  |  Branch (669:77): [True: 0, False: 9]
  ------------------
  670|      0|      throw TLS_Exception(Alert::IllegalParameter,
  671|      0|                          "Server requested a record size limit larger than the protocol's maximum");
  672|      0|   }
  673|       |
  674|       |   // RFC 8449 4.
  675|       |   //    Endpoints MUST NOT send a "record_size_limit" extension with a value
  676|       |   //    smaller than 64.  An endpoint MUST treat receipt of a smaller value
  677|       |   //    as a fatal error and generate an "illegal_parameter" alert.
  678|     41|   if(m_limit < 64) {
  ------------------
  |  Branch (678:7): [True: 8, False: 33]
  ------------------
  679|      8|      throw TLS_Exception(Alert::IllegalParameter, "Received a record size limit smaller than 64 bytes");
  680|      8|   }
  681|     41|}
_ZN5Botan3TLS6CookieC2ERNS0_15TLS_Data_ReaderEt:
  695|     97|Cookie::Cookie(TLS_Data_Reader& reader, uint16_t extension_size) {
  696|     97|   if(extension_size == 0) {
  ------------------
  |  Branch (696:7): [True: 33, False: 64]
  ------------------
  697|     33|      return;
  698|     33|   }
  699|       |
  700|     64|   const uint16_t len = reader.get_uint16_t();
  701|       |
  702|     64|   if(len == 0) {
  ------------------
  |  Branch (702:7): [True: 1, False: 63]
  ------------------
  703|       |      // Based on RFC 8446 4.2.2, len of the Cookie buffer must be at least 1
  704|      1|      throw Decoding_Error("Cookie length must be at least 1 byte");
  705|      1|   }
  706|       |
  707|     63|   if(len > reader.remaining_bytes()) {
  ------------------
  |  Branch (707:7): [True: 17, False: 46]
  ------------------
  708|     17|      throw Decoding_Error("Not enough bytes in the buffer to decode Cookie");
  709|     17|   }
  710|       |
  711|  12.3k|   for(size_t i = 0; i < len; ++i) {
  ------------------
  |  Branch (711:22): [True: 12.2k, False: 46]
  ------------------
  712|  12.2k|      m_cookie.push_back(reader.get_byte());
  713|  12.2k|   }
  714|     46|}
_ZN5Botan3TLS22PSK_Key_Exchange_ModesC2ERNS0_15TLS_Data_ReaderEt:
  743|     78|PSK_Key_Exchange_Modes::PSK_Key_Exchange_Modes(TLS_Data_Reader& reader, uint16_t extension_size) {
  744|     78|   if(extension_size < 2) {
  ------------------
  |  Branch (744:7): [True: 2, False: 76]
  ------------------
  745|      2|      throw Decoding_Error("Empty psk_key_exchange_modes extension is illegal");
  746|      2|   }
  747|       |
  748|     76|   const auto mode_count = reader.get_byte();
  749|  1.84k|   for(uint16_t i = 0; i < mode_count; ++i) {
  ------------------
  |  Branch (749:24): [True: 1.76k, False: 76]
  ------------------
  750|  1.76k|      const auto mode = static_cast<PSK_Key_Exchange_Mode>(reader.get_byte());
  751|  1.76k|      if(mode == PSK_Key_Exchange_Mode::PSK_KE || mode == PSK_Key_Exchange_Mode::PSK_DHE_KE) {
  ------------------
  |  Branch (751:10): [True: 814, False: 955]
  |  Branch (751:51): [True: 343, False: 612]
  ------------------
  752|  1.11k|         m_modes.push_back(mode);
  753|  1.11k|      }
  754|  1.76k|   }
  755|     76|}
_ZN5Botan3TLS23Certificate_AuthoritiesC2ERNS0_15TLS_Data_ReaderEt:
  761|  1.19k|Certificate_Authorities::Certificate_Authorities(TLS_Data_Reader& reader, uint16_t extension_size) {
  762|  1.19k|   if(extension_size < 2) {
  ------------------
  |  Branch (762:7): [True: 2, False: 1.19k]
  ------------------
  763|      2|      throw Decoding_Error("Empty certificate_authorities extension is illegal");
  764|      2|   }
  765|       |
  766|  1.19k|   const uint16_t purported_size = reader.get_uint16_t();
  767|       |
  768|  1.19k|   if(reader.remaining_bytes() != purported_size) {
  ------------------
  |  Branch (768:7): [True: 32, False: 1.16k]
  ------------------
  769|     32|      throw Decoding_Error("Inconsistent length in certificate_authorities extension");
  770|     32|   }
  771|       |
  772|  4.90k|   while(reader.has_remaining()) {
  ------------------
  |  Branch (772:10): [True: 3.74k, False: 1.16k]
  ------------------
  773|  3.74k|      std::vector<uint8_t> name_bits = reader.get_tls_length_value(2);
  774|       |
  775|  3.74k|      BER_Decoder decoder(name_bits.data(), name_bits.size());
  776|  3.74k|      m_distinguished_names.emplace_back();
  777|  3.74k|      decoder.decode(m_distinguished_names.back());
  778|  3.74k|   }
  779|  1.16k|}
_ZN5Botan3TLS19EarlyDataIndicationC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeE:
  798|     43|                                         Handshake_Type message_type) {
  799|     43|   if(message_type == Handshake_Type::NewSessionTicket) {
  ------------------
  |  Branch (799:7): [True: 0, False: 43]
  ------------------
  800|      0|      if(extension_size != 4) {
  ------------------
  |  Branch (800:10): [True: 0, False: 0]
  ------------------
  801|      0|         throw TLS_Exception(Alert::DecodeError,
  802|      0|                             "Received an early_data extension in a NewSessionTicket message "
  803|      0|                             "without maximum early data size indication");
  804|      0|      }
  805|       |
  806|      0|      m_max_early_data_size = reader.get_uint32_t();
  807|     43|   } else if(extension_size != 0) {
  ------------------
  |  Branch (807:14): [True: 12, False: 31]
  ------------------
  808|     12|      throw TLS_Exception(Alert::DecodeError,
  809|     12|                          "Received an early_data extension containing an unexpected data "
  810|     12|                          "size indication");
  811|     12|   }
  812|     43|}
tls_extensions.cpp:_ZN5Botan3TLS12_GLOBAL__N_114make_extensionERNS0_15TLS_Data_ReaderENS0_14Extension_CodeENS0_15Connection_SideENS0_14Handshake_TypeE:
   28|  5.66k|                                          const Handshake_Type message_type) {
   29|       |   // This cast is safe because we read exactly a 16 bit length field for
   30|       |   // the extension in Extensions::deserialize
   31|  5.66k|   const uint16_t size = static_cast<uint16_t>(reader.remaining_bytes());
   32|  5.66k|   switch(code) {
  ------------------
  |  Branch (32:11): [True: 3.02k, False: 2.64k]
  ------------------
   33|    191|      case Extension_Code::ServerNameIndication:
  ------------------
  |  Branch (33:7): [True: 191, False: 5.47k]
  ------------------
   34|    191|         return std::make_unique<Server_Name_Indicator>(reader, size);
   35|       |
   36|    103|      case Extension_Code::SupportedGroups:
  ------------------
  |  Branch (36:7): [True: 103, False: 5.56k]
  ------------------
   37|    103|         return std::make_unique<Supported_Groups>(reader, size);
   38|       |
   39|     35|      case Extension_Code::CertificateStatusRequest:
  ------------------
  |  Branch (39:7): [True: 35, False: 5.63k]
  ------------------
   40|     35|         return std::make_unique<Certificate_Status_Request>(reader, size, message_type, from);
   41|       |
   42|     68|      case Extension_Code::EcPointFormats:
  ------------------
  |  Branch (42:7): [True: 68, False: 5.59k]
  ------------------
   43|     68|         return std::make_unique<Supported_Point_Formats>(reader, size);
   44|       |
   45|     22|      case Extension_Code::SafeRenegotiation:
  ------------------
  |  Branch (45:7): [True: 22, False: 5.64k]
  ------------------
   46|     22|         return std::make_unique<Renegotiation_Extension>(reader, size);
   47|       |
   48|     24|      case Extension_Code::SignatureAlgorithms:
  ------------------
  |  Branch (48:7): [True: 24, False: 5.64k]
  ------------------
   49|     24|         return std::make_unique<Signature_Algorithms>(reader, size);
   50|       |
   51|     43|      case Extension_Code::CertSignatureAlgorithms:
  ------------------
  |  Branch (51:7): [True: 43, False: 5.62k]
  ------------------
   52|     43|         return std::make_unique<Signature_Algorithms_Cert>(reader, size);
   53|       |
   54|     27|      case Extension_Code::UseSrtp:
  ------------------
  |  Branch (54:7): [True: 27, False: 5.63k]
  ------------------
   55|     27|         return std::make_unique<SRTP_Protection_Profiles>(reader, size);
   56|       |
   57|    172|      case Extension_Code::ApplicationLayerProtocolNegotiation:
  ------------------
  |  Branch (57:7): [True: 172, False: 5.49k]
  ------------------
   58|    172|         return std::make_unique<Application_Layer_Protocol_Notification>(reader, size, from);
   59|       |
   60|     36|      case Extension_Code::ExtendedMasterSecret:
  ------------------
  |  Branch (60:7): [True: 36, False: 5.63k]
  ------------------
   61|     36|         return std::make_unique<Extended_Master_Secret>(reader, size);
   62|       |
   63|     54|      case Extension_Code::RecordSizeLimit:
  ------------------
  |  Branch (63:7): [True: 54, False: 5.61k]
  ------------------
   64|     54|         return std::make_unique<Record_Size_Limit>(reader, size, from);
   65|       |
   66|     38|      case Extension_Code::EncryptThenMac:
  ------------------
  |  Branch (66:7): [True: 38, False: 5.62k]
  ------------------
   67|     38|         return std::make_unique<Encrypt_then_MAC>(reader, size);
   68|       |
   69|     39|      case Extension_Code::SessionTicket:
  ------------------
  |  Branch (69:7): [True: 39, False: 5.62k]
  ------------------
   70|     39|         return std::make_unique<Session_Ticket_Extension>(reader, size);
   71|       |
   72|     48|      case Extension_Code::SupportedVersions:
  ------------------
  |  Branch (72:7): [True: 48, False: 5.61k]
  ------------------
   73|     48|         return std::make_unique<Supported_Versions>(reader, size, from);
   74|       |
   75|      0|#if defined(BOTAN_HAS_TLS_13)
   76|    175|      case Extension_Code::PresharedKey:
  ------------------
  |  Branch (76:7): [True: 175, False: 5.49k]
  ------------------
   77|    175|         return std::make_unique<PSK>(reader, size, message_type);
   78|       |
   79|     43|      case Extension_Code::EarlyData:
  ------------------
  |  Branch (79:7): [True: 43, False: 5.62k]
  ------------------
   80|     43|         return std::make_unique<EarlyDataIndication>(reader, size, message_type);
   81|       |
   82|     97|      case Extension_Code::Cookie:
  ------------------
  |  Branch (82:7): [True: 97, False: 5.56k]
  ------------------
   83|     97|         return std::make_unique<Cookie>(reader, size);
   84|       |
   85|     78|      case Extension_Code::PskKeyExchangeModes:
  ------------------
  |  Branch (85:7): [True: 78, False: 5.58k]
  ------------------
   86|     78|         return std::make_unique<PSK_Key_Exchange_Modes>(reader, size);
   87|       |
   88|  1.19k|      case Extension_Code::CertificateAuthorities:
  ------------------
  |  Branch (88:7): [True: 1.19k, False: 4.46k]
  ------------------
   89|  1.19k|         return std::make_unique<Certificate_Authorities>(reader, size);
   90|       |
   91|    149|      case Extension_Code::KeyShare:
  ------------------
  |  Branch (91:7): [True: 149, False: 5.51k]
  ------------------
   92|    149|         return std::make_unique<Key_Share>(reader, size, message_type);
   93|  5.66k|#endif
   94|  5.66k|   }
   95|       |
   96|  3.02k|   return std::make_unique<Unknown_Extension>(static_cast<Extension_Code>(code), reader, size);
   97|  5.66k|}
tls_extensions.cpp:_ZZN5Botan3TLS23Supported_Point_FormatsC1ERNS0_15TLS_Data_ReaderEtENK3$_3clEh:
  447|    308|            std::any_of(std::begin(remaining_formats), std::end(remaining_formats), [](uint8_t remaining_format) {
  448|    308|               return static_cast<ECPointFormat>(remaining_format) == UNCOMPRESSED;
  449|    308|            });
tls_extensions.cpp:_ZN5Botan3TLS12_GLOBAL__N_126parse_signature_algorithmsERNS0_15TLS_Data_ReaderEt:
  488|     67|std::vector<Signature_Scheme> parse_signature_algorithms(TLS_Data_Reader& reader, uint16_t extension_size) {
  489|     67|   uint16_t len = reader.get_uint16_t();
  490|       |
  491|     67|   if(len + 2 != extension_size || len % 2 == 1 || len == 0) {
  ------------------
  |  Branch (491:7): [True: 29, False: 38]
  |  Branch (491:36): [True: 1, False: 37]
  |  Branch (491:52): [True: 1, False: 36]
  ------------------
  492|     27|      throw Decoding_Error("Bad encoding on signature algorithms extension");
  493|     27|   }
  494|       |
  495|     40|   std::vector<Signature_Scheme> schemes;
  496|     40|   schemes.reserve(len / 2);
  497|  1.93k|   while(len) {
  ------------------
  |  Branch (497:10): [True: 1.89k, False: 40]
  ------------------
  498|  1.89k|      schemes.emplace_back(reader.get_uint16_t());
  499|  1.89k|      len -= 2;
  500|  1.89k|   }
  501|       |
  502|     40|   return schemes;
  503|     67|}

_ZN5Botan3TLS26Certificate_Status_RequestC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeENS0_15Connection_SideE:
   89|     35|                                                       Connection_Side from) {
   90|       |   // This parser needs to take TLS 1.2 and TLS 1.3 into account. The
   91|       |   // extension's content and structure is dependent on the context it
   92|       |   // was sent in (i.e. the enclosing handshake message). Below is a list
   93|       |   // of handshake messages this can appear in.
   94|       |   //
   95|       |   // TLS 1.2
   96|       |   //  * Client Hello
   97|       |   //  * Server Hello
   98|       |   //
   99|       |   // TLS 1.3
  100|       |   //  * Client Hello
  101|       |   //  * Certificate Request
  102|       |   //  * Certificate (Entry)
  103|       |
  104|       |   // RFC 6066 8.
  105|       |   //    In order to indicate their desire to receive certificate status
  106|       |   //    information, clients MAY include an extension of type "status_request"
  107|       |   //    in the (extended) client hello.
  108|     35|   if(message_type == Handshake_Type::ClientHello) {
  ------------------
  |  Branch (108:7): [True: 35, False: 0]
  ------------------
  109|     35|      m_impl = std::make_unique<Certificate_Status_Request_Internal>(
  110|     35|         RFC6066_Certificate_Status_Request(reader, extension_size));
  111|     35|   }
  112|       |
  113|       |   // RFC 6066 8.
  114|       |   //    If a server returns a "CertificateStatus" message, then the server MUST
  115|       |   //    have included an extension of type "status_request" with empty
  116|       |   //    "extension_data" in the extended server hello.
  117|       |   //
  118|       |   // RFC 8446 4.4.2.1
  119|       |   //    A server MAY request that a client present an OCSP response with its
  120|       |   //    certificate by sending an empty "status_request" extension in its
  121|       |   //    CertificateRequest message.
  122|      0|   else if(message_type == Handshake_Type::ServerHello || message_type == Handshake_Type::CertificateRequest) {
  ------------------
  |  Branch (122:12): [True: 0, False: 0]
  |  Branch (122:59): [True: 0, False: 0]
  ------------------
  123|      0|      m_impl = std::make_unique<Certificate_Status_Request_Internal>(
  124|      0|         RFC6066_Empty_Certificate_Status_Request(extension_size));
  125|      0|   }
  126|       |
  127|       |   // RFC 8446 4.4.2.1
  128|       |   //    In TLS 1.3, the server's OCSP information is carried in an extension
  129|       |   //    in the CertificateEntry [in a Certificate handshake message] [...].
  130|       |   //    Specifically, the body of the "status_request" extension from the
  131|       |   //    server MUST be a CertificateStatus structure as defined in [RFC6066]
  132|       |   //    [...].
  133|       |   //
  134|       |   // RFC 8446 4.4.2.1
  135|       |   //    If the client opts to send an OCSP response, the body of its
  136|       |   //    "status_request" extension MUST be a CertificateStatus structure as
  137|       |   //    defined in [RFC6066].
  138|      0|   else if(message_type == Handshake_Type::Certificate) {
  ------------------
  |  Branch (138:12): [True: 0, False: 0]
  ------------------
  139|      0|      m_impl = std::make_unique<Certificate_Status_Request_Internal>(
  140|      0|         Certificate_Status(reader.get_fixed<uint8_t>(extension_size), from));
  141|      0|   }
  142|       |
  143|       |   // all other contexts are not allowed for this extension
  144|      0|   else {
  145|      0|      throw TLS_Exception(Alert::UnsupportedExtension,
  146|      0|                          "Server sent a Certificate_Status_Request extension in an unsupported context");
  147|      0|   }
  148|     35|}
_ZN5Botan3TLS26Certificate_Status_RequestD2Ev:
  161|     28|Certificate_Status_Request::~Certificate_Status_Request() = default;
tls_extensions_cert_status_req.cpp:_ZN5Botan3TLS12_GLOBAL__N_134RFC6066_Certificate_Status_RequestC2ERNS0_15TLS_Data_ReaderEt:
   38|     35|      RFC6066_Certificate_Status_Request(TLS_Data_Reader& reader, uint16_t extension_size) {
   39|     35|         if(extension_size == 0) {
  ------------------
  |  Branch (39:13): [True: 1, False: 34]
  ------------------
   40|      1|            throw Decoding_Error("Received an unexpectedly empty Certificate_Status_Request");
   41|      1|         }
   42|       |
   43|     34|         const uint8_t type = reader.get_byte();
   44|     34|         if(type == 1 /* ocsp */) {
  ------------------
  |  Branch (44:13): [True: 11, False: 23]
  ------------------
   45|     11|            const size_t len_resp_id_list = reader.get_uint16_t();
   46|     11|            ocsp_names = reader.get_fixed<uint8_t>(len_resp_id_list);
   47|     11|            const size_t len_requ_ext = reader.get_uint16_t();
   48|     11|            extension_bytes = reader.get_fixed<uint8_t>(len_requ_ext);
   49|     23|         } else {
   50|       |            // RFC 6066 does not specify anything but 'ocsp' and we
   51|       |            // don't support anything else either.
   52|     23|            reader.discard_next(extension_size - 1);
   53|     23|         }
   54|     34|      }
tls_extensions_cert_status_req.cpp:_ZN5Botan3TLS35Certificate_Status_Request_InternalC2ENSt3__17variantIJNS0_12_GLOBAL__N_140RFC6066_Empty_Certificate_Status_RequestENS4_34RFC6066_Certificate_Status_RequestENS0_18Certificate_StatusEEEE:
   81|     28|      Certificate_Status_Request_Internal(Contents c) : content(std::move(c)) {}

_ZN5Botan3TLS16Signature_SchemeC2Et:
   53|  1.89k|Signature_Scheme::Signature_Scheme(uint16_t wire_code) : Signature_Scheme(Signature_Scheme::Code(wire_code)) {}
_ZN5Botan3TLS16Signature_SchemeC2ENS1_4CodeE:
   55|  1.89k|Signature_Scheme::Signature_Scheme(Signature_Scheme::Code wire_code) : m_code(wire_code) {}

_ZNK5Botan3TLS16Protocol_Version20is_datagram_protocolEv:
   36|  2.75k|bool Protocol_Version::is_datagram_protocol() const { return major_version() > 250; }

_ZN5Botan19throw_invalid_stateEPKcS1_S1_:
   25|     13|void throw_invalid_state(const char* expr, const char* func, const char* file) {
   26|     13|   throw Invalid_State(fmt("Invalid state: expr {} was false in {}:{}", expr, func, file));
   27|     13|}

_ZN5Botan12ucs2_to_utf8EPKhm:
   54|    510|std::string ucs2_to_utf8(const uint8_t ucs2[], size_t len) {
   55|    510|   if(len % 2 != 0) {
  ------------------
  |  Branch (55:7): [True: 3, False: 507]
  ------------------
   56|      3|      throw Decoding_Error("Invalid length for UCS-2 string");
   57|      3|   }
   58|       |
   59|    507|   const size_t chars = len / 2;
   60|       |
   61|    507|   std::string s;
   62|  4.32k|   for(size_t i = 0; i != chars; ++i) {
  ------------------
  |  Branch (62:22): [True: 3.81k, False: 507]
  ------------------
   63|  3.81k|      const uint32_t c = load_be<uint16_t>(ucs2, i);
   64|  3.81k|      append_utf8_for(s, c);
   65|  3.81k|   }
   66|       |
   67|    507|   return s;
   68|    510|}
_ZN5Botan12ucs4_to_utf8EPKhm:
   70|    729|std::string ucs4_to_utf8(const uint8_t ucs4[], size_t len) {
   71|    729|   if(len % 4 != 0) {
  ------------------
  |  Branch (71:7): [True: 2, False: 727]
  ------------------
   72|      2|      throw Decoding_Error("Invalid length for UCS-4 string");
   73|      2|   }
   74|       |
   75|    727|   const size_t chars = len / 4;
   76|       |
   77|    727|   std::string s;
   78|  1.43k|   for(size_t i = 0; i != chars; ++i) {
  ------------------
  |  Branch (78:22): [True: 706, False: 727]
  ------------------
   79|    706|      const uint32_t c = load_be<uint32_t>(ucs4, i);
   80|    706|      append_utf8_for(s, c);
   81|    706|   }
   82|       |
   83|    727|   return s;
   84|    729|}
_ZN5Botan14latin1_to_utf8EPKhm:
   89|  1.37k|std::string latin1_to_utf8(const uint8_t chars[], size_t len) {
   90|  1.37k|   std::string s;
   91|  21.3k|   for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (91:22): [True: 19.9k, False: 1.37k]
  ------------------
   92|  19.9k|      const uint32_t c = static_cast<uint8_t>(chars[i]);
   93|  19.9k|      append_utf8_for(s, c);
   94|  19.9k|   }
   95|  1.37k|   return s;
   96|  1.37k|}
charset.cpp:_ZN5Botan12_GLOBAL__N_115append_utf8_forERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEj:
   18|  24.4k|void append_utf8_for(std::string& s, uint32_t c) {
   19|  24.4k|   if(c >= 0xD800 && c < 0xE000) {
  ------------------
  |  Branch (19:7): [True: 1.04k, False: 23.4k]
  |  Branch (19:22): [True: 13, False: 1.03k]
  ------------------
   20|     13|      throw Decoding_Error("Invalid Unicode character");
   21|     13|   }
   22|       |
   23|  24.4k|   if(c <= 0x7F) {
  ------------------
  |  Branch (23:7): [True: 17.1k, False: 7.37k]
  ------------------
   24|  17.1k|      const uint8_t b0 = static_cast<uint8_t>(c);
   25|  17.1k|      s.push_back(static_cast<char>(b0));
   26|  17.1k|   } else if(c <= 0x7FF) {
  ------------------
  |  Branch (26:14): [True: 4.69k, False: 2.68k]
  ------------------
   27|  4.69k|      const uint8_t b0 = 0xC0 | static_cast<uint8_t>(c >> 6);
   28|  4.69k|      const uint8_t b1 = 0x80 | static_cast<uint8_t>(c & 0x3F);
   29|  4.69k|      s.push_back(static_cast<char>(b0));
   30|  4.69k|      s.push_back(static_cast<char>(b1));
   31|  4.69k|   } else if(c <= 0xFFFF) {
  ------------------
  |  Branch (31:14): [True: 2.11k, False: 569]
  ------------------
   32|  2.11k|      const uint8_t b0 = 0xE0 | static_cast<uint8_t>(c >> 12);
   33|  2.11k|      const uint8_t b1 = 0x80 | static_cast<uint8_t>((c >> 6) & 0x3F);
   34|  2.11k|      const uint8_t b2 = 0x80 | static_cast<uint8_t>(c & 0x3F);
   35|  2.11k|      s.push_back(static_cast<char>(b0));
   36|  2.11k|      s.push_back(static_cast<char>(b1));
   37|  2.11k|      s.push_back(static_cast<char>(b2));
   38|  2.11k|   } else if(c <= 0x10FFFF) {
  ------------------
  |  Branch (38:14): [True: 490, False: 79]
  ------------------
   39|    490|      const uint8_t b0 = 0xF0 | static_cast<uint8_t>(c >> 18);
   40|    490|      const uint8_t b1 = 0x80 | static_cast<uint8_t>((c >> 12) & 0x3F);
   41|    490|      const uint8_t b2 = 0x80 | static_cast<uint8_t>((c >> 6) & 0x3F);
   42|    490|      const uint8_t b3 = 0x80 | static_cast<uint8_t>(c & 0x3F);
   43|    490|      s.push_back(static_cast<char>(b0));
   44|    490|      s.push_back(static_cast<char>(b1));
   45|    490|      s.push_back(static_cast<char>(b2));
   46|    490|      s.push_back(static_cast<char>(b3));
   47|    490|   } else {
   48|     79|      throw Decoding_Error("Invalid Unicode character");
   49|     79|   }
   50|  24.4k|}

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

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

_ZN5Botan10DataSource9read_byteERh:
   25|   322k|size_t DataSource::read_byte(uint8_t& out) { return read(&out, 1); }
_ZN5Botan10DataSource12discard_nextEm:
   35|  48.0k|size_t DataSource::discard_next(size_t n) {
   36|  48.0k|   uint8_t buf[64] = {0};
   37|  48.0k|   size_t discarded = 0;
   38|       |
   39|   108k|   while(n) {
  ------------------
  |  Branch (39:10): [True: 60.6k, False: 47.9k]
  ------------------
   40|  60.6k|      const size_t got = this->read(buf, std::min(n, sizeof(buf)));
   41|  60.6k|      discarded += got;
   42|  60.6k|      n -= got;
   43|       |
   44|  60.6k|      if(got == 0) {
  ------------------
  |  Branch (44:10): [True: 126, False: 60.4k]
  ------------------
   45|    126|         break;
   46|    126|      }
   47|  60.6k|   }
   48|       |
   49|  48.0k|   return discarded;
   50|  48.0k|}
_ZN5Botan17DataSource_Memory4readEPhm:
   55|   195k|size_t DataSource_Memory::read(uint8_t out[], size_t length) {
   56|   195k|   const size_t got = std::min<size_t>(m_source.size() - m_offset, length);
   57|   195k|   copy_mem(out, m_source.data() + m_offset, got);
   58|   195k|   m_offset += got;
   59|   195k|   return got;
   60|   195k|}
_ZN5Botan17DataSource_Memory15check_availableEm:
   62|  7.58k|bool DataSource_Memory::check_available(size_t n) { return (n <= (m_source.size() - m_offset)); }
_ZNK5Botan17DataSource_Memory4peekEPhmm:
   67|  21.1k|size_t DataSource_Memory::peek(uint8_t out[], size_t length, size_t peek_offset) const {
   68|  21.1k|   const size_t bytes_left = m_source.size() - m_offset;
   69|  21.1k|   if(peek_offset >= bytes_left) {
  ------------------
  |  Branch (69:7): [True: 11.8k, False: 9.32k]
  ------------------
   70|  11.8k|      return 0;
   71|  11.8k|   }
   72|       |
   73|  9.32k|   const size_t got = std::min(bytes_left - peek_offset, length);
   74|  9.32k|   copy_mem(out, &m_source[m_offset + peek_offset], got);
   75|  9.32k|   return got;
   76|  21.1k|}
_ZNK5Botan17DataSource_Memory11end_of_dataEv:
   81|  4.27k|bool DataSource_Memory::end_of_data() const { return (m_offset == m_source.size()); }

_ZN5Botan9ExceptionC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   71|  2.21k|Exception::Exception(std::string_view msg) : m_msg(msg) {}
_ZN5Botan14Decoding_ErrorC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  125|  2.01k|Decoding_Error::Decoding_Error(std::string_view name) : Exception(name) {}

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

_ZN5Botan19secure_scrub_memoryEPvm:
   78|  56.1k|void secure_scrub_memory(void* ptr, size_t n) {
   79|       |#if defined(BOTAN_TARGET_OS_HAS_RTLSECUREZEROMEMORY)
   80|       |   ::RtlSecureZeroMemory(ptr, n);
   81|       |
   82|       |#elif defined(BOTAN_TARGET_OS_HAS_EXPLICIT_BZERO)
   83|  56.1k|   ::explicit_bzero(ptr, n);
   84|       |
   85|       |#elif defined(BOTAN_TARGET_OS_HAS_EXPLICIT_MEMSET)
   86|       |   (void)::explicit_memset(ptr, 0, n);
   87|       |
   88|       |#elif defined(BOTAN_USE_VOLATILE_MEMSET_FOR_ZERO) && (BOTAN_USE_VOLATILE_MEMSET_FOR_ZERO == 1)
   89|       |   /*
   90|       |   Call memset through a static volatile pointer, which the compiler
   91|       |   should not elide. This construct should be safe in conforming
   92|       |   compilers, but who knows. I did confirm that on x86-64 GCC 6.1 and
   93|       |   Clang 3.8 both create code that saves the memset address in the
   94|       |   data segment and unconditionally loads and jumps to that address.
   95|       |   */
   96|       |   static void* (*const volatile memset_ptr)(void*, int, size_t) = std::memset;
   97|       |   (memset_ptr)(ptr, 0, n);
   98|       |#else
   99|       |
  100|       |   volatile uint8_t* p = reinterpret_cast<volatile uint8_t*>(ptr);
  101|       |
  102|       |   for(size_t i = 0; i != n; ++i)
  103|       |      p[i] = 0;
  104|       |#endif
  105|  56.1k|}
_ZN5Botan2OS10get_auxvalEm:
  119|      1|unsigned long OS::get_auxval(unsigned long id) {
  120|      1|#if defined(BOTAN_TARGET_OS_HAS_GETAUXVAL)
  121|      1|   return ::getauxval(id);
  122|       |#elif defined(BOTAN_TARGET_OS_IS_ANDROID) && defined(BOTAN_TARGET_ARCH_IS_ARM32)
  123|       |
  124|       |   if(id == 0)
  125|       |      return 0;
  126|       |
  127|       |   char** p = environ;
  128|       |
  129|       |   while(*p++ != nullptr)
  130|       |      ;
  131|       |
  132|       |   Elf32_auxv_t* e = reinterpret_cast<Elf32_auxv_t*>(p);
  133|       |
  134|       |   while(e != nullptr) {
  135|       |      if(e->a_type == id)
  136|       |         return e->a_un.a_val;
  137|       |      e++;
  138|       |   }
  139|       |
  140|       |   return 0;
  141|       |#elif defined(BOTAN_TARGET_OS_HAS_ELF_AUX_INFO)
  142|       |   unsigned long auxinfo = 0;
  143|       |   ::elf_aux_info(static_cast<int>(id), &auxinfo, sizeof(auxinfo));
  144|       |   return auxinfo;
  145|       |#elif defined(BOTAN_TARGET_OS_HAS_AUXINFO)
  146|       |   for(const AuxInfo* auxinfo = static_cast<AuxInfo*>(::_dlauxinfo()); auxinfo != AT_NULL; ++auxinfo) {
  147|       |      if(id == auxinfo->a_type)
  148|       |         return auxinfo->a_v;
  149|       |   }
  150|       |
  151|       |   return 0;
  152|       |#else
  153|       |   BOTAN_UNUSED(id);
  154|       |   return 0;
  155|       |#endif
  156|      1|}
_ZN5Botan2OS27running_in_privileged_stateEv:
  158|      1|bool OS::running_in_privileged_state() {
  159|      1|#if defined(AT_SECURE)
  160|      1|   return OS::get_auxval(AT_SECURE) != 0;
  161|       |#elif defined(BOTAN_TARGET_OS_HAS_POSIX1)
  162|       |   return (::getuid() != ::geteuid()) || (::getgid() != ::getegid());
  163|       |#else
  164|       |   return false;
  165|       |#endif
  166|      1|}
_ZN5Botan2OS17read_env_variableERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EE:
  400|      1|bool OS::read_env_variable(std::string& value_out, std::string_view name_view) {
  401|      1|   value_out = "";
  402|       |
  403|      1|   if(running_in_privileged_state()) {
  ------------------
  |  Branch (403:7): [True: 0, False: 1]
  ------------------
  404|      0|      return false;
  405|      0|   }
  406|       |
  407|       |#if defined(BOTAN_TARGET_OS_HAS_WIN32) && defined(BOTAN_BUILD_COMPILER_IS_MSVC)
  408|       |   const std::string name(name_view);
  409|       |   char val[128] = {0};
  410|       |   size_t req_size = 0;
  411|       |   if(getenv_s(&req_size, val, sizeof(val), name.c_str()) == 0) {
  412|       |      value_out = std::string(val, req_size);
  413|       |      return true;
  414|       |   }
  415|       |#else
  416|      1|   const std::string name(name_view);
  417|      1|   if(const char* val = std::getenv(name.c_str())) {
  ------------------
  |  Branch (417:19): [True: 0, False: 1]
  ------------------
  418|      0|      value_out = val;
  419|      0|      return true;
  420|      0|   }
  421|      1|#endif
  422|       |
  423|      1|   return false;
  424|      1|}

_ZN5Botan7X509_DN13add_attributeERKNS_3OIDERKNS_11ASN1_StringE:
   96|  4.94k|void X509_DN::add_attribute(const OID& oid, const ASN1_String& str) {
   97|  4.94k|   if(str.empty()) {
  ------------------
  |  Branch (97:7): [True: 2.31k, False: 2.62k]
  ------------------
   98|  2.31k|      return;
   99|  2.31k|   }
  100|       |
  101|  2.62k|   m_rdn.push_back(std::make_pair(oid, str));
  102|  2.62k|   m_dn_bits.clear();
  103|  2.62k|}
_ZN5Botan7X509_DN11decode_fromERNS_11BER_DecoderE:
  341|  3.68k|void X509_DN::decode_from(BER_Decoder& source) {
  342|  3.68k|   std::vector<uint8_t> bits;
  343|       |
  344|  3.68k|   source.start_sequence().raw_bytes(bits).end_cons();
  345|       |
  346|  3.68k|   BER_Decoder sequence(bits);
  347|       |
  348|  3.68k|   m_rdn.clear();
  349|       |
  350|  5.29k|   while(sequence.more_items()) {
  ------------------
  |  Branch (350:10): [True: 1.61k, False: 3.68k]
  ------------------
  351|  1.61k|      BER_Decoder rdn = sequence.start_set();
  352|       |
  353|  7.15k|      while(rdn.more_items()) {
  ------------------
  |  Branch (353:13): [True: 5.53k, False: 1.61k]
  ------------------
  354|  5.53k|         OID oid;
  355|  5.53k|         ASN1_String str;
  356|       |
  357|  5.53k|         rdn.start_sequence()
  358|  5.53k|            .decode(oid)
  359|  5.53k|            .decode(str)  // TODO support Any
  360|  5.53k|            .end_cons();
  361|       |
  362|  5.53k|         add_attribute(oid, str);
  363|  5.53k|      }
  364|  1.61k|   }
  365|       |
  366|       |   // Have to assign last as add_attribute zaps m_dn_bits
  367|  3.68k|   m_dn_bits = bits;
  368|  3.68k|}

