LLVMFuzzerTestOneInput:
    6|  6.52k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
    7|  6.52k|    auto fdp = FuzzedDataProvider(data, size);
    8|       |
    9|  6.52k|    try {
   10|  6.52k|        auto nodes = YAML::LoadAll(fdp.ConsumeRemainingBytesAsString());
   11|  6.52k|    } catch (...) {
   12|  3.66k|    }
   13|       |
   14|  6.52k|    return 0;
   15|  6.52k|}

_ZN4YAML10DepthGuardILi500EEC2ERiRKNS_4MarkERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE:
   60|  2.08M|  DepthGuard(int & depth_, const Mark& mark_, const std::string& msg_) : m_depth(depth_) {
   61|  2.08M|    ++m_depth;
   62|  2.08M|    if ( max_depth <= m_depth ) {
  ------------------
  |  Branch (62:10): [True: 129, False: 2.08M]
  ------------------
   63|    129|        throw DeepRecursion{m_depth, mark_, msg_};
   64|    129|    }
   65|  2.08M|  }
_ZN4YAML10DepthGuardILi500EED2Ev:
   72|  2.08M|  ~DepthGuard() {
   73|  2.08M|    --m_depth;
   74|  2.08M|  }

_ZN4YAML12EventHandler8OnAnchorERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
   48|   244k|                        const std::string& /*anchor_name*/) {
   49|       |    // empty default implementation for compatibility
   50|   244k|  }
_ZN4YAML12EventHandlerD2Ev:
   29|   558k|  virtual ~EventHandler() = default;

_ZN4YAML9ExceptionC2ERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  171|  3.66k|      : std::runtime_error(build_what(mark_, msg_)), mark(mark_), msg(msg_) {}
_ZN4YAML9Exception10build_whatERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  181|  3.66k|                                      const std::string& msg) {
  182|  3.66k|    if (mark.is_null()) {
  ------------------
  |  Branch (182:9): [True: 0, False: 3.66k]
  ------------------
  183|      0|      return msg;
  184|      0|    }
  185|       |
  186|  3.66k|    std::stringstream output;
  187|  3.66k|    output << "yaml-cpp: error at line " << mark.line + 1 << ", column "
  188|  3.66k|           << mark.column + 1 << ": " << msg;
  189|  3.66k|    return output.str();
  190|  3.66k|  }
_ZN4YAML15ParserExceptionC2ERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  196|  3.62k|      : Exception(mark_, msg_) {}
_ZN4YAML23RepresentationExceptionC2ERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  204|     41|      : Exception(mark_, msg_) {}
_ZN4YAML15NonUniqueMapKeyC2INS_6detail4nodeEEERKNS_4MarkERKT_:
  321|     41|      : RepresentationException(mark_, ErrorMsg::NON_UNIQUE_MAP_KEY) {}

_ZN4YAML4MarkC2Ev:
   23|   778k|  Mark() : pos(0), line(0), column(0) {}
_ZN4YAML4Mark9null_markEv:
   25|  2.49M|  static const Mark null_mark() { return Mark(-1, -1, -1); }
_ZNK4YAML4Mark7is_nullEv:
   27|  3.66k|  bool is_null() const { return pos == -1 && line == -1 && column == -1; }
  ------------------
  |  Branch (27:33): [True: 0, False: 3.66k]
  |  Branch (27:46): [True: 0, False: 0]
  |  Branch (27:60): [True: 0, False: 0]
  ------------------
_ZN4YAML4MarkC2Eiii:
   34|  2.49M|      : pos(pos_), line(line_), column(column_) {}

_ZN4YAML6detail6memoryC2Ev:
   34|   558k|  memory() : m_nodes{} {}
_ZN4YAML6detail13memory_holderC2Ev:
   46|   558k|  memory_holder() : m_pMemory(std::make_shared<memory>()) {}
_ZN4YAML6detail13memory_holder11create_nodeEv:
   48|  2.49M|  node& create_node() { return m_pMemory->create_node(); }

_ZN4YAML6detail4nodeC2Ev:
   36|  2.49M|  node() : m_pRef(std::make_shared<node_ref>()), m_dependencies{}, m_index{} {}
_ZNK4YAML6detail4node10is_definedEv:
   43|  7.39M|  bool is_defined() const { return m_pRef->is_defined(); }
_ZNK4YAML6detail4node4typeEv:
   45|  4.28M|  NodeType::value type() const { return m_pRef->type(); }
_ZNK4YAML6detail4node6scalarEv:
   47|  1.33M|  const std::string& scalar() const { return m_pRef->scalar(); }
_ZN4YAML6detail4node12mark_definedEv:
   55|  5.05M|  void mark_defined() {
   56|  5.05M|    if (is_defined())
  ------------------
  |  Branch (56:9): [True: 2.55M, False: 2.49M]
  ------------------
   57|  2.55M|      return;
   58|       |
   59|  2.49M|    m_pRef->mark_defined();
   60|  2.49M|    for (node* dependency : m_dependencies)
  ------------------
  |  Branch (60:27): [True: 0, False: 2.49M]
  ------------------
   61|      0|      dependency->mark_defined();
   62|  2.49M|    m_dependencies.clear();
   63|  2.49M|  }
_ZN4YAML6detail4node14add_dependencyERS1_:
   65|  1.82M|  void add_dependency(node& rhs) {
   66|  1.82M|    if (is_defined())
  ------------------
  |  Branch (66:9): [True: 1.82M, False: 0]
  ------------------
   67|  1.82M|      rhs.mark_defined();
   68|      0|    else
   69|      0|      m_dependencies.insert(&rhs);
   70|  1.82M|  }
_ZN4YAML6detail4node8set_markERKNS_4MarkE:
   83|  2.49M|  void set_mark(const Mark& mark) { m_pRef->set_mark(mark); }
_ZN4YAML6detail4node8set_typeENS_8NodeType5valueE:
   85|   153k|  void set_type(NodeType::value type) {
   86|   153k|    if (type != NodeType::Undefined)
  ------------------
  |  Branch (86:9): [True: 153k, False: 0]
  ------------------
   87|   153k|      mark_defined();
   88|   153k|    m_pRef->set_type(type);
   89|   153k|  }
_ZN4YAML6detail4node8set_nullEv:
   90|  1.92M|  void set_null() {
   91|  1.92M|    mark_defined();
   92|  1.92M|    m_pRef->set_null();
   93|  1.92M|  }
_ZN4YAML6detail4node10set_scalarERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   94|   421k|  void set_scalar(const std::string& scalar) {
   95|   421k|    mark_defined();
   96|   421k|    m_pRef->set_scalar(scalar);
   97|   421k|  }
_ZN4YAML6detail4node7set_tagERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   98|   575k|  void set_tag(const std::string& tag) {
   99|   575k|    mark_defined();
  100|   575k|    m_pRef->set_tag(tag);
  101|   575k|  }
_ZN4YAML6detail4node9set_styleENS_12EmitterStyle5valueE:
  104|   153k|  void set_style(EmitterStyle::value style) {
  105|   153k|    mark_defined();
  106|   153k|    m_pRef->set_style(style);
  107|   153k|  }
_ZN4YAML6detail4node9push_backERS1_NSt3__110shared_ptrINS0_13memory_holderEEE:
  123|  1.31M|  void push_back(node& input, shared_memory_holder pMemory) {
  124|  1.31M|    m_pRef->push_back(input, pMemory);
  125|  1.31M|    input.add_dependency(*this);
  126|  1.31M|    m_index = m_amount.fetch_add(1);
  127|  1.31M|  }
_ZN4YAML6detail4node6insertERS1_S2_NSt3__110shared_ptrINS0_13memory_holderEEE:
  128|   256k|  void insert(node& key, node& value, shared_memory_holder pMemory) {
  129|   256k|    m_pRef->insert(key, value, pMemory);
  130|   256k|    key.add_dependency(*this);
  131|   256k|    value.add_dependency(*this);
  132|   256k|  }

_ZNK4YAML6detail9node_data10is_definedEv:
   53|  7.39M|  bool is_defined() const { return m_isDefined; }
_ZNK4YAML6detail9node_data4typeEv:
   55|  4.28M|  NodeType::value type() const {
   56|  4.28M|    return m_isDefined ? m_type : NodeType::Undefined;
  ------------------
  |  Branch (56:12): [True: 4.28M, False: 0]
  ------------------
   57|  4.28M|  }
_ZNK4YAML6detail9node_data6scalarEv:
   58|  1.33M|  const std::string& scalar() const { return m_scalar; }

_ZN4YAML6detail8node_refC2Ev:
   28|  2.49M|  node_ref() : m_pData(std::make_shared<node_data>()) {}
_ZNK4YAML6detail8node_ref10is_definedEv:
   32|  7.39M|  bool is_defined() const { return m_pData->is_defined(); }
_ZNK4YAML6detail8node_ref4typeEv:
   34|  4.28M|  NodeType::value type() const { return m_pData->type(); }
_ZNK4YAML6detail8node_ref6scalarEv:
   35|  1.33M|  const std::string& scalar() const { return m_pData->scalar(); }
_ZN4YAML6detail8node_ref12mark_definedEv:
   39|  2.49M|  void mark_defined() { m_pData->mark_defined(); }
_ZN4YAML6detail8node_ref8set_markERKNS_4MarkE:
   42|  2.49M|  void set_mark(const Mark& mark) { m_pData->set_mark(mark); }
_ZN4YAML6detail8node_ref8set_typeENS_8NodeType5valueE:
   43|   153k|  void set_type(NodeType::value type) { m_pData->set_type(type); }
_ZN4YAML6detail8node_ref7set_tagERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   44|   575k|  void set_tag(const std::string& tag) { m_pData->set_tag(tag); }
_ZN4YAML6detail8node_ref8set_nullEv:
   45|  1.92M|  void set_null() { m_pData->set_null(); }
_ZN4YAML6detail8node_ref10set_scalarERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   46|   421k|  void set_scalar(const std::string& scalar) { m_pData->set_scalar(scalar); }
_ZN4YAML6detail8node_ref9set_styleENS_12EmitterStyle5valueE:
   47|   153k|  void set_style(EmitterStyle::value style) { m_pData->set_style(style); }
_ZN4YAML6detail8node_ref9push_backERNS0_4nodeENSt3__110shared_ptrINS0_13memory_holderEEE:
   63|  1.31M|  void push_back(node& node, shared_memory_holder pMemory) {
   64|  1.31M|    m_pData->push_back(node, pMemory);
   65|  1.31M|  }
_ZN4YAML6detail8node_ref6insertERNS0_4nodeES3_NSt3__110shared_ptrINS0_13memory_holderEEE:
   66|   256k|  void insert(node& key, node& value, shared_memory_holder pMemory) {
   67|   256k|    m_pData->insert(key, value, pMemory);
   68|   256k|  }

_ZN4YAML4NodeD2Ev:
   65|  2.11M|inline Node::~Node() = default;
_ZN4YAML4NodeC2ERKS0_:
   54|  1.55M|inline Node::Node(const Node&) = default;
_ZN4YAML4NodeC2ERNS_6detail4nodeENSt3__110shared_ptrINS1_13memory_holderEEE:
   63|   552k|    : m_isValid(true), m_invalidKey{}, m_pMemory(pMemory), m_pNode(&node) {}

_ZN4YAML9ExceptionD2Ev:
   24|  3.66k|    #define YAML_CPP_NOEXCEPT noexcept

_ZN4YAML15CollectionStackC2Ev:
   20|   554k|  CollectionStack() : collectionStack{} {}
_ZNK4YAML15CollectionStack20GetCurCollectionTypeEv:
   21|  37.4k|  CollectionType::value GetCurCollectionType() const {
   22|  37.4k|    if (collectionStack.empty())
  ------------------
  |  Branch (22:9): [True: 0, False: 37.4k]
  ------------------
   23|      0|      return CollectionType::NoCollection;
   24|  37.4k|    return collectionStack.top();
   25|  37.4k|  }
_ZN4YAML15CollectionStack18PushCollectionTypeENS_14CollectionType5valueE:
   27|   153k|  void PushCollectionType(CollectionType::value type) {
   28|   153k|    collectionStack.push(type);
   29|   153k|  }
_ZN4YAML15CollectionStack17PopCollectionTypeENS_14CollectionType5valueE:
   30|  37.6k|  void PopCollectionType(CollectionType::value type) {
   31|       |    assert(type == GetCurCollectionType());
   32|  37.6k|    (void)type;
   33|  37.6k|    collectionStack.pop();
   34|  37.6k|  }

_ZN4YAML13DeepRecursionC2EiRKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
    7|    129|    : ParserException(mark_, msg_), m_depth(depth) {}

_ZN4YAML10DirectivesC2Ev:
    4|  10.0k|Directives::Directives() : version{true, 1, 2}, tags{} {}
_ZNK4YAML10Directives18TranslateTagHandleERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
    7|  5.89k|    const std::string& handle) const {
    8|  5.89k|  auto it = tags.find(handle);
    9|  5.89k|  if (it == tags.end()) {
  ------------------
  |  Branch (9:7): [True: 4.00k, False: 1.89k]
  ------------------
   10|  4.00k|    if (handle == "!!")
  ------------------
  |  Branch (10:9): [True: 1.25k, False: 2.74k]
  ------------------
   11|  1.25k|      return "tag:yaml.org,2002:";
   12|  2.74k|    return handle;
   13|  4.00k|  }
   14|       |
   15|  1.89k|  return it->second;
   16|  5.89k|}

_ZN4YAML3Exp8ParseHexERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_4MarkE:
   13|  1.69k|unsigned ParseHex(const std::string& str, const Mark& mark) {
   14|  1.69k|  unsigned value = 0;
   15|  8.65k|  for (char ch : str) {
  ------------------
  |  Branch (15:16): [True: 8.65k, False: 1.61k]
  ------------------
   16|  8.65k|    int digit = 0;
   17|  8.65k|    if ('a' <= ch && ch <= 'f')
  ------------------
  |  Branch (17:9): [True: 814, False: 7.84k]
  |  Branch (17:22): [True: 812, False: 2]
  ------------------
   18|    812|      digit = ch - 'a' + 10;
   19|  7.84k|    else if ('A' <= ch && ch <= 'F')
  ------------------
  |  Branch (19:14): [True: 2.19k, False: 5.65k]
  |  Branch (19:27): [True: 2.18k, False: 9]
  ------------------
   20|  2.18k|      digit = ch - 'A' + 10;
   21|  5.66k|    else if ('0' <= ch && ch <= '9')
  ------------------
  |  Branch (21:14): [True: 5.58k, False: 71]
  |  Branch (21:27): [True: 5.57k, False: 13]
  ------------------
   22|  5.57k|      digit = ch - '0';
   23|     84|    else
   24|     84|      throw ParserException(mark, ErrorMsg::INVALID_HEX);
   25|       |
   26|  8.57k|    value = (value << 4) + digit;
   27|  8.57k|  }
   28|       |
   29|  1.61k|  return value;
   30|  1.69k|}
_ZN4YAML3Exp3StrEj:
   32|  4.30k|std::string Str(unsigned ch) { return std::string(1, static_cast<char>(ch)); }
_ZN4YAML3Exp6EscapeERNS_6StreamEi:
   38|  1.69k|std::string Escape(Stream& in, int codeLength) {
   39|       |  // grab string
   40|  1.69k|  std::string str;
   41|  10.7k|  for (int i = 0; i < codeLength; i++)
  ------------------
  |  Branch (41:19): [True: 9.02k, False: 1.69k]
  ------------------
   42|  9.02k|    str += in.get();
   43|       |
   44|       |  // get the value
   45|  1.69k|  unsigned value = ParseHex(str, in.mark());
   46|       |
   47|       |  // legal unicode?
   48|  1.69k|  if ((value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF) {
  ------------------
  |  Branch (48:8): [True: 696, False: 1.00k]
  |  Branch (48:27): [True: 14, False: 682]
  |  Branch (48:47): [True: 34, False: 1.56k]
  ------------------
   49|     48|    std::stringstream msg;
   50|     48|    msg << ErrorMsg::INVALID_UNICODE << value;
   51|     48|    throw ParserException(in.mark(), msg.str());
   52|     48|  }
   53|       |
   54|       |  // now break it up into chars
   55|  1.65k|  if (value <= 0x7F)
  ------------------
  |  Branch (55:7): [True: 233, False: 1.41k]
  ------------------
   56|    233|    return Str(value);
   57|       |
   58|  1.41k|  if (value <= 0x7FF)
  ------------------
  |  Branch (58:7): [True: 316, False: 1.10k]
  ------------------
   59|    316|    return Str(0xC0 + (value >> 6)) + Str(0x80 + (value & 0x3F));
   60|       |
   61|  1.10k|  if (value <= 0xFFFF)
  ------------------
  |  Branch (61:7): [True: 630, False: 471]
  ------------------
   62|    630|    return Str(0xE0 + (value >> 12)) + Str(0x80 + ((value >> 6) & 0x3F)) +
   63|    630|           Str(0x80 + (value & 0x3F));
   64|       |
   65|    471|  return Str(0xF0 + (value >> 18)) + Str(0x80 + ((value >> 12) & 0x3F)) +
   66|    471|         Str(0x80 + ((value >> 6) & 0x3F)) + Str(0x80 + (value & 0x3F));
   67|  1.10k|}
_ZN4YAML3Exp6EscapeERNS_6StreamE:
   74|  51.2k|std::string Escape(Stream& in) {
   75|       |  // eat slash
   76|  51.2k|  char escape = in.get();
   77|       |
   78|       |  // switch on escape character
   79|  51.2k|  char ch = in.get();
   80|       |
   81|       |  // first do single quote, since it's easier
   82|  51.2k|  if (escape == '\'' && ch == '\'')
  ------------------
  |  Branch (82:7): [True: 597, False: 50.6k]
  |  Branch (82:25): [True: 597, False: 0]
  ------------------
   83|    597|    return "\'";
   84|       |
   85|       |  // now do the slash (we're not gonna check if it's a slash - you better pass
   86|       |  // one!)
   87|  50.6k|  switch (ch) {
  ------------------
  |  Branch (87:11): [True: 50.4k, False: 233]
  ------------------
   88|    592|    case '0':
  ------------------
  |  Branch (88:5): [True: 592, False: 50.0k]
  ------------------
   89|    592|      return std::string(1, '\x00');
   90|    205|    case 'a':
  ------------------
  |  Branch (90:5): [True: 205, False: 50.4k]
  ------------------
   91|    205|      return "\x07";
   92|    876|    case 'b':
  ------------------
  |  Branch (92:5): [True: 876, False: 49.8k]
  ------------------
   93|    876|      return "\x08";
   94|    653|    case 't':
  ------------------
  |  Branch (94:5): [True: 653, False: 50.0k]
  ------------------
   95|  5.18k|    case '\t':
  ------------------
  |  Branch (95:5): [True: 4.52k, False: 46.1k]
  ------------------
   96|  5.18k|      return "\x09";
   97|  9.64k|    case 'n':
  ------------------
  |  Branch (97:5): [True: 9.64k, False: 41.0k]
  ------------------
   98|  9.64k|      return "\x0A";
   99|    356|    case 'v':
  ------------------
  |  Branch (99:5): [True: 356, False: 50.3k]
  ------------------
  100|    356|      return "\x0B";
  101|    333|    case 'f':
  ------------------
  |  Branch (101:5): [True: 333, False: 50.3k]
  ------------------
  102|    333|      return "\x0C";
  103|    196|    case 'r':
  ------------------
  |  Branch (103:5): [True: 196, False: 50.4k]
  ------------------
  104|    196|      return "\x0D";
  105|    482|    case 'e':
  ------------------
  |  Branch (105:5): [True: 482, False: 50.2k]
  ------------------
  106|    482|      return "\x1B";
  107|    387|    case ' ':
  ------------------
  |  Branch (107:5): [True: 387, False: 50.3k]
  ------------------
  108|    387|      return R"( )";
  109|  9.24k|    case '\"':
  ------------------
  |  Branch (109:5): [True: 9.24k, False: 41.4k]
  ------------------
  110|  9.24k|      return "\"";
  111|    318|    case '\'':
  ------------------
  |  Branch (111:5): [True: 318, False: 50.3k]
  ------------------
  112|    318|      return "\'";
  113|    601|    case '\\':
  ------------------
  |  Branch (113:5): [True: 601, False: 50.0k]
  ------------------
  114|    601|      return "\\";
  115|  1.47k|    case '/':
  ------------------
  |  Branch (115:5): [True: 1.47k, False: 49.2k]
  ------------------
  116|  1.47k|      return "/";
  117|    599|    case 'N':
  ------------------
  |  Branch (117:5): [True: 599, False: 50.0k]
  ------------------
  118|    599|      return "\xC2\x85";      // NEL (U+0085)
  119|    214|    case '_':
  ------------------
  |  Branch (119:5): [True: 214, False: 50.4k]
  ------------------
  120|    214|      return "\xC2\xA0";      // NBSP (U+00A0)
  121|  16.4k|    case 'L':
  ------------------
  |  Branch (121:5): [True: 16.4k, False: 34.2k]
  ------------------
  122|  16.4k|      return "\xE2\x80\xA8";  // LS (U+2028)
  123|  1.64k|    case 'P':
  ------------------
  |  Branch (123:5): [True: 1.64k, False: 49.0k]
  ------------------
  124|  1.64k|      return "\xE2\x80\xA9";  // PS (U+2029)
  125|    467|    case 'x':
  ------------------
  |  Branch (125:5): [True: 467, False: 50.2k]
  ------------------
  126|    467|      return Escape(in, 2);
  127|    440|    case 'u':
  ------------------
  |  Branch (127:5): [True: 440, False: 50.2k]
  ------------------
  128|    440|      return Escape(in, 4);
  129|    791|    case 'U':
  ------------------
  |  Branch (129:5): [True: 791, False: 49.8k]
  ------------------
  130|    791|      return Escape(in, 8);
  131|  50.6k|  }
  132|       |
  133|    233|  std::stringstream msg;
  134|    233|  throw ParserException(in.mark(), std::string(ErrorMsg::INVALID_ESCAPE) + ch);
  135|  50.6k|}

_ZN4YAML3Exp8DocStartEv:
   84|  1.98M|inline const RegEx& DocStart() {
   85|  1.98M|  static const RegEx e = RegEx("---") + (BlankOrBreak() | RegEx());
   86|  1.98M|  return e;
   87|  1.98M|}
_ZN4YAML3Exp12BlankOrBreakEv:
   43|  31.6M|inline const RegEx& BlankOrBreak() {
   44|  31.6M|  static const RegEx e = Blank() | Break();
   45|  31.6M|  return e;
   46|  31.6M|}
_ZN4YAML3Exp5BlankEv:
   35|  35.9M|inline const RegEx& Blank() {
   36|  35.9M|  static const RegEx e = Space() | Tab();
   37|  35.9M|  return e;
   38|  35.9M|}
_ZN4YAML3Exp5SpaceEv:
   27|      1|inline const RegEx& Space() {
   28|      1|  static const RegEx e = RegEx(' ');
   29|      1|  return e;
   30|      1|}
_ZN4YAML3Exp6DocEndEv:
   88|  1.54M|inline const RegEx& DocEnd() {
   89|  1.54M|  static const RegEx e = RegEx("...") + (BlankOrBreak() | RegEx());
   90|  1.54M|  return e;
   91|  1.54M|}
_ZN4YAML3Exp10BlockEntryEv:
   96|  10.5M|inline const RegEx& BlockEntry() {
   97|  10.5M|  static const RegEx e = RegEx('-') + (BlankOrBreak() | RegEx());
   98|  10.5M|  return e;
   99|  10.5M|}
_ZN4YAML3Exp3KeyEv:
  100|  7.38M|inline const RegEx& Key() {
  101|  7.38M|  static const RegEx e = RegEx('?') + BlankOrBreak();
  102|  7.38M|  return e;
  103|  7.38M|}
_ZN4YAML3Exp9KeyInFlowEv:
  104|  1.40M|inline const RegEx& KeyInFlow() {
  105|  1.40M|  static const RegEx e = RegEx('?') + BlankOrBreak();
  106|  1.40M|  return e;
  107|  1.40M|}
_ZN4YAML3Exp11PlainScalarEv:
  153|  1.09M|inline const RegEx& PlainScalar() {
  154|  1.09M|  static const RegEx e =
  155|  1.09M|      !(BlankOrBreak() | RegEx(",[]{}#&*!|>\'\"%@`", REGEX_OR) |
  156|  1.09M|        (RegEx("-?:", REGEX_OR) + (BlankOrBreak() | RegEx())));
  157|  1.09M|  return e;
  158|  1.09M|}
_ZN4YAML3Exp17PlainScalarInFlowEv:
  159|  1.07M|inline const RegEx& PlainScalarInFlow() {
  160|  1.07M|  static const RegEx e =
  161|  1.07M|      !(BlankOrBreak() | RegEx("?,[]{}#&*!|>\'\"%@`", REGEX_OR) |
  162|  1.07M|        (RegEx("-:", REGEX_OR) + (Blank() | RegEx())));
  163|  1.07M|  return e;
  164|  1.07M|}
_ZN4YAML3Exp3TabEv:
   31|   179k|inline const RegEx& Tab() {
   32|   179k|  static const RegEx e = RegEx('\t');
   33|   179k|  return e;
   34|   179k|}
_ZN4YAML3Exp7CommentEv:
  124|  70.0M|inline const RegEx Comment() {
  125|  70.0M|  static const RegEx e = RegEx('#');
  126|  70.0M|  return e;
  127|  70.0M|}
_ZN4YAML3Exp5BreakEv:
   39|   205M|inline const RegEx& Break() {
   40|   205M|  static const RegEx e = RegEx('\n') | RegEx("\r\n") | RegEx('\r');
   41|   205M|  return e;
   42|   205M|}
_ZN4YAML3Exp5ValueEv:
  108|  7.37M|inline const RegEx& Value() {
  109|  7.37M|  static const RegEx e = RegEx(':') + (BlankOrBreak() | RegEx());
  110|  7.37M|  return e;
  111|  7.37M|}
_ZN4YAML3Exp15ValueInJSONFlowEv:
  116|  9.55k|inline const RegEx& ValueInJSONFlow() {
  117|  9.55k|  static const RegEx e = RegEx(':');
  118|  9.55k|  return e;
  119|  9.55k|}
_ZN4YAML3Exp11ValueInFlowEv:
  112|  1.36M|inline const RegEx& ValueInFlow() {
  113|  1.36M|  static const RegEx e = RegEx(':') + (BlankOrBreak() | RegEx(",]}", REGEX_OR));
  114|  1.36M|  return e;
  115|  1.36M|}
_ZN4YAML3Exp5EmptyEv:
   23|  5.31k|inline const RegEx& Empty() {
   24|  5.31k|  static const RegEx e;
   25|  5.31k|  return e;
   26|  5.31k|}
_ZN4YAML3Exp5DigitEv:
   47|    672|inline const RegEx& Digit() {
   48|    672|  static const RegEx e = RegEx('0', '9');
   49|    672|  return e;
   50|    672|}
_ZN4YAML3Exp5AlphaEv:
   51|      1|inline const RegEx& Alpha() {
   52|      1|  static const RegEx e = RegEx('a', 'z') | RegEx('A', 'Z');
   53|      1|  return e;
   54|      1|}
_ZN4YAML3Exp12AlphaNumericEv:
   55|      1|inline const RegEx& AlphaNumeric() {
   56|      1|  static const RegEx e = Alpha() | Digit();
   57|      1|  return e;
   58|      1|}
_ZN4YAML3Exp4WordEv:
   59|  7.42M|inline const RegEx& Word() {
   60|  7.42M|  static const RegEx e = AlphaNumeric() | RegEx('-');
   61|  7.42M|  return e;
   62|  7.42M|}
_ZN4YAML3Exp3HexEv:
   63|      4|inline const RegEx& Hex() {
   64|      4|  static const RegEx e = Digit() | RegEx('A', 'F') | RegEx('a', 'f');
   65|      4|  return e;
   66|      4|}
_ZN4YAML3Exp12DocIndicatorEv:
   92|  5.36M|inline const RegEx& DocIndicator() {
   93|  5.36M|  static const RegEx e = DocStart() | DocEnd();
   94|  5.36M|  return e;
   95|  5.36M|}
_ZN4YAML3Exp6AnchorEv:
  128|  29.5M|inline const RegEx& Anchor() {
  129|  29.5M|  static const RegEx e = !(RegEx("[]{},", REGEX_OR) | BlankOrBreak());
  130|  29.5M|  return e;
  131|  29.5M|}
_ZN4YAML3Exp9AnchorEndEv:
  132|   251k|inline const RegEx& AnchorEnd() {
  133|   251k|  static const RegEx e = RegEx("?:,]}%@`", REGEX_OR) | BlankOrBreak();
  134|   251k|  return e;
  135|   251k|}
_ZN4YAML3Exp3URIEv:
  136|  9.23k|inline const RegEx& URI() {
  137|  9.23k|  static const RegEx e = Word() | RegEx("#;/?:@&=+$,_.!~*'()[]", REGEX_OR) |
  138|  9.23k|                         (RegEx('%') + Hex() + Hex());
  139|  9.23k|  return e;
  140|  9.23k|}
_ZN4YAML3Exp3TagEv:
  141|  2.43M|inline const RegEx& Tag() {
  142|  2.43M|  static const RegEx e = Word() | RegEx("#;/?:@&=+$_.~*'()", REGEX_OR) |
  143|  2.43M|                         (RegEx('%') + Hex() + Hex());
  144|  2.43M|  return e;
  145|  2.43M|}
_ZN4YAML3Exp9EndScalarEv:
  165|      1|inline const RegEx& EndScalar() {
  166|      1|  static const RegEx e = RegEx(':') + (BlankOrBreak() | RegEx());
  167|      1|  return e;
  168|      1|}
_ZN4YAML3Exp15EndScalarInFlowEv:
  169|      1|inline const RegEx& EndScalarInFlow() {
  170|      1|  static const RegEx e =
  171|      1|      (RegEx(':') + (BlankOrBreak() | RegEx() | RegEx(",]}", REGEX_OR))) |
  172|      1|      RegEx(",?[]{}", REGEX_OR);
  173|      1|  return e;
  174|      1|}
_ZN4YAML3Exp19ScanScalarEndInFlowEv:
  176|  1.07M|inline const RegEx& ScanScalarEndInFlow() {
  177|  1.07M|  static const RegEx e = (EndScalarInFlow() | (BlankOrBreak() + Comment()));
  178|  1.07M|  return e;
  179|  1.07M|}
_ZN4YAML3Exp13ScanScalarEndEv:
  181|  1.09M|inline const RegEx& ScanScalarEnd() {
  182|  1.09M|  static const RegEx e = EndScalar() | (BlankOrBreak() + Comment());
  183|  1.09M|  return e;
  184|  1.09M|}
_ZN4YAML3Exp14EscSingleQuoteEv:
  185|  1.66k|inline const RegEx& EscSingleQuote() {
  186|  1.66k|  static const RegEx e = RegEx("\'\'");
  187|  1.66k|  return e;
  188|  1.66k|}
_ZN4YAML3Exp8EscBreakEv:
  189|  15.4M|inline const RegEx& EscBreak() {
  190|  15.4M|  static const RegEx e = RegEx('\\') + Break();
  191|  15.4M|  return e;
  192|  15.4M|}
_ZN4YAML3Exp14ChompIndicatorEv:
  194|      3|inline const RegEx& ChompIndicator() {
  195|      3|  static const RegEx e = RegEx("+-", REGEX_OR);
  196|      3|  return e;
  197|      3|}
_ZN4YAML3Exp5ChompEv:
  198|  5.36k|inline const RegEx& Chomp() {
  199|  5.36k|  static const RegEx e = (ChompIndicator() + Digit()) |
  200|  5.36k|                         (Digit() + ChompIndicator()) | ChompIndicator() |
  201|  5.36k|                         Digit();
  202|  5.36k|  return e;
  203|  5.36k|}

_ZN4YAML6detail6memory11create_nodeEv:
   20|  2.49M|node& memory::create_node() {
   21|  2.49M|  shared_node pNode(std::make_shared<node>());
   22|  2.49M|  m_nodes.insert(pNode);
   23|  2.49M|  return *pNode;
   24|  2.49M|}

_ZN4YAML6detail9node_dataC2Ev:
   24|  2.49M|    : m_isDefined(false),
   25|  2.49M|      m_mark(Mark::null_mark()),
   26|  2.49M|      m_type(NodeType::Null),
   27|  2.49M|      m_tag{},
   28|  2.49M|      m_style(EmitterStyle::Default),
   29|  2.49M|      m_scalar{},
   30|  2.49M|      m_sequence{},
   31|  2.49M|      m_seqSize(0),
   32|  2.49M|      m_map{},
   33|  2.49M|      m_undefinedPairs{} {}
_ZN4YAML6detail9node_data12mark_definedEv:
   35|  2.49M|void node_data::mark_defined() {
   36|  2.49M|  if (m_type == NodeType::Undefined)
  ------------------
  |  Branch (36:7): [True: 0, False: 2.49M]
  ------------------
   37|      0|    m_type = NodeType::Null;
   38|  2.49M|  m_isDefined = true;
   39|  2.49M|}
_ZN4YAML6detail9node_data8set_markERKNS_4MarkE:
   41|  2.49M|void node_data::set_mark(const Mark& mark) { m_mark = mark; }
_ZN4YAML6detail9node_data8set_typeENS_8NodeType5valueE:
   43|   153k|void node_data::set_type(NodeType::value type) {
   44|   153k|  if (type == NodeType::Undefined) {
  ------------------
  |  Branch (44:7): [True: 0, False: 153k]
  ------------------
   45|      0|    m_type = type;
   46|      0|    m_isDefined = false;
   47|      0|    return;
   48|      0|  }
   49|       |
   50|   153k|  m_isDefined = true;
   51|   153k|  if (type == m_type)
  ------------------
  |  Branch (51:7): [True: 0, False: 153k]
  ------------------
   52|      0|    return;
   53|       |
   54|   153k|  m_type = type;
   55|       |
   56|   153k|  switch (m_type) {
  ------------------
  |  Branch (56:11): [True: 153k, False: 0]
  ------------------
   57|      0|    case NodeType::Null:
  ------------------
  |  Branch (57:5): [True: 0, False: 153k]
  ------------------
   58|      0|      break;
   59|      0|    case NodeType::Scalar:
  ------------------
  |  Branch (59:5): [True: 0, False: 153k]
  ------------------
   60|      0|      m_scalar.clear();
   61|      0|      break;
   62|  43.9k|    case NodeType::Sequence:
  ------------------
  |  Branch (62:5): [True: 43.9k, False: 109k]
  ------------------
   63|  43.9k|      reset_sequence();
   64|  43.9k|      break;
   65|   109k|    case NodeType::Map:
  ------------------
  |  Branch (65:5): [True: 109k, False: 43.9k]
  ------------------
   66|   109k|      reset_map();
   67|   109k|      break;
   68|      0|    case NodeType::Undefined:
  ------------------
  |  Branch (68:5): [True: 0, False: 153k]
  ------------------
   69|       |      assert(false);
   70|      0|      break;
   71|   153k|  }
   72|   153k|}
_ZN4YAML6detail9node_data7set_tagERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   74|   575k|void node_data::set_tag(const std::string& tag) { m_tag = tag; }
_ZN4YAML6detail9node_data9set_styleENS_12EmitterStyle5valueE:
   76|   153k|void node_data::set_style(EmitterStyle::value style) { m_style = style; }
_ZN4YAML6detail9node_data8set_nullEv:
   78|  1.92M|void node_data::set_null() {
   79|  1.92M|  m_isDefined = true;
   80|  1.92M|  m_type = NodeType::Null;
   81|  1.92M|}
_ZN4YAML6detail9node_data10set_scalarERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   83|   421k|void node_data::set_scalar(const std::string& scalar) {
   84|   421k|  m_isDefined = true;
   85|   421k|  m_type = NodeType::Scalar;
   86|   421k|  m_scalar = scalar;
   87|   421k|}
_ZN4YAML6detail9node_data9push_backERNS0_4nodeERKNSt3__110shared_ptrINS0_13memory_holderEEE:
  180|  1.31M|                          const shared_memory_holder& /* pMemory */) {
  181|  1.31M|  if (m_type == NodeType::Undefined || m_type == NodeType::Null) {
  ------------------
  |  Branch (181:7): [True: 0, False: 1.31M]
  |  Branch (181:40): [True: 0, False: 1.31M]
  ------------------
  182|      0|    m_type = NodeType::Sequence;
  183|      0|    reset_sequence();
  184|      0|  }
  185|       |
  186|  1.31M|  if (m_type != NodeType::Sequence)
  ------------------
  |  Branch (186:7): [True: 0, False: 1.31M]
  ------------------
  187|      0|    throw BadPushback();
  188|       |
  189|  1.31M|  m_sequence.push_back(&node);
  190|  1.31M|}
