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

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

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

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

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

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

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

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

_ZN4YAML6detail8node_refC2Ev:
   19|  3.57M|  node_ref() : m_pData(std::make_shared<node_data>()) {}
_ZNK4YAML6detail8node_ref10is_definedEv:
   23|  11.7M|  bool is_defined() const { return m_pData->is_defined(); }
_ZNK4YAML6detail8node_ref4typeEv:
   25|  7.40M|  NodeType::value type() const { return m_pData->type(); }
_ZNK4YAML6detail8node_ref6scalarEv:
   26|  4.99M|  const std::string& scalar() const { return m_pData->scalar(); }
_ZN4YAML6detail8node_ref12mark_definedEv:
   30|  3.57M|  void mark_defined() { m_pData->mark_defined(); }
_ZN4YAML6detail8node_ref8set_markERKNS_4MarkE:
   33|  3.57M|  void set_mark(const Mark& mark) { m_pData->set_mark(mark); }
_ZN4YAML6detail8node_ref8set_typeENS_8NodeType5valueE:
   34|   158k|  void set_type(NodeType::value type) { m_pData->set_type(type); }
_ZN4YAML6detail8node_ref7set_tagERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   35|   735k|  void set_tag(const std::string& tag) { m_pData->set_tag(tag); }
_ZN4YAML6detail8node_ref8set_nullEv:
   36|  2.84M|  void set_null() { m_pData->set_null(); }
_ZN4YAML6detail8node_ref10set_scalarERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   37|   576k|  void set_scalar(const std::string& scalar) { m_pData->set_scalar(scalar); }
_ZN4YAML6detail8node_ref9set_styleENS_12EmitterStyle5valueE:
   38|   158k|  void set_style(EmitterStyle::value style) { m_pData->set_style(style); }
_ZN4YAML6detail8node_ref9push_backERNS0_4nodeENSt3__110shared_ptrINS0_13memory_holderEEE:
   54|  1.80M|  void push_back(node& node, shared_memory_holder pMemory) {
   55|  1.80M|    m_pData->push_back(node, pMemory);
   56|  1.80M|  }
_ZN4YAML6detail8node_ref6insertERNS0_4nodeES3_NSt3__110shared_ptrINS0_13memory_holderEEE:
   57|   611k|  void insert(node& key, node& value, shared_memory_holder pMemory) {
   58|   611k|    m_pData->insert(key, value, pMemory);
   59|   611k|  }

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

_ZN4YAML9ExceptionD2Ev:
   15|  3.84k|    #define YAML_CPP_NOEXCEPT noexcept

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

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

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

_ZN4YAML3Exp8ParseHexERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_4MarkE:
   13|  1.72k|unsigned ParseHex(const std::string& str, const Mark& mark) {
   14|  1.72k|  unsigned value = 0;
   15|  7.66k|  for (char ch : str) {
  ------------------
  |  Branch (15:16): [True: 7.66k, False: 1.63k]
  ------------------
   16|  7.66k|    int digit = 0;
   17|  7.66k|    if ('a' <= ch && ch <= 'f')
  ------------------
  |  Branch (17:9): [True: 1.20k, False: 6.46k]
  |  Branch (17:22): [True: 1.19k, False: 5]
  ------------------
   18|  1.19k|      digit = ch - 'a' + 10;
   19|  6.47k|    else if ('A' <= ch && ch <= 'F')
  ------------------
  |  Branch (19:14): [True: 1.93k, False: 4.53k]
  |  Branch (19:27): [True: 1.92k, False: 12]
  ------------------
   20|  1.92k|      digit = ch - 'A' + 10;
   21|  4.55k|    else if ('0' <= ch && ch <= '9')
  ------------------
  |  Branch (21:14): [True: 4.47k, False: 74]
  |  Branch (21:27): [True: 4.45k, False: 17]
  ------------------
   22|  4.45k|      digit = ch - '0';
   23|     91|    else
   24|     91|      throw ParserException(mark, ErrorMsg::INVALID_HEX);
   25|       |
   26|  7.57k|    value = (value << 4) + digit;
   27|  7.57k|  }
   28|       |
   29|  1.63k|  return value;
   30|  1.72k|}
_ZN4YAML3Exp3StrEj:
   32|  4.10k|std::string Str(unsigned ch) { return std::string(1, static_cast<char>(ch)); }
_ZN4YAML3Exp6EscapeERNS_6StreamEi:
   38|  1.72k|std::string Escape(Stream& in, int codeLength) {
   39|       |  // grab string
   40|  1.72k|  std::string str;
   41|  9.76k|  for (int i = 0; i < codeLength; i++)
  ------------------
  |  Branch (41:19): [True: 8.04k, False: 1.72k]
  ------------------
   42|  8.04k|    str += in.get();
   43|       |
   44|       |  // get the value
   45|  1.72k|  unsigned value = ParseHex(str, in.mark());
   46|       |
   47|       |  // legal unicode?
   48|  1.72k|  if ((value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF) {
  ------------------
  |  Branch (48:8): [True: 643, False: 1.08k]
  |  Branch (48:27): [True: 13, False: 630]
  |  Branch (48:47): [True: 38, False: 1.58k]
  ------------------
   49|     51|    std::stringstream msg;
   50|     51|    msg << ErrorMsg::INVALID_UNICODE << value;
   51|     51|    throw ParserException(in.mark(), msg.str());
   52|     51|  }
   53|       |
   54|       |  // now break it up into chars
   55|  1.67k|  if (value <= 0x7F)
  ------------------
  |  Branch (55:7): [True: 349, False: 1.32k]
  ------------------
   56|    349|    return Str(value);
   57|       |
   58|  1.32k|  if (value <= 0x7FF)
  ------------------
  |  Branch (58:7): [True: 279, False: 1.04k]
  ------------------
   59|    279|    return Str(0xC0 + (value >> 6)) + Str(0x80 + (value & 0x3F));
   60|       |
   61|  1.04k|  if (value <= 0xFFFF)
  ------------------
  |  Branch (61:7): [True: 625, False: 422]
  ------------------
   62|    625|    return Str(0xE0 + (value >> 12)) + Str(0x80 + ((value >> 6) & 0x3F)) +
   63|    625|           Str(0x80 + (value & 0x3F));
   64|       |
   65|    422|  return Str(0xF0 + (value >> 18)) + Str(0x80 + ((value >> 12) & 0x3F)) +
   66|    422|         Str(0x80 + ((value >> 6) & 0x3F)) + Str(0x80 + (value & 0x3F));
   67|  1.04k|}
_ZN4YAML3Exp6EscapeERNS_6StreamE:
   74|  46.3k|std::string Escape(Stream& in) {
   75|       |  // eat slash
   76|  46.3k|  char escape = in.get();
   77|       |
   78|       |  // switch on escape character
   79|  46.3k|  char ch = in.get();
   80|       |
   81|       |  // first do single quote, since it's easier
   82|  46.3k|  if (escape == '\'' && ch == '\'')
  ------------------
  |  Branch (82:7): [True: 785, False: 45.5k]
  |  Branch (82:25): [True: 785, False: 0]
  ------------------
   83|    785|    return "\'";
   84|       |
   85|       |  // now do the slash (we're not gonna check if it's a slash - you better pass
   86|       |  // one!)
   87|  45.5k|  switch (ch) {
  ------------------
  |  Branch (87:11): [True: 45.2k, False: 248]
  ------------------
   88|    883|    case '0':
  ------------------
  |  Branch (88:5): [True: 883, False: 44.6k]
  ------------------
   89|    883|      return std::string(1, '\x00');
   90|    219|    case 'a':
  ------------------
  |  Branch (90:5): [True: 219, False: 45.3k]
  ------------------
   91|    219|      return "\x07";
   92|    980|    case 'b':
  ------------------
  |  Branch (92:5): [True: 980, False: 44.5k]
  ------------------
   93|    980|      return "\x08";
   94|    898|    case 't':
  ------------------
  |  Branch (94:5): [True: 898, False: 44.6k]
  ------------------
   95|  5.45k|    case '\t':
  ------------------
  |  Branch (95:5): [True: 4.55k, False: 40.9k]
  ------------------
   96|  5.45k|      return "\x09";
   97|  8.57k|    case 'n':
  ------------------
  |  Branch (97:5): [True: 8.57k, False: 36.9k]
  ------------------
   98|  8.57k|      return "\x0A";
   99|    321|    case 'v':
  ------------------
  |  Branch (99:5): [True: 321, False: 45.2k]
  ------------------
  100|    321|      return "\x0B";
  101|    325|    case 'f':
  ------------------
  |  Branch (101:5): [True: 325, False: 45.2k]
  ------------------
  102|    325|      return "\x0C";
  103|    202|    case 'r':
  ------------------
  |  Branch (103:5): [True: 202, False: 45.3k]
  ------------------
  104|    202|      return "\x0D";
  105|    458|    case 'e':
  ------------------
  |  Branch (105:5): [True: 458, False: 45.0k]
  ------------------
  106|    458|      return "\x1B";
  107|    463|    case ' ':
  ------------------
  |  Branch (107:5): [True: 463, False: 45.0k]
  ------------------
  108|    463|      return R"( )";
  109|  7.68k|    case '\"':
  ------------------
  |  Branch (109:5): [True: 7.68k, False: 37.8k]
  ------------------
  110|  7.68k|      return "\"";
  111|    327|    case '\'':
  ------------------
  |  Branch (111:5): [True: 327, False: 45.2k]
  ------------------
  112|    327|      return "\'";
  113|    621|    case '\\':
  ------------------
  |  Branch (113:5): [True: 621, False: 44.9k]
  ------------------
  114|    621|      return "\\";
  115|    333|    case '/':
  ------------------
  |  Branch (115:5): [True: 333, False: 45.2k]
  ------------------
  116|    333|      return "/";
  117|    647|    case 'N':
  ------------------
  |  Branch (117:5): [True: 647, False: 44.8k]
  ------------------
  118|    647|      return "\xC2\x85";      // NEL (U+0085)
  119|    232|    case '_':
  ------------------
  |  Branch (119:5): [True: 232, False: 45.3k]
  ------------------
  120|    232|      return "\xC2\xA0";      // NBSP (U+00A0)
  121|  12.6k|    case 'L':
  ------------------
  |  Branch (121:5): [True: 12.6k, False: 32.8k]
  ------------------
  122|  12.6k|      return "\xE2\x80\xA8";  // LS (U+2028)
  123|  3.20k|    case 'P':
  ------------------
  |  Branch (123:5): [True: 3.20k, False: 42.3k]
  ------------------
  124|  3.20k|      return "\xE2\x80\xA9";  // PS (U+2029)
  125|    545|    case 'x':
  ------------------
  |  Branch (125:5): [True: 545, False: 44.9k]
  ------------------
  126|    545|      return Escape(in, 2);
  127|    624|    case 'u':
  ------------------
  |  Branch (127:5): [True: 624, False: 44.9k]
  ------------------
  128|    624|      return Escape(in, 4);
  129|    557|    case 'U':
  ------------------
  |  Branch (129:5): [True: 557, False: 44.9k]
  ------------------
  130|    557|      return Escape(in, 8);
  131|  45.5k|  }
  132|       |
  133|    248|  std::stringstream msg;
  134|    248|  throw ParserException(in.mark(), std::string(ErrorMsg::INVALID_ESCAPE) + ch);
  135|  45.5k|}

_ZN4YAML3Exp8DocStartEv:
   84|  2.60M|inline const RegEx& DocStart() {
   85|  2.60M|  static const RegEx e = RegEx("---") + (BlankOrBreak() | RegEx());
   86|  2.60M|  return e;
   87|  2.60M|}
_ZN4YAML3Exp12BlankOrBreakEv:
   43|  36.8M|inline const RegEx& BlankOrBreak() {
   44|  36.8M|  static const RegEx e = Blank() | Break();
   45|  36.8M|  return e;
   46|  36.8M|}
_ZN4YAML3Exp5BlankEv:
   35|  38.9M|inline const RegEx& Blank() {
   36|  38.9M|  static const RegEx e = Space() | Tab();
   37|  38.9M|  return e;
   38|  38.9M|}
_ZN4YAML3Exp5SpaceEv:
   27|      1|inline const RegEx& Space() {
   28|      1|  static const RegEx e = RegEx(' ');
   29|      1|  return e;
   30|      1|}
_ZN4YAML3Exp6DocEndEv:
   88|  2.28M|inline const RegEx& DocEnd() {
   89|  2.28M|  static const RegEx e = RegEx("...") + (BlankOrBreak() | RegEx());
   90|  2.28M|  return e;
   91|  2.28M|}
_ZN4YAML3Exp10BlockEntryEv:
   96|  14.2M|inline const RegEx& BlockEntry() {
   97|  14.2M|  static const RegEx e = RegEx('-') + (BlankOrBreak() | RegEx());
   98|  14.2M|  return e;
   99|  14.2M|}
_ZN4YAML3Exp3KeyEv:
  100|  9.50M|inline const RegEx& Key() {
  101|  9.50M|  static const RegEx e = RegEx('?') + BlankOrBreak();
  102|  9.50M|  return e;
  103|  9.50M|}
_ZN4YAML3Exp9KeyInFlowEv:
  104|  2.45M|inline const RegEx& KeyInFlow() {
  105|  2.45M|  static const RegEx e = RegEx('?') + BlankOrBreak();
  106|  2.45M|  return e;
  107|  2.45M|}
_ZN4YAML3Exp11PlainScalarEv:
  153|  1.35M|inline const RegEx& PlainScalar() {
  154|  1.35M|  static const RegEx e =
  155|  1.35M|      !(BlankOrBreak() | RegEx(",[]{}#&*!|>\'\"%@`", REGEX_OR) |
  156|  1.35M|        (RegEx("-?:", REGEX_OR) + (BlankOrBreak() | RegEx())));
  157|  1.35M|  return e;
  158|  1.35M|}
_ZN4YAML3Exp17PlainScalarInFlowEv:
  159|  1.92M|inline const RegEx& PlainScalarInFlow() {
  160|  1.92M|  static const RegEx e =
  161|  1.92M|      !(BlankOrBreak() | RegEx("?,[]{}#&*!|>\'\"%@`", REGEX_OR) |
  162|  1.92M|        (RegEx("-:", REGEX_OR) + (Blank() | RegEx())));
  163|  1.92M|  return e;
  164|  1.92M|}
_ZN4YAML3Exp3TabEv:
   31|  89.1k|inline const RegEx& Tab() {
   32|  89.1k|  static const RegEx e = RegEx('\t');
   33|  89.1k|  return e;
   34|  89.1k|}
_ZN4YAML3Exp7CommentEv:
  124|  75.0M|inline const RegEx Comment() {
  125|  75.0M|  static const RegEx e = RegEx('#');
  126|  75.0M|  return e;
  127|  75.0M|}
_ZN4YAML3Exp5BreakEv:
   39|   220M|inline const RegEx& Break() {
   40|   220M|  static const RegEx e = RegEx('\n') | RegEx("\r\n") | RegEx('\r');
   41|   220M|  return e;
   42|   220M|}
_ZN4YAML3Exp5ValueEv:
  108|  9.49M|inline const RegEx& Value() {
  109|  9.49M|  static const RegEx e = RegEx(':') + (BlankOrBreak() | RegEx());
  110|  9.49M|  return e;
  111|  9.49M|}
_ZN4YAML3Exp15ValueInJSONFlowEv:
  116|  10.5k|inline const RegEx& ValueInJSONFlow() {
  117|  10.5k|  static const RegEx e = RegEx(':');
  118|  10.5k|  return e;
  119|  10.5k|}
_ZN4YAML3Exp11ValueInFlowEv:
  112|  2.42M|inline const RegEx& ValueInFlow() {
  113|  2.42M|  static const RegEx e = RegEx(':') + (BlankOrBreak() | RegEx(",]}", REGEX_OR));
  114|  2.42M|  return e;
  115|  2.42M|}
_ZN4YAML3Exp5EmptyEv:
   23|  4.19k|inline const RegEx& Empty() {
   24|  4.19k|  static const RegEx e;
   25|  4.19k|  return e;
   26|  4.19k|}
_ZN4YAML3Exp5DigitEv:
   47|    516|inline const RegEx& Digit() {
   48|    516|  static const RegEx e = RegEx('0', '9');
   49|    516|  return e;
   50|    516|}
_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.61M|inline const RegEx& Word() {
   60|  8.61M|  static const RegEx e = AlphaNumeric() | RegEx('-');
   61|  8.61M|  return e;
   62|  8.61M|}
_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.88M|inline const RegEx& DocIndicator() {
   93|  4.88M|  static const RegEx e = DocStart() | DocEnd();
   94|  4.88M|  return e;
   95|  4.88M|}
_ZN4YAML3Exp6AnchorEv:
  128|  33.1M|inline const RegEx& Anchor() {
  129|  33.1M|  static const RegEx e = !(RegEx("[]{},", REGEX_OR) | BlankOrBreak());
  130|  33.1M|  return e;
  131|  33.1M|}
_ZN4YAML3Exp9AnchorEndEv:
  132|   461k|inline const RegEx& AnchorEnd() {
  133|   461k|  static const RegEx e = RegEx("?:,]}%@`", REGEX_OR) | BlankOrBreak();
  134|   461k|  return e;
  135|   461k|}
_ZN4YAML3Exp3URIEv:
  136|  9.14k|inline const RegEx& URI() {
  137|  9.14k|  static const RegEx e = Word() | RegEx("#;/?:@&=+$,_.!~*'()[]", REGEX_OR) |
  138|  9.14k|                         (RegEx('%') + Hex() + Hex());
  139|  9.14k|  return e;
  140|  9.14k|}
_ZN4YAML3Exp3TagEv:
  141|  3.84M|inline const RegEx& Tag() {
  142|  3.84M|  static const RegEx e = Word() | RegEx("#;/?:@&=+$_.~*'()", REGEX_OR) |
  143|  3.84M|                         (RegEx('%') + Hex() + Hex());
  144|  3.84M|  return e;
  145|  3.84M|}
_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.92M|inline const RegEx& ScanScalarEndInFlow() {
  177|  1.92M|  static const RegEx e = (EndScalarInFlow() | (BlankOrBreak() + Comment()));
  178|  1.92M|  return e;
  179|  1.92M|}
_ZN4YAML3Exp13ScanScalarEndEv:
  181|  1.35M|inline const RegEx& ScanScalarEnd() {
  182|  1.35M|  static const RegEx e = EndScalar() | (BlankOrBreak() + Comment());
  183|  1.35M|  return e;
  184|  1.35M|}
_ZN4YAML3Exp14EscSingleQuoteEv:
  185|  1.70k|inline const RegEx& EscSingleQuote() {
  186|  1.70k|  static const RegEx e = RegEx("\'\'");
  187|  1.70k|  return e;
  188|  1.70k|}
_ZN4YAML3Exp8EscBreakEv:
  189|  11.2M|inline const RegEx& EscBreak() {
  190|  11.2M|  static const RegEx e = RegEx('\\') + Break();
  191|  11.2M|  return e;
  192|  11.2M|}
_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.24k|inline const RegEx& Chomp() {
  199|  4.24k|  static const RegEx e = (ChompIndicator() + Digit()) |
  200|  4.24k|                         (Digit() + ChompIndicator()) | ChompIndicator() |
  201|  4.24k|                         Digit();
  202|  4.24k|  return e;
  203|  4.24k|}

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

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

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

_ZN4YAML12IsNullStringEPKcm:
   13|   588k|bool IsNullString(const char* str, std::size_t size) {
   14|   588k|  return size == 0 || same(str, size, "~") || same(str, size, "null") ||
  ------------------
  |  Branch (14:10): [True: 0, False: 588k]
  |  Branch (14:23): [True: 16.3k, False: 572k]
  |  Branch (14:47): [True: 194, False: 572k]
  ------------------
   15|   572k|         same(str, size, "Null") || same(str, size, "NULL");
  ------------------
  |  Branch (15:10): [True: 204, False: 571k]
  |  Branch (15:37): [True: 2, False: 571k]
  ------------------
   16|   588k|}
null.cpp:_ZN4YAMLL4sameILm2EEEbPKcmRAT__S1_:
    8|   588k|static bool same(const char* str, std::size_t size, const char (&literal)[N]) {
    9|   588k|  constexpr int literalSize = N - 1; // minus null terminator
   10|   588k|  return size == literalSize && std::strncmp(str, literal, literalSize) == 0;
  ------------------
  |  Branch (10:10): [True: 563k, False: 24.7k]
  |  Branch (10:33): [True: 16.3k, False: 547k]
  ------------------
   11|   588k|}
null.cpp:_ZN4YAMLL4sameILm5EEEbPKcmRAT__S1_:
    8|  1.71M|static bool same(const char* str, std::size_t size, const char (&literal)[N]) {
    9|  1.71M|  constexpr int literalSize = N - 1; // minus null terminator
   10|  1.71M|  return size == literalSize && std::strncmp(str, literal, literalSize) == 0;
  ------------------
  |  Branch (10:10): [True: 13.8k, False: 1.70M]
  |  Branch (10:33): [True: 400, False: 13.4k]
  ------------------
   11|  1.71M|}

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

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

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

_ZN4YAML5RegExC2ENS_8REGEX_OPE:
    6|  3.47k|RegEx::RegEx(REGEX_OP op) : m_op(op), m_a(0), m_z(0), m_params{} {}
_ZN4YAML5RegExC2Ev:
    7|      9|RegEx::RegEx() : RegEx(REGEX_EMPTY) {}
_ZN4YAML5RegExC2Ec:
    9|  8.86k|RegEx::RegEx(char ch) : m_op(REGEX_MATCH), m_a(ch), m_z(0), m_params{} {}
_ZN4YAML5RegExC2Ecc:
   11|      5|RegEx::RegEx(char a, char z) : m_op(REGEX_RANGE), m_a(a), m_z(z), m_params{} {}
_ZN4YAML5RegExC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_8REGEX_OPE:
   14|     16|    : m_op(op), m_a(0), m_z(0), m_params(str.begin(), str.end()) {}
_ZN4YAMLntERKNS_5RegExE:
   17|  1.70k|RegEx operator!(const RegEx& ex) {
   18|  1.70k|  RegEx ret(REGEX_NOT);
   19|  1.70k|  ret.m_params.push_back(ex);
   20|  1.70k|  return ret;
   21|  1.70k|}
_ZN4YAMLorERKNS_5RegExES2_:
   23|     36|RegEx operator|(const RegEx& ex1, const RegEx& ex2) {
   24|     36|  RegEx ret(REGEX_OR);
   25|     36|  ret.m_params.push_back(ex1);
   26|     36|  ret.m_params.push_back(ex2);
   27|     36|  return ret;
   28|     36|}
_ZN4YAMLanERKNS_5RegExES2_:
   30|  1.70k|RegEx operator&(const RegEx& ex1, const RegEx& ex2) {
   31|  1.70k|  RegEx ret(REGEX_AND);
   32|  1.70k|  ret.m_params.push_back(ex1);
   33|  1.70k|  ret.m_params.push_back(ex2);
   34|  1.70k|  return ret;
   35|  1.70k|}
_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|  75.1M|  ~RegEx() = default;

_ZNK4YAML5RegEx7MatchesERKNS_6StreamE:
   26|   536M|inline bool RegEx::Matches(const Stream& in) const { return Match(in) >= 0; }
_ZNK4YAML5RegEx5MatchERKNS_6StreamE:
   49|   595M|inline int RegEx::Match(const Stream& in) const {
   50|   595M|  StreamCharSource source(in);
   51|   595M|  return Match(source);
   52|   595M|}
_ZNK4YAML5RegEx5MatchINS_16StreamCharSourceEEEiRKT_:
   72|  1.23G|inline int RegEx::Match(const Source& source) const {
   73|  1.23G|  return IsValidSource(source) ? MatchUnchecked(source) : -1;
  ------------------
  |  Branch (73:10): [True: 1.23G, False: 0]
  ------------------
   74|  1.23G|}
_ZNK4YAML5RegEx13IsValidSourceINS_16StreamCharSourceEEEbRKT_:
   55|  1.23G|inline bool RegEx::IsValidSource(const Source& source) const {
   56|  1.23G|  return source;
   57|  1.23G|}
_ZNK4YAML5RegEx14MatchUncheckedINS_16StreamCharSourceEEEiRKT_:
   77|  3.97G|inline int RegEx::MatchUnchecked(const Source& source) const {
   78|  3.97G|  switch (m_op) {
  ------------------
  |  Branch (78:11): [True: 3.97G, False: 0]
  ------------------
   79|  23.3M|    case REGEX_EMPTY:
  ------------------
  |  Branch (79:5): [True: 23.3M, False: 3.95G]
  ------------------
   80|  23.3M|      return MatchOpEmpty(source);
   81|  2.03G|    case REGEX_MATCH:
  ------------------
  |  Branch (81:5): [True: 2.03G, False: 1.93G]
  ------------------
   82|  2.03G|      return MatchOpMatch(source);
   83|  26.4M|    case REGEX_RANGE:
  ------------------
  |  Branch (83:5): [True: 26.4M, False: 3.94G]
  ------------------
   84|  26.4M|      return MatchOpRange(source);
   85|  1.28G|    case REGEX_OR:
  ------------------
  |  Branch (85:5): [True: 1.28G, False: 2.68G]
  ------------------
   86|  1.28G|      return MatchOpOr(source);
   87|  16.6M|    case REGEX_AND:
  ------------------
  |  Branch (87:5): [True: 16.6M, False: 3.95G]
  ------------------
   88|  16.6M|      return MatchOpAnd(source);
   89|  36.4M|    case REGEX_NOT:
  ------------------
  |  Branch (89:5): [True: 36.4M, False: 3.93G]
  ------------------
   90|  36.4M|      return MatchOpNot(source);
   91|   547M|    case REGEX_SEQ:
  ------------------
  |  Branch (91:5): [True: 547M, False: 3.42G]
  ------------------
   92|   547M|      return MatchOpSeq(source);
   93|  3.97G|  }
   94|       |
   95|      0|  return -1;
   96|  3.97G|}
_ZNK4YAML5RegEx12MatchOpEmptyINS_16StreamCharSourceEEEiRKT_:
  106|  23.3M|inline int RegEx::MatchOpEmpty(const Source& source) const {
  107|  23.3M|  return source[0] == Stream::eof() ? 0 : -1;
  ------------------
  |  Branch (107:10): [True: 1.96M, False: 21.4M]
  ------------------
  108|  23.3M|}
_ZNK4YAML5RegEx12MatchOpMatchINS_16StreamCharSourceEEEiRKT_:
  119|  2.03G|inline int RegEx::MatchOpMatch(const Source& source) const {
  120|  2.03G|  if (source[0] != m_a)
  ------------------
  |  Branch (120:7): [True: 1.85G, False: 185M]
  ------------------
  121|  1.85G|    return -1;
  122|   185M|  return 1;
  123|  2.03G|}
_ZNK4YAML5RegEx12MatchOpRangeINS_16StreamCharSourceEEEiRKT_:
  127|  26.4M|inline int RegEx::MatchOpRange(const Source& source) const {
  128|  26.4M|  if (m_a > source[0] || m_z < source[0])
  ------------------
  |  Branch (128:7): [True: 20.7M, False: 5.69M]
  |  Branch (128:26): [True: 72.3k, False: 5.62M]
  ------------------
  129|  20.7M|    return -1;
  130|  5.62M|  return 1;
  131|  26.4M|}
_ZNK4YAML5RegEx9MatchOpOrINS_16StreamCharSourceEEEiRKT_:
  135|  1.28G|inline int RegEx::MatchOpOr(const Source& source) const {
  136|  2.68G|  for (const RegEx& param : m_params) {
  ------------------
  |  Branch (136:27): [True: 2.68G, False: 1.08G]
  ------------------
  137|  2.68G|    int n = param.MatchUnchecked(source);
  138|  2.68G|    if (n >= 0)
  ------------------
  |  Branch (138:9): [True: 203M, False: 2.48G]
  ------------------
  139|   203M|      return n;
  140|  2.68G|  }
  141|  1.08G|  return -1;
  142|  1.28G|}
_ZNK4YAML5RegEx10MatchOpAndINS_16StreamCharSourceEEEiRKT_:
  149|  16.6M|inline int RegEx::MatchOpAnd(const Source& source) const {
  150|  16.6M|  int first = -1;
  151|  16.6M|  for (std::size_t i = 0; i < m_params.size(); i++) {
  ------------------
  |  Branch (151:27): [True: 16.6M, False: 3.07k]
  ------------------
  152|  16.6M|    int n = m_params[i].MatchUnchecked(source);
  153|  16.6M|    if (n == -1)
  ------------------
  |  Branch (153:9): [True: 16.6M, False: 6.93k]
  ------------------
  154|  16.6M|      return -1;
  155|  6.93k|    if (i == 0)
  ------------------
  |  Branch (155:9): [True: 3.86k, False: 3.07k]
  ------------------
  156|  3.86k|      first = n;
  157|  6.93k|  }
  158|  3.07k|  return first;
  159|  16.6M|}
_ZNK4YAML5RegEx10MatchOpNotINS_16StreamCharSourceEEEiRKT_:
  163|  36.4M|inline int RegEx::MatchOpNot(const Source& source) const {
  164|  36.4M|  if (m_params.empty())
  ------------------
  |  Branch (164:7): [True: 0, False: 36.4M]
  ------------------
  165|      0|    return -1;
  166|  36.4M|  if (m_params[0].MatchUnchecked(source) >= 0)
  ------------------
  |  Branch (166:7): [True: 462k, False: 35.9M]
  ------------------
  167|   462k|    return -1;
  168|  35.9M|  return 1;
  169|  36.4M|}
_ZNK4YAML5RegEx10MatchOpSeqINS_16StreamCharSourceEEEiRKT_:
  173|   547M|inline int RegEx::MatchOpSeq(const Source& source) const {
  174|   547M|  int offset = 0;
  175|   642M|  for (const RegEx& param : m_params) {
  ------------------
  |  Branch (175:27): [True: 642M, False: 10.6M]
  ------------------
  176|   642M|    int n = param.Match(source + offset);  // note Match, not
  177|       |                                           // MatchUnchecked because we
  178|       |                                           // need to check validity after
  179|       |                                           // the offset
  180|   642M|    if (n == -1)
  ------------------
  |  Branch (180:9): [True: 536M, False: 106M]
  ------------------
  181|   536M|      return -1;
  182|   106M|    offset += n;
  183|   106M|  }
  184|       |
  185|  10.6M|  return offset;
  186|   547M|}
_ZNK4YAML5RegEx7MatchesEc:
   16|    511|inline bool RegEx::Matches(char ch) const {
   17|    511|  std::string str;
   18|    511|  str += ch;
   19|    511|  return Matches(str);
   20|    511|}
_ZNK4YAML5RegEx7MatchesERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   22|    511|inline bool RegEx::Matches(const std::string& str) const {
   23|    511|  return Match(str) >= 0;
   24|    511|}
_ZNK4YAML5RegEx5MatchERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   44|    511|inline int RegEx::Match(const std::string& str) const {
   45|    511|  StringCharSource source(str.c_str(), str.size());
   46|    511|  return Match(source);
   47|    511|}
_ZNK4YAML5RegEx13IsValidSourceINS_16StringCharSourceEEEbRKT_:
   61|    511|    const StringCharSource& source) const {
   62|    511|  switch (m_op) {
   63|      0|    case REGEX_MATCH:
  ------------------
  |  Branch (63:5): [True: 0, False: 511]
  ------------------
   64|    511|    case REGEX_RANGE:
  ------------------
  |  Branch (64:5): [True: 511, False: 0]
  ------------------
   65|    511|      return source;
   66|      0|    default:
  ------------------
  |  Branch (66:5): [True: 0, False: 511]
  ------------------
   67|      0|      return true;
   68|    511|  }
   69|    511|}
