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

_ZN4YAML10DepthGuardILi500EEC2ERiRKNS_4MarkERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE:
   51|  1.59M|  DepthGuard(int & depth_, const Mark& mark_, const std::string& msg_) : m_depth(depth_) {
   52|  1.59M|    ++m_depth;
   53|  1.59M|    if ( max_depth <= m_depth ) {
  ------------------
  |  Branch (53:10): [True: 124, False: 1.59M]
  ------------------
   54|    124|        throw DeepRecursion{m_depth, mark_, msg_};
   55|    124|    }
   56|  1.59M|  }
_ZN4YAML10DepthGuardILi500EED2Ev:
   63|  1.59M|  ~DepthGuard() {
   64|  1.59M|    --m_depth;
   65|  1.59M|  }

_ZN4YAML12EventHandler8OnAnchorERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
   39|   421k|                        const std::string& /*anchor_name*/) {
   40|       |    // empty default implementation for compatibility
   41|   421k|  }
_ZN4YAML12EventHandlerD2Ev:
   20|   479k|  virtual ~EventHandler() = default;

_ZN4YAML9ExceptionC2ERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  160|  3.58k|      : std::runtime_error(build_what(mark_, msg_)), mark(mark_), msg(msg_) {}
_ZN4YAML9Exception10build_whatERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  170|  3.58k|                                      const std::string& msg) {
  171|  3.58k|    if (mark.is_null()) {
  ------------------
  |  Branch (171:9): [True: 0, False: 3.58k]
  ------------------
  172|      0|      return msg;
  173|      0|    }
  174|       |
  175|  3.58k|    std::stringstream output;
  176|  3.58k|    output << "yaml-cpp: error at line " << mark.line + 1 << ", column "
  177|  3.58k|           << mark.column + 1 << ": " << msg;
  178|  3.58k|    return output.str();
  179|  3.58k|  }
_ZN4YAML15ParserExceptionC2ERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  185|  3.53k|      : Exception(mark_, msg_) {}
_ZN4YAML23RepresentationExceptionC2ERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  193|     49|      : Exception(mark_, msg_) {}
_ZN4YAML15NonUniqueMapKeyC2INS_6detail4nodeEEERKNS_4MarkERKT_:
  310|     49|      : RepresentationException(mark_, ErrorMsg::NON_UNIQUE_MAP_KEY) {}

_ZN4YAML4MarkC2Ev:
   14|   976k|  Mark() : pos(0), line(0), column(0) {}
_ZN4YAML4Mark9null_markEv:
   16|  2.41M|  static const Mark null_mark() { return Mark(-1, -1, -1); }
_ZNK4YAML4Mark7is_nullEv:
   18|  3.58k|  bool is_null() const { return pos == -1 && line == -1 && column == -1; }
  ------------------
  |  Branch (18:33): [True: 0, False: 3.58k]
  |  Branch (18:46): [True: 0, False: 0]
  |  Branch (18:60): [True: 0, False: 0]
  ------------------
_ZN4YAML4MarkC2Eiii:
   25|  2.41M|      : pos(pos_), line(line_), column(column_) {}

_ZN4YAML6detail6memoryC2Ev:
   25|   479k|  memory() : m_nodes{} {}
_ZN4YAML6detail13memory_holderC2Ev:
   37|   479k|  memory_holder() : m_pMemory(std::make_shared<memory>()) {}
_ZN4YAML6detail13memory_holder11create_nodeEv:
   39|  2.41M|  node& create_node() { return m_pMemory->create_node(); }

_ZN4YAML6detail4nodeC2Ev:
   27|  2.41M|  node() : m_pRef(std::make_shared<node_ref>()), m_dependencies{}, m_index{} {}
_ZNK4YAML6detail4node10is_definedEv:
   34|  7.50M|  bool is_defined() const { return m_pRef->is_defined(); }
_ZNK4YAML6detail4node4typeEv:
   36|  4.67M|  NodeType::value type() const { return m_pRef->type(); }
_ZNK4YAML6detail4node6scalarEv:
   38|  3.76M|  const std::string& scalar() const { return m_pRef->scalar(); }
_ZN4YAML6detail4node12mark_definedEv:
   46|  4.77M|  void mark_defined() {
   47|  4.77M|    if (is_defined())
  ------------------
  |  Branch (47:9): [True: 2.35M, False: 2.41M]
  ------------------
   48|  2.35M|      return;
   49|       |
   50|  2.41M|    m_pRef->mark_defined();
   51|  2.41M|    for (node* dependency : m_dependencies)
  ------------------
  |  Branch (51:27): [True: 0, False: 2.41M]
  ------------------
   52|      0|      dependency->mark_defined();
   53|  2.41M|    m_dependencies.clear();
   54|  2.41M|  }
_ZN4YAML6detail4node14add_dependencyERS1_:
   56|  1.83M|  void add_dependency(node& rhs) {
   57|  1.83M|    if (is_defined())
  ------------------
  |  Branch (57:9): [True: 1.83M, False: 0]
  ------------------
   58|  1.83M|      rhs.mark_defined();
   59|      0|    else
   60|      0|      m_dependencies.insert(&rhs);
   61|  1.83M|  }
_ZN4YAML6detail4node8set_markERKNS_4MarkE:
   74|  2.41M|  void set_mark(const Mark& mark) { m_pRef->set_mark(mark); }
_ZN4YAML6detail4node8set_typeENS_8NodeType5valueE:
   76|   148k|  void set_type(NodeType::value type) {
   77|   148k|    if (type != NodeType::Undefined)
  ------------------
  |  Branch (77:9): [True: 148k, False: 0]
  ------------------
   78|   148k|      mark_defined();
   79|   148k|    m_pRef->set_type(type);
   80|   148k|  }
_ZN4YAML6detail4node8set_nullEv:
   81|  2.03M|  void set_null() {
   82|  2.03M|    mark_defined();
   83|  2.03M|    m_pRef->set_null();
   84|  2.03M|  }
_ZN4YAML6detail4node10set_scalarERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   85|   229k|  void set_scalar(const std::string& scalar) {
   86|   229k|    mark_defined();
   87|   229k|    m_pRef->set_scalar(scalar);
   88|   229k|  }
_ZN4YAML6detail4node7set_tagERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   89|   377k|  void set_tag(const std::string& tag) {
   90|   377k|    mark_defined();
   91|   377k|    m_pRef->set_tag(tag);
   92|   377k|  }
_ZN4YAML6detail4node9set_styleENS_12EmitterStyle5valueE:
   95|   148k|  void set_style(EmitterStyle::value style) {
   96|   148k|    mark_defined();
   97|   148k|    m_pRef->set_style(style);
   98|   148k|  }
_ZN4YAML6detail4node9push_backERS1_NSt3__110shared_ptrINS0_13memory_holderEEE:
  114|   929k|  void push_back(node& input, shared_memory_holder pMemory) {
  115|   929k|    m_pRef->push_back(input, pMemory);
  116|   929k|    input.add_dependency(*this);
  117|   929k|    m_index = m_amount.fetch_add(1);
  118|   929k|  }
_ZN4YAML6detail4node6insertERS1_S2_NSt3__110shared_ptrINS0_13memory_holderEEE:
  119|   451k|  void insert(node& key, node& value, shared_memory_holder pMemory) {
  120|   451k|    m_pRef->insert(key, value, pMemory);
  121|   451k|    key.add_dependency(*this);
  122|   451k|    value.add_dependency(*this);
  123|   451k|  }

_ZNK4YAML6detail9node_data10is_definedEv:
   44|  7.50M|  bool is_defined() const { return m_isDefined; }
_ZNK4YAML6detail9node_data4typeEv:
   46|  4.67M|  NodeType::value type() const {
   47|  4.67M|    return m_isDefined ? m_type : NodeType::Undefined;
  ------------------
  |  Branch (47:12): [True: 4.67M, False: 0]
  ------------------
   48|  4.67M|  }
_ZNK4YAML6detail9node_data6scalarEv:
   49|  3.76M|  const std::string& scalar() const { return m_scalar; }

_ZN4YAML6detail8node_refC2Ev:
   19|  2.41M|  node_ref() : m_pData(std::make_shared<node_data>()) {}
_ZNK4YAML6detail8node_ref10is_definedEv:
   23|  7.50M|  bool is_defined() const { return m_pData->is_defined(); }
_ZNK4YAML6detail8node_ref4typeEv:
   25|  4.67M|  NodeType::value type() const { return m_pData->type(); }
_ZNK4YAML6detail8node_ref6scalarEv:
   26|  3.76M|  const std::string& scalar() const { return m_pData->scalar(); }
_ZN4YAML6detail8node_ref12mark_definedEv:
   30|  2.41M|  void mark_defined() { m_pData->mark_defined(); }
_ZN4YAML6detail8node_ref8set_markERKNS_4MarkE:
   33|  2.41M|  void set_mark(const Mark& mark) { m_pData->set_mark(mark); }
_ZN4YAML6detail8node_ref8set_typeENS_8NodeType5valueE:
   34|   148k|  void set_type(NodeType::value type) { m_pData->set_type(type); }
_ZN4YAML6detail8node_ref7set_tagERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   35|   377k|  void set_tag(const std::string& tag) { m_pData->set_tag(tag); }
_ZN4YAML6detail8node_ref8set_nullEv:
   36|  2.03M|  void set_null() { m_pData->set_null(); }
_ZN4YAML6detail8node_ref10set_scalarERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   37|   229k|  void set_scalar(const std::string& scalar) { m_pData->set_scalar(scalar); }
_ZN4YAML6detail8node_ref9set_styleENS_12EmitterStyle5valueE:
   38|   148k|  void set_style(EmitterStyle::value style) { m_pData->set_style(style); }
_ZN4YAML6detail8node_ref9push_backERNS0_4nodeENSt3__110shared_ptrINS0_13memory_holderEEE:
   54|   929k|  void push_back(node& node, shared_memory_holder pMemory) {
   55|   929k|    m_pData->push_back(node, pMemory);
   56|   929k|  }
_ZN4YAML6detail8node_ref6insertERNS0_4nodeES3_NSt3__110shared_ptrINS0_13memory_holderEEE:
   57|   451k|  void insert(node& key, node& value, shared_memory_holder pMemory) {
   58|   451k|    m_pData->insert(key, value, pMemory);
   59|   451k|  }

_ZN4YAML4NodeD2Ev:
   56|  1.73M|inline Node::~Node() = default;
_ZN4YAML4NodeC2ERKS0_:
   45|  1.26M|inline Node::Node(const Node&) = default;
_ZN4YAML4NodeC2ERNS_6detail4nodeENSt3__110shared_ptrINS1_13memory_holderEEE:
   54|   472k|    : m_isValid(true), m_invalidKey{}, m_pMemory(pMemory), m_pNode(&node) {}

_ZN4YAML9ExceptionD2Ev:
   15|  3.58k|    #define YAML_CPP_NOEXCEPT noexcept

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

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

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

_ZN4YAML3Exp8ParseHexERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_4MarkE:
   13|  1.87k|unsigned ParseHex(const std::string& str, const Mark& mark) {
   14|  1.87k|  unsigned value = 0;
   15|  7.81k|  for (char ch : str) {
  ------------------
  |  Branch (15:16): [True: 7.81k, False: 1.78k]
  ------------------
   16|  7.81k|    int digit = 0;
   17|  7.81k|    if ('a' <= ch && ch <= 'f')
  ------------------
  |  Branch (17:9): [True: 803, False: 7.01k]
  |  Branch (17:22): [True: 799, False: 4]
  ------------------
   18|    799|      digit = ch - 'a' + 10;
   19|  7.02k|    else if ('A' <= ch && ch <= 'F')
  ------------------
  |  Branch (19:14): [True: 2.04k, False: 4.97k]
  |  Branch (19:27): [True: 2.03k, False: 11]
  ------------------
   20|  2.03k|      digit = ch - 'A' + 10;
   21|  4.98k|    else if ('0' <= ch && ch <= '9')
  ------------------
  |  Branch (21:14): [True: 4.91k, False: 69]
  |  Branch (21:27): [True: 4.90k, False: 15]
  ------------------
   22|  4.90k|      digit = ch - '0';
   23|     84|    else
   24|     84|      throw ParserException(mark, ErrorMsg::INVALID_HEX);
   25|       |
   26|  7.73k|    value = (value << 4) + digit;
   27|  7.73k|  }
   28|       |
   29|  1.78k|  return value;
   30|  1.87k|}
_ZN4YAML3Exp3StrEj:
   32|  4.37k|std::string Str(unsigned ch) { return std::string(1, static_cast<char>(ch)); }