_ZN4YAML6detail9node_data6insertERNS0_4nodeES3_RKNSt3__110shared_ptrINS0_13memory_holderEEE:
  193|   256k|                       const shared_memory_holder& pMemory) {
  194|   256k|  switch (m_type) {
  ------------------
  |  Branch (194:11): [True: 256k, False: 0]
  ------------------
  195|   256k|    case NodeType::Map:
  ------------------
  |  Branch (195:5): [True: 256k, False: 0]
  ------------------
  196|   256k|      break;
  197|      0|    case NodeType::Undefined:
  ------------------
  |  Branch (197:5): [True: 0, False: 256k]
  ------------------
  198|      0|    case NodeType::Null:
  ------------------
  |  Branch (198:5): [True: 0, False: 256k]
  ------------------
  199|      0|    case NodeType::Sequence:
  ------------------
  |  Branch (199:5): [True: 0, False: 256k]
  ------------------
  200|      0|      convert_to_map(pMemory);
  201|      0|      break;
  202|      0|    case NodeType::Scalar:
  ------------------
  |  Branch (202:5): [True: 0, False: 256k]
  ------------------
  203|      0|      throw BadSubscript(m_mark, key);
  204|   256k|  }
  205|       |
  206|   256k|  insert_map_pair(key, value);
  207|   256k|}
_ZN4YAML6detail9node_data14reset_sequenceEv:
  272|  43.9k|void node_data::reset_sequence() {
  273|  43.9k|  m_sequence.clear();
  274|  43.9k|  m_seqSize = 0;
  275|  43.9k|}
_ZN4YAML6detail9node_data9reset_mapEv:
  277|   109k|void node_data::reset_map() {
  278|   109k|  m_map.clear();
  279|   109k|  m_undefinedPairs.clear();
  280|   109k|}
_ZN4YAML6detail9node_data15insert_map_pairERNS0_4nodeES3_b:
  282|   256k|void node_data::insert_map_pair(node& key, node& value, bool force) {
  283|   256k|  if (!force && !key.scalar().empty())
  ------------------
  |  Branch (283:7): [True: 256k, False: 0]
  |  Branch (283:17): [True: 12.7k, False: 243k]
  ------------------
  284|  12.7k|    for (const auto& mapEntry : m_map)
  ------------------
  |  Branch (284:31): [True: 537k, False: 12.7k]
  ------------------
  285|   537k|      if (mapEntry.first->scalar() == key.scalar())
  ------------------
  |  Branch (285:11): [True: 41, False: 537k]
  ------------------
  286|     41|        throw NonUniqueMapKey(m_mark, key);
  287|       |
  288|   256k|  m_map.emplace_back(&key, &value);
  289|       |
  290|   256k|  if (!key.is_defined() || !value.is_defined())
  ------------------
  |  Branch (290:7): [True: 0, False: 256k]
  |  Branch (290:28): [True: 0, False: 256k]
  ------------------
  291|      0|    m_undefinedPairs.emplace_back(&key, &value);
  292|   256k|}

_ZN4YAML11NodeBuilderC2Ev:
   13|   558k|    : m_pMemory(std::make_shared<detail::memory_holder>()),
   14|   558k|      m_pRoot(nullptr),
   15|   558k|      m_stack{},
   16|   558k|      m_anchors{},
   17|   558k|      m_keys{},
   18|   558k|      m_mapDepth(0) {
   19|   558k|  m_anchors.push_back(nullptr);  // since the anchors start at 1
   20|   558k|}
_ZN4YAML11NodeBuilderD2Ev:
   22|   558k|NodeBuilder::~NodeBuilder() = default;
_ZN4YAML11NodeBuilder4RootEv:
   24|   552k|Node NodeBuilder::Root() {
   25|   552k|  if (!m_pRoot)
  ------------------
  |  Branch (25:7): [True: 0, False: 552k]
  ------------------
   26|      0|    return Node();
   27|       |
   28|   552k|  return Node(*m_pRoot, m_pMemory);
   29|   552k|}
_ZN4YAML11NodeBuilder15OnDocumentStartERKNS_4MarkE:
   31|   554k|void NodeBuilder::OnDocumentStart(const Mark&) {}
_ZN4YAML11NodeBuilder13OnDocumentEndEv:
   33|   552k|void NodeBuilder::OnDocumentEnd() {}
_ZN4YAML11NodeBuilder6OnNullERKNS_4MarkEm:
   35|  1.92M|void NodeBuilder::OnNull(const Mark& mark, anchor_t anchor) {
   36|  1.92M|  detail::node& node = Push(mark, anchor);
   37|  1.92M|  node.set_null();
   38|  1.92M|  Pop();
   39|  1.92M|}
_ZN4YAML11NodeBuilder7OnAliasERKNS_4MarkEm:
   41|  1.15k|void NodeBuilder::OnAlias(const Mark& /* mark */, anchor_t anchor) {
   42|  1.15k|  detail::node& node = *m_anchors[anchor];
   43|  1.15k|  Push(node);
   44|  1.15k|  Pop();
   45|  1.15k|}
_ZN4YAML11NodeBuilder8OnScalarERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEmSC_:
   48|   421k|                           anchor_t anchor, const std::string& value) {
   49|   421k|  detail::node& node = Push(mark, anchor);
   50|   421k|  node.set_scalar(value);
   51|   421k|  node.set_tag(tag);
   52|   421k|  Pop();
   53|   421k|}
_ZN4YAML11NodeBuilder15OnSequenceStartERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEmNS_12EmitterStyle5valueE:
   56|  43.9k|                                  anchor_t anchor, EmitterStyle::value style) {
   57|  43.9k|  detail::node& node = Push(mark, anchor);
   58|  43.9k|  node.set_tag(tag);
   59|  43.9k|  node.set_type(NodeType::Sequence);
   60|  43.9k|  node.set_style(style);
   61|  43.9k|}
_ZN4YAML11NodeBuilder13OnSequenceEndEv:
   63|  7.00k|void NodeBuilder::OnSequenceEnd() { Pop(); }
_ZN4YAML11NodeBuilder10OnMapStartERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEmNS_12EmitterStyle5valueE:
   66|   109k|                             anchor_t anchor, EmitterStyle::value style) {
   67|   109k|  detail::node& node = Push(mark, anchor);
   68|   109k|  node.set_type(NodeType::Map);
   69|   109k|  node.set_tag(tag);
   70|   109k|  node.set_style(style);
   71|   109k|  m_mapDepth++;
   72|   109k|}
_ZN4YAML11NodeBuilder8OnMapEndEv:
   74|  30.6k|void NodeBuilder::OnMapEnd() {
   75|       |  assert(m_mapDepth > 0);
   76|  30.6k|  m_mapDepth--;
   77|  30.6k|  Pop();
   78|  30.6k|}
_ZN4YAML11NodeBuilder4PushERKNS_4MarkEm:
   80|  2.49M|detail::node& NodeBuilder::Push(const Mark& mark, anchor_t anchor) {
   81|  2.49M|  detail::node& node = m_pMemory->create_node();
   82|  2.49M|  node.set_mark(mark);
   83|  2.49M|  RegisterAnchor(anchor, node);
   84|  2.49M|  Push(node);
   85|  2.49M|  return node;
   86|  2.49M|}
_ZN4YAML11NodeBuilder4PushERNS_6detail4nodeE:
   88|  2.49M|void NodeBuilder::Push(detail::node& node) {
   89|  2.49M|  const bool needsKey =
   90|  2.49M|      (!m_stack.empty() && m_stack.back()->type() == NodeType::Map &&
  ------------------
  |  Branch (90:8): [True: 1.94M, False: 554k]
  |  Branch (90:28): [True: 591k, False: 1.35M]
  ------------------
   91|   591k|       m_keys.size() < m_mapDepth);
  ------------------
  |  Branch (91:8): [True: 334k, False: 257k]
  ------------------
   92|       |
   93|  2.49M|  m_stack.push_back(&node);
   94|  2.49M|  if (needsKey)
  ------------------
  |  Branch (94:7): [True: 334k, False: 2.16M]
  ------------------
   95|   334k|    m_keys.emplace_back(&node, false);
   96|  2.49M|}
_ZN4YAML11NodeBuilder3PopEv:
   98|  2.38M|void NodeBuilder::Pop() {
   99|  2.38M|  assert(!m_stack.empty());
  100|  2.38M|  if (m_stack.size() == 1) {
  ------------------
  |  Branch (100:7): [True: 552k, False: 1.82M]
  ------------------
  101|   552k|    m_pRoot = m_stack[0];
  102|   552k|    m_stack.pop_back();
  103|   552k|    return;
  104|   552k|  }
  105|       |
  106|  1.82M|  detail::node& node = *m_stack.back();
  107|  1.82M|  m_stack.pop_back();
  108|       |
  109|  1.82M|  detail::node& collection = *m_stack.back();
  110|       |
  111|  1.82M|  if (collection.type() == NodeType::Sequence) {
  ------------------
  |  Branch (111:7): [True: 1.31M, False: 513k]
  ------------------
  112|  1.31M|    collection.push_back(node, m_pMemory);
  113|  1.31M|  } else if (collection.type() == NodeType::Map) {
  ------------------
  |  Branch (113:14): [True: 513k, False: 0]
  ------------------
  114|   513k|    assert(!m_keys.empty());
  115|   513k|    PushedKey& key = m_keys.back();
  116|   513k|    if (key.second) {
  ------------------
  |  Branch (116:9): [True: 256k, False: 257k]
  ------------------
  117|   256k|      collection.insert(*key.first, node, m_pMemory);
  118|   256k|      m_keys.pop_back();
  119|   257k|    } else {
  120|   257k|      key.second = true;
  121|   257k|    }
  122|   513k|  } else {
  123|       |    assert(false);
  124|      0|    m_stack.clear();
  125|      0|  }
  126|  1.82M|}
_ZN4YAML11NodeBuilder14RegisterAnchorEmRNS_6detail4nodeE:
  128|  2.49M|void NodeBuilder::RegisterAnchor(anchor_t anchor, detail::node& node) {
  129|  2.49M|  if (anchor) {
  ------------------
  |  Branch (129:7): [True: 244k, False: 2.25M]
  ------------------
  130|       |    assert(anchor == m_anchors.size());
  131|   244k|    m_anchors.push_back(&node);
  132|   244k|  }
  133|  2.49M|}

_ZN4YAML12IsNullStringEPKcm:
   13|   439k|bool IsNullString(const char* str, std::size_t size) {
   14|   439k|  return size == 0 || same(str, size, "~") || same(str, size, "null") ||
  ------------------
  |  Branch (14:10): [True: 0, False: 439k]
  |  Branch (14:23): [True: 23.4k, False: 416k]
  |  Branch (14:47): [True: 404, False: 415k]
  ------------------
   15|   415k|         same(str, size, "Null") || same(str, size, "NULL");
  ------------------
  |  Branch (15:10): [True: 238, False: 415k]
  |  Branch (15:37): [True: 10, False: 415k]
  ------------------
   16|   439k|}
null.cpp:_ZN4YAMLL4sameILm2EEEbPKcmRAT__S1_:
    8|   439k|static bool same(const char* str, std::size_t size, const char (&literal)[N]) {
    9|   439k|  constexpr int literalSize = N - 1; // minus null terminator
   10|   439k|  return size == literalSize && std::strncmp(str, literal, literalSize) == 0;
  ------------------
  |  Branch (10:10): [True: 411k, False: 28.6k]
  |  Branch (10:33): [True: 23.4k, False: 387k]
  ------------------
   11|   439k|}
null.cpp:_ZN4YAMLL4sameILm5EEEbPKcmRAT__S1_:
    8|  1.24M|static bool same(const char* str, std::size_t size, const char (&literal)[N]) {
    9|  1.24M|  constexpr int literalSize = N - 1; // minus null terminator
   10|  1.24M|  return size == literalSize && std::strncmp(str, literal, literalSize) == 0;
  ------------------
  |  Branch (10:10): [True: 18.6k, False: 1.22M]
  |  Branch (10:33): [True: 652, False: 18.0k]
  ------------------
   11|  1.24M|}

_ZN4YAML7LoadAllERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
   40|  6.52k|std::vector<Node> LoadAll(const std::string& input) {
   41|  6.52k|  std::stringstream stream(input);
   42|  6.52k|  return LoadAll(stream);
   43|  6.52k|}
_ZN4YAML7LoadAllERNSt3__113basic_istreamIcNS0_11char_traitsIcEEEE:
   50|  6.52k|std::vector<Node> LoadAll(std::istream& input) {
   51|  6.52k|  std::vector<Node> docs;
   52|       |
   53|  6.52k|  Parser parser(input);
   54|   562k|  while (true) {
  ------------------
  |  Branch (54:10): [True: 558k, Folded]
  ------------------
   55|   558k|    NodeBuilder builder;
   56|   558k|    if (!parser.HandleNextDocument(builder)) {
  ------------------
  |  Branch (56:9): [True: 2.86k, False: 555k]
  ------------------
   57|  2.86k|      break;
   58|  2.86k|    }
   59|   555k|    docs.push_back(builder.Root());
   60|   555k|  }
   61|       |
   62|  6.52k|  return docs;
   63|  6.52k|}

_ZN4YAML6ParserC2Ev:
   14|  6.52k|Parser::Parser() : m_pScanner{}, m_pDirectives{} {}
_ZN4YAML6ParserC2ERNSt3__113basic_istreamIcNS1_11char_traitsIcEEEE:
   16|  6.52k|Parser::Parser(std::istream& in) : Parser() { Load(in); }
_ZN4YAML6ParserD2Ev:
   18|  6.52k|Parser::~Parser() = default;
_ZN4YAML6Parser4LoadERNSt3__113basic_istreamIcNS1_11char_traitsIcEEEE:
   22|  6.52k|void Parser::Load(std::istream& in) {
   23|  6.52k|  m_pScanner.reset(new Scanner(in));
   24|  6.52k|  m_pDirectives.reset(new Directives);
   25|  6.52k|}
_ZN4YAML6Parser18HandleNextDocumentERNS_12EventHandlerE:
   27|   558k|bool Parser::HandleNextDocument(EventHandler& eventHandler) {
   28|   558k|  if (!m_pScanner)
  ------------------
  |  Branch (28:7): [True: 0, False: 558k]
  ------------------
   29|      0|    return false;
   30|       |
   31|   558k|  ParseDirectives();
   32|   558k|  if (m_pScanner->empty()) {
  ------------------
  |  Branch (32:7): [True: 2.86k, False: 555k]
  ------------------
   33|  2.86k|    return false;
   34|  2.86k|  }
   35|       |
   36|   555k|  auto oldPos = m_pScanner->peek().mark.pos;
   37|       |
   38|   555k|  SingleDocParser sdp(*m_pScanner, *m_pDirectives);
   39|   555k|  sdp.HandleDocument(eventHandler);
   40|       |
   41|       |  // checks if progress was made
   42|       |  // 1. if scanner has no more tokens, progress was made
   43|   555k|  if (m_pScanner->empty()) {
  ------------------
  |  Branch (43:7): [True: 2.12k, False: 553k]
  ------------------
   44|  2.12k|    return true;
   45|  2.12k|  }
   46|       |
   47|       |  // 2. if token position has changed, progress was made
   48|   553k|  auto newPos = m_pScanner->peek().mark.pos;
   49|   553k|  if (newPos != oldPos) {
  ------------------
  |  Branch (49:7): [True: 549k, False: 3.66k]
  ------------------
   50|   549k|    return true;
   51|   549k|  }
   52|       |  // No progress was made, no further processing
   53|  3.66k|  return false;
   54|   553k|}
_ZN4YAML6Parser15ParseDirectivesEv:
   56|   558k|void Parser::ParseDirectives() {
   57|   558k|  bool readDirective = false;
   58|       |
   59|   569k|  while (!m_pScanner->empty()) {
  ------------------
  |  Branch (59:10): [True: 565k, False: 3.71k]
  ------------------
   60|   565k|    Token& token = m_pScanner->peek();
   61|   565k|    if (token.type != Token::DIRECTIVE) {
  ------------------
  |  Branch (61:9): [True: 554k, False: 10.7k]
  ------------------
   62|   554k|      break;
   63|   554k|    }
   64|       |
   65|       |    // we keep the directives from the last document if none are specified;
   66|       |    // but if any directives are specific, then we reset them
   67|  10.7k|    if (!readDirective) {
  ------------------
  |  Branch (67:9): [True: 3.47k, False: 7.32k]
  ------------------
   68|  3.47k|      m_pDirectives.reset(new Directives);
   69|  3.47k|    }
   70|       |
   71|  10.7k|    readDirective = true;
   72|  10.7k|    HandleDirective(token);
   73|  10.7k|    m_pScanner->pop();
   74|  10.7k|  }
   75|   558k|}