_ZNK4YAML5RegEx5MatchINS_16StringCharSourceEEEiRKT_:
   72|    511|inline int RegEx::Match(const Source& source) const {
   73|    511|  return IsValidSource(source) ? MatchUnchecked(source) : -1;
  ------------------
  |  Branch (73:10): [True: 511, False: 0]
  ------------------
   74|    511|}
_ZNK4YAML5RegEx14MatchUncheckedINS_16StringCharSourceEEEiRKT_:
   77|    511|inline int RegEx::MatchUnchecked(const Source& source) const {
   78|    511|  switch (m_op) {
  ------------------
  |  Branch (78:11): [True: 511, False: 0]
  ------------------
   79|      0|    case REGEX_EMPTY:
  ------------------
  |  Branch (79:5): [True: 0, False: 511]
  ------------------
   80|      0|      return MatchOpEmpty(source);
   81|      0|    case REGEX_MATCH:
  ------------------
  |  Branch (81:5): [True: 0, False: 511]
  ------------------
   82|      0|      return MatchOpMatch(source);
   83|    511|    case REGEX_RANGE:
  ------------------
  |  Branch (83:5): [True: 511, False: 0]
  ------------------
   84|    511|      return MatchOpRange(source);
   85|      0|    case REGEX_OR:
  ------------------
  |  Branch (85:5): [True: 0, False: 511]
  ------------------
   86|      0|      return MatchOpOr(source);
   87|      0|    case REGEX_AND:
  ------------------
  |  Branch (87:5): [True: 0, False: 511]
  ------------------
   88|      0|      return MatchOpAnd(source);
   89|      0|    case REGEX_NOT:
  ------------------
  |  Branch (89:5): [True: 0, False: 511]
  ------------------
   90|      0|      return MatchOpNot(source);
   91|      0|    case REGEX_SEQ:
  ------------------
  |  Branch (91:5): [True: 0, False: 511]
  ------------------
   92|      0|      return MatchOpSeq(source);
   93|    511|  }
   94|       |
   95|      0|  return -1;
   96|    511|}
_ZNK4YAML5RegEx12MatchOpRangeINS_16StringCharSourceEEEiRKT_:
  127|    511|inline int RegEx::MatchOpRange(const Source& source) const {
  128|    511|  if (m_a > source[0] || m_z < source[0])
  ------------------
  |  Branch (128:7): [True: 0, False: 511]
  |  Branch (128:26): [True: 0, False: 511]
  ------------------
  129|      0|    return -1;
  130|    511|  return 1;
  131|    511|}

_ZN4YAML7ScannerC2ERNSt3__113basic_istreamIcNS1_11char_traitsIcEEEE:
   11|  6.87k|    : INPUT(in),
   12|  6.87k|      m_tokens{},
   13|  6.87k|      m_startedStream(false),
   14|  6.87k|      m_endedStream(false),
   15|  6.87k|      m_simpleKeyAllowed(false),
   16|  6.87k|      m_scalarValueAllowed(false),
   17|  6.87k|      m_canBeJSONFlow(false),
   18|  6.87k|      m_simpleKeys{},
   19|  6.87k|      m_indents{},
   20|  6.87k|      m_indentRefs{},
   21|  6.87k|      m_flows{} {}
_ZN4YAML7ScannerD2Ev:
   23|  6.87k|Scanner::~Scanner() = default;
_ZN4YAML7Scanner5emptyEv:
   25|  15.4M|bool Scanner::empty() {
   26|  15.4M|  EnsureTokensInQueue();
   27|  15.4M|  return m_tokens.empty();
   28|  15.4M|}
_ZN4YAML7Scanner3popEv:
   30|  4.18M|void Scanner::pop() {
   31|  4.18M|  EnsureTokensInQueue();
   32|  4.18M|  if (!m_tokens.empty())
  ------------------
  |  Branch (32:7): [True: 4.18M, False: 0]
  ------------------
   33|  4.18M|    m_tokens.pop();
   34|  4.18M|}
_ZN4YAML7Scanner4peekEv:
   36|  22.0M|Token& Scanner::peek() {
   37|  22.0M|  EnsureTokensInQueue();
   38|  22.0M|  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|  22.0M|  return m_tokens.front();
   50|  22.0M|}
_ZNK4YAML7Scanner4markEv:
   52|  2.43M|Mark Scanner::mark() const { return INPUT.mark(); }
_ZN4YAML7Scanner19EnsureTokensInQueueEv:
   54|  41.6M|void Scanner::EnsureTokensInQueue() {
   55|   107M|  while (true) {
  ------------------
  |  Branch (55:10): [True: 107M, Folded]
  ------------------
   56|   107M|    if (!m_tokens.empty()) {
  ------------------
  |  Branch (56:9): [True: 106M, False: 1.21M]
  ------------------
   57|   106M|      Token& token = m_tokens.front();
   58|       |
   59|       |      // if this guy's valid, then we're done
   60|   106M|      if (token.status == Token::VALID) {
  ------------------
  |  Branch (60:11): [True: 40.9M, False: 65.5M]
  ------------------
   61|  40.9M|        return;
   62|  40.9M|      }
   63|       |
   64|       |      // here's where we clean up the impossible tokens
   65|  65.5M|      if (token.status == Token::INVALID) {
  ------------------
  |  Branch (65:11): [True: 745k, False: 64.7M]
  ------------------
   66|   745k|        m_tokens.pop();
   67|   745k|        continue;
   68|   745k|      }
   69|       |
   70|       |      // note: what's left are the unverified tokens
   71|  65.5M|    }
   72|       |
   73|       |    // no token? maybe we've actually finished
   74|  65.9M|    if (m_endedStream) {
  ------------------
  |  Branch (74:9): [True: 682k, False: 65.2M]
  ------------------
   75|   682k|      return;
   76|   682k|    }
   77|       |
   78|       |    // no? then scan...
   79|  65.2M|    ScanNextToken();
   80|  65.2M|  }
   81|  41.6M|}
