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

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

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

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

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

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

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

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

_ZN4YAML6detail8node_refC2Ev:
   19|  3.22M|  node_ref() : m_pData(std::make_shared<node_data>()) {}
_ZNK4YAML6detail8node_ref10is_definedEv:
   23|  10.9M|  bool is_defined() const { return m_pData->is_defined(); }
_ZNK4YAML6detail8node_ref4typeEv:
   25|  7.15M|  NodeType::value type() const { return m_pData->type(); }
_ZNK4YAML6detail8node_ref6scalarEv:
   26|  5.32M|  const std::string& scalar() const { return m_pData->scalar(); }
_ZN4YAML6detail8node_ref12mark_definedEv:
   30|  3.22M|  void mark_defined() { m_pData->mark_defined(); }
_ZN4YAML6detail8node_ref8set_markERKNS_4MarkE:
   33|  3.22M|  void set_mark(const Mark& mark) { m_pData->set_mark(mark); }
_ZN4YAML6detail8node_ref8set_typeENS_8NodeType5valueE:
   34|   163k|  void set_type(NodeType::value type) { m_pData->set_type(type); }
_ZN4YAML6detail8node_ref7set_tagERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   35|   557k|  void set_tag(const std::string& tag) { m_pData->set_tag(tag); }
_ZN4YAML6detail8node_ref8set_nullEv:
   36|  2.66M|  void set_null() { m_pData->set_null(); }
_ZN4YAML6detail8node_ref10set_scalarERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   37|   393k|  void set_scalar(const std::string& scalar) { m_pData->set_scalar(scalar); }
_ZN4YAML6detail8node_ref9set_styleENS_12EmitterStyle5valueE:
   38|   163k|  void set_style(EmitterStyle::value style) { m_pData->set_style(style); }
_ZN4YAML6detail8node_ref9push_backERNS0_4nodeENSt3__110shared_ptrINS0_13memory_holderEEE:
   54|   782k|  void push_back(node& node, shared_memory_holder pMemory) {
   55|   782k|    m_pData->push_back(node, pMemory);
   56|   782k|  }
_ZN4YAML6detail8node_ref6insertERNS0_4nodeES3_NSt3__110shared_ptrINS0_13memory_holderEEE:
   57|   912k|  void insert(node& key, node& value, shared_memory_holder pMemory) {
   58|   912k|    m_pData->insert(key, value, pMemory);
   59|   912k|  }

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

_ZN4YAML9ExceptionD2Ev:
   15|  3.46k|    #define YAML_CPP_NOEXCEPT noexcept

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

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

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

_ZN4YAML3Exp8ParseHexERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_4MarkE:
   13|  1.52k|unsigned ParseHex(const std::string& str, const Mark& mark) {
   14|  1.52k|  unsigned value = 0;
   15|  7.00k|  for (char ch : str) {
  ------------------
  |  Branch (15:16): [True: 7.00k, False: 1.45k]
  ------------------
   16|  7.00k|    int digit = 0;
   17|  7.00k|    if ('a' <= ch && ch <= 'f')
  ------------------
  |  Branch (17:9): [True: 1.65k, False: 5.34k]
  |  Branch (17:22): [True: 1.65k, False: 3]
  ------------------
   18|  1.65k|      digit = ch - 'a' + 10;
   19|  5.35k|    else if ('A' <= ch && ch <= 'F')
  ------------------
  |  Branch (19:14): [True: 1.43k, False: 3.91k]
  |  Branch (19:27): [True: 1.42k, False: 8]
  ------------------
   20|  1.42k|      digit = ch - 'A' + 10;
   21|  3.92k|    else if ('0' <= ch && ch <= '9')
  ------------------
  |  Branch (21:14): [True: 3.85k, False: 64]
  |  Branch (21:27): [True: 3.84k, False: 10]
  ------------------
   22|  3.84k|      digit = ch - '0';
   23|     74|    else
   24|     74|      throw ParserException(mark, ErrorMsg::INVALID_HEX);
   25|       |
   26|  6.92k|    value = (value << 4) + digit;
   27|  6.92k|  }
   28|       |
   29|  1.45k|  return value;
   30|  1.52k|}
_ZN4YAML3Exp3StrEj:
   32|  3.84k|std::string Str(unsigned ch) { return std::string(1, static_cast<char>(ch)); }