_ZN4YAML6Parser15HandleDirectiveERKNS_5TokenE:
   77|  10.7k|void Parser::HandleDirective(const Token& token) {
   78|  10.7k|  if (token.value == "YAML") {
  ------------------
  |  Branch (78:7): [True: 1.26k, False: 9.53k]
  ------------------
   79|  1.26k|    HandleYamlDirective(token);
   80|  9.53k|  } else if (token.value == "TAG") {
  ------------------
  |  Branch (80:14): [True: 5.48k, False: 4.04k]
  ------------------
   81|  5.48k|    HandleTagDirective(token);
   82|  5.48k|  }
   83|  10.7k|}
_ZN4YAML6Parser19HandleYamlDirectiveERKNS_5TokenE:
   85|  1.26k|void Parser::HandleYamlDirective(const Token& token) {
   86|  1.26k|  if (token.params.size() != 1) {
  ------------------
  |  Branch (86:7): [True: 26, False: 1.24k]
  ------------------
   87|     26|    throw ParserException(token.mark, ErrorMsg::YAML_DIRECTIVE_ARGS);
   88|     26|  }
   89|       |
   90|  1.24k|  if (!m_pDirectives->version.isDefault) {
  ------------------
  |  Branch (90:7): [True: 3, False: 1.24k]
  ------------------
   91|      3|    throw ParserException(token.mark, ErrorMsg::REPEATED_YAML_DIRECTIVE);
   92|      3|  }
   93|       |
   94|  1.24k|  std::stringstream str(token.params[0]);
   95|  1.24k|  str.imbue(std::locale::classic());
   96|  1.24k|  str >> m_pDirectives->version.major;
   97|  1.24k|  str.get();
   98|  1.24k|  str >> m_pDirectives->version.minor;
   99|  1.24k|  if (!str || str.peek() != EOF) {
  ------------------
  |  Branch (99:7): [True: 15, False: 1.22k]
  |  Branch (99:15): [True: 14, False: 1.21k]
  ------------------
  100|     29|    throw ParserException(
  101|     29|        token.mark, std::string(ErrorMsg::YAML_VERSION) + token.params[0]);
  102|     29|  }
  103|       |
  104|  1.21k|  if (m_pDirectives->version.major > 1) {
  ------------------
  |  Branch (104:7): [True: 13, False: 1.19k]
  ------------------
  105|     13|    throw ParserException(token.mark, ErrorMsg::YAML_MAJOR_VERSION);
  106|     13|  }
  107|       |
  108|  1.19k|  m_pDirectives->version.isDefault = false;
  109|       |  // TODO: warning on major == 1, minor > 2?
  110|  1.19k|}
_ZN4YAML6Parser18HandleTagDirectiveERKNS_5TokenE:
  112|  5.48k|void Parser::HandleTagDirective(const Token& token) {
  113|  5.48k|  if (token.params.size() != 2)
  ------------------
  |  Branch (113:7): [True: 22, False: 5.46k]
  ------------------
  114|     22|    throw ParserException(token.mark, ErrorMsg::TAG_DIRECTIVE_ARGS);
  115|       |
  116|  5.46k|  const std::string& handle = token.params[0];
  117|  5.46k|  const std::string& prefix = token.params[1];
  118|  5.46k|  if (m_pDirectives->tags.find(handle) != m_pDirectives->tags.end()) {
  ------------------
  |  Branch (118:7): [True: 8, False: 5.45k]
  ------------------
  119|      8|    throw ParserException(token.mark, ErrorMsg::REPEATED_TAG_DIRECTIVE);
  120|      8|  }
  121|       |
  122|  5.45k|  m_pDirectives->tags[handle] = prefix;
  123|  5.45k|}

_ZN4YAML10ptr_vectorINS_7Scanner12IndentMarkerEEC2Ev:
   21|  6.52k|  ptr_vector() : m_data{} {}
_ZN4YAML10ptr_vectorINS_7Scanner12IndentMarkerEE9push_backEONSt3__110unique_ptrIS2_NS4_14default_deleteIS2_EEEE:
   32|  7.99M|  void push_back(std::unique_ptr<T>&& t) { m_data.push_back(std::move(t)); }
_ZN4YAML10ptr_vectorINS_7Scanner12IndentMarkerEE4backEv:
   36|  7.99M|  T& back() { return *(m_data.back().get()); }

_ZN4YAML5RegExC2ENS_8REGEX_OPE:
    6|  3.40k|RegEx::RegEx(REGEX_OP op) : m_op(op), m_a(0), m_z(0), m_params{} {}
_ZN4YAML5RegExC2Ev:
    7|      9|RegEx::RegEx() : RegEx(REGEX_EMPTY) {}
_ZN4YAML5RegExC2Ec:
    9|  8.79k|RegEx::RegEx(char ch) : m_op(REGEX_MATCH), m_a(ch), m_z(0), m_params{} {}
_ZN4YAML5RegExC2Ecc:
   11|      5|RegEx::RegEx(char a, char z) : m_op(REGEX_RANGE), m_a(a), m_z(z), m_params{} {}
_ZN4YAML5RegExC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_8REGEX_OPE:
   14|     16|    : m_op(op), m_a(0), m_z(0), m_params(str.begin(), str.end()) {}
_ZN4YAMLntERKNS_5RegExE:
   17|  1.67k|RegEx operator!(const RegEx& ex) {
   18|  1.67k|  RegEx ret(REGEX_NOT);
   19|  1.67k|  ret.m_params.push_back(ex);
   20|  1.67k|  return ret;
   21|  1.67k|}
_ZN4YAMLorERKNS_5RegExES2_:
   23|     36|RegEx operator|(const RegEx& ex1, const RegEx& ex2) {
   24|     36|  RegEx ret(REGEX_OR);
   25|     36|  ret.m_params.push_back(ex1);
   26|     36|  ret.m_params.push_back(ex2);
   27|     36|  return ret;
   28|     36|}
_ZN4YAMLanERKNS_5RegExES2_:
   30|  1.66k|RegEx operator&(const RegEx& ex1, const RegEx& ex2) {
   31|  1.66k|  RegEx ret(REGEX_AND);
   32|  1.66k|  ret.m_params.push_back(ex1);
   33|  1.66k|  ret.m_params.push_back(ex2);
   34|  1.66k|  return ret;
   35|  1.66k|}
_ZN4YAMLplERKNS_5RegExES2_:
   37|     20|RegEx operator+(const RegEx& ex1, const RegEx& ex2) {
   38|     20|  RegEx ret(REGEX_SEQ);
   39|     20|  ret.m_params.push_back(ex1);
   40|     20|  ret.m_params.push_back(ex2);
   41|     20|  return ret;
   42|     20|}

_ZN4YAML5RegExD2Ev:
   37|  70.0M|  ~RegEx() = default;

_ZNK4YAML5RegEx7MatchesERKNS_6StreamE:
   26|   495M|inline bool RegEx::Matches(const Stream& in) const { return Match(in) >= 0; }
_ZNK4YAML5RegEx5MatchERKNS_6StreamE:
   49|   546M|inline int RegEx::Match(const Stream& in) const {
   50|   546M|  StreamCharSource source(in);
   51|   546M|  return Match(source);
   52|   546M|}
_ZNK4YAML5RegEx5MatchINS_16StreamCharSourceEEEiRKT_:
   72|  1.15G|inline int RegEx::Match(const Source& source) const {
   73|  1.15G|  return IsValidSource(source) ? MatchUnchecked(source) : -1;
  ------------------
  |  Branch (73:10): [True: 1.15G, False: 0]
  ------------------
   74|  1.15G|}
_ZNK4YAML5RegEx13IsValidSourceINS_16StreamCharSourceEEEbRKT_:
   55|  1.15G|inline bool RegEx::IsValidSource(const Source& source) const {
   56|  1.15G|  return source;
   57|  1.15G|}
_ZNK4YAML5RegEx14MatchUncheckedINS_16StreamCharSourceEEEiRKT_:
   77|  3.62G|inline int RegEx::MatchUnchecked(const Source& source) const {
   78|  3.62G|  switch (m_op) {
  ------------------
  |  Branch (78:11): [True: 3.62G, False: 0]
  ------------------
   79|  20.1M|    case REGEX_EMPTY:
  ------------------
  |  Branch (79:5): [True: 20.1M, False: 3.60G]
  ------------------
   80|  20.1M|      return MatchOpEmpty(source);
   81|  1.85G|    case REGEX_MATCH:
  ------------------
  |  Branch (81:5): [True: 1.85G, False: 1.76G]
  ------------------
   82|  1.85G|      return MatchOpMatch(source);
   83|  20.7M|    case REGEX_RANGE:
  ------------------
  |  Branch (83:5): [True: 20.7M, False: 3.60G]
  ------------------
   84|  20.7M|      return MatchOpRange(source);
   85|  1.17G|    case REGEX_OR:
  ------------------
  |  Branch (85:5): [True: 1.17G, False: 2.45G]
  ------------------
   86|  1.17G|      return MatchOpOr(source);
   87|  11.7M|    case REGEX_AND:
  ------------------
  |  Branch (87:5): [True: 11.7M, False: 3.61G]
  ------------------
   88|  11.7M|      return MatchOpAnd(source);
   89|  31.7M|    case REGEX_NOT:
  ------------------
  |  Branch (89:5): [True: 31.7M, False: 3.59G]
  ------------------
   90|  31.7M|      return MatchOpNot(source);
   91|   512M|    case REGEX_SEQ:
  ------------------
  |  Branch (91:5): [True: 512M, False: 3.11G]
  ------------------
   92|   512M|      return MatchOpSeq(source);
   93|  3.62G|  }
   94|       |
   95|      0|  return -1;
   96|  3.62G|}
_ZNK4YAML5RegEx12MatchOpEmptyINS_16StreamCharSourceEEEiRKT_:
  106|  20.1M|inline int RegEx::MatchOpEmpty(const Source& source) const {
  107|  20.1M|  return source[0] == Stream::eof() ? 0 : -1;
  ------------------
  |  Branch (107:10): [True: 1.94M, False: 18.2M]
  ------------------
  108|  20.1M|}
_ZNK4YAML5RegEx12MatchOpMatchINS_16StreamCharSourceEEEiRKT_:
  119|  1.85G|inline int RegEx::MatchOpMatch(const Source& source) const {
  120|  1.85G|  if (source[0] != m_a)
  ------------------
  |  Branch (120:7): [True: 1.68G, False: 170M]
  ------------------
  121|  1.68G|    return -1;
  122|   170M|  return 1;
  123|  1.85G|}
_ZNK4YAML5RegEx12MatchOpRangeINS_16StreamCharSourceEEEiRKT_:
  127|  20.7M|inline int RegEx::MatchOpRange(const Source& source) const {
  128|  20.7M|  if (m_a > source[0] || m_z < source[0])
  ------------------
  |  Branch (128:7): [True: 16.1M, False: 4.62M]
  |  Branch (128:26): [True: 94.5k, False: 4.52M]
  ------------------
  129|  16.2M|    return -1;
  130|  4.52M|  return 1;
  131|  20.7M|}
_ZNK4YAML5RegEx9MatchOpOrINS_16StreamCharSourceEEEiRKT_:
  135|  1.17G|inline int RegEx::MatchOpOr(const Source& source) const {
  136|  2.43G|  for (const RegEx& param : m_params) {
  ------------------
  |  Branch (136:27): [True: 2.43G, False: 998M]
  ------------------
  137|  2.43G|    int n = param.MatchUnchecked(source);
  138|  2.43G|    if (n >= 0)
  ------------------
  |  Branch (138:9): [True: 173M, False: 2.25G]
  ------------------
  139|   173M|      return n;
  140|  2.43G|  }
  141|   998M|  return -1;
  142|  1.17G|}
_ZNK4YAML5RegEx10MatchOpAndINS_16StreamCharSourceEEEiRKT_:
  149|  11.7M|inline int RegEx::MatchOpAnd(const Source& source) const {
  150|  11.7M|  int first = -1;
  151|  11.7M|  for (std::size_t i = 0; i < m_params.size(); i++) {
  ------------------
  |  Branch (151:27): [True: 11.7M, False: 3.06k]
  ------------------
  152|  11.7M|    int n = m_params[i].MatchUnchecked(source);
  153|  11.7M|    if (n == -1)
  ------------------
  |  Branch (153:9): [True: 11.7M, False: 6.73k]
  ------------------
  154|  11.7M|      return -1;
  155|  6.73k|    if (i == 0)
  ------------------
  |  Branch (155:9): [True: 3.66k, False: 3.06k]
  ------------------
  156|  3.66k|      first = n;
  157|  6.73k|  }
  158|  3.06k|  return first;
  159|  11.7M|}
_ZNK4YAML5RegEx10MatchOpNotINS_16StreamCharSourceEEEiRKT_:
  163|  31.7M|inline int RegEx::MatchOpNot(const Source& source) const {
  164|  31.7M|  if (m_params.empty())
  ------------------
  |  Branch (164:7): [True: 0, False: 31.7M]
  ------------------
  165|      0|    return -1;
  166|  31.7M|  if (m_params[0].MatchUnchecked(source) >= 0)
  ------------------
  |  Branch (166:7): [True: 252k, False: 31.4M]
  ------------------
  167|   252k|    return -1;
  168|  31.4M|  return 1;
  169|  31.7M|}
_ZNK4YAML5RegEx10MatchOpSeqINS_16StreamCharSourceEEEiRKT_:
  173|   512M|inline int RegEx::MatchOpSeq(const Source& source) const {
  174|   512M|  int offset = 0;
  175|   605M|  for (const RegEx& param : m_params) {
  ------------------
  |  Branch (175:27): [True: 605M, False: 9.81M]
  ------------------
  176|   605M|    int n = param.Match(source + offset);  // note Match, not
  177|       |                                           // MatchUnchecked because we
  178|       |                                           // need to check validity after
  179|       |                                           // the offset
  180|   605M|    if (n == -1)
  ------------------
  |  Branch (180:9): [True: 502M, False: 102M]
  ------------------
  181|   502M|      return -1;
  182|   102M|    offset += n;
  183|   102M|  }
  184|       |
  185|  9.81M|  return offset;
  186|   512M|}
_ZNK4YAML5RegEx7MatchesEc:
   16|    667|inline bool RegEx::Matches(char ch) const {
   17|    667|  std::string str;
   18|    667|  str += ch;
   19|    667|  return Matches(str);
   20|    667|}
_ZNK4YAML5RegEx7MatchesERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   22|    667|inline bool RegEx::Matches(const std::string& str) const {
   23|    667|  return Match(str) >= 0;
   24|    667|}
_ZNK4YAML5RegEx5MatchERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   44|    667|inline int RegEx::Match(const std::string& str) const {
   45|    667|  StringCharSource source(str.c_str(), str.size());
   46|    667|  return Match(source);
   47|    667|}
_ZNK4YAML5RegEx13IsValidSourceINS_16StringCharSourceEEEbRKT_:
   61|    667|    const StringCharSource& source) const {
   62|    667|  switch (m_op) {
   63|      0|    case REGEX_MATCH:
  ------------------
  |  Branch (63:5): [True: 0, False: 667]
  ------------------
   64|    667|    case REGEX_RANGE:
  ------------------
  |  Branch (64:5): [True: 667, False: 0]
  ------------------
   65|    667|      return source;
   66|      0|    default:
  ------------------
  |  Branch (66:5): [True: 0, False: 667]
  ------------------
   67|      0|      return true;
   68|    667|  }
   69|    667|}
_ZNK4YAML5RegEx5MatchINS_16StringCharSourceEEEiRKT_:
   72|    667|inline int RegEx::Match(const Source& source) const {
   73|    667|  return IsValidSource(source) ? MatchUnchecked(source) : -1;
  ------------------
  |  Branch (73:10): [True: 667, False: 0]
  ------------------
   74|    667|}
_ZNK4YAML5RegEx14MatchUncheckedINS_16StringCharSourceEEEiRKT_:
   77|    667|inline int RegEx::MatchUnchecked(const Source& source) const {
   78|    667|  switch (m_op) {
  ------------------
  |  Branch (78:11): [True: 667, False: 0]
  ------------------
   79|      0|    case REGEX_EMPTY:
  ------------------
  |  Branch (79:5): [True: 0, False: 667]
  ------------------
   80|      0|      return MatchOpEmpty(source);
   81|      0|    case REGEX_MATCH:
  ------------------
  |  Branch (81:5): [True: 0, False: 667]
  ------------------
   82|      0|      return MatchOpMatch(source);
   83|    667|    case REGEX_RANGE:
  ------------------
  |  Branch (83:5): [True: 667, False: 0]
  ------------------
   84|    667|      return MatchOpRange(source);
   85|      0|    case REGEX_OR:
  ------------------
  |  Branch (85:5): [True: 0, False: 667]
  ------------------
   86|      0|      return MatchOpOr(source);
   87|      0|    case REGEX_AND:
  ------------------
  |  Branch (87:5): [True: 0, False: 667]
  ------------------
   88|      0|      return MatchOpAnd(source);
   89|      0|    case REGEX_NOT:
  ------------------
  |  Branch (89:5): [True: 0, False: 667]
  ------------------
   90|      0|      return MatchOpNot(source);
   91|      0|    case REGEX_SEQ:
  ------------------
  |  Branch (91:5): [True: 0, False: 667]
  ------------------
   92|      0|      return MatchOpSeq(source);
   93|    667|  }
   94|       |
   95|      0|  return -1;
   96|    667|}
_ZNK4YAML5RegEx12MatchOpRangeINS_16StringCharSourceEEEiRKT_:
  127|    667|inline int RegEx::MatchOpRange(const Source& source) const {
  128|    667|  if (m_a > source[0] || m_z < source[0])
  ------------------
  |  Branch (128:7): [True: 0, False: 667]
  |  Branch (128:26): [True: 0, False: 667]
  ------------------
  129|      0|    return -1;
  130|    667|  return 1;
  131|    667|}

_ZN4YAML7ScannerC2ERNSt3__113basic_istreamIcNS1_11char_traitsIcEEEE:
   24|  6.52k|    : INPUT(in),
   25|  6.52k|      m_tokens{},
   26|  6.52k|      m_startedStream(false),
   27|  6.52k|      m_endedStream(false),
   28|  6.52k|      m_simpleKeyAllowed(false),
   29|  6.52k|      m_scalarValueAllowed(false),
   30|  6.52k|      m_canBeJSONFlow(false),
   31|  6.52k|      m_simpleKeys{},
   32|  6.52k|      m_indents{},
   33|  6.52k|      m_indentRefs{},
   34|  6.52k|      m_flows{} {}
_ZN4YAML7ScannerD2Ev:
   36|  6.52k|Scanner::~Scanner() = default;
_ZN4YAML7Scanner5emptyEv:
   38|  12.7M|bool Scanner::empty() {
   39|  12.7M|  EnsureTokensInQueue();
   40|  12.7M|  return m_tokens.empty();
   41|  12.7M|}
_ZN4YAML7Scanner3popEv:
   43|  3.12M|void Scanner::pop() {
   44|  3.12M|  EnsureTokensInQueue();
   45|  3.12M|  if (!m_tokens.empty())
  ------------------
  |  Branch (45:7): [True: 3.12M, False: 0]
  ------------------
   46|  3.12M|    m_tokens.pop();
   47|  3.12M|}
_ZN4YAML7Scanner4peekEv:
   49|  18.8M|Token& Scanner::peek() {
   50|  18.8M|  EnsureTokensInQueue();
   51|  18.8M|  assert(!m_tokens.empty());  // should we be asserting here? I mean, we really
   52|       |                              // just be checking
   53|       |                              // if it's empty before peeking.
   54|       |
   55|       |#if 0
   56|       |		static Token *pLast = 0;
   57|       |		if(pLast != &m_tokens.front())
   58|       |			std::cerr << "peek: " << m_tokens.front() << "\n";
   59|       |		pLast = &m_tokens.front();
   60|       |#endif
   61|       |
   62|  18.8M|  return m_tokens.front();
   63|  18.8M|}
_ZNK4YAML7Scanner4markEv:
   65|  2.08M|Mark Scanner::mark() const { return INPUT.mark(); }
_ZN4YAML7Scanner19EnsureTokensInQueueEv:
   67|  34.7M|void Scanner::EnsureTokensInQueue() {
   68|  96.9M|  while (true) {
  ------------------
  |  Branch (68:10): [True: 96.9M, Folded]
  ------------------
   69|  96.9M|    if (!m_tokens.empty()) {
  ------------------
  |  Branch (69:9): [True: 95.7M, False: 1.11M]
  ------------------
   70|  95.7M|      Token& token = m_tokens.front();
   71|       |
   72|       |      // if this guy's valid, then we're done
   73|  95.7M|      if (token.status == Token::VALID) {
  ------------------
  |  Branch (73:11): [True: 34.0M, False: 61.7M]
  ------------------
   74|  34.0M|        return;
   75|  34.0M|      }
   76|       |
   77|       |      // here's where we clean up the impossible tokens
   78|  61.7M|      if (token.status == Token::INVALID) {
  ------------------
  |  Branch (78:11): [True: 271k, False: 61.4M]
  ------------------
   79|   271k|        m_tokens.pop();
   80|   271k|        continue;
   81|   271k|      }
   82|       |
   83|       |      // note: what's left are the unverified tokens
   84|  61.7M|    }
   85|       |
   86|       |    // no token? maybe we've actually finished
   87|  62.5M|    if (m_endedStream) {
  ------------------
  |  Branch (87:9): [True: 645k, False: 61.9M]
  ------------------
   88|   645k|      return;
   89|   645k|    }
   90|       |
   91|       |    // no? then scan...
   92|  61.9M|    ScanNextToken();
   93|  61.9M|  }
   94|  34.7M|}