_ZN4YAML7Scanner13ScanNextTokenEv:
   83|  65.2M|void Scanner::ScanNextToken() {
   84|  65.2M|  if (m_endedStream) {
  ------------------
  |  Branch (84:7): [True: 0, False: 65.2M]
  ------------------
   85|      0|    return;
   86|      0|  }
   87|       |
   88|  65.2M|  if (!m_startedStream) {
  ------------------
  |  Branch (88:7): [True: 6.87k, False: 65.2M]
  ------------------
   89|  6.87k|    return StartStream();
   90|  6.87k|  }
   91|       |
   92|       |  // get rid of whitespace, etc. (in between tokens it should be irrelevant)
   93|  65.2M|  ScanToNextToken();
   94|       |
   95|       |  // maybe need to end some blocks
   96|  65.2M|  PopIndentToHere();
   97|       |
   98|       |  // *****
   99|       |  // And now branch based on the next few characters!
  100|       |  // *****
  101|       |
  102|       |  // end of stream
  103|  65.2M|  if (!INPUT) {
  ------------------
  |  Branch (103:7): [True: 5.73k, False: 65.2M]
  ------------------
  104|  5.73k|    return EndStream();
  105|  5.73k|  }
  106|       |
  107|  65.2M|  if (INPUT.column() == 0 && INPUT.peek() == Keys::Directive) {
  ------------------
  |  Branch (107:7): [True: 2.61M, False: 62.6M]
  |  Branch (107:30): [True: 11.3k, False: 2.60M]
  ------------------
  108|  11.3k|    return ScanDirective();
  109|  11.3k|  }
  110|       |
  111|       |  // document token
  112|  65.2M|  if (INPUT.column() == 0 && Exp::DocStart().Matches(INPUT)) {
  ------------------
  |  Branch (112:7): [True: 2.60M, False: 62.6M]
  |  Branch (112:30): [True: 314k, False: 2.28M]
  ------------------
  113|   314k|    return ScanDocStart();
  114|   314k|  }
  115|       |
  116|  64.9M|  if (INPUT.column() == 0 && Exp::DocEnd().Matches(INPUT)) {
  ------------------
  |  Branch (116:7): [True: 2.28M, False: 62.6M]
  |  Branch (116:30): [True: 151k, False: 2.13M]
  ------------------
  117|   151k|    return ScanDocEnd();
  118|   151k|  }
  119|       |
  120|       |  // flow start/end/entry
  121|  64.8M|  if (INPUT.peek() == Keys::FlowSeqStart ||
  ------------------
  |  Branch (121:7): [True: 33.6M, False: 31.1M]
  ------------------
  122|  46.6M|      INPUT.peek() == Keys::FlowMapStart) {
  ------------------
  |  Branch (122:7): [True: 13.0M, False: 18.1M]
  ------------------
  123|  46.6M|    return ScanFlowStart();
  124|  46.6M|  }
  125|       |
  126|  18.1M|  if (INPUT.peek() == Keys::FlowSeqEnd || INPUT.peek() == Keys::FlowMapEnd) {
  ------------------
  |  Branch (126:7): [True: 21.8k, False: 18.1M]
  |  Branch (126:43): [True: 1.06M, False: 17.0M]
  ------------------
  127|  1.08M|    return ScanFlowEnd();
  128|  1.08M|  }
  129|       |
  130|  17.0M|  if (INPUT.peek() == Keys::FlowEntry) {
  ------------------
  |  Branch (130:7): [True: 3.85M, False: 13.2M]
  ------------------
  131|       |    // values starting with `,` are not allowed.
  132|       |    // eg: reject `,foo`
  133|  3.85M|    if (INPUT.column() == 0) {
  ------------------
  |  Branch (133:9): [True: 4, False: 3.85M]
  ------------------
  134|      4|      throw ParserException(INPUT.mark(), ErrorMsg::UNEXPECTED_FLOW);
  135|      4|    }
  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|  3.85M|    if (!m_scalarValueAllowed) {
  ------------------
  |  Branch (139:9): [True: 2, False: 3.85M]
  ------------------
  140|      2|      throw ParserException(INPUT.mark(), ErrorMsg::UNEXPECTED_SCALAR);
  141|      2|    }
  142|  3.85M|    return ScanFlowEntry();
  143|  3.85M|  }
  144|       |
  145|       |  // block/map stuff
  146|  13.2M|  if (Exp::BlockEntry().Matches(INPUT)) {
  ------------------
  |  Branch (146:7): [True: 1.24M, False: 11.9M]
  ------------------
  147|  1.24M|    return ScanBlockEntry();
  148|  1.24M|  }
  149|       |
  150|  11.9M|  if ((InBlockContext() ? Exp::Key() : Exp::KeyInFlow()).Matches(INPUT)) {
  ------------------
  |  Branch (150:7): [True: 34.8k, False: 11.9M]
  |  Branch (150:8): [True: 9.50M, False: 2.45M]
  ------------------
  151|  34.8k|    return ScanKey();
  152|  34.8k|  }
  153|       |
  154|  11.9M|  if (GetValueRegex().Matches(INPUT)) {
  ------------------
  |  Branch (154:7): [True: 7.05M, False: 4.87M]
  ------------------
  155|  7.05M|    return ScanValue();
  156|  7.05M|  }
  157|       |
  158|       |  // alias/anchor
  159|  4.87M|  if (INPUT.peek() == Keys::Alias || INPUT.peek() == Keys::Anchor) {
  ------------------
  |  Branch (159:7): [True: 4.67k, False: 4.86M]
  |  Branch (159:38): [True: 457k, False: 4.40M]
  ------------------
  160|   461k|    return ScanAnchorOrAlias();
  161|   461k|  }
  162|       |
  163|       |  // tag
  164|  4.40M|  if (INPUT.peek() == Keys::Tag) {
  ------------------
  |  Branch (164:7): [True: 1.11M, False: 3.29M]
  ------------------
  165|  1.11M|    return ScanTag();
  166|  1.11M|  }
  167|       |
  168|       |  // special scalars
  169|  3.29M|  if (InBlockContext() && (INPUT.peek() == Keys::LiteralScalar ||
  ------------------
  |  Branch (169:7): [True: 1.35M, False: 1.93M]
  |  Branch (169:28): [True: 1.13k, False: 1.35M]
  ------------------
  170|  1.35M|                           INPUT.peek() == Keys::FoldedScalar)) {
  ------------------
  |  Branch (170:28): [True: 3.11k, False: 1.35M]
  ------------------
  171|  4.24k|    return ScanBlockScalar();
  172|  4.24k|  }
  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|  3.28M|  if (!m_scalarValueAllowed) {
  ------------------
  |  Branch (177:7): [True: 33, False: 3.28M]
  ------------------
  178|     33|    throw ParserException(INPUT.mark(), ErrorMsg::UNEXPECTED_SCALAR);
  179|     33|  }
  180|       |
  181|  3.28M|  if (INPUT.peek() == '\'' || INPUT.peek() == '\"') {
  ------------------
  |  Branch (181:7): [True: 1.70k, False: 3.28M]
  |  Branch (181:31): [True: 7.03k, False: 3.28M]
  ------------------
  182|  8.73k|    return ScanQuotedScalar();
  183|  8.73k|  }
  184|       |
  185|       |  // plain scalars
  186|  3.28M|  if ((InBlockContext() ? Exp::PlainScalar() : Exp::PlainScalarInFlow())
  ------------------
  |  Branch (186:7): [True: 3.28M, False: 43]
  |  Branch (186:8): [True: 1.35M, False: 1.92M]
  ------------------
  187|  3.28M|          .Matches(INPUT)) {
  188|  3.28M|    return ScanPlainScalar();
  189|  3.28M|  }
  190|       |
  191|       |  // don't know what it is!
  192|     43|  throw ParserException(INPUT.mark(), ErrorMsg::UNKNOWN_TOKEN);
  193|  3.28M|}
_ZN4YAML7Scanner15ScanToNextTokenEv:
  195|  65.2M|void Scanner::ScanToNextToken() {
  196|  73.8M|  while (true) {
  ------------------
  |  Branch (196:10): [True: 73.8M, Folded]
  ------------------
  197|       |    // first eat whitespace
  198|  74.0M|    while (INPUT && IsWhitespaceToBeEaten(INPUT.peek())) {
  ------------------
  |  Branch (198:12): [True: 74.0M, False: 5.65k]
  |  Branch (198:21): [True: 140k, False: 73.8M]
  ------------------
  199|   140k|      if (InBlockContext() && Exp::Tab().Matches(INPUT)) {
  ------------------
  |  Branch (199:11): [True: 89.1k, False: 51.0k]
  |  Branch (199:31): [True: 1.45k, False: 87.7k]
  ------------------
  200|  1.45k|        m_simpleKeyAllowed = false;
  201|  1.45k|      }
  202|   140k|      INPUT.eat(1);
  203|   140k|    }
  204|       |
  205|       |    // then eat a comment
  206|  73.8M|    if (Exp::Comment().Matches(INPUT)) {
  ------------------
  |  Branch (206:9): [True: 1.93k, False: 73.8M]
  ------------------
  207|       |      // eat until line break
  208|  5.82M|      while (INPUT && !Exp::Break().Matches(INPUT)) {
  ------------------
  |  Branch (208:14): [True: 5.82M, False: 87]
  |  Branch (208:23): [True: 5.82M, False: 1.84k]
  ------------------
  209|  5.82M|        INPUT.eat(1);
  210|  5.82M|      }
  211|  1.93k|    }
  212|       |
  213|       |    // if it's NOT a line break, then we're done!
  214|  73.8M|    if (!Exp::Break().Matches(INPUT)) {
  ------------------
  |  Branch (214:9): [True: 65.2M, False: 8.58M]
  ------------------
  215|  65.2M|      break;
  216|  65.2M|    }
  217|       |
  218|       |    // otherwise, let's eat the line break and keep going
  219|  8.58M|    int n = Exp::Break().Match(INPUT);
  220|  8.58M|    INPUT.eat(n);
  221|       |
  222|       |    // oh yeah, and let's get rid of that simple key
  223|  8.58M|    InvalidateSimpleKey();
  224|       |
  225|       |    // new line - we accept a scalar value now
  226|  8.58M|    m_scalarValueAllowed = true;
  227|       |
  228|       |    // new line - we may be able to accept a simple key now
  229|  8.58M|    if (InBlockContext()) {
  ------------------
  |  Branch (229:9): [True: 8.55M, False: 30.4k]
  ------------------
  230|  8.55M|      m_simpleKeyAllowed = true;
  231|  8.55M|    }
  232|  8.58M|  }
  233|  65.2M|}
_ZN4YAML7Scanner21IsWhitespaceToBeEatenEc:
  247|  74.0M|bool Scanner::IsWhitespaceToBeEaten(char ch) {
  248|  74.0M|  if (ch == ' ') {
  ------------------
  |  Branch (248:7): [True: 107k, False: 73.9M]
  ------------------
  249|   107k|    return true;
  250|   107k|  }
  251|       |
  252|  73.9M|  if (ch == '\t') {
  ------------------
  |  Branch (252:7): [True: 32.2k, False: 73.8M]
  ------------------
  253|  32.2k|    return true;
  254|  32.2k|  }
  255|       |
  256|  73.8M|  return false;
  257|  73.9M|}
_ZNK4YAML7Scanner13GetValueRegexEv:
  259|  11.9M|const RegEx& Scanner::GetValueRegex() const {
  260|  11.9M|  if (InBlockContext()) {
  ------------------
  |  Branch (260:7): [True: 9.49M, False: 2.43M]
  ------------------
  261|  9.49M|    return Exp::Value();
  262|  9.49M|  }
  263|       |
  264|  2.43M|  return m_canBeJSONFlow ? Exp::ValueInJSONFlow() : Exp::ValueInFlow();
  ------------------
  |  Branch (264:10): [True: 10.5k, False: 2.42M]
  ------------------
  265|  11.9M|}
_ZN4YAML7Scanner11StartStreamEv:
  267|  6.87k|void Scanner::StartStream() {
  268|  6.87k|  m_startedStream = true;
  269|  6.87k|  m_simpleKeyAllowed = true;
  270|  6.87k|  m_scalarValueAllowed = true;
  271|  6.87k|  std::unique_ptr<IndentMarker> pIndent(
  272|  6.87k|      new IndentMarker(-1, IndentMarker::NONE));
  273|  6.87k|  m_indentRefs.push_back(std::move(pIndent));
  274|  6.87k|  m_indents.push(&m_indentRefs.back());
  275|  6.87k|}
_ZN4YAML7Scanner9EndStreamEv:
  277|  5.73k|void Scanner::EndStream() {
  278|       |  // force newline
  279|  5.73k|  if (INPUT.column() > 0) {
  ------------------
  |  Branch (279:7): [True: 5.29k, False: 440]
  ------------------
  280|  5.29k|    INPUT.ResetColumn();
  281|  5.29k|  }
  282|       |
  283|  5.73k|  PopAllIndents();
  284|  5.73k|  PopAllSimpleKeys();
  285|       |
  286|  5.73k|  m_simpleKeyAllowed = false;
  287|  5.73k|  m_scalarValueAllowed = false;
  288|  5.73k|  m_endedStream = true;
  289|  5.73k|}
_ZN4YAML7Scanner9PushTokenENS_5Token4TYPEE:
  291|  10.3M|Token* Scanner::PushToken(Token::TYPE type) {
  292|  10.3M|  m_tokens.push(Token(type, INPUT.mark()));
  293|  10.3M|  return &m_tokens.back();
  294|  10.3M|}
_ZNK4YAML7Scanner16GetStartTokenForENS0_12IndentMarker11INDENT_TYPEE:
  296|  10.3M|Token::TYPE Scanner::GetStartTokenFor(IndentMarker::INDENT_TYPE type) const {
  297|  10.3M|  switch (type) {
  ------------------
  |  Branch (297:11): [True: 10.3M, False: 0]
  ------------------
  298|  1.23M|    case IndentMarker::SEQ:
  ------------------
  |  Branch (298:5): [True: 1.23M, False: 9.11M]
  ------------------
  299|  1.23M|      return Token::BLOCK_SEQ_START;
  300|  9.11M|    case IndentMarker::MAP:
  ------------------
  |  Branch (300:5): [True: 9.11M, False: 1.23M]
  ------------------
  301|  9.11M|      return Token::BLOCK_MAP_START;
  302|      0|    case IndentMarker::NONE:
  ------------------
  |  Branch (302:5): [True: 0, False: 10.3M]
  ------------------
  303|      0|      assert(false);
  304|      0|      break;
  305|  10.3M|  }
  306|  10.3M|  assert(false);
  307|      0|  throw std::runtime_error("yaml-cpp: internal error, invalid indent type");
  308|  10.3M|}
_ZN4YAML7Scanner12PushIndentToEiNS0_12IndentMarker11INDENT_TYPEE:
  311|  10.4M|                                             IndentMarker::INDENT_TYPE type) {
  312|       |  // are we in flow?
  313|  10.4M|  if (InFlowContext()) {
  ------------------
  |  Branch (313:7): [True: 0, False: 10.4M]
  ------------------
  314|      0|    return nullptr;
  315|      0|  }
  316|       |
  317|  10.4M|  std::unique_ptr<IndentMarker> pIndent(new IndentMarker(column, type));
  318|  10.4M|  IndentMarker& indent = *pIndent;
  319|  10.4M|  const IndentMarker& lastIndent = *m_indents.top();
  320|       |
  321|       |  // is this actually an indentation?
  322|  10.4M|  if (indent.column < lastIndent.column) {
  ------------------
  |  Branch (322:7): [True: 0, False: 10.4M]
  ------------------
  323|      0|    return nullptr;
  324|      0|  }
  325|  10.4M|  if (indent.column == lastIndent.column &&
  ------------------
  |  Branch (325:7): [True: 85.7k, False: 10.3M]
  ------------------
  326|  85.7k|      !(indent.type == IndentMarker::SEQ &&
  ------------------
  |  Branch (326:9): [True: 28.7k, False: 56.9k]
  ------------------
  327|  62.4k|        lastIndent.type == IndentMarker::MAP)) {
  ------------------
  |  Branch (327:9): [True: 23.3k, False: 5.48k]
  ------------------
  328|  62.4k|    return nullptr;
  329|  62.4k|  }
  330|       |
  331|       |  // push a start token
  332|  10.3M|  indent.pStartToken = PushToken(GetStartTokenFor(type));
  333|       |
  334|       |  // and then the indent
  335|  10.3M|  m_indents.push(&indent);
  336|  10.3M|  m_indentRefs.push_back(std::move(pIndent));
  337|  10.3M|  return &m_indentRefs.back();
  338|  10.4M|}
_ZN4YAML7Scanner15PopIndentToHereEv:
  340|  65.2M|void Scanner::PopIndentToHere() {
  341|       |  // are we in flow?
  342|  65.2M|  if (InFlowContext()) {
  ------------------
  |  Branch (342:7): [True: 54.1M, False: 11.1M]
  ------------------
  343|  54.1M|    return;
  344|  54.1M|  }
  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: 10.0M, False: 3.88M]
  ------------------
  350|  10.0M|      break;
  351|  10.0M|    }
  352|  3.88M|    if (indent.column == INPUT.column() &&
  ------------------
  |  Branch (352:9): [True: 2.14M, False: 1.74M]
  ------------------
  353|  2.14M|        !(indent.type == IndentMarker::SEQ &&
  ------------------
  |  Branch (353:11): [True: 1.02M, False: 1.12M]
  ------------------
  354|  1.12M|          !Exp::BlockEntry().Matches(INPUT))) {
  ------------------
  |  Branch (354:11): [True: 1.01M, False: 5.48k]
  ------------------
  355|  1.12M|      break;
  356|  1.12M|    }
  357|       |
  358|  2.76M|    PopIndent();
  359|  2.76M|  }
  360|       |
  361|  12.2M|  while (!m_indents.empty() &&
  ------------------
  |  Branch (361:10): [True: 12.2M, False: 0]
  ------------------
  362|  12.2M|         m_indents.top()->status == IndentMarker::INVALID) {
  ------------------
  |  Branch (362:10): [True: 1.07M, False: 11.1M]
  ------------------
  363|  1.07M|    PopIndent();
  364|  1.07M|  }
  365|  11.1M|}
_ZN4YAML7Scanner13PopAllIndentsEv:
  367|   483k|void Scanner::PopAllIndents() {
  368|       |  // are we in flow?
  369|   483k|  if (InFlowContext()) {
  ------------------
  |  Branch (369:7): [True: 48.4k, False: 434k]
  ------------------
  370|  48.4k|    return;
  371|  48.4k|  }
  372|       |
  373|       |  // now pop away
  374|  3.15M|  while (!m_indents.empty()) {
  ------------------
  |  Branch (374:10): [True: 3.15M, False: 0]
  ------------------
  375|  3.15M|    const IndentMarker& indent = *m_indents.top();
  376|  3.15M|    if (indent.type == IndentMarker::NONE) {
  ------------------
  |  Branch (376:9): [True: 434k, False: 2.71M]
  ------------------
  377|   434k|      break;
  378|   434k|    }
  379|       |
  380|  2.71M|    PopIndent();
  381|  2.71M|  }
  382|   434k|}
_ZN4YAML7Scanner9PopIndentEv:
  384|  6.55M|void Scanner::PopIndent() {
  385|  6.55M|  const IndentMarker& indent = *m_indents.top();
  386|  6.55M|  m_indents.pop();
  387|       |
  388|  6.55M|  if (indent.status != IndentMarker::VALID) {
  ------------------
  |  Branch (388:7): [True: 2.09M, False: 4.46M]
  ------------------
  389|  2.09M|    InvalidateSimpleKey();
  390|  2.09M|    return;
  391|  2.09M|  }
  392|       |
  393|  4.46M|  if (indent.type == IndentMarker::SEQ) {
  ------------------
  |  Branch (393:7): [True: 1.18M, False: 3.27M]
  ------------------
  394|  1.18M|    m_tokens.push(Token(Token::BLOCK_SEQ_END, INPUT.mark()));
  395|  3.27M|  } else if (indent.type == IndentMarker::MAP) {
  ------------------
  |  Branch (395:14): [True: 3.27M, False: 0]
  ------------------
  396|  3.27M|    m_tokens.push(Token(Token::BLOCK_MAP_END, INPUT.mark()));
  397|  3.27M|  }
  398|  4.46M|}
_ZNK4YAML7Scanner12GetTopIndentEv:
  400|  1.35M|int Scanner::GetTopIndent() const {
  401|  1.35M|  if (m_indents.empty()) {
  ------------------
  |  Branch (401:7): [True: 0, False: 1.35M]
  ------------------
  402|      0|    return 0;
  403|      0|  }
  404|  1.35M|  return m_indents.top()->column;
  405|  1.35M|}

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