_ZN4YAML3Exp6EscapeERNS_6StreamEi:
   38|  1.87k|std::string Escape(Stream& in, int codeLength) {
   39|       |  // grab string
   40|  1.87k|  std::string str;
   41|  10.0k|  for (int i = 0; i < codeLength; i++)
  ------------------
  |  Branch (41:19): [True: 8.16k, False: 1.87k]
  ------------------
   42|  8.16k|    str += in.get();
   43|       |
   44|       |  // get the value
   45|  1.87k|  unsigned value = ParseHex(str, in.mark());
   46|       |
   47|       |  // legal unicode?
   48|  1.87k|  if ((value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF) {
  ------------------
  |  Branch (48:8): [True: 626, False: 1.24k]
  |  Branch (48:27): [True: 12, False: 614]
  |  Branch (48:47): [True: 29, False: 1.74k]
  ------------------
   49|     41|    std::stringstream msg;
   50|     41|    msg << ErrorMsg::INVALID_UNICODE << value;
   51|     41|    throw ParserException(in.mark(), msg.str());
   52|     41|  }
   53|       |
   54|       |  // now break it up into chars
   55|  1.83k|  if (value <= 0x7F)
  ------------------
  |  Branch (55:7): [True: 370, False: 1.46k]
  ------------------
   56|    370|    return Str(value);
   57|       |
   58|  1.46k|  if (value <= 0x7FF)
  ------------------
  |  Branch (58:7): [True: 446, False: 1.01k]
  ------------------
   59|    446|    return Str(0xC0 + (value >> 6)) + Str(0x80 + (value & 0x3F));
   60|       |
   61|  1.01k|  if (value <= 0xFFFF)
  ------------------
  |  Branch (61:7): [True: 607, False: 408]
  ------------------
   62|    607|    return Str(0xE0 + (value >> 12)) + Str(0x80 + ((value >> 6) & 0x3F)) +
   63|    607|           Str(0x80 + (value & 0x3F));
   64|       |
   65|    408|  return Str(0xF0 + (value >> 18)) + Str(0x80 + ((value >> 12) & 0x3F)) +
   66|    408|         Str(0x80 + ((value >> 6) & 0x3F)) + Str(0x80 + (value & 0x3F));
   67|  1.01k|}
_ZN4YAML3Exp6EscapeERNS_6StreamE:
   74|  42.1k|std::string Escape(Stream& in) {
   75|       |  // eat slash
   76|  42.1k|  char escape = in.get();
   77|       |
   78|       |  // switch on escape character
   79|  42.1k|  char ch = in.get();
   80|       |
   81|       |  // first do single quote, since it's easier
   82|  42.1k|  if (escape == '\'' && ch == '\'')
  ------------------
  |  Branch (82:7): [True: 703, False: 41.4k]
  |  Branch (82:25): [True: 703, False: 0]
  ------------------
   83|    703|    return "\'";
   84|       |
   85|       |  // now do the slash (we're not gonna check if it's a slash - you better pass
   86|       |  // one!)
   87|  41.4k|  switch (ch) {
  ------------------
  |  Branch (87:11): [True: 41.1k, False: 250]
  ------------------
   88|    803|    case '0':
  ------------------
  |  Branch (88:5): [True: 803, False: 40.6k]
  ------------------
   89|    803|      return std::string(1, '\x00');
   90|     82|    case 'a':
  ------------------
  |  Branch (90:5): [True: 82, False: 41.3k]
  ------------------
   91|     82|      return "\x07";
   92|    847|    case 'b':
  ------------------
  |  Branch (92:5): [True: 847, False: 40.5k]
  ------------------
   93|    847|      return "\x08";
   94|    748|    case 't':
  ------------------
  |  Branch (94:5): [True: 748, False: 40.6k]
  ------------------
   95|  5.27k|    case '\t':
  ------------------
  |  Branch (95:5): [True: 4.53k, False: 36.8k]
  ------------------
   96|  5.27k|      return "\x09";
   97|  8.41k|    case 'n':
  ------------------
  |  Branch (97:5): [True: 8.41k, False: 32.9k]
  ------------------
   98|  8.41k|      return "\x0A";
   99|    385|    case 'v':
  ------------------
  |  Branch (99:5): [True: 385, False: 41.0k]
  ------------------
  100|    385|      return "\x0B";
  101|    297|    case 'f':
  ------------------
  |  Branch (101:5): [True: 297, False: 41.1k]
  ------------------
  102|    297|      return "\x0C";
  103|    212|    case 'r':
  ------------------
  |  Branch (103:5): [True: 212, False: 41.1k]
  ------------------
  104|    212|      return "\x0D";
  105|    965|    case 'e':
  ------------------
  |  Branch (105:5): [True: 965, False: 40.4k]
  ------------------
  106|    965|      return "\x1B";
  107|    510|    case ' ':
  ------------------
  |  Branch (107:5): [True: 510, False: 40.8k]
  ------------------
  108|    510|      return R"( )";
  109|  5.89k|    case '\"':
  ------------------
  |  Branch (109:5): [True: 5.89k, False: 35.5k]
  ------------------
  110|  5.89k|      return "\"";
  111|    652|    case '\'':
  ------------------
  |  Branch (111:5): [True: 652, False: 40.7k]
  ------------------
  112|    652|      return "\'";
  113|    605|    case '\\':
  ------------------
  |  Branch (113:5): [True: 605, False: 40.8k]
  ------------------
  114|    605|      return "\\";
  115|    236|    case '/':
  ------------------
  |  Branch (115:5): [True: 236, False: 41.1k]
  ------------------
  116|    236|      return "/";
  117|    464|    case 'N':
  ------------------
  |  Branch (117:5): [True: 464, False: 40.9k]
  ------------------
  118|    464|      return "\xC2\x85";      // NEL (U+0085)
  119|    421|    case '_':
  ------------------
  |  Branch (119:5): [True: 421, False: 40.9k]
  ------------------
  120|    421|      return "\xC2\xA0";      // NBSP (U+00A0)
  121|  9.93k|    case 'L':
  ------------------
  |  Branch (121:5): [True: 9.93k, False: 31.4k]
  ------------------
  122|  9.93k|      return "\xE2\x80\xA8";  // LS (U+2028)
  123|  3.29k|    case 'P':
  ------------------
  |  Branch (123:5): [True: 3.29k, False: 38.1k]
  ------------------
  124|  3.29k|      return "\xE2\x80\xA9";  // PS (U+2029)
  125|    781|    case 'x':
  ------------------
  |  Branch (125:5): [True: 781, False: 40.6k]
  ------------------
  126|    781|      return Escape(in, 2);
  127|    531|    case 'u':
  ------------------
  |  Branch (127:5): [True: 531, False: 40.8k]
  ------------------
  128|    531|      return Escape(in, 4);
  129|    560|    case 'U':
  ------------------
  |  Branch (129:5): [True: 560, False: 40.8k]
  ------------------
  130|    560|      return Escape(in, 8);
  131|  41.4k|  }
  132|       |
  133|    250|  std::stringstream msg;
  134|    250|  throw ParserException(in.mark(), std::string(ErrorMsg::INVALID_ESCAPE) + ch);
  135|  41.4k|}

_ZN4YAML3Exp8DocStartEv:
   84|  2.36M|inline const RegEx& DocStart() {
   85|  2.36M|  static const RegEx e = RegEx("---") + (BlankOrBreak() | RegEx());
   86|  2.36M|  return e;
   87|  2.36M|}
_ZN4YAML3Exp12BlankOrBreakEv:
   43|  34.6M|inline const RegEx& BlankOrBreak() {
   44|  34.6M|  static const RegEx e = Blank() | Break();
   45|  34.6M|  return e;
   46|  34.6M|}
_ZN4YAML3Exp5BlankEv:
   35|  37.7M|inline const RegEx& Blank() {
   36|  37.7M|  static const RegEx e = Space() | Tab();
   37|  37.7M|  return e;
   38|  37.7M|}
_ZN4YAML3Exp5SpaceEv:
   27|      1|inline const RegEx& Space() {
   28|      1|  static const RegEx e = RegEx(' ');
   29|      1|  return e;
   30|      1|}
_ZN4YAML3Exp6DocEndEv:
   88|  2.14M|inline const RegEx& DocEnd() {
   89|  2.14M|  static const RegEx e = RegEx("...") + (BlankOrBreak() | RegEx());
   90|  2.14M|  return e;
   91|  2.14M|}
_ZN4YAML3Exp10BlockEntryEv:
   96|  12.8M|inline const RegEx& BlockEntry() {
   97|  12.8M|  static const RegEx e = RegEx('-') + (BlankOrBreak() | RegEx());
   98|  12.8M|  return e;
   99|  12.8M|}
_ZN4YAML3Exp3KeyEv:
  100|  9.07M|inline const RegEx& Key() {
  101|  9.07M|  static const RegEx e = RegEx('?') + BlankOrBreak();
  102|  9.07M|  return e;
  103|  9.07M|}
_ZN4YAML3Exp9KeyInFlowEv:
  104|  1.74M|inline const RegEx& KeyInFlow() {
  105|  1.74M|  static const RegEx e = RegEx('?') + BlankOrBreak();
  106|  1.74M|  return e;
  107|  1.74M|}
_ZN4YAML3Exp11PlainScalarEv:
  153|  1.11M|inline const RegEx& PlainScalar() {
  154|  1.11M|  static const RegEx e =
  155|  1.11M|      !(BlankOrBreak() | RegEx(",[]{}#&*!|>\'\"%@`", REGEX_OR) |
  156|  1.11M|        (RegEx("-?:", REGEX_OR) + (BlankOrBreak() | RegEx())));
  157|  1.11M|  return e;
  158|  1.11M|}
_ZN4YAML3Exp17PlainScalarInFlowEv:
  159|  1.26M|inline const RegEx& PlainScalarInFlow() {
  160|  1.26M|  static const RegEx e =
  161|  1.26M|      !(BlankOrBreak() | RegEx("?,[]{}#&*!|>\'\"%@`", REGEX_OR) |
  162|  1.26M|        (RegEx("-:", REGEX_OR) + (Blank() | RegEx())));
  163|  1.26M|  return e;
  164|  1.26M|}
_ZN4YAML3Exp3TabEv:
   31|   135k|inline const RegEx& Tab() {
   32|   135k|  static const RegEx e = RegEx('\t');
   33|   135k|  return e;
   34|   135k|}
_ZN4YAML3Exp7CommentEv:
  124|  70.1M|inline const RegEx Comment() {
  125|  70.1M|  static const RegEx e = RegEx('#');
  126|  70.1M|  return e;
  127|  70.1M|}
_ZN4YAML3Exp5BreakEv:
   39|   213M|inline const RegEx& Break() {
   40|   213M|  static const RegEx e = RegEx('\n') | RegEx("\r\n") | RegEx('\r');
   41|   213M|  return e;
   42|   213M|}
_ZN4YAML3Exp5ValueEv:
  108|  9.06M|inline const RegEx& Value() {
  109|  9.06M|  static const RegEx e = RegEx(':') + (BlankOrBreak() | RegEx());
  110|  9.06M|  return e;
  111|  9.06M|}
_ZN4YAML3Exp15ValueInJSONFlowEv:
  116|  9.84k|inline const RegEx& ValueInJSONFlow() {
  117|  9.84k|  static const RegEx e = RegEx(':');
  118|  9.84k|  return e;
  119|  9.84k|}
_ZN4YAML3Exp11ValueInFlowEv:
  112|  1.71M|inline const RegEx& ValueInFlow() {
  113|  1.71M|  static const RegEx e = RegEx(':') + (BlankOrBreak() | RegEx(",]}", REGEX_OR));
  114|  1.71M|  return e;
  115|  1.71M|}
_ZN4YAML3Exp5EmptyEv:
   23|  3.35k|inline const RegEx& Empty() {
   24|  3.35k|  static const RegEx e;
   25|  3.35k|  return e;
   26|  3.35k|}
_ZN4YAML3Exp5DigitEv:
   47|    415|inline const RegEx& Digit() {
   48|    415|  static const RegEx e = RegEx('0', '9');
   49|    415|  return e;
   50|    415|}
_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|  10.0M|inline const RegEx& Word() {
   60|  10.0M|  static const RegEx e = AlphaNumeric() | RegEx('-');
   61|  10.0M|  return e;
   62|  10.0M|}
_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|  4.45M|inline const RegEx& DocIndicator() {
   93|  4.45M|  static const RegEx e = DocStart() | DocEnd();
   94|  4.45M|  return e;
   95|  4.45M|}
_ZN4YAML3Exp6AnchorEv:
  128|  29.3M|inline const RegEx& Anchor() {
  129|  29.3M|  static const RegEx e = !(RegEx("[]{},", REGEX_OR) | BlankOrBreak());
  130|  29.3M|  return e;
  131|  29.3M|}
_ZN4YAML3Exp9AnchorEndEv:
  132|   428k|inline const RegEx& AnchorEnd() {
  133|   428k|  static const RegEx e = RegEx("?:,]}%@`", REGEX_OR) | BlankOrBreak();
  134|   428k|  return e;
  135|   428k|}
_ZN4YAML3Exp3URIEv:
  136|  9.08k|inline const RegEx& URI() {
  137|  9.08k|  static const RegEx e = Word() | RegEx("#;/?:@&=+$,_.!~*'()[]", REGEX_OR) |
  138|  9.08k|                         (RegEx('%') + Hex() + Hex());
  139|  9.08k|  return e;
  140|  9.08k|}
_ZN4YAML3Exp3TagEv:
  141|  3.74M|inline const RegEx& Tag() {
  142|  3.74M|  static const RegEx e = Word() | RegEx("#;/?:@&=+$_.~*'()", REGEX_OR) |
  143|  3.74M|                         (RegEx('%') + Hex() + Hex());
  144|  3.74M|  return e;
  145|  3.74M|}
_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.26M|inline const RegEx& ScanScalarEndInFlow() {
  177|  1.26M|  static const RegEx e = (EndScalarInFlow() | (BlankOrBreak() + Comment()));
  178|  1.26M|  return e;
  179|  1.26M|}
_ZN4YAML3Exp13ScanScalarEndEv:
  181|  1.11M|inline const RegEx& ScanScalarEnd() {
  182|  1.11M|  static const RegEx e = EndScalar() | (BlankOrBreak() + Comment());
  183|  1.11M|  return e;
  184|  1.11M|}
_ZN4YAML3Exp14EscSingleQuoteEv:
  185|  1.49k|inline const RegEx& EscSingleQuote() {
  186|  1.49k|  static const RegEx e = RegEx("\'\'");
  187|  1.49k|  return e;
  188|  1.49k|}
_ZN4YAML3Exp8EscBreakEv:
  189|  12.7M|inline const RegEx& EscBreak() {
  190|  12.7M|  static const RegEx e = RegEx('\\') + Break();
  191|  12.7M|  return e;
  192|  12.7M|}
_ZN4YAML3Exp14ChompIndicatorEv:
  194|      3|inline const RegEx& ChompIndicator() {
  195|      3|  static const RegEx e = RegEx("+-", REGEX_OR);
  196|      3|  return e;
  197|      3|}
_ZN4YAML3Exp5ChompEv:
  198|  3.40k|inline const RegEx& Chomp() {
  199|  3.40k|  static const RegEx e = (ChompIndicator() + Digit()) |
  200|  3.40k|                         (Digit() + ChompIndicator()) | ChompIndicator() |
  201|  3.40k|                         Digit();
  202|  3.40k|  return e;
  203|  3.40k|}

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

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

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

_ZN4YAML12IsNullStringEPKcm:
   13|   237k|bool IsNullString(const char* str, std::size_t size) {
   14|   237k|  return size == 0 || same(str, size, "~") || same(str, size, "null") ||
  ------------------
  |  Branch (14:10): [True: 0, False: 237k]
  |  Branch (14:23): [True: 12.4k, False: 224k]
  |  Branch (14:47): [True: 194, False: 224k]
  ------------------
   15|   224k|         same(str, size, "Null") || same(str, size, "NULL");
  ------------------
  |  Branch (15:10): [True: 196, False: 224k]
  |  Branch (15:37): [True: 3, False: 224k]
  ------------------
   16|   237k|}
null.cpp:_ZN4YAMLL4sameILm2EEEbPKcmRAT__S1_:
    8|   237k|static bool same(const char* str, std::size_t size, const char (&literal)[N]) {
    9|   237k|  constexpr int literalSize = N - 1; // minus null terminator
   10|   237k|  return size == literalSize && std::strncmp(str, literal, literalSize) == 0;
  ------------------
  |  Branch (10:10): [True: 216k, False: 20.7k]
  |  Branch (10:33): [True: 12.4k, False: 204k]
  ------------------
   11|   237k|}
null.cpp:_ZN4YAMLL4sameILm5EEEbPKcmRAT__S1_:
    8|   674k|static bool same(const char* str, std::size_t size, const char (&literal)[N]) {
    9|   674k|  constexpr int literalSize = N - 1; // minus null terminator
   10|   674k|  return size == literalSize && std::strncmp(str, literal, literalSize) == 0;
  ------------------
  |  Branch (10:10): [True: 10.0k, False: 664k]
  |  Branch (10:33): [True: 393, False: 9.68k]
  ------------------
   11|   674k|}

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

_ZN4YAML6ParserC2Ev:
   14|  6.36k|Parser::Parser() : m_pScanner{}, m_pDirectives{} {}
_ZN4YAML6ParserC2ERNSt3__113basic_istreamIcNS1_11char_traitsIcEEEE:
   16|  6.36k|Parser::Parser(std::istream& in) : Parser() { Load(in); }
_ZN4YAML6ParserD2Ev:
   18|  6.36k|Parser::~Parser() = default;
_ZN4YAML6Parser4LoadERNSt3__113basic_istreamIcNS1_11char_traitsIcEEEE:
   22|  6.36k|void Parser::Load(std::istream& in) {
   23|  6.36k|  m_pScanner.reset(new Scanner(in));
   24|  6.36k|  m_pDirectives.reset(new Directives);
   25|  6.36k|}
_ZN4YAML6Parser18HandleNextDocumentERNS_12EventHandlerE:
   27|   479k|bool Parser::HandleNextDocument(EventHandler& eventHandler) {
   28|   479k|  if (!m_pScanner)
  ------------------
  |  Branch (28:7): [True: 0, False: 479k]
  ------------------
   29|      0|    return false;
   30|       |
   31|   479k|  ParseDirectives();
   32|   479k|  if (m_pScanner->empty()) {
  ------------------
  |  Branch (32:7): [True: 2.78k, False: 476k]
  ------------------
   33|  2.78k|    return false;
   34|  2.78k|  }
   35|       |
   36|   476k|  auto oldPos = m_pScanner->peek().mark.pos;
   37|       |
   38|   476k|  SingleDocParser sdp(*m_pScanner, *m_pDirectives);
   39|   476k|  sdp.HandleDocument(eventHandler);
   40|       |
   41|       |  // checks if progress was made
   42|       |  // 1. if scanner has no more tokens, progress was made
   43|   476k|  if (m_pScanner->empty()) {
  ------------------
  |  Branch (43:7): [True: 2.08k, False: 474k]
  ------------------
   44|  2.08k|    return true;
   45|  2.08k|  }
   46|       |
   47|       |  // 2. if token position has changed, progress was made
   48|   474k|  auto newPos = m_pScanner->peek().mark.pos;
   49|   474k|  if (newPos != oldPos) {
  ------------------
  |  Branch (49:7): [True: 470k, False: 3.58k]
  ------------------
   50|   470k|    return true;
   51|   470k|  }
   52|       |  // No progress was made, no further processing
   53|  3.58k|  return false;
   54|   474k|}
_ZN4YAML6Parser15ParseDirectivesEv:
   56|   479k|void Parser::ParseDirectives() {
   57|   479k|  bool readDirective = false;
   58|       |
   59|   491k|  while (!m_pScanner->empty()) {
  ------------------
  |  Branch (59:10): [True: 487k, False: 3.63k]
  ------------------
   60|   487k|    Token& token = m_pScanner->peek();
   61|   487k|    if (token.type != Token::DIRECTIVE) {
  ------------------
  |  Branch (61:9): [True: 475k, False: 11.9k]
  ------------------
   62|   475k|      break;
   63|   475k|    }
   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|  11.9k|    if (!readDirective) {
  ------------------
  |  Branch (67:9): [True: 5.38k, False: 6.54k]
  ------------------
   68|  5.38k|      m_pDirectives.reset(new Directives);
   69|  5.38k|    }
   70|       |
   71|  11.9k|    readDirective = true;
   72|  11.9k|    HandleDirective(token);
   73|  11.9k|    m_pScanner->pop();
   74|  11.9k|  }
   75|   479k|}
_ZN4YAML6Parser15HandleDirectiveERKNS_5TokenE:
   77|  11.9k|void Parser::HandleDirective(const Token& token) {
   78|  11.9k|  if (token.value == "YAML") {
  ------------------
  |  Branch (78:7): [True: 2.51k, False: 9.40k]
  ------------------
   79|  2.51k|    HandleYamlDirective(token);
   80|  9.40k|  } else if (token.value == "TAG") {
  ------------------
  |  Branch (80:14): [True: 5.43k, False: 3.97k]
  ------------------
   81|  5.43k|    HandleTagDirective(token);
   82|  5.43k|  }
   83|  11.9k|}
_ZN4YAML6Parser19HandleYamlDirectiveERKNS_5TokenE:
   85|  2.51k|void Parser::HandleYamlDirective(const Token& token) {
   86|  2.51k|  if (token.params.size() != 1) {
  ------------------
  |  Branch (86:7): [True: 23, False: 2.49k]
  ------------------
   87|     23|    throw ParserException(token.mark, ErrorMsg::YAML_DIRECTIVE_ARGS);
   88|     23|  }
   89|       |
   90|  2.49k|  if (!m_pDirectives->version.isDefault) {
  ------------------
  |  Branch (90:7): [True: 1, False: 2.49k]
  ------------------
   91|      1|    throw ParserException(token.mark, ErrorMsg::REPEATED_YAML_DIRECTIVE);
   92|      1|  }
   93|       |
   94|  2.49k|  std::stringstream str(token.params[0]);
   95|  2.49k|  str.imbue(std::locale::classic());
   96|  2.49k|  str >> m_pDirectives->version.major;
   97|  2.49k|  str.get();
   98|  2.49k|  str >> m_pDirectives->version.minor;
   99|  2.49k|  if (!str || str.peek() != EOF) {
  ------------------
  |  Branch (99:7): [True: 14, False: 2.47k]
  |  Branch (99:15): [True: 13, False: 2.46k]
  ------------------
  100|     27|    throw ParserException(
  101|     27|        token.mark, std::string(ErrorMsg::YAML_VERSION) + token.params[0]);
  102|     27|  }
  103|       |
  104|  2.46k|  if (m_pDirectives->version.major > 1) {
  ------------------
  |  Branch (104:7): [True: 14, False: 2.45k]
  ------------------
  105|     14|    throw ParserException(token.mark, ErrorMsg::YAML_MAJOR_VERSION);
  106|     14|  }
  107|       |
  108|  2.45k|  m_pDirectives->version.isDefault = false;
  109|       |  // TODO: warning on major == 1, minor > 2?
  110|  2.45k|}
_ZN4YAML6Parser18HandleTagDirectiveERKNS_5TokenE:
  112|  5.43k|void Parser::HandleTagDirective(const Token& token) {
  113|  5.43k|  if (token.params.size() != 2)
  ------------------
  |  Branch (113:7): [True: 21, False: 5.41k]
  ------------------
  114|     21|    throw ParserException(token.mark, ErrorMsg::TAG_DIRECTIVE_ARGS);
  115|       |
  116|  5.41k|  const std::string& handle = token.params[0];
  117|  5.41k|  const std::string& prefix = token.params[1];
  118|  5.41k|  if (m_pDirectives->tags.find(handle) != m_pDirectives->tags.end()) {
  ------------------
  |  Branch (118:7): [True: 6, False: 5.40k]
  ------------------
  119|      6|    throw ParserException(token.mark, ErrorMsg::REPEATED_TAG_DIRECTIVE);
  120|      6|  }
  121|       |
  122|  5.40k|  m_pDirectives->tags[handle] = prefix;
  123|  5.40k|}

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

_ZN4YAML5RegExC2ENS_8REGEX_OPE:
    6|  3.06k|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|  7.45k|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.49k|RegEx operator!(const RegEx& ex) {
   18|  1.49k|  RegEx ret(REGEX_NOT);
   19|  1.49k|  ret.m_params.push_back(ex);
   20|  1.49k|  return ret;
   21|  1.49k|}
_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.49k|RegEx operator&(const RegEx& ex1, const RegEx& ex2) {
   31|  1.49k|  RegEx ret(REGEX_AND);
   32|  1.49k|  ret.m_params.push_back(ex1);
   33|  1.49k|  ret.m_params.push_back(ex2);
   34|  1.49k|  return ret;
   35|  1.49k|}
_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.1M|  ~RegEx() = default;

_ZNK4YAML5RegEx7MatchesERKNS_6StreamE:
   26|   512M|inline bool RegEx::Matches(const Stream& in) const { return Match(in) >= 0; }
_ZNK4YAML5RegEx5MatchERKNS_6StreamE:
   49|   571M|inline int RegEx::Match(const Stream& in) const {
   50|   571M|  StreamCharSource source(in);
   51|   571M|  return Match(source);
   52|   571M|}
_ZNK4YAML5RegEx5MatchINS_16StreamCharSourceEEEiRKT_:
   72|  1.18G|inline int RegEx::Match(const Source& source) const {
   73|  1.18G|  return IsValidSource(source) ? MatchUnchecked(source) : -1;
  ------------------
  |  Branch (73:10): [True: 1.18G, False: 0]
  ------------------
   74|  1.18G|}
_ZNK4YAML5RegEx13IsValidSourceINS_16StreamCharSourceEEEbRKT_:
   55|  1.18G|inline bool RegEx::IsValidSource(const Source& source) const {
   56|  1.18G|  return source;
   57|  1.18G|}
_ZNK4YAML5RegEx14MatchUncheckedINS_16StreamCharSourceEEEiRKT_:
   77|  3.75G|inline int RegEx::MatchUnchecked(const Source& source) const {
   78|  3.75G|  switch (m_op) {
  ------------------
  |  Branch (78:11): [True: 3.75G, False: 0]
  ------------------
   79|  23.6M|    case REGEX_EMPTY:
  ------------------
  |  Branch (79:5): [True: 23.6M, False: 3.73G]
  ------------------
   80|  23.6M|      return MatchOpEmpty(source);
   81|  1.90G|    case REGEX_MATCH:
  ------------------
  |  Branch (81:5): [True: 1.90G, False: 1.84G]
  ------------------
   82|  1.90G|      return MatchOpMatch(source);
   83|  29.1M|    case REGEX_RANGE:
  ------------------
  |  Branch (83:5): [True: 29.1M, False: 3.72G]
  ------------------
   84|  29.1M|      return MatchOpRange(source);
   85|  1.22G|    case REGEX_OR:
  ------------------
  |  Branch (85:5): [True: 1.22G, False: 2.52G]
  ------------------
   86|  1.22G|      return MatchOpOr(source);
   87|  14.0M|    case REGEX_AND:
  ------------------
  |  Branch (87:5): [True: 14.0M, False: 3.73G]
  ------------------
   88|  14.0M|      return MatchOpAnd(source);
   89|  31.7M|    case REGEX_NOT:
  ------------------
  |  Branch (89:5): [True: 31.7M, False: 3.72G]
  ------------------
   90|  31.7M|      return MatchOpNot(source);
   91|   523M|    case REGEX_SEQ:
  ------------------
  |  Branch (91:5): [True: 523M, False: 3.23G]
  ------------------
   92|   523M|      return MatchOpSeq(source);
   93|  3.75G|  }
   94|       |
   95|      0|  return -1;
   96|  3.75G|}
_ZNK4YAML5RegEx12MatchOpEmptyINS_16StreamCharSourceEEEiRKT_:
  106|  23.6M|inline int RegEx::MatchOpEmpty(const Source& source) const {
  107|  23.6M|  return source[0] == Stream::eof() ? 0 : -1;
  ------------------
  |  Branch (107:10): [True: 1.52M, False: 22.1M]
  ------------------
  108|  23.6M|}
_ZNK4YAML5RegEx12MatchOpMatchINS_16StreamCharSourceEEEiRKT_:
  119|  1.90G|inline int RegEx::MatchOpMatch(const Source& source) const {
  120|  1.90G|  if (source[0] != m_a)
  ------------------
  |  Branch (120:7): [True: 1.72G, False: 178M]
  ------------------
  121|  1.72G|    return -1;
  122|   178M|  return 1;
  123|  1.90G|}
_ZNK4YAML5RegEx12MatchOpRangeINS_16StreamCharSourceEEEiRKT_:
  127|  29.1M|inline int RegEx::MatchOpRange(const Source& source) const {
  128|  29.1M|  if (m_a > source[0] || m_z < source[0])
  ------------------
  |  Branch (128:7): [True: 22.7M, False: 6.31M]
  |  Branch (128:26): [True: 57.6k, False: 6.25M]
  ------------------
  129|  22.8M|    return -1;
  130|  6.25M|  return 1;
  131|  29.1M|}
_ZNK4YAML5RegEx9MatchOpOrINS_16StreamCharSourceEEEiRKT_:
  135|  1.22G|inline int RegEx::MatchOpOr(const Source& source) const {
  136|  2.52G|  for (const RegEx& param : m_params) {
  ------------------
  |  Branch (136:27): [True: 2.52G, False: 1.02G]
  ------------------
  137|  2.52G|    int n = param.MatchUnchecked(source);
  138|  2.52G|    if (n >= 0)
  ------------------
  |  Branch (138:9): [True: 196M, False: 2.32G]
  ------------------
  139|   196M|      return n;
  140|  2.52G|  }
  141|  1.02G|  return -1;
  142|  1.22G|}
_ZNK4YAML5RegEx10MatchOpAndINS_16StreamCharSourceEEEiRKT_:
  149|  14.0M|inline int RegEx::MatchOpAnd(const Source& source) const {
  150|  14.0M|  int first = -1;
  151|  14.0M|  for (std::size_t i = 0; i < m_params.size(); i++) {
  ------------------
  |  Branch (151:27): [True: 14.0M, False: 2.69k]
  ------------------
  152|  14.0M|    int n = m_params[i].MatchUnchecked(source);
  153|  14.0M|    if (n == -1)
  ------------------
  |  Branch (153:9): [True: 14.0M, False: 6.09k]
  ------------------
  154|  14.0M|      return -1;
  155|  6.09k|    if (i == 0)
  ------------------
  |  Branch (155:9): [True: 3.40k, False: 2.69k]
  ------------------
  156|  3.40k|      first = n;
  157|  6.09k|  }
  158|  2.69k|  return first;
  159|  14.0M|}
_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: 429k, False: 31.2M]
  ------------------
  167|   429k|    return -1;
  168|  31.2M|  return 1;
  169|  31.7M|}