_ZN4YAML3Exp6EscapeERNS_6StreamEi:
   38|  1.52k|std::string Escape(Stream& in, int codeLength) {
   39|       |  // grab string
   40|  1.52k|  std::string str;
   41|  8.81k|  for (int i = 0; i < codeLength; i++)
  ------------------
  |  Branch (41:19): [True: 7.28k, False: 1.52k]
  ------------------
   42|  7.28k|    str += in.get();
   43|       |
   44|       |  // get the value
   45|  1.52k|  unsigned value = ParseHex(str, in.mark());
   46|       |
   47|       |  // legal unicode?
   48|  1.52k|  if ((value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF) {
  ------------------
  |  Branch (48:8): [True: 644, False: 880]
  |  Branch (48:27): [True: 14, False: 630]
  |  Branch (48:47): [True: 27, False: 1.40k]
  ------------------
   49|     41|    std::stringstream msg;
   50|     41|    msg << ErrorMsg::INVALID_UNICODE << value;
   51|     41|    throw ParserException(in.mark(), msg.str());
   52|     41|  }
   53|       |
   54|       |  // now break it up into chars
   55|  1.48k|  if (value <= 0x7F)
  ------------------
  |  Branch (55:7): [True: 214, False: 1.26k]
  ------------------
   56|    214|    return Str(value);
   57|       |
   58|  1.26k|  if (value <= 0x7FF)
  ------------------
  |  Branch (58:7): [True: 281, False: 988]
  ------------------
   59|    281|    return Str(0xC0 + (value >> 6)) + Str(0x80 + (value & 0x3F));
   60|       |
   61|    988|  if (value <= 0xFFFF)
  ------------------
  |  Branch (61:7): [True: 584, False: 404]
  ------------------
   62|    584|    return Str(0xE0 + (value >> 12)) + Str(0x80 + ((value >> 6) & 0x3F)) +
   63|    584|           Str(0x80 + (value & 0x3F));
   64|       |
   65|    404|  return Str(0xF0 + (value >> 18)) + Str(0x80 + ((value >> 12) & 0x3F)) +
   66|    404|         Str(0x80 + ((value >> 6) & 0x3F)) + Str(0x80 + (value & 0x3F));
   67|    988|}
_ZN4YAML3Exp6EscapeERNS_6StreamE:
   74|  41.9k|std::string Escape(Stream& in) {
   75|       |  // eat slash
   76|  41.9k|  char escape = in.get();
   77|       |
   78|       |  // switch on escape character
   79|  41.9k|  char ch = in.get();
   80|       |
   81|       |  // first do single quote, since it's easier
   82|  41.9k|  if (escape == '\'' && ch == '\'')
  ------------------
  |  Branch (82:7): [True: 1.17k, False: 40.7k]
  |  Branch (82:25): [True: 1.17k, False: 0]
  ------------------
   83|  1.17k|    return "\'";
   84|       |
   85|       |  // now do the slash (we're not gonna check if it's a slash - you better pass
   86|       |  // one!)
   87|  40.7k|  switch (ch) {
  ------------------
  |  Branch (87:11): [True: 40.5k, False: 241]
  ------------------
   88|    878|    case '0':
  ------------------
  |  Branch (88:5): [True: 878, False: 39.9k]
  ------------------
   89|    878|      return std::string(1, '\x00');
   90|    203|    case 'a':
  ------------------
  |  Branch (90:5): [True: 203, False: 40.5k]
  ------------------
   91|    203|      return "\x07";
   92|    765|    case 'b':
  ------------------
  |  Branch (92:5): [True: 765, False: 40.0k]
  ------------------
   93|    765|      return "\x08";
   94|    502|    case 't':
  ------------------
  |  Branch (94:5): [True: 502, False: 40.2k]
  ------------------
   95|  4.90k|    case '\t':
  ------------------
  |  Branch (95:5): [True: 4.39k, False: 36.3k]
  ------------------
   96|  4.90k|      return "\x09";
   97|  11.1k|    case 'n':
  ------------------
  |  Branch (97:5): [True: 11.1k, False: 29.6k]
  ------------------
   98|  11.1k|      return "\x0A";
   99|    378|    case 'v':
  ------------------
  |  Branch (99:5): [True: 378, False: 40.4k]
  ------------------
  100|    378|      return "\x0B";
  101|    309|    case 'f':
  ------------------
  |  Branch (101:5): [True: 309, False: 40.4k]
  ------------------
  102|    309|      return "\x0C";
  103|    232|    case 'r':
  ------------------
  |  Branch (103:5): [True: 232, False: 40.5k]
  ------------------
  104|    232|      return "\x0D";
  105|    541|    case 'e':
  ------------------
  |  Branch (105:5): [True: 541, False: 40.2k]
  ------------------
  106|    541|      return "\x1B";
  107|    856|    case ' ':
  ------------------
  |  Branch (107:5): [True: 856, False: 39.9k]
  ------------------
  108|    856|      return R"( )";
  109|  4.94k|    case '\"':
  ------------------
  |  Branch (109:5): [True: 4.94k, False: 35.8k]
  ------------------
  110|  4.94k|      return "\"";
  111|    453|    case '\'':
  ------------------
  |  Branch (111:5): [True: 453, False: 40.3k]
  ------------------
  112|    453|      return "\'";
  113|    765|    case '\\':
  ------------------
  |  Branch (113:5): [True: 765, False: 40.0k]
  ------------------
  114|    765|      return "\\";
  115|    227|    case '/':
  ------------------
  |  Branch (115:5): [True: 227, False: 40.5k]
  ------------------
  116|    227|      return "/";
  117|    450|    case 'N':
  ------------------
  |  Branch (117:5): [True: 450, False: 40.3k]
  ------------------
  118|    450|      return "\xC2\x85";      // NEL (U+0085)
  119|    588|    case '_':
  ------------------
  |  Branch (119:5): [True: 588, False: 40.2k]
  ------------------
  120|    588|      return "\xC2\xA0";      // NBSP (U+00A0)
  121|  8.46k|    case 'L':
  ------------------
  |  Branch (121:5): [True: 8.46k, False: 32.3k]
  ------------------
  122|  8.46k|      return "\xE2\x80\xA8";  // LS (U+2028)
  123|  2.95k|    case 'P':
  ------------------
  |  Branch (123:5): [True: 2.95k, False: 37.8k]
  ------------------
  124|  2.95k|      return "\xE2\x80\xA9";  // PS (U+2029)
  125|    462|    case 'x':
  ------------------
  |  Branch (125:5): [True: 462, False: 40.3k]
  ------------------
  126|    462|      return Escape(in, 2);
  127|    533|    case 'u':
  ------------------
  |  Branch (127:5): [True: 533, False: 40.2k]
  ------------------
  128|    533|      return Escape(in, 4);
  129|    529|    case 'U':
  ------------------
  |  Branch (129:5): [True: 529, False: 40.2k]
  ------------------
  130|    529|      return Escape(in, 8);
  131|  40.7k|  }
  132|       |
  133|    241|  std::stringstream msg;
  134|    241|  throw ParserException(in.mark(), std::string(ErrorMsg::INVALID_ESCAPE) + ch);
  135|  40.7k|}

_ZN4YAML3Exp8DocStartEv:
   84|  2.70M|inline const RegEx& DocStart() {
   85|  2.70M|  static const RegEx e = RegEx("---") + (BlankOrBreak() | RegEx());
   86|  2.70M|  return e;
   87|  2.70M|}
_ZN4YAML3Exp12BlankOrBreakEv:
   43|  29.0M|inline const RegEx& BlankOrBreak() {
   44|  29.0M|  static const RegEx e = Blank() | Break();
   45|  29.0M|  return e;
   46|  29.0M|}
_ZN4YAML3Exp5BlankEv:
   35|  41.3M|inline const RegEx& Blank() {
   36|  41.3M|  static const RegEx e = Space() | Tab();
   37|  41.3M|  return e;
   38|  41.3M|}
_ZN4YAML3Exp5SpaceEv:
   27|      1|inline const RegEx& Space() {
   28|      1|  static const RegEx e = RegEx(' ');
   29|      1|  return e;
   30|      1|}
_ZN4YAML3Exp6DocEndEv:
   88|  2.32M|inline const RegEx& DocEnd() {
   89|  2.32M|  static const RegEx e = RegEx("...") + (BlankOrBreak() | RegEx());
   90|  2.32M|  return e;
   91|  2.32M|}
_ZN4YAML3Exp10BlockEntryEv:
   96|  12.9M|inline const RegEx& BlockEntry() {
   97|  12.9M|  static const RegEx e = RegEx('-') + (BlankOrBreak() | RegEx());
   98|  12.9M|  return e;
   99|  12.9M|}
_ZN4YAML3Exp3KeyEv:
  100|  8.51M|inline const RegEx& Key() {
  101|  8.51M|  static const RegEx e = RegEx('?') + BlankOrBreak();
  102|  8.51M|  return e;
  103|  8.51M|}
_ZN4YAML3Exp9KeyInFlowEv:
  104|  1.95M|inline const RegEx& KeyInFlow() {
  105|  1.95M|  static const RegEx e = RegEx('?') + BlankOrBreak();
  106|  1.95M|  return e;
  107|  1.95M|}
_ZN4YAML3Exp11PlainScalarEv:
  153|  1.42M|inline const RegEx& PlainScalar() {
  154|  1.42M|  static const RegEx e =
  155|  1.42M|      !(BlankOrBreak() | RegEx(",[]{}#&*!|>\'\"%@`", REGEX_OR) |
  156|  1.42M|        (RegEx("-?:", REGEX_OR) + (BlankOrBreak() | RegEx())));
  157|  1.42M|  return e;
  158|  1.42M|}
_ZN4YAML3Exp17PlainScalarInFlowEv:
  159|  1.49M|inline const RegEx& PlainScalarInFlow() {
  160|  1.49M|  static const RegEx e =
  161|  1.49M|      !(BlankOrBreak() | RegEx("?,[]{}#&*!|>\'\"%@`", REGEX_OR) |
  162|  1.49M|        (RegEx("-:", REGEX_OR) + (Blank() | RegEx())));
  163|  1.49M|  return e;
  164|  1.49M|}
_ZN4YAML3Exp3TabEv:
   31|   175k|inline const RegEx& Tab() {
   32|   175k|  static const RegEx e = RegEx('\t');
   33|   175k|  return e;
   34|   175k|}
_ZN4YAML3Exp7CommentEv:
  124|  61.9M|inline const RegEx Comment() {
  125|  61.9M|  static const RegEx e = RegEx('#');
  126|  61.9M|  return e;
  127|  61.9M|}
_ZN4YAML3Exp5BreakEv:
   39|   198M|inline const RegEx& Break() {
   40|   198M|  static const RegEx e = RegEx('\n') | RegEx("\r\n") | RegEx('\r');
   41|   198M|  return e;
   42|   198M|}
_ZN4YAML3Exp5ValueEv:
  108|  8.49M|inline const RegEx& Value() {
  109|  8.49M|  static const RegEx e = RegEx(':') + (BlankOrBreak() | RegEx());
  110|  8.49M|  return e;
  111|  8.49M|}
_ZN4YAML3Exp15ValueInJSONFlowEv:
  116|  5.76k|inline const RegEx& ValueInJSONFlow() {
  117|  5.76k|  static const RegEx e = RegEx(':');
  118|  5.76k|  return e;
  119|  5.76k|}
_ZN4YAML3Exp11ValueInFlowEv:
  112|  1.93M|inline const RegEx& ValueInFlow() {
  113|  1.93M|  static const RegEx e = RegEx(':') + (BlankOrBreak() | RegEx(",]}", REGEX_OR));
  114|  1.93M|  return e;
  115|  1.93M|}
_ZN4YAML3Exp5EmptyEv:
   23|  4.57k|inline const RegEx& Empty() {
   24|  4.57k|  static const RegEx e;
   25|  4.57k|  return e;
   26|  4.57k|}
_ZN4YAML3Exp5DigitEv:
   47|    752|inline const RegEx& Digit() {
   48|    752|  static const RegEx e = RegEx('0', '9');
   49|    752|  return e;
   50|    752|}
_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.10M|inline const RegEx& Word() {
   60|  8.10M|  static const RegEx e = AlphaNumeric() | RegEx('-');
   61|  8.10M|  return e;
   62|  8.10M|}
_ZN4YAML3Exp3HexEv:
   63|      4|inline const RegEx& Hex() {
   64|      4|  static const RegEx e = Digit() | RegEx('A', 'F') | RegEx('a', 'f');
   65|      4|  return e;
   66|      4|}
_ZN4YAML3Exp12DocIndicatorEv:
   92|  4.91M|inline const RegEx& DocIndicator() {
   93|  4.91M|  static const RegEx e = DocStart() | DocEnd();
   94|  4.91M|  return e;
   95|  4.91M|}
_ZN4YAML3Exp6AnchorEv:
  128|  28.8M|inline const RegEx& Anchor() {
  129|  28.8M|  static const RegEx e = !(RegEx("[]{},", REGEX_OR) | BlankOrBreak());
  130|  28.8M|  return e;
  131|  28.8M|}
_ZN4YAML3Exp9AnchorEndEv:
  132|   395k|inline const RegEx& AnchorEnd() {
  133|   395k|  static const RegEx e = RegEx("?:,]}%@`", REGEX_OR) | BlankOrBreak();
  134|   395k|  return e;
  135|   395k|}
_ZN4YAML3Exp3URIEv:
  136|  9.92k|inline const RegEx& URI() {
  137|  9.92k|  static const RegEx e = Word() | RegEx("#;/?:@&=+$,_.!~*'()[]", REGEX_OR) |
  138|  9.92k|                         (RegEx('%') + Hex() + Hex());
  139|  9.92k|  return e;
  140|  9.92k|}
_ZN4YAML3Exp3TagEv:
  141|  3.11M|inline const RegEx& Tag() {
  142|  3.11M|  static const RegEx e = Word() | RegEx("#;/?:@&=+$_.~*'()", REGEX_OR) |
  143|  3.11M|                         (RegEx('%') + Hex() + Hex());
  144|  3.11M|  return e;
  145|  3.11M|}
_ZN4YAML3Exp9EndScalarEv:
  165|      1|inline const RegEx& EndScalar() {
  166|      1|  static const RegEx e = RegEx(':') + (BlankOrBreak() | RegEx());
  167|      1|  return e;
  168|      1|}
_ZN4YAML3Exp15EndScalarInFlowEv:
  169|      1|inline const RegEx& EndScalarInFlow() {
  170|      1|  static const RegEx e =
  171|      1|      (RegEx(':') + (BlankOrBreak() | RegEx() | RegEx(",]}", REGEX_OR))) |
  172|      1|      RegEx(",?[]{}", REGEX_OR);
  173|      1|  return e;
  174|      1|}
_ZN4YAML3Exp19ScanScalarEndInFlowEv:
  176|  1.49M|inline const RegEx& ScanScalarEndInFlow() {
  177|  1.49M|  static const RegEx e = (EndScalarInFlow() | (BlankOrBreak() + Comment()));
  178|  1.49M|  return e;
  179|  1.49M|}
_ZN4YAML3Exp13ScanScalarEndEv:
  181|  1.42M|inline const RegEx& ScanScalarEnd() {
  182|  1.42M|  static const RegEx e = EndScalar() | (BlankOrBreak() + Comment());
  183|  1.42M|  return e;
  184|  1.42M|}
_ZN4YAML3Exp14EscSingleQuoteEv:
  185|  2.40k|inline const RegEx& EscSingleQuote() {
  186|  2.40k|  static const RegEx e = RegEx("\'\'");
  187|  2.40k|  return e;
  188|  2.40k|}
_ZN4YAML3Exp8EscBreakEv:
  189|  9.00M|inline const RegEx& EscBreak() {
  190|  9.00M|  static const RegEx e = RegEx('\\') + Break();
  191|  9.00M|  return e;
  192|  9.00M|}
_ZN4YAML3Exp14ChompIndicatorEv:
  194|      3|inline const RegEx& ChompIndicator() {
  195|      3|  static const RegEx e = RegEx("+-", REGEX_OR);
  196|      3|  return e;
  197|      3|}
_ZN4YAML3Exp5ChompEv:
  198|  4.61k|inline const RegEx& Chomp() {
  199|  4.61k|  static const RegEx e = (ChompIndicator() + Digit()) |
  200|  4.61k|                         (Digit() + ChompIndicator()) | ChompIndicator() |
  201|  4.61k|                         Digit();
  202|  4.61k|  return e;
  203|  4.61k|}

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

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

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

_ZN4YAML12IsNullStringEPKcm:
   13|   400k|bool IsNullString(const char* str, std::size_t size) {
   14|   400k|  return size == 0 || same(str, size, "~") || same(str, size, "null") ||
  ------------------
  |  Branch (14:10): [True: 0, False: 400k]
  |  Branch (14:23): [True: 10.9k, False: 389k]
  |  Branch (14:47): [True: 210, False: 389k]
  ------------------
   15|   389k|         same(str, size, "Null") || same(str, size, "NULL");
  ------------------
  |  Branch (15:10): [True: 866, False: 388k]
  |  Branch (15:37): [True: 33, False: 388k]
  ------------------
   16|   400k|}
null.cpp:_ZN4YAMLL4sameILm2EEEbPKcmRAT__S1_:
    8|   400k|static bool same(const char* str, std::size_t size, const char (&literal)[N]) {
    9|   400k|  constexpr int literalSize = N - 1; // minus null terminator
   10|   400k|  return size == literalSize && std::strncmp(str, literal, literalSize) == 0;
  ------------------
  |  Branch (10:10): [True: 374k, False: 26.6k]
  |  Branch (10:33): [True: 10.9k, False: 363k]
  ------------------
   11|   400k|}
null.cpp:_ZN4YAMLL4sameILm5EEEbPKcmRAT__S1_:
    8|  1.16M|static bool same(const char* str, std::size_t size, const char (&literal)[N]) {
    9|  1.16M|  constexpr int literalSize = N - 1; // minus null terminator
   10|  1.16M|  return size == literalSize && std::strncmp(str, literal, literalSize) == 0;
  ------------------
  |  Branch (10:10): [True: 15.0k, False: 1.15M]
  |  Branch (10:33): [True: 1.10k, False: 13.9k]
  ------------------
   11|  1.16M|}

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

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

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

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

_ZNK4YAML5RegEx7MatchesERKNS_6StreamE:
   26|   475M|inline bool RegEx::Matches(const Stream& in) const { return Match(in) >= 0; }
_ZNK4YAML5RegEx5MatchERKNS_6StreamE:
   49|   534M|inline int RegEx::Match(const Stream& in) const {
   50|   534M|  StreamCharSource source(in);
   51|   534M|  return Match(source);
   52|   534M|}
_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.51G|inline int RegEx::MatchUnchecked(const Source& source) const {
   78|  3.51G|  switch (m_op) {
  ------------------
  |  Branch (78:11): [True: 3.51G, False: 0]
  ------------------
   79|  25.3M|    case REGEX_EMPTY:
  ------------------
  |  Branch (79:5): [True: 25.3M, False: 3.48G]
  ------------------
   80|  25.3M|      return MatchOpEmpty(source);
   81|  1.80G|    case REGEX_MATCH:
  ------------------
  |  Branch (81:5): [True: 1.80G, False: 1.71G]
  ------------------
   82|  1.80G|      return MatchOpMatch(source);
   83|  23.4M|    case REGEX_RANGE:
  ------------------
  |  Branch (83:5): [True: 23.4M, False: 3.48G]
  ------------------
   84|  23.4M|      return MatchOpRange(source);
   85|  1.13G|    case REGEX_OR:
  ------------------
  |  Branch (85:5): [True: 1.13G, False: 2.38G]
  ------------------
   86|  1.13G|      return MatchOpOr(source);
   87|  17.2M|    case REGEX_AND:
  ------------------
  |  Branch (87:5): [True: 17.2M, False: 3.49G]
  ------------------
   88|  17.2M|      return MatchOpAnd(source);
   89|  31.7M|    case REGEX_NOT:
  ------------------
  |  Branch (89:5): [True: 31.7M, False: 3.48G]
  ------------------
   90|  31.7M|      return MatchOpNot(source);
   91|   483M|    case REGEX_SEQ:
  ------------------
  |  Branch (91:5): [True: 483M, False: 3.02G]
  ------------------
   92|   483M|      return MatchOpSeq(source);
   93|  3.51G|  }
   94|       |
   95|      0|  return -1;
   96|  3.51G|}
_ZNK4YAML5RegEx12MatchOpEmptyINS_16StreamCharSourceEEEiRKT_:
  106|  25.3M|inline int RegEx::MatchOpEmpty(const Source& source) const {
  107|  25.3M|  return source[0] == Stream::eof() ? 0 : -1;
  ------------------
  |  Branch (107:10): [True: 2.13M, False: 23.2M]
  ------------------
  108|  25.3M|}
_ZNK4YAML5RegEx12MatchOpMatchINS_16StreamCharSourceEEEiRKT_:
  119|  1.80G|inline int RegEx::MatchOpMatch(const Source& source) const {
  120|  1.80G|  if (source[0] != m_a)
  ------------------
  |  Branch (120:7): [True: 1.61G, False: 187M]
  ------------------
  121|  1.61G|    return -1;
  122|   187M|  return 1;
  123|  1.80G|}
_ZNK4YAML5RegEx12MatchOpRangeINS_16StreamCharSourceEEEiRKT_:
  127|  23.4M|inline int RegEx::MatchOpRange(const Source& source) const {
  128|  23.4M|  if (m_a > source[0] || m_z < source[0])
  ------------------
  |  Branch (128:7): [True: 18.1M, False: 5.27M]
  |  Branch (128:26): [True: 49.5k, False: 5.22M]
  ------------------
  129|  18.2M|    return -1;
  130|  5.22M|  return 1;
  131|  23.4M|}
_ZNK4YAML5RegEx9MatchOpOrINS_16StreamCharSourceEEEiRKT_:
  135|  1.13G|inline int RegEx::MatchOpOr(const Source& source) const {
  136|  2.34G|  for (const RegEx& param : m_params) {
  ------------------
  |  Branch (136:27): [True: 2.34G, False: 938M]
  ------------------
  137|  2.34G|    int n = param.MatchUnchecked(source);
  138|  2.34G|    if (n >= 0)
  ------------------
  |  Branch (138:9): [True: 192M, False: 2.15G]
  ------------------
  139|   192M|      return n;
  140|  2.34G|  }
  141|   938M|  return -1;
  142|  1.13G|}
_ZNK4YAML5RegEx10MatchOpAndINS_16StreamCharSourceEEEiRKT_:
  149|  17.2M|inline int RegEx::MatchOpAnd(const Source& source) const {
  150|  17.2M|  int first = -1;
  151|  17.2M|  for (std::size_t i = 0; i < m_params.size(); i++) {
  ------------------
  |  Branch (151:27): [True: 17.2M, False: 4.56k]
  ------------------
  152|  17.2M|    int n = m_params[i].MatchUnchecked(source);
  153|  17.2M|    if (n == -1)
  ------------------
  |  Branch (153:9): [True: 17.2M, False: 10.2k]
  ------------------
  154|  17.2M|      return -1;
  155|  10.2k|    if (i == 0)
  ------------------
  |  Branch (155:9): [True: 5.73k, False: 4.56k]
  ------------------
  156|  5.73k|      first = n;
  157|  10.2k|  }
  158|  4.56k|  return first;
  159|  17.2M|}
_ZNK4YAML5RegEx10MatchOpNotINS_16StreamCharSourceEEEiRKT_:
  163|  31.7M|inline int RegEx::MatchOpNot(const Source& source) const {
  164|  31.7M|  if (m_params.empty())
  ------------------
  |  Branch (164:7): [True: 0, False: 31.7M]
  ------------------
  165|      0|    return -1;
  166|  31.7M|  if (m_params[0].MatchUnchecked(source) >= 0)
  ------------------
  |  Branch (166:7): [True: 396k, False: 31.4M]
  ------------------
  167|   396k|    return -1;
  168|  31.4M|  return 1;
  169|  31.7M|}
_ZNK4YAML5RegEx10MatchOpSeqINS_16StreamCharSourceEEEiRKT_:
  173|   483M|inline int RegEx::MatchOpSeq(const Source& source) const {
  174|   483M|  int offset = 0;
  175|   582M|  for (const RegEx& param : m_params) {
  ------------------
  |  Branch (175:27): [True: 582M, False: 10.2M]
  ------------------
  176|   582M|    int n = param.Match(source + offset);  // note Match, not
  177|       |                                           // MatchUnchecked because we
  178|       |                                           // need to check validity after
  179|       |                                           // the offset
  180|   582M|    if (n == -1)
  ------------------
  |  Branch (180:9): [True: 473M, False: 109M]
  ------------------
  181|   473M|      return -1;
  182|   109M|    offset += n;
  183|   109M|  }
  184|       |
  185|  10.2M|  return offset;
  186|   483M|}
_ZNK4YAML5RegEx7MatchesEc:
   16|    747|inline bool RegEx::Matches(char ch) const {
   17|    747|  std::string str;
   18|    747|  str += ch;
   19|    747|  return Matches(str);
   20|    747|}
_ZNK4YAML5RegEx7MatchesERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   22|    747|inline bool RegEx::Matches(const std::string& str) const {
   23|    747|  return Match(str) >= 0;
   24|    747|}
_ZNK4YAML5RegEx5MatchERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   44|    747|inline int RegEx::Match(const std::string& str) const {
   45|    747|  StringCharSource source(str.c_str(), str.size());
   46|    747|  return Match(source);
   47|    747|}
_ZNK4YAML5RegEx13IsValidSourceINS_16StringCharSourceEEEbRKT_:
   61|    747|    const StringCharSource& source) const {
   62|    747|  switch (m_op) {
   63|      0|    case REGEX_MATCH:
  ------------------
  |  Branch (63:5): [True: 0, False: 747]
  ------------------
   64|    747|    case REGEX_RANGE:
  ------------------
  |  Branch (64:5): [True: 747, False: 0]
  ------------------
   65|    747|      return source;
   66|      0|    default:
  ------------------
  |  Branch (66:5): [True: 0, False: 747]
  ------------------
   67|      0|      return true;
   68|    747|  }
   69|    747|}