_ZN4YAML7Scanner13ScanNextTokenEv:
   96|  61.9M|void Scanner::ScanNextToken() {
   97|  61.9M|  if (m_endedStream) {
  ------------------
  |  Branch (97:7): [True: 0, False: 61.9M]
  ------------------
   98|      0|    return;
   99|      0|  }
  100|       |
  101|  61.9M|  if (!m_startedStream) {
  ------------------
  |  Branch (101:7): [True: 6.52k, False: 61.9M]
  ------------------
  102|  6.52k|    return StartStream();
  103|  6.52k|  }
  104|       |
  105|       |  // get rid of whitespace, etc. (in between tokens it should be irrelevant)
  106|  61.9M|  ScanToNextToken();
  107|       |
  108|       |  // maybe need to end some blocks
  109|  61.9M|  PopIndentToHere();
  110|       |
  111|       |  // *****
  112|       |  // And now branch based on the next few characters!
  113|       |  // *****
  114|       |
  115|       |  // end of stream
  116|  61.9M|  if (!INPUT) {
  ------------------
  |  Branch (116:7): [True: 5.40k, False: 61.8M]
  ------------------
  117|  5.40k|    return EndStream();
  118|  5.40k|  }
  119|       |
  120|  61.8M|  if (INPUT.column() == 0 && INPUT.peek() == Keys::Directive) {
  ------------------
  |  Branch (120:7): [True: 1.99M, False: 59.9M]
  |  Branch (120:30): [True: 11.7k, False: 1.98M]
  ------------------
  121|  11.7k|    return ScanDirective();
  122|  11.7k|  }
  123|       |
  124|       |  // document token
  125|  61.8M|  if (INPUT.column() == 0 && Exp::DocStart().Matches(INPUT)) {
  ------------------
  |  Branch (125:7): [True: 1.98M, False: 59.9M]
  |  Branch (125:30): [True: 436k, False: 1.54M]
  ------------------
  126|   436k|    return ScanDocStart();
  127|   436k|  }
  128|       |
  129|  61.4M|  if (INPUT.column() == 0 && Exp::DocEnd().Matches(INPUT)) {
  ------------------
  |  Branch (129:7): [True: 1.54M, False: 59.9M]
  |  Branch (129:30): [True: 173k, False: 1.37M]
  ------------------
  130|   173k|    return ScanDocEnd();
  131|   173k|  }
  132|       |
  133|       |  // flow start/end/entry
  134|  61.2M|  if (INPUT.peek() == Keys::FlowSeqStart ||
  ------------------
  |  Branch (134:7): [True: 32.9M, False: 28.2M]
  ------------------
  135|  48.1M|      INPUT.peek() == Keys::FlowMapStart) {
  ------------------
  |  Branch (135:7): [True: 15.1M, False: 13.1M]
  ------------------
  136|  48.1M|    return ScanFlowStart();
  137|  48.1M|  }
  138|       |
  139|  13.1M|  if (INPUT.peek() == Keys::FlowSeqEnd || INPUT.peek() == Keys::FlowMapEnd) {
  ------------------
  |  Branch (139:7): [True: 23.9k, False: 13.0M]
  |  Branch (139:43): [True: 822k, False: 12.2M]
  ------------------
  140|   846k|    return ScanFlowEnd();
  141|   846k|  }
  142|       |
  143|  12.2M|  if (INPUT.peek() == Keys::FlowEntry) {
  ------------------
  |  Branch (143:7): [True: 2.36M, False: 9.90M]
  ------------------
  144|       |    // values starting with `,` are not allowed.
  145|       |    // eg: reject `,foo`
  146|  2.36M|    if (INPUT.column() == 0) {
  ------------------
  |  Branch (146:9): [True: 7, False: 2.36M]
  ------------------
  147|      7|      throw ParserException(INPUT.mark(), ErrorMsg::UNEXPECTED_FLOW);
  148|      7|    }
  149|       |    // if we already parsed a quoted scalar value and we are not in a flow,
  150|       |    // then `,` is not a valid character.
  151|       |    // eg: reject `"foo",`
  152|  2.36M|    if (!m_scalarValueAllowed) {
  ------------------
  |  Branch (152:9): [True: 3, False: 2.36M]
  ------------------
  153|      3|      throw ParserException(INPUT.mark(), ErrorMsg::UNEXPECTED_SCALAR);
  154|      3|    }
  155|  2.36M|    return ScanFlowEntry();
  156|  2.36M|  }
  157|       |
  158|       |  // block/map stuff
  159|  9.90M|  if (Exp::BlockEntry().Matches(INPUT)) {
  ------------------
  |  Branch (159:7): [True: 1.11M, False: 8.78M]
  ------------------
  160|  1.11M|    return ScanBlockEntry();
  161|  1.11M|  }
  162|       |
  163|  8.78M|  if ((InBlockContext() ? Exp::Key() : Exp::KeyInFlow()).Matches(INPUT)) {
  ------------------
  |  Branch (163:7): [True: 42.1k, False: 8.74M]
  |  Branch (163:8): [True: 7.38M, False: 1.40M]
  ------------------
  164|  42.1k|    return ScanKey();
  165|  42.1k|  }
  166|       |
  167|  8.74M|  if (GetValueRegex().Matches(INPUT)) {
  ------------------
  |  Branch (167:7): [True: 5.52M, False: 3.21M]
  ------------------
  168|  5.52M|    return ScanValue();
  169|  5.52M|  }
  170|       |
  171|       |  // alias/anchor
  172|  3.21M|  if (INPUT.peek() == Keys::Alias || INPUT.peek() == Keys::Anchor) {
  ------------------
  |  Branch (172:7): [True: 5.01k, False: 3.21M]
  |  Branch (172:38): [True: 247k, False: 2.96M]
  ------------------
  173|   252k|    return ScanAnchorOrAlias();
  174|   252k|  }
  175|       |
  176|       |  // tag
  177|  2.96M|  if (INPUT.peek() == Keys::Tag) {
  ------------------
  |  Branch (177:7): [True: 773k, False: 2.19M]
  ------------------
  178|   773k|    return ScanTag();
  179|   773k|  }
  180|       |
  181|       |  // special scalars
  182|  2.19M|  if (InBlockContext() && (INPUT.peek() == Keys::LiteralScalar ||
  ------------------
  |  Branch (182:7): [True: 1.10M, False: 1.08M]
  |  Branch (182:28): [True: 673, False: 1.10M]
  ------------------
  183|  1.10M|                           INPUT.peek() == Keys::FoldedScalar)) {
  ------------------
  |  Branch (183:28): [True: 4.69k, False: 1.09M]
  ------------------
  184|       |    // if we begin parsing a literal scalar with an unverified potential 
  185|       |    // simple key pushed, that may be a tag to the literal scalar, and
  186|       |    // should be removed to avoid wrong indentation limit
  187|       |    // eg:
  188|       |    // - !!str |
  189|       |    //  literal
  190|       |    //  scalar
  191|  5.36k|    if (!m_simpleKeys.empty() &&
  ------------------
  |  Branch (191:9): [True: 981, False: 4.38k]
  ------------------
  192|    981|      m_simpleKeys.top().pKey->status == Token::UNVERIFIED) {
  ------------------
  |  Branch (192:7): [True: 981, False: 0]
  ------------------
  193|       |      // if the top of the indents does not match the unverified simple key,
  194|       |      // just invalidate the simple key and do not pop indent to avoid crash.
  195|       |      // eg: an unverified key crossing lines, like issue #1475.
  196|    981|      if (m_simpleKeys.top().pIndent && !m_indents.empty() &&
  ------------------
  |  Branch (196:11): [True: 647, False: 334]
  |  Branch (196:41): [True: 647, False: 0]
  ------------------
  197|    647|          m_indents.top() == m_simpleKeys.top().pIndent) {
  ------------------
  |  Branch (197:11): [True: 453, False: 194]
  ------------------
  198|    453|        PopIndent();
  199|    528|      } else {
  200|    528|        InvalidateSimpleKey();
  201|    528|      }
  202|    981|    }
  203|  5.36k|    return ScanBlockScalar();
  204|  5.36k|  }
  205|       |
  206|       |  // if we already parsed a quoted scalar value in this line,
  207|       |  // another scalar value is an error.
  208|       |  // eg: reject `"foo" "bar"`
  209|  2.18M|  if (!m_scalarValueAllowed) {
  ------------------
  |  Branch (209:7): [True: 35, False: 2.18M]
  ------------------
  210|     35|    throw ParserException(INPUT.mark(), ErrorMsg::UNEXPECTED_SCALAR);
  211|     35|  }
  212|       |
  213|  2.18M|  if (INPUT.peek() == '\'' || INPUT.peek() == '\"') {
  ------------------
  |  Branch (213:7): [True: 1.66k, False: 2.18M]
  |  Branch (213:31): [True: 6.99k, False: 2.17M]
  ------------------
  214|  8.66k|    return ScanQuotedScalar();
  215|  8.66k|  }
  216|       |
  217|       |  // plain scalars
  218|  2.17M|  if ((InBlockContext() ? Exp::PlainScalar() : Exp::PlainScalarInFlow())
  ------------------
  |  Branch (218:7): [True: 2.17M, False: 44]
  |  Branch (218:8): [True: 1.09M, False: 1.07M]
  ------------------
  219|  2.17M|          .Matches(INPUT)) {
  220|  2.17M|    return ScanPlainScalar();
  221|  2.17M|  }
  222|       |
  223|       |  // don't know what it is!
  224|     44|  throw ParserException(INPUT.mark(), ErrorMsg::UNKNOWN_TOKEN);
  225|  2.17M|}
_ZN4YAML7Scanner15ScanToNextTokenEv:
  227|  61.9M|void Scanner::ScanToNextToken() {
  228|  68.8M|  while (true) {
  ------------------
  |  Branch (228:10): [True: 68.8M, Folded]
  ------------------
  229|       |    // first eat whitespace
  230|  69.0M|    while (INPUT && IsWhitespaceToBeEaten(INPUT.peek())) {
  ------------------
  |  Branch (230:12): [True: 69.0M, False: 5.34k]
  |  Branch (230:21): [True: 230k, False: 68.8M]
  ------------------
  231|   230k|      if (InBlockContext() && Exp::Tab().Matches(INPUT)) {
  ------------------
  |  Branch (231:11): [True: 179k, False: 50.1k]
  |  Branch (231:31): [True: 1.54k, False: 178k]
  ------------------
  232|  1.54k|        m_simpleKeyAllowed = false;
  233|  1.54k|      }
  234|   230k|      INPUT.eat(1);
  235|   230k|    }
  236|       |
  237|       |    // then eat a comment
  238|  68.8M|    if (Exp::Comment().Matches(INPUT)) {
  ------------------
  |  Branch (238:9): [True: 2.18k, False: 68.8M]
  ------------------
  239|       |      // eat until line break
  240|  5.28M|      while (INPUT && !Exp::Break().Matches(INPUT)) {
  ------------------
  |  Branch (240:14): [True: 5.28M, False: 66]
  |  Branch (240:23): [True: 5.28M, False: 2.11k]
  ------------------
  241|  5.28M|        INPUT.eat(1);
  242|  5.28M|      }
  243|  2.18k|    }
  244|       |
  245|       |    // if it's NOT a line break, then we're done!
  246|  68.8M|    if (!Exp::Break().Matches(INPUT)) {
  ------------------
  |  Branch (246:9): [True: 61.9M, False: 6.90M]
  ------------------
  247|  61.9M|      break;
  248|  61.9M|    }
  249|       |
  250|       |    // otherwise, let's eat the line break and keep going
  251|  6.90M|    int n = Exp::Break().Match(INPUT);
  252|  6.90M|    INPUT.eat(n);
  253|       |
  254|       |    // oh yeah, and let's get rid of that simple key
  255|  6.90M|    InvalidateSimpleKey();
  256|       |
  257|       |    // new line - we accept a scalar value now
  258|  6.90M|    m_scalarValueAllowed = true;
  259|       |
  260|       |    // new line - we may be able to accept a simple key now
  261|  6.90M|    if (InBlockContext()) {
  ------------------
  |  Branch (261:9): [True: 6.87M, False: 27.5k]
  ------------------
  262|  6.87M|      m_simpleKeyAllowed = true;
  263|  6.87M|    }
  264|  6.90M|  }
  265|  61.9M|}
_ZNK4YAML7Scanner13GetValueRegexEv:
  270|  8.74M|const RegEx& Scanner::GetValueRegex() const {
  271|  8.74M|  if (InBlockContext()) {
  ------------------
  |  Branch (271:7): [True: 7.37M, False: 1.37M]
  ------------------
  272|  7.37M|    return Exp::Value();
  273|  7.37M|  }
  274|       |
  275|  1.37M|  return m_canBeJSONFlow ? Exp::ValueInJSONFlow() : Exp::ValueInFlow();
  ------------------
  |  Branch (275:10): [True: 9.55k, False: 1.36M]
  ------------------
  276|  8.74M|}
_ZN4YAML7Scanner11StartStreamEv:
  278|  6.52k|void Scanner::StartStream() {
  279|  6.52k|  m_startedStream = true;
  280|  6.52k|  m_simpleKeyAllowed = true;
  281|  6.52k|  m_scalarValueAllowed = true;
  282|  6.52k|  std::unique_ptr<IndentMarker> pIndent(
  283|  6.52k|      new IndentMarker(-1, IndentMarker::NONE));
  284|  6.52k|  m_indentRefs.push_back(std::move(pIndent));
  285|  6.52k|  m_indents.push(&m_indentRefs.back());
  286|  6.52k|}
_ZN4YAML7Scanner9EndStreamEv:
  288|  5.40k|void Scanner::EndStream() {
  289|       |  // force newline
  290|  5.40k|  if (INPUT.column() > 0) {
  ------------------
  |  Branch (290:7): [True: 4.97k, False: 430]
  ------------------
  291|  4.97k|    INPUT.ResetColumn();
  292|  4.97k|  }
  293|       |
  294|  5.40k|  PopAllIndents();
  295|  5.40k|  PopAllSimpleKeys();
  296|       |
  297|  5.40k|  m_simpleKeyAllowed = false;
  298|  5.40k|  m_scalarValueAllowed = false;
  299|  5.40k|  m_endedStream = true;
  300|  5.40k|}
_ZN4YAML7Scanner9PushTokenENS_5Token4TYPEE:
  302|  7.99M|Token* Scanner::PushToken(Token::TYPE type) {
  303|  7.99M|  m_tokens.push(Token(type, INPUT.mark()));
  304|  7.99M|  return &m_tokens.back();
  305|  7.99M|}
_ZN4YAML7Scanner16GetStartTokenForENS0_12IndentMarker11INDENT_TYPEE:
  307|  7.99M|Token::TYPE Scanner::GetStartTokenFor(IndentMarker::INDENT_TYPE type) {
  308|  7.99M|  switch (type) {
  ------------------
  |  Branch (308:11): [True: 7.99M, False: 0]
  ------------------
  309|  1.10M|    case IndentMarker::SEQ:
  ------------------
  |  Branch (309:5): [True: 1.10M, False: 6.88M]
  ------------------
  310|  1.10M|      return Token::BLOCK_SEQ_START;
  311|  6.88M|    case IndentMarker::MAP:
  ------------------
  |  Branch (311:5): [True: 6.88M, False: 1.10M]
  ------------------
  312|  6.88M|      return Token::BLOCK_MAP_START;
  313|      0|    case IndentMarker::NONE:
  ------------------
  |  Branch (313:5): [True: 0, False: 7.99M]
  ------------------
  314|      0|      assert(false);
  315|      0|      break;
  316|  7.99M|  }
  317|  7.99M|  assert(false);
  318|      0|  throw std::runtime_error("yaml-cpp: internal error, invalid indent type");
  319|  7.99M|}
_ZN4YAML7Scanner12PushIndentToEiNS0_12IndentMarker11INDENT_TYPEE:
  322|  8.03M|                                             IndentMarker::INDENT_TYPE type) {
  323|       |  // are we in flow?
  324|  8.03M|  if (InFlowContext()) {
  ------------------
  |  Branch (324:7): [True: 0, False: 8.03M]
  ------------------
  325|      0|    return nullptr;
  326|      0|  }
  327|       |
  328|  8.03M|  std::unique_ptr<IndentMarker> pIndent(new IndentMarker(column, type));
  329|  8.03M|  IndentMarker& indent = *pIndent;
  330|  8.03M|  const IndentMarker& lastIndent = *m_indents.top();
  331|       |
  332|       |  // is this actually an indentation?
  333|  8.03M|  if (indent.column < lastIndent.column) {
  ------------------
  |  Branch (333:7): [True: 0, False: 8.03M]
  ------------------
  334|      0|    return nullptr;
  335|      0|  }
  336|  8.03M|  if (indent.column == lastIndent.column &&
  ------------------
  |  Branch (336:7): [True: 53.0k, False: 7.98M]
  ------------------
  337|  53.0k|      !(indent.type == IndentMarker::SEQ &&
  ------------------
  |  Branch (337:9): [True: 8.20k, False: 44.8k]
  ------------------
  338|  48.7k|        lastIndent.type == IndentMarker::MAP)) {
  ------------------
  |  Branch (338:9): [True: 4.36k, False: 3.83k]
  ------------------
  339|  48.7k|    return nullptr;
  340|  48.7k|  }
  341|       |
  342|       |  // push a start token
  343|  7.99M|  indent.pStartToken = PushToken(GetStartTokenFor(type));
  344|       |
  345|       |  // and then the indent
  346|  7.99M|  m_indents.push(&indent);
  347|  7.99M|  m_indentRefs.push_back(std::move(pIndent));
  348|  7.99M|  return &m_indentRefs.back();
  349|  8.03M|}
_ZN4YAML7Scanner15PopIndentToHereEv:
  351|  61.9M|void Scanner::PopIndentToHere() {
  352|       |  // are we in flow?
  353|  61.9M|  if (InFlowContext()) {
  ------------------
  |  Branch (353:7): [True: 52.8M, False: 9.06M]
  ------------------
  354|  52.8M|    return;
  355|  52.8M|  }
  356|       |
  357|       |  // now pop away
  358|  10.9M|  while (!m_indents.empty()) {
  ------------------
  |  Branch (358:10): [True: 10.9M, False: 0]
  ------------------
  359|  10.9M|    const IndentMarker& indent = *m_indents.top();
  360|  10.9M|    if (indent.column < INPUT.column()) {
  ------------------
  |  Branch (360:9): [True: 8.34M, False: 2.62M]
  ------------------
  361|  8.34M|      break;
  362|  8.34M|    }
  363|  2.62M|    if (indent.column == INPUT.column() &&
  ------------------
  |  Branch (363:9): [True: 1.36M, False: 1.26M]
  ------------------
  364|  1.36M|        !(indent.type == IndentMarker::SEQ &&
  ------------------
  |  Branch (364:11): [True: 643k, False: 718k]
  ------------------
  365|   722k|          !Exp::BlockEntry().Matches(INPUT))) {
  ------------------
  |  Branch (365:11): [True: 639k, False: 3.83k]
  ------------------
  366|   722k|      break;
  367|   722k|    }
  368|       |
  369|  1.90M|    PopIndent();
  370|  1.90M|  }
  371|       |
  372|  9.80M|  while (!m_indents.empty() &&
  ------------------
  |  Branch (372:10): [True: 9.80M, False: 0]
  ------------------
  373|  9.80M|         m_indents.top()->status == IndentMarker::INVALID) {
  ------------------
  |  Branch (373:10): [True: 742k, False: 9.06M]
  ------------------
  374|   742k|    PopIndent();
  375|   742k|  }
  376|  9.06M|}
_ZN4YAML7Scanner13PopAllIndentsEv:
  378|   627k|void Scanner::PopAllIndents() {
  379|       |  // are we in flow?
  380|   627k|  if (InFlowContext()) {
  ------------------
  |  Branch (380:7): [True: 62.4k, False: 564k]
  ------------------
  381|  62.4k|    return;
  382|  62.4k|  }
  383|       |
  384|       |  // now pop away
  385|  3.53M|  while (!m_indents.empty()) {
  ------------------
  |  Branch (385:10): [True: 3.53M, False: 0]
  ------------------
  386|  3.53M|    const IndentMarker& indent = *m_indents.top();
  387|  3.53M|    if (indent.type == IndentMarker::NONE) {
  ------------------
  |  Branch (387:9): [True: 564k, False: 2.97M]
  ------------------
  388|   564k|      break;
  389|   564k|    }
  390|       |
  391|  2.97M|    PopIndent();
  392|  2.97M|  }
  393|   564k|}
_ZN4YAML7Scanner9PopIndentEv:
  395|  5.61M|void Scanner::PopIndent() {
  396|  5.61M|  if (m_indents.empty()) {
  ------------------
  |  Branch (396:7): [True: 0, False: 5.61M]
  ------------------
  397|      0|    ThrowParserException(ErrorMsg::INDENT_STACK_UNDERFLOW);
  398|      0|  }
  399|  5.61M|  const IndentMarker& indent = *m_indents.top();
  400|  5.61M|  m_indents.pop();
  401|       |
  402|  5.61M|  if (indent.status != IndentMarker::VALID) {
  ------------------
  |  Branch (402:7): [True: 1.38M, False: 4.23M]
  ------------------
  403|  1.38M|    InvalidateSimpleKey();
  404|  1.38M|    return;
  405|  1.38M|  }
  406|       |
  407|  4.23M|  if (indent.type == IndentMarker::SEQ) {
  ------------------
  |  Branch (407:7): [True: 1.05M, False: 3.17M]
  ------------------
  408|  1.05M|    m_tokens.push(Token(Token::BLOCK_SEQ_END, INPUT.mark()));
  409|  3.17M|  } else if (indent.type == IndentMarker::MAP) {
  ------------------
  |  Branch (409:14): [True: 3.17M, False: 0]
  ------------------
  410|  3.17M|    m_tokens.push(Token(Token::BLOCK_MAP_END, INPUT.mark()));
  411|  3.17M|  }
  412|  4.23M|}
_ZNK4YAML7Scanner12GetTopIndentEv:
  414|  1.10M|int Scanner::GetTopIndent() const {
  415|  1.10M|  if (m_indents.empty()) {
  ------------------
  |  Branch (415:7): [True: 0, False: 1.10M]
  ------------------
  416|      0|    return 0;
  417|      0|  }
  418|  1.10M|  return m_indents.top()->column;
  419|  1.10M|}
scanner.cpp:_ZN4YAML12_GLOBAL__N_121IsWhitespaceToBeEatenEc:
   20|  69.0M|bool IsWhitespaceToBeEaten(char ch) { return (ch == ' ') || (ch == '\t'); }
  ------------------
  |  Branch (20:46): [True: 189k, False: 68.8M]
  |  Branch (20:61): [True: 40.5k, False: 68.8M]
  ------------------

_ZN4YAML7Scanner12IndentMarkerC2EiNS1_11INDENT_TYPEE:
   50|  8.04M|        : column(column_), type(type_), status(VALID), pStartToken(nullptr) {}
_ZNK4YAML7Scanner13InFlowContextEv:
   87|  79.2M|  bool InFlowContext() const { return !m_flows.empty(); }
_ZNK4YAML7Scanner14InBlockContextEv:
   88|  91.5M|  bool InBlockContext() const { return m_flows.empty(); }
_ZNK4YAML7Scanner12GetFlowLevelEv:
   89|   104M|  std::size_t GetFlowLevel() const { return m_flows.size(); }