_ZNK4YAML5RegEx10MatchOpSeqINS_16StreamCharSourceEEEiRKT_:
  173|   523M|inline int RegEx::MatchOpSeq(const Source& source) const {
  174|   523M|  int offset = 0;
  175|   613M|  for (const RegEx& param : m_params) {
  ------------------
  |  Branch (175:27): [True: 613M, False: 10.3M]
  ------------------
  176|   613M|    int n = param.Match(source + offset);  // note Match, not
  177|       |                                           // MatchUnchecked because we
  178|       |                                           // need to check validity after
  179|       |                                           // the offset
  180|   613M|    if (n == -1)
  ------------------
  |  Branch (180:9): [True: 512M, False: 101M]
  ------------------
  181|   512M|      return -1;
  182|   101M|    offset += n;
  183|   101M|  }
  184|       |
  185|  10.3M|  return offset;
  186|   523M|}
_ZNK4YAML5RegEx7MatchesEc:
   16|    410|inline bool RegEx::Matches(char ch) const {
   17|    410|  std::string str;
   18|    410|  str += ch;
   19|    410|  return Matches(str);
   20|    410|}
_ZNK4YAML5RegEx7MatchesERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   22|    410|inline bool RegEx::Matches(const std::string& str) const {
   23|    410|  return Match(str) >= 0;
   24|    410|}
_ZNK4YAML5RegEx5MatchERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   44|    410|inline int RegEx::Match(const std::string& str) const {
   45|    410|  StringCharSource source(str.c_str(), str.size());
   46|    410|  return Match(source);
   47|    410|}
_ZNK4YAML5RegEx13IsValidSourceINS_16StringCharSourceEEEbRKT_:
   61|    410|    const StringCharSource& source) const {
   62|    410|  switch (m_op) {
   63|      0|    case REGEX_MATCH:
  ------------------
  |  Branch (63:5): [True: 0, False: 410]
  ------------------
   64|    410|    case REGEX_RANGE:
  ------------------
  |  Branch (64:5): [True: 410, False: 0]
  ------------------
   65|    410|      return source;
   66|      0|    default:
  ------------------
  |  Branch (66:5): [True: 0, False: 410]
  ------------------
   67|      0|      return true;
   68|    410|  }
   69|    410|}
_ZNK4YAML5RegEx5MatchINS_16StringCharSourceEEEiRKT_:
   72|    410|inline int RegEx::Match(const Source& source) const {
   73|    410|  return IsValidSource(source) ? MatchUnchecked(source) : -1;
  ------------------
  |  Branch (73:10): [True: 410, False: 0]
  ------------------
   74|    410|}
_ZNK4YAML5RegEx14MatchUncheckedINS_16StringCharSourceEEEiRKT_:
   77|    410|inline int RegEx::MatchUnchecked(const Source& source) const {
   78|    410|  switch (m_op) {
  ------------------
  |  Branch (78:11): [True: 410, False: 0]
  ------------------
   79|      0|    case REGEX_EMPTY:
  ------------------
  |  Branch (79:5): [True: 0, False: 410]
  ------------------
   80|      0|      return MatchOpEmpty(source);
   81|      0|    case REGEX_MATCH:
  ------------------
  |  Branch (81:5): [True: 0, False: 410]
  ------------------
   82|      0|      return MatchOpMatch(source);
   83|    410|    case REGEX_RANGE:
  ------------------
  |  Branch (83:5): [True: 410, False: 0]
  ------------------
   84|    410|      return MatchOpRange(source);
   85|      0|    case REGEX_OR:
  ------------------
  |  Branch (85:5): [True: 0, False: 410]
  ------------------
   86|      0|      return MatchOpOr(source);
   87|      0|    case REGEX_AND:
  ------------------
  |  Branch (87:5): [True: 0, False: 410]
  ------------------
   88|      0|      return MatchOpAnd(source);
   89|      0|    case REGEX_NOT:
  ------------------
  |  Branch (89:5): [True: 0, False: 410]
  ------------------
   90|      0|      return MatchOpNot(source);
   91|      0|    case REGEX_SEQ:
  ------------------
  |  Branch (91:5): [True: 0, False: 410]
  ------------------
   92|      0|      return MatchOpSeq(source);
   93|    410|  }
   94|       |
   95|      0|  return -1;
   96|    410|}
_ZNK4YAML5RegEx12MatchOpRangeINS_16StringCharSourceEEEiRKT_:
  127|    410|inline int RegEx::MatchOpRange(const Source& source) const {
  128|    410|  if (m_a > source[0] || m_z < source[0])
  ------------------
  |  Branch (128:7): [True: 0, False: 410]
  |  Branch (128:26): [True: 0, False: 410]
  ------------------
  129|      0|    return -1;
  130|    410|  return 1;
  131|    410|}

_ZN4YAML7ScannerC2ERNSt3__113basic_istreamIcNS1_11char_traitsIcEEEE:
   11|  6.36k|    : INPUT(in),
   12|  6.36k|      m_tokens{},
   13|  6.36k|      m_startedStream(false),
   14|  6.36k|      m_endedStream(false),
   15|  6.36k|      m_simpleKeyAllowed(false),
   16|  6.36k|      m_scalarValueAllowed(false),
   17|  6.36k|      m_canBeJSONFlow(false),
   18|  6.36k|      m_simpleKeys{},
   19|  6.36k|      m_indents{},
   20|  6.36k|      m_indentRefs{},
   21|  6.36k|      m_flows{} {}
_ZN4YAML7ScannerD2Ev:
   23|  6.36k|Scanner::~Scanner() = default;
_ZN4YAML7Scanner5emptyEv:
   25|  10.8M|bool Scanner::empty() {
   26|  10.8M|  EnsureTokensInQueue();
   27|  10.8M|  return m_tokens.empty();
   28|  10.8M|}
_ZN4YAML7Scanner3popEv:
   30|  2.78M|void Scanner::pop() {
   31|  2.78M|  EnsureTokensInQueue();
   32|  2.78M|  if (!m_tokens.empty())
  ------------------
  |  Branch (32:7): [True: 2.78M, False: 0]
  ------------------
   33|  2.78M|    m_tokens.pop();
   34|  2.78M|}
_ZN4YAML7Scanner4peekEv:
   36|  15.7M|Token& Scanner::peek() {
   37|  15.7M|  EnsureTokensInQueue();
   38|  15.7M|  assert(!m_tokens.empty());  // should we be asserting here? I mean, we really
   39|       |                              // just be checking
   40|       |                              // if it's empty before peeking.
   41|       |
   42|       |#if 0
   43|       |		static Token *pLast = 0;
   44|       |		if(pLast != &m_tokens.front())
   45|       |			std::cerr << "peek: " << m_tokens.front() << "\n";
   46|       |		pLast = &m_tokens.front();
   47|       |#endif
   48|       |
   49|  15.7M|  return m_tokens.front();
   50|  15.7M|}
_ZNK4YAML7Scanner4markEv:
   52|  1.59M|Mark Scanner::mark() const { return INPUT.mark(); }
_ZN4YAML7Scanner19EnsureTokensInQueueEv:
   54|  29.4M|void Scanner::EnsureTokensInQueue() {
   55|  90.0M|  while (true) {
  ------------------
  |  Branch (55:10): [True: 90.0M, Folded]
  ------------------
   56|  90.0M|    if (!m_tokens.empty()) {
  ------------------
  |  Branch (56:9): [True: 89.1M, False: 869k]
  ------------------
   57|  89.1M|      Token& token = m_tokens.front();
   58|       |
   59|       |      // if this guy's valid, then we're done
   60|  89.1M|      if (token.status == Token::VALID) {
  ------------------
  |  Branch (60:11): [True: 28.8M, False: 60.3M]
  ------------------
   61|  28.8M|        return;
   62|  28.8M|      }
   63|       |
   64|       |      // here's where we clean up the impossible tokens
   65|  60.3M|      if (token.status == Token::INVALID) {
  ------------------
  |  Branch (65:11): [True: 450k, False: 59.9M]
  ------------------
   66|   450k|        m_tokens.pop();
   67|   450k|        continue;
   68|   450k|      }
   69|       |
   70|       |      // note: what's left are the unverified tokens
   71|  60.3M|    }
   72|       |
   73|       |    // no token? maybe we've actually finished
   74|  60.7M|    if (m_endedStream) {
  ------------------
  |  Branch (74:9): [True: 610k, False: 60.1M]
  ------------------
   75|   610k|      return;
   76|   610k|    }
   77|       |
   78|       |    // no? then scan...
   79|  60.1M|    ScanNextToken();
   80|  60.1M|  }
   81|  29.4M|}
_ZN4YAML7Scanner13ScanNextTokenEv:
   83|  60.1M|void Scanner::ScanNextToken() {
   84|  60.1M|  if (m_endedStream) {
  ------------------
  |  Branch (84:7): [True: 0, False: 60.1M]
  ------------------
   85|      0|    return;
   86|      0|  }
   87|       |
   88|  60.1M|  if (!m_startedStream) {
  ------------------
  |  Branch (88:7): [True: 6.36k, False: 60.1M]
  ------------------
   89|  6.36k|    return StartStream();
   90|  6.36k|  }
   91|       |
   92|       |  // get rid of whitespace, etc. (in between tokens it should be irrelevant)
   93|  60.1M|  ScanToNextToken();
   94|       |
   95|       |  // maybe need to end some blocks
   96|  60.1M|  PopIndentToHere();
   97|       |
   98|       |  // *****
   99|       |  // And now branch based on the next few characters!
  100|       |  // *****
  101|       |
  102|       |  // end of stream
  103|  60.1M|  if (!INPUT) {
  ------------------
  |  Branch (103:7): [True: 5.26k, False: 60.1M]
  ------------------
  104|  5.26k|    return EndStream();
  105|  5.26k|  }
  106|       |
  107|  60.1M|  if (INPUT.column() == 0 && INPUT.peek() == Keys::Directive) {
  ------------------
  |  Branch (107:7): [True: 2.37M, False: 57.7M]
  |  Branch (107:30): [True: 12.8k, False: 2.36M]
  ------------------
  108|  12.8k|    return ScanDirective();
  109|  12.8k|  }
  110|       |
  111|       |  // document token
  112|  60.1M|  if (INPUT.column() == 0 && Exp::DocStart().Matches(INPUT)) {
  ------------------
  |  Branch (112:7): [True: 2.36M, False: 57.7M]
  |  Branch (112:30): [True: 223k, False: 2.14M]
  ------------------
  113|   223k|    return ScanDocStart();
  114|   223k|  }
  115|       |
  116|  59.9M|  if (INPUT.column() == 0 && Exp::DocEnd().Matches(INPUT)) {
  ------------------
  |  Branch (116:7): [True: 2.14M, False: 57.7M]
  |  Branch (116:30): [True: 303k, False: 1.84M]
  ------------------
  117|   303k|    return ScanDocEnd();
  118|   303k|  }
  119|       |
  120|       |  // flow start/end/entry
  121|  59.6M|  if (INPUT.peek() == Keys::FlowSeqStart ||
  ------------------
  |  Branch (121:7): [True: 31.2M, False: 28.4M]
  ------------------
  122|  43.9M|      INPUT.peek() == Keys::FlowMapStart) {
  ------------------
  |  Branch (122:7): [True: 12.7M, False: 15.6M]
  ------------------
  123|  43.9M|    return ScanFlowStart();
  124|  43.9M|  }
  125|       |
  126|  15.6M|  if (INPUT.peek() == Keys::FlowSeqEnd || INPUT.peek() == Keys::FlowMapEnd) {
  ------------------
  |  Branch (126:7): [True: 16.7k, False: 15.6M]
  |  Branch (126:43): [True: 1.21M, False: 14.4M]
  ------------------
  127|  1.23M|    return ScanFlowEnd();
  128|  1.23M|  }
  129|       |
  130|  14.4M|  if (INPUT.peek() == Keys::FlowEntry) {
  ------------------
  |  Branch (130:7): [True: 2.37M, False: 12.0M]
  ------------------
  131|       |    // values starting with `,` are not allowed.
  132|       |    // eg: reject `,foo`
  133|  2.37M|    if (INPUT.column() == 0) {
  ------------------
  |  Branch (133:9): [True: 6, False: 2.37M]
  ------------------
  134|      6|      throw ParserException(INPUT.mark(), ErrorMsg::UNEXPECTED_FLOW);
  135|      6|    }
  136|       |    // if we already parsed a quoted scalar value and we are not in a flow,
  137|       |    // then `,` is not a valid character.
  138|       |    // eg: reject `"foo",`
  139|  2.37M|    if (!m_scalarValueAllowed) {
  ------------------
  |  Branch (139:9): [True: 2, False: 2.37M]
  ------------------
  140|      2|      throw ParserException(INPUT.mark(), ErrorMsg::UNEXPECTED_SCALAR);
  141|      2|    }
  142|  2.37M|    return ScanFlowEntry();
  143|  2.37M|  }
  144|       |
  145|       |  // block/map stuff
  146|  12.0M|  if (Exp::BlockEntry().Matches(INPUT)) {
  ------------------
  |  Branch (146:7): [True: 1.20M, False: 10.8M]
  ------------------
  147|  1.20M|    return ScanBlockEntry();
  148|  1.20M|  }
  149|       |
  150|  10.8M|  if ((InBlockContext() ? Exp::Key() : Exp::KeyInFlow()).Matches(INPUT)) {
  ------------------
  |  Branch (150:7): [True: 27.7k, False: 10.7M]
  |  Branch (150:8): [True: 9.07M, False: 1.74M]
  ------------------
  151|  27.7k|    return ScanKey();
  152|  27.7k|  }
  153|       |
  154|  10.7M|  if (GetValueRegex().Matches(INPUT)) {
  ------------------
  |  Branch (154:7): [True: 7.00M, False: 3.79M]
  ------------------
  155|  7.00M|    return ScanValue();
  156|  7.00M|  }
  157|       |
  158|       |  // alias/anchor
  159|  3.79M|  if (INPUT.peek() == Keys::Alias || INPUT.peek() == Keys::Anchor) {
  ------------------
  |  Branch (159:7): [True: 4.31k, False: 3.78M]
  |  Branch (159:38): [True: 425k, False: 3.36M]
  ------------------
  160|   429k|    return ScanAnchorOrAlias();
  161|   429k|  }
  162|       |
  163|       |  // tag
  164|  3.36M|  if (INPUT.peek() == Keys::Tag) {
  ------------------
  |  Branch (164:7): [True: 971k, False: 2.39M]
  ------------------
  165|   971k|    return ScanTag();
  166|   971k|  }
  167|       |
  168|       |  // special scalars
  169|  2.39M|  if (InBlockContext() && (INPUT.peek() == Keys::LiteralScalar ||
  ------------------
  |  Branch (169:7): [True: 1.11M, False: 1.27M]
  |  Branch (169:28): [True: 712, False: 1.11M]
  ------------------
  170|  1.11M|                           INPUT.peek() == Keys::FoldedScalar)) {
  ------------------
  |  Branch (170:28): [True: 2.68k, False: 1.11M]
  ------------------
  171|  3.40k|    return ScanBlockScalar();
  172|  3.40k|  }
  173|       |
  174|       |  // if we already parsed a quoted scalar value in this line,
  175|       |  // another scalar value is an error.
  176|       |  // eg: reject `"foo" "bar"`
  177|  2.38M|  if (!m_scalarValueAllowed) {
  ------------------
  |  Branch (177:7): [True: 29, False: 2.38M]
  ------------------
  178|     29|    throw ParserException(INPUT.mark(), ErrorMsg::UNEXPECTED_SCALAR);
  179|     29|  }
  180|       |
  181|  2.38M|  if (INPUT.peek() == '\'' || INPUT.peek() == '\"') {
  ------------------
  |  Branch (181:7): [True: 1.49k, False: 2.38M]
  |  Branch (181:31): [True: 5.82k, False: 2.38M]
  ------------------
  182|  7.32k|    return ScanQuotedScalar();
  183|  7.32k|  }
  184|       |
  185|       |  // plain scalars
  186|  2.38M|  if ((InBlockContext() ? Exp::PlainScalar() : Exp::PlainScalarInFlow())
  ------------------
  |  Branch (186:7): [True: 2.38M, False: 47]
  |  Branch (186:8): [True: 1.11M, False: 1.26M]
  ------------------
  187|  2.38M|          .Matches(INPUT)) {
  188|  2.38M|    return ScanPlainScalar();
  189|  2.38M|  }
  190|       |
  191|       |  // don't know what it is!
  192|     47|  throw ParserException(INPUT.mark(), ErrorMsg::UNKNOWN_TOKEN);
  193|  2.38M|}