_ZNK4YAML5RegEx5MatchINS_16StringCharSourceEEEiRKT_:
   72|    747|inline int RegEx::Match(const Source& source) const {
   73|    747|  return IsValidSource(source) ? MatchUnchecked(source) : -1;
  ------------------
  |  Branch (73:10): [True: 747, False: 0]
  ------------------
   74|    747|}
_ZNK4YAML5RegEx14MatchUncheckedINS_16StringCharSourceEEEiRKT_:
   77|    747|inline int RegEx::MatchUnchecked(const Source& source) const {
   78|    747|  switch (m_op) {
  ------------------
  |  Branch (78:11): [True: 747, False: 0]
  ------------------
   79|      0|    case REGEX_EMPTY:
  ------------------
  |  Branch (79:5): [True: 0, False: 747]
  ------------------
   80|      0|      return MatchOpEmpty(source);
   81|      0|    case REGEX_MATCH:
  ------------------
  |  Branch (81:5): [True: 0, False: 747]
  ------------------
   82|      0|      return MatchOpMatch(source);
   83|    747|    case REGEX_RANGE:
  ------------------
  |  Branch (83:5): [True: 747, False: 0]
  ------------------
   84|    747|      return MatchOpRange(source);
   85|      0|    case REGEX_OR:
  ------------------
  |  Branch (85:5): [True: 0, False: 747]
  ------------------
   86|      0|      return MatchOpOr(source);
   87|      0|    case REGEX_AND:
  ------------------
  |  Branch (87:5): [True: 0, False: 747]
  ------------------
   88|      0|      return MatchOpAnd(source);
   89|      0|    case REGEX_NOT:
  ------------------
  |  Branch (89:5): [True: 0, False: 747]
  ------------------
   90|      0|      return MatchOpNot(source);
   91|      0|    case REGEX_SEQ:
  ------------------
  |  Branch (91:5): [True: 0, False: 747]
  ------------------
   92|      0|      return MatchOpSeq(source);
   93|    747|  }
   94|       |
   95|      0|  return -1;
   96|    747|}
_ZNK4YAML5RegEx12MatchOpRangeINS_16StringCharSourceEEEiRKT_:
  127|    747|inline int RegEx::MatchOpRange(const Source& source) const {
  128|    747|  if (m_a > source[0] || m_z < source[0])
  ------------------
  |  Branch (128:7): [True: 0, False: 747]
  |  Branch (128:26): [True: 0, False: 747]
  ------------------
  129|      0|    return -1;
  130|    747|  return 1;
  131|    747|}

_ZN4YAML7ScannerC2ERNSt3__113basic_istreamIcNS1_11char_traitsIcEEEE:
   11|  6.01k|    : INPUT(in),
   12|  6.01k|      m_tokens{},
   13|  6.01k|      m_startedStream(false),
   14|  6.01k|      m_endedStream(false),
   15|  6.01k|      m_simpleKeyAllowed(false),
   16|  6.01k|      m_scalarValueAllowed(false),
   17|  6.01k|      m_canBeJSONFlow(false),
   18|  6.01k|      m_simpleKeys{},
   19|  6.01k|      m_indents{},
   20|  6.01k|      m_indentRefs{},
   21|  6.01k|      m_flows{} {}
_ZN4YAML7ScannerD2Ev:
   23|  6.01k|Scanner::~Scanner() = default;
_ZN4YAML7Scanner5emptyEv:
   25|  11.7M|bool Scanner::empty() {
   26|  11.7M|  EnsureTokensInQueue();
   27|  11.7M|  return m_tokens.empty();
   28|  11.7M|}
_ZN4YAML7Scanner3popEv:
   30|  3.29M|void Scanner::pop() {
   31|  3.29M|  EnsureTokensInQueue();
   32|  3.29M|  if (!m_tokens.empty())
  ------------------
  |  Branch (32:7): [True: 3.29M, False: 0]
  ------------------
   33|  3.29M|    m_tokens.pop();
   34|  3.29M|}
_ZN4YAML7Scanner4peekEv:
   36|  16.6M|Token& Scanner::peek() {
   37|  16.6M|  EnsureTokensInQueue();
   38|  16.6M|  assert(!m_tokens.empty());  // should we be asserting here? I mean, we really
   39|       |                              // just be checking
   40|       |                              // if it's empty before peeking.
   41|       |
   42|       |#if 0
   43|       |		static Token *pLast = 0;
   44|       |		if(pLast != &m_tokens.front())
   45|       |			std::cerr << "peek: " << m_tokens.front() << "\n";
   46|       |		pLast = &m_tokens.front();
   47|       |#endif
   48|       |
   49|  16.6M|  return m_tokens.front();
   50|  16.6M|}
_ZNK4YAML7Scanner4markEv:
   52|  1.48M|Mark Scanner::mark() const { return INPUT.mark(); }
_ZN4YAML7Scanner19EnsureTokensInQueueEv:
   54|  31.7M|void Scanner::EnsureTokensInQueue() {
   55|  85.1M|  while (true) {
  ------------------
  |  Branch (55:10): [True: 85.1M, Folded]
  ------------------
   56|  85.1M|    if (!m_tokens.empty()) {
  ------------------
  |  Branch (56:9): [True: 83.3M, False: 1.83M]
  ------------------
   57|  83.3M|      Token& token = m_tokens.front();
   58|       |
   59|       |      // if this guy's valid, then we're done
   60|  83.3M|      if (token.status == Token::VALID) {
  ------------------
  |  Branch (60:11): [True: 31.1M, False: 52.2M]
  ------------------
   61|  31.1M|        return;
   62|  31.1M|      }
   63|       |
   64|       |      // here's where we clean up the impossible tokens
   65|  52.2M|      if (token.status == Token::INVALID) {
  ------------------
  |  Branch (65:11): [True: 428k, False: 51.7M]
  ------------------
   66|   428k|        m_tokens.pop();
   67|   428k|        continue;
   68|   428k|      }
   69|       |
   70|       |      // note: what's left are the unverified tokens
   71|  52.2M|    }
   72|       |
   73|       |    // no token? maybe we've actually finished
   74|  53.6M|    if (m_endedStream) {
  ------------------
  |  Branch (74:9): [True: 584k, False: 53.0M]
  ------------------
   75|   584k|      return;
   76|   584k|    }
   77|       |
   78|       |    // no? then scan...
   79|  53.0M|    ScanNextToken();
   80|  53.0M|  }
   81|  31.7M|}
_ZN4YAML7Scanner13ScanNextTokenEv:
   83|  53.0M|void Scanner::ScanNextToken() {
   84|  53.0M|  if (m_endedStream) {
  ------------------
  |  Branch (84:7): [True: 0, False: 53.0M]
  ------------------
   85|      0|    return;
   86|      0|  }
   87|       |
   88|  53.0M|  if (!m_startedStream) {
  ------------------
  |  Branch (88:7): [True: 6.01k, False: 53.0M]
  ------------------
   89|  6.01k|    return StartStream();
   90|  6.01k|  }
   91|       |
   92|       |  // get rid of whitespace, etc. (in between tokens it should be irrelevant)
   93|  53.0M|  ScanToNextToken();
   94|       |
   95|       |  // maybe need to end some blocks
   96|  53.0M|  PopIndentToHere();
   97|       |
   98|       |  // *****
   99|       |  // And now branch based on the next few characters!
  100|       |  // *****
  101|       |
  102|       |  // end of stream
  103|  53.0M|  if (!INPUT) {
  ------------------
  |  Branch (103:7): [True: 4.96k, False: 53.0M]
  ------------------
  104|  4.96k|    return EndStream();
  105|  4.96k|  }
  106|       |
  107|  53.0M|  if (INPUT.column() == 0 && INPUT.peek() == Keys::Directive) {
  ------------------
  |  Branch (107:7): [True: 2.71M, False: 50.3M]
  |  Branch (107:30): [True: 11.3k, False: 2.70M]
  ------------------
  108|  11.3k|    return ScanDirective();
  109|  11.3k|  }
  110|       |
  111|       |  // document token
  112|  53.0M|  if (INPUT.column() == 0 && Exp::DocStart().Matches(INPUT)) {
  ------------------
  |  Branch (112:7): [True: 2.70M, False: 50.3M]
  |  Branch (112:30): [True: 381k, False: 2.32M]
  ------------------
  113|   381k|    return ScanDocStart();
  114|   381k|  }
  115|       |
  116|  52.6M|  if (INPUT.column() == 0 && Exp::DocEnd().Matches(INPUT)) {
  ------------------
  |  Branch (116:7): [True: 2.32M, False: 50.3M]
  |  Branch (116:30): [True: 158k, False: 2.16M]
  ------------------
  117|   158k|    return ScanDocEnd();
  118|   158k|  }
  119|       |
  120|       |  // flow start/end/entry
  121|  52.4M|  if (INPUT.peek() == Keys::FlowSeqStart ||
  ------------------
  |  Branch (121:7): [True: 30.4M, False: 22.0M]
  ------------------
  122|  37.1M|      INPUT.peek() == Keys::FlowMapStart) {
  ------------------
  |  Branch (122:7): [True: 6.75M, False: 15.2M]
  ------------------
  123|  37.1M|    return ScanFlowStart();
  124|  37.1M|  }
  125|       |
  126|  15.2M|  if (INPUT.peek() == Keys::FlowSeqEnd || INPUT.peek() == Keys::FlowMapEnd) {
  ------------------
  |  Branch (126:7): [True: 21.8k, False: 15.2M]
  |  Branch (126:43): [True: 397k, False: 14.8M]
  ------------------
  127|   419k|    return ScanFlowEnd();
  128|   419k|  }
  129|       |
  130|  14.8M|  if (INPUT.peek() == Keys::FlowEntry) {
  ------------------
  |  Branch (130:7): [True: 2.97M, False: 11.9M]
  ------------------
  131|       |    // values starting with `,` are not allowed.
  132|       |    // eg: reject `,foo`
  133|  2.97M|    if (INPUT.column() == 0) {
  ------------------
  |  Branch (133:9): [True: 9, False: 2.97M]
  ------------------
  134|      9|      throw ParserException(INPUT.mark(), ErrorMsg::UNEXPECTED_FLOW);
  135|      9|    }
  136|       |    // if we already parsed a quoted scalar value and we are not in a flow,
  137|       |    // then `,` is not a valid character.
  138|       |    // eg: reject `"foo",`
  139|  2.97M|    if (!m_scalarValueAllowed) {
  ------------------
  |  Branch (139:9): [True: 2, False: 2.97M]
  ------------------
  140|      2|      throw ParserException(INPUT.mark(), ErrorMsg::UNEXPECTED_SCALAR);
  141|      2|    }
  142|  2.97M|    return ScanFlowEntry();
  143|  2.97M|  }
  144|       |
  145|       |  // block/map stuff
  146|  11.9M|  if (Exp::BlockEntry().Matches(INPUT)) {
  ------------------
  |  Branch (146:7): [True: 1.43M, False: 10.4M]
  ------------------
  147|  1.43M|    return ScanBlockEntry();
  148|  1.43M|  }
  149|       |
  150|  10.4M|  if ((InBlockContext() ? Exp::Key() : Exp::KeyInFlow()).Matches(INPUT)) {
  ------------------
  |  Branch (150:7): [True: 27.3k, False: 10.4M]
  |  Branch (150:8): [True: 8.51M, False: 1.95M]
  ------------------
  151|  27.3k|    return ScanKey();
  152|  27.3k|  }
  153|       |
  154|  10.4M|  if (GetValueRegex().Matches(INPUT)) {
  ------------------
  |  Branch (154:7): [True: 5.99M, False: 4.44M]
  ------------------
  155|  5.99M|    return ScanValue();
  156|  5.99M|  }
  157|       |
  158|       |  // alias/anchor
  159|  4.44M|  if (INPUT.peek() == Keys::Alias || INPUT.peek() == Keys::Anchor) {
  ------------------
  |  Branch (159:7): [True: 1.66k, False: 4.44M]
  |  Branch (159:38): [True: 394k, False: 4.04M]
  ------------------
  160|   395k|    return ScanAnchorOrAlias();
  161|   395k|  }
  162|       |
  163|       |  // tag
  164|  4.04M|  if (INPUT.peek() == Keys::Tag) {
  ------------------
  |  Branch (164:7): [True: 1.12M, False: 2.92M]
  ------------------
  165|  1.12M|    return ScanTag();
  166|  1.12M|  }
  167|       |
  168|       |  // special scalars
  169|  2.92M|  if (InBlockContext() && (INPUT.peek() == Keys::LiteralScalar ||
  ------------------
  |  Branch (169:7): [True: 1.42M, False: 1.49M]
  |  Branch (169:28): [True: 1.18k, False: 1.42M]
  ------------------
  170|  1.42M|                           INPUT.peek() == Keys::FoldedScalar)) {
  ------------------
  |  Branch (170:28): [True: 3.42k, False: 1.42M]
  ------------------
  171|  4.61k|    return ScanBlockScalar();
  172|  4.61k|  }
  173|       |
  174|       |  // if we already parsed a quoted scalar value in this line,
  175|       |  // another scalar value is an error.
  176|       |  // eg: reject `"foo" "bar"`
  177|  2.91M|  if (!m_scalarValueAllowed) {
  ------------------
  |  Branch (177:7): [True: 34, False: 2.91M]
  ------------------
  178|     34|    throw ParserException(INPUT.mark(), ErrorMsg::UNEXPECTED_SCALAR);
  179|     34|  }
  180|       |
  181|  2.91M|  if (INPUT.peek() == '\'' || INPUT.peek() == '\"') {
  ------------------
  |  Branch (181:7): [True: 2.40k, False: 2.91M]
  |  Branch (181:31): [True: 4.62k, False: 2.91M]
  ------------------
  182|  7.03k|    return ScanQuotedScalar();
  183|  7.03k|  }
  184|       |
  185|       |  // plain scalars
  186|  2.91M|  if ((InBlockContext() ? Exp::PlainScalar() : Exp::PlainScalarInFlow())
  ------------------
  |  Branch (186:7): [True: 2.91M, False: 47]
  |  Branch (186:8): [True: 1.42M, False: 1.49M]
  ------------------
  187|  2.91M|          .Matches(INPUT)) {
  188|  2.91M|    return ScanPlainScalar();
  189|  2.91M|  }
  190|       |
  191|       |  // don't know what it is!
  192|     47|  throw ParserException(INPUT.mark(), ErrorMsg::UNKNOWN_TOKEN);
  193|  2.91M|}