_ZN4YAML10ScanScalarERNS_6StreamERNS_16ScanScalarParamsE:
   21|  3.29M|std::string ScanScalar(Stream& INPUT, ScanScalarParams& params) {
   22|  3.29M|  bool foundNonEmptyLine = false;
   23|  3.29M|  bool pastOpeningBreak = (params.fold == FOLD_FLOW);
   24|  3.29M|  bool emptyLine = false, moreIndented = false;
   25|  3.29M|  int foldedNewlineCount = 0;
   26|  3.29M|  bool foldedNewlineStartedMoreIndented = false;
   27|  3.29M|  std::size_t lastEscapedChar = std::string::npos;
   28|  3.29M|  std::string scalar;
   29|  3.29M|  params.leadingSpaces = false;
   30|       |
   31|  3.29M|  if (!params.end) {
  ------------------
  |  Branch (31:7): [True: 4.19k, False: 3.28M]
  ------------------
   32|  4.19k|    params.end = &Exp::Empty();
   33|  4.19k|  }
   34|       |
   35|  20.5M|  while (INPUT) {
  ------------------
  |  Branch (35:10): [True: 20.5M, False: 948]
  ------------------
   36|       |    // ********************************
   37|       |    // Phase #1: scan until line ending
   38|       |
   39|  20.5M|    std::size_t lastNonWhitespaceChar = scalar.size();
   40|  20.5M|    bool escapedNewline = false;
   41|  96.0M|    while (!params.end->Matches(INPUT) && !Exp::Break().Matches(INPUT)) {
  ------------------
  |  Branch (41:12): [True: 94.0M, False: 1.94M]
  |  Branch (41:43): [True: 75.8M, False: 18.2M]
  ------------------
   42|  75.8M|      if (!INPUT) {
  ------------------
  |  Branch (42:11): [True: 1.90k, False: 75.8M]
  ------------------
   43|  1.90k|        break;
   44|  1.90k|      }
   45|       |
   46|       |      // document indicator?
   47|  75.8M|      if (INPUT.column() == 0 && Exp::DocIndicator().Matches(INPUT)) {
  ------------------
  |  Branch (47:11): [True: 392k, False: 75.4M]
  |  Branch (47:34): [True: 317k, False: 75.7k]
  ------------------
   48|   317k|        if (params.onDocIndicator == BREAK) {
  ------------------
  |  Branch (48:13): [True: 317k, False: 1]
  ------------------
   49|   317k|          break;
   50|   317k|        }
   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|  75.5M|      foundNonEmptyLine = true;
   57|  75.5M|      pastOpeningBreak = true;
   58|       |
   59|       |      // escaped newline? (only if we're escaping on slash)
   60|  75.5M|      if (params.escape == '\\' && Exp::EscBreak().Matches(INPUT)) {
  ------------------
  |  Branch (60:11): [True: 11.2M, False: 64.2M]
  |  Branch (60:36): [True: 811, False: 11.2M]
  ------------------
   61|       |        // eat escape character and get out (but preserve trailing whitespace!)
   62|    811|        INPUT.get();
   63|    811|        lastNonWhitespaceChar = scalar.size();
   64|    811|        lastEscapedChar = scalar.size();
   65|    811|        escapedNewline = true;
   66|    811|        break;
   67|    811|      }
   68|       |
   69|       |      // escape this?
   70|  75.5M|      if (INPUT.peek() == params.escape) {
  ------------------
  |  Branch (70:11): [True: 46.3k, False: 75.4M]
  ------------------
   71|  46.3k|        scalar += Exp::Escape(INPUT);
   72|  46.3k|        lastNonWhitespaceChar = scalar.size();
   73|  46.3k|        lastEscapedChar = scalar.size();
   74|  46.3k|        continue;
   75|  46.3k|      }
   76|       |
   77|       |      // otherwise, just add the damn character
   78|  75.4M|      char ch = INPUT.get();
   79|  75.4M|      scalar += ch;
   80|  75.4M|      if (ch != ' ' && ch != '\t') {
  ------------------
  |  Branch (80:11): [True: 75.4M, False: 45.0k]
  |  Branch (80:24): [True: 73.8M, False: 1.59M]
  ------------------
   81|  73.8M|        lastNonWhitespaceChar = scalar.size();
   82|  73.8M|      }
   83|  75.4M|    }
   84|       |
   85|       |    // eof? if we're looking to eat something, then we throw
   86|  20.5M|    if (!INPUT) {
  ------------------
  |  Branch (86:9): [True: 1.96k, False: 20.5M]
  ------------------
   87|  1.96k|      if (params.eatEnd) {
  ------------------
  |  Branch (87:11): [True: 211, False: 1.75k]
  ------------------
   88|    211|        throw ParserException(INPUT.mark(), ErrorMsg::EOF_IN_SCALAR);
   89|    211|      }
   90|  1.75k|      break;
   91|  1.96k|    }
   92|       |
   93|       |    // doc indicator?
   94|  20.5M|    if (params.onDocIndicator == BREAK && INPUT.column() == 0 &&
  ------------------
  |  Branch (94:9): [True: 10.2M, False: 10.2M]
  |  Branch (94:43): [True: 4.49M, False: 5.76M]
  ------------------
   95|  4.49M|        Exp::DocIndicator().Matches(INPUT)) {
  ------------------
  |  Branch (95:9): [True: 317k, False: 4.17M]
  ------------------
   96|   317k|      break;
   97|   317k|    }
   98|       |
   99|       |    // are we done via character match?
  100|  20.2M|    int n = params.end->Match(INPUT);
  101|  20.2M|    if (n >= 0) {
  ------------------
  |  Branch (101:9): [True: 1.94M, False: 18.2M]
  ------------------
  102|  1.94M|      if (params.eatEnd) {
  ------------------
  |  Branch (102:11): [True: 8.30k, False: 1.93M]
  ------------------
  103|  8.30k|        INPUT.eat(n);
  104|  8.30k|      }
  105|  1.94M|      break;
  106|  1.94M|    }
  107|       |
  108|       |    // do we remove trailing whitespace?
  109|  18.2M|    if (params.fold == FOLD_FLOW)
  ------------------
  |  Branch (109:9): [True: 8.10M, False: 10.1M]
  ------------------
  110|  8.10M|      scalar.erase(lastNonWhitespaceChar);
  111|       |
  112|       |    // ********************************
  113|       |    // Phase #2: eat line ending
  114|  18.2M|    n = Exp::Break().Match(INPUT);
  115|  18.2M|    INPUT.eat(n);
  116|       |
  117|       |    // ********************************
  118|       |    // Phase #3: scan initial spaces
  119|       |
  120|       |    // first the required indentation
  121|  18.2M|    while (INPUT.peek() == ' ' &&
  ------------------
  |  Branch (121:12): [True: 7.07k, False: 18.2M]
  ------------------
  122|  7.07k|           (INPUT.column() < params.indent ||
  ------------------
  |  Branch (122:13): [True: 589, False: 6.48k]
  ------------------
  123|  6.48k|            (params.detectIndent && !foundNonEmptyLine)) &&
  ------------------
  |  Branch (123:14): [True: 1.07k, False: 5.41k]
  |  Branch (123:37): [True: 363, False: 716]
  ------------------
  124|    952|           !params.end->Matches(INPUT)) {
  ------------------
  |  Branch (124:12): [True: 758, False: 194]
  ------------------
  125|    758|      INPUT.eat(1);
  126|    758|    }
  127|       |
  128|       |    // update indent if we're auto-detecting
  129|  18.2M|    if (params.detectIndent && !foundNonEmptyLine) {
  ------------------
  |  Branch (129:9): [True: 10.1M, False: 8.10M]
  |  Branch (129:32): [True: 8.14M, False: 2.01M]
  ------------------
  130|  8.14M|      params.indent = std::max(params.indent, INPUT.column());
  131|  8.14M|    }
  132|       |
  133|       |    // and then the rest of the whitespace
  134|  18.2M|    while (Exp::Blank().Matches(INPUT)) {
  ------------------
  |  Branch (134:12): [True: 8.88k, False: 18.2M]
  ------------------
  135|       |      // we check for tabs that masquerade as indentation
  136|  8.88k|      if (INPUT.peek() == '\t' && INPUT.column() < params.indent &&
  ------------------
  |  Branch (136:11): [True: 2.33k, False: 6.55k]
  |  Branch (136:35): [True: 2, False: 2.33k]
  ------------------
  137|      2|          params.onTabInIndentation == THROW) {
  ------------------
  |  Branch (137:11): [True: 2, False: 0]
  ------------------
  138|      2|        throw ParserException(INPUT.mark(), ErrorMsg::TAB_IN_INDENTATION);
  139|      2|      }
  140|       |
  141|  8.88k|      if (!params.eatLeadingWhitespace) {
  ------------------
  |  Branch (141:11): [True: 1.81k, False: 7.07k]
  ------------------
  142|  1.81k|        break;
  143|  1.81k|      }
  144|       |
  145|  7.07k|      if (params.end->Matches(INPUT)) {
  ------------------
  |  Branch (145:11): [True: 206, False: 6.86k]
  ------------------
  146|    206|        break;
  147|    206|      }
  148|       |
  149|  6.86k|      INPUT.eat(1);
  150|  6.86k|    }
  151|       |
  152|       |    // was this an empty line?
  153|  18.2M|    bool nextEmptyLine = Exp::Break().Matches(INPUT);
  154|  18.2M|    bool nextMoreIndented = Exp::Blank().Matches(INPUT);
  155|  18.2M|    if (params.fold == FOLD_BLOCK && foldedNewlineCount == 0 && nextEmptyLine)
  ------------------
  |  Branch (155:9): [True: 10.1M, False: 8.11M]
  |  Branch (155:38): [True: 176k, False: 9.96M]
  |  Branch (155:65): [True: 4.53k, False: 172k]
  ------------------
  156|  4.53k|      foldedNewlineStartedMoreIndented = moreIndented;
  157|       |
  158|       |    // for block scalars, we always start with a newline, so we should ignore it
  159|       |    // (not fold or keep)
  160|  18.2M|    if (pastOpeningBreak) {
  ------------------
  |  Branch (160:9): [True: 18.2M, False: 4.48k]
  ------------------
  161|  18.2M|      switch (params.fold) {
  ------------------
  |  Branch (161:15): [True: 18.2M, False: 0]
  ------------------
  162|  9.73k|        case DONT_FOLD:
  ------------------
  |  Branch (162:9): [True: 9.73k, False: 18.2M]
  ------------------
  163|  9.73k|          scalar += "\n";
  164|  9.73k|          break;
  165|  10.1M|        case FOLD_BLOCK:
  ------------------
  |  Branch (165:9): [True: 10.1M, False: 8.11M]
  ------------------
  166|  10.1M|          if (!emptyLine && !nextEmptyLine && !moreIndented &&
  ------------------
  |  Branch (166:15): [True: 173k, False: 9.96M]
  |  Branch (166:29): [True: 169k, False: 3.42k]
  |  Branch (166:47): [True: 168k, False: 1.23k]
  ------------------
  167|   168k|              !nextMoreIndented && INPUT.column() >= params.indent) {
  ------------------
  |  Branch (167:15): [True: 168k, False: 403]
  |  Branch (167:36): [True: 167k, False: 419]
  ------------------
  168|   167k|            scalar += " ";
  169|  9.97M|          } else if (nextEmptyLine) {
  ------------------
  |  Branch (169:22): [True: 9.96M, False: 6.10k]
  ------------------
  170|  9.96M|            foldedNewlineCount++;
  171|  9.96M|          } else {
  172|  6.10k|            scalar += "\n";
  173|  6.10k|          }
  174|       |
  175|  10.1M|          if (!nextEmptyLine && foldedNewlineCount > 0) {
  ------------------
  |  Branch (175:15): [True: 173k, False: 9.96M]
  |  Branch (175:33): [True: 3.91k, False: 170k]
  ------------------
  176|  3.91k|            scalar += std::string(foldedNewlineCount - 1, '\n');
  177|  3.91k|            if (foldedNewlineStartedMoreIndented ||
  ------------------
  |  Branch (177:17): [True: 529, False: 3.38k]
  ------------------
  178|  3.38k|                nextMoreIndented | !foundNonEmptyLine) {
  ------------------
  |  Branch (178:17): [True: 630, False: 2.75k]
  ------------------
  179|  1.15k|              scalar += "\n";
  180|  1.15k|            }
  181|  3.91k|            foldedNewlineCount = 0;
  182|  3.91k|          }
  183|  10.1M|          break;
  184|  8.10M|        case FOLD_FLOW:
  ------------------
  |  Branch (184:9): [True: 8.10M, False: 10.1M]
  ------------------
  185|  8.10M|          if (nextEmptyLine) {
  ------------------
  |  Branch (185:15): [True: 6.53M, False: 1.57M]
  ------------------
  186|  6.53M|            scalar += "\n";
  187|  6.53M|          } else if (!emptyLine && !escapedNewline) {
  ------------------
  |  Branch (187:22): [True: 1.56M, False: 13.0k]
  |  Branch (187:36): [True: 1.55M, False: 676]
  ------------------
  188|  1.55M|            scalar += " ";
  189|  1.55M|          }
  190|  8.10M|          break;
  191|  18.2M|      }
  192|  18.2M|    }
  193|       |
  194|  18.2M|    emptyLine = nextEmptyLine;
  195|  18.2M|    moreIndented = nextMoreIndented;
  196|  18.2M|    pastOpeningBreak = true;
  197|       |
  198|       |    // are we done via indentation?
  199|  18.2M|    if (!emptyLine && INPUT.column() < params.indent) {
  ------------------
  |  Branch (199:9): [True: 1.75M, False: 16.5M]
  |  Branch (199:23): [True: 1.02M, False: 727k]
  ------------------
  200|  1.02M|      params.leadingSpaces = true;
  201|  1.02M|      break;
  202|  1.02M|    }
  203|  18.2M|  }
  204|       |
  205|       |  // post-processing
  206|  3.29M|  if (params.trimTrailingSpaces) {
  ------------------
  |  Branch (206:7): [True: 3.27M, False: 13.0k]
  ------------------
  207|  3.27M|    std::size_t pos = scalar.find_last_not_of(" \t");
  208|  3.27M|    if (lastEscapedChar != std::string::npos) {
  ------------------
  |  Branch (208:9): [True: 20.3k, False: 3.25M]
  ------------------
  209|  20.3k|      if (pos < lastEscapedChar || pos == std::string::npos) {
  ------------------
  |  Branch (209:11): [True: 12.8k, False: 7.48k]
  |  Branch (209:36): [True: 499, False: 6.98k]
  ------------------
  210|  13.3k|        pos = lastEscapedChar;
  211|  13.3k|      }
  212|  20.3k|    }
  213|  3.27M|    if (pos < scalar.size()) {
  ------------------
  |  Branch (213:9): [True: 3.26M, False: 13.1k]
  ------------------
  214|  3.26M|      scalar.erase(pos + 1);
  215|  3.26M|    }
  216|  3.27M|  }
  217|       |
  218|  3.29M|  switch (params.chomp) {
  219|  11.9k|    case CLIP: {
  ------------------
  |  Branch (219:5): [True: 11.9k, False: 3.28M]
  ------------------
  220|  11.9k|      std::size_t pos = scalar.find_last_not_of('\n');
  221|  11.9k|      if (lastEscapedChar != std::string::npos) {
  ------------------
  |  Branch (221:11): [True: 3.25k, False: 8.73k]
  ------------------
  222|  3.25k|        if (pos < lastEscapedChar || pos == std::string::npos) {
  ------------------
  |  Branch (222:13): [True: 2.12k, False: 1.12k]
  |  Branch (222:38): [True: 221, False: 908]
  ------------------
  223|  2.34k|          pos = lastEscapedChar;
  224|  2.34k|        }
  225|  3.25k|      }
  226|  11.9k|      if (pos == std::string::npos) {
  ------------------
  |  Branch (226:11): [True: 4.61k, False: 7.37k]
  ------------------
  227|  4.61k|        scalar.erase();
  228|  7.37k|      } else if (pos + 1 < scalar.size()) {
  ------------------
  |  Branch (228:18): [True: 1.09k, False: 6.27k]
  ------------------
  229|  1.09k|        scalar.erase(pos + 2);
  230|  1.09k|      }
  231|  11.9k|    } break;
  232|  3.28M|    case STRIP: {
  ------------------
  |  Branch (232:5): [True: 3.28M, False: 12.7k]
  ------------------
  233|  3.28M|      std::size_t pos = scalar.find_last_not_of('\n');
  234|  3.28M|      if (lastEscapedChar != std::string::npos) {
  ------------------
  |  Branch (234:11): [True: 20.3k, False: 3.25M]
  ------------------
  235|  20.3k|        if (pos < lastEscapedChar || pos == std::string::npos) {
  ------------------
  |  Branch (235:13): [True: 12.9k, False: 7.46k]
  |  Branch (235:38): [True: 254, False: 7.21k]
  ------------------
  236|  13.1k|          pos = lastEscapedChar;
  237|  13.1k|        }
  238|  20.3k|      }
  239|  3.28M|      if (pos == std::string::npos) {
  ------------------
  |  Branch (239:11): [True: 350, False: 3.27M]
  ------------------
  240|    350|        scalar.erase();
  241|  3.27M|      } else if (pos < scalar.size()) {
  ------------------
  |  Branch (241:18): [True: 3.26M, False: 13.1k]
  ------------------
  242|  3.26M|        scalar.erase(pos + 1);
  243|  3.26M|      }
  244|  3.28M|    } break;
  245|    332|    default:
  ------------------
  |  Branch (245:5): [True: 332, False: 3.29M]
  ------------------
  246|    332|      break;
  247|  3.29M|  }
  248|       |
  249|  3.29M|  return scalar;
  250|  3.29M|}

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

_ZN4YAML15ScanVerbatimTagERNS_6StreamE:
    9|    764|const std::string ScanVerbatimTag(Stream& INPUT) {
   10|    764|  std::string tag;
   11|       |
   12|       |  // eat the start character
   13|    764|  INPUT.get();
   14|       |
   15|  9.90k|  while (INPUT) {
  ------------------
  |  Branch (15:10): [True: 9.88k, False: 19]
  ------------------
   16|  9.88k|    if (INPUT.peek() == Keys::VerbatimTagEnd) {
  ------------------
  |  Branch (16:9): [True: 735, False: 9.14k]
  ------------------
   17|       |      // eat the end character
   18|    735|      INPUT.get();
   19|    735|      return tag;
   20|    735|    }
   21|       |
   22|  9.14k|    int n = Exp::URI().Match(INPUT);
   23|  9.14k|    if (n <= 0)
  ------------------
  |  Branch (23:9): [True: 10, False: 9.13k]
  ------------------
   24|     10|      break;
   25|       |
   26|  9.13k|    tag += INPUT.get(n);
   27|  9.13k|  }
   28|       |
   29|     29|  throw ParserException(INPUT.mark(), ErrorMsg::END_OF_VERBATIM_TAG);
   30|    764|}
_ZN4YAML13ScanTagHandleERNS_6StreamERb:
   32|  1.11M|const std::string ScanTagHandle(Stream& INPUT, bool& canBeHandle) {
   33|  1.11M|  std::string tag;
   34|  1.11M|  canBeHandle = true;
   35|  1.11M|  Mark firstNonWordChar;
   36|       |
   37|  10.0M|  while (INPUT) {
  ------------------
  |  Branch (37:10): [True: 10.0M, False: 330]
  ------------------
   38|  10.0M|    if (INPUT.peek() == Keys::Tag) {
  ------------------
  |  Branch (38:9): [True: 2.68k, False: 10.0M]
  ------------------
   39|  2.68k|      if (!canBeHandle)
  ------------------
  |  Branch (39:11): [True: 6, False: 2.68k]
  ------------------
   40|      6|        throw ParserException(firstNonWordChar, ErrorMsg::CHAR_IN_TAG_HANDLE);
   41|  2.68k|      break;
   42|  2.68k|    }
   43|       |
   44|  10.0M|    int n = 0;
   45|  10.0M|    if (canBeHandle) {
  ------------------
  |  Branch (45:9): [True: 8.61M, False: 1.44M]
  ------------------
   46|  8.61M|      n = Exp::Word().Match(INPUT);
   47|  8.61M|      if (n <= 0) {
  ------------------
  |  Branch (47:11): [True: 1.11M, False: 7.50M]
  ------------------
   48|  1.11M|        canBeHandle = false;
   49|  1.11M|        firstNonWordChar = INPUT.mark();
   50|  1.11M|      }
   51|  8.61M|    }
   52|       |
   53|  10.0M|    if (!canBeHandle)
  ------------------
  |  Branch (53:9): [True: 2.56M, False: 7.50M]
  ------------------
   54|  2.56M|      n = Exp::Tag().Match(INPUT);
   55|       |
   56|  10.0M|    if (n <= 0)
  ------------------
  |  Branch (56:9): [True: 1.11M, False: 8.95M]
  ------------------
   57|  1.11M|      break;
   58|       |
   59|  8.95M|    tag += INPUT.get(n);
   60|  8.95M|  }
   61|       |
   62|  1.11M|  return tag;
   63|  1.11M|}
_ZN4YAML13ScanTagSuffixERNS_6StreamE:
   65|  2.68k|const std::string ScanTagSuffix(Stream& INPUT) {
   66|  2.68k|  std::string tag;
   67|       |
   68|  1.28M|  while (INPUT) {
  ------------------
  |  Branch (68:10): [True: 1.28M, False: 106]
  ------------------
   69|  1.28M|    int n = Exp::Tag().Match(INPUT);
   70|  1.28M|    if (n <= 0)
  ------------------
  |  Branch (70:9): [True: 2.57k, False: 1.27M]
  ------------------
   71|  2.57k|      break;
   72|       |
   73|  1.27M|    tag += INPUT.get(n);
   74|  1.27M|  }
   75|       |
   76|  2.68k|  if (tag.empty())
  ------------------
  |  Branch (76:7): [True: 14, False: 2.66k]
  ------------------
   77|     14|    throw ParserException(INPUT.mark(), ErrorMsg::TAG_WITH_NO_SUFFIX);
   78|       |
   79|  2.66k|  return tag;
   80|  2.68k|}

_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|  10.7M|  while (INPUT && !Exp::BlankOrBreak().Matches(INPUT))
  ------------------
  |  Branch (36:10): [True: 10.7M, False: 240]
  |  Branch (36:19): [True: 10.7M, False: 11.0k]
  ------------------
   37|  10.7M|    token.value += INPUT.get();
   38|       |
   39|       |  // read parameters
   40|  1.20M|  while (true) {
  ------------------
  |  Branch (40:10): [True: 1.20M, Folded]
  ------------------
   41|       |    // first get rid of whitespace
   42|  2.41M|    while (Exp::Blank().Matches(INPUT))
  ------------------
  |  Branch (42:12): [True: 1.21M, False: 1.20M]
  ------------------
   43|  1.21M|      INPUT.eat(1);
   44|       |
   45|       |    // break on newline or comment
   46|  1.20M|    if (!INPUT || Exp::Break().Matches(INPUT) || Exp::Comment().Matches(INPUT))
  ------------------
  |  Branch (46:9): [True: 779, False: 1.20M]
  |  Branch (46:9): [True: 11.3k, False: 1.19M]
  |  Branch (46:19): [True: 10.3k, False: 1.19M]
  |  Branch (46:50): [True: 200, False: 1.19M]
  ------------------
   47|  11.3k|      break;
   48|       |
   49|       |    // now read parameter
   50|  1.19M|    std::string param;
   51|  26.1M|    while (INPUT && !Exp::BlankOrBreak().Matches(INPUT))
  ------------------
  |  Branch (51:12): [True: 26.1M, False: 494]
  |  Branch (51:21): [True: 24.9M, False: 1.19M]
  ------------------
   52|  24.9M|      param += INPUT.get();
   53|       |
   54|  1.19M|    token.params.push_back(param);
   55|  1.19M|  }
   56|       |
   57|  11.3k|  m_tokens.push(token);
   58|  11.3k|}
_ZN4YAML7Scanner12ScanDocStartEv:
   61|   314k|void Scanner::ScanDocStart() {
   62|   314k|  PopAllIndents();
   63|   314k|  PopAllSimpleKeys();
   64|   314k|  m_simpleKeyAllowed = false;
   65|   314k|  m_canBeJSONFlow = false;
   66|       |
   67|       |  // eat
   68|   314k|  Mark mark = INPUT.mark();
   69|   314k|  INPUT.eat(3);
   70|   314k|  m_tokens.push(Token(Token::DOC_START, mark));
   71|   314k|}