_ZN4YAML7Scanner15ScanToNextTokenEv:
  195|  60.1M|void Scanner::ScanToNextToken() {
  196|  68.7M|  while (true) {
  ------------------
  |  Branch (196:10): [True: 68.7M, Folded]
  ------------------
  197|       |    // first eat whitespace
  198|  68.9M|    while (INPUT && IsWhitespaceToBeEaten(INPUT.peek())) {
  ------------------
  |  Branch (198:12): [True: 68.9M, False: 5.19k]
  |  Branch (198:21): [True: 168k, False: 68.7M]
  ------------------
  199|   168k|      if (InBlockContext() && Exp::Tab().Matches(INPUT)) {
  ------------------
  |  Branch (199:11): [True: 135k, False: 33.0k]
  |  Branch (199:31): [True: 1.75k, False: 133k]
  ------------------
  200|  1.75k|        m_simpleKeyAllowed = false;
  201|  1.75k|      }
  202|   168k|      INPUT.eat(1);
  203|   168k|    }
  204|       |
  205|       |    // then eat a comment
  206|  68.7M|    if (Exp::Comment().Matches(INPUT)) {
  ------------------
  |  Branch (206:9): [True: 1.49k, False: 68.7M]
  ------------------
  207|       |      // eat until line break
  208|  5.63M|      while (INPUT && !Exp::Break().Matches(INPUT)) {
  ------------------
  |  Branch (208:14): [True: 5.63M, False: 70]
  |  Branch (208:23): [True: 5.63M, False: 1.42k]
  ------------------
  209|  5.63M|        INPUT.eat(1);
  210|  5.63M|      }
  211|  1.49k|    }
  212|       |
  213|       |    // if it's NOT a line break, then we're done!
  214|  68.7M|    if (!Exp::Break().Matches(INPUT)) {
  ------------------
  |  Branch (214:9): [True: 60.1M, False: 8.61M]
  ------------------
  215|  60.1M|      break;
  216|  60.1M|    }
  217|       |
  218|       |    // otherwise, let's eat the line break and keep going
  219|  8.61M|    int n = Exp::Break().Match(INPUT);
  220|  8.61M|    INPUT.eat(n);
  221|       |
  222|       |    // oh yeah, and let's get rid of that simple key
  223|  8.61M|    InvalidateSimpleKey();
  224|       |
  225|       |    // new line - we accept a scalar value now
  226|  8.61M|    m_scalarValueAllowed = true;
  227|       |
  228|       |    // new line - we may be able to accept a simple key now
  229|  8.61M|    if (InBlockContext()) {
  ------------------
  |  Branch (229:9): [True: 8.57M, False: 40.1k]
  ------------------
  230|  8.57M|      m_simpleKeyAllowed = true;
  231|  8.57M|    }
  232|  8.61M|  }
  233|  60.1M|}
_ZN4YAML7Scanner21IsWhitespaceToBeEatenEc:
  247|  68.9M|bool Scanner::IsWhitespaceToBeEaten(char ch) {
  248|  68.9M|  if (ch == ' ') {
  ------------------
  |  Branch (248:7): [True: 142k, False: 68.7M]
  ------------------
  249|   142k|    return true;
  250|   142k|  }
  251|       |
  252|  68.7M|  if (ch == '\t') {
  ------------------
  |  Branch (252:7): [True: 26.2k, False: 68.7M]
  ------------------
  253|  26.2k|    return true;
  254|  26.2k|  }
  255|       |
  256|  68.7M|  return false;
  257|  68.7M|}
_ZNK4YAML7Scanner13GetValueRegexEv:
  259|  10.7M|const RegEx& Scanner::GetValueRegex() const {
  260|  10.7M|  if (InBlockContext()) {
  ------------------
  |  Branch (260:7): [True: 9.06M, False: 1.72M]
  ------------------
  261|  9.06M|    return Exp::Value();
  262|  9.06M|  }
  263|       |
  264|  1.72M|  return m_canBeJSONFlow ? Exp::ValueInJSONFlow() : Exp::ValueInFlow();
  ------------------
  |  Branch (264:10): [True: 9.84k, False: 1.71M]
  ------------------
  265|  10.7M|}
_ZN4YAML7Scanner11StartStreamEv:
  267|  6.36k|void Scanner::StartStream() {
  268|  6.36k|  m_startedStream = true;
  269|  6.36k|  m_simpleKeyAllowed = true;
  270|  6.36k|  m_scalarValueAllowed = true;
  271|  6.36k|  std::unique_ptr<IndentMarker> pIndent(
  272|  6.36k|      new IndentMarker(-1, IndentMarker::NONE));
  273|  6.36k|  m_indentRefs.push_back(std::move(pIndent));
  274|  6.36k|  m_indents.push(&m_indentRefs.back());
  275|  6.36k|}
_ZN4YAML7Scanner9EndStreamEv:
  277|  5.26k|void Scanner::EndStream() {
  278|       |  // force newline
  279|  5.26k|  if (INPUT.column() > 0) {
  ------------------
  |  Branch (279:7): [True: 4.84k, False: 424]
  ------------------
  280|  4.84k|    INPUT.ResetColumn();
  281|  4.84k|  }
  282|       |
  283|  5.26k|  PopAllIndents();
  284|  5.26k|  PopAllSimpleKeys();
  285|       |
  286|  5.26k|  m_simpleKeyAllowed = false;
  287|  5.26k|  m_scalarValueAllowed = false;
  288|  5.26k|  m_endedStream = true;
  289|  5.26k|}
_ZN4YAML7Scanner9PushTokenENS_5Token4TYPEE:
  291|  9.83M|Token* Scanner::PushToken(Token::TYPE type) {
  292|  9.83M|  m_tokens.push(Token(type, INPUT.mark()));
  293|  9.83M|  return &m_tokens.back();
  294|  9.83M|}
_ZNK4YAML7Scanner16GetStartTokenForENS0_12IndentMarker11INDENT_TYPEE:
  296|  9.83M|Token::TYPE Scanner::GetStartTokenFor(IndentMarker::INDENT_TYPE type) const {
  297|  9.83M|  switch (type) {
  ------------------
  |  Branch (297:11): [True: 9.83M, False: 0]
  ------------------
  298|  1.20M|    case IndentMarker::SEQ:
  ------------------
  |  Branch (298:5): [True: 1.20M, False: 8.62M]
  ------------------
  299|  1.20M|      return Token::BLOCK_SEQ_START;
  300|  8.62M|    case IndentMarker::MAP:
  ------------------
  |  Branch (300:5): [True: 8.62M, False: 1.20M]
  ------------------
  301|  8.62M|      return Token::BLOCK_MAP_START;
  302|      0|    case IndentMarker::NONE:
  ------------------
  |  Branch (302:5): [True: 0, False: 9.83M]
  ------------------
  303|      0|      assert(false);
  304|      0|      break;
  305|  9.83M|  }
  306|  9.83M|  assert(false);
  307|      0|  throw std::runtime_error("yaml-cpp: internal error, invalid indent type");
  308|  9.83M|}
_ZN4YAML7Scanner12PushIndentToEiNS0_12IndentMarker11INDENT_TYPEE:
  311|  10.0M|                                             IndentMarker::INDENT_TYPE type) {
  312|       |  // are we in flow?
  313|  10.0M|  if (InFlowContext()) {
  ------------------
  |  Branch (313:7): [True: 0, False: 10.0M]
  ------------------
  314|      0|    return nullptr;
  315|      0|  }
  316|       |
  317|  10.0M|  std::unique_ptr<IndentMarker> pIndent(new IndentMarker(column, type));
  318|  10.0M|  IndentMarker& indent = *pIndent;
  319|  10.0M|  const IndentMarker& lastIndent = *m_indents.top();
  320|       |
  321|       |  // is this actually an indentation?
  322|  10.0M|  if (indent.column < lastIndent.column) {
  ------------------
  |  Branch (322:7): [True: 0, False: 10.0M]
  ------------------
  323|      0|    return nullptr;
  324|      0|  }
  325|  10.0M|  if (indent.column == lastIndent.column &&
  ------------------
  |  Branch (325:7): [True: 296k, False: 9.72M]
  ------------------
  326|   296k|      !(indent.type == IndentMarker::SEQ &&
  ------------------
  |  Branch (326:9): [True: 111k, False: 184k]
  ------------------
  327|   190k|        lastIndent.type == IndentMarker::MAP)) {
  ------------------
  |  Branch (327:9): [True: 106k, False: 5.55k]
  ------------------
  328|   190k|    return nullptr;
  329|   190k|  }
  330|       |
  331|       |  // push a start token
  332|  9.83M|  indent.pStartToken = PushToken(GetStartTokenFor(type));
  333|       |
  334|       |  // and then the indent
  335|  9.83M|  m_indents.push(&indent);
  336|  9.83M|  m_indentRefs.push_back(std::move(pIndent));
  337|  9.83M|  return &m_indentRefs.back();
  338|  10.0M|}
_ZN4YAML7Scanner15PopIndentToHereEv:
  340|  60.1M|void Scanner::PopIndentToHere() {
  341|       |  // are we in flow?
  342|  60.1M|  if (InFlowContext()) {
  ------------------
  |  Branch (342:7): [True: 49.3M, False: 10.7M]
  ------------------
  343|  49.3M|    return;
  344|  49.3M|  }
  345|       |
  346|       |  // now pop away
  347|  14.3M|  while (!m_indents.empty()) {
  ------------------
  |  Branch (347:10): [True: 14.3M, False: 0]
  ------------------
  348|  14.3M|    const IndentMarker& indent = *m_indents.top();
  349|  14.3M|    if (indent.column < INPUT.column()) {
  ------------------
  |  Branch (349:9): [True: 9.70M, False: 4.65M]
  ------------------
  350|  9.70M|      break;
  351|  9.70M|    }
  352|  4.65M|    if (indent.column == INPUT.column() &&
  ------------------
  |  Branch (352:9): [True: 1.92M, False: 2.73M]
  ------------------
  353|  1.92M|        !(indent.type == IndentMarker::SEQ &&
  ------------------
  |  Branch (353:11): [True: 852k, False: 1.07M]
  ------------------
  354|  1.07M|          !Exp::BlockEntry().Matches(INPUT))) {
  ------------------
  |  Branch (354:11): [True: 846k, False: 5.55k]
  ------------------
  355|  1.07M|      break;
  356|  1.07M|    }
  357|       |
  358|  3.57M|    PopIndent();
  359|  3.57M|  }
  360|       |
  361|  11.6M|  while (!m_indents.empty() &&
  ------------------
  |  Branch (361:10): [True: 11.6M, False: 0]
  ------------------
  362|  11.6M|         m_indents.top()->status == IndentMarker::INVALID) {
  ------------------
  |  Branch (362:10): [True: 834k, False: 10.7M]
  ------------------
  363|   834k|    PopIndent();
  364|   834k|  }
  365|  10.7M|}
_ZN4YAML7Scanner13PopAllIndentsEv:
  367|   544k|void Scanner::PopAllIndents() {
  368|       |  // are we in flow?
  369|   544k|  if (InFlowContext()) {
  ------------------
  |  Branch (369:7): [True: 57.6k, False: 486k]
  ------------------
  370|  57.6k|    return;
  371|  57.6k|  }
  372|       |
  373|       |  // now pop away
  374|  2.39M|  while (!m_indents.empty()) {
  ------------------
  |  Branch (374:10): [True: 2.39M, False: 0]
  ------------------
  375|  2.39M|    const IndentMarker& indent = *m_indents.top();
  376|  2.39M|    if (indent.type == IndentMarker::NONE) {
  ------------------
  |  Branch (376:9): [True: 486k, False: 1.91M]
  ------------------
  377|   486k|      break;
  378|   486k|    }
  379|       |
  380|  1.91M|    PopIndent();
  381|  1.91M|  }
  382|   486k|}
_ZN4YAML7Scanner9PopIndentEv:
  384|  6.32M|void Scanner::PopIndent() {
  385|  6.32M|  const IndentMarker& indent = *m_indents.top();
  386|  6.32M|  m_indents.pop();
  387|       |
  388|  6.32M|  if (indent.status != IndentMarker::VALID) {
  ------------------
  |  Branch (388:7): [True: 1.68M, False: 4.63M]
  ------------------
  389|  1.68M|    InvalidateSimpleKey();
  390|  1.68M|    return;
  391|  1.68M|  }
  392|       |
  393|  4.63M|  if (indent.type == IndentMarker::SEQ) {
  ------------------
  |  Branch (393:7): [True: 1.12M, False: 3.50M]
  ------------------
  394|  1.12M|    m_tokens.push(Token(Token::BLOCK_SEQ_END, INPUT.mark()));
  395|  3.50M|  } else if (indent.type == IndentMarker::MAP) {
  ------------------
  |  Branch (395:14): [True: 3.50M, False: 0]
  ------------------
  396|  3.50M|    m_tokens.push(Token(Token::BLOCK_MAP_END, INPUT.mark()));
  397|  3.50M|  }
  398|  4.63M|}
_ZNK4YAML7Scanner12GetTopIndentEv:
  400|  1.12M|int Scanner::GetTopIndent() const {
  401|  1.12M|  if (m_indents.empty()) {
  ------------------
  |  Branch (401:7): [True: 0, False: 1.12M]
  ------------------
  402|      0|    return 0;
  403|      0|  }
  404|  1.12M|  return m_indents.top()->column;
  405|  1.12M|}

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