_ZN4YAML7Scanner15ScanToNextTokenEv:
  195|  53.0M|void Scanner::ScanToNextToken() {
  196|  60.7M|  while (true) {
  ------------------
  |  Branch (196:10): [True: 60.7M, Folded]
  ------------------
  197|       |    // first eat whitespace
  198|  60.9M|    while (INPUT && IsWhitespaceToBeEaten(INPUT.peek())) {
  ------------------
  |  Branch (198:12): [True: 60.9M, False: 4.88k]
  |  Branch (198:21): [True: 240k, False: 60.7M]
  ------------------
  199|   240k|      if (InBlockContext() && Exp::Tab().Matches(INPUT)) {
  ------------------
  |  Branch (199:11): [True: 175k, False: 64.7k]
  |  Branch (199:31): [True: 2.68k, False: 173k]
  ------------------
  200|  2.68k|        m_simpleKeyAllowed = false;
  201|  2.68k|      }
  202|   240k|      INPUT.eat(1);
  203|   240k|    }
  204|       |
  205|       |    // then eat a comment
  206|  60.7M|    if (Exp::Comment().Matches(INPUT)) {
  ------------------
  |  Branch (206:9): [True: 1.55k, False: 60.7M]
  ------------------
  207|       |      // eat until line break
  208|  3.71M|      while (INPUT && !Exp::Break().Matches(INPUT)) {
  ------------------
  |  Branch (208:14): [True: 3.71M, False: 76]
  |  Branch (208:23): [True: 3.71M, False: 1.47k]
  ------------------
  209|  3.71M|        INPUT.eat(1);
  210|  3.71M|      }
  211|  1.55k|    }
  212|       |
  213|       |    // if it's NOT a line break, then we're done!
  214|  60.7M|    if (!Exp::Break().Matches(INPUT)) {
  ------------------
  |  Branch (214:9): [True: 53.0M, False: 7.68M]
  ------------------
  215|  53.0M|      break;
  216|  53.0M|    }
  217|       |
  218|       |    // otherwise, let's eat the line break and keep going
  219|  7.68M|    int n = Exp::Break().Match(INPUT);
  220|  7.68M|    INPUT.eat(n);
  221|       |
  222|       |    // oh yeah, and let's get rid of that simple key
  223|  7.68M|    InvalidateSimpleKey();
  224|       |
  225|       |    // new line - we accept a scalar value now
  226|  7.68M|    m_scalarValueAllowed = true;
  227|       |
  228|       |    // new line - we may be able to accept a simple key now
  229|  7.68M|    if (InBlockContext()) {
  ------------------
  |  Branch (229:9): [True: 7.64M, False: 45.2k]
  ------------------
  230|  7.64M|      m_simpleKeyAllowed = true;
  231|  7.64M|    }
  232|  7.68M|  }
  233|  53.0M|}
_ZN4YAML7Scanner21IsWhitespaceToBeEatenEc:
  247|  60.9M|bool Scanner::IsWhitespaceToBeEaten(char ch) {
  248|  60.9M|  if (ch == ' ') {
  ------------------
  |  Branch (248:7): [True: 217k, False: 60.7M]
  ------------------
  249|   217k|    return true;
  250|   217k|  }
  251|       |
  252|  60.7M|  if (ch == '\t') {
  ------------------
  |  Branch (252:7): [True: 22.9k, False: 60.7M]
  ------------------
  253|  22.9k|    return true;
  254|  22.9k|  }
  255|       |
  256|  60.7M|  return false;
  257|  60.7M|}
_ZNK4YAML7Scanner13GetValueRegexEv:
  259|  10.4M|const RegEx& Scanner::GetValueRegex() const {
  260|  10.4M|  if (InBlockContext()) {
  ------------------
  |  Branch (260:7): [True: 8.49M, False: 1.93M]
  ------------------
  261|  8.49M|    return Exp::Value();
  262|  8.49M|  }
  263|       |
  264|  1.93M|  return m_canBeJSONFlow ? Exp::ValueInJSONFlow() : Exp::ValueInFlow();
  ------------------
  |  Branch (264:10): [True: 5.76k, False: 1.93M]
  ------------------
  265|  10.4M|}
_ZN4YAML7Scanner11StartStreamEv:
  267|  6.01k|void Scanner::StartStream() {
  268|  6.01k|  m_startedStream = true;
  269|  6.01k|  m_simpleKeyAllowed = true;
  270|  6.01k|  m_scalarValueAllowed = true;
  271|  6.01k|  std::unique_ptr<IndentMarker> pIndent(
  272|  6.01k|      new IndentMarker(-1, IndentMarker::NONE));
  273|  6.01k|  m_indentRefs.push_back(std::move(pIndent));
  274|  6.01k|  m_indents.push(&m_indentRefs.back());
  275|  6.01k|}
_ZN4YAML7Scanner9EndStreamEv:
  277|  4.96k|void Scanner::EndStream() {
  278|       |  // force newline
  279|  4.96k|  if (INPUT.column() > 0) {
  ------------------
  |  Branch (279:7): [True: 4.55k, False: 405]
  ------------------
  280|  4.55k|    INPUT.ResetColumn();
  281|  4.55k|  }
  282|       |
  283|  4.96k|  PopAllIndents();
  284|  4.96k|  PopAllSimpleKeys();
  285|       |
  286|  4.96k|  m_simpleKeyAllowed = false;
  287|  4.96k|  m_scalarValueAllowed = false;
  288|  4.96k|  m_endedStream = true;
  289|  4.96k|}
_ZN4YAML7Scanner9PushTokenENS_5Token4TYPEE:
  291|  9.41M|Token* Scanner::PushToken(Token::TYPE type) {
  292|  9.41M|  m_tokens.push(Token(type, INPUT.mark()));
  293|  9.41M|  return &m_tokens.back();
  294|  9.41M|}
_ZNK4YAML7Scanner16GetStartTokenForENS0_12IndentMarker11INDENT_TYPEE:
  296|  9.41M|Token::TYPE Scanner::GetStartTokenFor(IndentMarker::INDENT_TYPE type) const {
  297|  9.41M|  switch (type) {
  ------------------
  |  Branch (297:11): [True: 9.41M, False: 0]
  ------------------
  298|  1.43M|    case IndentMarker::SEQ:
  ------------------
  |  Branch (298:5): [True: 1.43M, False: 7.98M]
  ------------------
  299|  1.43M|      return Token::BLOCK_SEQ_START;
  300|  7.98M|    case IndentMarker::MAP:
  ------------------
  |  Branch (300:5): [True: 7.98M, False: 1.43M]
  ------------------
  301|  7.98M|      return Token::BLOCK_MAP_START;
  302|      0|    case IndentMarker::NONE:
  ------------------
  |  Branch (302:5): [True: 0, False: 9.41M]
  ------------------
  303|      0|      assert(false);
  304|      0|      break;
  305|  9.41M|  }
  306|  9.41M|  assert(false);
  307|      0|  throw std::runtime_error("yaml-cpp: internal error, invalid indent type");
  308|  9.41M|}
_ZN4YAML7Scanner12PushIndentToEiNS0_12IndentMarker11INDENT_TYPEE:
  311|  9.52M|                                             IndentMarker::INDENT_TYPE type) {
  312|       |  // are we in flow?
  313|  9.52M|  if (InFlowContext()) {
  ------------------
  |  Branch (313:7): [True: 0, False: 9.52M]
  ------------------
  314|      0|    return nullptr;
  315|      0|  }
  316|       |
  317|  9.52M|  std::unique_ptr<IndentMarker> pIndent(new IndentMarker(column, type));
  318|  9.52M|  IndentMarker& indent = *pIndent;
  319|  9.52M|  const IndentMarker& lastIndent = *m_indents.top();
  320|       |
  321|       |  // is this actually an indentation?
  322|  9.52M|  if (indent.column < lastIndent.column) {
  ------------------
  |  Branch (322:7): [True: 0, False: 9.52M]
  ------------------
  323|      0|    return nullptr;
  324|      0|  }
  325|  9.52M|  if (indent.column == lastIndent.column &&
  ------------------
  |  Branch (325:7): [True: 129k, False: 9.39M]
  ------------------
  326|   129k|      !(indent.type == IndentMarker::SEQ &&
  ------------------
  |  Branch (326:9): [True: 21.4k, False: 108k]
  ------------------
  327|   112k|        lastIndent.type == IndentMarker::MAP)) {
  ------------------
  |  Branch (327:9): [True: 16.6k, False: 4.78k]
  ------------------
  328|   112k|    return nullptr;
  329|   112k|  }
  330|       |
  331|       |  // push a start token
  332|  9.41M|  indent.pStartToken = PushToken(GetStartTokenFor(type));
  333|       |
  334|       |  // and then the indent
  335|  9.41M|  m_indents.push(&indent);
  336|  9.41M|  m_indentRefs.push_back(std::move(pIndent));
  337|  9.41M|  return &m_indentRefs.back();
  338|  9.52M|}
_ZN4YAML7Scanner15PopIndentToHereEv:
  340|  53.0M|void Scanner::PopIndentToHere() {
  341|       |  // are we in flow?
  342|  53.0M|  if (InFlowContext()) {
  ------------------
  |  Branch (342:7): [True: 42.5M, False: 10.4M]
  ------------------
  343|  42.5M|    return;
  344|  42.5M|  }
  345|       |
  346|       |  // now pop away
  347|  13.9M|  while (!m_indents.empty()) {
  ------------------
  |  Branch (347:10): [True: 13.9M, False: 0]
  ------------------
  348|  13.9M|    const IndentMarker& indent = *m_indents.top();
  349|  13.9M|    if (indent.column < INPUT.column()) {
  ------------------
  |  Branch (349:9): [True: 9.31M, False: 4.67M]
  ------------------
  350|  9.31M|      break;
  351|  9.31M|    }
  352|  4.67M|    if (indent.column == INPUT.column() &&
  ------------------
  |  Branch (352:9): [True: 2.15M, False: 2.52M]
  ------------------
  353|  2.15M|        !(indent.type == IndentMarker::SEQ &&
  ------------------
  |  Branch (353:11): [True: 999k, False: 1.15M]
  ------------------
  354|  1.15M|          !Exp::BlockEntry().Matches(INPUT))) {
  ------------------
  |  Branch (354:11): [True: 994k, False: 4.78k]
  ------------------
  355|  1.15M|      break;
  356|  1.15M|    }
  357|       |
  358|  3.51M|    PopIndent();
  359|  3.51M|  }
  360|       |
  361|  11.5M|  while (!m_indents.empty() &&
  ------------------
  |  Branch (361:10): [True: 11.5M, False: 0]
  ------------------
  362|  11.5M|         m_indents.top()->status == IndentMarker::INVALID) {
  ------------------
  |  Branch (362:10): [True: 1.09M, False: 10.4M]
  ------------------
  363|  1.09M|    PopIndent();
  364|  1.09M|  }
  365|  10.4M|}
_ZN4YAML7Scanner13PopAllIndentsEv:
  367|   557k|void Scanner::PopAllIndents() {
  368|       |  // are we in flow?
  369|   557k|  if (InFlowContext()) {
  ------------------
  |  Branch (369:7): [True: 39.1k, False: 517k]
  ------------------
  370|  39.1k|    return;
  371|  39.1k|  }
  372|       |
  373|       |  // now pop away
  374|  1.82M|  while (!m_indents.empty()) {
  ------------------
  |  Branch (374:10): [True: 1.82M, False: 0]
  ------------------
  375|  1.82M|    const IndentMarker& indent = *m_indents.top();
  376|  1.82M|    if (indent.type == IndentMarker::NONE) {
  ------------------
  |  Branch (376:9): [True: 517k, False: 1.30M]
  ------------------
  377|   517k|      break;
  378|   517k|    }
  379|       |
  380|  1.30M|    PopIndent();
  381|  1.30M|  }
  382|   517k|}
_ZN4YAML7Scanner9PopIndentEv:
  384|  5.91M|void Scanner::PopIndent() {
  385|  5.91M|  const IndentMarker& indent = *m_indents.top();
  386|  5.91M|  m_indents.pop();
  387|       |
  388|  5.91M|  if (indent.status != IndentMarker::VALID) {
  ------------------
  |  Branch (388:7): [True: 2.09M, False: 3.82M]
  ------------------
  389|  2.09M|    InvalidateSimpleKey();
  390|  2.09M|    return;
  391|  2.09M|  }
  392|       |
  393|  3.82M|  if (indent.type == IndentMarker::SEQ) {
  ------------------
  |  Branch (393:7): [True: 1.36M, False: 2.45M]
  ------------------
  394|  1.36M|    m_tokens.push(Token(Token::BLOCK_SEQ_END, INPUT.mark()));
  395|  2.45M|  } else if (indent.type == IndentMarker::MAP) {
  ------------------
  |  Branch (395:14): [True: 2.45M, False: 0]
  ------------------
  396|  2.45M|    m_tokens.push(Token(Token::BLOCK_MAP_END, INPUT.mark()));
  397|  2.45M|  }
  398|  3.82M|}
_ZNK4YAML7Scanner12GetTopIndentEv:
  400|  1.42M|int Scanner::GetTopIndent() const {
  401|  1.42M|  if (m_indents.empty()) {
  ------------------
  |  Branch (401:7): [True: 0, False: 1.42M]
  ------------------
  402|      0|    return 0;
  403|      0|  }
  404|  1.42M|  return m_indents.top()->column;
  405|  1.42M|}

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