_ZN4YAML7Scanner10ScanDocEndEv:
   74|   151k|void Scanner::ScanDocEnd() {
   75|   151k|  PopAllIndents();
   76|   151k|  PopAllSimpleKeys();
   77|   151k|  m_simpleKeyAllowed = false;
   78|   151k|  m_canBeJSONFlow = false;
   79|       |
   80|       |  // eat
   81|   151k|  Mark mark = INPUT.mark();
   82|   151k|  INPUT.eat(3);
   83|   151k|  m_tokens.push(Token(Token::DOC_END, mark));
   84|   151k|}
_ZN4YAML7Scanner13ScanFlowStartEv:
   87|  46.6M|void Scanner::ScanFlowStart() {
   88|       |  // flows can be simple keys
   89|  46.6M|  InsertPotentialSimpleKey();
   90|  46.6M|  m_simpleKeyAllowed = true;
   91|  46.6M|  m_canBeJSONFlow = false;
   92|       |
   93|       |  // eat
   94|  46.6M|  Mark mark = INPUT.mark();
   95|  46.6M|  char ch = INPUT.get();
   96|  46.6M|  FLOW_MARKER flowType = (ch == Keys::FlowSeqStart ? FLOW_SEQ : FLOW_MAP);
  ------------------
  |  Branch (96:27): [True: 33.6M, False: 13.0M]
  ------------------
   97|  46.6M|  m_flows.push(flowType);
   98|  46.6M|  Token::TYPE type =
   99|  46.6M|      (flowType == FLOW_SEQ ? Token::FLOW_SEQ_START : Token::FLOW_MAP_START);
  ------------------
  |  Branch (99:8): [True: 33.6M, False: 13.0M]
  ------------------
  100|  46.6M|  m_tokens.push(Token(type, mark));
  101|  46.6M|}
_ZN4YAML7Scanner11ScanFlowEndEv:
  104|  1.08M|void Scanner::ScanFlowEnd() {
  105|  1.08M|  if (InBlockContext())
  ------------------
  |  Branch (105:7): [True: 23, False: 1.08M]
  ------------------
  106|     23|    throw ParserException(INPUT.mark(), ErrorMsg::FLOW_END);
  107|       |
  108|       |  // we might have a solo entry in the flow context
  109|  1.08M|  if (InFlowContext()) {
  ------------------
  |  Branch (109:7): [True: 1.08M, False: 0]
  ------------------
  110|  1.08M|    if (m_flows.top() == FLOW_MAP && VerifySimpleKey())
  ------------------
  |  Branch (110:9): [True: 1.06M, False: 21.8k]
  |  Branch (110:38): [True: 80.9k, False: 981k]
  ------------------
  111|  80.9k|      m_tokens.push(Token(Token::VALUE, INPUT.mark()));
  112|  1.00M|    else if (m_flows.top() == FLOW_SEQ)
  ------------------
  |  Branch (112:14): [True: 21.8k, False: 981k]
  ------------------
  113|  21.8k|      InvalidateSimpleKey();
  114|  1.08M|  }
  115|       |
  116|  1.08M|  m_simpleKeyAllowed = false;
  117|  1.08M|  m_canBeJSONFlow = true;
  118|       |
  119|       |  // eat
  120|  1.08M|  Mark mark = INPUT.mark();
  121|  1.08M|  char ch = INPUT.get();
  122|       |
  123|       |  // check that it matches the start
  124|  1.08M|  FLOW_MARKER flowType = (ch == Keys::FlowSeqEnd ? FLOW_SEQ : FLOW_MAP);
  ------------------
  |  Branch (124:27): [True: 21.8k, False: 1.06M]
  ------------------
  125|  1.08M|  if (m_flows.top() != flowType)
  ------------------
  |  Branch (125:7): [True: 10, False: 1.08M]
  ------------------
  126|     10|    throw ParserException(mark, ErrorMsg::FLOW_END);
  127|  1.08M|  m_flows.pop();
  128|       |
  129|  1.08M|  Token::TYPE type = (flowType ? Token::FLOW_SEQ_END : Token::FLOW_MAP_END);
  ------------------
  |  Branch (129:23): [True: 21.8k, False: 1.06M]
  ------------------
  130|  1.08M|  m_tokens.push(Token(type, mark));
  131|  1.08M|}
_ZN4YAML7Scanner13ScanFlowEntryEv:
  134|  3.85M|void Scanner::ScanFlowEntry() {
  135|       |  // we might have a solo entry in the flow context
  136|  3.85M|  if (InFlowContext()) {
  ------------------
  |  Branch (136:7): [True: 3.84M, False: 880]
  ------------------
  137|  3.84M|    if (m_flows.top() == FLOW_MAP && VerifySimpleKey())
  ------------------
  |  Branch (137:9): [True: 1.98M, False: 1.86M]
  |  Branch (137:38): [True: 1.40M, False: 578k]
  ------------------
  138|  1.40M|      m_tokens.push(Token(Token::VALUE, INPUT.mark()));
  139|  2.44M|    else if (m_flows.top() == FLOW_SEQ)
  ------------------
  |  Branch (139:14): [True: 1.86M, False: 578k]
  ------------------
  140|  1.86M|      InvalidateSimpleKey();
  141|  3.84M|  }
  142|       |
  143|  3.85M|  m_simpleKeyAllowed = true;
  144|  3.85M|  m_canBeJSONFlow = false;
  145|       |
  146|       |  // eat
  147|  3.85M|  Mark mark = INPUT.mark();
  148|  3.85M|  INPUT.eat(1);
  149|  3.85M|  m_tokens.push(Token(Token::FLOW_ENTRY, mark));
  150|  3.85M|}
_ZN4YAML7Scanner14ScanBlockEntryEv:
  153|  1.24M|void Scanner::ScanBlockEntry() {
  154|       |  // we better be in the block context!
  155|  1.24M|  if (InFlowContext())
  ------------------
  |  Branch (155:7): [True: 31, False: 1.24M]
  ------------------
  156|     31|    throw ParserException(INPUT.mark(), ErrorMsg::BLOCK_ENTRY);
  157|       |
  158|       |  // can we put it here?
  159|  1.24M|  if (!m_simpleKeyAllowed)
  ------------------
  |  Branch (159:7): [True: 8, False: 1.24M]
  ------------------
  160|      8|    throw ParserException(INPUT.mark(), ErrorMsg::BLOCK_ENTRY);
  161|       |
  162|  1.24M|  PushIndentTo(INPUT.column(), IndentMarker::SEQ);
  163|  1.24M|  m_simpleKeyAllowed = true;
  164|  1.24M|  m_canBeJSONFlow = false;
  165|       |
  166|       |  // eat
  167|  1.24M|  Mark mark = INPUT.mark();
  168|  1.24M|  INPUT.eat(1);
  169|  1.24M|  m_tokens.push(Token(Token::BLOCK_ENTRY, mark));
  170|  1.24M|}
_ZN4YAML7Scanner7ScanKeyEv:
  173|  34.8k|void Scanner::ScanKey() {
  174|       |  // handle keys differently in the block context (and manage indents)
  175|  34.8k|  if (InBlockContext()) {
  ------------------
  |  Branch (175:7): [True: 10.9k, False: 23.8k]
  ------------------
  176|  10.9k|    if (!m_simpleKeyAllowed)
  ------------------
  |  Branch (176:9): [True: 1, False: 10.9k]
  ------------------
  177|      1|      throw ParserException(INPUT.mark(), ErrorMsg::MAP_KEY);
  178|       |
  179|  10.9k|    PushIndentTo(INPUT.column(), IndentMarker::MAP);
  180|  10.9k|  }
  181|       |
  182|       |  // can only put a simple key here if we're in block context
  183|  34.8k|  m_simpleKeyAllowed = InBlockContext();
  184|       |
  185|       |  // eat
  186|  34.8k|  Mark mark = INPUT.mark();
  187|  34.8k|  INPUT.eat(1);
  188|  34.8k|  m_tokens.push(Token(Token::KEY, mark));
  189|  34.8k|}
_ZN4YAML7Scanner9ScanValueEv:
  192|  7.05M|void Scanner::ScanValue() {
  193|       |  // and check that simple key
  194|  7.05M|  bool isSimpleKey = VerifySimpleKey();
  195|  7.05M|  m_canBeJSONFlow = false;
  196|       |
  197|  7.05M|  if (isSimpleKey) {
  ------------------
  |  Branch (197:7): [True: 46.4k, False: 7.00M]
  ------------------
  198|       |    // can't follow a simple key with another simple key (dunno why, though - it
  199|       |    // seems fine)
  200|  46.4k|    m_simpleKeyAllowed = false;
  201|  7.00M|  } else {
  202|       |    // handle values differently in the block context (and manage indents)
  203|  7.00M|    if (InBlockContext()) {
  ------------------
  |  Branch (203:9): [True: 6.99M, False: 13.0k]
  ------------------
  204|  6.99M|      if (!m_simpleKeyAllowed)
  ------------------
  |  Branch (204:11): [True: 74, False: 6.99M]
  ------------------
  205|     74|        throw ParserException(INPUT.mark(), ErrorMsg::MAP_VALUE);
  206|       |
  207|  6.99M|      PushIndentTo(INPUT.column(), IndentMarker::MAP);
  208|  6.99M|    }
  209|       |
  210|       |    // can only put a simple key here if we're in block context
  211|  7.00M|    m_simpleKeyAllowed = InBlockContext();
  212|  7.00M|  }
  213|       |
  214|       |  // we are parsing a `key: value` pair; scalars are always allowed
  215|  7.05M|  m_scalarValueAllowed = true;
  216|       |
  217|       |  // eat
  218|  7.05M|  Mark mark = INPUT.mark();
  219|  7.05M|  INPUT.eat(1);
  220|  7.05M|  m_tokens.push(Token(Token::VALUE, mark));
  221|  7.05M|}
_ZN4YAML7Scanner17ScanAnchorOrAliasEv:
  224|   461k|void Scanner::ScanAnchorOrAlias() {
  225|   461k|  bool alias;
  226|   461k|  std::string name;
  227|       |
  228|       |  // insert a potential simple key
  229|   461k|  InsertPotentialSimpleKey();
  230|   461k|  m_simpleKeyAllowed = false;
  231|   461k|  m_canBeJSONFlow = false;
  232|       |
  233|       |  // eat the indicator
  234|   461k|  Mark mark = INPUT.mark();
  235|   461k|  char indicator = INPUT.get();
  236|   461k|  alias = (indicator == Keys::Alias);
  237|       |
  238|       |  // now eat the content
  239|  33.1M|  while (INPUT && Exp::Anchor().Matches(INPUT))
  ------------------
  |  Branch (239:10): [True: 33.1M, False: 715]
  |  Branch (239:19): [True: 32.7M, False: 461k]
  ------------------
  240|  32.7M|    name += INPUT.get();
  241|       |
  242|       |  // we need to have read SOMETHING!
  243|   461k|  if (name.empty())
  ------------------
  |  Branch (243:7): [True: 33, False: 461k]
  ------------------
  244|     33|    throw ParserException(INPUT.mark(), alias ? ErrorMsg::ALIAS_NOT_FOUND
  ------------------
  |  Branch (244:41): [True: 18, False: 15]
  ------------------
  245|     33|                                              : ErrorMsg::ANCHOR_NOT_FOUND);
  246|       |
  247|       |  // and needs to end correctly
  248|   461k|  if (INPUT && !Exp::AnchorEnd().Matches(INPUT))
  ------------------
  |  Branch (248:7): [True: 461k, False: 692]
  |  Branch (248:16): [True: 6, False: 461k]
  ------------------
  249|      6|    throw ParserException(INPUT.mark(), alias ? ErrorMsg::CHAR_IN_ALIAS
  ------------------
  |  Branch (249:41): [True: 0, False: 6]
  ------------------
  250|      6|                                              : ErrorMsg::CHAR_IN_ANCHOR);
  251|       |
  252|       |  // and we're done
  253|   461k|  Token token(alias ? Token::ALIAS : Token::ANCHOR, mark);
  ------------------
  |  Branch (253:15): [True: 4.65k, False: 457k]
  ------------------
  254|   461k|  token.value = name;
  255|   461k|  m_tokens.push(token);
  256|   461k|}
_ZN4YAML7Scanner7ScanTagEv:
  259|  1.11M|void Scanner::ScanTag() {
  260|       |  // insert a potential simple key
  261|  1.11M|  InsertPotentialSimpleKey();
  262|  1.11M|  m_simpleKeyAllowed = false;
  263|  1.11M|  m_canBeJSONFlow = false;
  264|       |
  265|  1.11M|  Token token(Token::TAG, INPUT.mark());
  266|       |
  267|       |  // eat the indicator
  268|  1.11M|  INPUT.get();
  269|       |
  270|  1.11M|  if (INPUT && INPUT.peek() == Keys::VerbatimTagStart) {
  ------------------
  |  Branch (270:7): [True: 1.11M, False: 197]
  |  Branch (270:16): [True: 764, False: 1.11M]
  ------------------
  271|    764|    std::string tag = ScanVerbatimTag(INPUT);
  272|       |
  273|    764|    token.value = tag;
  274|    764|    token.data = Tag::VERBATIM;
  275|  1.11M|  } else {
  276|  1.11M|    bool canBeHandle;
  277|  1.11M|    token.value = ScanTagHandle(INPUT, canBeHandle);
  278|  1.11M|    if (!canBeHandle && token.value.empty())
  ------------------
  |  Branch (278:9): [True: 1.11M, False: 2.92k]
  |  Branch (278:25): [True: 1.10M, False: 6.57k]
  ------------------
  279|  1.10M|      token.data = Tag::NON_SPECIFIC;
  280|  9.50k|    else if (token.value.empty())
  ------------------
  |  Branch (280:14): [True: 2.16k, False: 7.34k]
  ------------------
  281|  2.16k|      token.data = Tag::SECONDARY_HANDLE;
  282|  7.34k|    else
  283|  7.34k|      token.data = Tag::PRIMARY_HANDLE;
  284|       |
  285|       |    // is there a suffix?
  286|  1.11M|    if (canBeHandle && INPUT.peek() == Keys::Tag) {
  ------------------
  |  Branch (286:9): [True: 2.92k, False: 1.11M]
  |  Branch (286:24): [True: 2.68k, False: 239]
  ------------------
  287|       |      // eat the indicator
  288|  2.68k|      INPUT.get();
  289|  2.68k|      token.params.push_back(ScanTagSuffix(INPUT));
  290|  2.68k|      token.data = Tag::NAMED_HANDLE;
  291|  2.68k|    }
  292|  1.11M|  }
  293|       |
  294|  1.11M|  m_tokens.push(token);
  295|  1.11M|}
_ZN4YAML7Scanner15ScanPlainScalarEv:
  298|  3.28M|void Scanner::ScanPlainScalar() {
  299|  3.28M|  std::string scalar;
  300|       |
  301|       |  // set up the scanning parameters
  302|  3.28M|  ScanScalarParams params;
  303|  3.28M|  params.end =
  304|  3.28M|      (InFlowContext() ? &Exp::ScanScalarEndInFlow() : &Exp::ScanScalarEnd());
  ------------------
  |  Branch (304:8): [True: 1.92M, False: 1.35M]
  ------------------
  305|  3.28M|  params.eatEnd = false;
  306|  3.28M|  params.indent = (InFlowContext() ? 0 : GetTopIndent() + 1);
  ------------------
  |  Branch (306:20): [True: 1.92M, False: 1.35M]
  ------------------
  307|  3.28M|  params.fold = FOLD_FLOW;
  308|  3.28M|  params.eatLeadingWhitespace = true;
  309|  3.28M|  params.trimTrailingSpaces = true;
  310|  3.28M|  params.chomp = STRIP;
  311|  3.28M|  params.onDocIndicator = BREAK;
  312|  3.28M|  params.onTabInIndentation = THROW;
  313|       |
  314|       |  // insert a potential simple key
  315|  3.28M|  InsertPotentialSimpleKey();
  316|       |
  317|  3.28M|  Mark mark = INPUT.mark();
  318|  3.28M|  scalar = ScanScalar(INPUT, params);
  319|       |
  320|       |  // can have a simple key only if we ended the scalar by starting a new line
  321|  3.28M|  m_simpleKeyAllowed = params.leadingSpaces;
  322|  3.28M|  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|  3.28M|  Token token(Token::PLAIN_SCALAR, mark);
  329|  3.28M|  token.value = scalar;
  330|  3.28M|  m_tokens.push(token);
  331|  3.28M|}
_ZN4YAML7Scanner16ScanQuotedScalarEv:
  334|  8.73k|void Scanner::ScanQuotedScalar() {
  335|  8.73k|  std::string scalar;
  336|       |
  337|       |  // peek at single or double quote (don't eat because we need to preserve (for
  338|       |  // the time being) the input position)
  339|  8.73k|  char quote = INPUT.peek();
  340|  8.73k|  bool single = (quote == '\'');
  341|       |
  342|       |  // setup the scanning parameters
  343|  8.73k|  ScanScalarParams params;
  344|  8.73k|  RegEx end = (single ? RegEx(quote) & !Exp::EscSingleQuote() : RegEx(quote));
  ------------------
  |  Branch (344:16): [True: 1.70k, False: 7.03k]
  ------------------
  345|  8.73k|  params.end = &end;
  346|  8.73k|  params.eatEnd = true;
  347|  8.73k|  params.escape = (single ? '\'' : '\\');
  ------------------
  |  Branch (347:20): [True: 1.70k, False: 7.03k]
  ------------------
  348|  8.73k|  params.indent = 0;
  349|  8.73k|  params.fold = FOLD_FLOW;
  350|  8.73k|  params.eatLeadingWhitespace = true;
  351|  8.73k|  params.trimTrailingSpaces = false;
  352|  8.73k|  params.chomp = CLIP;
  353|  8.73k|  params.onDocIndicator = THROW;
  354|       |
  355|       |  // insert a potential simple key
  356|  8.73k|  InsertPotentialSimpleKey();
  357|       |
  358|  8.73k|  Mark mark = INPUT.mark();
  359|       |
  360|       |  // now eat that opening quote
  361|  8.73k|  INPUT.get();
  362|       |
  363|       |  // and scan
  364|  8.73k|  scalar = ScanScalar(INPUT, params);
  365|  8.73k|  m_simpleKeyAllowed = false;
  366|       |  // we just scanned a quoted scalar;
  367|       |  // we can only have another scalar in this line
  368|       |  // if we are in a flow, eg: `[ "foo", "bar" ]` is ok, but `"foo", "bar"` isn't.
  369|  8.73k|  m_scalarValueAllowed = InFlowContext();
  370|  8.73k|  m_canBeJSONFlow = true;
  371|       |
  372|  8.73k|  Token token(Token::NON_PLAIN_SCALAR, mark);
  373|  8.73k|  token.value = scalar;
  374|  8.73k|  m_tokens.push(token);
  375|  8.73k|}
