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

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

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

_ZN4YAML9ExceptionC2ERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  172|  3.44k|      : std::runtime_error(build_what(mark_, msg_)), mark(mark_), msg(msg_) {}
_ZN4YAML9Exception10build_whatERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  182|  3.44k|                                      const std::string& msg) {
  183|  3.44k|    if (mark.is_null()) {
  ------------------
  |  Branch (183:9): [True: 0, False: 3.44k]
  ------------------
  184|      0|      return msg;
  185|      0|    }
  186|       |
  187|  3.44k|    std::stringstream output;
  188|  3.44k|    output << "yaml-cpp: error at line " << mark.line + 1 << ", column "
  189|  3.44k|           << mark.column + 1 << ": " << msg;
  190|  3.44k|    return output.str();
  191|  3.44k|  }
_ZN4YAML15ParserExceptionC2ERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  197|  3.40k|      : Exception(mark_, msg_) {}
_ZN4YAML23RepresentationExceptionC2ERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  205|     35|      : Exception(mark_, msg_) {}
_ZN4YAML15NonUniqueMapKeyC2INS_6detail4nodeEEERKNS_4MarkERKT_:
  329|     35|      : RepresentationException(mark_, ErrorMsg::NON_UNIQUE_MAP_KEY) {}

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

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

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

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

_ZN4YAML6detail8node_refC2Ev:
   28|  1.81M|  node_ref() : m_pData(std::make_shared<node_data>()) {}
_ZNK4YAML6detail8node_ref10is_definedEv:
   32|  4.90M|  bool is_defined() const { return m_pData->is_defined(); }
_ZNK4YAML6detail8node_ref4typeEv:
   34|  2.58M|  NodeType::value type() const { return m_pData->type(); }
_ZNK4YAML6detail8node_ref6scalarEv:
   35|   531k|  const std::string& scalar() const { return m_pData->scalar(); }
_ZN4YAML6detail8node_ref12mark_definedEv:
   39|  1.81M|  void mark_defined() { m_pData->mark_defined(); }
_ZN4YAML6detail8node_ref8set_markERKNS_4MarkE:
   42|  1.81M|  void set_mark(const Mark& mark) { m_pData->set_mark(mark); }
_ZN4YAML6detail8node_ref8set_typeENS_8NodeType5valueE:
   43|   154k|  void set_type(NodeType::value type) { m_pData->set_type(type); }
_ZN4YAML6detail8node_ref7set_tagERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   44|   463k|  void set_tag(const std::string& tag) { m_pData->set_tag(tag); }
_ZN4YAML6detail8node_ref8set_nullEv:
   45|  1.35M|  void set_null() { m_pData->set_null(); }
_ZN4YAML6detail8node_ref10set_scalarERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   46|   308k|  void set_scalar(const std::string& scalar) { m_pData->set_scalar(scalar); }
_ZN4YAML6detail8node_ref9set_styleENS_12EmitterStyle5valueE:
   47|   154k|  void set_style(EmitterStyle::value style) { m_pData->set_style(style); }
_ZN4YAML6detail8node_ref9push_backERNS0_4nodeENSt3__110shared_ptrINS0_13memory_holderEEE:
   63|   866k|  void push_back(node& node, shared_memory_holder pMemory) {
   64|   866k|    m_pData->push_back(node, pMemory);
   65|   866k|  }
_ZN4YAML6detail8node_ref6insertERNS0_4nodeES3_NSt3__110shared_ptrINS0_13memory_holderEEE:
   66|   123k|  void insert(node& key, node& value, shared_memory_holder pMemory) {
   67|   123k|    m_pData->insert(key, value, pMemory);
   68|   123k|  }

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

_ZN4YAML9ExceptionD2Ev:
   24|  3.44k|    #define YAML_CPP_NOEXCEPT noexcept

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

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

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

_ZN4YAML3Exp8ParseHexERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_4MarkE:
   13|  1.90k|unsigned ParseHex(const std::string& str, const Mark& mark) {
   14|  1.90k|  unsigned value = 0;
   15|  7.98k|  for (char ch : str) {
  ------------------
  |  Branch (15:16): [True: 7.98k, False: 1.82k]
  ------------------
   16|  7.98k|    int digit = 0;
   17|  7.98k|    if ('a' <= ch && ch <= 'f')
  ------------------
  |  Branch (17:9): [True: 1.34k, False: 6.63k]
  |  Branch (17:22): [True: 1.34k, False: 5]
  ------------------
   18|  1.34k|      digit = ch - 'a' + 10;
   19|  6.63k|    else if ('A' <= ch && ch <= 'F')
  ------------------
  |  Branch (19:14): [True: 2.06k, False: 4.57k]
  |  Branch (19:27): [True: 2.05k, False: 9]
  ------------------
   20|  2.05k|      digit = ch - 'A' + 10;
   21|  4.58k|    else if ('0' <= ch && ch <= '9')
  ------------------
  |  Branch (21:14): [True: 4.51k, False: 67]
  |  Branch (21:27): [True: 4.50k, False: 11]
  ------------------
   22|  4.50k|      digit = ch - '0';
   23|     78|    else
   24|     78|      throw ParserException(mark, ErrorMsg::INVALID_HEX);
   25|       |
   26|  7.90k|    value = (value << 4) + digit;
   27|  7.90k|  }
   28|       |
   29|  1.82k|  return value;
   30|  1.90k|}
_ZN4YAML3Exp3StrEj:
   32|  4.55k|std::string Str(unsigned ch) { return std::string(1, static_cast<char>(ch)); }