_ZN4YAML10ScanScalarERNS_6StreamERNS_16ScanScalarParamsE:
   21|  2.92M|std::string ScanScalar(Stream& INPUT, ScanScalarParams& params) {
   22|  2.92M|  bool foundNonEmptyLine = false;
   23|  2.92M|  bool pastOpeningBreak = (params.fold == FOLD_FLOW);
   24|  2.92M|  bool emptyLine = false, moreIndented = false;
   25|  2.92M|  int foldedNewlineCount = 0;
   26|  2.92M|  bool foldedNewlineStartedMoreIndented = false;
   27|  2.92M|  std::size_t lastEscapedChar = std::string::npos;
   28|  2.92M|  std::string scalar;
   29|  2.92M|  params.leadingSpaces = false;
   30|       |
   31|  2.92M|  if (!params.end) {
  ------------------
  |  Branch (31:7): [True: 4.57k, False: 2.91M]
  ------------------
   32|  4.57k|    params.end = &Exp::Empty();
   33|  4.57k|  }
   34|       |
   35|  21.3M|  while (INPUT) {
  ------------------
  |  Branch (35:10): [True: 21.3M, False: 846]
  ------------------
   36|       |    // ********************************
   37|       |    // Phase #1: scan until line ending
   38|       |
   39|  21.3M|    std::size_t lastNonWhitespaceChar = scalar.size();
   40|  21.3M|    bool escapedNewline = false;
   41|  86.7M|    while (!params.end->Matches(INPUT) && !Exp::Break().Matches(INPUT)) {
  ------------------
  |  Branch (41:12): [True: 85.2M, False: 1.52M]
  |  Branch (41:43): [True: 65.8M, False: 19.3M]
  ------------------
   42|  65.8M|      if (!INPUT) {
  ------------------
  |  Branch (42:11): [True: 1.60k, False: 65.8M]
  ------------------
   43|  1.60k|        break;
   44|  1.60k|      }
   45|       |
   46|       |      // document indicator?
   47|  65.8M|      if (INPUT.column() == 0 && Exp::DocIndicator().Matches(INPUT)) {
  ------------------
  |  Branch (47:11): [True: 462k, False: 65.3M]
  |  Branch (47:34): [True: 388k, False: 73.9k]
  ------------------
   48|   388k|        if (params.onDocIndicator == BREAK) {
  ------------------
  |  Branch (48:13): [True: 388k, False: 1]
  ------------------
   49|   388k|          break;
   50|   388k|        }
   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|  65.4M|      foundNonEmptyLine = true;
   57|  65.4M|      pastOpeningBreak = true;
   58|       |
   59|       |      // escaped newline? (only if we're escaping on slash)
   60|  65.4M|      if (params.escape == '\\' && Exp::EscBreak().Matches(INPUT)) {
  ------------------
  |  Branch (60:11): [True: 9.00M, False: 56.4M]
  |  Branch (60:36): [True: 632, False: 9.00M]
  ------------------
   61|       |        // eat escape character and get out (but preserve trailing whitespace!)
   62|    632|        INPUT.get();
   63|    632|        lastNonWhitespaceChar = scalar.size();
   64|    632|        lastEscapedChar = scalar.size();
   65|    632|        escapedNewline = true;
   66|    632|        break;
   67|    632|      }
   68|       |
   69|       |      // escape this?
   70|  65.4M|      if (INPUT.peek() == params.escape) {
  ------------------
  |  Branch (70:11): [True: 41.9k, False: 65.4M]
  ------------------
   71|  41.9k|        scalar += Exp::Escape(INPUT);
   72|  41.9k|        lastNonWhitespaceChar = scalar.size();
   73|  41.9k|        lastEscapedChar = scalar.size();
   74|  41.9k|        continue;
   75|  41.9k|      }
   76|       |
   77|       |      // otherwise, just add the damn character
   78|  65.4M|      char ch = INPUT.get();
   79|  65.4M|      scalar += ch;
   80|  65.4M|      if (ch != ' ' && ch != '\t') {
  ------------------
  |  Branch (80:11): [True: 65.3M, False: 61.9k]
  |  Branch (80:24): [True: 63.7M, False: 1.54M]
  ------------------
   81|  63.7M|        lastNonWhitespaceChar = scalar.size();
   82|  63.7M|      }
   83|  65.4M|    }
   84|       |
   85|       |    // eof? if we're looking to eat something, then we throw
   86|  21.3M|    if (!INPUT) {
  ------------------
  |  Branch (86:9): [True: 1.67k, False: 21.3M]
  ------------------
   87|  1.67k|      if (params.eatEnd) {
  ------------------
  |  Branch (87:11): [True: 189, False: 1.48k]
  ------------------
   88|    189|        throw ParserException(INPUT.mark(), ErrorMsg::EOF_IN_SCALAR);
   89|    189|      }
   90|  1.48k|      break;
   91|  1.67k|    }
   92|       |
   93|       |    // doc indicator?
   94|  21.3M|    if (params.onDocIndicator == BREAK && INPUT.column() == 0 &&
  ------------------
  |  Branch (94:9): [True: 9.86M, False: 11.4M]
  |  Branch (94:43): [True: 4.45M, False: 5.41M]
  ------------------
   95|  4.45M|        Exp::DocIndicator().Matches(INPUT)) {
  ------------------
  |  Branch (95:9): [True: 388k, False: 4.06M]
  ------------------
   96|   388k|      break;
   97|   388k|    }
   98|       |
   99|       |    // are we done via character match?
  100|  20.9M|    int n = params.end->Match(INPUT);
  101|  20.9M|    if (n >= 0) {
  ------------------
  |  Branch (101:9): [True: 1.52M, False: 19.3M]
  ------------------
  102|  1.52M|      if (params.eatEnd) {
  ------------------
  |  Branch (102:11): [True: 6.64k, False: 1.51M]
  ------------------
  103|  6.64k|        INPUT.eat(n);
  104|  6.64k|      }
  105|  1.52M|      break;
  106|  1.52M|    }
  107|       |
  108|       |    // do we remove trailing whitespace?
  109|  19.3M|    if (params.fold == FOLD_FLOW)
  ------------------
  |  Branch (109:9): [True: 8.16M, False: 11.2M]
  ------------------
  110|  8.16M|      scalar.erase(lastNonWhitespaceChar);
  111|       |
  112|       |    // ********************************
  113|       |    // Phase #2: eat line ending
  114|  19.3M|    n = Exp::Break().Match(INPUT);
  115|  19.3M|    INPUT.eat(n);
  116|       |
  117|       |    // ********************************
  118|       |    // Phase #3: scan initial spaces
  119|       |
  120|       |    // first the required indentation
  121|  19.3M|    while (INPUT.peek() == ' ' &&
  ------------------
  |  Branch (121:12): [True: 14.3k, False: 19.3M]
  ------------------
  122|  14.3k|           (INPUT.column() < params.indent ||
  ------------------
  |  Branch (122:13): [True: 913, False: 13.4k]
  ------------------
  123|  13.4k|            (params.detectIndent && !foundNonEmptyLine)) &&
  ------------------
  |  Branch (123:14): [True: 1.42k, False: 12.0k]
  |  Branch (123:37): [True: 437, False: 991]
  ------------------
  124|  1.35k|           !params.end->Matches(INPUT)) {
  ------------------
  |  Branch (124:12): [True: 1.13k, False: 213]
  ------------------
  125|  1.13k|      INPUT.eat(1);
  126|  1.13k|    }
  127|       |
  128|       |    // update indent if we're auto-detecting
  129|  19.3M|    if (params.detectIndent && !foundNonEmptyLine) {
  ------------------
  |  Branch (129:9): [True: 11.2M, False: 8.16M]
  |  Branch (129:32): [True: 7.30M, False: 3.91M]
  ------------------
  130|  7.30M|      params.indent = std::max(params.indent, INPUT.column());
  131|  7.30M|    }
  132|       |
  133|       |    // and then the rest of the whitespace
  134|  19.4M|    while (Exp::Blank().Matches(INPUT)) {
  ------------------
  |  Branch (134:12): [True: 15.5k, False: 19.3M]
  ------------------
  135|       |      // we check for tabs that masquerade as indentation
  136|  15.5k|      if (INPUT.peek() == '\t' && INPUT.column() < params.indent &&
  ------------------
  |  Branch (136:11): [True: 2.22k, False: 13.3k]
  |  Branch (136:35): [True: 3, False: 2.22k]
  ------------------
  137|      3|          params.onTabInIndentation == THROW) {
  ------------------
  |  Branch (137:11): [True: 3, False: 0]
  ------------------
  138|      3|        throw ParserException(INPUT.mark(), ErrorMsg::TAB_IN_INDENTATION);
  139|      3|      }
  140|       |
  141|  15.5k|      if (!params.eatLeadingWhitespace) {
  ------------------
  |  Branch (141:11): [True: 1.75k, False: 13.8k]
  ------------------
  142|  1.75k|        break;
  143|  1.75k|      }
  144|       |
  145|  13.8k|      if (params.end->Matches(INPUT)) {
  ------------------
  |  Branch (145:11): [True: 244, False: 13.5k]
  ------------------
  146|    244|        break;
  147|    244|      }
  148|       |
  149|  13.5k|      INPUT.eat(1);
  150|  13.5k|    }
  151|       |
  152|       |    // was this an empty line?
  153|  19.3M|    bool nextEmptyLine = Exp::Break().Matches(INPUT);
  154|  19.3M|    bool nextMoreIndented = Exp::Blank().Matches(INPUT);
  155|  19.3M|    if (params.fold == FOLD_BLOCK && foldedNewlineCount == 0 && nextEmptyLine)
  ------------------
  |  Branch (155:9): [True: 11.2M, False: 8.16M]
  |  Branch (155:38): [True: 105k, False: 11.1M]
  |  Branch (155:65): [True: 6.35k, False: 99.5k]
  ------------------
  156|  6.35k|      foldedNewlineStartedMoreIndented = moreIndented;
  157|       |
  158|       |    // for block scalars, we always start with a newline, so we should ignore it
  159|       |    // (not fold or keep)
  160|  19.3M|    if (pastOpeningBreak) {
  ------------------
  |  Branch (160:9): [True: 19.3M, False: 4.83k]
  ------------------
  161|  19.3M|      switch (params.fold) {
  ------------------
  |  Branch (161:15): [True: 19.3M, False: 0]
  ------------------
  162|  1.45k|        case DONT_FOLD:
  ------------------
  |  Branch (162:9): [True: 1.45k, False: 19.3M]
  ------------------
  163|  1.45k|          scalar += "\n";
  164|  1.45k|          break;
  165|  11.2M|        case FOLD_BLOCK:
  ------------------
  |  Branch (165:9): [True: 11.2M, False: 8.16M]
  ------------------
  166|  11.2M|          if (!emptyLine && !nextEmptyLine && !moreIndented &&
  ------------------
  |  Branch (166:15): [True: 101k, False: 11.1M]
  |  Branch (166:29): [True: 97.2k, False: 4.17k]
  |  Branch (166:47): [True: 96.1k, False: 1.11k]
  ------------------
  167|  96.1k|              !nextMoreIndented && INPUT.column() >= params.indent) {
  ------------------
  |  Branch (167:15): [True: 95.5k, False: 591]
  |  Branch (167:36): [True: 94.8k, False: 689]
  ------------------
  168|  94.8k|            scalar += " ";
  169|  11.1M|          } else if (nextEmptyLine) {
  ------------------
  |  Branch (169:22): [True: 11.1M, False: 7.72k]
  ------------------
  170|  11.1M|            foldedNewlineCount++;
  171|  11.1M|          } else {
  172|  7.72k|            scalar += "\n";
  173|  7.72k|          }
  174|       |
  175|  11.2M|          if (!nextEmptyLine && foldedNewlineCount > 0) {
  ------------------
  |  Branch (175:15): [True: 102k, False: 11.1M]
  |  Branch (175:33): [True: 5.20k, False: 97.3k]
  ------------------
  176|  5.20k|            scalar += std::string(foldedNewlineCount - 1, '\n');
  177|  5.20k|            if (foldedNewlineStartedMoreIndented ||
  ------------------
  |  Branch (177:17): [True: 565, False: 4.64k]
  ------------------
  178|  4.64k|                nextMoreIndented | !foundNonEmptyLine) {
  ------------------
  |  Branch (178:17): [True: 1.17k, False: 3.46k]
  ------------------
  179|  1.74k|              scalar += "\n";
  180|  1.74k|            }
  181|  5.20k|            foldedNewlineCount = 0;
  182|  5.20k|          }
  183|  11.2M|          break;
  184|  8.16M|        case FOLD_FLOW:
  ------------------
  |  Branch (184:9): [True: 8.16M, False: 11.2M]
  ------------------
  185|  8.16M|          if (nextEmptyLine) {
  ------------------
  |  Branch (185:15): [True: 6.32M, False: 1.83M]
  ------------------
  186|  6.32M|            scalar += "\n";
  187|  6.32M|          } else if (!emptyLine && !escapedNewline) {
  ------------------
  |  Branch (187:22): [True: 1.82M, False: 14.9k]
  |  Branch (187:36): [True: 1.81M, False: 565]
  ------------------
  188|  1.81M|            scalar += " ";
  189|  1.81M|          }
  190|  8.16M|          break;
  191|  19.3M|      }
  192|  19.3M|    }
  193|       |
  194|  19.3M|    emptyLine = nextEmptyLine;
  195|  19.3M|    moreIndented = nextMoreIndented;
  196|  19.3M|    pastOpeningBreak = true;
  197|       |
  198|       |    // are we done via indentation?
  199|  19.3M|    if (!emptyLine && INPUT.column() < params.indent) {
  ------------------
  |  Branch (199:9): [True: 1.94M, False: 17.4M]
  |  Branch (199:23): [True: 1.00M, False: 936k]
  ------------------
  200|  1.00M|      params.leadingSpaces = true;
  201|  1.00M|      break;
  202|  1.00M|    }
  203|  19.3M|  }
  204|       |
  205|       |  // post-processing
  206|  2.92M|  if (params.trimTrailingSpaces) {
  ------------------
  |  Branch (206:7): [True: 2.91M, False: 11.7k]
  ------------------
  207|  2.91M|    std::size_t pos = scalar.find_last_not_of(" \t");
  208|  2.91M|    if (lastEscapedChar != std::string::npos) {
  ------------------
  |  Branch (208:9): [True: 13.6k, False: 2.89M]
  ------------------
  209|  13.6k|      if (pos < lastEscapedChar || pos == std::string::npos) {
  ------------------
  |  Branch (209:11): [True: 8.11k, False: 5.58k]
  |  Branch (209:36): [True: 546, False: 5.03k]
  ------------------
  210|  8.66k|        pos = lastEscapedChar;
  211|  8.66k|      }
  212|  13.6k|    }
  213|  2.91M|    if (pos < scalar.size()) {
  ------------------
  |  Branch (213:9): [True: 2.90M, False: 8.18k]
  ------------------
  214|  2.90M|      scalar.erase(pos + 1);
  215|  2.90M|    }
  216|  2.91M|  }
  217|       |
  218|  2.92M|  switch (params.chomp) {
  219|  10.4k|    case CLIP: {
  ------------------
  |  Branch (219:5): [True: 10.4k, False: 2.91M]
  ------------------
  220|  10.4k|      std::size_t pos = scalar.find_last_not_of('\n');
  221|  10.4k|      if (lastEscapedChar != std::string::npos) {
  ------------------
  |  Branch (221:11): [True: 2.20k, False: 8.27k]
  ------------------
  222|  2.20k|        if (pos < lastEscapedChar || pos == std::string::npos) {
  ------------------
  |  Branch (222:13): [True: 1.57k, False: 628]
  |  Branch (222:38): [True: 83, False: 545]
  ------------------
  223|  1.65k|          pos = lastEscapedChar;
  224|  1.65k|        }
  225|  2.20k|      }
  226|  10.4k|      if (pos == std::string::npos) {
  ------------------
  |  Branch (226:11): [True: 5.00k, False: 5.46k]
  ------------------
  227|  5.00k|        scalar.erase();
  228|  5.46k|      } else if (pos + 1 < scalar.size()) {
  ------------------
  |  Branch (228:18): [True: 1.04k, False: 4.42k]
  ------------------
  229|  1.04k|        scalar.erase(pos + 2);
  230|  1.04k|      }
  231|  10.4k|    } break;
  232|  2.91M|    case STRIP: {
  ------------------
  |  Branch (232:5): [True: 2.91M, False: 11.1k]
  ------------------
  233|  2.91M|      std::size_t pos = scalar.find_last_not_of('\n');
  234|  2.91M|      if (lastEscapedChar != std::string::npos) {
  ------------------
  |  Branch (234:11): [True: 13.6k, False: 2.89M]
  ------------------
  235|  13.6k|        if (pos < lastEscapedChar || pos == std::string::npos) {
  ------------------
  |  Branch (235:13): [True: 7.93k, False: 5.76k]
  |  Branch (235:38): [True: 263, False: 5.49k]
  ------------------
  236|  8.20k|          pos = lastEscapedChar;
  237|  8.20k|        }
  238|  13.6k|      }
  239|  2.91M|      if (pos == std::string::npos) {
  ------------------
  |  Branch (239:11): [True: 493, False: 2.91M]
  ------------------
  240|    493|        scalar.erase();
  241|  2.91M|      } else if (pos < scalar.size()) {
  ------------------
  |  Branch (241:18): [True: 2.90M, False: 8.18k]
  ------------------
  242|  2.90M|        scalar.erase(pos + 1);
  243|  2.90M|      }
  244|  2.91M|    } break;
  245|    361|    default:
  ------------------
  |  Branch (245:5): [True: 361, False: 2.92M]
  ------------------
  246|    361|      break;
  247|  2.92M|  }
  248|       |
  249|  2.92M|  return scalar;
  250|  2.92M|}

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

_ZN4YAML15ScanVerbatimTagERNS_6StreamE:
    9|    735|const std::string ScanVerbatimTag(Stream& INPUT) {
   10|    735|  std::string tag;
   11|       |
   12|       |  // eat the start character
   13|    735|  INPUT.get();
   14|       |
   15|  10.6k|  while (INPUT) {
  ------------------
  |  Branch (15:10): [True: 10.6k, False: 19]
  ------------------
   16|  10.6k|    if (INPUT.peek() == Keys::VerbatimTagEnd) {
  ------------------
  |  Branch (16:9): [True: 710, False: 9.92k]
  ------------------
   17|       |      // eat the end character
   18|    710|      INPUT.get();
   19|    710|      return tag;
   20|    710|    }
   21|       |
   22|  9.92k|    int n = Exp::URI().Match(INPUT);
   23|  9.92k|    if (n <= 0)
  ------------------
  |  Branch (23:9): [True: 6, False: 9.91k]
  ------------------
   24|      6|      break;
   25|       |
   26|  9.91k|    tag += INPUT.get(n);
   27|  9.91k|  }
   28|       |
   29|     25|  throw ParserException(INPUT.mark(), ErrorMsg::END_OF_VERBATIM_TAG);
   30|    735|}
_ZN4YAML13ScanTagHandleERNS_6StreamERb:
   32|  1.12M|const std::string ScanTagHandle(Stream& INPUT, bool& canBeHandle) {
   33|  1.12M|  std::string tag;
   34|  1.12M|  canBeHandle = true;
   35|  1.12M|  Mark firstNonWordChar;
   36|       |
   37|  9.98M|  while (INPUT) {
  ------------------
  |  Branch (37:10): [True: 9.98M, False: 309]
  ------------------
   38|  9.98M|    if (INPUT.peek() == Keys::Tag) {
  ------------------
  |  Branch (38:9): [True: 2.81k, False: 9.98M]
  ------------------
   39|  2.81k|      if (!canBeHandle)
  ------------------
  |  Branch (39:11): [True: 4, False: 2.80k]
  ------------------
   40|      4|        throw ParserException(firstNonWordChar, ErrorMsg::CHAR_IN_TAG_HANDLE);
   41|  2.80k|      break;
   42|  2.81k|    }
   43|       |
   44|  9.98M|    int n = 0;
   45|  9.98M|    if (canBeHandle) {
  ------------------
  |  Branch (45:9): [True: 8.10M, False: 1.88M]
  ------------------
   46|  8.10M|      n = Exp::Word().Match(INPUT);
   47|  8.10M|      if (n <= 0) {
  ------------------
  |  Branch (47:11): [True: 1.12M, False: 6.98M]
  ------------------
   48|  1.12M|        canBeHandle = false;
   49|  1.12M|        firstNonWordChar = INPUT.mark();
   50|  1.12M|      }
   51|  8.10M|    }
   52|       |
   53|  9.98M|    if (!canBeHandle)
  ------------------
  |  Branch (53:9): [True: 3.00M, False: 6.98M]
  ------------------
   54|  3.00M|      n = Exp::Tag().Match(INPUT);
   55|       |
   56|  9.98M|    if (n <= 0)
  ------------------
  |  Branch (56:9): [True: 1.12M, False: 8.86M]
  ------------------
   57|  1.12M|      break;
   58|       |
   59|  8.86M|    tag += INPUT.get(n);
   60|  8.86M|  }
   61|       |
   62|  1.12M|  return tag;
   63|  1.12M|}
_ZN4YAML13ScanTagSuffixERNS_6StreamE:
   65|  2.80k|const std::string ScanTagSuffix(Stream& INPUT) {
   66|  2.80k|  std::string tag;
   67|       |
   68|   112k|  while (INPUT) {
  ------------------
  |  Branch (68:10): [True: 111k, False: 96]
  ------------------
   69|   111k|    int n = Exp::Tag().Match(INPUT);
   70|   111k|    if (n <= 0)
  ------------------
  |  Branch (70:9): [True: 2.71k, False: 109k]
  ------------------
   71|  2.71k|      break;
   72|       |
   73|   109k|    tag += INPUT.get(n);
   74|   109k|  }
   75|       |
   76|  2.80k|  if (tag.empty())
  ------------------
  |  Branch (76:7): [True: 15, False: 2.79k]
  ------------------
   77|     15|    throw ParserException(INPUT.mark(), ErrorMsg::TAG_WITH_NO_SUFFIX);
   78|       |
   79|  2.79k|  return tag;
   80|  2.80k|}

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

_ZN4YAML7Scanner9SimpleKeyC2ERKNS_4MarkEm:
    8|  41.0M|    : mark(mark_),
    9|  41.0M|      flowLevel(flowLevel_),
   10|  41.0M|      pIndent(nullptr),
   11|  41.0M|      pMapStart(nullptr),
   12|  41.0M|      pKey(nullptr) {}
_ZN4YAML7Scanner9SimpleKey8ValidateEv:
   14|  1.34M|void Scanner::SimpleKey::Validate() {
   15|       |  // Note: pIndent will *not* be garbage here;
   16|       |  //       we "garbage collect" them so we can
   17|       |  //       always refer to them
   18|  1.34M|  if (pIndent)
  ------------------
  |  Branch (18:7): [True: 53.0k, False: 1.28M]
  ------------------
   19|  53.0k|    pIndent->status = IndentMarker::VALID;
   20|  1.34M|  if (pMapStart)
  ------------------
  |  Branch (20:7): [True: 53.0k, False: 1.28M]
  ------------------
   21|  53.0k|    pMapStart->status = Token::VALID;
   22|  1.34M|  if (pKey)
  ------------------
  |  Branch (22:7): [True: 1.34M, False: 0]
  ------------------
   23|  1.34M|    pKey->status = Token::VALID;
   24|  1.34M|}
_ZN4YAML7Scanner9SimpleKey10InvalidateEv:
   26|  2.90M|void Scanner::SimpleKey::Invalidate() {
   27|  2.90M|  if (pIndent)
  ------------------
  |  Branch (27:7): [True: 2.09M, False: 803k]
  ------------------
   28|  2.09M|    pIndent->status = IndentMarker::INVALID;
   29|  2.90M|  if (pMapStart)
  ------------------
  |  Branch (29:7): [True: 2.09M, False: 803k]
  ------------------
   30|  2.09M|    pMapStart->status = Token::INVALID;
   31|  2.90M|  if (pKey)
  ------------------
  |  Branch (31:7): [True: 2.90M, False: 0]
  ------------------
   32|  2.90M|    pKey->status = Token::INVALID;
   33|  2.90M|}
_ZNK4YAML7Scanner27CanInsertPotentialSimpleKeyEv:
   36|  41.6M|bool Scanner::CanInsertPotentialSimpleKey() const {
   37|  41.6M|  if (!m_simpleKeyAllowed)
  ------------------
  |  Branch (37:7): [True: 618k, False: 41.0M]
  ------------------
   38|   618k|    return false;
   39|       |
   40|  41.0M|  return !ExistsActiveSimpleKey();
   41|  41.6M|}
_ZNK4YAML7Scanner21ExistsActiveSimpleKeyEv:
   47|  41.0M|bool Scanner::ExistsActiveSimpleKey() const {
   48|  41.0M|  if (m_simpleKeys.empty())
  ------------------
  |  Branch (48:7): [True: 2.18M, False: 38.8M]
  ------------------
   49|  2.18M|    return false;
   50|       |
   51|  38.8M|  const SimpleKey& key = m_simpleKeys.top();
   52|  38.8M|  return key.flowLevel == GetFlowLevel();
   53|  41.0M|}
_ZN4YAML7Scanner24InsertPotentialSimpleKeyEv:
   58|  41.6M|void Scanner::InsertPotentialSimpleKey() {
   59|  41.6M|  if (!CanInsertPotentialSimpleKey())
  ------------------
  |  Branch (59:7): [True: 622k, False: 41.0M]
  ------------------
   60|   622k|    return;
   61|       |
   62|  41.0M|  SimpleKey key(INPUT.mark(), GetFlowLevel());
   63|       |
   64|       |  // first add a map start, if necessary
   65|  41.0M|  if (InBlockContext()) {
  ------------------
  |  Branch (65:7): [True: 2.17M, False: 38.8M]
  ------------------
   66|  2.17M|    key.pIndent = PushIndentTo(INPUT.column(), IndentMarker::MAP);
   67|  2.17M|    if (key.pIndent) {
  ------------------
  |  Branch (67:9): [True: 2.15M, False: 18.8k]
  ------------------
   68|  2.15M|      key.pIndent->status = IndentMarker::UNKNOWN;
   69|  2.15M|      key.pMapStart = key.pIndent->pStartToken;
   70|  2.15M|      key.pMapStart->status = Token::UNVERIFIED;
   71|  2.15M|    }
   72|  2.17M|  }
   73|       |
   74|       |  // then add the (now unverified) key
   75|  41.0M|  m_tokens.push(Token(Token::KEY, INPUT.mark()));
   76|  41.0M|  key.pKey = &m_tokens.back();
   77|  41.0M|  key.pKey->status = Token::UNVERIFIED;
   78|       |
   79|  41.0M|  m_simpleKeys.push(key);
   80|  41.0M|}
_ZN4YAML7Scanner19InvalidateSimpleKeyEv:
   84|  10.6M|void Scanner::InvalidateSimpleKey() {
   85|  10.6M|  if (m_simpleKeys.empty())
  ------------------
  |  Branch (85:7): [True: 7.74M, False: 2.91M]
  ------------------
   86|  7.74M|    return;
   87|       |
   88|       |  // grab top key
   89|  2.91M|  SimpleKey& key = m_simpleKeys.top();
   90|  2.91M|  if (key.flowLevel != GetFlowLevel())
  ------------------
  |  Branch (90:7): [True: 363k, False: 2.54M]
  ------------------
   91|   363k|    return;
   92|       |
   93|  2.54M|  key.Invalidate();
   94|  2.54M|  m_simpleKeys.pop();
   95|  2.54M|}
_ZN4YAML7Scanner15VerifySimpleKeyEv:
  100|  8.51M|bool Scanner::VerifySimpleKey() {
  101|  8.51M|  if (m_simpleKeys.empty())
  ------------------
  |  Branch (101:7): [True: 6.69M, False: 1.82M]
  ------------------
  102|  6.69M|    return false;
  103|       |
  104|       |  // grab top key
  105|  1.82M|  SimpleKey key = m_simpleKeys.top();
  106|       |
  107|       |  // only validate if we're in the correct flow level
  108|  1.82M|  if (key.flowLevel != GetFlowLevel())
  ------------------
  |  Branch (108:7): [True: 124k, False: 1.69M]
  ------------------
  109|   124k|    return false;
  110|       |
  111|  1.69M|  m_simpleKeys.pop();
  112|       |
  113|  1.69M|  bool isValid = true;
  114|       |
  115|       |  // needs to be less than 1024 characters and inline
  116|  1.69M|  if (INPUT.line() != key.mark.line || INPUT.pos() - key.mark.pos > 1024)
  ------------------
  |  Branch (116:7): [True: 36.7k, False: 1.65M]
  |  Branch (116:40): [True: 316k, False: 1.34M]
  ------------------
  117|   353k|    isValid = false;
  118|       |
  119|       |  // invalidate key
  120|  1.69M|  if (isValid)
  ------------------
  |  Branch (120:7): [True: 1.34M, False: 353k]
  ------------------
  121|  1.34M|    key.Validate();
  122|   353k|  else
  123|   353k|    key.Invalidate();
  124|       |
  125|  1.69M|  return isValid;
  126|  1.82M|}
_ZN4YAML7Scanner16PopAllSimpleKeysEv:
  128|   557k|void Scanner::PopAllSimpleKeys() {
  129|  32.1M|  while (!m_simpleKeys.empty())
  ------------------
  |  Branch (129:10): [True: 31.6M, False: 557k]
  ------------------
  130|  31.6M|    m_simpleKeys.pop();
  131|   557k|}

_ZN4YAML15SingleDocParserC2ERNS_7ScannerERKNS_10DirectivesE:
   18|   508k|    : m_scanner(scanner),
   19|   508k|      m_directives(directives),
   20|   508k|      m_pCollectionStack(new CollectionStack),
   21|   508k|      m_anchors{},
   22|   508k|      m_curAnchor(0) {}
_ZN4YAML15SingleDocParserD2Ev:
   24|   508k|SingleDocParser::~SingleDocParser() = default;
_ZN4YAML15SingleDocParser14HandleDocumentERNS_12EventHandlerE:
   29|   508k|void SingleDocParser::HandleDocument(EventHandler& eventHandler) {
   30|   508k|  assert(!m_scanner.empty());  // guaranteed that there are tokens
   31|   508k|  assert(!m_curAnchor);
   32|       |
   33|   508k|  eventHandler.OnDocumentStart(m_scanner.peek().mark);
   34|       |
   35|       |  // eat doc start
   36|   508k|  if (m_scanner.peek().type == Token::DOC_START)
  ------------------
  |  Branch (36:7): [True: 362k, False: 145k]
  ------------------
   37|   362k|    m_scanner.pop();
   38|       |
   39|       |  // recurse!
   40|   508k|  HandleNode(eventHandler);
   41|       |
   42|   508k|  eventHandler.OnDocumentEnd();
   43|       |
   44|       |  // check if any tokens left after the text
   45|   508k|  if (!m_scanner.empty() && m_scanner.peek().type != Token::DOC_END
  ------------------
  |  Branch (45:7): [True: 504k, False: 4.19k]
  |  Branch (45:29): [True: 363k, False: 140k]
  ------------------
   46|   363k|      && m_scanner.peek().type != Token::DOC_START)
  ------------------
  |  Branch (46:10): [True: 360, False: 362k]
  ------------------
   47|    360|    throw ParserException(m_scanner.mark(), ErrorMsg::UNEXPECTED_TOKEN_AFTER_DOC);
   48|       |
   49|       |  // and finally eat any doc ends we see
   50|   507k|  if (!m_scanner.empty() && m_scanner.peek().type == Token::DOC_END)
  ------------------
  |  Branch (50:7): [True: 503k, False: 4.19k]
  |  Branch (50:29): [True: 140k, False: 362k]
  ------------------
   51|   140k|    m_scanner.pop();
   52|   507k|}
_ZN4YAML15SingleDocParser10HandleNodeERNS_12EventHandlerE:
   54|  1.48M|void SingleDocParser::HandleNode(EventHandler& eventHandler) {
   55|  1.48M|  DepthGuard<500> depthguard(depth, m_scanner.mark(), ErrorMsg::BAD_FILE);
   56|       |
   57|       |  // an empty node *is* a possibility
   58|  1.48M|  if (m_scanner.empty()) {
  ------------------
  |  Branch (58:7): [True: 66, False: 1.48M]
  ------------------
   59|     66|    eventHandler.OnNull(m_scanner.mark(), NullAnchor);
   60|     66|    return;
   61|     66|  }
   62|       |
   63|       |  // save location
   64|  1.48M|  Mark mark = m_scanner.peek().mark;
   65|       |
   66|       |  // special case: a value node by itself must be a map, with no header
   67|  1.48M|  if (m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (67:7): [True: 6.89k, False: 1.47M]
  ------------------
   68|  6.89k|    eventHandler.OnMapStart(mark, "?", NullAnchor, EmitterStyle::Default);
   69|  6.89k|    HandleMap(eventHandler);
   70|  6.89k|    eventHandler.OnMapEnd();
   71|  6.89k|    return;
   72|  6.89k|  }
   73|       |
   74|       |  // special case: an alias node
   75|  1.47M|  if (m_scanner.peek().type == Token::ALIAS) {
  ------------------
  |  Branch (75:7): [True: 1.27k, False: 1.47M]
  ------------------
   76|  1.27k|    eventHandler.OnAlias(mark, LookupAnchor(mark, m_scanner.peek().value));
   77|  1.27k|    m_scanner.pop();
   78|  1.27k|    return;
   79|  1.27k|  }
   80|       |
   81|  1.47M|  std::string tag;
   82|  1.47M|  std::string anchor_name;
   83|  1.47M|  anchor_t anchor;
   84|  1.47M|  ParseProperties(tag, anchor, anchor_name);
   85|       |
   86|  1.47M|  if (!anchor_name.empty())
  ------------------
  |  Branch (86:7): [True: 392k, False: 1.08M]
  ------------------
   87|   392k|    eventHandler.OnAnchor(mark, anchor_name);
   88|       |
   89|       |  // after parsing properties, an empty node is again a possibility
   90|  1.47M|  if (m_scanner.empty()) {
  ------------------
  |  Branch (90:7): [True: 646, False: 1.47M]
  ------------------
   91|    646|    eventHandler.OnNull(mark, anchor);
   92|    646|    return;
   93|    646|  }
   94|       |
   95|  1.47M|  const Token& token = m_scanner.peek();
   96|       |
   97|       |  // add non-specific tags
   98|  1.47M|  if (tag.empty())
  ------------------
  |  Branch (98:7): [True: 1.46M, False: 6.79k]
  ------------------
   99|  1.46M|    tag = (token.type == Token::NON_PLAIN_SCALAR ? "!" : "?");
  ------------------
  |  Branch (99:12): [True: 903, False: 1.46M]
  ------------------
  100|       |
  101|  1.47M|  if (token.type == Token::PLAIN_SCALAR
  ------------------
  |  Branch (101:7): [True: 402k, False: 1.07M]
  ------------------
  102|   402k|      && tag.compare("?") == 0 && IsNullString(token.value.data(), token.value.size())) {
  ------------------
  |  Branch (102:10): [True: 400k, False: 1.25k]
  |  Branch (102:35): [True: 12.0k, False: 388k]
  ------------------
  103|  12.0k|    eventHandler.OnNull(mark, anchor);
  104|  12.0k|    m_scanner.pop();
  105|  12.0k|    return;
  106|  12.0k|  }
  107|       |
  108|       |  // now split based on what kind of node we should be
  109|  1.46M|  switch (token.type) {
  110|   390k|    case Token::PLAIN_SCALAR:
  ------------------
  |  Branch (110:5): [True: 390k, False: 1.07M]
  ------------------
  111|   391k|    case Token::NON_PLAIN_SCALAR:
  ------------------
  |  Branch (111:5): [True: 959, False: 1.46M]
  ------------------
  112|   391k|      eventHandler.OnScalar(mark, tag, anchor, token.value);
  113|   391k|      m_scanner.pop();
  114|   391k|      return;
  115|  34.3k|    case Token::FLOW_SEQ_START:
  ------------------
  |  Branch (115:5): [True: 34.3k, False: 1.42M]
  ------------------
  116|  34.3k|      eventHandler.OnSequenceStart(mark, tag, anchor, EmitterStyle::Flow);
  117|  34.3k|      HandleSequence(eventHandler);
  118|  34.3k|      eventHandler.OnSequenceEnd();
  119|  34.3k|      return;
  120|  7.76k|    case Token::BLOCK_SEQ_START:
  ------------------
  |  Branch (120:5): [True: 7.76k, False: 1.45M]
  ------------------
  121|  7.76k|      eventHandler.OnSequenceStart(mark, tag, anchor, EmitterStyle::Block);
  122|  7.76k|      HandleSequence(eventHandler);
  123|  7.76k|      eventHandler.OnSequenceEnd();
  124|  7.76k|      return;
  125|  37.5k|    case Token::FLOW_MAP_START:
  ------------------
  |  Branch (125:5): [True: 37.5k, False: 1.42M]
  ------------------
  126|  37.5k|      eventHandler.OnMapStart(mark, tag, anchor, EmitterStyle::Flow);
  127|  37.5k|      HandleMap(eventHandler);
  128|  37.5k|      eventHandler.OnMapEnd();
  129|  37.5k|      return;
  130|  43.5k|    case Token::BLOCK_MAP_START:
  ------------------
  |  Branch (130:5): [True: 43.5k, False: 1.42M]
  ------------------
  131|  43.5k|      eventHandler.OnMapStart(mark, tag, anchor, EmitterStyle::Block);
  132|  43.5k|      HandleMap(eventHandler);
  133|  43.5k|      eventHandler.OnMapEnd();
  134|  43.5k|      return;
  135|  34.2k|    case Token::KEY:
  ------------------
  |  Branch (135:5): [True: 34.2k, False: 1.42M]
  ------------------
  136|       |      // compact maps can only go in a flow sequence
  137|  34.2k|      if (m_pCollectionStack->GetCurCollectionType() ==
  ------------------
  |  Branch (137:11): [True: 33.3k, False: 918]
  ------------------
  138|  34.2k|          CollectionType::FlowSeq) {
  139|  33.3k|        eventHandler.OnMapStart(mark, tag, anchor, EmitterStyle::Flow);
  140|  33.3k|        HandleMap(eventHandler);
  141|  33.3k|        eventHandler.OnMapEnd();
  142|  33.3k|        return;
  143|  33.3k|      }
  144|    918|      break;
  145|   914k|    default:
  ------------------
  |  Branch (145:5): [True: 914k, False: 548k]
  ------------------
  146|   914k|      break;
  147|  1.46M|  }
  148|       |
  149|   915k|  if (tag == "?")
  ------------------
  |  Branch (149:7): [True: 913k, False: 2.48k]
  ------------------
  150|   913k|    eventHandler.OnNull(mark, anchor);
  151|  2.48k|  else
  152|  2.48k|    eventHandler.OnScalar(mark, tag, anchor, "");
  153|   915k|}
_ZN4YAML15SingleDocParser14HandleSequenceERNS_12EventHandlerE:
  155|  42.1k|void SingleDocParser::HandleSequence(EventHandler& eventHandler) {
  156|       |  // split based on start token
  157|  42.1k|  switch (m_scanner.peek().type) {
  158|  7.76k|    case Token::BLOCK_SEQ_START:
  ------------------
  |  Branch (158:5): [True: 7.76k, False: 34.3k]
  ------------------
  159|  7.76k|      HandleBlockSequence(eventHandler);
  160|  7.76k|      break;
  161|  34.3k|    case Token::FLOW_SEQ_START:
  ------------------
  |  Branch (161:5): [True: 34.3k, False: 7.76k]
  ------------------
  162|  34.3k|      HandleFlowSequence(eventHandler);
  163|  34.3k|      break;
  164|      0|    default:
  ------------------
  |  Branch (164:5): [True: 0, False: 42.1k]
  ------------------
  165|      0|      break;
  166|  42.1k|  }
  167|  42.1k|}
_ZN4YAML15SingleDocParser19HandleBlockSequenceERNS_12EventHandlerE:
  169|  7.76k|void SingleDocParser::HandleBlockSequence(EventHandler& eventHandler) {
  170|       |  // eat start token
  171|  7.76k|  m_scanner.pop();
  172|  7.76k|  m_pCollectionStack->PushCollectionType(CollectionType::BlockSeq);
  173|       |
  174|  16.4k|  while (true) {
  ------------------
  |  Branch (174:10): [True: 14.1k, Folded]
  ------------------
  175|  14.1k|    if (m_scanner.empty())
  ------------------
  |  Branch (175:9): [True: 0, False: 14.1k]
  ------------------
  176|      0|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_SEQ);
  177|       |
  178|  14.1k|    Token token = m_scanner.peek();
  179|  14.1k|    if (token.type != Token::BLOCK_ENTRY && token.type != Token::BLOCK_SEQ_END)
  ------------------
  |  Branch (179:9): [True: 5.45k, False: 8.70k]
  |  Branch (179:45): [True: 11, False: 5.44k]
  ------------------
  180|     11|      throw ParserException(token.mark, ErrorMsg::END_OF_SEQ);
  181|       |
  182|  14.1k|    m_scanner.pop();
  183|  14.1k|    if (token.type == Token::BLOCK_SEQ_END)
  ------------------
  |  Branch (183:9): [True: 5.44k, False: 8.70k]
  ------------------
  184|  5.44k|      break;
  185|       |
  186|       |    // check for null
  187|  8.70k|    if (!m_scanner.empty()) {
  ------------------
  |  Branch (187:9): [True: 8.66k, False: 36]
  ------------------
  188|  8.66k|      const Token& nextToken = m_scanner.peek();
  189|  8.66k|      if (nextToken.type == Token::BLOCK_ENTRY ||
  ------------------
  |  Branch (189:11): [True: 707, False: 7.95k]
  ------------------
  190|  7.95k|          nextToken.type == Token::BLOCK_SEQ_END) {
  ------------------
  |  Branch (190:11): [True: 2.35k, False: 5.60k]
  ------------------
  191|  3.06k|        eventHandler.OnNull(nextToken.mark, NullAnchor);
  192|  3.06k|        continue;
  193|  3.06k|      }
  194|  8.66k|    }
  195|       |
  196|  5.63k|    HandleNode(eventHandler);
  197|  5.63k|  }
  198|       |
  199|  7.75k|  m_pCollectionStack->PopCollectionType(CollectionType::BlockSeq);
  200|  7.75k|}