_ZN4YAML7Scanner15ScanBlockScalarEv:
  382|  4.24k|void Scanner::ScanBlockScalar() {
  383|  4.24k|  std::string scalar;
  384|       |
  385|  4.24k|  ScanScalarParams params;
  386|  4.24k|  params.indent = 1;
  387|  4.24k|  params.detectIndent = true;
  388|       |
  389|       |  // eat block indicator ('|' or '>')
  390|  4.24k|  Mark mark = INPUT.mark();
  391|  4.24k|  char indicator = INPUT.get();
  392|  4.24k|  params.fold = (indicator == Keys::FoldedScalar ? FOLD_BLOCK : DONT_FOLD);
  ------------------
  |  Branch (392:18): [True: 3.11k, False: 1.13k]
  ------------------
  393|       |
  394|       |  // eat chomping/indentation indicators
  395|  4.24k|  params.chomp = CLIP;
  396|  4.24k|  int n = Exp::Chomp().Match(INPUT);
  397|  5.44k|  for (int i = 0; i < n; i++) {
  ------------------
  |  Branch (397:19): [True: 1.20k, False: 4.24k]
  ------------------
  398|  1.20k|    char ch = INPUT.get();
  399|  1.20k|    if (ch == '+')
  ------------------
  |  Branch (399:9): [True: 333, False: 870]
  ------------------
  400|    333|      params.chomp = KEEP;
  401|    870|    else if (ch == '-')
  ------------------
  |  Branch (401:14): [True: 359, False: 511]
  ------------------
  402|    359|      params.chomp = STRIP;
  403|    511|    else if (Exp::Digit().Matches(ch)) {
  ------------------
  |  Branch (403:14): [True: 511, False: 0]
  ------------------
  404|    511|      if (ch == '0')
  ------------------
  |  Branch (404:11): [True: 3, False: 508]
  ------------------
  405|      3|        throw ParserException(INPUT.mark(), ErrorMsg::ZERO_INDENT_IN_BLOCK);
  406|       |
  407|    508|      params.indent = ch - '0';
  408|    508|      params.detectIndent = false;
  409|    508|    }
  410|  1.20k|  }
  411|       |
  412|       |  // now eat whitespace
  413|  4.59k|  while (Exp::Blank().Matches(INPUT))
  ------------------
  |  Branch (413:10): [True: 348, False: 4.24k]
  ------------------
  414|    348|    INPUT.eat(1);
  415|       |
  416|       |  // and comments to the end of the line
  417|  4.24k|  if (Exp::Comment().Matches(INPUT))
  ------------------
  |  Branch (417:7): [True: 398, False: 3.84k]
  ------------------
  418|   100k|    while (INPUT && !Exp::Break().Matches(INPUT))
  ------------------
  |  Branch (418:12): [True: 99.9k, False: 14]
  |  Branch (418:21): [True: 99.6k, False: 384]
  ------------------
  419|  99.6k|      INPUT.eat(1);
  420|       |
  421|       |  // if it's not a line break, then we ran into a bad character inline
  422|  4.24k|  if (INPUT && !Exp::Break().Matches(INPUT))
  ------------------
  |  Branch (422:7): [True: 4.15k, False: 92]
  |  Branch (422:16): [True: 51, False: 4.10k]
  ------------------
  423|     51|    throw ParserException(INPUT.mark(), ErrorMsg::CHAR_IN_BLOCK);
  424|       |
  425|       |  // set the initial indentation
  426|  4.19k|  if (GetTopIndent() >= 0)
  ------------------
  |  Branch (426:7): [True: 3.32k, False: 865]
  ------------------
  427|  3.32k|    params.indent += GetTopIndent();
  428|       |
  429|  4.19k|  params.eatLeadingWhitespace = false;
  430|  4.19k|  params.trimTrailingSpaces = false;
  431|  4.19k|  params.onTabInIndentation = THROW;
  432|       |
  433|  4.19k|  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.19k|  m_simpleKeyAllowed = true;
  438|  4.19k|  m_canBeJSONFlow = false;
  439|       |
  440|  4.19k|  Token token(Token::NON_PLAIN_SCALAR, mark);
  441|  4.19k|  token.value = scalar;
  442|  4.19k|  m_tokens.push(token);
  443|  4.19k|}

_ZN4YAML7Scanner9SimpleKeyC2ERKNS_4MarkEm:
    8|  50.9M|    : mark(mark_),
    9|  50.9M|      flowLevel(flowLevel_),
   10|  50.9M|      pIndent(nullptr),
   11|  50.9M|      pMapStart(nullptr),
   12|  50.9M|      pKey(nullptr) {}
_ZN4YAML7Scanner9SimpleKey8ValidateEv:
   14|  1.53M|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.53M|  if (pIndent)
  ------------------
  |  Branch (18:7): [True: 45.6k, False: 1.49M]
  ------------------
   19|  45.6k|    pIndent->status = IndentMarker::VALID;
   20|  1.53M|  if (pMapStart)
  ------------------
  |  Branch (20:7): [True: 45.6k, False: 1.49M]
  ------------------
   21|  45.6k|    pMapStart->status = Token::VALID;
   22|  1.53M|  if (pKey)
  ------------------
  |  Branch (22:7): [True: 1.53M, False: 0]
  ------------------
   23|  1.53M|    pKey->status = Token::VALID;
   24|  1.53M|}
_ZN4YAML7Scanner9SimpleKey10InvalidateEv:
   26|  3.84M|void Scanner::SimpleKey::Invalidate() {
   27|  3.84M|  if (pIndent)
  ------------------
  |  Branch (27:7): [True: 2.09M, False: 1.75M]
  ------------------
   28|  2.09M|    pIndent->status = IndentMarker::INVALID;
   29|  3.84M|  if (pMapStart)
  ------------------
  |  Branch (29:7): [True: 2.09M, False: 1.75M]
  ------------------
   30|  2.09M|    pMapStart->status = Token::INVALID;
   31|  3.84M|  if (pKey)
  ------------------
  |  Branch (31:7): [True: 3.84M, False: 0]
  ------------------
   32|  3.84M|    pKey->status = Token::INVALID;
   33|  3.84M|}
_ZNK4YAML7Scanner27CanInsertPotentialSimpleKeyEv:
   36|  51.5M|bool Scanner::CanInsertPotentialSimpleKey() const {
   37|  51.5M|  if (!m_simpleKeyAllowed)
  ------------------
  |  Branch (37:7): [True: 554k, False: 50.9M]
  ------------------
   38|   554k|    return false;
   39|       |
   40|  50.9M|  return !ExistsActiveSimpleKey();
   41|  51.5M|}
_ZNK4YAML7Scanner21ExistsActiveSimpleKeyEv:
   47|  50.9M|bool Scanner::ExistsActiveSimpleKey() const {
   48|  50.9M|  if (m_simpleKeys.empty())
  ------------------
  |  Branch (48:7): [True: 2.18M, False: 48.7M]
  ------------------
   49|  2.18M|    return false;
   50|       |
   51|  48.7M|  const SimpleKey& key = m_simpleKeys.top();
   52|  48.7M|  return key.flowLevel == GetFlowLevel();
   53|  50.9M|}
_ZN4YAML7Scanner24InsertPotentialSimpleKeyEv:
   58|  51.5M|void Scanner::InsertPotentialSimpleKey() {
   59|  51.5M|  if (!CanInsertPotentialSimpleKey())
  ------------------
  |  Branch (59:7): [True: 558k, False: 50.9M]
  ------------------
   60|   558k|    return;
   61|       |
   62|  50.9M|  SimpleKey key(INPUT.mark(), GetFlowLevel());
   63|       |
   64|       |  // first add a map start, if necessary
   65|  50.9M|  if (InBlockContext()) {
  ------------------
  |  Branch (65:7): [True: 2.16M, False: 48.8M]
  ------------------
   66|  2.16M|    key.pIndent = PushIndentTo(INPUT.column(), IndentMarker::MAP);
   67|  2.16M|    if (key.pIndent) {
  ------------------
  |  Branch (67:9): [True: 2.14M, False: 24.8k]
  ------------------
   68|  2.14M|      key.pIndent->status = IndentMarker::UNKNOWN;
   69|  2.14M|      key.pMapStart = key.pIndent->pStartToken;
   70|  2.14M|      key.pMapStart->status = Token::UNVERIFIED;
   71|  2.14M|    }
   72|  2.16M|  }
   73|       |
   74|       |  // then add the (now unverified) key
   75|  50.9M|  m_tokens.push(Token(Token::KEY, INPUT.mark()));
   76|  50.9M|  key.pKey = &m_tokens.back();
   77|  50.9M|  key.pKey->status = Token::UNVERIFIED;
   78|       |
   79|  50.9M|  m_simpleKeys.push(key);
   80|  50.9M|}
_ZN4YAML7Scanner19InvalidateSimpleKeyEv:
   84|  12.5M|void Scanner::InvalidateSimpleKey() {
   85|  12.5M|  if (m_simpleKeys.empty())
  ------------------
  |  Branch (85:7): [True: 8.55M, False: 4.01M]
  ------------------
   86|  8.55M|    return;
   87|       |
   88|       |  // grab top key
   89|  4.01M|  SimpleKey& key = m_simpleKeys.top();
   90|  4.01M|  if (key.flowLevel != GetFlowLevel())
  ------------------
  |  Branch (90:7): [True: 1.12M, False: 2.88M]
  ------------------
   91|  1.12M|    return;
   92|       |
   93|  2.88M|  key.Invalidate();
   94|  2.88M|  m_simpleKeys.pop();
   95|  2.88M|}
_ZN4YAML7Scanner15VerifySimpleKeyEv:
  100|  10.1M|bool Scanner::VerifySimpleKey() {
  101|  10.1M|  if (m_simpleKeys.empty())
  ------------------
  |  Branch (101:7): [True: 7.52M, False: 2.57M]
  ------------------
  102|  7.52M|    return false;
  103|       |
  104|       |  // grab top key
  105|  2.57M|  SimpleKey key = m_simpleKeys.top();
  106|       |
  107|       |  // only validate if we're in the correct flow level
  108|  2.57M|  if (key.flowLevel != GetFlowLevel())
  ------------------
  |  Branch (108:7): [True: 72.8k, False: 2.50M]
  ------------------
  109|  72.8k|    return false;
  110|       |
  111|  2.50M|  m_simpleKeys.pop();
  112|       |
  113|  2.50M|  bool isValid = true;
  114|       |
  115|       |  // needs to be less than 1024 characters and inline
  116|  2.50M|  if (INPUT.line() != key.mark.line || INPUT.pos() - key.mark.pos > 1024)
  ------------------
  |  Branch (116:7): [True: 64.8k, False: 2.43M]
  |  Branch (116:40): [True: 899k, False: 1.53M]
  ------------------
  117|   964k|    isValid = false;
  118|       |
  119|       |  // invalidate key
  120|  2.50M|  if (isValid)
  ------------------
  |  Branch (120:7): [True: 1.53M, False: 964k]
  ------------------
  121|  1.53M|    key.Validate();
  122|   964k|  else
  123|   964k|    key.Invalidate();
  124|       |
  125|  2.50M|  return isValid;
  126|  2.57M|}
_ZN4YAML7Scanner16PopAllSimpleKeysEv:
  128|   483k|void Scanner::PopAllSimpleKeys() {
  129|  41.6M|  while (!m_simpleKeys.empty())
  ------------------
  |  Branch (129:10): [True: 41.2M, False: 483k]
  ------------------
  130|  41.2M|    m_simpleKeys.pop();
  131|   483k|}

_ZN4YAML15SingleDocParserC2ERNS_7ScannerERKNS_10DirectivesE:
   18|   425k|    : m_scanner(scanner),
   19|   425k|      m_directives(directives),
   20|   425k|      m_pCollectionStack(new CollectionStack),
   21|   425k|      m_anchors{},
   22|   425k|      m_curAnchor(0) {}
_ZN4YAML15SingleDocParserD2Ev:
   24|   425k|SingleDocParser::~SingleDocParser() = default;
_ZN4YAML15SingleDocParser14HandleDocumentERNS_12EventHandlerE:
   29|   425k|void SingleDocParser::HandleDocument(EventHandler& eventHandler) {
   30|   425k|  assert(!m_scanner.empty());  // guaranteed that there are tokens
   31|   425k|  assert(!m_curAnchor);
   32|       |
   33|   425k|  eventHandler.OnDocumentStart(m_scanner.peek().mark);
   34|       |
   35|       |  // eat doc start
   36|   425k|  if (m_scanner.peek().type == Token::DOC_START)
  ------------------
  |  Branch (36:7): [True: 280k, False: 144k]
  ------------------
   37|   280k|    m_scanner.pop();
   38|       |
   39|       |  // recurse!
   40|   425k|  HandleNode(eventHandler);
   41|       |
   42|   425k|  eventHandler.OnDocumentEnd();
   43|       |
   44|       |  // check if any tokens left after the text
   45|   425k|  if (!m_scanner.empty() && m_scanner.peek().type != Token::DOC_END
  ------------------
  |  Branch (45:7): [True: 420k, False: 4.78k]
  |  Branch (45:29): [True: 281k, False: 139k]
  ------------------
   46|   281k|      && m_scanner.peek().type != Token::DOC_START)
  ------------------
  |  Branch (46:10): [True: 375, False: 280k]
  ------------------
   47|    375|    throw ParserException(m_scanner.mark(), ErrorMsg::UNEXPECTED_TOKEN_AFTER_DOC);
   48|       |
   49|       |  // and finally eat any doc ends we see
   50|   424k|  if (!m_scanner.empty() && m_scanner.peek().type == Token::DOC_END)
  ------------------
  |  Branch (50:7): [True: 420k, False: 4.78k]
  |  Branch (50:29): [True: 139k, False: 280k]
  ------------------
   51|   139k|    m_scanner.pop();
   52|   424k|}
_ZN4YAML15SingleDocParser10HandleNodeERNS_12EventHandlerE:
   54|  2.43M|void SingleDocParser::HandleNode(EventHandler& eventHandler) {
   55|  2.43M|  DepthGuard<500> depthguard(depth, m_scanner.mark(), ErrorMsg::BAD_FILE);
   56|       |
   57|       |  // an empty node *is* a possibility
   58|  2.43M|  if (m_scanner.empty()) {
  ------------------
  |  Branch (58:7): [True: 85, False: 2.43M]
  ------------------
   59|     85|    eventHandler.OnNull(m_scanner.mark(), NullAnchor);
   60|     85|    return;
   61|     85|  }
   62|       |
   63|       |  // save location
   64|  2.43M|  Mark mark = m_scanner.peek().mark;
   65|       |
   66|       |  // special case: a value node by itself must be a map, with no header
   67|  2.43M|  if (m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (67:7): [True: 2.82k, False: 2.43M]
  ------------------
   68|  2.82k|    eventHandler.OnMapStart(mark, "?", NullAnchor, EmitterStyle::Default);
   69|  2.82k|    HandleMap(eventHandler);
   70|  2.82k|    eventHandler.OnMapEnd();
   71|  2.82k|    return;
   72|  2.82k|  }
   73|       |
   74|       |  // special case: an alias node
   75|  2.43M|  if (m_scanner.peek().type == Token::ALIAS) {
  ------------------
  |  Branch (75:7): [True: 1.46k, False: 2.42M]
  ------------------
   76|  1.46k|    eventHandler.OnAlias(mark, LookupAnchor(mark, m_scanner.peek().value));
   77|  1.46k|    m_scanner.pop();
   78|  1.46k|    return;
   79|  1.46k|  }
   80|       |
   81|  2.42M|  std::string tag;
   82|  2.42M|  std::string anchor_name;
   83|  2.42M|  anchor_t anchor;
   84|  2.42M|  ParseProperties(tag, anchor, anchor_name);
   85|       |
   86|  2.42M|  if (!anchor_name.empty())
  ------------------
  |  Branch (86:7): [True: 452k, False: 1.97M]
  ------------------
   87|   452k|    eventHandler.OnAnchor(mark, anchor_name);
   88|       |
   89|       |  // after parsing properties, an empty node is again a possibility
   90|  2.42M|  if (m_scanner.empty()) {
  ------------------
  |  Branch (90:7): [True: 717, False: 2.42M]
  ------------------
   91|    717|    eventHandler.OnNull(mark, anchor);
   92|    717|    return;
   93|    717|  }
   94|       |
   95|  2.42M|  const Token& token = m_scanner.peek();
   96|       |
   97|       |  // add non-specific tags
   98|  2.42M|  if (tag.empty())
  ------------------
  |  Branch (98:7): [True: 2.42M, False: 7.08k]
  ------------------
   99|  2.42M|    tag = (token.type == Token::NON_PLAIN_SCALAR ? "!" : "?");
  ------------------
  |  Branch (99:12): [True: 1.20k, False: 2.42M]
  ------------------
  100|       |
  101|  2.42M|  if (token.type == Token::PLAIN_SCALAR
  ------------------
  |  Branch (101:7): [True: 589k, False: 1.83M]
  ------------------
  102|   589k|      && tag.compare("?") == 0 && IsNullString(token.value.data(), token.value.size())) {
  ------------------
  |  Branch (102:10): [True: 588k, False: 947]
  |  Branch (102:35): [True: 16.7k, False: 571k]
  ------------------
  103|  16.7k|    eventHandler.OnNull(mark, anchor);
  104|  16.7k|    m_scanner.pop();
  105|  16.7k|    return;
  106|  16.7k|  }
  107|       |
  108|       |  // now split based on what kind of node we should be
  109|  2.41M|  switch (token.type) {
  110|   572k|    case Token::PLAIN_SCALAR:
  ------------------
  |  Branch (110:5): [True: 572k, False: 1.83M]
  ------------------
  111|   574k|    case Token::NON_PLAIN_SCALAR:
  ------------------
  |  Branch (111:5): [True: 1.27k, False: 2.41M]
  ------------------
  112|   574k|      eventHandler.OnScalar(mark, tag, anchor, token.value);
  113|   574k|      m_scanner.pop();
  114|   574k|      return;
  115|  40.8k|    case Token::FLOW_SEQ_START:
  ------------------
  |  Branch (115:5): [True: 40.8k, False: 2.37M]
  ------------------
  116|  40.8k|      eventHandler.OnSequenceStart(mark, tag, anchor, EmitterStyle::Flow);
  117|  40.8k|      HandleSequence(eventHandler);
  118|  40.8k|      eventHandler.OnSequenceEnd();
  119|  40.8k|      return;
  120|  9.16k|    case Token::BLOCK_SEQ_START:
  ------------------
  |  Branch (120:5): [True: 9.16k, False: 2.40M]
  ------------------
  121|  9.16k|      eventHandler.OnSequenceStart(mark, tag, anchor, EmitterStyle::Block);
  122|  9.16k|      HandleSequence(eventHandler);
  123|  9.16k|      eventHandler.OnSequenceEnd();
  124|  9.16k|      return;
  125|  38.2k|    case Token::FLOW_MAP_START:
  ------------------
  |  Branch (125:5): [True: 38.2k, False: 2.37M]
  ------------------
  126|  38.2k|      eventHandler.OnMapStart(mark, tag, anchor, EmitterStyle::Flow);
  127|  38.2k|      HandleMap(eventHandler);
  128|  38.2k|      eventHandler.OnMapEnd();
  129|  38.2k|      return;
  130|  27.7k|    case Token::BLOCK_MAP_START:
  ------------------
  |  Branch (130:5): [True: 27.7k, False: 2.38M]
  ------------------
  131|  27.7k|      eventHandler.OnMapStart(mark, tag, anchor, EmitterStyle::Block);
  132|  27.7k|      HandleMap(eventHandler);
  133|  27.7k|      eventHandler.OnMapEnd();
  134|  27.7k|      return;
  135|  40.7k|    case Token::KEY:
  ------------------
  |  Branch (135:5): [True: 40.7k, False: 2.37M]
  ------------------
  136|       |      // compact maps can only go in a flow sequence
  137|  40.7k|      if (m_pCollectionStack->GetCurCollectionType() ==
  ------------------
  |  Branch (137:11): [True: 39.8k, False: 884]
  ------------------
  138|  40.7k|          CollectionType::FlowSeq) {
  139|  39.8k|        eventHandler.OnMapStart(mark, tag, anchor, EmitterStyle::Flow);
  140|  39.8k|        HandleMap(eventHandler);
  141|  39.8k|        eventHandler.OnMapEnd();
  142|  39.8k|        return;
  143|  39.8k|      }
  144|    884|      break;
  145|  1.68M|    default:
  ------------------
  |  Branch (145:5): [True: 1.68M, False: 731k]
  ------------------
  146|  1.68M|      break;
  147|  2.41M|  }
  148|       |
  149|  1.68M|  if (tag == "?")
  ------------------
  |  Branch (149:7): [True: 1.67M, False: 2.53k]
  ------------------
  150|  1.67M|    eventHandler.OnNull(mark, anchor);
  151|  2.53k|  else
  152|  2.53k|    eventHandler.OnScalar(mark, tag, anchor, "");
  153|  1.68M|}
_ZN4YAML15SingleDocParser14HandleSequenceERNS_12EventHandlerE:
  155|  49.9k|void SingleDocParser::HandleSequence(EventHandler& eventHandler) {
  156|       |  // split based on start token
  157|  49.9k|  switch (m_scanner.peek().type) {
  158|  9.16k|    case Token::BLOCK_SEQ_START:
  ------------------
  |  Branch (158:5): [True: 9.16k, False: 40.8k]
  ------------------
  159|  9.16k|      HandleBlockSequence(eventHandler);
  160|  9.16k|      break;
  161|  40.8k|    case Token::FLOW_SEQ_START:
  ------------------
  |  Branch (161:5): [True: 40.8k, False: 9.16k]
  ------------------
  162|  40.8k|      HandleFlowSequence(eventHandler);
  163|  40.8k|      break;
  164|      0|    default:
  ------------------
  |  Branch (164:5): [True: 0, False: 49.9k]
  ------------------
  165|      0|      break;
  166|  49.9k|  }
  167|  49.9k|}