_ZN4YAML3Exp6EscapeERNS_6StreamEi:
   38|  1.90k|std::string Escape(Stream& in, int codeLength) {
   39|       |  // grab string
   40|  1.90k|  std::string str;
   41|  10.2k|  for (int i = 0; i < codeLength; i++)
  ------------------
  |  Branch (41:19): [True: 8.34k, False: 1.90k]
  ------------------
   42|  8.34k|    str += in.get();
   43|       |
   44|       |  // get the value
   45|  1.90k|  unsigned value = ParseHex(str, in.mark());
   46|       |
   47|       |  // legal unicode?
   48|  1.90k|  if ((value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF) {
  ------------------
  |  Branch (48:8): [True: 628, False: 1.27k]
  |  Branch (48:27): [True: 12, False: 616]
  |  Branch (48:47): [True: 40, False: 1.77k]
  ------------------
   49|     52|    std::stringstream msg;
   50|     52|    msg << ErrorMsg::INVALID_UNICODE << value;
   51|     52|    throw ParserException(in.mark(), msg.str());
   52|     52|  }
   53|       |
   54|       |  // now break it up into chars
   55|  1.85k|  if (value <= 0x7F)
  ------------------
  |  Branch (55:7): [True: 327, False: 1.52k]
  ------------------
   56|    327|    return Str(value);
   57|       |
   58|  1.52k|  if (value <= 0x7FF)
  ------------------
  |  Branch (58:7): [True: 431, False: 1.09k]
  ------------------
   59|    431|    return Str(0xC0 + (value >> 6)) + Str(0x80 + (value & 0x3F));
   60|       |
   61|  1.09k|  if (value <= 0xFFFF)
  ------------------
  |  Branch (61:7): [True: 704, False: 391]
  ------------------
   62|    704|    return Str(0xE0 + (value >> 12)) + Str(0x80 + ((value >> 6) & 0x3F)) +
   63|    704|           Str(0x80 + (value & 0x3F));
   64|       |
   65|    391|  return Str(0xF0 + (value >> 18)) + Str(0x80 + ((value >> 12) & 0x3F)) +
   66|    391|         Str(0x80 + ((value >> 6) & 0x3F)) + Str(0x80 + (value & 0x3F));
   67|  1.09k|}
_ZN4YAML3Exp6EscapeERNS_6StreamE:
   74|  41.3k|std::string Escape(Stream& in) {
   75|       |  // eat slash
   76|  41.3k|  char escape = in.get();
   77|       |
   78|       |  // switch on escape character
   79|  41.3k|  char ch = in.get();
   80|       |
   81|       |  // first do single quote, since it's easier
   82|  41.3k|  if (escape == '\'' && ch == '\'')
  ------------------
  |  Branch (82:7): [True: 701, False: 40.6k]
  |  Branch (82:25): [True: 701, False: 0]
  ------------------
   83|    701|    return "\'";
   84|       |
   85|       |  // now do the slash (we're not gonna check if it's a slash - you better pass
   86|       |  // one!)
   87|  40.6k|  switch (ch) {
  ------------------
  |  Branch (87:11): [True: 40.4k, False: 218]
  ------------------
   88|    712|    case '0':
  ------------------
  |  Branch (88:5): [True: 712, False: 39.9k]
  ------------------
   89|    712|      return std::string(1, '\x00');
   90|    210|    case 'a':
  ------------------
  |  Branch (90:5): [True: 210, False: 40.4k]
  ------------------
   91|    210|      return "\x07";
   92|    963|    case 'b':
  ------------------
  |  Branch (92:5): [True: 963, False: 39.6k]
  ------------------
   93|    963|      return "\x08";
   94|    626|    case 't':
  ------------------
  |  Branch (94:5): [True: 626, False: 40.0k]
  ------------------
   95|  5.00k|    case '\t':
  ------------------
  |  Branch (95:5): [True: 4.37k, False: 36.2k]
  ------------------
   96|  5.00k|      return "\x09";
   97|  8.05k|    case 'n':
  ------------------
  |  Branch (97:5): [True: 8.05k, False: 32.5k]
  ------------------
   98|  8.05k|      return "\x0A";
   99|    372|    case 'v':
  ------------------
  |  Branch (99:5): [True: 372, False: 40.2k]
  ------------------
  100|    372|      return "\x0B";
  101|    352|    case 'f':
  ------------------
  |  Branch (101:5): [True: 352, False: 40.2k]
  ------------------
  102|    352|      return "\x0C";
  103|    218|    case 'r':
  ------------------
  |  Branch (103:5): [True: 218, False: 40.4k]
  ------------------
  104|    218|      return "\x0D";
  105|    467|    case 'e':
  ------------------
  |  Branch (105:5): [True: 467, False: 40.1k]
  ------------------
  106|    467|      return "\x1B";
  107|    457|    case ' ':
  ------------------
  |  Branch (107:5): [True: 457, False: 40.1k]
  ------------------
  108|    457|      return R"( )";
  109|  6.17k|    case '\"':
  ------------------
  |  Branch (109:5): [True: 6.17k, False: 34.4k]
  ------------------
  110|  6.17k|      return "\"";
  111|    177|    case '\'':
  ------------------
  |  Branch (111:5): [True: 177, False: 40.4k]
  ------------------
  112|    177|      return "\'";
  113|    756|    case '\\':
  ------------------
  |  Branch (113:5): [True: 756, False: 39.8k]
  ------------------
  114|    756|      return "\\";
  115|  2.42k|    case '/':
  ------------------
  |  Branch (115:5): [True: 2.42k, False: 38.2k]
  ------------------
  116|  2.42k|      return "/";
  117|    500|    case 'N':
  ------------------
  |  Branch (117:5): [True: 500, False: 40.1k]
  ------------------
  118|    500|      return "\xC2\x85";      // NEL (U+0085)
  119|    238|    case '_':
  ------------------
  |  Branch (119:5): [True: 238, False: 40.3k]
  ------------------
  120|    238|      return "\xC2\xA0";      // NBSP (U+00A0)
  121|  9.93k|    case 'L':
  ------------------
  |  Branch (121:5): [True: 9.93k, False: 30.7k]
  ------------------
  122|  9.93k|      return "\xE2\x80\xA8";  // LS (U+2028)
  123|  1.50k|    case 'P':
  ------------------
  |  Branch (123:5): [True: 1.50k, False: 39.1k]
  ------------------
  124|  1.50k|      return "\xE2\x80\xA9";  // PS (U+2029)
  125|    728|    case 'x':
  ------------------
  |  Branch (125:5): [True: 728, False: 39.9k]
  ------------------
  126|    728|      return Escape(in, 2);
  127|    633|    case 'u':
  ------------------
  |  Branch (127:5): [True: 633, False: 40.0k]
  ------------------
  128|    633|      return Escape(in, 4);
  129|    544|    case 'U':
  ------------------
  |  Branch (129:5): [True: 544, False: 40.0k]
  ------------------
  130|    544|      return Escape(in, 8);
  131|  40.6k|  }
  132|       |
  133|    218|  std::stringstream msg;
  134|    218|  throw ParserException(in.mark(), std::string(ErrorMsg::INVALID_ESCAPE) + ch);
  135|  40.6k|}

_ZN4YAML3Exp8DocStartEv:
   84|  2.23M|inline const RegEx& DocStart() {
   85|  2.23M|  static const RegEx e = RegEx("---") + (BlankOrBreak() | RegEx());
   86|  2.23M|  return e;
   87|  2.23M|}
_ZN4YAML3Exp12BlankOrBreakEv:
   43|  30.5M|inline const RegEx& BlankOrBreak() {
   44|  30.5M|  static const RegEx e = Blank() | Break();
   45|  30.5M|  return e;
   46|  30.5M|}
_ZN4YAML3Exp5BlankEv:
   35|  29.7M|inline const RegEx& Blank() {
   36|  29.7M|  static const RegEx e = Space() | Tab();
   37|  29.7M|  return e;
   38|  29.7M|}
_ZN4YAML3Exp5SpaceEv:
   27|      1|inline const RegEx& Space() {
   28|      1|  static const RegEx e = RegEx(' ');
   29|      1|  return e;
   30|      1|}
_ZN4YAML3Exp6DocEndEv:
   88|  1.93M|inline const RegEx& DocEnd() {
   89|  1.93M|  static const RegEx e = RegEx("...") + (BlankOrBreak() | RegEx());
   90|  1.93M|  return e;
   91|  1.93M|}
_ZN4YAML3Exp10BlockEntryEv:
   96|  9.90M|inline const RegEx& BlockEntry() {
   97|  9.90M|  static const RegEx e = RegEx('-') + (BlankOrBreak() | RegEx());
   98|  9.90M|  return e;
   99|  9.90M|}
_ZN4YAML3Exp3KeyEv:
  100|  7.17M|inline const RegEx& Key() {
  101|  7.17M|  static const RegEx e = RegEx('?') + BlankOrBreak();
  102|  7.17M|  return e;
  103|  7.17M|}
_ZN4YAML3Exp9KeyInFlowEv:
  104|   975k|inline const RegEx& KeyInFlow() {
  105|   975k|  static const RegEx e = RegEx('?') + BlankOrBreak();
  106|   975k|  return e;
  107|   975k|}
_ZN4YAML3Exp11PlainScalarEv:
  153|  1.03M|inline const RegEx& PlainScalar() {
  154|  1.03M|  static const RegEx e =
  155|  1.03M|      !(BlankOrBreak() | RegEx(",[]{}#&*!|>\'\"%@`", REGEX_OR) |
  156|  1.03M|        (RegEx("-?:", REGEX_OR) + (BlankOrBreak() | RegEx())));
  157|  1.03M|  return e;
  158|  1.03M|}
_ZN4YAML3Exp17PlainScalarInFlowEv:
  159|   914k|inline const RegEx& PlainScalarInFlow() {
  160|   914k|  static const RegEx e =
  161|   914k|      !(BlankOrBreak() | RegEx("?,[]{}#&*!|>\'\"%@`", REGEX_OR) |
  162|   914k|        (RegEx("-:", REGEX_OR) + (Blank() | RegEx())));
  163|   914k|  return e;
  164|   914k|}
_ZN4YAML3Exp3TabEv:
   31|   148k|inline const RegEx& Tab() {
   32|   148k|  static const RegEx e = RegEx('\t');
   33|   148k|  return e;
   34|   148k|}
_ZN4YAML3Exp7CommentEv:
  124|  63.6M|inline const RegEx Comment() {
  125|  63.6M|  static const RegEx e = RegEx('#');
  126|  63.6M|  return e;
  127|  63.6M|}
_ZN4YAML3Exp5BreakEv:
   39|   199M|inline const RegEx& Break() {
   40|   199M|  static const RegEx e = RegEx('\n') | RegEx("\r\n") | RegEx('\r');
   41|   199M|  return e;
   42|   199M|}
_ZN4YAML3Exp5ValueEv:
  108|  7.16M|inline const RegEx& Value() {
  109|  7.16M|  static const RegEx e = RegEx(':') + (BlankOrBreak() | RegEx());
  110|  7.16M|  return e;
  111|  7.16M|}
_ZN4YAML3Exp15ValueInJSONFlowEv:
  116|  8.82k|inline const RegEx& ValueInJSONFlow() {
  117|  8.82k|  static const RegEx e = RegEx(':');
  118|  8.82k|  return e;
  119|  8.82k|}
_ZN4YAML3Exp11ValueInFlowEv:
  112|   946k|inline const RegEx& ValueInFlow() {
  113|   946k|  static const RegEx e = RegEx(':') + (BlankOrBreak() | RegEx(",]}", REGEX_OR));
  114|   946k|  return e;
  115|   946k|}
_ZN4YAML3Exp5EmptyEv:
   23|  5.70k|inline const RegEx& Empty() {
   24|  5.70k|  static const RegEx e;
   25|  5.70k|  return e;
   26|  5.70k|}
_ZN4YAML3Exp5DigitEv:
   47|    719|inline const RegEx& Digit() {
   48|    719|  static const RegEx e = RegEx('0', '9');
   49|    719|  return e;
   50|    719|}
_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|  8.30M|inline const RegEx& Word() {
   60|  8.30M|  static const RegEx e = AlphaNumeric() | RegEx('-');
   61|  8.30M|  return e;
   62|  8.30M|}
_ZN4YAML3Exp3HexEv:
   63|      4|inline const RegEx& Hex() {
   64|      4|  static const RegEx e = Digit() | RegEx('A', 'F') | RegEx('a', 'f');
   65|      4|  return e;
   66|      4|}
_ZN4YAML3Exp12DocIndicatorEv:
   92|  5.44M|inline const RegEx& DocIndicator() {
   93|  5.44M|  static const RegEx e = DocStart() | DocEnd();
   94|  5.44M|  return e;
   95|  5.44M|}
_ZN4YAML3Exp6AnchorEv:
  128|  29.4M|inline const RegEx& Anchor() {
  129|  29.4M|  static const RegEx e = !(RegEx("[]{},", REGEX_OR) | BlankOrBreak());
  130|  29.4M|  return e;
  131|  29.4M|}
_ZN4YAML3Exp9AnchorEndEv:
  132|  9.23k|inline const RegEx& AnchorEnd() {
  133|  9.23k|  static const RegEx e = RegEx("?:,]}%@`", REGEX_OR) | BlankOrBreak();
  134|  9.23k|  return e;
  135|  9.23k|}
_ZN4YAML3Exp3URIEv:
  136|  8.48k|inline const RegEx& URI() {
  137|  8.48k|  static const RegEx e = Word() | RegEx("#;/?:@&=+$,_.!~*'()[]", REGEX_OR) |
  138|  8.48k|                         (RegEx('%') + Hex() + Hex());
  139|  8.48k|  return e;
  140|  8.48k|}
_ZN4YAML3Exp3TagEv:
  141|  3.78M|inline const RegEx& Tag() {
  142|  3.78M|  static const RegEx e = Word() | RegEx("#;/?:@&=+$_.~*'()", REGEX_OR) |
  143|  3.78M|                         (RegEx('%') + Hex() + Hex());
  144|  3.78M|  return e;
  145|  3.78M|}
_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|   914k|inline const RegEx& ScanScalarEndInFlow() {
  177|   914k|  static const RegEx e = (EndScalarInFlow() | (BlankOrBreak() + Comment()));
  178|   914k|  return e;
  179|   914k|}
_ZN4YAML3Exp13ScanScalarEndEv:
  181|  1.03M|inline const RegEx& ScanScalarEnd() {
  182|  1.03M|  static const RegEx e = EndScalar() | (BlankOrBreak() + Comment());
  183|  1.03M|  return e;
  184|  1.03M|}
_ZN4YAML3Exp14EscSingleQuoteEv:
  185|  1.63k|inline const RegEx& EscSingleQuote() {
  186|  1.63k|  static const RegEx e = RegEx("\'\'");
  187|  1.63k|  return e;
  188|  1.63k|}
_ZN4YAML3Exp8EscBreakEv:
  189|  15.3M|inline const RegEx& EscBreak() {
  190|  15.3M|  static const RegEx e = RegEx('\\') + Break();
  191|  15.3M|  return e;
  192|  15.3M|}
_ZN4YAML3Exp14ChompIndicatorEv:
  194|      3|inline const RegEx& ChompIndicator() {
  195|      3|  static const RegEx e = RegEx("+-", REGEX_OR);
  196|      3|  return e;
  197|      3|}
_ZN4YAML3Exp5ChompEv:
  198|  5.75k|inline const RegEx& Chomp() {
  199|  5.75k|  static const RegEx e = (ChompIndicator() + Digit()) |
  200|  5.75k|                         (Digit() + ChompIndicator()) | ChompIndicator() |
  201|  5.75k|                         Digit();
  202|  5.75k|  return e;
  203|  5.75k|}

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

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

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

_ZN4YAML12IsNullStringEPKcm:
   13|   323k|bool IsNullString(const char* str, std::size_t size) {
   14|   323k|  return size == 0 || same(str, size, "~") || same(str, size, "null") ||
  ------------------
  |  Branch (14:10): [True: 0, False: 323k]
  |  Branch (14:23): [True: 19.5k, False: 303k]
  |  Branch (14:47): [True: 284, False: 303k]
  ------------------
   15|   303k|         same(str, size, "Null") || same(str, size, "NULL");
  ------------------
  |  Branch (15:10): [True: 205, False: 303k]
  |  Branch (15:37): [True: 19, False: 303k]
  ------------------
   16|   323k|}
null.cpp:_ZN4YAMLL4sameILm2EEEbPKcmRAT__S1_:
    8|   323k|static bool same(const char* str, std::size_t size, const char (&literal)[N]) {
    9|   323k|  constexpr int literalSize = N - 1; // minus null terminator
   10|   323k|  return size == literalSize && std::strncmp(str, literal, literalSize) == 0;
  ------------------
  |  Branch (10:10): [True: 299k, False: 23.6k]
  |  Branch (10:33): [True: 19.5k, False: 280k]
  ------------------
   11|   323k|}
null.cpp:_ZN4YAMLL4sameILm5EEEbPKcmRAT__S1_:
    8|   911k|static bool same(const char* str, std::size_t size, const char (&literal)[N]) {
    9|   911k|  constexpr int literalSize = N - 1; // minus null terminator
   10|   911k|  return size == literalSize && std::strncmp(str, literal, literalSize) == 0;
  ------------------
  |  Branch (10:10): [True: 15.2k, False: 895k]
  |  Branch (10:33): [True: 508, False: 14.7k]
  ------------------
   11|   911k|}

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

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

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

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

_ZNK4YAML5RegEx7MatchesERKNS_6StreamE:
   26|   482M|inline bool RegEx::Matches(const Stream& in) const { return Match(in) >= 0; }
_ZNK4YAML5RegEx5MatchERKNS_6StreamE:
   49|   529M|inline int RegEx::Match(const Stream& in) const {
   50|   529M|  StreamCharSource source(in);
   51|   529M|  return Match(source);
   52|   529M|}
_ZNK4YAML5RegEx5MatchINS_16StreamCharSourceEEEiRKT_:
   72|  1.11G|inline int RegEx::Match(const Source& source) const {
   73|  1.11G|  return IsValidSource(source) ? MatchUnchecked(source) : -1;
  ------------------
  |  Branch (73:10): [True: 1.11G, False: 0]
  ------------------
   74|  1.11G|}
_ZNK4YAML5RegEx13IsValidSourceINS_16StreamCharSourceEEEbRKT_:
   55|  1.11G|inline bool RegEx::IsValidSource(const Source& source) const {
   56|  1.11G|  return source;
   57|  1.11G|}
_ZNK4YAML5RegEx14MatchUncheckedINS_16StreamCharSourceEEEiRKT_:
   77|  3.58G|inline int RegEx::MatchUnchecked(const Source& source) const {
   78|  3.58G|  switch (m_op) {
  ------------------
  |  Branch (78:11): [True: 3.58G, False: 0]
  ------------------
   79|  16.5M|    case REGEX_EMPTY:
  ------------------
  |  Branch (79:5): [True: 16.5M, False: 3.56G]
  ------------------
   80|  16.5M|      return MatchOpEmpty(source);
   81|  1.82G|    case REGEX_MATCH:
  ------------------
  |  Branch (81:5): [True: 1.82G, False: 1.75G]
  ------------------
   82|  1.82G|      return MatchOpMatch(source);
   83|  24.5M|    case REGEX_RANGE:
  ------------------
  |  Branch (83:5): [True: 24.5M, False: 3.55G]
  ------------------
   84|  24.5M|      return MatchOpRange(source);
   85|  1.16G|    case REGEX_OR:
  ------------------
  |  Branch (85:5): [True: 1.16G, False: 2.41G]
  ------------------
   86|  1.16G|      return MatchOpOr(source);
   87|  17.0M|    case REGEX_AND:
  ------------------
  |  Branch (87:5): [True: 17.0M, False: 3.56G]
  ------------------
   88|  17.0M|      return MatchOpAnd(source);
   89|  31.3M|    case REGEX_NOT:
  ------------------
  |  Branch (89:5): [True: 31.3M, False: 3.54G]
  ------------------
   90|  31.3M|      return MatchOpNot(source);
   91|   505M|    case REGEX_SEQ:
  ------------------
  |  Branch (91:5): [True: 505M, False: 3.07G]
  ------------------
   92|   505M|      return MatchOpSeq(source);
   93|  3.58G|  }
   94|       |
   95|      0|  return -1;
   96|  3.58G|}
_ZNK4YAML5RegEx12MatchOpEmptyINS_16StreamCharSourceEEEiRKT_:
  106|  16.5M|inline int RegEx::MatchOpEmpty(const Source& source) const {
  107|  16.5M|  return source[0] == Stream::eof() ? 0 : -1;
  ------------------
  |  Branch (107:10): [True: 1.58M, False: 14.9M]
  ------------------
  108|  16.5M|}
_ZNK4YAML5RegEx12MatchOpMatchINS_16StreamCharSourceEEEiRKT_:
  119|  1.82G|inline int RegEx::MatchOpMatch(const Source& source) const {
  120|  1.82G|  if (source[0] != m_a)
  ------------------
  |  Branch (120:7): [True: 1.67G, False: 147M]
  ------------------
  121|  1.67G|    return -1;
  122|   147M|  return 1;
  123|  1.82G|}
_ZNK4YAML5RegEx12MatchOpRangeINS_16StreamCharSourceEEEiRKT_:
  127|  24.5M|inline int RegEx::MatchOpRange(const Source& source) const {
  128|  24.5M|  if (m_a > source[0] || m_z < source[0])
  ------------------
  |  Branch (128:7): [True: 18.5M, False: 6.03M]
  |  Branch (128:26): [True: 59.1k, False: 5.97M]
  ------------------
  129|  18.6M|    return -1;
  130|  5.97M|  return 1;
  131|  24.5M|}
_ZNK4YAML5RegEx9MatchOpOrINS_16StreamCharSourceEEEiRKT_:
  135|  1.16G|inline int RegEx::MatchOpOr(const Source& source) const {
  136|  2.41G|  for (const RegEx& param : m_params) {
  ------------------
  |  Branch (136:27): [True: 2.41G, False: 996M]
  ------------------
  137|  2.41G|    int n = param.MatchUnchecked(source);
  138|  2.41G|    if (n >= 0)
  ------------------
  |  Branch (138:9): [True: 167M, False: 2.25G]
  ------------------
  139|   167M|      return n;
  140|  2.41G|  }
  141|   996M|  return -1;
  142|  1.16G|}
_ZNK4YAML5RegEx10MatchOpAndINS_16StreamCharSourceEEEiRKT_:
  149|  17.0M|inline int RegEx::MatchOpAnd(const Source& source) const {
  150|  17.0M|  int first = -1;
  151|  17.0M|  for (std::size_t i = 0; i < m_params.size(); i++) {
  ------------------
  |  Branch (151:27): [True: 17.0M, False: 2.97k]
  ------------------
  152|  17.0M|    int n = m_params[i].MatchUnchecked(source);
  153|  17.0M|    if (n == -1)
  ------------------
  |  Branch (153:9): [True: 16.9M, False: 6.65k]
  ------------------
  154|  16.9M|      return -1;
  155|  6.65k|    if (i == 0)
  ------------------
  |  Branch (155:9): [True: 3.67k, False: 2.97k]
  ------------------
  156|  3.67k|      first = n;
  157|  6.65k|  }
  158|  2.97k|  return first;
  159|  17.0M|}
_ZNK4YAML5RegEx10MatchOpNotINS_16StreamCharSourceEEEiRKT_:
  163|  31.3M|inline int RegEx::MatchOpNot(const Source& source) const {
  164|  31.3M|  if (m_params.empty())
  ------------------
  |  Branch (164:7): [True: 0, False: 31.3M]
  ------------------
  165|      0|    return -1;
  166|  31.3M|  if (m_params[0].MatchUnchecked(source) >= 0)
  ------------------
  |  Branch (166:7): [True: 9.98k, False: 31.3M]
  ------------------
  167|  9.98k|    return -1;
  168|  31.3M|  return 1;
  169|  31.3M|}
_ZNK4YAML5RegEx10MatchOpSeqINS_16StreamCharSourceEEEiRKT_:
  173|   505M|inline int RegEx::MatchOpSeq(const Source& source) const {
  174|   505M|  int offset = 0;
  175|   584M|  for (const RegEx& param : m_params) {
  ------------------
  |  Branch (175:27): [True: 584M, False: 9.04M]
  ------------------
  176|   584M|    int n = param.Match(source + offset);  // note Match, not
  177|       |                                           // MatchUnchecked because we
  178|       |                                           // need to check validity after
  179|       |                                           // the offset
  180|   584M|    if (n == -1)
  ------------------
  |  Branch (180:9): [True: 496M, False: 88.4M]
  ------------------
  181|   496M|      return -1;
  182|  88.4M|    offset += n;
  183|  88.4M|  }
  184|       |
  185|  9.04M|  return offset;
  186|   505M|}
_ZNK4YAML5RegEx7MatchesEc:
   16|    714|inline bool RegEx::Matches(char ch) const {
   17|    714|  std::string str;
   18|    714|  str += ch;
   19|    714|  return Matches(str);
   20|    714|}
_ZNK4YAML5RegEx7MatchesERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   22|    714|inline bool RegEx::Matches(const std::string& str) const {
   23|    714|  return Match(str) >= 0;
   24|    714|}
_ZNK4YAML5RegEx5MatchERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   44|    714|inline int RegEx::Match(const std::string& str) const {
   45|    714|  StringCharSource source(str.c_str(), str.size());
   46|    714|  return Match(source);
   47|    714|}
_ZNK4YAML5RegEx13IsValidSourceINS_16StringCharSourceEEEbRKT_:
   61|    714|    const StringCharSource& source) const {
   62|    714|  switch (m_op) {
   63|      0|    case REGEX_MATCH:
  ------------------
  |  Branch (63:5): [True: 0, False: 714]
  ------------------
   64|    714|    case REGEX_RANGE:
  ------------------
  |  Branch (64:5): [True: 714, False: 0]
  ------------------
   65|    714|      return source;
   66|      0|    default:
  ------------------
  |  Branch (66:5): [True: 0, False: 714]
  ------------------
   67|      0|      return true;
   68|    714|  }
   69|    714|}
_ZNK4YAML5RegEx5MatchINS_16StringCharSourceEEEiRKT_:
   72|    714|inline int RegEx::Match(const Source& source) const {
   73|    714|  return IsValidSource(source) ? MatchUnchecked(source) : -1;
  ------------------
  |  Branch (73:10): [True: 714, False: 0]
  ------------------
   74|    714|}
_ZNK4YAML5RegEx14MatchUncheckedINS_16StringCharSourceEEEiRKT_:
   77|    714|inline int RegEx::MatchUnchecked(const Source& source) const {
   78|    714|  switch (m_op) {
  ------------------
  |  Branch (78:11): [True: 714, False: 0]
  ------------------
   79|      0|    case REGEX_EMPTY:
  ------------------
  |  Branch (79:5): [True: 0, False: 714]
  ------------------
   80|      0|      return MatchOpEmpty(source);
   81|      0|    case REGEX_MATCH:
  ------------------
  |  Branch (81:5): [True: 0, False: 714]
  ------------------
   82|      0|      return MatchOpMatch(source);
   83|    714|    case REGEX_RANGE:
  ------------------
  |  Branch (83:5): [True: 714, False: 0]
  ------------------
   84|    714|      return MatchOpRange(source);
   85|      0|    case REGEX_OR:
  ------------------
  |  Branch (85:5): [True: 0, False: 714]
  ------------------
   86|      0|      return MatchOpOr(source);
   87|      0|    case REGEX_AND:
  ------------------
  |  Branch (87:5): [True: 0, False: 714]
  ------------------
   88|      0|      return MatchOpAnd(source);
   89|      0|    case REGEX_NOT:
  ------------------
  |  Branch (89:5): [True: 0, False: 714]
  ------------------
   90|      0|      return MatchOpNot(source);
   91|      0|    case REGEX_SEQ:
  ------------------
  |  Branch (91:5): [True: 0, False: 714]
  ------------------
   92|      0|      return MatchOpSeq(source);
   93|    714|  }
   94|       |
   95|      0|  return -1;
   96|    714|}
_ZNK4YAML5RegEx12MatchOpRangeINS_16StringCharSourceEEEiRKT_:
  127|    714|inline int RegEx::MatchOpRange(const Source& source) const {
  128|    714|  if (m_a > source[0] || m_z < source[0])
  ------------------
  |  Branch (128:7): [True: 0, False: 714]
  |  Branch (128:26): [True: 0, False: 714]
  ------------------
  129|      0|    return -1;
  130|    714|  return 1;
  131|    714|}

_ZN4YAML7ScannerC2ERNSt3__113basic_istreamIcNS1_11char_traitsIcEEEE:
   24|  6.10k|    : INPUT(in),
   25|  6.10k|      m_tokens{},
   26|  6.10k|      m_startedStream(false),
   27|  6.10k|      m_endedStream(false),
   28|  6.10k|      m_simpleKeyAllowed(false),
   29|  6.10k|      m_scalarValueAllowed(false),
   30|  6.10k|      m_canBeJSONFlow(false),
   31|  6.10k|      m_simpleKeys{},
   32|  6.10k|      m_indents{},
   33|  6.10k|      m_indentRefs{},
   34|  6.10k|      m_flows{} {}
_ZN4YAML7ScannerD2Ev:
   36|  6.10k|Scanner::~Scanner() = default;
_ZN4YAML7Scanner5emptyEv:
   38|  10.1M|bool Scanner::empty() {
   39|  10.1M|  EnsureTokensInQueue();
   40|  10.1M|  return m_tokens.empty();
   41|  10.1M|}
_ZN4YAML7Scanner3popEv:
   43|  2.22M|void Scanner::pop() {
   44|  2.22M|  EnsureTokensInQueue();
   45|  2.22M|  if (!m_tokens.empty())
  ------------------
  |  Branch (45:7): [True: 2.22M, False: 0]
  ------------------
   46|  2.22M|    m_tokens.pop();
   47|  2.22M|}
_ZN4YAML7Scanner4peekEv:
   49|  15.1M|Token& Scanner::peek() {
   50|  15.1M|  EnsureTokensInQueue();
   51|  15.1M|  assert(!m_tokens.empty());  // should we be asserting here? I mean, we really
   52|       |                              // just be checking
   53|       |                              // if it's empty before peeking.
   54|       |
   55|       |#if 0
   56|       |		static Token *pLast = 0;
   57|       |		if(pLast != &m_tokens.front())
   58|       |			std::cerr << "peek: " << m_tokens.front() << "\n";
   59|       |		pLast = &m_tokens.front();
   60|       |#endif
   61|       |
   62|  15.1M|  return m_tokens.front();
   63|  15.1M|}