_ZN4YAML15SingleDocParser18HandleFlowSequenceERNS_12EventHandlerE:
  202|  34.3k|void SingleDocParser::HandleFlowSequence(EventHandler& eventHandler) {
  203|       |  // eat start token
  204|  34.3k|  m_scanner.pop();
  205|  34.3k|  m_pCollectionStack->PushCollectionType(CollectionType::FlowSeq);
  206|       |
  207|   841k|  while (true) {
  ------------------
  |  Branch (207:10): [True: 809k, Folded]
  ------------------
  208|   809k|    if (m_scanner.empty())
  ------------------
  |  Branch (208:9): [True: 167, False: 809k]
  ------------------
  209|    167|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_SEQ_FLOW);
  210|       |
  211|       |    // first check for end
  212|   809k|    if (m_scanner.peek().type == Token::FLOW_SEQ_END) {
  ------------------
  |  Branch (212:9): [True: 892, False: 808k]
  ------------------
  213|    892|      m_scanner.pop();
  214|    892|      break;
  215|    892|    }
  216|       |
  217|       |    // then read the node
  218|   808k|    HandleNode(eventHandler);
  219|       |
  220|   808k|    if (m_scanner.empty())
  ------------------
  |  Branch (220:9): [True: 577, False: 807k]
  ------------------
  221|    577|      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|   807k|    Token& token = m_scanner.peek();
  226|   807k|    if (token.type == Token::FLOW_ENTRY)
  ------------------
  |  Branch (226:9): [True: 774k, False: 33.5k]
  ------------------
  227|   774k|      m_scanner.pop();
  228|  33.5k|    else if (token.type != Token::FLOW_SEQ_END)
  ------------------
  |  Branch (228:14): [True: 178, False: 33.4k]
  ------------------
  229|    178|      throw ParserException(token.mark, ErrorMsg::END_OF_SEQ_FLOW);
  230|   807k|  }
  231|       |
  232|  33.4k|  m_pCollectionStack->PopCollectionType(CollectionType::FlowSeq);
  233|  33.4k|}