_ZN4YAML10ScanScalarERNS_6StreamERNS_16ScanScalarParamsE:
   21|  2.39M|std::string ScanScalar(Stream& INPUT, ScanScalarParams& params) {
   22|  2.39M|  bool foundNonEmptyLine = false;
   23|  2.39M|  bool pastOpeningBreak = (params.fold == FOLD_FLOW);
   24|  2.39M|  bool emptyLine = false, moreIndented = false;
   25|  2.39M|  int foldedNewlineCount = 0;
   26|  2.39M|  bool foldedNewlineStartedMoreIndented = false;
   27|  2.39M|  std::size_t lastEscapedChar = std::string::npos;
   28|  2.39M|  std::string scalar;
   29|  2.39M|  params.leadingSpaces = false;
   30|       |
   31|  2.39M|  if (!params.end) {
  ------------------
  |  Branch (31:7): [True: 3.35k, False: 2.38M]
  ------------------
   32|  3.35k|    params.end = &Exp::Empty();
   33|  3.35k|  }
   34|       |
   35|  19.0M|  while (INPUT) {
  ------------------
  |  Branch (35:10): [True: 19.0M, False: 894]
  ------------------
   36|       |    // ********************************
   37|       |    // Phase #1: scan until line ending
   38|       |
   39|  19.0M|    std::size_t lastNonWhitespaceChar = scalar.size();
   40|  19.0M|    bool escapedNewline = false;
   41|  94.6M|    while (!params.end->Matches(INPUT) && !Exp::Break().Matches(INPUT)) {
  ------------------
  |  Branch (41:12): [True: 93.3M, False: 1.28M]
  |  Branch (41:43): [True: 75.8M, False: 17.4M]
  ------------------
   42|  75.8M|      if (!INPUT) {
  ------------------
  |  Branch (42:11): [True: 1.75k, False: 75.8M]
  ------------------
   43|  1.75k|        break;
   44|  1.75k|      }
   45|       |
   46|       |      // document indicator?
   47|  75.8M|      if (INPUT.column() == 0 && Exp::DocIndicator().Matches(INPUT)) {
  ------------------
  |  Branch (47:11): [True: 362k, False: 75.4M]
  |  Branch (47:34): [True: 233k, False: 128k]
  ------------------
   48|   233k|        if (params.onDocIndicator == BREAK) {
  ------------------
  |  Branch (48:13): [True: 233k, False: 2]
  ------------------
   49|   233k|          break;
   50|   233k|        }
   51|      2|        if (params.onDocIndicator == THROW) {
  ------------------
  |  Branch (51:13): [True: 2, False: 0]
  ------------------
   52|      2|          throw ParserException(INPUT.mark(), ErrorMsg::DOC_IN_SCALAR);
   53|      2|        }
   54|      2|      }
   55|       |
   56|  75.6M|      foundNonEmptyLine = true;
   57|  75.6M|      pastOpeningBreak = true;
   58|       |
   59|       |      // escaped newline? (only if we're escaping on slash)
   60|  75.6M|      if (params.escape == '\\' && Exp::EscBreak().Matches(INPUT)) {
  ------------------
  |  Branch (60:11): [True: 12.7M, False: 62.8M]
  |  Branch (60:36): [True: 777, False: 12.7M]
  ------------------
   61|       |        // eat escape character and get out (but preserve trailing whitespace!)
   62|    777|        INPUT.get();
   63|    777|        lastNonWhitespaceChar = scalar.size();
   64|    777|        lastEscapedChar = scalar.size();
   65|    777|        escapedNewline = true;
   66|    777|        break;
   67|    777|      }
   68|       |
   69|       |      // escape this?
   70|  75.6M|      if (INPUT.peek() == params.escape) {
  ------------------
  |  Branch (70:11): [True: 42.1k, False: 75.5M]
  ------------------
   71|  42.1k|        scalar += Exp::Escape(INPUT);
   72|  42.1k|        lastNonWhitespaceChar = scalar.size();
   73|  42.1k|        lastEscapedChar = scalar.size();
   74|  42.1k|        continue;
   75|  42.1k|      }
   76|       |
   77|       |      // otherwise, just add the damn character
   78|  75.5M|      char ch = INPUT.get();
   79|  75.5M|      scalar += ch;
   80|  75.5M|      if (ch != ' ' && ch != '\t') {
  ------------------
  |  Branch (80:11): [True: 75.5M, False: 56.5k]
  |  Branch (80:24): [True: 73.8M, False: 1.61M]
  ------------------
   81|  73.8M|        lastNonWhitespaceChar = scalar.size();
   82|  73.8M|      }
   83|  75.5M|    }
   84|       |
   85|       |    // eof? if we're looking to eat something, then we throw
   86|  19.0M|    if (!INPUT) {
  ------------------
  |  Branch (86:9): [True: 1.81k, False: 19.0M]
  ------------------
   87|  1.81k|      if (params.eatEnd) {
  ------------------
  |  Branch (87:11): [True: 196, False: 1.62k]
  ------------------
   88|    196|        throw ParserException(INPUT.mark(), ErrorMsg::EOF_IN_SCALAR);
   89|    196|      }
   90|  1.62k|      break;
   91|  1.81k|    }
   92|       |
   93|       |    // doc indicator?
   94|  19.0M|    if (params.onDocIndicator == BREAK && INPUT.column() == 0 &&
  ------------------
  |  Branch (94:9): [True: 8.65M, False: 10.3M]
  |  Branch (94:43): [True: 4.08M, False: 4.56M]
  ------------------
   95|  4.08M|        Exp::DocIndicator().Matches(INPUT)) {
  ------------------
  |  Branch (95:9): [True: 233k, False: 3.85M]
  ------------------
   96|   233k|      break;
   97|   233k|    }
   98|       |
   99|       |    // are we done via character match?
  100|  18.7M|    int n = params.end->Match(INPUT);
  101|  18.7M|    if (n >= 0) {
  ------------------
  |  Branch (101:9): [True: 1.28M, False: 17.4M]
  ------------------
  102|  1.28M|      if (params.eatEnd) {
  ------------------
  |  Branch (102:11): [True: 6.90k, False: 1.28M]
  ------------------
  103|  6.90k|        INPUT.eat(n);
  104|  6.90k|      }
  105|  1.28M|      break;
  106|  1.28M|    }
  107|       |
  108|       |    // do we remove trailing whitespace?
  109|  17.4M|    if (params.fold == FOLD_FLOW)
  ------------------
  |  Branch (109:9): [True: 7.20M, False: 10.2M]
  ------------------
  110|  7.20M|      scalar.erase(lastNonWhitespaceChar);
  111|       |
  112|       |    // ********************************
  113|       |    // Phase #2: eat line ending
  114|  17.4M|    n = Exp::Break().Match(INPUT);
  115|  17.4M|    INPUT.eat(n);
  116|       |
  117|       |    // ********************************
  118|       |    // Phase #3: scan initial spaces
  119|       |
  120|       |    // first the required indentation
  121|  17.4M|    while (INPUT.peek() == ' ' &&
  ------------------
  |  Branch (121:12): [True: 12.1k, False: 17.4M]
  ------------------
  122|  12.1k|           (INPUT.column() < params.indent ||
  ------------------
  |  Branch (122:13): [True: 587, False: 11.5k]
  ------------------
  123|  11.5k|            (params.detectIndent && !foundNonEmptyLine)) &&
  ------------------
  |  Branch (123:14): [True: 3.64k, False: 7.91k]
  |  Branch (123:37): [True: 372, False: 3.27k]
  ------------------
  124|    959|           !params.end->Matches(INPUT)) {
  ------------------
  |  Branch (124:12): [True: 890, False: 69]
  ------------------
  125|    890|      INPUT.eat(1);
  126|    890|    }
  127|       |
  128|       |    // update indent if we're auto-detecting
  129|  17.4M|    if (params.detectIndent && !foundNonEmptyLine) {
  ------------------
  |  Branch (129:9): [True: 10.2M, False: 7.20M]
  |  Branch (129:32): [True: 9.11M, False: 1.16M]
  ------------------
  130|  9.11M|      params.indent = std::max(params.indent, INPUT.column());
  131|  9.11M|    }
  132|       |
  133|       |    // and then the rest of the whitespace
  134|  17.5M|    while (Exp::Blank().Matches(INPUT)) {
  ------------------
  |  Branch (134:12): [True: 13.9k, False: 17.4M]
  ------------------
  135|       |      // we check for tabs that masquerade as indentation
  136|  13.9k|      if (INPUT.peek() == '\t' && INPUT.column() < params.indent &&
  ------------------
  |  Branch (136:11): [True: 2.50k, False: 11.4k]
  |  Branch (136:35): [True: 2, False: 2.49k]
  ------------------
  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|  13.9k|      if (!params.eatLeadingWhitespace) {
  ------------------
  |  Branch (141:11): [True: 3.84k, False: 10.1k]
  ------------------
  142|  3.84k|        break;
  143|  3.84k|      }
  144|       |
  145|  10.1k|      if (params.end->Matches(INPUT)) {
  ------------------
  |  Branch (145:11): [True: 80, False: 10.0k]
  ------------------
  146|     80|        break;
  147|     80|      }
  148|       |
  149|  10.0k|      INPUT.eat(1);
  150|  10.0k|    }
  151|       |
  152|       |    // was this an empty line?
  153|  17.4M|    bool nextEmptyLine = Exp::Break().Matches(INPUT);
  154|  17.4M|    bool nextMoreIndented = Exp::Blank().Matches(INPUT);
  155|  17.4M|    if (params.fold == FOLD_BLOCK && foldedNewlineCount == 0 && nextEmptyLine)
  ------------------
  |  Branch (155:9): [True: 10.2M, False: 7.21M]
  |  Branch (155:38): [True: 55.9k, False: 10.2M]
  |  Branch (155:65): [True: 4.66k, False: 51.2k]
  ------------------
  156|  4.66k|      foldedNewlineStartedMoreIndented = moreIndented;
  157|       |
  158|       |    // for block scalars, we always start with a newline, so we should ignore it
  159|       |    // (not fold or keep)
  160|  17.4M|    if (pastOpeningBreak) {
  ------------------
  |  Branch (160:9): [True: 17.4M, False: 3.63k]
  ------------------
  161|  17.4M|      switch (params.fold) {
  ------------------
  |  Branch (161:15): [True: 17.4M, False: 0]
  ------------------
  162|  3.79k|        case DONT_FOLD:
  ------------------
  |  Branch (162:9): [True: 3.79k, False: 17.4M]
  ------------------
  163|  3.79k|          scalar += "\n";
  164|  3.79k|          break;
  165|  10.2M|        case FOLD_BLOCK:
  ------------------
  |  Branch (165:9): [True: 10.2M, False: 7.21M]
  ------------------
  166|  10.2M|          if (!emptyLine && !nextEmptyLine && !moreIndented &&
  ------------------
  |  Branch (166:15): [True: 52.6k, False: 10.2M]
  |  Branch (166:29): [True: 49.1k, False: 3.51k]
  |  Branch (166:47): [True: 45.7k, False: 3.37k]
  ------------------
  167|  45.7k|              !nextMoreIndented && INPUT.column() >= params.indent) {
  ------------------
  |  Branch (167:15): [True: 43.1k, False: 2.60k]
  |  Branch (167:36): [True: 42.6k, False: 518]
  ------------------
  168|  42.6k|            scalar += " ";
  169|  10.2M|          } else if (nextEmptyLine) {
  ------------------
  |  Branch (169:22): [True: 10.2M, False: 10.6k]
  ------------------
  170|  10.2M|            foldedNewlineCount++;
  171|  10.2M|          } else {
  172|  10.6k|            scalar += "\n";
  173|  10.6k|          }
  174|       |
  175|  10.2M|          if (!nextEmptyLine && foldedNewlineCount > 0) {
  ------------------
  |  Branch (175:15): [True: 53.3k, False: 10.2M]
  |  Branch (175:33): [True: 4.02k, False: 49.2k]
  ------------------
  176|  4.02k|            scalar += std::string(foldedNewlineCount - 1, '\n');
  177|  4.02k|            if (foldedNewlineStartedMoreIndented ||
  ------------------
  |  Branch (177:17): [True: 412, False: 3.61k]
  ------------------
  178|  3.61k|                nextMoreIndented | !foundNonEmptyLine) {
  ------------------
  |  Branch (178:17): [True: 630, False: 2.98k]
  ------------------
  179|  1.04k|              scalar += "\n";
  180|  1.04k|            }
  181|  4.02k|            foldedNewlineCount = 0;
  182|  4.02k|          }
  183|  10.2M|          break;
  184|  7.20M|        case FOLD_FLOW:
  ------------------
  |  Branch (184:9): [True: 7.20M, False: 10.2M]
  ------------------
  185|  7.20M|          if (nextEmptyLine) {
  ------------------
  |  Branch (185:15): [True: 5.73M, False: 1.47M]
  ------------------
  186|  5.73M|            scalar += "\n";
  187|  5.73M|          } else if (!emptyLine && !escapedNewline) {
  ------------------
  |  Branch (187:22): [True: 1.46M, False: 12.7k]
  |  Branch (187:36): [True: 1.46M, False: 635]
  ------------------
  188|  1.46M|            scalar += " ";
  189|  1.46M|          }
  190|  7.20M|          break;
  191|  17.4M|      }
  192|  17.4M|    }
  193|       |
  194|  17.4M|    emptyLine = nextEmptyLine;
  195|  17.4M|    moreIndented = nextMoreIndented;
  196|  17.4M|    pastOpeningBreak = true;
  197|       |
  198|       |    // are we done via indentation?
  199|  17.4M|    if (!emptyLine && INPUT.column() < params.indent) {
  ------------------
  |  Branch (199:9): [True: 1.53M, False: 15.9M]
  |  Branch (199:23): [True: 868k, False: 664k]
  ------------------
  200|   868k|      params.leadingSpaces = true;
  201|   868k|      break;
  202|   868k|    }
  203|  17.4M|  }
  204|       |
  205|       |  // post-processing
  206|  2.39M|  if (params.trimTrailingSpaces) {
  ------------------
  |  Branch (206:7): [True: 2.38M, False: 10.7k]
  ------------------
  207|  2.38M|    std::size_t pos = scalar.find_last_not_of(" \t");
  208|  2.38M|    if (lastEscapedChar != std::string::npos) {
  ------------------
  |  Branch (208:9): [True: 16.0k, False: 2.36M]
  ------------------
  209|  16.0k|      if (pos < lastEscapedChar || pos == std::string::npos) {
  ------------------
  |  Branch (209:11): [True: 9.84k, False: 6.20k]
  |  Branch (209:36): [True: 430, False: 5.77k]
  ------------------
  210|  10.2k|        pos = lastEscapedChar;
  211|  10.2k|      }
  212|  16.0k|    }
  213|  2.38M|    if (pos < scalar.size()) {
  ------------------
  |  Branch (213:9): [True: 2.37M, False: 10.1k]
  ------------------
  214|  2.37M|      scalar.erase(pos + 1);
  215|  2.37M|    }
  216|  2.38M|  }
  217|       |
  218|  2.39M|  switch (params.chomp) {
  219|  9.80k|    case CLIP: {
  ------------------
  |  Branch (219:5): [True: 9.80k, False: 2.38M]
  ------------------
  220|  9.80k|      std::size_t pos = scalar.find_last_not_of('\n');
  221|  9.80k|      if (lastEscapedChar != std::string::npos) {
  ------------------
  |  Branch (221:11): [True: 2.68k, False: 7.12k]
  ------------------
  222|  2.68k|        if (pos < lastEscapedChar || pos == std::string::npos) {
  ------------------
  |  Branch (222:13): [True: 1.72k, False: 965]
  |  Branch (222:38): [True: 106, False: 859]
  ------------------
  223|  1.82k|          pos = lastEscapedChar;
  224|  1.82k|        }
  225|  2.68k|      }
  226|  9.80k|      if (pos == std::string::npos) {
  ------------------
  |  Branch (226:11): [True: 3.84k, False: 5.96k]
  ------------------
  227|  3.84k|        scalar.erase();
  228|  5.96k|      } else if (pos + 1 < scalar.size()) {
  ------------------
  |  Branch (228:18): [True: 950, False: 5.01k]
  ------------------
  229|    950|        scalar.erase(pos + 2);
  230|    950|      }
  231|  9.80k|    } break;
  232|  2.38M|    case STRIP: {
  ------------------
  |  Branch (232:5): [True: 2.38M, False: 10.4k]
  ------------------
  233|  2.38M|      std::size_t pos = scalar.find_last_not_of('\n');
  234|  2.38M|      if (lastEscapedChar != std::string::npos) {
  ------------------
  |  Branch (234:11): [True: 16.0k, False: 2.36M]
  ------------------
  235|  16.0k|        if (pos < lastEscapedChar || pos == std::string::npos) {
  ------------------
  |  Branch (235:13): [True: 9.87k, False: 6.18k]
  |  Branch (235:38): [True: 330, False: 5.85k]
  ------------------
  236|  10.2k|          pos = lastEscapedChar;
  237|  10.2k|        }
  238|  16.0k|      }
  239|  2.38M|      if (pos == std::string::npos) {
  ------------------
  |  Branch (239:11): [True: 317, False: 2.38M]
  ------------------
  240|    317|        scalar.erase();
  241|  2.38M|      } else if (pos < scalar.size()) {
  ------------------
  |  Branch (241:18): [True: 2.37M, False: 10.1k]
  ------------------
  242|  2.37M|        scalar.erase(pos + 1);
  243|  2.37M|      }
  244|  2.38M|    } break;
  245|    267|    default:
  ------------------
  |  Branch (245:5): [True: 267, False: 2.39M]
  ------------------
  246|    267|      break;
  247|  2.39M|  }
  248|       |
  249|  2.39M|  return scalar;
  250|  2.39M|}

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

_ZN4YAML15ScanVerbatimTagERNS_6StreamE:
    9|    642|const std::string ScanVerbatimTag(Stream& INPUT) {
   10|    642|  std::string tag;
   11|       |
   12|       |  // eat the start character
   13|    642|  INPUT.get();
   14|       |
   15|  9.72k|  while (INPUT) {
  ------------------
  |  Branch (15:10): [True: 9.69k, False: 21]
  ------------------
   16|  9.69k|    if (INPUT.peek() == Keys::VerbatimTagEnd) {
  ------------------
  |  Branch (16:9): [True: 610, False: 9.08k]
  ------------------
   17|       |      // eat the end character
   18|    610|      INPUT.get();
   19|    610|      return tag;
   20|    610|    }
   21|       |
   22|  9.08k|    int n = Exp::URI().Match(INPUT);
   23|  9.08k|    if (n <= 0)
  ------------------
  |  Branch (23:9): [True: 11, False: 9.07k]
  ------------------
   24|     11|      break;
   25|       |
   26|  9.07k|    tag += INPUT.get(n);
   27|  9.07k|  }
   28|       |
   29|     32|  throw ParserException(INPUT.mark(), ErrorMsg::END_OF_VERBATIM_TAG);
   30|    642|}
_ZN4YAML13ScanTagHandleERNS_6StreamERb:
   32|   970k|const std::string ScanTagHandle(Stream& INPUT, bool& canBeHandle) {
   33|   970k|  std::string tag;
   34|   970k|  canBeHandle = true;
   35|   970k|  Mark firstNonWordChar;
   36|       |
   37|  11.6M|  while (INPUT) {
  ------------------
  |  Branch (37:10): [True: 11.6M, False: 310]
  ------------------
   38|  11.6M|    if (INPUT.peek() == Keys::Tag) {
  ------------------
  |  Branch (38:9): [True: 2.39k, False: 11.6M]
  ------------------
   39|  2.39k|      if (!canBeHandle)
  ------------------
  |  Branch (39:11): [True: 5, False: 2.39k]
  ------------------
   40|      5|        throw ParserException(firstNonWordChar, ErrorMsg::CHAR_IN_TAG_HANDLE);
   41|  2.39k|      break;
   42|  2.39k|    }
   43|       |
   44|  11.6M|    int n = 0;
   45|  11.6M|    if (canBeHandle) {
  ------------------
  |  Branch (45:9): [True: 10.0M, False: 1.56M]
  ------------------
   46|  10.0M|      n = Exp::Word().Match(INPUT);
   47|  10.0M|      if (n <= 0) {
  ------------------
  |  Branch (47:11): [True: 967k, False: 9.08M]
  ------------------
   48|   967k|        canBeHandle = false;
   49|   967k|        firstNonWordChar = INPUT.mark();
   50|   967k|      }
   51|  10.0M|    }
   52|       |
   53|  11.6M|    if (!canBeHandle)
  ------------------
  |  Branch (53:9): [True: 2.53M, False: 9.08M]
  ------------------
   54|  2.53M|      n = Exp::Tag().Match(INPUT);
   55|       |
   56|  11.6M|    if (n <= 0)
  ------------------
  |  Branch (56:9): [True: 967k, False: 10.6M]
  ------------------
   57|   967k|      break;
   58|       |
   59|  10.6M|    tag += INPUT.get(n);
   60|  10.6M|  }
   61|       |
   62|   970k|  return tag;
   63|   970k|}
_ZN4YAML13ScanTagSuffixERNS_6StreamE:
   65|  2.39k|const std::string ScanTagSuffix(Stream& INPUT) {
   66|  2.39k|  std::string tag;
   67|       |
   68|  1.21M|  while (INPUT) {
  ------------------
  |  Branch (68:10): [True: 1.21M, False: 108]
  ------------------
   69|  1.21M|    int n = Exp::Tag().Match(INPUT);
   70|  1.21M|    if (n <= 0)
  ------------------
  |  Branch (70:9): [True: 2.28k, False: 1.21M]
  ------------------
   71|  2.28k|      break;
   72|       |
   73|  1.21M|    tag += INPUT.get(n);
   74|  1.21M|  }
   75|       |
   76|  2.39k|  if (tag.empty())
  ------------------
  |  Branch (76:7): [True: 17, False: 2.37k]
  ------------------
   77|     17|    throw ParserException(INPUT.mark(), ErrorMsg::TAG_WITH_NO_SUFFIX);
   78|       |
   79|  2.37k|  return tag;
   80|  2.39k|}

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

_ZN4YAML7Scanner9SimpleKeyC2ERKNS_4MarkEm:
    8|  47.2M|    : mark(mark_),
    9|  47.2M|      flowLevel(flowLevel_),
   10|  47.2M|      pIndent(nullptr),
   11|  47.2M|      pMapStart(nullptr),
   12|  47.2M|      pKey(nullptr) {}
_ZN4YAML7Scanner9SimpleKey8ValidateEv:
   14|  1.14M|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|  1.14M|  if (pIndent)
  ------------------
  |  Branch (18:7): [True: 48.6k, False: 1.09M]
  ------------------
   19|  48.6k|    pIndent->status = IndentMarker::VALID;
   20|  1.14M|  if (pMapStart)
  ------------------
  |  Branch (20:7): [True: 48.6k, False: 1.09M]
  ------------------
   21|  48.6k|    pMapStart->status = Token::VALID;
   22|  1.14M|  if (pKey)
  ------------------
  |  Branch (22:7): [True: 1.14M, False: 0]
  ------------------
   23|  1.14M|    pKey->status = Token::VALID;
   24|  1.14M|}