_ZNK4YAML7Scanner4markEv:
   65|  1.66M|Mark Scanner::mark() const { return INPUT.mark(); }
_ZN4YAML7Scanner19EnsureTokensInQueueEv:
   67|  27.5M|void Scanner::EnsureTokensInQueue() {
   68|  83.2M|  while (true) {
  ------------------
  |  Branch (68:10): [True: 83.2M, Folded]
  ------------------
   69|  83.2M|    if (!m_tokens.empty()) {
  ------------------
  |  Branch (69:9): [True: 82.4M, False: 773k]
  ------------------
   70|  82.4M|      Token& token = m_tokens.front();
   71|       |
   72|       |      // if this guy's valid, then we're done
   73|  82.4M|      if (token.status == Token::VALID) {
  ------------------
  |  Branch (73:11): [True: 26.9M, False: 55.5M]
  ------------------
   74|  26.9M|        return;
   75|  26.9M|      }
   76|       |
   77|       |      // here's where we clean up the impossible tokens
   78|  55.5M|      if (token.status == Token::INVALID) {
  ------------------
  |  Branch (78:11): [True: 34.2k, False: 55.5M]
  ------------------
   79|  34.2k|        m_tokens.pop();
   80|  34.2k|        continue;
   81|  34.2k|      }
   82|       |
   83|       |      // note: what's left are the unverified tokens
   84|  55.5M|    }
   85|       |
   86|       |    // no token? maybe we've actually finished
   87|  56.2M|    if (m_endedStream) {
  ------------------
  |  Branch (87:9): [True: 594k, False: 55.6M]
  ------------------
   88|   594k|      return;
   89|   594k|    }
   90|       |
   91|       |    // no? then scan...
   92|  55.6M|    ScanNextToken();
   93|  55.6M|  }
   94|  27.5M|}
_ZN4YAML7Scanner13ScanNextTokenEv:
   96|  55.6M|void Scanner::ScanNextToken() {
   97|  55.6M|  if (m_endedStream) {
  ------------------
  |  Branch (97:7): [True: 0, False: 55.6M]
  ------------------
   98|      0|    return;
   99|      0|  }
  100|       |
  101|  55.6M|  if (!m_startedStream) {
  ------------------
  |  Branch (101:7): [True: 6.10k, False: 55.6M]
  ------------------
  102|  6.10k|    return StartStream();
  103|  6.10k|  }
  104|       |
  105|       |  // get rid of whitespace, etc. (in between tokens it should be irrelevant)
  106|  55.6M|  ScanToNextToken();
  107|       |
  108|       |  // maybe need to end some blocks
  109|  55.6M|  PopIndentToHere();
  110|       |
  111|       |  // *****
  112|       |  // And now branch based on the next few characters!
  113|       |  // *****
  114|       |
  115|       |  // end of stream
  116|  55.6M|  if (!INPUT) {
  ------------------
  |  Branch (116:7): [True: 5.03k, False: 55.6M]
  ------------------
  117|  5.03k|    return EndStream();
  118|  5.03k|  }
  119|       |
  120|  55.6M|  if (INPUT.column() == 0 && INPUT.peek() == Keys::Directive) {
  ------------------
  |  Branch (120:7): [True: 2.24M, False: 53.4M]
  |  Branch (120:30): [True: 13.5k, False: 2.23M]
  ------------------
  121|  13.5k|    return ScanDirective();
  122|  13.5k|  }
  123|       |
  124|       |  // document token
  125|  55.6M|  if (INPUT.column() == 0 && Exp::DocStart().Matches(INPUT)) {
  ------------------
  |  Branch (125:7): [True: 2.23M, False: 53.4M]
  |  Branch (125:30): [True: 295k, False: 1.93M]
  ------------------
  126|   295k|    return ScanDocStart();
  127|   295k|  }
  128|       |
  129|  55.3M|  if (INPUT.column() == 0 && Exp::DocEnd().Matches(INPUT)) {
  ------------------
  |  Branch (129:7): [True: 1.93M, False: 53.4M]
  |  Branch (129:30): [True: 329k, False: 1.60M]
  ------------------
  130|   329k|    return ScanDocEnd();
  131|   329k|  }
  132|       |
  133|       |  // flow start/end/entry
  134|  55.0M|  if (INPUT.peek() == Keys::FlowSeqStart ||
  ------------------
  |  Branch (134:7): [True: 28.0M, False: 26.9M]
  ------------------
  135|  43.2M|      INPUT.peek() == Keys::FlowMapStart) {
  ------------------
  |  Branch (135:7): [True: 15.2M, False: 11.7M]
  ------------------
  136|  43.2M|    return ScanFlowStart();
  137|  43.2M|  }
  138|       |
  139|  11.7M|  if (INPUT.peek() == Keys::FlowSeqEnd || INPUT.peek() == Keys::FlowMapEnd) {
  ------------------
  |  Branch (139:7): [True: 22.1k, False: 11.7M]
  |  Branch (139:43): [True: 832k, False: 10.8M]
  ------------------
  140|   855k|    return ScanFlowEnd();
  141|   855k|  }
  142|       |
  143|  10.8M|  if (INPUT.peek() == Keys::FlowEntry) {
  ------------------
  |  Branch (143:7): [True: 1.67M, False: 9.21M]
  ------------------
  144|       |    // values starting with `,` are not allowed.
  145|       |    // eg: reject `,foo`
  146|  1.67M|    if (INPUT.column() == 0) {
  ------------------
  |  Branch (146:9): [True: 13, False: 1.67M]
  ------------------
  147|     13|      throw ParserException(INPUT.mark(), ErrorMsg::UNEXPECTED_FLOW);
  148|     13|    }
  149|       |    // if we already parsed a quoted scalar value and we are not in a flow,
  150|       |    // then `,` is not a valid character.
  151|       |    // eg: reject `"foo",`
  152|  1.67M|    if (!m_scalarValueAllowed) {
  ------------------
  |  Branch (152:9): [True: 3, False: 1.67M]
  ------------------
  153|      3|      throw ParserException(INPUT.mark(), ErrorMsg::UNEXPECTED_SCALAR);
  154|      3|    }
  155|  1.67M|    return ScanFlowEntry();
  156|  1.67M|  }
  157|       |
  158|       |  // block/map stuff
  159|  9.21M|  if (Exp::BlockEntry().Matches(INPUT)) {
  ------------------
  |  Branch (159:7): [True: 1.05M, False: 8.15M]
  ------------------
  160|  1.05M|    return ScanBlockEntry();
  161|  1.05M|  }
  162|       |
  163|  8.15M|  if ((InBlockContext() ? Exp::Key() : Exp::KeyInFlow()).Matches(INPUT)) {
  ------------------
  |  Branch (163:7): [True: 29.6k, False: 8.12M]
  |  Branch (163:8): [True: 7.17M, False: 975k]
  ------------------
  164|  29.6k|    return ScanKey();
  165|  29.6k|  }
  166|       |
  167|  8.12M|  if (GetValueRegex().Matches(INPUT)) {
  ------------------
  |  Branch (167:7): [True: 5.35M, False: 2.77M]
  ------------------
  168|  5.35M|    return ScanValue();
  169|  5.35M|  }
  170|       |
  171|       |  // alias/anchor
  172|  2.77M|  if (INPUT.peek() == Keys::Alias || INPUT.peek() == Keys::Anchor) {
  ------------------
  |  Branch (172:7): [True: 1.58k, False: 2.77M]
  |  Branch (172:38): [True: 8.31k, False: 2.76M]
  ------------------
  173|  9.89k|    return ScanAnchorOrAlias();
  174|  9.89k|  }
  175|       |
  176|       |  // tag
  177|  2.76M|  if (INPUT.peek() == Keys::Tag) {
  ------------------
  |  Branch (177:7): [True: 797k, False: 1.96M]
  ------------------
  178|   797k|    return ScanTag();
  179|   797k|  }
  180|       |
  181|       |  // special scalars
  182|  1.96M|  if (InBlockContext() && (INPUT.peek() == Keys::LiteralScalar ||
  ------------------
  |  Branch (182:7): [True: 1.04M, False: 920k]
  |  Branch (182:28): [True: 746, False: 1.04M]
  ------------------
  183|  1.04M|                           INPUT.peek() == Keys::FoldedScalar)) {
  ------------------
  |  Branch (183:28): [True: 5.00k, False: 1.03M]
  ------------------
  184|       |    // if we begin parsing a literal scalar with an unverified potential 
  185|       |    // simple key pushed, that may be a tag to the literal scalar, and
  186|       |    // should be removed to avoid wrong indentation limit
  187|       |    // eg:
  188|       |    // - !!str |
  189|       |    //  literal
  190|       |    //  scalar
  191|  5.75k|    if (!m_simpleKeys.empty() &&
  ------------------
  |  Branch (191:9): [True: 749, False: 5.00k]
  ------------------
  192|    749|      m_simpleKeys.top().pKey->status == Token::UNVERIFIED) {
  ------------------
  |  Branch (192:7): [True: 749, False: 0]
  ------------------
  193|       |      // if the top of the indents does not match the unverified simple key,
  194|       |      // just invalidate the simple key and do not pop indent to avoid crash.
  195|       |      // eg: an unverified key crossing lines, like issue #1475.
  196|    749|      if (m_simpleKeys.top().pIndent && !m_indents.empty() &&
  ------------------
  |  Branch (196:11): [True: 544, False: 205]
  |  Branch (196:41): [True: 544, False: 0]
  ------------------
  197|    544|          m_indents.top() == m_simpleKeys.top().pIndent) {
  ------------------
  |  Branch (197:11): [True: 333, False: 211]
  ------------------
  198|    333|        PopIndent();
  199|    416|      } else {
  200|    416|        InvalidateSimpleKey();
  201|    416|      }
  202|    749|    }
  203|  5.75k|    return ScanBlockScalar();
  204|  5.75k|  }
  205|       |
  206|       |  // if we already parsed a quoted scalar value in this line,
  207|       |  // another scalar value is an error.
  208|       |  // eg: reject `"foo" "bar"`
  209|  1.96M|  if (!m_scalarValueAllowed) {
  ------------------
  |  Branch (209:7): [True: 32, False: 1.96M]
  ------------------
  210|     32|    throw ParserException(INPUT.mark(), ErrorMsg::UNEXPECTED_SCALAR);
  211|     32|  }
  212|       |
  213|  1.96M|  if (INPUT.peek() == '\'' || INPUT.peek() == '\"') {
  ------------------
  |  Branch (213:7): [True: 1.63k, False: 1.95M]
  |  Branch (213:31): [True: 5.62k, False: 1.95M]
  ------------------
  214|  7.25k|    return ScanQuotedScalar();
  215|  7.25k|  }
  216|       |
  217|       |  // plain scalars
  218|  1.95M|  if ((InBlockContext() ? Exp::PlainScalar() : Exp::PlainScalarInFlow())
  ------------------
  |  Branch (218:7): [True: 1.95M, False: 43]
  |  Branch (218:8): [True: 1.03M, False: 914k]
  ------------------
  219|  1.95M|          .Matches(INPUT)) {
  220|  1.95M|    return ScanPlainScalar();
  221|  1.95M|  }
  222|       |
  223|       |  // don't know what it is!
  224|     43|  throw ParserException(INPUT.mark(), ErrorMsg::UNKNOWN_TOKEN);
  225|  1.95M|}
_ZN4YAML7Scanner15ScanToNextTokenEv:
  227|  55.6M|void Scanner::ScanToNextToken() {
  228|  62.5M|  while (true) {
  ------------------
  |  Branch (228:10): [True: 62.5M, Folded]
  ------------------
  229|       |    // first eat whitespace
  230|  62.7M|    while (INPUT && IsWhitespaceToBeEaten(INPUT.peek())) {
  ------------------
  |  Branch (230:12): [True: 62.6M, False: 4.97k]
  |  Branch (230:21): [True: 184k, False: 62.5M]
  ------------------
  231|   184k|      if (InBlockContext() && Exp::Tab().Matches(INPUT)) {
  ------------------
  |  Branch (231:11): [True: 148k, False: 36.3k]
  |  Branch (231:31): [True: 2.01k, False: 146k]
  ------------------
  232|  2.01k|        m_simpleKeyAllowed = false;
  233|  2.01k|      }
  234|   184k|      INPUT.eat(1);
  235|   184k|    }
  236|       |
  237|       |    // then eat a comment
  238|  62.5M|    if (Exp::Comment().Matches(INPUT)) {
  ------------------
  |  Branch (238:9): [True: 1.84k, False: 62.5M]
  ------------------
  239|       |      // eat until line break
  240|  5.23M|      while (INPUT && !Exp::Break().Matches(INPUT)) {
  ------------------
  |  Branch (240:14): [True: 5.22M, False: 62]
  |  Branch (240:23): [True: 5.22M, False: 1.78k]
  ------------------
  241|  5.22M|        INPUT.eat(1);
  242|  5.22M|      }
  243|  1.84k|    }
  244|       |
  245|       |    // if it's NOT a line break, then we're done!
  246|  62.5M|    if (!Exp::Break().Matches(INPUT)) {
  ------------------
  |  Branch (246:9): [True: 55.6M, False: 6.83M]
  ------------------
  247|  55.6M|      break;
  248|  55.6M|    }
  249|       |
  250|       |    // otherwise, let's eat the line break and keep going
  251|  6.83M|    int n = Exp::Break().Match(INPUT);
  252|  6.83M|    INPUT.eat(n);
  253|       |
  254|       |    // oh yeah, and let's get rid of that simple key
  255|  6.83M|    InvalidateSimpleKey();
  256|       |
  257|       |    // new line - we accept a scalar value now
  258|  6.83M|    m_scalarValueAllowed = true;
  259|       |
  260|       |    // new line - we may be able to accept a simple key now
  261|  6.83M|    if (InBlockContext()) {
  ------------------
  |  Branch (261:9): [True: 6.79M, False: 40.0k]
  ------------------
  262|  6.79M|      m_simpleKeyAllowed = true;
  263|  6.79M|    }
  264|  6.83M|  }
  265|  55.6M|}
_ZNK4YAML7Scanner13GetValueRegexEv:
  270|  8.12M|const RegEx& Scanner::GetValueRegex() const {
  271|  8.12M|  if (InBlockContext()) {
  ------------------
  |  Branch (271:7): [True: 7.16M, False: 955k]
  ------------------
  272|  7.16M|    return Exp::Value();
  273|  7.16M|  }
  274|       |
  275|   955k|  return m_canBeJSONFlow ? Exp::ValueInJSONFlow() : Exp::ValueInFlow();
  ------------------
  |  Branch (275:10): [True: 8.82k, False: 946k]
  ------------------
  276|  8.12M|}
_ZN4YAML7Scanner11StartStreamEv:
  278|  6.10k|void Scanner::StartStream() {
  279|  6.10k|  m_startedStream = true;
  280|  6.10k|  m_simpleKeyAllowed = true;
  281|  6.10k|  m_scalarValueAllowed = true;
  282|  6.10k|  std::unique_ptr<IndentMarker> pIndent(
  283|  6.10k|      new IndentMarker(-1, IndentMarker::NONE));
  284|  6.10k|  m_indentRefs.push_back(std::move(pIndent));
  285|  6.10k|  m_indents.push(&m_indentRefs.back());
  286|  6.10k|}
_ZN4YAML7Scanner9EndStreamEv:
  288|  5.03k|void Scanner::EndStream() {
  289|       |  // force newline
  290|  5.03k|  if (INPUT.column() > 0) {
  ------------------
  |  Branch (290:7): [True: 4.64k, False: 389]
  ------------------
  291|  4.64k|    INPUT.ResetColumn();
  292|  4.64k|  }
  293|       |
  294|  5.03k|  PopAllIndents();
  295|  5.03k|  PopAllSimpleKeys();
  296|       |
  297|  5.03k|  m_simpleKeyAllowed = false;
  298|  5.03k|  m_scalarValueAllowed = false;
  299|  5.03k|  m_endedStream = true;
  300|  5.03k|}
_ZN4YAML7Scanner9PushTokenENS_5Token4TYPEE:
  302|  7.71M|Token* Scanner::PushToken(Token::TYPE type) {
  303|  7.71M|  m_tokens.push(Token(type, INPUT.mark()));
  304|  7.71M|  return &m_tokens.back();
  305|  7.71M|}
_ZN4YAML7Scanner16GetStartTokenForENS0_12IndentMarker11INDENT_TYPEE:
  307|  7.71M|Token::TYPE Scanner::GetStartTokenFor(IndentMarker::INDENT_TYPE type) {
  308|  7.71M|  switch (type) {
  ------------------
  |  Branch (308:11): [True: 7.71M, False: 0]
  ------------------
  309|  1.05M|    case IndentMarker::SEQ:
  ------------------
  |  Branch (309:5): [True: 1.05M, False: 6.66M]
  ------------------
  310|  1.05M|      return Token::BLOCK_SEQ_START;
  311|  6.66M|    case IndentMarker::MAP:
  ------------------
  |  Branch (311:5): [True: 6.66M, False: 1.05M]
  ------------------
  312|  6.66M|      return Token::BLOCK_MAP_START;
  313|      0|    case IndentMarker::NONE:
  ------------------
  |  Branch (313:5): [True: 0, False: 7.71M]
  ------------------
  314|      0|      assert(false);
  315|      0|      break;
  316|  7.71M|  }
  317|  7.71M|  assert(false);
  318|      0|  throw std::runtime_error("yaml-cpp: internal error, invalid indent type");
  319|  7.71M|}