_ZN4YAML10ScanScalarERNS_6StreamERNS_16ScanScalarParamsE:
   21|  2.19M|std::string ScanScalar(Stream& INPUT, ScanScalarParams& params) {
   22|  2.19M|  bool foundNonEmptyLine = false;
   23|  2.19M|  bool pastOpeningBreak = (params.fold == FOLD_FLOW);
   24|  2.19M|  bool emptyLine = false, moreIndented = false;
   25|  2.19M|  int foldedNewlineCount = 0;
   26|  2.19M|  bool foldedNewlineStartedMoreIndented = false;
   27|  2.19M|  std::size_t lastEscapedChar = std::string::npos;
   28|  2.19M|  std::string scalar;
   29|  2.19M|  params.leadingSpaces = false;
   30|       |
   31|  2.19M|  if (!params.end) {
  ------------------
  |  Branch (31:7): [True: 5.31k, False: 2.18M]
  ------------------
   32|  5.31k|    params.end = &Exp::Empty();
   33|  5.31k|  }
   34|       |
   35|  18.2M|  while (INPUT) {
  ------------------
  |  Branch (35:10): [True: 18.2M, False: 903]
  ------------------
   36|       |    // ********************************
   37|       |    // Phase #1: scan until line ending
   38|       |
   39|  18.2M|    std::size_t lastNonWhitespaceChar = scalar.size();
   40|  18.2M|    bool escapedNewline = false;
   41|  91.0M|    while (!params.end->Matches(INPUT) && !Exp::Break().Matches(INPUT)) {
  ------------------
  |  Branch (41:12): [True: 89.9M, False: 1.10M]
  |  Branch (41:43): [True: 73.2M, False: 16.7M]
  ------------------
   42|  73.2M|      if (!INPUT) {
  ------------------
  |  Branch (42:11): [True: 1.79k, False: 73.1M]
  ------------------
   43|  1.79k|        break;
   44|  1.79k|      }
   45|       |
   46|       |      // document indicator?
   47|  73.1M|      if (INPUT.column() == 0 && Exp::DocIndicator().Matches(INPUT)) {
  ------------------
  |  Branch (47:11): [True: 546k, False: 72.6M]
  |  Branch (47:34): [True: 438k, False: 108k]
  ------------------
   48|   438k|        if (params.onDocIndicator == BREAK) {
  ------------------
  |  Branch (48:13): [True: 438k, False: 1]
  ------------------
   49|   438k|          break;
   50|   438k|        }
   51|      1|        if (params.onDocIndicator == THROW) {
  ------------------
  |  Branch (51:13): [True: 1, False: 0]
  ------------------
   52|      1|          throw ParserException(INPUT.mark(), ErrorMsg::DOC_IN_SCALAR);
   53|      1|        }
   54|      1|      }
   55|       |
   56|  72.7M|      foundNonEmptyLine = true;
   57|  72.7M|      pastOpeningBreak = true;
   58|       |
   59|       |      // escaped newline? (only if we're escaping on slash)
   60|  72.7M|      if (params.escape == '\\' && Exp::EscBreak().Matches(INPUT)) {
  ------------------
  |  Branch (60:11): [True: 15.4M, False: 57.3M]
  |  Branch (60:36): [True: 1.02k, False: 15.4M]
  ------------------
   61|       |        // eat escape character and get out (but preserve trailing whitespace!)
   62|  1.02k|        INPUT.get();
   63|  1.02k|        lastNonWhitespaceChar = scalar.size();
   64|  1.02k|        lastEscapedChar = scalar.size();
   65|  1.02k|        escapedNewline = true;
   66|  1.02k|        break;
   67|  1.02k|      }
   68|       |
   69|       |      // escape this?
   70|  72.7M|      if (INPUT.peek() == params.escape) {
  ------------------
  |  Branch (70:11): [True: 51.2k, False: 72.7M]
  ------------------
   71|  51.2k|        scalar += Exp::Escape(INPUT);
   72|  51.2k|        lastNonWhitespaceChar = scalar.size();
   73|  51.2k|        lastEscapedChar = scalar.size();
   74|  51.2k|        continue;
   75|  51.2k|      }
   76|       |
   77|       |      // otherwise, just add the damn character
   78|  72.7M|      char ch = INPUT.get();
   79|  72.7M|      scalar += ch;
   80|  72.7M|      if (ch != ' ' && ch != '\t') {
  ------------------
  |  Branch (80:11): [True: 72.6M, False: 68.0k]
  |  Branch (80:24): [True: 71.1M, False: 1.51M]
  ------------------
   81|  71.1M|        lastNonWhitespaceChar = scalar.size();
   82|  71.1M|      }
   83|  72.7M|    }
   84|       |
   85|       |    // eof? if we're looking to eat something, then we throw
   86|  18.2M|    if (!INPUT) {
  ------------------
  |  Branch (86:9): [True: 1.86k, False: 18.2M]
  ------------------
   87|  1.86k|      if (params.eatEnd) {
  ------------------
  |  Branch (87:11): [True: 212, False: 1.65k]
  ------------------
   88|    212|        throw ParserException(INPUT.mark(), ErrorMsg::EOF_IN_SCALAR);
   89|    212|      }
   90|  1.65k|      break;
   91|  1.86k|    }
   92|       |
   93|       |    // doc indicator?
   94|  18.2M|    if (params.onDocIndicator == BREAK && INPUT.column() == 0 &&
  ------------------
  |  Branch (94:9): [True: 9.79M, False: 8.45M]
  |  Branch (94:43): [True: 4.82M, False: 4.97M]
  ------------------
   95|  4.82M|        Exp::DocIndicator().Matches(INPUT)) {
  ------------------
  |  Branch (95:9): [True: 438k, False: 4.38M]
  ------------------
   96|   438k|      break;
   97|   438k|    }
   98|       |
   99|       |    // are we done via character match?
  100|  17.8M|    int n = params.end->Match(INPUT);
  101|  17.8M|    if (n >= 0) {
  ------------------
  |  Branch (101:9): [True: 1.10M, False: 16.7M]
  ------------------
  102|  1.10M|      if (params.eatEnd) {
  ------------------
  |  Branch (102:11): [True: 8.26k, False: 1.09M]
  ------------------
  103|  8.26k|        INPUT.eat(n);
  104|  8.26k|      }
  105|  1.10M|      break;
  106|  1.10M|    }
  107|       |
  108|       |    // do we remove trailing whitespace?
  109|  16.7M|    if (params.fold == FOLD_FLOW)
  ------------------
  |  Branch (109:9): [True: 8.29M, False: 8.41M]
  ------------------
  110|  8.29M|      scalar.erase(lastNonWhitespaceChar);
  111|       |
  112|       |    // ********************************
  113|       |    // Phase #2: eat line ending
  114|  16.7M|    n = Exp::Break().Match(INPUT);
  115|  16.7M|    INPUT.eat(n);
  116|       |
  117|       |    // ********************************
  118|       |    // Phase #3: scan initial spaces
  119|       |
  120|       |    // first the required indentation
  121|  16.7M|    while (INPUT.peek() == ' ' &&
  ------------------
  |  Branch (121:12): [True: 14.3k, False: 16.6M]
  ------------------
  122|  14.3k|           (INPUT.column() < params.indent ||
  ------------------
  |  Branch (122:13): [True: 1.67k, False: 12.6k]
  ------------------
  123|  12.6k|            (params.detectIndent && !foundNonEmptyLine)) &&
  ------------------
  |  Branch (123:14): [True: 1.21k, False: 11.4k]
  |  Branch (123:37): [True: 549, False: 666]
  ------------------
  124|  2.22k|           !params.end->Matches(INPUT)) {
  ------------------
  |  Branch (124:12): [True: 2.03k, False: 194]
  ------------------
  125|  2.03k|      INPUT.eat(1);
  126|  2.03k|    }
  127|       |
  128|       |    // update indent if we're auto-detecting
  129|  16.7M|    if (params.detectIndent && !foundNonEmptyLine) {
  ------------------
  |  Branch (129:9): [True: 8.41M, False: 8.29M]
  |  Branch (129:32): [True: 7.65M, False: 763k]
  ------------------
  130|  7.65M|      params.indent = std::max(params.indent, INPUT.column());
  131|  7.65M|    }
  132|       |
  133|       |    // and then the rest of the whitespace
  134|  16.7M|    while (Exp::Blank().Matches(INPUT)) {
  ------------------
  |  Branch (134:12): [True: 15.4k, False: 16.7M]
  ------------------
  135|       |      // we check for tabs that masquerade as indentation
  136|  15.4k|      if (INPUT.peek() == '\t' && INPUT.column() < params.indent &&
  ------------------
  |  Branch (136:11): [True: 2.76k, False: 12.6k]
  |  Branch (136:35): [True: 2, False: 2.76k]
  ------------------
  137|      2|          params.onTabInIndentation == THROW) {
  ------------------
  |  Branch (137:11): [True: 2, False: 0]
  ------------------
  138|      2|        throw ParserException(INPUT.mark(), ErrorMsg::TAB_IN_INDENTATION);
  139|      2|      }
  140|       |
  141|  15.4k|      if (!params.eatLeadingWhitespace) {
  ------------------
  |  Branch (141:11): [True: 1.78k, False: 13.6k]
  ------------------
  142|  1.78k|        break;
  143|  1.78k|      }
  144|       |
  145|  13.6k|      if (params.end->Matches(INPUT)) {
  ------------------
  |  Branch (145:11): [True: 206, False: 13.4k]
  ------------------
  146|    206|        break;
  147|    206|      }
  148|       |
  149|  13.4k|      INPUT.eat(1);
  150|  13.4k|    }
  151|       |
  152|       |    // was this an empty line?
  153|  16.7M|    bool nextEmptyLine = Exp::Break().Matches(INPUT);
  154|  16.7M|    bool nextMoreIndented = Exp::Blank().Matches(INPUT);
  155|  16.7M|    if (params.fold == FOLD_BLOCK && foldedNewlineCount == 0 && nextEmptyLine)
  ------------------
  |  Branch (155:9): [True: 8.41M, False: 8.29M]
  |  Branch (155:38): [True: 294k, False: 8.11M]
  |  Branch (155:65): [True: 7.54k, False: 286k]
  ------------------
  156|  7.54k|      foldedNewlineStartedMoreIndented = moreIndented;
  157|       |
  158|       |    // for block scalars, we always start with a newline, so we should ignore it
  159|       |    // (not fold or keep)
  160|  16.7M|    if (pastOpeningBreak) {
  ------------------
  |  Branch (160:9): [True: 16.7M, False: 5.57k]
  ------------------
  161|  16.7M|      switch (params.fold) {
  ------------------
  |  Branch (161:15): [True: 16.7M, False: 0]
  ------------------
  162|    594|        case DONT_FOLD:
  ------------------
  |  Branch (162:9): [True: 594, False: 16.7M]
  ------------------
  163|    594|          scalar += "\n";
  164|    594|          break;
  165|  8.40M|        case FOLD_BLOCK:
  ------------------
  |  Branch (165:9): [True: 8.40M, False: 8.29M]
  ------------------
  166|  8.40M|          if (!emptyLine && !nextEmptyLine && !moreIndented &&
  ------------------
  |  Branch (166:15): [True: 288k, False: 8.12M]
  |  Branch (166:29): [True: 282k, False: 5.56k]
  |  Branch (166:47): [True: 281k, False: 1.29k]
  ------------------
  167|   281k|              !nextMoreIndented && INPUT.column() >= params.indent) {
  ------------------
  |  Branch (167:15): [True: 281k, False: 238]
  |  Branch (167:36): [True: 280k, False: 815]
  ------------------
  168|   280k|            scalar += " ";
  169|  8.12M|          } else if (nextEmptyLine) {
  ------------------
  |  Branch (169:22): [True: 8.11M, False: 9.01k]
  ------------------
  170|  8.11M|            foldedNewlineCount++;
  171|  8.11M|          } else {
  172|  9.01k|            scalar += "\n";
  173|  9.01k|          }
  174|       |
  175|  8.40M|          if (!nextEmptyLine && foldedNewlineCount > 0) {
  ------------------
  |  Branch (175:15): [True: 289k, False: 8.11M]
  |  Branch (175:33): [True: 6.44k, False: 283k]
  ------------------
  176|  6.44k|            scalar += std::string(foldedNewlineCount - 1, '\n');
  177|  6.44k|            if (foldedNewlineStartedMoreIndented ||
  ------------------
  |  Branch (177:17): [True: 446, False: 5.99k]
  ------------------
  178|  5.99k|                nextMoreIndented || !foundNonEmptyLine) {
  ------------------
  |  Branch (178:17): [True: 316, False: 5.68k]
  |  Branch (178:37): [True: 872, False: 4.81k]
  ------------------
  179|  1.63k|              scalar += "\n";
  180|  1.63k|            }
  181|  6.44k|            foldedNewlineCount = 0;
  182|  6.44k|          }
  183|  8.40M|          break;
  184|  8.29M|        case FOLD_FLOW:
  ------------------
  |  Branch (184:9): [True: 8.29M, False: 8.40M]
  ------------------
  185|  8.29M|          if (nextEmptyLine) {
  ------------------
  |  Branch (185:15): [True: 6.81M, False: 1.48M]
  ------------------
  186|  6.81M|            scalar += "\n";
  187|  6.81M|          } else if (!emptyLine && !escapedNewline) {
  ------------------
  |  Branch (187:22): [True: 1.46M, False: 15.2k]
  |  Branch (187:36): [True: 1.46M, False: 887]
  ------------------
  188|  1.46M|            scalar += " ";
  189|  1.46M|          }
  190|  8.29M|          break;
  191|  16.7M|      }
  192|  16.7M|    }
  193|       |
  194|  16.7M|    emptyLine = nextEmptyLine;
  195|  16.7M|    moreIndented = nextMoreIndented;
  196|  16.7M|    pastOpeningBreak = true;
  197|       |
  198|       |    // are we done via indentation?
  199|  16.7M|    if (!emptyLine && INPUT.column() < params.indent) {
  ------------------
  |  Branch (199:9): [True: 1.77M, False: 14.9M]
  |  Branch (199:23): [True: 649k, False: 1.12M]
  ------------------
  200|   649k|      params.leadingSpaces = true;
  201|   649k|      break;
  202|   649k|    }
  203|  16.7M|  }
  204|       |
  205|       |  // post-processing
  206|  2.19M|  if (params.trimTrailingSpaces) {
  ------------------
  |  Branch (206:7): [True: 2.17M, False: 14.0k]
  ------------------
  207|  2.17M|    std::size_t pos = scalar.find_last_not_of(" \t");
  208|  2.17M|    if (lastEscapedChar != std::string::npos) {
  ------------------
  |  Branch (208:9): [True: 25.7k, False: 2.15M]
  ------------------
  209|  25.7k|      if (pos < lastEscapedChar || pos == std::string::npos) {
  ------------------
  |  Branch (209:11): [True: 16.2k, False: 9.45k]
  |  Branch (209:36): [True: 510, False: 8.94k]
  ------------------
  210|  16.7k|        pos = lastEscapedChar;
  211|  16.7k|      }
  212|  25.7k|    }
  213|  2.17M|    if (pos < scalar.size()) {
  ------------------
  |  Branch (213:9): [True: 2.16M, False: 16.5k]
  ------------------
  214|  2.16M|      scalar.erase(pos + 1);
  215|  2.16M|    }
  216|  2.17M|  }
  217|       |
  218|  2.19M|  switch (params.chomp) {
  219|  12.7k|    case CLIP: {
  ------------------
  |  Branch (219:5): [True: 12.7k, False: 2.17M]
  ------------------
  220|  12.7k|      std::size_t pos = scalar.find_last_not_of('\n');
  221|  12.7k|      if (lastEscapedChar != std::string::npos) {
  ------------------
  |  Branch (221:11): [True: 3.11k, False: 9.63k]
  ------------------
  222|  3.11k|        if (pos < lastEscapedChar || pos == std::string::npos) {
  ------------------
  |  Branch (222:13): [True: 1.84k, False: 1.27k]
  |  Branch (222:38): [True: 218, False: 1.05k]
  ------------------
  223|  2.06k|          pos = lastEscapedChar;
  224|  2.06k|        }
  225|  3.11k|      }
  226|  12.7k|      if (pos == std::string::npos) {
  ------------------
  |  Branch (226:11): [True: 4.05k, False: 8.69k]
  ------------------
  227|  4.05k|        scalar.erase();
  228|  8.69k|      } else if (pos + 1 < scalar.size()) {
  ------------------
  |  Branch (228:18): [True: 1.30k, False: 7.38k]
  ------------------
  229|  1.30k|        scalar.erase(pos + 2);
  230|  1.30k|      }
  231|  12.7k|    } break;
  232|  2.17M|    case STRIP: {
  ------------------
  |  Branch (232:5): [True: 2.17M, False: 13.5k]
  ------------------
  233|  2.17M|      std::size_t pos = scalar.find_last_not_of('\n');
  234|  2.17M|      if (lastEscapedChar != std::string::npos) {
  ------------------
  |  Branch (234:11): [True: 25.7k, False: 2.15M]
  ------------------
  235|  25.7k|        if (pos < lastEscapedChar || pos == std::string::npos) {
  ------------------
  |  Branch (235:13): [True: 16.3k, False: 9.33k]
  |  Branch (235:38): [True: 221, False: 9.10k]
  ------------------
  236|  16.6k|          pos = lastEscapedChar;
  237|  16.6k|        }
  238|  25.7k|      }
  239|  2.17M|      if (pos == std::string::npos) {
  ------------------
  |  Branch (239:11): [True: 436, False: 2.17M]
  ------------------
  240|    436|        scalar.erase();
  241|  2.17M|      } else if (pos < scalar.size()) {
  ------------------
  |  Branch (241:18): [True: 2.16M, False: 16.5k]
  ------------------
  242|  2.16M|        scalar.erase(pos + 1);
  243|  2.16M|      }
  244|  2.17M|    } break;
  245|    448|    default:
  ------------------
  |  Branch (245:5): [True: 448, False: 2.19M]
  ------------------
  246|    448|      break;
  247|  2.19M|  }
  248|       |
  249|  2.19M|  return scalar;
  250|  2.19M|}

_ZN4YAML16ScanScalarParamsC2Ev:
   22|  2.19M|      : end(nullptr),
   23|  2.19M|        eatEnd(false),
   24|  2.19M|        indent(0),
   25|  2.19M|        detectIndent(false),
   26|  2.19M|        eatLeadingWhitespace(0),
   27|  2.19M|        escape(0),
   28|  2.19M|        fold(DONT_FOLD),
   29|  2.19M|        trimTrailingSpaces(0),
   30|  2.19M|        chomp(CLIP),
   31|  2.19M|        onDocIndicator(NONE),
   32|  2.19M|        onTabInIndentation(NONE),
   33|  2.19M|        leadingSpaces(false) {}

_ZN4YAML15ScanVerbatimTagERNS_6StreamE:
    9|    749|std::string ScanVerbatimTag(Stream& INPUT) {
   10|    749|  std::string tag;
   11|       |
   12|       |  // eat the start character
   13|    749|  INPUT.get();
   14|       |
   15|  9.97k|  while (INPUT) {
  ------------------
  |  Branch (15:10): [True: 9.95k, False: 21]
  ------------------
   16|  9.95k|    if (INPUT.peek() == Keys::VerbatimTagEnd) {
  ------------------
  |  Branch (16:9): [True: 718, False: 9.23k]
  ------------------
   17|       |      // eat the end character
   18|    718|      INPUT.get();
   19|    718|      return tag;
   20|    718|    }
   21|       |
   22|  9.23k|    int n = Exp::URI().Match(INPUT);
   23|  9.23k|    if (n <= 0)
  ------------------
  |  Branch (23:9): [True: 10, False: 9.22k]
  ------------------
   24|     10|      break;
   25|       |
   26|  9.22k|    tag += INPUT.get(n);
   27|  9.22k|  }
   28|       |
   29|     31|  throw ParserException(INPUT.mark(), ErrorMsg::END_OF_VERBATIM_TAG);
   30|    749|}
_ZN4YAML13ScanTagHandleERNS_6StreamERb:
   32|   772k|std::string ScanTagHandle(Stream& INPUT, bool& canBeHandle) {
   33|   772k|  std::string tag;
   34|   772k|  canBeHandle = true;
   35|   772k|  Mark firstNonWordChar;
   36|       |
   37|  8.51M|  while (INPUT) {
  ------------------
  |  Branch (37:10): [True: 8.51M, False: 312]
  ------------------
   38|  8.51M|    if (INPUT.peek() == Keys::Tag) {
  ------------------
  |  Branch (38:9): [True: 2.44k, False: 8.51M]
  ------------------
   39|  2.44k|      if (!canBeHandle)
  ------------------
  |  Branch (39:11): [True: 2, False: 2.44k]
  ------------------
   40|      2|        throw ParserException(firstNonWordChar, ErrorMsg::CHAR_IN_TAG_HANDLE);
   41|  2.44k|      break;
   42|  2.44k|    }
   43|       |
   44|  8.51M|    int n = 0;
   45|  8.51M|    if (canBeHandle) {
  ------------------
  |  Branch (45:9): [True: 7.42M, False: 1.09M]
  ------------------
   46|  7.42M|      n = Exp::Word().Match(INPUT);
   47|  7.42M|      if (n <= 0) {
  ------------------
  |  Branch (47:11): [True: 769k, False: 6.65M]
  ------------------
   48|   769k|        canBeHandle = false;
   49|   769k|        firstNonWordChar = INPUT.mark();
   50|   769k|      }
   51|  7.42M|    }
   52|       |
   53|  8.51M|    if (!canBeHandle)
  ------------------
  |  Branch (53:9): [True: 1.86M, False: 6.65M]
  ------------------
   54|  1.86M|      n = Exp::Tag().Match(INPUT);
   55|       |
   56|  8.51M|    if (n <= 0)
  ------------------
  |  Branch (56:9): [True: 769k, False: 7.74M]
  ------------------
   57|   769k|      break;
   58|       |
   59|  7.74M|    tag += INPUT.get(n);
   60|  7.74M|  }
   61|       |
   62|   772k|  return tag;
   63|   772k|}
_ZN4YAML13ScanTagSuffixERNS_6StreamE:
   65|  2.44k|std::string ScanTagSuffix(Stream& INPUT) {
   66|  2.44k|  std::string tag;
   67|       |
   68|   576k|  while (INPUT) {
  ------------------
  |  Branch (68:10): [True: 576k, False: 108]
  ------------------
   69|   576k|    int n = Exp::Tag().Match(INPUT);
   70|   576k|    if (n <= 0)
  ------------------
  |  Branch (70:9): [True: 2.33k, False: 574k]
  ------------------
   71|  2.33k|      break;
   72|       |
   73|   574k|    tag += INPUT.get(n);
   74|   574k|  }
   75|       |
   76|  2.44k|  if (tag.empty())
  ------------------
  |  Branch (76:7): [True: 14, False: 2.42k]
  ------------------
   77|     14|    throw ParserException(INPUT.mark(), ErrorMsg::TAG_WITH_NO_SUFFIX);
   78|       |
   79|  2.42k|  return tag;
   80|  2.44k|}

_ZN4YAML7Scanner13ScanDirectiveEv:
   20|  11.7k|void Scanner::ScanDirective() {
   21|  11.7k|  std::string name;
   22|  11.7k|  std::vector<std::string> params;
   23|       |
   24|       |  // pop indents and simple keys
   25|  11.7k|  PopAllIndents();
   26|  11.7k|  PopAllSimpleKeys();
   27|       |
   28|  11.7k|  m_simpleKeyAllowed = false;
   29|  11.7k|  m_canBeJSONFlow = false;
   30|       |
   31|       |  // store pos and eat indicator
   32|  11.7k|  Token token(Token::DIRECTIVE, INPUT.mark());
   33|  11.7k|  INPUT.eat(1);
   34|       |
   35|       |  // read name
   36|  8.93M|  while (INPUT && !Exp::BlankOrBreak().Matches(INPUT))
  ------------------
  |  Branch (36:10): [True: 8.93M, False: 223]
  |  Branch (36:19): [True: 8.92M, False: 11.5k]
  ------------------
   37|  8.92M|    token.value += INPUT.get();
   38|       |
   39|       |  // read parameters
   40|  1.24M|  while (true) {
  ------------------
  |  Branch (40:10): [True: 1.24M, Folded]
  ------------------
   41|       |    // first get rid of whitespace
   42|  2.49M|    while (Exp::Blank().Matches(INPUT))
  ------------------
  |  Branch (42:12): [True: 1.25M, False: 1.24M]
  ------------------
   43|  1.25M|      INPUT.eat(1);
   44|       |
   45|       |    // break on newline or comment
   46|  1.24M|    if (!INPUT || Exp::Break().Matches(INPUT) || Exp::Comment().Matches(INPUT))
  ------------------
  |  Branch (46:9): [True: 737, False: 1.24M]
  |  Branch (46:9): [True: 11.7k, False: 1.23M]
  |  Branch (46:19): [True: 10.7k, False: 1.23M]
  |  Branch (46:50): [True: 326, False: 1.23M]
  ------------------
   47|  11.7k|      break;
   48|       |
   49|       |    // now read parameter
   50|  1.23M|    std::string param;
   51|  22.7M|    while (INPUT && !Exp::BlankOrBreak().Matches(INPUT))
  ------------------
  |  Branch (51:12): [True: 22.7M, False: 466]
  |  Branch (51:21): [True: 21.5M, False: 1.23M]
  ------------------
   52|  21.5M|      param += INPUT.get();
   53|       |
   54|  1.23M|    token.params.push_back(param);
   55|  1.23M|  }
   56|       |
   57|  11.7k|  m_tokens.push(token);
   58|  11.7k|}
_ZN4YAML7Scanner12ScanDocStartEv:
   61|   436k|void Scanner::ScanDocStart() {
   62|   436k|  PopAllIndents();
   63|   436k|  PopAllSimpleKeys();
   64|   436k|  m_simpleKeyAllowed = false;
   65|   436k|  m_canBeJSONFlow = false;
   66|       |
   67|       |  // eat
   68|   436k|  Mark mark = INPUT.mark();
   69|   436k|  INPUT.eat(3);
   70|   436k|  m_tokens.push(Token(Token::DOC_START, mark));
   71|   436k|}
_ZN4YAML7Scanner10ScanDocEndEv:
   74|   173k|void Scanner::ScanDocEnd() {
   75|   173k|  PopAllIndents();
   76|   173k|  PopAllSimpleKeys();
   77|   173k|  m_simpleKeyAllowed = false;
   78|   173k|  m_canBeJSONFlow = false;
   79|       |
   80|       |  // eat
   81|   173k|  Mark mark = INPUT.mark();
   82|   173k|  INPUT.eat(3);
   83|   173k|  m_tokens.push(Token(Token::DOC_END, mark));
   84|   173k|}
_ZN4YAML7Scanner13ScanFlowStartEv:
   87|  48.1M|void Scanner::ScanFlowStart() {
   88|       |  // flows can be simple keys
   89|  48.1M|  InsertPotentialSimpleKey();
   90|  48.1M|  m_simpleKeyAllowed = true;
   91|  48.1M|  m_canBeJSONFlow = false;
   92|       |
   93|       |  // eat
   94|  48.1M|  Mark mark = INPUT.mark();
   95|  48.1M|  char ch = INPUT.get();
   96|  48.1M|  FLOW_MARKER flowType = (ch == Keys::FlowSeqStart ? FLOW_SEQ : FLOW_MAP);
  ------------------
  |  Branch (96:27): [True: 32.9M, False: 15.1M]
  ------------------
   97|  48.1M|  m_flows.push(flowType);
   98|  48.1M|  Token::TYPE type =
   99|  48.1M|      (flowType == FLOW_SEQ ? Token::FLOW_SEQ_START : Token::FLOW_MAP_START);
  ------------------
  |  Branch (99:8): [True: 32.9M, False: 15.1M]
  ------------------
  100|  48.1M|  m_tokens.push(Token(type, mark));
  101|  48.1M|}
_ZN4YAML7Scanner11ScanFlowEndEv:
  104|   846k|void Scanner::ScanFlowEnd() {
  105|   846k|  if (InBlockContext())
  ------------------
  |  Branch (105:7): [True: 22, False: 846k]
  ------------------
  106|     22|    throw ParserException(INPUT.mark(), ErrorMsg::FLOW_END);
  107|       |
  108|       |  // we might have a solo entry in the flow context
  109|   846k|  if (InFlowContext()) {
  ------------------
  |  Branch (109:7): [True: 846k, False: 0]
  ------------------
  110|   846k|    if (m_flows.top() == FLOW_MAP && VerifySimpleKey())
  ------------------
  |  Branch (110:9): [True: 822k, False: 23.9k]
  |  Branch (110:38): [True: 72.6k, False: 749k]
  ------------------
  111|  72.6k|      m_tokens.push(Token(Token::VALUE, INPUT.mark()));
  112|   773k|    else if (m_flows.top() == FLOW_SEQ)
  ------------------
  |  Branch (112:14): [True: 23.9k, False: 749k]
  ------------------
  113|  23.9k|      InvalidateSimpleKey();
  114|   846k|  }
  115|       |
  116|   846k|  m_simpleKeyAllowed = false;
  117|   846k|  m_canBeJSONFlow = true;
  118|       |
  119|       |  // eat
  120|   846k|  Mark mark = INPUT.mark();
  121|   846k|  char ch = INPUT.get();
  122|       |
  123|       |  // check that it matches the start
  124|   846k|  FLOW_MARKER flowType = (ch == Keys::FlowSeqEnd ? FLOW_SEQ : FLOW_MAP);
  ------------------
  |  Branch (124:27): [True: 23.9k, False: 822k]
  ------------------
  125|   846k|  if (m_flows.top() != flowType)
  ------------------
  |  Branch (125:7): [True: 10, False: 846k]
  ------------------
  126|     10|    throw ParserException(mark, ErrorMsg::FLOW_END);
  127|   846k|  m_flows.pop();
  128|       |
  129|   846k|  Token::TYPE type = (flowType ? Token::FLOW_SEQ_END : Token::FLOW_MAP_END);
  ------------------
  |  Branch (129:23): [True: 23.9k, False: 822k]
  ------------------
  130|   846k|  m_tokens.push(Token(type, mark));
  131|   846k|}
_ZN4YAML7Scanner13ScanFlowEntryEv:
  134|  2.36M|void Scanner::ScanFlowEntry() {
  135|       |  // we might have a solo entry in the flow context
  136|  2.36M|  if (InFlowContext()) {
  ------------------
  |  Branch (136:7): [True: 2.36M, False: 750]
  ------------------
  137|  2.36M|    if (m_flows.top() == FLOW_MAP && VerifySimpleKey())
  ------------------
  |  Branch (137:9): [True: 1.00M, False: 1.36M]
  |  Branch (137:38): [True: 785k, False: 218k]
  ------------------
  138|   785k|      m_tokens.push(Token(Token::VALUE, INPUT.mark()));
  139|  1.58M|    else if (m_flows.top() == FLOW_SEQ)
  ------------------
  |  Branch (139:14): [True: 1.36M, False: 218k]
  ------------------
  140|  1.36M|      InvalidateSimpleKey();
  141|  2.36M|  }
  142|       |
  143|  2.36M|  m_simpleKeyAllowed = true;
  144|  2.36M|  m_canBeJSONFlow = false;
  145|       |
  146|       |  // eat
  147|  2.36M|  Mark mark = INPUT.mark();
  148|  2.36M|  INPUT.eat(1);
  149|  2.36M|  m_tokens.push(Token(Token::FLOW_ENTRY, mark));
  150|  2.36M|}
_ZN4YAML7Scanner14ScanBlockEntryEv:
  153|  1.11M|void Scanner::ScanBlockEntry() {
  154|       |  // we better be in the block context!
  155|  1.11M|  if (InFlowContext())
  ------------------
  |  Branch (155:7): [True: 28, False: 1.11M]
  ------------------
  156|     28|    throw ParserException(INPUT.mark(), ErrorMsg::BLOCK_ENTRY);
  157|       |
  158|       |  // can we put it here?
  159|  1.11M|  if (!m_simpleKeyAllowed)
  ------------------
  |  Branch (159:7): [True: 3, False: 1.11M]
  ------------------
  160|      3|    throw ParserException(INPUT.mark(), ErrorMsg::BLOCK_ENTRY);
  161|       |
  162|  1.11M|  PushIndentTo(INPUT.column(), IndentMarker::SEQ);
  163|  1.11M|  m_simpleKeyAllowed = true;
  164|  1.11M|  m_canBeJSONFlow = false;
  165|       |
  166|       |  // eat
  167|  1.11M|  Mark mark = INPUT.mark();
  168|  1.11M|  INPUT.eat(1);
  169|  1.11M|  m_tokens.push(Token(Token::BLOCK_ENTRY, mark));
  170|  1.11M|}
_ZN4YAML7Scanner7ScanKeyEv:
  173|  42.1k|void Scanner::ScanKey() {
  174|       |  // handle keys differently in the block context (and manage indents)
  175|  42.1k|  if (InBlockContext()) {
  ------------------
  |  Branch (175:7): [True: 10.4k, False: 31.6k]
  ------------------
  176|  10.4k|    if (!m_simpleKeyAllowed)
  ------------------
  |  Branch (176:9): [True: 2, False: 10.4k]
  ------------------
  177|      2|      throw ParserException(INPUT.mark(), ErrorMsg::MAP_KEY);
  178|       |
  179|  10.4k|    PushIndentTo(INPUT.column(), IndentMarker::MAP);
  180|  10.4k|  }
  181|       |
  182|       |  // can only put a simple key here if we're in block context
  183|  42.1k|  m_simpleKeyAllowed = InBlockContext();
  184|       |
  185|       |  // eat
  186|  42.1k|  Mark mark = INPUT.mark();
  187|  42.1k|  INPUT.eat(1);
  188|  42.1k|  m_tokens.push(Token(Token::KEY, mark));
  189|  42.1k|}