_ZN4YAML15SingleDocParser19HandleBlockSequenceERNS_12EventHandlerE:
  169|  9.16k|void SingleDocParser::HandleBlockSequence(EventHandler& eventHandler) {
  170|       |  // eat start token
  171|  9.16k|  m_scanner.pop();
  172|  9.16k|  m_pCollectionStack->PushCollectionType(CollectionType::BlockSeq);
  173|       |
  174|  19.8k|  while (true) {
  ------------------
  |  Branch (174:10): [True: 17.6k, Folded]
  ------------------
  175|  17.6k|    if (m_scanner.empty())
  ------------------
  |  Branch (175:9): [True: 0, False: 17.6k]
  ------------------
  176|      0|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_SEQ);
  177|       |
  178|  17.6k|    Token token = m_scanner.peek();
  179|  17.6k|    if (token.type != Token::BLOCK_ENTRY && token.type != Token::BLOCK_SEQ_END)
  ------------------
  |  Branch (179:9): [True: 6.99k, False: 10.6k]
  |  Branch (179:45): [True: 10, False: 6.98k]
  ------------------
  180|     10|      throw ParserException(token.mark, ErrorMsg::END_OF_SEQ);
  181|       |
  182|  17.6k|    m_scanner.pop();
  183|  17.6k|    if (token.type == Token::BLOCK_SEQ_END)
  ------------------
  |  Branch (183:9): [True: 6.98k, False: 10.6k]
  ------------------
  184|  6.98k|      break;
  185|       |
  186|       |    // check for null
  187|  10.6k|    if (!m_scanner.empty()) {
  ------------------
  |  Branch (187:9): [True: 10.6k, False: 35]
  ------------------
  188|  10.6k|      const Token& nextToken = m_scanner.peek();
  189|  10.6k|      if (nextToken.type == Token::BLOCK_ENTRY ||
  ------------------
  |  Branch (189:11): [True: 1.18k, False: 9.44k]
  ------------------
  190|  9.44k|          nextToken.type == Token::BLOCK_SEQ_END) {
  ------------------
  |  Branch (190:11): [True: 3.75k, False: 5.68k]
  ------------------
  191|  4.94k|        eventHandler.OnNull(nextToken.mark, NullAnchor);
  192|  4.94k|        continue;
  193|  4.94k|      }
  194|  10.6k|    }
  195|       |
  196|  5.71k|    HandleNode(eventHandler);
  197|  5.71k|  }
  198|       |
  199|  9.15k|  m_pCollectionStack->PopCollectionType(CollectionType::BlockSeq);
  200|  9.15k|}
_ZN4YAML15SingleDocParser18HandleFlowSequenceERNS_12EventHandlerE:
  202|  40.8k|void SingleDocParser::HandleFlowSequence(EventHandler& eventHandler) {
  203|       |  // eat start token
  204|  40.8k|  m_scanner.pop();
  205|  40.8k|  m_pCollectionStack->PushCollectionType(CollectionType::FlowSeq);
  206|       |
  207|  1.88M|  while (true) {
  ------------------
  |  Branch (207:10): [True: 1.84M, Folded]
  ------------------
  208|  1.84M|    if (m_scanner.empty())
  ------------------
  |  Branch (208:9): [True: 212, False: 1.84M]
  ------------------
  209|    212|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_SEQ_FLOW);
  210|       |
  211|       |    // first check for end
  212|  1.84M|    if (m_scanner.peek().type == Token::FLOW_SEQ_END) {
  ------------------
  |  Branch (212:9): [True: 944, False: 1.84M]
  ------------------
  213|    944|      m_scanner.pop();
  214|    944|      break;
  215|    944|    }
  216|       |
  217|       |    // then read the node
  218|  1.84M|    HandleNode(eventHandler);
  219|       |
  220|  1.84M|    if (m_scanner.empty())
  ------------------
  |  Branch (220:9): [True: 656, False: 1.83M]
  ------------------
  221|    656|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_SEQ_FLOW);
  222|       |
  223|       |    // now eat the separator (or could be a sequence end, which we ignore - but
  224|       |    // if it's neither, then it's a bad node)
  225|  1.83M|    Token& token = m_scanner.peek();
  226|  1.83M|    if (token.type == Token::FLOW_ENTRY)
  ------------------
  |  Branch (226:9): [True: 1.79M, False: 39.8k]
  ------------------
  227|  1.79M|      m_scanner.pop();
  228|  39.8k|    else if (token.type != Token::FLOW_SEQ_END)
  ------------------
  |  Branch (228:14): [True: 214, False: 39.6k]
  ------------------
  229|    214|      throw ParserException(token.mark, ErrorMsg::END_OF_SEQ_FLOW);
  230|  1.83M|  }
  231|       |
  232|  39.7k|  m_pCollectionStack->PopCollectionType(CollectionType::FlowSeq);
  233|  39.7k|}
_ZN4YAML15SingleDocParser9HandleMapERNS_12EventHandlerE:
  235|   108k|void SingleDocParser::HandleMap(EventHandler& eventHandler) {
  236|       |  // split based on start token
  237|   108k|  switch (m_scanner.peek().type) {
  238|  27.7k|    case Token::BLOCK_MAP_START:
  ------------------
  |  Branch (238:5): [True: 27.7k, False: 80.9k]
  ------------------
  239|  27.7k|      HandleBlockMap(eventHandler);
  240|  27.7k|      break;
  241|  38.2k|    case Token::FLOW_MAP_START:
  ------------------
  |  Branch (241:5): [True: 38.2k, False: 70.4k]
  ------------------
  242|  38.2k|      HandleFlowMap(eventHandler);
  243|  38.2k|      break;
  244|  39.8k|    case Token::KEY:
  ------------------
  |  Branch (244:5): [True: 39.8k, False: 68.8k]
  ------------------
  245|  39.8k|      HandleCompactMap(eventHandler);
  246|  39.8k|      break;
  247|  2.82k|    case Token::VALUE:
  ------------------
  |  Branch (247:5): [True: 2.82k, False: 105k]
  ------------------
  248|  2.82k|      HandleCompactMapWithNoKey(eventHandler);
  249|  2.82k|      break;
  250|      0|    default:
  ------------------
  |  Branch (250:5): [True: 0, False: 108k]
  ------------------
  251|      0|      break;
  252|   108k|  }
  253|   108k|}
_ZN4YAML15SingleDocParser14HandleBlockMapERNS_12EventHandlerE:
  255|  27.7k|void SingleDocParser::HandleBlockMap(EventHandler& eventHandler) {
  256|       |  // eat start token
  257|  27.7k|  m_scanner.pop();
  258|  27.7k|  m_pCollectionStack->PushCollectionType(CollectionType::BlockMap);
  259|       |
  260|  60.4k|  while (true) {
  ------------------
  |  Branch (260:10): [True: 57.2k, Folded]
  ------------------
  261|  57.2k|    if (m_scanner.empty())
  ------------------
  |  Branch (261:9): [True: 0, False: 57.2k]
  ------------------
  262|      0|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_MAP);
  263|       |
  264|  57.2k|    Token token = m_scanner.peek();
  265|  57.2k|    if (token.type != Token::KEY && token.type != Token::VALUE &&
  ------------------
  |  Branch (265:9): [True: 41.4k, False: 15.8k]
  |  Branch (265:37): [True: 24.5k, False: 16.8k]
  ------------------
  266|  24.5k|        token.type != Token::BLOCK_MAP_END)
  ------------------
  |  Branch (266:9): [True: 93, False: 24.5k]
  ------------------
  267|     93|      throw ParserException(token.mark, ErrorMsg::END_OF_MAP);
  268|       |
  269|  57.1k|    if (token.type == Token::BLOCK_MAP_END) {
  ------------------
  |  Branch (269:9): [True: 24.5k, False: 32.6k]
  ------------------
  270|  24.5k|      m_scanner.pop();
  271|  24.5k|      break;
  272|  24.5k|    }
  273|       |
  274|       |    // grab key (if non-null)
  275|  32.6k|    if (token.type == Token::KEY) {
  ------------------
  |  Branch (275:9): [True: 15.7k, False: 16.9k]
  ------------------
  276|  15.7k|      m_scanner.pop();
  277|  15.7k|      HandleNode(eventHandler);
  278|  16.9k|    } else {
  279|  16.9k|      eventHandler.OnNull(token.mark, NullAnchor);
  280|  16.9k|    }
  281|       |
  282|       |    // now grab value (optional)
  283|  32.6k|    if (!m_scanner.empty() && m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (283:9): [True: 30.1k, False: 2.57k]
  |  Branch (283:31): [True: 25.8k, False: 4.22k]
  ------------------
  284|  25.8k|      m_scanner.pop();
  285|  25.8k|      HandleNode(eventHandler);
  286|  25.8k|    } else {
  287|  6.80k|      eventHandler.OnNull(token.mark, NullAnchor);
  288|  6.80k|    }
  289|  32.6k|  }
  290|       |
  291|  27.6k|  m_pCollectionStack->PopCollectionType(CollectionType::BlockMap);
  292|  27.6k|}
_ZN4YAML15SingleDocParser13HandleFlowMapERNS_12EventHandlerE:
  294|  38.2k|void SingleDocParser::HandleFlowMap(EventHandler& eventHandler) {
  295|       |  // eat start token
  296|  38.2k|  m_scanner.pop();
  297|  38.2k|  m_pCollectionStack->PushCollectionType(CollectionType::FlowMap);
  298|       |
  299|   652k|  while (true) {
  ------------------
  |  Branch (299:10): [True: 615k, Folded]
  ------------------
  300|   615k|    if (m_scanner.empty())
  ------------------
  |  Branch (300:9): [True: 159, False: 615k]
  ------------------
  301|    159|      throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_MAP_FLOW);
  302|       |
  303|   615k|    Token& token = m_scanner.peek();
  304|   615k|    const Mark mark = token.mark;
  305|       |    // first check for end
  306|   615k|    if (token.type == Token::FLOW_MAP_END) {
  ------------------
  |  Branch (306:9): [True: 796, False: 614k]
  ------------------
  307|    796|      m_scanner.pop();
  308|    796|      break;
  309|    796|    }
  310|       |
  311|       |    // grab key (if non-null)
  312|   614k|    if (token.type == Token::KEY) {
  ------------------
  |  Branch (312:9): [True: 57.6k, False: 556k]
  ------------------
  313|  57.6k|      m_scanner.pop();
  314|  57.6k|      HandleNode(eventHandler);
  315|   556k|    } else {
  316|   556k|      eventHandler.OnNull(mark, NullAnchor);
  317|   556k|    }
  318|       |
  319|       |    // now grab value (optional)
  320|   614k|    if (!m_scanner.empty() && m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (320:9): [True: 577k, False: 37.0k]
  |  Branch (320:31): [True: 20.3k, False: 556k]
  ------------------
  321|  20.3k|      m_scanner.pop();
  322|  20.3k|      HandleNode(eventHandler);
  323|   594k|    } else {
  324|   594k|      eventHandler.OnNull(mark, NullAnchor);
  325|   594k|    }
  326|       |
  327|   614k|    if (m_scanner.empty())
  ------------------
  |  Branch (327:9): [True: 297, False: 614k]
  ------------------
  328|    297|      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|   614k|    Token& nextToken = m_scanner.peek();
  333|   614k|    if (nextToken.type == Token::FLOW_ENTRY)
  ------------------
  |  Branch (333:9): [True: 576k, False: 37.3k]
  ------------------
  334|   576k|      m_scanner.pop();
  335|  37.3k|    else if (nextToken.type != Token::FLOW_MAP_END)
  ------------------
  |  Branch (335:14): [True: 191, False: 37.2k]
  ------------------
  336|    191|      throw ParserException(nextToken.mark, ErrorMsg::END_OF_MAP_FLOW);
  337|   614k|  }
  338|       |
  339|  37.6k|  m_pCollectionStack->PopCollectionType(CollectionType::FlowMap);
  340|  37.6k|}
_ZN4YAML15SingleDocParser16HandleCompactMapERNS_12EventHandlerE:
  343|  39.8k|void SingleDocParser::HandleCompactMap(EventHandler& eventHandler) {
  344|  39.8k|  m_pCollectionStack->PushCollectionType(CollectionType::CompactMap);
  345|       |
  346|       |  // grab key
  347|  39.8k|  Mark mark = m_scanner.peek().mark;
  348|  39.8k|  m_scanner.pop();
  349|  39.8k|  HandleNode(eventHandler);
  350|       |
  351|       |  // now grab value (optional)
  352|  39.8k|  if (!m_scanner.empty() && m_scanner.peek().type == Token::VALUE) {
  ------------------
  |  Branch (352:7): [True: 678, False: 39.1k]
  |  Branch (352:29): [True: 302, False: 376]
  ------------------
  353|    302|    m_scanner.pop();
  354|    302|    HandleNode(eventHandler);
  355|  39.5k|  } else {
  356|  39.5k|    eventHandler.OnNull(mark, NullAnchor);
  357|  39.5k|  }
  358|       |
  359|  39.8k|  m_pCollectionStack->PopCollectionType(CollectionType::CompactMap);
  360|  39.8k|}
_ZN4YAML15SingleDocParser25HandleCompactMapWithNoKeyERNS_12EventHandlerE:
  363|  2.82k|void SingleDocParser::HandleCompactMapWithNoKey(EventHandler& eventHandler) {
  364|  2.82k|  m_pCollectionStack->PushCollectionType(CollectionType::CompactMap);
  365|       |
  366|       |  // null key
  367|  2.82k|  eventHandler.OnNull(m_scanner.peek().mark, NullAnchor);
  368|       |
  369|       |  // grab value
  370|  2.82k|  m_scanner.pop();
  371|  2.82k|  HandleNode(eventHandler);
  372|       |
  373|  2.82k|  m_pCollectionStack->PopCollectionType(CollectionType::CompactMap);
  374|  2.82k|}
_ZN4YAML15SingleDocParser15ParsePropertiesERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERmS8_:
  379|  2.42M|                                      std::string& anchor_name) {
  380|  2.42M|  tag.clear();
  381|  2.42M|  anchor_name.clear();
  382|  2.42M|  anchor = NullAnchor;
  383|       |
  384|  2.88M|  while (true) {
  ------------------
  |  Branch (384:10): [True: 2.88M, Folded]
  ------------------
  385|  2.88M|    if (m_scanner.empty())
  ------------------
  |  Branch (385:9): [True: 717, False: 2.88M]
  ------------------
  386|    717|      return;
  387|       |
  388|  2.88M|    switch (m_scanner.peek().type) {
  389|  7.45k|      case Token::TAG:
  ------------------
  |  Branch (389:7): [True: 7.45k, False: 2.88M]
  ------------------
  390|  7.45k|        ParseTag(tag);
  391|  7.45k|        break;
  392|   452k|      case Token::ANCHOR:
  ------------------
  |  Branch (392:7): [True: 452k, False: 2.43M]
  ------------------
  393|   452k|        ParseAnchor(anchor, anchor_name);
  394|   452k|        break;
  395|  2.42M|      default:
  ------------------
  |  Branch (395:7): [True: 2.42M, False: 460k]
  ------------------
  396|  2.42M|        return;
  397|  2.88M|    }
  398|  2.88M|  }
  399|  2.42M|}
_ZN4YAML15SingleDocParser8ParseTagERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  401|  7.45k|void SingleDocParser::ParseTag(std::string& tag) {
  402|  7.45k|  Token& token = m_scanner.peek();
  403|  7.45k|  if (!tag.empty())
  ------------------
  |  Branch (403:7): [True: 61, False: 7.39k]
  ------------------
  404|     61|    throw ParserException(token.mark, ErrorMsg::MULTIPLE_TAGS);
  405|       |
  406|  7.39k|  Tag tagInfo(token);
  407|  7.39k|  tag = tagInfo.Translate(m_directives);
  408|  7.39k|  m_scanner.pop();
  409|  7.39k|}
_ZN4YAML15SingleDocParser11ParseAnchorERmRNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  411|   452k|void SingleDocParser::ParseAnchor(anchor_t& anchor, std::string& anchor_name) {
  412|   452k|  Token& token = m_scanner.peek();
  413|   452k|  if (anchor)
  ------------------
  |  Branch (413:7): [True: 17, False: 452k]
  ------------------
  414|     17|    throw ParserException(token.mark, ErrorMsg::MULTIPLE_ANCHORS);
  415|       |
  416|   452k|  anchor_name = token.value;
  417|   452k|  anchor = RegisterAnchor(token.value);
  418|   452k|  m_scanner.pop();
  419|   452k|}
_ZN4YAML15SingleDocParser14RegisterAnchorERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  421|   452k|anchor_t SingleDocParser::RegisterAnchor(const std::string& name) {
  422|   452k|  if (name.empty())
  ------------------
  |  Branch (422:7): [True: 0, False: 452k]
  ------------------
  423|      0|    return NullAnchor;
  424|       |
  425|   452k|  return m_anchors[name] = ++m_curAnchor;
  426|   452k|}
_ZNK4YAML15SingleDocParser12LookupAnchorERKNS_4MarkERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  429|  1.46k|                                       const std::string& name) const {
  430|  1.46k|  auto it = m_anchors.find(name);
  431|  1.46k|  if (it == m_anchors.end()) {
  ------------------
  |  Branch (431:7): [True: 315, False: 1.15k]
  ------------------
  432|    315|    std::stringstream ss;
  433|    315|    ss << ErrorMsg::UNKNOWN_ANCHOR << name;
  434|    315|    throw ParserException(mark, ss.str());
  435|    315|  }
  436|       |
  437|  1.15k|  return it->second;
  438|  1.46k|}

_ZN4YAML6StreamC2ERNSt3__113basic_istreamIcNS1_11char_traitsIcEEEE:
  186|  6.87k|    : m_input(input),
  187|  6.87k|      m_mark{},
  188|  6.87k|      m_charSet{},
  189|  6.87k|      m_readahead{},
  190|  6.87k|      m_pPrefetched(new unsigned char[YAML_PREFETCH_SIZE]),
  ------------------
  |  |    6|  6.87k|#define YAML_PREFETCH_SIZE 2048
  ------------------
  191|  6.87k|      m_nPrefetchedAvailable(0),
  192|  6.87k|      m_nPrefetchedUsed(0) {
  193|  6.87k|  using char_traits = std::istream::traits_type;
  194|       |
  195|  6.87k|  if (!input)
  ------------------
  |  Branch (195:7): [True: 0, False: 6.87k]
  ------------------
  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.87k|  char_traits::int_type intro[4]{};
  201|  6.87k|  int nIntroUsed = 0;
  202|  6.87k|  UtfIntroState state = uis_start;
  203|  21.6k|  for (; !s_introFinalState[state];) {
  ------------------
  |  Branch (203:10): [True: 14.7k, False: 6.87k]
  ------------------
  204|  14.7k|    std::istream::int_type ch = input.get();
  205|  14.7k|    intro[nIntroUsed++] = ch;
  206|  14.7k|    UtfIntroCharType charType = IntroCharTypeOf(ch);
  207|  14.7k|    UtfIntroState newState = s_introTransitions[state][charType];
  208|  14.7k|    int nUngets = s_introUngetCount[state][charType];
  209|  14.7k|    if (nUngets > 0) {
  ------------------
  |  Branch (209:9): [True: 6.85k, False: 7.90k]
  ------------------
  210|  6.85k|      input.clear();
  211|  21.5k|      for (; nUngets > 0; --nUngets) {
  ------------------
  |  Branch (211:14): [True: 14.7k, False: 6.85k]
  ------------------
  212|  14.7k|        if (char_traits::eof() != intro[--nIntroUsed])
  ------------------
  |  Branch (212:13): [True: 14.6k, False: 92]
  ------------------
  213|  14.6k|          input.putback(char_traits::to_char_type(intro[nIntroUsed]));
  214|  14.7k|      }
  215|  6.85k|    }
  216|  14.7k|    state = newState;
  217|  14.7k|  }
  218|       |
  219|  6.87k|  switch (state) {
  220|  5.46k|    case uis_utf8:
  ------------------
  |  Branch (220:5): [True: 5.46k, False: 1.41k]
  ------------------
  221|  5.46k|      m_charSet = utf8;
  222|  5.46k|      break;
  223|    781|    case uis_utf16le:
  ------------------
  |  Branch (223:5): [True: 781, False: 6.09k]
  ------------------
  224|    781|      m_charSet = utf16le;
  225|    781|      break;
  226|    495|    case uis_utf16be:
  ------------------
  |  Branch (226:5): [True: 495, False: 6.37k]
  ------------------
  227|    495|      m_charSet = utf16be;
  228|    495|      break;
  229|     72|    case uis_utf32le:
  ------------------
  |  Branch (229:5): [True: 72, False: 6.80k]
  ------------------
  230|     72|      m_charSet = utf32le;
  231|     72|      break;
  232|     63|    case uis_utf32be:
  ------------------
  |  Branch (232:5): [True: 63, False: 6.80k]
  ------------------
  233|     63|      m_charSet = utf32be;
  234|     63|      break;
  235|      0|    default:
  ------------------
  |  Branch (235:5): [True: 0, False: 6.87k]
  ------------------
  236|      0|      m_charSet = utf8;
  237|      0|      break;
  238|  6.87k|  }
  239|       |
  240|  6.87k|  ReadAheadTo(0);
  241|  6.87k|}