_ZN4YAML7Scanner12PushIndentToEiNS0_12IndentMarker11INDENT_TYPEE:
  322|  7.89M|                                             IndentMarker::INDENT_TYPE type) {
  323|       |  // are we in flow?
  324|  7.89M|  if (InFlowContext()) {
  ------------------
  |  Branch (324:7): [True: 0, False: 7.89M]
  ------------------
  325|      0|    return nullptr;
  326|      0|  }
  327|       |
  328|  7.89M|  std::unique_ptr<IndentMarker> pIndent(new IndentMarker(column, type));
  329|  7.89M|  IndentMarker& indent = *pIndent;
  330|  7.89M|  const IndentMarker& lastIndent = *m_indents.top();
  331|       |
  332|       |  // is this actually an indentation?
  333|  7.89M|  if (indent.column < lastIndent.column) {
  ------------------
  |  Branch (333:7): [True: 0, False: 7.89M]
  ------------------
  334|      0|    return nullptr;
  335|      0|  }
  336|  7.89M|  if (indent.column == lastIndent.column &&
  ------------------
  |  Branch (336:7): [True: 185k, False: 7.70M]
  ------------------
  337|   185k|      !(indent.type == IndentMarker::SEQ &&
  ------------------
  |  Branch (337:9): [True: 10.8k, False: 174k]
  ------------------
  338|   178k|        lastIndent.type == IndentMarker::MAP)) {
  ------------------
  |  Branch (338:9): [True: 6.83k, False: 4.00k]
  ------------------
  339|   178k|    return nullptr;
  340|   178k|  }
  341|       |
  342|       |  // push a start token
  343|  7.71M|  indent.pStartToken = PushToken(GetStartTokenFor(type));
  344|       |
  345|       |  // and then the indent
  346|  7.71M|  m_indents.push(&indent);
  347|  7.71M|  m_indentRefs.push_back(std::move(pIndent));
  348|  7.71M|  return &m_indentRefs.back();
  349|  7.89M|}
_ZN4YAML7Scanner15PopIndentToHereEv:
  351|  55.6M|void Scanner::PopIndentToHere() {
  352|       |  // are we in flow?
  353|  55.6M|  if (InFlowContext()) {
  ------------------
  |  Branch (353:7): [True: 46.8M, False: 8.84M]
  ------------------
  354|  46.8M|    return;
  355|  46.8M|  }
  356|       |
  357|       |  // now pop away
  358|  10.8M|  while (!m_indents.empty()) {
  ------------------
  |  Branch (358:10): [True: 10.8M, False: 0]
  ------------------
  359|  10.8M|    const IndentMarker& indent = *m_indents.top();
  360|  10.8M|    if (indent.column < INPUT.column()) {
  ------------------
  |  Branch (360:9): [True: 7.94M, False: 2.93M]
  ------------------
  361|  7.94M|      break;
  362|  7.94M|    }
  363|  2.93M|    if (indent.column == INPUT.column() &&
  ------------------
  |  Branch (363:9): [True: 1.59M, False: 1.34M]
  ------------------
  364|  1.59M|        !(indent.type == IndentMarker::SEQ &&
  ------------------
  |  Branch (364:11): [True: 694k, False: 902k]
  ------------------
  365|   906k|          !Exp::BlockEntry().Matches(INPUT))) {
  ------------------
  |  Branch (365:11): [True: 690k, False: 4.00k]
  ------------------
  366|   906k|      break;
  367|   906k|    }
  368|       |
  369|  2.03M|    PopIndent();
  370|  2.03M|  }
  371|       |
  372|  9.62M|  while (!m_indents.empty() &&
  ------------------
  |  Branch (372:10): [True: 9.62M, False: 0]
  ------------------
  373|  9.62M|         m_indents.top()->status == IndentMarker::INVALID) {
  ------------------
  |  Branch (373:10): [True: 774k, False: 8.84M]
  ------------------
  374|   774k|    PopIndent();
  375|   774k|  }
  376|  8.84M|}
_ZN4YAML7Scanner13PopAllIndentsEv:
  378|   643k|void Scanner::PopAllIndents() {
  379|       |  // are we in flow?
  380|   643k|  if (InFlowContext()) {
  ------------------
  |  Branch (380:7): [True: 38.3k, False: 605k]
  ------------------
  381|  38.3k|    return;
  382|  38.3k|  }
  383|       |
  384|       |  // now pop away
  385|  3.10M|  while (!m_indents.empty()) {
  ------------------
  |  Branch (385:10): [True: 3.10M, False: 0]
  ------------------
  386|  3.10M|    const IndentMarker& indent = *m_indents.top();
  387|  3.10M|    if (indent.type == IndentMarker::NONE) {
  ------------------
  |  Branch (387:9): [True: 605k, False: 2.50M]
  ------------------
  388|   605k|      break;
  389|   605k|    }
  390|       |
  391|  2.50M|    PopIndent();
  392|  2.50M|  }
  393|   605k|}
_ZN4YAML7Scanner9PopIndentEv:
  395|  5.31M|void Scanner::PopIndent() {
  396|  5.31M|  if (m_indents.empty()) {
  ------------------
  |  Branch (396:7): [True: 0, False: 5.31M]
  ------------------
  397|      0|    ThrowParserException(ErrorMsg::INDENT_STACK_UNDERFLOW);
  398|      0|  }
  399|  5.31M|  const IndentMarker& indent = *m_indents.top();
  400|  5.31M|  m_indents.pop();
  401|       |
  402|  5.31M|  if (indent.status != IndentMarker::VALID) {
  ------------------
  |  Branch (402:7): [True: 1.47M, False: 3.83M]
  ------------------
  403|  1.47M|    InvalidateSimpleKey();
  404|  1.47M|    return;
  405|  1.47M|  }
  406|       |
  407|  3.83M|  if (indent.type == IndentMarker::SEQ) {
  ------------------
  |  Branch (407:7): [True: 872k, False: 2.96M]
  ------------------
  408|   872k|    m_tokens.push(Token(Token::BLOCK_SEQ_END, INPUT.mark()));
  409|  2.96M|  } else if (indent.type == IndentMarker::MAP) {
  ------------------
  |  Branch (409:14): [True: 2.96M, False: 0]
  ------------------
  410|  2.96M|    m_tokens.push(Token(Token::BLOCK_MAP_END, INPUT.mark()));
  411|  2.96M|  }
  412|  3.83M|}
_ZNK4YAML7Scanner12GetTopIndentEv:
  414|  1.04M|int Scanner::GetTopIndent() const {
  415|  1.04M|  if (m_indents.empty()) {
  ------------------
  |  Branch (415:7): [True: 0, False: 1.04M]
  ------------------
  416|      0|    return 0;
  417|      0|  }
  418|  1.04M|  return m_indents.top()->column;
  419|  1.04M|}
scanner.cpp:_ZN4YAML12_GLOBAL__N_121IsWhitespaceToBeEatenEc:
   20|  62.6M|bool IsWhitespaceToBeEaten(char ch) { return (ch == ' ') || (ch == '\t'); }
  ------------------
  |  Branch (20:46): [True: 158k, False: 62.5M]
  |  Branch (20:61): [True: 25.7k, False: 62.5M]
  ------------------

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

_ZN4YAML10ScanScalarERNS_6StreamERNS_16ScanScalarParamsE:
   21|  1.96M|std::string ScanScalar(Stream& INPUT, ScanScalarParams& params) {
   22|  1.96M|  bool foundNonEmptyLine = false;
   23|  1.96M|  bool pastOpeningBreak = (params.fold == FOLD_FLOW);
   24|  1.96M|  bool emptyLine = false, moreIndented = false;
   25|  1.96M|  int foldedNewlineCount = 0;
   26|  1.96M|  bool foldedNewlineStartedMoreIndented = false;
   27|  1.96M|  std::size_t lastEscapedChar = std::string::npos;
   28|  1.96M|  std::string scalar;
   29|  1.96M|  params.leadingSpaces = false;
   30|       |
   31|  1.96M|  if (!params.end) {
  ------------------
  |  Branch (31:7): [True: 5.70k, False: 1.96M]
  ------------------
   32|  5.70k|    params.end = &Exp::Empty();
   33|  5.70k|  }
   34|       |
   35|  14.9M|  while (INPUT) {
  ------------------
  |  Branch (35:10): [True: 14.9M, False: 856]
  ------------------
   36|       |    // ********************************
   37|       |    // Phase #1: scan until line ending
   38|       |
   39|  14.9M|    std::size_t lastNonWhitespaceChar = scalar.size();
   40|  14.9M|    bool escapedNewline = false;
   41|  96.2M|    while (!params.end->Matches(INPUT) && !Exp::Break().Matches(INPUT)) {
  ------------------
  |  Branch (41:12): [True: 95.3M, False: 956k]
  |  Branch (41:43): [True: 81.6M, False: 13.7M]
  ------------------
   42|  81.6M|      if (!INPUT) {
  ------------------
  |  Branch (42:11): [True: 1.65k, False: 81.6M]
  ------------------
   43|  1.65k|        break;
   44|  1.65k|      }
   45|       |
   46|       |      // document indicator?
   47|  81.6M|      if (INPUT.column() == 0 && Exp::DocIndicator().Matches(INPUT)) {
  ------------------
  |  Branch (47:11): [True: 418k, False: 81.1M]
  |  Branch (47:34): [True: 303k, False: 115k]
  ------------------
   48|   303k|        if (params.onDocIndicator == BREAK) {
  ------------------
  |  Branch (48:13): [True: 303k, False: 1]
  ------------------
   49|   303k|          break;
   50|   303k|        }
   51|      1|        if (params.onDocIndicator == THROW) {
  ------------------
  |  Branch (51:13): [True: 1, False: 0]
  ------------------
   52|      1|          throw ParserException(INPUT.mark(), ErrorMsg::DOC_IN_SCALAR);
   53|      1|        }
   54|      1|      }
   55|       |
   56|  81.3M|      foundNonEmptyLine = true;
   57|  81.3M|      pastOpeningBreak = true;
   58|       |
   59|       |      // escaped newline? (only if we're escaping on slash)
   60|  81.3M|      if (params.escape == '\\' && Exp::EscBreak().Matches(INPUT)) {
  ------------------
  |  Branch (60:11): [True: 15.3M, False: 65.9M]
  |  Branch (60:36): [True: 651, False: 15.3M]
  ------------------
   61|       |        // eat escape character and get out (but preserve trailing whitespace!)
   62|    651|        INPUT.get();
   63|    651|        lastNonWhitespaceChar = scalar.size();
   64|    651|        lastEscapedChar = scalar.size();
   65|    651|        escapedNewline = true;
   66|    651|        break;
   67|    651|      }
   68|       |
   69|       |      // escape this?
   70|  81.3M|      if (INPUT.peek() == params.escape) {
  ------------------
  |  Branch (70:11): [True: 41.3k, False: 81.2M]
  ------------------
   71|  41.3k|        scalar += Exp::Escape(INPUT);
   72|  41.3k|        lastNonWhitespaceChar = scalar.size();
   73|  41.3k|        lastEscapedChar = scalar.size();
   74|  41.3k|        continue;
   75|  41.3k|      }
   76|       |
   77|       |      // otherwise, just add the damn character
   78|  81.2M|      char ch = INPUT.get();
   79|  81.2M|      scalar += ch;
   80|  81.2M|      if (ch != ' ' && ch != '\t') {
  ------------------
  |  Branch (80:11): [True: 81.1M, False: 71.2k]
  |  Branch (80:24): [True: 79.7M, False: 1.47M]
  ------------------
   81|  79.7M|        lastNonWhitespaceChar = scalar.size();
   82|  79.7M|      }
   83|  81.2M|    }
   84|       |
   85|       |    // eof? if we're looking to eat something, then we throw
   86|  14.9M|    if (!INPUT) {
  ------------------
  |  Branch (86:9): [True: 1.71k, False: 14.9M]
  ------------------
   87|  1.71k|      if (params.eatEnd) {
  ------------------
  |  Branch (87:11): [True: 189, False: 1.52k]
  ------------------
   88|    189|        throw ParserException(INPUT.mark(), ErrorMsg::EOF_IN_SCALAR);
   89|    189|      }
   90|  1.52k|      break;
   91|  1.71k|    }
   92|       |
   93|       |    // doc indicator?
   94|  14.9M|    if (params.onDocIndicator == BREAK && INPUT.column() == 0 &&
  ------------------
  |  Branch (94:9): [True: 8.95M, False: 6.01M]
  |  Branch (94:43): [True: 5.02M, False: 3.92M]
  ------------------
   95|  5.02M|        Exp::DocIndicator().Matches(INPUT)) {
  ------------------
  |  Branch (95:9): [True: 303k, False: 4.72M]
  ------------------
   96|   303k|      break;
   97|   303k|    }
   98|       |
   99|       |    // are we done via character match?
  100|  14.6M|    int n = params.end->Match(INPUT);
  101|  14.6M|    if (n >= 0) {
  ------------------
  |  Branch (101:9): [True: 956k, False: 13.7M]
  ------------------
  102|   956k|      if (params.eatEnd) {
  ------------------
  |  Branch (102:11): [True: 6.87k, False: 949k]
  ------------------
  103|  6.87k|        INPUT.eat(n);
  104|  6.87k|      }
  105|   956k|      break;
  106|   956k|    }
  107|       |
  108|       |    // do we remove trailing whitespace?
  109|  13.7M|    if (params.fold == FOLD_FLOW)
  ------------------
  |  Branch (109:9): [True: 7.71M, False: 5.99M]
  ------------------
  110|  7.71M|      scalar.erase(lastNonWhitespaceChar);
  111|       |
  112|       |    // ********************************
  113|       |    // Phase #2: eat line ending
  114|  13.7M|    n = Exp::Break().Match(INPUT);
  115|  13.7M|    INPUT.eat(n);
  116|       |
  117|       |    // ********************************
  118|       |    // Phase #3: scan initial spaces
  119|       |
  120|       |    // first the required indentation
  121|  13.7M|    while (INPUT.peek() == ' ' &&
  ------------------
  |  Branch (121:12): [True: 15.7k, False: 13.6M]
  ------------------
  122|  15.7k|           (INPUT.column() < params.indent ||
  ------------------
  |  Branch (122:13): [True: 822, False: 14.8k]
  ------------------
  123|  14.8k|            (params.detectIndent && !foundNonEmptyLine)) &&
  ------------------
  |  Branch (123:14): [True: 6.30k, False: 8.57k]
  |  Branch (123:37): [True: 351, False: 5.95k]
  ------------------
  124|  1.17k|           !params.end->Matches(INPUT)) {
  ------------------
  |  Branch (124:12): [True: 807, False: 366]
  ------------------
  125|    807|      INPUT.eat(1);
  126|    807|    }
  127|       |
  128|       |    // update indent if we're auto-detecting
  129|  13.7M|    if (params.detectIndent && !foundNonEmptyLine) {
  ------------------
  |  Branch (129:9): [True: 5.99M, False: 7.71M]
  |  Branch (129:32): [True: 4.72M, False: 1.27M]
  ------------------
  130|  4.72M|      params.indent = std::max(params.indent, INPUT.column());
  131|  4.72M|    }
  132|       |
  133|       |    // and then the rest of the whitespace
  134|  13.7M|    while (Exp::Blank().Matches(INPUT)) {
  ------------------
  |  Branch (134:12): [True: 16.7k, False: 13.7M]
  ------------------
  135|       |      // we check for tabs that masquerade as indentation
  136|  16.7k|      if (INPUT.peek() == '\t' && INPUT.column() < params.indent &&
  ------------------
  |  Branch (136:11): [True: 1.68k, False: 15.0k]
  |  Branch (136:35): [True: 4, False: 1.68k]
  ------------------
  137|      4|          params.onTabInIndentation == THROW) {
  ------------------
  |  Branch (137:11): [True: 4, False: 0]
  ------------------
  138|      4|        throw ParserException(INPUT.mark(), ErrorMsg::TAB_IN_INDENTATION);
  139|      4|      }
  140|       |
  141|  16.7k|      if (!params.eatLeadingWhitespace) {
  ------------------
  |  Branch (141:11): [True: 6.67k, False: 10.0k]
  ------------------
  142|  6.67k|        break;
  143|  6.67k|      }
  144|       |
  145|  10.0k|      if (params.end->Matches(INPUT)) {
  ------------------
  |  Branch (145:11): [True: 380, False: 9.70k]
  ------------------
  146|    380|        break;
  147|    380|      }
  148|       |
  149|  9.70k|      INPUT.eat(1);
  150|  9.70k|    }
  151|       |
  152|       |    // was this an empty line?
  153|  13.7M|    bool nextEmptyLine = Exp::Break().Matches(INPUT);
  154|  13.7M|    bool nextMoreIndented = Exp::Blank().Matches(INPUT);
  155|  13.7M|    if (params.fold == FOLD_BLOCK && foldedNewlineCount == 0 && nextEmptyLine)
  ------------------
  |  Branch (155:9): [True: 5.99M, False: 7.71M]
  |  Branch (155:38): [True: 696k, False: 5.29M]
  |  Branch (155:65): [True: 12.8k, False: 683k]
  ------------------
  156|  12.8k|      foldedNewlineStartedMoreIndented = moreIndented;
  157|       |
  158|       |    // for block scalars, we always start with a newline, so we should ignore it
  159|       |    // (not fold or keep)
  160|  13.7M|    if (pastOpeningBreak) {
  ------------------
  |  Branch (160:9): [True: 13.7M, False: 5.95k]
  ------------------
  161|  13.7M|      switch (params.fold) {
  ------------------
  |  Branch (161:15): [True: 13.7M, False: 0]
  ------------------
  162|    406|        case DONT_FOLD:
  ------------------
  |  Branch (162:9): [True: 406, False: 13.7M]
  ------------------
  163|    406|          scalar += "\n";
  164|    406|          break;
  165|  5.98M|        case FOLD_BLOCK:
  ------------------
  |  Branch (165:9): [True: 5.98M, False: 7.71M]
  ------------------
  166|  5.98M|          if (!emptyLine && !nextEmptyLine && !moreIndented &&
  ------------------
  |  Branch (166:15): [True: 690k, False: 5.29M]
  |  Branch (166:29): [True: 679k, False: 10.9k]
  |  Branch (166:47): [True: 673k, False: 6.05k]
  ------------------
  167|   673k|              !nextMoreIndented && INPUT.column() >= params.indent) {
  ------------------
  |  Branch (167:15): [True: 668k, False: 4.84k]
  |  Branch (167:36): [True: 667k, False: 663]
  ------------------
  168|   667k|            scalar += " ";
  169|  5.32M|          } else if (nextEmptyLine) {
  ------------------
  |  Branch (169:22): [True: 5.29M, False: 23.5k]
  ------------------
  170|  5.29M|            foldedNewlineCount++;
  171|  5.29M|          } else {
  172|  23.5k|            scalar += "\n";
  173|  23.5k|          }
  174|       |
  175|  5.98M|          if (!nextEmptyLine && foldedNewlineCount > 0) {
  ------------------
  |  Branch (175:15): [True: 691k, False: 5.29M]
  |  Branch (175:33): [True: 11.8k, False: 679k]
  ------------------
  176|  11.8k|            scalar += std::string(foldedNewlineCount - 1, '\n');
  177|  11.8k|            if (foldedNewlineStartedMoreIndented ||
  ------------------
  |  Branch (177:17): [True: 581, False: 11.2k]
  ------------------
  178|  11.2k|                nextMoreIndented || !foundNonEmptyLine) {
  ------------------
  |  Branch (178:17): [True: 1.16k, False: 10.0k]
  |  Branch (178:37): [True: 850, False: 9.23k]
  ------------------
  179|  2.59k|              scalar += "\n";
  180|  2.59k|            }
  181|  11.8k|            foldedNewlineCount = 0;
  182|  11.8k|          }
  183|  5.98M|          break;
  184|  7.71M|        case FOLD_FLOW:
  ------------------
  |  Branch (184:9): [True: 7.71M, False: 5.98M]
  ------------------
  185|  7.71M|          if (nextEmptyLine) {
  ------------------
  |  Branch (185:15): [True: 6.38M, False: 1.32M]
  ------------------
  186|  6.38M|            scalar += "\n";
  187|  6.38M|          } else if (!emptyLine && !escapedNewline) {
  ------------------
  |  Branch (187:22): [True: 1.31M, False: 17.1k]
  |  Branch (187:36): [True: 1.31M, False: 518]
  ------------------
  188|  1.31M|            scalar += " ";
  189|  1.31M|          }
  190|  7.71M|          break;
  191|  13.7M|      }
  192|  13.7M|    }
  193|       |
  194|  13.7M|    emptyLine = nextEmptyLine;
  195|  13.7M|    moreIndented = nextMoreIndented;
  196|  13.7M|    pastOpeningBreak = true;
  197|       |
  198|       |    // are we done via indentation?
  199|  13.7M|    if (!emptyLine && INPUT.column() < params.indent) {
  ------------------
  |  Branch (199:9): [True: 2.02M, False: 11.6M]
  |  Branch (199:23): [True: 703k, False: 1.32M]
  ------------------
  200|   703k|      params.leadingSpaces = true;
  201|   703k|      break;
  202|   703k|    }
  203|  13.7M|  }
  204|       |
  205|       |  // post-processing
  206|  1.96M|  if (params.trimTrailingSpaces) {
  ------------------
  |  Branch (206:7): [True: 1.95M, False: 13.0k]
  ------------------
  207|  1.95M|    std::size_t pos = scalar.find_last_not_of(" \t");
  208|  1.95M|    if (lastEscapedChar != std::string::npos) {
  ------------------
  |  Branch (208:9): [True: 17.1k, False: 1.93M]
  ------------------
  209|  17.1k|      if (pos < lastEscapedChar || pos == std::string::npos) {
  ------------------
  |  Branch (209:11): [True: 9.96k, False: 7.20k]
  |  Branch (209:36): [True: 639, False: 6.56k]
  ------------------
  210|  10.5k|        pos = lastEscapedChar;
  211|  10.5k|      }
  212|  17.1k|    }
  213|  1.95M|    if (pos < scalar.size()) {
  ------------------
  |  Branch (213:9): [True: 1.94M, False: 10.3k]
  ------------------
  214|  1.94M|      scalar.erase(pos + 1);
  215|  1.94M|    }
  216|  1.95M|  }
  217|       |
  218|  1.96M|  switch (params.chomp) {
  219|  11.8k|    case CLIP: {
  ------------------
  |  Branch (219:5): [True: 11.8k, False: 1.95M]
  ------------------
  220|  11.8k|      std::size_t pos = scalar.find_last_not_of('\n');
  221|  11.8k|      if (lastEscapedChar != std::string::npos) {
  ------------------
  |  Branch (221:11): [True: 3.59k, False: 8.21k]
  ------------------
  222|  3.59k|        if (pos < lastEscapedChar || pos == std::string::npos) {
  ------------------
  |  Branch (222:13): [True: 2.08k, False: 1.51k]
  |  Branch (222:38): [True: 91, False: 1.42k]
  ------------------
  223|  2.17k|          pos = lastEscapedChar;
  224|  2.17k|        }
  225|  3.59k|      }
  226|  11.8k|      if (pos == std::string::npos) {
  ------------------
  |  Branch (226:11): [True: 4.31k, False: 7.49k]
  ------------------
  227|  4.31k|        scalar.erase();
  228|  7.49k|      } else if (pos + 1 < scalar.size()) {
  ------------------
  |  Branch (228:18): [True: 1.00k, False: 6.49k]
  ------------------
  229|  1.00k|        scalar.erase(pos + 2);
  230|  1.00k|      }
  231|  11.8k|    } break;
  232|  1.95M|    case STRIP: {
  ------------------
  |  Branch (232:5): [True: 1.95M, False: 12.5k]
  ------------------
  233|  1.95M|      std::size_t pos = scalar.find_last_not_of('\n');
  234|  1.95M|      if (lastEscapedChar != std::string::npos) {
  ------------------
  |  Branch (234:11): [True: 17.1k, False: 1.93M]
  ------------------
  235|  17.1k|        if (pos < lastEscapedChar || pos == std::string::npos) {
  ------------------
  |  Branch (235:13): [True: 10.0k, False: 7.15k]
  |  Branch (235:38): [True: 336, False: 6.82k]
  ------------------
  236|  10.3k|          pos = lastEscapedChar;
  237|  10.3k|        }
  238|  17.1k|      }
  239|  1.95M|      if (pos == std::string::npos) {
  ------------------
  |  Branch (239:11): [True: 481, False: 1.95M]
  ------------------
  240|    481|        scalar.erase();
  241|  1.95M|      } else if (pos < scalar.size()) {
  ------------------
  |  Branch (241:18): [True: 1.94M, False: 10.3k]
  ------------------
  242|  1.94M|        scalar.erase(pos + 1);
  243|  1.94M|      }
  244|  1.95M|    } break;
  245|    424|    default:
  ------------------
  |  Branch (245:5): [True: 424, False: 1.96M]
  ------------------
  246|    424|      break;
  247|  1.96M|  }
  248|       |
  249|  1.96M|  return scalar;
  250|  1.96M|}

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