_ZN4YAML7Scanner9ScanValueEv:
  192|  5.52M|void Scanner::ScanValue() {
  193|       |  // and check that simple key
  194|  5.52M|  bool isSimpleKey = VerifySimpleKey();
  195|  5.52M|  m_canBeJSONFlow = false;
  196|       |
  197|  5.52M|  if (isSimpleKey) {
  ------------------
  |  Branch (197:7): [True: 60.6k, False: 5.46M]
  ------------------
  198|       |    // can't follow a simple key with another simple key (dunno why, though - it
  199|       |    // seems fine)
  200|  60.6k|    m_simpleKeyAllowed = false;
  201|  5.46M|  } else {
  202|       |    // handle values differently in the block context (and manage indents)
  203|  5.46M|    if (InBlockContext()) {
  ------------------
  |  Branch (203:9): [True: 5.46M, False: 8.45k]
  ------------------
  204|  5.46M|      if (!m_simpleKeyAllowed)
  ------------------
  |  Branch (204:11): [True: 66, False: 5.46M]
  ------------------
  205|     66|        throw ParserException(INPUT.mark(), ErrorMsg::MAP_VALUE);
  206|       |
  207|  5.46M|      PushIndentTo(INPUT.column(), IndentMarker::MAP);
  208|  5.46M|    }
  209|       |
  210|       |    // can only put a simple key here if we're in block context
  211|  5.46M|    m_simpleKeyAllowed = InBlockContext();
  212|  5.46M|  }
  213|       |
  214|       |  // we are parsing a `key: value` pair; scalars are always allowed
  215|  5.52M|  m_scalarValueAllowed = true;
  216|       |
  217|       |  // eat
  218|  5.52M|  Mark mark = INPUT.mark();
  219|  5.52M|  INPUT.eat(1);
  220|  5.52M|  m_tokens.push(Token(Token::VALUE, mark));
  221|  5.52M|}
_ZN4YAML7Scanner17ScanAnchorOrAliasEv:
  224|   252k|void Scanner::ScanAnchorOrAlias() {
  225|   252k|  bool alias;
  226|   252k|  std::string name;
  227|       |
  228|       |  // insert a potential simple key
  229|   252k|  InsertPotentialSimpleKey();
  230|   252k|  m_simpleKeyAllowed = false;
  231|   252k|  m_canBeJSONFlow = false;
  232|       |
  233|       |  // eat the indicator
  234|   252k|  Mark mark = INPUT.mark();
  235|   252k|  char indicator = INPUT.get();
  236|   252k|  alias = (indicator == Keys::Alias);
  237|       |
  238|       |  // now eat the content
  239|  29.5M|  while (INPUT && Exp::Anchor().Matches(INPUT))
  ------------------
  |  Branch (239:10): [True: 29.5M, False: 697]
  |  Branch (239:19): [True: 29.2M, False: 251k]
  ------------------
  240|  29.2M|    name += INPUT.get();
  241|       |
  242|       |  // we need to have read SOMETHING!
  243|   252k|  if (name.empty())
  ------------------
  |  Branch (243:7): [True: 28, False: 252k]
  ------------------
  244|     28|    throw ParserException(INPUT.mark(), alias ? ErrorMsg::ALIAS_NOT_FOUND
  ------------------
  |  Branch (244:41): [True: 13, False: 15]
  ------------------
  245|     28|                                              : ErrorMsg::ANCHOR_NOT_FOUND);
  246|       |
  247|       |  // and needs to end correctly
  248|   252k|  if (INPUT && !Exp::AnchorEnd().Matches(INPUT))
  ------------------
  |  Branch (248:7): [True: 251k, False: 675]
  |  Branch (248:16): [True: 7, False: 251k]
  ------------------
  249|      7|    throw ParserException(INPUT.mark(), alias ? ErrorMsg::CHAR_IN_ALIAS
  ------------------
  |  Branch (249:41): [True: 3, False: 4]
  ------------------
  250|      7|                                              : ErrorMsg::CHAR_IN_ANCHOR);
  251|       |
  252|       |  // and we're done
  253|   252k|  Token token(alias ? Token::ALIAS : Token::ANCHOR, mark);
  ------------------
  |  Branch (253:15): [True: 4.99k, False: 247k]
  ------------------
  254|   252k|  token.value = name;
  255|   252k|  m_tokens.push(token);
  256|   252k|}
_ZN4YAML7Scanner7ScanTagEv:
  259|   773k|void Scanner::ScanTag() {
  260|       |  // insert a potential simple key
  261|   773k|  InsertPotentialSimpleKey();
  262|   773k|  m_simpleKeyAllowed = false;
  263|   773k|  m_canBeJSONFlow = false;
  264|       |
  265|   773k|  Token token(Token::TAG, INPUT.mark());
  266|       |
  267|       |  // eat the indicator
  268|   773k|  INPUT.get();
  269|       |
  270|   773k|  if (INPUT && INPUT.peek() == Keys::VerbatimTagStart) {
  ------------------
  |  Branch (270:7): [True: 773k, False: 182]
  |  Branch (270:16): [True: 749, False: 772k]
  ------------------
  271|    749|    std::string tag = ScanVerbatimTag(INPUT);
  272|       |
  273|    749|    token.value = tag;
  274|    749|    token.data = Tag::VERBATIM;
  275|   772k|  } else {
  276|   772k|    bool canBeHandle;
  277|   772k|    token.value = ScanTagHandle(INPUT, canBeHandle);
  278|   772k|    if (!canBeHandle && token.value.empty())
  ------------------
  |  Branch (278:9): [True: 769k, False: 2.66k]
  |  Branch (278:25): [True: 762k, False: 7.53k]
  ------------------
  279|   762k|      token.data = Tag::NON_SPECIFIC;
  280|  10.2k|    else if (token.value.empty())
  ------------------
  |  Branch (280:14): [True: 1.93k, False: 8.26k]
  ------------------
  281|  1.93k|      token.data = Tag::SECONDARY_HANDLE;
  282|  8.26k|    else
  283|  8.26k|      token.data = Tag::PRIMARY_HANDLE;
  284|       |
  285|       |    // is there a suffix?
  286|   772k|    if (canBeHandle && INPUT.peek() == Keys::Tag) {
  ------------------
  |  Branch (286:9): [True: 2.66k, False: 769k]
  |  Branch (286:24): [True: 2.44k, False: 226]
  ------------------
  287|       |      // eat the indicator
  288|  2.44k|      INPUT.get();
  289|  2.44k|      token.params.push_back(ScanTagSuffix(INPUT));
  290|  2.44k|      token.data = Tag::NAMED_HANDLE;
  291|  2.44k|    }
  292|   772k|  }
  293|       |
  294|   773k|  m_tokens.push(token);
  295|   773k|}
_ZN4YAML7Scanner15ScanPlainScalarEv:
  298|  2.17M|void Scanner::ScanPlainScalar() {
  299|  2.17M|  std::string scalar;
  300|       |
  301|       |  // set up the scanning parameters
  302|  2.17M|  ScanScalarParams params;
  303|  2.17M|  params.end =
  304|  2.17M|      (InFlowContext() ? &Exp::ScanScalarEndInFlow() : &Exp::ScanScalarEnd());
  ------------------
  |  Branch (304:8): [True: 1.07M, False: 1.09M]
  ------------------
  305|  2.17M|  params.eatEnd = false;
  306|  2.17M|  params.indent = (InFlowContext() ? 0 : GetTopIndent() + 1);
  ------------------
  |  Branch (306:20): [True: 1.07M, False: 1.09M]
  ------------------
  307|  2.17M|  params.fold = FOLD_FLOW;
  308|  2.17M|  params.eatLeadingWhitespace = true;
  309|  2.17M|  params.trimTrailingSpaces = true;
  310|  2.17M|  params.chomp = STRIP;
  311|  2.17M|  params.onDocIndicator = BREAK;
  312|  2.17M|  params.onTabInIndentation = THROW;
  313|       |
  314|       |  // insert a potential simple key
  315|  2.17M|  InsertPotentialSimpleKey();
  316|       |
  317|  2.17M|  Mark mark = INPUT.mark();
  318|  2.17M|  scalar = ScanScalar(INPUT, params);
  319|       |
  320|       |  // can have a simple key only if we ended the scalar by starting a new line
  321|  2.17M|  m_simpleKeyAllowed = params.leadingSpaces;
  322|  2.17M|  m_canBeJSONFlow = false;
  323|       |
  324|       |  // finally, check and see if we ended on an illegal character
  325|       |  // if(Exp::IllegalCharInScalar.Matches(INPUT))
  326|       |  //	throw ParserException(INPUT.mark(), ErrorMsg::CHAR_IN_SCALAR);
  327|       |
  328|  2.17M|  Token token(Token::PLAIN_SCALAR, mark);
  329|  2.17M|  token.value = scalar;
  330|  2.17M|  m_tokens.push(token);
  331|  2.17M|}
_ZN4YAML7Scanner16ScanQuotedScalarEv:
  334|  8.66k|void Scanner::ScanQuotedScalar() {
  335|  8.66k|  std::string scalar;
  336|       |
  337|       |  // peek at single or double quote (don't eat because we need to preserve (for
  338|       |  // the time being) the input position)
  339|  8.66k|  char quote = INPUT.peek();
  340|  8.66k|  bool single = (quote == '\'');
  341|       |
  342|       |  // setup the scanning parameters
  343|  8.66k|  ScanScalarParams params;
  344|  8.66k|  RegEx end = (single ? RegEx(quote) & !Exp::EscSingleQuote() : RegEx(quote));
  ------------------
  |  Branch (344:16): [True: 1.66k, False: 6.99k]
  ------------------
  345|  8.66k|  params.end = &end;
  346|  8.66k|  params.eatEnd = true;
  347|  8.66k|  params.escape = (single ? '\'' : '\\');
  ------------------
  |  Branch (347:20): [True: 1.66k, False: 6.99k]
  ------------------
  348|  8.66k|  params.indent = 0;
  349|  8.66k|  params.fold = FOLD_FLOW;
  350|  8.66k|  params.eatLeadingWhitespace = true;
  351|  8.66k|  params.trimTrailingSpaces = false;
  352|  8.66k|  params.chomp = CLIP;
  353|  8.66k|  params.onDocIndicator = THROW;
  354|       |
  355|       |  // insert a potential simple key
  356|  8.66k|  InsertPotentialSimpleKey();
  357|       |
  358|  8.66k|  Mark mark = INPUT.mark();
  359|       |
  360|       |  // now eat that opening quote
  361|  8.66k|  INPUT.get();
  362|       |
  363|       |  // and scan
  364|  8.66k|  scalar = ScanScalar(INPUT, params);
  365|  8.66k|  m_simpleKeyAllowed = false;
  366|       |  // we just scanned a quoted scalar;
  367|       |  // we can only have another scalar in this line
  368|       |  // if we are in a flow, eg: `[ "foo", "bar" ]` is ok, but `"foo", "bar"` isn't.
  369|  8.66k|  m_scalarValueAllowed = InFlowContext();
  370|  8.66k|  m_canBeJSONFlow = true;
  371|       |
  372|  8.66k|  Token token(Token::NON_PLAIN_SCALAR, mark);
  373|  8.66k|  token.value = scalar;
  374|  8.66k|  m_tokens.push(token);
  375|  8.66k|}
_ZN4YAML7Scanner15ScanBlockScalarEv:
  382|  5.36k|void Scanner::ScanBlockScalar() {
  383|  5.36k|  std::string scalar;
  384|       |
  385|  5.36k|  ScanScalarParams params;
  386|  5.36k|  params.indent = 1;
  387|  5.36k|  params.detectIndent = true;
  388|       |
  389|       |  // eat block indicator ('|' or '>')
  390|  5.36k|  Mark mark = INPUT.mark();
  391|  5.36k|  char indicator = INPUT.get();
  392|  5.36k|  params.fold = (indicator == Keys::FoldedScalar ? FOLD_BLOCK : DONT_FOLD);
  ------------------
  |  Branch (392:18): [True: 4.69k, False: 673]
  ------------------
  393|       |
  394|       |  // eat chomping/indentation indicators
  395|  5.36k|  params.chomp = CLIP;
  396|  5.36k|  int n = Exp::Chomp().Match(INPUT);
  397|  6.99k|  for (int i = 0; i < n; i++) {
  ------------------
  |  Branch (397:19): [True: 1.63k, False: 5.36k]
  ------------------
  398|  1.63k|    char ch = INPUT.get();
  399|  1.63k|    if (ch == '+')
  ------------------
  |  Branch (399:9): [True: 451, False: 1.18k]
  ------------------
  400|    451|      params.chomp = KEEP;
  401|  1.18k|    else if (ch == '-')
  ------------------
  |  Branch (401:14): [True: 515, False: 667]
  ------------------
  402|    515|      params.chomp = STRIP;
  403|    667|    else if (Exp::Digit().Matches(ch)) {
  ------------------
  |  Branch (403:14): [True: 667, False: 0]
  ------------------
  404|    667|      if (ch == '0')
  ------------------
  |  Branch (404:11): [True: 2, False: 665]
  ------------------
  405|      2|        throw ParserException(INPUT.mark(), ErrorMsg::ZERO_INDENT_IN_BLOCK);
  406|       |
  407|    665|      params.indent = ch - '0';
  408|    665|      params.detectIndent = false;
  409|    665|    }
  410|  1.63k|  }
  411|       |
  412|       |  // now eat whitespace
  413|  5.71k|  while (Exp::Blank().Matches(INPUT))
  ------------------
  |  Branch (413:10): [True: 348, False: 5.36k]
  ------------------
  414|    348|    INPUT.eat(1);
  415|       |
  416|       |  // and comments to the end of the line
  417|  5.36k|  if (Exp::Comment().Matches(INPUT))
  ------------------
  |  Branch (417:7): [True: 617, False: 4.74k]
  ------------------
  418|  79.8k|    while (INPUT && !Exp::Break().Matches(INPUT))
  ------------------
  |  Branch (418:12): [True: 79.7k, False: 19]
  |  Branch (418:21): [True: 79.1k, False: 598]
  ------------------
  419|  79.1k|      INPUT.eat(1);
  420|       |
  421|       |  // if it's not a line break, then we ran into a bad character inline
  422|  5.36k|  if (INPUT && !Exp::Break().Matches(INPUT))
  ------------------
  |  Branch (422:7): [True: 5.26k, False: 100]
  |  Branch (422:16): [True: 50, False: 5.21k]
  ------------------
  423|     50|    throw ParserException(INPUT.mark(), ErrorMsg::CHAR_IN_BLOCK);
  424|       |
  425|       |  // set the initial indentation
  426|  5.31k|  if (GetTopIndent() >= 0)
  ------------------
  |  Branch (426:7): [True: 3.10k, False: 2.20k]
  ------------------
  427|  3.10k|    params.indent += GetTopIndent();
  428|       |
  429|  5.31k|  params.eatLeadingWhitespace = false;
  430|  5.31k|  params.trimTrailingSpaces = false;
  431|  5.31k|  params.onTabInIndentation = THROW;
  432|       |
  433|  5.31k|  scalar = ScanScalar(INPUT, params);
  434|       |
  435|       |  // simple keys always ok after block scalars (since we're gonna start a new
  436|       |  // line anyways)
  437|  5.31k|  m_simpleKeyAllowed = true;
  438|  5.31k|  m_canBeJSONFlow = false;
  439|       |
  440|  5.31k|  Token token(Token::NON_PLAIN_SCALAR, mark);
  441|  5.31k|  token.value = scalar;
  442|  5.31k|  m_tokens.push(token);
  443|  5.31k|}

_ZN4YAML7Scanner9SimpleKeyC2ERKNS_4MarkEm:
    8|  50.6M|    : mark(mark_),
    9|  50.6M|      flowLevel(flowLevel_),
   10|  50.6M|      pIndent(nullptr),
   11|  50.6M|      pMapStart(nullptr),
   12|  50.6M|      pKey(nullptr) {}
_ZN4YAML7Scanner9SimpleKey8ValidateEv:
   14|   919k|void Scanner::SimpleKey::Validate() {
   15|       |  // Note: pIndent will *not* be garbage here;
   16|       |  //       we "garbage collect" them so we can
   17|       |  //       always refer to them
   18|   919k|  if (pIndent)
  ------------------
  |  Branch (18:7): [True: 58.5k, False: 860k]
  ------------------
   19|  58.5k|    pIndent->status = IndentMarker::VALID;
   20|   919k|  if (pMapStart)
  ------------------
  |  Branch (20:7): [True: 58.5k, False: 860k]
  ------------------
   21|  58.5k|    pMapStart->status = Token::VALID;
   22|   919k|  if (pKey)
  ------------------
  |  Branch (22:7): [True: 919k, False: 0]
  ------------------
   23|   919k|    pKey->status = Token::VALID;
   24|   919k|}
_ZN4YAML7Scanner9SimpleKey10InvalidateEv:
   26|  2.41M|void Scanner::SimpleKey::Invalidate() {
   27|  2.41M|  if (pIndent)
  ------------------
  |  Branch (27:7): [True: 1.38M, False: 1.02M]
  ------------------
   28|  1.38M|    pIndent->status = IndentMarker::INVALID;
   29|  2.41M|  if (pMapStart)
  ------------------
  |  Branch (29:7): [True: 1.38M, False: 1.02M]
  ------------------
   30|  1.38M|    pMapStart->status = Token::INVALID;
   31|  2.41M|  if (pKey)
  ------------------
  |  Branch (31:7): [True: 2.41M, False: 0]
  ------------------
   32|  2.41M|    pKey->status = Token::INVALID;
   33|  2.41M|}
_ZNK4YAML7Scanner27CanInsertPotentialSimpleKeyEv:
   36|  51.3M|bool Scanner::CanInsertPotentialSimpleKey() const {
   37|  51.3M|  if (!m_simpleKeyAllowed)
  ------------------
  |  Branch (37:7): [True: 707k, False: 50.6M]
  ------------------
   38|   707k|    return false;
   39|       |
   40|  50.6M|  return !ExistsActiveSimpleKey();
   41|  51.3M|}
_ZNK4YAML7Scanner21ExistsActiveSimpleKeyEv:
   47|  50.6M|bool Scanner::ExistsActiveSimpleKey() const {
   48|  50.6M|  if (m_simpleKeys.empty())
  ------------------
  |  Branch (48:7): [True: 1.47M, False: 49.1M]
  ------------------
   49|  1.47M|    return false;
   50|       |
   51|  49.1M|  const SimpleKey& key = m_simpleKeys.top();
   52|  49.1M|  return key.flowLevel == GetFlowLevel();
   53|  50.6M|}
_ZN4YAML7Scanner24InsertPotentialSimpleKeyEv:
   58|  51.3M|void Scanner::InsertPotentialSimpleKey() {
   59|  51.3M|  if (!CanInsertPotentialSimpleKey())
  ------------------
  |  Branch (59:7): [True: 709k, False: 50.6M]
  ------------------
   60|   709k|    return;
   61|       |
   62|  50.6M|  SimpleKey key(INPUT.mark(), GetFlowLevel());
   63|       |
   64|       |  // first add a map start, if necessary
   65|  50.6M|  if (InBlockContext()) {
  ------------------
  |  Branch (65:7): [True: 1.45M, False: 49.2M]
  ------------------
   66|  1.45M|    key.pIndent = PushIndentTo(INPUT.column(), IndentMarker::MAP);
   67|  1.45M|    if (key.pIndent) {
  ------------------
  |  Branch (67:9): [True: 1.44M, False: 7.41k]
  ------------------
   68|  1.44M|      key.pIndent->status = IndentMarker::UNKNOWN;
   69|  1.44M|      key.pMapStart = key.pIndent->pStartToken;
   70|  1.44M|      key.pMapStart->status = Token::UNVERIFIED;
   71|  1.44M|    }
   72|  1.45M|  }
   73|       |
   74|       |  // then add the (now unverified) key
   75|  50.6M|  m_tokens.push(Token(Token::KEY, INPUT.mark()));
   76|  50.6M|  key.pKey = &m_tokens.back();
   77|  50.6M|  key.pKey->status = Token::UNVERIFIED;
   78|       |
   79|  50.6M|  m_simpleKeys.push(key);
   80|  50.6M|}
_ZN4YAML7Scanner19InvalidateSimpleKeyEv:
   84|  9.68M|void Scanner::InvalidateSimpleKey() {
   85|  9.68M|  if (m_simpleKeys.empty())
  ------------------
  |  Branch (85:7): [True: 6.88M, False: 2.79M]
  ------------------
   86|  6.88M|    return;
   87|       |
   88|       |  // grab top key
   89|  2.79M|  SimpleKey& key = m_simpleKeys.top();
   90|  2.79M|  if (key.flowLevel != GetFlowLevel())
  ------------------
  |  Branch (90:7): [True: 1.10M, False: 1.68M]
  ------------------
   91|  1.10M|    return;
   92|       |
   93|  1.68M|  key.Invalidate();
   94|  1.68M|  m_simpleKeys.pop();
   95|  1.68M|}
_ZN4YAML7Scanner15VerifySimpleKeyEv:
  100|  7.35M|bool Scanner::VerifySimpleKey() {
  101|  7.35M|  if (m_simpleKeys.empty())
  ------------------
  |  Branch (101:7): [True: 5.65M, False: 1.69M]
  ------------------
  102|  5.65M|    return false;
  103|       |
  104|       |  // grab top key
  105|  1.69M|  SimpleKey key = m_simpleKeys.top();
  106|       |
  107|       |  // only validate if we're in the correct flow level
  108|  1.69M|  if (key.flowLevel != GetFlowLevel())
  ------------------
  |  Branch (108:7): [True: 47.4k, False: 1.65M]
  ------------------
  109|  47.4k|    return false;
  110|       |
  111|  1.65M|  m_simpleKeys.pop();
  112|       |
  113|  1.65M|  bool isValid = true;
  114|       |
  115|       |  // needs to be less than 1024 characters and inline
  116|  1.65M|  if (INPUT.line() != key.mark.line || INPUT.pos() - key.mark.pos > 1024)
  ------------------
  |  Branch (116:7): [True: 45.9k, False: 1.60M]
  |  Branch (116:40): [True: 686k, False: 919k]
  ------------------
  117|   732k|    isValid = false;
  118|       |
  119|       |  // invalidate key
  120|  1.65M|  if (isValid)
  ------------------
  |  Branch (120:7): [True: 919k, False: 732k]
  ------------------
  121|   919k|    key.Validate();
  122|   732k|  else
  123|   732k|    key.Invalidate();
  124|       |
  125|  1.65M|  return isValid;
  126|  1.69M|}
_ZN4YAML7Scanner16PopAllSimpleKeysEv:
  128|   627k|void Scanner::PopAllSimpleKeys() {
  129|  44.2M|  while (!m_simpleKeys.empty())
  ------------------
  |  Branch (129:10): [True: 43.6M, False: 627k]
  ------------------
  130|  43.6M|    m_simpleKeys.pop();
  131|   627k|}

_ZN4YAML15SingleDocParserC2ERNS_7ScannerERKNS_10DirectivesE:
   18|   554k|    : m_scanner(scanner),
   19|   554k|      m_directives(directives),
   20|   554k|      m_pCollectionStack(new CollectionStack),
   21|   554k|      m_anchors{},
   22|   554k|      m_curAnchor(0) {}
_ZN4YAML15SingleDocParserD2Ev:
   24|   554k|SingleDocParser::~SingleDocParser() = default;
_ZN4YAML15SingleDocParser14HandleDocumentERNS_12EventHandlerE:
   29|   554k|void SingleDocParser::HandleDocument(EventHandler& eventHandler) {
   30|   554k|  assert(!m_scanner.empty());  // guaranteed that there are tokens
   31|   554k|  assert(!m_curAnchor);
   32|       |
   33|   554k|  eventHandler.OnDocumentStart(m_scanner.peek().mark);
   34|       |
   35|       |  // eat doc start
   36|   554k|  if (m_scanner.peek().type == Token::DOC_START)
  ------------------
  |  Branch (36:7): [True: 392k, False: 162k]
  ------------------
   37|   392k|    m_scanner.pop();
   38|       |
   39|       |  // recurse!
   40|   554k|  HandleNode(eventHandler);
   41|       |
   42|   554k|  eventHandler.OnDocumentEnd();
   43|       |
   44|       |  // check if any tokens left after the text
   45|   554k|  if (!m_scanner.empty() && m_scanner.peek().type != Token::DOC_END
  ------------------
  |  Branch (45:7): [True: 550k, False: 4.56k]
  |  Branch (45:29): [True: 392k, False: 157k]
  ------------------
   46|   392k|      && m_scanner.peek().type != Token::DOC_START)
  ------------------
  |  Branch (46:10): [True: 341, False: 392k]
  ------------------
   47|    341|    throw ParserException(m_scanner.mark(), ErrorMsg::UNEXPECTED_TOKEN_AFTER_DOC);
   48|       |
   49|       |  // and finally eat any doc ends we see
   50|   554k|  if (!m_scanner.empty() && m_scanner.peek().type == Token::DOC_END)
  ------------------
  |  Branch (50:7): [True: 549k, False: 4.56k]
  |  Branch (50:29): [True: 157k, False: 392k]
  ------------------
   51|   157k|    m_scanner.pop();
   52|   554k|}