_ZN4YAML15SingleDocParser9HandleMapERNS_12EventHandlerE:
  235|   121k|void SingleDocParser::HandleMap(EventHandler& eventHandler) {
  236|       |  // split based on start token
  237|   121k|  switch (m_scanner.peek().type) {
  238|  43.5k|    case Token::BLOCK_MAP_START:
  ------------------
  |  Branch (238:5): [True: 43.5k, False: 77.7k]
  ------------------
  239|  43.5k|      HandleBlockMap(eventHandler);
  240|  43.5k|      break;
  241|  37.5k|    case Token::FLOW_MAP_START:
  ------------------
  |  Branch (241:5): [True: 37.5k, False: 83.8k]
  ------------------
  242|  37.5k|      HandleFlowMap(eventHandler);
  243|  37.5k|      break;
  244|  33.3k|    case Token::KEY:
  ------------------
  |  Branch (244:5): [True: 33.3k, False: 87.9k]
  ------------------
  245|  33.3k|      HandleCompactMap(eventHandler);
  246|  33.3k|      break;
  247|  6.89k|    case Token::VALUE:
  ------------------
  |  Branch (247:5): [True: 6.89k, False: 114k]
  ------------------
  248|  6.89k|      HandleCompactMapWithNoKey(eventHandler);
  249|  6.89k|      break;
  250|      0|    default:
  ------------------
  |  Branch (250:5): [True: 0, False: 121k]
  ------------------
  251|      0|      break;
  252|   121k|  }
  253|   121k|}