_ZN4YAML15ScanVerbatimTagERNS_6StreamE:
    9|    634|std::string ScanVerbatimTag(Stream& INPUT) {
   10|    634|  std::string tag;
   11|       |
   12|       |  // eat the start character
   13|    634|  INPUT.get();
   14|       |
   15|  9.11k|  while (INPUT) {
  ------------------
  |  Branch (15:10): [True: 9.09k, False: 20]
  ------------------
   16|  9.09k|    if (INPUT.peek() == Keys::VerbatimTagEnd) {
  ------------------
  |  Branch (16:9): [True: 605, False: 8.48k]
  ------------------
   17|       |      // eat the end character
   18|    605|      INPUT.get();
   19|    605|      return tag;
   20|    605|    }
   21|       |
   22|  8.48k|    int n = Exp::URI().Match(INPUT);
   23|  8.48k|    if (n <= 0)
  ------------------
  |  Branch (23:9): [True: 9, False: 8.47k]
  ------------------
   24|      9|      break;
   25|       |
   26|  8.47k|    tag += INPUT.get(n);
   27|  8.47k|  }
   28|       |
   29|     29|  throw ParserException(INPUT.mark(), ErrorMsg::END_OF_VERBATIM_TAG);
   30|    634|}
_ZN4YAML13ScanTagHandleERNS_6StreamERb:
   32|   797k|std::string ScanTagHandle(Stream& INPUT, bool& canBeHandle) {
   33|   797k|  std::string tag;
   34|   797k|  canBeHandle = true;
   35|   797k|  Mark firstNonWordChar;
   36|       |
   37|  10.0M|  while (INPUT) {
  ------------------
  |  Branch (37:10): [True: 10.0M, False: 296]
  ------------------
   38|  10.0M|    if (INPUT.peek() == Keys::Tag) {
  ------------------
  |  Branch (38:9): [True: 1.93k, False: 9.99M]
  ------------------
   39|  1.93k|      if (!canBeHandle)
  ------------------
  |  Branch (39:11): [True: 3, False: 1.93k]
  ------------------
   40|      3|        throw ParserException(firstNonWordChar, ErrorMsg::CHAR_IN_TAG_HANDLE);
   41|  1.93k|      break;
   42|  1.93k|    }
   43|       |
   44|  9.99M|    int n = 0;
   45|  9.99M|    if (canBeHandle) {
  ------------------
  |  Branch (45:9): [True: 8.30M, False: 1.69M]
  ------------------
   46|  8.30M|      n = Exp::Word().Match(INPUT);
   47|  8.30M|      if (n <= 0) {
  ------------------
  |  Branch (47:11): [True: 795k, False: 7.51M]
  ------------------
   48|   795k|        canBeHandle = false;
   49|   795k|        firstNonWordChar = INPUT.mark();
   50|   795k|      }
   51|  8.30M|    }
   52|       |
   53|  9.99M|    if (!canBeHandle)
  ------------------
  |  Branch (53:9): [True: 2.48M, False: 7.51M]
  ------------------
   54|  2.48M|      n = Exp::Tag().Match(INPUT);
   55|       |
   56|  9.99M|    if (n <= 0)
  ------------------
  |  Branch (56:9): [True: 794k, False: 9.20M]
  ------------------
   57|   794k|      break;
   58|       |
   59|  9.20M|    tag += INPUT.get(n);
   60|  9.20M|  }
   61|       |
   62|   797k|  return tag;
   63|   797k|}
_ZN4YAML13ScanTagSuffixERNS_6StreamE:
   65|  1.93k|std::string ScanTagSuffix(Stream& INPUT) {
   66|  1.93k|  std::string tag;
   67|       |
   68|  1.30M|  while (INPUT) {
  ------------------
  |  Branch (68:10): [True: 1.30M, False: 92]
  ------------------
   69|  1.30M|    int n = Exp::Tag().Match(INPUT);
   70|  1.30M|    if (n <= 0)
  ------------------
  |  Branch (70:9): [True: 1.84k, False: 1.29M]
  ------------------
   71|  1.84k|      break;
   72|       |
   73|  1.29M|    tag += INPUT.get(n);
   74|  1.29M|  }
   75|       |
   76|  1.93k|  if (tag.empty())
  ------------------
  |  Branch (76:7): [True: 18, False: 1.91k]
  ------------------
   77|     18|    throw ParserException(INPUT.mark(), ErrorMsg::TAG_WITH_NO_SUFFIX);
   78|       |
   79|  1.91k|  return tag;
   80|  1.93k|}

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

_ZN4YAML7Scanner9SimpleKeyC2ERKNS_4MarkEm:
    8|  45.5M|    : mark(mark_),
    9|  45.5M|      flowLevel(flowLevel_),
   10|  45.5M|      pIndent(nullptr),
   11|  45.5M|      pMapStart(nullptr),
   12|  45.5M|      pKey(nullptr) {}
_ZN4YAML7Scanner9SimpleKey8ValidateEv:
   14|   829k|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|   829k|  if (pIndent)
  ------------------
  |  Branch (18:7): [True: 52.1k, False: 777k]
  ------------------
   19|  52.1k|    pIndent->status = IndentMarker::VALID;
   20|   829k|  if (pMapStart)
  ------------------
  |  Branch (20:7): [True: 52.1k, False: 777k]
  ------------------
   21|  52.1k|    pMapStart->status = Token::VALID;
   22|   829k|  if (pKey)
  ------------------
  |  Branch (22:7): [True: 829k, False: 0]
  ------------------
   23|   829k|    pKey->status = Token::VALID;
   24|   829k|}
_ZN4YAML7Scanner9SimpleKey10InvalidateEv:
   26|  2.28M|void Scanner::SimpleKey::Invalidate() {
   27|  2.28M|  if (pIndent)
  ------------------
  |  Branch (27:7): [True: 1.47M, False: 813k]
  ------------------
   28|  1.47M|    pIndent->status = IndentMarker::INVALID;
   29|  2.28M|  if (pMapStart)
  ------------------
  |  Branch (29:7): [True: 1.47M, False: 813k]
  ------------------
   30|  1.47M|    pMapStart->status = Token::INVALID;
   31|  2.28M|  if (pKey)
  ------------------
  |  Branch (31:7): [True: 2.28M, False: 0]
  ------------------
   32|  2.28M|    pKey->status = Token::INVALID;
   33|  2.28M|}
_ZNK4YAML7Scanner27CanInsertPotentialSimpleKeyEv:
   36|  46.0M|bool Scanner::CanInsertPotentialSimpleKey() const {
   37|  46.0M|  if (!m_simpleKeyAllowed)
  ------------------
  |  Branch (37:7): [True: 506k, False: 45.5M]
  ------------------
   38|   506k|    return false;
   39|       |
   40|  45.5M|  return !ExistsActiveSimpleKey();
   41|  46.0M|}
_ZNK4YAML7Scanner21ExistsActiveSimpleKeyEv:
   47|  45.5M|bool Scanner::ExistsActiveSimpleKey() const {
   48|  45.5M|  if (m_simpleKeys.empty())
  ------------------
  |  Branch (48:7): [True: 1.55M, False: 43.9M]
  ------------------
   49|  1.55M|    return false;
   50|       |
   51|  43.9M|  const SimpleKey& key = m_simpleKeys.top();
   52|  43.9M|  return key.flowLevel == GetFlowLevel();
   53|  45.5M|}
_ZN4YAML7Scanner24InsertPotentialSimpleKeyEv:
   58|  46.0M|void Scanner::InsertPotentialSimpleKey() {
   59|  46.0M|  if (!CanInsertPotentialSimpleKey())
  ------------------
  |  Branch (59:7): [True: 510k, False: 45.5M]
  ------------------
   60|   510k|    return;
   61|       |
   62|  45.5M|  SimpleKey key(INPUT.mark(), GetFlowLevel());
   63|       |
   64|       |  // first add a map start, if necessary
   65|  45.5M|  if (InBlockContext()) {
  ------------------
  |  Branch (65:7): [True: 1.54M, False: 44.0M]
  ------------------
   66|  1.54M|    key.pIndent = PushIndentTo(INPUT.column(), IndentMarker::MAP);
   67|  1.54M|    if (key.pIndent) {
  ------------------
  |  Branch (67:9): [True: 1.52M, False: 14.9k]
  ------------------
   68|  1.52M|      key.pIndent->status = IndentMarker::UNKNOWN;
   69|  1.52M|      key.pMapStart = key.pIndent->pStartToken;
   70|  1.52M|      key.pMapStart->status = Token::UNVERIFIED;
   71|  1.52M|    }
   72|  1.54M|  }
   73|       |
   74|       |  // then add the (now unverified) key
   75|  45.5M|  m_tokens.push(Token(Token::KEY, INPUT.mark()));
   76|  45.5M|  key.pKey = &m_tokens.back();
   77|  45.5M|  key.pKey->status = Token::UNVERIFIED;
   78|       |
   79|  45.5M|  m_simpleKeys.push(key);
   80|  45.5M|}
_ZN4YAML7Scanner19InvalidateSimpleKeyEv:
   84|  9.22M|void Scanner::InvalidateSimpleKey() {
   85|  9.22M|  if (m_simpleKeys.empty())
  ------------------
  |  Branch (85:7): [True: 6.81M, False: 2.41M]
  ------------------
   86|  6.81M|    return;
   87|       |
   88|       |  // grab top key
   89|  2.41M|  SimpleKey& key = m_simpleKeys.top();
   90|  2.41M|  if (key.flowLevel != GetFlowLevel())
  ------------------
  |  Branch (90:7): [True: 896k, False: 1.52M]
  ------------------
   91|   896k|    return;
   92|       |
   93|  1.52M|  key.Invalidate();
   94|  1.52M|  m_simpleKeys.pop();
   95|  1.52M|}
_ZN4YAML7Scanner15VerifySimpleKeyEv:
  100|  6.96M|bool Scanner::VerifySimpleKey() {
  101|  6.96M|  if (m_simpleKeys.empty())
  ------------------
  |  Branch (101:7): [True: 5.32M, False: 1.63M]
  ------------------
  102|  5.32M|    return false;
  103|       |
  104|       |  // grab top key
  105|  1.63M|  SimpleKey key = m_simpleKeys.top();
  106|       |
  107|       |  // only validate if we're in the correct flow level
  108|  1.63M|  if (key.flowLevel != GetFlowLevel())
  ------------------
  |  Branch (108:7): [True: 41.8k, False: 1.59M]
  ------------------
  109|  41.8k|    return false;
  110|       |
  111|  1.59M|  m_simpleKeys.pop();
  112|       |
  113|  1.59M|  bool isValid = true;
  114|       |
  115|       |  // needs to be less than 1024 characters and inline
  116|  1.59M|  if (INPUT.line() != key.mark.line || INPUT.pos() - key.mark.pos > 1024)
  ------------------
  |  Branch (116:7): [True: 14.2k, False: 1.58M]
  |  Branch (116:40): [True: 750k, False: 829k]
  ------------------
  117|   764k|    isValid = false;
  118|       |
  119|       |  // invalidate key
  120|  1.59M|  if (isValid)
  ------------------
  |  Branch (120:7): [True: 829k, False: 764k]
  ------------------
  121|   829k|    key.Validate();
  122|   764k|  else
  123|   764k|    key.Invalidate();
  124|       |
  125|  1.59M|  return isValid;
  126|  1.63M|}