_ZN4YAML15SingleDocParser10HandleNodeERNS_12EventHandlerE:
   54|  2.08M|void SingleDocParser::HandleNode(EventHandler& eventHandler) {
   55|  2.08M|  DepthGuard<500> depthguard(depth, m_scanner.mark(), ErrorMsg::BAD_FILE);
   56|       |
   57|       |  // an empty node *is* a possibility
   58|  2.08M|  if (m_scanner.empty()) {
  ------------------
  |  Branch (58:7): [True: 89, False: 2.08M]
  ------------------
   59|     89|    eventHandler.OnNull(m_scanner.mark(), NullAnchor);
   60|     89|    return;
   61|     89|  }
   62|       |
   63|       |  // save location
   64|  2.08M|  Mark mark = m_scanner.peek().mark;
   65|       |
   66|       |  // special case: a value node by itself must be a map, with no header
   67|  2.08M|  if (m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (67:7): [True: 1.81k, False: 2.08M]
  ------------------
   68|  1.81k|    eventHandler.OnMapStart(mark, "?", NullAnchor, EmitterStyle::Default);
   69|  1.81k|    HandleMap(eventHandler);
   70|  1.81k|    eventHandler.OnMapEnd();
   71|  1.81k|    return;
   72|  1.81k|  }
   73|       |
   74|       |  // special case: an alias node
   75|  2.08M|  if (m_scanner.peek().type == Token::ALIAS) {
  ------------------
  |  Branch (75:7): [True: 1.47k, False: 2.08M]
  ------------------
   76|  1.47k|    eventHandler.OnAlias(mark, LookupAnchor(mark, m_scanner.peek().value));
   77|  1.47k|    m_scanner.pop();
   78|  1.47k|    return;
   79|  1.47k|  }
   80|       |
   81|  2.08M|  std::string tag;
   82|  2.08M|  std::string anchor_name;
   83|  2.08M|  anchor_t anchor;
   84|  2.08M|  ParseProperties(tag, anchor, anchor_name);
   85|       |
   86|  2.08M|  if (!anchor_name.empty())
  ------------------
  |  Branch (86:7): [True: 244k, False: 1.83M]
  ------------------
   87|   244k|    eventHandler.OnAnchor(mark, anchor_name);
   88|       |
   89|       |  // after parsing properties, an empty node is again a possibility
   90|  2.08M|  if (m_scanner.empty()) {
  ------------------
  |  Branch (90:7): [True: 685, False: 2.08M]
  ------------------
   91|    685|    eventHandler.OnNull(mark, anchor);
   92|    685|    return;
   93|    685|  }
   94|       |
   95|  2.08M|  const Token& token = m_scanner.peek();
   96|       |
   97|       |  // add non-specific tags
   98|  2.08M|  if (tag.empty())
  ------------------
  |  Branch (98:7): [True: 2.07M, False: 7.96k]
  ------------------
   99|  2.07M|    tag = (token.type == Token::NON_PLAIN_SCALAR ? "!" : "?");
  ------------------
  |  Branch (99:12): [True: 2.02k, False: 2.07M]
  ------------------
  100|       |
  101|  2.08M|  if (token.type == Token::PLAIN_SCALAR
  ------------------
  |  Branch (101:7): [True: 440k, False: 1.63M]
  ------------------
  102|   440k|      && tag == "?" && IsNullString(token.value.data(), token.value.size())) {
  ------------------
  |  Branch (102:10): [True: 439k, False: 981]
  |  Branch (102:24): [True: 24.1k, False: 415k]
  ------------------
  103|  24.1k|    eventHandler.OnNull(mark, anchor);
  104|  24.1k|    m_scanner.pop();
  105|  24.1k|    return;
  106|  24.1k|  }
  107|       |
  108|       |  // now split based on what kind of node we should be
  109|  2.05M|  switch (token.type) {
  110|   416k|    case Token::PLAIN_SCALAR:
  ------------------
  |  Branch (110:5): [True: 416k, False: 1.63M]
  ------------------
  111|   418k|    case Token::NON_PLAIN_SCALAR:
  ------------------
  |  Branch (111:5): [True: 2.09k, False: 2.05M]
  ------------------
  112|   418k|      eventHandler.OnScalar(mark, tag, anchor, token.value);
  113|   418k|      m_scanner.pop();
  114|   418k|      return;
  115|  37.6k|    case Token::FLOW_SEQ_START:
  ------------------
  |  Branch (115:5): [True: 37.6k, False: 2.01M]
  ------------------
  116|  37.6k|      eventHandler.OnSequenceStart(mark, tag, anchor, EmitterStyle::Flow);
  117|  37.6k|      HandleSequence(eventHandler);
  118|  37.6k|      eventHandler.OnSequenceEnd();
  119|  37.6k|      return;
  120|  6.33k|    case Token::BLOCK_SEQ_START:
  ------------------
  |  Branch (120:5): [True: 6.33k, False: 2.04M]
  ------------------
  121|  6.33k|      eventHandler.OnSequenceStart(mark, tag, anchor, EmitterStyle::Block);
  122|  6.33k|      HandleSequence(eventHandler);
  123|  6.33k|      eventHandler.OnSequenceEnd();
  124|  6.33k|      return;
  125|  41.4k|    case Token::FLOW_MAP_START:
  ------------------
  |  Branch (125:5): [True: 41.4k, False: 2.01M]
  ------------------
  126|  41.4k|      eventHandler.OnMapStart(mark, tag, anchor, EmitterStyle::Flow);
  127|  41.4k|      HandleMap(eventHandler);
  128|  41.4k|      eventHandler.OnMapEnd();
  129|  41.4k|      return;
  130|  29.7k|    case Token::BLOCK_MAP_START:
  ------------------
  |  Branch (130:5): [True: 29.7k, False: 2.02M]
  ------------------
  131|  29.7k|      eventHandler.OnMapStart(mark, tag, anchor, EmitterStyle::Block);
  132|  29.7k|      HandleMap(eventHandler);
  133|  29.7k|      eventHandler.OnMapEnd();
  134|  29.7k|      return;
  135|  37.4k|    case Token::KEY:
  ------------------
  |  Branch (135:5): [True: 37.4k, False: 2.01M]
  ------------------
  136|       |      // compact maps can only go in a flow sequence
  137|  37.4k|      if (m_pCollectionStack->GetCurCollectionType() ==
  ------------------
  |  Branch (137:11): [True: 36.6k, False: 824]
  ------------------
  138|  37.4k|          CollectionType::FlowSeq) {
  139|  36.6k|        eventHandler.OnMapStart(mark, tag, anchor, EmitterStyle::Flow);
  140|  36.6k|        HandleMap(eventHandler);
  141|  36.6k|        eventHandler.OnMapEnd();
  142|  36.6k|        return;
  143|  36.6k|      }
  144|    824|      break;
  145|  1.48M|    default:
  ------------------
  |  Branch (145:5): [True: 1.48M, False: 571k]
  ------------------
  146|  1.48M|      break;
  147|  2.05M|  }
  148|       |
  149|  1.48M|  if (tag == "?")
  ------------------
  |  Branch (149:7): [True: 1.48M, False: 2.93k]
  ------------------
  150|  1.48M|    eventHandler.OnNull(mark, anchor);
  151|  2.93k|  else
  152|  2.93k|    eventHandler.OnScalar(mark, tag, anchor, "");
  153|  1.48M|}
_ZN4YAML15SingleDocParser14HandleSequenceERNS_12EventHandlerE:
  155|  43.9k|void SingleDocParser::HandleSequence(EventHandler& eventHandler) {
  156|       |  // split based on start token
  157|  43.9k|  switch (m_scanner.peek().type) {
  158|  6.33k|    case Token::BLOCK_SEQ_START:
  ------------------
  |  Branch (158:5): [True: 6.33k, False: 37.6k]
  ------------------
  159|  6.33k|      HandleBlockSequence(eventHandler);
  160|  6.33k|      break;
  161|  37.6k|    case Token::FLOW_SEQ_START:
  ------------------
  |  Branch (161:5): [True: 37.6k, False: 6.33k]
  ------------------
  162|  37.6k|      HandleFlowSequence(eventHandler);
  163|  37.6k|      break;
  164|      0|    default:
  ------------------
  |  Branch (164:5): [True: 0, False: 43.9k]
  ------------------
  165|      0|      break;
  166|  43.9k|  }
  167|  43.9k|}
_ZN4YAML15SingleDocParser19HandleBlockSequenceERNS_12EventHandlerE:
  169|  6.33k|void SingleDocParser::HandleBlockSequence(EventHandler& eventHandler) {
  170|       |  // eat start token
  171|  6.33k|  m_scanner.pop();
  172|  6.33k|  m_pCollectionStack->PushCollectionType(CollectionType::BlockSeq);
  173|       |
  174|  14.1k|  while (true) {
  ------------------
  |  Branch (174:10): [True: 13.8k, Folded]
  ------------------
  175|  13.8k|    if (m_scanner.empty())
  ------------------
  |  Branch (175:9): [True: 0, False: 13.8k]
  ------------------
  176|      0|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_SEQ);
  177|       |
  178|  13.8k|    Token token = m_scanner.peek();
  179|  13.8k|    if (token.type != Token::BLOCK_ENTRY && token.type != Token::BLOCK_SEQ_END)
  ------------------
  |  Branch (179:9): [True: 6.04k, False: 7.78k]
  |  Branch (179:45): [True: 9, False: 6.03k]
  ------------------
  180|      9|      throw ParserException(token.mark, ErrorMsg::END_OF_SEQ);
  181|       |
  182|  13.8k|    m_scanner.pop();
  183|  13.8k|    if (token.type == Token::BLOCK_SEQ_END)
  ------------------
  |  Branch (183:9): [True: 6.03k, False: 7.78k]
  ------------------
  184|  6.03k|      break;
  185|       |
  186|       |    // check for null
  187|  7.78k|    if (!m_scanner.empty()) {
  ------------------
  |  Branch (187:9): [True: 7.75k, False: 25]
  ------------------
  188|  7.75k|      const Token& nextToken = m_scanner.peek();
  189|  7.75k|      if (nextToken.type == Token::BLOCK_ENTRY ||
  ------------------
  |  Branch (189:11): [True: 1.25k, False: 6.49k]
  ------------------
  190|  6.49k|          nextToken.type == Token::BLOCK_SEQ_END) {
  ------------------
  |  Branch (190:11): [True: 2.92k, False: 3.57k]
  ------------------
  191|  4.17k|        eventHandler.OnNull(nextToken.mark, NullAnchor);
  192|  4.17k|        continue;
  193|  4.17k|      }
  194|  7.75k|    }
  195|       |
  196|  3.60k|    HandleNode(eventHandler);
  197|  3.60k|  }
  198|       |
  199|  6.32k|  m_pCollectionStack->PopCollectionType(CollectionType::BlockSeq);
  200|  6.32k|}
_ZN4YAML15SingleDocParser18HandleFlowSequenceERNS_12EventHandlerE:
  202|  37.6k|void SingleDocParser::HandleFlowSequence(EventHandler& eventHandler) {
  203|       |  // eat start token
  204|  37.6k|  m_scanner.pop();
  205|  37.6k|  m_pCollectionStack->PushCollectionType(CollectionType::FlowSeq);
  206|       |
  207|  1.37M|  while (true) {
  ------------------
  |  Branch (207:10): [True: 1.34M, Folded]
  ------------------
  208|  1.34M|    if (m_scanner.empty())
  ------------------
  |  Branch (208:9): [True: 199, False: 1.34M]
  ------------------
  209|    199|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_SEQ_FLOW);
  210|       |
  211|       |    // first check for end
  212|  1.34M|    if (m_scanner.peek().type == Token::FLOW_SEQ_END) {
  ------------------
  |  Branch (212:9): [True: 961, False: 1.34M]
  ------------------
  213|    961|      m_scanner.pop();
  214|    961|      break;
  215|    961|    }
  216|       |
  217|       |    // then read the node
  218|  1.34M|    HandleNode(eventHandler);
  219|       |
  220|  1.34M|    if (m_scanner.empty())
  ------------------
  |  Branch (220:9): [True: 605, False: 1.34M]
  ------------------
  221|    605|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_SEQ_FLOW);
  222|       |
  223|       |    // now eat the separator (or could be a sequence end, which we ignore - but
  224|       |    // if it's neither, then it's a bad node)
  225|  1.34M|    Token& token = m_scanner.peek();
  226|  1.34M|    if (token.type == Token::FLOW_ENTRY)
  ------------------
  |  Branch (226:9): [True: 1.30M, False: 36.7k]
  ------------------
  227|  1.30M|      m_scanner.pop();
  228|  36.7k|    else if (token.type != Token::FLOW_SEQ_END)
  ------------------
  |  Branch (228:14): [True: 195, False: 36.5k]
  ------------------
  229|    195|      throw ParserException(token.mark, ErrorMsg::END_OF_SEQ_FLOW);
  230|  1.34M|  }
  231|       |
  232|  36.6k|  m_pCollectionStack->PopCollectionType(CollectionType::FlowSeq);
  233|  36.6k|}
_ZN4YAML15SingleDocParser9HandleMapERNS_12EventHandlerE:
  235|   109k|void SingleDocParser::HandleMap(EventHandler& eventHandler) {
  236|       |  // split based on start token
  237|   109k|  switch (m_scanner.peek().type) {
  238|  29.7k|    case Token::BLOCK_MAP_START:
  ------------------
  |  Branch (238:5): [True: 29.7k, False: 79.9k]
  ------------------
  239|  29.7k|      HandleBlockMap(eventHandler);
  240|  29.7k|      break;
  241|  41.4k|    case Token::FLOW_MAP_START:
  ------------------
  |  Branch (241:5): [True: 41.4k, False: 68.2k]
  ------------------
  242|  41.4k|      HandleFlowMap(eventHandler);
  243|  41.4k|      break;
  244|  36.6k|    case Token::KEY:
  ------------------
  |  Branch (244:5): [True: 36.6k, False: 73.0k]
  ------------------
  245|  36.6k|      HandleCompactMap(eventHandler);
  246|  36.6k|      break;
  247|  1.81k|    case Token::VALUE:
  ------------------
  |  Branch (247:5): [True: 1.81k, False: 107k]
  ------------------
  248|  1.81k|      HandleCompactMapWithNoKey(eventHandler);
  249|  1.81k|      break;
  250|      0|    default:
  ------------------
  |  Branch (250:5): [True: 0, False: 109k]
  ------------------
  251|      0|      break;
  252|   109k|  }
  253|   109k|}
_ZN4YAML15SingleDocParser14HandleBlockMapERNS_12EventHandlerE:
  255|  29.7k|void SingleDocParser::HandleBlockMap(EventHandler& eventHandler) {
  256|       |  // eat start token
  257|  29.7k|  m_scanner.pop();
  258|  29.7k|  m_pCollectionStack->PushCollectionType(CollectionType::BlockMap);
  259|       |
  260|  64.4k|  while (true) {
  ------------------
  |  Branch (260:10): [True: 61.1k, Folded]
  ------------------
  261|  61.1k|    if (m_scanner.empty())
  ------------------
  |  Branch (261:9): [True: 0, False: 61.1k]
  ------------------
  262|      0|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_MAP);
  263|       |
  264|  61.1k|    Token token = m_scanner.peek();
  265|  61.1k|    if (token.type != Token::KEY && token.type != Token::VALUE &&
  ------------------
  |  Branch (265:9): [True: 46.9k, False: 14.1k]
  |  Branch (265:37): [True: 26.4k, False: 20.4k]
  ------------------
  266|  26.4k|        token.type != Token::BLOCK_MAP_END)
  ------------------
  |  Branch (266:9): [True: 101, False: 26.3k]
  ------------------
  267|    101|      throw ParserException(token.mark, ErrorMsg::END_OF_MAP);
  268|       |
  269|  61.0k|    if (token.type == Token::BLOCK_MAP_END) {
  ------------------
  |  Branch (269:9): [True: 26.3k, False: 34.6k]
  ------------------
  270|  26.3k|      m_scanner.pop();
  271|  26.3k|      break;
  272|  26.3k|    }
  273|       |
  274|       |    // grab key (if non-null)
  275|  34.6k|    if (token.type == Token::KEY) {
  ------------------
  |  Branch (275:9): [True: 14.1k, False: 20.5k]
  ------------------
  276|  14.1k|      m_scanner.pop();
  277|  14.1k|      HandleNode(eventHandler);
  278|  20.5k|    } else {
  279|  20.5k|      eventHandler.OnNull(token.mark, NullAnchor);
  280|  20.5k|    }
  281|       |
  282|       |    // now grab value (optional)
  283|  34.6k|    if (!m_scanner.empty() && m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (283:9): [True: 32.0k, False: 2.60k]
  |  Branch (283:31): [True: 28.5k, False: 3.51k]
  ------------------
  284|  28.5k|      m_scanner.pop();
  285|  28.5k|      HandleNode(eventHandler);
  286|  28.5k|    } else {
  287|  6.11k|      eventHandler.OnNull(token.mark, NullAnchor);
  288|  6.11k|    }
  289|  34.6k|  }
  290|       |
  291|  29.6k|  m_pCollectionStack->PopCollectionType(CollectionType::BlockMap);
  292|  29.6k|}
_ZN4YAML15SingleDocParser13HandleFlowMapERNS_12EventHandlerE:
  294|  41.4k|void SingleDocParser::HandleFlowMap(EventHandler& eventHandler) {
  295|       |  // eat start token
  296|  41.4k|  m_scanner.pop();
  297|  41.4k|  m_pCollectionStack->PushCollectionType(CollectionType::FlowMap);
  298|       |
  299|   302k|  while (true) {
  ------------------
  |  Branch (299:10): [True: 263k, Folded]
  ------------------
  300|   263k|    if (m_scanner.empty())
  ------------------
  |  Branch (300:9): [True: 142, False: 263k]
  ------------------
  301|    142|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_MAP_FLOW);
  302|       |
  303|   263k|    Token& token = m_scanner.peek();
  304|   263k|    const Mark mark = token.mark;
  305|       |    // first check for end
  306|   263k|    if (token.type == Token::FLOW_MAP_END) {
  ------------------
  |  Branch (306:9): [True: 1.47k, False: 261k]
  ------------------
  307|  1.47k|      m_scanner.pop();
  308|  1.47k|      break;
  309|  1.47k|    }
  310|       |
  311|       |    // grab key (if non-null)
  312|   261k|    if (token.type == Token::KEY) {
  ------------------
  |  Branch (312:9): [True: 70.5k, False: 190k]
  ------------------
  313|  70.5k|      m_scanner.pop();
  314|  70.5k|      HandleNode(eventHandler);
  315|   190k|    } else {
  316|   190k|      eventHandler.OnNull(mark, NullAnchor);
  317|   190k|    }
  318|       |
  319|       |    // now grab value (optional)
  320|   261k|    if (!m_scanner.empty() && m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (320:9): [True: 221k, False: 39.6k]
  |  Branch (320:31): [True: 30.7k, False: 191k]
  ------------------
  321|  30.7k|      m_scanner.pop();
  322|  30.7k|      HandleNode(eventHandler);
  323|   230k|    } else {
  324|   230k|      eventHandler.OnNull(mark, NullAnchor);
  325|   230k|    }
  326|       |
  327|   261k|    if (m_scanner.empty())
  ------------------
  |  Branch (327:9): [True: 293, False: 261k]
  ------------------
  328|    293|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_MAP_FLOW);
  329|       |
  330|       |    // now eat the separator (or could be a map end, which we ignore - but if
  331|       |    // it's neither, then it's a bad node)
  332|   261k|    Token& nextToken = m_scanner.peek();
  333|   261k|    if (nextToken.type == Token::FLOW_ENTRY)
  ------------------
  |  Branch (333:9): [True: 220k, False: 40.2k]
  ------------------
  334|   220k|      m_scanner.pop();
  335|  40.2k|    else if (nextToken.type != Token::FLOW_MAP_END)
  ------------------
  |  Branch (335:14): [True: 188, False: 40.1k]
  ------------------
  336|    188|      throw ParserException(nextToken.mark, ErrorMsg::END_OF_MAP_FLOW);
  337|   261k|  }
  338|       |
  339|  40.8k|  m_pCollectionStack->PopCollectionType(CollectionType::FlowMap);
  340|  40.8k|}
_ZN4YAML15SingleDocParser16HandleCompactMapERNS_12EventHandlerE:
  343|  36.6k|void SingleDocParser::HandleCompactMap(EventHandler& eventHandler) {
  344|  36.6k|  m_pCollectionStack->PushCollectionType(CollectionType::CompactMap);
  345|       |
  346|       |  // grab key
  347|  36.6k|  Mark mark = m_scanner.peek().mark;
  348|  36.6k|  m_scanner.pop();
  349|  36.6k|  HandleNode(eventHandler);
  350|       |
  351|       |  // now grab value (optional)
  352|  36.6k|  if (!m_scanner.empty() && m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (352:7): [True: 697, False: 35.9k]
  |  Branch (352:29): [True: 338, False: 359]
  ------------------
  353|    338|    m_scanner.pop();
  354|    338|    HandleNode(eventHandler);
  355|  36.3k|  } else {
  356|  36.3k|    eventHandler.OnNull(mark, NullAnchor);
  357|  36.3k|  }
  358|       |
  359|  36.6k|  m_pCollectionStack->PopCollectionType(CollectionType::CompactMap);
  360|  36.6k|}
_ZN4YAML15SingleDocParser25HandleCompactMapWithNoKeyERNS_12EventHandlerE:
  363|  1.81k|void SingleDocParser::HandleCompactMapWithNoKey(EventHandler& eventHandler) {
  364|  1.81k|  m_pCollectionStack->PushCollectionType(CollectionType::CompactMap);
  365|       |
  366|       |  // null key
  367|  1.81k|  eventHandler.OnNull(m_scanner.peek().mark, NullAnchor);
  368|       |
  369|       |  // grab value
  370|  1.81k|  m_scanner.pop();
  371|  1.81k|  HandleNode(eventHandler);
  372|       |
  373|  1.81k|  m_pCollectionStack->PopCollectionType(CollectionType::CompactMap);
  374|  1.81k|}
_ZN4YAML15SingleDocParser15ParsePropertiesERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERmS8_:
  379|  2.08M|                                      std::string& anchor_name) {
  380|  2.08M|  tag.clear();
  381|  2.08M|  anchor_name.clear();
  382|  2.08M|  anchor = NullAnchor;
  383|       |
  384|  2.33M|  while (true) {
  ------------------
  |  Branch (384:10): [True: 2.33M, Folded]
  ------------------
  385|  2.33M|    if (m_scanner.empty())
  ------------------
  |  Branch (385:9): [True: 685, False: 2.33M]
  ------------------
  386|    685|      return;
  387|       |
  388|  2.33M|    switch (m_scanner.peek().type) {
  389|  8.34k|      case Token::TAG:
  ------------------
  |  Branch (389:7): [True: 8.34k, False: 2.32M]
  ------------------
  390|  8.34k|        ParseTag(tag);
  391|  8.34k|        break;
  392|   244k|      case Token::ANCHOR:
  ------------------
  |  Branch (392:7): [True: 244k, False: 2.08M]
  ------------------
  393|   244k|        ParseAnchor(anchor, anchor_name);
  394|   244k|        break;
  395|  2.07M|      default:
  ------------------
  |  Branch (395:7): [True: 2.07M, False: 252k]
  ------------------
  396|  2.07M|        return;
  397|  2.33M|    }
  398|  2.33M|  }
  399|  2.08M|}
_ZN4YAML15SingleDocParser8ParseTagERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  401|  8.34k|void SingleDocParser::ParseTag(std::string& tag) {
  402|  8.34k|  Token& token = m_scanner.peek();
  403|  8.34k|  if (!tag.empty())
  ------------------
  |  Branch (403:7): [True: 59, False: 8.28k]
  ------------------
  404|     59|    throw ParserException(token.mark, ErrorMsg::MULTIPLE_TAGS);
  405|       |
  406|  8.28k|  Tag tagInfo(token);
  407|  8.28k|  tag = tagInfo.Translate(m_directives);
  408|  8.28k|  m_scanner.pop();
  409|  8.28k|}
_ZN4YAML15SingleDocParser11ParseAnchorERmRNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  411|   244k|void SingleDocParser::ParseAnchor(anchor_t& anchor, std::string& anchor_name) {
  412|   244k|  Token& token = m_scanner.peek();
  413|   244k|  if (anchor)
  ------------------
  |  Branch (413:7): [True: 4, False: 244k]
  ------------------
  414|      4|    throw ParserException(token.mark, ErrorMsg::MULTIPLE_ANCHORS);
  415|       |
  416|   244k|  anchor_name = token.value;
  417|   244k|  anchor = RegisterAnchor(token.value);
  418|   244k|  m_scanner.pop();
  419|   244k|}
_ZN4YAML15SingleDocParser14RegisterAnchorERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  421|   244k|anchor_t SingleDocParser::RegisterAnchor(const std::string& name) {
  422|   244k|  if (name.empty())
  ------------------
  |  Branch (422:7): [True: 0, False: 244k]
  ------------------
  423|      0|    return NullAnchor;
  424|       |
  425|   244k|  return m_anchors[name] = ++m_curAnchor;
  426|   244k|}
_ZNK4YAML15SingleDocParser12LookupAnchorERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  429|  1.47k|                                       const std::string& name) const {
  430|  1.47k|  auto it = m_anchors.find(name);
  431|  1.47k|  if (it == m_anchors.end()) {
  ------------------
  |  Branch (431:7): [True: 324, False: 1.15k]
  ------------------
  432|    324|    std::stringstream ss;
  433|    324|    ss << ErrorMsg::UNKNOWN_ANCHOR << name;
  434|    324|    throw ParserException(mark, ss.str());
  435|    324|  }
  436|       |
  437|  1.15k|  return it->second;
  438|  1.47k|}

_ZN4YAML6StreamC2ERNSt3__113basic_istreamIcNS1_11char_traitsIcEEEE:
  186|  6.52k|    : m_input(input),
  187|  6.52k|      m_mark{},
  188|  6.52k|      m_charSet{},
  189|  6.52k|      m_readahead{},
  190|  6.52k|      m_pPrefetched(new unsigned char[YAML_PREFETCH_SIZE]),
  ------------------
  |  |    6|  6.52k|#define YAML_PREFETCH_SIZE 2048
  ------------------
  191|  6.52k|      m_nPrefetchedAvailable(0),
  192|  6.52k|      m_nPrefetchedUsed(0) {
  193|  6.52k|  using char_traits = std::istream::traits_type;
  194|       |
  195|  6.52k|  if (!input)
  ------------------
  |  Branch (195:7): [True: 0, False: 6.52k]
  ------------------
  196|      0|    return;
  197|       |
  198|       |  // Determine (or guess) the character-set by reading the BOM, if any.  See
  199|       |  // the YAML specification for the determination algorithm.
  200|  6.52k|  char_traits::int_type intro[4]{};
  201|  6.52k|  int nIntroUsed = 0;
  202|  6.52k|  UtfIntroState state = uis_start;
  203|  20.5k|  for (; !s_introFinalState[state];) {
  ------------------
  |  Branch (203:10): [True: 14.0k, False: 6.52k]
  ------------------
  204|  14.0k|    std::istream::int_type ch = input.get();
  205|  14.0k|    intro[nIntroUsed++] = ch;
  206|  14.0k|    UtfIntroCharType charType = IntroCharTypeOf(ch);
  207|  14.0k|    UtfIntroState newState = s_introTransitions[state][charType];
  208|  14.0k|    int nUngets = s_introUngetCount[state][charType];
  209|  14.0k|    if (nUngets > 0) {
  ------------------
  |  Branch (209:9): [True: 6.51k, False: 7.52k]
  ------------------
  210|  6.51k|      input.clear();
  211|  20.4k|      for (; nUngets > 0; --nUngets) {
  ------------------
  |  Branch (211:14): [True: 13.9k, False: 6.51k]
  ------------------
  212|  13.9k|        if (char_traits::eof() != intro[--nIntroUsed])
  ------------------
  |  Branch (212:13): [True: 13.8k, False: 90]
  ------------------
  213|  13.8k|          input.putback(char_traits::to_char_type(intro[nIntroUsed]));
  214|  13.9k|      }
  215|  6.51k|    }
  216|  14.0k|    state = newState;
  217|  14.0k|  }
  218|       |
  219|  6.52k|  switch (state) {
  220|  5.20k|    case uis_utf8:
  ------------------
  |  Branch (220:5): [True: 5.20k, False: 1.32k]
  ------------------
  221|  5.20k|      m_charSet = utf8;
  222|  5.20k|      break;
  223|    750|    case uis_utf16le:
  ------------------
  |  Branch (223:5): [True: 750, False: 5.77k]
  ------------------
  224|    750|      m_charSet = utf16le;
  225|    750|      break;
  226|    447|    case uis_utf16be:
  ------------------
  |  Branch (226:5): [True: 447, False: 6.08k]
  ------------------
  227|    447|      m_charSet = utf16be;
  228|    447|      break;
  229|     72|    case uis_utf32le:
  ------------------
  |  Branch (229:5): [True: 72, False: 6.45k]
  ------------------
  230|     72|      m_charSet = utf32le;
  231|     72|      break;
  232|     57|    case uis_utf32be:
  ------------------
  |  Branch (232:5): [True: 57, False: 6.47k]
  ------------------
  233|     57|      m_charSet = utf32be;
  234|     57|      break;
  235|      0|    default:
  ------------------
  |  Branch (235:5): [True: 0, False: 6.52k]
  ------------------
  236|      0|      m_charSet = utf8;
  237|      0|      break;
  238|  6.52k|  }
  239|       |
  240|  6.52k|  ReadAheadTo(0);
  241|  6.52k|}