_ZN4YAML6StreamD2Ev:
  243|  6.87k|Stream::~Stream() { delete[] m_pPrefetched; }
_ZNK4YAML6Stream4peekEv:
  245|   605M|char Stream::peek() const {
  246|   605M|  if (m_readahead.empty()) {
  ------------------
  |  Branch (246:7): [True: 0, False: 605M]
  ------------------
  247|      0|    return Stream::eof();
  248|      0|  }
  249|       |
  250|   605M|  return m_readahead[0];
  251|   605M|}
_ZNK4YAML6StreamcvbEv:
  253|   346M|Stream::operator bool() const {
  254|   346M|  return m_input.good() ||
  ------------------
  |  Branch (254:10): [True: 329M, False: 16.9M]
  ------------------
  255|  16.9M|         (!m_readahead.empty() && m_readahead[0] != Stream::eof());
  ------------------
  |  Branch (255:11): [True: 16.9M, False: 0]
  |  Branch (255:35): [True: 16.8M, False: 19.5k]
  ------------------
  256|   346M|}
_ZN4YAML6Stream3getEv:
  260|   251M|char Stream::get() {
  261|   251M|  char ch = peek();
  262|   251M|  AdvanceCurrent();
  263|   251M|  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|   251M|  if (!m_lineEndingSymbol) {
  ------------------
  |  Branch (269:7): [True: 132M, False: 118M]
  ------------------
  270|   132M|    if (ch == '\n') { // line ending is '\n'
  ------------------
  |  Branch (270:9): [True: 1.77k, False: 132M]
  ------------------
  271|  1.77k|      m_lineEndingSymbol = '\n';
  272|   132M|    } else if (ch == '\r') {
  ------------------
  |  Branch (272:16): [True: 987, False: 132M]
  ------------------
  273|    987|      auto ch2 = peek();
  274|    987|      if (ch2 == '\n') { // line ending is '\r\n'
  ------------------
  |  Branch (274:11): [True: 15, False: 972]
  ------------------
  275|     15|        m_lineEndingSymbol = '\n';
  276|    972|      } else { // line ending is '\r'
  277|    972|        m_lineEndingSymbol = '\r';
  278|    972|      }
  279|    987|    }
  280|   132M|  }
  281|       |
  282|   251M|  if (ch == m_lineEndingSymbol) {
  ------------------
  |  Branch (282:7): [True: 10.2M, False: 241M]
  ------------------
  283|  10.2M|    m_mark.column = 0;
  284|  10.2M|    m_mark.line++;
  285|  10.2M|  }
  286|       |
  287|   251M|  return ch;
  288|   251M|}
_ZN4YAML6Stream3getEi:
  292|  10.2M|std::string Stream::get(int n) {
  293|  10.2M|  std::string ret;
  294|  10.2M|  if (n > 0) {
  ------------------
  |  Branch (294:7): [True: 10.2M, False: 0]
  ------------------
  295|  10.2M|    ret.reserve(static_cast<std::string::size_type>(n));
  296|  20.4M|    for (int i = 0; i < n; i++)
  ------------------
  |  Branch (296:21): [True: 10.2M, False: 10.2M]
  ------------------
  297|  10.2M|      ret += get();
  298|  10.2M|  }
  299|  10.2M|  return ret;
  300|  10.2M|}
_ZN4YAML6Stream3eatEi:
  304|  46.7M|void Stream::eat(int n) {
  305|  94.5M|  for (int i = 0; i < n; i++)
  ------------------
  |  Branch (305:19): [True: 47.7M, False: 46.7M]
  ------------------
  306|  47.7M|    get();
  307|  46.7M|}
_ZN4YAML6Stream14AdvanceCurrentEv:
  309|   251M|void Stream::AdvanceCurrent() {
  310|   251M|  if (!m_readahead.empty()) {
  ------------------
  |  Branch (310:7): [True: 251M, False: 0]
  ------------------
  311|   251M|    m_readahead.pop_front();
  312|   251M|    m_mark.pos++;
  313|   251M|  }
  314|       |
  315|   251M|  ReadAheadTo(0);
  316|   251M|}
_ZNK4YAML6Stream12_ReadAheadToEm:
  318|   161M|bool Stream::_ReadAheadTo(size_t i) const {
  319|   322M|  while (m_input.good() && (m_readahead.size() <= i)) {
  ------------------
  |  Branch (319:10): [True: 322M, False: 7.05k]
  |  Branch (319:28): [True: 161M, False: 161M]
  ------------------
  320|   161M|    switch (m_charSet) {
  ------------------
  |  Branch (320:13): [True: 161M, False: 0]
  ------------------
  321|   141M|      case utf8:
  ------------------
  |  Branch (321:7): [True: 141M, False: 19.9M]
  ------------------
  322|   141M|        StreamInUtf8();
  323|   141M|        break;
  324|  9.35M|      case utf16le:
  ------------------
  |  Branch (324:7): [True: 9.35M, False: 151M]
  ------------------
  325|  9.35M|        StreamInUtf16();
  326|  9.35M|        break;
  327|  7.98M|      case utf16be:
  ------------------
  |  Branch (327:7): [True: 7.98M, False: 153M]
  ------------------
  328|  7.98M|        StreamInUtf16();
  329|  7.98M|        break;
  330|  1.03M|      case utf32le:
  ------------------
  |  Branch (330:7): [True: 1.03M, False: 160M]
  ------------------
  331|  1.03M|        StreamInUtf32();
  332|  1.03M|        break;
  333|  1.54M|      case utf32be:
  ------------------
  |  Branch (333:7): [True: 1.54M, False: 159M]
  ------------------
  334|  1.54M|        StreamInUtf32();
  335|  1.54M|        break;
  336|   161M|    }
  337|   161M|  }
  338|       |
  339|       |  // signal end of stream
  340|   161M|  if (!m_input.good())
  ------------------
  |  Branch (340:7): [True: 7.05k, False: 161M]
  ------------------
  341|  7.05k|    m_readahead.push_back(Stream::eof());
  342|       |
  343|   161M|  return m_readahead.size() > i;
  344|   161M|}
_ZNK4YAML6Stream12StreamInUtf8Ev:
  346|   141M|void Stream::StreamInUtf8() const {
  347|   141M|  unsigned char b = GetNextByte();
  348|   141M|  if (m_input.good()) {
  ------------------
  |  Branch (348:7): [True: 141M, False: 5.18k]
  ------------------
  349|   141M|    m_readahead.push_back(static_cast<char>(b));
  350|   141M|  }
  351|   141M|}
_ZNK4YAML6Stream13StreamInUtf16Ev:
  353|  17.3M|void Stream::StreamInUtf16() const {
  354|  17.3M|  unsigned long ch = 0;
  355|  17.3M|  unsigned char bytes[2];
  356|  17.3M|  int nBigEnd = (m_charSet == utf16be) ? 0 : 1;
  ------------------
  |  Branch (356:17): [True: 7.98M, False: 9.35M]
  ------------------
  357|       |
  358|  17.3M|  bytes[0] = GetNextByte();
  359|  17.3M|  bytes[1] = GetNextByte();
  360|  17.3M|  if (!m_input.good()) {
  ------------------
  |  Branch (360:7): [True: 864, False: 17.3M]
  ------------------
  361|    864|    return;
  362|    864|  }
  363|  17.3M|  ch = (static_cast<unsigned long>(bytes[nBigEnd]) << 8) |
  364|  17.3M|       static_cast<unsigned long>(bytes[1 ^ nBigEnd]);
  365|       |
  366|  17.3M|  if (ch >= 0xDC00 && ch < 0xE000) {
  ------------------
  |  Branch (366:7): [True: 169k, False: 17.1M]
  |  Branch (366:23): [True: 9.00k, False: 160k]
  ------------------
  367|       |    // Trailing (low) surrogate...ugh, wrong order
  368|  9.00k|    QueueUnicodeCodepoint(m_readahead, CP_REPLACEMENT_CHARACTER);
  ------------------
  |  |   12|  9.00k|#define CP_REPLACEMENT_CHARACTER (0xFFFD)
  ------------------
  369|  9.00k|    return;
  370|  9.00k|  }
  371|       |
  372|  17.3M|  if (ch >= 0xD800 && ch < 0xDC00) {
  ------------------
  |  Branch (372:7): [True: 181k, False: 17.1M]
  |  Branch (372:23): [True: 21.2k, False: 160k]
  ------------------
  373|       |    // ch is a leading (high) surrogate
  374|       |
  375|       |    // Four byte UTF-8 code point
  376|       |
  377|       |    // Read the trailing (low) surrogate
  378|  19.8M|    for (;;) {
  379|  19.8M|      bytes[0] = GetNextByte();
  380|  19.8M|      bytes[1] = GetNextByte();
  381|  19.8M|      if (!m_input.good()) {
  ------------------
  |  Branch (381:11): [True: 340, False: 19.8M]
  ------------------
  382|    340|        QueueUnicodeCodepoint(m_readahead, CP_REPLACEMENT_CHARACTER);
  ------------------
  |  |   12|    340|#define CP_REPLACEMENT_CHARACTER (0xFFFD)
  ------------------
  383|    340|        return;
  384|    340|      }
  385|  19.8M|      unsigned long chLow = (static_cast<unsigned long>(bytes[nBigEnd]) << 8) |
  386|  19.8M|                            static_cast<unsigned long>(bytes[1 ^ nBigEnd]);
  387|  19.8M|      if (chLow < 0xDC00 || chLow >= 0xE000) {
  ------------------
  |  Branch (387:11): [True: 19.8M, False: 4.11k]
  |  Branch (387:29): [True: 2.75k, False: 1.36k]
  ------------------
  388|       |        // Trouble...not a low surrogate.  Dump a REPLACEMENT CHARACTER into the
  389|       |        // stream.
  390|  19.8M|        QueueUnicodeCodepoint(m_readahead, CP_REPLACEMENT_CHARACTER);
  ------------------
  |  |   12|  19.8M|#define CP_REPLACEMENT_CHARACTER (0xFFFD)
  ------------------
  391|       |
  392|       |        // Deal with the next UTF-16 unit
  393|  19.8M|        if (chLow < 0xD800 || chLow >= 0xE000) {
  ------------------
  |  Branch (393:13): [True: 16.7k, False: 19.8M]
  |  Branch (393:31): [True: 2.75k, False: 19.8M]
  ------------------
  394|       |          // Easiest case: queue the codepoint and return
  395|  19.5k|          QueueUnicodeCodepoint(m_readahead, ch);
  396|  19.5k|          return;
  397|  19.5k|        }
  398|       |        // Start the loop over with the new high surrogate
  399|  19.8M|        ch = chLow;
  400|  19.8M|        continue;
  401|  19.8M|      }
  402|       |
  403|       |      // Select the payload bits from the high surrogate
  404|  1.36k|      ch &= 0x3FF;
  405|  1.36k|      ch <<= 10;
  406|       |
  407|       |      // Include bits from low surrogate
  408|  1.36k|      ch |= (chLow & 0x3FF);
  409|       |
  410|       |      // Add the surrogacy offset
  411|  1.36k|      ch += 0x10000;
  412|  1.36k|      break;
  413|  19.8M|    }
  414|  21.2k|  }
  415|       |
  416|  17.3M|  QueueUnicodeCodepoint(m_readahead, ch);
  417|  17.3M|}
_ZNK4YAML6Stream11GetNextByteEv:
  423|   226M|unsigned char Stream::GetNextByte() const {
  424|   226M|  if (m_nPrefetchedUsed >= m_nPrefetchedAvailable) {
  ------------------
  |  Branch (424:7): [True: 124k, False: 226M]
  ------------------
  425|   124k|    std::streambuf* pBuf = m_input.rdbuf();
  426|   124k|    m_nPrefetchedAvailable = static_cast<std::size_t>(
  427|   124k|        pBuf->sgetn(ReadBuffer(m_pPrefetched), YAML_PREFETCH_SIZE));
  ------------------
  |  |    6|   124k|#define YAML_PREFETCH_SIZE 2048
  ------------------
  428|   124k|    m_nPrefetchedUsed = 0;
  429|   124k|    if (!m_nPrefetchedAvailable) {
  ------------------
  |  Branch (429:9): [True: 7.72k, False: 116k]
  ------------------
  430|  7.72k|      m_input.setstate(std::ios_base::eofbit);
  431|  7.72k|    }
  432|       |
  433|   124k|    if (0 == m_nPrefetchedAvailable) {
  ------------------
  |  Branch (433:9): [True: 7.72k, False: 116k]
  ------------------
  434|  7.72k|      return 0;
  435|  7.72k|    }
  436|   124k|  }
  437|       |
  438|   226M|  return m_pPrefetched[m_nPrefetchedUsed++];
  439|   226M|}
_ZNK4YAML6Stream13StreamInUtf32Ev:
  441|  2.58M|void Stream::StreamInUtf32() const {
  442|  2.58M|  static int indexes[2][4] = {{3, 2, 1, 0}, {0, 1, 2, 3}};
  443|       |
  444|  2.58M|  unsigned long ch = 0;
  445|  2.58M|  unsigned char bytes[4];
  446|  2.58M|  int* pIndexes = (m_charSet == utf32be) ? indexes[1] : indexes[0];
  ------------------
  |  Branch (446:19): [True: 1.54M, False: 1.03M]
  ------------------
  447|       |
  448|  2.58M|  bytes[0] = GetNextByte();
  449|  2.58M|  bytes[1] = GetNextByte();
  450|  2.58M|  bytes[2] = GetNextByte();
  451|  2.58M|  bytes[3] = GetNextByte();
  452|  2.58M|  if (!m_input.good()) {
  ------------------
  |  Branch (452:7): [True: 129, False: 2.58M]
  ------------------
  453|    129|    return;
  454|    129|  }
  455|       |
  456|  12.9M|  for (int i = 0; i < 4; ++i) {
  ------------------
  |  Branch (456:19): [True: 10.3M, False: 2.58M]
  ------------------
  457|  10.3M|    ch <<= 8;
  458|  10.3M|    ch |= bytes[pIndexes[i]];
  459|  10.3M|  }
  460|       |
  461|  2.58M|  QueueUnicodeCodepoint(m_readahead, ch);
  462|  2.58M|}
_ZN4YAML15IntroCharTypeOfEi:
  125|  14.7k|inline UtfIntroCharType IntroCharTypeOf(std::istream::int_type ch) {
  126|  14.7k|  if (std::istream::traits_type::eof() == ch) {
  ------------------
  |  Branch (126:7): [True: 92, False: 14.6k]
  ------------------
  127|     92|    return uictOther;
  128|     92|  }
  129|       |
  130|  14.6k|  switch (ch) {
  ------------------
  |  Branch (130:11): [True: 2.40k, False: 12.2k]
  ------------------
  131|  1.97k|    case 0:
  ------------------
  |  Branch (131:5): [True: 1.97k, False: 12.6k]
  ------------------
  132|  1.97k|      return uict00;
  133|     16|    case 0xBB:
  ------------------
  |  Branch (133:5): [True: 16, False: 14.6k]
  ------------------
  134|     16|      return uictBB;
  135|     13|    case 0xBF:
  ------------------
  |  Branch (135:5): [True: 13, False: 14.6k]
  ------------------
  136|     13|      return uictBF;
  137|    140|    case 0xEF:
  ------------------
  |  Branch (137:5): [True: 140, False: 14.5k]
  ------------------
  138|    140|      return uictEF;
  139|     49|    case 0xFE:
  ------------------
  |  Branch (139:5): [True: 49, False: 14.6k]
  ------------------
  140|     49|      return uictFE;
  141|    206|    case 0xFF:
  ------------------
  |  Branch (141:5): [True: 206, False: 14.4k]
  ------------------
  142|    206|      return uictFF;
  143|  14.6k|  }
  144|       |
  145|  12.2k|  if ((ch > 0) && (ch < 0xFF)) {
  ------------------
  |  Branch (145:7): [True: 12.2k, False: 0]
  |  Branch (145:19): [True: 12.2k, False: 0]
  ------------------
  146|  12.2k|    return uictAscii;
  147|  12.2k|  }
  148|       |
  149|      0|  return uictOther;
  150|  12.2k|}
_ZN4YAML21QueueUnicodeCodepointERNSt3__15dequeIcNS0_9allocatorIcEEEEm:
  161|  39.8M|inline void QueueUnicodeCodepoint(std::deque<char>& q, unsigned long ch) {
  162|       |  // We are not allowed to queue the Stream::eof() codepoint, so
  163|       |  // replace it with CP_REPLACEMENT_CHARACTER
  164|  39.8M|  if (static_cast<unsigned long>(Stream::eof()) == ch) {
  ------------------
  |  Branch (164:7): [True: 1.03k, False: 39.8M]
  ------------------
  165|  1.03k|    ch = CP_REPLACEMENT_CHARACTER;
  ------------------
  |  |   12|  1.03k|#define CP_REPLACEMENT_CHARACTER (0xFFFD)
  ------------------
  166|  1.03k|  }
  167|       |
  168|  39.8M|  if (ch < 0x80) {
  ------------------
  |  Branch (168:7): [True: 912k, False: 38.8M]
  ------------------
  169|   912k|    q.push_back(Utf8Adjust(ch, 0, 0));
  170|  38.8M|  } else if (ch < 0x800) {
  ------------------
  |  Branch (170:14): [True: 811k, False: 38.0M]
  ------------------
  171|   811k|    q.push_back(Utf8Adjust(ch, 2, 6));
  172|   811k|    q.push_back(Utf8Adjust(ch, 1, 0));
  173|  38.0M|  } else if (ch < 0x10000) {
  ------------------
  |  Branch (173:14): [True: 35.5M, False: 2.58M]
  ------------------
  174|  35.5M|    q.push_back(Utf8Adjust(ch, 3, 12));
  175|  35.5M|    q.push_back(Utf8Adjust(ch, 1, 6));
  176|  35.5M|    q.push_back(Utf8Adjust(ch, 1, 0));
  177|  35.5M|  } else {
  178|  2.58M|    q.push_back(Utf8Adjust(ch, 4, 18));
  179|  2.58M|    q.push_back(Utf8Adjust(ch, 1, 12));
  180|  2.58M|    q.push_back(Utf8Adjust(ch, 1, 6));
  181|  2.58M|    q.push_back(Utf8Adjust(ch, 1, 0));
  182|  2.58M|  }
  183|  39.8M|}
_ZN4YAML10Utf8AdjustEmhh:
  153|   119M|                       unsigned char rshift) {
  154|   119M|  const unsigned char header =
  155|   119M|      static_cast<unsigned char>(((1 << lead_bits) - 1) << (8 - lead_bits));
  156|   119M|  const unsigned char mask = (0xFF >> (lead_bits + 1));
  157|   119M|  return static_cast<char>(
  158|   119M|      static_cast<unsigned char>(header | ((ch >> rshift) & mask)));
  159|   119M|}
_ZN4YAML10ReadBufferEPh:
  419|   124k|inline char* ReadBuffer(unsigned char* pBuffer) {
  420|   124k|  return reinterpret_cast<char*>(pBuffer);
  421|   124k|}

_ZNK4YAML6StreamntEv:
   34|   162M|  bool operator!() const { return !static_cast<bool>(*this); }
_ZN4YAML6Stream3eofEv:
   41|  80.0M|  static char eof() { return 0x04; }
_ZNK4YAML6Stream4markEv:
   43|   187M|  const Mark mark() const { return m_mark; }
_ZNK4YAML6Stream3posEv:
   44|  2.43M|  int pos() const { return m_mark.pos; }
_ZNK4YAML6Stream4lineEv:
   45|  2.50M|  int line() const { return m_mark.line; }
_ZNK4YAML6Stream6columnEv:
   46|   323M|  int column() const { return m_mark.column; }
_ZN4YAML6Stream11ResetColumnEv:
   47|  5.29k|  void ResetColumn() { m_mark.column = 0; }
_ZNK4YAML6Stream6CharAtEm:
   74|  2.09G|inline char Stream::CharAt(size_t i) const { return m_readahead[i]; }
_ZNK4YAML6Stream11ReadAheadToEm:
   76|  1.49G|inline bool Stream::ReadAheadTo(size_t i) const {
   77|  1.49G|  if (m_readahead.size() > i)
  ------------------
  |  Branch (77:7): [True: 1.32G, False: 161M]
  ------------------
   78|  1.32G|    return true;
   79|   161M|  return _ReadAheadTo(i);
   80|  1.49G|}

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

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

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

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