_ZN4YAML7Scanner16PopAllSimpleKeysEv:
  128|   643k|void Scanner::PopAllSimpleKeys() {
  129|  39.0M|  while (!m_simpleKeys.empty())
  ------------------
  |  Branch (129:10): [True: 38.4M, False: 643k]
  ------------------
  130|  38.4M|    m_simpleKeys.pop();
  131|   643k|}

_ZN4YAML15SingleDocParserC2ERNS_7ScannerERKNS_10DirectivesE:
   18|   593k|    : m_scanner(scanner),
   19|   593k|      m_directives(directives),
   20|   593k|      m_pCollectionStack(new CollectionStack),
   21|   593k|      m_anchors{},
   22|   593k|      m_curAnchor(0) {}
_ZN4YAML15SingleDocParserD2Ev:
   24|   593k|SingleDocParser::~SingleDocParser() = default;
_ZN4YAML15SingleDocParser14HandleDocumentERNS_12EventHandlerE:
   29|   593k|void SingleDocParser::HandleDocument(EventHandler& eventHandler) {
   30|   593k|  assert(!m_scanner.empty());  // guaranteed that there are tokens
   31|   593k|  assert(!m_curAnchor);
   32|       |
   33|   593k|  eventHandler.OnDocumentStart(m_scanner.peek().mark);
   34|       |
   35|       |  // eat doc start
   36|   593k|  if (m_scanner.peek().type == Token::DOC_START)
  ------------------
  |  Branch (36:7): [True: 277k, False: 316k]
  ------------------
   37|   277k|    m_scanner.pop();
   38|       |
   39|       |  // recurse!
   40|   593k|  HandleNode(eventHandler);
   41|       |
   42|   593k|  eventHandler.OnDocumentEnd();
   43|       |
   44|       |  // check if any tokens left after the text
   45|   593k|  if (!m_scanner.empty() && m_scanner.peek().type != Token::DOC_END
  ------------------
  |  Branch (45:7): [True: 589k, False: 4.29k]
  |  Branch (45:29): [True: 278k, False: 311k]
  ------------------
   46|   278k|      && m_scanner.peek().type != Token::DOC_START)
  ------------------
  |  Branch (46:10): [True: 316, False: 277k]
  ------------------
   47|    316|    throw ParserException(m_scanner.mark(), ErrorMsg::UNEXPECTED_TOKEN_AFTER_DOC);
   48|       |
   49|       |  // and finally eat any doc ends we see
   50|   593k|  if (!m_scanner.empty() && m_scanner.peek().type == Token::DOC_END)
  ------------------
  |  Branch (50:7): [True: 589k, False: 4.29k]
  |  Branch (50:29): [True: 311k, False: 277k]
  ------------------
   51|   311k|    m_scanner.pop();
   52|   593k|}
_ZN4YAML15SingleDocParser10HandleNodeERNS_12EventHandlerE:
   54|  1.66M|void SingleDocParser::HandleNode(EventHandler& eventHandler) {
   55|  1.66M|  DepthGuard<500> depthguard(depth, m_scanner.mark(), ErrorMsg::BAD_FILE);
   56|       |
   57|       |  // an empty node *is* a possibility
   58|  1.66M|  if (m_scanner.empty()) {
  ------------------
  |  Branch (58:7): [True: 77, False: 1.66M]
  ------------------
   59|     77|    eventHandler.OnNull(m_scanner.mark(), NullAnchor);
   60|     77|    return;
   61|     77|  }
   62|       |
   63|       |  // save location
   64|  1.66M|  Mark mark = m_scanner.peek().mark;
   65|       |
   66|       |  // special case: a value node by itself must be a map, with no header
   67|  1.66M|  if (m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (67:7): [True: 2.01k, False: 1.66M]
  ------------------
   68|  2.01k|    eventHandler.OnMapStart(mark, "?", NullAnchor, EmitterStyle::Default);
   69|  2.01k|    HandleMap(eventHandler);
   70|  2.01k|    eventHandler.OnMapEnd();
   71|  2.01k|    return;
   72|  2.01k|  }
   73|       |
   74|       |  // special case: an alias node
   75|  1.66M|  if (m_scanner.peek().type == Token::ALIAS) {
  ------------------
  |  Branch (75:7): [True: 1.21k, False: 1.66M]
  ------------------
   76|  1.21k|    eventHandler.OnAlias(mark, LookupAnchor(mark, m_scanner.peek().value));
   77|  1.21k|    m_scanner.pop();
   78|  1.21k|    return;
   79|  1.21k|  }
   80|       |
   81|  1.66M|  std::string tag;
   82|  1.66M|  std::string anchor_name;
   83|  1.66M|  anchor_t anchor;
   84|  1.66M|  ParseProperties(tag, anchor, anchor_name);
   85|       |
   86|  1.66M|  if (!anchor_name.empty())
  ------------------
  |  Branch (86:7): [True: 7.46k, False: 1.65M]
  ------------------
   87|  7.46k|    eventHandler.OnAnchor(mark, anchor_name);
   88|       |
   89|       |  // after parsing properties, an empty node is again a possibility
   90|  1.66M|  if (m_scanner.empty()) {
  ------------------
  |  Branch (90:7): [True: 636, False: 1.66M]
  ------------------
   91|    636|    eventHandler.OnNull(mark, anchor);
   92|    636|    return;
   93|    636|  }
   94|       |
   95|  1.66M|  const Token& token = m_scanner.peek();
   96|       |
   97|       |  // add non-specific tags
   98|  1.66M|  if (tag.empty())
  ------------------
  |  Branch (98:7): [True: 1.65M, False: 6.85k]
  ------------------
   99|  1.65M|    tag = (token.type == Token::NON_PLAIN_SCALAR ? "!" : "?");
  ------------------
  |  Branch (99:12): [True: 1.65k, False: 1.65M]
  ------------------
  100|       |
  101|  1.66M|  if (token.type == Token::PLAIN_SCALAR
  ------------------
  |  Branch (101:7): [True: 324k, False: 1.33M]
  ------------------
  102|   324k|      && tag == "?" && IsNullString(token.value.data(), token.value.size())) {
  ------------------
  |  Branch (102:10): [True: 323k, False: 834]
  |  Branch (102:24): [True: 20.1k, False: 303k]
  ------------------
  103|  20.1k|    eventHandler.OnNull(mark, anchor);
  104|  20.1k|    m_scanner.pop();
  105|  20.1k|    return;
  106|  20.1k|  }
  107|       |
  108|       |  // now split based on what kind of node we should be
  109|  1.64M|  switch (token.type) {
  110|   304k|    case Token::PLAIN_SCALAR:
  ------------------
  |  Branch (110:5): [True: 304k, False: 1.33M]
  ------------------
  111|   306k|    case Token::NON_PLAIN_SCALAR:
  ------------------
  |  Branch (111:5): [True: 1.70k, False: 1.64M]
  ------------------
  112|   306k|      eventHandler.OnScalar(mark, tag, anchor, token.value);
  113|   306k|      m_scanner.pop();
  114|   306k|      return;
  115|  35.0k|    case Token::FLOW_SEQ_START:
  ------------------
  |  Branch (115:5): [True: 35.0k, False: 1.60M]
  ------------------
  116|  35.0k|      eventHandler.OnSequenceStart(mark, tag, anchor, EmitterStyle::Flow);
  117|  35.0k|      HandleSequence(eventHandler);
  118|  35.0k|      eventHandler.OnSequenceEnd();
  119|  35.0k|      return;
  120|  8.51k|    case Token::BLOCK_SEQ_START:
  ------------------
  |  Branch (120:5): [True: 8.51k, False: 1.63M]
  ------------------
  121|  8.51k|      eventHandler.OnSequenceStart(mark, tag, anchor, EmitterStyle::Block);
  122|  8.51k|      HandleSequence(eventHandler);
  123|  8.51k|      eventHandler.OnSequenceEnd();
  124|  8.51k|      return;
  125|  36.7k|    case Token::FLOW_MAP_START:
  ------------------
  |  Branch (125:5): [True: 36.7k, False: 1.60M]
  ------------------
  126|  36.7k|      eventHandler.OnMapStart(mark, tag, anchor, EmitterStyle::Flow);
  127|  36.7k|      HandleMap(eventHandler);
  128|  36.7k|      eventHandler.OnMapEnd();
  129|  36.7k|      return;
  130|  37.6k|    case Token::BLOCK_MAP_START:
  ------------------
  |  Branch (130:5): [True: 37.6k, False: 1.60M]
  ------------------
  131|  37.6k|      eventHandler.OnMapStart(mark, tag, anchor, EmitterStyle::Block);
  132|  37.6k|      HandleMap(eventHandler);
  133|  37.6k|      eventHandler.OnMapEnd();
  134|  37.6k|      return;
  135|  34.7k|    case Token::KEY:
  ------------------
  |  Branch (135:5): [True: 34.7k, False: 1.60M]
  ------------------
  136|       |      // compact maps can only go in a flow sequence
  137|  34.7k|      if (m_pCollectionStack->GetCurCollectionType() ==
  ------------------
  |  Branch (137:11): [True: 34.0k, False: 748]
  ------------------
  138|  34.7k|          CollectionType::FlowSeq) {
  139|  34.0k|        eventHandler.OnMapStart(mark, tag, anchor, EmitterStyle::Flow);
  140|  34.0k|        HandleMap(eventHandler);
  141|  34.0k|        eventHandler.OnMapEnd();
  142|  34.0k|        return;
  143|  34.0k|      }
  144|    748|      break;
  145|  1.18M|    default:
  ------------------
  |  Branch (145:5): [True: 1.18M, False: 459k]
  ------------------
  146|  1.18M|      break;
  147|  1.64M|  }
  148|       |
  149|  1.18M|  if (tag == "?")
  ------------------
  |  Branch (149:7): [True: 1.18M, False: 2.97k]
  ------------------
  150|  1.18M|    eventHandler.OnNull(mark, anchor);
  151|  2.97k|  else
  152|  2.97k|    eventHandler.OnScalar(mark, tag, anchor, "");
  153|  1.18M|}
_ZN4YAML15SingleDocParser14HandleSequenceERNS_12EventHandlerE:
  155|  43.5k|void SingleDocParser::HandleSequence(EventHandler& eventHandler) {
  156|       |  // split based on start token
  157|  43.5k|  switch (m_scanner.peek().type) {
  158|  8.51k|    case Token::BLOCK_SEQ_START:
  ------------------
  |  Branch (158:5): [True: 8.51k, False: 35.0k]
  ------------------
  159|  8.51k|      HandleBlockSequence(eventHandler);
  160|  8.51k|      break;
  161|  35.0k|    case Token::FLOW_SEQ_START:
  ------------------
  |  Branch (161:5): [True: 35.0k, False: 8.51k]
  ------------------
  162|  35.0k|      HandleFlowSequence(eventHandler);
  163|  35.0k|      break;
  164|      0|    default:
  ------------------
  |  Branch (164:5): [True: 0, False: 43.5k]
  ------------------
  165|      0|      break;
  166|  43.5k|  }
  167|  43.5k|}
_ZN4YAML15SingleDocParser19HandleBlockSequenceERNS_12EventHandlerE:
  169|  8.51k|void SingleDocParser::HandleBlockSequence(EventHandler& eventHandler) {
  170|       |  // eat start token
  171|  8.51k|  m_scanner.pop();
  172|  8.51k|  m_pCollectionStack->PushCollectionType(CollectionType::BlockSeq);
  173|       |
  174|  18.6k|  while (true) {
  ------------------
  |  Branch (174:10): [True: 16.0k, Folded]
  ------------------
  175|  16.0k|    if (m_scanner.empty())
  ------------------
  |  Branch (175:9): [True: 0, False: 16.0k]
  ------------------
  176|      0|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_SEQ);
  177|       |
  178|  16.0k|    Token token = m_scanner.peek();
  179|  16.0k|    if (token.type != Token::BLOCK_ENTRY && token.type != Token::BLOCK_SEQ_END)
  ------------------
  |  Branch (179:9): [True: 5.89k, False: 10.1k]
  |  Branch (179:45): [True: 11, False: 5.88k]
  ------------------
  180|     11|      throw ParserException(token.mark, ErrorMsg::END_OF_SEQ);
  181|       |
  182|  16.0k|    m_scanner.pop();
  183|  16.0k|    if (token.type == Token::BLOCK_SEQ_END)
  ------------------
  |  Branch (183:9): [True: 5.88k, False: 10.1k]
  ------------------
  184|  5.88k|      break;
  185|       |
  186|       |    // check for null
  187|  10.1k|    if (!m_scanner.empty()) {
  ------------------
  |  Branch (187:9): [True: 10.0k, False: 32]
  ------------------
  188|  10.0k|      const Token& nextToken = m_scanner.peek();
  189|  10.0k|      if (nextToken.type == Token::BLOCK_ENTRY ||
  ------------------
  |  Branch (189:11): [True: 1.41k, False: 8.67k]
  ------------------
  190|  8.67k|          nextToken.type == Token::BLOCK_SEQ_END) {
  ------------------
  |  Branch (190:11): [True: 2.80k, False: 5.87k]
  ------------------
  191|  4.21k|        eventHandler.OnNull(nextToken.mark, NullAnchor);
  192|  4.21k|        continue;
  193|  4.21k|      }
  194|  10.0k|    }
  195|       |
  196|  5.90k|    HandleNode(eventHandler);
  197|  5.90k|  }
  198|       |
  199|  8.50k|  m_pCollectionStack->PopCollectionType(CollectionType::BlockSeq);
  200|  8.50k|}
_ZN4YAML15SingleDocParser18HandleFlowSequenceERNS_12EventHandlerE:
  202|  35.0k|void SingleDocParser::HandleFlowSequence(EventHandler& eventHandler) {
  203|       |  // eat start token
  204|  35.0k|  m_scanner.pop();
  205|  35.0k|  m_pCollectionStack->PushCollectionType(CollectionType::FlowSeq);
  206|       |
  207|   926k|  while (true) {
  ------------------
  |  Branch (207:10): [True: 893k, Folded]
  ------------------
  208|   893k|    if (m_scanner.empty())
  ------------------
  |  Branch (208:9): [True: 189, False: 893k]
  ------------------
  209|    189|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_SEQ_FLOW);
  210|       |
  211|       |    // first check for end
  212|   893k|    if (m_scanner.peek().type == Token::FLOW_SEQ_END) {
  ------------------
  |  Branch (212:9): [True: 1.09k, False: 892k]
  ------------------
  213|  1.09k|      m_scanner.pop();
  214|  1.09k|      break;
  215|  1.09k|    }
  216|       |
  217|       |    // then read the node
  218|   892k|    HandleNode(eventHandler);
  219|       |
  220|   892k|    if (m_scanner.empty())
  ------------------
  |  Branch (220:9): [True: 556, False: 891k]
  ------------------
  221|    556|      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|   891k|    Token& token = m_scanner.peek();
  226|   891k|    if (token.type == Token::FLOW_ENTRY)
  ------------------
  |  Branch (226:9): [True: 857k, False: 34.2k]
  ------------------
  227|   857k|      m_scanner.pop();
  228|  34.2k|    else if (token.type != Token::FLOW_SEQ_END)
  ------------------
  |  Branch (228:14): [True: 182, False: 34.0k]
  ------------------
  229|    182|      throw ParserException(token.mark, ErrorMsg::END_OF_SEQ_FLOW);
  230|   891k|  }
  231|       |
  232|  34.1k|  m_pCollectionStack->PopCollectionType(CollectionType::FlowSeq);
  233|  34.1k|}
_ZN4YAML15SingleDocParser9HandleMapERNS_12EventHandlerE:
  235|   110k|void SingleDocParser::HandleMap(EventHandler& eventHandler) {
  236|       |  // split based on start token
  237|   110k|  switch (m_scanner.peek().type) {
  238|  37.6k|    case Token::BLOCK_MAP_START:
  ------------------
  |  Branch (238:5): [True: 37.6k, False: 72.8k]
  ------------------
  239|  37.6k|      HandleBlockMap(eventHandler);
  240|  37.6k|      break;
  241|  36.7k|    case Token::FLOW_MAP_START:
  ------------------
  |  Branch (241:5): [True: 36.7k, False: 73.6k]
  ------------------
  242|  36.7k|      HandleFlowMap(eventHandler);
  243|  36.7k|      break;
  244|  34.0k|    case Token::KEY:
  ------------------
  |  Branch (244:5): [True: 34.0k, False: 76.4k]
  ------------------
  245|  34.0k|      HandleCompactMap(eventHandler);
  246|  34.0k|      break;
  247|  2.01k|    case Token::VALUE:
  ------------------
  |  Branch (247:5): [True: 2.01k, False: 108k]
  ------------------
  248|  2.01k|      HandleCompactMapWithNoKey(eventHandler);
  249|  2.01k|      break;
  250|      0|    default:
  ------------------
  |  Branch (250:5): [True: 0, False: 110k]
  ------------------
  251|      0|      break;
  252|   110k|  }
  253|   110k|}