_ZN4YAML15SingleDocParser14HandleBlockMapERNS_12EventHandlerE:
  255|  43.5k|void SingleDocParser::HandleBlockMap(EventHandler& eventHandler) {
  256|       |  // eat start token
  257|  43.5k|  m_scanner.pop();
  258|  43.5k|  m_pCollectionStack->PushCollectionType(CollectionType::BlockMap);
  259|       |
  260|  91.5k|  while (true) {
  ------------------
  |  Branch (260:10): [True: 87.6k, Folded]
  ------------------
  261|  87.6k|    if (m_scanner.empty())
  ------------------
  |  Branch (261:9): [True: 0, False: 87.6k]
  ------------------
  262|      0|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_MAP);
  263|       |
  264|  87.6k|    Token token = m_scanner.peek();
  265|  87.6k|    if (token.type != Token::KEY && token.type != Token::VALUE &&
  ------------------
  |  Branch (265:9): [True: 65.4k, False: 22.2k]
  |  Branch (265:37): [True: 39.7k, False: 25.6k]
  ------------------
  266|  39.7k|        token.type != Token::BLOCK_MAP_END)
  ------------------
  |  Branch (266:9): [True: 90, False: 39.6k]
  ------------------
  267|     90|      throw ParserException(token.mark, ErrorMsg::END_OF_MAP);
  268|       |
  269|  87.5k|    if (token.type == Token::BLOCK_MAP_END) {
  ------------------
  |  Branch (269:9): [True: 39.6k, False: 47.9k]
  ------------------
  270|  39.6k|      m_scanner.pop();
  271|  39.6k|      break;
  272|  39.6k|    }
  273|       |
  274|       |    // grab key (if non-null)
  275|  47.9k|    if (token.type == Token::KEY) {
  ------------------
  |  Branch (275:9): [True: 22.2k, False: 25.6k]
  ------------------
  276|  22.2k|      m_scanner.pop();
  277|  22.2k|      HandleNode(eventHandler);
  278|  25.6k|    } else {
  279|  25.6k|      eventHandler.OnNull(token.mark, NullAnchor);
  280|  25.6k|    }
  281|       |
  282|       |    // now grab value (optional)
  283|  47.9k|    if (!m_scanner.empty() && m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (283:9): [True: 45.5k, False: 2.43k]
  |  Branch (283:31): [True: 33.7k, False: 11.7k]
  ------------------
  284|  33.7k|      m_scanner.pop();
  285|  33.7k|      HandleNode(eventHandler);
  286|  33.7k|    } else {
  287|  14.1k|      eventHandler.OnNull(token.mark, NullAnchor);
  288|  14.1k|    }
  289|  47.9k|  }
  290|       |
  291|  43.4k|  m_pCollectionStack->PopCollectionType(CollectionType::BlockMap);
  292|  43.4k|}
_ZN4YAML15SingleDocParser13HandleFlowMapERNS_12EventHandlerE:
  294|  37.5k|void SingleDocParser::HandleFlowMap(EventHandler& eventHandler) {
  295|       |  // eat start token
  296|  37.5k|  m_scanner.pop();
  297|  37.5k|  m_pCollectionStack->PushCollectionType(CollectionType::FlowMap);
  298|       |
  299|   933k|  while (true) {
  ------------------
  |  Branch (299:10): [True: 897k, Folded]
  ------------------
  300|   897k|    if (m_scanner.empty())
  ------------------
  |  Branch (300:9): [True: 154, False: 897k]
  ------------------
  301|    154|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_MAP_FLOW);
  302|       |
  303|   897k|    Token& token = m_scanner.peek();
  304|   897k|    const Mark mark = token.mark;
  305|       |    // first check for end
  306|   897k|    if (token.type == Token::FLOW_MAP_END) {
  ------------------
  |  Branch (306:9): [True: 1.06k, False: 896k]
  ------------------
  307|  1.06k|      m_scanner.pop();
  308|  1.06k|      break;
  309|  1.06k|    }
  310|       |
  311|       |    // grab key (if non-null)
  312|   896k|    if (token.type == Token::KEY) {
  ------------------
  |  Branch (312:9): [True: 50.9k, False: 845k]
  ------------------
  313|  50.9k|      m_scanner.pop();
  314|  50.9k|      HandleNode(eventHandler);
  315|   845k|    } else {
  316|   845k|      eventHandler.OnNull(mark, NullAnchor);
  317|   845k|    }
  318|       |
  319|       |    // now grab value (optional)
  320|   896k|    if (!m_scanner.empty() && m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (320:9): [True: 860k, False: 36.0k]
  |  Branch (320:31): [True: 14.7k, False: 845k]
  ------------------
  321|  14.7k|      m_scanner.pop();
  322|  14.7k|      HandleNode(eventHandler);
  323|   881k|    } else {
  324|   881k|      eventHandler.OnNull(mark, NullAnchor);
  325|   881k|    }
  326|       |
  327|   896k|    if (m_scanner.empty())
  ------------------
  |  Branch (327:9): [True: 240, False: 896k]
  ------------------
  328|    240|      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|   896k|    Token& nextToken = m_scanner.peek();
  333|   896k|    if (nextToken.type == Token::FLOW_ENTRY)
  ------------------
  |  Branch (333:9): [True: 859k, False: 36.8k]
  ------------------
  334|   859k|      m_scanner.pop();
  335|  36.8k|    else if (nextToken.type != Token::FLOW_MAP_END)
  ------------------
  |  Branch (335:14): [True: 166, False: 36.7k]
  ------------------
  336|    166|      throw ParserException(nextToken.mark, ErrorMsg::END_OF_MAP_FLOW);
  337|   896k|  }
  338|       |
  339|  36.9k|  m_pCollectionStack->PopCollectionType(CollectionType::FlowMap);
  340|  36.9k|}
_ZN4YAML15SingleDocParser16HandleCompactMapERNS_12EventHandlerE:
  343|  33.3k|void SingleDocParser::HandleCompactMap(EventHandler& eventHandler) {
  344|  33.3k|  m_pCollectionStack->PushCollectionType(CollectionType::CompactMap);
  345|       |
  346|       |  // grab key
  347|  33.3k|  Mark mark = m_scanner.peek().mark;
  348|  33.3k|  m_scanner.pop();
  349|  33.3k|  HandleNode(eventHandler);
  350|       |
  351|       |  // now grab value (optional)
  352|  33.3k|  if (!m_scanner.empty() && m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (352:7): [True: 860, False: 32.4k]
  |  Branch (352:29): [True: 478, False: 382]
  ------------------
  353|    478|    m_scanner.pop();
  354|    478|    HandleNode(eventHandler);
  355|  32.8k|  } else {
  356|  32.8k|    eventHandler.OnNull(mark, NullAnchor);
  357|  32.8k|  }
  358|       |
  359|  33.3k|  m_pCollectionStack->PopCollectionType(CollectionType::CompactMap);
  360|  33.3k|}
_ZN4YAML15SingleDocParser25HandleCompactMapWithNoKeyERNS_12EventHandlerE:
  363|  6.89k|void SingleDocParser::HandleCompactMapWithNoKey(EventHandler& eventHandler) {
  364|  6.89k|  m_pCollectionStack->PushCollectionType(CollectionType::CompactMap);
  365|       |
  366|       |  // null key
  367|  6.89k|  eventHandler.OnNull(m_scanner.peek().mark, NullAnchor);
  368|       |
  369|       |  // grab value
  370|  6.89k|  m_scanner.pop();
  371|  6.89k|  HandleNode(eventHandler);
  372|       |
  373|  6.89k|  m_pCollectionStack->PopCollectionType(CollectionType::CompactMap);
  374|  6.89k|}
_ZN4YAML15SingleDocParser15ParsePropertiesERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERmS8_:
  379|  1.47M|                                      std::string& anchor_name) {
  380|  1.47M|  tag.clear();
  381|  1.47M|  anchor_name.clear();
  382|  1.47M|  anchor = NullAnchor;
  383|       |
  384|  1.87M|  while (true) {
  ------------------
  |  Branch (384:10): [True: 1.87M, Folded]
  ------------------
  385|  1.87M|    if (m_scanner.empty())
  ------------------
  |  Branch (385:9): [True: 646, False: 1.87M]
  ------------------
  386|    646|      return;
  387|       |
  388|  1.87M|    switch (m_scanner.peek().type) {
  389|  7.24k|      case Token::TAG:
  ------------------
  |  Branch (389:7): [True: 7.24k, False: 1.86M]
  ------------------
  390|  7.24k|        ParseTag(tag);
  391|  7.24k|        break;
  392|   392k|      case Token::ANCHOR:
  ------------------
  |  Branch (392:7): [True: 392k, False: 1.48M]
  ------------------
  393|   392k|        ParseAnchor(anchor, anchor_name);
  394|   392k|        break;
  395|  1.47M|      default:
  ------------------
  |  Branch (395:7): [True: 1.47M, False: 399k]
  ------------------
  396|  1.47M|        return;
  397|  1.87M|    }
  398|  1.87M|  }
  399|  1.47M|}
_ZN4YAML15SingleDocParser8ParseTagERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  401|  7.24k|void SingleDocParser::ParseTag(std::string& tag) {
  402|  7.24k|  Token& token = m_scanner.peek();
  403|  7.24k|  if (!tag.empty())
  ------------------
  |  Branch (403:7): [True: 53, False: 7.19k]
  ------------------
  404|     53|    throw ParserException(token.mark, ErrorMsg::MULTIPLE_TAGS);
  405|       |
  406|  7.19k|  Tag tagInfo(token);
  407|  7.19k|  tag = tagInfo.Translate(m_directives);
  408|  7.19k|  m_scanner.pop();
  409|  7.19k|}
_ZN4YAML15SingleDocParser11ParseAnchorERmRNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  411|   392k|void SingleDocParser::ParseAnchor(anchor_t& anchor, std::string& anchor_name) {
  412|   392k|  Token& token = m_scanner.peek();
  413|   392k|  if (anchor)
  ------------------
  |  Branch (413:7): [True: 13, False: 392k]
  ------------------
  414|     13|    throw ParserException(token.mark, ErrorMsg::MULTIPLE_ANCHORS);
  415|       |
  416|   392k|  anchor_name = token.value;
  417|   392k|  anchor = RegisterAnchor(token.value);
  418|   392k|  m_scanner.pop();
  419|   392k|}
_ZN4YAML15SingleDocParser14RegisterAnchorERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  421|   392k|anchor_t SingleDocParser::RegisterAnchor(const std::string& name) {
  422|   392k|  if (name.empty())
  ------------------
  |  Branch (422:7): [True: 0, False: 392k]
  ------------------
  423|      0|    return NullAnchor;
  424|       |
  425|   392k|  return m_anchors[name] = ++m_curAnchor;
  426|   392k|}
_ZNK4YAML15SingleDocParser12LookupAnchorERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  429|  1.27k|                                       const std::string& name) const {
  430|  1.27k|  auto it = m_anchors.find(name);
  431|  1.27k|  if (it == m_anchors.end()) {
  ------------------
  |  Branch (431:7): [True: 311, False: 966]
  ------------------
  432|    311|    std::stringstream ss;
  433|    311|    ss << ErrorMsg::UNKNOWN_ANCHOR << name;
  434|    311|    throw ParserException(mark, ss.str());
  435|    311|  }
  436|       |
  437|    966|  return it->second;
  438|  1.27k|}

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

_ZNK4YAML6StreamntEv:
   34|   141M|  bool operator!() const { return !static_cast<bool>(*this); }
_ZN4YAML6Stream3eofEv:
   41|  75.1M|  static char eof() { return 0x04; }
_ZNK4YAML6Stream4markEv:
   43|   152M|  const Mark mark() const { return m_mark; }
_ZNK4YAML6Stream3posEv:
   44|  1.65M|  int pos() const { return m_mark.pos; }
_ZNK4YAML6Stream4lineEv:
   45|  1.69M|  int line() const { return m_mark.line; }
_ZNK4YAML6Stream6columnEv:
   46|   274M|  int column() const { return m_mark.column; }
_ZN4YAML6Stream11ResetColumnEv:
   47|  4.55k|  void ResetColumn() { m_mark.column = 0; }
_ZNK4YAML6Stream6CharAtEm:
   74|  1.85G|inline char Stream::CharAt(size_t i) const { return m_readahead[i]; }
_ZNK4YAML6Stream11ReadAheadToEm:
   76|  1.33G|inline bool Stream::ReadAheadTo(size_t i) const {
   77|  1.33G|  if (m_readahead.size() > i)
  ------------------
  |  Branch (77:7): [True: 1.19G, False: 139M]
  ------------------
   78|  1.19G|    return true;
   79|   139M|  return _ReadAheadTo(i);
   80|  1.33G|}

_ZN4YAML16StreamCharSourceC2ERKNS_6StreamE:
   18|   534M|  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.85G|  char operator[](std::size_t i) const { return m_stream.CharAt(m_offset + i); }
_ZNK4YAML16StreamCharSourceplEi:
   40|   582M|inline const StreamCharSource StreamCharSource::operator+(int i) const {
   41|   582M|  StreamCharSource source(*this);
   42|   582M|  if (static_cast<int>(source.m_offset) + i >= 0)
  ------------------
  |  Branch (42:7): [True: 582M, False: 0]
  ------------------
   43|   582M|    source.m_offset += static_cast<std::size_t>(i);
   44|      0|  else
   45|      0|    source.m_offset = 0;
   46|   582M|  return source;
   47|   582M|}

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

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

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