_ZN4YAML7Scanner9SimpleKey10InvalidateEv:
   26|  3.38M|void Scanner::SimpleKey::Invalidate() {
   27|  3.38M|  if (pIndent)
  ------------------
  |  Branch (27:7): [True: 1.68M, False: 1.69M]
  ------------------
   28|  1.68M|    pIndent->status = IndentMarker::INVALID;
   29|  3.38M|  if (pMapStart)
  ------------------
  |  Branch (29:7): [True: 1.68M, False: 1.69M]
  ------------------
   30|  1.68M|    pMapStart->status = Token::INVALID;
   31|  3.38M|  if (pKey)
  ------------------
  |  Branch (31:7): [True: 3.38M, False: 0]
  ------------------
   32|  3.38M|    pKey->status = Token::INVALID;
   33|  3.38M|}
_ZNK4YAML7Scanner27CanInsertPotentialSimpleKeyEv:
   36|  47.7M|bool Scanner::CanInsertPotentialSimpleKey() const {
   37|  47.7M|  if (!m_simpleKeyAllowed)
  ------------------
  |  Branch (37:7): [True: 471k, False: 47.2M]
  ------------------
   38|   471k|    return false;
   39|       |
   40|  47.2M|  return !ExistsActiveSimpleKey();
   41|  47.7M|}
_ZNK4YAML7Scanner21ExistsActiveSimpleKeyEv:
   47|  47.2M|bool Scanner::ExistsActiveSimpleKey() const {
   48|  47.2M|  if (m_simpleKeys.empty())
  ------------------
  |  Branch (48:7): [True: 1.87M, False: 45.4M]
  ------------------
   49|  1.87M|    return false;
   50|       |
   51|  45.4M|  const SimpleKey& key = m_simpleKeys.top();
   52|  45.4M|  return key.flowLevel == GetFlowLevel();
   53|  47.2M|}
_ZN4YAML7Scanner24InsertPotentialSimpleKeyEv:
   58|  47.7M|void Scanner::InsertPotentialSimpleKey() {
   59|  47.7M|  if (!CanInsertPotentialSimpleKey())
  ------------------
  |  Branch (59:7): [True: 475k, False: 47.2M]
  ------------------
   60|   475k|    return;
   61|       |
   62|  47.2M|  SimpleKey key(INPUT.mark(), GetFlowLevel());
   63|       |
   64|       |  // first add a map start, if necessary
   65|  47.2M|  if (InBlockContext()) {
  ------------------
  |  Branch (65:7): [True: 1.86M, False: 45.4M]
  ------------------
   66|  1.86M|    key.pIndent = PushIndentTo(INPUT.column(), IndentMarker::MAP);
   67|  1.86M|    if (key.pIndent) {
  ------------------
  |  Branch (67:9): [True: 1.73M, False: 122k]
  ------------------
   68|  1.73M|      key.pIndent->status = IndentMarker::UNKNOWN;
   69|  1.73M|      key.pMapStart = key.pIndent->pStartToken;
   70|  1.73M|      key.pMapStart->status = Token::UNVERIFIED;
   71|  1.73M|    }
   72|  1.86M|  }
   73|       |
   74|       |  // then add the (now unverified) key
   75|  47.2M|  m_tokens.push(Token(Token::KEY, INPUT.mark()));
   76|  47.2M|  key.pKey = &m_tokens.back();
   77|  47.2M|  key.pKey->status = Token::UNVERIFIED;
   78|       |
   79|  47.2M|  m_simpleKeys.push(key);
   80|  47.2M|}
_ZN4YAML7Scanner19InvalidateSimpleKeyEv:
   84|  11.2M|void Scanner::InvalidateSimpleKey() {
   85|  11.2M|  if (m_simpleKeys.empty())
  ------------------
  |  Branch (85:7): [True: 8.49M, False: 2.77M]
  ------------------
   86|  8.49M|    return;
   87|       |
   88|       |  // grab top key
   89|  2.77M|  SimpleKey& key = m_simpleKeys.top();
   90|  2.77M|  if (key.flowLevel != GetFlowLevel())
  ------------------
  |  Branch (90:7): [True: 524k, False: 2.25M]
  ------------------
   91|   524k|    return;
   92|       |
   93|  2.25M|  key.Invalidate();
   94|  2.25M|  m_simpleKeys.pop();
   95|  2.25M|}
_ZN4YAML7Scanner15VerifySimpleKeyEv:
  100|  9.63M|bool Scanner::VerifySimpleKey() {
  101|  9.63M|  if (m_simpleKeys.empty())
  ------------------
  |  Branch (101:7): [True: 7.28M, False: 2.35M]
  ------------------
  102|  7.28M|    return false;
  103|       |
  104|       |  // grab top key
  105|  2.35M|  SimpleKey key = m_simpleKeys.top();
  106|       |
  107|       |  // only validate if we're in the correct flow level
  108|  2.35M|  if (key.flowLevel != GetFlowLevel())
  ------------------
  |  Branch (108:7): [True: 78.3k, False: 2.27M]
  ------------------
  109|  78.3k|    return false;
  110|       |
  111|  2.27M|  m_simpleKeys.pop();
  112|       |
  113|  2.27M|  bool isValid = true;
  114|       |
  115|       |  // needs to be less than 1024 characters and inline
  116|  2.27M|  if (INPUT.line() != key.mark.line || INPUT.pos() - key.mark.pos > 1024)
  ------------------
  |  Branch (116:7): [True: 52.6k, False: 2.22M]
  |  Branch (116:40): [True: 1.07M, False: 1.14M]
  ------------------
  117|  1.12M|    isValid = false;
  118|       |
  119|       |  // invalidate key
  120|  2.27M|  if (isValid)
  ------------------
  |  Branch (120:7): [True: 1.14M, False: 1.12M]
  ------------------
  121|  1.14M|    key.Validate();
  122|  1.12M|  else
  123|  1.12M|    key.Invalidate();
  124|       |
  125|  2.27M|  return isValid;
  126|  2.35M|}
_ZN4YAML7Scanner16PopAllSimpleKeysEv:
  128|   544k|void Scanner::PopAllSimpleKeys() {
  129|  38.7M|  while (!m_simpleKeys.empty())
  ------------------
  |  Branch (129:10): [True: 38.2M, False: 544k]
  ------------------
  130|  38.2M|    m_simpleKeys.pop();
  131|   544k|}

_ZN4YAML15SingleDocParserC2ERNS_7ScannerERKNS_10DirectivesE:
   18|   475k|    : m_scanner(scanner),
   19|   475k|      m_directives(directives),
   20|   475k|      m_pCollectionStack(new CollectionStack),
   21|   475k|      m_anchors{},
   22|   475k|      m_curAnchor(0) {}
_ZN4YAML15SingleDocParserD2Ev:
   24|   475k|SingleDocParser::~SingleDocParser() = default;
_ZN4YAML15SingleDocParser14HandleDocumentERNS_12EventHandlerE:
   29|   475k|void SingleDocParser::HandleDocument(EventHandler& eventHandler) {
   30|   475k|  assert(!m_scanner.empty());  // guaranteed that there are tokens
   31|   475k|  assert(!m_curAnchor);
   32|       |
   33|   475k|  eventHandler.OnDocumentStart(m_scanner.peek().mark);
   34|       |
   35|       |  // eat doc start
   36|   475k|  if (m_scanner.peek().type == Token::DOC_START)
  ------------------
  |  Branch (36:7): [True: 195k, False: 279k]
  ------------------
   37|   195k|    m_scanner.pop();
   38|       |
   39|       |  // recurse!
   40|   475k|  HandleNode(eventHandler);
   41|       |
   42|   475k|  eventHandler.OnDocumentEnd();
   43|       |
   44|       |  // check if any tokens left after the text
   45|   475k|  if (!m_scanner.empty() && m_scanner.peek().type != Token::DOC_END
  ------------------
  |  Branch (45:7): [True: 471k, False: 4.43k]
  |  Branch (45:29): [True: 196k, False: 274k]
  ------------------
   46|   196k|      && m_scanner.peek().type != Token::DOC_START)
  ------------------
  |  Branch (46:10): [True: 358, False: 195k]
  ------------------
   47|    358|    throw ParserException(m_scanner.mark(), ErrorMsg::UNEXPECTED_TOKEN_AFTER_DOC);
   48|       |
   49|       |  // and finally eat any doc ends we see
   50|   475k|  if (!m_scanner.empty() && m_scanner.peek().type == Token::DOC_END)
  ------------------
  |  Branch (50:7): [True: 470k, False: 4.43k]
  |  Branch (50:29): [True: 274k, False: 195k]
  ------------------
   51|   274k|    m_scanner.pop();
   52|   475k|}
_ZN4YAML15SingleDocParser10HandleNodeERNS_12EventHandlerE:
   54|  1.59M|void SingleDocParser::HandleNode(EventHandler& eventHandler) {
   55|  1.59M|  DepthGuard<500> depthguard(depth, m_scanner.mark(), ErrorMsg::BAD_FILE);
   56|       |
   57|       |  // an empty node *is* a possibility
   58|  1.59M|  if (m_scanner.empty()) {
  ------------------
  |  Branch (58:7): [True: 66, False: 1.59M]
  ------------------
   59|     66|    eventHandler.OnNull(m_scanner.mark(), NullAnchor);
   60|     66|    return;
   61|     66|  }
   62|       |
   63|       |  // save location
   64|  1.59M|  Mark mark = m_scanner.peek().mark;
   65|       |
   66|       |  // special case: a value node by itself must be a map, with no header
   67|  1.59M|  if (m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (67:7): [True: 6.05k, False: 1.58M]
  ------------------
   68|  6.05k|    eventHandler.OnMapStart(mark, "?", NullAnchor, EmitterStyle::Default);
   69|  6.05k|    HandleMap(eventHandler);
   70|  6.05k|    eventHandler.OnMapEnd();
   71|  6.05k|    return;
   72|  6.05k|  }
   73|       |
   74|       |  // special case: an alias node
   75|  1.58M|  if (m_scanner.peek().type == Token::ALIAS) {
  ------------------
  |  Branch (75:7): [True: 1.26k, False: 1.58M]
  ------------------
   76|  1.26k|    eventHandler.OnAlias(mark, LookupAnchor(mark, m_scanner.peek().value));
   77|  1.26k|    m_scanner.pop();
   78|  1.26k|    return;
   79|  1.26k|  }
   80|       |
   81|  1.58M|  std::string tag;
   82|  1.58M|  std::string anchor_name;
   83|  1.58M|  anchor_t anchor;
   84|  1.58M|  ParseProperties(tag, anchor, anchor_name);
   85|       |
   86|  1.58M|  if (!anchor_name.empty())
  ------------------
  |  Branch (86:7): [True: 421k, False: 1.16M]
  ------------------
   87|   421k|    eventHandler.OnAnchor(mark, anchor_name);
   88|       |
   89|       |  // after parsing properties, an empty node is again a possibility
   90|  1.58M|  if (m_scanner.empty()) {
  ------------------
  |  Branch (90:7): [True: 672, False: 1.58M]
  ------------------
   91|    672|    eventHandler.OnNull(mark, anchor);
   92|    672|    return;
   93|    672|  }
   94|       |
   95|  1.58M|  const Token& token = m_scanner.peek();
   96|       |
   97|       |  // add non-specific tags
   98|  1.58M|  if (tag.empty())
  ------------------
  |  Branch (98:7): [True: 1.58M, False: 6.54k]
  ------------------
   99|  1.58M|    tag = (token.type == Token::NON_PLAIN_SCALAR ? "!" : "?");
  ------------------
  |  Branch (99:12): [True: 1.19k, False: 1.57M]
  ------------------
  100|       |
  101|  1.58M|  if (token.type == Token::PLAIN_SCALAR
  ------------------
  |  Branch (101:7): [True: 238k, False: 1.34M]
  ------------------
  102|   238k|      && tag.compare("?") == 0 && IsNullString(token.value.data(), token.value.size())) {
  ------------------
  |  Branch (102:10): [True: 237k, False: 801]
  |  Branch (102:35): [True: 12.8k, False: 224k]
  ------------------
  103|  12.8k|    eventHandler.OnNull(mark, anchor);
  104|  12.8k|    m_scanner.pop();
  105|  12.8k|    return;
  106|  12.8k|  }
  107|       |
  108|       |  // now split based on what kind of node we should be
  109|  1.57M|  switch (token.type) {
  110|   225k|    case Token::PLAIN_SCALAR:
  ------------------
  |  Branch (110:5): [True: 225k, False: 1.34M]
  ------------------
  111|   226k|    case Token::NON_PLAIN_SCALAR:
  ------------------
  |  Branch (111:5): [True: 1.25k, False: 1.57M]
  ------------------
  112|   226k|      eventHandler.OnScalar(mark, tag, anchor, token.value);
  113|   226k|      m_scanner.pop();
  114|   226k|      return;
  115|  36.3k|    case Token::FLOW_SEQ_START:
  ------------------
  |  Branch (115:5): [True: 36.3k, False: 1.53M]
  ------------------
  116|  36.3k|      eventHandler.OnSequenceStart(mark, tag, anchor, EmitterStyle::Flow);
  117|  36.3k|      HandleSequence(eventHandler);
  118|  36.3k|      eventHandler.OnSequenceEnd();
  119|  36.3k|      return;
  120|  8.52k|    case Token::BLOCK_SEQ_START:
  ------------------
  |  Branch (120:5): [True: 8.52k, False: 1.56M]
  ------------------
  121|  8.52k|      eventHandler.OnSequenceStart(mark, tag, anchor, EmitterStyle::Block);
  122|  8.52k|      HandleSequence(eventHandler);
  123|  8.52k|      eventHandler.OnSequenceEnd();
  124|  8.52k|      return;
  125|  34.4k|    case Token::FLOW_MAP_START:
  ------------------
  |  Branch (125:5): [True: 34.4k, False: 1.53M]
  ------------------
  126|  34.4k|      eventHandler.OnMapStart(mark, tag, anchor, EmitterStyle::Flow);
  127|  34.4k|      HandleMap(eventHandler);
  128|  34.4k|      eventHandler.OnMapEnd();
  129|  34.4k|      return;
  130|  27.9k|    case Token::BLOCK_MAP_START:
  ------------------
  |  Branch (130:5): [True: 27.9k, False: 1.54M]
  ------------------
  131|  27.9k|      eventHandler.OnMapStart(mark, tag, anchor, EmitterStyle::Block);
  132|  27.9k|      HandleMap(eventHandler);
  133|  27.9k|      eventHandler.OnMapEnd();
  134|  27.9k|      return;
  135|  43.5k|    case Token::KEY:
  ------------------
  |  Branch (135:5): [True: 43.5k, False: 1.53M]
  ------------------
  136|       |      // compact maps can only go in a flow sequence
  137|  43.5k|      if (m_pCollectionStack->GetCurCollectionType() ==
  ------------------
  |  Branch (137:11): [True: 35.4k, False: 8.11k]
  ------------------
  138|  43.5k|          CollectionType::FlowSeq) {
  139|  35.4k|        eventHandler.OnMapStart(mark, tag, anchor, EmitterStyle::Flow);
  140|  35.4k|        HandleMap(eventHandler);
  141|  35.4k|        eventHandler.OnMapEnd();
  142|  35.4k|        return;
  143|  35.4k|      }
  144|  8.11k|      break;
  145|  1.19M|    default:
  ------------------
  |  Branch (145:5): [True: 1.19M, False: 377k]
  ------------------
  146|  1.19M|      break;
  147|  1.57M|  }
  148|       |
  149|  1.20M|  if (tag == "?")
  ------------------
  |  Branch (149:7): [True: 1.20M, False: 2.47k]
  ------------------
  150|  1.20M|    eventHandler.OnNull(mark, anchor);
  151|  2.47k|  else
  152|  2.47k|    eventHandler.OnScalar(mark, tag, anchor, "");
  153|  1.20M|}
_ZN4YAML15SingleDocParser14HandleSequenceERNS_12EventHandlerE:
  155|  44.8k|void SingleDocParser::HandleSequence(EventHandler& eventHandler) {
  156|       |  // split based on start token
  157|  44.8k|  switch (m_scanner.peek().type) {
  158|  8.52k|    case Token::BLOCK_SEQ_START:
  ------------------
  |  Branch (158:5): [True: 8.52k, False: 36.3k]
  ------------------
  159|  8.52k|      HandleBlockSequence(eventHandler);
  160|  8.52k|      break;
  161|  36.3k|    case Token::FLOW_SEQ_START:
  ------------------
  |  Branch (161:5): [True: 36.3k, False: 8.52k]
  ------------------
  162|  36.3k|      HandleFlowSequence(eventHandler);
  163|  36.3k|      break;
  164|      0|    default:
  ------------------
  |  Branch (164:5): [True: 0, False: 44.8k]
  ------------------
  165|      0|      break;
  166|  44.8k|  }
  167|  44.8k|}
_ZN4YAML15SingleDocParser19HandleBlockSequenceERNS_12EventHandlerE:
  169|  8.52k|void SingleDocParser::HandleBlockSequence(EventHandler& eventHandler) {
  170|       |  // eat start token
  171|  8.52k|  m_scanner.pop();
  172|  8.52k|  m_pCollectionStack->PushCollectionType(CollectionType::BlockSeq);
  173|       |
  174|  19.3k|  while (true) {
  ------------------
  |  Branch (174:10): [True: 16.9k, Folded]
  ------------------
  175|  16.9k|    if (m_scanner.empty())
  ------------------
  |  Branch (175:9): [True: 0, False: 16.9k]
  ------------------
  176|      0|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_SEQ);
  177|       |
  178|  16.9k|    Token token = m_scanner.peek();
  179|  16.9k|    if (token.type != Token::BLOCK_ENTRY && token.type != Token::BLOCK_SEQ_END)
  ------------------
  |  Branch (179:9): [True: 6.10k, False: 10.8k]
  |  Branch (179:45): [True: 9, False: 6.10k]
  ------------------
  180|      9|      throw ParserException(token.mark, ErrorMsg::END_OF_SEQ);
  181|       |
  182|  16.9k|    m_scanner.pop();
  183|  16.9k|    if (token.type == Token::BLOCK_SEQ_END)
  ------------------
  |  Branch (183:9): [True: 6.10k, False: 10.8k]
  ------------------
  184|  6.10k|      break;
  185|       |
  186|       |    // check for null
  187|  10.8k|    if (!m_scanner.empty()) {
  ------------------
  |  Branch (187:9): [True: 10.8k, False: 43]
  ------------------
  188|  10.8k|      const Token& nextToken = m_scanner.peek();
  189|  10.8k|      if (nextToken.type == Token::BLOCK_ENTRY ||
  ------------------
  |  Branch (189:11): [True: 2.09k, False: 8.73k]
  ------------------
  190|  8.73k|          nextToken.type == Token::BLOCK_SEQ_END) {
  ------------------
  |  Branch (190:11): [True: 3.67k, False: 5.06k]
  ------------------
  191|  5.76k|        eventHandler.OnNull(nextToken.mark, NullAnchor);
  192|  5.76k|        continue;
  193|  5.76k|      }
  194|  10.8k|    }
  195|       |
  196|  5.10k|    HandleNode(eventHandler);
  197|  5.10k|  }
  198|       |
  199|  8.51k|  m_pCollectionStack->PopCollectionType(CollectionType::BlockSeq);
  200|  8.51k|}