_ZN4YAML15SingleDocParser14HandleBlockMapERNS_12EventHandlerE:
  255|  37.6k|void SingleDocParser::HandleBlockMap(EventHandler& eventHandler) {
  256|       |  // eat start token
  257|  37.6k|  m_scanner.pop();
  258|  37.6k|  m_pCollectionStack->PushCollectionType(CollectionType::BlockMap);
  259|       |
  260|  80.0k|  while (true) {
  ------------------
  |  Branch (260:10): [True: 76.2k, Folded]
  ------------------
  261|  76.2k|    if (m_scanner.empty())
  ------------------
  |  Branch (261:9): [True: 0, False: 76.2k]
  ------------------
  262|      0|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_MAP);
  263|       |
  264|  76.2k|    Token token = m_scanner.peek();
  265|  76.2k|    if (token.type != Token::KEY && token.type != Token::VALUE &&
  ------------------
  |  Branch (265:9): [True: 56.6k, False: 19.6k]
  |  Branch (265:37): [True: 33.8k, False: 22.8k]
  ------------------
  266|  33.8k|        token.type != Token::BLOCK_MAP_END)
  ------------------
  |  Branch (266:9): [True: 88, False: 33.7k]
  ------------------
  267|     88|      throw ParserException(token.mark, ErrorMsg::END_OF_MAP);
  268|       |
  269|  76.2k|    if (token.type == Token::BLOCK_MAP_END) {
  ------------------
  |  Branch (269:9): [True: 33.7k, False: 42.4k]
  ------------------
  270|  33.7k|      m_scanner.pop();
  271|  33.7k|      break;
  272|  33.7k|    }
  273|       |
  274|       |    // grab key (if non-null)
  275|  42.4k|    if (token.type == Token::KEY) {
  ------------------
  |  Branch (275:9): [True: 19.6k, False: 22.8k]
  ------------------
  276|  19.6k|      m_scanner.pop();
  277|  19.6k|      HandleNode(eventHandler);
  278|  22.8k|    } else {
  279|  22.8k|      eventHandler.OnNull(token.mark, NullAnchor);
  280|  22.8k|    }
  281|       |
  282|       |    // now grab value (optional)
  283|  42.4k|    if (!m_scanner.empty() && m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (283:9): [True: 40.3k, False: 2.13k]
  |  Branch (283:31): [True: 30.9k, False: 9.37k]
  ------------------
  284|  30.9k|      m_scanner.pop();
  285|  30.9k|      HandleNode(eventHandler);
  286|  30.9k|    } else {
  287|  11.5k|      eventHandler.OnNull(token.mark, NullAnchor);
  288|  11.5k|    }
  289|  42.4k|  }
  290|       |
  291|  37.5k|  m_pCollectionStack->PopCollectionType(CollectionType::BlockMap);
  292|  37.5k|}
_ZN4YAML15SingleDocParser13HandleFlowMapERNS_12EventHandlerE:
  294|  36.7k|void SingleDocParser::HandleFlowMap(EventHandler& eventHandler) {
  295|       |  // eat start token
  296|  36.7k|  m_scanner.pop();
  297|  36.7k|  m_pCollectionStack->PushCollectionType(CollectionType::FlowMap);
  298|       |
  299|   152k|  while (true) {
  ------------------
  |  Branch (299:10): [True: 117k, Folded]
  ------------------
  300|   117k|    if (m_scanner.empty())
  ------------------
  |  Branch (300:9): [True: 142, False: 117k]
  ------------------
  301|    142|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_MAP_FLOW);
  302|       |
  303|   117k|    Token& token = m_scanner.peek();
  304|   117k|    const Mark mark = token.mark;
  305|       |    // first check for end
  306|   117k|    if (token.type == Token::FLOW_MAP_END) {
  ------------------
  |  Branch (306:9): [True: 1.11k, False: 116k]
  ------------------
  307|  1.11k|      m_scanner.pop();
  308|  1.11k|      break;
  309|  1.11k|    }
  310|       |
  311|       |    // grab key (if non-null)
  312|   116k|    if (token.type == Token::KEY) {
  ------------------
  |  Branch (312:9): [True: 61.3k, False: 55.0k]
  ------------------
  313|  61.3k|      m_scanner.pop();
  314|  61.3k|      HandleNode(eventHandler);
  315|  61.3k|    } else {
  316|  55.0k|      eventHandler.OnNull(mark, NullAnchor);
  317|  55.0k|    }
  318|       |
  319|       |    // now grab value (optional)
  320|   116k|    if (!m_scanner.empty() && m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (320:9): [True: 81.1k, False: 35.3k]
  |  Branch (320:31): [True: 25.9k, False: 55.2k]
  ------------------
  321|  25.9k|      m_scanner.pop();
  322|  25.9k|      HandleNode(eventHandler);
  323|  90.5k|    } else {
  324|  90.5k|      eventHandler.OnNull(mark, NullAnchor);
  325|  90.5k|    }
  326|       |
  327|   116k|    if (m_scanner.empty())
  ------------------
  |  Branch (327:9): [True: 283, False: 116k]
  ------------------
  328|    283|      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|   116k|    Token& nextToken = m_scanner.peek();
  333|   116k|    if (nextToken.type == Token::FLOW_ENTRY)
  ------------------
  |  Branch (333:9): [True: 80.3k, False: 35.8k]
  ------------------
  334|  80.3k|      m_scanner.pop();
  335|  35.8k|    else if (nextToken.type != Token::FLOW_MAP_END)
  ------------------
  |  Branch (335:14): [True: 178, False: 35.6k]
  ------------------
  336|    178|      throw ParserException(nextToken.mark, ErrorMsg::END_OF_MAP_FLOW);
  337|   116k|  }
  338|       |
  339|  36.1k|  m_pCollectionStack->PopCollectionType(CollectionType::FlowMap);
  340|  36.1k|}
_ZN4YAML15SingleDocParser16HandleCompactMapERNS_12EventHandlerE:
  343|  34.0k|void SingleDocParser::HandleCompactMap(EventHandler& eventHandler) {
  344|  34.0k|  m_pCollectionStack->PushCollectionType(CollectionType::CompactMap);
  345|       |
  346|       |  // grab key
  347|  34.0k|  Mark mark = m_scanner.peek().mark;
  348|  34.0k|  m_scanner.pop();
  349|  34.0k|  HandleNode(eventHandler);
  350|       |
  351|       |  // now grab value (optional)
  352|  34.0k|  if (!m_scanner.empty() && m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (352:7): [True: 668, False: 33.3k]
  |  Branch (352:29): [True: 321, False: 347]
  ------------------
  353|    321|    m_scanner.pop();
  354|    321|    HandleNode(eventHandler);
  355|  33.7k|  } else {
  356|  33.7k|    eventHandler.OnNull(mark, NullAnchor);
  357|  33.7k|  }
  358|       |
  359|  34.0k|  m_pCollectionStack->PopCollectionType(CollectionType::CompactMap);
  360|  34.0k|}
_ZN4YAML15SingleDocParser25HandleCompactMapWithNoKeyERNS_12EventHandlerE:
  363|  2.01k|void SingleDocParser::HandleCompactMapWithNoKey(EventHandler& eventHandler) {
  364|  2.01k|  m_pCollectionStack->PushCollectionType(CollectionType::CompactMap);
  365|       |
  366|       |  // null key
  367|  2.01k|  eventHandler.OnNull(m_scanner.peek().mark, NullAnchor);
  368|       |
  369|       |  // grab value
  370|  2.01k|  m_scanner.pop();
  371|  2.01k|  HandleNode(eventHandler);
  372|       |
  373|  2.01k|  m_pCollectionStack->PopCollectionType(CollectionType::CompactMap);
  374|  2.01k|}
_ZN4YAML15SingleDocParser15ParsePropertiesERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERmS8_:
  379|  1.66M|                                      std::string& anchor_name) {
  380|  1.66M|  tag.clear();
  381|  1.66M|  anchor_name.clear();
  382|  1.66M|  anchor = NullAnchor;
  383|       |
  384|  1.67M|  while (true) {
  ------------------
  |  Branch (384:10): [True: 1.67M, Folded]
  ------------------
  385|  1.67M|    if (m_scanner.empty())
  ------------------
  |  Branch (385:9): [True: 636, False: 1.67M]
  ------------------
  386|    636|      return;
  387|       |
  388|  1.67M|    switch (m_scanner.peek().type) {
  389|  7.20k|      case Token::TAG:
  ------------------
  |  Branch (389:7): [True: 7.20k, False: 1.66M]
  ------------------
  390|  7.20k|        ParseTag(tag);
  391|  7.20k|        break;
  392|  7.46k|      case Token::ANCHOR:
  ------------------
  |  Branch (392:7): [True: 7.46k, False: 1.66M]
  ------------------
  393|  7.46k|        ParseAnchor(anchor, anchor_name);
  394|  7.46k|        break;
  395|  1.66M|      default:
  ------------------
  |  Branch (395:7): [True: 1.66M, False: 14.6k]
  ------------------
  396|  1.66M|        return;
  397|  1.67M|    }
  398|  1.67M|  }
  399|  1.66M|}
_ZN4YAML15SingleDocParser8ParseTagERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  401|  7.20k|void SingleDocParser::ParseTag(std::string& tag) {
  402|  7.20k|  Token& token = m_scanner.peek();
  403|  7.20k|  if (!tag.empty())
  ------------------
  |  Branch (403:7): [True: 46, False: 7.15k]
  ------------------
  404|     46|    throw ParserException(token.mark, ErrorMsg::MULTIPLE_TAGS);
  405|       |
  406|  7.15k|  Tag tagInfo(token);
  407|  7.15k|  tag = tagInfo.Translate(m_directives);
  408|  7.15k|  m_scanner.pop();
  409|  7.15k|}
_ZN4YAML15SingleDocParser11ParseAnchorERmRNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  411|  7.46k|void SingleDocParser::ParseAnchor(anchor_t& anchor, std::string& anchor_name) {
  412|  7.46k|  Token& token = m_scanner.peek();
  413|  7.46k|  if (anchor)
  ------------------
  |  Branch (413:7): [True: 1, False: 7.46k]
  ------------------
  414|      1|    throw ParserException(token.mark, ErrorMsg::MULTIPLE_ANCHORS);
  415|       |
  416|  7.46k|  anchor_name = token.value;
  417|  7.46k|  anchor = RegisterAnchor(token.value);
  418|  7.46k|  m_scanner.pop();
  419|  7.46k|}
_ZN4YAML15SingleDocParser14RegisterAnchorERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  421|  7.46k|anchor_t SingleDocParser::RegisterAnchor(const std::string& name) {
  422|  7.46k|  if (name.empty())
  ------------------
  |  Branch (422:7): [True: 0, False: 7.46k]
  ------------------
  423|      0|    return NullAnchor;
  424|       |
  425|  7.46k|  return m_anchors[name] = ++m_curAnchor;
  426|  7.46k|}
_ZNK4YAML15SingleDocParser12LookupAnchorERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  429|  1.21k|                                       const std::string& name) const {
  430|  1.21k|  auto it = m_anchors.find(name);
  431|  1.21k|  if (it == m_anchors.end()) {
  ------------------
  |  Branch (431:7): [True: 308, False: 907]
  ------------------
  432|    308|    std::stringstream ss;
  433|    308|    ss << ErrorMsg::UNKNOWN_ANCHOR << name;
  434|    308|    throw ParserException(mark, ss.str());
  435|    308|  }
  436|       |
  437|    907|  return it->second;
  438|  1.21k|}

_ZN4YAML6StreamC2ERNSt3__113basic_istreamIcNS1_11char_traitsIcEEEE:
  187|  6.10k|    : m_input(input),
  188|  6.10k|      m_mark{},
  189|  6.10k|      m_charSet{},
  190|  6.10k|      m_readahead{},
  191|  6.10k|      m_pPrefetched(new unsigned char[YAML_PREFETCH_SIZE]),
  ------------------
  |  |    7|  6.10k|#define YAML_PREFETCH_SIZE 2048
  ------------------
  192|  6.10k|      m_nPrefetchedAvailable(0),
  193|  6.10k|      m_nPrefetchedUsed(0) {
  194|  6.10k|  using char_traits = std::istream::traits_type;
  195|       |
  196|  6.10k|  if (input.fail())
  ------------------
  |  Branch (196:7): [True: 0, False: 6.10k]
  ------------------
  197|      0|    throw BadStream();
  198|       |
  199|       |  // Determine (or guess) the character-set by reading the BOM, if any.  See
  200|       |  // the YAML specification for the determination algorithm.
  201|  6.10k|  char_traits::int_type intro[4]{};
  202|  6.10k|  int nIntroUsed = 0;
  203|  6.10k|  UtfIntroState state = uis_start;
  204|  19.1k|  for (; !s_introFinalState[state];) {
  ------------------
  |  Branch (204:10): [True: 13.0k, False: 6.10k]
  ------------------
  205|  13.0k|    std::istream::int_type ch = input.get();
  206|  13.0k|    if (input.bad() || (input.fail() && !input.eof()))
  ------------------
  |  Branch (206:9): [True: 0, False: 13.0k]
  |  Branch (206:25): [True: 89, False: 12.9k]
  |  Branch (206:41): [True: 0, False: 89]
  ------------------
  207|      0|      throw BadStream();
  208|  13.0k|    intro[nIntroUsed++] = ch;
  209|  13.0k|    UtfIntroCharType charType = IntroCharTypeOf(ch);
  210|  13.0k|    UtfIntroState newState = s_introTransitions[state][charType];
  211|  13.0k|    int nUngets = s_introUngetCount[state][charType];
  212|  13.0k|    if (nUngets > 0) {
  ------------------
  |  Branch (212:9): [True: 6.08k, False: 6.97k]
  ------------------
  213|  6.08k|      input.clear();
  214|  19.1k|      for (; nUngets > 0; --nUngets) {
  ------------------
  |  Branch (214:14): [True: 13.0k, False: 6.08k]
  ------------------
  215|  13.0k|        if (char_traits::eof() != intro[--nIntroUsed])
  ------------------
  |  Branch (215:13): [True: 12.9k, False: 89]
  ------------------
  216|  12.9k|          input.putback(char_traits::to_char_type(intro[nIntroUsed]));
  217|  13.0k|      }
  218|  6.08k|    }
  219|  13.0k|    state = newState;
  220|  13.0k|  }
  221|       |
  222|  6.10k|  switch (state) {
  223|  4.92k|    case uis_utf8:
  ------------------
  |  Branch (223:5): [True: 4.92k, False: 1.17k]
  ------------------
  224|  4.92k|      m_charSet = utf8;
  225|  4.92k|      break;
  226|    699|    case uis_utf16le:
  ------------------
  |  Branch (226:5): [True: 699, False: 5.40k]
  ------------------
  227|    699|      m_charSet = utf16le;
  228|    699|      break;
  229|    387|    case uis_utf16be:
  ------------------
  |  Branch (229:5): [True: 387, False: 5.71k]
  ------------------
  230|    387|      m_charSet = utf16be;
  231|    387|      break;
  232|     45|    case uis_utf32le:
  ------------------
  |  Branch (232:5): [True: 45, False: 6.05k]
  ------------------
  233|     45|      m_charSet = utf32le;
  234|     45|      break;
  235|     48|    case uis_utf32be:
  ------------------
  |  Branch (235:5): [True: 48, False: 6.05k]
  ------------------
  236|     48|      m_charSet = utf32be;
  237|     48|      break;
  238|      0|    default:
  ------------------
  |  Branch (238:5): [True: 0, False: 6.10k]
  ------------------
  239|      0|      m_charSet = utf8;
  240|      0|      break;
  241|  6.10k|  }
  242|       |
  243|  6.10k|  ReadAheadTo(0);
  244|  6.10k|}
_ZN4YAML6StreamD2Ev:
  246|  6.10k|Stream::~Stream() = default;
_ZNK4YAML6Stream4peekEv:
  248|   535M|char Stream::peek() const {
  249|   535M|  if (m_readahead.empty()) {
  ------------------
  |  Branch (249:7): [True: 0, False: 535M]
  ------------------
  250|      0|    return Stream::eof();
  251|      0|  }
  252|       |
  253|   535M|  return m_readahead[0];
  254|   535M|}
_ZNK4YAML6StreamcvbEv:
  256|   309M|Stream::operator bool() const {
  257|   309M|  return m_input.good() ||
  ------------------
  |  Branch (257:10): [True: 295M, False: 14.6M]
  ------------------
  258|  14.6M|         (!m_readahead.empty() && m_readahead[0] != Stream::eof());
  ------------------
  |  Branch (258:11): [True: 14.6M, False: 0]
  |  Branch (258:35): [True: 14.6M, False: 17.2k]
  ------------------
  259|   309M|}
_ZN4YAML6Stream3getEv:
  263|   234M|char Stream::get() {
  264|   234M|  char ch = peek();
  265|   234M|  AdvanceCurrent();
  266|   234M|  m_mark.column++;
  267|       |
  268|       |  // if line ending symbol is unknown, set it to the first
  269|       |  // encountered line ending.
  270|       |  // if line ending '\r' set ending symbol to '\r'
  271|       |  // other wise set it to '\n'
  272|   234M|  if (!m_lineEndingSymbol) {
  ------------------
  |  Branch (272:7): [True: 125M, False: 108M]
  ------------------
  273|   125M|    if (ch == '\n') { // line ending is '\n'
  ------------------
  |  Branch (273:9): [True: 1.62k, False: 125M]
  ------------------
  274|  1.62k|      m_lineEndingSymbol = '\n';
  275|   125M|    } else if (ch == '\r') {
  ------------------
  |  Branch (275:16): [True: 890, False: 125M]
  ------------------
  276|    890|      auto ch2 = peek();
  277|    890|      if (ch2 == '\n') { // line ending is '\r\n'
  ------------------
  |  Branch (277:11): [True: 14, False: 876]
  ------------------
  278|     14|        m_lineEndingSymbol = '\n';
  279|    876|      } else { // line ending is '\r'
  280|    876|        m_lineEndingSymbol = '\r';
  281|    876|      }
  282|    890|    }
  283|   125M|  }
  284|       |
  285|   234M|  if (ch == m_lineEndingSymbol) {
  ------------------
  |  Branch (285:7): [True: 10.3M, False: 223M]
  ------------------
  286|  10.3M|    m_mark.column = 0;
  287|  10.3M|    m_mark.line++;
  288|  10.3M|  }
  289|       |
  290|   234M|  return ch;
  291|   234M|}
