_ZN8FuzzDataC2EPKhm:
   50|  11.0k|           size_t size) : Data(data),Size(size){}
_ZN8FuzzData16splitIntoStringsEv:
  117|  11.0k|  std::vector<std::string_view> splitIntoStrings() {
  118|  11.0k|    std::vector<std::string_view> ret;
  119|  11.0k|    if(Size>0) {
  ------------------
  |  Branch (119:8): [True: 11.0k, False: 10]
  ------------------
  120|  11.0k|      ret=split(chardata(),Size);
  121|       |      // all data consumed.
  122|  11.0k|      Data+=Size;
  123|  11.0k|      Size=0;
  124|  11.0k|    }
  125|  11.0k|    return ret;
  126|  11.0k|  }
_Z5splitPKcm:
   26|  11.0k|inline std::vector<std::string_view> split(const char* Data, size_t Size) {
   27|       |
   28|  11.0k|  std::vector<std::string_view> ret;
   29|       |
   30|  11.0k|    using namespace std::literals;
   31|  11.0k|    constexpr auto sep="\n~~\n"sv;
   32|       |
   33|  11.0k|    std::string_view all(Data,Size);
   34|  11.0k|    auto pos=all.find(sep);
   35|   546k|    while(pos!=std::string_view::npos) {
  ------------------
  |  Branch (35:11): [True: 535k, False: 11.0k]
  ------------------
   36|   535k|      ret.push_back(all.substr(0,pos));
   37|   535k|      all=all.substr(pos+sep.size());
   38|   535k|      pos=all.find(sep);
   39|   535k|    }
   40|  11.0k|    ret.push_back(all);
   41|  11.0k|    return ret;
   42|  11.0k|}
_ZNK8FuzzData8chardataEv:
  158|  11.0k|  const char* chardata() const {return static_cast<const char*>(static_cast<const void*>(Data));}
_ZNK8FuzzDatacvbEv:
  129|  11.0k|  explicit operator bool() const { return Data!=nullptr;}
_ZN8FuzzData6getIntILi0ELi31EEEiv:
   54|  11.0k|  int getInt() {
   55|  11.0k|    static_assert (Min<Max,"min must be <max");
   56|       |
   57|       |    // make this constexpr, can't overflow because that is UB and is forbidden
   58|       |    // in constexpr evaluation
   59|  11.0k|    constexpr int range=(Max-Min)+1;
   60|  11.0k|    constexpr unsigned int urange=range;
   61|       |
   62|       |    // don't use std::uniform_int_distribution, we don't want to pay for
   63|       |    // over consumption of random data. Accept the slightly non-uniform distribution.
   64|  11.0k|    if(range<256)
  ------------------
  |  Branch (64:8): [Folded - Ignored]
  ------------------
   65|  11.0k|      return Min+static_cast<int>(get<uint8_t>()%urange);
   66|      0|    if(range<65536)
  ------------------
  |  Branch (66:8): [Folded - Ignored]
  ------------------
   67|      0|      return Min+static_cast<int>(get<uint16_t>()%urange);
   68|       |
   69|      0|    return Min+static_cast<int>(get<uint32_t>()%urange);
   70|      0|  }
_ZN8FuzzData3getIhEET_v:
   73|  22.1k|  T get() {
   74|  22.1k|    const auto Nbytes=sizeof(T);
   75|  22.1k|    T ret{};
   76|  22.1k|    if(Size<Nbytes) {
  ------------------
  |  Branch (76:8): [True: 1, False: 22.1k]
  ------------------
   77|       |      //don't throw, signal with null instead.
   78|      1|      Data=nullptr;
   79|      1|      Size=0;
   80|      1|      return ret;
   81|      1|    }
   82|  22.1k|    std::memcpy(&ret,Data,Nbytes);
   83|  22.1k|    Data+=Nbytes;
   84|  22.1k|    Size-=Nbytes;
   85|  22.1k|    return ret;
   86|  22.1k|  }
_ZN8FuzzData6getIntILi0ELi7EEEiv:
   54|  11.0k|  int getInt() {
   55|  11.0k|    static_assert (Min<Max,"min must be <max");
   56|       |
   57|       |    // make this constexpr, can't overflow because that is UB and is forbidden
   58|       |    // in constexpr evaluation
   59|  11.0k|    constexpr int range=(Max-Min)+1;
   60|  11.0k|    constexpr unsigned int urange=range;
   61|       |
   62|       |    // don't use std::uniform_int_distribution, we don't want to pay for
   63|       |    // over consumption of random data. Accept the slightly non-uniform distribution.
   64|  11.0k|    if(range<256)
  ------------------
  |  Branch (64:8): [Folded - Ignored]
  ------------------
   65|  11.0k|      return Min+static_cast<int>(get<uint8_t>()%urange);
   66|      0|    if(range<65536)
  ------------------
  |  Branch (66:8): [Folded - Ignored]
  ------------------
   67|      0|      return Min+static_cast<int>(get<uint16_t>()%urange);
   68|       |
   69|      0|    return Min+static_cast<int>(get<uint32_t>()%urange);
   70|      0|  }
_ZN8FuzzData3getImEET_v:
   73|  11.0k|  T get() {
   74|  11.0k|    const auto Nbytes=sizeof(T);
   75|  11.0k|    T ret{};
   76|  11.0k|    if(Size<Nbytes) {
  ------------------
  |  Branch (76:8): [True: 8, False: 11.0k]
  ------------------
   77|       |      //don't throw, signal with null instead.
   78|      8|      Data=nullptr;
   79|      8|      Size=0;
   80|      8|      return ret;
   81|      8|    }
   82|  11.0k|    std::memcpy(&ret,Data,Nbytes);
   83|  11.0k|    Data+=Nbytes;
   84|  11.0k|    Size-=Nbytes;
   85|  11.0k|    return ret;
   86|  11.0k|  }

_ZN10NulOStreamC1Ev:
   19|  1.03k|  NulOStream() : std::ostream(this) {}
_ZN12NulStreambuf8overflowEi:
   11|   312k|  virtual int overflow(int c) override final{
   12|   312k|    setp(dummyBuffer, dummyBuffer + sizeof(dummyBuffer));
   13|   312k|    return (c == traits_type::eof()) ? '\0' : c;
  ------------------
  |  Branch (13:12): [True: 0, False: 312k]
  ------------------
   14|   312k|  }

LLVMFuzzerTestOneInput:
    9|  11.0k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   10|  11.0k|  FuzzData fd(Data, Size);
   11|  11.0k|  const int action = fd.getInt<0, 31>();
   12|       |
   13|       |  // there will be some templatized functions like is() which need to be tested
   14|       |  // on a type. select one dynamically and create a function that will invoke
   15|       |  // with that type
   16|  11.0k|  const int selecttype=fd.getInt<0,7>();
   17|  11.0k|  auto invoke_with_type=[selecttype](auto cb) {
   18|  11.0k|    using constcharstar=const char*;
   19|  11.0k|    switch(selecttype) {
   20|  11.0k|    case 0: cb(bool{});break;
   21|  11.0k|    case 1: cb(double{});break;
   22|  11.0k|    case 2: cb(uint64_t{});break;
   23|  11.0k|    case 3: cb(int64_t{});break;
   24|  11.0k|    case 4: cb(std::string_view{});break;
   25|  11.0k|    case 5: cb(constcharstar{});break;
   26|  11.0k|    case 6: cb(simdjson::dom::array{});break;
   27|  11.0k|    case 7: cb(simdjson::dom::object{});break;
   28|  11.0k|    }
   29|  11.0k|  };
   30|       |
   31|  11.0k|  const auto index = fd.get<size_t>();
   32|       |
   33|       |  // split the remainder of the document into strings
   34|  11.0k|  auto strings = fd.splitIntoStrings();
   35|  11.1k|  while (strings.size() < 2) {
  ------------------
  |  Branch (35:10): [True: 66, False: 11.0k]
  ------------------
   36|     66|    strings.emplace_back();
   37|     66|  }
   38|  11.0k|  const auto str = strings[0];
   39|       |
   40|       |  // exit if there was too little data
   41|  11.0k|  if (!fd)
  ------------------
  |  Branch (41:7): [True: 8, False: 11.0k]
  ------------------
   42|      8|    return 0;
   43|       |
   44|  11.0k|  simdjson::dom::parser parser;
   45|  11.0k|  simdjson_unused simdjson::dom::element elem;
  ------------------
  |  |  113|  11.0k|  #define simdjson_unused __attribute__((unused))
  ------------------
   46|  11.0k|  simdjson_unused auto error = parser.parse(strings[1]).get(elem);
  ------------------
  |  |  113|  11.0k|  #define simdjson_unused __attribute__((unused))
  ------------------
   47|       |
   48|  11.0k|  if (error)
  ------------------
  |  Branch (48:7): [True: 4.31k, False: 6.75k]
  ------------------
   49|  4.31k|    return 0;
   50|       |
   51|  6.75k|#define CASE(num, fun)                                                         \
   52|  6.75k|  case num: {                                                                  \
   53|  6.75k|    simdjson_unused auto v = elem.fun();                                                       \
   54|  6.75k|    break;                                                                     \
   55|  6.75k|  }
   56|  6.75k|#define CASE2(num, fun)                                                        \
   57|  6.75k|  case num: {                                                                  \
   58|  6.75k|    simdjson_unused auto v = elem fun;                                                         \
   59|  6.75k|    break;                                                                     \
   60|  6.75k|  }
   61|  6.75k|#if SIMDJSON_EXCEPTIONS
   62|  6.75k|  try {
   63|  6.75k|#endif
   64|       |
   65|  6.75k|    switch (action) {
   66|    427|      CASE(0, type);
  ------------------
  |  |   52|    427|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 427, False: 6.32k]
  |  |  ------------------
  |  |   53|    427|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|    427|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|    427|    break;                                                                     \
  |  |   55|    427|  }
  ------------------
   67|    158|      CASE(1, get_array);
  ------------------
  |  |   52|    158|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 158, False: 6.59k]
  |  |  ------------------
  |  |   53|    158|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|    158|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|    158|    break;                                                                     \
  |  |   55|    158|  }
  ------------------
   68|     81|      CASE(2, get_object);
  ------------------
  |  |   52|     81|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 81, False: 6.67k]
  |  |  ------------------
  |  |   53|     81|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|     81|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     81|    break;                                                                     \
  |  |   55|     81|  }
  ------------------
   69|     52|      CASE(3, get_c_str);
  ------------------
  |  |   52|     52|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 52, False: 6.70k]
  |  |  ------------------
  |  |   53|     52|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|     52|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     52|    break;                                                                     \
  |  |   55|     52|  }
  ------------------
   70|     66|      CASE(4, get_string_length);
  ------------------
  |  |   52|     66|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 66, False: 6.68k]
  |  |  ------------------
  |  |   53|     66|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|     66|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     66|    break;                                                                     \
  |  |   55|     66|  }
  ------------------
   71|     38|      CASE(5, get_string);
  ------------------
  |  |   52|     38|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 38, False: 6.71k]
  |  |  ------------------
  |  |   53|     38|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|     38|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     38|    break;                                                                     \
  |  |   55|     38|  }
  ------------------
   72|     50|      CASE(6, get_int64);
  ------------------
  |  |   52|     50|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 50, False: 6.70k]
  |  |  ------------------
  |  |   53|     50|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|     50|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     50|    break;                                                                     \
  |  |   55|     50|  }
  ------------------
   73|     39|      CASE(7, get_uint64);
  ------------------
  |  |   52|     39|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 39, False: 6.71k]
  |  |  ------------------
  |  |   53|     39|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|     39|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     39|    break;                                                                     \
  |  |   55|     39|  }
  ------------------
   74|    125|      CASE(8, get_double);
  ------------------
  |  |   52|    125|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 125, False: 6.62k]
  |  |  ------------------
  |  |   53|    125|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|    125|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|    125|    break;                                                                     \
  |  |   55|    125|  }
  ------------------
   75|     36|      CASE(9, get_bool);
  ------------------
  |  |   52|     36|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 36, False: 6.71k]
  |  |  ------------------
  |  |   53|     36|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|     36|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     36|    break;                                                                     \
  |  |   55|     36|  }
  ------------------
   76|    106|      CASE(10, is_array);
  ------------------
  |  |   52|    106|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 106, False: 6.64k]
  |  |  ------------------
  |  |   53|    106|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|    106|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|    106|    break;                                                                     \
  |  |   55|    106|  }
  ------------------
   77|     50|      CASE(11, is_object);
  ------------------
  |  |   52|     50|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 50, False: 6.70k]
  |  |  ------------------
  |  |   53|     50|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|     50|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     50|    break;                                                                     \
  |  |   55|     50|  }
  ------------------
   78|     78|      CASE(12, is_string);
  ------------------
  |  |   52|     78|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 78, False: 6.67k]
  |  |  ------------------
  |  |   53|     78|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|     78|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     78|    break;                                                                     \
  |  |   55|     78|  }
  ------------------
   79|     66|      CASE(13, is_int64);
  ------------------
  |  |   52|     66|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 66, False: 6.68k]
  |  |  ------------------
  |  |   53|     66|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|     66|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     66|    break;                                                                     \
  |  |   55|     66|  }
  ------------------
   80|     49|      CASE(14, is_uint64);
  ------------------
  |  |   52|     49|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 49, False: 6.70k]
  |  |  ------------------
  |  |   53|     49|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|     49|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     49|    break;                                                                     \
  |  |   55|     49|  }
  ------------------
   81|     71|      CASE(15, is_double);
  ------------------
  |  |   52|     71|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 71, False: 6.68k]
  |  |  ------------------
  |  |   53|     71|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|     71|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     71|    break;                                                                     \
  |  |   55|     71|  }
  ------------------
   82|    281|      CASE(16, is_number);
  ------------------
  |  |   52|    281|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 281, False: 6.47k]
  |  |  ------------------
  |  |   53|    281|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|    281|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|    281|    break;                                                                     \
  |  |   55|    281|  }
  ------------------
   83|    117|      CASE(17, is_bool);
  ------------------
  |  |   52|    117|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 117, False: 6.63k]
  |  |  ------------------
  |  |   53|    117|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|    117|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|    117|    break;                                                                     \
  |  |   55|    117|  }
  ------------------
   84|     59|      CASE(18, is_null);
  ------------------
  |  |   52|     59|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 59, False: 6.69k]
  |  |  ------------------
  |  |   53|     59|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|     59|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     59|    break;                                                                     \
  |  |   55|     59|  }
  ------------------
   85|       |      // element.is<>() :
   86|    104|    case 19: {
  ------------------
  |  Branch (86:5): [True: 104, False: 6.65k]
  ------------------
   87|    104|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
   88|    104|      } break;
   89|       |
   90|       |      // CASE(xx,get);
   91|     84|      case 20: {
  ------------------
  |  Branch (91:7): [True: 84, False: 6.67k]
  ------------------
   92|     84|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
   93|     84|        } break;
   94|       |
   95|       |      // CASE(xx,tie);
   96|     69|      case 21: {
  ------------------
  |  Branch (96:7): [True: 69, False: 6.68k]
  ------------------
   97|     69|          invoke_with_type([&elem](auto t){
   98|     69|            simdjson::error_code ec;
   99|     69|            simdjson::dom::element{elem}.tie(t,ec);  });
  100|     69|        } break;
  101|       |
  102|      0|#if SIMDJSON_EXCEPTIONS
  103|       |      // cast to type
  104|    638|      case 22: {
  ------------------
  |  Branch (104:7): [True: 638, False: 6.11k]
  ------------------
  105|    638|          invoke_with_type([&elem](auto t){
  106|    638|            using T=decltype(t);
  107|    638|            simdjson_unused auto v = static_cast<T>(elem);  });
  108|    638|        } break;
  109|       |
  110|     76|      CASE(23, begin);
  ------------------
  |  |   52|     76|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 76, False: 6.67k]
  |  |  ------------------
  |  |   53|     76|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|     76|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     76|    break;                                                                     \
  |  |   55|     76|  }
  ------------------
  111|     75|      CASE(24, end);
  ------------------
  |  |   52|     75|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 75, False: 6.67k]
  |  |  ------------------
  |  |   53|     75|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |  113|     75|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     75|    break;                                                                     \
  |  |   55|     75|  }
  ------------------
  112|      0|#endif
  113|    354|      CASE2(25, [str]);
  ------------------
  |  |   57|    354|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (57:3): [True: 354, False: 6.40k]
  |  |  ------------------
  |  |   58|    354|    simdjson_unused auto v = elem fun;                                                         \
  |  |  ------------------
  |  |  |  |  113|    354|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   59|    354|    break;                                                                     \
  |  |   60|    354|  }
  ------------------
  114|  1.03k|      CASE2(26, .at_pointer(str));
  ------------------
  |  |   57|  1.03k|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (57:3): [True: 1.03k, False: 5.72k]
  |  |  ------------------
  |  |   58|  1.03k|    simdjson_unused auto v = elem fun;                                                         \
  |  |  ------------------
  |  |  |  |  113|  1.03k|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   59|  1.03k|    break;                                                                     \
  |  |   60|  1.03k|  }
  ------------------
  115|       |      // CASE2(xx,at(str)); deprecated
  116|    429|      CASE2(28, .at(index));
  ------------------
  |  |   57|    429|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (57:3): [True: 429, False: 6.32k]
  |  |  ------------------
  |  |   58|    429|    simdjson_unused auto v = elem fun;                                                         \
  |  |  ------------------
  |  |  |  |  113|    429|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   59|    429|    break;                                                                     \
  |  |   60|    429|  }
  ------------------
  117|    328|      CASE2(29, .at_key(str));
  ------------------
  |  |   57|    328|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (57:3): [True: 328, False: 6.42k]
  |  |  ------------------
  |  |   58|    328|    simdjson_unused auto v = elem fun;                                                         \
  |  |  ------------------
  |  |  |  |  113|    328|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   59|    328|    break;                                                                     \
  |  |   60|    328|  }
  ------------------
  118|    440|      CASE2(30, .at_key_case_insensitive(str));
  ------------------
  |  |   57|    440|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (57:3): [True: 440, False: 6.31k]
  |  |  ------------------
  |  |   58|    440|    simdjson_unused auto v = elem fun;                                                         \
  |  |  ------------------
  |  |  |  |  113|    440|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   59|    440|    break;                                                                     \
  |  |   60|    440|  }
  ------------------
  119|  1.03k|      case 31: { NulOStream os;
  ------------------
  |  Branch (119:7): [True: 1.03k, False: 5.71k]
  ------------------
  120|  1.03k|        simdjson_unused auto dumpstatus = elem.dump_raw_tape(os);} ;break;
  ------------------
  |  |  113|  1.03k|  #define simdjson_unused __attribute__((unused))
  ------------------
  121|    142|    default:
  ------------------
  |  Branch (121:5): [True: 142, False: 6.61k]
  ------------------
  122|    142|      return 0;
  123|  6.75k|    }
  124|  6.75k|#undef CASE
  125|  6.75k|#undef CASE2
  126|       |
  127|  6.75k|#if SIMDJSON_EXCEPTIONS
  128|  6.75k|  } catch (std::exception &) {
  129|       |    // do nothing
  130|    682|  }
  131|      0|#endif
  132|       |
  133|  6.61k|  return 0;
  134|  6.75k|}
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_1clIZ22LLVMFuzzerTestOneInputE3$_0EEDaT_:
   17|    104|  auto invoke_with_type=[selecttype](auto cb) {
   18|    104|    using constcharstar=const char*;
   19|    104|    switch(selecttype) {
  ------------------
  |  Branch (19:12): [True: 0, False: 104]
  ------------------
   20|     52|    case 0: cb(bool{});break;
  ------------------
  |  Branch (20:5): [True: 52, False: 52]
  ------------------
   21|      3|    case 1: cb(double{});break;
  ------------------
  |  Branch (21:5): [True: 3, False: 101]
  ------------------
   22|     13|    case 2: cb(uint64_t{});break;
  ------------------
  |  Branch (22:5): [True: 13, False: 91]
  ------------------
   23|      6|    case 3: cb(int64_t{});break;
  ------------------
  |  Branch (23:5): [True: 6, False: 98]
  ------------------
   24|      6|    case 4: cb(std::string_view{});break;
  ------------------
  |  Branch (24:5): [True: 6, False: 98]
  ------------------
   25|      5|    case 5: cb(constcharstar{});break;
  ------------------
  |  Branch (25:5): [True: 5, False: 99]
  ------------------
   26|      9|    case 6: cb(simdjson::dom::array{});break;
  ------------------
  |  Branch (26:5): [True: 9, False: 95]
  ------------------
   27|     10|    case 7: cb(simdjson::dom::object{});break;
  ------------------
  |  Branch (27:5): [True: 10, False: 94]
  ------------------
   28|    104|    }
   29|    104|  };
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clIbEEDaT_:
   87|     52|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
  ------------------
  |  |  113|     52|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clIdEEDaT_:
   87|      3|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
  ------------------
  |  |  113|      3|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clImEEDaT_:
   87|     13|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
  ------------------
  |  |  113|     13|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clIlEEDaT_:
   87|      6|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
  ------------------
  |  |  113|      6|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEDaT_:
   87|      6|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
  ------------------
  |  |  113|      6|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clIPKcEEDaT_:
   87|      5|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
  ------------------
  |  |  113|      5|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clIN8simdjson3dom5arrayEEEDaT_:
   87|      9|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
  ------------------
  |  |  113|      9|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clIN8simdjson3dom6objectEEEDaT_:
   87|     10|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
  ------------------
  |  |  113|     10|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_1clIZ22LLVMFuzzerTestOneInputE3$_2EEDaT_:
   17|     84|  auto invoke_with_type=[selecttype](auto cb) {
   18|     84|    using constcharstar=const char*;
   19|     84|    switch(selecttype) {
  ------------------
  |  Branch (19:12): [True: 0, False: 84]
  ------------------
   20|     14|    case 0: cb(bool{});break;
  ------------------
  |  Branch (20:5): [True: 14, False: 70]
  ------------------
   21|      9|    case 1: cb(double{});break;
  ------------------
  |  Branch (21:5): [True: 9, False: 75]
  ------------------
   22|      8|    case 2: cb(uint64_t{});break;
  ------------------
  |  Branch (22:5): [True: 8, False: 76]
  ------------------
   23|      9|    case 3: cb(int64_t{});break;
  ------------------
  |  Branch (23:5): [True: 9, False: 75]
  ------------------
   24|     15|    case 4: cb(std::string_view{});break;
  ------------------
  |  Branch (24:5): [True: 15, False: 69]
  ------------------
   25|     14|    case 5: cb(constcharstar{});break;
  ------------------
  |  Branch (25:5): [True: 14, False: 70]
  ------------------
   26|      5|    case 6: cb(simdjson::dom::array{});break;
  ------------------
  |  Branch (26:5): [True: 5, False: 79]
  ------------------
   27|     10|    case 7: cb(simdjson::dom::object{});break;
  ------------------
  |  Branch (27:5): [True: 10, False: 74]
  ------------------
   28|     84|    }
   29|     84|  };
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_2clIbEEDaT_:
   92|     14|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
  ------------------
  |  |  113|     14|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_2clIdEEDaT_:
   92|      9|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
  ------------------
  |  |  113|      9|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_2clImEEDaT_:
   92|      8|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
  ------------------
  |  |  113|      8|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_2clIlEEDaT_:
   92|      9|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
  ------------------
  |  |  113|      9|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_2clINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEDaT_:
   92|     15|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
  ------------------
  |  |  113|     15|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_2clIPKcEEDaT_:
   92|     14|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
  ------------------
  |  |  113|     14|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_2clIN8simdjson3dom5arrayEEEDaT_:
   92|      5|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
  ------------------
  |  |  113|      5|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_2clIN8simdjson3dom6objectEEEDaT_:
   92|     10|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
  ------------------
  |  |  113|     10|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_1clIZ22LLVMFuzzerTestOneInputE3$_3EEDaT_:
   17|     69|  auto invoke_with_type=[selecttype](auto cb) {
   18|     69|    using constcharstar=const char*;
   19|     69|    switch(selecttype) {
  ------------------
  |  Branch (19:12): [True: 0, False: 69]
  ------------------
   20|     21|    case 0: cb(bool{});break;
  ------------------
  |  Branch (20:5): [True: 21, False: 48]
  ------------------
   21|      4|    case 1: cb(double{});break;
  ------------------
  |  Branch (21:5): [True: 4, False: 65]
  ------------------
   22|      8|    case 2: cb(uint64_t{});break;
  ------------------
  |  Branch (22:5): [True: 8, False: 61]
  ------------------
   23|      5|    case 3: cb(int64_t{});break;
  ------------------
  |  Branch (23:5): [True: 5, False: 64]
  ------------------
   24|     11|    case 4: cb(std::string_view{});break;
  ------------------
  |  Branch (24:5): [True: 11, False: 58]
  ------------------
   25|     13|    case 5: cb(constcharstar{});break;
  ------------------
  |  Branch (25:5): [True: 13, False: 56]
  ------------------
   26|      3|    case 6: cb(simdjson::dom::array{});break;
  ------------------
  |  Branch (26:5): [True: 3, False: 66]
  ------------------
   27|      4|    case 7: cb(simdjson::dom::object{});break;
  ------------------
  |  Branch (27:5): [True: 4, False: 65]
  ------------------
   28|     69|    }
   29|     69|  };
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_3clIbEEDaT_:
   97|     21|          invoke_with_type([&elem](auto t){
   98|     21|            simdjson::error_code ec;
   99|     21|            simdjson::dom::element{elem}.tie(t,ec);  });
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_3clIdEEDaT_:
   97|      4|          invoke_with_type([&elem](auto t){
   98|      4|            simdjson::error_code ec;
   99|      4|            simdjson::dom::element{elem}.tie(t,ec);  });
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_3clImEEDaT_:
   97|      8|          invoke_with_type([&elem](auto t){
   98|      8|            simdjson::error_code ec;
   99|      8|            simdjson::dom::element{elem}.tie(t,ec);  });
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_3clIlEEDaT_:
   97|      5|          invoke_with_type([&elem](auto t){
   98|      5|            simdjson::error_code ec;
   99|      5|            simdjson::dom::element{elem}.tie(t,ec);  });
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_3clINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEDaT_:
   97|     11|          invoke_with_type([&elem](auto t){
   98|     11|            simdjson::error_code ec;
   99|     11|            simdjson::dom::element{elem}.tie(t,ec);  });
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_3clIPKcEEDaT_:
   97|     13|          invoke_with_type([&elem](auto t){
   98|     13|            simdjson::error_code ec;
   99|     13|            simdjson::dom::element{elem}.tie(t,ec);  });
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_3clIN8simdjson3dom5arrayEEEDaT_:
   97|      3|          invoke_with_type([&elem](auto t){
   98|      3|            simdjson::error_code ec;
   99|      3|            simdjson::dom::element{elem}.tie(t,ec);  });
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_3clIN8simdjson3dom6objectEEEDaT_:
   97|      4|          invoke_with_type([&elem](auto t){
   98|      4|            simdjson::error_code ec;
   99|      4|            simdjson::dom::element{elem}.tie(t,ec);  });
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_1clIZ22LLVMFuzzerTestOneInputE3$_4EEDaT_:
   17|    638|  auto invoke_with_type=[selecttype](auto cb) {
   18|    638|    using constcharstar=const char*;
   19|    638|    switch(selecttype) {
  ------------------
  |  Branch (19:12): [True: 0, False: 638]
  ------------------
   20|     73|    case 0: cb(bool{});break;
  ------------------
  |  Branch (20:5): [True: 73, False: 565]
  ------------------
   21|     81|    case 1: cb(double{});break;
  ------------------
  |  Branch (21:5): [True: 81, False: 557]
  ------------------
   22|    201|    case 2: cb(uint64_t{});break;
  ------------------
  |  Branch (22:5): [True: 201, False: 437]
  ------------------
   23|    185|    case 3: cb(int64_t{});break;
  ------------------
  |  Branch (23:5): [True: 185, False: 453]
  ------------------
   24|     23|    case 4: cb(std::string_view{});break;
  ------------------
  |  Branch (24:5): [True: 23, False: 615]
  ------------------
   25|     20|    case 5: cb(constcharstar{});break;
  ------------------
  |  Branch (25:5): [True: 20, False: 618]
  ------------------
   26|     24|    case 6: cb(simdjson::dom::array{});break;
  ------------------
  |  Branch (26:5): [True: 24, False: 614]
  ------------------
   27|     31|    case 7: cb(simdjson::dom::object{});break;
  ------------------
  |  Branch (27:5): [True: 31, False: 607]
  ------------------
   28|    638|    }
   29|    638|  };
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_4clIbEEDaT_:
  105|     73|          invoke_with_type([&elem](auto t){
  106|     73|            using T=decltype(t);
  107|     73|            simdjson_unused auto v = static_cast<T>(elem);  });
  ------------------
  |  |  113|     73|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_4clIdEEDaT_:
  105|     81|          invoke_with_type([&elem](auto t){
  106|     81|            using T=decltype(t);
  107|     81|            simdjson_unused auto v = static_cast<T>(elem);  });
  ------------------
  |  |  113|     81|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_4clImEEDaT_:
  105|    201|          invoke_with_type([&elem](auto t){
  106|    201|            using T=decltype(t);
  107|    201|            simdjson_unused auto v = static_cast<T>(elem);  });
  ------------------
  |  |  113|    201|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_4clIlEEDaT_:
  105|    185|          invoke_with_type([&elem](auto t){
  106|    185|            using T=decltype(t);
  107|    185|            simdjson_unused auto v = static_cast<T>(elem);  });
  ------------------
  |  |  113|    185|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_4clINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEDaT_:
  105|     23|          invoke_with_type([&elem](auto t){
  106|     23|            using T=decltype(t);
  107|     23|            simdjson_unused auto v = static_cast<T>(elem);  });
  ------------------
  |  |  113|     23|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_4clIPKcEEDaT_:
  105|     20|          invoke_with_type([&elem](auto t){
  106|     20|            using T=decltype(t);
  107|     20|            simdjson_unused auto v = static_cast<T>(elem);  });
  ------------------
  |  |  113|     20|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_4clIN8simdjson3dom5arrayEEEDaT_:
  105|     24|          invoke_with_type([&elem](auto t){
  106|     24|            using T=decltype(t);
  107|     24|            simdjson_unused auto v = static_cast<T>(elem);  });
  ------------------
  |  |  113|     24|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_4clIN8simdjson3dom6objectEEEDaT_:
  105|     31|          invoke_with_type([&elem](auto t){
  106|     31|            using T=decltype(t);
  107|     31|            simdjson_unused auto v = static_cast<T>(elem);  });
  ------------------
  |  |  113|     31|  #define simdjson_unused __attribute__((unused))
  ------------------

_ZN8simdjson3dom5arrayC2ERKNS_8internal8tape_refE:
   54|  29.5k|simdjson_inline array::array(const internal::tape_ref &_tape) noexcept : tape{_tape} {}
_ZN8simdjson15simdjson_resultINS_3dom5arrayEEC2ES2_:
   18|    492|    : internal::simdjson_result_base<dom::array>(std::forward<dom::array>(value)) {}
_ZN8simdjson15simdjson_resultINS_3dom5arrayEEC2ENS_10error_codeE:
   20|    393|    : internal::simdjson_result_base<dom::array>(error) {}
_ZN8simdjson3dom5arrayC2Ev:
   53|    434|simdjson_inline array::array() noexcept : tape{} {}
_ZNK8simdjson15simdjson_resultINS_3dom5arrayEE5beginEv:
   24|     76|inline dom::array::iterator simdjson_result<dom::array>::begin() const noexcept(false) {
   25|     76|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (25:7): [True: 60, False: 16]
  ------------------
   26|     16|  return first.begin();
   27|     76|}
_ZNK8simdjson3dom5array5beginEv:
   55|  14.8k|inline array::iterator array::begin() const noexcept {
   56|  14.8k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|  14.8k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
   57|  14.8k|  return internal::tape_ref(tape.doc, tape.json_index + 1);
   58|  14.8k|}
_ZN8simdjson3dom5array8iteratorC2ERKNS_8internal8tape_refE:
  125|  29.6k|simdjson_inline array::iterator::iterator(const internal::tape_ref &_tape) noexcept : tape{_tape} { }
_ZNK8simdjson15simdjson_resultINS_3dom5arrayEE3endEv:
   28|     75|inline dom::array::iterator simdjson_result<dom::array>::end() const noexcept(false) {
   29|     75|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (29:7): [True: 62, False: 13]
  ------------------
   30|     13|  return first.end();
   31|     75|}
_ZNK8simdjson3dom5array3endEv:
   59|  14.8k|inline array::iterator array::end() const noexcept {
   60|  14.8k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|  14.8k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
   61|  14.8k|  return internal::tape_ref(tape.doc, tape.after_element() - 1);
   62|  14.8k|}
_ZNK8simdjson3dom5array10at_pointerENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   71|  14.6k|inline simdjson_result<element> array::at_pointer(std::string_view json_pointer) const noexcept {
   72|  14.6k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|  14.6k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
   73|  14.6k|  if(json_pointer.empty()) { // an empty string means that we return the current node
  ------------------
  |  Branch (73:6): [True: 69, False: 14.5k]
  ------------------
   74|     69|      return element(this->tape); // copy the current node
   75|  14.5k|  } else if(json_pointer[0] != '/') { // otherwise there is an error
  ------------------
  |  Branch (75:13): [True: 12, False: 14.5k]
  ------------------
   76|     12|      return INVALID_JSON_POINTER;
   77|     12|  }
   78|  14.5k|  json_pointer = json_pointer.substr(1);
   79|       |  // - means "the append position" or "the element after the end of the array"
   80|       |  // We don't support this, because we're returning a real element, not a position.
   81|  14.5k|  if (json_pointer == "-") { return INDEX_OUT_OF_BOUNDS; }
  ------------------
  |  Branch (81:7): [True: 1, False: 14.5k]
  ------------------
   82|       |
   83|       |  // Read the array index
   84|  14.5k|  size_t array_index = 0;
   85|  14.5k|  size_t i;
   86|  1.40M|  for (i = 0; i < json_pointer.length() && json_pointer[i] != '/'; i++) {
  ------------------
  |  Branch (86:15): [True: 1.40M, False: 240]
  |  Branch (86:44): [True: 1.39M, False: 14.2k]
  ------------------
   87|  1.39M|    uint8_t digit = uint8_t(json_pointer[i] - '0');
   88|       |    // Check for non-digit in array index. If it's there, we're trying to get a field in an object
   89|  1.39M|    if (digit > 9) { return INCORRECT_TYPE; }
  ------------------
  |  Branch (89:9): [True: 30, False: 1.39M]
  ------------------
   90|  1.39M|    array_index = array_index*10 + digit;
   91|  1.39M|  }
   92|       |
   93|       |  // 0 followed by other digits is invalid
   94|  14.5k|  if (i > 1 && json_pointer[0] == '0') { return INVALID_JSON_POINTER; } // "JSON pointer array index has other characters after 0"
  ------------------
  |  Branch (94:7): [True: 316, False: 14.1k]
  |  Branch (94:16): [True: 2, False: 314]
  ------------------
   95|       |
   96|       |  // Empty string is invalid; so is a "/" with no digits before it
   97|  14.5k|  if (i == 0) { return INVALID_JSON_POINTER; } // "Empty string in JSON pointer array index"
  ------------------
  |  Branch (97:7): [True: 59, False: 14.4k]
  ------------------
   98|       |
   99|       |  // Get the child
  100|  14.4k|  auto child = array(tape).at(array_index);
  101|       |  // If there is an error, it ends here
  102|  14.4k|  if(child.error()) {
  ------------------
  |  Branch (102:6): [True: 172, False: 14.2k]
  ------------------
  103|    172|    return child;
  104|    172|  }
  105|       |  // If there is a /, we're not done yet, call recursively.
  106|  14.2k|  if (i < json_pointer.length()) {
  ------------------
  |  Branch (106:7): [True: 14.2k, False: 9]
  ------------------
  107|  14.2k|    child = child.at_pointer(json_pointer.substr(i));
  108|  14.2k|  }
  109|  14.2k|  return child;
  110|  14.4k|}
_ZNK8simdjson3dom5array2atEm:
  112|  14.7k|inline simdjson_result<element> array::at(size_t index) const noexcept {
  113|  14.7k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|  14.7k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  114|  14.7k|  size_t i=0;
  115|  1.04M|  for (auto element : *this) {
  ------------------
  |  Branch (115:21): [True: 1.04M, False: 510]
  ------------------
  116|  1.04M|    if (i == index) { return element; }
  ------------------
  |  Branch (116:9): [True: 14.2k, False: 1.03M]
  ------------------
  117|  1.03M|    i++;
  118|  1.03M|  }
  119|    510|  return INDEX_OUT_OF_BOUNDS;
  120|  14.7k|}
_ZNK8simdjson3dom5array8iteratorneERKS2_:
  138|  1.04M|inline bool array::iterator::operator!=(const array::iterator& other) const noexcept {
  139|  1.04M|  return tape.json_index != other.tape.json_index;
  140|  1.04M|}
_ZNK8simdjson3dom5array8iteratordeEv:
  126|  1.04M|inline element array::iterator::operator*() const noexcept {
  127|  1.04M|  return element(tape);
  128|  1.04M|}
_ZN8simdjson3dom5array8iteratorppEv:
  129|  1.03M|inline array::iterator& array::iterator::operator++() noexcept {
  130|  1.03M|  tape.json_index = tape.after_element();
  131|  1.03M|  return *this;
  132|  1.03M|}
_ZNK8simdjson15simdjson_resultINS_3dom5arrayEE2atEm:
   43|    429|inline simdjson_result<dom::element> simdjson_result<dom::array>::at(size_t index) const noexcept {
   44|    429|  if (error()) { return error(); }
  ------------------
  |  Branch (44:7): [True: 85, False: 344]
  ------------------
   45|    344|  return first.at(index);
   46|    429|}

_ZNK8simdjson3dom8document8capacityEv:
   23|  11.0k|inline size_t document::capacity() const noexcept {
   24|  11.0k|  return allocated_capacity;
   25|  11.0k|}
_ZN8simdjson3dom8document8allocateEm:
   28|  11.0k|inline error_code document::allocate(size_t capacity) noexcept {
   29|  11.0k|  if (capacity == 0) {
  ------------------
  |  Branch (29:7): [True: 0, False: 11.0k]
  ------------------
   30|      0|    string_buf.reset();
   31|      0|    tape.reset();
   32|      0|    allocated_capacity = 0;
   33|      0|    return SUCCESS;
   34|      0|  }
   35|       |
   36|       |  // a pathological input like "[[[[..." would generate capacity tape elements, so
   37|       |  // need a capacity of at least capacity + 1, but it is also possible to do
   38|       |  // worse with "[7,7,7,7,6,7,7,7,6,7,7,6,[7,7,7,7,6,7,7,7,6,7,7,6,7,7,7,7,7,7,6"
   39|       |  //where capacity + 1 tape elements are
   40|       |  // generated, see issue https://github.com/simdjson/simdjson/issues/345
   41|  11.0k|  size_t tape_capacity = SIMDJSON_ROUNDUP_N(capacity + 3, 64);
  ------------------
  |  |   68|  11.0k|#define SIMDJSON_ROUNDUP_N(a, n) (((a) + ((n)-1)) & ~((n)-1))
  ------------------
   42|       |  // a document with only zero-length strings... could have capacity/3 string
   43|       |  // and we would need capacity/3 * 5 bytes on the string buffer
   44|  11.0k|  size_t string_capacity = SIMDJSON_ROUNDUP_N(5 * capacity / 3 + SIMDJSON_PADDING, 64);
  ------------------
  |  |   68|  11.0k|#define SIMDJSON_ROUNDUP_N(a, n) (((a) + ((n)-1)) & ~((n)-1))
  ------------------
   45|  11.0k|  string_buf.reset( new (std::nothrow) uint8_t[string_capacity]);
   46|  11.0k|  tape.reset(new (std::nothrow) uint64_t[tape_capacity]);
   47|  11.0k|  if(!(string_buf && tape)) {
  ------------------
  |  Branch (47:8): [True: 11.0k, False: 0]
  |  Branch (47:22): [True: 11.0k, False: 0]
  ------------------
   48|      0|    allocated_capacity = 0;
   49|      0|    string_buf.reset();
   50|      0|    tape.reset();
   51|      0|    return MEMALLOC;
   52|      0|  }
   53|       |  // Technically the allocated_capacity might be larger than capacity
   54|       |  // so the next line is pessimistic.
   55|  11.0k|  allocated_capacity = capacity;
   56|  11.0k|  return SUCCESS;
   57|  11.0k|}
_ZNK8simdjson3dom8document4rootEv:
   19|  6.75k|inline element document::root() const noexcept {
   20|  6.75k|  return element(internal::tape_ref(this, 1));
   21|  6.75k|}
_ZNK8simdjson3dom8document13dump_raw_tapeERNSt3__113basic_ostreamIcNS2_11char_traitsIcEEEE:
   59|  1.03k|inline bool document::dump_raw_tape(std::ostream &os) const noexcept {
   60|  1.03k|  uint32_t string_length;
   61|  1.03k|  size_t tape_idx = 0;
   62|  1.03k|  uint64_t tape_val = tape[tape_idx];
   63|  1.03k|  uint8_t type = uint8_t(tape_val >> 56);
   64|  1.03k|  os << tape_idx << " : " << type;
   65|  1.03k|  tape_idx++;
   66|  1.03k|  size_t how_many = 0;
   67|  1.03k|  if (type == 'r') {
  ------------------
  |  Branch (67:7): [True: 1.03k, False: 0]
  ------------------
   68|  1.03k|    how_many = size_t(tape_val & internal::JSON_VALUE_MASK);
   69|  1.03k|  } else {
   70|       |    // Error: no starting root node?
   71|      0|    return false;
   72|      0|  }
   73|  1.03k|  os << "\t// pointing to " << how_many << " (right after last node)\n";
   74|  1.03k|  uint64_t payload;
   75|  1.07M|  for (; tape_idx < how_many; tape_idx++) {
  ------------------
  |  Branch (75:10): [True: 1.07M, False: 0]
  ------------------
   76|  1.07M|    os << tape_idx << " : ";
   77|  1.07M|    tape_val = tape[tape_idx];
   78|  1.07M|    payload = tape_val & internal::JSON_VALUE_MASK;
   79|  1.07M|    type = uint8_t(tape_val >> 56);
   80|  1.07M|    switch (type) {
   81|  3.84k|    case '"': // we have a string
  ------------------
  |  Branch (81:5): [True: 3.84k, False: 1.07M]
  ------------------
   82|  3.84k|      os << "string \"";
   83|  3.84k|      std::memcpy(&string_length, string_buf.get() + payload, sizeof(uint32_t));
   84|  3.84k|      os << internal::escape_json_string(std::string_view(
   85|  3.84k|        reinterpret_cast<const char *>(string_buf.get() + payload + sizeof(uint32_t)),
   86|  3.84k|        string_length
   87|  3.84k|      ));
   88|  3.84k|      os << '"';
   89|  3.84k|      os << '\n';
   90|  3.84k|      break;
   91|  1.06M|    case 'l': // we have a long int
  ------------------
  |  Branch (91:5): [True: 1.06M, False: 16.7k]
  ------------------
   92|  1.06M|      if (tape_idx + 1 >= how_many) {
  ------------------
  |  Branch (92:11): [True: 0, False: 1.06M]
  ------------------
   93|      0|        return false;
   94|      0|      }
   95|  1.06M|      os << "integer " << static_cast<int64_t>(tape[++tape_idx]) << "\n";
   96|  1.06M|      break;
   97|    351|    case 'u': // we have a long uint
  ------------------
  |  Branch (97:5): [True: 351, False: 1.07M]
  ------------------
   98|    351|      if (tape_idx + 1 >= how_many) {
  ------------------
  |  Branch (98:11): [True: 0, False: 351]
  ------------------
   99|      0|        return false;
  100|      0|      }
  101|    351|      os << "unsigned integer " << tape[++tape_idx] << "\n";
  102|    351|      break;
  103|  6.54k|    case 'd': // we have a double
  ------------------
  |  Branch (103:5): [True: 6.54k, False: 1.07M]
  ------------------
  104|  6.54k|      os << "float ";
  105|  6.54k|      if (tape_idx + 1 >= how_many) {
  ------------------
  |  Branch (105:11): [True: 0, False: 6.54k]
  ------------------
  106|      0|        return false;
  107|      0|      }
  108|  6.54k|      double answer;
  109|  6.54k|      std::memcpy(&answer, &tape[++tape_idx], sizeof(answer));
  110|  6.54k|      os << answer << '\n';
  111|  6.54k|      break;
  112|    387|    case 'n': // we have a null
  ------------------
  |  Branch (112:5): [True: 387, False: 1.07M]
  ------------------
  113|    387|      os << "null\n";
  114|    387|      break;
  115|    389|    case 't': // we have a true
  ------------------
  |  Branch (115:5): [True: 389, False: 1.07M]
  ------------------
  116|    389|      os << "true\n";
  117|    389|      break;
  118|    260|    case 'f': // we have a false
  ------------------
  |  Branch (118:5): [True: 260, False: 1.07M]
  ------------------
  119|    260|      os << "false\n";
  120|    260|      break;
  121|    616|    case '{': // we have an object
  ------------------
  |  Branch (121:5): [True: 616, False: 1.07M]
  ------------------
  122|    616|      os << "{\t// pointing to next tape location " << uint32_t(payload)
  123|    616|         << " (first node after the scope), "
  124|    616|         << " saturated count "
  125|    616|         << ((payload >> 32) & internal::JSON_COUNT_MASK)<< "\n";
  126|    616|      break;    case '}': // we end an object
  ------------------
  |  Branch (126:17): [True: 616, False: 1.07M]
  ------------------
  127|    616|      os << "}\t// pointing to previous tape location " << uint32_t(payload)
  128|    616|         << " (start of the scope)\n";
  129|    616|      break;
  130|  1.33k|    case '[': // we start an array
  ------------------
  |  Branch (130:5): [True: 1.33k, False: 1.07M]
  ------------------
  131|  1.33k|      os << "[\t// pointing to next tape location " << uint32_t(payload)
  132|  1.33k|         << " (first node after the scope), "
  133|  1.33k|         << " saturated count "
  134|  1.33k|         << ((payload >> 32) & internal::JSON_COUNT_MASK)<< "\n";
  135|  1.33k|      break;
  136|  1.33k|    case ']': // we end an array
  ------------------
  |  Branch (136:5): [True: 1.33k, False: 1.07M]
  ------------------
  137|  1.33k|      os << "]\t// pointing to previous tape location " << uint32_t(payload)
  138|  1.33k|         << " (start of the scope)\n";
  139|  1.33k|      break;
  140|  1.03k|    case 'r': // we start and end with the root node
  ------------------
  |  Branch (140:5): [True: 1.03k, False: 1.07M]
  ------------------
  141|       |      // should we be hitting the root node?
  142|  1.03k|      return false;
  143|      0|    default:
  ------------------
  |  Branch (143:5): [True: 0, False: 1.07M]
  ------------------
  144|      0|      return false;
  145|  1.07M|    }
  146|  1.07M|  }
  147|      0|  tape_val = tape[tape_idx];
  148|      0|  payload = tape_val & internal::JSON_VALUE_MASK;
  149|      0|  type = uint8_t(tape_val >> 56);
  150|      0|  os << tape_idx << " : " << type << "\t// pointing to " << payload
  151|      0|     << " (start root)\n";
  152|      0|  return true;
  153|  1.03k|}

_ZN8simdjson3dom8documentC2Ev:
   25|  11.0k|  document() noexcept = default;
_ZN8simdjson3dom8documentD2Ev:
   26|  11.0k|  ~document() noexcept = default;

_ZN8simdjson3dom7elementC2Ev:
  185|  18.2k|simdjson_inline element::element() noexcept : tape{} {}
_ZN8simdjson15simdjson_resultINS_3dom7elementEEC2ENS_10error_codeE:
   20|  6.44k|    : internal::simdjson_result_base<dom::element>(error) {}
_ZN8simdjson3dom7elementC2ERKNS_8internal8tape_refE:
  186|  1.06M|simdjson_inline element::element(const internal::tape_ref &_tape) noexcept : tape{_tape} { }
_ZN8simdjson15simdjson_resultINS_3dom7elementEEC2EOS2_:
   18|  21.7k|    : internal::simdjson_result_base<dom::element>(std::forward<dom::element>(value)) {}
_ZNK8simdjson3dom7element4typeEv:
  188|    427|inline element_type element::type() const noexcept {
  189|    427|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|    427|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  190|    427|  auto tape_type = tape.tape_ref_type();
  191|    427|  return tape_type == internal::tape_type::FALSE_VALUE ? element_type::BOOL : static_cast<element_type>(tape_type);
  ------------------
  |  Branch (191:10): [True: 0, False: 427]
  ------------------
  192|    427|}
_ZNK8simdjson3dom7element9get_arrayEv:
  283|    885|inline simdjson_result<array> element::get_array() const noexcept {
  284|    885|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|    885|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  285|    885|  switch (tape.tape_ref_type()) {
  286|    492|    case internal::tape_type::START_ARRAY:
  ------------------
  |  Branch (286:5): [True: 492, False: 393]
  ------------------
  287|    492|      return array(tape);
  288|    393|    default:
  ------------------
  |  Branch (288:5): [True: 393, False: 492]
  ------------------
  289|    393|      return INCORRECT_TYPE;
  290|    885|  }
  291|    885|}
_ZNK8simdjson3dom7element10get_objectEv:
  292|  1.30k|inline simdjson_result<object> element::get_object() const noexcept {
  293|  1.30k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|  1.30k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  294|  1.30k|  switch (tape.tape_ref_type()) {
  295|    922|    case internal::tape_type::START_OBJECT:
  ------------------
  |  Branch (295:5): [True: 922, False: 386]
  ------------------
  296|    922|      return object(tape);
  297|    386|    default:
  ------------------
  |  Branch (297:5): [True: 386, False: 922]
  ------------------
  298|    386|      return INCORRECT_TYPE;
  299|  1.30k|  }
  300|  1.30k|}
_ZNK8simdjson3dom7element9get_c_strEv:
  203|    104|inline simdjson_result<const char *> element::get_c_str() const noexcept {
  204|    104|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|    104|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  205|    104|  switch (tape.tape_ref_type()) {
  206|      2|    case internal::tape_type::STRING: {
  ------------------
  |  Branch (206:5): [True: 2, False: 102]
  ------------------
  207|      2|      return tape.get_c_str();
  208|      0|    }
  209|    102|    default:
  ------------------
  |  Branch (209:5): [True: 102, False: 2]
  ------------------
  210|    102|      return INCORRECT_TYPE;
  211|    104|  }
  212|    104|}
_ZNK8simdjson3dom7element17get_string_lengthEv:
  213|     66|inline simdjson_result<size_t> element::get_string_length() const noexcept {
  214|     66|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|     66|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  215|     66|  switch (tape.tape_ref_type()) {
  216|      6|    case internal::tape_type::STRING: {
  ------------------
  |  Branch (216:5): [True: 6, False: 60]
  ------------------
  217|      6|      return tape.get_string_length();
  218|      0|    }
  219|     60|    default:
  ------------------
  |  Branch (219:5): [True: 60, False: 6]
  ------------------
  220|     60|      return INCORRECT_TYPE;
  221|     66|  }
  222|     66|}
_ZNK8simdjson3dom7element10get_stringEv:
  223|    171|inline simdjson_result<std::string_view> element::get_string() const noexcept {
  224|    171|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|    171|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  225|    171|  switch (tape.tape_ref_type()) {
  226|      4|    case internal::tape_type::STRING:
  ------------------
  |  Branch (226:5): [True: 4, False: 167]
  ------------------
  227|      4|      return tape.get_string_view();
  228|    167|    default:
  ------------------
  |  Branch (228:5): [True: 167, False: 4]
  ------------------
  229|    167|      return INCORRECT_TYPE;
  230|    171|  }
  231|    171|}
_ZNK8simdjson3dom7element9get_int64Ev:
  246|    602|inline simdjson_result<int64_t> element::get_int64() const noexcept {
  247|    602|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|    602|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  248|    602|  if(simdjson_unlikely(!tape.is_int64())) { // branch rarely taken
  ------------------
  |  |  120|    602|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 586, False: 16]
  |  |  ------------------
  ------------------
  249|    586|    if(tape.is_uint64()) {
  ------------------
  |  Branch (249:8): [True: 218, False: 368]
  ------------------
  250|    218|      uint64_t result = tape.next_tape_value<uint64_t>();
  251|       |      // Wrapping max in parens to handle Windows issue: https://stackoverflow.com/questions/11544073/how-do-i-deal-with-the-max-macro-in-windows-h-colliding-with-max-in-std
  252|    218|      if (result > uint64_t((std::numeric_limits<int64_t>::max)())) {
  ------------------
  |  Branch (252:11): [True: 218, False: 0]
  ------------------
  253|    218|        return NUMBER_OUT_OF_RANGE;
  254|    218|      }
  255|      0|      return static_cast<int64_t>(result);
  256|    218|    }
  257|    368|    return INCORRECT_TYPE;
  258|    586|  }
  259|     16|  return tape.next_tape_value<int64_t>();
  260|    602|}
_ZNK8simdjson3dom7element10get_uint64Ev:
  232|    594|inline simdjson_result<uint64_t> element::get_uint64() const noexcept {
  233|    594|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|    594|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  234|    594|  if(simdjson_unlikely(!tape.is_uint64())) { // branch rarely taken
  ------------------
  |  |  120|    594|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 495, False: 99]
  |  |  ------------------
  ------------------
  235|    495|    if(tape.is_int64()) {
  ------------------
  |  Branch (235:8): [True: 128, False: 367]
  ------------------
  236|    128|      int64_t result = tape.next_tape_value<int64_t>();
  237|    128|      if (result < 0) {
  ------------------
  |  Branch (237:11): [True: 93, False: 35]
  ------------------
  238|     93|        return NUMBER_OUT_OF_RANGE;
  239|     93|      }
  240|     35|      return uint64_t(result);
  241|    128|    }
  242|    367|    return INCORRECT_TYPE;
  243|    495|  }
  244|     99|  return tape.next_tape_value<int64_t>();
  245|    594|}
_ZNK8simdjson3dom7element10get_doubleEv:
  261|    476|inline simdjson_result<double> element::get_double() const noexcept {
  262|    476|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|    476|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  263|       |  // Performance considerations:
  264|       |  // 1. Querying tape_ref_type() implies doing a shift, it is fast to just do a straight
  265|       |  //   comparison.
  266|       |  // 2. Using a switch-case relies on the compiler guessing what kind of code generation
  267|       |  //    we want... But the compiler cannot know that we expect the type to be "double"
  268|       |  //    most of the time.
  269|       |  // We can expect get<double> to refer to a double type almost all the time.
  270|       |  // It is important to craft the code accordingly so that the compiler can use this
  271|       |  // information. (This could also be solved with profile-guided optimization.)
  272|    476|  if(simdjson_unlikely(!tape.is_double())) { // branch rarely taken
  ------------------
  |  |  120|    476|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 365, False: 111]
  |  |  ------------------
  ------------------
  273|    365|    if(tape.is_uint64()) {
  ------------------
  |  Branch (273:8): [True: 8, False: 357]
  ------------------
  274|      8|      return double(tape.next_tape_value<uint64_t>());
  275|    357|    } else if(tape.is_int64()) {
  ------------------
  |  Branch (275:15): [True: 11, False: 346]
  ------------------
  276|     11|      return double(tape.next_tape_value<int64_t>());
  277|     11|    }
  278|    346|    return INCORRECT_TYPE;
  279|    365|  }
  280|       |  // this is common:
  281|    111|  return tape.next_tape_value<double>();
  282|    476|}
_ZNK8simdjson3dom7element8get_boolEv:
  194|    313|inline simdjson_result<bool> element::get_bool() const noexcept {
  195|    313|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|    313|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  196|    313|  if(tape.is_true()) {
  ------------------
  |  Branch (196:6): [True: 1, False: 312]
  ------------------
  197|      1|    return true;
  198|    312|  } else if(tape.is_false()) {
  ------------------
  |  Branch (198:13): [True: 1, False: 311]
  ------------------
  199|      1|    return false;
  200|      1|  }
  201|    311|  return INCORRECT_TYPE;
  202|    313|}
_ZNK8simdjson3dom7element8is_arrayEv:
  332|    106|inline bool element::is_array() const noexcept { return is<array>(); }
_ZNK8simdjson3dom7element2isINS0_5arrayEEEbv:
  318|    115|simdjson_inline bool element::is() const noexcept {
  319|    115|  auto result = get<T>();
  320|    115|  return !result.error();
  321|    115|}
_ZNK8simdjson3dom7element3getINS0_5arrayEEENS_15simdjson_resultIT_EEv:
  323|    727|template<> inline simdjson_result<array> element::get<array>() const noexcept { return get_array(); }
_ZNK8simdjson3dom7element9is_objectEv:
  333|     50|inline bool element::is_object() const noexcept { return is<object>(); }
_ZNK8simdjson3dom7element2isINS0_6objectEEEbv:
  318|     60|simdjson_inline bool element::is() const noexcept {
  319|     60|  auto result = get<T>();
  320|     60|  return !result.error();
  321|     60|}
_ZNK8simdjson3dom7element3getINS0_6objectEEENS_15simdjson_resultIT_EEv:
  324|  1.22k|template<> inline simdjson_result<object> element::get<object>() const noexcept { return get_object(); }
_ZNK8simdjson3dom7element9is_stringEv:
  334|     78|inline bool element::is_string() const noexcept { return is<std::string_view>(); }
_ZNK8simdjson3dom7element2isINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEEbv:
  318|     84|simdjson_inline bool element::is() const noexcept {
  319|     84|  auto result = get<T>();
  320|     84|  return !result.error();
  321|     84|}
_ZNK8simdjson3dom7element3getINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEENS_15simdjson_resultIT_EEv:
  326|    133|template<> inline simdjson_result<std::string_view> element::get<std::string_view>() const noexcept { return get_string(); }
_ZNK8simdjson3dom7element8is_int64Ev:
  335|    347|inline bool element::is_int64() const noexcept { return is<int64_t>(); }
_ZNK8simdjson3dom7element2isIlEEbv:
  318|    353|simdjson_inline bool element::is() const noexcept {
  319|    353|  auto result = get<T>();
  320|    353|  return !result.error();
  321|    353|}
_ZNK8simdjson3dom7element3getIlEENS_15simdjson_resultIT_EEv:
  327|    552|template<> inline simdjson_result<int64_t> element::get<int64_t>() const noexcept { return get_int64(); }
_ZNK8simdjson3dom7element9is_uint64Ev:
  336|    325|inline bool element::is_uint64() const noexcept { return is<uint64_t>(); }
_ZNK8simdjson3dom7element2isImEEbv:
  318|    338|simdjson_inline bool element::is() const noexcept {
  319|    338|  auto result = get<T>();
  320|    338|  return !result.error();
  321|    338|}
_ZNK8simdjson3dom7element3getImEENS_15simdjson_resultIT_EEv:
  328|    555|template<> inline simdjson_result<uint64_t> element::get<uint64_t>() const noexcept { return get_uint64(); }
_ZNK8simdjson3dom7element9is_doubleEv:
  337|    254|inline bool element::is_double() const noexcept { return is<double>(); }
_ZNK8simdjson3dom7element2isIdEEbv:
  318|    257|simdjson_inline bool element::is() const noexcept {
  319|    257|  auto result = get<T>();
  320|    257|  return !result.error();
  321|    257|}
_ZNK8simdjson3dom7element3getIdEENS_15simdjson_resultIT_EEv:
  329|    351|template<> inline simdjson_result<double> element::get<double>() const noexcept { return get_double(); }
_ZNK8simdjson3dom7element9is_numberEv:
  339|    281|inline bool element::is_number() const noexcept { return is_int64() || is_uint64() || is_double(); }
  ------------------
  |  Branch (339:58): [True: 5, False: 276]
  |  Branch (339:72): [True: 93, False: 183]
  |  Branch (339:87): [True: 70, False: 113]
  ------------------
_ZNK8simdjson3dom7element7is_boolEv:
  338|    117|inline bool element::is_bool() const noexcept { return is<bool>(); }
_ZNK8simdjson3dom7element2isIbEEbv:
  318|    169|simdjson_inline bool element::is() const noexcept {
  319|    169|  auto result = get<T>();
  320|    169|  return !result.error();
  321|    169|}
_ZNK8simdjson3dom7element3getIbEENS_15simdjson_resultIT_EEv:
  330|    277|template<> inline simdjson_result<bool> element::get<bool>() const noexcept { return get_bool(); }
_ZNK8simdjson3dom7element7is_nullEv:
  341|     59|inline bool element::is_null() const noexcept {
  342|     59|  return tape.is_null_on_tape();
  343|     59|}
_ZNK8simdjson3dom7element2isIPKcEEbv:
  318|      5|simdjson_inline bool element::is() const noexcept {
  319|      5|  auto result = get<T>();
  320|      5|  return !result.error();
  321|      5|}
_ZNK8simdjson3dom7element3getIPKcEENS_15simdjson_resultIT_EEv:
  325|     52|template<> inline simdjson_result<const char *> element::get<const char *>() const noexcept { return get_c_str(); }
_ZNO8simdjson3dom7element3tieIbEEvRT_RNS_10error_codeE:
  313|     21|inline void element::tie(T &value, error_code &error) && noexcept {
  314|     21|  error = get<T>(value);
  315|     21|}
_ZNK8simdjson3dom7element3getIbEENS_10error_codeERT_:
  303|     21|simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
  304|     21|  return get<T>().get(value);
  305|     21|}
_ZNO8simdjson3dom7element3tieIdEEvRT_RNS_10error_codeE:
  313|      4|inline void element::tie(T &value, error_code &error) && noexcept {
  314|      4|  error = get<T>(value);
  315|      4|}
_ZNK8simdjson3dom7element3getIdEENS_10error_codeERT_:
  303|      4|simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
  304|      4|  return get<T>().get(value);
  305|      4|}
_ZNO8simdjson3dom7element3tieImEEvRT_RNS_10error_codeE:
  313|      8|inline void element::tie(T &value, error_code &error) && noexcept {
  314|      8|  error = get<T>(value);
  315|      8|}
_ZNK8simdjson3dom7element3getImEENS_10error_codeERT_:
  303|      8|simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
  304|      8|  return get<T>().get(value);
  305|      8|}
_ZNO8simdjson3dom7element3tieIlEEvRT_RNS_10error_codeE:
  313|      5|inline void element::tie(T &value, error_code &error) && noexcept {
  314|      5|  error = get<T>(value);
  315|      5|}
_ZNK8simdjson3dom7element3getIlEENS_10error_codeERT_:
  303|      5|simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
  304|      5|  return get<T>().get(value);
  305|      5|}
_ZNO8simdjson3dom7element3tieINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEEvRT_RNS_10error_codeE:
  313|     11|inline void element::tie(T &value, error_code &error) && noexcept {
  314|     11|  error = get<T>(value);
  315|     11|}
_ZNK8simdjson3dom7element3getINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEENS_10error_codeERT_:
  303|     11|simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
  304|     11|  return get<T>().get(value);
  305|     11|}
_ZNO8simdjson3dom7element3tieIPKcEEvRT_RNS_10error_codeE:
  313|     13|inline void element::tie(T &value, error_code &error) && noexcept {
  314|     13|  error = get<T>(value);
  315|     13|}
_ZNK8simdjson3dom7element3getIPKcEENS_10error_codeERT_:
  303|     13|simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
  304|     13|  return get<T>().get(value);
  305|     13|}
_ZNO8simdjson3dom7element3tieINS0_5arrayEEEvRT_RNS_10error_codeE:
  313|      3|inline void element::tie(T &value, error_code &error) && noexcept {
  314|      3|  error = get<T>(value);
  315|      3|}
_ZNK8simdjson3dom7element3getINS0_5arrayEEENS_10error_codeERT_:
  303|      3|simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
  304|      3|  return get<T>().get(value);
  305|      3|}
_ZNO8simdjson3dom7element3tieINS0_6objectEEEvRT_RNS_10error_codeE:
  313|      4|inline void element::tie(T &value, error_code &error) && noexcept {
  314|      4|  error = get<T>(value);
  315|      4|}
_ZNK8simdjson3dom7element3getINS0_6objectEEENS_10error_codeERT_:
  303|      4|simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
  304|      4|  return get<T>().get(value);
  305|      4|}
_ZNK8simdjson3dom7elementcvbEv:
  347|     73|inline element::operator bool() const noexcept(false) { return get<bool>(); }
_ZNK8simdjson3dom7elementcvdEv:
  352|     81|inline element::operator double() const noexcept(false) { return get<double>(); }
_ZNK8simdjson3dom7elementcvmEv:
  350|    201|inline element::operator uint64_t() const noexcept(false) { return get<uint64_t>(); }
_ZNK8simdjson3dom7elementcvlEv:
  351|    185|inline element::operator int64_t() const noexcept(false) { return get<int64_t>(); }
_ZNK8simdjson3dom7elementcvNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEEv:
  349|     23|inline element::operator std::string_view() const noexcept(false) { return get<std::string_view>(); }
_ZNK8simdjson3dom7elementcvPKcEv:
  348|     20|inline element::operator const char*() const noexcept(false) { return get<const char *>(); }
_ZNK8simdjson3dom7elementcvNS0_5arrayEEv:
  353|     24|inline element::operator array() const noexcept(false) { return get<array>(); }
_ZNK8simdjson3dom7elementcvNS0_6objectEEv:
  354|     31|inline element::operator object() const noexcept(false) { return get<object>(); }
_ZNK8simdjson3dom7element5beginEv:
  356|     76|inline array::iterator element::begin() const noexcept(false) {
  357|     76|  return get<array>().begin();
  358|     76|}
_ZNK8simdjson3dom7element3endEv:
  359|     75|inline array::iterator element::end() const noexcept(false) {
  360|     75|  return get<array>().end();
  361|     75|}
_ZNK8simdjson3dom7elementixENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  365|    354|inline simdjson_result<element> element::operator[](std::string_view key) const noexcept {
  366|    354|  return at_key(key);
  367|    354|}
_ZNK8simdjson3dom7element10at_pointerENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  372|  15.6k|inline simdjson_result<element> element::at_pointer(std::string_view json_pointer) const noexcept {
  373|  15.6k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|  15.6k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  374|  15.6k|  switch (tape.tape_ref_type()) {
  375|    853|    case internal::tape_type::START_OBJECT:
  ------------------
  |  Branch (375:5): [True: 853, False: 14.7k]
  ------------------
  376|    853|      return object(tape).at_pointer(json_pointer);
  377|  14.6k|    case internal::tape_type::START_ARRAY:
  ------------------
  |  Branch (377:5): [True: 14.6k, False: 991]
  ------------------
  378|  14.6k|      return array(tape).at_pointer(json_pointer);
  379|    138|    default: {
  ------------------
  |  Branch (379:5): [True: 138, False: 15.4k]
  ------------------
  380|    138|      if(!json_pointer.empty()) { // a non-empty string is invalid on an atom
  ------------------
  |  Branch (380:10): [True: 96, False: 42]
  ------------------
  381|     96|        return INVALID_JSON_POINTER;
  382|     96|      }
  383|       |      // an empty string means that we return the current node
  384|     42|      dom::element copy(*this);
  385|     42|      return simdjson_result<element>(std::move(copy));
  386|    138|    }
  387|  15.6k|  }
  388|  15.6k|}
_ZN8simdjson15simdjson_resultINS_3dom7elementEEC2Ev:
   16|    761|    : internal::simdjson_result_base<dom::element>() {}
_ZNK8simdjson15simdjson_resultINS_3dom7elementEE10at_pointerENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEE:
  115|  14.5k|simdjson_inline simdjson_result<dom::element> simdjson_result<dom::element>::at_pointer(const std::string_view json_pointer) const noexcept {
  116|  14.5k|  if (error()) { return error(); }
  ------------------
  |  Branch (116:7): [True: 0, False: 14.5k]
  ------------------
  117|  14.5k|  return first.at_pointer(json_pointer);
  118|  14.5k|}
_ZNK8simdjson3dom7element2atEm:
  398|    429|inline simdjson_result<element> element::at(size_t index) const noexcept {
  399|    429|  return get<array>().at(index);
  400|    429|}
_ZNK8simdjson3dom7element6at_keyENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  401|    682|inline simdjson_result<element> element::at_key(std::string_view key) const noexcept {
  402|    682|  return get<object>().at_key(key);
  403|    682|}
_ZNK8simdjson3dom7element23at_key_case_insensitiveENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  404|    440|inline simdjson_result<element> element::at_key_case_insensitive(std::string_view key) const noexcept {
  405|    440|  return get<object>().at_key_case_insensitive(key);
  406|    440|}
_ZNK8simdjson3dom7element13dump_raw_tapeERNSt3__113basic_ostreamIcNS2_11char_traitsIcEEEE:
  408|  1.03k|inline bool element::dump_raw_tape(std::ostream &out) const noexcept {
  409|  1.03k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|  1.03k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  410|  1.03k|  return tape.doc->dump_raw_tape(out);
  411|  1.03k|}
_ZNK8simdjson15simdjson_resultINS_3dom7elementEE3getIS2_EENS_10error_codeERT_:
   36|  11.0k|simdjson_warn_unused simdjson_inline error_code simdjson_result<dom::element>::get(T &value) const noexcept {
   37|  11.0k|  if (error()) { return error(); }
  ------------------
  |  Branch (37:7): [True: 4.31k, False: 6.75k]
  ------------------
   38|  6.75k|  return first.get<T>(value);
   39|  11.0k|}
_ZNK8simdjson3dom7element3getIS1_EENS_10error_codeERT_:
  308|  6.75k|simdjson_warn_unused simdjson_inline error_code element::get<element>(element &value) const noexcept {
  309|  6.75k|  value = element(tape);
  310|  6.75k|  return SUCCESS;
  311|  6.75k|}

_ZN8simdjson3dom6objectC2ERKNS_8internal8tape_refE:
   66|  1.77k|simdjson_inline object::object(const internal::tape_ref &_tape) noexcept : tape{_tape} { }
_ZN8simdjson15simdjson_resultINS_3dom6objectEEC2ES2_:
   18|    922|    : internal::simdjson_result_base<dom::object>(std::forward<dom::object>(value)) {}
_ZN8simdjson15simdjson_resultINS_3dom6objectEEC2ENS_10error_codeE:
   20|    386|    : internal::simdjson_result_base<dom::object>(error) {}
_ZN8simdjson3dom6objectC2Ev:
   65|    441|simdjson_inline object::object() noexcept : tape{} {}
_ZNK8simdjson3dom6object10at_pointerENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   86|    853|inline simdjson_result<element> object::at_pointer(std::string_view json_pointer) const noexcept {
   87|    853|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|    853|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
   88|    853|  if(json_pointer.empty()) { // an empty string means that we return the current node
  ------------------
  |  Branch (88:6): [True: 78, False: 775]
  ------------------
   89|     78|      return element(this->tape); // copy the current node
   90|    775|  } else if(json_pointer[0] != '/') { // otherwise there is an error
  ------------------
  |  Branch (90:13): [True: 14, False: 761]
  ------------------
   91|     14|      return INVALID_JSON_POINTER;
   92|     14|  }
   93|    761|  json_pointer = json_pointer.substr(1);
   94|    761|  size_t slash = json_pointer.find('/');
   95|    761|  std::string_view key = json_pointer.substr(0, slash);
   96|       |  // Grab the child with the given key
   97|    761|  simdjson_result<element> child;
   98|       |
   99|       |  // If there is an escape character in the key, unescape it and then get the child.
  100|    761|  size_t escape = key.find('~');
  101|    761|  if (escape != std::string_view::npos) {
  ------------------
  |  Branch (101:7): [True: 262, False: 499]
  ------------------
  102|       |    // Unescape the key
  103|    262|    std::string unescaped(key);
  104|  1.21k|    do {
  105|  1.21k|      switch (unescaped[escape+1]) {
  106|    734|        case '0':
  ------------------
  |  Branch (106:9): [True: 734, False: 482]
  ------------------
  107|    734|          unescaped.replace(escape, 2, "~");
  108|    734|          break;
  109|    403|        case '1':
  ------------------
  |  Branch (109:9): [True: 403, False: 813]
  ------------------
  110|    403|          unescaped.replace(escape, 2, "/");
  111|    403|          break;
  112|     79|        default:
  ------------------
  |  Branch (112:9): [True: 79, False: 1.13k]
  ------------------
  113|     79|          return INVALID_JSON_POINTER; // "Unexpected ~ escape character in JSON pointer");
  114|  1.21k|      }
  115|  1.13k|      escape = unescaped.find('~', escape+1);
  116|  1.13k|    } while (escape != std::string::npos);
  ------------------
  |  Branch (116:14): [True: 954, False: 183]
  ------------------
  117|    183|    child = at_key(unescaped);
  118|    499|  } else {
  119|    499|    child = at_key(key);
  120|    499|  }
  121|    682|  if(child.error()) {
  ------------------
  |  Branch (121:6): [True: 351, False: 331]
  ------------------
  122|    351|    return child; // we do not continue if there was an error
  123|    351|  }
  124|       |  // If there is a /, we have to recurse and look up more of the path
  125|    331|  if (slash != std::string_view::npos) {
  ------------------
  |  Branch (125:7): [True: 315, False: 16]
  ------------------
  126|    315|    child = child.at_pointer(json_pointer.substr(slash));
  127|    315|  }
  128|    331|  return child;
  129|    682|}
_ZNK8simdjson3dom6object6at_keyENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  131|  1.23k|inline simdjson_result<element> object::at_key(std::string_view key) const noexcept {
  132|  1.23k|  iterator end_field = end();
  133|  70.6k|  for (iterator field = begin(); field != end_field; ++field) {
  ------------------
  |  Branch (133:34): [True: 69.9k, False: 750]
  ------------------
  134|  69.9k|    if (field.key_equals(key)) {
  ------------------
  |  Branch (134:9): [True: 487, False: 69.4k]
  ------------------
  135|    487|      return field.value();
  136|    487|    }
  137|  69.9k|  }
  138|    750|  return NO_SUCH_FIELD;
  139|  1.23k|}
_ZNK8simdjson3dom6object3endEv:
   71|  1.54k|inline object::iterator object::end() const noexcept {
   72|  1.54k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|  1.54k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
   73|  1.54k|  return internal::tape_ref(tape.doc, tape.after_element() - 1);
   74|  1.54k|}
_ZN8simdjson3dom6object8iteratorC2ERKNS_8internal8tape_refE:
  156|  3.09k|simdjson_inline object::iterator::iterator(const internal::tape_ref &_tape) noexcept : tape{_tape} { }
_ZNK8simdjson3dom6object5beginEv:
   67|  1.54k|inline object::iterator object::begin() const noexcept {
   68|  1.54k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|  1.54k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
   69|  1.54k|  return internal::tape_ref(tape.doc, tape.json_index + 1);
   70|  1.54k|}
_ZNK8simdjson3dom6object8iteratorneERKS2_:
  160|  85.8k|inline bool object::iterator::operator!=(const object::iterator& other) const noexcept {
  161|  85.8k|  return tape.json_index != other.tape.json_index;
  162|  85.8k|}
_ZNK8simdjson3dom6object8iterator10key_equalsENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
  214|  69.9k|inline bool object::iterator::key_equals(std::string_view o) const noexcept {
  215|       |  // We use the fact that the key length can be computed quickly
  216|       |  // without access to the string buffer.
  217|  69.9k|  const uint32_t len = key_length();
  218|  69.9k|  if(o.size() == len) {
  ------------------
  |  Branch (218:6): [True: 1.45k, False: 68.4k]
  ------------------
  219|       |    // We avoid construction of a temporary string_view instance.
  220|  1.45k|    return (memcmp(o.data(), key_c_str(), len) == 0);
  221|  1.45k|  }
  222|  68.4k|  return false;
  223|  69.9k|}
_ZNK8simdjson3dom6object8iterator10key_lengthEv:
  191|  84.8k|inline uint32_t object::iterator::key_length() const noexcept {
  192|  84.8k|  return tape.get_string_length();
  193|  84.8k|}
_ZNK8simdjson3dom6object8iterator9key_c_strEv:
  194|  1.87k|inline const char* object::iterator::key_c_str() const noexcept {
  195|  1.87k|  return reinterpret_cast<const char *>(&tape.doc->string_buf[size_t(tape.tape_value()) + sizeof(uint32_t)]);
  196|  1.87k|}
_ZNK8simdjson3dom6object8iterator5valueEv:
  197|    563|inline element object::iterator::value() const noexcept {
  198|    563|  return element(internal::tape_ref(tape.doc, tape.json_index + 1));
  199|    563|}
_ZN8simdjson3dom6object8iteratorppEv:
  178|  84.2k|inline object::iterator& object::iterator::operator++() noexcept {
  179|  84.2k|  tape.json_index++;
  180|  84.2k|  tape.json_index = tape.after_element();
  181|  84.2k|  return *this;
  182|  84.2k|}
_ZNK8simdjson15simdjson_resultINS_3dom6objectEE6at_keyENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEE:
   34|    682|inline simdjson_result<dom::element> simdjson_result<dom::object>::at_key(std::string_view key) const noexcept {
   35|    682|  if (error()) { return error(); }
  ------------------
  |  Branch (35:7): [True: 127, False: 555]
  ------------------
   36|    555|  return first.at_key(key);
   37|    682|}
_ZNK8simdjson15simdjson_resultINS_3dom6objectEE23at_key_case_insensitiveENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEE:
   38|    440|inline simdjson_result<dom::element> simdjson_result<dom::object>::at_key_case_insensitive(std::string_view key) const noexcept {
   39|    440|  if (error()) { return error(); }
  ------------------
  |  Branch (39:7): [True: 131, False: 309]
  ------------------
   40|    309|  return first.at_key_case_insensitive(key);
   41|    440|}
_ZNK8simdjson3dom6object23at_key_case_insensitiveENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  143|    309|inline simdjson_result<element> object::at_key_case_insensitive(std::string_view key) const noexcept {
  144|    309|  iterator end_field = end();
  145|  15.1k|  for (iterator field = begin(); field != end_field; ++field) {
  ------------------
  |  Branch (145:34): [True: 14.8k, False: 233]
  ------------------
  146|  14.8k|    if (field.key_equals_case_insensitive(key)) {
  ------------------
  |  Branch (146:9): [True: 76, False: 14.8k]
  ------------------
  147|     76|      return field.value();
  148|     76|    }
  149|  14.8k|  }
  150|    233|  return NO_SUCH_FIELD;
  151|    309|}
_ZNK8simdjson3dom6object8iterator27key_equals_case_insensitiveENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
  225|  14.8k|inline bool object::iterator::key_equals_case_insensitive(std::string_view o) const noexcept {
  226|       |  // We use the fact that the key length can be computed quickly
  227|       |  // without access to the string buffer.
  228|  14.8k|  const uint32_t len = key_length();
  229|  14.8k|  if(o.size() == len) {
  ------------------
  |  Branch (229:6): [True: 420, False: 14.4k]
  ------------------
  230|       |      // See For case-insensitive string comparisons, avoid char-by-char functions
  231|       |      // https://lemire.me/blog/2020/04/30/for-case-insensitive-string-comparisons-avoid-char-by-char-functions/
  232|       |      // Note that it might be worth rolling our own strncasecmp function, with vectorization.
  233|    420|      return (simdjson_strncasecmp(o.data(), key_c_str(), len) == 0);
  ------------------
  |  |  170|    420|#define simdjson_strncasecmp strncasecmp
  ------------------
  234|    420|  }
  235|  14.4k|  return false;
  236|  14.8k|}

_ZN8simdjson3dom6parserC2Em:
   20|  11.0k|    loaded_bytes(nullptr) {
   21|  11.0k|}
_ZNR8simdjson3dom6parser5parseERKNS_13padded_stringE:
  148|  11.0k|simdjson_inline simdjson_result<element> parser::parse(const padded_string &s) & noexcept {
  149|  11.0k|  return parse(s.data(), s.length(), false);
  150|  11.0k|}
_ZNR8simdjson3dom6parser5parseEPKcmb:
  142|  11.0k|simdjson_inline simdjson_result<element> parser::parse(const char *buf, size_t len, bool realloc_if_needed) & noexcept {
  143|  11.0k|  return parse(reinterpret_cast<const uint8_t *>(buf), len, realloc_if_needed);
  144|  11.0k|}
_ZNR8simdjson3dom6parser5parseEPKhmb:
  138|  11.0k|inline simdjson_result<element> parser::parse(const uint8_t *buf, size_t len, bool realloc_if_needed) & noexcept {
  139|  11.0k|  return parse_into_document(doc, buf, len, realloc_if_needed);
  140|  11.0k|}
_ZNR8simdjson3dom6parser19parse_into_documentERNS0_8documentEPKhmb:
  104|  11.0k|inline simdjson_result<element> parser::parse_into_document(document& provided_doc, const uint8_t *buf, size_t len, bool realloc_if_needed) & noexcept {
  105|       |  // Important: we need to ensure that document has enough capacity.
  106|       |  // Important: It is possible that provided_doc is actually the internal 'doc' within the parser!!!
  107|  11.0k|  error_code _error = ensure_capacity(provided_doc, len);
  108|  11.0k|  if (_error) { return _error; }
  ------------------
  |  Branch (108:7): [True: 0, False: 11.0k]
  ------------------
  109|  11.0k|  if (realloc_if_needed) {
  ------------------
  |  Branch (109:7): [True: 0, False: 11.0k]
  ------------------
  110|       |    // Make sure we have enough capacity to copy len bytes
  111|      0|    if (!loaded_bytes || _loaded_bytes_capacity < len) {
  ------------------
  |  Branch (111:9): [True: 0, False: 0]
  |  Branch (111:26): [True: 0, False: 0]
  ------------------
  112|      0|      loaded_bytes.reset( internal::allocate_padded_buffer(len) );
  113|      0|      if (!loaded_bytes) {
  ------------------
  |  Branch (113:11): [True: 0, False: 0]
  ------------------
  114|      0|        return MEMALLOC;
  115|      0|      }
  116|      0|      _loaded_bytes_capacity = len;
  117|      0|    }
  118|      0|    std::memcpy(static_cast<void *>(loaded_bytes.get()), buf, len);
  119|      0|  }
  120|  11.0k|  _error = implementation->parse(realloc_if_needed ? reinterpret_cast<const uint8_t*>(loaded_bytes.get()): buf, len, provided_doc);
  ------------------
  |  Branch (120:34): [True: 0, False: 11.0k]
  ------------------
  121|       |
  122|  11.0k|  if (_error) { return _error; }
  ------------------
  |  Branch (122:7): [True: 4.31k, False: 6.75k]
  ------------------
  123|       |
  124|  6.75k|  return provided_doc.root();
  125|  11.0k|}
_ZN8simdjson3dom6parser15ensure_capacityERNS0_8documentEm:
  206|  11.0k|inline error_code parser::ensure_capacity(document& target_document, size_t desired_capacity) noexcept {
  207|       |  // 1. It is wasteful to allocate a document and a parser for documents spanning less than MINIMAL_DOCUMENT_CAPACITY bytes.
  208|       |  // 2. If we allow desired_capacity = 0 then it is possible to exit this function with implementation == nullptr.
  209|  11.0k|  if(desired_capacity < MINIMAL_DOCUMENT_CAPACITY) { desired_capacity = MINIMAL_DOCUMENT_CAPACITY; }
  ------------------
  |  Branch (209:6): [True: 7.61k, False: 3.45k]
  ------------------
  210|       |  // If we don't have enough capacity, (try to) automatically bump it.
  211|       |  // If the document needs allocation, do it too.
  212|       |  // Both in one if statement to minimize unlikely branching.
  213|       |  //
  214|       |  // Note: we must make sure that this function is called if capacity() == 0. We do so because we
  215|       |  // ensure that desired_capacity > 0.
  216|  11.0k|  if (simdjson_unlikely(capacity() < desired_capacity || target_document.capacity() < desired_capacity)) {
  ------------------
  |  |  120|  11.0k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 11.0k, False: 0]
  |  |  |  Branch (120:52): [True: 11.0k, False: 0]
  |  |  |  Branch (120:52): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  217|  11.0k|    if (desired_capacity > max_capacity()) {
  ------------------
  |  Branch (217:9): [True: 0, False: 11.0k]
  ------------------
  218|      0|      return error = CAPACITY;
  219|      0|    }
  220|  11.0k|    error_code err1 = target_document.capacity() < desired_capacity ? target_document.allocate(desired_capacity) : SUCCESS;
  ------------------
  |  Branch (220:23): [True: 11.0k, False: 0]
  ------------------
  221|  11.0k|    error_code err2 = capacity() < desired_capacity ? allocate(desired_capacity, max_depth()) : SUCCESS;
  ------------------
  |  Branch (221:23): [True: 11.0k, False: 0]
  ------------------
  222|  11.0k|    if(err1 != SUCCESS) { return error = err1; }
  ------------------
  |  Branch (222:8): [True: 0, False: 11.0k]
  ------------------
  223|  11.0k|    if(err2 != SUCCESS) { return error = err2; }
  ------------------
  |  Branch (223:8): [True: 0, False: 11.0k]
  ------------------
  224|  11.0k|  }
  225|  11.0k|  return SUCCESS;
  226|  11.0k|}
_ZNK8simdjson3dom6parser8capacityEv:
  169|  22.1k|simdjson_inline size_t parser::capacity() const noexcept {
  170|  22.1k|  return implementation ? implementation->capacity() : 0;
  ------------------
  |  Branch (170:10): [True: 0, False: 22.1k]
  ------------------
  171|  22.1k|}
_ZNK8simdjson3dom6parser12max_capacityEv:
  172|  11.0k|simdjson_inline size_t parser::max_capacity() const noexcept {
  173|  11.0k|  return _max_capacity;
  174|  11.0k|}
_ZN8simdjson3dom6parser8allocateEmm:
  180|  11.0k|inline error_code parser::allocate(size_t capacity, size_t max_depth) noexcept {
  181|       |  //
  182|       |  // Reallocate implementation if needed
  183|       |  //
  184|  11.0k|  error_code err;
  185|  11.0k|  if (implementation) {
  ------------------
  |  Branch (185:7): [True: 0, False: 11.0k]
  ------------------
  186|      0|    err = implementation->allocate(capacity, max_depth);
  187|  11.0k|  } else {
  188|  11.0k|    err = simdjson::get_active_implementation()->create_dom_parser_implementation(capacity, max_depth, implementation);
  189|  11.0k|  }
  190|  11.0k|  if (err) { return err; }
  ------------------
  |  Branch (190:7): [True: 0, False: 11.0k]
  ------------------
  191|  11.0k|  return SUCCESS;
  192|  11.0k|}
_ZNK8simdjson3dom6parser9max_depthEv:
  175|  11.0k|simdjson_inline size_t parser::max_depth() const noexcept {
  176|  11.0k|  return implementation ? implementation->max_depth() : DEFAULT_MAX_DEPTH;
  ------------------
  |  Branch (176:10): [True: 0, False: 11.0k]
  ------------------
  177|  11.0k|}

_ZN8simdjson3dom6parserD2Ev:
   88|  11.0k|  ~parser()=default;

_ZN8simdjson8internal20simdjson_result_baseINS_3dom7elementEEC2ENS_10error_codeE:
  107|  6.44k|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom7elementEEC2EOS3_NS_10error_codeE:
  104|  28.9k|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom7elementEEC2EOS3_:
  110|  21.7k|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom5arrayEEC2EOS3_:
  110|    492|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom5arrayEEC2EOS3_NS_10error_codeE:
  104|    885|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom5arrayEEC2ENS_10error_codeE:
  107|    393|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom6objectEEC2EOS3_:
  110|    922|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom6objectEEC2EOS3_NS_10error_codeE:
  104|  1.30k|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom6objectEEC2ENS_10error_codeE:
  107|    386|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson15simdjson_resultIPKcEC2EOS2_:
  178|      2|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseIPKcEC2EOS3_:
  110|      2|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseIPKcEC2EOS3_NS_10error_codeE:
  104|    104|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultIPKcEC2ENS_10error_codeE:
  175|    102|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseIPKcEC2ENS_10error_codeE:
  107|    102|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson15simdjson_resultImEC2EOm:
  178|    140|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseImEC2EOm:
  110|    140|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseImEC2EOmNS_10error_codeE:
  104|    660|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultImEC2ENS_10error_codeE:
  175|    520|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseImEC2ENS_10error_codeE:
  107|    520|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson15simdjson_resultINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEC2EOS5_:
  178|      4|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEEC2EOS6_:
  110|      4|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEEC2EOS6_NS_10error_codeE:
  104|    171|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEC2ENS_10error_codeE:
  175|    167|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEEC2ENS_10error_codeE:
  107|    167|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson15simdjson_resultIlEC2ENS_10error_codeE:
  175|    586|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseIlEC2ENS_10error_codeE:
  107|    586|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson8internal20simdjson_result_baseIlEC2EOlNS_10error_codeE:
  104|    602|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultIlEC2EOl:
  178|     16|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseIlEC2EOl:
  110|     16|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson15simdjson_resultIdEC2EOd:
  178|    130|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseIdEC2EOd:
  110|    130|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseIdEC2EOdNS_10error_codeE:
  104|    476|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultIdEC2ENS_10error_codeE:
  175|    346|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseIdEC2ENS_10error_codeE:
  107|    346|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson15simdjson_resultIbEC2EOb:
  178|      2|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseIbEC2EOb:
  110|      2|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseIbEC2EObNS_10error_codeE:
  104|    313|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultIbEC2ENS_10error_codeE:
  175|    311|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseIbEC2ENS_10error_codeE:
  107|    311|    : simdjson_result_base(T{}, error) {}
_ZNK8simdjson8internal20simdjson_result_baseINS_3dom5arrayEE5errorEv:
   62|    946|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   63|    946|  return this->second;
   64|    946|}
_ZNK8simdjson8internal20simdjson_result_baseINS_3dom6objectEE5errorEv:
   62|  1.49k|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   63|  1.49k|  return this->second;
   64|  1.49k|}
_ZNK8simdjson15simdjson_resultINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEE5errorEv:
  132|     84|simdjson_inline error_code simdjson_result<T>::error() const noexcept {
  133|     84|  return internal::simdjson_result_base<T>::error();
  134|     84|}
_ZNK8simdjson8internal20simdjson_result_baseINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEE5errorEv:
   62|    129|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   63|    129|  return this->second;
   64|    129|}
_ZNK8simdjson15simdjson_resultIlE5errorEv:
  132|    353|simdjson_inline error_code simdjson_result<T>::error() const noexcept {
  133|    353|  return internal::simdjson_result_base<T>::error();
  134|    353|}
_ZNK8simdjson8internal20simdjson_result_baseIlE5errorEv:
   62|    718|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   63|    718|  return this->second;
   64|    718|}
_ZNK8simdjson15simdjson_resultImE5errorEv:
  132|    338|simdjson_inline error_code simdjson_result<T>::error() const noexcept {
  133|    338|  return internal::simdjson_result_base<T>::error();
  134|    338|}
_ZNK8simdjson8internal20simdjson_result_baseImE5errorEv:
   62|    702|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   63|    702|  return this->second;
   64|    702|}
_ZNK8simdjson15simdjson_resultIdE5errorEv:
  132|    257|simdjson_inline error_code simdjson_result<T>::error() const noexcept {
  133|    257|  return internal::simdjson_result_base<T>::error();
  134|    257|}
_ZNK8simdjson8internal20simdjson_result_baseIdE5errorEv:
   62|    397|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   63|    397|  return this->second;
   64|    397|}
_ZNK8simdjson15simdjson_resultIbE5errorEv:
  132|    169|simdjson_inline error_code simdjson_result<T>::error() const noexcept {
  133|    169|  return internal::simdjson_result_base<T>::error();
  134|    169|}
_ZNK8simdjson8internal20simdjson_result_baseIbE5errorEv:
   62|    313|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   63|    313|  return this->second;
   64|    313|}
_ZNK8simdjson15simdjson_resultIPKcE5errorEv:
  132|      5|simdjson_inline error_code simdjson_result<T>::error() const noexcept {
  133|      5|  return internal::simdjson_result_base<T>::error();
  134|      5|}
_ZNK8simdjson8internal20simdjson_result_baseIPKcE5errorEv:
   62|     44|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   63|     44|  return this->second;
   64|     44|}
_ZNO8simdjson15simdjson_resultIbE3getERb:
  127|     21|simdjson_warn_unused simdjson_inline error_code simdjson_result<T>::get(T &value) && noexcept {
  128|     21|  return std::forward<internal::simdjson_result_base<T>>(*this).get(value);
  129|     21|}
_ZNO8simdjson8internal20simdjson_result_baseIbE3getERb:
   55|     21|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   56|     21|  error_code error;
   57|     21|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   58|     21|  return error;
   59|     21|}
_ZNO8simdjson8internal20simdjson_result_baseIbE3tieERbRNS_10error_codeE:
   47|     21|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   48|     21|  error = this->second;
   49|     21|  if (!error) {
  ------------------
  |  Branch (49:7): [True: 0, False: 21]
  ------------------
   50|      0|    value = std::forward<simdjson_result_base<T>>(*this).first;
   51|      0|  }
   52|     21|}
_ZNO8simdjson15simdjson_resultIdE3getERd:
  127|      4|simdjson_warn_unused simdjson_inline error_code simdjson_result<T>::get(T &value) && noexcept {
  128|      4|  return std::forward<internal::simdjson_result_base<T>>(*this).get(value);
  129|      4|}
_ZNO8simdjson8internal20simdjson_result_baseIdE3getERd:
   55|      4|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   56|      4|  error_code error;
   57|      4|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   58|      4|  return error;
   59|      4|}
_ZNO8simdjson8internal20simdjson_result_baseIdE3tieERdRNS_10error_codeE:
   47|      4|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   48|      4|  error = this->second;
   49|      4|  if (!error) {
  ------------------
  |  Branch (49:7): [True: 0, False: 4]
  ------------------
   50|      0|    value = std::forward<simdjson_result_base<T>>(*this).first;
   51|      0|  }
   52|      4|}
_ZNO8simdjson15simdjson_resultImE3getERm:
  127|      8|simdjson_warn_unused simdjson_inline error_code simdjson_result<T>::get(T &value) && noexcept {
  128|      8|  return std::forward<internal::simdjson_result_base<T>>(*this).get(value);
  129|      8|}
_ZNO8simdjson8internal20simdjson_result_baseImE3getERm:
   55|      8|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   56|      8|  error_code error;
   57|      8|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   58|      8|  return error;
   59|      8|}
_ZNO8simdjson8internal20simdjson_result_baseImE3tieERmRNS_10error_codeE:
   47|      8|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   48|      8|  error = this->second;
   49|      8|  if (!error) {
  ------------------
  |  Branch (49:7): [True: 0, False: 8]
  ------------------
   50|      0|    value = std::forward<simdjson_result_base<T>>(*this).first;
   51|      0|  }
   52|      8|}
_ZNO8simdjson15simdjson_resultIlE3getERl:
  127|      5|simdjson_warn_unused simdjson_inline error_code simdjson_result<T>::get(T &value) && noexcept {
  128|      5|  return std::forward<internal::simdjson_result_base<T>>(*this).get(value);
  129|      5|}
_ZNO8simdjson8internal20simdjson_result_baseIlE3getERl:
   55|      5|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   56|      5|  error_code error;
   57|      5|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   58|      5|  return error;
   59|      5|}
_ZNO8simdjson8internal20simdjson_result_baseIlE3tieERlRNS_10error_codeE:
   47|      5|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   48|      5|  error = this->second;
   49|      5|  if (!error) {
  ------------------
  |  Branch (49:7): [True: 0, False: 5]
  ------------------
   50|      0|    value = std::forward<simdjson_result_base<T>>(*this).first;
   51|      0|  }
   52|      5|}
_ZNO8simdjson15simdjson_resultINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEE3getERS5_:
  127|     11|simdjson_warn_unused simdjson_inline error_code simdjson_result<T>::get(T &value) && noexcept {
  128|     11|  return std::forward<internal::simdjson_result_base<T>>(*this).get(value);
  129|     11|}
_ZNO8simdjson8internal20simdjson_result_baseINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEE3getERS6_:
   55|     11|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   56|     11|  error_code error;
   57|     11|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   58|     11|  return error;
   59|     11|}
_ZNO8simdjson8internal20simdjson_result_baseINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEE3tieERS6_RNS_10error_codeE:
   47|     11|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   48|     11|  error = this->second;
   49|     11|  if (!error) {
  ------------------
  |  Branch (49:7): [True: 0, False: 11]
  ------------------
   50|      0|    value = std::forward<simdjson_result_base<T>>(*this).first;
   51|      0|  }
   52|     11|}
_ZNO8simdjson15simdjson_resultIPKcE3getERS2_:
  127|     13|simdjson_warn_unused simdjson_inline error_code simdjson_result<T>::get(T &value) && noexcept {
  128|     13|  return std::forward<internal::simdjson_result_base<T>>(*this).get(value);
  129|     13|}
_ZNO8simdjson8internal20simdjson_result_baseIPKcE3getERS3_:
   55|     13|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   56|     13|  error_code error;
   57|     13|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   58|     13|  return error;
   59|     13|}
_ZNO8simdjson8internal20simdjson_result_baseIPKcE3tieERS3_RNS_10error_codeE:
   47|     13|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   48|     13|  error = this->second;
   49|     13|  if (!error) {
  ------------------
  |  Branch (49:7): [True: 0, False: 13]
  ------------------
   50|      0|    value = std::forward<simdjson_result_base<T>>(*this).first;
   51|      0|  }
   52|     13|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom5arrayEE3getERS3_:
   55|      3|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   56|      3|  error_code error;
   57|      3|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   58|      3|  return error;
   59|      3|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom5arrayEE3tieERS3_RNS_10error_codeE:
   47|      3|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   48|      3|  error = this->second;
   49|      3|  if (!error) {
  ------------------
  |  Branch (49:7): [True: 0, False: 3]
  ------------------
   50|      0|    value = std::forward<simdjson_result_base<T>>(*this).first;
   51|      0|  }
   52|      3|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom6objectEE3getERS3_:
   55|      4|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   56|      4|  error_code error;
   57|      4|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   58|      4|  return error;
   59|      4|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom6objectEE3tieERS3_RNS_10error_codeE:
   47|      4|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   48|      4|  error = this->second;
   49|      4|  if (!error) {
  ------------------
  |  Branch (49:7): [True: 2, False: 2]
  ------------------
   50|      2|    value = std::forward<simdjson_result_base<T>>(*this).first;
   51|      2|  }
   52|      4|}
_ZNO8simdjson15simdjson_resultIbEcvObEv:
  154|     73|simdjson_inline simdjson_result<T>::operator T&&() && noexcept(false) {
  155|     73|  return std::forward<internal::simdjson_result_base<T>>(*this).take_value();
  156|     73|}
_ZNO8simdjson8internal20simdjson_result_baseIbE10take_valueEv:
   80|     73|simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
   81|     73|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (81:7): [True: 71, False: 2]
  ------------------
   82|      2|  return std::forward<T>(this->first);
   83|     73|}
_ZNO8simdjson15simdjson_resultIdEcvOdEv:
  154|     81|simdjson_inline simdjson_result<T>::operator T&&() && noexcept(false) {
  155|     81|  return std::forward<internal::simdjson_result_base<T>>(*this).take_value();
  156|     81|}
_ZNO8simdjson8internal20simdjson_result_baseIdE10take_valueEv:
   80|     81|simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
   81|     81|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (81:7): [True: 59, False: 22]
  ------------------
   82|     22|  return std::forward<T>(this->first);
   83|     81|}
_ZNO8simdjson15simdjson_resultImEcvOmEv:
  154|    201|simdjson_inline simdjson_result<T>::operator T&&() && noexcept(false) {
  155|    201|  return std::forward<internal::simdjson_result_base<T>>(*this).take_value();
  156|    201|}
_ZNO8simdjson8internal20simdjson_result_baseImE10take_valueEv:
   80|    201|simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
   81|    201|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (81:7): [True: 163, False: 38]
  ------------------
   82|     38|  return std::forward<T>(this->first);
   83|    201|}
_ZNO8simdjson15simdjson_resultIlEcvOlEv:
  154|    185|simdjson_inline simdjson_result<T>::operator T&&() && noexcept(false) {
  155|    185|  return std::forward<internal::simdjson_result_base<T>>(*this).take_value();
  156|    185|}
_ZNO8simdjson8internal20simdjson_result_baseIlE10take_valueEv:
   80|    185|simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
   81|    185|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (81:7): [True: 180, False: 5]
  ------------------
   82|      5|  return std::forward<T>(this->first);
   83|    185|}
_ZNO8simdjson15simdjson_resultINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEcvOS5_Ev:
  154|     23|simdjson_inline simdjson_result<T>::operator T&&() && noexcept(false) {
  155|     23|  return std::forward<internal::simdjson_result_base<T>>(*this).take_value();
  156|     23|}
_ZNO8simdjson8internal20simdjson_result_baseINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEE10take_valueEv:
   80|     23|simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
   81|     23|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (81:7): [True: 22, False: 1]
  ------------------
   82|      1|  return std::forward<T>(this->first);
   83|     23|}
_ZNO8simdjson15simdjson_resultIPKcEcvOS2_Ev:
  154|     20|simdjson_inline simdjson_result<T>::operator T&&() && noexcept(false) {
  155|     20|  return std::forward<internal::simdjson_result_base<T>>(*this).take_value();
  156|     20|}
_ZNO8simdjson8internal20simdjson_result_baseIPKcE10take_valueEv:
   80|     20|simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
   81|     20|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (81:7): [True: 19, False: 1]
  ------------------
   82|      1|  return std::forward<T>(this->first);
   83|     20|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom5arrayEEcvOS3_Ev:
   86|     24|simdjson_inline simdjson_result_base<T>::operator T&&() && noexcept(false) {
   87|     24|  return std::forward<simdjson_result_base<T>>(*this).take_value();
   88|     24|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom5arrayEE10take_valueEv:
   80|     24|simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
   81|     24|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (81:7): [True: 20, False: 4]
  ------------------
   82|      4|  return std::forward<T>(this->first);
   83|     24|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom6objectEEcvOS3_Ev:
   86|     31|simdjson_inline simdjson_result_base<T>::operator T&&() && noexcept(false) {
   87|     31|  return std::forward<simdjson_result_base<T>>(*this).take_value();
   88|     31|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom6objectEE10take_valueEv:
   80|     31|simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
   81|     31|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (81:7): [True: 26, False: 5]
  ------------------
   82|      5|  return std::forward<T>(this->first);
   83|     31|}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom7elementEEC2Ev:
  113|    761|    : simdjson_result_base(T{}, UNINITIALIZED) {}
_ZNK8simdjson8internal20simdjson_result_baseINS_3dom7elementEE5errorEv:
   62|  45.0k|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   63|  45.0k|  return this->second;
   64|  45.0k|}

_ZN8simdjson14simdjson_errorC2ENS_10error_codeE:
   77|    682|  simdjson_error(error_code error) noexcept : _error{error} { }

_ZN8simdjson8fallback14implementationC2Ev:
   23|      1|  ) {}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_111atomparsing18is_valid_true_atomEPKhm:
   32|     67|simdjson_inline bool is_valid_true_atom(const uint8_t *src, size_t len) {
   33|     67|  if (len > 4) { return is_valid_true_atom(src); }
  ------------------
  |  Branch (33:7): [True: 20, False: 47]
  ------------------
   34|     47|  else if (len == 4) { return !str4ncmp(src, "true"); }
  ------------------
  |  Branch (34:12): [True: 44, False: 3]
  ------------------
   35|      3|  else { return false; }
   36|     67|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_111atomparsing18is_valid_true_atomEPKh:
   27|    497|simdjson_inline bool is_valid_true_atom(const uint8_t *src) {
   28|    497|  return (str4ncmp(src, "true") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0;
   29|    497|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_111atomparsing8str4ncmpEPKhPKc:
   19|  1.67k|simdjson_inline uint32_t str4ncmp(const uint8_t *src, const char* atom) {
   20|  1.67k|  uint32_t srcval; // we want to avoid unaligned 32-bit loads (undefined in C/C++)
   21|  1.67k|  static_assert(sizeof(uint32_t) <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be larger than 4 bytes");
   22|  1.67k|  std::memcpy(&srcval, src, sizeof(uint32_t));
   23|  1.67k|  return srcval ^ string_to_uint32(atom);
   24|  1.67k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_111atomparsing16string_to_uint32EPKc:
   13|  1.67k|simdjson_inline uint32_t string_to_uint32(const char* str) { uint32_t val; std::memcpy(&val, str, sizeof(uint32_t)); return val; }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_111atomparsing19is_valid_false_atomEPKhm:
   44|    105|simdjson_inline bool is_valid_false_atom(const uint8_t *src, size_t len) {
   45|    105|  if (len > 5) { return is_valid_false_atom(src); }
  ------------------
  |  Branch (45:7): [True: 46, False: 59]
  ------------------
   46|     59|  else if (len == 5) { return !str4ncmp(src+1, "alse"); }
  ------------------
  |  Branch (46:12): [True: 56, False: 3]
  ------------------
   47|      3|  else { return false; }
   48|    105|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_111atomparsing19is_valid_false_atomEPKh:
   39|    523|simdjson_inline bool is_valid_false_atom(const uint8_t *src) {
   40|    523|  return (str4ncmp(src+1, "alse") | jsoncharutils::is_not_structural_or_whitespace(src[5])) == 0;
   41|    523|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_111atomparsing18is_valid_null_atomEPKhm:
   56|     65|simdjson_inline bool is_valid_null_atom(const uint8_t *src, size_t len) {
   57|     65|  if (len > 4) { return is_valid_null_atom(src); }
  ------------------
  |  Branch (57:7): [True: 15, False: 50]
  ------------------
   58|     50|  else if (len == 4) { return !str4ncmp(src, "null"); }
  ------------------
  |  Branch (58:12): [True: 47, False: 3]
  ------------------
   59|      3|  else { return false; }
   60|     65|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_111atomparsing18is_valid_null_atomEPKh:
   51|    508|simdjson_inline bool is_valid_null_atom(const uint8_t *src) {
   52|    508|  return (str4ncmp(src, "null") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0;
   53|    508|}

_ZN8simdjson7haswell25dom_parser_implementation12set_capacityEm:
   58|  11.0k|inline simdjson_warn_unused error_code dom_parser_implementation::set_capacity(size_t capacity) noexcept {
   59|  11.0k|  if(capacity > SIMDJSON_MAXSIZE_BYTES) { return CAPACITY; }
  ------------------
  |  Branch (59:6): [True: 0, False: 11.0k]
  ------------------
   60|       |  // Stage 1 index output
   61|  11.0k|  size_t max_structures = SIMDJSON_ROUNDUP_N(capacity, 64) + 2 + 7;
  ------------------
  |  |   68|  11.0k|#define SIMDJSON_ROUNDUP_N(a, n) (((a) + ((n)-1)) & ~((n)-1))
  ------------------
   62|  11.0k|  structural_indexes.reset( new (std::nothrow) uint32_t[max_structures] );
   63|  11.0k|  if (!structural_indexes) { _capacity = 0; return MEMALLOC; }
  ------------------
  |  Branch (63:7): [True: 0, False: 11.0k]
  ------------------
   64|  11.0k|  structural_indexes[0] = 0;
   65|  11.0k|  n_structural_indexes = 0;
   66|       |
   67|  11.0k|  _capacity = capacity;
   68|  11.0k|  return SUCCESS;
   69|  11.0k|}
_ZN8simdjson7haswell25dom_parser_implementation13set_max_depthEm:
   71|  11.0k|inline simdjson_warn_unused error_code dom_parser_implementation::set_max_depth(size_t max_depth) noexcept {
   72|       |  // Stage 2 stacks
   73|  11.0k|  open_containers.reset(new (std::nothrow) open_container[max_depth]);
   74|  11.0k|  is_array.reset(new (std::nothrow) bool[max_depth]);
   75|  11.0k|  if (!is_array || !open_containers) { _max_depth = 0; return MEMALLOC; }
  ------------------
  |  Branch (75:7): [True: 0, False: 11.0k]
  |  Branch (75:20): [True: 0, False: 11.0k]
  ------------------
   76|       |
   77|  11.0k|  _max_depth = max_depth;
   78|  11.0k|  return SUCCESS;
   79|  11.0k|}
_ZN8simdjson7haswell25dom_parser_implementationC2Ev:
   53|  11.0k|inline dom_parser_implementation::dom_parser_implementation() noexcept = default;

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113jsoncharutils18hex_to_u32_nocheckEPKh:
   26|  6.81k|    const uint8_t *src) { // strictly speaking, static inline is a C-ism
   27|  6.81k|  uint32_t v1 = internal::digit_to_val32[630 + src[0]];
   28|  6.81k|  uint32_t v2 = internal::digit_to_val32[420 + src[1]];
   29|  6.81k|  uint32_t v3 = internal::digit_to_val32[210 + src[2]];
   30|  6.81k|  uint32_t v4 = internal::digit_to_val32[0 + src[3]];
   31|  6.81k|  return v1 | v2 | v3 | v4;
   32|  6.81k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113jsoncharutils17codepoint_to_utf8EjPh:
   46|  5.31k|simdjson_inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) {
   47|  5.31k|  if (cp <= 0x7F) {
  ------------------
  |  Branch (47:7): [True: 1.06k, False: 4.25k]
  ------------------
   48|  1.06k|    c[0] = uint8_t(cp);
   49|  1.06k|    return 1; // ascii
   50|  1.06k|  }
   51|  4.25k|  if (cp <= 0x7FF) {
  ------------------
  |  Branch (51:7): [True: 1.03k, False: 3.21k]
  ------------------
   52|  1.03k|    c[0] = uint8_t((cp >> 6) + 192);
   53|  1.03k|    c[1] = uint8_t((cp & 63) + 128);
   54|  1.03k|    return 2; // universal plane
   55|       |    //  Surrogates are treated elsewhere...
   56|       |    //} //else if (0xd800 <= cp && cp <= 0xdfff) {
   57|       |    //  return 0; // surrogates // could put assert here
   58|  3.21k|  } else if (cp <= 0xFFFF) {
  ------------------
  |  Branch (58:14): [True: 2.01k, False: 1.20k]
  ------------------
   59|  2.01k|    c[0] = uint8_t((cp >> 12) + 224);
   60|  2.01k|    c[1] = uint8_t(((cp >> 6) & 63) + 128);
   61|  2.01k|    c[2] = uint8_t((cp & 63) + 128);
   62|  2.01k|    return 3;
   63|  2.01k|  } else if (cp <= 0x10FFFF) { // if you know you have a valid code point, this
  ------------------
  |  Branch (63:14): [True: 1.15k, False: 52]
  ------------------
   64|       |                               // is not needed
   65|  1.15k|    c[0] = uint8_t((cp >> 18) + 240);
   66|  1.15k|    c[1] = uint8_t(((cp >> 12) & 63) + 128);
   67|  1.15k|    c[2] = uint8_t(((cp >> 6) & 63) + 128);
   68|  1.15k|    c[3] = uint8_t((cp & 63) + 128);
   69|  1.15k|    return 4;
   70|  1.15k|  }
   71|       |  // will return 0 when the code point was too large.
   72|     52|  return 0; // bad r
   73|  4.25k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113jsoncharutils31is_not_structural_or_whitespaceEh:
   11|  14.2M|simdjson_inline uint32_t is_not_structural_or_whitespace(uint8_t c) {
   12|  14.2M|  return internal::structural_or_whitespace_negated[c];
   13|  14.2M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113jsoncharutils19full_multiplicationEmm:
   95|  11.4k|simdjson_inline value128 full_multiplication(uint64_t value1, uint64_t value2) {
   96|  11.4k|  value128 answer;
   97|       |#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
   98|       |#ifdef _M_ARM64
   99|       |  // ARM64 has native support for 64-bit multiplications, no need to emultate
  100|       |  answer.high = __umulh(value1, value2);
  101|       |  answer.low = value1 * value2;
  102|       |#else
  103|       |  answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64
  104|       |#endif // _M_ARM64
  105|       |#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
  106|  11.4k|  __uint128_t r = (static_cast<__uint128_t>(value1)) * value2;
  107|  11.4k|  answer.low = uint64_t(r);
  108|  11.4k|  answer.high = uint64_t(r >> 64);
  109|  11.4k|#endif
  110|  11.4k|  return answer;
  111|  11.4k|}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113numberparsing12parse_numberINS1_6stage211tape_writerEEENS_10error_codeEPKhRT_:
  547|  14.2M|simdjson_inline error_code parse_number(const uint8_t *const src, W &writer) {
  548|       |
  549|       |  //
  550|       |  // Check for minus sign
  551|       |  //
  552|  14.2M|  bool negative = (*src == '-');
  553|  14.2M|  const uint8_t *p = src + uint8_t(negative);
  554|       |
  555|       |  //
  556|       |  // Parse the integer part.
  557|       |  //
  558|       |  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
  559|  14.2M|  const uint8_t *const start_digits = p;
  560|  14.2M|  uint64_t i = 0;
  561|  51.1M|  while (parse_digit(*p, i)) { p++; }
  ------------------
  |  Branch (561:10): [True: 36.9M, False: 14.2M]
  ------------------
  562|       |
  563|       |  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
  564|       |  // Optimization note: size_t is expected to be unsigned.
  565|  14.2M|  size_t digit_count = size_t(p - start_digits);
  566|  14.2M|  if (digit_count == 0 || ('0' == *start_digits && digit_count > 1)) { return INVALID_NUMBER(src); }
  ------------------
  |  |   30|     63|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  |  Branch (566:7): [True: 17, False: 14.2M]
  |  Branch (566:28): [True: 83.8k, False: 14.1M]
  |  Branch (566:52): [True: 46, False: 83.8k]
  ------------------
  567|       |
  568|       |  //
  569|       |  // Handle floats if there is a . or e (or both)
  570|       |  //
  571|  14.2M|  int64_t exponent = 0;
  572|  14.2M|  bool is_float = false;
  573|  14.2M|  if ('.' == *p) {
  ------------------
  |  Branch (573:7): [True: 35.9k, False: 14.2M]
  ------------------
  574|  35.9k|    is_float = true;
  575|  35.9k|    ++p;
  576|  35.9k|    SIMDJSON_TRY( parse_decimal(src, p, i, exponent) );
  ------------------
  |  |  279|  35.9k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 152, False: 35.7k]
  |  |  ------------------
  ------------------
  577|  35.7k|    digit_count = int(p - start_digits); // used later to guard against overflows
  578|  35.7k|  }
  579|  14.2M|  if (('e' == *p) || ('E' == *p)) {
  ------------------
  |  Branch (579:7): [True: 9.44k, False: 14.2M]
  |  Branch (579:22): [True: 3.72k, False: 14.2M]
  ------------------
  580|  13.1k|    is_float = true;
  581|  13.1k|    ++p;
  582|  13.1k|    SIMDJSON_TRY( parse_exponent(src, p, exponent) );
  ------------------
  |  |  279|  13.1k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 101, False: 13.0k]
  |  |  ------------------
  ------------------
  583|  13.0k|  }
  584|  14.2M|  if (is_float) {
  ------------------
  |  Branch (584:7): [True: 48.0k, False: 14.2M]
  ------------------
  585|  48.0k|    const bool dirty_end = jsoncharutils::is_not_structural_or_whitespace(*p);
  586|  48.0k|    SIMDJSON_TRY( write_float(src, negative, i, start_digits, digit_count, exponent, writer) );
  ------------------
  |  |  279|  48.0k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 659, False: 47.3k]
  |  |  ------------------
  ------------------
  587|  47.3k|    if (dirty_end) { return INVALID_NUMBER(src); }
  ------------------
  |  |   30|    181|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  |  Branch (587:9): [True: 181, False: 47.1k]
  ------------------
  588|  47.1k|    return SUCCESS;
  589|  47.3k|  }
  590|       |
  591|       |  // The longest negative 64-bit number is 19 digits.
  592|       |  // The longest positive 64-bit number is 20 digits.
  593|       |  // We do it this way so we don't trigger this branch unless we must.
  594|  14.2M|  size_t longest_digit_count = negative ? 19 : 20;
  ------------------
  |  Branch (594:32): [True: 2.41k, False: 14.1M]
  ------------------
  595|  14.2M|  if (digit_count > longest_digit_count) { return INVALID_NUMBER(src); }
  ------------------
  |  |   30|    110|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  |  Branch (595:7): [True: 110, False: 14.2M]
  ------------------
  596|  14.2M|  if (digit_count == longest_digit_count) {
  ------------------
  |  Branch (596:7): [True: 1.48k, False: 14.1M]
  ------------------
  597|  1.48k|    if (negative) {
  ------------------
  |  Branch (597:9): [True: 685, False: 795]
  ------------------
  598|       |      // Anything negative above INT64_MAX+1 is invalid
  599|    685|      if (i > uint64_t(INT64_MAX)+1) { return INVALID_NUMBER(src);  }
  ------------------
  |  |   30|     53|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  |  Branch (599:11): [True: 53, False: 632]
  ------------------
  600|    632|      WRITE_INTEGER(~i+1, src, writer);
  ------------------
  |  |   31|    632|#define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE))
  ------------------
  601|    632|      if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); }
  ------------------
  |  |   30|      3|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  |  Branch (601:11): [True: 3, False: 629]
  ------------------
  602|    629|      return SUCCESS;
  603|       |    // Positive overflow check:
  604|       |    // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the
  605|       |    //   biggest uint64_t.
  606|       |    // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX.
  607|       |    //   If we got here, it's a 20 digit number starting with the digit "1".
  608|       |    // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller
  609|       |    //   than 1,553,255,926,290,448,384.
  610|       |    // - That is smaller than the smallest possible 20-digit number the user could write:
  611|       |    //   10,000,000,000,000,000,000.
  612|       |    // - Therefore, if the number is positive and lower than that, it's overflow.
  613|       |    // - The value we are looking at is less than or equal to INT64_MAX.
  614|       |    //
  615|    795|    }  else if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INVALID_NUMBER(src); }
  ------------------
  |  |   30|     62|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  |  Branch (615:17): [True: 7, False: 788]
  |  Branch (615:43): [True: 55, False: 733]
  ------------------
  616|  1.48k|  }
  617|       |
  618|       |  // Write unsigned if it doesn't fit in a signed integer.
  619|  14.2M|  if (i > uint64_t(INT64_MAX)) {
  ------------------
  |  Branch (619:7): [True: 2.44k, False: 14.1M]
  ------------------
  620|  2.44k|    WRITE_UNSIGNED(i, src, writer);
  ------------------
  |  |   32|  2.44k|#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (WRITER).append_u64((VALUE))
  ------------------
  621|  14.1M|  } else {
  622|  14.1M|    WRITE_INTEGER(negative ? (~i+1) : i, src, writer);
  ------------------
  |  |   31|  28.3M|#define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE))
  |  |  ------------------
  |  |  |  Branch (31:64): [True: 1.70k, False: 14.1M]
  |  |  ------------------
  ------------------
  623|  14.1M|  }
  624|  14.2M|  if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); }
  ------------------
  |  |   30|     55|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  |  Branch (624:7): [True: 55, False: 14.2M]
  ------------------
  625|  14.2M|  return SUCCESS;
  626|  14.2M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113numberparsing11parse_digitImEEbhRT_:
  365|  57.3M|simdjson_inline bool parse_digit(const uint8_t c, I &i) {
  366|  57.3M|  const uint8_t digit = static_cast<uint8_t>(c - '0');
  367|  57.3M|  if (digit > 9) {
  ------------------
  |  Branch (367:7): [True: 14.2M, False: 43.1M]
  ------------------
  368|  14.2M|    return false;
  369|  14.2M|  }
  370|       |  // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication
  371|  43.1M|  i = 10 * i + digit; // might overflow, we will handle the overflow later
  372|  43.1M|  return true;
  373|  57.3M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113numberparsing13parse_decimalEPKhRS4_RmRl:
  375|  35.9k|simdjson_inline error_code parse_decimal(simdjson_unused const uint8_t *const src, const uint8_t *&p, uint64_t &i, int64_t &exponent) {
  376|       |  // we continue with the fiction that we have an integer. If the
  377|       |  // floating point number is representable as x * 10^z for some integer
  378|       |  // z that fits in 53 bits, then we will be able to convert back the
  379|       |  // the integer into a float in a lossless manner.
  380|  35.9k|  const uint8_t *const first_after_period = p;
  381|       |
  382|  35.9k|#ifdef SIMDJSON_SWAR_NUMBER_PARSING
  383|  35.9k|#if SIMDJSON_SWAR_NUMBER_PARSING
  384|       |  // this helps if we have lots of decimals!
  385|       |  // this turns out to be frequent enough.
  386|  35.9k|  if (is_made_of_eight_digits_fast(p)) {
  ------------------
  |  Branch (386:7): [True: 11.4k, False: 24.4k]
  ------------------
  387|  11.4k|    i = i * 100000000 + parse_eight_digits_unrolled(p);
  388|  11.4k|    p += 8;
  389|  11.4k|  }
  390|  35.9k|#endif // SIMDJSON_SWAR_NUMBER_PARSING
  391|  35.9k|#endif // #ifdef SIMDJSON_SWAR_NUMBER_PARSING
  392|       |  // Unrolling the first digit makes a small difference on some implementations (e.g. westmere)
  393|  35.9k|  if (parse_digit(*p, i)) { ++p; }
  ------------------
  |  Branch (393:7): [True: 35.1k, False: 848]
  ------------------
  394|  6.15M|  while (parse_digit(*p, i)) { p++; }
  ------------------
  |  Branch (394:10): [True: 6.12M, False: 35.9k]
  ------------------
  395|  35.9k|  exponent = first_after_period - p;
  396|       |  // Decimal without digits (123.) is illegal
  397|  35.9k|  if (exponent == 0) {
  ------------------
  |  Branch (397:7): [True: 152, False: 35.7k]
  ------------------
  398|    152|    return INVALID_NUMBER(src);
  ------------------
  |  |   30|    152|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  399|    152|  }
  400|  35.7k|  return SUCCESS;
  401|  35.9k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113numberparsing28is_made_of_eight_digits_fastEPKh:
  338|  35.9k|simdjson_inline bool is_made_of_eight_digits_fast(const uint8_t *chars) {
  339|  35.9k|  uint64_t val;
  340|       |  // this can read up to 7 bytes beyond the buffer size, but we require
  341|       |  // SIMDJSON_PADDING of padding
  342|  35.9k|  static_assert(7 <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be bigger than 7");
  343|  35.9k|  std::memcpy(&val, chars, 8);
  344|       |  // a branchy method might be faster:
  345|       |  // return (( val & 0xF0F0F0F0F0F0F0F0 ) == 0x3030303030303030)
  346|       |  //  && (( (val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0 ) ==
  347|       |  //  0x3030303030303030);
  348|  35.9k|  return (((val & 0xF0F0F0F0F0F0F0F0) |
  349|  35.9k|           (((val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0) >> 4)) ==
  350|  35.9k|          0x3333333333333333);
  351|  35.9k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113numberparsing14parse_exponentEPKhRS4_Rl:
  403|  13.1k|simdjson_inline error_code parse_exponent(simdjson_unused const uint8_t *const src, const uint8_t *&p, int64_t &exponent) {
  404|       |  // Exp Sign: -123.456e[-]78
  405|  13.1k|  bool neg_exp = ('-' == *p);
  406|  13.1k|  if (neg_exp || '+' == *p) { p++; } // Skip + as well
  ------------------
  |  Branch (406:7): [True: 4.18k, False: 8.98k]
  |  Branch (406:18): [True: 586, False: 8.39k]
  ------------------
  407|       |
  408|       |  // Exponent: -123.456e-[78]
  409|  13.1k|  auto start_exp = p;
  410|  13.1k|  int64_t exp_number = 0;
  411|  4.51M|  while (parse_digit(*p, exp_number)) { ++p; }
  ------------------
  |  Branch (411:10): [True: 4.50M, False: 13.1k]
  ------------------
  412|       |  // It is possible for parse_digit to overflow.
  413|       |  // In particular, it could overflow to INT64_MIN, and we cannot do - INT64_MIN.
  414|       |  // Thus we *must* check for possible overflow before we negate exp_number.
  415|       |
  416|       |  // Performance notes: it may seem like combining the two "simdjson_unlikely checks" below into
  417|       |  // a single simdjson_unlikely path would be faster. The reasoning is sound, but the compiler may
  418|       |  // not oblige and may, in fact, generate two distinct paths in any case. It might be
  419|       |  // possible to do uint64_t(p - start_exp - 1) >= 18 but it could end up trading off
  420|       |  // instructions for a simdjson_likely branch, an unconclusive gain.
  421|       |
  422|       |  // If there were no digits, it's an error.
  423|  13.1k|  if (simdjson_unlikely(p == start_exp)) {
  ------------------
  |  |  120|  13.1k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 101, False: 13.0k]
  |  |  ------------------
  ------------------
  424|    101|    return INVALID_NUMBER(src);
  ------------------
  |  |   30|    101|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  425|    101|  }
  426|       |  // We have a valid positive exponent in exp_number at this point, except that
  427|       |  // it may have overflowed.
  428|       |
  429|       |  // If there were more than 18 digits, we may have overflowed the integer. We have to do
  430|       |  // something!!!!
  431|  13.0k|  if (simdjson_unlikely(p > start_exp+18)) {
  ------------------
  |  |  120|  13.0k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 913, False: 12.1k]
  |  |  ------------------
  ------------------
  432|       |    // Skip leading zeroes: 1e000000000000000000001 is technically valid and doesn't overflow
  433|  1.20M|    while (*start_exp == '0') { start_exp++; }
  ------------------
  |  Branch (433:12): [True: 1.20M, False: 913]
  ------------------
  434|       |    // 19 digits could overflow int64_t and is kind of absurd anyway. We don't
  435|       |    // support exponents smaller than -999,999,999,999,999,999 and bigger
  436|       |    // than 999,999,999,999,999,999.
  437|       |    // We can truncate.
  438|       |    // Note that 999999999999999999 is assuredly too large. The maximal ieee64 value before
  439|       |    // infinity is ~1.8e308. The smallest subnormal is ~5e-324. So, actually, we could
  440|       |    // truncate at 324.
  441|       |    // Note that there is no reason to fail per se at this point in time.
  442|       |    // E.g., 0e999999999999999999999 is a fine number.
  443|    913|    if (p > start_exp+18) { exp_number = 999999999999999999; }
  ------------------
  |  Branch (443:9): [True: 444, False: 469]
  ------------------
  444|    913|  }
  445|       |  // At this point, we know that exp_number is a sane, positive, signed integer.
  446|       |  // It is <= 999,999,999,999,999,999. As long as 'exponent' is in
  447|       |  // [-8223372036854775808, 8223372036854775808], we won't overflow. Because 'exponent'
  448|       |  // is bounded in magnitude by the size of the JSON input, we are fine in this universe.
  449|       |  // To sum it up: the next line should never overflow.
  450|  13.0k|  exponent += (neg_exp ? -exp_number : exp_number);
  ------------------
  |  Branch (450:16): [True: 4.17k, False: 8.89k]
  ------------------
  451|  13.0k|  return SUCCESS;
  452|  13.1k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113numberparsing11parse_digitIlEEbhRT_:
  365|  4.51M|simdjson_inline bool parse_digit(const uint8_t c, I &i) {
  366|  4.51M|  const uint8_t digit = static_cast<uint8_t>(c - '0');
  367|  4.51M|  if (digit > 9) {
  ------------------
  |  Branch (367:7): [True: 13.1k, False: 4.50M]
  ------------------
  368|  13.1k|    return false;
  369|  13.1k|  }
  370|       |  // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication
  371|  4.50M|  i = 10 * i + digit; // might overflow, we will handle the overflow later
  372|  4.50M|  return true;
  373|  4.51M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113numberparsing11write_floatINS1_6stage211tape_writerEEENS_10error_codeEPKhbmS8_mlRT_:
  464|  48.0k|simdjson_inline error_code write_float(const uint8_t *const src, bool negative, uint64_t i, const uint8_t * start_digits, size_t digit_count, int64_t exponent, W &writer) {
  465|       |  // If we frequently had to deal with long strings of digits,
  466|       |  // we could extend our code by using a 128-bit integer instead
  467|       |  // of a 64-bit integer. However, this is uncommon in practice.
  468|       |  //
  469|       |  // 9999999999999999999 < 2**64 so we can accommodate 19 digits.
  470|       |  // If we have a decimal separator, then digit_count - 1 is the number of digits, but we
  471|       |  // may not have a decimal separator!
  472|  48.0k|  if (simdjson_unlikely(digit_count > 19 && significant_digits(start_digits, digit_count) > 19)) {
  ------------------
  |  |  120|  56.0k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 7.88k, False: 40.1k]
  |  |  |  Branch (120:52): [True: 7.97k, False: 40.0k]
  |  |  |  Branch (120:52): [True: 7.88k, False: 93]
  |  |  ------------------
  ------------------
  473|       |    // Ok, chances are good that we had an overflow!
  474|       |    // this is almost never going to get called!!!
  475|       |    // we start anew, going slowly!!!
  476|       |    // This will happen in the following examples:
  477|       |    // 10000000000000000000000000000000000000000000e+308
  478|       |    // 3.1415926535897932384626433832795028841971693993751
  479|       |    //
  480|       |    // NOTE: This makes a *copy* of the writer and passes it to slow_float_parsing. This happens
  481|       |    // because slow_float_parsing is a non-inlined function. If we passed our writer reference to
  482|       |    // it, it would force it to be stored in memory, preventing the compiler from picking it apart
  483|       |    // and putting into registers. i.e. if we pass it as reference, it gets slow.
  484|       |    // This is what forces the skip_double, as well.
  485|  7.88k|    error_code error = slow_float_parsing(src, writer);
  486|  7.88k|    writer.skip_double();
  487|  7.88k|    return error;
  488|  7.88k|  }
  489|       |  // NOTE: it's weird that the simdjson_unlikely() only wraps half the if, but it seems to get slower any other
  490|       |  // way we've tried: https://github.com/simdjson/simdjson/pull/990#discussion_r448497331
  491|       |  // To future reader: we'd love if someone found a better way, or at least could explain this result!
  492|  40.1k|  if (simdjson_unlikely(exponent < simdjson::internal::smallest_power) || (exponent > simdjson::internal::largest_power)) {
  ------------------
  |  |  120|  80.3k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 852, False: 39.3k]
  |  |  ------------------
  ------------------
  |  Branch (492:75): [True: 1.25k, False: 38.0k]
  ------------------
  493|       |    //
  494|       |    // Important: smallest_power is such that it leads to a zero value.
  495|       |    // Observe that 18446744073709551615e-343 == 0, i.e. (2**64 - 1) e -343 is zero
  496|       |    // so something x 10^-343 goes to zero, but not so with  something x 10^-342.
  497|  2.10k|    static_assert(simdjson::internal::smallest_power <= -342, "smallest_power is not small enough");
  498|       |    //
  499|  2.10k|    if((exponent < simdjson::internal::smallest_power) || (i == 0)) {
  ------------------
  |  Branch (499:8): [True: 852, False: 1.25k]
  |  Branch (499:59): [True: 892, False: 360]
  ------------------
  500|       |      // E.g. Parse "-0.0e-999" into the same value as "-0.0". See https://en.wikipedia.org/wiki/Signed_zero
  501|  1.74k|      WRITE_DOUBLE(negative ? -0.0 : 0.0, src, writer);
  ------------------
  |  |   33|  3.48k|#define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE))
  |  |  ------------------
  |  |  |  Branch (33:66): [True: 2, False: 1.74k]
  |  |  ------------------
  ------------------
  502|  1.74k|      return SUCCESS;
  503|  1.74k|    } else { // (exponent > largest_power) and (i != 0)
  504|       |      // We have, for sure, an infinite value and simdjson refuses to parse infinite values.
  505|    360|      return INVALID_NUMBER(src);
  ------------------
  |  |   30|    360|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  506|    360|    }
  507|  2.10k|  }
  508|  38.0k|  double d;
  509|  38.0k|  if (!compute_float_64(exponent, i, negative, d)) {
  ------------------
  |  Branch (509:7): [True: 154, False: 37.8k]
  ------------------
  510|       |    // we are almost never going to get here.
  511|    154|    if (!parse_float_fallback(src, &d)) { return INVALID_NUMBER(src); }
  ------------------
  |  |   30|    154|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  |  Branch (511:9): [True: 154, False: 0]
  ------------------
  512|    154|  }
  513|  37.8k|  WRITE_DOUBLE(d, src, writer);
  ------------------
  |  |   33|  37.8k|#define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE))
  ------------------
  514|  37.8k|  return SUCCESS;
  515|  38.0k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113numberparsing18significant_digitsEPKhm:
  454|  7.97k|simdjson_inline size_t significant_digits(const uint8_t * start_digits, size_t digit_count) {
  455|       |  // It is possible that the integer had an overflow.
  456|       |  // We have to handle the case where we have 0.0000somenumber.
  457|  7.97k|  const uint8_t *start = start_digits;
  458|  5.18M|  while ((*start == '0') || (*start == '.')) { ++start; }
  ------------------
  |  Branch (458:10): [True: 5.17M, False: 10.6k]
  |  Branch (458:29): [True: 2.69k, False: 7.97k]
  ------------------
  459|       |  // we over-decrement by one when there is a '.'
  460|  7.97k|  return digit_count - size_t(start - start_digits);
  461|  7.97k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113numberparsing18slow_float_parsingINS1_6stage211tape_writerEEENS_10error_codeEPKhT_:
  354|  7.88k|error_code slow_float_parsing(simdjson_unused const uint8_t * src, W writer) {
  355|  7.88k|  double d;
  356|  7.88k|  if (parse_float_fallback(src, &d)) {
  ------------------
  |  Branch (356:7): [True: 7.73k, False: 145]
  ------------------
  357|  7.73k|    writer.append_double(d);
  358|  7.73k|    return SUCCESS;
  359|  7.73k|  }
  360|    145|  return INVALID_NUMBER(src);
  ------------------
  |  |   30|    145|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  361|  7.88k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113numberparsing16compute_float_64ElmbRd:
   55|  38.0k|simdjson_inline bool compute_float_64(int64_t power, uint64_t i, bool negative, double &d) {
   56|       |  // we start with a fast path
   57|       |  // It was described in
   58|       |  // Clinger WD. How to read floating point numbers accurately.
   59|       |  // ACM SIGPLAN Notices. 1990
   60|       |#ifndef FLT_EVAL_METHOD
   61|       |#error "FLT_EVAL_METHOD should be defined, please include cfloat."
   62|       |#endif
   63|       |#if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0)
   64|       |  // We cannot be certain that x/y is rounded to nearest.
   65|       |  if (0 <= power && power <= 22 && i <= 9007199254740991) {
   66|       |#else
   67|  38.0k|  if (-22 <= power && power <= 22 && i <= 9007199254740991) {
  ------------------
  |  Branch (67:7): [True: 36.2k, False: 1.75k]
  |  Branch (67:23): [True: 32.5k, False: 3.70k]
  |  Branch (67:38): [True: 27.7k, False: 4.86k]
  ------------------
   68|  27.7k|#endif
   69|       |    // convert the integer into a double. This is lossless since
   70|       |    // 0 <= i <= 2^53 - 1.
   71|  27.7k|    d = double(i);
   72|       |    //
   73|       |    // The general idea is as follows.
   74|       |    // If 0 <= s < 2^53 and if 10^0 <= p <= 10^22 then
   75|       |    // 1) Both s and p can be represented exactly as 64-bit floating-point
   76|       |    // values
   77|       |    // (binary64).
   78|       |    // 2) Because s and p can be represented exactly as floating-point values,
   79|       |    // then s * p
   80|       |    // and s / p will produce correctly rounded values.
   81|       |    //
   82|  27.7k|    if (power < 0) {
  ------------------
  |  Branch (82:9): [True: 24.5k, False: 3.19k]
  ------------------
   83|  24.5k|      d = d / simdjson::internal::power_of_ten[-power];
   84|  24.5k|    } else {
   85|  3.19k|      d = d * simdjson::internal::power_of_ten[power];
   86|  3.19k|    }
   87|  27.7k|    if (negative) {
  ------------------
  |  Branch (87:9): [True: 722, False: 27.0k]
  ------------------
   88|    722|      d = -d;
   89|    722|    }
   90|  27.7k|    return true;
   91|  27.7k|  }
   92|       |  // When 22 < power && power <  22 + 16, we could
   93|       |  // hope for another, secondary fast path.  It was
   94|       |  // described by David M. Gay in  "Correctly rounded
   95|       |  // binary-decimal and decimal-binary conversions." (1990)
   96|       |  // If you need to compute i * 10^(22 + x) for x < 16,
   97|       |  // first compute i * 10^x, if you know that result is exact
   98|       |  // (e.g., when i * 10^x < 2^53),
   99|       |  // then you can still proceed and do (i * 10^x) * 10^22.
  100|       |  // Is this worth your time?
  101|       |  // You need  22 < power *and* power <  22 + 16 *and* (i * 10^(x-22) < 2^53)
  102|       |  // for this second fast path to work.
  103|       |  // If you you have 22 < power *and* power <  22 + 16, and then you
  104|       |  // optimistically compute "i * 10^(x-22)", there is still a chance that you
  105|       |  // have wasted your time if i * 10^(x-22) >= 2^53. It makes the use cases of
  106|       |  // this optimization maybe less common than we would like. Source:
  107|       |  // http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/
  108|       |  // also used in RapidJSON: https://rapidjson.org/strtod_8h_source.html
  109|       |
  110|       |  // The fast path has now failed, so we are failing back on the slower path.
  111|       |
  112|       |  // In the slow path, we need to adjust i so that it is > 1<<63 which is always
  113|       |  // possible, except if i == 0, so we handle i == 0 separately.
  114|  10.3k|  if(i == 0) {
  ------------------
  |  Branch (114:6): [True: 439, False: 9.88k]
  ------------------
  115|    439|    d = negative ? -0.0 : 0.0;
  ------------------
  |  Branch (115:9): [True: 0, False: 439]
  ------------------
  116|    439|    return true;
  117|    439|  }
  118|       |
  119|       |
  120|       |  // The exponent is 1024 + 63 + power
  121|       |  //     + floor(log(5**power)/log(2)).
  122|       |  // The 1024 comes from the ieee64 standard.
  123|       |  // The 63 comes from the fact that we use a 64-bit word.
  124|       |  //
  125|       |  // Computing floor(log(5**power)/log(2)) could be
  126|       |  // slow. Instead we use a fast function.
  127|       |  //
  128|       |  // For power in (-400,350), we have that
  129|       |  // (((152170 + 65536) * power ) >> 16);
  130|       |  // is equal to
  131|       |  //  floor(log(5**power)/log(2)) + power when power >= 0
  132|       |  // and it is equal to
  133|       |  //  ceil(log(5**-power)/log(2)) + power when power < 0
  134|       |  //
  135|       |  // The 65536 is (1<<16) and corresponds to
  136|       |  // (65536 * power) >> 16 ---> power
  137|       |  //
  138|       |  // ((152170 * power ) >> 16) is equal to
  139|       |  // floor(log(5**power)/log(2))
  140|       |  //
  141|       |  // Note that this is not magic: 152170/(1<<16) is
  142|       |  // approximatively equal to log(5)/log(2).
  143|       |  // The 1<<16 value is a power of two; we could use a
  144|       |  // larger power of 2 if we wanted to.
  145|       |  //
  146|  9.88k|  int64_t exponent = (((152170 + 65536) * power) >> 16) + 1024 + 63;
  147|       |
  148|       |
  149|       |  // We want the most significant bit of i to be 1. Shift if needed.
  150|  9.88k|  int lz = leading_zeroes(i);
  151|  9.88k|  i <<= lz;
  152|       |
  153|       |
  154|       |  // We are going to need to do some 64-bit arithmetic to get a precise product.
  155|       |  // We use a table lookup approach.
  156|       |  // It is safe because
  157|       |  // power >= smallest_power
  158|       |  // and power <= largest_power
  159|       |  // We recover the mantissa of the power, it has a leading 1. It is always
  160|       |  // rounded down.
  161|       |  //
  162|       |  // We want the most significant 64 bits of the product. We know
  163|       |  // this will be non-zero because the most significant bit of i is
  164|       |  // 1.
  165|  9.88k|  const uint32_t index = 2 * uint32_t(power - simdjson::internal::smallest_power);
  166|       |  // Optimization: It may be that materializing the index as a variable might confuse some compilers and prevent effective complex-addressing loads. (Done for code clarity.)
  167|       |  //
  168|       |  // The full_multiplication function computes the 128-bit product of two 64-bit words
  169|       |  // with a returned value of type value128 with a "low component" corresponding to the
  170|       |  // 64-bit least significant bits of the product and with a "high component" corresponding
  171|       |  // to the 64-bit most significant bits of the product.
  172|  9.88k|  simdjson::internal::value128 firstproduct = jsoncharutils::full_multiplication(i, simdjson::internal::power_of_five_128[index]);
  173|       |  // Both i and power_of_five_128[index] have their most significant bit set to 1 which
  174|       |  // implies that the either the most or the second most significant bit of the product
  175|       |  // is 1. We pack values in this manner for efficiency reasons: it maximizes the use
  176|       |  // we make of the product. It also makes it easy to reason about the product: there
  177|       |  // is 0 or 1 leading zero in the product.
  178|       |
  179|       |  // Unless the least significant 9 bits of the high (64-bit) part of the full
  180|       |  // product are all 1s, then we know that the most significant 55 bits are
  181|       |  // exact and no further work is needed. Having 55 bits is necessary because
  182|       |  // we need 53 bits for the mantissa but we have to have one rounding bit and
  183|       |  // we can waste a bit if the most significant bit of the product is zero.
  184|  9.88k|  if((firstproduct.high & 0x1FF) == 0x1FF) {
  ------------------
  |  Branch (184:6): [True: 1.53k, False: 8.35k]
  ------------------
  185|       |    // We want to compute i * 5^q, but only care about the top 55 bits at most.
  186|       |    // Consider the scenario where q>=0. Then 5^q may not fit in 64-bits. Doing
  187|       |    // the full computation is wasteful. So we do what is called a "truncated
  188|       |    // multiplication".
  189|       |    // We take the most significant 64-bits, and we put them in
  190|       |    // power_of_five_128[index]. Usually, that's good enough to approximate i * 5^q
  191|       |    // to the desired approximation using one multiplication. Sometimes it does not suffice.
  192|       |    // Then we store the next most significant 64 bits in power_of_five_128[index + 1], and
  193|       |    // then we get a better approximation to i * 5^q. In very rare cases, even that
  194|       |    // will not suffice, though it is seemingly very hard to find such a scenario.
  195|       |    //
  196|       |    // That's for when q>=0. The logic for q<0 is somewhat similar but it is somewhat
  197|       |    // more complicated.
  198|       |    //
  199|       |    // There is an extra layer of complexity in that we need more than 55 bits of
  200|       |    // accuracy in the round-to-even scenario.
  201|       |    //
  202|       |    // The full_multiplication function computes the 128-bit product of two 64-bit words
  203|       |    // with a returned value of type value128 with a "low component" corresponding to the
  204|       |    // 64-bit least significant bits of the product and with a "high component" corresponding
  205|       |    // to the 64-bit most significant bits of the product.
  206|  1.53k|    simdjson::internal::value128 secondproduct = jsoncharutils::full_multiplication(i, simdjson::internal::power_of_five_128[index + 1]);
  207|  1.53k|    firstproduct.low += secondproduct.high;
  208|  1.53k|    if(secondproduct.high > firstproduct.low) { firstproduct.high++; }
  ------------------
  |  Branch (208:8): [True: 788, False: 746]
  ------------------
  209|       |    // At this point, we might need to add at most one to firstproduct, but this
  210|       |    // can only change the value of firstproduct.high if firstproduct.low is maximal.
  211|  1.53k|    if(simdjson_unlikely(firstproduct.low  == 0xFFFFFFFFFFFFFFFF)) {
  ------------------
  |  |  120|  1.53k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 0, False: 1.53k]
  |  |  ------------------
  ------------------
  212|       |      // This is very unlikely, but if so, we need to do much more work!
  213|      0|      return false;
  214|      0|    }
  215|  1.53k|  }
  216|  9.88k|  uint64_t lower = firstproduct.low;
  217|  9.88k|  uint64_t upper = firstproduct.high;
  218|       |  // The final mantissa should be 53 bits with a leading 1.
  219|       |  // We shift it so that it occupies 54 bits with a leading 1.
  220|       |  ///////
  221|  9.88k|  uint64_t upperbit = upper >> 63;
  222|  9.88k|  uint64_t mantissa = upper >> (upperbit + 9);
  223|  9.88k|  lz += int(1 ^ upperbit);
  224|       |
  225|       |  // Here we have mantissa < (1<<54).
  226|  9.88k|  int64_t real_exponent = exponent - lz;
  227|  9.88k|  if (simdjson_unlikely(real_exponent <= 0)) { // we have a subnormal?
  ------------------
  |  |  120|  9.88k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 1.11k, False: 8.77k]
  |  |  ------------------
  ------------------
  228|       |    // Here have that real_exponent <= 0 so -real_exponent >= 0
  229|  1.11k|    if(-real_exponent + 1 >= 64) { // if we have more than 64 bits below the minimum exponent, you have a zero for sure.
  ------------------
  |  Branch (229:8): [True: 427, False: 689]
  ------------------
  230|    427|      d = negative ? -0.0 : 0.0;
  ------------------
  |  Branch (230:11): [True: 0, False: 427]
  ------------------
  231|    427|      return true;
  232|    427|    }
  233|       |    // next line is safe because -real_exponent + 1 < 0
  234|    689|    mantissa >>= -real_exponent + 1;
  235|       |    // Thankfully, we can't have both "round-to-even" and subnormals because
  236|       |    // "round-to-even" only occurs for powers close to 0.
  237|    689|    mantissa += (mantissa & 1); // round up
  238|    689|    mantissa >>= 1;
  239|       |    // There is a weird scenario where we don't have a subnormal but just.
  240|       |    // Suppose we start with 2.2250738585072013e-308, we end up
  241|       |    // with 0x3fffffffffffff x 2^-1023-53 which is technically subnormal
  242|       |    // whereas 0x40000000000000 x 2^-1023-53  is normal. Now, we need to round
  243|       |    // up 0x3fffffffffffff x 2^-1023-53  and once we do, we are no longer
  244|       |    // subnormal, but we can only know this after rounding.
  245|       |    // So we only declare a subnormal if we are smaller than the threshold.
  246|    689|    real_exponent = (mantissa < (uint64_t(1) << 52)) ? 0 : 1;
  ------------------
  |  Branch (246:21): [True: 686, False: 3]
  ------------------
  247|    689|    d = to_double(mantissa, real_exponent, negative);
  248|    689|    return true;
  249|  1.11k|  }
  250|       |  // We have to round to even. The "to even" part
  251|       |  // is only a problem when we are right in between two floats
  252|       |  // which we guard against.
  253|       |  // If we have lots of trailing zeros, we may fall right between two
  254|       |  // floating-point values.
  255|       |  //
  256|       |  // The round-to-even cases take the form of a number 2m+1 which is in (2^53,2^54]
  257|       |  // times a power of two. That is, it is right between a number with binary significand
  258|       |  // m and another number with binary significand m+1; and it must be the case
  259|       |  // that it cannot be represented by a float itself.
  260|       |  //
  261|       |  // We must have that w * 10 ^q == (2m+1) * 2^p for some power of two 2^p.
  262|       |  // Recall that 10^q = 5^q * 2^q.
  263|       |  // When q >= 0, we must have that (2m+1) is divible by 5^q, so 5^q <= 2^54. We have that
  264|       |  //  5^23 <=  2^54 and it is the last power of five to qualify, so q <= 23.
  265|       |  // When q<0, we have  w  >=  (2m+1) x 5^{-q}.  We must have that w<2^{64} so
  266|       |  // (2m+1) x 5^{-q} < 2^{64}. We have that 2m+1>2^{53}. Hence, we must have
  267|       |  // 2^{53} x 5^{-q} < 2^{64}.
  268|       |  // Hence we have 5^{-q} < 2^{11}$ or q>= -4.
  269|       |  //
  270|       |  // We require lower <= 1 and not lower == 0 because we could not prove that
  271|       |  // that lower == 0 is implied; but we could prove that lower <= 1 is a necessary and sufficient test.
  272|  8.77k|  if (simdjson_unlikely((lower <= 1) && (power >= -4) && (power <= 23) && ((mantissa & 3) == 1))) {
  ------------------
  |  |  120|  31.3k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 953, False: 7.82k]
  |  |  |  Branch (120:52): [True: 2.25k, False: 6.51k]
  |  |  |  Branch (120:52): [True: 1.65k, False: 604]
  |  |  |  Branch (120:52): [True: 1.15k, False: 498]
  |  |  |  Branch (120:52): [True: 953, False: 204]
  |  |  ------------------
  ------------------
  273|    953|    if((mantissa  << (upperbit + 64 - 53 - 2)) ==  upper) {
  ------------------
  |  Branch (273:8): [True: 528, False: 425]
  ------------------
  274|    528|      mantissa &= ~1;             // flip it so that we do not round up
  275|    528|    }
  276|    953|  }
  277|       |
  278|  8.77k|  mantissa += mantissa & 1;
  279|  8.77k|  mantissa >>= 1;
  280|       |
  281|       |  // Here we have mantissa < (1<<53), unless there was an overflow
  282|  8.77k|  if (mantissa >= (1ULL << 53)) {
  ------------------
  |  Branch (282:7): [True: 418, False: 8.35k]
  ------------------
  283|       |    //////////
  284|       |    // This will happen when parsing values such as 7.2057594037927933e+16
  285|       |    ////////
  286|    418|    mantissa = (1ULL << 52);
  287|    418|    real_exponent++;
  288|    418|  }
  289|  8.77k|  mantissa &= ~(1ULL << 52);
  290|       |  // we have to check that real_exponent is in range, otherwise we bail out
  291|  8.77k|  if (simdjson_unlikely(real_exponent > 2046)) {
  ------------------
  |  |  120|  8.77k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 154, False: 8.61k]
  |  |  ------------------
  ------------------
  292|       |    // We have an infinite value!!! We could actually throw an error here if we could.
  293|    154|    return false;
  294|    154|  }
  295|  8.61k|  d = to_double(mantissa, real_exponent, negative);
  296|  8.61k|  return true;
  297|  8.77k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113numberparsing12_GLOBAL__N_19to_doubleEmmb:
   40|  9.30k|simdjson_inline double to_double(uint64_t mantissa, uint64_t real_exponent, bool negative) {
   41|  9.30k|    double d;
   42|  9.30k|    mantissa &= ~(1ULL << 52);
   43|  9.30k|    mantissa |= real_exponent << 52;
   44|  9.30k|    mantissa |= ((static_cast<uint64_t>(negative)) << 63);
   45|  9.30k|    std::memcpy(&d, &mantissa, sizeof(d));
   46|  9.30k|    return d;
   47|  9.30k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113numberparsing20parse_float_fallbackEPKhPd:
  306|  8.03k|static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) {
  307|  8.03k|  *outDouble = simdjson::internal::from_chars(reinterpret_cast<const char *>(ptr));
  308|       |  // We do not accept infinite values.
  309|       |
  310|       |  // Detecting finite values in a portable manner is ridiculously hard, ideally
  311|       |  // we would want to do:
  312|       |  // return !std::isfinite(*outDouble);
  313|       |  // but that mysteriously fails under legacy/old libc++ libraries, see
  314|       |  // https://github.com/simdjson/simdjson/issues/1286
  315|       |  //
  316|       |  // Therefore, fall back to this solution (the extra parens are there
  317|       |  // to handle that max may be a macro on windows).
  318|  8.03k|  return !(*outDouble > (std::numeric_limits<double>::max)() || *outDouble < std::numeric_limits<double>::lowest());
  ------------------
  |  Branch (318:12): [True: 289, False: 7.74k]
  |  Branch (318:65): [True: 10, False: 7.73k]
  ------------------
  319|  8.03k|}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_115trailing_zeroesEm:
   16|  34.3M|simdjson_inline int trailing_zeroes(uint64_t input_num) {
   17|       |#if SIMDJSON_REGULAR_VISUAL_STUDIO
   18|       |  return (int)_tzcnt_u64(input_num);
   19|       |#else // SIMDJSON_REGULAR_VISUAL_STUDIO
   20|       |  ////////
   21|       |  // You might expect the next line to be equivalent to
   22|       |  // return (int)_tzcnt_u64(input_num);
   23|       |  // but the generated code differs and might be less efficient?
   24|       |  ////////
   25|  34.3M|  return __builtin_ctzll(input_num);
   26|  34.3M|#endif // SIMDJSON_REGULAR_VISUAL_STUDIO
   27|  34.3M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_112add_overflowEmmPm:
   51|  3.20k|                                uint64_t *result) {
   52|       |#if SIMDJSON_REGULAR_VISUAL_STUDIO
   53|       |  return _addcarry_u64(0, value1, value2,
   54|       |                       reinterpret_cast<unsigned __int64 *>(result));
   55|       |#else
   56|  3.20k|  return __builtin_uaddll_overflow(value1, value2,
   57|  3.20k|                                   reinterpret_cast<unsigned long long *>(result));
   58|  3.20k|#endif
   59|  3.20k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_110count_onesEm:
   45|   578k|simdjson_inline long long int count_ones(uint64_t input_num) {
   46|   578k|  return _popcnt64(input_num);
   47|   578k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_116clear_lowest_bitEm:
   30|  34.2M|simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) {
   31|  34.2M|  return _blsr_u64(input_num);
   32|  34.2M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_114leading_zeroesEm:
   35|  9.88k|simdjson_inline int leading_zeroes(uint64_t input_num) {
   36|  9.88k|  return int(_lzcnt_u64(input_num));
   37|  9.88k|}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_110prefix_xorEm:
   13|  1.36M|simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) {
   14|       |  // There should be no such thing with a processor supporting avx2
   15|       |  // but not clmul.
   16|  1.36M|  __m128i all_ones = _mm_set1_epi8('\xFF');
   17|  1.36M|  __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0);
   18|  1.36M|  return _mm_cvtsi128_si64(result);
   19|  1.36M|}

_ZN8simdjson7haswell14implementationC2Ev:
   21|      1|  ) {}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_127parse_eight_digits_unrolledEPKh:
    8|  11.4k|static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) {
    9|       |  // this actually computes *16* values so we are being wasteful.
   10|  11.4k|  const __m128i ascii0 = _mm_set1_epi8('0');
   11|  11.4k|  const __m128i mul_1_10 =
   12|  11.4k|      _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1);
   13|  11.4k|  const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1);
   14|  11.4k|  const __m128i mul_1_10000 =
   15|  11.4k|      _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1);
   16|  11.4k|  const __m128i input = _mm_sub_epi8(
   17|  11.4k|      _mm_loadu_si128(reinterpret_cast<const __m128i *>(chars)), ascii0);
   18|  11.4k|  const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10);
   19|  11.4k|  const __m128i t2 = _mm_madd_epi16(t1, mul_1_100);
   20|  11.4k|  const __m128i t3 = _mm_packus_epi32(t2, t2);
   21|  11.4k|  const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000);
   22|  11.4k|  return _mm_cvtsi128_si32(
   23|  11.4k|      t4); // only captures the sum of the first 8 digits, drop the rest
   24|  11.4k|}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2Ev:
  226|  32.9k|    simdjson_inline simd8() : base8_numeric<uint8_t>() {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhEC2Ev:
   93|  32.9k|    simdjson_inline base8_numeric() : base8<T>() {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5base8IhNS2_5simd8IbEEEC2Ev:
   45|  32.9k|    simdjson_inline base8() : base<simd8<T>>() {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEC2Ev:
   17|  32.9k|    simdjson_inline base() : value{__m256i()} {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhEC2EPKh:
  304|  1.36M|    simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8<T>::load(ptr), simd8<T>::load(ptr+32)} {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhE4loadEPKh:
   77|  2.97M|    static simdjson_inline simd8<T> load(const T values[32]) {
   78|  2.97M|      return _mm256_loadu_si256(reinterpret_cast<const __m256i *>(values));
   79|  2.97M|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2EDv4_x:
  227|  27.8M|    simdjson_inline simd8(const __m256i _value) : base8_numeric<uint8_t>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhEC2EDv4_x:
   94|  27.8M|    simdjson_inline base8_numeric(const __m256i _value) : base8<T>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5base8IhNS2_5simd8IbEEEC2EDv4_x:
   46|  27.8M|    simdjson_inline base8(const __m256i _value) : base<simd8<T>>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEC2EDv4_x:
   20|  27.8M|    simdjson_inline base(const __m256i _value) : value(_value) {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhE9reduce_orEv:
  325|  1.36M|    simdjson_inline simd8<T> reduce_or() const {
  326|  1.36M|      return this->chunks[0] | this->chunks[1];
  327|  1.36M|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEorES5_:
   27|  5.54M|    simdjson_inline Child operator|(const Child other) const { return _mm256_or_si256(*this, other); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEcvRKDv4_xEv:
   23|  58.6M|    simdjson_inline operator const __m256i&() const { return this->value; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE8is_asciiEv:
  278|  1.36M|    simdjson_inline bool is_ascii() const { return _mm256_movemask_epi8(*this) == 0; }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEoRES5_:
   31|  1.39M|    simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast | other; return *this_cast; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5base8IhNS2_5simd8IbEEE4prevILi1EEENS4_IhEES8_:
   53|  37.7k|    simdjson_inline simd8<T> prev(const simd8<T> prev_chunk) const {
   54|  37.7k|      return _mm256_alignr_epi8(*this, _mm256_permute2x128_si256(prev_chunk, *this, 0x21), 16 - N);
   55|  37.7k|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE3shrILi4EEES4_v:
  284|  75.4k|    simdjson_inline simd8<uint8_t> shr() const { return simd8<uint8_t>(_mm256_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhE9lookup_16IhEENS2_5simd8IT_EES7_S7_S7_S7_S7_S7_S7_S7_S7_S7_S7_S7_S7_S7_S7_S7_:
  172|   113k|        L replace12, L replace13, L replace14, L replace15) const {
  173|   113k|      return lookup_16(simd8<L>::repeat_16(
  174|   113k|        replace0,  replace1,  replace2,  replace3,
  175|   113k|        replace4,  replace5,  replace6,  replace7,
  176|   113k|        replace8,  replace9,  replace10, replace11,
  177|   113k|        replace12, replace13, replace14, replace15
  178|   113k|      ));
  179|   113k|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhE9lookup_16IhEENS2_5simd8IT_EES8_:
  110|   113k|    simdjson_inline simd8<L> lookup_16(simd8<L> lookup_table) const {
  111|   113k|      return _mm256_shuffle_epi8(lookup_table, *this);
  112|   113k|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEcvRDv4_xEv:
   24|   150k|    simdjson_inline operator __m256i&() { return this->value; }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE9repeat_16Ehhhhhhhhhhhhhhhh:
  248|  2.85M|    ) {
  249|  2.85M|      return simd8<uint8_t>(
  250|  2.85M|        v0, v1, v2, v3, v4, v5, v6, v7,
  251|  2.85M|        v8, v9, v10,v11,v12,v13,v14,v15,
  252|  2.85M|        v0, v1, v2, v3, v4, v5, v6, v7,
  253|  2.85M|        v8, v9, v10,v11,v12,v13,v14,v15
  254|  2.85M|      );
  255|  2.85M|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2Ehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh:
  243|  2.85M|    )) {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEanES5_:
   28|   226k|    simdjson_inline Child operator&(const Child other) const { return _mm256_and_si256(*this, other); }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2Eh:
  229|  3.40M|    simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhE5splatEh:
   75|  7.51M|    static simdjson_inline simd8<T> splat(T _value) { return _mm256_set1_epi8(_value); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5base8IhNS2_5simd8IbEEE4prevILi2EEENS4_IhEES8_:
   53|  37.7k|    simdjson_inline simd8<T> prev(const simd8<T> prev_chunk) const {
   54|  37.7k|      return _mm256_alignr_epi8(*this, _mm256_permute2x128_si256(prev_chunk, *this, 0x21), 16 - N);
   55|  37.7k|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5base8IhNS2_5simd8IbEEE4prevILi3EEENS4_IhEES8_:
   53|  37.7k|    simdjson_inline simd8<T> prev(const simd8<T> prev_chunk) const {
   54|  37.7k|      return _mm256_alignr_epi8(*this, _mm256_permute2x128_si256(prev_chunk, *this, 0x21), 16 - N);
   55|  37.7k|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE14saturating_subES4_:
  259|  94.2k|    simdjson_inline simd8<uint8_t> saturating_sub(const simd8<uint8_t> other) const { return _mm256_subs_epu8(*this, other); }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IaEC2EDv4_x:
  186|  75.4k|    simdjson_inline simd8(const __m256i _value) : base8_numeric<int8_t>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIaEC2EDv4_x:
   94|  75.4k|    simdjson_inline base8_numeric(const __m256i _value) : base8<T>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5base8IaNS2_5simd8IbEEEC2EDv4_x:
   46|  75.4k|    simdjson_inline base8(const __m256i _value) : base<simd8<T>>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IaEEEC2EDv4_x:
   20|  75.4k|    simdjson_inline base(const __m256i _value) : value(_value) {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IaEgtES4_:
  219|  37.7k|    simdjson_inline simd8<bool> operator>(const simd8<int8_t> other) const { return _mm256_cmpgt_epi8(*this, other); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IaEEEcvRKDv4_xEv:
   23|  75.4k|    simdjson_inline operator const __m256i&() const { return this->value; }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IbEC2EDv4_x:
   64|  14.1M|    simdjson_inline simd8<bool>(const __m256i _value) : base8<bool>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5base8IbNS2_5simd8IbEEEC2EDv4_x:
   46|  14.1M|    simdjson_inline base8(const __m256i _value) : base<simd8<T>>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IbEEEC2EDv4_x:
   20|  14.1M|    simdjson_inline base(const __m256i _value) : value(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IaEC2Ea:
  188|  37.7k|    simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIaE5splatEa:
   75|  37.7k|    static simdjson_inline simd8<T> splat(T _value) { return _mm256_set1_epi8(_value); }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IbEEEcvRDv4_xEv:
   24|  37.7k|    simdjson_inline operator __m256i&() { return this->value; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEeoES5_:
   29|  37.7k|    simdjson_inline Child operator^(const Child other) const { return _mm256_xor_si256(*this, other); }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2EPKh:
  231|   238k|    simdjson_inline simd8(const uint8_t values[32]) : simd8(load(values)) {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE7gt_bitsES4_:
  265|  18.8k|    simdjson_inline simd8<uint8_t> gt_bits(const simd8<uint8_t> other) const { return this->saturating_sub(other); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE21any_bits_set_anywhereEv:
  280|  10.6k|    simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE21bits_not_set_anywhereEv:
  279|  10.6k|    simdjson_inline bool bits_not_set_anywhere() const { return _mm256_testz_si256(*this, *this); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhE5storeEPh:
   97|   219k|    simdjson_inline void store(T dst[32]) const { return _mm256_storeu_si256(reinterpret_cast<__m256i *>(dst), *this); }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simdeqENS2_5simd8IhEES4_:
   48|  14.1M|    friend simdjson_really_inline Mask operator==(const simd8<T> lhs, const simd8<T> rhs) { return _mm256_cmpeq_epi8(lhs, rhs); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IbE10to_bitmaskEv:
   68|  14.1M|    simdjson_inline int to_bitmask() const { return _mm256_movemask_epi8(*this); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IbEEEcvRKDv4_xEv:
   23|  14.1M|    simdjson_inline operator const __m256i&() const { return this->value; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhE2eqEh:
  337|  2.73M|    simdjson_inline uint64_t eq(const T m) const {
  338|  2.73M|      const simd8<T> mask = simd8<T>::splat(m);
  339|  2.73M|      return  simd8x64<bool>(
  340|  2.73M|        this->chunks[0] == mask,
  341|  2.73M|        this->chunks[1] == mask
  342|  2.73M|      ).to_bitmask();
  343|  2.73M|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IbEC2ENS2_5simd8IbEES6_:
  303|  6.84M|    simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1) : chunks{chunk0, chunk1} {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IbE10to_bitmaskEv:
  319|  6.84M|    simdjson_inline uint64_t to_bitmask() const {
  320|  6.84M|      uint64_t r_lo = uint32_t(this->chunks[0].to_bitmask());
  321|  6.84M|      uint64_t r_hi =                       this->chunks[1].to_bitmask();
  322|  6.84M|      return r_lo | (r_hi << 32);
  323|  6.84M|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhE2eqERKS4_:
  345|  2.73M|    simdjson_inline uint64_t eq(const simd8x64<uint8_t> &other) const {
  346|  2.73M|      return  simd8x64<bool>(
  347|  2.73M|        this->chunks[0] == other.chunks[0],
  348|  2.73M|        this->chunks[1] == other.chunks[1]
  349|  2.73M|      ).to_bitmask();
  350|  2.73M|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhEC2ENS2_5simd8IhEES6_:
  303|  4.10M|    simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1) : chunks{chunk0, chunk1} {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhE4lteqEh:
  352|  1.36M|    simdjson_inline uint64_t lteq(const T m) const {
  353|  1.36M|      const simd8<T> mask = simd8<T>::splat(m);
  354|  1.36M|      return  simd8x64<bool>(
  355|  1.36M|        this->chunks[0] <= mask,
  356|  1.36M|        this->chunks[1] <= mask
  357|  1.36M|      ).to_bitmask();
  358|  1.36M|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEleES4_:
  268|  2.73M|    simdjson_inline simd8<bool> operator<=(const simd8<uint8_t> other) const { return other.max_val(*this) == other; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE7max_valES4_:
  262|  2.73M|    simdjson_inline simd8<uint8_t> max_val(const simd8<uint8_t> other) const { return _mm256_max_epu8(*this, other); }

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_119backslash_and_quote13copy_and_findEPKhPh:
   29|   219k|simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) {
   30|       |  // this can read up to 15 bytes beyond the buffer size, but we require
   31|       |  // SIMDJSON_PADDING of padding
   32|   219k|  static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes");
   33|   219k|  simd8<uint8_t> v(src);
   34|       |  // store to dest unconditionally - we can overwrite the bits we don't like later
   35|   219k|  v.store(dst);
   36|   219k|  return {
   37|   219k|      static_cast<uint32_t>((v == '\\').to_bitmask()),     // bs_bits
   38|   219k|      static_cast<uint32_t>((v == '"').to_bitmask()), // quote_bits
   39|   219k|  };
   40|   219k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_119backslash_and_quote15has_quote_firstEv:
   20|   219k|  simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_119backslash_and_quote11quote_indexEv:
   22|   105k|  simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_119backslash_and_quote13has_backslashEv:
   21|   114k|  simdjson_inline bool has_backslash() { return ((quote_bits - 1) & bs_bits) != 0; }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_119backslash_and_quote15backslash_indexEv:
   23|  10.2k|  simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); }

_ZN8simdjson7icelake14implementationC2Ev:
   21|      1|  ) {}

_ZN8simdjson8internal10atomic_ptrIKNS_14implementationEEptEv:
  230|  11.0k|  T* operator->() { return ptr.load(); }
_ZNK8simdjson14implementation25required_instruction_setsEv:
   90|      2|  virtual uint32_t required_instruction_sets() const { return _required_instruction_sets; }
_ZN8simdjson14implementationC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_j:
  146|      5|  {
  147|      5|  }
_ZN8simdjson8internal29available_implementation_listC2Ev:
  176|      1|  simdjson_inline available_implementation_list() {}
_ZN8simdjson14implementationD2Ev:
  148|      5|  virtual ~implementation()=default;
_ZN8simdjson8internal10atomic_ptrIKNS_14implementationEEaSEPS3_:
  231|      1|  atomic_ptr& operator=(T *_ptr) { ptr = _ptr; return *this; }
_ZN8simdjson8internal10atomic_ptrIKNS_14implementationEEcvPS3_Ev:
  228|      1|  operator T*() { return ptr.load(); }
_ZN8simdjson8internal10atomic_ptrIKNS_14implementationEEC2EPS3_:
  222|      1|  atomic_ptr(T *_ptr) : ptr{_ptr} {}

_ZNK8simdjson8internal25dom_parser_implementation8capacityEv:
  228|  11.0k|simdjson_inline size_t dom_parser_implementation::capacity() const noexcept {
  229|  11.0k|  return _capacity;
  230|  11.0k|}
_ZNK8simdjson8internal25dom_parser_implementation9max_depthEv:
  232|  50.3k|simdjson_inline size_t dom_parser_implementation::max_depth() const noexcept {
  233|  50.3k|  return _max_depth;
  234|  50.3k|}
_ZN8simdjson12is_streamingENS_11stage1_modeE:
   27|  21.9k|inline bool is_streaming(stage1_mode mode) {
   28|       |  // performance note: it is probably faster to check that mode is different
   29|       |  // from regular than checking that it is either streaming_partial or streaming_final.
   30|  21.9k|  return (mode != stage1_mode::regular);
   31|       |  // return (mode == stage1_mode::streaming_partial || mode == stage1_mode::streaming_final);
   32|  21.9k|}
_ZN8simdjson8internal25dom_parser_implementationC2Ev:
  224|  11.0k|simdjson_inline dom_parser_implementation::dom_parser_implementation() noexcept = default;
_ZN8simdjson8internal25dom_parser_implementationD2Ev:
  166|  11.0k|  virtual ~dom_parser_implementation() = default;

simdjson.cpp:_ZN8simdjson8internalL30detect_supported_architecturesEv:
  151|      1|static inline uint32_t detect_supported_architectures() {
  152|      1|  uint32_t eax, ebx, ecx, edx;
  153|      1|  uint32_t host_isa = 0x0;
  154|       |
  155|       |  // EBX for EAX=0x1
  156|      1|  eax = 0x1;
  157|      1|  ecx = 0x0;
  158|      1|  cpuid(&eax, &ebx, &ecx, &edx);
  159|       |
  160|      1|  if (ecx & cpuid_sse42_bit) {
  ------------------
  |  Branch (160:7): [True: 1, False: 0]
  ------------------
  161|      1|    host_isa |= instruction_set::SSE42;
  162|      1|  } else {
  163|      0|    return host_isa; // everything after is redundant
  164|      0|  }
  165|       |
  166|      1|  if (ecx & cpuid_pclmulqdq_bit) {
  ------------------
  |  Branch (166:7): [True: 1, False: 0]
  ------------------
  167|      1|    host_isa |= instruction_set::PCLMULQDQ;
  168|      1|  }
  169|       |
  170|       |
  171|      1|  if ((ecx & cpuid_osxsave) != cpuid_osxsave) {
  ------------------
  |  Branch (171:7): [True: 0, False: 1]
  ------------------
  172|      0|    return host_isa;
  173|      0|  }
  174|       |
  175|       |  // xgetbv for checking if the OS saves registers
  176|      1|  uint64_t xcr0 = xgetbv();
  177|       |
  178|      1|  if ((xcr0 & cpuid_avx256_saved) == 0) {
  ------------------
  |  Branch (178:7): [True: 0, False: 1]
  ------------------
  179|      0|    return host_isa;
  180|      0|  }
  181|       |
  182|       |  // ECX for EAX=0x7
  183|      1|  eax = 0x7;
  184|      1|  ecx = 0x0;
  185|      1|  cpuid(&eax, &ebx, &ecx, &edx);
  186|      1|  if (ebx & cpuid_avx2_bit) {
  ------------------
  |  Branch (186:7): [True: 1, False: 0]
  ------------------
  187|      1|    host_isa |= instruction_set::AVX2;
  188|      1|  }
  189|      1|  if (ebx & cpuid_bmi1_bit) {
  ------------------
  |  Branch (189:7): [True: 1, False: 0]
  ------------------
  190|      1|    host_isa |= instruction_set::BMI1;
  191|      1|  }
  192|       |
  193|      1|  if (ebx & cpuid_bmi2_bit) {
  ------------------
  |  Branch (193:7): [True: 1, False: 0]
  ------------------
  194|      1|    host_isa |= instruction_set::BMI2;
  195|      1|  }
  196|       |
  197|      1|  if (!((xcr0 & cpuid_avx512_saved) == cpuid_avx512_saved)) {
  ------------------
  |  Branch (197:7): [True: 1, False: 0]
  ------------------
  198|      1|     return host_isa;
  199|      1|  }
  200|       |
  201|      0|  if (ebx & cpuid_avx512f_bit) {
  ------------------
  |  Branch (201:7): [True: 0, False: 0]
  ------------------
  202|      0|    host_isa |= instruction_set::AVX512F;
  203|      0|  }
  204|       |
  205|      0|  if (ebx & cpuid_avx512dq_bit) {
  ------------------
  |  Branch (205:7): [True: 0, False: 0]
  ------------------
  206|      0|    host_isa |= instruction_set::AVX512DQ;
  207|      0|  }
  208|       |
  209|      0|  if (ebx & cpuid_avx512ifma_bit) {
  ------------------
  |  Branch (209:7): [True: 0, False: 0]
  ------------------
  210|      0|    host_isa |= instruction_set::AVX512IFMA;
  211|      0|  }
  212|       |
  213|      0|  if (ebx & cpuid_avx512pf_bit) {
  ------------------
  |  Branch (213:7): [True: 0, False: 0]
  ------------------
  214|      0|    host_isa |= instruction_set::AVX512PF;
  215|      0|  }
  216|       |
  217|      0|  if (ebx & cpuid_avx512er_bit) {
  ------------------
  |  Branch (217:7): [True: 0, False: 0]
  ------------------
  218|      0|    host_isa |= instruction_set::AVX512ER;
  219|      0|  }
  220|       |
  221|      0|  if (ebx & cpuid_avx512cd_bit) {
  ------------------
  |  Branch (221:7): [True: 0, False: 0]
  ------------------
  222|      0|    host_isa |= instruction_set::AVX512CD;
  223|      0|  }
  224|       |
  225|      0|  if (ebx & cpuid_avx512bw_bit) {
  ------------------
  |  Branch (225:7): [True: 0, False: 0]
  ------------------
  226|      0|    host_isa |= instruction_set::AVX512BW;
  227|      0|  }
  228|       |
  229|      0|  if (ebx & cpuid_avx512vl_bit) {
  ------------------
  |  Branch (229:7): [True: 0, False: 0]
  ------------------
  230|      0|    host_isa |= instruction_set::AVX512VL;
  231|      0|  }
  232|       |
  233|      0|  if (ecx & cpuid_avx512vbmi2_bit) {
  ------------------
  |  Branch (233:7): [True: 0, False: 0]
  ------------------
  234|      0|    host_isa |= instruction_set::AVX512VBMI2;
  235|      0|  }
  236|       |
  237|      0|  return host_isa;
  238|      1|}
simdjson.cpp:_ZN8simdjson8internalL5cpuidEPjS1_S1_S1_:
  119|      2|                         uint32_t *edx) {
  120|       |#if defined(_MSC_VER)
  121|       |  int cpu_info[4];
  122|       |  __cpuidex(cpu_info, *eax, *ecx);
  123|       |  *eax = cpu_info[0];
  124|       |  *ebx = cpu_info[1];
  125|       |  *ecx = cpu_info[2];
  126|       |  *edx = cpu_info[3];
  127|       |#elif defined(HAVE_GCC_GET_CPUID) && defined(USE_GCC_GET_CPUID)
  128|       |  uint32_t level = *eax;
  129|       |  __get_cpuid(level, eax, ebx, ecx, edx);
  130|       |#else
  131|      2|  uint32_t a = *eax, b, c = *ecx, d;
  132|      2|  asm volatile("cpuid\n\t" : "+a"(a), "=b"(b), "+c"(c), "=d"(d));
  133|      2|  *eax = a;
  134|      2|  *ebx = b;
  135|      2|  *ecx = c;
  136|      2|  *edx = d;
  137|      2|#endif
  138|      2|}
simdjson.cpp:_ZN8simdjson8internalL6xgetbvEv:
  141|      1|static inline uint64_t xgetbv() {
  142|       |#if defined(_MSC_VER)
  143|       |  return _xgetbv(0);
  144|       |#else
  145|      1|  uint32_t xcr0_lo, xcr0_hi;
  146|      1|  asm volatile("xgetbv\n\t" : "=a" (xcr0_lo), "=d" (xcr0_hi) : "c" (0));
  147|      1|  return xcr0_lo | (uint64_t(xcr0_hi) << 32);
  148|      1|#endif
  149|      1|}

_ZN8simdjson8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_18escape_json_stringE:
   24|  3.84k|inline std::ostream& operator<<(std::ostream& out, const escape_json_string &unescaped) {
   25|  94.9k|  for (size_t i=0; i<unescaped.str.length(); i++) {
  ------------------
  |  Branch (25:20): [True: 91.0k, False: 3.84k]
  ------------------
   26|  91.0k|    switch (unescaped.str[i]) {
   27|    245|    case '\b':
  ------------------
  |  Branch (27:5): [True: 245, False: 90.8k]
  ------------------
   28|    245|      out << "\\b";
   29|    245|      break;
   30|    232|    case '\f':
  ------------------
  |  Branch (30:5): [True: 232, False: 90.8k]
  ------------------
   31|    232|      out << "\\f";
   32|    232|      break;
   33|    293|    case '\n':
  ------------------
  |  Branch (33:5): [True: 293, False: 90.7k]
  ------------------
   34|    293|      out << "\\n";
   35|    293|      break;
   36|    241|    case '\r':
  ------------------
  |  Branch (36:5): [True: 241, False: 90.8k]
  ------------------
   37|    241|      out << "\\r";
   38|    241|      break;
   39|    352|    case '\"':
  ------------------
  |  Branch (39:5): [True: 352, False: 90.7k]
  ------------------
   40|    352|      out << "\\\"";
   41|    352|      break;
   42|    203|    case '\t':
  ------------------
  |  Branch (42:5): [True: 203, False: 90.8k]
  ------------------
   43|    203|      out << "\\t";
   44|    203|      break;
   45|    878|    case '\\':
  ------------------
  |  Branch (45:5): [True: 878, False: 90.2k]
  ------------------
   46|    878|      out << "\\\\";
   47|    878|      break;
   48|  88.6k|    default:
  ------------------
  |  Branch (48:5): [True: 88.6k, False: 2.44k]
  ------------------
   49|  88.6k|      if (static_cast<unsigned char>(unescaped.str[i]) <= 0x1F) {
  ------------------
  |  Branch (49:11): [True: 394, False: 88.2k]
  ------------------
   50|       |        // TODO can this be done once at the beginning, or will it mess up << char?
   51|    394|        std::ios::fmtflags f(out.flags());
   52|    394|        out << "\\u" << std::hex << std::setw(4) << std::setfill('0') << int(unescaped.str[i]);
   53|    394|        out.flags(f);
   54|  88.2k|      } else {
   55|  88.2k|        out << unescaped.str[i];
   56|  88.2k|      }
   57|  91.0k|    }
   58|  91.0k|  }
   59|  3.84k|  return out;
   60|  3.84k|}
_ZN8simdjson8internal18escape_json_stringC2ENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   17|  3.84k|  escape_json_string(std::string_view _str) noexcept : str{_str} {}

_ZN8simdjson8internal8tape_refC2Ev:
   13|  19.1k|simdjson_inline tape_ref::tape_ref() noexcept : doc{nullptr}, json_index{0} {}
_ZN8simdjson8internal8tape_refC2EPKNS_3dom8documentEm:
   14|  40.0k|simdjson_inline tape_ref::tape_ref(const dom::document *_doc, size_t _json_index) noexcept : doc{_doc}, json_index{_json_index} {}
_ZNK8simdjson8internal8tape_ref13tape_ref_typeEv:
   65|  1.15M|simdjson_inline tape_type tape_ref::tape_ref_type() const noexcept {
   66|  1.15M|  return static_cast<tape_type>(doc->tape[json_index] >> 56);
   67|  1.15M|}
_ZNK8simdjson8internal8tape_ref9get_c_strEv:
   97|      6|simdjson_inline const char * internal::tape_ref::get_c_str() const noexcept {
   98|      6|  size_t string_buf_index = size_t(tape_value());
   99|      6|  return reinterpret_cast<const char *>(&doc->string_buf[string_buf_index + sizeof(uint32_t)]);
  100|      6|}
_ZNK8simdjson8internal8tape_ref10tape_valueEv:
   68|  86.7k|simdjson_inline uint64_t internal::tape_ref::tape_value() const noexcept {
   69|  86.7k|  return doc->tape[json_index] & internal::JSON_VALUE_MASK;
   70|  86.7k|}
_ZNK8simdjson8internal8tape_ref17get_string_lengthEv:
   90|  84.8k|simdjson_inline uint32_t internal::tape_ref::get_string_length() const noexcept {
   91|  84.8k|  size_t string_buf_index = size_t(tape_value());
   92|  84.8k|  uint32_t len;
   93|  84.8k|  std::memcpy(&len, &doc->string_buf[string_buf_index], sizeof(len));
   94|  84.8k|  return len;
   95|  84.8k|}
_ZNK8simdjson8internal8tape_ref15get_string_viewEv:
  102|      4|inline std::string_view internal::tape_ref::get_string_view() const noexcept {
  103|      4|  return std::string_view(
  104|      4|      get_c_str(),
  105|      4|      get_string_length()
  106|      4|  );
  107|      4|}
_ZNK8simdjson8internal8tape_ref8is_int64Ev:
   31|  1.45k|simdjson_inline bool tape_ref::is_int64() const noexcept {
   32|  1.45k|  constexpr uint64_t tape_int64 = uint64_t(tape_type::INT64)<<56;
   33|  1.45k|  return doc->tape[json_index] == tape_int64;
   34|  1.45k|}
_ZNK8simdjson8internal8tape_ref9is_uint64Ev:
   35|  1.54k|simdjson_inline bool tape_ref::is_uint64() const noexcept {
   36|  1.54k|  constexpr uint64_t tape_uint64 = uint64_t(tape_type::UINT64)<<56;
   37|  1.54k|  return doc->tape[json_index] == tape_uint64;
   38|  1.54k|}
_ZNK8simdjson8internal8tape_ref15next_tape_valueImEET_v:
   79|    226|simdjson_inline T tape_ref::next_tape_value() const noexcept {
   80|    226|  static_assert(sizeof(T) == sizeof(uint64_t), "next_tape_value() template parameter must be 64-bit");
   81|       |  // Though the following is tempting...
   82|       |  //  return *reinterpret_cast<const T*>(&doc->tape[json_index + 1]);
   83|       |  // It is not generally safe. It is safer, and often faster to rely
   84|       |  // on memcpy. Yes, it is uglier, but it is also encapsulated.
   85|    226|  T x;
   86|    226|  std::memcpy(&x,&doc->tape[json_index + 1],sizeof(uint64_t));
   87|    226|  return x;
   88|    226|}
_ZNK8simdjson8internal8tape_ref15next_tape_valueIlEET_v:
   79|    254|simdjson_inline T tape_ref::next_tape_value() const noexcept {
   80|    254|  static_assert(sizeof(T) == sizeof(uint64_t), "next_tape_value() template parameter must be 64-bit");
   81|       |  // Though the following is tempting...
   82|       |  //  return *reinterpret_cast<const T*>(&doc->tape[json_index + 1]);
   83|       |  // It is not generally safe. It is safer, and often faster to rely
   84|       |  // on memcpy. Yes, it is uglier, but it is also encapsulated.
   85|    254|  T x;
   86|    254|  std::memcpy(&x,&doc->tape[json_index + 1],sizeof(uint64_t));
   87|    254|  return x;
   88|    254|}
_ZNK8simdjson8internal8tape_ref9is_doubleEv:
   27|    476|simdjson_inline bool tape_ref::is_double() const noexcept {
   28|    476|  constexpr uint64_t tape_double = uint64_t(tape_type::DOUBLE)<<56;
   29|    476|  return doc->tape[json_index] == tape_double;
   30|    476|}
_ZNK8simdjson8internal8tape_ref15next_tape_valueIdEET_v:
   79|    111|simdjson_inline T tape_ref::next_tape_value() const noexcept {
   80|    111|  static_assert(sizeof(T) == sizeof(uint64_t), "next_tape_value() template parameter must be 64-bit");
   81|       |  // Though the following is tempting...
   82|       |  //  return *reinterpret_cast<const T*>(&doc->tape[json_index + 1]);
   83|       |  // It is not generally safe. It is safer, and often faster to rely
   84|       |  // on memcpy. Yes, it is uglier, but it is also encapsulated.
   85|    111|  T x;
   86|    111|  std::memcpy(&x,&doc->tape[json_index + 1],sizeof(uint64_t));
   87|    111|  return x;
   88|    111|}
_ZNK8simdjson8internal8tape_ref7is_trueEv:
   43|    313|simdjson_inline bool tape_ref::is_true() const noexcept {
   44|    313|  constexpr uint64_t tape_true = uint64_t(tape_type::TRUE_VALUE)<<56;
   45|    313|  return doc->tape[json_index] == tape_true;
   46|    313|}
_ZNK8simdjson8internal8tape_ref8is_falseEv:
   39|    312|simdjson_inline bool tape_ref::is_false() const noexcept {
   40|    312|  constexpr uint64_t tape_false = uint64_t(tape_type::FALSE_VALUE)<<56;
   41|    312|  return doc->tape[json_index] == tape_false;
   42|    312|}
_ZNK8simdjson8internal8tape_ref15is_null_on_tapeEv:
   47|     59|simdjson_inline bool tape_ref::is_null_on_tape() const noexcept {
   48|     59|  constexpr uint64_t tape_null = uint64_t(tape_type::NULL_VALUE)<<56;
   49|     59|  return doc->tape[json_index] == tape_null;
   50|     59|}
_ZNK8simdjson8internal8tape_ref13after_elementEv:
   52|  1.13M|inline size_t tape_ref::after_element() const noexcept {
   53|  1.13M|  switch (tape_ref_type()) {
   54|  59.6k|    case tape_type::START_ARRAY:
  ------------------
  |  Branch (54:5): [True: 59.6k, False: 1.07M]
  ------------------
   55|  62.5k|    case tape_type::START_OBJECT:
  ------------------
  |  Branch (55:5): [True: 2.91k, False: 1.13M]
  ------------------
   56|  62.5k|      return matching_brace_index();
   57|  1.40k|    case tape_type::UINT64:
  ------------------
  |  Branch (57:5): [True: 1.40k, False: 1.13M]
  ------------------
   58|  1.05M|    case tape_type::INT64:
  ------------------
  |  Branch (58:5): [True: 1.05M, False: 79.8k]
  ------------------
   59|  1.07M|    case tape_type::DOUBLE:
  ------------------
  |  Branch (59:5): [True: 14.4k, False: 1.12M]
  ------------------
   60|  1.07M|      return json_index + 2;
   61|  1.41k|    default:
  ------------------
  |  Branch (61:5): [True: 1.41k, False: 1.13M]
  ------------------
   62|  1.41k|      return json_index + 1;
   63|  1.13M|  }
   64|  1.13M|}
_ZNK8simdjson8internal8tape_ref20matching_brace_indexEv:
   71|  62.5k|simdjson_inline uint32_t internal::tape_ref::matching_brace_index() const noexcept {
   72|  62.5k|  return uint32_t(doc->tape[json_index]);
   73|  62.5k|}

_ZN8simdjson8internal22allocate_padded_bufferEm:
   21|  11.0k|inline char *allocate_padded_buffer(size_t length) noexcept {
   22|  11.0k|  const size_t totalpaddedlength = length + SIMDJSON_PADDING;
   23|  11.0k|  if(totalpaddedlength<length) {
  ------------------
  |  Branch (23:6): [True: 0, False: 11.0k]
  ------------------
   24|       |    // overflow
   25|      0|    return nullptr;
   26|      0|  }
   27|  11.0k|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   28|       |  // avoid getting out of memory
   29|  11.0k|  if (totalpaddedlength>(1UL<<20)) {
  ------------------
  |  Branch (29:7): [True: 3, False: 11.0k]
  ------------------
   30|      3|    return nullptr;
   31|      3|  }
   32|  11.0k|#endif
   33|       |
   34|  11.0k|  char *padded_buffer = new (std::nothrow) char[totalpaddedlength];
   35|  11.0k|  if (padded_buffer == nullptr) {
  ------------------
  |  Branch (35:7): [True: 0, False: 11.0k]
  ------------------
   36|      0|    return nullptr;
   37|      0|  }
   38|       |  // We write nulls in the padded region to avoid having uninitialized
   39|       |  // content which may trigger warning for some sanitizers
   40|  11.0k|  std::memset(padded_buffer + length, 0, totalpaddedlength - length);
   41|  11.0k|  return padded_buffer;
   42|  11.0k|} // allocate_padded_buffer()
_ZNK8simdjson13padded_string4dataEv:
  107|  11.0k|inline const char *padded_string::data() const noexcept { return data_ptr; }
_ZNK8simdjson13padded_string6lengthEv:
  105|  11.0k|inline size_t padded_string::length() const noexcept { return viable_size; }
_ZN8simdjson13padded_stringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   66|  11.0k|    : viable_size(sv_.size()), data_ptr(internal::allocate_padded_buffer(sv_.size())) {
   67|  11.0k|  if(simdjson_unlikely(!data_ptr)) {
  ------------------
  |  |  120|  11.0k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 3, False: 11.0k]
  |  |  ------------------
  ------------------
   68|       |    //allocation failed or zero size
   69|      3|    viable_size = 0;
   70|      3|    return;
   71|      3|  }
   72|  11.0k|  if (sv_.size()) {
  ------------------
  |  Branch (72:7): [True: 10.9k, False: 86]
  ------------------
   73|  10.9k|    std::memcpy(data_ptr, sv_.data(), sv_.size());
   74|  10.9k|  }
   75|  11.0k|}
_ZN8simdjson13padded_stringD2Ev:
   99|  11.0k|inline padded_string::~padded_string() noexcept {
  100|  11.0k|  delete[] data_ptr;
  101|  11.0k|}

_ZN8simdjson8westmere14implementationC2Ev:
   20|      1|  simdjson_inline implementation() : simdjson::implementation("westmere", "Intel/AMD SSE4.2", internal::instruction_set::SSE42 | internal::instruction_set::PCLMULQDQ) {}

_ZN8simdjson8internal10is_integerEc:
   59|  17.4M|bool is_integer(char c)  noexcept  { return (c >= '0' && c <= '9'); }
  ------------------
  |  Branch (59:46): [True: 17.4M, False: 14.5k]
  |  Branch (59:58): [True: 17.4M, False: 2.24k]
  ------------------
_ZN8simdjson8internal13parse_decimalERPKc:
   62|  8.03k|decimal parse_decimal(const char *&p) noexcept {
   63|  8.03k|  decimal answer;
   64|  8.03k|  answer.num_digits = 0;
   65|  8.03k|  answer.decimal_point = 0;
   66|  8.03k|  answer.truncated = false;
   67|  8.03k|  answer.negative = (*p == '-');
   68|  8.03k|  if ((*p == '-') || (*p == '+')) {
  ------------------
  |  Branch (68:7): [True: 0, False: 8.03k]
  |  Branch (68:22): [True: 0, False: 8.03k]
  ------------------
   69|      0|    ++p;
   70|      0|  }
   71|       |
   72|  8.86k|  while (*p == '0') {
  ------------------
  |  Branch (72:10): [True: 828, False: 8.03k]
  ------------------
   73|    828|    ++p;
   74|    828|  }
   75|  10.0M|  while (is_integer(*p)) {
  ------------------
  |  Branch (75:10): [True: 10.0M, False: 8.03k]
  ------------------
   76|  10.0M|    if (answer.num_digits < max_digits) {
  ------------------
  |  Branch (76:9): [True: 150k, False: 9.89M]
  ------------------
   77|   150k|      answer.digits[answer.num_digits] = uint8_t(*p - '0');
   78|   150k|    }
   79|  10.0M|    answer.num_digits++;
   80|  10.0M|    ++p;
   81|  10.0M|  }
   82|  8.03k|  if (*p == '.') {
  ------------------
  |  Branch (82:7): [True: 6.85k, False: 1.17k]
  ------------------
   83|  6.85k|    ++p;
   84|  6.85k|    const char *first_after_period = p;
   85|       |    // if we have not yet encountered a zero, we have to skip it as well
   86|  6.85k|    if (answer.num_digits == 0) {
  ------------------
  |  Branch (86:9): [True: 828, False: 6.03k]
  ------------------
   87|       |      // skip zeros
   88|  23.2k|      while (*p == '0') {
  ------------------
  |  Branch (88:14): [True: 22.4k, False: 828]
  ------------------
   89|  22.4k|        ++p;
   90|  22.4k|      }
   91|    828|    }
   92|  6.10M|    while (is_integer(*p)) {
  ------------------
  |  Branch (92:12): [True: 6.10M, False: 6.85k]
  ------------------
   93|  6.10M|      if (answer.num_digits < max_digits) {
  ------------------
  |  Branch (93:11): [True: 451k, False: 5.65M]
  ------------------
   94|   451k|        answer.digits[answer.num_digits] = uint8_t(*p - '0');
   95|   451k|      }
   96|  6.10M|      answer.num_digits++;
   97|  6.10M|      ++p;
   98|  6.10M|    }
   99|  6.85k|    answer.decimal_point = int32_t(first_after_period - p);
  100|  6.85k|  }
  101|  8.03k|  if(answer.num_digits > 0) {
  ------------------
  |  Branch (101:6): [True: 7.95k, False: 81]
  ------------------
  102|  7.95k|    const char *preverse = p - 1;
  103|  7.95k|    int32_t trailing_zeros = 0;
  104|   888k|    while ((*preverse == '0') || (*preverse == '.')) {
  ------------------
  |  Branch (104:12): [True: 879k, False: 8.66k]
  |  Branch (104:34): [True: 707, False: 7.95k]
  ------------------
  105|   880k|      if(*preverse == '0') { trailing_zeros++; };
  ------------------
  |  Branch (105:10): [True: 879k, False: 707]
  ------------------
  106|   880k|      --preverse;
  107|   880k|    }
  108|  7.95k|    answer.decimal_point += int32_t(answer.num_digits);
  109|  7.95k|    answer.num_digits -= uint32_t(trailing_zeros);
  110|  7.95k|  }
  111|  8.03k|  if(answer.num_digits > max_digits ) {
  ------------------
  |  Branch (111:6): [True: 386, False: 7.64k]
  ------------------
  112|    386|    answer.num_digits = max_digits;
  113|    386|    answer.truncated = true;
  114|    386|  }
  115|  8.03k|  if (('e' == *p) || ('E' == *p)) {
  ------------------
  |  Branch (115:7): [True: 1.53k, False: 6.49k]
  |  Branch (115:22): [True: 412, False: 6.08k]
  ------------------
  116|  1.95k|    ++p;
  117|  1.95k|    bool neg_exp = false;
  118|  1.95k|    if ('-' == *p) {
  ------------------
  |  Branch (118:9): [True: 1.00k, False: 947]
  ------------------
  119|  1.00k|      neg_exp = true;
  120|  1.00k|      ++p;
  121|  1.00k|    } else if ('+' == *p) {
  ------------------
  |  Branch (121:16): [True: 194, False: 753]
  ------------------
  122|    194|      ++p;
  123|    194|    }
  124|  1.95k|    int32_t exp_number = 0; // exponential part
  125|  1.32M|    while (is_integer(*p)) {
  ------------------
  |  Branch (125:12): [True: 1.32M, False: 1.95k]
  ------------------
  126|  1.32M|      uint8_t digit = uint8_t(*p - '0');
  127|  1.32M|      if (exp_number < 0x10000) {
  ------------------
  |  Branch (127:11): [True: 422k, False: 901k]
  ------------------
  128|   422k|        exp_number = 10 * exp_number + digit;
  129|   422k|      }
  130|  1.32M|      ++p;
  131|  1.32M|    }
  132|  1.95k|    answer.decimal_point += (neg_exp ? -exp_number : exp_number);
  ------------------
  |  Branch (132:30): [True: 1.00k, False: 947]
  ------------------
  133|  1.95k|  }
  134|  8.03k|  return answer;
  135|  8.03k|}
_ZN8simdjson8internal5roundERNS0_7decimalE:
  323|  9.01k|uint64_t round(decimal &h) {
  324|  9.01k|  if ((h.num_digits == 0) || (h.decimal_point < 0)) {
  ------------------
  |  Branch (324:7): [True: 0, False: 9.01k]
  |  Branch (324:30): [True: 202, False: 8.81k]
  ------------------
  325|    202|    return 0;
  326|  8.81k|  } else if (h.decimal_point > 18) {
  ------------------
  |  Branch (326:14): [True: 0, False: 8.81k]
  ------------------
  327|      0|    return UINT64_MAX;
  328|      0|  }
  329|       |  // at this point, we know that h.decimal_point >= 0
  330|  8.81k|  uint32_t dp = uint32_t(h.decimal_point);
  331|  8.81k|  uint64_t n = 0;
  332|   144k|  for (uint32_t i = 0; i < dp; i++) {
  ------------------
  |  Branch (332:24): [True: 135k, False: 8.81k]
  ------------------
  333|   135k|    n = (10 * n) + ((i < h.num_digits) ? h.digits[i] : 0);
  ------------------
  |  Branch (333:21): [True: 134k, False: 1.69k]
  ------------------
  334|   135k|  }
  335|  8.81k|  bool round_up = false;
  336|  8.81k|  if (dp < h.num_digits) {
  ------------------
  |  Branch (336:7): [True: 8.18k, False: 628]
  ------------------
  337|  8.18k|    round_up = h.digits[dp] >= 5; // normally, we round up
  338|       |    // but we may need to round to even!
  339|  8.18k|    if ((h.digits[dp] == 5) && (dp + 1 == h.num_digits)) {
  ------------------
  |  Branch (339:9): [True: 1.11k, False: 7.07k]
  |  Branch (339:32): [True: 484, False: 632]
  ------------------
  340|    484|      round_up = h.truncated || ((dp > 0) && (1 & h.digits[dp - 1]));
  ------------------
  |  Branch (340:18): [True: 235, False: 249]
  |  Branch (340:34): [True: 249, False: 0]
  |  Branch (340:46): [True: 69, False: 180]
  ------------------
  341|    484|    }
  342|  8.18k|  }
  343|  8.81k|  if (round_up) {
  ------------------
  |  Branch (343:7): [True: 5.03k, False: 3.78k]
  ------------------
  344|  5.03k|    n++;
  345|  5.03k|  }
  346|  8.81k|  return n;
  347|  9.01k|}
_ZN8simdjson8internal18decimal_left_shiftERNS0_7decimalEj:
  350|  27.6k|void decimal_left_shift(decimal &h, uint32_t shift) {
  351|  27.6k|  if (h.num_digits == 0) {
  ------------------
  |  Branch (351:7): [True: 0, False: 27.6k]
  ------------------
  352|      0|    return;
  353|      0|  }
  354|  27.6k|  uint32_t num_new_digits = number_of_digits_decimal_left_shift(h, shift);
  355|  27.6k|  int32_t read_index = int32_t(h.num_digits - 1);
  356|  27.6k|  uint32_t write_index = h.num_digits - 1 + num_new_digits;
  357|  27.6k|  uint64_t n = 0;
  358|       |
  359|  3.35M|  while (read_index >= 0) {
  ------------------
  |  Branch (359:10): [True: 3.32M, False: 27.6k]
  ------------------
  360|  3.32M|    n += uint64_t(h.digits[read_index]) << shift;
  361|  3.32M|    uint64_t quotient = n / 10;
  362|  3.32M|    uint64_t remainder = n - (10 * quotient);
  363|  3.32M|    if (write_index < max_digits) {
  ------------------
  |  Branch (363:9): [True: 3.32M, False: 3.73k]
  ------------------
  364|  3.32M|      h.digits[write_index] = uint8_t(remainder);
  365|  3.32M|    } else if (remainder > 0) {
  ------------------
  |  Branch (365:16): [True: 3.08k, False: 642]
  ------------------
  366|  3.08k|      h.truncated = true;
  367|  3.08k|    }
  368|  3.32M|    n = quotient;
  369|  3.32M|    write_index--;
  370|  3.32M|    read_index--;
  371|  3.32M|  }
  372|   336k|  while (n > 0) {
  ------------------
  |  Branch (372:10): [True: 308k, False: 27.6k]
  ------------------
  373|   308k|    uint64_t quotient = n / 10;
  374|   308k|    uint64_t remainder = n - (10 * quotient);
  375|   308k|    if (write_index < max_digits) {
  ------------------
  |  Branch (375:9): [True: 308k, False: 0]
  ------------------
  376|   308k|      h.digits[write_index] = uint8_t(remainder);
  377|   308k|    } else if (remainder > 0) {
  ------------------
  |  Branch (377:16): [True: 0, False: 0]
  ------------------
  378|      0|      h.truncated = true;
  379|      0|    }
  380|   308k|    n = quotient;
  381|   308k|    write_index--;
  382|   308k|  }
  383|  27.6k|  h.num_digits += num_new_digits;
  384|  27.6k|  if (h.num_digits > max_digits) {
  ------------------
  |  Branch (384:7): [True: 276, False: 27.4k]
  ------------------
  385|    276|    h.num_digits = max_digits;
  386|    276|  }
  387|  27.6k|  h.decimal_point += int32_t(num_new_digits);
  388|  27.6k|  trim(h);
  389|  27.6k|}
_ZN8simdjson8internal19decimal_right_shiftERNS0_7decimalEj:
  392|  17.5k|void decimal_right_shift(decimal &h, uint32_t shift) {
  393|  17.5k|  uint32_t read_index = 0;
  394|  17.5k|  uint32_t write_index = 0;
  395|       |
  396|  17.5k|  uint64_t n = 0;
  397|       |
  398|   187k|  while ((n >> shift) == 0) {
  ------------------
  |  Branch (398:10): [True: 170k, False: 16.5k]
  ------------------
  399|   170k|    if (read_index < h.num_digits) {
  ------------------
  |  Branch (399:9): [True: 169k, False: 1.04k]
  ------------------
  400|   169k|      n = (10 * n) + h.digits[read_index++];
  401|   169k|    } else if (n == 0) {
  ------------------
  |  Branch (401:16): [True: 0, False: 1.04k]
  ------------------
  402|      0|      return;
  403|  1.04k|    } else {
  404|  9.18k|      while ((n >> shift) == 0) {
  ------------------
  |  Branch (404:14): [True: 8.13k, False: 1.04k]
  ------------------
  405|  8.13k|        n = 10 * n;
  406|  8.13k|        read_index++;
  407|  8.13k|      }
  408|  1.04k|      break;
  409|  1.04k|    }
  410|   170k|  }
  411|  17.5k|  h.decimal_point -= int32_t(read_index - 1);
  412|  17.5k|  if (h.decimal_point < -decimal_point_range) { // it is zero
  ------------------
  |  Branch (412:7): [True: 0, False: 17.5k]
  ------------------
  413|      0|    h.num_digits = 0;
  414|      0|    h.decimal_point = 0;
  415|      0|    h.negative = false;
  416|      0|    h.truncated = false;
  417|      0|    return;
  418|      0|  }
  419|  17.5k|  uint64_t mask = (uint64_t(1) << shift) - 1;
  420|  2.76M|  while (read_index < h.num_digits) {
  ------------------
  |  Branch (420:10): [True: 2.74M, False: 17.5k]
  ------------------
  421|  2.74M|    uint8_t new_digit = uint8_t(n >> shift);
  422|  2.74M|    n = (10 * (n & mask)) + h.digits[read_index++];
  423|  2.74M|    h.digits[write_index++] = new_digit;
  424|  2.74M|  }
  425|   514k|  while (n > 0) {
  ------------------
  |  Branch (425:10): [True: 497k, False: 17.5k]
  ------------------
  426|   497k|    uint8_t new_digit = uint8_t(n >> shift);
  427|   497k|    n = 10 * (n & mask);
  428|   497k|    if (write_index < max_digits) {
  ------------------
  |  Branch (428:9): [True: 487k, False: 9.86k]
  ------------------
  429|   487k|      h.digits[write_index++] = new_digit;
  430|   487k|    } else if (new_digit > 0) {
  ------------------
  |  Branch (430:16): [True: 8.88k, False: 987]
  ------------------
  431|  8.88k|      h.truncated = true;
  432|  8.88k|    }
  433|   497k|  }
  434|  17.5k|  h.num_digits = write_index;
  435|  17.5k|  trim(h);
  436|  17.5k|}
_ZN8simdjson8internal10from_charsEPKc:
  562|  8.03k|double from_chars(const char *first) noexcept {
  563|  8.03k|  bool negative = first[0] == '-';
  564|  8.03k|  if (negative) {
  ------------------
  |  Branch (564:7): [True: 204, False: 7.83k]
  ------------------
  565|    204|    first++;
  566|    204|  }
  567|  8.03k|  adjusted_mantissa am = parse_long_mantissa<binary_format<double>>(first);
  568|  8.03k|  uint64_t word = am.mantissa;
  569|  8.03k|  word |= uint64_t(am.power2)
  570|  8.03k|          << binary_format<double>::mantissa_explicit_bits();
  571|  8.03k|  word = negative ? word | (uint64_t(1) << binary_format<double>::sign_index())
  ------------------
  |  Branch (571:10): [True: 204, False: 7.83k]
  ------------------
  572|  8.03k|                  : word;
  573|  8.03k|  double value;
  574|  8.03k|  std::memcpy(&value, &word, sizeof(double));
  575|  8.03k|  return value;
  576|  8.03k|}
simdjson.cpp:_ZN8simdjson8internal12_GLOBAL__N_135number_of_digits_decimal_left_shiftERNS0_7decimalEj:
  226|  27.6k|uint32_t number_of_digits_decimal_left_shift(decimal &h, uint32_t shift) {
  227|  27.6k|  shift &= 63;
  228|  27.6k|  const static uint16_t number_of_digits_decimal_left_shift_table[65] = {
  229|  27.6k|      0x0000, 0x0800, 0x0801, 0x0803, 0x1006, 0x1009, 0x100D, 0x1812, 0x1817,
  230|  27.6k|      0x181D, 0x2024, 0x202B, 0x2033, 0x203C, 0x2846, 0x2850, 0x285B, 0x3067,
  231|  27.6k|      0x3073, 0x3080, 0x388E, 0x389C, 0x38AB, 0x38BB, 0x40CC, 0x40DD, 0x40EF,
  232|  27.6k|      0x4902, 0x4915, 0x4929, 0x513E, 0x5153, 0x5169, 0x5180, 0x5998, 0x59B0,
  233|  27.6k|      0x59C9, 0x61E3, 0x61FD, 0x6218, 0x6A34, 0x6A50, 0x6A6D, 0x6A8B, 0x72AA,
  234|  27.6k|      0x72C9, 0x72E9, 0x7B0A, 0x7B2B, 0x7B4D, 0x8370, 0x8393, 0x83B7, 0x83DC,
  235|  27.6k|      0x8C02, 0x8C28, 0x8C4F, 0x9477, 0x949F, 0x94C8, 0x9CF2, 0x051C, 0x051C,
  236|  27.6k|      0x051C, 0x051C,
  237|  27.6k|  };
  238|  27.6k|  uint32_t x_a = number_of_digits_decimal_left_shift_table[shift];
  239|  27.6k|  uint32_t x_b = number_of_digits_decimal_left_shift_table[shift + 1];
  240|  27.6k|  uint32_t num_new_digits = x_a >> 11;
  241|  27.6k|  uint32_t pow5_a = 0x7FF & x_a;
  242|  27.6k|  uint32_t pow5_b = 0x7FF & x_b;
  243|  27.6k|  const static uint8_t
  244|  27.6k|      number_of_digits_decimal_left_shift_table_powers_of_5[0x051C] = {
  245|  27.6k|          5, 2, 5, 1, 2, 5, 6, 2, 5, 3, 1, 2, 5, 1, 5, 6, 2, 5, 7, 8, 1, 2, 5,
  246|  27.6k|          3, 9, 0, 6, 2, 5, 1, 9, 5, 3, 1, 2, 5, 9, 7, 6, 5, 6, 2, 5, 4, 8, 8,
  247|  27.6k|          2, 8, 1, 2, 5, 2, 4, 4, 1, 4, 0, 6, 2, 5, 1, 2, 2, 0, 7, 0, 3, 1, 2,
  248|  27.6k|          5, 6, 1, 0, 3, 5, 1, 5, 6, 2, 5, 3, 0, 5, 1, 7, 5, 7, 8, 1, 2, 5, 1,
  249|  27.6k|          5, 2, 5, 8, 7, 8, 9, 0, 6, 2, 5, 7, 6, 2, 9, 3, 9, 4, 5, 3, 1, 2, 5,
  250|  27.6k|          3, 8, 1, 4, 6, 9, 7, 2, 6, 5, 6, 2, 5, 1, 9, 0, 7, 3, 4, 8, 6, 3, 2,
  251|  27.6k|          8, 1, 2, 5, 9, 5, 3, 6, 7, 4, 3, 1, 6, 4, 0, 6, 2, 5, 4, 7, 6, 8, 3,
  252|  27.6k|          7, 1, 5, 8, 2, 0, 3, 1, 2, 5, 2, 3, 8, 4, 1, 8, 5, 7, 9, 1, 0, 1, 5,
  253|  27.6k|          6, 2, 5, 1, 1, 9, 2, 0, 9, 2, 8, 9, 5, 5, 0, 7, 8, 1, 2, 5, 5, 9, 6,
  254|  27.6k|          0, 4, 6, 4, 4, 7, 7, 5, 3, 9, 0, 6, 2, 5, 2, 9, 8, 0, 2, 3, 2, 2, 3,
  255|  27.6k|          8, 7, 6, 9, 5, 3, 1, 2, 5, 1, 4, 9, 0, 1, 1, 6, 1, 1, 9, 3, 8, 4, 7,
  256|  27.6k|          6, 5, 6, 2, 5, 7, 4, 5, 0, 5, 8, 0, 5, 9, 6, 9, 2, 3, 8, 2, 8, 1, 2,
  257|  27.6k|          5, 3, 7, 2, 5, 2, 9, 0, 2, 9, 8, 4, 6, 1, 9, 1, 4, 0, 6, 2, 5, 1, 8,
  258|  27.6k|          6, 2, 6, 4, 5, 1, 4, 9, 2, 3, 0, 9, 5, 7, 0, 3, 1, 2, 5, 9, 3, 1, 3,
  259|  27.6k|          2, 2, 5, 7, 4, 6, 1, 5, 4, 7, 8, 5, 1, 5, 6, 2, 5, 4, 6, 5, 6, 6, 1,
  260|  27.6k|          2, 8, 7, 3, 0, 7, 7, 3, 9, 2, 5, 7, 8, 1, 2, 5, 2, 3, 2, 8, 3, 0, 6,
  261|  27.6k|          4, 3, 6, 5, 3, 8, 6, 9, 6, 2, 8, 9, 0, 6, 2, 5, 1, 1, 6, 4, 1, 5, 3,
  262|  27.6k|          2, 1, 8, 2, 6, 9, 3, 4, 8, 1, 4, 4, 5, 3, 1, 2, 5, 5, 8, 2, 0, 7, 6,
  263|  27.6k|          6, 0, 9, 1, 3, 4, 6, 7, 4, 0, 7, 2, 2, 6, 5, 6, 2, 5, 2, 9, 1, 0, 3,
  264|  27.6k|          8, 3, 0, 4, 5, 6, 7, 3, 3, 7, 0, 3, 6, 1, 3, 2, 8, 1, 2, 5, 1, 4, 5,
  265|  27.6k|          5, 1, 9, 1, 5, 2, 2, 8, 3, 6, 6, 8, 5, 1, 8, 0, 6, 6, 4, 0, 6, 2, 5,
  266|  27.6k|          7, 2, 7, 5, 9, 5, 7, 6, 1, 4, 1, 8, 3, 4, 2, 5, 9, 0, 3, 3, 2, 0, 3,
  267|  27.6k|          1, 2, 5, 3, 6, 3, 7, 9, 7, 8, 8, 0, 7, 0, 9, 1, 7, 1, 2, 9, 5, 1, 6,
  268|  27.6k|          6, 0, 1, 5, 6, 2, 5, 1, 8, 1, 8, 9, 8, 9, 4, 0, 3, 5, 4, 5, 8, 5, 6,
  269|  27.6k|          4, 7, 5, 8, 3, 0, 0, 7, 8, 1, 2, 5, 9, 0, 9, 4, 9, 4, 7, 0, 1, 7, 7,
  270|  27.6k|          2, 9, 2, 8, 2, 3, 7, 9, 1, 5, 0, 3, 9, 0, 6, 2, 5, 4, 5, 4, 7, 4, 7,
  271|  27.6k|          3, 5, 0, 8, 8, 6, 4, 6, 4, 1, 1, 8, 9, 5, 7, 5, 1, 9, 5, 3, 1, 2, 5,
  272|  27.6k|          2, 2, 7, 3, 7, 3, 6, 7, 5, 4, 4, 3, 2, 3, 2, 0, 5, 9, 4, 7, 8, 7, 5,
  273|  27.6k|          9, 7, 6, 5, 6, 2, 5, 1, 1, 3, 6, 8, 6, 8, 3, 7, 7, 2, 1, 6, 1, 6, 0,
  274|  27.6k|          2, 9, 7, 3, 9, 3, 7, 9, 8, 8, 2, 8, 1, 2, 5, 5, 6, 8, 4, 3, 4, 1, 8,
  275|  27.6k|          8, 6, 0, 8, 0, 8, 0, 1, 4, 8, 6, 9, 6, 8, 9, 9, 4, 1, 4, 0, 6, 2, 5,
  276|  27.6k|          2, 8, 4, 2, 1, 7, 0, 9, 4, 3, 0, 4, 0, 4, 0, 0, 7, 4, 3, 4, 8, 4, 4,
  277|  27.6k|          9, 7, 0, 7, 0, 3, 1, 2, 5, 1, 4, 2, 1, 0, 8, 5, 4, 7, 1, 5, 2, 0, 2,
  278|  27.6k|          0, 0, 3, 7, 1, 7, 4, 2, 2, 4, 8, 5, 3, 5, 1, 5, 6, 2, 5, 7, 1, 0, 5,
  279|  27.6k|          4, 2, 7, 3, 5, 7, 6, 0, 1, 0, 0, 1, 8, 5, 8, 7, 1, 1, 2, 4, 2, 6, 7,
  280|  27.6k|          5, 7, 8, 1, 2, 5, 3, 5, 5, 2, 7, 1, 3, 6, 7, 8, 8, 0, 0, 5, 0, 0, 9,
  281|  27.6k|          2, 9, 3, 5, 5, 6, 2, 1, 3, 3, 7, 8, 9, 0, 6, 2, 5, 1, 7, 7, 6, 3, 5,
  282|  27.6k|          6, 8, 3, 9, 4, 0, 0, 2, 5, 0, 4, 6, 4, 6, 7, 7, 8, 1, 0, 6, 6, 8, 9,
  283|  27.6k|          4, 5, 3, 1, 2, 5, 8, 8, 8, 1, 7, 8, 4, 1, 9, 7, 0, 0, 1, 2, 5, 2, 3,
  284|  27.6k|          2, 3, 3, 8, 9, 0, 5, 3, 3, 4, 4, 7, 2, 6, 5, 6, 2, 5, 4, 4, 4, 0, 8,
  285|  27.6k|          9, 2, 0, 9, 8, 5, 0, 0, 6, 2, 6, 1, 6, 1, 6, 9, 4, 5, 2, 6, 6, 7, 2,
  286|  27.6k|          3, 6, 3, 2, 8, 1, 2, 5, 2, 2, 2, 0, 4, 4, 6, 0, 4, 9, 2, 5, 0, 3, 1,
  287|  27.6k|          3, 0, 8, 0, 8, 4, 7, 2, 6, 3, 3, 3, 6, 1, 8, 1, 6, 4, 0, 6, 2, 5, 1,
  288|  27.6k|          1, 1, 0, 2, 2, 3, 0, 2, 4, 6, 2, 5, 1, 5, 6, 5, 4, 0, 4, 2, 3, 6, 3,
  289|  27.6k|          1, 6, 6, 8, 0, 9, 0, 8, 2, 0, 3, 1, 2, 5, 5, 5, 5, 1, 1, 1, 5, 1, 2,
  290|  27.6k|          3, 1, 2, 5, 7, 8, 2, 7, 0, 2, 1, 1, 8, 1, 5, 8, 3, 4, 0, 4, 5, 4, 1,
  291|  27.6k|          0, 1, 5, 6, 2, 5, 2, 7, 7, 5, 5, 5, 7, 5, 6, 1, 5, 6, 2, 8, 9, 1, 3,
  292|  27.6k|          5, 1, 0, 5, 9, 0, 7, 9, 1, 7, 0, 2, 2, 7, 0, 5, 0, 7, 8, 1, 2, 5, 1,
  293|  27.6k|          3, 8, 7, 7, 7, 8, 7, 8, 0, 7, 8, 1, 4, 4, 5, 6, 7, 5, 5, 2, 9, 5, 3,
  294|  27.6k|          9, 5, 8, 5, 1, 1, 3, 5, 2, 5, 3, 9, 0, 6, 2, 5, 6, 9, 3, 8, 8, 9, 3,
  295|  27.6k|          9, 0, 3, 9, 0, 7, 2, 2, 8, 3, 7, 7, 6, 4, 7, 6, 9, 7, 9, 2, 5, 5, 6,
  296|  27.6k|          7, 6, 2, 6, 9, 5, 3, 1, 2, 5, 3, 4, 6, 9, 4, 4, 6, 9, 5, 1, 9, 5, 3,
  297|  27.6k|          6, 1, 4, 1, 8, 8, 8, 2, 3, 8, 4, 8, 9, 6, 2, 7, 8, 3, 8, 1, 3, 4, 7,
  298|  27.6k|          6, 5, 6, 2, 5, 1, 7, 3, 4, 7, 2, 3, 4, 7, 5, 9, 7, 6, 8, 0, 7, 0, 9,
  299|  27.6k|          4, 4, 1, 1, 9, 2, 4, 4, 8, 1, 3, 9, 1, 9, 0, 6, 7, 3, 8, 2, 8, 1, 2,
  300|  27.6k|          5, 8, 6, 7, 3, 6, 1, 7, 3, 7, 9, 8, 8, 4, 0, 3, 5, 4, 7, 2, 0, 5, 9,
  301|  27.6k|          6, 2, 2, 4, 0, 6, 9, 5, 9, 5, 3, 3, 6, 9, 1, 4, 0, 6, 2, 5,
  302|  27.6k|      };
  303|  27.6k|  const uint8_t *pow5 =
  304|  27.6k|      &number_of_digits_decimal_left_shift_table_powers_of_5[pow5_a];
  305|  27.6k|  uint32_t i = 0;
  306|  27.6k|  uint32_t n = pow5_b - pow5_a;
  307|  29.6k|  for (; i < n; i++) {
  ------------------
  |  Branch (307:10): [True: 29.4k, False: 197]
  ------------------
  308|  29.4k|    if (i >= h.num_digits) {
  ------------------
  |  Branch (308:9): [True: 250, False: 29.2k]
  ------------------
  309|    250|      return num_new_digits - 1;
  310|  29.2k|    } else if (h.digits[i] == pow5[i]) {
  ------------------
  |  Branch (310:16): [True: 1.99k, False: 27.2k]
  ------------------
  311|  1.99k|      continue;
  312|  27.2k|    } else if (h.digits[i] < pow5[i]) {
  ------------------
  |  Branch (312:16): [True: 17.9k, False: 9.28k]
  ------------------
  313|  17.9k|      return num_new_digits - 1;
  314|  17.9k|    } else {
  315|  9.28k|      return num_new_digits;
  316|  9.28k|    }
  317|  29.4k|  }
  318|    197|  return num_new_digits;
  319|  27.6k|}
simdjson.cpp:_ZN8simdjson8internal12_GLOBAL__N_14trimERNS0_7decimalE:
  220|  45.2k|inline void trim(decimal &h) {
  221|   533k|  while ((h.num_digits > 0) && (h.digits[h.num_digits - 1] == 0)) {
  ------------------
  |  Branch (221:10): [True: 533k, False: 0]
  |  Branch (221:32): [True: 487k, False: 45.2k]
  ------------------
  222|   487k|    h.num_digits--;
  223|   487k|  }
  224|  45.2k|}
_ZN8simdjson8internal13binary_formatIdE22mantissa_explicit_bitsEv:
   46|  22.9k|template <> constexpr int binary_format<double>::mantissa_explicit_bits() {
   47|  22.9k|  return 52;
   48|  22.9k|}
_ZN8simdjson8internal13binary_formatIdE10sign_indexEv:
   57|    204|template <> constexpr int binary_format<double>::sign_index() { return 63; }
_ZN8simdjson8internal19parse_long_mantissaINS0_13binary_formatIdEEEENS0_17adjusted_mantissaEPKc:
  551|  8.03k|adjusted_mantissa parse_long_mantissa(const char *first) {
  552|  8.03k|  decimal d = parse_decimal(first);
  553|  8.03k|  return compute_float<binary>(d);
  554|  8.03k|}
_ZN8simdjson8internal13compute_floatINS0_13binary_formatIdEEEENS0_17adjusted_mantissaERNS0_7decimalE:
  438|  8.03k|template <typename binary> adjusted_mantissa compute_float(decimal &d) {
  439|  8.03k|  adjusted_mantissa answer;
  440|  8.03k|  if (d.num_digits == 0) {
  ------------------
  |  Branch (440:7): [True: 81, False: 7.95k]
  ------------------
  441|       |    // should be zero
  442|     81|    answer.power2 = 0;
  443|     81|    answer.mantissa = 0;
  444|     81|    return answer;
  445|     81|  }
  446|       |  // At this point, going further, we can assume that d.num_digits > 0.
  447|       |  // We want to guard against excessive decimal point values because
  448|       |  // they can result in long running times. Indeed, we do
  449|       |  // shifts by at most 60 bits. We have that log(10**400)/log(2**60) ~= 22
  450|       |  // which is fine, but log(10**299995)/log(2**60) ~= 16609 which is not
  451|       |  // fine (runs for a long time).
  452|       |  //
  453|  7.95k|  if(d.decimal_point < -324) {
  ------------------
  |  Branch (453:6): [True: 214, False: 7.74k]
  ------------------
  454|       |    // We have something smaller than 1e-324 which is always zero
  455|       |    // in binary64 and binary32.
  456|       |    // It should be zero.
  457|    214|    answer.power2 = 0;
  458|    214|    answer.mantissa = 0;
  459|    214|    return answer;
  460|  7.74k|  } else if(d.decimal_point >= 310) {
  ------------------
  |  Branch (460:13): [True: 144, False: 7.59k]
  ------------------
  461|       |    // We have something at least as large as 0.1e310 which is
  462|       |    // always infinite.
  463|    144|    answer.power2 = binary::infinite_power();
  464|    144|    answer.mantissa = 0;
  465|    144|    return answer;
  466|    144|  }
  467|       |
  468|  7.59k|  static const uint32_t max_shift = 60;
  469|  7.59k|  static const uint32_t num_powers = 19;
  470|  7.59k|  static const uint8_t powers[19] = {
  471|  7.59k|      0,  3,  6,  9,  13, 16, 19, 23, 26, 29, //
  472|  7.59k|      33, 36, 39, 43, 46, 49, 53, 56, 59,     //
  473|  7.59k|  };
  474|  7.59k|  int32_t exp2 = 0;
  475|  23.0k|  while (d.decimal_point > 0) {
  ------------------
  |  Branch (475:10): [True: 15.4k, False: 7.59k]
  ------------------
  476|  15.4k|    uint32_t n = uint32_t(d.decimal_point);
  477|  15.4k|    uint32_t shift = (n < num_powers) ? powers[n] : max_shift;
  ------------------
  |  Branch (477:22): [True: 9.68k, False: 5.78k]
  ------------------
  478|  15.4k|    decimal_right_shift(d, shift);
  479|  15.4k|    if (d.decimal_point < -decimal_point_range) {
  ------------------
  |  Branch (479:9): [True: 0, False: 15.4k]
  ------------------
  480|       |      // should be zero
  481|      0|      answer.power2 = 0;
  482|      0|      answer.mantissa = 0;
  483|      0|      return answer;
  484|      0|    }
  485|  15.4k|    exp2 += int32_t(shift);
  486|  15.4k|  }
  487|       |  // We shift left toward [1/2 ... 1].
  488|  27.8k|  while (d.decimal_point <= 0) {
  ------------------
  |  Branch (488:10): [True: 27.8k, False: 0]
  ------------------
  489|  27.8k|    uint32_t shift;
  490|  27.8k|    if (d.decimal_point == 0) {
  ------------------
  |  Branch (490:9): [True: 16.2k, False: 11.6k]
  ------------------
  491|  16.2k|      if (d.digits[0] >= 5) {
  ------------------
  |  Branch (491:11): [True: 7.59k, False: 8.63k]
  ------------------
  492|  7.59k|        break;
  493|  7.59k|      }
  494|  8.63k|      shift = (d.digits[0] < 2) ? 2 : 1;
  ------------------
  |  Branch (494:15): [True: 3.10k, False: 5.52k]
  ------------------
  495|  11.6k|    } else {
  496|  11.6k|      uint32_t n = uint32_t(-d.decimal_point);
  497|  11.6k|      shift = (n < num_powers) ? powers[n] : max_shift;
  ------------------
  |  Branch (497:15): [True: 1.71k, False: 9.90k]
  ------------------
  498|  11.6k|    }
  499|  20.2k|    decimal_left_shift(d, shift);
  500|  20.2k|    if (d.decimal_point > decimal_point_range) {
  ------------------
  |  Branch (500:9): [True: 0, False: 20.2k]
  ------------------
  501|       |      // we want to get infinity:
  502|      0|      answer.power2 = 0xFF;
  503|      0|      answer.mantissa = 0;
  504|      0|      return answer;
  505|      0|    }
  506|  20.2k|    exp2 -= int32_t(shift);
  507|  20.2k|  }
  508|       |  // We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
  509|  7.59k|  exp2--;
  510|  7.59k|  constexpr int32_t minimum_exponent = binary::minimum_exponent();
  511|  8.14k|  while ((minimum_exponent + 1) > exp2) {
  ------------------
  |  Branch (511:10): [True: 552, False: 7.59k]
  ------------------
  512|    552|    uint32_t n = uint32_t((minimum_exponent + 1) - exp2);
  513|    552|    if (n > max_shift) {
  ------------------
  |  Branch (513:9): [True: 0, False: 552]
  ------------------
  514|      0|      n = max_shift;
  515|      0|    }
  516|    552|    decimal_right_shift(d, n);
  517|    552|    exp2 += int32_t(n);
  518|    552|  }
  519|  7.59k|  if ((exp2 - minimum_exponent) >= binary::infinite_power()) {
  ------------------
  |  Branch (519:7): [True: 155, False: 7.44k]
  ------------------
  520|    155|    answer.power2 = binary::infinite_power();
  521|    155|    answer.mantissa = 0;
  522|    155|    return answer;
  523|    155|  }
  524|       |
  525|  7.44k|  const int mantissa_size_in_bits = binary::mantissa_explicit_bits() + 1;
  526|  7.44k|  decimal_left_shift(d, mantissa_size_in_bits);
  527|       |
  528|  7.44k|  uint64_t mantissa = round(d);
  529|       |  // It is possible that we have an overflow, in which case we need
  530|       |  // to shift back.
  531|  7.44k|  if (mantissa >= (uint64_t(1) << mantissa_size_in_bits)) {
  ------------------
  |  Branch (531:7): [True: 1.57k, False: 5.86k]
  ------------------
  532|  1.57k|    decimal_right_shift(d, 1);
  533|  1.57k|    exp2 += 1;
  534|  1.57k|    mantissa = round(d);
  535|  1.57k|    if ((exp2 - minimum_exponent) >= binary::infinite_power()) {
  ------------------
  |  Branch (535:9): [True: 0, False: 1.57k]
  ------------------
  536|      0|      answer.power2 = binary::infinite_power();
  537|      0|      answer.mantissa = 0;
  538|      0|      return answer;
  539|      0|    }
  540|  1.57k|  }
  541|  7.44k|  answer.power2 = exp2 - binary::minimum_exponent();
  542|  7.44k|  if (mantissa < (uint64_t(1) << binary::mantissa_explicit_bits())) {
  ------------------
  |  Branch (542:7): [True: 552, False: 6.88k]
  ------------------
  543|    552|    answer.power2--;
  544|    552|  }
  545|  7.44k|  answer.mantissa =
  546|  7.44k|      mantissa & ((uint64_t(1) << binary::mantissa_explicit_bits()) - 1);
  547|  7.44k|  return answer;
  548|  7.44k|}
_ZN8simdjson8internal17adjusted_mantissaC2Ev:
   28|  8.03k|  adjusted_mantissa() : mantissa(0), power2(0) {}
_ZN8simdjson8internal13binary_formatIdE14infinite_powerEv:
   53|  9.47k|template <> constexpr int binary_format<double>::infinite_power() {
   54|  9.47k|  return 0x7FF;
   55|  9.47k|}
_ZN8simdjson8internal13binary_formatIdE16minimum_exponentEv:
   50|  7.44k|template <> constexpr int binary_format<double>::minimum_exponent() {
   51|  7.44k|  return -1023;
   52|  7.44k|}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_116buf_block_readerILm128EEC2EPKhm:
   62|  10.9k|simdjson_inline buf_block_reader<STEP_SIZE>::buf_block_reader(const uint8_t *_buf, size_t _len) : buf{_buf}, len{_len}, lenminusstep{len < STEP_SIZE ? 0 : len - STEP_SIZE}, idx{0} {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_116buf_block_readerILm128EE14has_full_blockEv:
   68|   684k|simdjson_inline bool buf_block_reader<STEP_SIZE>::has_full_block() const {
   69|   684k|  return idx < lenminusstep;
   70|   684k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_116buf_block_readerILm128EE7advanceEv:
   86|   684k|simdjson_inline void buf_block_reader<STEP_SIZE>::advance() {
   87|   684k|  idx += STEP_SIZE;
   88|   684k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_116buf_block_readerILm128EE10full_blockEv:
   73|   673k|simdjson_inline const uint8_t *buf_block_reader<STEP_SIZE>::full_block() const {
   74|   673k|  return &buf[idx];
   75|   673k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_116buf_block_readerILm128EE13get_remainderEPh:
   78|  10.9k|simdjson_inline size_t buf_block_reader<STEP_SIZE>::get_remainder(uint8_t *dst) const {
   79|  10.9k|  if(len == idx) { return 0; } // memcpy(dst, null, 0) will trigger an error with some sanitizers
  ------------------
  |  Branch (79:6): [True: 0, False: 10.9k]
  ------------------
   80|  10.9k|  std::memset(dst, 0x20, STEP_SIZE); // std::memset STEP_SIZE because it's more efficient to write out 8 or 16 bytes at once.
   81|  10.9k|  std::memcpy(dst, buf + idx, len - idx);
   82|  10.9k|  return len - idx;
   83|  10.9k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_116buf_block_readerILm128EE11block_indexEv:
   65|  1.38M|simdjson_inline size_t buf_block_reader<STEP_SIZE>::block_index() { return idx; }

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage112json_scannerC2Ev:
   99|  10.9k|  json_scanner() = default;
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage112json_scanner4nextERKNS1_4simd8simd8x64IhEE:
  125|  1.36M|simdjson_inline json_block json_scanner::next(const simd::simd8x64<uint8_t>& in) {
  126|  1.36M|  json_string_block strings = string_scanner.next(in);
  127|       |  // identifies the white-space and the structural characters
  128|  1.36M|  json_character_block characters = json_character_block::classify(in);
  129|       |  // The term "scalar" refers to anything except structural characters and white space
  130|       |  // (so letters, numbers, quotes).
  131|       |  // We want follows_scalar to mark anything that follows a non-quote scalar (so letters and numbers).
  132|       |  //
  133|       |  // A terminal quote should either be followed by a structural character (comma, brace, bracket, colon)
  134|       |  // or nothing. However, we still want ' "a string"true ' to mark the 't' of 'true' as a potential
  135|       |  // pseudo-structural character just like we would if we had  ' "a string" true '; otherwise we
  136|       |  // may need to add an extra check when parsing strings.
  137|       |  //
  138|       |  // Performance: there are many ways to skin this cat.
  139|  1.36M|  const uint64_t nonquote_scalar = characters.scalar() & ~strings.quote();
  140|  1.36M|  uint64_t follows_nonquote_scalar = follows(nonquote_scalar, prev_scalar);
  141|       |  // We are returning a function-local object so either we get a move constructor
  142|       |  // or we get copy elision.
  143|  1.36M|  return json_block(
  144|  1.36M|    strings,// strings is a function-local object so either it moves or the copy is elided.
  145|  1.36M|    characters,
  146|  1.36M|    follows_nonquote_scalar
  147|  1.36M|  );
  148|  1.36M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage17followsEmRm:
  119|  1.36M|simdjson_inline uint64_t follows(const uint64_t match, uint64_t &overflow) {
  120|  1.36M|  const uint64_t result = match << 1 | overflow;
  121|  1.36M|  overflow = match >> 63;
  122|  1.36M|  return result;
  123|  1.36M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage110json_blockC2ENS2_17json_string_blockENS1_20json_character_blockEm:
   29|  1.36M|  _string(string), _characters(characters), _follows_potential_nonquote_scalar(follows_potential_nonquote_scalar) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage112json_scanner6finishEv:
  150|  10.9k|simdjson_inline error_code json_scanner::finish() {
  151|  10.9k|  return string_scanner.finish();
  152|  10.9k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage110json_block16structural_startEv:
   35|  1.36M|  simdjson_inline uint64_t structural_start() const noexcept { return potential_structural_start() & ~_string.string_tail(); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage110json_block26potential_structural_startEv:
   59|  1.36M|  simdjson_inline uint64_t potential_structural_start() const noexcept { return _characters.op() | potential_scalar_start(); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage110json_block22potential_scalar_startEv:
   64|  1.36M|  simdjson_inline uint64_t potential_scalar_start() const noexcept {
   65|       |    // The term "scalar" refers to anything except structural characters and white space
   66|       |    // (so letters, numbers, quotes).
   67|       |    // Whenever it is preceded by something that is not a structural element ({,},[,],:, ") nor a white-space
   68|       |    // then we know that it is irrelevant structurally.
   69|  1.36M|    return _characters.scalar() & ~follows_potential_scalar();
   70|  1.36M|  }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage110json_block24follows_potential_scalarEv:
   75|  1.36M|  simdjson_inline uint64_t follows_potential_scalar() const noexcept {
   76|       |    // _follows_potential_nonquote_scalar: is defined as marking any character that follows a character
   77|       |    // that is not a structural element ({,},[,],:, comma) nor a quote (") and that is not a
   78|       |    // white space.
   79|       |    // It is understood that within quoted region, anything at all could be marked (irrelevant).
   80|  1.36M|    return _follows_potential_nonquote_scalar;
   81|  1.36M|  }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage110json_block23non_quote_inside_stringEm:
   42|  1.36M|  simdjson_inline uint64_t non_quote_inside_string(uint64_t mask) const noexcept { return _string.non_quote_inside_string(mask); }

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage119json_string_scanner4nextERKNS1_4simd8simd8x64IhEE:
  110|  1.36M|simdjson_inline json_string_block json_string_scanner::next(const simd::simd8x64<uint8_t>& in) {
  111|  1.36M|  const uint64_t backslash = in.eq('\\');
  112|  1.36M|  const uint64_t escaped = find_escaped(backslash);
  113|  1.36M|  const uint64_t quote = in.eq('"') & ~escaped;
  114|       |
  115|       |  //
  116|       |  // prefix_xor flips on bits inside the string (and flips off the end quote).
  117|       |  //
  118|       |  // Then we xor with prev_in_string: if we were in a string already, its effect is flipped
  119|       |  // (characters inside strings are outside, and characters outside strings are inside).
  120|       |  //
  121|  1.36M|  const uint64_t in_string = prefix_xor(quote) ^ prev_in_string;
  122|       |
  123|       |  //
  124|       |  // Check if we're still in a string at the end of the box so the next block will know
  125|       |  //
  126|       |  // right shift of a signed value expected to be well-defined and standard
  127|       |  // compliant as of C++20, John Regher from Utah U. says this is fine code
  128|       |  //
  129|  1.36M|  prev_in_string = uint64_t(static_cast<int64_t>(in_string) >> 63);
  130|       |
  131|       |  // Use ^ to turn the beginning quote off, and the end quote on.
  132|       |
  133|       |  // We are returning a function-local object so either we get a move constructor
  134|       |  // or we get copy elision.
  135|  1.36M|  return json_string_block(
  136|  1.36M|    backslash,
  137|  1.36M|    escaped,
  138|  1.36M|    quote,
  139|  1.36M|    in_string
  140|  1.36M|  );
  141|  1.36M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage119json_string_scanner23find_escaped_branchlessEm:
   85|  3.20k|simdjson_inline uint64_t json_string_scanner::find_escaped_branchless(uint64_t backslash) {
   86|       |  // If there was overflow, pretend the first character isn't a backslash
   87|  3.20k|  backslash &= ~prev_escaped;
   88|  3.20k|  uint64_t follows_escape = backslash << 1 | prev_escaped;
   89|       |
   90|       |  // Get sequences starting on even bits by clearing out the odd series using +
   91|  3.20k|  const uint64_t even_bits = 0x5555555555555555ULL;
   92|  3.20k|  uint64_t odd_sequence_starts = backslash & ~even_bits & ~follows_escape;
   93|  3.20k|  uint64_t sequences_starting_on_even_bits;
   94|  3.20k|  prev_escaped = add_overflow(odd_sequence_starts, backslash, &sequences_starting_on_even_bits);
   95|  3.20k|  uint64_t invert_mask = sequences_starting_on_even_bits << 1; // The mask we want to return is the *escaped* bits, not escapes.
   96|       |
   97|       |  // Mask every other backslashed character as an escaped character
   98|       |  // Flip the mask for sequences that start on even bits, to correct them
   99|  3.20k|  return (even_bits ^ invert_mask) & follows_escape;
  100|  3.20k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage117json_string_blockC2Emmmm:
    9|  1.36M|  _backslash(backslash), _escaped(escaped), _quote(quote), _in_string(in_string) {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage117json_string_block5quoteEv:
   16|  1.36M|  simdjson_inline uint64_t quote() const { return _quote; }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage119json_string_scanner6finishEv:
  143|  10.9k|simdjson_inline error_code json_string_scanner::finish() {
  144|  10.9k|  if (prev_in_string) {
  ------------------
  |  Branch (144:7): [True: 156, False: 10.8k]
  ------------------
  145|    156|    return UNCLOSED_STRING;
  146|    156|  }
  147|  10.8k|  return SUCCESS;
  148|  10.9k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage117json_string_block11string_tailEv:
   28|  1.36M|  simdjson_inline uint64_t string_tail() const { return _in_string ^ _quote; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage117json_string_block23non_quote_inside_stringEm:
   24|  1.36M|  simdjson_inline uint64_t non_quote_inside_string(uint64_t mask) const { return mask & _in_string; }

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage123json_structural_indexer5indexILm128EEENS_10error_codeEPKhmRNS0_25dom_parser_implementationENS_11stage1_modeE:
  197|  11.0k|error_code json_structural_indexer::index(const uint8_t *buf, size_t len, dom_parser_implementation &parser, stage1_mode partial) noexcept {
  198|  11.0k|  if (simdjson_unlikely(len > parser.capacity())) { return CAPACITY; }
  ------------------
  |  |  120|  11.0k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 0, False: 11.0k]
  |  |  ------------------
  ------------------
  199|       |  // We guard the rest of the code so that we can assume that len > 0 throughout.
  200|  11.0k|  if (len == 0) { return EMPTY; }
  ------------------
  |  Branch (200:7): [True: 89, False: 10.9k]
  ------------------
  201|  10.9k|  if (is_streaming(partial)) {
  ------------------
  |  Branch (201:7): [True: 0, False: 10.9k]
  ------------------
  202|      0|    len = trim_partial_utf8(buf, len);
  203|       |    // If you end up with an empty window after trimming
  204|       |    // the partial UTF-8 bytes, then chances are good that you
  205|       |    // have an UTF-8 formatting error.
  206|      0|    if(len == 0) { return UTF8_ERROR; }
  ------------------
  |  Branch (206:8): [True: 0, False: 0]
  ------------------
  207|      0|  }
  208|  10.9k|  buf_block_reader<STEP_SIZE> reader(buf, len);
  209|  10.9k|  json_structural_indexer indexer(parser.structural_indexes.get());
  210|       |
  211|       |  // Read all but the last block
  212|   684k|  while (reader.has_full_block()) {
  ------------------
  |  Branch (212:10): [True: 673k, False: 10.9k]
  ------------------
  213|   673k|    indexer.step<STEP_SIZE>(reader.full_block(), reader);
  214|   673k|  }
  215|       |  // Take care of the last block (will always be there unless file is empty which is
  216|       |  // not supposed to happen.)
  217|  10.9k|  uint8_t block[STEP_SIZE];
  218|  10.9k|  if (simdjson_unlikely(reader.get_remainder(block) == 0)) { return UNEXPECTED_ERROR; }
  ------------------
  |  |  120|  10.9k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 0, False: 10.9k]
  |  |  ------------------
  ------------------
  219|  10.9k|  indexer.step<STEP_SIZE>(block, reader);
  220|  10.9k|  return indexer.finish(parser, reader.block_index(), len, partial);
  221|  10.9k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage123json_structural_indexerC2EPj:
  156|  10.9k|simdjson_inline json_structural_indexer::json_structural_indexer(uint32_t *structural_indexes) : indexer{structural_indexes} {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexerC2EPj:
   21|  10.9k|  simdjson_inline bit_indexer(uint32_t *index_buf) : tail(index_buf) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage123json_structural_indexer4stepILm128EEEvPKhRNS1_16buf_block_readerIXT_EEE:
  224|   684k|simdjson_inline void json_structural_indexer::step<128>(const uint8_t *block, buf_block_reader<128> &reader) noexcept {
  225|   684k|  simd::simd8x64<uint8_t> in_1(block);
  226|   684k|  simd::simd8x64<uint8_t> in_2(block+64);
  227|   684k|  json_block block_1 = scanner.next(in_1);
  228|   684k|  json_block block_2 = scanner.next(in_2);
  229|   684k|  this->next(in_1, block_1, reader.block_index());
  230|   684k|  this->next(in_2, block_2, reader.block_index()+64);
  231|   684k|  reader.advance();
  232|   684k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage123json_structural_indexer4nextERKNS1_4simd8simd8x64IhEERKNS2_10json_blockEm:
  242|  1.36M|simdjson_inline void json_structural_indexer::next(const simd::simd8x64<uint8_t>& in, const json_block& block, size_t idx) {
  243|  1.36M|  uint64_t unescaped = in.lteq(0x1F);
  244|  1.36M|#if SIMDJSON_UTF8VALIDATION
  245|  1.36M|  checker.check_next_input(in);
  246|  1.36M|#endif
  247|  1.36M|  indexer.write(uint32_t(idx-64), prev_structurals); // Output *last* iteration's structurals to the parser
  248|  1.36M|  prev_structurals = block.structural_start();
  249|  1.36M|  unescaped_chars_error |= block.non_quote_inside_string(unescaped);
  250|  1.36M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer5writeEjm:
   34|  1.38M|  simdjson_inline void write(uint32_t idx, uint64_t bits) {
   35|       |    // In some instances, the next branch is expensive because it is mispredicted.
   36|       |    // Unfortunately, in other cases,
   37|       |    // it helps tremendously.
   38|  1.38M|    if (bits == 0)
  ------------------
  |  Branch (38:9): [True: 801k, False: 578k]
  ------------------
   39|   801k|        return;
   40|       |#if SIMDJSON_PREFER_REVERSE_BITS
   41|       |    /**
   42|       |     * ARM lacks a fast trailing zero instruction, but it has a fast
   43|       |     * bit reversal instruction and a fast leading zero instruction.
   44|       |     * Thus it may be profitable to reverse the bits (once) and then
   45|       |     * to rely on a sequence of instructions that call the leading
   46|       |     * zero instruction.
   47|       |     *
   48|       |     * Performance notes:
   49|       |     * The chosen routine is not optimal in terms of data dependency
   50|       |     * since zero_leading_bit might require two instructions. However,
   51|       |     * it tends to minimize the total number of instructions which is
   52|       |     * beneficial.
   53|       |     */
   54|       |
   55|       |    uint64_t rev_bits = reverse_bits(bits);
   56|       |    int cnt = static_cast<int>(count_ones(bits));
   57|       |    int i = 0;
   58|       |    // Do the first 8 all together
   59|       |    for (; i<8; i++) {
   60|       |      int lz = leading_zeroes(rev_bits);
   61|       |      this->tail[i] = static_cast<uint32_t>(idx) + lz;
   62|       |      rev_bits = zero_leading_bit(rev_bits, lz);
   63|       |    }
   64|       |    // Do the next 8 all together (we hope in most cases it won't happen at all
   65|       |    // and the branch is easily predicted).
   66|       |    if (simdjson_unlikely(cnt > 8)) {
   67|       |      i = 8;
   68|       |      for (; i<16; i++) {
   69|       |        int lz = leading_zeroes(rev_bits);
   70|       |        this->tail[i] = static_cast<uint32_t>(idx) + lz;
   71|       |        rev_bits = zero_leading_bit(rev_bits, lz);
   72|       |      }
   73|       |
   74|       |
   75|       |      // Most files don't have 16+ structurals per block, so we take several basically guaranteed
   76|       |      // branch mispredictions here. 16+ structurals per block means either punctuation ({} [] , :)
   77|       |      // or the start of a value ("abc" true 123) every four characters.
   78|       |      if (simdjson_unlikely(cnt > 16)) {
   79|       |        i = 16;
   80|       |        while (rev_bits != 0) {
   81|       |          int lz = leading_zeroes(rev_bits);
   82|       |          this->tail[i++] = static_cast<uint32_t>(idx) + lz;
   83|       |          rev_bits = zero_leading_bit(rev_bits, lz);
   84|       |        }
   85|       |      }
   86|       |    }
   87|       |    this->tail += cnt;
   88|       |#else // SIMDJSON_PREFER_REVERSE_BITS
   89|       |    /**
   90|       |     * Under recent x64 systems, we often have both a fast trailing zero
   91|       |     * instruction and a fast 'clear-lower-bit' instruction so the following
   92|       |     * algorithm can be competitive.
   93|       |     */
   94|       |
   95|   578k|    int cnt = static_cast<int>(count_ones(bits));
   96|       |    // Do the first 8 all together
   97|  5.20M|    for (int i=0; i<8; i++) {
  ------------------
  |  Branch (97:19): [True: 4.63M, False: 578k]
  ------------------
   98|  4.63M|      this->tail[i] = idx + trailing_zeroes(bits);
   99|  4.63M|      bits = clear_lowest_bit(bits);
  100|  4.63M|    }
  101|       |
  102|       |    // Do the next 8 all together (we hope in most cases it won't happen at all
  103|       |    // and the branch is easily predicted).
  104|   578k|    if (simdjson_unlikely(cnt > 8)) {
  ------------------
  |  |  120|   578k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 548k, False: 30.3k]
  |  |  ------------------
  ------------------
  105|  4.93M|      for (int i=8; i<16; i++) {
  ------------------
  |  Branch (105:21): [True: 4.38M, False: 548k]
  ------------------
  106|  4.38M|        this->tail[i] = idx + trailing_zeroes(bits);
  107|  4.38M|        bits = clear_lowest_bit(bits);
  108|  4.38M|      }
  109|       |
  110|       |      // Most files don't have 16+ structurals per block, so we take several basically guaranteed
  111|       |      // branch mispredictions here. 16+ structurals per block means either punctuation ({} [] , :)
  112|       |      // or the start of a value ("abc" true 123) every four characters.
  113|   548k|      if (simdjson_unlikely(cnt > 16)) {
  ------------------
  |  |  120|   548k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 539k, False: 8.99k]
  |  |  ------------------
  ------------------
  114|   539k|        int i = 16;
  115|  25.2M|        do {
  116|  25.2M|          this->tail[i] = idx + trailing_zeroes(bits);
  117|  25.2M|          bits = clear_lowest_bit(bits);
  118|  25.2M|          i++;
  119|  25.2M|        } while (i < cnt);
  ------------------
  |  Branch (119:18): [True: 24.6M, False: 539k]
  ------------------
  120|   539k|      }
  121|   548k|    }
  122|       |
  123|   578k|    this->tail += cnt;
  124|   578k|#endif
  125|   578k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage123json_structural_indexer6finishERNS0_25dom_parser_implementationEmmNS_11stage1_modeE:
  252|  10.9k|simdjson_inline error_code json_structural_indexer::finish(dom_parser_implementation &parser, size_t idx, size_t len, stage1_mode partial) {
  253|       |  // Write out the final iteration's structurals
  254|  10.9k|  indexer.write(uint32_t(idx-64), prev_structurals);
  255|  10.9k|  error_code error = scanner.finish();
  256|       |  // We deliberately break down the next expression so that it is
  257|       |  // human readable.
  258|  10.9k|  const bool should_we_exit = is_streaming(partial) ?
  ------------------
  |  Branch (258:31): [True: 0, False: 10.9k]
  ------------------
  259|      0|    ((error != SUCCESS) && (error != UNCLOSED_STRING)) // when partial we tolerate UNCLOSED_STRING
  ------------------
  |  Branch (259:6): [True: 0, False: 0]
  |  Branch (259:28): [True: 0, False: 0]
  ------------------
  260|  10.9k|    : (error != SUCCESS); // if partial is false, we must have SUCCESS
  261|  10.9k|  const bool have_unclosed_string = (error == UNCLOSED_STRING);
  262|  10.9k|  if (simdjson_unlikely(should_we_exit)) { return error; }
  ------------------
  |  |  120|  10.9k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 156, False: 10.8k]
  |  |  ------------------
  ------------------
  263|       |
  264|  10.8k|  if (unescaped_chars_error) {
  ------------------
  |  Branch (264:7): [True: 171, False: 10.6k]
  ------------------
  265|    171|    return UNESCAPED_CHARS;
  266|    171|  }
  267|  10.6k|  parser.n_structural_indexes = uint32_t(indexer.tail - parser.structural_indexes.get());
  268|       |  /***
  269|       |   * The On Demand API requires special padding.
  270|       |   *
  271|       |   * This is related to https://github.com/simdjson/simdjson/issues/906
  272|       |   * Basically, we want to make sure that if the parsing continues beyond the last (valid)
  273|       |   * structural character, it quickly stops.
  274|       |   * Only three structural characters can be repeated without triggering an error in JSON:  [,] and }.
  275|       |   * We repeat the padding character (at 'len'). We don't know what it is, but if the parsing
  276|       |   * continues, then it must be [,] or }.
  277|       |   * Suppose it is ] or }. We backtrack to the first character, what could it be that would
  278|       |   * not trigger an error? It could be ] or } but no, because you can't start a document that way.
  279|       |   * It can't be a comma, a colon or any simple value. So the only way we could continue is
  280|       |   * if the repeated character is [. But if so, the document must start with [. But if the document
  281|       |   * starts with [, it should end with ]. If we enforce that rule, then we would get
  282|       |   * ][[ which is invalid.
  283|       |   *
  284|       |   * This is illustrated with the test array_iterate_unclosed_error() on the following input:
  285|       |   * R"({ "a": [,,)"
  286|       |   **/
  287|  10.6k|  parser.structural_indexes[parser.n_structural_indexes] = uint32_t(len); // used later in partial == stage1_mode::streaming_final
  288|  10.6k|  parser.structural_indexes[parser.n_structural_indexes + 1] = uint32_t(len);
  289|  10.6k|  parser.structural_indexes[parser.n_structural_indexes + 2] = 0;
  290|  10.6k|  parser.next_structural_index = 0;
  291|       |  // a valid JSON file cannot have zero structural indexes - we should have found something
  292|  10.6k|  if (simdjson_unlikely(parser.n_structural_indexes == 0u)) {
  ------------------
  |  |  120|  10.6k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 4, False: 10.6k]
  |  |  ------------------
  ------------------
  293|      4|    return EMPTY;
  294|      4|  }
  295|  10.6k|  if (simdjson_unlikely(parser.structural_indexes[parser.n_structural_indexes - 1] > len)) {
  ------------------
  |  |  120|  10.6k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 0, False: 10.6k]
  |  |  ------------------
  ------------------
  296|      0|    return UNEXPECTED_ERROR;
  297|      0|  }
  298|  10.6k|  if (partial == stage1_mode::streaming_partial) {
  ------------------
  |  Branch (298:7): [True: 0, False: 10.6k]
  ------------------
  299|       |    // If we have an unclosed string, then the last structural
  300|       |    // will be the quote and we want to make sure to omit it.
  301|      0|    if(have_unclosed_string) {
  ------------------
  |  Branch (301:8): [True: 0, False: 0]
  ------------------
  302|      0|      parser.n_structural_indexes--;
  303|       |      // a valid JSON file cannot have zero structural indexes - we should have found something
  304|      0|      if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { return CAPACITY; }
  ------------------
  |  |  120|      0|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  305|      0|    }
  306|       |    // We truncate the input to the end of the last complete document (or zero).
  307|      0|    auto new_structural_indexes = find_next_document_index(parser);
  308|      0|    if (new_structural_indexes == 0 && parser.n_structural_indexes > 0) {
  ------------------
  |  Branch (308:9): [True: 0, False: 0]
  |  Branch (308:40): [True: 0, False: 0]
  ------------------
  309|      0|      if(parser.structural_indexes[0] == 0) {
  ------------------
  |  Branch (309:10): [True: 0, False: 0]
  ------------------
  310|       |        // If the buffer is partial and we started at index 0 but the document is
  311|       |        // incomplete, it's too big to parse.
  312|      0|        return CAPACITY;
  313|      0|      } else {
  314|       |        // It is possible that the document could be parsed, we just had a lot
  315|       |        // of white space.
  316|      0|        parser.n_structural_indexes = 0;
  317|      0|        return EMPTY;
  318|      0|      }
  319|      0|    }
  320|       |
  321|      0|    parser.n_structural_indexes = new_structural_indexes;
  322|  10.6k|  } else if (partial == stage1_mode::streaming_final) {
  ------------------
  |  Branch (322:14): [True: 0, False: 10.6k]
  ------------------
  323|      0|    if(have_unclosed_string) { parser.n_structural_indexes--; }
  ------------------
  |  Branch (323:8): [True: 0, False: 0]
  ------------------
  324|       |    // We truncate the input to the end of the last complete document (or zero).
  325|       |    // Because partial == stage1_mode::streaming_final, it means that we may
  326|       |    // silently ignore trailing garbage. Though it sounds bad, we do it
  327|       |    // deliberately because many people who have streams of JSON documents
  328|       |    // will truncate them for processing. E.g., imagine that you are uncompressing
  329|       |    // the data from a size file or receiving it in chunks from the network. You
  330|       |    // may not know where exactly the last document will be. Meanwhile the
  331|       |    // document_stream instances allow people to know the JSON documents they are
  332|       |    // parsing (see the iterator.source() method).
  333|      0|    parser.n_structural_indexes = find_next_document_index(parser);
  334|       |    // We store the initial n_structural_indexes so that the client can see
  335|       |    // whether we used truncation. If initial_n_structural_indexes == parser.n_structural_indexes,
  336|       |    // then this will query parser.structural_indexes[parser.n_structural_indexes] which is len,
  337|       |    // otherwise, it will copy some prior index.
  338|      0|    parser.structural_indexes[parser.n_structural_indexes + 1] = parser.structural_indexes[parser.n_structural_indexes];
  339|       |    // This next line is critical, do not change it unless you understand what you are
  340|       |    // doing.
  341|      0|    parser.structural_indexes[parser.n_structural_indexes] = uint32_t(len);
  342|      0|    if (simdjson_unlikely(parser.n_structural_indexes == 0u)) {
  ------------------
  |  |  120|      0|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  343|       |        // We tolerate an unclosed string at the very end of the stream. Indeed, users
  344|       |        // often load their data in bulk without being careful and they want us to ignore
  345|       |        // the trailing garbage.
  346|      0|        return EMPTY;
  347|      0|    }
  348|      0|  }
  349|  10.6k|  checker.check_eof();
  350|  10.6k|  return checker.errors();
  351|  10.6k|}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_115utf8_validation12utf8_checker16check_next_inputERKNS1_4simd8simd8x64IhEE:
  173|  1.36M|    simdjson_inline void check_next_input(const simd8x64<uint8_t>& input) {
  174|  1.36M|      if(simdjson_likely(is_ascii(input))) {
  ------------------
  |  |  117|  1.36M|  #define simdjson_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (117:30): [True: 1.35M, False: 18.8k]
  |  |  ------------------
  ------------------
  175|  1.35M|        this->error |= this->prev_incomplete;
  176|  1.35M|      } else {
  177|       |        // you might think that a for-loop would work, but under Visual Studio, it is not good enough.
  178|  18.8k|        static_assert((simd8x64<uint8_t>::NUM_CHUNKS == 1)
  179|  18.8k|                ||(simd8x64<uint8_t>::NUM_CHUNKS == 2)
  180|  18.8k|                || (simd8x64<uint8_t>::NUM_CHUNKS == 4),
  181|  18.8k|                "We support one, two or four chunks per 64-byte block.");
  182|  18.8k|        SIMDJSON_IF_CONSTEXPR (simd8x64<uint8_t>::NUM_CHUNKS == 1) {
  ------------------
  |  |  167|  18.8k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
  |  Branch (182:32): [Folded - Ignored]
  ------------------
  183|      0|          this->check_utf8_bytes(input.chunks[0], this->prev_input_block);
  184|  18.8k|        } else SIMDJSON_IF_CONSTEXPR (simd8x64<uint8_t>::NUM_CHUNKS == 2) {
  ------------------
  |  |  167|  18.8k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
  |  Branch (184:39): [Folded - Ignored]
  ------------------
  185|  18.8k|          this->check_utf8_bytes(input.chunks[0], this->prev_input_block);
  186|  18.8k|          this->check_utf8_bytes(input.chunks[1], input.chunks[0]);
  187|  18.8k|        } else SIMDJSON_IF_CONSTEXPR (simd8x64<uint8_t>::NUM_CHUNKS == 4) {
  ------------------
  |  |  167|      0|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
  |  Branch (187:39): [Folded - Ignored]
  ------------------
  188|      0|          this->check_utf8_bytes(input.chunks[0], this->prev_input_block);
  189|      0|          this->check_utf8_bytes(input.chunks[1], input.chunks[0]);
  190|      0|          this->check_utf8_bytes(input.chunks[2], input.chunks[1]);
  191|      0|          this->check_utf8_bytes(input.chunks[3], input.chunks[2]);
  192|      0|        }
  193|  18.8k|        this->prev_incomplete = is_incomplete(input.chunks[simd8x64<uint8_t>::NUM_CHUNKS-1]);
  194|  18.8k|        this->prev_input_block = input.chunks[simd8x64<uint8_t>::NUM_CHUNKS-1];
  195|  18.8k|      }
  196|  1.36M|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_115utf8_validation12utf8_checker16check_utf8_bytesENS1_4simd5simd8IhEES6_:
  148|  37.7k|    simdjson_inline void check_utf8_bytes(const simd8<uint8_t> input, const simd8<uint8_t> prev_input) {
  149|       |      // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes
  150|       |      // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers)
  151|  37.7k|      simd8<uint8_t> prev1 = input.prev<1>(prev_input);
  152|  37.7k|      simd8<uint8_t> sc = check_special_cases(input, prev1);
  153|  37.7k|      this->error |= check_multibyte_lengths(input, prev_input, sc);
  154|  37.7k|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_115utf8_validation19check_special_casesENS1_4simd5simd8IhEES5_:
    8|  37.7k|  simdjson_inline simd8<uint8_t> check_special_cases(const simd8<uint8_t> input, const simd8<uint8_t> prev1) {
    9|       |// Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII)
   10|       |// Bit 1 = Too Long (ASCII followed by continuation)
   11|       |// Bit 2 = Overlong 3-byte
   12|       |// Bit 4 = Surrogate
   13|       |// Bit 5 = Overlong 2-byte
   14|       |// Bit 7 = Two Continuations
   15|  37.7k|    constexpr const uint8_t TOO_SHORT   = 1<<0; // 11______ 0_______
   16|       |                                                // 11______ 11______
   17|  37.7k|    constexpr const uint8_t TOO_LONG    = 1<<1; // 0_______ 10______
   18|  37.7k|    constexpr const uint8_t OVERLONG_3  = 1<<2; // 11100000 100_____
   19|  37.7k|    constexpr const uint8_t SURROGATE   = 1<<4; // 11101101 101_____
   20|  37.7k|    constexpr const uint8_t OVERLONG_2  = 1<<5; // 1100000_ 10______
   21|  37.7k|    constexpr const uint8_t TWO_CONTS   = 1<<7; // 10______ 10______
   22|  37.7k|    constexpr const uint8_t TOO_LARGE   = 1<<3; // 11110100 1001____
   23|       |                                                // 11110100 101_____
   24|       |                                                // 11110101 1001____
   25|       |                                                // 11110101 101_____
   26|       |                                                // 1111011_ 1001____
   27|       |                                                // 1111011_ 101_____
   28|       |                                                // 11111___ 1001____
   29|       |                                                // 11111___ 101_____
   30|  37.7k|    constexpr const uint8_t TOO_LARGE_1000 = 1<<6;
   31|       |                                                // 11110101 1000____
   32|       |                                                // 1111011_ 1000____
   33|       |                                                // 11111___ 1000____
   34|  37.7k|    constexpr const uint8_t OVERLONG_4  = 1<<6; // 11110000 1000____
   35|       |
   36|  37.7k|    const simd8<uint8_t> byte_1_high = prev1.shr<4>().lookup_16<uint8_t>(
   37|       |      // 0_______ ________ <ASCII in byte 1>
   38|  37.7k|      TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG,
   39|  37.7k|      TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG,
   40|       |      // 10______ ________ <continuation in byte 1>
   41|  37.7k|      TWO_CONTS, TWO_CONTS, TWO_CONTS, TWO_CONTS,
   42|       |      // 1100____ ________ <two byte lead in byte 1>
   43|  37.7k|      TOO_SHORT | OVERLONG_2,
   44|       |      // 1101____ ________ <two byte lead in byte 1>
   45|  37.7k|      TOO_SHORT,
   46|       |      // 1110____ ________ <three byte lead in byte 1>
   47|  37.7k|      TOO_SHORT | OVERLONG_3 | SURROGATE,
   48|       |      // 1111____ ________ <four+ byte lead in byte 1>
   49|  37.7k|      TOO_SHORT | TOO_LARGE | TOO_LARGE_1000 | OVERLONG_4
   50|  37.7k|    );
   51|  37.7k|    constexpr const uint8_t CARRY = TOO_SHORT | TOO_LONG | TWO_CONTS; // These all have ____ in byte 1 .
   52|  37.7k|    const simd8<uint8_t> byte_1_low = (prev1 & 0x0F).lookup_16<uint8_t>(
   53|       |      // ____0000 ________
   54|  37.7k|      CARRY | OVERLONG_3 | OVERLONG_2 | OVERLONG_4,
   55|       |      // ____0001 ________
   56|  37.7k|      CARRY | OVERLONG_2,
   57|       |      // ____001_ ________
   58|  37.7k|      CARRY,
   59|  37.7k|      CARRY,
   60|       |
   61|       |      // ____0100 ________
   62|  37.7k|      CARRY | TOO_LARGE,
   63|       |      // ____0101 ________
   64|  37.7k|      CARRY | TOO_LARGE | TOO_LARGE_1000,
   65|       |      // ____011_ ________
   66|  37.7k|      CARRY | TOO_LARGE | TOO_LARGE_1000,
   67|  37.7k|      CARRY | TOO_LARGE | TOO_LARGE_1000,
   68|       |
   69|       |      // ____1___ ________
   70|  37.7k|      CARRY | TOO_LARGE | TOO_LARGE_1000,
   71|  37.7k|      CARRY | TOO_LARGE | TOO_LARGE_1000,
   72|  37.7k|      CARRY | TOO_LARGE | TOO_LARGE_1000,
   73|  37.7k|      CARRY | TOO_LARGE | TOO_LARGE_1000,
   74|  37.7k|      CARRY | TOO_LARGE | TOO_LARGE_1000,
   75|       |      // ____1101 ________
   76|  37.7k|      CARRY | TOO_LARGE | TOO_LARGE_1000 | SURROGATE,
   77|  37.7k|      CARRY | TOO_LARGE | TOO_LARGE_1000,
   78|  37.7k|      CARRY | TOO_LARGE | TOO_LARGE_1000
   79|  37.7k|    );
   80|  37.7k|    const simd8<uint8_t> byte_2_high = input.shr<4>().lookup_16<uint8_t>(
   81|       |      // ________ 0_______ <ASCII in byte 2>
   82|  37.7k|      TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT,
   83|  37.7k|      TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT,
   84|       |
   85|       |      // ________ 1000____
   86|  37.7k|      TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE_1000 | OVERLONG_4,
   87|       |      // ________ 1001____
   88|  37.7k|      TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE,
   89|       |      // ________ 101_____
   90|  37.7k|      TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE  | TOO_LARGE,
   91|  37.7k|      TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE  | TOO_LARGE,
   92|       |
   93|       |      // ________ 11______
   94|  37.7k|      TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT
   95|  37.7k|    );
   96|  37.7k|    return (byte_1_high & byte_1_low & byte_2_high);
   97|  37.7k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_115utf8_validation23check_multibyte_lengthsENS1_4simd5simd8IhEES5_S5_:
   99|  37.7k|      const simd8<uint8_t> prev_input, const simd8<uint8_t> sc) {
  100|  37.7k|    simd8<uint8_t> prev2 = input.prev<2>(prev_input);
  101|  37.7k|    simd8<uint8_t> prev3 = input.prev<3>(prev_input);
  102|  37.7k|    simd8<uint8_t> must23 = simd8<uint8_t>(must_be_2_3_continuation(prev2, prev3));
  103|  37.7k|    simd8<uint8_t> must23_80 = must23 & uint8_t(0x80);
  104|  37.7k|    return must23_80 ^ sc;
  105|  37.7k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_115utf8_validation13is_incompleteENS1_4simd5simd8IhEE:
  111|  18.8k|  simdjson_inline simd8<uint8_t> is_incomplete(const simd8<uint8_t> input) {
  112|       |    // If the previous input's last 3 bytes match this, they're too short (they ended at EOF):
  113|       |    // ... 1111____ 111_____ 11______
  114|  18.8k|#if SIMDJSON_IMPLEMENTATION_ICELAKE
  115|  18.8k|    static const uint8_t max_array[64] = {
  116|  18.8k|      255, 255, 255, 255, 255, 255, 255, 255,
  117|  18.8k|      255, 255, 255, 255, 255, 255, 255, 255,
  118|  18.8k|      255, 255, 255, 255, 255, 255, 255, 255,
  119|  18.8k|      255, 255, 255, 255, 255, 255, 255, 255,
  120|  18.8k|      255, 255, 255, 255, 255, 255, 255, 255,
  121|  18.8k|      255, 255, 255, 255, 255, 255, 255, 255,
  122|  18.8k|      255, 255, 255, 255, 255, 255, 255, 255,
  123|  18.8k|      255, 255, 255, 255, 255, 0xf0u-1, 0xe0u-1, 0xc0u-1
  124|  18.8k|    };
  125|       |#else
  126|       |    static const uint8_t max_array[32] = {
  127|       |      255, 255, 255, 255, 255, 255, 255, 255,
  128|       |      255, 255, 255, 255, 255, 255, 255, 255,
  129|       |      255, 255, 255, 255, 255, 255, 255, 255,
  130|       |      255, 255, 255, 255, 255, 0xf0u-1, 0xe0u-1, 0xc0u-1
  131|       |    };
  132|       |#endif
  133|  18.8k|    const simd8<uint8_t> max_value(&max_array[sizeof(max_array)-sizeof(simd8<uint8_t>)]);
  134|  18.8k|    return input.gt_bits(max_value);
  135|  18.8k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_115utf8_validation12utf8_checker9check_eofEv:
  159|  10.6k|    simdjson_inline void check_eof() {
  160|       |      // If the previous block had incomplete UTF-8 characters at the end, an ASCII block can't
  161|       |      // possibly finish them.
  162|  10.6k|      this->error |= this->prev_incomplete;
  163|  10.6k|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_115utf8_validation12utf8_checker6errorsEv:
  198|  10.6k|    simdjson_inline error_code errors() {
  199|  10.6k|      return this->error.any_bits_set_anywhere() ? error_code::UTF8_ERROR : error_code::SUCCESS;
  ------------------
  |  Branch (199:14): [True: 611, False: 10.0k]
  ------------------
  200|  10.6k|    }

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage213json_iteratorC2ERNS0_25dom_parser_implementationEm:
  240|  10.0k|    dom_parser{_dom_parser} {
  241|  10.0k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage213json_iterator13walk_documentILb0ENS2_12tape_builderEEENS_10error_codeERT0_:
  112|  10.0k|simdjson_warn_unused simdjson_inline error_code json_iterator::walk_document(V &visitor) noexcept {
  113|  10.0k|  logger::log_start();
  114|       |
  115|       |  //
  116|       |  // Start the document
  117|       |  //
  118|  10.0k|  if (at_eof()) { return EMPTY; }
  ------------------
  |  Branch (118:7): [True: 0, False: 10.0k]
  ------------------
  119|  10.0k|  log_start_value("document");
  120|  10.0k|  SIMDJSON_TRY( visitor.visit_document_start(*this) );
  ------------------
  |  |  279|  10.0k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 10.0k]
  |  |  ------------------
  ------------------
  121|       |
  122|       |  //
  123|       |  // Read first value
  124|       |  //
  125|  10.0k|  {
  126|  10.0k|    auto value = advance();
  127|       |
  128|       |    // Make sure the outer object or array is closed before continuing; otherwise, there are ways we
  129|       |    // could get into memory corruption. See https://github.com/simdjson/simdjson/issues/906
  130|  10.0k|    if (!STREAMING) {
  ------------------
  |  Branch (130:9): [Folded - Ignored]
  ------------------
  131|  10.0k|      switch (*value) {
  ------------------
  |  Branch (131:15): [True: 2.81k, False: 7.22k]
  ------------------
  132|  3.98k|        case '{': if (last_structural() != '}') { log_value("starting brace unmatched"); return TAPE_ERROR; }; break;
  ------------------
  |  Branch (132:9): [True: 3.98k, False: 6.05k]
  |  Branch (132:23): [True: 34, False: 3.94k]
  ------------------
  133|  3.24k|        case '[': if (last_structural() != ']') { log_value("starting bracket unmatched"); return TAPE_ERROR; }; break;
  ------------------
  |  Branch (133:9): [True: 3.24k, False: 6.79k]
  |  Branch (133:23): [True: 23, False: 3.22k]
  ------------------
  134|  10.0k|      }
  135|  10.0k|    }
  136|       |
  137|  9.98k|    switch (*value) {
  138|  3.94k|      case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin;
  ------------------
  |  |  279|    133|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 133]
  |  |  ------------------
  ------------------
  |  Branch (138:7): [True: 3.94k, False: 6.03k]
  |  Branch (138:21): [True: 133, False: 3.81k]
  ------------------
  139|  3.81k|      case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin;
  ------------------
  |  |  279|     92|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 92]
  |  |  ------------------
  ------------------
  |  Branch (139:7): [True: 3.22k, False: 6.76k]
  |  Branch (139:21): [True: 92, False: 3.12k]
  ------------------
  140|  3.12k|      default: SIMDJSON_TRY( visitor.visit_root_primitive(*this, value) ); break;
  ------------------
  |  |  279|  2.81k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 902, False: 1.91k]
  |  |  ------------------
  ------------------
  |  Branch (140:7): [True: 2.81k, False: 7.16k]
  ------------------
  141|  9.98k|    }
  142|  9.98k|  }
  143|  2.13k|  goto document_end;
  144|       |
  145|       |//
  146|       |// Object parser states
  147|       |//
  148|  4.99k|object_begin:
  149|  4.99k|  log_start_value("object");
  150|  4.99k|  depth++;
  151|  4.99k|  if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; }
  ------------------
  |  Branch (151:7): [True: 1, False: 4.99k]
  ------------------
  152|  4.99k|  dom_parser.is_array[depth] = false;
  153|  4.99k|  SIMDJSON_TRY( visitor.visit_object_start(*this) );
  ------------------
  |  |  279|  4.99k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 4.99k]
  |  |  ------------------
  ------------------
  154|       |
  155|  4.99k|  {
  156|  4.99k|    auto key = advance();
  157|  4.99k|    if (*key != '"') { log_error("Object does not start with a key"); return TAPE_ERROR; }
  ------------------
  |  Branch (157:9): [True: 71, False: 4.92k]
  ------------------
  158|  4.92k|    SIMDJSON_TRY( visitor.increment_count(*this) );
  ------------------
  |  |  279|  4.92k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 4.92k]
  |  |  ------------------
  ------------------
  159|  4.92k|    SIMDJSON_TRY( visitor.visit_key(*this, key) );
  ------------------
  |  |  279|  4.92k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 77, False: 4.84k]
  |  |  ------------------
  ------------------
  160|  4.84k|  }
  161|       |
  162|   102k|object_field:
  163|   102k|  if (simdjson_unlikely( *advance() != ':' )) { log_error("Missing colon after key in object"); return TAPE_ERROR; }
  ------------------
  |  |  120|   102k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 392, False: 102k]
  |  |  ------------------
  ------------------
  164|   102k|  {
  165|   102k|    auto value = advance();
  166|   102k|    switch (*value) {
  167|  2.08k|      case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin;
  ------------------
  |  |  279|  1.20k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 1.20k]
  |  |  ------------------
  ------------------
  |  Branch (167:7): [True: 2.08k, False: 100k]
  |  Branch (167:21): [True: 1.20k, False: 888]
  ------------------
  168|  49.6k|      case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin;
  ------------------
  |  |  279|  33.2k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 33.2k]
  |  |  ------------------
  ------------------
  |  Branch (168:7): [True: 49.6k, False: 52.5k]
  |  Branch (168:21): [True: 33.2k, False: 16.3k]
  ------------------
  169|  50.4k|      default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break;
  ------------------
  |  |  279|  50.4k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 654, False: 49.8k]
  |  |  ------------------
  ------------------
  |  Branch (169:7): [True: 50.4k, False: 51.7k]
  ------------------
  170|   102k|    }
  171|   102k|  }
  172|       |
  173|   101k|object_continue:
  174|   101k|  switch (*advance()) {
  175|  97.8k|    case ',':
  ------------------
  |  Branch (175:5): [True: 97.8k, False: 3.16k]
  ------------------
  176|  97.8k|      SIMDJSON_TRY( visitor.increment_count(*this) );
  ------------------
  |  |  279|  97.8k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 97.8k]
  |  |  ------------------
  ------------------
  177|  97.8k|      {
  178|  97.8k|        auto key = advance();
  179|  97.8k|        if (simdjson_unlikely( *key != '"' )) { log_error("Key string missing at beginning of field in object"); return TAPE_ERROR; }
  ------------------
  |  |  120|  97.8k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 18, False: 97.8k]
  |  |  ------------------
  ------------------
  180|  97.8k|        SIMDJSON_TRY( visitor.visit_key(*this, key) );
  ------------------
  |  |  279|  97.8k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 85, False: 97.7k]
  |  |  ------------------
  ------------------
  181|  97.7k|      }
  182|      0|      goto object_field;
  183|  3.07k|    case '}': log_end_value("object"); SIMDJSON_TRY( visitor.visit_object_end(*this) ); goto scope_end;
  ------------------
  |  |  279|  3.07k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 3.07k]
  |  |  ------------------
  ------------------
  |  Branch (183:5): [True: 3.07k, False: 97.9k]
  ------------------
  184|     87|    default: log_error("No comma between object fields"); return TAPE_ERROR;
  ------------------
  |  Branch (184:5): [True: 87, False: 100k]
  ------------------
  185|   101k|  }
  186|       |
  187|  36.6k|scope_end:
  188|  36.6k|  depth--;
  189|  36.6k|  if (depth == 0) { goto document_end; }
  ------------------
  |  Branch (189:7): [True: 4.72k, False: 31.9k]
  ------------------
  190|  31.9k|  if (dom_parser.is_array[depth]) { goto array_continue; }
  ------------------
  |  Branch (190:7): [True: 15.2k, False: 16.7k]
  ------------------
  191|  16.7k|  goto object_continue;
  192|       |
  193|       |//
  194|       |// Array parser states
  195|       |//
  196|  45.3k|array_begin:
  197|  45.3k|  log_start_value("array");
  198|  45.3k|  depth++;
  199|  45.3k|  if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; }
  ------------------
  |  Branch (199:7): [True: 1, False: 45.3k]
  ------------------
  200|  45.3k|  dom_parser.is_array[depth] = true;
  201|  45.3k|  SIMDJSON_TRY( visitor.visit_array_start(*this) );
  ------------------
  |  |  279|  45.3k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 45.3k]
  |  |  ------------------
  ------------------
  202|  45.3k|  SIMDJSON_TRY( visitor.increment_count(*this) );
  ------------------
  |  |  279|  45.3k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 45.3k]
  |  |  ------------------
  ------------------
  203|       |
  204|  14.2M|array_value:
  205|  14.2M|  {
  206|  14.2M|    auto value = advance();
  207|  14.2M|    switch (*value) {
  208|    922|      case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin;
  ------------------
  |  |  279|    630|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 630]
  |  |  ------------------
  ------------------
  |  Branch (208:7): [True: 922, False: 14.2M]
  |  Branch (208:21): [True: 630, False: 292]
  ------------------
  209|  26.6k|      case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin;
  ------------------
  |  |  279|    764|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 764]
  |  |  ------------------
  ------------------
  |  Branch (209:7): [True: 26.6k, False: 14.2M]
  |  Branch (209:21): [True: 764, False: 25.8k]
  ------------------
  210|  14.2M|      default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break;
  ------------------
  |  |  279|  14.2M|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 748, False: 14.2M]
  |  |  ------------------
  ------------------
  |  Branch (210:7): [True: 14.2M, False: 27.5k]
  ------------------
  211|  14.2M|    }
  212|  14.2M|  }
  213|       |
  214|  14.2M|array_continue:
  215|  14.2M|  switch (*advance()) {
  216|  14.1M|    case ',': SIMDJSON_TRY( visitor.increment_count(*this) ); goto array_value;
  ------------------
  |  |  279|  14.1M|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 14.1M]
  |  |  ------------------
  ------------------
  |  Branch (216:5): [True: 14.1M, False: 33.6k]
  ------------------
  217|  33.5k|    case ']': log_end_value("array"); SIMDJSON_TRY( visitor.visit_array_end(*this) ); goto scope_end;
  ------------------
  |  |  279|  33.5k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 33.5k]
  |  |  ------------------
  ------------------
  |  Branch (217:5): [True: 33.5k, False: 14.1M]
  ------------------
  218|     80|    default: log_error("Missing comma between array values"); return TAPE_ERROR;
  ------------------
  |  Branch (218:5): [True: 80, False: 14.2M]
  ------------------
  219|  14.2M|  }
  220|       |
  221|  6.86k|document_end:
  222|  6.86k|  log_end_value("document");
  223|  6.86k|  SIMDJSON_TRY( visitor.visit_document_end(*this) );
  ------------------
  |  |  279|  6.86k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 6.86k]
  |  |  ------------------
  ------------------
  224|       |
  225|  6.86k|  dom_parser.next_structural_index = uint32_t(next_structural - &dom_parser.structural_indexes[0]);
  226|       |
  227|       |  // If we didn't make it to the end, it's an error
  228|  6.86k|  if ( !STREAMING && dom_parser.next_structural_index != dom_parser.n_structural_indexes ) {
  ------------------
  |  Branch (228:8): [Folded - Ignored]
  |  Branch (228:22): [True: 111, False: 6.75k]
  ------------------
  229|    111|    log_error("More than one JSON value at the root of the document, or extra characters at the end of the JSON!");
  230|    111|    return TAPE_ERROR;
  231|    111|  }
  232|       |
  233|  6.75k|  return SUCCESS;
  234|       |
  235|  6.86k|} // walk_document()
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator6at_eofEv:
  253|  10.0k|simdjson_inline bool json_iterator::at_eof() const noexcept {
  254|  10.0k|  return next_structural == &dom_parser.structural_indexes[dom_parser.n_structural_indexes];
  255|  10.0k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator15log_start_valueEPKc:
  267|  60.3k|simdjson_inline void json_iterator::log_start_value(const char *type) const noexcept {
  268|  60.3k|  logger::log_line(*this, "+", type, "");
  269|  60.3k|  if (logger::LOG_ENABLED) { logger::log_depth++; }
  ------------------
  |  Branch (269:7): [Folded - Ignored]
  ------------------
  270|  60.3k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage213json_iterator7advanceEv:
  246|  28.9M|simdjson_inline const uint8_t *json_iterator::advance() noexcept {
  247|  28.9M|  return &buf[*(next_structural++)];
  248|  28.9M|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator15last_structuralEv:
  259|  7.22k|simdjson_inline uint8_t json_iterator::last_structural() const noexcept {
  260|  7.22k|  return buf[dom_parser.structural_indexes[dom_parser.n_structural_indexes - 1]];
  261|  7.22k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator9log_valueEPKc:
  263|  14.3M|simdjson_inline void json_iterator::log_value(const char *type) const noexcept {
  264|  14.3M|  logger::log_line(*this, "", type, "");
  265|  14.3M|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator4peekEv:
  243|  86.4k|simdjson_inline const uint8_t *json_iterator::peek() const noexcept {
  244|  86.4k|  return &buf[*(next_structural)];
  245|  86.4k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage213json_iterator20visit_root_primitiveINS2_12tape_builderEEENS_10error_codeERT_PKh:
  282|  2.81k|simdjson_warn_unused simdjson_inline error_code json_iterator::visit_root_primitive(V &visitor, const uint8_t *value) noexcept {
  283|  2.81k|  switch (*value) {
  284|    416|    case '"': return visitor.visit_root_string(*this, value);
  ------------------
  |  Branch (284:5): [True: 416, False: 2.39k]
  ------------------
  285|     67|    case 't': return visitor.visit_root_true_atom(*this, value);
  ------------------
  |  Branch (285:5): [True: 67, False: 2.74k]
  ------------------
  286|    105|    case 'f': return visitor.visit_root_false_atom(*this, value);
  ------------------
  |  Branch (286:5): [True: 105, False: 2.70k]
  ------------------
  287|     65|    case 'n': return visitor.visit_root_null_atom(*this, value);
  ------------------
  |  Branch (287:5): [True: 65, False: 2.74k]
  ------------------
  288|    189|    case '-':
  ------------------
  |  Branch (288:5): [True: 189, False: 2.62k]
  ------------------
  289|  1.16k|    case '0': case '1': case '2': case '3': case '4':
  ------------------
  |  Branch (289:5): [True: 174, False: 2.63k]
  |  Branch (289:15): [True: 343, False: 2.47k]
  |  Branch (289:25): [True: 224, False: 2.58k]
  |  Branch (289:35): [True: 88, False: 2.72k]
  |  Branch (289:45): [True: 148, False: 2.66k]
  ------------------
  290|  2.08k|    case '5': case '6': case '7': case '8': case '9':
  ------------------
  |  Branch (290:5): [True: 115, False: 2.69k]
  |  Branch (290:15): [True: 96, False: 2.71k]
  |  Branch (290:25): [True: 87, False: 2.72k]
  |  Branch (290:35): [True: 161, False: 2.65k]
  |  Branch (290:45): [True: 459, False: 2.35k]
  ------------------
  291|  2.08k|      return visitor.visit_root_number(*this, value);
  292|     76|    default:
  ------------------
  |  Branch (292:5): [True: 76, False: 2.73k]
  ------------------
  293|     76|      log_error("Document starts with a non-value character");
  294|     76|      return TAPE_ERROR;
  295|  2.81k|  }
  296|  2.81k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator13remaining_lenEv:
  249|  6.48k|simdjson_inline size_t json_iterator::remaining_len() const noexcept {
  250|  6.48k|  return dom_parser.len - *(next_structural-1);
  251|  6.48k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator9log_errorEPKc:
  277|  1.34k|simdjson_inline void json_iterator::log_error(const char *error) const noexcept {
  278|  1.34k|  logger::log_line(*this, "", "ERROR", error);
  279|  1.34k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage213json_iterator15visit_primitiveINS2_12tape_builderEEENS_10error_codeERT_PKh:
  298|  14.2M|simdjson_warn_unused simdjson_inline error_code json_iterator::visit_primitive(V &visitor, const uint8_t *value) noexcept {
  299|  14.2M|  switch (*value) {
  300|  2.73k|    case '"': return visitor.visit_string(*this, value);
  ------------------
  |  Branch (300:5): [True: 2.73k, False: 14.2M]
  ------------------
  301|    477|    case 't': return visitor.visit_true_atom(*this, value);
  ------------------
  |  Branch (301:5): [True: 477, False: 14.2M]
  ------------------
  302|    477|    case 'f': return visitor.visit_false_atom(*this, value);
  ------------------
  |  Branch (302:5): [True: 477, False: 14.2M]
  ------------------
  303|    493|    case 'n': return visitor.visit_null_atom(*this, value);
  ------------------
  |  Branch (303:5): [True: 493, False: 14.2M]
  ------------------
  304|  3.17k|    case '-':
  ------------------
  |  Branch (304:5): [True: 3.17k, False: 14.2M]
  ------------------
  305|   358k|    case '0': case '1': case '2': case '3': case '4':
  ------------------
  |  Branch (305:5): [True: 83.1k, False: 14.1M]
  |  Branch (305:15): [True: 10.2k, False: 14.2M]
  |  Branch (305:25): [True: 32.3k, False: 14.2M]
  |  Branch (305:35): [True: 4.86k, False: 14.2M]
  |  Branch (305:45): [True: 224k, False: 14.0M]
  ------------------
  306|  14.2M|    case '5': case '6': case '7': case '8': case '9':
  ------------------
  |  Branch (306:5): [True: 10.7k, False: 14.2M]
  |  Branch (306:15): [True: 188k, False: 14.0M]
  |  Branch (306:25): [True: 10.5k, False: 14.2M]
  |  Branch (306:35): [True: 10.6M, False: 3.56M]
  |  Branch (306:45): [True: 2.98M, False: 11.2M]
  ------------------
  307|  14.2M|      return visitor.visit_number(*this, value);
  308|     67|    default:
  ------------------
  |  Branch (308:5): [True: 67, False: 14.2M]
  ------------------
  309|     67|      log_error("Non-value found when value was expected!");
  310|     67|      return TAPE_ERROR;
  311|  14.2M|  }
  312|  14.2M|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator13log_end_valueEPKc:
  272|  43.5k|simdjson_inline void json_iterator::log_end_value(const char *type) const noexcept {
  273|  43.5k|  if (logger::LOG_ENABLED) { logger::log_depth--; }
  ------------------
  |  Branch (273:7): [Folded - Ignored]
  ------------------
  274|  43.5k|  logger::log_line(*this, "-", type, "");
  275|  43.5k|}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16logger9log_startEv:
   32|  10.0k|  static simdjson_inline void log_start() {
   33|  10.0k|    if (LOG_ENABLED) {
  ------------------
  |  Branch (33:9): [Folded - Ignored]
  ------------------
   34|      0|      log_depth = 0;
   35|      0|      printf("\n");
   36|      0|      printf("| %-*s | %-*s | %-*s | %-*s | Detail |\n", LOG_EVENT_LEN, "Event", LOG_BUFFER_LEN, "Buffer", LOG_SMALL_BUFFER_LEN, "Next", 5, "Next#");
   37|      0|      printf("|%.*s|%.*s|%.*s|%.*s|--------|\n", LOG_EVENT_LEN+2, DASHES, LOG_BUFFER_LEN+2, DASHES, LOG_SMALL_BUFFER_LEN+2, DASHES, 5+2, DASHES);
   38|      0|    }
   39|  10.0k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16logger8log_lineIKNS1_6stage213json_iteratorEEEvRT_PKcSA_SA_:
   49|  14.4M|  static simdjson_inline void log_line(S &structurals, const char *title_prefix, const char *title, const char *detail) {
   50|  14.4M|    if (LOG_ENABLED) {
  ------------------
  |  Branch (50:9): [Folded - Ignored]
  ------------------
   51|      0|      printf("| %*s%s%-*s ", log_depth*2, "", title_prefix, LOG_EVENT_LEN - log_depth*2 - int(strlen(title_prefix)), title);
   52|      0|      auto current_index = structurals.at_beginning() ? nullptr : structurals.next_structural-1;
  ------------------
  |  Branch (52:28): [True: 0, False: 0]
  ------------------
   53|      0|      auto next_index = structurals.next_structural;
   54|      0|      auto current = current_index ? &structurals.buf[*current_index] : reinterpret_cast<const uint8_t*>("                                                       ");
  ------------------
  |  Branch (54:22): [True: 0, False: 0]
  ------------------
   55|      0|      auto next = &structurals.buf[*next_index];
   56|      0|      {
   57|       |        // Print the next N characters in the buffer.
   58|      0|        printf("| ");
   59|       |        // Otherwise, print the characters starting from the buffer position.
   60|       |        // Print spaces for unprintable or newline characters.
   61|      0|        for (int i=0;i<LOG_BUFFER_LEN;i++) {
  ------------------
  |  Branch (61:22): [True: 0, False: 0]
  ------------------
   62|      0|          printf("%c", printable_char(current[i]));
   63|      0|        }
   64|      0|        printf(" ");
   65|       |        // Print the next N characters in the buffer.
   66|      0|        printf("| ");
   67|       |        // Otherwise, print the characters starting from the buffer position.
   68|       |        // Print spaces for unprintable or newline characters.
   69|      0|        for (int i=0;i<LOG_SMALL_BUFFER_LEN;i++) {
  ------------------
  |  Branch (69:22): [True: 0, False: 0]
  ------------------
   70|      0|          printf("%c", printable_char(next[i]));
   71|      0|        }
   72|      0|        printf(" ");
   73|      0|      }
   74|      0|      if (current_index) {
  ------------------
  |  Branch (74:11): [True: 0, False: 0]
  ------------------
   75|      0|        printf("| %*u ", LOG_INDEX_LEN, *current_index);
   76|      0|      } else {
   77|      0|        printf("| %-*s ", LOG_INDEX_LEN, "");
   78|      0|      }
   79|       |      // printf("| %*u ", LOG_INDEX_LEN, structurals.next_tape_index());
   80|      0|      printf("| %-s ", detail);
   81|      0|      printf("|\n");
   82|      0|    }
   83|  14.4M|  }

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113stringparsing12parse_stringEPKhPhb:
  142|   105k|simdjson_warn_unused simdjson_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) {
  143|   219k|  while (1) {
  ------------------
  |  Branch (143:10): [Folded - Ignored]
  ------------------
  144|       |    // Copy the next n bytes, and find the backslash and quote in them.
  145|   219k|    auto bs_quote = backslash_and_quote::copy_and_find(src, dst);
  146|       |    // If the next thing is the end quote, copy and return
  147|   219k|    if (bs_quote.has_quote_first()) {
  ------------------
  |  Branch (147:9): [True: 105k, False: 114k]
  ------------------
  148|       |      // we encountered quotes first. Move dst to point to quotes and exit
  149|   105k|      return dst + bs_quote.quote_index();
  150|   105k|    }
  151|   114k|    if (bs_quote.has_backslash()) {
  ------------------
  |  Branch (151:9): [True: 10.2k, False: 103k]
  ------------------
  152|       |      /* find out where the backspace is */
  153|  10.2k|      auto bs_dist = bs_quote.backslash_index();
  154|  10.2k|      uint8_t escape_char = src[bs_dist + 1];
  155|       |      /* we encountered backslash first. Handle backslash */
  156|  10.2k|      if (escape_char == 'u') {
  ------------------
  |  Branch (156:11): [True: 5.59k, False: 4.66k]
  ------------------
  157|       |        /* move src/dst up to the start; they will be further adjusted
  158|       |           within the unicode codepoint handling code. */
  159|  5.59k|        src += bs_dist;
  160|  5.59k|        dst += bs_dist;
  161|  5.59k|        if (!handle_unicode_codepoint(&src, &dst, allow_replacement)) {
  ------------------
  |  Branch (161:13): [True: 332, False: 5.26k]
  ------------------
  162|    332|          return nullptr;
  163|    332|        }
  164|  5.59k|      } else {
  165|       |        /* simple 1:1 conversion. Will eat bs_dist+2 characters in input and
  166|       |         * write bs_dist+1 characters to output
  167|       |         * note this may reach beyond the part of the buffer we've actually
  168|       |         * seen. I think this is ok */
  169|  4.66k|        uint8_t escape_result = escape_map[escape_char];
  170|  4.66k|        if (escape_result == 0u) {
  ------------------
  |  Branch (170:13): [True: 104, False: 4.56k]
  ------------------
  171|    104|          return nullptr; /* bogus escape value is an error */
  172|    104|        }
  173|  4.56k|        dst[bs_dist] = escape_result;
  174|  4.56k|        src += bs_dist + 2;
  175|  4.56k|        dst += bs_dist + 1;
  176|  4.56k|      }
  177|   103k|    } else {
  178|       |      /* they are the same. Since they can't co-occur, it means we
  179|       |       * encountered neither. */
  180|   103k|      src += backslash_and_quote::BYTES_PROCESSED;
  181|   103k|      dst += backslash_and_quote::BYTES_PROCESSED;
  182|   103k|    }
  183|   114k|  }
  184|       |  /* can't be reached */
  185|      0|  return nullptr;
  186|   105k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113stringparsing24handle_unicode_codepointEPPKhPPhb:
   44|  5.59k|                                            uint8_t **dst_ptr, bool allow_replacement) {
   45|       |  // Use the default Unicode Character 'REPLACEMENT CHARACTER' (U+FFFD)
   46|  5.59k|  constexpr uint32_t substitution_code_point = 0xfffd;
   47|       |  // jsoncharutils::hex_to_u32_nocheck fills high 16 bits of the return value with 1s if the
   48|       |  // conversion isn't valid; we defer the check for this to inside the
   49|       |  // multilingual plane check
   50|  5.59k|  uint32_t code_point = jsoncharutils::hex_to_u32_nocheck(*src_ptr + 2);
   51|  5.59k|  *src_ptr += 6;
   52|       |
   53|       |  // If we found a high surrogate, we must
   54|       |  // check for low surrogate for characters
   55|       |  // outside the Basic
   56|       |  // Multilingual Plane.
   57|  5.59k|  if (code_point >= 0xd800 && code_point < 0xdc00) {
  ------------------
  |  Branch (57:7): [True: 3.25k, False: 2.34k]
  |  Branch (57:31): [True: 1.37k, False: 1.88k]
  ------------------
   58|  1.37k|    const uint8_t *src_data = *src_ptr;
   59|       |    /* Compiler optimizations convert this to a single 16-bit load and compare on most platforms */
   60|  1.37k|    if (((src_data[0] << 8) | src_data[1]) != ((static_cast<uint8_t> ('\\') << 8) | static_cast<uint8_t> ('u'))) {
  ------------------
  |  Branch (60:9): [True: 152, False: 1.21k]
  ------------------
   61|    152|      if(!allow_replacement) { return false; }
  ------------------
  |  Branch (61:10): [True: 152, False: 0]
  ------------------
   62|      0|      code_point = substitution_code_point;
   63|  1.21k|    } else {
   64|  1.21k|      uint32_t code_point_2 = jsoncharutils::hex_to_u32_nocheck(src_data + 2);
   65|       |
   66|       |      // We have already checked that the high surrogate is valid and
   67|       |      // (code_point - 0xd800) < 1024.
   68|       |      //
   69|       |      // Check that code_point_2 is in the range 0xdc00..0xdfff
   70|       |      // and that code_point_2 was parsed from valid hex.
   71|  1.21k|      uint32_t low_bit = code_point_2 - 0xdc00;
   72|  1.21k|      if (low_bit >> 10) {
  ------------------
  |  Branch (72:11): [True: 68, False: 1.15k]
  ------------------
   73|     68|        if(!allow_replacement) { return false; }
  ------------------
  |  Branch (73:12): [True: 68, False: 0]
  ------------------
   74|      0|        code_point = substitution_code_point;
   75|  1.15k|      } else {
   76|  1.15k|        code_point =  (((code_point - 0xd800) << 10) | low_bit) + 0x10000;
   77|  1.15k|        *src_ptr += 6;
   78|  1.15k|      }
   79|       |
   80|  1.21k|    }
   81|  4.22k|  } else if (code_point >= 0xdc00 && code_point <= 0xdfff) {
  ------------------
  |  Branch (81:14): [True: 1.88k, False: 2.34k]
  |  Branch (81:38): [True: 60, False: 1.82k]
  ------------------
   82|       |      // If we encounter a low surrogate (not preceded by a high surrogate)
   83|       |      // then we have an error.
   84|     60|      if(!allow_replacement) { return false; }
  ------------------
  |  Branch (84:10): [True: 60, False: 0]
  ------------------
   85|      0|      code_point = substitution_code_point;
   86|      0|  }
   87|  5.31k|  size_t offset = jsoncharutils::codepoint_to_utf8(code_point, *dst_ptr);
   88|  5.31k|  *dst_ptr += offset;
   89|  5.31k|  return offset > 0;
   90|  5.59k|}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder14parse_documentILb0EEENS_10error_codeERNS0_25dom_parser_implementationERNS_3dom8documentE:
   89|  10.0k|    dom::document &doc) noexcept {
   90|  10.0k|  dom_parser.doc = &doc;
   91|  10.0k|  json_iterator iter(dom_parser, STREAMING ? dom_parser.next_structural_index : 0);
  ------------------
  |  Branch (91:34): [Folded - Ignored]
  ------------------
   92|  10.0k|  tape_builder builder(doc);
   93|  10.0k|  return iter.walk_document<STREAMING>(builder);
   94|  10.0k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builderC2ERNS_3dom8documentE:
  143|  10.0k|simdjson_inline tape_builder::tape_builder(dom::document &doc) noexcept : tape{doc.tape.get()}, current_string_buf_loc{doc.string_buf.get()} {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder20visit_document_startERNS2_13json_iteratorE:
  109|  10.0k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_document_start(json_iterator &iter) noexcept {
  110|  10.0k|  start_container(iter);
  111|  10.0k|  return SUCCESS;
  112|  10.0k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15start_containerERNS2_13json_iteratorE:
  243|  60.3k|simdjson_inline void tape_builder::start_container(json_iterator &iter) noexcept {
  244|  60.3k|  iter.dom_parser.open_containers[iter.depth].tape_index = next_tape_index(iter);
  245|  60.3k|  iter.dom_parser.open_containers[iter.depth].count = 0;
  246|  60.3k|  tape.skip(); // We don't actually *write* the start element until the end.
  247|  60.3k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15next_tape_indexERNS2_13json_iteratorE:
  232|   139k|simdjson_inline uint32_t tape_builder::next_tape_index(json_iterator &iter) const noexcept {
  233|   139k|  return uint32_t(tape.next_tape_loc - iter.dom_parser.doc->tape.get());
  234|   139k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder18visit_empty_objectERNS2_13json_iteratorE:
  102|  1.96k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_empty_object(json_iterator &iter) noexcept {
  103|  1.96k|  return empty_container(iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT);
  104|  1.96k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15empty_containerERNS2_13json_iteratorENS_8internal9tape_typeES7_:
  236|  36.1k|simdjson_warn_unused simdjson_inline error_code tape_builder::empty_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept {
  237|  36.1k|  auto start_index = next_tape_index(iter);
  238|  36.1k|  tape.append(start_index+2, start);
  239|  36.1k|  tape.append(start_index, end);
  240|  36.1k|  return SUCCESS;
  241|  36.1k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder17visit_empty_arrayERNS2_13json_iteratorE:
  105|  34.1k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_empty_array(json_iterator &iter) noexcept {
  106|  34.1k|  return empty_container(iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY);
  107|  34.1k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder20visit_root_primitiveERNS2_13json_iteratorEPKh:
   96|  2.81k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_primitive(json_iterator &iter, const uint8_t *value) noexcept {
   97|  2.81k|  return iter.visit_root_primitive(*this, value);
   98|  2.81k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder17visit_root_stringERNS2_13json_iteratorEPKh:
  157|    416|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_string(json_iterator &iter, const uint8_t *value) noexcept {
  158|    416|  return visit_string(iter, value);
  159|    416|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder12visit_stringERNS2_13json_iteratorEPKhb:
  145|   105k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_string(json_iterator &iter, const uint8_t *value, bool key) noexcept {
  146|   105k|  iter.log_value(key ? "key" : "string");
  ------------------
  |  Branch (146:18): [True: 102k, False: 3.15k]
  ------------------
  147|   105k|  uint8_t *dst = on_start_string(iter);
  148|   105k|  dst = stringparsing::parse_string(value+1, dst, false); // We do not allow replacement when the escape characters are invalid.
  149|   105k|  if (dst == nullptr) {
  ------------------
  |  Branch (149:7): [True: 436, False: 105k]
  ------------------
  150|    436|    iter.log_error("Invalid escape in string");
  151|    436|    return STRING_ERROR;
  152|    436|  }
  153|   105k|  on_end_string(dst);
  154|   105k|  return SUCCESS;
  155|   105k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15on_start_stringERNS2_13json_iteratorE:
  262|   105k|simdjson_inline uint8_t *tape_builder::on_start_string(json_iterator &iter) noexcept {
  263|       |  // we advance the point, accounting for the fact that we have a NULL termination
  264|   105k|  tape.append(current_string_buf_loc - iter.dom_parser.doc->string_buf.get(), internal::tape_type::STRING);
  265|   105k|  return current_string_buf_loc + sizeof(uint32_t);
  266|   105k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder13on_end_stringEPh:
  268|   105k|simdjson_inline void tape_builder::on_end_string(uint8_t *dst) noexcept {
  269|   105k|  uint32_t str_length = uint32_t(dst - (current_string_buf_loc + sizeof(uint32_t)));
  270|       |  // TODO check for overflow in case someone has a crazy string (>=4GB?)
  271|       |  // But only add the overflow check when the document itself exceeds 4GB
  272|       |  // Currently unneeded because we refuse to parse docs larger or equal to 4GB.
  273|   105k|  memcpy(current_string_buf_loc, &str_length, sizeof(uint32_t));
  274|       |  // NULL termination is still handy if you expect all your strings to
  275|       |  // be NULL terminated? It comes at a small cost
  276|   105k|  *dst = 0;
  277|   105k|  current_string_buf_loc = dst + 1;
  278|   105k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder20visit_root_true_atomERNS2_13json_iteratorEPKh:
  195|     67|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_true_atom(json_iterator &iter, const uint8_t *value) noexcept {
  196|     67|  iter.log_value("true");
  197|     67|  if (!atomparsing::is_valid_true_atom(value, iter.remaining_len())) { return T_ATOM_ERROR; }
  ------------------
  |  Branch (197:7): [True: 56, False: 11]
  ------------------
  198|     11|  tape.append(0, internal::tape_type::TRUE_VALUE);
  199|     11|  return SUCCESS;
  200|     67|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder21visit_root_false_atomERNS2_13json_iteratorEPKh:
  209|    105|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_false_atom(json_iterator &iter, const uint8_t *value) noexcept {
  210|    105|  iter.log_value("false");
  211|    105|  if (!atomparsing::is_valid_false_atom(value, iter.remaining_len())) { return F_ATOM_ERROR; }
  ------------------
  |  Branch (211:7): [True: 97, False: 8]
  ------------------
  212|      8|  tape.append(0, internal::tape_type::FALSE_VALUE);
  213|      8|  return SUCCESS;
  214|    105|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder20visit_root_null_atomERNS2_13json_iteratorEPKh:
  223|     65|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_null_atom(json_iterator &iter, const uint8_t *value) noexcept {
  224|     65|  iter.log_value("null");
  225|     65|  if (!atomparsing::is_valid_null_atom(value, iter.remaining_len())) { return N_ATOM_ERROR; }
  ------------------
  |  Branch (225:7): [True: 52, False: 13]
  ------------------
  226|     13|  tape.append(0, internal::tape_type::NULL_VALUE);
  227|     13|  return SUCCESS;
  228|     65|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder17visit_root_numberERNS2_13json_iteratorEPKh:
  166|  2.08k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_number(json_iterator &iter, const uint8_t *value) noexcept {
  167|       |  //
  168|       |  // We need to make a copy to make sure that the string is space terminated.
  169|       |  // This is not about padding the input, which should already padded up
  170|       |  // to len + SIMDJSON_PADDING. However, we have no control at this stage
  171|       |  // on how the padding was done. What if the input string was padded with nulls?
  172|       |  // It is quite common for an input string to have an extra null character (C string).
  173|       |  // We do not want to allow 9\0 (where \0 is the null character) inside a JSON
  174|       |  // document, but the string "9\0" by itself is fine. So we make a copy and
  175|       |  // pad the input with spaces when we know that there is just one input element.
  176|       |  // This copy is relatively expensive, but it will almost never be called in
  177|       |  // practice unless you are in the strange scenario where you have many JSON
  178|       |  // documents made of single atoms.
  179|       |  //
  180|  2.08k|  std::unique_ptr<uint8_t[]>copy(new (std::nothrow) uint8_t[iter.remaining_len() + SIMDJSON_PADDING]);
  181|  2.08k|  if (copy.get() == nullptr) { return MEMALLOC; }
  ------------------
  |  Branch (181:7): [True: 0, False: 2.08k]
  ------------------
  182|  2.08k|  std::memcpy(copy.get(), value, iter.remaining_len());
  183|  2.08k|  std::memset(copy.get() + iter.remaining_len(), ' ', SIMDJSON_PADDING);
  184|  2.08k|  error_code error = visit_number(iter, copy.get());
  185|  2.08k|  return error;
  186|  2.08k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder12visit_numberERNS2_13json_iteratorEPKh:
  161|  14.2M|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_number(json_iterator &iter, const uint8_t *value) noexcept {
  162|  14.2M|  iter.log_value("number");
  163|  14.2M|  return numberparsing::parse_number(value, tape);
  164|  14.2M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder18visit_object_startERNS2_13json_iteratorE:
  113|  4.99k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_object_start(json_iterator &iter) noexcept {
  114|  4.99k|  start_container(iter);
  115|  4.99k|  return SUCCESS;
  116|  4.99k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15increment_countERNS2_13json_iteratorE:
  138|  14.3M|simdjson_warn_unused simdjson_inline error_code tape_builder::increment_count(json_iterator &iter) noexcept {
  139|  14.3M|  iter.dom_parser.open_containers[iter.depth].count++; // we have a key value pair in the object at parser.dom_parser.depth - 1
  140|  14.3M|  return SUCCESS;
  141|  14.3M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder9visit_keyERNS2_13json_iteratorEPKh:
  134|   102k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_key(json_iterator &iter, const uint8_t *key) noexcept {
  135|   102k|  return visit_string(iter, key, true);
  136|   102k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15visit_primitiveERNS2_13json_iteratorEPKh:
   99|  14.2M|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_primitive(json_iterator &iter, const uint8_t *value) noexcept {
  100|  14.2M|  return iter.visit_primitive(*this, value);
  101|  14.2M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15visit_true_atomERNS2_13json_iteratorEPKh:
  188|    477|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_true_atom(json_iterator &iter, const uint8_t *value) noexcept {
  189|    477|  iter.log_value("true");
  190|    477|  if (!atomparsing::is_valid_true_atom(value)) { return T_ATOM_ERROR; }
  ------------------
  |  Branch (190:7): [True: 83, False: 394]
  ------------------
  191|    394|  tape.append(0, internal::tape_type::TRUE_VALUE);
  192|    394|  return SUCCESS;
  193|    477|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder16visit_false_atomERNS2_13json_iteratorEPKh:
  202|    477|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_false_atom(json_iterator &iter, const uint8_t *value) noexcept {
  203|    477|  iter.log_value("false");
  204|    477|  if (!atomparsing::is_valid_false_atom(value)) { return F_ATOM_ERROR; }
  ------------------
  |  Branch (204:7): [True: 89, False: 388]
  ------------------
  205|    388|  tape.append(0, internal::tape_type::FALSE_VALUE);
  206|    388|  return SUCCESS;
  207|    477|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15visit_null_atomERNS2_13json_iteratorEPKh:
  216|    493|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_null_atom(json_iterator &iter, const uint8_t *value) noexcept {
  217|    493|  iter.log_value("null");
  218|    493|  if (!atomparsing::is_valid_null_atom(value)) { return N_ATOM_ERROR; }
  ------------------
  |  Branch (218:7): [True: 71, False: 422]
  ------------------
  219|    422|  tape.append(0, internal::tape_type::NULL_VALUE);
  220|    422|  return SUCCESS;
  221|    493|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder16visit_object_endERNS2_13json_iteratorE:
  122|  3.07k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_object_end(json_iterator &iter) noexcept {
  123|  3.07k|  return end_container(iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT);
  124|  3.07k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder13end_containerERNS2_13json_iteratorENS_8internal9tape_typeES7_:
  249|  36.6k|simdjson_warn_unused simdjson_inline error_code tape_builder::end_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept {
  250|       |  // Write the ending tape element, pointing at the start location
  251|  36.6k|  const uint32_t start_tape_index = iter.dom_parser.open_containers[iter.depth].tape_index;
  252|  36.6k|  tape.append(start_tape_index, end);
  253|       |  // Write the start tape element, pointing at the end location (and including count)
  254|       |  // count can overflow if it exceeds 24 bits... so we saturate
  255|       |  // the convention being that a cnt of 0xffffff or more is undetermined in value (>=  0xffffff).
  256|  36.6k|  const uint32_t count = iter.dom_parser.open_containers[iter.depth].count;
  257|  36.6k|  const uint32_t cntsat = count > 0xFFFFFF ? 0xFFFFFF : count;
  ------------------
  |  Branch (257:27): [True: 0, False: 36.6k]
  ------------------
  258|  36.6k|  tape_writer::write(iter.dom_parser.doc->tape[start_tape_index], next_tape_index(iter) | (uint64_t(cntsat) << 32), start);
  259|  36.6k|  return SUCCESS;
  260|  36.6k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder17visit_array_startERNS2_13json_iteratorE:
  117|  45.3k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_array_start(json_iterator &iter) noexcept {
  118|  45.3k|  start_container(iter);
  119|  45.3k|  return SUCCESS;
  120|  45.3k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15visit_array_endERNS2_13json_iteratorE:
  125|  33.5k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_array_end(json_iterator &iter) noexcept {
  126|  33.5k|  return end_container(iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY);
  127|  33.5k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder18visit_document_endERNS2_13json_iteratorE:
  128|  6.86k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_document_end(json_iterator &iter) noexcept {
  129|  6.86k|  constexpr uint32_t start_tape_index = 0;
  130|  6.86k|  tape.append(start_tape_index, internal::tape_type::ROOT);
  131|  6.86k|  tape_writer::write(iter.dom_parser.doc->tape[start_tape_index], next_tape_index(iter), internal::tape_type::ROOT);
  132|  6.86k|  return SUCCESS;
  133|  6.86k|}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage211tape_writer4skipEv:
   73|  60.3k|simdjson_inline void tape_writer::skip() noexcept {
   74|  60.3k|  next_tape_loc++;
   75|  60.3k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage211tape_writer6appendEmNS_8internal9tape_typeE:
   85|  14.4M|simdjson_inline void tape_writer::append(uint64_t val, internal::tape_type t) noexcept {
   86|  14.4M|  *next_tape_loc = val | ((uint64_t(char(t))) << 56);
   87|  14.4M|  next_tape_loc++;
   88|  14.4M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage211tape_writer11skip_doubleEv:
   81|  7.88k|simdjson_inline void tape_writer::skip_double() noexcept {
   82|  7.88k|  next_tape_loc += 2;
   83|  7.88k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage211tape_writer13append_doubleEd:
   69|  47.3k|simdjson_inline void tape_writer::append_double(double value) noexcept {
   70|  47.3k|  append2(0, value, internal::tape_type::DOUBLE);
   71|  47.3k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage211tape_writer7append2IdEEvmT_NS_8internal9tape_typeE:
   91|  47.3k|simdjson_inline void tape_writer::append2(uint64_t val, T val2, internal::tape_type t) noexcept {
   92|  47.3k|  append(val, t);
   93|  47.3k|  static_assert(sizeof(val2) == sizeof(*next_tape_loc), "Type is not 64 bits!");
   94|  47.3k|  memcpy(next_tape_loc, &val2, sizeof(val2));
   95|  47.3k|  next_tape_loc++;
   96|  47.3k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage211tape_writer10append_s64El:
   58|  14.1M|simdjson_inline void tape_writer::append_s64(int64_t value) noexcept {
   59|  14.1M|  append2(0, value, internal::tape_type::INT64);
   60|  14.1M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage211tape_writer7append2IlEEvmT_NS_8internal9tape_typeE:
   91|  14.1M|simdjson_inline void tape_writer::append2(uint64_t val, T val2, internal::tape_type t) noexcept {
   92|  14.1M|  append(val, t);
   93|  14.1M|  static_assert(sizeof(val2) == sizeof(*next_tape_loc), "Type is not 64 bits!");
   94|  14.1M|  memcpy(next_tape_loc, &val2, sizeof(val2));
   95|  14.1M|  next_tape_loc++;
   96|  14.1M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage211tape_writer10append_u64Em:
   62|  2.44k|simdjson_inline void tape_writer::append_u64(uint64_t value) noexcept {
   63|  2.44k|  append(0, internal::tape_type::UINT64);
   64|  2.44k|  *next_tape_loc = value;
   65|  2.44k|  next_tape_loc++;
   66|  2.44k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage211tape_writer5writeERmmNS_8internal9tape_typeE:
   98|  43.5k|simdjson_inline void tape_writer::write(uint64_t &tape_loc, uint64_t val, internal::tape_type t) noexcept {
   99|  43.5k|  tape_loc = val | ((uint64_t(char(t))) << 56);
  100|  43.5k|}

_ZN8simdjson7haswell25dom_parser_implementation6stage1EPKhmNS_11stage1_modeE:
  138|  11.0k|simdjson_warn_unused error_code dom_parser_implementation::stage1(const uint8_t *_buf, size_t _len, stage1_mode streaming) noexcept {
  139|  11.0k|  this->buf = _buf;
  140|  11.0k|  this->len = _len;
  141|  11.0k|  return haswell::stage1::json_structural_indexer::index<128>(_buf, _len, *this, streaming);
  142|  11.0k|}
_ZN8simdjson7haswell25dom_parser_implementation6stage2ERNS_3dom8documentE:
  148|  10.0k|simdjson_warn_unused error_code dom_parser_implementation::stage2(dom::document &_doc) noexcept {
  149|  10.0k|  return stage2::tape_builder::parse_document<false>(*this, _doc);
  150|  10.0k|}
_ZN8simdjson7haswell25dom_parser_implementation5parseEPKhmRNS_3dom8documentE:
  164|  11.0k|simdjson_warn_unused error_code dom_parser_implementation::parse(const uint8_t *_buf, size_t _len, dom::document &_doc) noexcept {
  165|  11.0k|  auto error = stage1(_buf, _len, stage1_mode::regular);
  166|  11.0k|  if (error) { return error; }
  ------------------
  |  Branch (166:7): [True: 1.03k, False: 10.0k]
  ------------------
  167|  10.0k|  return stage2(_doc);
  168|  11.0k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_18is_asciiERKNS1_4simd8simd8x64IhEE:
   85|  1.36M|simdjson_inline bool is_ascii(const simd8x64<uint8_t>& input) {
   86|  1.36M|  return input.reduce_or().is_ascii();
   87|  1.36M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_124must_be_2_3_continuationENS1_4simd5simd8IhEES4_:
   97|  37.7k|simdjson_inline simd8<bool> must_be_2_3_continuation(const simd8<uint8_t> prev2, const simd8<uint8_t> prev3) {
   98|  37.7k|  simd8<uint8_t> is_third_byte  = prev2.saturating_sub(0xe0u-1); // Only 111_____ will be > 0
   99|  37.7k|  simd8<uint8_t> is_fourth_byte = prev3.saturating_sub(0xf0u-1); // Only 1111____ will be > 0
  100|       |  // Caller requires a bool (all 1's). All values resulting from the subtraction will be <= 64, so signed comparison is fine.
  101|  37.7k|  return simd8<int8_t>(is_third_byte | is_fourth_byte) > int8_t(0);
  102|  37.7k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage119json_string_scanner12find_escapedEm:
  126|  1.36M|simdjson_inline uint64_t json_string_scanner::find_escaped(uint64_t backslash) {
  127|  1.36M|  if (!backslash) { uint64_t escaped = prev_escaped; prev_escaped = 0; return escaped; }
  ------------------
  |  Branch (127:7): [True: 1.36M, False: 3.20k]
  ------------------
  128|  3.20k|  return find_escaped_branchless(backslash);
  129|  1.36M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_120json_character_block8classifyERKNS1_4simd8simd8x64IhEE:
   32|  1.36M|simdjson_inline json_character_block json_character_block::classify(const simd::simd8x64<uint8_t>& in) {
   33|       |  // These lookups rely on the fact that anything < 127 will match the lower 4 bits, which is why
   34|       |  // we can't use the generic lookup_16.
   35|  1.36M|  const auto whitespace_table = simd8<uint8_t>::repeat_16(' ', 100, 100, 100, 17, 100, 113, 2, 100, '\t', '\n', 112, 100, '\r', 100, 100);
   36|       |
   37|       |  // The 6 operators (:,[]{}) have these values:
   38|       |  //
   39|       |  // , 2C
   40|       |  // : 3A
   41|       |  // [ 5B
   42|       |  // { 7B
   43|       |  // ] 5D
   44|       |  // } 7D
   45|       |  //
   46|       |  // If you use | 0x20 to turn [ and ] into { and }, the lower 4 bits of each character is unique.
   47|       |  // We exploit this, using a simd 4-bit lookup to tell us which character match against, and then
   48|       |  // match it (against | 0x20).
   49|       |  //
   50|       |  // To prevent recognizing other characters, everything else gets compared with 0, which cannot
   51|       |  // match due to the | 0x20.
   52|       |  //
   53|       |  // NOTE: Due to the | 0x20, this ALSO treats <FF> and <SUB> (control characters 0C and 1A) like ,
   54|       |  // and :. This gets caught in stage 2, which checks the actual character to ensure the right
   55|       |  // operators are in the right places.
   56|  1.36M|  const auto op_table = simd8<uint8_t>::repeat_16(
   57|  1.36M|    0, 0, 0, 0,
   58|  1.36M|    0, 0, 0, 0,
   59|  1.36M|    0, 0, ':', '{', // : = 3A, [ = 5B, { = 7B
   60|  1.36M|    ',', '}', 0, 0  // , = 2C, ] = 5D, } = 7D
   61|  1.36M|  );
   62|       |
   63|       |  // We compute whitespace and op separately. If later code only uses one or the
   64|       |  // other, given the fact that all functions are aggressively inlined, we can
   65|       |  // hope that useless computations will be omitted. This is namely case when
   66|       |  // minifying (we only need whitespace).
   67|       |
   68|  1.36M|  const uint64_t whitespace = in.eq({
   69|  1.36M|    _mm256_shuffle_epi8(whitespace_table, in.chunks[0]),
   70|  1.36M|    _mm256_shuffle_epi8(whitespace_table, in.chunks[1])
   71|  1.36M|  });
   72|       |  // Turn [ and ] into { and }
   73|  1.36M|  const simd8x64<uint8_t> curlified{
   74|  1.36M|    in.chunks[0] | 0x20,
   75|  1.36M|    in.chunks[1] | 0x20
   76|  1.36M|  };
   77|  1.36M|  const uint64_t op = curlified.eq({
   78|  1.36M|    _mm256_shuffle_epi8(op_table, in.chunks[0]),
   79|  1.36M|    _mm256_shuffle_epi8(op_table, in.chunks[1])
   80|  1.36M|  });
   81|       |
   82|  1.36M|  return { whitespace, op };
   83|  1.36M|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_120json_character_block6scalarEv:
   28|  2.73M|simdjson_inline uint64_t json_character_block::scalar() const noexcept { return ~(op() | whitespace()); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_120json_character_block2opEv:
   27|  4.10M|simdjson_inline uint64_t json_character_block::op() const noexcept { return _op; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_120json_character_block10whitespaceEv:
   26|  2.73M|simdjson_inline uint64_t json_character_block::whitespace() const noexcept { return _whitespace; }

_ZNK8simdjson7haswell14implementation32create_dom_parser_implementationEmmRNSt3__110unique_ptrINS_8internal25dom_parser_implementationENS2_14default_deleteIS5_EEEE:
   10|  11.0k|) const noexcept {
   11|  11.0k|  dst.reset( new (std::nothrow) dom_parser_implementation() );
   12|  11.0k|  if (!dst) { return MEMALLOC; }
  ------------------
  |  Branch (12:7): [True: 0, False: 11.0k]
  ------------------
   13|  11.0k|  if (auto err = dst->set_capacity(capacity))
  ------------------
  |  Branch (13:12): [True: 0, False: 11.0k]
  ------------------
   14|      0|    return err;
   15|  11.0k|  if (auto err = dst->set_max_depth(max_depth))
  ------------------
  |  Branch (15:12): [True: 0, False: 11.0k]
  ------------------
   16|      0|    return err;
   17|  11.0k|  return SUCCESS;
   18|  11.0k|}

_ZNK8simdjson8internal29available_implementation_list21detect_best_supportedEv:
  144|      1|const implementation *available_implementation_list::detect_best_supported() const noexcept {
  145|       |  // They are prelisted in priority order, so we just go down the list
  146|      1|  uint32_t supported_instruction_sets = internal::detect_supported_architectures();
  147|      2|  for (const implementation *impl : internal::get_available_implementation_pointers()) {
  ------------------
  |  Branch (147:35): [True: 2, False: 0]
  ------------------
  148|      2|    uint32_t required_instruction_sets = impl->required_instruction_sets();
  149|      2|    if ((supported_instruction_sets & required_instruction_sets) == required_instruction_sets) { return impl; }
  ------------------
  |  Branch (149:9): [True: 1, False: 1]
  ------------------
  150|      2|  }
  151|      0|  return get_unsupported_singleton(); // this should never happen?
  152|      1|}
_ZNK8simdjson8internal49detect_best_supported_implementation_on_first_use8set_bestEv:
  154|      1|const implementation *detect_best_supported_implementation_on_first_use::set_best() const noexcept {
  155|      1|  SIMDJSON_PUSH_DISABLE_WARNINGS
  156|       |  SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe
  157|      1|  char *force_implementation_name = getenv("SIMDJSON_FORCE_IMPLEMENTATION");
  158|      1|  SIMDJSON_POP_DISABLE_WARNINGS
  159|       |
  160|      1|  if (force_implementation_name) {
  ------------------
  |  Branch (160:7): [True: 0, False: 1]
  ------------------
  161|      0|    auto force_implementation = get_available_implementations()[force_implementation_name];
  162|      0|    if (force_implementation) {
  ------------------
  |  Branch (162:9): [True: 0, False: 0]
  ------------------
  163|      0|      return get_active_implementation() = force_implementation;
  164|      0|    } else {
  165|       |      // Note: abort() and stderr usage within the library is forbidden.
  166|      0|      return get_active_implementation() = get_unsupported_singleton();
  167|      0|    }
  168|      0|  }
  169|      1|  return get_active_implementation() = get_available_implementations().detect_best_supported();
  170|      1|}
_ZN8simdjson29get_available_implementationsEv:
  174|      1|SIMDJSON_DLLIMPORTEXPORT const internal::available_implementation_list& get_available_implementations() {
  175|      1|  static const internal::available_implementation_list available_implementations{};
  176|      1|  return available_implementations;
  177|      1|}
_ZN8simdjson25get_active_implementationEv:
  179|  11.0k|SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr<const implementation>& get_active_implementation() {
  180|  11.0k|    static const internal::detect_best_supported_implementation_on_first_use detect_best_supported_implementation_on_first_use_singleton;
  181|  11.0k|    static internal::atomic_ptr<const implementation> active_implementation{&detect_best_supported_implementation_on_first_use_singleton};
  182|  11.0k|    return active_implementation;
  183|  11.0k|}
simdjson.cpp:_ZN8simdjson8internalL37get_available_implementation_pointersEv:
   80|      1|static const std::initializer_list<const implementation *>& get_available_implementation_pointers() {
   81|      1|  static const std::initializer_list<const implementation *> available_implementation_pointers {
   82|      1|#if SIMDJSON_IMPLEMENTATION_ICELAKE
   83|      1|    get_icelake_singleton(),
   84|      1|#endif
   85|      1|#if SIMDJSON_IMPLEMENTATION_HASWELL
   86|      1|    get_haswell_singleton(),
   87|      1|#endif
   88|      1|#if SIMDJSON_IMPLEMENTATION_WESTMERE
   89|      1|    get_westmere_singleton(),
   90|      1|#endif
   91|       |#if SIMDJSON_IMPLEMENTATION_ARM64
   92|       |    get_arm64_singleton(),
   93|       |#endif
   94|       |#if SIMDJSON_IMPLEMENTATION_PPC64
   95|       |    get_ppc64_singleton(),
   96|       |#endif
   97|      1|#if SIMDJSON_IMPLEMENTATION_FALLBACK
   98|      1|    get_fallback_singleton(),
   99|      1|#endif
  100|      1|  }; // available_implementation_pointers
  101|      1|  return available_implementation_pointers;
  102|      1|}
simdjson.cpp:_ZN8simdjson8internalL21get_icelake_singletonEv:
   18|      1|static const icelake::implementation* get_icelake_singleton() {
   19|      1|  static const icelake::implementation icelake_singleton{};
   20|      1|  return &icelake_singleton;
   21|      1|}
simdjson.cpp:_ZN8simdjson8internalL21get_haswell_singletonEv:
   24|      1|static const haswell::implementation* get_haswell_singleton() {
   25|      1|  static const haswell::implementation haswell_singleton{};
   26|      1|  return &haswell_singleton;
   27|      1|}
simdjson.cpp:_ZN8simdjson8internalL22get_westmere_singletonEv:
   30|      1|static const westmere::implementation* get_westmere_singleton() {
   31|      1|  static const westmere::implementation westmere_singleton{};
   32|      1|  return &westmere_singleton;
   33|      1|}
simdjson.cpp:_ZN8simdjson8internalL22get_fallback_singletonEv:
   48|      1|static const fallback::implementation* get_fallback_singleton() {
   49|      1|  static const fallback::implementation fallback_singleton{};
   50|      1|  return &fallback_singleton;
   51|      1|}
_ZN8simdjson8internal49detect_best_supported_implementation_on_first_useC2Ev:
   75|      1|  simdjson_inline detect_best_supported_implementation_on_first_use() noexcept : implementation("best_supported_detector", "Detects the best supported implementation and sets it", 0) {}
_ZNK8simdjson8internal49detect_best_supported_implementation_on_first_use32create_dom_parser_implementationEmmRNSt3__110unique_ptrINS0_25dom_parser_implementationENS2_14default_deleteIS4_EEEE:
   66|      1|  ) const noexcept final {
   67|      1|    return set_best()->create_dom_parser_implementation(capacity, max_length, dst);
   68|      1|  }