_ZN4YAML15SingleDocParser18HandleFlowSequenceERNS_12EventHandlerE:
  202|  36.3k|void SingleDocParser::HandleFlowSequence(EventHandler& eventHandler) {
  203|       |  // eat start token
  204|  36.3k|  m_scanner.pop();
  205|  36.3k|  m_pCollectionStack->PushCollectionType(CollectionType::FlowSeq);
  206|       |
  207|   991k|  while (true) {
  ------------------
  |  Branch (207:10): [True: 956k, Folded]
  ------------------
  208|   956k|    if (m_scanner.empty())
  ------------------
  |  Branch (208:9): [True: 182, False: 956k]
  ------------------
  209|    182|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_SEQ_FLOW);
  210|       |
  211|       |    // first check for end
  212|   956k|    if (m_scanner.peek().type == Token::FLOW_SEQ_END) {
  ------------------
  |  Branch (212:9): [True: 979, False: 955k]
  ------------------
  213|    979|      m_scanner.pop();
  214|    979|      break;
  215|    979|    }
  216|       |
  217|       |    // then read the node
  218|   955k|    HandleNode(eventHandler);
  219|       |
  220|   955k|    if (m_scanner.empty())
  ------------------
  |  Branch (220:9): [True: 550, False: 955k]
  ------------------
  221|    550|      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|   955k|    Token& token = m_scanner.peek();
  226|   955k|    if (token.type == Token::FLOW_ENTRY)
  ------------------
  |  Branch (226:9): [True: 919k, False: 35.5k]
  ------------------
  227|   919k|      m_scanner.pop();
  228|  35.5k|    else if (token.type != Token::FLOW_SEQ_END)
  ------------------
  |  Branch (228:14): [True: 185, False: 35.3k]
  ------------------
  229|    185|      throw ParserException(token.mark, ErrorMsg::END_OF_SEQ_FLOW);
  230|   955k|  }
  231|       |
  232|  35.4k|  m_pCollectionStack->PopCollectionType(CollectionType::FlowSeq);
  233|  35.4k|}
_ZN4YAML15SingleDocParser9HandleMapERNS_12EventHandlerE:
  235|   103k|void SingleDocParser::HandleMap(EventHandler& eventHandler) {
  236|       |  // split based on start token
  237|   103k|  switch (m_scanner.peek().type) {
  238|  27.9k|    case Token::BLOCK_MAP_START:
  ------------------
  |  Branch (238:5): [True: 27.9k, False: 75.9k]
  ------------------
  239|  27.9k|      HandleBlockMap(eventHandler);
  240|  27.9k|      break;
  241|  34.4k|    case Token::FLOW_MAP_START:
  ------------------
  |  Branch (241:5): [True: 34.4k, False: 69.4k]
  ------------------
  242|  34.4k|      HandleFlowMap(eventHandler);
  243|  34.4k|      break;
  244|  35.4k|    case Token::KEY:
  ------------------
  |  Branch (244:5): [True: 35.4k, False: 68.4k]
  ------------------
  245|  35.4k|      HandleCompactMap(eventHandler);
  246|  35.4k|      break;
  247|  6.05k|    case Token::VALUE:
  ------------------
  |  Branch (247:5): [True: 6.05k, False: 97.8k]
  ------------------
  248|  6.05k|      HandleCompactMapWithNoKey(eventHandler);
  249|  6.05k|      break;
  250|      0|    default:
  ------------------
  |  Branch (250:5): [True: 0, False: 103k]
  ------------------
  251|      0|      break;
  252|   103k|  }
  253|   103k|}
_ZN4YAML15SingleDocParser14HandleBlockMapERNS_12EventHandlerE:
  255|  27.9k|void SingleDocParser::HandleBlockMap(EventHandler& eventHandler) {
  256|       |  // eat start token
  257|  27.9k|  m_scanner.pop();
  258|  27.9k|  m_pCollectionStack->PushCollectionType(CollectionType::BlockMap);
  259|       |
  260|  68.7k|  while (true) {
  ------------------
  |  Branch (260:10): [True: 65.2k, Folded]
  ------------------
  261|  65.2k|    if (m_scanner.empty())
  ------------------
  |  Branch (261:9): [True: 0, False: 65.2k]
  ------------------
  262|      0|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_MAP);
  263|       |
  264|  65.2k|    Token token = m_scanner.peek();
  265|  65.2k|    if (token.type != Token::KEY && token.type != Token::VALUE &&
  ------------------
  |  Branch (265:9): [True: 43.1k, False: 22.0k]
  |  Branch (265:37): [True: 24.4k, False: 18.7k]
  ------------------
  266|  24.4k|        token.type != Token::BLOCK_MAP_END)
  ------------------
  |  Branch (266:9): [True: 94, False: 24.3k]
  ------------------
  267|     94|      throw ParserException(token.mark, ErrorMsg::END_OF_MAP);
  268|       |
  269|  65.1k|    if (token.type == Token::BLOCK_MAP_END) {
  ------------------
  |  Branch (269:9): [True: 24.3k, False: 40.7k]
  ------------------
  270|  24.3k|      m_scanner.pop();
  271|  24.3k|      break;
  272|  24.3k|    }
  273|       |
  274|       |    // grab key (if non-null)
  275|  40.7k|    if (token.type == Token::KEY) {
  ------------------
  |  Branch (275:9): [True: 22.0k, False: 18.7k]
  ------------------
  276|  22.0k|      m_scanner.pop();
  277|  22.0k|      HandleNode(eventHandler);
  278|  22.0k|    } else {
  279|  18.7k|      eventHandler.OnNull(token.mark, NullAnchor);
  280|  18.7k|    }
  281|       |
  282|       |    // now grab value (optional)
  283|  40.7k|    if (!m_scanner.empty() && m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (283:9): [True: 38.3k, False: 2.40k]
  |  Branch (283:31): [True: 28.3k, False: 9.95k]
  ------------------
  284|  28.3k|      m_scanner.pop();
  285|  28.3k|      HandleNode(eventHandler);
  286|  28.3k|    } else {
  287|  12.3k|      eventHandler.OnNull(token.mark, NullAnchor);
  288|  12.3k|    }
  289|  40.7k|  }
  290|       |
  291|  27.8k|  m_pCollectionStack->PopCollectionType(CollectionType::BlockMap);
  292|  27.8k|}
_ZN4YAML15SingleDocParser13HandleFlowMapERNS_12EventHandlerE:
  294|  34.4k|void SingleDocParser::HandleFlowMap(EventHandler& eventHandler) {
  295|       |  // eat start token
  296|  34.4k|  m_scanner.pop();
  297|  34.4k|  m_pCollectionStack->PushCollectionType(CollectionType::FlowMap);
  298|       |
  299|   473k|  while (true) {
  ------------------
  |  Branch (299:10): [True: 440k, Folded]
  ------------------
  300|   440k|    if (m_scanner.empty())
  ------------------
  |  Branch (300:9): [True: 157, False: 440k]
  ------------------
  301|    157|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_MAP_FLOW);
  302|       |
  303|   440k|    Token& token = m_scanner.peek();
  304|   440k|    const Mark mark = token.mark;
  305|       |    // first check for end
  306|   440k|    if (token.type == Token::FLOW_MAP_END) {
  ------------------
  |  Branch (306:9): [True: 1.04k, False: 439k]
  ------------------
  307|  1.04k|      m_scanner.pop();
  308|  1.04k|      break;
  309|  1.04k|    }
  310|       |
  311|       |    // grab key (if non-null)
  312|   439k|    if (token.type == Token::KEY) {
  ------------------
  |  Branch (312:9): [True: 49.8k, False: 389k]
  ------------------
  313|  49.8k|      m_scanner.pop();
  314|  49.8k|      HandleNode(eventHandler);
  315|   389k|    } else {
  316|   389k|      eventHandler.OnNull(mark, NullAnchor);
  317|   389k|    }
  318|       |
  319|       |    // now grab value (optional)
  320|   439k|    if (!m_scanner.empty() && m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (320:9): [True: 406k, False: 33.0k]
  |  Branch (320:31): [True: 16.6k, False: 389k]
  ------------------
  321|  16.6k|      m_scanner.pop();
  322|  16.6k|      HandleNode(eventHandler);
  323|   422k|    } else {
  324|   422k|      eventHandler.OnNull(mark, NullAnchor);
  325|   422k|    }
  326|       |
  327|   439k|    if (m_scanner.empty())
  ------------------
  |  Branch (327:9): [True: 272, False: 439k]
  ------------------
  328|    272|      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|   439k|    Token& nextToken = m_scanner.peek();
  333|   439k|    if (nextToken.type == Token::FLOW_ENTRY)
  ------------------
  |  Branch (333:9): [True: 405k, False: 33.6k]
  ------------------
  334|   405k|      m_scanner.pop();
  335|  33.6k|    else if (nextToken.type != Token::FLOW_MAP_END)
  ------------------
  |  Branch (335:14): [True: 167, False: 33.4k]
  ------------------
  336|    167|      throw ParserException(nextToken.mark, ErrorMsg::END_OF_MAP_FLOW);
  337|   439k|  }
  338|       |
  339|  33.8k|  m_pCollectionStack->PopCollectionType(CollectionType::FlowMap);
  340|  33.8k|}
_ZN4YAML15SingleDocParser16HandleCompactMapERNS_12EventHandlerE:
  343|  35.4k|void SingleDocParser::HandleCompactMap(EventHandler& eventHandler) {
  344|  35.4k|  m_pCollectionStack->PushCollectionType(CollectionType::CompactMap);
  345|       |
  346|       |  // grab key
  347|  35.4k|  Mark mark = m_scanner.peek().mark;
  348|  35.4k|  m_scanner.pop();
  349|  35.4k|  HandleNode(eventHandler);
  350|       |
  351|       |  // now grab value (optional)
  352|  35.4k|  if (!m_scanner.empty() && m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (352:7): [True: 755, False: 34.6k]
  |  Branch (352:29): [True: 393, False: 362]
  ------------------
  353|    393|    m_scanner.pop();
  354|    393|    HandleNode(eventHandler);
  355|  35.0k|  } else {
  356|  35.0k|    eventHandler.OnNull(mark, NullAnchor);
  357|  35.0k|  }
  358|       |
  359|  35.4k|  m_pCollectionStack->PopCollectionType(CollectionType::CompactMap);
  360|  35.4k|}
_ZN4YAML15SingleDocParser25HandleCompactMapWithNoKeyERNS_12EventHandlerE:
  363|  6.05k|void SingleDocParser::HandleCompactMapWithNoKey(EventHandler& eventHandler) {
  364|  6.05k|  m_pCollectionStack->PushCollectionType(CollectionType::CompactMap);
  365|       |
  366|       |  // null key
  367|  6.05k|  eventHandler.OnNull(m_scanner.peek().mark, NullAnchor);
  368|       |
  369|       |  // grab value
  370|  6.05k|  m_scanner.pop();
  371|  6.05k|  HandleNode(eventHandler);
  372|       |
  373|  6.05k|  m_pCollectionStack->PopCollectionType(CollectionType::CompactMap);
  374|  6.05k|}
_ZN4YAML15SingleDocParser15ParsePropertiesERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERmS8_:
  379|  1.58M|                                      std::string& anchor_name) {
  380|  1.58M|  tag.clear();
  381|  1.58M|  anchor_name.clear();
  382|  1.58M|  anchor = NullAnchor;
  383|       |
  384|  2.01M|  while (true) {
  ------------------
  |  Branch (384:10): [True: 2.01M, Folded]
  ------------------
  385|  2.01M|    if (m_scanner.empty())
  ------------------
  |  Branch (385:9): [True: 672, False: 2.01M]
  ------------------
  386|    672|      return;
  387|       |
  388|  2.01M|    switch (m_scanner.peek().type) {
  389|  6.91k|      case Token::TAG:
  ------------------
  |  Branch (389:7): [True: 6.91k, False: 2.00M]
  ------------------
  390|  6.91k|        ParseTag(tag);
  391|  6.91k|        break;
  392|   421k|      case Token::ANCHOR:
  ------------------
  |  Branch (392:7): [True: 421k, False: 1.59M]
  ------------------
  393|   421k|        ParseAnchor(anchor, anchor_name);
  394|   421k|        break;
  395|  1.58M|      default:
  ------------------
  |  Branch (395:7): [True: 1.58M, False: 428k]
  ------------------
  396|  1.58M|        return;
  397|  2.01M|    }
  398|  2.01M|  }
  399|  1.58M|}
_ZN4YAML15SingleDocParser8ParseTagERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  401|  6.91k|void SingleDocParser::ParseTag(std::string& tag) {
  402|  6.91k|  Token& token = m_scanner.peek();
  403|  6.91k|  if (!tag.empty())
  ------------------
  |  Branch (403:7): [True: 57, False: 6.86k]
  ------------------
  404|     57|    throw ParserException(token.mark, ErrorMsg::MULTIPLE_TAGS);
  405|       |
  406|  6.86k|  Tag tagInfo(token);
  407|  6.86k|  tag = tagInfo.Translate(m_directives);
  408|  6.86k|  m_scanner.pop();
  409|  6.86k|}
_ZN4YAML15SingleDocParser11ParseAnchorERmRNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  411|   421k|void SingleDocParser::ParseAnchor(anchor_t& anchor, std::string& anchor_name) {
  412|   421k|  Token& token = m_scanner.peek();
  413|   421k|  if (anchor)
  ------------------
  |  Branch (413:7): [True: 15, False: 421k]
  ------------------
  414|     15|    throw ParserException(token.mark, ErrorMsg::MULTIPLE_ANCHORS);
  415|       |
  416|   421k|  anchor_name = token.value;
  417|   421k|  anchor = RegisterAnchor(token.value);
  418|   421k|  m_scanner.pop();
  419|   421k|}
_ZN4YAML15SingleDocParser14RegisterAnchorERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  421|   421k|anchor_t SingleDocParser::RegisterAnchor(const std::string& name) {
  422|   421k|  if (name.empty())
  ------------------
  |  Branch (422:7): [True: 0, False: 421k]
  ------------------
  423|      0|    return NullAnchor;
  424|       |
  425|   421k|  return m_anchors[name] = ++m_curAnchor;
  426|   421k|}
_ZNK4YAML15SingleDocParser12LookupAnchorERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  429|  1.26k|                                       const std::string& name) const {
  430|  1.26k|  auto it = m_anchors.find(name);
  431|  1.26k|  if (it == m_anchors.end()) {
  ------------------
  |  Branch (431:7): [True: 328, False: 941]
  ------------------
  432|    328|    std::stringstream ss;
  433|    328|    ss << ErrorMsg::UNKNOWN_ANCHOR << name;
  434|    328|    throw ParserException(mark, ss.str());
  435|    328|  }
  436|       |
  437|    941|  return it->second;
  438|  1.26k|}

_ZN4YAML6StreamC2ERNSt3__113basic_istreamIcNS1_11char_traitsIcEEEE:
  186|  6.36k|    : m_input(input),
  187|  6.36k|      m_mark{},
  188|  6.36k|      m_charSet{},
  189|  6.36k|      m_readahead{},
  190|  6.36k|      m_pPrefetched(new unsigned char[YAML_PREFETCH_SIZE]),
  ------------------
  |  |    6|  6.36k|#define YAML_PREFETCH_SIZE 2048
  ------------------
  191|  6.36k|      m_nPrefetchedAvailable(0),
  192|  6.36k|      m_nPrefetchedUsed(0) {
  193|  6.36k|  using char_traits = std::istream::traits_type;
  194|       |
  195|  6.36k|  if (!input)
  ------------------
  |  Branch (195:7): [True: 0, False: 6.36k]
  ------------------
  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.36k|  char_traits::int_type intro[4]{};
  201|  6.36k|  int nIntroUsed = 0;
  202|  6.36k|  UtfIntroState state = uis_start;
  203|  20.0k|  for (; !s_introFinalState[state];) {
  ------------------
  |  Branch (203:10): [True: 13.6k, False: 6.36k]
  ------------------
  204|  13.6k|    std::istream::int_type ch = input.get();
  205|  13.6k|    intro[nIntroUsed++] = ch;
  206|  13.6k|    UtfIntroCharType charType = IntroCharTypeOf(ch);
  207|  13.6k|    UtfIntroState newState = s_introTransitions[state][charType];
  208|  13.6k|    int nUngets = s_introUngetCount[state][charType];
  209|  13.6k|    if (nUngets > 0) {
  ------------------
  |  Branch (209:9): [True: 6.35k, False: 7.33k]
  ------------------
  210|  6.35k|      input.clear();
  211|  19.9k|      for (; nUngets > 0; --nUngets) {
  ------------------
  |  Branch (211:14): [True: 13.6k, False: 6.35k]
  ------------------
  212|  13.6k|        if (char_traits::eof() != intro[--nIntroUsed])
  ------------------
  |  Branch (212:13): [True: 13.5k, False: 91]
  ------------------
  213|  13.5k|          input.putback(char_traits::to_char_type(intro[nIntroUsed]));
  214|  13.6k|      }
  215|  6.35k|    }
  216|  13.6k|    state = newState;
  217|  13.6k|  }
  218|       |
  219|  6.36k|  switch (state) {
  220|  5.03k|    case uis_utf8:
  ------------------
  |  Branch (220:5): [True: 5.03k, False: 1.33k]
  ------------------
  221|  5.03k|      m_charSet = utf8;
  222|  5.03k|      break;
  223|    727|    case uis_utf16le:
  ------------------
  |  Branch (223:5): [True: 727, False: 5.63k]
  ------------------
  224|    727|      m_charSet = utf16le;
  225|    727|      break;
  226|    475|    case uis_utf16be:
  ------------------
  |  Branch (226:5): [True: 475, False: 5.89k]
  ------------------
  227|    475|      m_charSet = utf16be;
  228|    475|      break;
  229|     67|    case uis_utf32le:
  ------------------
  |  Branch (229:5): [True: 67, False: 6.29k]
  ------------------
  230|     67|      m_charSet = utf32le;
  231|     67|      break;
  232|     66|    case uis_utf32be:
  ------------------
  |  Branch (232:5): [True: 66, False: 6.29k]
  ------------------
  233|     66|      m_charSet = utf32be;
  234|     66|      break;
  235|      0|    default:
  ------------------
  |  Branch (235:5): [True: 0, False: 6.36k]
  ------------------
  236|      0|      m_charSet = utf8;
  237|      0|      break;
  238|  6.36k|  }
  239|       |
  240|  6.36k|  ReadAheadTo(0);
  241|  6.36k|}
_ZN4YAML6StreamD2Ev:
  243|  6.36k|Stream::~Stream() { delete[] m_pPrefetched; }
_ZNK4YAML6Stream4peekEv:
  245|   571M|char Stream::peek() const {
  246|   571M|  if (m_readahead.empty()) {
  ------------------
  |  Branch (246:7): [True: 0, False: 571M]
  ------------------
  247|      0|    return Stream::eof();
  248|      0|  }
  249|       |
  250|   571M|  return m_readahead[0];
  251|   571M|}