_ZN4YAML6Stream3getEi:
  295|  10.5M|std::string Stream::get(int n) {
  296|  10.5M|  std::string ret;
  297|  10.5M|  if (n > 0) {
  ------------------
  |  Branch (297:7): [True: 10.5M, False: 0]
  ------------------
  298|  10.5M|    ret.reserve(static_cast<std::string::size_type>(n));
  299|  21.0M|    for (int i = 0; i < n; i++)
  ------------------
  |  Branch (299:21): [True: 10.5M, False: 10.5M]
  ------------------
  300|  10.5M|      ret += get();
  301|  10.5M|  }
  302|  10.5M|  return ret;
  303|  10.5M|}
_ZN4YAML6Stream3eatEi:
  307|  37.2M|void Stream::eat(int n) {
  308|  75.7M|  for (int i = 0; i < n; i++)
  ------------------
  |  Branch (308:19): [True: 38.5M, False: 37.2M]
  ------------------
  309|  38.5M|    get();
  310|  37.2M|}
_ZN4YAML6Stream14AdvanceCurrentEv:
  312|   234M|void Stream::AdvanceCurrent() {
  313|   234M|  if (!m_readahead.empty()) {
  ------------------
  |  Branch (313:7): [True: 234M, False: 0]
  ------------------
  314|   234M|    m_readahead.pop_front();
  315|   234M|    m_mark.pos++;
  316|   234M|  }
  317|       |
  318|   234M|  ReadAheadTo(0);
  319|   234M|}
_ZNK4YAML6Stream12_ReadAheadToEm:
  321|   147M|bool Stream::_ReadAheadTo(size_t i) const {
  322|   295M|  while (m_input.good() && (m_readahead.size() <= i)) {
  ------------------
  |  Branch (322:10): [True: 295M, False: 6.25k]
  |  Branch (322:28): [True: 147M, False: 147M]
  ------------------
  323|   147M|    switch (m_charSet) {
  ------------------
  |  Branch (323:13): [True: 147M, False: 0]
  ------------------
  324|   128M|      case utf8:
  ------------------
  |  Branch (324:7): [True: 128M, False: 19.2M]
  ------------------
  325|   128M|        StreamInUtf8();
  326|   128M|        break;
  327|  9.36M|      case utf16le:
  ------------------
  |  Branch (327:7): [True: 9.36M, False: 138M]
  ------------------
  328|  9.36M|        StreamInUtf16();
  329|  9.36M|        break;
  330|  7.85M|      case utf16be:
  ------------------
  |  Branch (330:7): [True: 7.85M, False: 139M]
  ------------------
  331|  7.85M|        StreamInUtf16();
  332|  7.85M|        break;
  333|   565k|      case utf32le:
  ------------------
  |  Branch (333:7): [True: 565k, False: 147M]
  ------------------
  334|   565k|        StreamInUtf32();
  335|   565k|        break;
  336|  1.49M|      case utf32be:
  ------------------
  |  Branch (336:7): [True: 1.49M, False: 146M]
  ------------------
  337|  1.49M|        StreamInUtf32();
  338|  1.49M|        break;
  339|   147M|    }
  340|   147M|  }
  341|       |
  342|       |  // signal end of stream
  343|   147M|  if (!m_input.good())
  ------------------
  |  Branch (343:7): [True: 6.25k, False: 147M]
  ------------------
  344|  6.25k|    m_readahead.push_back(Stream::eof());
  345|       |
  346|   147M|  return m_readahead.size() > i;
  347|   147M|}
_ZNK4YAML6Stream12StreamInUtf8Ev:
  349|   128M|void Stream::StreamInUtf8() const {
  350|   128M|  unsigned char b = GetNextByte();
  351|   128M|  if (m_input.good()) {
  ------------------
  |  Branch (351:7): [True: 128M, False: 4.63k]
  ------------------
  352|   128M|    m_readahead.push_back(static_cast<char>(b));
  353|   128M|  }
  354|   128M|}
_ZNK4YAML6Stream13StreamInUtf16Ev:
  356|  17.2M|void Stream::StreamInUtf16() const {
  357|  17.2M|  unsigned long ch = 0;
  358|  17.2M|  unsigned char bytes[2];
  359|  17.2M|  int nBigEnd = (m_charSet == utf16be) ? 0 : 1;
  ------------------
  |  Branch (359:17): [True: 7.85M, False: 9.36M]
  ------------------
  360|       |
  361|  17.2M|  bytes[0] = GetNextByte();
  362|  17.2M|  bytes[1] = GetNextByte();
  363|  17.2M|  if (!m_input.good()) {
  ------------------
  |  Branch (363:7): [True: 759, False: 17.2M]
  ------------------
  364|    759|    return;
  365|    759|  }
  366|  17.2M|  ch = (static_cast<unsigned long>(bytes[nBigEnd]) << 8) |
  367|  17.2M|       static_cast<unsigned long>(bytes[1 ^ nBigEnd]);
  368|       |
  369|  17.2M|  if (ch >= 0xDC00 && ch < 0xE000) {
  ------------------
  |  Branch (369:7): [True: 197k, False: 17.0M]
  |  Branch (369:23): [True: 7.76k, False: 189k]
  ------------------
  370|       |    // Trailing (low) surrogate...ugh, wrong order
  371|  7.76k|    QueueUnicodeCodepoint(m_readahead, CP_REPLACEMENT_CHARACTER);
  ------------------
  |  |   13|  7.76k|#define CP_REPLACEMENT_CHARACTER (0xFFFD)
  ------------------
  372|  7.76k|    return;
  373|  7.76k|  }
  374|       |
  375|  17.2M|  if (ch >= 0xD800 && ch < 0xDC00) {
  ------------------
  |  Branch (375:7): [True: 208k, False: 17.0M]
  |  Branch (375:23): [True: 18.8k, False: 189k]
  ------------------
  376|       |    // ch is a leading (high) surrogate
  377|       |
  378|       |    // Four byte UTF-8 code point
  379|       |
  380|       |    // Read the trailing (low) surrogate
  381|  18.7M|    for (;;) {
  382|  18.7M|      bytes[0] = GetNextByte();
  383|  18.7M|      bytes[1] = GetNextByte();
  384|  18.7M|      if (!m_input.good()) {
  ------------------
  |  Branch (384:11): [True: 269, False: 18.7M]
  ------------------
  385|    269|        QueueUnicodeCodepoint(m_readahead, CP_REPLACEMENT_CHARACTER);
  ------------------
  |  |   13|    269|#define CP_REPLACEMENT_CHARACTER (0xFFFD)
  ------------------
  386|    269|        return;
  387|    269|      }
  388|  18.7M|      unsigned long chLow = (static_cast<unsigned long>(bytes[nBigEnd]) << 8) |
  389|  18.7M|                            static_cast<unsigned long>(bytes[1 ^ nBigEnd]);
  390|  18.7M|      if (chLow < 0xDC00 || chLow >= 0xE000) {
  ------------------
  |  Branch (390:11): [True: 18.7M, False: 3.73k]
  |  Branch (390:29): [True: 2.42k, False: 1.30k]
  ------------------
  391|       |        // Trouble...not a low surrogate.  Dump a REPLACEMENT CHARACTER into the
  392|       |        // stream.
  393|  18.7M|        QueueUnicodeCodepoint(m_readahead, CP_REPLACEMENT_CHARACTER);
  ------------------
  |  |   13|  18.7M|#define CP_REPLACEMENT_CHARACTER (0xFFFD)
  ------------------
  394|       |
  395|       |        // Deal with the next UTF-16 unit
  396|  18.7M|        if (chLow < 0xD800 || chLow >= 0xE000) {
  ------------------
  |  Branch (396:13): [True: 14.8k, False: 18.6M]
  |  Branch (396:31): [True: 2.42k, False: 18.6M]
  ------------------
  397|       |          // Easiest case: queue the codepoint and return
  398|  17.2k|          QueueUnicodeCodepoint(m_readahead, ch);
  399|  17.2k|          return;
  400|  17.2k|        }
  401|       |        // Start the loop over with the new high surrogate
  402|  18.6M|        ch = chLow;
  403|  18.6M|        continue;
  404|  18.7M|      }
  405|       |
  406|       |      // Select the payload bits from the high surrogate
  407|  1.30k|      ch &= 0x3FF;
  408|  1.30k|      ch <<= 10;
  409|       |
  410|       |      // Include bits from low surrogate
  411|  1.30k|      ch |= (chLow & 0x3FF);
  412|       |
  413|       |      // Add the surrogacy offset
  414|  1.30k|      ch += 0x10000;
  415|  1.30k|      break;
  416|  18.7M|    }
  417|  18.8k|  }
  418|       |
  419|  17.1M|  QueueUnicodeCodepoint(m_readahead, ch);
  420|  17.1M|}
_ZNK4YAML6Stream11GetNextByteEv:
  426|   208M|unsigned char Stream::GetNextByte() const {
  427|   208M|  if (m_nPrefetchedUsed >= m_nPrefetchedAvailable) {
  ------------------
  |  Branch (427:7): [True: 113k, False: 208M]
  ------------------
  428|   113k|    std::streambuf* pBuf = m_input.rdbuf();
  429|   113k|    try {
  430|   113k|      m_nPrefetchedAvailable = static_cast<std::size_t>(
  431|   113k|          pBuf->sgetn(ReadBuffer(m_pPrefetched.get()), YAML_PREFETCH_SIZE));
  ------------------
  |  |    7|   113k|#define YAML_PREFETCH_SIZE 2048
  ------------------
  432|   113k|    } catch (const std::ios_base::failure&) {
  433|      0|      throw BadStream();
  434|      0|    }
  435|   113k|    m_nPrefetchedUsed = 0;
  436|   113k|    if (m_input.fail()) {
  ------------------
  |  Branch (436:9): [True: 0, False: 113k]
  ------------------
  437|      0|      throw BadStream();
  438|      0|    }
  439|   113k|    if (!m_nPrefetchedAvailable) {
  ------------------
  |  Branch (439:9): [True: 6.77k, False: 107k]
  ------------------
  440|  6.77k|      m_input.setstate(std::ios_base::eofbit);
  441|  6.77k|    }
  442|       |
  443|   113k|    if (0 == m_nPrefetchedAvailable) {
  ------------------
  |  Branch (443:9): [True: 6.77k, False: 107k]
  ------------------
  444|  6.77k|      return 0;
  445|  6.77k|    }
  446|   113k|  }
  447|       |
  448|   208M|  return m_pPrefetched[m_nPrefetchedUsed++];
  449|   208M|}
_ZNK4YAML6Stream13StreamInUtf32Ev:
  451|  2.06M|void Stream::StreamInUtf32() const {
  452|  2.06M|  static int indexes[2][4] = {{3, 2, 1, 0}, {0, 1, 2, 3}};
  453|       |
  454|  2.06M|  unsigned long ch = 0;
  455|  2.06M|  unsigned char bytes[4];
  456|  2.06M|  int* pIndexes = (m_charSet == utf32be) ? indexes[1] : indexes[0];
  ------------------
  |  Branch (456:19): [True: 1.49M, False: 565k]
  ------------------
  457|       |
  458|  2.06M|  bytes[0] = GetNextByte();
  459|  2.06M|  bytes[1] = GetNextByte();
  460|  2.06M|  bytes[2] = GetNextByte();
  461|  2.06M|  bytes[3] = GetNextByte();
  462|  2.06M|  if (!m_input.good()) {
  ------------------
  |  Branch (462:7): [True: 90, False: 2.06M]
  ------------------
  463|     90|    return;
  464|     90|  }
  465|       |
  466|  10.3M|  for (int i = 0; i < 4; ++i) {
  ------------------
  |  Branch (466:19): [True: 8.25M, False: 2.06M]
  ------------------
  467|  8.25M|    ch <<= 8;
  468|  8.25M|    ch |= bytes[pIndexes[i]];
  469|  8.25M|  }
  470|       |
  471|  2.06M|  QueueUnicodeCodepoint(m_readahead, ch);
  472|  2.06M|}
_ZN4YAML15IntroCharTypeOfEi:
  126|  13.0k|inline UtfIntroCharType IntroCharTypeOf(std::istream::int_type ch) {
  127|  13.0k|  if (std::istream::traits_type::eof() == ch) {
  ------------------
  |  Branch (127:7): [True: 89, False: 12.9k]
  ------------------
  128|     89|    return uictOther;
  129|     89|  }
  130|       |
  131|  12.9k|  switch (ch) {
  ------------------
  |  Branch (131:11): [True: 2.08k, False: 10.8k]
  ------------------
  132|  1.66k|    case 0:
  ------------------
  |  Branch (132:5): [True: 1.66k, False: 11.3k]
  ------------------
  133|  1.66k|      return uict00;
  134|     15|    case 0xBB:
  ------------------
  |  Branch (134:5): [True: 15, False: 12.9k]
  ------------------
  135|     15|      return uictBB;
  136|     17|    case 0xBF:
  ------------------
  |  Branch (136:5): [True: 17, False: 12.9k]
  ------------------
  137|     17|      return uictBF;
  138|    117|    case 0xEF:
  ------------------
  |  Branch (138:5): [True: 117, False: 12.8k]
  ------------------
  139|    117|      return uictEF;
  140|     49|    case 0xFE:
  ------------------
  |  Branch (140:5): [True: 49, False: 12.9k]
  ------------------
  141|     49|      return uictFE;
  142|    222|    case 0xFF:
  ------------------
  |  Branch (142:5): [True: 222, False: 12.7k]
  ------------------
  143|    222|      return uictFF;
  144|  12.9k|  }
  145|       |
  146|  10.8k|  if ((ch > 0) && (ch < 0xFF)) {
  ------------------
  |  Branch (146:7): [True: 10.8k, False: 0]
  |  Branch (146:19): [True: 10.8k, False: 0]
  ------------------
  147|  10.8k|    return uictAscii;
  148|  10.8k|  }
  149|       |
  150|      0|  return uictOther;
  151|  10.8k|}
_ZN4YAML21QueueUnicodeCodepointERNSt3__15dequeIcNS0_9allocatorIcEEEEm:
  162|  37.9M|inline void QueueUnicodeCodepoint(std::deque<char>& q, unsigned long ch) {
  163|       |  // We are not allowed to queue the Stream::eof() codepoint, so
  164|       |  // replace it with CP_REPLACEMENT_CHARACTER
  165|  37.9M|  if (static_cast<unsigned long>(Stream::eof()) == ch) {
  ------------------
  |  Branch (165:7): [True: 1.13k, False: 37.9M]
  ------------------
  166|  1.13k|    ch = CP_REPLACEMENT_CHARACTER;
  ------------------
  |  |   13|  1.13k|#define CP_REPLACEMENT_CHARACTER (0xFFFD)
  ------------------
  167|  1.13k|  }
  168|       |
  169|  37.9M|  if (ch < 0x80) {
  ------------------
  |  Branch (169:7): [True: 891k, False: 37.0M]
  ------------------
  170|   891k|    q.push_back(Utf8Adjust(ch, 0, 0));
  171|  37.0M|  } else if (ch < 0x800) {
  ------------------
  |  Branch (171:14): [True: 1.03M, False: 36.0M]
  ------------------
  172|  1.03M|    q.push_back(Utf8Adjust(ch, 2, 6));
  173|  1.03M|    q.push_back(Utf8Adjust(ch, 1, 0));
  174|  36.0M|  } else if (ch < 0x10000) {
  ------------------
  |  Branch (174:14): [True: 33.9M, False: 2.06M]
  ------------------
  175|  33.9M|    q.push_back(Utf8Adjust(ch, 3, 12));
  176|  33.9M|    q.push_back(Utf8Adjust(ch, 1, 6));
  177|  33.9M|    q.push_back(Utf8Adjust(ch, 1, 0));
  178|  33.9M|  } else {
  179|  2.06M|    q.push_back(Utf8Adjust(ch, 4, 18));
  180|  2.06M|    q.push_back(Utf8Adjust(ch, 1, 12));
  181|  2.06M|    q.push_back(Utf8Adjust(ch, 1, 6));
  182|  2.06M|    q.push_back(Utf8Adjust(ch, 1, 0));
  183|  2.06M|  }
  184|  37.9M|}
_ZN4YAML10Utf8AdjustEmhh:
  154|   113M|                       unsigned char rshift) {
  155|   113M|  const unsigned char header =
  156|   113M|      static_cast<unsigned char>(((1 << lead_bits) - 1) << (8 - lead_bits));
  157|   113M|  const unsigned char mask = (0xFF >> (lead_bits + 1));
  158|   113M|  return static_cast<char>(
  159|   113M|      static_cast<unsigned char>(header | ((ch >> rshift) & mask)));
  160|   113M|}
_ZN4YAML10ReadBufferEPh:
  422|   113k|inline char* ReadBuffer(unsigned char* pBuffer) {
  423|   113k|  return reinterpret_cast<char*>(pBuffer);
  424|   113k|}

_ZNK4YAML6StreamntEv:
   35|   153M|  bool operator!() const { return !static_cast<bool>(*this); }
_ZN4YAML6Stream3eofEv:
   42|  69.1M|  static char eof() { return 0x04; }
_ZNK4YAML6Stream4markEv:
   44|   161M|  const Mark mark() const { return m_mark; }
_ZNK4YAML6Stream3posEv:
   45|  1.58M|  int pos() const { return m_mark.pos; }
_ZNK4YAML6Stream4lineEv:
   46|  1.59M|  int line() const { return m_mark.line; }
_ZNK4YAML6Stream6columnEv:
   47|   288M|  int column() const { return m_mark.column; }
_ZN4YAML6Stream11ResetColumnEv:
   48|  4.64k|  void ResetColumn() { m_mark.column = 0; }
_ZNK4YAML6Stream6CharAtEm:
   75|  1.86G|inline char Stream::CharAt(size_t i) const { return m_readahead[i]; }
_ZNK4YAML6Stream11ReadAheadToEm:
   77|  1.34G|inline bool Stream::ReadAheadTo(size_t i) const {
   78|  1.34G|  if (m_readahead.size() > i)
  ------------------
  |  Branch (78:7): [True: 1.20G, False: 147M]
  ------------------
   79|  1.20G|    return true;
   80|   147M|  return _ReadAheadTo(i);
   81|  1.34G|}

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

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

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

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