_ZN4YAML6StreamD2Ev:
  243|  6.52k|Stream::~Stream() { delete[] m_pPrefetched; }
_ZNK4YAML6Stream4peekEv:
  245|   546M|char Stream::peek() const {
  246|   546M|  if (m_readahead.empty()) {
  ------------------
  |  Branch (246:7): [True: 0, False: 546M]
  ------------------
  247|      0|    return Stream::eof();
  248|      0|  }
  249|       |
  250|   546M|  return m_readahead[0];
  251|   546M|}
_ZNK4YAML6StreamcvbEv:
  253|   318M|Stream::operator bool() const {
  254|   318M|  return m_input.good() ||
  ------------------
  |  Branch (254:10): [True: 301M, False: 16.9M]
  ------------------
  255|  16.9M|         (!m_readahead.empty() && m_readahead[0] != Stream::eof());
  ------------------
  |  Branch (255:11): [True: 16.9M, False: 0]
  |  Branch (255:35): [True: 16.9M, False: 18.5k]
  ------------------
  256|   318M|}
_ZN4YAML6Stream3getEv:
  260|   232M|char Stream::get() {
  261|   232M|  char ch = peek();
  262|   232M|  AdvanceCurrent();
  263|   232M|  m_mark.column++;
  264|       |
  265|       |  // if line ending symbol is unknown, set it to the first
  266|       |  // encountered line ending.
  267|       |  // if line ending '\r' set ending symbol to '\r'
  268|       |  // other wise set it to '\n'
  269|   232M|  if (!m_lineEndingSymbol) {
  ------------------
  |  Branch (269:7): [True: 125M, False: 106M]
  ------------------
  270|   125M|    if (ch == '\n') { // line ending is '\n'
  ------------------
  |  Branch (270:9): [True: 1.69k, False: 125M]
  ------------------
  271|  1.69k|      m_lineEndingSymbol = '\n';
  272|   125M|    } else if (ch == '\r') {
  ------------------
  |  Branch (272:16): [True: 981, False: 125M]
  ------------------
  273|    981|      auto ch2 = peek();
  274|    981|      if (ch2 == '\n') { // line ending is '\r\n'
  ------------------
  |  Branch (274:11): [True: 13, False: 968]
  ------------------
  275|     13|        m_lineEndingSymbol = '\n';
  276|    968|      } else { // line ending is '\r'
  277|    968|        m_lineEndingSymbol = '\r';
  278|    968|      }
  279|    981|    }
  280|   125M|  }
  281|       |
  282|   232M|  if (ch == m_lineEndingSymbol) {
  ------------------
  |  Branch (282:7): [True: 11.1M, False: 221M]
  ------------------
  283|  11.1M|    m_mark.column = 0;
  284|  11.1M|    m_mark.line++;
  285|  11.1M|  }
  286|       |
  287|   232M|  return ch;
  288|   232M|}
_ZN4YAML6Stream3getEi:
  292|  8.33M|std::string Stream::get(int n) {
  293|  8.33M|  std::string ret;
  294|  8.33M|  if (n > 0) {
  ------------------
  |  Branch (294:7): [True: 8.33M, False: 0]
  ------------------
  295|  8.33M|    ret.reserve(static_cast<std::string::size_type>(n));
  296|  16.6M|    for (int i = 0; i < n; i++)
  ------------------
  |  Branch (296:21): [True: 8.33M, False: 8.33M]
  ------------------
  297|  8.33M|      ret += get();
  298|  8.33M|  }
  299|  8.33M|  return ret;
  300|  8.33M|}
_ZN4YAML6Stream3eatEi:
  304|  40.1M|void Stream::eat(int n) {
  305|  81.5M|  for (int i = 0; i < n; i++)
  ------------------
  |  Branch (305:19): [True: 41.3M, False: 40.1M]
  ------------------
  306|  41.3M|    get();
  307|  40.1M|}
_ZN4YAML6Stream14AdvanceCurrentEv:
  309|   232M|void Stream::AdvanceCurrent() {
  310|   232M|  if (!m_readahead.empty()) {
  ------------------
  |  Branch (310:7): [True: 232M, False: 0]
  ------------------
  311|   232M|    m_readahead.pop_front();
  312|   232M|    m_mark.pos++;
  313|   232M|  }
  314|       |
  315|   232M|  ReadAheadTo(0);
  316|   232M|}
_ZNK4YAML6Stream12_ReadAheadToEm:
  318|   153M|bool Stream::_ReadAheadTo(size_t i) const {
  319|   307M|  while (m_input.good() && (m_readahead.size() <= i)) {
  ------------------
  |  Branch (319:10): [True: 307M, False: 6.72k]
  |  Branch (319:28): [True: 153M, False: 153M]
  ------------------
  320|   153M|    switch (m_charSet) {
  ------------------
  |  Branch (320:13): [True: 153M, False: 0]
  ------------------
  321|   136M|      case utf8:
  ------------------
  |  Branch (321:7): [True: 136M, False: 17.3M]
  ------------------
  322|   136M|        StreamInUtf8();
  323|   136M|        break;
  324|  8.95M|      case utf16le:
  ------------------
  |  Branch (324:7): [True: 8.95M, False: 144M]
  ------------------
  325|  8.95M|        StreamInUtf16();
  326|  8.95M|        break;
  327|  6.76M|      case utf16be:
  ------------------
  |  Branch (327:7): [True: 6.76M, False: 146M]
  ------------------
  328|  6.76M|        StreamInUtf16();
  329|  6.76M|        break;
  330|   610k|      case utf32le:
  ------------------
  |  Branch (330:7): [True: 610k, False: 152M]
  ------------------
  331|   610k|        StreamInUtf32();
  332|   610k|        break;
  333|   995k|      case utf32be:
  ------------------
  |  Branch (333:7): [True: 995k, False: 152M]
  ------------------
  334|   995k|        StreamInUtf32();
  335|   995k|        break;
  336|   153M|    }
  337|   153M|  }
  338|       |
  339|       |  // signal end of stream
  340|   153M|  if (!m_input.good())
  ------------------
  |  Branch (340:7): [True: 6.72k, False: 153M]
  ------------------
  341|  6.72k|    m_readahead.push_back(Stream::eof());
  342|       |
  343|   153M|  return m_readahead.size() > i;
  344|   153M|}
_ZNK4YAML6Stream12StreamInUtf8Ev:
  346|   136M|void Stream::StreamInUtf8() const {
  347|   136M|  unsigned char b = GetNextByte();
  348|   136M|  if (m_input.good()) {
  ------------------
  |  Branch (348:7): [True: 136M, False: 4.94k]
  ------------------
  349|   136M|    m_readahead.push_back(static_cast<char>(b));
  350|   136M|  }
  351|   136M|}
_ZNK4YAML6Stream13StreamInUtf16Ev:
  353|  15.7M|void Stream::StreamInUtf16() const {
  354|  15.7M|  unsigned long ch = 0;
  355|  15.7M|  unsigned char bytes[2];
  356|  15.7M|  int nBigEnd = (m_charSet == utf16be) ? 0 : 1;
  ------------------
  |  Branch (356:17): [True: 6.76M, False: 8.95M]
  ------------------
  357|       |
  358|  15.7M|  bytes[0] = GetNextByte();
  359|  15.7M|  bytes[1] = GetNextByte();
  360|  15.7M|  if (!m_input.good()) {
  ------------------
  |  Branch (360:7): [True: 816, False: 15.7M]
  ------------------
  361|    816|    return;
  362|    816|  }
  363|  15.7M|  ch = (static_cast<unsigned long>(bytes[nBigEnd]) << 8) |
  364|  15.7M|       static_cast<unsigned long>(bytes[1 ^ nBigEnd]);
  365|       |
  366|  15.7M|  if (ch >= 0xDC00 && ch < 0xE000) {
  ------------------
  |  Branch (366:7): [True: 188k, False: 15.5M]
  |  Branch (366:23): [True: 9.35k, False: 178k]
  ------------------
  367|       |    // Trailing (low) surrogate...ugh, wrong order
  368|  9.35k|    QueueUnicodeCodepoint(m_readahead, CP_REPLACEMENT_CHARACTER);
  ------------------
  |  |   12|  9.35k|#define CP_REPLACEMENT_CHARACTER (0xFFFD)
  ------------------
  369|  9.35k|    return;
  370|  9.35k|  }
  371|       |
  372|  15.7M|  if (ch >= 0xD800 && ch < 0xDC00) {
  ------------------
  |  Branch (372:7): [True: 199k, False: 15.5M]
  |  Branch (372:23): [True: 20.8k, False: 178k]
  ------------------
  373|       |    // ch is a leading (high) surrogate
  374|       |
  375|       |    // Four byte UTF-8 code point
  376|       |
  377|       |    // Read the trailing (low) surrogate
  378|  17.4M|    for (;;) {
  379|  17.4M|      bytes[0] = GetNextByte();
  380|  17.4M|      bytes[1] = GetNextByte();
  381|  17.4M|      if (!m_input.good()) {
  ------------------
  |  Branch (381:11): [True: 319, False: 17.4M]
  ------------------
  382|    319|        QueueUnicodeCodepoint(m_readahead, CP_REPLACEMENT_CHARACTER);
  ------------------
  |  |   12|    319|#define CP_REPLACEMENT_CHARACTER (0xFFFD)
  ------------------
  383|    319|        return;
  384|    319|      }
  385|  17.4M|      unsigned long chLow = (static_cast<unsigned long>(bytes[nBigEnd]) << 8) |
  386|  17.4M|                            static_cast<unsigned long>(bytes[1 ^ nBigEnd]);
  387|  17.4M|      if (chLow < 0xDC00 || chLow >= 0xE000) {
  ------------------
  |  Branch (387:11): [True: 17.4M, False: 4.18k]
  |  Branch (387:29): [True: 2.81k, False: 1.36k]
  ------------------
  388|       |        // Trouble...not a low surrogate.  Dump a REPLACEMENT CHARACTER into the
  389|       |        // stream.
  390|  17.4M|        QueueUnicodeCodepoint(m_readahead, CP_REPLACEMENT_CHARACTER);
  ------------------
  |  |   12|  17.4M|#define CP_REPLACEMENT_CHARACTER (0xFFFD)
  ------------------
  391|       |
  392|       |        // Deal with the next UTF-16 unit
  393|  17.4M|        if (chLow < 0xD800 || chLow >= 0xE000) {
  ------------------
  |  Branch (393:13): [True: 16.3k, False: 17.4M]
  |  Branch (393:31): [True: 2.81k, False: 17.4M]
  ------------------
  394|       |          // Easiest case: queue the codepoint and return
  395|  19.2k|          QueueUnicodeCodepoint(m_readahead, ch);
  396|  19.2k|          return;
  397|  19.2k|        }
  398|       |        // Start the loop over with the new high surrogate
  399|  17.4M|        ch = chLow;
  400|  17.4M|        continue;
  401|  17.4M|      }
  402|       |
  403|       |      // Select the payload bits from the high surrogate
  404|  1.36k|      ch &= 0x3FF;
  405|  1.36k|      ch <<= 10;
  406|       |
  407|       |      // Include bits from low surrogate
  408|  1.36k|      ch |= (chLow & 0x3FF);
  409|       |
  410|       |      // Add the surrogacy offset
  411|  1.36k|      ch += 0x10000;
  412|  1.36k|      break;
  413|  17.4M|    }
  414|  20.8k|  }
  415|       |
  416|  15.6M|  QueueUnicodeCodepoint(m_readahead, ch);
  417|  15.6M|}
_ZNK4YAML6Stream11GetNextByteEv:
  423|   209M|unsigned char Stream::GetNextByte() const {
  424|   209M|  if (m_nPrefetchedUsed >= m_nPrefetchedAvailable) {
  ------------------
  |  Branch (424:7): [True: 114k, False: 208M]
  ------------------
  425|   114k|    std::streambuf* pBuf = m_input.rdbuf();
  426|   114k|    m_nPrefetchedAvailable = static_cast<std::size_t>(
  427|   114k|        pBuf->sgetn(ReadBuffer(m_pPrefetched), YAML_PREFETCH_SIZE));
  ------------------
  |  |    6|   114k|#define YAML_PREFETCH_SIZE 2048
  ------------------
  428|   114k|    m_nPrefetchedUsed = 0;
  429|   114k|    if (!m_nPrefetchedAvailable) {
  ------------------
  |  Branch (429:9): [True: 7.30k, False: 107k]
  ------------------
  430|  7.30k|      m_input.setstate(std::ios_base::eofbit);
  431|  7.30k|    }
  432|       |
  433|   114k|    if (0 == m_nPrefetchedAvailable) {
  ------------------
  |  Branch (433:9): [True: 7.30k, False: 107k]
  ------------------
  434|  7.30k|      return 0;
  435|  7.30k|    }
  436|   114k|  }
  437|       |
  438|   209M|  return m_pPrefetched[m_nPrefetchedUsed++];
  439|   209M|}
_ZNK4YAML6Stream13StreamInUtf32Ev:
  441|  1.60M|void Stream::StreamInUtf32() const {
  442|  1.60M|  static int indexes[2][4] = {{3, 2, 1, 0}, {0, 1, 2, 3}};
  443|       |
  444|  1.60M|  unsigned long ch = 0;
  445|  1.60M|  unsigned char bytes[4];
  446|  1.60M|  int* pIndexes = (m_charSet == utf32be) ? indexes[1] : indexes[0];
  ------------------
  |  Branch (446:19): [True: 995k, False: 610k]
  ------------------
  447|       |
  448|  1.60M|  bytes[0] = GetNextByte();
  449|  1.60M|  bytes[1] = GetNextByte();
  450|  1.60M|  bytes[2] = GetNextByte();
  451|  1.60M|  bytes[3] = GetNextByte();
  452|  1.60M|  if (!m_input.good()) {
  ------------------
  |  Branch (452:7): [True: 124, False: 1.60M]
  ------------------
  453|    124|    return;
  454|    124|  }
  455|       |
  456|  8.02M|  for (int i = 0; i < 4; ++i) {
  ------------------
  |  Branch (456:19): [True: 6.42M, False: 1.60M]
  ------------------
  457|  6.42M|    ch <<= 8;
  458|  6.42M|    ch |= bytes[pIndexes[i]];
  459|  6.42M|  }
  460|       |
  461|  1.60M|  QueueUnicodeCodepoint(m_readahead, ch);
  462|  1.60M|}
_ZN4YAML15IntroCharTypeOfEi:
  125|  14.0k|inline UtfIntroCharType IntroCharTypeOf(std::istream::int_type ch) {
  126|  14.0k|  if (std::istream::traits_type::eof() == ch) {
  ------------------
  |  Branch (126:7): [True: 90, False: 13.9k]
  ------------------
  127|     90|    return uictOther;
  128|     90|  }
  129|       |
  130|  13.9k|  switch (ch) {
  ------------------
  |  Branch (130:11): [True: 2.29k, False: 11.6k]
  ------------------
  131|  1.87k|    case 0:
  ------------------
  |  Branch (131:5): [True: 1.87k, False: 12.0k]
  ------------------
  132|  1.87k|      return uict00;
  133|     12|    case 0xBB:
  ------------------
  |  Branch (133:5): [True: 12, False: 13.9k]
  ------------------
  134|     12|      return uictBB;
  135|      8|    case 0xBF:
  ------------------
  |  Branch (135:5): [True: 8, False: 13.9k]
  ------------------
  136|      8|      return uictBF;
  137|    113|    case 0xEF:
  ------------------
  |  Branch (137:5): [True: 113, False: 13.8k]
  ------------------
  138|    113|      return uictEF;
  139|     49|    case 0xFE:
  ------------------
  |  Branch (139:5): [True: 49, False: 13.8k]
  ------------------
  140|     49|      return uictFE;
  141|    233|    case 0xFF:
  ------------------
  |  Branch (141:5): [True: 233, False: 13.7k]
  ------------------
  142|    233|      return uictFF;
  143|  13.9k|  }
  144|       |
  145|  11.6k|  if ((ch > 0) && (ch < 0xFF)) {
  ------------------
  |  Branch (145:7): [True: 11.6k, False: 0]
  |  Branch (145:19): [True: 11.6k, False: 0]
  ------------------
  146|  11.6k|    return uictAscii;
  147|  11.6k|  }
  148|       |
  149|      0|  return uictOther;
  150|  11.6k|}
_ZN4YAML21QueueUnicodeCodepointERNSt3__15dequeIcNS0_9allocatorIcEEEEm:
  161|  34.8M|inline void QueueUnicodeCodepoint(std::deque<char>& q, unsigned long ch) {
  162|       |  // We are not allowed to queue the Stream::eof() codepoint, so
  163|       |  // replace it with CP_REPLACEMENT_CHARACTER
  164|  34.8M|  if (static_cast<unsigned long>(Stream::eof()) == ch) {
  ------------------
  |  Branch (164:7): [True: 984, False: 34.8M]
  ------------------
  165|    984|    ch = CP_REPLACEMENT_CHARACTER;
  ------------------
  |  |   12|    984|#define CP_REPLACEMENT_CHARACTER (0xFFFD)
  ------------------
  166|    984|  }
  167|       |
  168|  34.8M|  if (ch < 0x80) {
  ------------------
  |  Branch (168:7): [True: 1.29M, False: 33.5M]
  ------------------
  169|  1.29M|    q.push_back(Utf8Adjust(ch, 0, 0));
  170|  33.5M|  } else if (ch < 0x800) {
  ------------------
  |  Branch (170:14): [True: 810k, False: 32.7M]
  ------------------
  171|   810k|    q.push_back(Utf8Adjust(ch, 2, 6));
  172|   810k|    q.push_back(Utf8Adjust(ch, 1, 0));
  173|  32.7M|  } else if (ch < 0x10000) {
  ------------------
  |  Branch (173:14): [True: 31.0M, False: 1.60M]
  ------------------
  174|  31.0M|    q.push_back(Utf8Adjust(ch, 3, 12));
  175|  31.0M|    q.push_back(Utf8Adjust(ch, 1, 6));
  176|  31.0M|    q.push_back(Utf8Adjust(ch, 1, 0));
  177|  31.0M|  } else {
  178|  1.60M|    q.push_back(Utf8Adjust(ch, 4, 18));
  179|  1.60M|    q.push_back(Utf8Adjust(ch, 1, 12));
  180|  1.60M|    q.push_back(Utf8Adjust(ch, 1, 6));
  181|  1.60M|    q.push_back(Utf8Adjust(ch, 1, 0));
  182|  1.60M|  }
  183|  34.8M|}
_ZN4YAML10Utf8AdjustEmhh:
  153|   102M|                       unsigned char rshift) {
  154|   102M|  const unsigned char header =
  155|   102M|      static_cast<unsigned char>(((1 << lead_bits) - 1) << (8 - lead_bits));
  156|   102M|  const unsigned char mask = (0xFF >> (lead_bits + 1));
  157|   102M|  return static_cast<char>(
  158|   102M|      static_cast<unsigned char>(header | ((ch >> rshift) & mask)));
  159|   102M|}
_ZN4YAML10ReadBufferEPh:
  419|   114k|inline char* ReadBuffer(unsigned char* pBuffer) {
  420|   114k|  return reinterpret_cast<char*>(pBuffer);
  421|   114k|}

_ZNK4YAML6StreamntEv:
   34|   154M|  bool operator!() const { return !static_cast<bool>(*this); }
_ZN4YAML6Stream3eofEv:
   41|  71.9M|  static char eof() { return 0x04; }
_ZNK4YAML6Stream4markEv:
   43|   179M|  const Mark mark() const { return m_mark; }
_ZNK4YAML6Stream3posEv:
   44|  1.60M|  int pos() const { return m_mark.pos; }
_ZNK4YAML6Stream4lineEv:
   45|  1.65M|  int line() const { return m_mark.line; }
_ZNK4YAML6Stream6columnEv:
   46|   301M|  int column() const { return m_mark.column; }
_ZN4YAML6Stream11ResetColumnEv:
   47|  4.97k|  void ResetColumn() { m_mark.column = 0; }
_ZNK4YAML6Stream6CharAtEm:
   74|  1.90G|inline char Stream::CharAt(size_t i) const { return m_readahead[i]; }
_ZNK4YAML6Stream11ReadAheadToEm:
   76|  1.38G|inline bool Stream::ReadAheadTo(size_t i) const {
   77|  1.38G|  if (m_readahead.size() > i)
  ------------------
  |  Branch (77:7): [True: 1.23G, False: 153M]
  ------------------
   78|  1.23G|    return true;
   79|   153M|  return _ReadAheadTo(i);
   80|  1.38G|}

_ZN4YAML16StreamCharSourceC2ERKNS_6StreamE:
   18|   546M|  StreamCharSource(const Stream& stream) : m_offset(0), m_stream(stream) {}
_ZNK4YAML16StreamCharSourcecvbEv:
   36|  1.15G|inline StreamCharSource::operator bool() const {
   37|  1.15G|  return m_stream.ReadAheadTo(m_offset);
   38|  1.15G|}
_ZNK4YAML16StreamCharSourceixEm:
   26|  1.90G|  char operator[](std::size_t i) const { return m_stream.CharAt(m_offset + i); }
_ZNK4YAML16StreamCharSourceplEi:
   40|   605M|inline const StreamCharSource StreamCharSource::operator+(int i) const {
   41|   605M|  StreamCharSource source(*this);
   42|   605M|  if (static_cast<int>(source.m_offset) + i >= 0)
  ------------------
  |  Branch (42:7): [True: 605M, False: 0]
  ------------------
   43|   605M|    source.m_offset += static_cast<std::size_t>(i);
   44|      0|  else
   45|      0|    source.m_offset = 0;
   46|   605M|  return source;
   47|   605M|}

_ZN4YAML16StringCharSourceC2EPKcm:
   16|    667|      : m_str(str), m_size(size), m_offset(0) {}
_ZNK4YAML16StringCharSourcecvbEv:
   18|    667|  operator bool() const { return m_offset < m_size; }
_ZNK4YAML16StringCharSourceixEm:
   19|  1.33k|  char operator[](std::size_t i) const { return m_str[m_offset + i]; }

_ZN4YAML3TagC2ERKNS_5TokenE:
   10|  8.28k|    : type(static_cast<TYPE>(token.data)), handle{}, value{} {
   11|  8.28k|  switch (type) {
   12|    434|    case VERBATIM:
  ------------------
  |  Branch (12:5): [True: 434, False: 7.84k]
  ------------------
   13|    434|      value = token.value;
   14|    434|      break;
   15|  4.09k|    case PRIMARY_HANDLE:
  ------------------
  |  Branch (15:5): [True: 4.09k, False: 4.19k]
  ------------------
   16|  4.09k|      value = token.value;
   17|  4.09k|      break;
   18|    156|    case SECONDARY_HANDLE:
  ------------------
  |  Branch (18:5): [True: 156, False: 8.12k]
  ------------------
   19|    156|      value = token.value;
   20|    156|      break;
   21|  1.64k|    case NAMED_HANDLE:
  ------------------
  |  Branch (21:5): [True: 1.64k, False: 6.63k]
  ------------------
   22|  1.64k|      handle = token.value;
   23|  1.64k|      value = token.params[0];
   24|  1.64k|      break;
   25|  1.95k|    case NON_SPECIFIC:
  ------------------
  |  Branch (25:5): [True: 1.95k, False: 6.33k]
  ------------------
   26|  1.95k|      break;
   27|      0|    default:
  ------------------
  |  Branch (27:5): [True: 0, False: 8.28k]
  ------------------
   28|       |      assert(false);
   29|  8.28k|  }
   30|  8.28k|}
_ZNK4YAML3Tag9TranslateERKNS_10DirectivesE:
   32|  8.28k|std::string Tag::Translate(const Directives& directives) const {
   33|  8.28k|  switch (type) {
   34|    434|    case VERBATIM:
  ------------------
  |  Branch (34:5): [True: 434, False: 7.84k]
  ------------------
   35|    434|      return value;
   36|  4.09k|    case PRIMARY_HANDLE:
  ------------------
  |  Branch (36:5): [True: 4.09k, False: 4.19k]
  ------------------
   37|  4.09k|      return directives.TranslateTagHandle("!") + value;
   38|    156|    case SECONDARY_HANDLE:
  ------------------
  |  Branch (38:5): [True: 156, False: 8.12k]
  ------------------
   39|    156|      return directives.TranslateTagHandle("!!") + value;
   40|  1.64k|    case NAMED_HANDLE:
  ------------------
  |  Branch (40:5): [True: 1.64k, False: 6.63k]
  ------------------
   41|  1.64k|      return directives.TranslateTagHandle("!" + handle + "!") + value;
   42|  1.95k|    case NON_SPECIFIC:
  ------------------
  |  Branch (42:5): [True: 1.95k, False: 6.33k]
  ------------------
   43|       |      // TODO:
   44|  1.95k|      return "!";
   45|      0|    default:
  ------------------
  |  Branch (45:5): [True: 0, False: 8.28k]
  ------------------
   46|      0|      assert(false);
   47|  8.28k|  }
   48|      0|  throw std::runtime_error("yaml-cpp: internal error, bad tag type");
   49|  8.28k|}

_ZN4YAML5TokenC2ENS0_4TYPEERKNS_4MarkE:
   53|   125M|      : status(VALID), type(type_), mark(mark_), value{}, params{}, data(0) {}