_ZNK4YAML6StreamcvbEv:
  253|   328M|Stream::operator bool() const {
  254|   328M|  return m_input.good() ||
  ------------------
  |  Branch (254:10): [True: 311M, False: 17.4M]
  ------------------
  255|  17.4M|         (!m_readahead.empty() && m_readahead[0] != Stream::eof());
  ------------------
  |  Branch (255:11): [True: 17.4M, False: 0]
  |  Branch (255:35): [True: 17.4M, False: 18.0k]
  ------------------
  256|   328M|}
_ZN4YAML6Stream3getEv:
  260|   242M|char Stream::get() {
  261|   242M|  char ch = peek();
  262|   242M|  AdvanceCurrent();
  263|   242M|  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|   242M|  if (!m_lineEndingSymbol) {
  ------------------
  |  Branch (269:7): [True: 125M, False: 116M]
  ------------------
  270|   125M|    if (ch == '\n') { // line ending is '\n'
  ------------------
  |  Branch (270:9): [True: 1.65k, False: 125M]
  ------------------
  271|  1.65k|      m_lineEndingSymbol = '\n';
  272|   125M|    } else if (ch == '\r') {
  ------------------
  |  Branch (272:16): [True: 958, False: 125M]
  ------------------
  273|    958|      auto ch2 = peek();
  274|    958|      if (ch2 == '\n') { // line ending is '\r\n'
  ------------------
  |  Branch (274:11): [True: 14, False: 944]
  ------------------
  275|     14|        m_lineEndingSymbol = '\n';
  276|    944|      } else { // line ending is '\r'
  277|    944|        m_lineEndingSymbol = '\r';
  278|    944|      }
  279|    958|    }
  280|   125M|  }
  281|       |
  282|   242M|  if (ch == m_lineEndingSymbol) {
  ------------------
  |  Branch (282:7): [True: 9.82M, False: 232M]
  ------------------
  283|  9.82M|    m_mark.column = 0;
  284|  9.82M|    m_mark.line++;
  285|  9.82M|  }
  286|       |
  287|   242M|  return ch;
  288|   242M|}
_ZN4YAML6Stream3getEi:
  292|  11.8M|std::string Stream::get(int n) {
  293|  11.8M|  std::string ret;
  294|  11.8M|  if (n > 0) {
  ------------------
  |  Branch (294:7): [True: 11.8M, False: 0]
  ------------------
  295|  11.8M|    ret.reserve(static_cast<std::string::size_type>(n));
  296|  23.7M|    for (int i = 0; i < n; i++)
  ------------------
  |  Branch (296:21): [True: 11.8M, False: 11.8M]
  ------------------
  297|  11.8M|      ret += get();
  298|  11.8M|  }
  299|  11.8M|  return ret;
  300|  11.8M|}
_ZN4YAML6Stream3eatEi:
  304|  45.0M|void Stream::eat(int n) {
  305|  91.2M|  for (int i = 0; i < n; i++)
  ------------------
  |  Branch (305:19): [True: 46.1M, False: 45.0M]
  ------------------
  306|  46.1M|    get();
  307|  45.0M|}
_ZN4YAML6Stream14AdvanceCurrentEv:
  309|   242M|void Stream::AdvanceCurrent() {
  310|   242M|  if (!m_readahead.empty()) {
  ------------------
  |  Branch (310:7): [True: 242M, False: 0]
  ------------------
  311|   242M|    m_readahead.pop_front();
  312|   242M|    m_mark.pos++;
  313|   242M|  }
  314|       |
  315|   242M|  ReadAheadTo(0);
  316|   242M|}
_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.50k]
  |  Branch (319:28): [True: 153M, False: 153M]
  ------------------
  320|   153M|    switch (m_charSet) {
  ------------------
  |  Branch (320:13): [True: 153M, False: 0]
  ------------------
  321|   135M|      case utf8:
  ------------------
  |  Branch (321:7): [True: 135M, False: 18.0M]
  ------------------
  322|   135M|        StreamInUtf8();
  323|   135M|        break;
  324|  8.59M|      case utf16le:
  ------------------
  |  Branch (324:7): [True: 8.59M, False: 145M]
  ------------------
  325|  8.59M|        StreamInUtf16();
  326|  8.59M|        break;
  327|  7.22M|      case utf16be:
  ------------------
  |  Branch (327:7): [True: 7.22M, False: 146M]
  ------------------
  328|  7.22M|        StreamInUtf16();
  329|  7.22M|        break;
  330|  1.30M|      case utf32le:
  ------------------
  |  Branch (330:7): [True: 1.30M, False: 152M]
  ------------------
  331|  1.30M|        StreamInUtf32();
  332|  1.30M|        break;
  333|   932k|      case utf32be:
  ------------------
  |  Branch (333:7): [True: 932k, False: 152M]
  ------------------
  334|   932k|        StreamInUtf32();
  335|   932k|        break;
  336|   153M|    }
  337|   153M|  }
  338|       |
  339|       |  // signal end of stream
  340|   153M|  if (!m_input.good())
  ------------------
  |  Branch (340:7): [True: 6.50k, False: 153M]
  ------------------
  341|  6.50k|    m_readahead.push_back(Stream::eof());
  342|       |
  343|   153M|  return m_readahead.size() > i;
  344|   153M|}
_ZNK4YAML6Stream12StreamInUtf8Ev:
  346|   135M|void Stream::StreamInUtf8() const {
  347|   135M|  unsigned char b = GetNextByte();
  348|   135M|  if (m_input.good()) {
  ------------------
  |  Branch (348:7): [True: 135M, False: 4.74k]
  ------------------
  349|   135M|    m_readahead.push_back(static_cast<char>(b));
  350|   135M|  }
  351|   135M|}
_ZNK4YAML6Stream13StreamInUtf16Ev:
  353|  15.8M|void Stream::StreamInUtf16() const {
  354|  15.8M|  unsigned long ch = 0;
  355|  15.8M|  unsigned char bytes[2];
  356|  15.8M|  int nBigEnd = (m_charSet == utf16be) ? 0 : 1;
  ------------------
  |  Branch (356:17): [True: 7.22M, False: 8.59M]
  ------------------
  357|       |
  358|  15.8M|  bytes[0] = GetNextByte();
  359|  15.8M|  bytes[1] = GetNextByte();
  360|  15.8M|  if (!m_input.good()) {
  ------------------
  |  Branch (360:7): [True: 806, False: 15.8M]
  ------------------
  361|    806|    return;
  362|    806|  }
  363|  15.8M|  ch = (static_cast<unsigned long>(bytes[nBigEnd]) << 8) |
  364|  15.8M|       static_cast<unsigned long>(bytes[1 ^ nBigEnd]);
  365|       |
  366|  15.8M|  if (ch >= 0xDC00 && ch < 0xE000) {
  ------------------
  |  Branch (366:7): [True: 129k, False: 15.6M]
  |  Branch (366:23): [True: 10.0k, False: 119k]
  ------------------
  367|       |    // Trailing (low) surrogate...ugh, wrong order
  368|  10.0k|    QueueUnicodeCodepoint(m_readahead, CP_REPLACEMENT_CHARACTER);
  ------------------
  |  |   12|  10.0k|#define CP_REPLACEMENT_CHARACTER (0xFFFD)
  ------------------
  369|  10.0k|    return;
  370|  10.0k|  }
  371|       |
  372|  15.8M|  if (ch >= 0xD800 && ch < 0xDC00) {
  ------------------
  |  Branch (372:7): [True: 140k, False: 15.6M]
  |  Branch (372:23): [True: 20.9k, False: 119k]
  ------------------
  373|       |    // ch is a leading (high) surrogate
  374|       |
  375|       |    // Four byte UTF-8 code point
  376|       |
  377|       |    // Read the trailing (low) surrogate
  378|  20.9M|    for (;;) {
  379|  20.9M|      bytes[0] = GetNextByte();
  380|  20.9M|      bytes[1] = GetNextByte();
  381|  20.9M|      if (!m_input.good()) {
  ------------------
  |  Branch (381:11): [True: 323, False: 20.9M]
  ------------------
  382|    323|        QueueUnicodeCodepoint(m_readahead, CP_REPLACEMENT_CHARACTER);
  ------------------
  |  |   12|    323|#define CP_REPLACEMENT_CHARACTER (0xFFFD)
  ------------------
  383|    323|        return;
  384|    323|      }
  385|  20.9M|      unsigned long chLow = (static_cast<unsigned long>(bytes[nBigEnd]) << 8) |
  386|  20.9M|                            static_cast<unsigned long>(bytes[1 ^ nBigEnd]);
  387|  20.9M|      if (chLow < 0xDC00 || chLow >= 0xE000) {
  ------------------
  |  Branch (387:11): [True: 20.8M, False: 4.10k]
  |  Branch (387:29): [True: 2.53k, False: 1.56k]
  ------------------
  388|       |        // Trouble...not a low surrogate.  Dump a REPLACEMENT CHARACTER into the
  389|       |        // stream.
  390|  20.9M|        QueueUnicodeCodepoint(m_readahead, CP_REPLACEMENT_CHARACTER);
  ------------------
  |  |   12|  20.9M|#define CP_REPLACEMENT_CHARACTER (0xFFFD)
  ------------------
  391|       |
  392|       |        // Deal with the next UTF-16 unit
  393|  20.9M|        if (chLow < 0xD800 || chLow >= 0xE000) {
  ------------------
  |  Branch (393:13): [True: 16.4k, False: 20.8M]
  |  Branch (393:31): [True: 2.53k, False: 20.8M]
  ------------------
  394|       |          // Easiest case: queue the codepoint and return
  395|  19.0k|          QueueUnicodeCodepoint(m_readahead, ch);
  396|  19.0k|          return;
  397|  19.0k|        }
  398|       |        // Start the loop over with the new high surrogate
  399|  20.8M|        ch = chLow;
  400|  20.8M|        continue;
  401|  20.9M|      }
  402|       |
  403|       |      // Select the payload bits from the high surrogate
  404|  1.56k|      ch &= 0x3FF;
  405|  1.56k|      ch <<= 10;
  406|       |
  407|       |      // Include bits from low surrogate
  408|  1.56k|      ch |= (chLow & 0x3FF);
  409|       |
  410|       |      // Add the surrogacy offset
  411|  1.56k|      ch += 0x10000;
  412|  1.56k|      break;
  413|  20.9M|    }
  414|  20.9k|  }
  415|       |
  416|  15.7M|  QueueUnicodeCodepoint(m_readahead, ch);
  417|  15.7M|}
_ZNK4YAML6Stream11GetNextByteEv:
  423|   218M|unsigned char Stream::GetNextByte() const {
  424|   218M|  if (m_nPrefetchedUsed >= m_nPrefetchedAvailable) {
  ------------------
  |  Branch (424:7): [True: 119k, False: 218M]
  ------------------
  425|   119k|    std::streambuf* pBuf = m_input.rdbuf();
  426|   119k|    m_nPrefetchedAvailable = static_cast<std::size_t>(
  427|   119k|        pBuf->sgetn(ReadBuffer(m_pPrefetched), YAML_PREFETCH_SIZE));
  ------------------
  |  |    6|   119k|#define YAML_PREFETCH_SIZE 2048
  ------------------
  428|   119k|    m_nPrefetchedUsed = 0;
  429|   119k|    if (!m_nPrefetchedAvailable) {
  ------------------
  |  Branch (429:9): [True: 7.12k, False: 111k]
  ------------------
  430|  7.12k|      m_input.setstate(std::ios_base::eofbit);
  431|  7.12k|    }
  432|       |
  433|   119k|    if (0 == m_nPrefetchedAvailable) {
  ------------------
  |  Branch (433:9): [True: 7.12k, False: 111k]
  ------------------
  434|  7.12k|      return 0;
  435|  7.12k|    }
  436|   119k|  }
  437|       |
  438|   218M|  return m_pPrefetched[m_nPrefetchedUsed++];
  439|   218M|}
_ZNK4YAML6Stream13StreamInUtf32Ev:
  441|  2.23M|void Stream::StreamInUtf32() const {
  442|  2.23M|  static int indexes[2][4] = {{3, 2, 1, 0}, {0, 1, 2, 3}};
  443|       |
  444|  2.23M|  unsigned long ch = 0;
  445|  2.23M|  unsigned char bytes[4];
  446|  2.23M|  int* pIndexes = (m_charSet == utf32be) ? indexes[1] : indexes[0];
  ------------------
  |  Branch (446:19): [True: 932k, False: 1.30M]
  ------------------
  447|       |
  448|  2.23M|  bytes[0] = GetNextByte();
  449|  2.23M|  bytes[1] = GetNextByte();
  450|  2.23M|  bytes[2] = GetNextByte();
  451|  2.23M|  bytes[3] = GetNextByte();
  452|  2.23M|  if (!m_input.good()) {
  ------------------
  |  Branch (452:7): [True: 129, False: 2.23M]
  ------------------
  453|    129|    return;
  454|    129|  }
  455|       |
  456|  11.1M|  for (int i = 0; i < 4; ++i) {
  ------------------
  |  Branch (456:19): [True: 8.94M, False: 2.23M]
  ------------------
  457|  8.94M|    ch <<= 8;
  458|  8.94M|    ch |= bytes[pIndexes[i]];
  459|  8.94M|  }
  460|       |
  461|  2.23M|  QueueUnicodeCodepoint(m_readahead, ch);
  462|  2.23M|}
_ZN4YAML15IntroCharTypeOfEi:
  125|  13.6k|inline UtfIntroCharType IntroCharTypeOf(std::istream::int_type ch) {
  126|  13.6k|  if (std::istream::traits_type::eof() == ch) {
  ------------------
  |  Branch (126:7): [True: 91, False: 13.5k]
  ------------------
  127|     91|    return uictOther;
  128|     91|  }
  129|       |
  130|  13.5k|  switch (ch) {
  ------------------
  |  Branch (130:11): [True: 2.19k, False: 11.3k]
  ------------------
  131|  1.84k|    case 0:
  ------------------
  |  Branch (131:5): [True: 1.84k, False: 11.7k]
  ------------------
  132|  1.84k|      return uict00;
  133|     13|    case 0xBB:
  ------------------
  |  Branch (133:5): [True: 13, False: 13.5k]
  ------------------
  134|     13|      return uictBB;
  135|      8|    case 0xBF:
  ------------------
  |  Branch (135:5): [True: 8, False: 13.5k]
  ------------------
  136|      8|      return uictBF;
  137|     97|    case 0xEF:
  ------------------
  |  Branch (137:5): [True: 97, False: 13.4k]
  ------------------
  138|     97|      return uictEF;
  139|     46|    case 0xFE:
  ------------------
  |  Branch (139:5): [True: 46, False: 13.5k]
  ------------------
  140|     46|      return uictFE;
  141|    190|    case 0xFF:
  ------------------
  |  Branch (141:5): [True: 190, False: 13.4k]
  ------------------
  142|    190|      return uictFF;
  143|  13.5k|  }
  144|       |
  145|  11.3k|  if ((ch > 0) && (ch < 0xFF)) {
  ------------------
  |  Branch (145:7): [True: 11.3k, False: 0]
  |  Branch (145:19): [True: 11.3k, False: 0]
  ------------------
  146|  11.3k|    return uictAscii;
  147|  11.3k|  }
  148|       |
  149|      0|  return uictOther;
  150|  11.3k|}
_ZN4YAML21QueueUnicodeCodepointERNSt3__15dequeIcNS0_9allocatorIcEEEEm:
  161|  38.9M|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|  38.9M|  if (static_cast<unsigned long>(Stream::eof()) == ch) {
  ------------------
  |  Branch (164:7): [True: 1.07k, False: 38.9M]
  ------------------
  165|  1.07k|    ch = CP_REPLACEMENT_CHARACTER;
  ------------------
  |  |   12|  1.07k|#define CP_REPLACEMENT_CHARACTER (0xFFFD)
  ------------------
  166|  1.07k|  }
  167|       |
  168|  38.9M|  if (ch < 0x80) {
  ------------------
  |  Branch (168:7): [True: 1.13M, False: 37.8M]
  ------------------
  169|  1.13M|    q.push_back(Utf8Adjust(ch, 0, 0));
  170|  37.8M|  } else if (ch < 0x800) {
  ------------------
  |  Branch (170:14): [True: 831k, False: 36.9M]
  ------------------
  171|   831k|    q.push_back(Utf8Adjust(ch, 2, 6));
  172|   831k|    q.push_back(Utf8Adjust(ch, 1, 0));
  173|  36.9M|  } else if (ch < 0x10000) {
  ------------------
  |  Branch (173:14): [True: 34.8M, False: 2.14M]
  ------------------
  174|  34.8M|    q.push_back(Utf8Adjust(ch, 3, 12));
  175|  34.8M|    q.push_back(Utf8Adjust(ch, 1, 6));
  176|  34.8M|    q.push_back(Utf8Adjust(ch, 1, 0));
  177|  34.8M|  } else {
  178|  2.14M|    q.push_back(Utf8Adjust(ch, 4, 18));
  179|  2.14M|    q.push_back(Utf8Adjust(ch, 1, 12));
  180|  2.14M|    q.push_back(Utf8Adjust(ch, 1, 6));
  181|  2.14M|    q.push_back(Utf8Adjust(ch, 1, 0));
  182|  2.14M|  }
  183|  38.9M|}
_ZN4YAML10Utf8AdjustEmhh:
  153|   115M|                       unsigned char rshift) {
  154|   115M|  const unsigned char header =
  155|   115M|      static_cast<unsigned char>(((1 << lead_bits) - 1) << (8 - lead_bits));
  156|   115M|  const unsigned char mask = (0xFF >> (lead_bits + 1));
  157|   115M|  return static_cast<char>(
  158|   115M|      static_cast<unsigned char>(header | ((ch >> rshift) & mask)));
  159|   115M|}
_ZN4YAML10ReadBufferEPh:
  419|   119k|inline char* ReadBuffer(unsigned char* pBuffer) {
  420|   119k|  return reinterpret_cast<char*>(pBuffer);
  421|   119k|}

_ZNK4YAML6StreamntEv:
   34|   156M|  bool operator!() const { return !static_cast<bool>(*this); }
_ZN4YAML6Stream3eofEv:
   41|  80.1M|  static char eof() { return 0x04; }
_ZNK4YAML6Stream4markEv:
   43|   172M|  const Mark mark() const { return m_mark; }
_ZNK4YAML6Stream3posEv:
   44|  2.22M|  int pos() const { return m_mark.pos; }
_ZNK4YAML6Stream4lineEv:
   45|  2.27M|  int line() const { return m_mark.line; }
_ZNK4YAML6Stream6columnEv:
   46|   306M|  int column() const { return m_mark.column; }
_ZN4YAML6Stream11ResetColumnEv:
   47|  4.84k|  void ResetColumn() { m_mark.column = 0; }
_ZNK4YAML6Stream6CharAtEm:
   74|  1.96G|inline char Stream::CharAt(size_t i) const { return m_readahead[i]; }
_ZNK4YAML6Stream11ReadAheadToEm:
   76|  1.42G|inline bool Stream::ReadAheadTo(size_t i) const {
   77|  1.42G|  if (m_readahead.size() > i)
  ------------------
  |  Branch (77:7): [True: 1.27G, False: 153M]
  ------------------
   78|  1.27G|    return true;
   79|   153M|  return _ReadAheadTo(i);
   80|  1.42G|}

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

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

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

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

