_ZN8FuzzDataC2EPKhm:
   50|  10.7k|           size_t size) : Data(data),Size(size){}
_ZN8FuzzData16splitIntoStringsEv:
  117|  10.7k|  std::vector<std::string_view> splitIntoStrings() {
  118|  10.7k|    std::vector<std::string_view> ret;
  119|  10.7k|    if(Size>0) {
  ------------------
  |  Branch (119:8): [True: 10.7k, False: 10]
  ------------------
  120|  10.7k|      ret=split(chardata(),Size);
  121|       |      // all data consumed.
  122|  10.7k|      Data+=Size;
  123|  10.7k|      Size=0;
  124|  10.7k|    }
  125|  10.7k|    return ret;
  126|  10.7k|  }
_Z5splitPKcm:
   26|  10.7k|inline std::vector<std::string_view> split(const char* Data, size_t Size) {
   27|       |
   28|  10.7k|  std::vector<std::string_view> ret;
   29|       |
   30|  10.7k|    using namespace std::literals;
   31|  10.7k|    constexpr auto sep="\n~~\n"sv;
   32|       |
   33|  10.7k|    std::string_view all(Data,Size);
   34|  10.7k|    auto pos=all.find(sep);
   35|   472k|    while(pos!=std::string_view::npos) {
  ------------------
  |  Branch (35:11): [True: 461k, False: 10.7k]
  ------------------
   36|   461k|      ret.push_back(all.substr(0,pos));
   37|   461k|      all=all.substr(pos+sep.size());
   38|   461k|      pos=all.find(sep);
   39|   461k|    }
   40|  10.7k|    ret.push_back(all);
   41|  10.7k|    return ret;
   42|  10.7k|}
_ZNK8FuzzData8chardataEv:
  158|  10.7k|  const char* chardata() const {return static_cast<const char*>(static_cast<const void*>(Data));}
_ZNK8FuzzDatacvbEv:
  129|  10.7k|  explicit operator bool() const { return Data!=nullptr;}
_ZN8FuzzData6getIntILi0ELi31EEEiv:
   54|  10.7k|  int getInt() {
   55|  10.7k|    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|  10.7k|    constexpr int range=(Max-Min)+1;
   60|  10.7k|    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|  10.7k|    if(range<256)
  ------------------
  |  Branch (64:8): [Folded - Ignored]
  ------------------
   65|  10.7k|      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|  21.5k|  T get() {
   74|  21.5k|    const auto Nbytes=sizeof(T);
   75|  21.5k|    T ret{};
   76|  21.5k|    if(Size<Nbytes) {
  ------------------
  |  Branch (76:8): [True: 1, False: 21.5k]
  ------------------
   77|       |      //don't throw, signal with null instead.
   78|      1|      Data=nullptr;
   79|      1|      Size=0;
   80|      1|      return ret;
   81|      1|    }
   82|  21.5k|    std::memcpy(&ret,Data,Nbytes);
   83|  21.5k|    Data+=Nbytes;
   84|  21.5k|    Size-=Nbytes;
   85|  21.5k|    return ret;
   86|  21.5k|  }
_ZN8FuzzData6getIntILi0ELi7EEEiv:
   54|  10.7k|  int getInt() {
   55|  10.7k|    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|  10.7k|    constexpr int range=(Max-Min)+1;
   60|  10.7k|    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|  10.7k|    if(range<256)
  ------------------
  |  Branch (64:8): [Folded - Ignored]
  ------------------
   65|  10.7k|      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|  10.7k|  T get() {
   74|  10.7k|    const auto Nbytes=sizeof(T);
   75|  10.7k|    T ret{};
   76|  10.7k|    if(Size<Nbytes) {
  ------------------
  |  Branch (76:8): [True: 8, False: 10.7k]
  ------------------
   77|       |      //don't throw, signal with null instead.
   78|      8|      Data=nullptr;
   79|      8|      Size=0;
   80|      8|      return ret;
   81|      8|    }
   82|  10.7k|    std::memcpy(&ret,Data,Nbytes);
   83|  10.7k|    Data+=Nbytes;
   84|  10.7k|    Size-=Nbytes;
   85|  10.7k|    return ret;
   86|  10.7k|  }

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

LLVMFuzzerTestOneInput:
    9|  10.7k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   10|  10.7k|  FuzzData fd(Data, Size);
   11|  10.7k|  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|  10.7k|  const int selecttype=fd.getInt<0,7>();
   17|  10.7k|  auto invoke_with_type=[selecttype](auto cb) {
   18|  10.7k|    using constcharstar=const char*;
   19|  10.7k|    switch(selecttype) {
   20|  10.7k|    case 0: cb(bool{});break;
   21|  10.7k|    case 1: cb(double{});break;
   22|  10.7k|    case 2: cb(uint64_t{});break;
   23|  10.7k|    case 3: cb(int64_t{});break;
   24|  10.7k|    case 4: cb(std::string_view{});break;
   25|  10.7k|    case 5: cb(constcharstar{});break;
   26|  10.7k|    case 6: cb(simdjson::dom::array{});break;
   27|  10.7k|    case 7: cb(simdjson::dom::object{});break;
   28|  10.7k|    }
   29|  10.7k|  };
   30|       |
   31|  10.7k|  const auto index = fd.get<size_t>();
   32|       |
   33|       |  // split the remainder of the document into strings
   34|  10.7k|  auto strings = fd.splitIntoStrings();
   35|  10.8k|  while (strings.size() < 2) {
  ------------------
  |  Branch (35:10): [True: 68, False: 10.7k]
  ------------------
   36|     68|    strings.emplace_back();
   37|     68|  }
   38|  10.7k|  const auto str = strings[0];
   39|       |
   40|       |  // exit if there was too little data
   41|  10.7k|  if (!fd)
  ------------------
  |  Branch (41:7): [True: 8, False: 10.7k]
  ------------------
   42|      8|    return 0;
   43|       |
   44|  10.7k|  simdjson::dom::parser parser;
   45|  10.7k|  simdjson_unused simdjson::dom::element elem;
  ------------------
  |  |   99|  10.7k|  #define simdjson_unused __attribute__((unused))
  ------------------
   46|  10.7k|  simdjson_unused auto error = parser.parse(strings[1]).get(elem);
  ------------------
  |  |   99|  10.7k|  #define simdjson_unused __attribute__((unused))
  ------------------
   47|       |
   48|  10.7k|  if (error)
  ------------------
  |  Branch (48:7): [True: 4.40k, False: 6.36k]
  ------------------
   49|  4.40k|    return 0;
   50|       |
   51|  6.36k|#define CASE(num, fun)                                                         \
   52|  6.36k|  case num: {                                                                  \
   53|  6.36k|    simdjson_unused auto v = elem.fun();                                                       \
   54|  6.36k|    break;                                                                     \
   55|  6.36k|  }
   56|  6.36k|#define CASE2(num, fun)                                                        \
   57|  6.36k|  case num: {                                                                  \
   58|  6.36k|    simdjson_unused auto v = elem fun;                                                         \
   59|  6.36k|    break;                                                                     \
   60|  6.36k|  }
   61|  6.36k|#if SIMDJSON_EXCEPTIONS
   62|  6.36k|  try {
   63|  6.36k|#endif
   64|       |
   65|  6.36k|    switch (action) {
   66|    360|      CASE(0, type);
  ------------------
  |  |   52|    360|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 360, False: 6.00k]
  |  |  ------------------
  |  |   53|    360|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|    360|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|    360|    break;                                                                     \
  |  |   55|    360|  }
  ------------------
   67|     87|      CASE(1, get_array);
  ------------------
  |  |   52|     87|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 87, False: 6.27k]
  |  |  ------------------
  |  |   53|     87|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     87|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     87|    break;                                                                     \
  |  |   55|     87|  }
  ------------------
   68|     73|      CASE(2, get_object);
  ------------------
  |  |   52|     73|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 73, False: 6.28k]
  |  |  ------------------
  |  |   53|     73|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     73|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     73|    break;                                                                     \
  |  |   55|     73|  }
  ------------------
   69|     87|      CASE(3, get_c_str);
  ------------------
  |  |   52|     87|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 87, False: 6.27k]
  |  |  ------------------
  |  |   53|     87|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     87|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     87|    break;                                                                     \
  |  |   55|     87|  }
  ------------------
   70|     60|      CASE(4, get_string_length);
  ------------------
  |  |   52|     60|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 60, False: 6.30k]
  |  |  ------------------
  |  |   53|     60|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     60|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     60|    break;                                                                     \
  |  |   55|     60|  }
  ------------------
   71|     34|      CASE(5, get_string);
  ------------------
  |  |   52|     34|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 34, False: 6.32k]
  |  |  ------------------
  |  |   53|     34|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     34|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     34|    break;                                                                     \
  |  |   55|     34|  }
  ------------------
   72|     38|      CASE(6, get_int64);
  ------------------
  |  |   52|     38|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 38, False: 6.32k]
  |  |  ------------------
  |  |   53|     38|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     38|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     38|    break;                                                                     \
  |  |   55|     38|  }
  ------------------
   73|     43|      CASE(7, get_uint64);
  ------------------
  |  |   52|     43|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 43, False: 6.31k]
  |  |  ------------------
  |  |   53|     43|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     43|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     43|    break;                                                                     \
  |  |   55|     43|  }
  ------------------
   74|     41|      CASE(8, get_double);
  ------------------
  |  |   52|     41|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 41, False: 6.32k]
  |  |  ------------------
  |  |   53|     41|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     41|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     41|    break;                                                                     \
  |  |   55|     41|  }
  ------------------
   75|     47|      CASE(9, get_bool);
  ------------------
  |  |   52|     47|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 47, False: 6.31k]
  |  |  ------------------
  |  |   53|     47|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     47|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     47|    break;                                                                     \
  |  |   55|     47|  }
  ------------------
   76|     66|      CASE(10, is_array);
  ------------------
  |  |   52|     66|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 66, False: 6.29k]
  |  |  ------------------
  |  |   53|     66|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     66|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     66|    break;                                                                     \
  |  |   55|     66|  }
  ------------------
   77|     45|      CASE(11, is_object);
  ------------------
  |  |   52|     45|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 45, False: 6.31k]
  |  |  ------------------
  |  |   53|     45|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     45|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     45|    break;                                                                     \
  |  |   55|     45|  }
  ------------------
   78|     62|      CASE(12, is_string);
  ------------------
  |  |   52|     62|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 62, False: 6.29k]
  |  |  ------------------
  |  |   53|     62|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     62|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     62|    break;                                                                     \
  |  |   55|     62|  }
  ------------------
   79|     83|      CASE(13, is_int64);
  ------------------
  |  |   52|     83|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 83, False: 6.27k]
  |  |  ------------------
  |  |   53|     83|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     83|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     83|    break;                                                                     \
  |  |   55|     83|  }
  ------------------
   80|     78|      CASE(14, is_uint64);
  ------------------
  |  |   52|     78|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 78, False: 6.28k]
  |  |  ------------------
  |  |   53|     78|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     78|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     78|    break;                                                                     \
  |  |   55|     78|  }
  ------------------
   81|     79|      CASE(15, is_double);
  ------------------
  |  |   52|     79|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 79, False: 6.28k]
  |  |  ------------------
  |  |   53|     79|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     79|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     79|    break;                                                                     \
  |  |   55|     79|  }
  ------------------
   82|    338|      CASE(16, is_number);
  ------------------
  |  |   52|    338|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 338, False: 6.02k]
  |  |  ------------------
  |  |   53|    338|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|    338|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|    338|    break;                                                                     \
  |  |   55|    338|  }
  ------------------
   83|     60|      CASE(17, is_bool);
  ------------------
  |  |   52|     60|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 60, False: 6.30k]
  |  |  ------------------
  |  |   53|     60|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     60|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     60|    break;                                                                     \
  |  |   55|     60|  }
  ------------------
   84|     84|      CASE(18, is_null);
  ------------------
  |  |   52|     84|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 84, False: 6.27k]
  |  |  ------------------
  |  |   53|     84|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     84|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     84|    break;                                                                     \
  |  |   55|     84|  }
  ------------------
   85|       |      // element.is<>() :
   86|    126|    case 19: {
  ------------------
  |  Branch (86:5): [True: 126, False: 6.23k]
  ------------------
   87|    126|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
   88|    126|      } break;
   89|       |
   90|       |      // CASE(xx,get);
   91|     58|      case 20: {
  ------------------
  |  Branch (91:7): [True: 58, False: 6.30k]
  ------------------
   92|     58|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
   93|     58|        } break;
   94|       |
   95|       |      // CASE(xx,tie);
   96|     74|      case 21: {
  ------------------
  |  Branch (96:7): [True: 74, False: 6.28k]
  ------------------
   97|     74|          invoke_with_type([&elem](auto t){
   98|     74|            simdjson::error_code ec;
   99|     74|            simdjson::dom::element{elem}.tie(t,ec);  });
  100|     74|        } break;
  101|       |
  102|      0|#if SIMDJSON_EXCEPTIONS
  103|       |      // cast to type
  104|    618|      case 22: {
  ------------------
  |  Branch (104:7): [True: 618, False: 5.74k]
  ------------------
  105|    618|          invoke_with_type([&elem](auto t){
  106|    618|            using T=decltype(t);
  107|    618|            simdjson_unused auto v = static_cast<T>(elem);  });
  108|    618|        } break;
  109|       |
  110|    117|      CASE(23, begin);
  ------------------
  |  |   52|    117|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 117, False: 6.24k]
  |  |  ------------------
  |  |   53|    117|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|    117|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|    117|    break;                                                                     \
  |  |   55|    117|  }
  ------------------
  111|     83|      CASE(24, end);
  ------------------
  |  |   52|     83|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (52:3): [True: 83, False: 6.27k]
  |  |  ------------------
  |  |   53|     83|    simdjson_unused auto v = elem.fun();                                                       \
  |  |  ------------------
  |  |  |  |   99|     83|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   54|     83|    break;                                                                     \
  |  |   55|     83|  }
  ------------------
  112|      0|#endif
  113|    255|      CASE2(25, [str]);
  ------------------
  |  |   57|    255|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (57:3): [True: 255, False: 6.10k]
  |  |  ------------------
  |  |   58|    255|    simdjson_unused auto v = elem fun;                                                         \
  |  |  ------------------
  |  |  |  |   99|    255|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   59|    255|    break;                                                                     \
  |  |   60|    255|  }
  ------------------
  114|  1.09k|      CASE2(26, .at_pointer(str));
  ------------------
  |  |   57|  1.09k|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (57:3): [True: 1.09k, False: 5.26k]
  |  |  ------------------
  |  |   58|  1.09k|    simdjson_unused auto v = elem fun;                                                         \
  |  |  ------------------
  |  |  |  |   99|  1.09k|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   59|  1.09k|    break;                                                                     \
  |  |   60|  1.09k|  }
  ------------------
  115|       |      // CASE2(xx,at(str)); deprecated
  116|    492|      CASE2(28, .at(index));
  ------------------
  |  |   57|    492|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (57:3): [True: 492, False: 5.86k]
  |  |  ------------------
  |  |   58|    492|    simdjson_unused auto v = elem fun;                                                         \
  |  |  ------------------
  |  |  |  |   99|    492|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   59|    492|    break;                                                                     \
  |  |   60|    492|  }
  ------------------
  117|    331|      CASE2(29, .at_key(str));
  ------------------
  |  |   57|    331|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (57:3): [True: 331, False: 6.03k]
  |  |  ------------------
  |  |   58|    331|    simdjson_unused auto v = elem fun;                                                         \
  |  |  ------------------
  |  |  |  |   99|    331|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   59|    331|    break;                                                                     \
  |  |   60|    331|  }
  ------------------
  118|    384|      CASE2(30, .at_key_case_insensitive(str));
  ------------------
  |  |   57|    384|  case num: {                                                                  \
  |  |  ------------------
  |  |  |  Branch (57:3): [True: 384, False: 5.97k]
  |  |  ------------------
  |  |   58|    384|    simdjson_unused auto v = elem fun;                                                         \
  |  |  ------------------
  |  |  |  |   99|    384|  #define simdjson_unused __attribute__((unused))
  |  |  ------------------
  |  |   59|    384|    break;                                                                     \
  |  |   60|    384|  }
  ------------------
  119|    909|      case 31: { NulOStream os;
  ------------------
  |  Branch (119:7): [True: 909, False: 5.45k]
  ------------------
  120|    909|        simdjson_unused auto dumpstatus = elem.dump_raw_tape(os);} ;break;
  ------------------
  |  |   99|    909|  #define simdjson_unused __attribute__((unused))
  ------------------
  121|     56|    default:
  ------------------
  |  Branch (121:5): [True: 56, False: 6.30k]
  ------------------
  122|     56|      return 0;
  123|  6.36k|    }
  124|  6.36k|#undef CASE
  125|  6.36k|#undef CASE2
  126|       |
  127|  6.36k|#if SIMDJSON_EXCEPTIONS
  128|  6.36k|  } catch (std::exception &) {
  129|       |    // do nothing
  130|    664|  }
  131|      0|#endif
  132|       |
  133|  6.30k|  return 0;
  134|  6.36k|}
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_1clIZ22LLVMFuzzerTestOneInputE3$_0EEDaT_:
   17|    126|  auto invoke_with_type=[selecttype](auto cb) {
   18|    126|    using constcharstar=const char*;
   19|    126|    switch(selecttype) {
  ------------------
  |  Branch (19:12): [True: 0, False: 126]
  ------------------
   20|     64|    case 0: cb(bool{});break;
  ------------------
  |  Branch (20:5): [True: 64, False: 62]
  ------------------
   21|     17|    case 1: cb(double{});break;
  ------------------
  |  Branch (21:5): [True: 17, False: 109]
  ------------------
   22|      7|    case 2: cb(uint64_t{});break;
  ------------------
  |  Branch (22:5): [True: 7, False: 119]
  ------------------
   23|      3|    case 3: cb(int64_t{});break;
  ------------------
  |  Branch (23:5): [True: 3, False: 123]
  ------------------
   24|     12|    case 4: cb(std::string_view{});break;
  ------------------
  |  Branch (24:5): [True: 12, False: 114]
  ------------------
   25|      3|    case 5: cb(constcharstar{});break;
  ------------------
  |  Branch (25:5): [True: 3, False: 123]
  ------------------
   26|     18|    case 6: cb(simdjson::dom::array{});break;
  ------------------
  |  Branch (26:5): [True: 18, False: 108]
  ------------------
   27|      2|    case 7: cb(simdjson::dom::object{});break;
  ------------------
  |  Branch (27:5): [True: 2, False: 124]
  ------------------
   28|    126|    }
   29|    126|  };
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clIbEEDaT_:
   87|     64|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
  ------------------
  |  |   99|     64|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clIdEEDaT_:
   87|     17|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
  ------------------
  |  |   99|     17|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clImEEDaT_:
   87|      7|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
  ------------------
  |  |   99|      7|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clIlEEDaT_:
   87|      3|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
  ------------------
  |  |   99|      3|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEDaT_:
   87|     12|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
  ------------------
  |  |   99|     12|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clIPKcEEDaT_:
   87|      3|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
  ------------------
  |  |   99|      3|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clIN8simdjson3dom5arrayEEEDaT_:
   87|     18|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
  ------------------
  |  |   99|     18|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clIN8simdjson3dom6objectEEEDaT_:
   87|      2|        invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.is<decltype (t)>();  });
  ------------------
  |  |   99|      2|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_1clIZ22LLVMFuzzerTestOneInputE3$_2EEDaT_:
   17|     58|  auto invoke_with_type=[selecttype](auto cb) {
   18|     58|    using constcharstar=const char*;
   19|     58|    switch(selecttype) {
  ------------------
  |  Branch (19:12): [True: 0, False: 58]
  ------------------
   20|     13|    case 0: cb(bool{});break;
  ------------------
  |  Branch (20:5): [True: 13, False: 45]
  ------------------
   21|     18|    case 1: cb(double{});break;
  ------------------
  |  Branch (21:5): [True: 18, False: 40]
  ------------------
   22|     11|    case 2: cb(uint64_t{});break;
  ------------------
  |  Branch (22:5): [True: 11, False: 47]
  ------------------
   23|      3|    case 3: cb(int64_t{});break;
  ------------------
  |  Branch (23:5): [True: 3, False: 55]
  ------------------
   24|      1|    case 4: cb(std::string_view{});break;
  ------------------
  |  Branch (24:5): [True: 1, False: 57]
  ------------------
   25|      2|    case 5: cb(constcharstar{});break;
  ------------------
  |  Branch (25:5): [True: 2, False: 56]
  ------------------
   26|      9|    case 6: cb(simdjson::dom::array{});break;
  ------------------
  |  Branch (26:5): [True: 9, False: 49]
  ------------------
   27|      1|    case 7: cb(simdjson::dom::object{});break;
  ------------------
  |  Branch (27:5): [True: 1, False: 57]
  ------------------
   28|     58|    }
   29|     58|  };
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_2clIbEEDaT_:
   92|     13|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
  ------------------
  |  |   99|     13|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_2clIdEEDaT_:
   92|     18|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
  ------------------
  |  |   99|     18|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_2clImEEDaT_:
   92|     11|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
  ------------------
  |  |   99|     11|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_2clIlEEDaT_:
   92|      3|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
  ------------------
  |  |   99|      3|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_2clINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEDaT_:
   92|      1|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
  ------------------
  |  |   99|      1|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_2clIPKcEEDaT_:
   92|      2|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
  ------------------
  |  |   99|      2|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_2clIN8simdjson3dom5arrayEEEDaT_:
   92|      9|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
  ------------------
  |  |   99|      9|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_2clIN8simdjson3dom6objectEEEDaT_:
   92|      1|          invoke_with_type([&elem](auto t){ simdjson_unused auto v = elem.get<decltype (t)>();  });
  ------------------
  |  |   99|      1|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_1clIZ22LLVMFuzzerTestOneInputE3$_3EEDaT_:
   17|     74|  auto invoke_with_type=[selecttype](auto cb) {
   18|     74|    using constcharstar=const char*;
   19|     74|    switch(selecttype) {
  ------------------
  |  Branch (19:12): [True: 0, False: 74]
  ------------------
   20|     31|    case 0: cb(bool{});break;
  ------------------
  |  Branch (20:5): [True: 31, False: 43]
  ------------------
   21|      5|    case 1: cb(double{});break;
  ------------------
  |  Branch (21:5): [True: 5, False: 69]
  ------------------
   22|      8|    case 2: cb(uint64_t{});break;
  ------------------
  |  Branch (22:5): [True: 8, False: 66]
  ------------------
   23|      6|    case 3: cb(int64_t{});break;
  ------------------
  |  Branch (23:5): [True: 6, False: 68]
  ------------------
   24|      2|    case 4: cb(std::string_view{});break;
  ------------------
  |  Branch (24:5): [True: 2, False: 72]
  ------------------
   25|     12|    case 5: cb(constcharstar{});break;
  ------------------
  |  Branch (25:5): [True: 12, False: 62]
  ------------------
   26|      7|    case 6: cb(simdjson::dom::array{});break;
  ------------------
  |  Branch (26:5): [True: 7, False: 67]
  ------------------
   27|      3|    case 7: cb(simdjson::dom::object{});break;
  ------------------
  |  Branch (27:5): [True: 3, False: 71]
  ------------------
   28|     74|    }
   29|     74|  };
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_3clIbEEDaT_:
   97|     31|          invoke_with_type([&elem](auto t){
   98|     31|            simdjson::error_code ec;
   99|     31|            simdjson::dom::element{elem}.tie(t,ec);  });
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_3clIdEEDaT_:
   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$_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|      6|          invoke_with_type([&elem](auto t){
   98|      6|            simdjson::error_code ec;
   99|      6|            simdjson::dom::element{elem}.tie(t,ec);  });
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_3clINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEDaT_:
   97|      2|          invoke_with_type([&elem](auto t){
   98|      2|            simdjson::error_code ec;
   99|      2|            simdjson::dom::element{elem}.tie(t,ec);  });
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_3clIPKcEEDaT_:
   97|     12|          invoke_with_type([&elem](auto t){
   98|     12|            simdjson::error_code ec;
   99|     12|            simdjson::dom::element{elem}.tie(t,ec);  });
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_3clIN8simdjson3dom5arrayEEEDaT_:
   97|      7|          invoke_with_type([&elem](auto t){
   98|      7|            simdjson::error_code ec;
   99|      7|            simdjson::dom::element{elem}.tie(t,ec);  });
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_3clIN8simdjson3dom6objectEEEDaT_:
   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$_1clIZ22LLVMFuzzerTestOneInputE3$_4EEDaT_:
   17|    618|  auto invoke_with_type=[selecttype](auto cb) {
   18|    618|    using constcharstar=const char*;
   19|    618|    switch(selecttype) {
  ------------------
  |  Branch (19:12): [True: 0, False: 618]
  ------------------
   20|     79|    case 0: cb(bool{});break;
  ------------------
  |  Branch (20:5): [True: 79, False: 539]
  ------------------
   21|     82|    case 1: cb(double{});break;
  ------------------
  |  Branch (21:5): [True: 82, False: 536]
  ------------------
   22|    202|    case 2: cb(uint64_t{});break;
  ------------------
  |  Branch (22:5): [True: 202, False: 416]
  ------------------
   23|    171|    case 3: cb(int64_t{});break;
  ------------------
  |  Branch (23:5): [True: 171, False: 447]
  ------------------
   24|     19|    case 4: cb(std::string_view{});break;
  ------------------
  |  Branch (24:5): [True: 19, False: 599]
  ------------------
   25|      9|    case 5: cb(constcharstar{});break;
  ------------------
  |  Branch (25:5): [True: 9, False: 609]
  ------------------
   26|     21|    case 6: cb(simdjson::dom::array{});break;
  ------------------
  |  Branch (26:5): [True: 21, False: 597]
  ------------------
   27|     35|    case 7: cb(simdjson::dom::object{});break;
  ------------------
  |  Branch (27:5): [True: 35, False: 583]
  ------------------
   28|    618|    }
   29|    618|  };
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_4clIbEEDaT_:
  105|     79|          invoke_with_type([&elem](auto t){
  106|     79|            using T=decltype(t);
  107|     79|            simdjson_unused auto v = static_cast<T>(elem);  });
  ------------------
  |  |   99|     79|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_4clIdEEDaT_:
  105|     82|          invoke_with_type([&elem](auto t){
  106|     82|            using T=decltype(t);
  107|     82|            simdjson_unused auto v = static_cast<T>(elem);  });
  ------------------
  |  |   99|     82|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_4clImEEDaT_:
  105|    202|          invoke_with_type([&elem](auto t){
  106|    202|            using T=decltype(t);
  107|    202|            simdjson_unused auto v = static_cast<T>(elem);  });
  ------------------
  |  |   99|    202|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_4clIlEEDaT_:
  105|    171|          invoke_with_type([&elem](auto t){
  106|    171|            using T=decltype(t);
  107|    171|            simdjson_unused auto v = static_cast<T>(elem);  });
  ------------------
  |  |   99|    171|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_4clINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEDaT_:
  105|     19|          invoke_with_type([&elem](auto t){
  106|     19|            using T=decltype(t);
  107|     19|            simdjson_unused auto v = static_cast<T>(elem);  });
  ------------------
  |  |   99|     19|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_4clIPKcEEDaT_:
  105|      9|          invoke_with_type([&elem](auto t){
  106|      9|            using T=decltype(t);
  107|      9|            simdjson_unused auto v = static_cast<T>(elem);  });
  ------------------
  |  |   99|      9|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_4clIN8simdjson3dom5arrayEEEDaT_:
  105|     21|          invoke_with_type([&elem](auto t){
  106|     21|            using T=decltype(t);
  107|     21|            simdjson_unused auto v = static_cast<T>(elem);  });
  ------------------
  |  |   99|     21|  #define simdjson_unused __attribute__((unused))
  ------------------
fuzz_element.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_4clIN8simdjson3dom6objectEEEDaT_:
  105|     35|          invoke_with_type([&elem](auto t){
  106|     35|            using T=decltype(t);
  107|     35|            simdjson_unused auto v = static_cast<T>(elem);  });
  ------------------
  |  |   99|     35|  #define simdjson_unused __attribute__((unused))
  ------------------

_ZN8simdjson3dom5arrayC2ERKNS_8internal8tape_refE:
   66|  19.3k|simdjson_inline array::array(const internal::tape_ref &_tape) noexcept : tape{_tape} {}
_ZN8simdjson15simdjson_resultINS_3dom5arrayEEC2ES2_:
   23|    532|    : internal::simdjson_result_base<dom::array>(std::forward<dom::array>(value)) {}
_ZN8simdjson15simdjson_resultINS_3dom5arrayEEC2ENS_10error_codeE:
   25|    368|    : internal::simdjson_result_base<dom::array>(error) {}
_ZN8simdjson3dom5arrayC2Ev:
   65|    423|simdjson_inline array::array() noexcept : tape{} {}
_ZNK8simdjson15simdjson_resultINS_3dom5arrayEE5beginEv:
   29|    117|inline dom::array::iterator simdjson_result<dom::array>::begin() const noexcept(false) {
   30|    117|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (30:7): [True: 71, False: 46]
  ------------------
   31|     46|  return first.begin();
   32|    117|}
_ZNK8simdjson3dom5array5beginEv:
   67|  9.78k|inline array::iterator array::begin() const noexcept {
   68|  9.78k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|  9.78k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
   69|  9.78k|  return internal::tape_ref(tape.doc, tape.json_index + 1);
   70|  9.78k|}
_ZN8simdjson3dom5array8iteratorC2ERKNS_8internal8tape_refE:
  147|  19.5k|simdjson_inline array::iterator::iterator(const internal::tape_ref &_tape) noexcept : tape{_tape} { }
_ZNK8simdjson15simdjson_resultINS_3dom5arrayEE3endEv:
   33|     83|inline dom::array::iterator simdjson_result<dom::array>::end() const noexcept(false) {
   34|     83|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (34:7): [True: 59, False: 24]
  ------------------
   35|     24|  return first.end();
   36|     83|}
_ZNK8simdjson3dom5array3endEv:
   71|  9.76k|inline array::iterator array::end() const noexcept {
   72|  9.76k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|  9.76k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
   73|  9.76k|  return internal::tape_ref(tape.doc, tape.after_element() - 1);
   74|  9.76k|}
_ZNK8simdjson3dom5array10at_pointerENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   83|  9.48k|inline simdjson_result<element> array::at_pointer(std::string_view json_pointer) const noexcept {
   84|  9.48k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|  9.48k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
   85|  9.48k|  if(json_pointer.empty()) { // an empty string means that we return the current node
  ------------------
  |  Branch (85:6): [True: 51, False: 9.43k]
  ------------------
   86|     51|      return element(this->tape); // copy the current node
   87|  9.43k|  } else if(json_pointer[0] != '/') { // otherwise there is an error
  ------------------
  |  Branch (87:13): [True: 7, False: 9.42k]
  ------------------
   88|      7|      return INVALID_JSON_POINTER;
   89|      7|  }
   90|  9.42k|  json_pointer = json_pointer.substr(1);
   91|       |  // - means "the append position" or "the element after the end of the array"
   92|       |  // We don't support this, because we're returning a real element, not a position.
   93|  9.42k|  if (json_pointer == "-") { return INDEX_OUT_OF_BOUNDS; }
  ------------------
  |  Branch (93:7): [True: 1, False: 9.42k]
  ------------------
   94|       |
   95|       |  // Read the array index
   96|  9.42k|  size_t array_index = 0;
   97|  9.42k|  size_t i;
   98|  2.12M|  for (i = 0; i < json_pointer.length() && json_pointer[i] != '/'; i++) {
  ------------------
  |  Branch (98:15): [True: 2.12M, False: 282]
  |  Branch (98:44): [True: 2.11M, False: 9.12k]
  ------------------
   99|  2.11M|    uint8_t digit = uint8_t(json_pointer[i] - '0');
  100|       |    // Check for non-digit in array index. If it's there, we're trying to get a field in an object
  101|  2.11M|    if (digit > 9) { return INCORRECT_TYPE; }
  ------------------
  |  Branch (101:9): [True: 22, False: 2.11M]
  ------------------
  102|  2.11M|    array_index = array_index*10 + digit;
  103|  2.11M|  }
  104|       |
  105|       |  // 0 followed by other digits is invalid
  106|  9.40k|  if (i > 1 && json_pointer[0] == '0') { return INVALID_JSON_POINTER; } // "JSON pointer array index has other characters after 0"
  ------------------
  |  Branch (106:7): [True: 248, False: 9.15k]
  |  Branch (106:16): [True: 2, False: 246]
  ------------------
  107|       |
  108|       |  // Empty string is invalid; so is a "/" with no digits before it
  109|  9.40k|  if (i == 0) { return INVALID_JSON_POINTER; } // "Empty string in JSON pointer array index"
  ------------------
  |  Branch (109:7): [True: 48, False: 9.35k]
  ------------------
  110|       |
  111|       |  // Get the child
  112|  9.35k|  auto child = array(tape).at(array_index);
  113|       |  // If there is an error, it ends here
  114|  9.35k|  if(child.error()) {
  ------------------
  |  Branch (114:6): [True: 227, False: 9.12k]
  ------------------
  115|    227|    return child;
  116|    227|  }
  117|       |  // If there is a /, we're not done yet, call recursively.
  118|  9.12k|  if (i < json_pointer.length()) {
  ------------------
  |  Branch (118:7): [True: 9.11k, False: 13]
  ------------------
  119|  9.11k|    child = child.at_pointer(json_pointer.substr(i));
  120|  9.11k|  }
  121|  9.12k|  return child;
  122|  9.35k|}
_ZNK8simdjson3dom5array2atEm:
  130|  9.73k|inline simdjson_result<element> array::at(size_t index) const noexcept {
  131|  9.73k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|  9.73k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  132|  9.73k|  size_t i=0;
  133|  1.61M|  for (auto element : *this) {
  ------------------
  |  Branch (133:21): [True: 1.61M, False: 611]
  ------------------
  134|  1.61M|    if (i == index) { return element; }
  ------------------
  |  Branch (134:9): [True: 9.12k, False: 1.60M]
  ------------------
  135|  1.60M|    i++;
  136|  1.60M|  }
  137|    611|  return INDEX_OUT_OF_BOUNDS;
  138|  9.73k|}
_ZNK8simdjson3dom5array8iteratorneERKS2_:
  160|  1.61M|inline bool array::iterator::operator!=(const array::iterator& other) const noexcept {
  161|  1.61M|  return tape.json_index != other.tape.json_index;
  162|  1.61M|}
_ZNK8simdjson3dom5array8iteratordeEv:
  148|  1.61M|inline element array::iterator::operator*() const noexcept {
  149|  1.61M|  return element(tape);
  150|  1.61M|}
_ZN8simdjson3dom5array8iteratorppEv:
  151|  1.60M|inline array::iterator& array::iterator::operator++() noexcept {
  152|  1.60M|  tape.json_index = tape.after_element();
  153|  1.60M|  return *this;
  154|  1.60M|}
_ZNK8simdjson15simdjson_resultINS_3dom5arrayEE2atEm:
   55|    492|inline simdjson_result<dom::element> simdjson_result<dom::array>::at(size_t index) const noexcept {
   56|    492|  if (error()) { return error(); }
  ------------------
  |  Branch (56:7): [True: 106, False: 386]
  ------------------
   57|    386|  return first.at(index);
   58|    492|}

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

_ZN8simdjson3dom8documentC2Ev:
   23|  10.7k|  document() noexcept = default;
_ZN8simdjson3dom8documentD2Ev:
   24|  10.7k|  ~document() noexcept = default;

_ZN8simdjson3dom7elementC2Ev:
  197|  17.8k|simdjson_inline element::element() noexcept : tape{} {}
_ZN8simdjson15simdjson_resultINS_3dom7elementEEC2ENS_10error_codeE:
   27|  6.50k|    : internal::simdjson_result_base<dom::element>(error) {}
_ZN8simdjson3dom7elementC2ERKNS_8internal8tape_refE:
  198|  1.62M|simdjson_inline element::element(const internal::tape_ref &_tape) noexcept : tape{_tape} { }
_ZN8simdjson15simdjson_resultINS_3dom7elementEEC2EOS2_:
   25|  16.1k|    : internal::simdjson_result_base<dom::element>(std::forward<dom::element>(value)) {}
_ZNK8simdjson3dom7element4typeEv:
  200|    360|inline element_type element::type() const noexcept {
  201|    360|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|    360|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  202|    360|  auto tape_type = tape.tape_ref_type();
  203|    360|  return tape_type == internal::tape_type::FALSE_VALUE ? element_type::BOOL : static_cast<element_type>(tape_type);
  ------------------
  |  Branch (203:10): [True: 0, False: 360]
  ------------------
  204|    360|}
_ZNK8simdjson3dom7element9get_arrayEv:
  295|    900|inline simdjson_result<array> element::get_array() const noexcept {
  296|    900|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|    900|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  297|    900|  switch (tape.tape_ref_type()) {
  298|    532|    case internal::tape_type::START_ARRAY:
  ------------------
  |  Branch (298:5): [True: 532, False: 368]
  ------------------
  299|    532|      return array(tape);
  300|    368|    default:
  ------------------
  |  Branch (300:5): [True: 368, False: 532]
  ------------------
  301|    368|      return INCORRECT_TYPE;
  302|    900|  }
  303|    900|}
_ZNK8simdjson3dom7element10get_objectEv:
  304|  1.12k|inline simdjson_result<object> element::get_object() const noexcept {
  305|  1.12k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|  1.12k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  306|  1.12k|  switch (tape.tape_ref_type()) {
  307|    801|    case internal::tape_type::START_OBJECT:
  ------------------
  |  Branch (307:5): [True: 801, False: 328]
  ------------------
  308|    801|      return object(tape);
  309|    328|    default:
  ------------------
  |  Branch (309:5): [True: 328, False: 801]
  ------------------
  310|    328|      return INCORRECT_TYPE;
  311|  1.12k|  }
  312|  1.12k|}
_ZNK8simdjson3dom7element9get_c_strEv:
  215|    113|inline simdjson_result<const char *> element::get_c_str() const noexcept {
  216|    113|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|    113|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  217|    113|  switch (tape.tape_ref_type()) {
  218|      5|    case internal::tape_type::STRING: {
  ------------------
  |  Branch (218:5): [True: 5, False: 108]
  ------------------
  219|      5|      return tape.get_c_str();
  220|      0|    }
  221|    108|    default:
  ------------------
  |  Branch (221:5): [True: 108, False: 5]
  ------------------
  222|    108|      return INCORRECT_TYPE;
  223|    113|  }
  224|    113|}
_ZNK8simdjson3dom7element17get_string_lengthEv:
  225|     60|inline simdjson_result<size_t> element::get_string_length() const noexcept {
  226|     60|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|     60|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  227|     60|  switch (tape.tape_ref_type()) {
  228|      0|    case internal::tape_type::STRING: {
  ------------------
  |  Branch (228:5): [True: 0, False: 60]
  ------------------
  229|      0|      return tape.get_string_length();
  230|      0|    }
  231|     60|    default:
  ------------------
  |  Branch (231:5): [True: 60, False: 0]
  ------------------
  232|     60|      return INCORRECT_TYPE;
  233|     60|  }
  234|     60|}
_ZNK8simdjson3dom7element10get_stringEv:
  235|    130|inline simdjson_result<std::string_view> element::get_string() const noexcept {
  236|    130|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|    130|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  237|    130|  switch (tape.tape_ref_type()) {
  238|      8|    case internal::tape_type::STRING:
  ------------------
  |  Branch (238:5): [True: 8, False: 122]
  ------------------
  239|      8|      return tape.get_string_view();
  240|    122|    default:
  ------------------
  |  Branch (240:5): [True: 122, False: 8]
  ------------------
  241|    122|      return INCORRECT_TYPE;
  242|    130|  }
  243|    130|}
_ZNK8simdjson3dom7element9get_int64Ev:
  258|    642|inline simdjson_result<int64_t> element::get_int64() const noexcept {
  259|    642|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|    642|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  260|    642|  if(simdjson_unlikely(!tape.is_int64())) { // branch rarely taken
  ------------------
  |  |  106|    642|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 627, False: 15]
  |  |  ------------------
  ------------------
  261|    627|    if(tape.is_uint64()) {
  ------------------
  |  Branch (261:8): [True: 223, False: 404]
  ------------------
  262|    223|      uint64_t result = tape.next_tape_value<uint64_t>();
  263|       |      // 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
  264|    223|      if (result > uint64_t((std::numeric_limits<int64_t>::max)())) {
  ------------------
  |  Branch (264:11): [True: 223, False: 0]
  ------------------
  265|    223|        return NUMBER_OUT_OF_RANGE;
  266|    223|      }
  267|      0|      return static_cast<int64_t>(result);
  268|    223|    }
  269|    404|    return INCORRECT_TYPE;
  270|    627|  }
  271|     15|  return tape.next_tape_value<int64_t>();
  272|    642|}
_ZNK8simdjson3dom7element10get_uint64Ev:
  244|    677|inline simdjson_result<uint64_t> element::get_uint64() const noexcept {
  245|    677|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|    677|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  246|    677|  if(simdjson_unlikely(!tape.is_uint64())) { // branch rarely taken
  ------------------
  |  |  106|    677|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 564, False: 113]
  |  |  ------------------
  ------------------
  247|    564|    if(tape.is_int64()) {
  ------------------
  |  Branch (247:8): [True: 132, False: 432]
  ------------------
  248|    132|      int64_t result = tape.next_tape_value<int64_t>();
  249|    132|      if (result < 0) {
  ------------------
  |  Branch (249:11): [True: 93, False: 39]
  ------------------
  250|     93|        return NUMBER_OUT_OF_RANGE;
  251|     93|      }
  252|     39|      return uint64_t(result);
  253|    132|    }
  254|    432|    return INCORRECT_TYPE;
  255|    564|  }
  256|    113|  return tape.next_tape_value<int64_t>();
  257|    677|}
_ZNK8simdjson3dom7element10get_doubleEv:
  273|    460|inline simdjson_result<double> element::get_double() const noexcept {
  274|    460|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|    460|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  275|       |  // Performance considerations:
  276|       |  // 1. Querying tape_ref_type() implies doing a shift, it is fast to just do a straight
  277|       |  //   comparison.
  278|       |  // 2. Using a switch-case relies on the compiler guessing what kind of code generation
  279|       |  //    we want... But the compiler cannot know that we expect the type to be "double"
  280|       |  //    most of the time.
  281|       |  // We can expect get<double> to refer to a double type almost all the time.
  282|       |  // It is important to craft the code accordingly so that the compiler can use this
  283|       |  // information. (This could also be solved with profile-guided optimization.)
  284|    460|  if(simdjson_unlikely(!tape.is_double())) { // branch rarely taken
  ------------------
  |  |  106|    460|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 361, False: 99]
  |  |  ------------------
  ------------------
  285|    361|    if(tape.is_uint64()) {
  ------------------
  |  Branch (285:8): [True: 2, False: 359]
  ------------------
  286|      2|      return double(tape.next_tape_value<uint64_t>());
  287|    359|    } else if(tape.is_int64()) {
  ------------------
  |  Branch (287:15): [True: 10, False: 349]
  ------------------
  288|     10|      return double(tape.next_tape_value<int64_t>());
  289|     10|    }
  290|    349|    return INCORRECT_TYPE;
  291|    361|  }
  292|       |  // this is common:
  293|     99|  return tape.next_tape_value<double>();
  294|    460|}
_ZNK8simdjson3dom7element8get_boolEv:
  206|    294|inline simdjson_result<bool> element::get_bool() const noexcept {
  207|    294|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|    294|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  208|    294|  if(tape.is_true()) {
  ------------------
  |  Branch (208:6): [True: 1, False: 293]
  ------------------
  209|      1|    return true;
  210|    293|  } else if(tape.is_false()) {
  ------------------
  |  Branch (210:13): [True: 1, False: 292]
  ------------------
  211|      1|    return false;
  212|      1|  }
  213|    292|  return INCORRECT_TYPE;
  214|    294|}
_ZNK8simdjson3dom7element8is_arrayEv:
  344|     66|inline bool element::is_array() const noexcept { return is<array>(); }
_ZNK8simdjson3dom7element2isINS0_5arrayEEEbv:
  330|     84|simdjson_inline bool element::is() const noexcept {
  331|     84|  auto result = get<T>();
  332|     84|  return !result.error();
  333|     84|}
_ZNK8simdjson3dom7element3getINS0_5arrayEEENS_15simdjson_resultIT_EEv:
  335|    813|template<> inline simdjson_result<array> element::get<array>() const noexcept { return get_array(); }
_ZNK8simdjson3dom7element9is_objectEv:
  345|     45|inline bool element::is_object() const noexcept { return is<object>(); }
_ZNK8simdjson3dom7element2isINS0_6objectEEEbv:
  330|     47|simdjson_inline bool element::is() const noexcept {
  331|     47|  auto result = get<T>();
  332|     47|  return !result.error();
  333|     47|}
_ZNK8simdjson3dom7element3getINS0_6objectEEENS_15simdjson_resultIT_EEv:
  336|  1.05k|template<> inline simdjson_result<object> element::get<object>() const noexcept { return get_object(); }
_ZNK8simdjson3dom7element9is_stringEv:
  346|     62|inline bool element::is_string() const noexcept { return is<std::string_view>(); }
_ZNK8simdjson3dom7element2isINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEEbv:
  330|     74|simdjson_inline bool element::is() const noexcept {
  331|     74|  auto result = get<T>();
  332|     74|  return !result.error();
  333|     74|}
_ZNK8simdjson3dom7element3getINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEENS_15simdjson_resultIT_EEv:
  338|     96|template<> inline simdjson_result<std::string_view> element::get<std::string_view>() const noexcept { return get_string(); }
_ZNK8simdjson3dom7element8is_int64Ev:
  347|    421|inline bool element::is_int64() const noexcept { return is<int64_t>(); }
_ZNK8simdjson3dom7element2isIlEEbv:
  330|    424|simdjson_inline bool element::is() const noexcept {
  331|    424|  auto result = get<T>();
  332|    424|  return !result.error();
  333|    424|}
_ZNK8simdjson3dom7element3getIlEENS_15simdjson_resultIT_EEv:
  339|    604|template<> inline simdjson_result<int64_t> element::get<int64_t>() const noexcept { return get_int64(); }
_ZNK8simdjson3dom7element9is_uint64Ev:
  348|    406|inline bool element::is_uint64() const noexcept { return is<uint64_t>(); }
_ZNK8simdjson3dom7element2isImEEbv:
  330|    413|simdjson_inline bool element::is() const noexcept {
  331|    413|  auto result = get<T>();
  332|    413|  return !result.error();
  333|    413|}
_ZNK8simdjson3dom7element3getImEENS_15simdjson_resultIT_EEv:
  340|    634|template<> inline simdjson_result<uint64_t> element::get<uint64_t>() const noexcept { return get_uint64(); }
_ZNK8simdjson3dom7element9is_doubleEv:
  349|    297|inline bool element::is_double() const noexcept { return is<double>(); }
_ZNK8simdjson3dom7element2isIdEEbv:
  330|    314|simdjson_inline bool element::is() const noexcept {
  331|    314|  auto result = get<T>();
  332|    314|  return !result.error();
  333|    314|}
_ZNK8simdjson3dom7element3getIdEENS_15simdjson_resultIT_EEv:
  341|    419|template<> inline simdjson_result<double> element::get<double>() const noexcept { return get_double(); }
_ZNK8simdjson3dom7element9is_numberEv:
  351|    338|inline bool element::is_number() const noexcept { return is_int64() || is_uint64() || is_double(); }
  ------------------
  |  Branch (351:58): [True: 10, False: 328]
  |  Branch (351:72): [True: 110, False: 218]
  |  Branch (351:87): [True: 53, False: 165]
  ------------------
_ZNK8simdjson3dom7element7is_boolEv:
  350|     60|inline bool element::is_bool() const noexcept { return is<bool>(); }
_ZNK8simdjson3dom7element2isIbEEbv:
  330|    124|simdjson_inline bool element::is() const noexcept {
  331|    124|  auto result = get<T>();
  332|    124|  return !result.error();
  333|    124|}
_ZNK8simdjson3dom7element3getIbEENS_15simdjson_resultIT_EEv:
  342|    247|template<> inline simdjson_result<bool> element::get<bool>() const noexcept { return get_bool(); }
_ZNK8simdjson3dom7element7is_nullEv:
  353|     84|inline bool element::is_null() const noexcept {
  354|     84|  return tape.is_null_on_tape();
  355|     84|}
_ZNK8simdjson3dom7element2isIPKcEEbv:
  330|      3|simdjson_inline bool element::is() const noexcept {
  331|      3|  auto result = get<T>();
  332|      3|  return !result.error();
  333|      3|}
_ZNK8simdjson3dom7element3getIPKcEENS_15simdjson_resultIT_EEv:
  337|     26|template<> inline simdjson_result<const char *> element::get<const char *>() const noexcept { return get_c_str(); }
_ZNO8simdjson3dom7element3tieIbEEvRT_RNS_10error_codeE:
  325|     31|inline void element::tie(T &value, error_code &error) && noexcept {
  326|     31|  error = get<T>(value);
  327|     31|}
_ZNK8simdjson3dom7element3getIbEENS_10error_codeERT_:
  315|     31|simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
  316|     31|  return get<T>().get(value);
  317|     31|}
_ZNO8simdjson3dom7element3tieIdEEvRT_RNS_10error_codeE:
  325|      5|inline void element::tie(T &value, error_code &error) && noexcept {
  326|      5|  error = get<T>(value);
  327|      5|}
_ZNK8simdjson3dom7element3getIdEENS_10error_codeERT_:
  315|      5|simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
  316|      5|  return get<T>().get(value);
  317|      5|}
_ZNO8simdjson3dom7element3tieImEEvRT_RNS_10error_codeE:
  325|      8|inline void element::tie(T &value, error_code &error) && noexcept {
  326|      8|  error = get<T>(value);
  327|      8|}
_ZNK8simdjson3dom7element3getImEENS_10error_codeERT_:
  315|      8|simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
  316|      8|  return get<T>().get(value);
  317|      8|}
_ZNO8simdjson3dom7element3tieIlEEvRT_RNS_10error_codeE:
  325|      6|inline void element::tie(T &value, error_code &error) && noexcept {
  326|      6|  error = get<T>(value);
  327|      6|}
_ZNK8simdjson3dom7element3getIlEENS_10error_codeERT_:
  315|      6|simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
  316|      6|  return get<T>().get(value);
  317|      6|}
_ZNO8simdjson3dom7element3tieINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEEvRT_RNS_10error_codeE:
  325|      2|inline void element::tie(T &value, error_code &error) && noexcept {
  326|      2|  error = get<T>(value);
  327|      2|}
_ZNK8simdjson3dom7element3getINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEENS_10error_codeERT_:
  315|      2|simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
  316|      2|  return get<T>().get(value);
  317|      2|}
_ZNO8simdjson3dom7element3tieIPKcEEvRT_RNS_10error_codeE:
  325|     12|inline void element::tie(T &value, error_code &error) && noexcept {
  326|     12|  error = get<T>(value);
  327|     12|}
_ZNK8simdjson3dom7element3getIPKcEENS_10error_codeERT_:
  315|     12|simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
  316|     12|  return get<T>().get(value);
  317|     12|}
_ZNO8simdjson3dom7element3tieINS0_5arrayEEEvRT_RNS_10error_codeE:
  325|      7|inline void element::tie(T &value, error_code &error) && noexcept {
  326|      7|  error = get<T>(value);
  327|      7|}
_ZNK8simdjson3dom7element3getINS0_5arrayEEENS_10error_codeERT_:
  315|      7|simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
  316|      7|  return get<T>().get(value);
  317|      7|}
_ZNO8simdjson3dom7element3tieINS0_6objectEEEvRT_RNS_10error_codeE:
  325|      3|inline void element::tie(T &value, error_code &error) && noexcept {
  326|      3|  error = get<T>(value);
  327|      3|}
_ZNK8simdjson3dom7element3getINS0_6objectEEENS_10error_codeERT_:
  315|      3|simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
  316|      3|  return get<T>().get(value);
  317|      3|}
_ZNK8simdjson3dom7elementcvbEv:
  359|     79|inline element::operator bool() const noexcept(false) { return get<bool>(); }
_ZNK8simdjson3dom7elementcvdEv:
  364|     82|inline element::operator double() const noexcept(false) { return get<double>(); }
_ZNK8simdjson3dom7elementcvmEv:
  362|    202|inline element::operator uint64_t() const noexcept(false) { return get<uint64_t>(); }
_ZNK8simdjson3dom7elementcvlEv:
  363|    171|inline element::operator int64_t() const noexcept(false) { return get<int64_t>(); }
_ZNK8simdjson3dom7elementcvNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEEv:
  361|     19|inline element::operator std::string_view() const noexcept(false) { return get<std::string_view>(); }
_ZNK8simdjson3dom7elementcvPKcEv:
  360|      9|inline element::operator const char*() const noexcept(false) { return get<const char *>(); }
_ZNK8simdjson3dom7elementcvNS0_5arrayEEv:
  365|     21|inline element::operator array() const noexcept(false) { return get<array>(); }
_ZNK8simdjson3dom7elementcvNS0_6objectEEv:
  366|     35|inline element::operator object() const noexcept(false) { return get<object>(); }
_ZNK8simdjson3dom7element5beginEv:
  368|    117|inline array::iterator element::begin() const noexcept(false) {
  369|    117|  return get<array>().begin();
  370|    117|}
_ZNK8simdjson3dom7element3endEv:
  371|     83|inline array::iterator element::end() const noexcept(false) {
  372|     83|  return get<array>().end();
  373|     83|}
_ZNK8simdjson3dom7elementixENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  377|    255|inline simdjson_result<element> element::operator[](std::string_view key) const noexcept {
  378|    255|  return at_key(key);
  379|    255|}
_ZNK8simdjson3dom7element10at_pointerENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  401|  10.4k|inline simdjson_result<element> element::at_pointer(std::string_view json_pointer) const noexcept {
  402|  10.4k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|  10.4k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  403|  10.4k|  switch (tape.tape_ref_type()) {
  404|    700|    case internal::tape_type::START_OBJECT:
  ------------------
  |  Branch (404:5): [True: 700, False: 9.70k]
  ------------------
  405|    700|      return object(tape).at_pointer(json_pointer);
  406|  9.48k|    case internal::tape_type::START_ARRAY:
  ------------------
  |  Branch (406:5): [True: 9.48k, False: 923]
  ------------------
  407|  9.48k|      return array(tape).at_pointer(json_pointer);
  408|    223|    default: {
  ------------------
  |  Branch (408:5): [True: 223, False: 10.1k]
  ------------------
  409|    223|      if (!json_pointer.empty()) { // a non-empty string can be invalid, or accessing a primitive (issue 2154)
  ------------------
  |  Branch (409:11): [True: 159, False: 64]
  ------------------
  410|    159|        if (is_pointer_well_formed(json_pointer)) {
  ------------------
  |  Branch (410:13): [True: 56, False: 103]
  ------------------
  411|     56|          return NO_SUCH_FIELD;
  412|     56|        }
  413|    103|        return INVALID_JSON_POINTER;
  414|    159|      }
  415|       |      // an empty string means that we return the current node
  416|     64|      dom::element copy(*this);
  417|     64|      return simdjson_result<element>(std::move(copy));
  418|    223|    }
  419|  10.4k|  }
  420|  10.4k|}
_ZN8simdjson15simdjson_resultINS_3dom7elementEEC2Ev:
   23|    607|    : internal::simdjson_result_base<dom::element>() {}
_ZNK8simdjson15simdjson_resultINS_3dom7elementEE10at_pointerENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEE:
  122|  9.31k|simdjson_inline simdjson_result<dom::element> simdjson_result<dom::element>::at_pointer(const std::string_view json_pointer) const noexcept {
  123|  9.31k|  if (error()) { return error(); }
  ------------------
  |  Branch (123:7): [True: 0, False: 9.31k]
  ------------------
  124|  9.31k|  return first.at_pointer(json_pointer);
  125|  9.31k|}
_ZN8simdjson3dom22is_pointer_well_formedENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  384|    159|inline bool is_pointer_well_formed(std::string_view json_pointer) noexcept {
  385|    159|  if (simdjson_unlikely(json_pointer[0] != '/')) {
  ------------------
  |  |  106|    159|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 15, False: 144]
  |  |  ------------------
  ------------------
  386|     15|    return false;
  387|     15|  }
  388|    144|  size_t escape = json_pointer.find('~');
  389|    144|  if (escape == std::string_view::npos) {
  ------------------
  |  Branch (389:7): [True: 46, False: 98]
  ------------------
  390|     46|    return true;
  391|     46|  }
  392|     98|  if (escape == json_pointer.size() - 1) {
  ------------------
  |  Branch (392:7): [True: 21, False: 77]
  ------------------
  393|     21|    return false;
  394|     21|  }
  395|     77|  if (json_pointer[escape + 1] != '0' && json_pointer[escape + 1] != '1') {
  ------------------
  |  Branch (395:7): [True: 70, False: 7]
  |  Branch (395:42): [True: 67, False: 3]
  ------------------
  396|     67|    return false;
  397|     67|  }
  398|     10|  return true;
  399|     77|}
_ZNK8simdjson3dom7element2atEm:
  435|    492|inline simdjson_result<element> element::at(size_t index) const noexcept {
  436|    492|  return get<array>().at(index);
  437|    492|}
_ZNK8simdjson3dom7element6at_keyENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  438|    586|inline simdjson_result<element> element::at_key(std::string_view key) const noexcept {
  439|    586|  return get<object>().at_key(key);
  440|    586|}
_ZNK8simdjson3dom7element23at_key_case_insensitiveENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  441|    384|inline simdjson_result<element> element::at_key_case_insensitive(std::string_view key) const noexcept {
  442|    384|  return get<object>().at_key_case_insensitive(key);
  443|    384|}
_ZNK8simdjson3dom7element13dump_raw_tapeERNSt3__113basic_ostreamIcNS2_11char_traitsIcEEEE:
  451|    909|inline bool element::dump_raw_tape(std::ostream &out) const noexcept {
  452|    909|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|    909|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  453|    909|  return tape.doc->dump_raw_tape(out);
  454|    909|}
_ZNK8simdjson15simdjson_resultINS_3dom7elementEE3getIS2_EENS_10error_codeERT_:
   43|  10.7k|simdjson_warn_unused simdjson_inline error_code simdjson_result<dom::element>::get(T &value) const noexcept {
   44|  10.7k|  if (error()) { return error(); }
  ------------------
  |  Branch (44:7): [True: 4.40k, False: 6.36k]
  ------------------
   45|  6.36k|  return first.get<T>(value);
   46|  10.7k|}
_ZNK8simdjson3dom7element3getIS1_EENS_10error_codeERT_:
  320|  6.36k|simdjson_warn_unused simdjson_inline error_code element::get<element>(element &value) const noexcept {
  321|  6.36k|  value = element(tape);
  322|  6.36k|  return SUCCESS;
  323|  6.36k|}

_ZN8simdjson3dom6objectC2ERKNS_8internal8tape_refE:
   75|  1.50k|simdjson_inline object::object(const internal::tape_ref &_tape) noexcept : tape{_tape} { }
_ZN8simdjson15simdjson_resultINS_3dom6objectEEC2ES2_:
   22|    801|    : internal::simdjson_result_base<dom::object>(std::forward<dom::object>(value)) {}
_ZN8simdjson15simdjson_resultINS_3dom6objectEEC2ENS_10error_codeE:
   24|    328|    : internal::simdjson_result_base<dom::object>(error) {}
_ZN8simdjson3dom6objectC2Ev:
   74|    369|simdjson_inline object::object() noexcept : tape{} {}
_ZNK8simdjson3dom6object10at_pointerENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   95|    700|inline simdjson_result<element> object::at_pointer(std::string_view json_pointer) const noexcept {
   96|    700|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|    700|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
   97|    700|  if(json_pointer.empty()) { // an empty string means that we return the current node
  ------------------
  |  Branch (97:6): [True: 83, False: 617]
  ------------------
   98|     83|      return element(this->tape); // copy the current node
   99|    617|  } else if(json_pointer[0] != '/') { // otherwise there is an error
  ------------------
  |  Branch (99:13): [True: 10, False: 607]
  ------------------
  100|     10|      return INVALID_JSON_POINTER;
  101|     10|  }
  102|    607|  json_pointer = json_pointer.substr(1);
  103|    607|  size_t slash = json_pointer.find('/');
  104|    607|  std::string_view key = json_pointer.substr(0, slash);
  105|       |  // Grab the child with the given key
  106|    607|  simdjson_result<element> child;
  107|       |
  108|       |  // If there is an escape character in the key, unescape it and then get the child.
  109|    607|  size_t escape = key.find('~');
  110|    607|  if (escape != std::string_view::npos) {
  ------------------
  |  Branch (110:7): [True: 285, False: 322]
  ------------------
  111|       |    // Unescape the key
  112|    285|    std::string unescaped(key);
  113|  1.42k|    do {
  114|  1.42k|      switch (unescaped[escape+1]) {
  115|    579|        case '0':
  ------------------
  |  Branch (115:9): [True: 579, False: 847]
  ------------------
  116|    579|          unescaped.replace(escape, 2, "~");
  117|    579|          break;
  118|    765|        case '1':
  ------------------
  |  Branch (118:9): [True: 765, False: 661]
  ------------------
  119|    765|          unescaped.replace(escape, 2, "/");
  120|    765|          break;
  121|     82|        default:
  ------------------
  |  Branch (121:9): [True: 82, False: 1.34k]
  ------------------
  122|     82|          return INVALID_JSON_POINTER; // "Unexpected ~ escape character in JSON pointer");
  123|  1.42k|      }
  124|  1.34k|      escape = unescaped.find('~', escape+1);
  125|  1.34k|    } while (escape != std::string::npos);
  ------------------
  |  Branch (125:14): [True: 1.14k, False: 203]
  ------------------
  126|    203|    child = at_key(unescaped);
  127|    322|  } else {
  128|    322|    child = at_key(key);
  129|    322|  }
  130|    525|  if(child.error()) {
  ------------------
  |  Branch (130:6): [True: 312, False: 213]
  ------------------
  131|    312|    return child; // we do not continue if there was an error
  132|    312|  }
  133|       |  // If there is a /, we have to recurse and look up more of the path
  134|    213|  if (slash != std::string_view::npos) {
  ------------------
  |  Branch (134:7): [True: 201, False: 12]
  ------------------
  135|    201|    child = child.at_pointer(json_pointer.substr(slash));
  136|    201|  }
  137|    213|  return child;
  138|    525|}
_ZNK8simdjson3dom6object6at_keyENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  146|    991|inline simdjson_result<element> object::at_key(std::string_view key) const noexcept {
  147|    991|  iterator end_field = end();
  148|  39.9k|  for (iterator field = begin(); field != end_field; ++field) {
  ------------------
  |  Branch (148:34): [True: 39.3k, False: 603]
  ------------------
  149|  39.3k|    if (field.key_equals(key)) {
  ------------------
  |  Branch (149:9): [True: 388, False: 38.9k]
  ------------------
  150|    388|      return field.value();
  151|    388|    }
  152|  39.3k|  }
  153|    603|  return NO_SUCH_FIELD;
  154|    991|}
_ZNK8simdjson3dom6object3endEv:
   80|  1.28k|inline object::iterator object::end() const noexcept {
   81|  1.28k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|  1.28k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
   82|  1.28k|  return internal::tape_ref(tape.doc, tape.after_element() - 1);
   83|  1.28k|}
_ZN8simdjson3dom6object8iteratorC2ERKNS_8internal8tape_refE:
  175|  2.56k|simdjson_inline object::iterator::iterator(const internal::tape_ref &_tape) noexcept : tape{_tape} { }
_ZNK8simdjson3dom6object5beginEv:
   76|  1.28k|inline object::iterator object::begin() const noexcept {
   77|  1.28k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  322|  1.28k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (322:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
   78|  1.28k|  return internal::tape_ref(tape.doc, tape.json_index + 1);
   79|  1.28k|}
_ZNK8simdjson3dom6object8iteratorneERKS2_:
  179|  46.5k|inline bool object::iterator::operator!=(const object::iterator& other) const noexcept {
  180|  46.5k|  return tape.json_index != other.tape.json_index;
  181|  46.5k|}
_ZNK8simdjson3dom6object8iterator10key_equalsENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
  233|  39.3k|inline bool object::iterator::key_equals(std::string_view o) const noexcept {
  234|       |  // We use the fact that the key length can be computed quickly
  235|       |  // without access to the string buffer.
  236|  39.3k|  const uint32_t len = key_length();
  237|  39.3k|  if(o.size() == len) {
  ------------------
  |  Branch (237:6): [True: 1.31k, False: 38.0k]
  ------------------
  238|       |    // We avoid construction of a temporary string_view instance.
  239|  1.31k|    return (memcmp(o.data(), key_c_str(), len) == 0);
  240|  1.31k|  }
  241|  38.0k|  return false;
  242|  39.3k|}
_ZNK8simdjson3dom6object8iterator10key_lengthEv:
  210|  45.6k|inline uint32_t object::iterator::key_length() const noexcept {
  211|  45.6k|  return tape.get_string_length();
  212|  45.6k|}
_ZNK8simdjson3dom6object8iterator9key_c_strEv:
  213|  1.70k|inline const char* object::iterator::key_c_str() const noexcept {
  214|  1.70k|  return reinterpret_cast<const char *>(&tape.doc->string_buf[size_t(tape.tape_value()) + sizeof(uint32_t)]);
  215|  1.70k|}
_ZNK8simdjson3dom6object8iterator5valueEv:
  216|    445|inline element object::iterator::value() const noexcept {
  217|    445|  return element(internal::tape_ref(tape.doc, tape.json_index + 1));
  218|    445|}
_ZN8simdjson3dom6object8iteratorppEv:
  197|  45.2k|inline object::iterator& object::iterator::operator++() noexcept {
  198|  45.2k|  tape.json_index++;
  199|  45.2k|  tape.json_index = tape.after_element();
  200|  45.2k|  return *this;
  201|  45.2k|}
_ZNK8simdjson15simdjson_resultINS_3dom6objectEE6at_keyENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEE:
   43|    586|inline simdjson_result<dom::element> simdjson_result<dom::object>::at_key(std::string_view key) const noexcept {
   44|    586|  if (error()) { return error(); }
  ------------------
  |  Branch (44:7): [True: 120, False: 466]
  ------------------
   45|    466|  return first.at_key(key);
   46|    586|}
_ZNK8simdjson15simdjson_resultINS_3dom6objectEE23at_key_case_insensitiveENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEE:
   47|    384|inline simdjson_result<dom::element> simdjson_result<dom::object>::at_key_case_insensitive(std::string_view key) const noexcept {
   48|    384|  if (error()) { return error(); }
  ------------------
  |  Branch (48:7): [True: 93, False: 291]
  ------------------
   49|    291|  return first.at_key_case_insensitive(key);
   50|    384|}
_ZNK8simdjson3dom6object23at_key_case_insensitiveENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  158|    291|inline simdjson_result<element> object::at_key_case_insensitive(std::string_view key) const noexcept {
  159|    291|  iterator end_field = end();
  160|  6.57k|  for (iterator field = begin(); field != end_field; ++field) {
  ------------------
  |  Branch (160:34): [True: 6.34k, False: 234]
  ------------------
  161|  6.34k|    if (field.key_equals_case_insensitive(key)) {
  ------------------
  |  Branch (161:9): [True: 57, False: 6.28k]
  ------------------
  162|     57|      return field.value();
  163|     57|    }
  164|  6.34k|  }
  165|    234|  return NO_SUCH_FIELD;
  166|    291|}
_ZNK8simdjson3dom6object8iterator27key_equals_case_insensitiveENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
  244|  6.34k|inline bool object::iterator::key_equals_case_insensitive(std::string_view o) const noexcept {
  245|       |  // We use the fact that the key length can be computed quickly
  246|       |  // without access to the string buffer.
  247|  6.34k|  const uint32_t len = key_length();
  248|  6.34k|  if(o.size() == len) {
  ------------------
  |  Branch (248:6): [True: 387, False: 5.95k]
  ------------------
  249|       |      // See For case-insensitive string comparisons, avoid char-by-char functions
  250|       |      // https://lemire.me/blog/2020/04/30/for-case-insensitive-string-comparisons-avoid-char-by-char-functions/
  251|       |      // Note that it might be worth rolling our own strncasecmp function, with vectorization.
  252|    387|      return (simdjson_strncasecmp(o.data(), key_c_str(), len) == 0);
  ------------------
  |  |  188|    387|#define simdjson_strncasecmp strncasecmp
  ------------------
  253|    387|  }
  254|  5.95k|  return false;
  255|  6.34k|}

_ZN8simdjson3dom6parserC2Em:
   24|  10.7k|  : _max_capacity{max_capacity},
   25|  10.7k|    loaded_bytes(nullptr) {
   26|  10.7k|}
_ZNR8simdjson3dom6parser5parseERKNS_13padded_stringE:
  163|  10.7k|simdjson_inline simdjson_result<element> parser::parse(const padded_string &s) & noexcept {
  164|  10.7k|  return parse(s.data(), s.length(), false);
  165|  10.7k|}
_ZNR8simdjson3dom6parser5parseEPKcmb:
  157|  10.7k|simdjson_inline simdjson_result<element> parser::parse(const char *buf, size_t len, bool realloc_if_needed) & noexcept {
  158|  10.7k|  return parse(reinterpret_cast<const uint8_t *>(buf), len, realloc_if_needed);
  159|  10.7k|}
_ZNR8simdjson3dom6parser5parseEPKhmb:
  153|  10.7k|inline simdjson_result<element> parser::parse(const uint8_t *buf, size_t len, bool realloc_if_needed) & noexcept {
  154|  10.7k|  return parse_into_document(doc, buf, len, realloc_if_needed);
  155|  10.7k|}
_ZNR8simdjson3dom6parser19parse_into_documentERNS0_8documentEPKhmb:
  113|  10.7k|inline simdjson_result<element> parser::parse_into_document(document& provided_doc, const uint8_t *buf, size_t len, bool realloc_if_needed) & noexcept {
  114|       |  // Important: we need to ensure that document has enough capacity.
  115|       |  // Important: It is possible that provided_doc is actually the internal 'doc' within the parser!!!
  116|  10.7k|  error_code _error = ensure_capacity(provided_doc, len);
  117|  10.7k|  if (_error) { return _error; }
  ------------------
  |  Branch (117:7): [True: 0, False: 10.7k]
  ------------------
  118|  10.7k|  if (realloc_if_needed) {
  ------------------
  |  Branch (118:7): [True: 0, False: 10.7k]
  ------------------
  119|       |    // Make sure we have enough capacity to copy len bytes
  120|      0|    if (!loaded_bytes || _loaded_bytes_capacity < len) {
  ------------------
  |  Branch (120:9): [True: 0, False: 0]
  |  Branch (120:26): [True: 0, False: 0]
  ------------------
  121|      0|      loaded_bytes.reset( internal::allocate_padded_buffer(len) );
  122|      0|      if (!loaded_bytes) {
  ------------------
  |  Branch (122:11): [True: 0, False: 0]
  ------------------
  123|      0|        return MEMALLOC;
  124|      0|      }
  125|      0|      _loaded_bytes_capacity = len;
  126|      0|    }
  127|      0|    std::memcpy(static_cast<void *>(loaded_bytes.get()), buf, len);
  128|      0|    buf = reinterpret_cast<const uint8_t*>(loaded_bytes.get());
  129|      0|  }
  130|       |
  131|  10.7k|  if((len >= 3) && (std::memcmp(buf, "\xEF\xBB\xBF", 3) == 0)) {
  ------------------
  |  Branch (131:6): [True: 10.2k, False: 493]
  |  Branch (131:20): [True: 41, False: 10.2k]
  ------------------
  132|     41|    buf += 3;
  133|     41|    len -= 3;
  134|     41|  }
  135|  10.7k|  _error = implementation->parse(buf, len, provided_doc);
  136|       |
  137|  10.7k|  if (_error) { return _error; }
  ------------------
  |  Branch (137:7): [True: 4.40k, False: 6.36k]
  ------------------
  138|       |
  139|  6.36k|  return provided_doc.root();
  140|  10.7k|}
_ZN8simdjson3dom6parser15ensure_capacityERNS0_8documentEm:
  225|  10.7k|inline error_code parser::ensure_capacity(document& target_document, size_t desired_capacity) noexcept {
  226|       |  // 1. It is wasteful to allocate a document and a parser for documents spanning less than MINIMAL_DOCUMENT_CAPACITY bytes.
  227|       |  // 2. If we allow desired_capacity = 0 then it is possible to exit this function with implementation == nullptr.
  228|  10.7k|  if(desired_capacity < MINIMAL_DOCUMENT_CAPACITY) { desired_capacity = MINIMAL_DOCUMENT_CAPACITY; }
  ------------------
  |  Branch (228:6): [True: 7.46k, False: 3.30k]
  ------------------
  229|       |  // If we don't have enough capacity, (try to) automatically bump it.
  230|       |  // If the document needs allocation, do it too.
  231|       |  // Both in one if statement to minimize unlikely branching.
  232|       |  //
  233|       |  // Note: we must make sure that this function is called if capacity() == 0. We do so because we
  234|       |  // ensure that desired_capacity > 0.
  235|  10.7k|  if (simdjson_unlikely(capacity() < desired_capacity || target_document.capacity() < desired_capacity)) {
  ------------------
  |  |  106|  10.7k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 10.7k, False: 0]
  |  |  |  Branch (106:52): [True: 10.7k, False: 0]
  |  |  |  Branch (106:52): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  236|  10.7k|    if (desired_capacity > max_capacity()) {
  ------------------
  |  Branch (236:9): [True: 0, False: 10.7k]
  ------------------
  237|      0|      return error = CAPACITY;
  238|      0|    }
  239|  10.7k|    error_code err1 = target_document.capacity() < desired_capacity ? target_document.allocate(desired_capacity) : SUCCESS;
  ------------------
  |  Branch (239:23): [True: 10.7k, False: 0]
  ------------------
  240|  10.7k|    error_code err2 = capacity() < desired_capacity ? allocate(desired_capacity, max_depth()) : SUCCESS;
  ------------------
  |  Branch (240:23): [True: 10.7k, False: 0]
  ------------------
  241|  10.7k|    if(err1 != SUCCESS) { return error = err1; }
  ------------------
  |  Branch (241:8): [True: 0, False: 10.7k]
  ------------------
  242|  10.7k|    if(err2 != SUCCESS) { return error = err2; }
  ------------------
  |  Branch (242:8): [True: 0, False: 10.7k]
  ------------------
  243|  10.7k|  }
  244|  10.7k|  return SUCCESS;
  245|  10.7k|}
_ZNK8simdjson3dom6parser8capacityEv:
  188|  21.5k|simdjson_inline size_t parser::capacity() const noexcept {
  189|  21.5k|  return implementation ? implementation->capacity() : 0;
  ------------------
  |  Branch (189:10): [True: 0, False: 21.5k]
  ------------------
  190|  21.5k|}
_ZNK8simdjson3dom6parser12max_capacityEv:
  191|  10.7k|simdjson_inline size_t parser::max_capacity() const noexcept {
  192|  10.7k|  return _max_capacity;
  193|  10.7k|}
_ZN8simdjson3dom6parser8allocateEmm:
  199|  10.7k|inline error_code parser::allocate(size_t capacity, size_t max_depth) noexcept {
  200|       |  //
  201|       |  // Reallocate implementation if needed
  202|       |  //
  203|  10.7k|  error_code err;
  204|  10.7k|  if (implementation) {
  ------------------
  |  Branch (204:7): [True: 0, False: 10.7k]
  ------------------
  205|      0|    err = implementation->allocate(capacity, max_depth);
  206|  10.7k|  } else {
  207|  10.7k|    err = simdjson::get_active_implementation()->create_dom_parser_implementation(capacity, max_depth, implementation);
  208|  10.7k|  }
  209|  10.7k|  if (err) { return err; }
  ------------------
  |  Branch (209:7): [True: 0, False: 10.7k]
  ------------------
  210|  10.7k|  return SUCCESS;
  211|  10.7k|}
_ZNK8simdjson3dom6parser9max_depthEv:
  194|  10.7k|simdjson_pure simdjson_inline size_t parser::max_depth() const noexcept {
  195|  10.7k|  return implementation ? implementation->max_depth() : DEFAULT_MAX_DEPTH;
  ------------------
  |  Branch (195:10): [True: 0, False: 10.7k]
  ------------------
  196|  10.7k|}

_ZN8simdjson3dom6parserD2Ev:
   60|  10.7k|  ~parser()=default;

_ZN8simdjson8internal20simdjson_result_baseINS_3dom7elementEEC2ENS_10error_codeE:
  111|  6.50k|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom7elementEEC2EOS3_NS_10error_codeE:
  108|  23.2k|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom7elementEEC2EOS3_:
  114|  16.1k|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom5arrayEEC2EOS3_:
  114|    532|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom5arrayEEC2EOS3_NS_10error_codeE:
  108|    900|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom5arrayEEC2ENS_10error_codeE:
  111|    368|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom6objectEEC2EOS3_:
  114|    801|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom6objectEEC2EOS3_NS_10error_codeE:
  108|  1.12k|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom6objectEEC2ENS_10error_codeE:
  111|    328|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson15simdjson_resultIPKcEC2EOS2_:
  199|      5|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseIPKcEC2EOS3_:
  114|      5|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseIPKcEC2EOS3_NS_10error_codeE:
  108|    113|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultIPKcEC2ENS_10error_codeE:
  196|    108|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseIPKcEC2ENS_10error_codeE:
  111|    108|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson15simdjson_resultImEC2EOm:
  199|    152|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseImEC2EOm:
  114|    152|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseImEC2EOmNS_10error_codeE:
  108|    737|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultImEC2ENS_10error_codeE:
  196|    585|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseImEC2ENS_10error_codeE:
  111|    585|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson15simdjson_resultINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEC2EOS5_:
  199|      8|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEEC2EOS6_:
  114|      8|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEEC2EOS6_NS_10error_codeE:
  108|    130|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEC2ENS_10error_codeE:
  196|    122|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEEC2ENS_10error_codeE:
  111|    122|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson15simdjson_resultIlEC2ENS_10error_codeE:
  196|    627|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseIlEC2ENS_10error_codeE:
  111|    627|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson8internal20simdjson_result_baseIlEC2EOlNS_10error_codeE:
  108|    642|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultIlEC2EOl:
  199|     15|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseIlEC2EOl:
  114|     15|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson15simdjson_resultIdEC2EOd:
  199|    111|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseIdEC2EOd:
  114|    111|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseIdEC2EOdNS_10error_codeE:
  108|    460|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultIdEC2ENS_10error_codeE:
  196|    349|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseIdEC2ENS_10error_codeE:
  111|    349|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson15simdjson_resultIbEC2EOb:
  199|      2|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseIbEC2EOb:
  114|      2|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseIbEC2EObNS_10error_codeE:
  108|    294|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultIbEC2ENS_10error_codeE:
  196|    292|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseIbEC2ENS_10error_codeE:
  111|    292|    : simdjson_result_base(T{}, error) {}
_ZNK8simdjson8internal20simdjson_result_baseINS_3dom5arrayEE5errorEv:
   66|  1.04k|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   67|  1.04k|  return this->second;
   68|  1.04k|}
_ZNK8simdjson8internal20simdjson_result_baseINS_3dom6objectEE5errorEv:
   66|  1.29k|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   67|  1.29k|  return this->second;
   68|  1.29k|}
_ZNK8simdjson15simdjson_resultINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEE5errorEv:
  153|     74|simdjson_inline error_code simdjson_result<T>::error() const noexcept {
  154|     74|  return internal::simdjson_result_base<T>::error();
  155|     74|}
_ZNK8simdjson8internal20simdjson_result_baseINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEE5errorEv:
   66|    109|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   67|    109|  return this->second;
   68|    109|}
_ZNK8simdjson15simdjson_resultIlE5errorEv:
  153|    424|simdjson_inline error_code simdjson_result<T>::error() const noexcept {
  154|    424|  return internal::simdjson_result_base<T>::error();
  155|    424|}
_ZNK8simdjson8internal20simdjson_result_baseIlE5errorEv:
   66|    764|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   67|    764|  return this->second;
   68|    764|}
_ZNK8simdjson15simdjson_resultImE5errorEv:
  153|    413|simdjson_inline error_code simdjson_result<T>::error() const noexcept {
  154|    413|  return internal::simdjson_result_base<T>::error();
  155|    413|}
_ZNK8simdjson8internal20simdjson_result_baseImE5errorEv:
   66|    776|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   67|    776|  return this->second;
   68|    776|}
_ZNK8simdjson15simdjson_resultIdE5errorEv:
  153|    314|simdjson_inline error_code simdjson_result<T>::error() const noexcept {
  154|    314|  return internal::simdjson_result_base<T>::error();
  155|    314|}
_ZNK8simdjson8internal20simdjson_result_baseIdE5errorEv:
   66|    455|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   67|    455|  return this->second;
   68|    455|}
_ZNK8simdjson15simdjson_resultIbE5errorEv:
  153|    124|simdjson_inline error_code simdjson_result<T>::error() const noexcept {
  154|    124|  return internal::simdjson_result_base<T>::error();
  155|    124|}
_ZNK8simdjson8internal20simdjson_result_baseIbE5errorEv:
   66|    280|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   67|    280|  return this->second;
   68|    280|}
_ZNK8simdjson15simdjson_resultIPKcE5errorEv:
  153|      3|simdjson_inline error_code simdjson_result<T>::error() const noexcept {
  154|      3|  return internal::simdjson_result_base<T>::error();
  155|      3|}
_ZNK8simdjson8internal20simdjson_result_baseIPKcE5errorEv:
   66|     20|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   67|     20|  return this->second;
   68|     20|}
_ZNO8simdjson15simdjson_resultIbE3getERb:
  131|     31|simdjson_warn_unused simdjson_inline error_code simdjson_result<T>::get(T &value) && noexcept {
  132|     31|  return std::forward<internal::simdjson_result_base<T>>(*this).get(value);
  133|     31|}
_ZNO8simdjson8internal20simdjson_result_baseIbE3getERb:
   59|     31|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   60|     31|  error_code error;
   61|     31|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   62|     31|  return error;
   63|     31|}
_ZNO8simdjson8internal20simdjson_result_baseIbE3tieERbRNS_10error_codeE:
   51|     31|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   52|     31|  error = this->second;
   53|     31|  if (!error) {
  ------------------
  |  Branch (53:7): [True: 0, False: 31]
  ------------------
   54|      0|    value = std::forward<simdjson_result_base<T>>(*this).first;
   55|      0|  }
   56|     31|}
_ZNO8simdjson15simdjson_resultIdE3getERd:
  131|      5|simdjson_warn_unused simdjson_inline error_code simdjson_result<T>::get(T &value) && noexcept {
  132|      5|  return std::forward<internal::simdjson_result_base<T>>(*this).get(value);
  133|      5|}
_ZNO8simdjson8internal20simdjson_result_baseIdE3getERd:
   59|      5|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   60|      5|  error_code error;
   61|      5|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   62|      5|  return error;
   63|      5|}
_ZNO8simdjson8internal20simdjson_result_baseIdE3tieERdRNS_10error_codeE:
   51|      5|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   52|      5|  error = this->second;
   53|      5|  if (!error) {
  ------------------
  |  Branch (53:7): [True: 2, False: 3]
  ------------------
   54|      2|    value = std::forward<simdjson_result_base<T>>(*this).first;
   55|      2|  }
   56|      5|}
_ZNO8simdjson15simdjson_resultImE3getERm:
  131|      8|simdjson_warn_unused simdjson_inline error_code simdjson_result<T>::get(T &value) && noexcept {
  132|      8|  return std::forward<internal::simdjson_result_base<T>>(*this).get(value);
  133|      8|}
_ZNO8simdjson8internal20simdjson_result_baseImE3getERm:
   59|      8|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   60|      8|  error_code error;
   61|      8|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   62|      8|  return error;
   63|      8|}
_ZNO8simdjson8internal20simdjson_result_baseImE3tieERmRNS_10error_codeE:
   51|      8|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   52|      8|  error = this->second;
   53|      8|  if (!error) {
  ------------------
  |  Branch (53:7): [True: 0, False: 8]
  ------------------
   54|      0|    value = std::forward<simdjson_result_base<T>>(*this).first;
   55|      0|  }
   56|      8|}
_ZNO8simdjson15simdjson_resultIlE3getERl:
  131|      6|simdjson_warn_unused simdjson_inline error_code simdjson_result<T>::get(T &value) && noexcept {
  132|      6|  return std::forward<internal::simdjson_result_base<T>>(*this).get(value);
  133|      6|}
_ZNO8simdjson8internal20simdjson_result_baseIlE3getERl:
   59|      6|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   60|      6|  error_code error;
   61|      6|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   62|      6|  return error;
   63|      6|}
_ZNO8simdjson8internal20simdjson_result_baseIlE3tieERlRNS_10error_codeE:
   51|      6|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   52|      6|  error = this->second;
   53|      6|  if (!error) {
  ------------------
  |  Branch (53:7): [True: 0, False: 6]
  ------------------
   54|      0|    value = std::forward<simdjson_result_base<T>>(*this).first;
   55|      0|  }
   56|      6|}
_ZNO8simdjson15simdjson_resultINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEE3getERS5_:
  131|      2|simdjson_warn_unused simdjson_inline error_code simdjson_result<T>::get(T &value) && noexcept {
  132|      2|  return std::forward<internal::simdjson_result_base<T>>(*this).get(value);
  133|      2|}
_ZNO8simdjson8internal20simdjson_result_baseINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEE3getERS6_:
   59|      2|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   60|      2|  error_code error;
   61|      2|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   62|      2|  return error;
   63|      2|}
_ZNO8simdjson8internal20simdjson_result_baseINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEE3tieERS6_RNS_10error_codeE:
   51|      2|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   52|      2|  error = this->second;
   53|      2|  if (!error) {
  ------------------
  |  Branch (53:7): [True: 0, False: 2]
  ------------------
   54|      0|    value = std::forward<simdjson_result_base<T>>(*this).first;
   55|      0|  }
   56|      2|}
_ZNO8simdjson15simdjson_resultIPKcE3getERS2_:
  131|     12|simdjson_warn_unused simdjson_inline error_code simdjson_result<T>::get(T &value) && noexcept {
  132|     12|  return std::forward<internal::simdjson_result_base<T>>(*this).get(value);
  133|     12|}
_ZNO8simdjson8internal20simdjson_result_baseIPKcE3getERS3_:
   59|     12|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   60|     12|  error_code error;
   61|     12|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   62|     12|  return error;
   63|     12|}
_ZNO8simdjson8internal20simdjson_result_baseIPKcE3tieERS3_RNS_10error_codeE:
   51|     12|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   52|     12|  error = this->second;
   53|     12|  if (!error) {
  ------------------
  |  Branch (53:7): [True: 4, False: 8]
  ------------------
   54|      4|    value = std::forward<simdjson_result_base<T>>(*this).first;
   55|      4|  }
   56|     12|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom5arrayEE3getERS3_:
   59|      7|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   60|      7|  error_code error;
   61|      7|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   62|      7|  return error;
   63|      7|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom5arrayEE3tieERS3_RNS_10error_codeE:
   51|      7|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   52|      7|  error = this->second;
   53|      7|  if (!error) {
  ------------------
  |  Branch (53:7): [True: 0, False: 7]
  ------------------
   54|      0|    value = std::forward<simdjson_result_base<T>>(*this).first;
   55|      0|  }
   56|      7|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom6objectEE3getERS3_:
   59|      3|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   60|      3|  error_code error;
   61|      3|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   62|      3|  return error;
   63|      3|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom6objectEE3tieERS3_RNS_10error_codeE:
   51|      3|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   52|      3|  error = this->second;
   53|      3|  if (!error) {
  ------------------
  |  Branch (53:7): [True: 2, False: 1]
  ------------------
   54|      2|    value = std::forward<simdjson_result_base<T>>(*this).first;
   55|      2|  }
   56|      3|}
_ZNO8simdjson15simdjson_resultIbEcvObEv:
  175|     79|simdjson_inline simdjson_result<T>::operator T&&() && noexcept(false) {
  176|     79|  return std::forward<internal::simdjson_result_base<T>>(*this).take_value();
  177|     79|}
_ZNO8simdjson8internal20simdjson_result_baseIbE10take_valueEv:
   84|     79|simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
   85|     79|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (85:7): [True: 77, False: 2]
  ------------------
   86|      2|  return std::forward<T>(this->first);
   87|     79|}
_ZNO8simdjson15simdjson_resultIdEcvOdEv:
  175|     82|simdjson_inline simdjson_result<T>::operator T&&() && noexcept(false) {
  176|     82|  return std::forward<internal::simdjson_result_base<T>>(*this).take_value();
  177|     82|}
_ZNO8simdjson8internal20simdjson_result_baseIdE10take_valueEv:
   84|     82|simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
   85|     82|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (85:7): [True: 59, False: 23]
  ------------------
   86|     23|  return std::forward<T>(this->first);
   87|     82|}
_ZNO8simdjson15simdjson_resultImEcvOmEv:
  175|    202|simdjson_inline simdjson_result<T>::operator T&&() && noexcept(false) {
  176|    202|  return std::forward<internal::simdjson_result_base<T>>(*this).take_value();
  177|    202|}
_ZNO8simdjson8internal20simdjson_result_baseImE10take_valueEv:
   84|    202|simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
   85|    202|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (85:7): [True: 161, False: 41]
  ------------------
   86|     41|  return std::forward<T>(this->first);
   87|    202|}
_ZNO8simdjson15simdjson_resultIlEcvOlEv:
  175|    171|simdjson_inline simdjson_result<T>::operator T&&() && noexcept(false) {
  176|    171|  return std::forward<internal::simdjson_result_base<T>>(*this).take_value();
  177|    171|}
_ZNO8simdjson8internal20simdjson_result_baseIlE10take_valueEv:
   84|    171|simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
   85|    171|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (85:7): [True: 169, False: 2]
  ------------------
   86|      2|  return std::forward<T>(this->first);
   87|    171|}
_ZNO8simdjson15simdjson_resultINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEcvOS5_Ev:
  175|     19|simdjson_inline simdjson_result<T>::operator T&&() && noexcept(false) {
  176|     19|  return std::forward<internal::simdjson_result_base<T>>(*this).take_value();
  177|     19|}
_ZNO8simdjson8internal20simdjson_result_baseINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEE10take_valueEv:
   84|     19|simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
   85|     19|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (85:7): [True: 16, False: 3]
  ------------------
   86|      3|  return std::forward<T>(this->first);
   87|     19|}
_ZNO8simdjson15simdjson_resultIPKcEcvOS2_Ev:
  175|      9|simdjson_inline simdjson_result<T>::operator T&&() && noexcept(false) {
  176|      9|  return std::forward<internal::simdjson_result_base<T>>(*this).take_value();
  177|      9|}
_ZNO8simdjson8internal20simdjson_result_baseIPKcE10take_valueEv:
   84|      9|simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
   85|      9|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (85:7): [True: 8, False: 1]
  ------------------
   86|      1|  return std::forward<T>(this->first);
   87|      9|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom5arrayEEcvOS3_Ev:
   90|     21|simdjson_inline simdjson_result_base<T>::operator T&&() && noexcept(false) {
   91|     21|  return std::forward<simdjson_result_base<T>>(*this).take_value();
   92|     21|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom5arrayEE10take_valueEv:
   84|     21|simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
   85|     21|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (85:7): [True: 16, False: 5]
  ------------------
   86|      5|  return std::forward<T>(this->first);
   87|     21|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom6objectEEcvOS3_Ev:
   90|     35|simdjson_inline simdjson_result_base<T>::operator T&&() && noexcept(false) {
   91|     35|  return std::forward<simdjson_result_base<T>>(*this).take_value();
   92|     35|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom6objectEE10take_valueEv:
   84|     35|simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
   85|     35|  if (error()) { throw simdjson_error(error()); }
  ------------------
  |  Branch (85:7): [True: 28, False: 7]
  ------------------
   86|      7|  return std::forward<T>(this->first);
   87|     35|}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom7elementEEC2Ev:
  117|    607|    : simdjson_result_base(T{}, UNINITIALIZED) {}
_ZNK8simdjson8internal20simdjson_result_baseINS_3dom7elementEE5errorEv:
   66|  34.3k|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   67|  34.3k|  return this->second;
   68|  34.3k|}

_ZN8simdjson14simdjson_errorC2ENS_10error_codeE:
   95|    664|  simdjson_error(error_code error) noexcept : _error{error} { }

_ZN8simdjson8fallback14implementationC2Ev:
   17|      1|  simdjson_inline implementation() : simdjson::implementation(
   18|      1|      "fallback",
   19|      1|      "Generic fallback implementation",
   20|      1|      0
   21|      1|  ) {}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_111atomparsing18is_valid_true_atomEPKhm:
   42|     50|simdjson_inline bool is_valid_true_atom(const uint8_t *src, size_t len) {
   43|     50|  if (len > 4) { return is_valid_true_atom(src); }
  ------------------
  |  Branch (43:7): [True: 4, False: 46]
  ------------------
   44|     46|  else if (len == 4) { return !str4ncmp(src, "true"); }
  ------------------
  |  Branch (44:12): [True: 43, False: 3]
  ------------------
   45|      3|  else { return false; }
   46|     50|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_111atomparsing18is_valid_true_atomEPKh:
   37|    489|simdjson_inline bool is_valid_true_atom(const uint8_t *src) {
   38|    489|  return (str4ncmp(src, "true") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0;
   39|    489|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_111atomparsing8str4ncmpEPKhPKc:
   29|  1.63k|simdjson_inline uint32_t str4ncmp(const uint8_t *src, const char* atom) {
   30|  1.63k|  uint32_t srcval; // we want to avoid unaligned 32-bit loads (undefined in C/C++)
   31|  1.63k|  static_assert(sizeof(uint32_t) <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be larger than 4 bytes");
   32|  1.63k|  std::memcpy(&srcval, src, sizeof(uint32_t));
   33|  1.63k|  return srcval ^ string_to_uint32(atom);
   34|  1.63k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_111atomparsing16string_to_uint32EPKc:
   23|  1.63k|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:
   54|     95|simdjson_inline bool is_valid_false_atom(const uint8_t *src, size_t len) {
   55|     95|  if (len > 5) { return is_valid_false_atom(src); }
  ------------------
  |  Branch (55:7): [True: 40, False: 55]
  ------------------
   56|     55|  else if (len == 5) { return !str4ncmp(src+1, "alse"); }
  ------------------
  |  Branch (56:12): [True: 51, False: 4]
  ------------------
   57|      4|  else { return false; }
   58|     95|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_111atomparsing19is_valid_false_atomEPKh:
   49|    513|simdjson_inline bool is_valid_false_atom(const uint8_t *src) {
   50|    513|  return (str4ncmp(src+1, "alse") | jsoncharutils::is_not_structural_or_whitespace(src[5])) == 0;
   51|    513|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_111atomparsing18is_valid_null_atomEPKhm:
   66|     54|simdjson_inline bool is_valid_null_atom(const uint8_t *src, size_t len) {
   67|     54|  if (len > 4) { return is_valid_null_atom(src); }
  ------------------
  |  Branch (67:7): [True: 8, False: 46]
  ------------------
   68|     46|  else if (len == 4) { return !str4ncmp(src, "null"); }
  ------------------
  |  Branch (68:12): [True: 44, False: 2]
  ------------------
   69|      2|  else { return false; }
   70|     54|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_111atomparsing18is_valid_null_atomEPKh:
   61|    494|simdjson_inline bool is_valid_null_atom(const uint8_t *src) {
   62|    494|  return (str4ncmp(src, "null") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0;
   63|    494|}

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

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113jsoncharutils18hex_to_u32_nocheckEPKh:
   32|  7.61k|    const uint8_t *src) { // strictly speaking, static inline is a C-ism
   33|  7.61k|  uint32_t v1 = internal::digit_to_val32[630 + src[0]];
   34|  7.61k|  uint32_t v2 = internal::digit_to_val32[420 + src[1]];
   35|  7.61k|  uint32_t v3 = internal::digit_to_val32[210 + src[2]];
   36|  7.61k|  uint32_t v4 = internal::digit_to_val32[0 + src[3]];
   37|  7.61k|  return v1 | v2 | v3 | v4;
   38|  7.61k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113jsoncharutils17codepoint_to_utf8EjPh:
   52|  5.86k|simdjson_inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) {
   53|  5.86k|  if (cp <= 0x7F) {
  ------------------
  |  Branch (53:7): [True: 1.33k, False: 4.52k]
  ------------------
   54|  1.33k|    c[0] = uint8_t(cp);
   55|  1.33k|    return 1; // ascii
   56|  1.33k|  }
   57|  4.52k|  if (cp <= 0x7FF) {
  ------------------
  |  Branch (57:7): [True: 1.18k, False: 3.34k]
  ------------------
   58|  1.18k|    c[0] = uint8_t((cp >> 6) + 192);
   59|  1.18k|    c[1] = uint8_t((cp & 63) + 128);
   60|  1.18k|    return 2; // universal plane
   61|       |    //  Surrogates are treated elsewhere...
   62|       |    //} //else if (0xd800 <= cp && cp <= 0xdfff) {
   63|       |    //  return 0; // surrogates // could put assert here
   64|  3.34k|  } else if (cp <= 0xFFFF) {
  ------------------
  |  Branch (64:14): [True: 1.95k, False: 1.38k]
  ------------------
   65|  1.95k|    c[0] = uint8_t((cp >> 12) + 224);
   66|  1.95k|    c[1] = uint8_t(((cp >> 6) & 63) + 128);
   67|  1.95k|    c[2] = uint8_t((cp & 63) + 128);
   68|  1.95k|    return 3;
   69|  1.95k|  } else if (cp <= 0x10FFFF) { // if you know you have a valid code point, this
  ------------------
  |  Branch (69:14): [True: 1.33k, False: 46]
  ------------------
   70|       |                               // is not needed
   71|  1.33k|    c[0] = uint8_t((cp >> 18) + 240);
   72|  1.33k|    c[1] = uint8_t(((cp >> 12) & 63) + 128);
   73|  1.33k|    c[2] = uint8_t(((cp >> 6) & 63) + 128);
   74|  1.33k|    c[3] = uint8_t((cp & 63) + 128);
   75|  1.33k|    return 4;
   76|  1.33k|  }
   77|       |  // will return 0 when the code point was too large.
   78|     46|  return 0; // bad r
   79|  4.52k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_113jsoncharutils31is_not_structural_or_whitespaceEh:
   17|  12.2M|simdjson_inline uint32_t is_not_structural_or_whitespace(uint8_t c) {
   18|  12.2M|  return internal::structural_or_whitespace_negated[c];
   19|  12.2M|}

simdjson.cpp:_ZN8simdjson7haswell13numberparsing12parse_numberINS0_12_GLOBAL__N_16stage211tape_writerEEENS_10error_codeEPKhRT_:
  576|  12.2M|simdjson_inline error_code parse_number(const uint8_t *const src, W &writer) {
  577|       |  //
  578|       |  // Check for minus sign
  579|       |  //
  580|  12.2M|  bool negative = (*src == '-');
  581|  12.2M|  const uint8_t *p = src + uint8_t(negative);
  582|       |
  583|       |  //
  584|       |  // Parse the integer part.
  585|       |  //
  586|       |  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
  587|  12.2M|  const uint8_t *const start_digits = p;
  588|  12.2M|  uint64_t i = 0;
  589|  44.9M|  while (parse_digit(*p, i)) { p++; }
  ------------------
  |  Branch (589:10): [True: 32.7M, False: 12.2M]
  ------------------
  590|       |
  591|       |  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
  592|       |  // Optimization note: size_t is expected to be unsigned.
  593|  12.2M|  size_t digit_count = size_t(p - start_digits);
  594|  12.2M|  if (digit_count == 0 || ('0' == *start_digits && digit_count > 1)) { return INVALID_NUMBER(src); }
  ------------------
  |  |   25|    104|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  |  Branch (594:7): [True: 68, False: 12.2M]
  |  Branch (594:28): [True: 14.0k, False: 12.2M]
  |  Branch (594:52): [True: 36, False: 13.9k]
  ------------------
  595|       |
  596|       |  //
  597|       |  // Handle floats if there is a . or e (or both)
  598|       |  //
  599|  12.2M|  int64_t exponent = 0;
  600|  12.2M|  bool is_float = false;
  601|  12.2M|  if ('.' == *p) {
  ------------------
  |  Branch (601:7): [True: 12.2k, False: 12.2M]
  ------------------
  602|  12.2k|    is_float = true;
  603|  12.2k|    ++p;
  604|  12.2k|    SIMDJSON_TRY( parse_decimal_after_separator(src, p, i, exponent) );
  ------------------
  |  |  273|  12.2k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 168, False: 12.0k]
  |  |  ------------------
  ------------------
  605|  12.0k|    digit_count = int(p - start_digits); // used later to guard against overflows
  606|  12.0k|  }
  607|  12.2M|  if (('e' == *p) || ('E' == *p)) {
  ------------------
  |  Branch (607:7): [True: 9.99k, False: 12.2M]
  |  Branch (607:22): [True: 3.16k, False: 12.2M]
  ------------------
  608|  13.1k|    is_float = true;
  609|  13.1k|    ++p;
  610|  13.1k|    SIMDJSON_TRY( parse_exponent(src, p, exponent) );
  ------------------
  |  |  273|  13.1k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 97, False: 13.0k]
  |  |  ------------------
  ------------------
  611|  13.0k|  }
  612|  12.2M|  if (is_float) {
  ------------------
  |  Branch (612:7): [True: 24.2k, False: 12.1M]
  ------------------
  613|  24.2k|    const bool dirty_end = jsoncharutils::is_not_structural_or_whitespace(*p);
  614|  24.2k|    SIMDJSON_TRY( write_float(src, negative, i, start_digits, digit_count, exponent, writer) );
  ------------------
  |  |  273|  24.2k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 670, False: 23.6k]
  |  |  ------------------
  ------------------
  615|  23.6k|    if (dirty_end) { return INVALID_NUMBER(src); }
  ------------------
  |  |   25|    196|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  |  Branch (615:9): [True: 196, False: 23.4k]
  ------------------
  616|  23.4k|    return SUCCESS;
  617|  23.6k|  }
  618|       |
  619|       |  // The longest negative 64-bit number is 19 digits.
  620|       |  // The longest positive 64-bit number is 20 digits.
  621|       |  // We do it this way so we don't trigger this branch unless we must.
  622|  12.1M|  size_t longest_digit_count = negative ? 19 : 20;
  ------------------
  |  Branch (622:32): [True: 1.27k, False: 12.1M]
  ------------------
  623|  12.1M|  if (digit_count > longest_digit_count) { return BIGINT_NUMBER(src); }
  ------------------
  |  |   29|     70|#define BIGINT_NUMBER(SRC) (BIGINT_ERROR)
  ------------------
  |  Branch (623:7): [True: 70, False: 12.1M]
  ------------------
  624|  12.1M|  if (digit_count == longest_digit_count) {
  ------------------
  |  Branch (624:7): [True: 1.38k, False: 12.1M]
  ------------------
  625|  1.38k|    if (negative) {
  ------------------
  |  Branch (625:9): [True: 636, False: 752]
  ------------------
  626|       |      // Anything negative above INT64_MAX+1 is invalid
  627|    636|      if (i > uint64_t(INT64_MAX)+1) { return BIGINT_NUMBER(src);  }
  ------------------
  |  |   29|     44|#define BIGINT_NUMBER(SRC) (BIGINT_ERROR)
  ------------------
  |  Branch (627:11): [True: 44, False: 592]
  ------------------
  628|    592|      WRITE_INTEGER(~i+1, src, writer);
  ------------------
  |  |   26|    592|#define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE))
  ------------------
  629|    592|      if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); }
  ------------------
  |  |   25|      3|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  |  Branch (629:11): [True: 3, False: 589]
  ------------------
  630|    589|      return SUCCESS;
  631|       |    // Positive overflow check:
  632|       |    // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the
  633|       |    //   biggest uint64_t.
  634|       |    // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX.
  635|       |    //   If we got here, it's a 20 digit number starting with the digit "1".
  636|       |    // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller
  637|       |    //   than 1,553,255,926,290,448,384.
  638|       |    // - That is smaller than the smallest possible 20-digit number the user could write:
  639|       |    //   10,000,000,000,000,000,000.
  640|       |    // - Therefore, if the number is positive and lower than that, it's overflow.
  641|       |    // - The value we are looking at is less than or equal to INT64_MAX.
  642|       |    //
  643|    752|    }  else if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INVALID_NUMBER(src); }
  ------------------
  |  |   25|     67|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  |  Branch (643:17): [True: 7, False: 745]
  |  Branch (643:43): [True: 60, False: 685]
  ------------------
  644|  1.38k|  }
  645|       |
  646|       |  // Write unsigned if it does not fit in a signed integer.
  647|  12.1M|  if (i > uint64_t(INT64_MAX)) {
  ------------------
  |  Branch (647:7): [True: 2.50k, False: 12.1M]
  ------------------
  648|  2.50k|    WRITE_UNSIGNED(i, src, writer);
  ------------------
  |  |   27|  2.50k|#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (WRITER).append_u64((VALUE))
  ------------------
  649|  12.1M|  } else {
  650|       |#if SIMDJSON_MINUS_ZERO_AS_FLOAT
  651|       |    if(i == 0 && negative) {
  652|       |      // We have to write -0.0 instead of 0
  653|       |      WRITE_DOUBLE(-0.0, src, writer);
  654|       |    } else {
  655|       |      WRITE_INTEGER(negative ? (~i+1) : i, src, writer);
  656|       |    }
  657|       |#else
  658|  12.1M|  WRITE_INTEGER(negative ? (~i+1) : i, src, writer);
  ------------------
  |  |   26|  24.3M|#define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE))
  |  |  ------------------
  |  |  |  Branch (26:64): [True: 627, False: 12.1M]
  |  |  ------------------
  ------------------
  659|  12.1M|#endif
  660|  12.1M|  }
  661|  12.1M|  if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); }
  ------------------
  |  |   25|     72|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  |  Branch (661:7): [True: 72, False: 12.1M]
  ------------------
  662|  12.1M|  return SUCCESS;
  663|  12.1M|}
simdjson.cpp:_ZN8simdjson7haswell13numberparsing12_GLOBAL__N_111parse_digitImEEbhRT_:
  350|  49.4M|simdjson_inline bool parse_digit(const uint8_t c, I &i) {
  351|  49.4M|  const uint8_t digit = static_cast<uint8_t>(c - '0');
  352|  49.4M|  if (digit > 9) {
  ------------------
  |  Branch (352:7): [True: 12.2M, False: 37.2M]
  ------------------
  353|  12.2M|    return false;
  354|  12.2M|  }
  355|       |  // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication
  356|  37.2M|  i = 10 * i + digit; // might overflow, we will handle the overflow later
  357|  37.2M|  return true;
  358|  49.4M|}
simdjson.cpp:_ZN8simdjson7haswell13numberparsing12_GLOBAL__N_129parse_decimal_after_separatorEPKhRS4_RmRl:
  364|  12.2k|simdjson_inline error_code parse_decimal_after_separator(simdjson_unused const uint8_t *const src, const uint8_t *&p, uint64_t &i, int64_t &exponent) {
  365|       |  // we continue with the fiction that we have an integer. If the
  366|       |  // floating point number is representable as x * 10^z for some integer
  367|       |  // z that fits in 53 bits, then we will be able to convert back the
  368|       |  // the integer into a float in a lossless manner.
  369|  12.2k|  const uint8_t *const first_after_period = p;
  370|       |
  371|  12.2k|#ifdef SIMDJSON_SWAR_NUMBER_PARSING
  372|  12.2k|#if SIMDJSON_SWAR_NUMBER_PARSING
  373|       |  // this helps if we have lots of decimals!
  374|       |  // this turns out to be frequent enough.
  375|  12.2k|  if (is_made_of_eight_digits_fast(p)) {
  ------------------
  |  Branch (375:7): [True: 7.13k, False: 5.08k]
  ------------------
  376|  7.13k|    i = i * 100000000 + parse_eight_digits_unrolled(p);
  377|  7.13k|    p += 8;
  378|  7.13k|  }
  379|  12.2k|#endif // SIMDJSON_SWAR_NUMBER_PARSING
  380|  12.2k|#endif // #ifdef SIMDJSON_SWAR_NUMBER_PARSING
  381|       |  // Unrolling the first digit makes a small difference on some implementations (e.g. westmere)
  382|  12.2k|  if (parse_digit(*p, i)) { ++p; }
  ------------------
  |  Branch (382:7): [True: 11.4k, False: 751]
  ------------------
  383|  4.47M|  while (parse_digit(*p, i)) { p++; }
  ------------------
  |  Branch (383:10): [True: 4.46M, False: 12.2k]
  ------------------
  384|  12.2k|  exponent = first_after_period - p;
  385|       |  // Decimal without digits (123.) is illegal
  386|  12.2k|  if (exponent == 0) {
  ------------------
  |  Branch (386:7): [True: 168, False: 12.0k]
  ------------------
  387|    168|    return INVALID_NUMBER(src);
  ------------------
  |  |   25|    168|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  388|    168|  }
  389|  12.0k|  return SUCCESS;
  390|  12.2k|}
simdjson.cpp:_ZN8simdjson7haswell13numberparsing12_GLOBAL__N_128is_made_of_eight_digits_fastEPKh:
  333|  12.2k|simdjson_inline bool is_made_of_eight_digits_fast(const uint8_t *chars) {
  334|  12.2k|  uint64_t val;
  335|       |  // this can read up to 7 bytes beyond the buffer size, but we require
  336|       |  // SIMDJSON_PADDING of padding
  337|  12.2k|  static_assert(7 <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be bigger than 7");
  338|  12.2k|  std::memcpy(&val, chars, 8);
  339|       |  // a branchy method might be faster:
  340|       |  // return (( val & 0xF0F0F0F0F0F0F0F0 ) == 0x3030303030303030)
  341|       |  //  && (( (val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0 ) ==
  342|       |  //  0x3030303030303030);
  343|  12.2k|  return (((val & 0xF0F0F0F0F0F0F0F0) |
  344|  12.2k|           (((val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0) >> 4)) ==
  345|  12.2k|          0x3333333333333333);
  346|  12.2k|}
simdjson.cpp:_ZN8simdjson7haswell13numberparsing12_GLOBAL__N_114parse_exponentEPKhRS4_Rl:
  392|  13.1k|simdjson_inline error_code parse_exponent(simdjson_unused const uint8_t *const src, const uint8_t *&p, int64_t &exponent) {
  393|       |  // Exp Sign: -123.456e[-]78
  394|  13.1k|  bool neg_exp = ('-' == *p);
  395|  13.1k|  if (neg_exp || '+' == *p) { p++; } // Skip + as well
  ------------------
  |  Branch (395:7): [True: 3.79k, False: 9.36k]
  |  Branch (395:18): [True: 674, False: 8.69k]
  ------------------
  396|       |
  397|       |  // Exponent: -123.456e-[78]
  398|  13.1k|  auto start_exp = p;
  399|  13.1k|  int64_t exp_number = 0;
  400|  3.46M|  while (parse_digit(*p, exp_number)) { ++p; }
  ------------------
  |  Branch (400:10): [True: 3.45M, False: 13.1k]
  ------------------
  401|       |  // It is possible for parse_digit to overflow.
  402|       |  // In particular, it could overflow to INT64_MIN, and we cannot do - INT64_MIN.
  403|       |  // Thus we *must* check for possible overflow before we negate exp_number.
  404|       |
  405|       |  // Performance notes: it may seem like combining the two "simdjson_unlikely checks" below into
  406|       |  // a single simdjson_unlikely path would be faster. The reasoning is sound, but the compiler may
  407|       |  // not oblige and may, in fact, generate two distinct paths in any case. It might be
  408|       |  // possible to do uint64_t(p - start_exp - 1) >= 18 but it could end up trading off
  409|       |  // instructions for a simdjson_likely branch, an unconclusive gain.
  410|       |
  411|       |  // If there were no digits, it's an error.
  412|  13.1k|  if (simdjson_unlikely(p == start_exp)) {
  ------------------
  |  |  106|  13.1k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 97, False: 13.0k]
  |  |  ------------------
  ------------------
  413|     97|    return INVALID_NUMBER(src);
  ------------------
  |  |   25|     97|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  414|     97|  }
  415|       |  // We have a valid positive exponent in exp_number at this point, except that
  416|       |  // it may have overflowed.
  417|       |
  418|       |  // If there were more than 18 digits, we may have overflowed the integer. We have to do
  419|       |  // something!!!!
  420|  13.0k|  if (simdjson_unlikely(p > start_exp+18)) {
  ------------------
  |  |  106|  13.0k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 901, False: 12.1k]
  |  |  ------------------
  ------------------
  421|       |    // Skip leading zeroes: 1e000000000000000000001 is technically valid and does not overflow
  422|  1.08M|    while (*start_exp == '0') { start_exp++; }
  ------------------
  |  Branch (422:12): [True: 1.08M, False: 901]
  ------------------
  423|       |    // 19 digits could overflow int64_t and is kind of absurd anyway. We don't
  424|       |    // support exponents smaller than -999,999,999,999,999,999 and bigger
  425|       |    // than 999,999,999,999,999,999.
  426|       |    // We can truncate.
  427|       |    // Note that 999999999999999999 is assuredly too large. The maximal ieee64 value before
  428|       |    // infinity is ~1.8e308. The smallest subnormal is ~5e-324. So, actually, we could
  429|       |    // truncate at 324.
  430|       |    // Note that there is no reason to fail per se at this point in time.
  431|       |    // E.g., 0e999999999999999999999 is a fine number.
  432|    901|    if (p > start_exp+18) { exp_number = 999999999999999999; }
  ------------------
  |  Branch (432:9): [True: 433, False: 468]
  ------------------
  433|    901|  }
  434|       |  // At this point, we know that exp_number is a sane, positive, signed integer.
  435|       |  // It is <= 999,999,999,999,999,999. As long as 'exponent' is in
  436|       |  // [-8223372036854775808, 8223372036854775808], we won't overflow. Because 'exponent'
  437|       |  // is bounded in magnitude by the size of the JSON input, we are fine in this universe.
  438|       |  // To sum it up: the next line should never overflow.
  439|  13.0k|  exponent += (neg_exp ? -exp_number : exp_number);
  ------------------
  |  Branch (439:16): [True: 3.78k, False: 9.27k]
  ------------------
  440|  13.0k|  return SUCCESS;
  441|  13.1k|}
simdjson.cpp:_ZN8simdjson7haswell13numberparsing12_GLOBAL__N_111parse_digitIlEEbhRT_:
  350|  3.46M|simdjson_inline bool parse_digit(const uint8_t c, I &i) {
  351|  3.46M|  const uint8_t digit = static_cast<uint8_t>(c - '0');
  352|  3.46M|  if (digit > 9) {
  ------------------
  |  Branch (352:7): [True: 13.1k, False: 3.45M]
  ------------------
  353|  13.1k|    return false;
  354|  13.1k|  }
  355|       |  // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication
  356|  3.45M|  i = 10 * i + digit; // might overflow, we will handle the overflow later
  357|  3.45M|  return true;
  358|  3.46M|}
simdjson.cpp:_ZN8simdjson7haswell13numberparsing11write_floatINS0_12_GLOBAL__N_16stage211tape_writerEEENS_10error_codeEPKhbmS8_mlRT_:
  481|  24.2k|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) {
  482|       |  // If we frequently had to deal with long strings of digits,
  483|       |  // we could extend our code by using a 128-bit integer instead
  484|       |  // of a 64-bit integer. However, this is uncommon in practice.
  485|       |  //
  486|       |  // 9999999999999999999 < 2**64 so we can accommodate 19 digits.
  487|       |  // If we have a decimal separator, then digit_count - 1 is the number of digits, but we
  488|       |  // may not have a decimal separator!
  489|  24.2k|  if (simdjson_unlikely(digit_count > 19 && significant_digits(start_digits, digit_count) > 19)) {
  ------------------
  |  |  106|  30.6k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 6.17k, False: 18.1k]
  |  |  |  Branch (106:52): [True: 6.34k, False: 17.9k]
  |  |  |  Branch (106:52): [True: 6.17k, False: 169]
  |  |  ------------------
  ------------------
  490|       |    // Ok, chances are good that we had an overflow!
  491|       |    // this is almost never going to get called!!!
  492|       |    // we start anew, going slowly!!!
  493|       |    // This will happen in the following examples:
  494|       |    // 10000000000000000000000000000000000000000000e+308
  495|       |    // 3.1415926535897932384626433832795028841971693993751
  496|       |    //
  497|       |    // NOTE: We do not pass a reference to the to slow_float_parsing. If we passed our writer
  498|       |    // reference to it, it would force it to be stored in memory, preventing the compiler from
  499|       |    // picking it apart and putting into registers. i.e. if we pass it as reference,
  500|       |    // it gets slow.
  501|  6.17k|    double d;
  502|  6.17k|    error_code error = slow_float_parsing(src, &d);
  503|  6.17k|    writer.append_double(d);
  504|  6.17k|    return error;
  505|  6.17k|  }
  506|       |  // NOTE: it's weird that the simdjson_unlikely() only wraps half the if, but it seems to get slower any other
  507|       |  // way we've tried: https://github.com/simdjson/simdjson/pull/990#discussion_r448497331
  508|       |  // To future reader: we'd love if someone found a better way, or at least could explain this result!
  509|  18.1k|  if (simdjson_unlikely(exponent < simdjson::internal::smallest_power) || (exponent > simdjson::internal::largest_power)) {
  ------------------
  |  |  106|  36.2k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 613, False: 17.5k]
  |  |  ------------------
  ------------------
  |  Branch (509:75): [True: 1.35k, False: 16.1k]
  ------------------
  510|       |    //
  511|       |    // Important: smallest_power is such that it leads to a zero value.
  512|       |    // Observe that 18446744073709551615e-343 == 0, i.e. (2**64 - 1) e -343 is zero
  513|       |    // so something x 10^-343 goes to zero, but not so with  something x 10^-342.
  514|  1.96k|    static_assert(simdjson::internal::smallest_power <= -342, "smallest_power is not small enough");
  515|       |    //
  516|  1.96k|    if((exponent < simdjson::internal::smallest_power) || (i == 0)) {
  ------------------
  |  Branch (516:8): [True: 613, False: 1.35k]
  |  Branch (516:59): [True: 1.01k, False: 332]
  ------------------
  517|       |      // E.g. Parse "-0.0e-999" into the same value as "-0.0". See https://en.wikipedia.org/wiki/Signed_zero
  518|  1.63k|      WRITE_DOUBLE(negative ? -0.0 : 0.0, src, writer);
  ------------------
  |  |   28|  3.26k|#define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE))
  |  |  ------------------
  |  |  |  Branch (28:66): [True: 12, False: 1.61k]
  |  |  ------------------
  ------------------
  519|  1.63k|      return SUCCESS;
  520|  1.63k|    } else { // (exponent > largest_power) and (i != 0)
  521|       |      // We have, for sure, an infinite value and simdjson refuses to parse infinite values.
  522|    332|      return INVALID_NUMBER(src);
  ------------------
  |  |   25|    332|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  523|    332|    }
  524|  1.96k|  }
  525|  16.1k|  double d;
  526|  16.1k|  if (!compute_float_64(exponent, i, negative, d)) {
  ------------------
  |  Branch (526:7): [True: 181, False: 15.9k]
  ------------------
  527|       |    // we are almost never going to get here.
  528|    181|    if (!parse_float_fallback(src, &d)) { return INVALID_NUMBER(src); }
  ------------------
  |  |   25|    181|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  |  Branch (528:9): [True: 181, False: 0]
  ------------------
  529|    181|  }
  530|  15.9k|  WRITE_DOUBLE(d, src, writer);
  ------------------
  |  |   28|  15.9k|#define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE))
  ------------------
  531|  15.9k|  return SUCCESS;
  532|  16.1k|}
simdjson.cpp:_ZN8simdjson7haswell13numberparsing12_GLOBAL__N_118significant_digitsEPKhm:
  460|  6.34k|simdjson_inline size_t significant_digits(const uint8_t * start_digits, size_t digit_count) {
  461|       |  // It is possible that the integer had an overflow.
  462|       |  // We have to handle the case where we have 0.0000somenumber.
  463|  6.34k|  const uint8_t *start = start_digits;
  464|  5.53M|  while ((*start == '0') || (*start == '.')) { ++start; }
  ------------------
  |  Branch (464:10): [True: 5.51M, False: 12.4k]
  |  Branch (464:29): [True: 6.14k, False: 6.34k]
  ------------------
  465|       |  // we over-decrement by one when there is a '.'
  466|  6.34k|  return digit_count - size_t(start - start_digits);
  467|  6.34k|}
simdjson.cpp:_ZN8simdjson7haswell13numberparsingL18slow_float_parsingEPKhPd:
  472|  6.17k|static error_code slow_float_parsing(simdjson_unused const uint8_t * src, double* answer) {
  473|  6.17k|  if (parse_float_fallback(src, answer)) {
  ------------------
  |  Branch (473:7): [True: 6.01k, False: 157]
  ------------------
  474|  6.01k|    return SUCCESS;
  475|  6.01k|  }
  476|    157|  return INVALID_NUMBER(src);
  ------------------
  |  |   25|    157|#define INVALID_NUMBER(SRC) (NUMBER_ERROR)
  ------------------
  477|  6.17k|}
simdjson.cpp:_ZN8simdjson7haswell13numberparsing12_GLOBAL__N_116compute_float_64ElmbRd:
   52|  16.1k|simdjson_inline bool compute_float_64(int64_t power, uint64_t i, bool negative, double &d) {
   53|       |  // we start with a fast path
   54|       |  // It was described in
   55|       |  // Clinger WD. How to read floating point numbers accurately.
   56|       |  // ACM SIGPLAN Notices. 1990
   57|       |#ifndef FLT_EVAL_METHOD
   58|       |#error "FLT_EVAL_METHOD should be defined, please include cfloat."
   59|       |#endif
   60|       |#if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0)
   61|       |  // We cannot be certain that x/y is rounded to nearest.
   62|       |  if (0 <= power && power <= 22 && i <= 9007199254740991)
   63|       |#else
   64|  16.1k|  if (-22 <= power && power <= 22 && i <= 9007199254740991)
  ------------------
  |  Branch (64:7): [True: 14.3k, False: 1.85k]
  |  Branch (64:23): [True: 9.71k, False: 4.59k]
  |  Branch (64:38): [True: 8.64k, False: 1.07k]
  ------------------
   65|  8.64k|#endif
   66|  8.64k|  {
   67|       |    // convert the integer into a double. This is lossless since
   68|       |    // 0 <= i <= 2^53 - 1.
   69|  8.64k|    d = double(i);
   70|       |    //
   71|       |    // The general idea is as follows.
   72|       |    // If 0 <= s < 2^53 and if 10^0 <= p <= 10^22 then
   73|       |    // 1) Both s and p can be represented exactly as 64-bit floating-point
   74|       |    // values
   75|       |    // (binary64).
   76|       |    // 2) Because s and p can be represented exactly as floating-point values,
   77|       |    // then s * p
   78|       |    // and s / p will produce correctly rounded values.
   79|       |    //
   80|  8.64k|    if (power < 0) {
  ------------------
  |  Branch (80:9): [True: 6.45k, False: 2.18k]
  ------------------
   81|  6.45k|      d = d / simdjson::internal::power_of_ten[-power];
   82|  6.45k|    } else {
   83|  2.18k|      d = d * simdjson::internal::power_of_ten[power];
   84|  2.18k|    }
   85|  8.64k|    if (negative) {
  ------------------
  |  Branch (85:9): [True: 503, False: 8.13k]
  ------------------
   86|    503|      d = -d;
   87|    503|    }
   88|  8.64k|    return true;
   89|  8.64k|  }
   90|       |  // When 22 < power && power <  22 + 16, we could
   91|       |  // hope for another, secondary fast path.  It was
   92|       |  // described by David M. Gay in  "Correctly rounded
   93|       |  // binary-decimal and decimal-binary conversions." (1990)
   94|       |  // If you need to compute i * 10^(22 + x) for x < 16,
   95|       |  // first compute i * 10^x, if you know that result is exact
   96|       |  // (e.g., when i * 10^x < 2^53),
   97|       |  // then you can still proceed and do (i * 10^x) * 10^22.
   98|       |  // Is this worth your time?
   99|       |  // You need  22 < power *and* power <  22 + 16 *and* (i * 10^(x-22) < 2^53)
  100|       |  // for this second fast path to work.
  101|       |  // If you you have 22 < power *and* power <  22 + 16, and then you
  102|       |  // optimistically compute "i * 10^(x-22)", there is still a chance that you
  103|       |  // have wasted your time if i * 10^(x-22) >= 2^53. It makes the use cases of
  104|       |  // this optimization maybe less common than we would like. Source:
  105|       |  // http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/
  106|       |  // also used in RapidJSON: https://rapidjson.org/strtod_8h_source.html
  107|       |
  108|       |  // The fast path has now failed, so we are failing back on the slower path.
  109|       |
  110|       |  // In the slow path, we need to adjust i so that it is > 1<<63 which is always
  111|       |  // possible, except if i == 0, so we handle i == 0 separately.
  112|  7.51k|  if(i == 0) {
  ------------------
  |  Branch (112:6): [True: 436, False: 7.08k]
  ------------------
  113|    436|    d = negative ? -0.0 : 0.0;
  ------------------
  |  Branch (113:9): [True: 11, False: 425]
  ------------------
  114|    436|    return true;
  115|    436|  }
  116|       |
  117|       |
  118|       |  // The exponent is 1024 + 63 + power
  119|       |  //     + floor(log(5**power)/log(2)).
  120|       |  // The 1024 comes from the ieee64 standard.
  121|       |  // The 63 comes from the fact that we use a 64-bit word.
  122|       |  //
  123|       |  // Computing floor(log(5**power)/log(2)) could be
  124|       |  // slow. Instead we use a fast function.
  125|       |  //
  126|       |  // For power in (-400,350), we have that
  127|       |  // (((152170 + 65536) * power ) >> 16);
  128|       |  // is equal to
  129|       |  //  floor(log(5**power)/log(2)) + power when power >= 0
  130|       |  // and it is equal to
  131|       |  //  ceil(log(5**-power)/log(2)) + power when power < 0
  132|       |  //
  133|       |  // The 65536 is (1<<16) and corresponds to
  134|       |  // (65536 * power) >> 16 ---> power
  135|       |  //
  136|       |  // ((152170 * power ) >> 16) is equal to
  137|       |  // floor(log(5**power)/log(2))
  138|       |  //
  139|       |  // Note that this is not magic: 152170/(1<<16) is
  140|       |  // approximately equal to log(5)/log(2).
  141|       |  // The 1<<16 value is a power of two; we could use a
  142|       |  // larger power of 2 if we wanted to.
  143|       |  //
  144|  7.08k|  int64_t exponent = (((152170 + 65536) * power) >> 16) + 1024 + 63;
  145|       |
  146|       |
  147|       |  // We want the most significant bit of i to be 1. Shift if needed.
  148|  7.08k|  int lz = leading_zeroes(i);
  149|  7.08k|  i <<= lz;
  150|       |
  151|       |
  152|       |  // We are going to need to do some 64-bit arithmetic to get a precise product.
  153|       |  // We use a table lookup approach.
  154|       |  // It is safe because
  155|       |  // power >= smallest_power
  156|       |  // and power <= largest_power
  157|       |  // We recover the mantissa of the power, it has a leading 1. It is always
  158|       |  // rounded down.
  159|       |  //
  160|       |  // We want the most significant 64 bits of the product. We know
  161|       |  // this will be non-zero because the most significant bit of i is
  162|       |  // 1.
  163|  7.08k|  const uint32_t index = 2 * uint32_t(power - simdjson::internal::smallest_power);
  164|       |  // 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.)
  165|       |  //
  166|       |  // The full_multiplication function computes the 128-bit product of two 64-bit words
  167|       |  // with a returned value of type value128 with a "low component" corresponding to the
  168|       |  // 64-bit least significant bits of the product and with a "high component" corresponding
  169|       |  // to the 64-bit most significant bits of the product.
  170|  7.08k|  simdjson::internal::value128 firstproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index]);
  171|       |  // Both i and power_of_five_128[index] have their most significant bit set to 1 which
  172|       |  // implies that the either the most or the second most significant bit of the product
  173|       |  // is 1. We pack values in this manner for efficiency reasons: it maximizes the use
  174|       |  // we make of the product. It also makes it easy to reason about the product: there
  175|       |  // is 0 or 1 leading zero in the product.
  176|       |
  177|       |  // Unless the least significant 9 bits of the high (64-bit) part of the full
  178|       |  // product are all 1s, then we know that the most significant 55 bits are
  179|       |  // exact and no further work is needed. Having 55 bits is necessary because
  180|       |  // we need 53 bits for the mantissa but we have to have one rounding bit and
  181|       |  // we can waste a bit if the most significant bit of the product is zero.
  182|  7.08k|  if((firstproduct.high & 0x1FF) == 0x1FF) {
  ------------------
  |  Branch (182:6): [True: 1.23k, False: 5.84k]
  ------------------
  183|       |    // We want to compute i * 5^q, but only care about the top 55 bits at most.
  184|       |    // Consider the scenario where q>=0. Then 5^q may not fit in 64-bits. Doing
  185|       |    // the full computation is wasteful. So we do what is called a "truncated
  186|       |    // multiplication".
  187|       |    // We take the most significant 64-bits, and we put them in
  188|       |    // power_of_five_128[index]. Usually, that's good enough to approximate i * 5^q
  189|       |    // to the desired approximation using one multiplication. Sometimes it does not suffice.
  190|       |    // Then we store the next most significant 64 bits in power_of_five_128[index + 1], and
  191|       |    // then we get a better approximation to i * 5^q.
  192|       |    //
  193|       |    // That's for when q>=0. The logic for q<0 is somewhat similar but it is somewhat
  194|       |    // more complicated.
  195|       |    //
  196|       |    // There is an extra layer of complexity in that we need more than 55 bits of
  197|       |    // accuracy in the round-to-even scenario.
  198|       |    //
  199|       |    // The full_multiplication function computes the 128-bit product of two 64-bit words
  200|       |    // with a returned value of type value128 with a "low component" corresponding to the
  201|       |    // 64-bit least significant bits of the product and with a "high component" corresponding
  202|       |    // to the 64-bit most significant bits of the product.
  203|  1.23k|    simdjson::internal::value128 secondproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index + 1]);
  204|  1.23k|    firstproduct.low += secondproduct.high;
  205|  1.23k|    if(secondproduct.high > firstproduct.low) { firstproduct.high++; }
  ------------------
  |  Branch (205:8): [True: 625, False: 613]
  ------------------
  206|       |    // As it has been proven by Noble Mushtak and Daniel Lemire in "Fast Number Parsing Without
  207|       |    // Fallback" (https://arxiv.org/abs/2212.06644), at this point we are sure that the product
  208|       |    // is sufficiently accurate, and more computation is not needed.
  209|  1.23k|  }
  210|  7.08k|  uint64_t lower = firstproduct.low;
  211|  7.08k|  uint64_t upper = firstproduct.high;
  212|       |  // The final mantissa should be 53 bits with a leading 1.
  213|       |  // We shift it so that it occupies 54 bits with a leading 1.
  214|       |  ///////
  215|  7.08k|  uint64_t upperbit = upper >> 63;
  216|  7.08k|  uint64_t mantissa = upper >> (upperbit + 9);
  217|  7.08k|  lz += int(1 ^ upperbit);
  218|       |
  219|       |  // Here we have mantissa < (1<<54).
  220|  7.08k|  int64_t real_exponent = exponent - lz;
  221|  7.08k|  if (simdjson_unlikely(real_exponent <= 0)) { // we have a subnormal?
  ------------------
  |  |  106|  7.08k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 1.20k, False: 5.87k]
  |  |  ------------------
  ------------------
  222|       |    // Here have that real_exponent <= 0 so -real_exponent >= 0
  223|  1.20k|    if(-real_exponent + 1 >= 64) { // if we have more than 64 bits below the minimum exponent, you have a zero for sure.
  ------------------
  |  Branch (223:8): [True: 486, False: 719]
  ------------------
  224|    486|      d = negative ? -0.0 : 0.0;
  ------------------
  |  Branch (224:11): [True: 1, False: 485]
  ------------------
  225|    486|      return true;
  226|    486|    }
  227|       |    // next line is safe because -real_exponent + 1 < 0
  228|    719|    mantissa >>= -real_exponent + 1;
  229|       |    // Thankfully, we can't have both "round-to-even" and subnormals because
  230|       |    // "round-to-even" only occurs for powers close to 0.
  231|    719|    mantissa += (mantissa & 1); // round up
  232|    719|    mantissa >>= 1;
  233|       |    // There is a weird scenario where we don't have a subnormal but just.
  234|       |    // Suppose we start with 2.2250738585072013e-308, we end up
  235|       |    // with 0x3fffffffffffff x 2^-1023-53 which is technically subnormal
  236|       |    // whereas 0x40000000000000 x 2^-1023-53  is normal. Now, we need to round
  237|       |    // up 0x3fffffffffffff x 2^-1023-53  and once we do, we are no longer
  238|       |    // subnormal, but we can only know this after rounding.
  239|       |    // So we only declare a subnormal if we are smaller than the threshold.
  240|    719|    real_exponent = (mantissa < (uint64_t(1) << 52)) ? 0 : 1;
  ------------------
  |  Branch (240:21): [True: 716, False: 3]
  ------------------
  241|    719|    d = to_double(mantissa, real_exponent, negative);
  242|    719|    return true;
  243|  1.20k|  }
  244|       |  // We have to round to even. The "to even" part
  245|       |  // is only a problem when we are right in between two floats
  246|       |  // which we guard against.
  247|       |  // If we have lots of trailing zeros, we may fall right between two
  248|       |  // floating-point values.
  249|       |  //
  250|       |  // The round-to-even cases take the form of a number 2m+1 which is in (2^53,2^54]
  251|       |  // times a power of two. That is, it is right between a number with binary significand
  252|       |  // m and another number with binary significand m+1; and it must be the case
  253|       |  // that it cannot be represented by a float itself.
  254|       |  //
  255|       |  // We must have that w * 10 ^q == (2m+1) * 2^p for some power of two 2^p.
  256|       |  // Recall that 10^q = 5^q * 2^q.
  257|       |  // When q >= 0, we must have that (2m+1) is divible by 5^q, so 5^q <= 2^54. We have that
  258|       |  //  5^23 <=  2^54 and it is the last power of five to qualify, so q <= 23.
  259|       |  // When q<0, we have  w  >=  (2m+1) x 5^{-q}.  We must have that w<2^{64} so
  260|       |  // (2m+1) x 5^{-q} < 2^{64}. We have that 2m+1>2^{53}. Hence, we must have
  261|       |  // 2^{53} x 5^{-q} < 2^{64}.
  262|       |  // Hence we have 5^{-q} < 2^{11}$ or q>= -4.
  263|       |  //
  264|       |  // We require lower <= 1 and not lower == 0 because we could not prove that
  265|       |  // that lower == 0 is implied; but we could prove that lower <= 1 is a necessary and sufficient test.
  266|  5.87k|  if (simdjson_unlikely((lower <= 1) && (power >= -4) && (power <= 23) && ((mantissa & 3) == 1))) {
  ------------------
  |  |  106|  24.9k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 1.76k, False: 4.11k]
  |  |  |  Branch (106:52): [True: 2.95k, False: 2.92k]
  |  |  |  Branch (106:52): [True: 2.44k, False: 509]
  |  |  |  Branch (106:52): [True: 1.94k, False: 505]
  |  |  |  Branch (106:52): [True: 1.76k, False: 175]
  |  |  ------------------
  ------------------
  267|  1.76k|    if((mantissa  << (upperbit + 64 - 53 - 2)) ==  upper) {
  ------------------
  |  Branch (267:8): [True: 410, False: 1.35k]
  ------------------
  268|    410|      mantissa &= ~1;             // flip it so that we do not round up
  269|    410|    }
  270|  1.76k|  }
  271|       |
  272|  5.87k|  mantissa += mantissa & 1;
  273|  5.87k|  mantissa >>= 1;
  274|       |
  275|       |  // Here we have mantissa < (1<<53), unless there was an overflow
  276|  5.87k|  if (mantissa >= (1ULL << 53)) {
  ------------------
  |  Branch (276:7): [True: 519, False: 5.35k]
  ------------------
  277|       |    //////////
  278|       |    // This will happen when parsing values such as 7.2057594037927933e+16
  279|       |    ////////
  280|    519|    mantissa = (1ULL << 52);
  281|    519|    real_exponent++;
  282|    519|  }
  283|  5.87k|  mantissa &= ~(1ULL << 52);
  284|       |  // we have to check that real_exponent is in range, otherwise we bail out
  285|  5.87k|  if (simdjson_unlikely(real_exponent > 2046)) {
  ------------------
  |  |  106|  5.87k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 181, False: 5.69k]
  |  |  ------------------
  ------------------
  286|       |    // We have an infinite value!!! We could actually throw an error here if we could.
  287|    181|    return false;
  288|    181|  }
  289|  5.69k|  d = to_double(mantissa, real_exponent, negative);
  290|  5.69k|  return true;
  291|  5.87k|}
simdjson.cpp:_ZN8simdjson7haswell13numberparsing12_GLOBAL__N_19to_doubleEmmb:
   37|  6.41k|simdjson_inline double to_double(uint64_t mantissa, uint64_t real_exponent, bool negative) {
   38|  6.41k|    double d;
   39|  6.41k|    mantissa &= ~(1ULL << 52);
   40|  6.41k|    mantissa |= real_exponent << 52;
   41|  6.41k|    mantissa |= ((static_cast<uint64_t>(negative)) << 63);
   42|  6.41k|    std::memcpy(&d, &mantissa, sizeof(d));
   43|  6.41k|    return d;
   44|  6.41k|}
simdjson.cpp:_ZN8simdjson7haswell13numberparsing12_GLOBAL__N_120parse_float_fallbackEPKhPd:
  300|  6.35k|static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) {
  301|  6.35k|  *outDouble = simdjson::internal::from_chars(reinterpret_cast<const char *>(ptr));
  302|       |  // We do not accept infinite values.
  303|       |
  304|       |  // Detecting finite values in a portable manner is ridiculously hard, ideally
  305|       |  // we would want to do:
  306|       |  // return !std::isfinite(*outDouble);
  307|       |  // but that mysteriously fails under legacy/old libc++ libraries, see
  308|       |  // https://github.com/simdjson/simdjson/issues/1286
  309|       |  //
  310|       |  // Therefore, fall back to this solution (the extra parens are there
  311|       |  // to handle that max may be a macro on windows).
  312|  6.35k|  return !(*outDouble > (std::numeric_limits<double>::max)() || *outDouble < std::numeric_limits<double>::lowest());
  ------------------
  |  Branch (312:12): [True: 327, False: 6.03k]
  |  Branch (312:65): [True: 11, False: 6.01k]
  ------------------
  313|  6.35k|}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_115trailing_zeroesEm:
   22|  30.2M|simdjson_inline int trailing_zeroes(uint64_t input_num) {
   23|       |#if SIMDJSON_REGULAR_VISUAL_STUDIO
   24|       |  return (int)_tzcnt_u64(input_num);
   25|       |#else // SIMDJSON_REGULAR_VISUAL_STUDIO
   26|       |  ////////
   27|       |  // You might expect the next line to be equivalent to
   28|       |  // return (int)_tzcnt_u64(input_num);
   29|       |  // but the generated code differs and might be less efficient?
   30|       |  ////////
   31|  30.2M|  return __builtin_ctzll(input_num);
   32|  30.2M|#endif // SIMDJSON_REGULAR_VISUAL_STUDIO
   33|  30.2M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_110count_onesEm:
   51|   507k|simdjson_inline long long int count_ones(uint64_t input_num) {
   52|   507k|  return _popcnt64(input_num);
   53|   507k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_116clear_lowest_bitEm:
   36|  30.1M|simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) {
   37|  30.1M|  return _blsr_u64(input_num);
   38|  30.1M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_114leading_zeroesEm:
   41|  7.08k|simdjson_inline int leading_zeroes(uint64_t input_num) {
   42|  7.08k|  return int(_lzcnt_u64(input_num));
   43|  7.08k|}

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

_ZN8simdjson7haswell14implementationC2Ev:
   19|      1|  simdjson_inline implementation() : simdjson::implementation(
   20|      1|      "haswell",
   21|      1|      "Intel/AMD AVX2",
   22|      1|      internal::instruction_set::AVX2 | internal::instruction_set::PCLMULQDQ | internal::instruction_set::BMI1 | internal::instruction_set::BMI2
   23|      1|  ) {}

simdjson.cpp:_ZN8simdjson7haswell13numberparsingL27parse_eight_digits_unrolledEPKh:
   18|  7.13k|static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) {
   19|       |  // this actually computes *16* values so we are being wasteful.
   20|  7.13k|  const __m128i ascii0 = _mm_set1_epi8('0');
   21|  7.13k|  const __m128i mul_1_10 =
   22|  7.13k|      _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1);
   23|  7.13k|  const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1);
   24|  7.13k|  const __m128i mul_1_10000 =
   25|  7.13k|      _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1);
   26|  7.13k|  const __m128i input = _mm_sub_epi8(
   27|  7.13k|      _mm_loadu_si128(reinterpret_cast<const __m128i *>(chars)), ascii0);
   28|  7.13k|  const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10);
   29|  7.13k|  const __m128i t2 = _mm_madd_epi16(t1, mul_1_100);
   30|  7.13k|  const __m128i t3 = _mm_packus_epi32(t2, t2);
   31|  7.13k|  const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000);
   32|  7.13k|  return _mm_cvtsi128_si32(
   33|  7.13k|      t4); // only captures the sum of the first 8 digits, drop the rest
   34|  7.13k|}
_ZN8simdjson7haswell13numberparsing19full_multiplicationEmm:
   37|  8.32k|simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) {
   38|  8.32k|  internal::value128 answer;
   39|       |#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
   40|       |#if SIMDJSON_IS_ARM64
   41|       |  // ARM64 has native support for 64-bit multiplications, no need to emultate
   42|       |  answer.high = __umulh(value1, value2);
   43|       |  answer.low = value1 * value2;
   44|       |#else
   45|       |  answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64
   46|       |#endif // SIMDJSON_IS_ARM64
   47|       |#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
   48|  8.32k|  __uint128_t r = (static_cast<__uint128_t>(value1)) * value2;
   49|  8.32k|  answer.low = uint64_t(r);
   50|  8.32k|  answer.high = uint64_t(r >> 64);
   51|  8.32k|#endif
   52|  8.32k|  return answer;
   53|  8.32k|}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2Ev:
  231|  32.0k|    simdjson_inline simd8() : base8_numeric<uint8_t>() {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhEC2Ev:
   98|  32.0k|    simdjson_inline base8_numeric() : base8<T>() {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5base8IhNS2_5simd8IbEEEC2Ev:
   50|  32.0k|    simdjson_inline base8() : base<simd8<T>>() {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEC2Ev:
   22|  32.0k|    simdjson_inline base() : value{__m256i()} {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhEC2EPKh:
  309|  1.27M|    simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8<T>::load(ptr), simd8<T>::load(ptr+32)} {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhE4loadEPKh:
   82|  2.74M|    static simdjson_inline simd8<T> load(const T values[32]) {
   83|  2.74M|      return _mm256_loadu_si256(reinterpret_cast<const __m256i *>(values));
   84|  2.74M|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2EDv4_x:
  232|  25.7M|    simdjson_inline simd8(const __m256i _value) : base8_numeric<uint8_t>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhEC2EDv4_x:
   99|  25.7M|    simdjson_inline base8_numeric(const __m256i _value) : base8<T>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5base8IhNS2_5simd8IbEEEC2EDv4_x:
   51|  25.7M|    simdjson_inline base8(const __m256i _value) : base<simd8<T>>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEC2EDv4_x:
   25|  25.7M|    simdjson_inline base(const __m256i _value) : value(_value) {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhE9reduce_orEv:
  330|  1.27M|    simdjson_inline simd8<T> reduce_or() const {
  331|  1.27M|      return this->chunks[0] | this->chunks[1];
  332|  1.27M|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEorES5_:
   32|  5.16M|    simdjson_inline Child operator|(const Child other) const { return _mm256_or_si256(*this, other); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEcvRKDv4_xEv:
   28|  54.4M|    simdjson_inline operator const __m256i&() const { return this->value; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE8is_asciiEv:
  283|  1.27M|    simdjson_inline bool is_ascii() const { return _mm256_movemask_epi8(*this) == 0; }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEoRES5_:
   36|  1.30M|    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_:
   58|  33.2k|    simdjson_inline simd8<T> prev(const simd8<T> prev_chunk) const {
   59|  33.2k|      return _mm256_alignr_epi8(*this, _mm256_permute2x128_si256(prev_chunk, *this, 0x21), 16 - N);
   60|  33.2k|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE3shrILi4EEES4_v:
  289|  66.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_:
  177|  99.6k|        L replace12, L replace13, L replace14, L replace15) const {
  178|  99.6k|      return lookup_16(simd8<L>::repeat_16(
  179|  99.6k|        replace0,  replace1,  replace2,  replace3,
  180|  99.6k|        replace4,  replace5,  replace6,  replace7,
  181|  99.6k|        replace8,  replace9,  replace10, replace11,
  182|  99.6k|        replace12, replace13, replace14, replace15
  183|  99.6k|      ));
  184|  99.6k|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhE9lookup_16IhEENS2_5simd8IT_EES8_:
  115|  99.6k|    simdjson_inline simd8<L> lookup_16(simd8<L> lookup_table) const {
  116|  99.6k|      return _mm256_shuffle_epi8(lookup_table, *this);
  117|  99.6k|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEcvRDv4_xEv:
   29|  99.6k|    simdjson_inline operator __m256i&() { return this->value; }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE9repeat_16Ehhhhhhhhhhhhhhhh:
  253|  2.65M|    ) {
  254|  2.65M|      return simd8<uint8_t>(
  255|  2.65M|        v0, v1, v2, v3, v4, v5, v6, v7,
  256|  2.65M|        v8, v9, v10,v11,v12,v13,v14,v15,
  257|  2.65M|        v0, v1, v2, v3, v4, v5, v6, v7,
  258|  2.65M|        v8, v9, v10,v11,v12,v13,v14,v15
  259|  2.65M|      );
  260|  2.65M|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2Ehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh:
  243|  2.65M|    ) : simd8(_mm256_setr_epi8(
  244|  2.65M|      v0, v1, v2, v3, v4, v5, v6, v7,
  245|  2.65M|      v8, v9, v10,v11,v12,v13,v14,v15,
  246|  2.65M|      v16,v17,v18,v19,v20,v21,v22,v23,
  247|  2.65M|      v24,v25,v26,v27,v28,v29,v30,v31
  248|  2.65M|    )) {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEanES5_:
   33|   199k|    simdjson_inline Child operator&(const Child other) const { return _mm256_and_si256(*this, other); }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2Eh:
  234|  3.09M|    simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhE5splatEh:
   80|  6.92M|    static simdjson_inline simd8<T> splat(T _value) { return _mm256_set1_epi8(_value); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5base8IhNS2_5simd8IbEEE4prevILi2EEENS4_IhEES8_:
   58|  33.2k|    simdjson_inline simd8<T> prev(const simd8<T> prev_chunk) const {
   59|  33.2k|      return _mm256_alignr_epi8(*this, _mm256_permute2x128_si256(prev_chunk, *this, 0x21), 16 - N);
   60|  33.2k|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5base8IhNS2_5simd8IbEEE4prevILi3EEENS4_IhEES8_:
   58|  33.2k|    simdjson_inline simd8<T> prev(const simd8<T> prev_chunk) const {
   59|  33.2k|      return _mm256_alignr_epi8(*this, _mm256_permute2x128_si256(prev_chunk, *this, 0x21), 16 - N);
   60|  33.2k|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE14saturating_subES4_:
  264|  83.0k|    simdjson_inline simd8<uint8_t> saturating_sub(const simd8<uint8_t> other) const { return _mm256_subs_epu8(*this, other); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEeoES5_:
   34|  33.2k|    simdjson_inline Child operator^(const Child other) const { return _mm256_xor_si256(*this, other); }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2EPKh:
  236|   188k|    simdjson_inline simd8(const uint8_t values[32]) : simd8(load(values)) {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE7gt_bitsES4_:
  270|  16.6k|    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:
  285|  10.2k|    simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE21bits_not_set_anywhereEv:
  284|  10.2k|    simdjson_inline bool bits_not_set_anywhere() const { return _mm256_testz_si256(*this, *this); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhE5storeEPh:
  102|   172k|    simdjson_inline void store(T dst[32]) const { return _mm256_storeu_si256(reinterpret_cast<__m256i *>(dst), *this); }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simdeqENS2_5simd8IhEES4_:
   53|  13.1M|    friend simdjson_really_inline Mask operator==(const simd8<T> lhs, const simd8<T> rhs) { return _mm256_cmpeq_epi8(lhs, rhs); }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IbEC2EDv4_x:
   69|  13.1M|    simdjson_inline simd8(const __m256i _value) : base8<bool>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5base8IbNS2_5simd8IbEEEC2EDv4_x:
   51|  13.1M|    simdjson_inline base8(const __m256i _value) : base<simd8<T>>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IbEEEC2EDv4_x:
   25|  13.1M|    simdjson_inline base(const __m256i _value) : value(_value) {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IbE10to_bitmaskEv:
   73|  13.1M|    simdjson_inline int to_bitmask() const { return _mm256_movemask_epi8(*this); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IbEEEcvRKDv4_xEv:
   28|  13.1M|    simdjson_inline operator const __m256i&() const { return this->value; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhE2eqEh:
  342|  2.55M|    simdjson_inline uint64_t eq(const T m) const {
  343|  2.55M|      const simd8<T> mask = simd8<T>::splat(m);
  344|  2.55M|      return  simd8x64<bool>(
  345|  2.55M|        this->chunks[0] == mask,
  346|  2.55M|        this->chunks[1] == mask
  347|  2.55M|      ).to_bitmask();
  348|  2.55M|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IbEC2ENS2_5simd8IbEES6_:
  308|  6.37M|    simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1) : chunks{chunk0, chunk1} {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IbE10to_bitmaskEv:
  324|  6.37M|    simdjson_inline uint64_t to_bitmask() const {
  325|  6.37M|      uint64_t r_lo = uint32_t(this->chunks[0].to_bitmask());
  326|  6.37M|      uint64_t r_hi =                       this->chunks[1].to_bitmask();
  327|  6.37M|      return r_lo | (r_hi << 32);
  328|  6.37M|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhE2eqERKS4_:
  350|  2.55M|    simdjson_inline uint64_t eq(const simd8x64<uint8_t> &other) const {
  351|  2.55M|      return  simd8x64<bool>(
  352|  2.55M|        this->chunks[0] == other.chunks[0],
  353|  2.55M|        this->chunks[1] == other.chunks[1]
  354|  2.55M|      ).to_bitmask();
  355|  2.55M|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhEC2ENS2_5simd8IhEES6_:
  308|  3.82M|    simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1) : chunks{chunk0, chunk1} {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhE4lteqEh:
  357|  1.27M|    simdjson_inline uint64_t lteq(const T m) const {
  358|  1.27M|      const simd8<T> mask = simd8<T>::splat(m);
  359|  1.27M|      return  simd8x64<bool>(
  360|  1.27M|        this->chunks[0] <= mask,
  361|  1.27M|        this->chunks[1] <= mask
  362|  1.27M|      ).to_bitmask();
  363|  1.27M|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEleES4_:
  273|  2.55M|    simdjson_inline simd8<bool> operator<=(const simd8<uint8_t> other) const { return other.max_val(*this) == other; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE7max_valES4_:
  267|  2.55M|    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:
   31|   172k|simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) {
   32|       |  // this can read up to 15 bytes beyond the buffer size, but we require
   33|       |  // SIMDJSON_PADDING of padding
   34|   172k|  static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes");
   35|   172k|  simd8<uint8_t> v(src);
   36|       |  // store to dest unconditionally - we can overwrite the bits we don't like later
   37|   172k|  v.store(dst);
   38|   172k|  return {
   39|   172k|      static_cast<uint32_t>((v == '\\').to_bitmask()),     // bs_bits
   40|   172k|      static_cast<uint32_t>((v == '"').to_bitmask()), // quote_bits
   41|   172k|  };
   42|   172k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_119backslash_and_quote15has_quote_firstEv:
   22|   172k|  simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_119backslash_and_quote11quote_indexEv:
   24|  60.1k|  simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_119backslash_and_quote13has_backslashEv:
   23|   111k|  simdjson_inline bool has_backslash() { return ((quote_bits - 1) & bs_bits) != 0; }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_119backslash_and_quote15backslash_indexEv:
   25|  11.6k|  simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); }

_ZN8simdjson7icelake14implementationC2Ev:
   19|      1|  simdjson_inline implementation() : simdjson::implementation(
   20|      1|      "icelake",
   21|      1|      "Intel/AMD AVX512",
   22|      1|      internal::instruction_set::AVX2 | internal::instruction_set::PCLMULQDQ | internal::instruction_set::BMI1 | internal::instruction_set::BMI2 | internal::instruction_set::AVX512F | internal::instruction_set::AVX512DQ | internal::instruction_set::AVX512CD | internal::instruction_set::AVX512BW | internal::instruction_set::AVX512VL | internal::instruction_set::AVX512VBMI2
   23|      1|  ) {}

_ZNK8simdjson14implementation25required_instruction_setsEv:
   84|      2|  virtual uint32_t required_instruction_sets() const { return _required_instruction_sets; }
_ZN8simdjson14implementationC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_j:
  137|      5|    _name(name),
  138|      5|    _description(description),
  139|      5|    _required_instruction_sets(required_instruction_sets)
  140|      5|  {
  141|      5|  }
_ZN8simdjson8internal29available_implementation_listC2Ev:
  171|      1|  simdjson_inline available_implementation_list() {}

_ZN8simdjson8internal10atomic_ptrIKNS_14implementationEEptEv:
   21|  10.7k|  T* operator->() { return ptr.load(); }
_ZN8simdjson8internal10atomic_ptrIKNS_14implementationEEaSEPS3_:
   22|      1|  atomic_ptr& operator=(T *_ptr) { ptr = _ptr; return *this; }
_ZN8simdjson8internal10atomic_ptrIKNS_14implementationEEcvPS3_Ev:
   19|      1|  operator T*() { return ptr.load(); }
_ZN8simdjson8internal10atomic_ptrIKNS_14implementationEEC2EPS3_:
   13|      1|  atomic_ptr(T *_ptr) : ptr{_ptr} {}

_ZNK8simdjson8internal25dom_parser_implementation8capacityEv:
  228|  10.7k|simdjson_pure simdjson_inline size_t dom_parser_implementation::capacity() const noexcept {
  229|  10.7k|  return _capacity;
  230|  10.7k|}
_ZNK8simdjson8internal25dom_parser_implementation9max_depthEv:
  232|  48.0k|simdjson_pure simdjson_inline size_t dom_parser_implementation::max_depth() const noexcept {
  233|  48.0k|  return _max_depth;
  234|  48.0k|}
_ZN8simdjson12is_streamingENS_11stage1_modeE:
   27|  21.3k|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.3k|  return (mode != stage1_mode::regular);
   31|       |  // return (mode == stage1_mode::streaming_partial || mode == stage1_mode::streaming_final);
   32|  21.3k|}
_ZN8simdjson8internal25dom_parser_implementationC2Ev:
  224|  10.7k|simdjson_inline dom_parser_implementation::dom_parser_implementation() noexcept = default;
_ZN8simdjson8internal25dom_parser_implementationD2Ev:
  166|  10.7k|  virtual ~dom_parser_implementation() = default;

_ZN8simdjson8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_18escape_json_stringE:
   23|  3.70k|inline std::ostream& operator<<(std::ostream& out, const escape_json_string &unescaped) {
   24|  33.9k|  for (size_t i=0; i<unescaped.str.length(); i++) {
  ------------------
  |  Branch (24:20): [True: 30.2k, False: 3.70k]
  ------------------
   25|  30.2k|    switch (unescaped.str[i]) {
   26|    415|    case '\b':
  ------------------
  |  Branch (26:5): [True: 415, False: 29.8k]
  ------------------
   27|    415|      out << "\\b";
   28|    415|      break;
   29|    351|    case '\f':
  ------------------
  |  Branch (29:5): [True: 351, False: 29.8k]
  ------------------
   30|    351|      out << "\\f";
   31|    351|      break;
   32|    238|    case '\n':
  ------------------
  |  Branch (32:5): [True: 238, False: 29.9k]
  ------------------
   33|    238|      out << "\\n";
   34|    238|      break;
   35|    803|    case '\r':
  ------------------
  |  Branch (35:5): [True: 803, False: 29.4k]
  ------------------
   36|    803|      out << "\\r";
   37|    803|      break;
   38|    201|    case '\"':
  ------------------
  |  Branch (38:5): [True: 201, False: 30.0k]
  ------------------
   39|    201|      out << "\\\"";
   40|    201|      break;
   41|    206|    case '\t':
  ------------------
  |  Branch (41:5): [True: 206, False: 30.0k]
  ------------------
   42|    206|      out << "\\t";
   43|    206|      break;
   44|    838|    case '\\':
  ------------------
  |  Branch (44:5): [True: 838, False: 29.3k]
  ------------------
   45|    838|      out << "\\\\";
   46|    838|      break;
   47|  27.1k|    default:
  ------------------
  |  Branch (47:5): [True: 27.1k, False: 3.05k]
  ------------------
   48|  27.1k|      if (static_cast<unsigned char>(unescaped.str[i]) <= 0x1F) {
  ------------------
  |  Branch (48:11): [True: 430, False: 26.7k]
  ------------------
   49|       |        // TODO can this be done once at the beginning, or will it mess up << char?
   50|    430|        std::ios::fmtflags f(out.flags());
   51|    430|        out << "\\u" << std::hex << std::setw(4) << std::setfill('0') << int(unescaped.str[i]);
   52|    430|        out.flags(f);
   53|  26.7k|      } else {
   54|  26.7k|        out << unescaped.str[i];
   55|  26.7k|      }
   56|  30.2k|    }
   57|  30.2k|  }
   58|  3.70k|  return out;
   59|  3.70k|}
_ZN8simdjson8internal18escape_json_stringC2ENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   16|  3.70k|  escape_json_string(std::string_view _str) noexcept : str{_str} {}

_ZN8simdjson8internal8tape_refC2Ev:
   19|  18.6k|simdjson_inline tape_ref::tape_ref() noexcept : doc{nullptr}, json_index{0} {}
_ZN8simdjson8internal8tape_refC2EPKNS_3dom8documentEm:
   20|  28.9k|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:
   71|  1.67M|simdjson_inline tape_type tape_ref::tape_ref_type() const noexcept {
   72|  1.67M|  return static_cast<tape_type>(doc->tape[json_index] >> 56);
   73|  1.67M|}
_ZNK8simdjson8internal8tape_ref9get_c_strEv:
  103|     13|simdjson_inline const char * internal::tape_ref::get_c_str() const noexcept {
  104|     13|  size_t string_buf_index = size_t(tape_value());
  105|     13|  return reinterpret_cast<const char *>(&doc->string_buf[string_buf_index + sizeof(uint32_t)]);
  106|     13|}
_ZNK8simdjson8internal8tape_ref10tape_valueEv:
   74|  47.4k|simdjson_inline uint64_t internal::tape_ref::tape_value() const noexcept {
   75|  47.4k|  return doc->tape[json_index] & internal::JSON_VALUE_MASK;
   76|  47.4k|}
_ZNK8simdjson8internal8tape_ref17get_string_lengthEv:
   96|  45.6k|simdjson_inline uint32_t internal::tape_ref::get_string_length() const noexcept {
   97|  45.6k|  size_t string_buf_index = size_t(tape_value());
   98|  45.6k|  uint32_t len;
   99|  45.6k|  std::memcpy(&len, &doc->string_buf[string_buf_index], sizeof(len));
  100|  45.6k|  return len;
  101|  45.6k|}
_ZNK8simdjson8internal8tape_ref15get_string_viewEv:
  108|      8|inline std::string_view internal::tape_ref::get_string_view() const noexcept {
  109|      8|  return std::string_view(
  110|      8|      get_c_str(),
  111|      8|      get_string_length()
  112|      8|  );
  113|      8|}
_ZNK8simdjson8internal8tape_ref8is_int64Ev:
   37|  1.56k|simdjson_inline bool tape_ref::is_int64() const noexcept {
   38|  1.56k|  constexpr uint64_t tape_int64 = uint64_t(tape_type::INT64)<<56;
   39|  1.56k|  return doc->tape[json_index] == tape_int64;
   40|  1.56k|}
_ZNK8simdjson8internal8tape_ref9is_uint64Ev:
   41|  1.66k|simdjson_inline bool tape_ref::is_uint64() const noexcept {
   42|  1.66k|  constexpr uint64_t tape_uint64 = uint64_t(tape_type::UINT64)<<56;
   43|  1.66k|  return doc->tape[json_index] == tape_uint64;
   44|  1.66k|}
_ZNK8simdjson8internal8tape_ref15next_tape_valueImEET_v:
   85|    225|simdjson_inline T tape_ref::next_tape_value() const noexcept {
   86|    225|  static_assert(sizeof(T) == sizeof(uint64_t), "next_tape_value() template parameter must be 64-bit");
   87|       |  // Though the following is tempting...
   88|       |  //  return *reinterpret_cast<const T*>(&doc->tape[json_index + 1]);
   89|       |  // It is not generally safe. It is safer, and often faster to rely
   90|       |  // on memcpy. Yes, it is uglier, but it is also encapsulated.
   91|    225|  T x;
   92|    225|  std::memcpy(&x,&doc->tape[json_index + 1],sizeof(uint64_t));
   93|    225|  return x;
   94|    225|}
_ZNK8simdjson8internal8tape_ref15next_tape_valueIlEET_v:
   85|    270|simdjson_inline T tape_ref::next_tape_value() const noexcept {
   86|    270|  static_assert(sizeof(T) == sizeof(uint64_t), "next_tape_value() template parameter must be 64-bit");
   87|       |  // Though the following is tempting...
   88|       |  //  return *reinterpret_cast<const T*>(&doc->tape[json_index + 1]);
   89|       |  // It is not generally safe. It is safer, and often faster to rely
   90|       |  // on memcpy. Yes, it is uglier, but it is also encapsulated.
   91|    270|  T x;
   92|    270|  std::memcpy(&x,&doc->tape[json_index + 1],sizeof(uint64_t));
   93|    270|  return x;
   94|    270|}
_ZNK8simdjson8internal8tape_ref9is_doubleEv:
   33|    460|simdjson_inline bool tape_ref::is_double() const noexcept {
   34|    460|  constexpr uint64_t tape_double = uint64_t(tape_type::DOUBLE)<<56;
   35|    460|  return doc->tape[json_index] == tape_double;
   36|    460|}
_ZNK8simdjson8internal8tape_ref15next_tape_valueIdEET_v:
   85|     99|simdjson_inline T tape_ref::next_tape_value() const noexcept {
   86|     99|  static_assert(sizeof(T) == sizeof(uint64_t), "next_tape_value() template parameter must be 64-bit");
   87|       |  // Though the following is tempting...
   88|       |  //  return *reinterpret_cast<const T*>(&doc->tape[json_index + 1]);
   89|       |  // It is not generally safe. It is safer, and often faster to rely
   90|       |  // on memcpy. Yes, it is uglier, but it is also encapsulated.
   91|     99|  T x;
   92|     99|  std::memcpy(&x,&doc->tape[json_index + 1],sizeof(uint64_t));
   93|     99|  return x;
   94|     99|}
_ZNK8simdjson8internal8tape_ref7is_trueEv:
   49|    294|simdjson_inline bool tape_ref::is_true() const noexcept {
   50|    294|  constexpr uint64_t tape_true = uint64_t(tape_type::TRUE_VALUE)<<56;
   51|    294|  return doc->tape[json_index] == tape_true;
   52|    294|}
_ZNK8simdjson8internal8tape_ref8is_falseEv:
   45|    293|simdjson_inline bool tape_ref::is_false() const noexcept {
   46|    293|  constexpr uint64_t tape_false = uint64_t(tape_type::FALSE_VALUE)<<56;
   47|    293|  return doc->tape[json_index] == tape_false;
   48|    293|}
_ZNK8simdjson8internal8tape_ref15is_null_on_tapeEv:
   53|     84|simdjson_inline bool tape_ref::is_null_on_tape() const noexcept {
   54|     84|  constexpr uint64_t tape_null = uint64_t(tape_type::NULL_VALUE)<<56;
   55|     84|  return doc->tape[json_index] == tape_null;
   56|     84|}
_ZNK8simdjson8internal8tape_ref13after_elementEv:
   58|  1.66M|inline size_t tape_ref::after_element() const noexcept {
   59|  1.66M|  switch (tape_ref_type()) {
   60|  47.7k|    case tape_type::START_ARRAY:
  ------------------
  |  Branch (60:5): [True: 47.7k, False: 1.61M]
  ------------------
   61|  50.3k|    case tape_type::START_OBJECT:
  ------------------
  |  Branch (61:5): [True: 2.64k, False: 1.65M]
  ------------------
   62|  50.3k|      return matching_brace_index();
   63|  1.38k|    case tape_type::UINT64:
  ------------------
  |  Branch (63:5): [True: 1.38k, False: 1.65M]
  ------------------
   64|  1.60M|    case tape_type::INT64:
  ------------------
  |  Branch (64:5): [True: 1.60M, False: 55.7k]
  ------------------
   65|  1.60M|    case tape_type::DOUBLE:
  ------------------
  |  Branch (65:5): [True: 2.56k, False: 1.65M]
  ------------------
   66|  1.60M|      return json_index + 2;
   67|  1.44k|    default:
  ------------------
  |  Branch (67:5): [True: 1.44k, False: 1.65M]
  ------------------
   68|  1.44k|      return json_index + 1;
   69|  1.66M|  }
   70|  1.66M|}
_ZNK8simdjson8internal8tape_ref20matching_brace_indexEv:
   77|  50.3k|simdjson_inline uint32_t internal::tape_ref::matching_brace_index() const noexcept {
   78|  50.3k|  return uint32_t(doc->tape[json_index]);
   79|  50.3k|}

_ZN8simdjson8internal22allocate_padded_bufferEm:
   21|  10.7k|inline char *allocate_padded_buffer(size_t length) noexcept {
   22|  10.7k|  const size_t totalpaddedlength = length + SIMDJSON_PADDING;
   23|  10.7k|  if(totalpaddedlength<length) {
  ------------------
  |  Branch (23:6): [True: 0, False: 10.7k]
  ------------------
   24|       |    // overflow
   25|      0|    return nullptr;
   26|      0|  }
   27|  10.7k|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   28|       |  // avoid getting out of memory
   29|  10.7k|  if (totalpaddedlength>(1UL<<20)) {
  ------------------
  |  Branch (29:7): [True: 4, False: 10.7k]
  ------------------
   30|      4|    return nullptr;
   31|      4|  }
   32|  10.7k|#endif
   33|       |
   34|  10.7k|  char *padded_buffer = new (std::nothrow) char[totalpaddedlength];
   35|  10.7k|  if (padded_buffer == nullptr) {
  ------------------
  |  Branch (35:7): [True: 0, False: 10.7k]
  ------------------
   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|  10.7k|  std::memset(padded_buffer + length, 0, totalpaddedlength - length);
   41|  10.7k|  return padded_buffer;
   42|  10.7k|} // allocate_padded_buffer()
_ZNK8simdjson13padded_string4dataEv:
  124|  10.7k|inline const char *padded_string::data() const noexcept { return data_ptr; }
_ZNK8simdjson13padded_string6lengthEv:
  122|  10.7k|inline size_t padded_string::length() const noexcept { return viable_size; }
_ZN8simdjson13padded_stringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   82|  10.7k|    : viable_size(sv_.size()), data_ptr(internal::allocate_padded_buffer(sv_.size())) {
   83|  10.7k|  if(simdjson_unlikely(!data_ptr)) {
  ------------------
  |  |  106|  10.7k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 4, False: 10.7k]
  |  |  ------------------
  ------------------
   84|       |    //allocation failed or zero size
   85|      4|    viable_size = 0;
   86|      4|    return;
   87|      4|  }
   88|  10.7k|  if (sv_.size()) {
  ------------------
  |  Branch (88:7): [True: 10.6k, False: 90]
  ------------------
   89|  10.6k|    std::memcpy(data_ptr, sv_.data(), sv_.size());
   90|  10.6k|  }
   91|  10.7k|}
_ZN8simdjson13padded_stringD2Ev:
  116|  10.7k|inline padded_string::~padded_string() noexcept {
  117|  10.7k|  delete[] data_ptr;
  118|  10.7k|}

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

_ZN8simdjson8internal10is_integerEc:
   67|  17.5M|bool is_integer(char c)  noexcept  { return (c >= '0' && c <= '9'); }
  ------------------
  |  Branch (67:46): [True: 17.5M, False: 10.9k]
  |  Branch (67:58): [True: 17.5M, False: 2.55k]
  ------------------
_ZN8simdjson8internal13parse_decimalERPKc:
   70|  6.35k|decimal parse_decimal(const char *&p) noexcept {
   71|  6.35k|  decimal answer;
   72|  6.35k|  answer.num_digits = 0;
   73|  6.35k|  answer.decimal_point = 0;
   74|  6.35k|  answer.truncated = false;
   75|  6.35k|  answer.negative = (*p == '-');
   76|  6.35k|  if ((*p == '-') || (*p == '+')) {
  ------------------
  |  Branch (76:7): [True: 0, False: 6.35k]
  |  Branch (76:22): [True: 0, False: 6.35k]
  ------------------
   77|      0|    ++p;
   78|      0|  }
   79|       |
   80|  7.36k|  while (*p == '0') {
  ------------------
  |  Branch (80:10): [True: 1.00k, False: 6.35k]
  ------------------
   81|  1.00k|    ++p;
   82|  1.00k|  }
   83|  12.2M|  while (is_integer(*p)) {
  ------------------
  |  Branch (83:10): [True: 12.2M, False: 6.35k]
  ------------------
   84|  12.2M|    if (answer.num_digits < max_digits) {
  ------------------
  |  Branch (84:9): [True: 140k, False: 12.1M]
  ------------------
   85|   140k|      answer.digits[answer.num_digits] = uint8_t(*p - '0');
   86|   140k|    }
   87|  12.2M|    answer.num_digits++;
   88|  12.2M|    ++p;
   89|  12.2M|  }
   90|  6.35k|  if (*p == '.') {
  ------------------
  |  Branch (90:7): [True: 4.84k, False: 1.51k]
  ------------------
   91|  4.84k|    ++p;
   92|  4.84k|    const char *first_after_period = p;
   93|       |    // if we have not yet encountered a zero, we have to skip it as well
   94|  4.84k|    if (answer.num_digits == 0) {
  ------------------
  |  Branch (94:9): [True: 1.00k, False: 3.83k]
  ------------------
   95|       |      // skip zeros
   96|  29.4k|      while (*p == '0') {
  ------------------
  |  Branch (96:14): [True: 28.4k, False: 1.00k]
  ------------------
   97|  28.4k|        ++p;
   98|  28.4k|      }
   99|  1.00k|    }
  100|  4.46M|    while (is_integer(*p)) {
  ------------------
  |  Branch (100:12): [True: 4.45M, False: 4.84k]
  ------------------
  101|  4.45M|      if (answer.num_digits < max_digits) {
  ------------------
  |  Branch (101:11): [True: 393k, False: 4.06M]
  ------------------
  102|   393k|        answer.digits[answer.num_digits] = uint8_t(*p - '0');
  103|   393k|      }
  104|  4.45M|      answer.num_digits++;
  105|  4.45M|      ++p;
  106|  4.45M|    }
  107|  4.84k|    answer.decimal_point = int32_t(first_after_period - p);
  108|  4.84k|  }
  109|  6.35k|  if(answer.num_digits > 0) {
  ------------------
  |  Branch (109:6): [True: 6.27k, False: 84]
  ------------------
  110|  6.27k|    const char *preverse = p - 1;
  111|  6.27k|    int32_t trailing_zeros = 0;
  112|   619k|    while ((*preverse == '0') || (*preverse == '.')) {
  ------------------
  |  Branch (112:12): [True: 612k, False: 7.04k]
  |  Branch (112:34): [True: 773, False: 6.27k]
  ------------------
  113|   613k|      if(*preverse == '0') { trailing_zeros++; };
  ------------------
  |  Branch (113:10): [True: 612k, False: 773]
  ------------------
  114|   613k|      --preverse;
  115|   613k|    }
  116|  6.27k|    answer.decimal_point += int32_t(answer.num_digits);
  117|  6.27k|    answer.num_digits -= uint32_t(trailing_zeros);
  118|  6.27k|  }
  119|  6.35k|  if(answer.num_digits > max_digits ) {
  ------------------
  |  Branch (119:6): [True: 340, False: 6.01k]
  ------------------
  120|    340|    answer.num_digits = max_digits;
  121|    340|    answer.truncated = true;
  122|    340|  }
  123|  6.35k|  if (('e' == *p) || ('E' == *p)) {
  ------------------
  |  Branch (123:7): [True: 1.40k, False: 4.95k]
  |  Branch (123:22): [True: 872, False: 4.07k]
  ------------------
  124|  2.27k|    ++p;
  125|  2.27k|    bool neg_exp = false;
  126|  2.27k|    if ('-' == *p) {
  ------------------
  |  Branch (126:9): [True: 977, False: 1.30k]
  ------------------
  127|    977|      neg_exp = true;
  128|    977|      ++p;
  129|  1.30k|    } else if ('+' == *p) {
  ------------------
  |  Branch (129:16): [True: 282, False: 1.01k]
  ------------------
  130|    282|      ++p;
  131|    282|    }
  132|  2.27k|    int32_t exp_number = 0; // exponential part
  133|   859k|    while (is_integer(*p)) {
  ------------------
  |  Branch (133:12): [True: 857k, False: 2.27k]
  ------------------
  134|   857k|      uint8_t digit = uint8_t(*p - '0');
  135|   857k|      if (exp_number < 0x10000) {
  ------------------
  |  Branch (135:11): [True: 559k, False: 297k]
  ------------------
  136|   559k|        exp_number = 10 * exp_number + digit;
  137|   559k|      }
  138|   857k|      ++p;
  139|   857k|    }
  140|  2.27k|    answer.decimal_point += (neg_exp ? -exp_number : exp_number);
  ------------------
  |  Branch (140:30): [True: 977, False: 1.30k]
  ------------------
  141|  2.27k|  }
  142|  6.35k|  return answer;
  143|  6.35k|}
_ZN8simdjson8internal5roundERNS0_7decimalE:
  331|  6.98k|uint64_t round(decimal &h) {
  332|  6.98k|  if ((h.num_digits == 0) || (h.decimal_point < 0)) {
  ------------------
  |  Branch (332:7): [True: 0, False: 6.98k]
  |  Branch (332:30): [True: 220, False: 6.76k]
  ------------------
  333|    220|    return 0;
  334|  6.76k|  } else if (h.decimal_point > 18) {
  ------------------
  |  Branch (334:14): [True: 0, False: 6.76k]
  ------------------
  335|      0|    return UINT64_MAX;
  336|      0|  }
  337|       |  // at this point, we know that h.decimal_point >= 0
  338|  6.76k|  uint32_t dp = uint32_t(h.decimal_point);
  339|  6.76k|  uint64_t n = 0;
  340|   111k|  for (uint32_t i = 0; i < dp; i++) {
  ------------------
  |  Branch (340:24): [True: 104k, False: 6.76k]
  ------------------
  341|   104k|    n = (10 * n) + ((i < h.num_digits) ? h.digits[i] : 0);
  ------------------
  |  Branch (341:21): [True: 100k, False: 3.78k]
  ------------------
  342|   104k|  }
  343|  6.76k|  bool round_up = false;
  344|  6.76k|  if (dp < h.num_digits) {
  ------------------
  |  Branch (344:7): [True: 5.92k, False: 840]
  ------------------
  345|  5.92k|    round_up = h.digits[dp] >= 5; // normally, we round up
  346|       |    // but we may need to round to even!
  347|  5.92k|    if ((h.digits[dp] == 5) && (dp + 1 == h.num_digits)) {
  ------------------
  |  Branch (347:9): [True: 1.08k, False: 4.84k]
  |  Branch (347:32): [True: 514, False: 566]
  ------------------
  348|    514|      round_up = h.truncated || ((dp > 0) && (1 & h.digits[dp - 1]));
  ------------------
  |  Branch (348:18): [True: 283, False: 231]
  |  Branch (348:34): [True: 231, False: 0]
  |  Branch (348:46): [True: 67, False: 164]
  ------------------
  349|    514|    }
  350|  5.92k|  }
  351|  6.76k|  if (round_up) {
  ------------------
  |  Branch (351:7): [True: 4.52k, False: 2.23k]
  ------------------
  352|  4.52k|    n++;
  353|  4.52k|  }
  354|  6.76k|  return n;
  355|  6.98k|}
_ZN8simdjson8internal18decimal_left_shiftERNS0_7decimalEj:
  358|  22.7k|void decimal_left_shift(decimal &h, uint32_t shift) {
  359|  22.7k|  if (h.num_digits == 0) {
  ------------------
  |  Branch (359:7): [True: 0, False: 22.7k]
  ------------------
  360|      0|    return;
  361|      0|  }
  362|  22.7k|  uint32_t num_new_digits = number_of_digits_decimal_left_shift(h, shift);
  363|  22.7k|  int32_t read_index = int32_t(h.num_digits - 1);
  364|  22.7k|  uint32_t write_index = h.num_digits - 1 + num_new_digits;
  365|  22.7k|  uint64_t n = 0;
  366|       |
  367|  2.89M|  while (read_index >= 0) {
  ------------------
  |  Branch (367:10): [True: 2.86M, False: 22.7k]
  ------------------
  368|  2.86M|    n += uint64_t(h.digits[read_index]) << shift;
  369|  2.86M|    uint64_t quotient = n / 10;
  370|  2.86M|    uint64_t remainder = n - (10 * quotient);
  371|  2.86M|    if (write_index < max_digits) {
  ------------------
  |  Branch (371:9): [True: 2.86M, False: 3.90k]
  ------------------
  372|  2.86M|      h.digits[write_index] = uint8_t(remainder);
  373|  2.86M|    } else if (remainder > 0) {
  ------------------
  |  Branch (373:16): [True: 3.24k, False: 666]
  ------------------
  374|  3.24k|      h.truncated = true;
  375|  3.24k|    }
  376|  2.86M|    n = quotient;
  377|  2.86M|    write_index--;
  378|  2.86M|    read_index--;
  379|  2.86M|  }
  380|   286k|  while (n > 0) {
  ------------------
  |  Branch (380:10): [True: 263k, False: 22.7k]
  ------------------
  381|   263k|    uint64_t quotient = n / 10;
  382|   263k|    uint64_t remainder = n - (10 * quotient);
  383|   263k|    if (write_index < max_digits) {
  ------------------
  |  Branch (383:9): [True: 263k, False: 0]
  ------------------
  384|   263k|      h.digits[write_index] = uint8_t(remainder);
  385|   263k|    } else if (remainder > 0) {
  ------------------
  |  Branch (385:16): [True: 0, False: 0]
  ------------------
  386|      0|      h.truncated = true;
  387|      0|    }
  388|   263k|    n = quotient;
  389|   263k|    write_index--;
  390|   263k|  }
  391|  22.7k|  h.num_digits += num_new_digits;
  392|  22.7k|  if (h.num_digits > max_digits) {
  ------------------
  |  Branch (392:7): [True: 276, False: 22.4k]
  ------------------
  393|    276|    h.num_digits = max_digits;
  394|    276|  }
  395|  22.7k|  h.decimal_point += int32_t(num_new_digits);
  396|  22.7k|  trim(h);
  397|  22.7k|}
_ZN8simdjson8internal19decimal_right_shiftERNS0_7decimalEj:
  400|  13.8k|void decimal_right_shift(decimal &h, uint32_t shift) {
  401|  13.8k|  uint32_t read_index = 0;
  402|  13.8k|  uint32_t write_index = 0;
  403|       |
  404|  13.8k|  uint64_t n = 0;
  405|       |
  406|   164k|  while ((n >> shift) == 0) {
  ------------------
  |  Branch (406:10): [True: 152k, False: 12.1k]
  ------------------
  407|   152k|    if (read_index < h.num_digits) {
  ------------------
  |  Branch (407:9): [True: 150k, False: 1.69k]
  ------------------
  408|   150k|      n = (10 * n) + h.digits[read_index++];
  409|   150k|    } else if (n == 0) {
  ------------------
  |  Branch (409:16): [True: 0, False: 1.69k]
  ------------------
  410|      0|      return;
  411|  1.69k|    } else {
  412|  9.63k|      while ((n >> shift) == 0) {
  ------------------
  |  Branch (412:14): [True: 7.94k, False: 1.69k]
  ------------------
  413|  7.94k|        n = 10 * n;
  414|  7.94k|        read_index++;
  415|  7.94k|      }
  416|  1.69k|      break;
  417|  1.69k|    }
  418|   152k|  }
  419|  13.8k|  h.decimal_point -= int32_t(read_index - 1);
  420|  13.8k|  if (h.decimal_point < -decimal_point_range) { // it is zero
  ------------------
  |  Branch (420:7): [True: 0, False: 13.8k]
  ------------------
  421|      0|    h.num_digits = 0;
  422|      0|    h.decimal_point = 0;
  423|      0|    h.negative = false;
  424|      0|    h.truncated = false;
  425|      0|    return;
  426|      0|  }
  427|  13.8k|  uint64_t mask = (uint64_t(1) << shift) - 1;
  428|  2.81M|  while (read_index < h.num_digits) {
  ------------------
  |  Branch (428:10): [True: 2.80M, False: 13.8k]
  ------------------
  429|  2.80M|    uint8_t new_digit = uint8_t(n >> shift);
  430|  2.80M|    n = (10 * (n & mask)) + h.digits[read_index++];
  431|  2.80M|    h.digits[write_index++] = new_digit;
  432|  2.80M|  }
  433|   443k|  while (n > 0) {
  ------------------
  |  Branch (433:10): [True: 429k, False: 13.8k]
  ------------------
  434|   429k|    uint8_t new_digit = uint8_t(n >> shift);
  435|   429k|    n = 10 * (n & mask);
  436|   429k|    if (write_index < max_digits) {
  ------------------
  |  Branch (436:9): [True: 415k, False: 13.5k]
  ------------------
  437|   415k|      h.digits[write_index++] = new_digit;
  438|   415k|    } else if (new_digit > 0) {
  ------------------
  |  Branch (438:16): [True: 12.3k, False: 1.24k]
  ------------------
  439|  12.3k|      h.truncated = true;
  440|  12.3k|    }
  441|   429k|  }
  442|  13.8k|  h.num_digits = write_index;
  443|  13.8k|  trim(h);
  444|  13.8k|}
_ZN8simdjson8internal10from_charsEPKc:
  570|  6.35k|double from_chars(const char *first) noexcept {
  571|  6.35k|  bool negative = first[0] == '-';
  572|  6.35k|  if (negative) {
  ------------------
  |  Branch (572:7): [True: 255, False: 6.10k]
  ------------------
  573|    255|    first++;
  574|    255|  }
  575|  6.35k|  adjusted_mantissa am = parse_long_mantissa<binary_format<double>>(first);
  576|  6.35k|  uint64_t word = am.mantissa;
  577|  6.35k|  word |= uint64_t(am.power2)
  578|  6.35k|          << binary_format<double>::mantissa_explicit_bits();
  579|  6.35k|  word = negative ? word | (uint64_t(1) << binary_format<double>::sign_index())
  ------------------
  |  Branch (579:10): [True: 255, False: 6.10k]
  ------------------
  580|  6.35k|                  : word;
  581|  6.35k|  double value;
  582|  6.35k|  std::memcpy(&value, &word, sizeof(double));
  583|  6.35k|  return value;
  584|  6.35k|}
simdjson.cpp:_ZN8simdjson8internal12_GLOBAL__N_135number_of_digits_decimal_left_shiftERNS0_7decimalEj:
  234|  22.7k|uint32_t number_of_digits_decimal_left_shift(decimal &h, uint32_t shift) {
  235|  22.7k|  shift &= 63;
  236|  22.7k|  const static uint16_t number_of_digits_decimal_left_shift_table[65] = {
  237|  22.7k|      0x0000, 0x0800, 0x0801, 0x0803, 0x1006, 0x1009, 0x100D, 0x1812, 0x1817,
  238|  22.7k|      0x181D, 0x2024, 0x202B, 0x2033, 0x203C, 0x2846, 0x2850, 0x285B, 0x3067,
  239|  22.7k|      0x3073, 0x3080, 0x388E, 0x389C, 0x38AB, 0x38BB, 0x40CC, 0x40DD, 0x40EF,
  240|  22.7k|      0x4902, 0x4915, 0x4929, 0x513E, 0x5153, 0x5169, 0x5180, 0x5998, 0x59B0,
  241|  22.7k|      0x59C9, 0x61E3, 0x61FD, 0x6218, 0x6A34, 0x6A50, 0x6A6D, 0x6A8B, 0x72AA,
  242|  22.7k|      0x72C9, 0x72E9, 0x7B0A, 0x7B2B, 0x7B4D, 0x8370, 0x8393, 0x83B7, 0x83DC,
  243|  22.7k|      0x8C02, 0x8C28, 0x8C4F, 0x9477, 0x949F, 0x94C8, 0x9CF2, 0x051C, 0x051C,
  244|  22.7k|      0x051C, 0x051C,
  245|  22.7k|  };
  246|  22.7k|  uint32_t x_a = number_of_digits_decimal_left_shift_table[shift];
  247|  22.7k|  uint32_t x_b = number_of_digits_decimal_left_shift_table[shift + 1];
  248|  22.7k|  uint32_t num_new_digits = x_a >> 11;
  249|  22.7k|  uint32_t pow5_a = 0x7FF & x_a;
  250|  22.7k|  uint32_t pow5_b = 0x7FF & x_b;
  251|  22.7k|  const static uint8_t
  252|  22.7k|      number_of_digits_decimal_left_shift_table_powers_of_5[0x051C] = {
  253|  22.7k|          5, 2, 5, 1, 2, 5, 6, 2, 5, 3, 1, 2, 5, 1, 5, 6, 2, 5, 7, 8, 1, 2, 5,
  254|  22.7k|          3, 9, 0, 6, 2, 5, 1, 9, 5, 3, 1, 2, 5, 9, 7, 6, 5, 6, 2, 5, 4, 8, 8,
  255|  22.7k|          2, 8, 1, 2, 5, 2, 4, 4, 1, 4, 0, 6, 2, 5, 1, 2, 2, 0, 7, 0, 3, 1, 2,
  256|  22.7k|          5, 6, 1, 0, 3, 5, 1, 5, 6, 2, 5, 3, 0, 5, 1, 7, 5, 7, 8, 1, 2, 5, 1,
  257|  22.7k|          5, 2, 5, 8, 7, 8, 9, 0, 6, 2, 5, 7, 6, 2, 9, 3, 9, 4, 5, 3, 1, 2, 5,
  258|  22.7k|          3, 8, 1, 4, 6, 9, 7, 2, 6, 5, 6, 2, 5, 1, 9, 0, 7, 3, 4, 8, 6, 3, 2,
  259|  22.7k|          8, 1, 2, 5, 9, 5, 3, 6, 7, 4, 3, 1, 6, 4, 0, 6, 2, 5, 4, 7, 6, 8, 3,
  260|  22.7k|          7, 1, 5, 8, 2, 0, 3, 1, 2, 5, 2, 3, 8, 4, 1, 8, 5, 7, 9, 1, 0, 1, 5,
  261|  22.7k|          6, 2, 5, 1, 1, 9, 2, 0, 9, 2, 8, 9, 5, 5, 0, 7, 8, 1, 2, 5, 5, 9, 6,
  262|  22.7k|          0, 4, 6, 4, 4, 7, 7, 5, 3, 9, 0, 6, 2, 5, 2, 9, 8, 0, 2, 3, 2, 2, 3,
  263|  22.7k|          8, 7, 6, 9, 5, 3, 1, 2, 5, 1, 4, 9, 0, 1, 1, 6, 1, 1, 9, 3, 8, 4, 7,
  264|  22.7k|          6, 5, 6, 2, 5, 7, 4, 5, 0, 5, 8, 0, 5, 9, 6, 9, 2, 3, 8, 2, 8, 1, 2,
  265|  22.7k|          5, 3, 7, 2, 5, 2, 9, 0, 2, 9, 8, 4, 6, 1, 9, 1, 4, 0, 6, 2, 5, 1, 8,
  266|  22.7k|          6, 2, 6, 4, 5, 1, 4, 9, 2, 3, 0, 9, 5, 7, 0, 3, 1, 2, 5, 9, 3, 1, 3,
  267|  22.7k|          2, 2, 5, 7, 4, 6, 1, 5, 4, 7, 8, 5, 1, 5, 6, 2, 5, 4, 6, 5, 6, 6, 1,
  268|  22.7k|          2, 8, 7, 3, 0, 7, 7, 3, 9, 2, 5, 7, 8, 1, 2, 5, 2, 3, 2, 8, 3, 0, 6,
  269|  22.7k|          4, 3, 6, 5, 3, 8, 6, 9, 6, 2, 8, 9, 0, 6, 2, 5, 1, 1, 6, 4, 1, 5, 3,
  270|  22.7k|          2, 1, 8, 2, 6, 9, 3, 4, 8, 1, 4, 4, 5, 3, 1, 2, 5, 5, 8, 2, 0, 7, 6,
  271|  22.7k|          6, 0, 9, 1, 3, 4, 6, 7, 4, 0, 7, 2, 2, 6, 5, 6, 2, 5, 2, 9, 1, 0, 3,
  272|  22.7k|          8, 3, 0, 4, 5, 6, 7, 3, 3, 7, 0, 3, 6, 1, 3, 2, 8, 1, 2, 5, 1, 4, 5,
  273|  22.7k|          5, 1, 9, 1, 5, 2, 2, 8, 3, 6, 6, 8, 5, 1, 8, 0, 6, 6, 4, 0, 6, 2, 5,
  274|  22.7k|          7, 2, 7, 5, 9, 5, 7, 6, 1, 4, 1, 8, 3, 4, 2, 5, 9, 0, 3, 3, 2, 0, 3,
  275|  22.7k|          1, 2, 5, 3, 6, 3, 7, 9, 7, 8, 8, 0, 7, 0, 9, 1, 7, 1, 2, 9, 5, 1, 6,
  276|  22.7k|          6, 0, 1, 5, 6, 2, 5, 1, 8, 1, 8, 9, 8, 9, 4, 0, 3, 5, 4, 5, 8, 5, 6,
  277|  22.7k|          4, 7, 5, 8, 3, 0, 0, 7, 8, 1, 2, 5, 9, 0, 9, 4, 9, 4, 7, 0, 1, 7, 7,
  278|  22.7k|          2, 9, 2, 8, 2, 3, 7, 9, 1, 5, 0, 3, 9, 0, 6, 2, 5, 4, 5, 4, 7, 4, 7,
  279|  22.7k|          3, 5, 0, 8, 8, 6, 4, 6, 4, 1, 1, 8, 9, 5, 7, 5, 1, 9, 5, 3, 1, 2, 5,
  280|  22.7k|          2, 2, 7, 3, 7, 3, 6, 7, 5, 4, 4, 3, 2, 3, 2, 0, 5, 9, 4, 7, 8, 7, 5,
  281|  22.7k|          9, 7, 6, 5, 6, 2, 5, 1, 1, 3, 6, 8, 6, 8, 3, 7, 7, 2, 1, 6, 1, 6, 0,
  282|  22.7k|          2, 9, 7, 3, 9, 3, 7, 9, 8, 8, 2, 8, 1, 2, 5, 5, 6, 8, 4, 3, 4, 1, 8,
  283|  22.7k|          8, 6, 0, 8, 0, 8, 0, 1, 4, 8, 6, 9, 6, 8, 9, 9, 4, 1, 4, 0, 6, 2, 5,
  284|  22.7k|          2, 8, 4, 2, 1, 7, 0, 9, 4, 3, 0, 4, 0, 4, 0, 0, 7, 4, 3, 4, 8, 4, 4,
  285|  22.7k|          9, 7, 0, 7, 0, 3, 1, 2, 5, 1, 4, 2, 1, 0, 8, 5, 4, 7, 1, 5, 2, 0, 2,
  286|  22.7k|          0, 0, 3, 7, 1, 7, 4, 2, 2, 4, 8, 5, 3, 5, 1, 5, 6, 2, 5, 7, 1, 0, 5,
  287|  22.7k|          4, 2, 7, 3, 5, 7, 6, 0, 1, 0, 0, 1, 8, 5, 8, 7, 1, 1, 2, 4, 2, 6, 7,
  288|  22.7k|          5, 7, 8, 1, 2, 5, 3, 5, 5, 2, 7, 1, 3, 6, 7, 8, 8, 0, 0, 5, 0, 0, 9,
  289|  22.7k|          2, 9, 3, 5, 5, 6, 2, 1, 3, 3, 7, 8, 9, 0, 6, 2, 5, 1, 7, 7, 6, 3, 5,
  290|  22.7k|          6, 8, 3, 9, 4, 0, 0, 2, 5, 0, 4, 6, 4, 6, 7, 7, 8, 1, 0, 6, 6, 8, 9,
  291|  22.7k|          4, 5, 3, 1, 2, 5, 8, 8, 8, 1, 7, 8, 4, 1, 9, 7, 0, 0, 1, 2, 5, 2, 3,
  292|  22.7k|          2, 3, 3, 8, 9, 0, 5, 3, 3, 4, 4, 7, 2, 6, 5, 6, 2, 5, 4, 4, 4, 0, 8,
  293|  22.7k|          9, 2, 0, 9, 8, 5, 0, 0, 6, 2, 6, 1, 6, 1, 6, 9, 4, 5, 2, 6, 6, 7, 2,
  294|  22.7k|          3, 6, 3, 2, 8, 1, 2, 5, 2, 2, 2, 0, 4, 4, 6, 0, 4, 9, 2, 5, 0, 3, 1,
  295|  22.7k|          3, 0, 8, 0, 8, 4, 7, 2, 6, 3, 3, 3, 6, 1, 8, 1, 6, 4, 0, 6, 2, 5, 1,
  296|  22.7k|          1, 1, 0, 2, 2, 3, 0, 2, 4, 6, 2, 5, 1, 5, 6, 5, 4, 0, 4, 2, 3, 6, 3,
  297|  22.7k|          1, 6, 6, 8, 0, 9, 0, 8, 2, 0, 3, 1, 2, 5, 5, 5, 5, 1, 1, 1, 5, 1, 2,
  298|  22.7k|          3, 1, 2, 5, 7, 8, 2, 7, 0, 2, 1, 1, 8, 1, 5, 8, 3, 4, 0, 4, 5, 4, 1,
  299|  22.7k|          0, 1, 5, 6, 2, 5, 2, 7, 7, 5, 5, 5, 7, 5, 6, 1, 5, 6, 2, 8, 9, 1, 3,
  300|  22.7k|          5, 1, 0, 5, 9, 0, 7, 9, 1, 7, 0, 2, 2, 7, 0, 5, 0, 7, 8, 1, 2, 5, 1,
  301|  22.7k|          3, 8, 7, 7, 7, 8, 7, 8, 0, 7, 8, 1, 4, 4, 5, 6, 7, 5, 5, 2, 9, 5, 3,
  302|  22.7k|          9, 5, 8, 5, 1, 1, 3, 5, 2, 5, 3, 9, 0, 6, 2, 5, 6, 9, 3, 8, 8, 9, 3,
  303|  22.7k|          9, 0, 3, 9, 0, 7, 2, 2, 8, 3, 7, 7, 6, 4, 7, 6, 9, 7, 9, 2, 5, 5, 6,
  304|  22.7k|          7, 6, 2, 6, 9, 5, 3, 1, 2, 5, 3, 4, 6, 9, 4, 4, 6, 9, 5, 1, 9, 5, 3,
  305|  22.7k|          6, 1, 4, 1, 8, 8, 8, 2, 3, 8, 4, 8, 9, 6, 2, 7, 8, 3, 8, 1, 3, 4, 7,
  306|  22.7k|          6, 5, 6, 2, 5, 1, 7, 3, 4, 7, 2, 3, 4, 7, 5, 9, 7, 6, 8, 0, 7, 0, 9,
  307|  22.7k|          4, 4, 1, 1, 9, 2, 4, 4, 8, 1, 3, 9, 1, 9, 0, 6, 7, 3, 8, 2, 8, 1, 2,
  308|  22.7k|          5, 8, 6, 7, 3, 6, 1, 7, 3, 7, 9, 8, 8, 4, 0, 3, 5, 4, 7, 2, 0, 5, 9,
  309|  22.7k|          6, 2, 2, 4, 0, 6, 9, 5, 9, 5, 3, 3, 6, 9, 1, 4, 0, 6, 2, 5,
  310|  22.7k|      };
  311|  22.7k|  const uint8_t *pow5 =
  312|  22.7k|      &number_of_digits_decimal_left_shift_table_powers_of_5[pow5_a];
  313|  22.7k|  uint32_t i = 0;
  314|  22.7k|  uint32_t n = pow5_b - pow5_a;
  315|  24.9k|  for (; i < n; i++) {
  ------------------
  |  Branch (315:10): [True: 24.6k, False: 271]
  ------------------
  316|  24.6k|    if (i >= h.num_digits) {
  ------------------
  |  Branch (316:9): [True: 279, False: 24.3k]
  ------------------
  317|    279|      return num_new_digits - 1;
  318|  24.3k|    } else if (h.digits[i] == pow5[i]) {
  ------------------
  |  Branch (318:16): [True: 2.15k, False: 22.2k]
  ------------------
  319|  2.15k|      continue;
  320|  22.2k|    } else if (h.digits[i] < pow5[i]) {
  ------------------
  |  Branch (320:16): [True: 14.7k, False: 7.52k]
  ------------------
  321|  14.7k|      return num_new_digits - 1;
  322|  14.7k|    } else {
  323|  7.52k|      return num_new_digits;
  324|  7.52k|    }
  325|  24.6k|  }
  326|    271|  return num_new_digits;
  327|  22.7k|}
simdjson.cpp:_ZN8simdjson8internal12_GLOBAL__N_14trimERNS0_7decimalE:
  228|  36.6k|inline void trim(decimal &h) {
  229|   397k|  while ((h.num_digits > 0) && (h.digits[h.num_digits - 1] == 0)) {
  ------------------
  |  Branch (229:10): [True: 397k, False: 0]
  |  Branch (229:32): [True: 360k, False: 36.6k]
  ------------------
  230|   360k|    h.num_digits--;
  231|   360k|  }
  232|  36.6k|}
_ZN8simdjson8internal13binary_formatIdE22mantissa_explicit_bitsEv:
   54|  17.7k|template <> constexpr int binary_format<double>::mantissa_explicit_bits() {
   55|  17.7k|  return 52;
   56|  17.7k|}
_ZN8simdjson8internal13binary_formatIdE10sign_indexEv:
   65|    255|template <> constexpr int binary_format<double>::sign_index() { return 63; }
_ZN8simdjson8internal19parse_long_mantissaINS0_13binary_formatIdEEEENS0_17adjusted_mantissaEPKc:
  559|  6.35k|adjusted_mantissa parse_long_mantissa(const char *first) {
  560|  6.35k|  decimal d = parse_decimal(first);
  561|  6.35k|  return compute_float<binary>(d);
  562|  6.35k|}
_ZN8simdjson8internal13compute_floatINS0_13binary_formatIdEEEENS0_17adjusted_mantissaERNS0_7decimalE:
  446|  6.35k|template <typename binary> adjusted_mantissa compute_float(decimal &d) {
  447|  6.35k|  adjusted_mantissa answer;
  448|  6.35k|  if (d.num_digits == 0) {
  ------------------
  |  Branch (448:7): [True: 84, False: 6.27k]
  ------------------
  449|       |    // should be zero
  450|     84|    answer.power2 = 0;
  451|     84|    answer.mantissa = 0;
  452|     84|    return answer;
  453|     84|  }
  454|       |  // At this point, going further, we can assume that d.num_digits > 0.
  455|       |  // We want to guard against excessive decimal point values because
  456|       |  // they can result in long running times. Indeed, we do
  457|       |  // shifts by at most 60 bits. We have that log(10**400)/log(2**60) ~= 22
  458|       |  // which is fine, but log(10**299995)/log(2**60) ~= 16609 which is not
  459|       |  // fine (runs for a long time).
  460|       |  //
  461|  6.27k|  if(d.decimal_point < -324) {
  ------------------
  |  Branch (461:6): [True: 255, False: 6.01k]
  ------------------
  462|       |    // We have something smaller than 1e-324 which is always zero
  463|       |    // in binary64 and binary32.
  464|       |    // It should be zero.
  465|    255|    answer.power2 = 0;
  466|    255|    answer.mantissa = 0;
  467|    255|    return answer;
  468|  6.01k|  } else if(d.decimal_point >= 310) {
  ------------------
  |  Branch (468:13): [True: 162, False: 5.85k]
  ------------------
  469|       |    // We have something at least as large as 0.1e310 which is
  470|       |    // always infinite.
  471|    162|    answer.power2 = binary::infinite_power();
  472|    162|    answer.mantissa = 0;
  473|    162|    return answer;
  474|    162|  }
  475|       |
  476|  5.85k|  static const uint32_t max_shift = 60;
  477|  5.85k|  static const uint32_t num_powers = 19;
  478|  5.85k|  static const uint8_t powers[19] = {
  479|  5.85k|      0,  3,  6,  9,  13, 16, 19, 23, 26, 29, //
  480|  5.85k|      33, 36, 39, 43, 46, 49, 53, 56, 59,     //
  481|  5.85k|  };
  482|  5.85k|  int32_t exp2 = 0;
  483|  17.8k|  while (d.decimal_point > 0) {
  ------------------
  |  Branch (483:10): [True: 12.0k, False: 5.85k]
  ------------------
  484|  12.0k|    uint32_t n = uint32_t(d.decimal_point);
  485|  12.0k|    uint32_t shift = (n < num_powers) ? powers[n] : max_shift;
  ------------------
  |  Branch (485:22): [True: 5.73k, False: 6.28k]
  ------------------
  486|  12.0k|    decimal_right_shift(d, shift);
  487|  12.0k|    if (d.decimal_point < -decimal_point_range) {
  ------------------
  |  Branch (487:9): [True: 0, False: 12.0k]
  ------------------
  488|       |      // should be zero
  489|      0|      answer.power2 = 0;
  490|      0|      answer.mantissa = 0;
  491|      0|      return answer;
  492|      0|    }
  493|  12.0k|    exp2 += int32_t(shift);
  494|  12.0k|  }
  495|       |  // We shift left toward [1/2 ... 1].
  496|  22.9k|  while (d.decimal_point <= 0) {
  ------------------
  |  Branch (496:10): [True: 22.9k, False: 0]
  ------------------
  497|  22.9k|    uint32_t shift;
  498|  22.9k|    if (d.decimal_point == 0) {
  ------------------
  |  Branch (498:9): [True: 12.0k, False: 10.8k]
  ------------------
  499|  12.0k|      if (d.digits[0] >= 5) {
  ------------------
  |  Branch (499:11): [True: 5.85k, False: 6.19k]
  ------------------
  500|  5.85k|        break;
  501|  5.85k|      }
  502|  6.19k|      shift = (d.digits[0] < 2) ? 2 : 1;
  ------------------
  |  Branch (502:15): [True: 1.86k, False: 4.32k]
  ------------------
  503|  10.8k|    } else {
  504|  10.8k|      uint32_t n = uint32_t(-d.decimal_point);
  505|  10.8k|      shift = (n < num_powers) ? powers[n] : max_shift;
  ------------------
  |  Branch (505:15): [True: 1.89k, False: 9.00k]
  ------------------
  506|  10.8k|    }
  507|  17.0k|    decimal_left_shift(d, shift);
  508|  17.0k|    if (d.decimal_point > decimal_point_range) {
  ------------------
  |  Branch (508:9): [True: 0, False: 17.0k]
  ------------------
  509|       |      // we want to get infinity:
  510|      0|      answer.power2 = 0xFF;
  511|      0|      answer.mantissa = 0;
  512|      0|      return answer;
  513|      0|    }
  514|  17.0k|    exp2 -= int32_t(shift);
  515|  17.0k|  }
  516|       |  // We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
  517|  5.85k|  exp2--;
  518|  5.85k|  constexpr int32_t minimum_exponent = binary::minimum_exponent();
  519|  6.36k|  while ((minimum_exponent + 1) > exp2) {
  ------------------
  |  Branch (519:10): [True: 511, False: 5.85k]
  ------------------
  520|    511|    uint32_t n = uint32_t((minimum_exponent + 1) - exp2);
  521|    511|    if (n > max_shift) {
  ------------------
  |  Branch (521:9): [True: 0, False: 511]
  ------------------
  522|      0|      n = max_shift;
  523|      0|    }
  524|    511|    decimal_right_shift(d, n);
  525|    511|    exp2 += int32_t(n);
  526|    511|  }
  527|  5.85k|  if ((exp2 - minimum_exponent) >= binary::infinite_power()) {
  ------------------
  |  Branch (527:7): [True: 176, False: 5.68k]
  ------------------
  528|    176|    answer.power2 = binary::infinite_power();
  529|    176|    answer.mantissa = 0;
  530|    176|    return answer;
  531|    176|  }
  532|       |
  533|  5.68k|  const int mantissa_size_in_bits = binary::mantissa_explicit_bits() + 1;
  534|  5.68k|  decimal_left_shift(d, mantissa_size_in_bits);
  535|       |
  536|  5.68k|  uint64_t mantissa = round(d);
  537|       |  // It is possible that we have an overflow, in which case we need
  538|       |  // to shift back.
  539|  5.68k|  if (mantissa >= (uint64_t(1) << mantissa_size_in_bits)) {
  ------------------
  |  Branch (539:7): [True: 1.30k, False: 4.37k]
  ------------------
  540|  1.30k|    decimal_right_shift(d, 1);
  541|  1.30k|    exp2 += 1;
  542|  1.30k|    mantissa = round(d);
  543|  1.30k|    if ((exp2 - minimum_exponent) >= binary::infinite_power()) {
  ------------------
  |  Branch (543:9): [True: 0, False: 1.30k]
  ------------------
  544|      0|      answer.power2 = binary::infinite_power();
  545|      0|      answer.mantissa = 0;
  546|      0|      return answer;
  547|      0|    }
  548|  1.30k|  }
  549|  5.68k|  answer.power2 = exp2 - binary::minimum_exponent();
  550|  5.68k|  if (mantissa < (uint64_t(1) << binary::mantissa_explicit_bits())) {
  ------------------
  |  Branch (550:7): [True: 511, False: 5.16k]
  ------------------
  551|    511|    answer.power2--;
  552|    511|  }
  553|  5.68k|  answer.mantissa =
  554|  5.68k|      mantissa & ((uint64_t(1) << binary::mantissa_explicit_bits()) - 1);
  555|  5.68k|  return answer;
  556|  5.68k|}
_ZN8simdjson8internal17adjusted_mantissaC2Ev:
   36|  6.35k|  adjusted_mantissa() : mantissa(0), power2(0) {}
_ZN8simdjson8internal13binary_formatIdE14infinite_powerEv:
   61|  7.50k|template <> constexpr int binary_format<double>::infinite_power() {
   62|  7.50k|  return 0x7FF;
   63|  7.50k|}
_ZN8simdjson8internal13binary_formatIdE16minimum_exponentEv:
   58|  5.68k|template <> constexpr int binary_format<double>::minimum_exponent() {
   59|  5.68k|  return -1023;
   60|  5.68k|}

simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_120json_character_block6scalarEv:
   17|  2.55M|  simdjson_inline uint64_t scalar() const noexcept { return ~(op() | whitespace()); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_120json_character_block2opEv:
   16|  3.82M|  simdjson_inline uint64_t op() const noexcept { return _op; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_120json_character_block10whitespaceEv:
   15|  2.55M|  simdjson_inline uint64_t whitespace() const noexcept { return _whitespace; }

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage116buf_block_readerILm128EEC2EPKhm:
   83|  10.6k|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} {}
  ------------------
  |  Branch (83:134): [True: 8.84k, False: 1.82k]
  ------------------
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage116buf_block_readerILm128EE14has_full_blockEv:
   89|   637k|simdjson_inline bool buf_block_reader<STEP_SIZE>::has_full_block() const {
   90|   637k|  return idx < lenminusstep;
   91|   637k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage116buf_block_readerILm128EE7advanceEv:
  107|   637k|simdjson_inline void buf_block_reader<STEP_SIZE>::advance() {
  108|   637k|  idx += STEP_SIZE;
  109|   637k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage116buf_block_readerILm128EE10full_blockEv:
   94|   627k|simdjson_inline const uint8_t *buf_block_reader<STEP_SIZE>::full_block() const {
   95|   627k|  return &buf[idx];
   96|   627k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage116buf_block_readerILm128EE13get_remainderEPh:
   99|  10.6k|simdjson_inline size_t buf_block_reader<STEP_SIZE>::get_remainder(uint8_t *dst) const {
  100|  10.6k|  if(len == idx) { return 0; } // memcpy(dst, null, 0) will trigger an error with some sanitizers
  ------------------
  |  Branch (100:6): [True: 0, False: 10.6k]
  ------------------
  101|  10.6k|  std::memset(dst, 0x20, STEP_SIZE); // std::memset STEP_SIZE because it's more efficient to write out 8 or 16 bytes at once.
  102|  10.6k|  std::memcpy(dst, buf + idx, len - idx);
  103|  10.6k|  return len - idx;
  104|  10.6k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage116buf_block_readerILm128EE11block_indexEv:
   86|  1.28M|simdjson_inline size_t buf_block_reader<STEP_SIZE>::block_index() { return idx; }

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage119json_escape_scanner4nextEm:
   50|  1.27M|  simdjson_really_inline escaped_and_escape next(uint64_t backslash) noexcept {
   51|       |
   52|  1.27M|#if !SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT
   53|  1.27M|    if (!backslash) { return {next_escaped_without_backslashes(), 0}; }
  ------------------
  |  Branch (53:9): [True: 1.25M, False: 23.7k]
  ------------------
   54|  23.7k|#endif
   55|       |
   56|       |    // |                                | Mask (shows characters instead of 1's) | Depth | Instructions        |
   57|       |    // |--------------------------------|----------------------------------------|-------|---------------------|
   58|       |    // | string                         | `\\n_\\\n___\\\n___\\\\___\\\\__\\\`   |       |                     |
   59|       |    // |                                | `    even   odd    even   odd   odd`   |       |                     |
   60|       |    // | potential_escape               | ` \  \\\    \\\    \\\\   \\\\  \\\`   | 1     | 1 (backslash & ~first_is_escaped)
   61|       |    // | escape_and_terminal_code       | ` \n \ \n   \ \n   \ \    \ \   \ \`   | 5     | 5 (next_escape_and_terminal_code())
   62|       |    // | escaped                        | `\    \ n    \ n    \ \    \ \   \ ` X | 6     | 7 (escape_and_terminal_code ^ (potential_escape | first_is_escaped))
   63|       |    // | escape                         | `    \ \    \ \    \ \    \ \   \ \`   | 6     | 8 (escape_and_terminal_code & backslash)
   64|       |    // | first_is_escaped               | `\                                 `   | 7 (*) | 9 (escape >> 63) ()
   65|       |    //                                                                               (*) this is not needed until the next iteration
   66|  23.7k|    uint64_t escape_and_terminal_code = next_escape_and_terminal_code(backslash & ~this->next_is_escaped);
   67|  23.7k|    uint64_t escaped = escape_and_terminal_code ^ (backslash | this->next_is_escaped);
   68|  23.7k|    uint64_t escape = escape_and_terminal_code & backslash;
   69|  23.7k|    this->next_is_escaped = escape >> 63;
   70|  23.7k|    return {escaped, escape};
   71|  1.27M|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage119json_escape_scanner32next_escaped_without_backslashesEv:
   76|  1.25M|  simdjson_really_inline uint64_t next_escaped_without_backslashes() noexcept {
   77|  1.25M|    uint64_t escaped = this->next_is_escaped;
   78|  1.25M|    this->next_is_escaped = 0;
   79|  1.25M|    return escaped;
   80|  1.25M|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage119json_escape_scanner29next_escape_and_terminal_codeEm:
   96|  23.7k|  static simdjson_really_inline uint64_t next_escape_and_terminal_code(uint64_t potential_escape) noexcept {
   97|       |    // If we were to just shift and mask out any odd bits, we'd actually get a *half* right answer:
   98|       |    // any even-aligned backslash runs would be correct! Odd-aligned backslash runs would be
   99|       |    // inverted (\\\ would be 010 instead of 101).
  100|       |    //
  101|       |    // ```
  102|       |    // string:              | ____\\\\_\\\\_____ |
  103|       |    // maybe_escaped | ODD  |     \ \   \ \      |
  104|       |    //               even-aligned ^^^  ^^^^ odd-aligned
  105|       |    // ```
  106|       |    //
  107|       |    // Taking that into account, our basic strategy is:
  108|       |    //
  109|       |    // 1. Use subtraction to produce a mask with 1's for even-aligned runs and 0's for
  110|       |    //    odd-aligned runs.
  111|       |    // 2. XOR all odd bits, which masks out the odd bits in even-aligned runs, and brings IN the
  112|       |    //    odd bits in odd-aligned runs.
  113|       |    // 3. & with backslash to clean up any stray bits.
  114|       |    // runs are set to 0, and then XORing with "odd":
  115|       |    //
  116|       |    // |                                | Mask (shows characters instead of 1's) | Instructions        |
  117|       |    // |--------------------------------|----------------------------------------|---------------------|
  118|       |    // | string                         | `\\n_\\\n___\\\n___\\\\___\\\\__\\\`   |
  119|       |    // |                                | `    even   odd    even   odd   odd`   |
  120|       |    // | maybe_escaped                  | `  n  \\n    \\n    \\\_   \\\_  \\` X | 1 (potential_escape << 1)
  121|       |    // | maybe_escaped_and_odd          | ` \n_ \\n _ \\\n_ _ \\\__ _\\\_ \\\`   | 1 (maybe_escaped | odd)
  122|       |    // | even_series_codes_and_odd      | `  n_\\\  _    n_ _\\\\ _     _    `   | 1 (maybe_escaped_and_odd - potential_escape)
  123|       |    // | escape_and_terminal_code       | ` \n \ \n   \ \n   \ \    \ \   \ \`   | 1 (^ odd)
  124|       |    //
  125|       |
  126|       |    // Escaped characters are characters following an escape.
  127|  23.7k|    uint64_t maybe_escaped = potential_escape << 1;
  128|       |
  129|       |    // To distinguish odd from even escape sequences, therefore, we turn on any *starting*
  130|       |    // escapes that are on an odd byte. (We actually bring in all odd bits, for speed.)
  131|       |    // - Odd runs of backslashes are 0000, and the code at the end ("n" in \n or \\n) is 1.
  132|       |    // - Odd runs of backslashes are 1111, and the code at the end ("n" in \n or \\n) is 0.
  133|       |    // - All other odd bytes are 1, and even bytes are 0.
  134|  23.7k|    uint64_t maybe_escaped_and_odd_bits     = maybe_escaped | ODD_BITS;
  135|  23.7k|    uint64_t even_series_codes_and_odd_bits = maybe_escaped_and_odd_bits - potential_escape;
  136|       |
  137|       |    // Now we flip all odd bytes back with xor. This:
  138|       |    // - Makes odd runs of backslashes go from 0000 to 1010
  139|       |    // - Makes even runs of backslashes go from 1111 to 1010
  140|       |    // - Sets actually-escaped codes to 1 (the n in \n and \\n: \n = 11, \\n = 100)
  141|       |    // - Resets all other bytes to 0
  142|  23.7k|    return even_series_codes_and_odd_bits ^ ODD_BITS;
  143|  23.7k|  }

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage112json_scannerC2Ev:
  108|  10.6k|  json_scanner() = default;
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage112json_scanner4nextERKNS1_4simd8simd8x64IhEE:
  134|  1.27M|simdjson_inline json_block json_scanner::next(const simd::simd8x64<uint8_t>& in) {
  135|  1.27M|  json_string_block strings = string_scanner.next(in);
  136|       |  // identifies the white-space and the structural characters
  137|  1.27M|  json_character_block characters = json_character_block::classify(in);
  138|       |  // The term "scalar" refers to anything except structural characters and white space
  139|       |  // (so letters, numbers, quotes).
  140|       |  // We want follows_scalar to mark anything that follows a non-quote scalar (so letters and numbers).
  141|       |  //
  142|       |  // A terminal quote should either be followed by a structural character (comma, brace, bracket, colon)
  143|       |  // or nothing. However, we still want ' "a string"true ' to mark the 't' of 'true' as a potential
  144|       |  // pseudo-structural character just like we would if we had  ' "a string" true '; otherwise we
  145|       |  // may need to add an extra check when parsing strings.
  146|       |  //
  147|       |  // Performance: there are many ways to skin this cat.
  148|  1.27M|  const uint64_t nonquote_scalar = characters.scalar() & ~strings.quote();
  149|  1.27M|  uint64_t follows_nonquote_scalar = follows(nonquote_scalar, prev_scalar);
  150|       |  // We are returning a function-local object so either we get a move constructor
  151|       |  // or we get copy elision.
  152|  1.27M|  return json_block(
  153|  1.27M|    strings,// strings is a function-local object so either it moves or the copy is elided.
  154|  1.27M|    characters,
  155|  1.27M|    follows_nonquote_scalar
  156|  1.27M|  );
  157|  1.27M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage17followsEmRm:
  128|  1.27M|simdjson_inline uint64_t follows(const uint64_t match, uint64_t &overflow) {
  129|  1.27M|  const uint64_t result = match << 1 | overflow;
  130|  1.27M|  overflow = match >> 63;
  131|  1.27M|  return result;
  132|  1.27M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage110json_blockC2ENS2_17json_string_blockENS1_20json_character_blockEm:
   38|  1.27M|  _string(string), _characters(characters), _follows_potential_nonquote_scalar(follows_potential_nonquote_scalar) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage112json_scanner6finishEv:
  159|  10.6k|simdjson_inline error_code json_scanner::finish() {
  160|  10.6k|  return string_scanner.finish();
  161|  10.6k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage110json_block16structural_startEv:
   44|  1.27M|  simdjson_inline uint64_t structural_start() const noexcept { return potential_structural_start() & ~_string.string_tail(); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage110json_block26potential_structural_startEv:
   68|  1.27M|  simdjson_inline uint64_t potential_structural_start() const noexcept { return _characters.op() | potential_scalar_start(); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage110json_block22potential_scalar_startEv:
   73|  1.27M|  simdjson_inline uint64_t potential_scalar_start() const noexcept {
   74|       |    // The term "scalar" refers to anything except structural characters and white space
   75|       |    // (so letters, numbers, quotes).
   76|       |    // Whenever it is preceded by something that is not a structural element ({,},[,],:, ") nor a white-space
   77|       |    // then we know that it is irrelevant structurally.
   78|  1.27M|    return _characters.scalar() & ~follows_potential_scalar();
   79|  1.27M|  }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage110json_block24follows_potential_scalarEv:
   84|  1.27M|  simdjson_inline uint64_t follows_potential_scalar() const noexcept {
   85|       |    // _follows_potential_nonquote_scalar: is defined as marking any character that follows a character
   86|       |    // that is not a structural element ({,},[,],:, comma) nor a quote (") and that is not a
   87|       |    // white space.
   88|       |    // It is understood that within quoted region, anything at all could be marked (irrelevant).
   89|  1.27M|    return _follows_potential_nonquote_scalar;
   90|  1.27M|  }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage110json_block23non_quote_inside_stringEm:
   51|  1.27M|  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:
   62|  1.27M|simdjson_really_inline json_string_block json_string_scanner::next(const simd::simd8x64<uint8_t>& in) {
   63|  1.27M|  const uint64_t backslash = in.eq('\\');
   64|  1.27M|  const uint64_t escaped = escape_scanner.next(backslash).escaped;
   65|  1.27M|  const uint64_t quote = in.eq('"') & ~escaped;
   66|       |
   67|       |  //
   68|       |  // prefix_xor flips on bits inside the string (and flips off the end quote).
   69|       |  //
   70|       |  // Then we xor with prev_in_string: if we were in a string already, its effect is flipped
   71|       |  // (characters inside strings are outside, and characters outside strings are inside).
   72|       |  //
   73|  1.27M|  const uint64_t in_string = prefix_xor(quote) ^ prev_in_string;
   74|       |
   75|       |  //
   76|       |  // Check if we're still in a string at the end of the box so the next block will know
   77|       |  //
   78|  1.27M|  prev_in_string = uint64_t(static_cast<int64_t>(in_string) >> 63);
   79|       |
   80|       |  // Use ^ to turn the beginning quote off, and the end quote on.
   81|       |
   82|       |  // We are returning a function-local object so either we get a move constructor
   83|       |  // or we get copy elision.
   84|  1.27M|  return json_string_block(escaped, quote, in_string);
   85|  1.27M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage117json_string_blockC2Emmm:
   17|  1.27M|  _escaped(escaped), _quote(quote), _in_string(in_string) {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage117json_string_block5quoteEv:
   22|  1.27M|  simdjson_really_inline uint64_t quote() const { return _quote; }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage119json_string_scanner6finishEv:
   87|  10.6k|simdjson_really_inline error_code json_string_scanner::finish() {
   88|  10.6k|  if (prev_in_string) {
  ------------------
  |  Branch (88:7): [True: 213, False: 10.4k]
  ------------------
   89|    213|    return UNCLOSED_STRING;
   90|    213|  }
   91|  10.4k|  return SUCCESS;
   92|  10.6k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage117json_string_block11string_tailEv:
   30|  1.27M|  simdjson_really_inline uint64_t string_tail() const { return _in_string ^ _quote; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage117json_string_block23non_quote_inside_stringEm:
   26|  1.27M|  simdjson_really_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:
  194|  10.7k|error_code json_structural_indexer::index(const uint8_t *buf, size_t len, dom_parser_implementation &parser, stage1_mode partial) noexcept {
  195|  10.7k|  if (simdjson_unlikely(len > parser.capacity())) { return CAPACITY; }
  ------------------
  |  |  106|  10.7k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 0, False: 10.7k]
  |  |  ------------------
  ------------------
  196|       |  // We guard the rest of the code so that we can assume that len > 0 throughout.
  197|  10.7k|  if (len == 0) { return EMPTY; }
  ------------------
  |  Branch (197:7): [True: 95, False: 10.6k]
  ------------------
  198|  10.6k|  if (is_streaming(partial)) {
  ------------------
  |  Branch (198:7): [True: 0, False: 10.6k]
  ------------------
  199|      0|    len = trim_partial_utf8(buf, len);
  200|       |    // If you end up with an empty window after trimming
  201|       |    // the partial UTF-8 bytes, then chances are good that you
  202|       |    // have an UTF-8 formatting error.
  203|      0|    if(len == 0) { return UTF8_ERROR; }
  ------------------
  |  Branch (203:8): [True: 0, False: 0]
  ------------------
  204|      0|  }
  205|  10.6k|  buf_block_reader<STEP_SIZE> reader(buf, len);
  206|  10.6k|  json_structural_indexer indexer(parser.structural_indexes.get());
  207|       |
  208|       |  // Read all but the last block
  209|   637k|  while (reader.has_full_block()) {
  ------------------
  |  Branch (209:10): [True: 627k, False: 10.6k]
  ------------------
  210|   627k|    indexer.step<STEP_SIZE>(reader.full_block(), reader);
  211|   627k|  }
  212|       |  // Take care of the last block (will always be there unless file is empty which is
  213|       |  // not supposed to happen.)
  214|  10.6k|  uint8_t block[STEP_SIZE];
  215|  10.6k|  if (simdjson_unlikely(reader.get_remainder(block) == 0)) { return UNEXPECTED_ERROR; }
  ------------------
  |  |  106|  10.6k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 0, False: 10.6k]
  |  |  ------------------
  ------------------
  216|  10.6k|  indexer.step<STEP_SIZE>(block, reader);
  217|  10.6k|  return indexer.finish(parser, reader.block_index(), len, partial);
  218|  10.6k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage123json_structural_indexerC2EPj:
  153|  10.6k|simdjson_inline json_structural_indexer::json_structural_indexer(uint32_t *structural_indexes) : indexer{structural_indexes} {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexerC2EPj:
   28|  10.6k|  simdjson_inline bit_indexer(uint32_t *index_buf) : tail(index_buf) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage123json_structural_indexer4stepILm128EEEvPKhRNS2_16buf_block_readerIXT_EEE:
  221|   637k|simdjson_inline void json_structural_indexer::step<128>(const uint8_t *block, buf_block_reader<128> &reader) noexcept {
  222|   637k|  simd::simd8x64<uint8_t> in_1(block);
  223|   637k|  simd::simd8x64<uint8_t> in_2(block+64);
  224|   637k|  json_block block_1 = scanner.next(in_1);
  225|   637k|  json_block block_2 = scanner.next(in_2);
  226|   637k|  this->next(in_1, block_1, reader.block_index());
  227|   637k|  this->next(in_2, block_2, reader.block_index()+64);
  228|   637k|  reader.advance();
  229|   637k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage123json_structural_indexer4nextERKNS1_4simd8simd8x64IhEERKNS2_10json_blockEm:
  239|  1.27M|simdjson_inline void json_structural_indexer::next(const simd::simd8x64<uint8_t>& in, const json_block& block, size_t idx) {
  240|  1.27M|  uint64_t unescaped = in.lteq(0x1F);
  241|  1.27M|#if SIMDJSON_UTF8VALIDATION
  242|  1.27M|  checker.check_next_input(in);
  243|  1.27M|#endif
  244|  1.27M|  indexer.write(uint32_t(idx-64), prev_structurals); // Output *last* iteration's structurals to the parser
  245|  1.27M|  prev_structurals = block.structural_start();
  246|  1.27M|  unescaped_chars_error |= block.non_quote_inside_string(unescaped);
  247|  1.27M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer5writeEjm:
   93|  1.28M|  simdjson_inline void write(uint32_t idx, uint64_t bits) {
   94|       |    // In some instances, the next branch is expensive because it is mispredicted.
   95|       |    // Unfortunately, in other cases,
   96|       |    // it helps tremendously.
   97|  1.28M|    if (bits == 0)
  ------------------
  |  Branch (97:9): [True: 779k, False: 507k]
  ------------------
   98|   779k|        return;
   99|       |
  100|   507k|    int cnt = static_cast<int>(count_ones(bits));
  101|       |
  102|       |#if SIMDJSON_PREFER_REVERSE_BITS
  103|       |    bits = reverse_bits(bits);
  104|       |#endif
  105|       |#ifdef SIMDJSON_STRUCTURAL_INDEXER_STEP
  106|       |    static constexpr const int STEP = SIMDJSON_STRUCTURAL_INDEXER_STEP;
  107|       |#else
  108|   507k|    static constexpr const int STEP = 4;
  109|   507k|#endif
  110|   507k|    static constexpr const int STEP_UNTIL = 24;
  111|       |
  112|   507k|    write_indexes_stepped<0, STEP_UNTIL, STEP>(idx, bits, cnt);
  113|   507k|    SIMDJSON_IF_CONSTEXPR (STEP_UNTIL < 64) {
  ------------------
  |  |   47|   507k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
  114|   507k|      if (simdjson_unlikely(STEP_UNTIL < cnt)) {
  ------------------
  |  |  106|   507k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 472k, False: 34.4k]
  |  |  ------------------
  ------------------
  115|  19.0M|        for (int i=STEP_UNTIL; i<cnt; i++) {
  ------------------
  |  Branch (115:32): [True: 18.5M, False: 472k]
  ------------------
  116|  18.5M|          write_index(idx, bits, i);
  117|  18.5M|        }
  118|   472k|      }
  119|   507k|    }
  120|       |
  121|   507k|    this->tail += cnt;
  122|   507k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer21write_indexes_steppedILi0ELi24ELi4EEEijRmi:
   72|   507k|  simdjson_inline int write_indexes_stepped(uint32_t idx, uint64_t& bits, int cnt) {
   73|   507k|    write_indexes<START, STEP>(idx, bits);
   74|   507k|    SIMDJSON_IF_CONSTEXPR ((START+STEP)  < END) {
  ------------------
  |  |   47|   507k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   75|   507k|      if (simdjson_unlikely((START+STEP) < cnt)) {
  ------------------
  |  |  106|   507k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 492k, False: 14.9k]
  |  |  ------------------
  ------------------
   76|   492k|        write_indexes_stepped<(START+STEP<END?START+STEP:END), END, STEP>(idx, bits, cnt);
   77|   492k|      }
   78|   507k|    }
   79|   507k|    return ((END-START) % STEP) == 0 ? END : (END-START) - ((END-START) % STEP) + STEP;
  ------------------
  |  Branch (79:12): [Folded - Ignored]
  ------------------
   80|   507k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi0ELi4EEEijRm:
   63|   507k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   507k|    write_index(idx, bits, START);
   65|   507k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   507k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   507k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   507k|    }
   68|   507k|    return START+N;
   69|   507k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi1ELi3EEEijRm:
   63|   507k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   507k|    write_index(idx, bits, START);
   65|   507k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   507k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   507k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   507k|    }
   68|   507k|    return START+N;
   69|   507k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi2ELi2EEEijRm:
   63|   507k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   507k|    write_index(idx, bits, START);
   65|   507k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   507k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   507k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   507k|    }
   68|   507k|    return START+N;
   69|   507k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi3ELi1EEEijRm:
   63|   507k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   507k|    write_index(idx, bits, START);
   65|   507k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   507k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|       |      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|       |    }
   68|   507k|    return START+N;
   69|   507k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer21write_indexes_steppedILi4ELi24ELi4EEEijRmi:
   72|   492k|  simdjson_inline int write_indexes_stepped(uint32_t idx, uint64_t& bits, int cnt) {
   73|   492k|    write_indexes<START, STEP>(idx, bits);
   74|   492k|    SIMDJSON_IF_CONSTEXPR ((START+STEP)  < END) {
  ------------------
  |  |   47|   492k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   75|   492k|      if (simdjson_unlikely((START+STEP) < cnt)) {
  ------------------
  |  |  106|   492k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 483k, False: 8.79k]
  |  |  ------------------
  ------------------
   76|   483k|        write_indexes_stepped<(START+STEP<END?START+STEP:END), END, STEP>(idx, bits, cnt);
   77|   483k|      }
   78|   492k|    }
   79|   492k|    return ((END-START) % STEP) == 0 ? END : (END-START) - ((END-START) % STEP) + STEP;
  ------------------
  |  Branch (79:12): [Folded - Ignored]
  ------------------
   80|   492k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi4ELi4EEEijRm:
   63|   492k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   492k|    write_index(idx, bits, START);
   65|   492k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   492k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   492k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   492k|    }
   68|   492k|    return START+N;
   69|   492k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi5ELi3EEEijRm:
   63|   492k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   492k|    write_index(idx, bits, START);
   65|   492k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   492k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   492k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   492k|    }
   68|   492k|    return START+N;
   69|   492k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi6ELi2EEEijRm:
   63|   492k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   492k|    write_index(idx, bits, START);
   65|   492k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   492k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   492k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   492k|    }
   68|   492k|    return START+N;
   69|   492k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi7ELi1EEEijRm:
   63|   492k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   492k|    write_index(idx, bits, START);
   65|   492k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   492k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|       |      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|       |    }
   68|   492k|    return START+N;
   69|   492k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer21write_indexes_steppedILi8ELi24ELi4EEEijRmi:
   72|   483k|  simdjson_inline int write_indexes_stepped(uint32_t idx, uint64_t& bits, int cnt) {
   73|   483k|    write_indexes<START, STEP>(idx, bits);
   74|   483k|    SIMDJSON_IF_CONSTEXPR ((START+STEP)  < END) {
  ------------------
  |  |   47|   483k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   75|   483k|      if (simdjson_unlikely((START+STEP) < cnt)) {
  ------------------
  |  |  106|   483k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 480k, False: 3.30k]
  |  |  ------------------
  ------------------
   76|   480k|        write_indexes_stepped<(START+STEP<END?START+STEP:END), END, STEP>(idx, bits, cnt);
   77|   480k|      }
   78|   483k|    }
   79|   483k|    return ((END-START) % STEP) == 0 ? END : (END-START) - ((END-START) % STEP) + STEP;
  ------------------
  |  Branch (79:12): [Folded - Ignored]
  ------------------
   80|   483k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi8ELi4EEEijRm:
   63|   483k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   483k|    write_index(idx, bits, START);
   65|   483k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   483k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   483k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   483k|    }
   68|   483k|    return START+N;
   69|   483k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi9ELi3EEEijRm:
   63|   483k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   483k|    write_index(idx, bits, START);
   65|   483k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   483k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   483k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   483k|    }
   68|   483k|    return START+N;
   69|   483k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi10ELi2EEEijRm:
   63|   483k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   483k|    write_index(idx, bits, START);
   65|   483k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   483k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   483k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   483k|    }
   68|   483k|    return START+N;
   69|   483k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi11ELi1EEEijRm:
   63|   483k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   483k|    write_index(idx, bits, START);
   65|   483k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   483k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|       |      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|       |    }
   68|   483k|    return START+N;
   69|   483k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer21write_indexes_steppedILi12ELi24ELi4EEEijRmi:
   72|   480k|  simdjson_inline int write_indexes_stepped(uint32_t idx, uint64_t& bits, int cnt) {
   73|   480k|    write_indexes<START, STEP>(idx, bits);
   74|   480k|    SIMDJSON_IF_CONSTEXPR ((START+STEP)  < END) {
  ------------------
  |  |   47|   480k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   75|   480k|      if (simdjson_unlikely((START+STEP) < cnt)) {
  ------------------
  |  |  106|   480k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 474k, False: 5.24k]
  |  |  ------------------
  ------------------
   76|   474k|        write_indexes_stepped<(START+STEP<END?START+STEP:END), END, STEP>(idx, bits, cnt);
   77|   474k|      }
   78|   480k|    }
   79|   480k|    return ((END-START) % STEP) == 0 ? END : (END-START) - ((END-START) % STEP) + STEP;
  ------------------
  |  Branch (79:12): [Folded - Ignored]
  ------------------
   80|   480k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi12ELi4EEEijRm:
   63|   480k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   480k|    write_index(idx, bits, START);
   65|   480k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   480k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   480k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   480k|    }
   68|   480k|    return START+N;
   69|   480k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi13ELi3EEEijRm:
   63|   480k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   480k|    write_index(idx, bits, START);
   65|   480k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   480k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   480k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   480k|    }
   68|   480k|    return START+N;
   69|   480k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi14ELi2EEEijRm:
   63|   480k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   480k|    write_index(idx, bits, START);
   65|   480k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   480k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   480k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   480k|    }
   68|   480k|    return START+N;
   69|   480k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi15ELi1EEEijRm:
   63|   480k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   480k|    write_index(idx, bits, START);
   65|   480k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   480k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|       |      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|       |    }
   68|   480k|    return START+N;
   69|   480k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer21write_indexes_steppedILi16ELi24ELi4EEEijRmi:
   72|   474k|  simdjson_inline int write_indexes_stepped(uint32_t idx, uint64_t& bits, int cnt) {
   73|   474k|    write_indexes<START, STEP>(idx, bits);
   74|   474k|    SIMDJSON_IF_CONSTEXPR ((START+STEP)  < END) {
  ------------------
  |  |   47|   474k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   75|   474k|      if (simdjson_unlikely((START+STEP) < cnt)) {
  ------------------
  |  |  106|   474k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 473k, False: 1.64k]
  |  |  ------------------
  ------------------
   76|   473k|        write_indexes_stepped<(START+STEP<END?START+STEP:END), END, STEP>(idx, bits, cnt);
   77|   473k|      }
   78|   474k|    }
   79|   474k|    return ((END-START) % STEP) == 0 ? END : (END-START) - ((END-START) % STEP) + STEP;
  ------------------
  |  Branch (79:12): [Folded - Ignored]
  ------------------
   80|   474k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi16ELi4EEEijRm:
   63|   474k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   474k|    write_index(idx, bits, START);
   65|   474k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   474k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   474k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   474k|    }
   68|   474k|    return START+N;
   69|   474k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi17ELi3EEEijRm:
   63|   474k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   474k|    write_index(idx, bits, START);
   65|   474k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   474k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   474k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   474k|    }
   68|   474k|    return START+N;
   69|   474k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi18ELi2EEEijRm:
   63|   474k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   474k|    write_index(idx, bits, START);
   65|   474k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   474k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   474k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   474k|    }
   68|   474k|    return START+N;
   69|   474k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi19ELi1EEEijRm:
   63|   474k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   474k|    write_index(idx, bits, START);
   65|   474k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   474k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|       |      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|       |    }
   68|   474k|    return START+N;
   69|   474k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer21write_indexes_steppedILi20ELi24ELi4EEEijRmi:
   72|   473k|  simdjson_inline int write_indexes_stepped(uint32_t idx, uint64_t& bits, int cnt) {
   73|   473k|    write_indexes<START, STEP>(idx, bits);
   74|   473k|    SIMDJSON_IF_CONSTEXPR ((START+STEP)  < END) {
  ------------------
  |  |   47|   473k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   75|       |      if (simdjson_unlikely((START+STEP) < cnt)) {
   76|       |        write_indexes_stepped<(START+STEP<END?START+STEP:END), END, STEP>(idx, bits, cnt);
   77|       |      }
   78|       |    }
   79|   473k|    return ((END-START) % STEP) == 0 ? END : (END-START) - ((END-START) % STEP) + STEP;
  ------------------
  |  Branch (79:12): [Folded - Ignored]
  ------------------
   80|   473k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi20ELi4EEEijRm:
   63|   473k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   473k|    write_index(idx, bits, START);
   65|   473k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   473k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   473k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   473k|    }
   68|   473k|    return START+N;
   69|   473k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi21ELi3EEEijRm:
   63|   473k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   473k|    write_index(idx, bits, START);
   65|   473k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   473k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   473k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   473k|    }
   68|   473k|    return START+N;
   69|   473k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi22ELi2EEEijRm:
   63|   473k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   473k|    write_index(idx, bits, START);
   65|   473k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   473k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   473k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   473k|    }
   68|   473k|    return START+N;
   69|   473k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi23ELi1EEEijRm:
   63|   473k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   473k|    write_index(idx, bits, START);
   65|   473k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   473k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|       |      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|       |    }
   68|   473k|    return START+N;
   69|   473k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer11write_indexEjRmi:
   56|  30.1M|  simdjson_inline void write_index(uint32_t idx, uint64_t& bits, int i) {
   57|  30.1M|    this->tail[i] = idx + trailing_zeroes(bits);
   58|  30.1M|    bits = clear_lowest_bit(bits);
   59|  30.1M|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage123json_structural_indexer6finishERNS0_25dom_parser_implementationEmmNS_11stage1_modeE:
  249|  10.6k|simdjson_inline error_code json_structural_indexer::finish(dom_parser_implementation &parser, size_t idx, size_t len, stage1_mode partial) {
  250|       |  // Write out the final iteration's structurals
  251|  10.6k|  indexer.write(uint32_t(idx-64), prev_structurals);
  252|  10.6k|  error_code error = scanner.finish();
  253|       |  // We deliberately break down the next expression so that it is
  254|       |  // human readable.
  255|  10.6k|  const bool should_we_exit = is_streaming(partial) ?
  ------------------
  |  Branch (255:31): [True: 0, False: 10.6k]
  ------------------
  256|      0|    ((error != SUCCESS) && (error != UNCLOSED_STRING)) // when partial we tolerate UNCLOSED_STRING
  ------------------
  |  Branch (256:6): [True: 0, False: 0]
  |  Branch (256:28): [True: 0, False: 0]
  ------------------
  257|  10.6k|    : (error != SUCCESS); // if partial is false, we must have SUCCESS
  258|  10.6k|  const bool have_unclosed_string = (error == UNCLOSED_STRING);
  259|  10.6k|  if (simdjson_unlikely(should_we_exit)) { return error; }
  ------------------
  |  |  106|  10.6k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 213, False: 10.4k]
  |  |  ------------------
  ------------------
  260|       |
  261|  10.4k|  if (unescaped_chars_error) {
  ------------------
  |  Branch (261:7): [True: 164, False: 10.2k]
  ------------------
  262|    164|    return UNESCAPED_CHARS;
  263|    164|  }
  264|  10.2k|  parser.n_structural_indexes = uint32_t(indexer.tail - parser.structural_indexes.get());
  265|       |  /***
  266|       |   * The On-Demand API requires special padding.
  267|       |   *
  268|       |   * This is related to https://github.com/simdjson/simdjson/issues/906
  269|       |   * Basically, we want to make sure that if the parsing continues beyond the last (valid)
  270|       |   * structural character, it quickly stops.
  271|       |   * Only three structural characters can be repeated without triggering an error in JSON:  [,] and }.
  272|       |   * We repeat the padding character (at 'len'). We don't know what it is, but if the parsing
  273|       |   * continues, then it must be [,] or }.
  274|       |   * Suppose it is ] or }. We backtrack to the first character, what could it be that would
  275|       |   * not trigger an error? It could be ] or } but no, because you can't start a document that way.
  276|       |   * It can't be a comma, a colon or any simple value. So the only way we could continue is
  277|       |   * if the repeated character is [. But if so, the document must start with [. But if the document
  278|       |   * starts with [, it should end with ]. If we enforce that rule, then we would get
  279|       |   * ][[ which is invalid.
  280|       |   *
  281|       |   * This is illustrated with the test array_iterate_unclosed_error() on the following input:
  282|       |   * R"({ "a": [,,)"
  283|       |   **/
  284|  10.2k|  parser.structural_indexes[parser.n_structural_indexes] = uint32_t(len); // used later in partial == stage1_mode::streaming_final
  285|  10.2k|  parser.structural_indexes[parser.n_structural_indexes + 1] = uint32_t(len);
  286|  10.2k|  parser.structural_indexes[parser.n_structural_indexes + 2] = 0;
  287|  10.2k|  parser.next_structural_index = 0;
  288|       |  // a valid JSON file cannot have zero structural indexes - we should have found something
  289|  10.2k|  if (simdjson_unlikely(parser.n_structural_indexes == 0u)) {
  ------------------
  |  |  106|  10.2k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 2, False: 10.2k]
  |  |  ------------------
  ------------------
  290|      2|    return EMPTY;
  291|      2|  }
  292|  10.2k|  if (simdjson_unlikely(parser.structural_indexes[parser.n_structural_indexes - 1] > len)) {
  ------------------
  |  |  106|  10.2k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 0, False: 10.2k]
  |  |  ------------------
  ------------------
  293|      0|    return UNEXPECTED_ERROR;
  294|      0|  }
  295|  10.2k|  if (partial == stage1_mode::streaming_partial) {
  ------------------
  |  Branch (295:7): [True: 0, False: 10.2k]
  ------------------
  296|       |    // If we have an unclosed string, then the last structural
  297|       |    // will be the quote and we want to make sure to omit it.
  298|      0|    if(have_unclosed_string) {
  ------------------
  |  Branch (298:8): [True: 0, False: 0]
  ------------------
  299|      0|      parser.n_structural_indexes--;
  300|       |      // a valid JSON file cannot have zero structural indexes - we should have found something
  301|      0|      if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { return CAPACITY; }
  ------------------
  |  |  106|      0|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  302|      0|    }
  303|       |    // We truncate the input to the end of the last complete document (or zero).
  304|      0|    auto new_structural_indexes = find_next_document_index(parser);
  305|      0|    if (new_structural_indexes == 0 && parser.n_structural_indexes > 0) {
  ------------------
  |  Branch (305:9): [True: 0, False: 0]
  |  Branch (305:40): [True: 0, False: 0]
  ------------------
  306|      0|      if(parser.structural_indexes[0] == 0) {
  ------------------
  |  Branch (306:10): [True: 0, False: 0]
  ------------------
  307|       |        // If the buffer is partial and we started at index 0 but the document is
  308|       |        // incomplete, it's too big to parse.
  309|      0|        return CAPACITY;
  310|      0|      } else {
  311|       |        // It is possible that the document could be parsed, we just had a lot
  312|       |        // of white space.
  313|      0|        parser.n_structural_indexes = 0;
  314|      0|        return EMPTY;
  315|      0|      }
  316|      0|    }
  317|       |
  318|      0|    parser.n_structural_indexes = new_structural_indexes;
  319|  10.2k|  } else if (partial == stage1_mode::streaming_final) {
  ------------------
  |  Branch (319:14): [True: 0, False: 10.2k]
  ------------------
  320|      0|    if(have_unclosed_string) { parser.n_structural_indexes--; }
  ------------------
  |  Branch (320:8): [True: 0, False: 0]
  ------------------
  321|       |    // We truncate the input to the end of the last complete document (or zero).
  322|       |    // Because partial == stage1_mode::streaming_final, it means that we may
  323|       |    // silently ignore trailing garbage. Though it sounds bad, we do it
  324|       |    // deliberately because many people who have streams of JSON documents
  325|       |    // will truncate them for processing. E.g., imagine that you are uncompressing
  326|       |    // the data from a size file or receiving it in chunks from the network. You
  327|       |    // may not know where exactly the last document will be. Meanwhile the
  328|       |    // document_stream instances allow people to know the JSON documents they are
  329|       |    // parsing (see the iterator.source() method).
  330|      0|    parser.n_structural_indexes = find_next_document_index(parser);
  331|       |    // We store the initial n_structural_indexes so that the client can see
  332|       |    // whether we used truncation. If initial_n_structural_indexes == parser.n_structural_indexes,
  333|       |    // then this will query parser.structural_indexes[parser.n_structural_indexes] which is len,
  334|       |    // otherwise, it will copy some prior index.
  335|      0|    parser.structural_indexes[parser.n_structural_indexes + 1] = parser.structural_indexes[parser.n_structural_indexes];
  336|       |    // This next line is critical, do not change it unless you understand what you are
  337|       |    // doing.
  338|      0|    parser.structural_indexes[parser.n_structural_indexes] = uint32_t(len);
  339|      0|    if (simdjson_unlikely(parser.n_structural_indexes == 0u)) {
  ------------------
  |  |  106|      0|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  340|       |        // We tolerate an unclosed string at the very end of the stream. Indeed, users
  341|       |        // often load their data in bulk without being careful and they want us to ignore
  342|       |        // the trailing garbage.
  343|      0|        return EMPTY;
  344|      0|    }
  345|      0|  }
  346|  10.2k|  checker.check_eof();
  347|  10.2k|  return checker.errors();
  348|  10.2k|}

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

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage213json_iteratorC2ERNS0_25dom_parser_implementationEm:
  245|  9.68k|  : buf{_dom_parser.buf},
  246|  9.68k|    next_structural{&_dom_parser.structural_indexes[start_structural_index]},
  247|  9.68k|    dom_parser{_dom_parser} {
  248|  9.68k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage213json_iterator13walk_documentILb0ENS2_12tape_builderEEENS_10error_codeERT0_:
  119|  9.68k|simdjson_warn_unused simdjson_inline error_code json_iterator::walk_document(V &visitor) noexcept {
  120|  9.68k|  logger::log_start();
  121|       |
  122|       |  //
  123|       |  // Start the document
  124|       |  //
  125|  9.68k|  if (at_eof()) { return EMPTY; }
  ------------------
  |  Branch (125:7): [True: 0, False: 9.68k]
  ------------------
  126|  9.68k|  log_start_value("document");
  127|  9.68k|  SIMDJSON_TRY( visitor.visit_document_start(*this) );
  ------------------
  |  |  273|  9.68k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 9.68k]
  |  |  ------------------
  ------------------
  128|       |
  129|       |  //
  130|       |  // Read first value
  131|       |  //
  132|  9.68k|  {
  133|  9.68k|    auto value = advance();
  134|       |
  135|       |    // Make sure the outer object or array is closed before continuing; otherwise, there are ways we
  136|       |    // could get into memory corruption. See https://github.com/simdjson/simdjson/issues/906
  137|  9.68k|    if (!STREAMING) {
  ------------------
  |  Branch (137:9): [Folded - Ignored]
  ------------------
  138|  9.68k|      switch (*value) {
  ------------------
  |  Branch (138:15): [True: 2.80k, False: 6.88k]
  ------------------
  139|  3.68k|        case '{': if (last_structural() != '}') { log_value("starting brace unmatched"); return TAPE_ERROR; }; break;
  ------------------
  |  Branch (139:9): [True: 3.68k, False: 5.99k]
  |  Branch (139:23): [True: 19, False: 3.66k]
  ------------------
  140|  3.19k|        case '[': if (last_structural() != ']') { log_value("starting bracket unmatched"); return TAPE_ERROR; }; break;
  ------------------
  |  Branch (140:9): [True: 3.19k, False: 6.49k]
  |  Branch (140:23): [True: 32, False: 3.16k]
  ------------------
  141|  9.68k|      }
  142|  9.68k|    }
  143|       |
  144|  9.63k|    switch (*value) {
  145|  3.66k|      case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin;
  ------------------
  |  |  273|    127|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 127]
  |  |  ------------------
  ------------------
  |  Branch (145:7): [True: 3.66k, False: 5.96k]
  |  Branch (145:21): [True: 127, False: 3.54k]
  ------------------
  146|  3.54k|      case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin;
  ------------------
  |  |  273|     82|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 82]
  |  |  ------------------
  ------------------
  |  Branch (146:7): [True: 3.16k, False: 6.47k]
  |  Branch (146:21): [True: 82, False: 3.08k]
  ------------------
  147|  3.08k|      default: SIMDJSON_TRY( visitor.visit_root_primitive(*this, value) ); break;
  ------------------
  |  |  273|  2.80k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 929, False: 1.87k]
  |  |  ------------------
  ------------------
  |  Branch (147:7): [True: 2.80k, False: 6.83k]
  ------------------
  148|  9.63k|    }
  149|  9.63k|  }
  150|  2.08k|  goto document_end;
  151|       |
  152|       |//
  153|       |// Object parser states
  154|       |//
  155|  4.64k|object_begin:
  156|  4.64k|  log_start_value("object");
  157|  4.64k|  depth++;
  158|  4.64k|  if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; }
  ------------------
  |  Branch (158:7): [True: 1, False: 4.64k]
  ------------------
  159|  4.64k|  dom_parser.is_array[depth] = false;
  160|  4.64k|  SIMDJSON_TRY( visitor.visit_object_start(*this) );
  ------------------
  |  |  273|  4.64k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 4.64k]
  |  |  ------------------
  ------------------
  161|       |
  162|  4.64k|  {
  163|  4.64k|    auto key = advance();
  164|  4.64k|    if (*key != '"') { log_error("Object does not start with a key"); return TAPE_ERROR; }
  ------------------
  |  Branch (164:9): [True: 70, False: 4.57k]
  ------------------
  165|  4.57k|    SIMDJSON_TRY( visitor.increment_count(*this) );
  ------------------
  |  |  273|  4.57k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 4.57k]
  |  |  ------------------
  ------------------
  166|  4.57k|    SIMDJSON_TRY( visitor.visit_key(*this, key) );
  ------------------
  |  |  273|  4.57k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 89, False: 4.48k]
  |  |  ------------------
  ------------------
  167|  4.48k|  }
  168|       |
  169|  57.4k|object_field:
  170|  57.4k|  if (simdjson_unlikely( *advance() != ':' )) { log_error("Missing colon after key in object"); return TAPE_ERROR; }
  ------------------
  |  |  106|  57.4k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 445, False: 57.0k]
  |  |  ------------------
  ------------------
  171|  57.0k|  {
  172|  57.0k|    auto value = advance();
  173|  57.0k|    switch (*value) {
  174|  1.99k|      case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin;
  ------------------
  |  |  273|  1.19k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 1.19k]
  |  |  ------------------
  ------------------
  |  Branch (174:7): [True: 1.99k, False: 55.0k]
  |  Branch (174:21): [True: 1.19k, False: 801]
  ------------------
  175|  37.8k|      case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin;
  ------------------
  |  |  273|  25.1k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 25.1k]
  |  |  ------------------
  ------------------
  |  Branch (175:7): [True: 37.8k, False: 19.1k]
  |  Branch (175:21): [True: 25.1k, False: 12.7k]
  ------------------
  176|  17.1k|      default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break;
  ------------------
  |  |  273|  17.1k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 611, False: 16.5k]
  |  |  ------------------
  ------------------
  |  Branch (176:7): [True: 17.1k, False: 39.8k]
  ------------------
  177|  57.0k|    }
  178|  57.0k|  }
  179|       |
  180|  55.8k|object_continue:
  181|  55.8k|  switch (*advance()) {
  182|  53.0k|    case ',':
  ------------------
  |  Branch (182:5): [True: 53.0k, False: 2.76k]
  ------------------
  183|  53.0k|      SIMDJSON_TRY( visitor.increment_count(*this) );
  ------------------
  |  |  273|  53.0k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 53.0k]
  |  |  ------------------
  ------------------
  184|  53.0k|      {
  185|  53.0k|        auto key = advance();
  186|  53.0k|        if (simdjson_unlikely( *key != '"' )) { log_error("Key string missing at beginning of field in object"); return TAPE_ERROR; }
  ------------------
  |  |  106|  53.0k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 17, False: 53.0k]
  |  |  ------------------
  ------------------
  187|  53.0k|        SIMDJSON_TRY( visitor.visit_key(*this, key) );
  ------------------
  |  |  273|  53.0k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 89, False: 52.9k]
  |  |  ------------------
  ------------------
  188|  52.9k|      }
  189|      0|      goto object_field;
  190|  2.67k|    case '}': log_end_value("object"); SIMDJSON_TRY( visitor.visit_object_end(*this) ); goto scope_end;
  ------------------
  |  |  273|  2.67k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 2.67k]
  |  |  ------------------
  ------------------
  |  Branch (190:5): [True: 2.67k, False: 53.1k]
  ------------------
  191|     87|    default: log_error("No comma between object fields"); return TAPE_ERROR;
  ------------------
  |  Branch (191:5): [True: 87, False: 55.7k]
  ------------------
  192|  55.8k|  }
  193|       |
  194|  27.3k|scope_end:
  195|  27.3k|  depth--;
  196|  27.3k|  if (depth == 0) { goto document_end; }
  ------------------
  |  Branch (196:7): [True: 4.32k, False: 23.0k]
  ------------------
  197|  23.0k|  if (dom_parser.is_array[depth]) { goto array_continue; }
  ------------------
  |  Branch (197:7): [True: 10.0k, False: 12.9k]
  ------------------
  198|  12.9k|  goto object_continue;
  199|       |
  200|       |//
  201|       |// Array parser states
  202|       |//
  203|  43.4k|array_begin:
  204|  43.4k|  log_start_value("array");
  205|  43.4k|  depth++;
  206|  43.4k|  if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; }
  ------------------
  |  Branch (206:7): [True: 1, False: 43.4k]
  ------------------
  207|  43.4k|  dom_parser.is_array[depth] = true;
  208|  43.4k|  SIMDJSON_TRY( visitor.visit_array_start(*this) );
  ------------------
  |  |  273|  43.4k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 43.4k]
  |  |  ------------------
  ------------------
  209|  43.4k|  SIMDJSON_TRY( visitor.increment_count(*this) );
  ------------------
  |  |  273|  43.4k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 43.4k]
  |  |  ------------------
  ------------------
  210|       |
  211|  12.2M|array_value:
  212|  12.2M|  {
  213|  12.2M|    auto value = advance();
  214|  12.2M|    switch (*value) {
  215|    945|      case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin;
  ------------------
  |  |  273|    644|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 644]
  |  |  ------------------
  ------------------
  |  Branch (215:7): [True: 945, False: 12.2M]
  |  Branch (215:21): [True: 644, False: 301]
  ------------------
  216|  28.3k|      case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin;
  ------------------
  |  |  273|    722|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 722]
  |  |  ------------------
  ------------------
  |  Branch (216:7): [True: 28.3k, False: 12.2M]
  |  Branch (216:21): [True: 722, False: 27.5k]
  ------------------
  217|  12.2M|      default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break;
  ------------------
  |  |  273|  12.2M|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 801, False: 12.2M]
  |  |  ------------------
  ------------------
  |  Branch (217:7): [True: 12.2M, False: 29.2k]
  ------------------
  218|  12.2M|    }
  219|  12.2M|  }
  220|       |
  221|  12.2M|array_continue:
  222|  12.2M|  switch (*advance()) {
  223|  12.1M|    case ',': SIMDJSON_TRY( visitor.increment_count(*this) ); goto array_value;
  ------------------
  |  |  273|  12.1M|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 12.1M]
  |  |  ------------------
  ------------------
  |  Branch (223:5): [True: 12.1M, False: 24.7k]
  ------------------
  224|  24.6k|    case ']': log_end_value("array"); SIMDJSON_TRY( visitor.visit_array_end(*this) ); goto scope_end;
  ------------------
  |  |  273|  24.6k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 24.6k]
  |  |  ------------------
  ------------------
  |  Branch (224:5): [True: 24.6k, False: 12.1M]
  ------------------
  225|     84|    default: log_error("Missing comma between array values"); return TAPE_ERROR;
  ------------------
  |  Branch (225:5): [True: 84, False: 12.2M]
  ------------------
  226|  12.2M|  }
  227|       |
  228|  6.41k|document_end:
  229|  6.41k|  log_end_value("document");
  230|  6.41k|  SIMDJSON_TRY( visitor.visit_document_end(*this) );
  ------------------
  |  |  273|  6.41k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 6.41k]
  |  |  ------------------
  ------------------
  231|       |
  232|  6.41k|  dom_parser.next_structural_index = uint32_t(next_structural - &dom_parser.structural_indexes[0]);
  233|       |
  234|       |  // If we didn't make it to the end, it's an error
  235|  6.41k|  if ( !STREAMING && dom_parser.next_structural_index != dom_parser.n_structural_indexes ) {
  ------------------
  |  Branch (235:8): [Folded - Ignored]
  |  Branch (235:22): [True: 51, False: 6.36k]
  ------------------
  236|     51|    log_error("More than one JSON value at the root of the document, or extra characters at the end of the JSON!");
  237|     51|    return TAPE_ERROR;
  238|     51|  }
  239|       |
  240|  6.36k|  return SUCCESS;
  241|       |
  242|  6.41k|} // walk_document()
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator6at_eofEv:
  260|  9.68k|simdjson_inline bool json_iterator::at_eof() const noexcept {
  261|  9.68k|  return next_structural == &dom_parser.structural_indexes[dom_parser.n_structural_indexes];
  262|  9.68k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator15log_start_valueEPKc:
  274|  57.7k|simdjson_inline void json_iterator::log_start_value(const char *type) const noexcept {
  275|  57.7k|  logger::log_line(*this, "+", type, "");
  276|  57.7k|  if (logger::LOG_ENABLED) { logger::log_depth++; }
  ------------------
  |  Branch (276:7): [Folded - Ignored]
  ------------------
  277|  57.7k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage213json_iterator7advanceEv:
  253|  24.7M|simdjson_inline const uint8_t *json_iterator::advance() noexcept {
  254|  24.7M|  return &buf[*(next_structural++)];
  255|  24.7M|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator15last_structuralEv:
  266|  6.88k|simdjson_inline uint8_t json_iterator::last_structural() const noexcept {
  267|  6.88k|  return buf[dom_parser.structural_indexes[dom_parser.n_structural_indexes - 1]];
  268|  6.88k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator9log_valueEPKc:
  270|  12.3M|simdjson_inline void json_iterator::log_value(const char *type) const noexcept {
  271|  12.3M|  logger::log_line(*this, "", type, "");
  272|  12.3M|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator4peekEv:
  250|  75.9k|simdjson_inline const uint8_t *json_iterator::peek() const noexcept {
  251|  75.9k|  return &buf[*(next_structural)];
  252|  75.9k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage213json_iterator20visit_root_primitiveINS2_12tape_builderEEENS_10error_codeERT_PKh:
  289|  2.80k|simdjson_warn_unused simdjson_inline error_code json_iterator::visit_root_primitive(V &visitor, const uint8_t *value) noexcept {
  290|  2.80k|  switch (*value) {
  291|    347|    case '"': return visitor.visit_root_string(*this, value);
  ------------------
  |  Branch (291:5): [True: 347, False: 2.45k]
  ------------------
  292|     50|    case 't': return visitor.visit_root_true_atom(*this, value);
  ------------------
  |  Branch (292:5): [True: 50, False: 2.75k]
  ------------------
  293|     95|    case 'f': return visitor.visit_root_false_atom(*this, value);
  ------------------
  |  Branch (293:5): [True: 95, False: 2.70k]
  ------------------
  294|     54|    case 'n': return visitor.visit_root_null_atom(*this, value);
  ------------------
  |  Branch (294:5): [True: 54, False: 2.75k]
  ------------------
  295|    168|    case '-':
  ------------------
  |  Branch (295:5): [True: 168, False: 2.63k]
  ------------------
  296|  1.22k|    case '0': case '1': case '2': case '3': case '4':
  ------------------
  |  Branch (296:5): [True: 162, False: 2.64k]
  |  Branch (296:15): [True: 338, False: 2.46k]
  |  Branch (296:25): [True: 247, False: 2.55k]
  |  Branch (296:35): [True: 127, False: 2.67k]
  |  Branch (296:45): [True: 186, False: 2.61k]
  ------------------
  297|  2.16k|    case '5': case '6': case '7': case '8': case '9':
  ------------------
  |  Branch (297:5): [True: 112, False: 2.69k]
  |  Branch (297:15): [True: 80, False: 2.72k]
  |  Branch (297:25): [True: 93, False: 2.71k]
  |  Branch (297:35): [True: 174, False: 2.63k]
  |  Branch (297:45): [True: 477, False: 2.32k]
  ------------------
  298|  2.16k|      return visitor.visit_root_number(*this, value);
  299|     94|    default:
  ------------------
  |  Branch (299:5): [True: 94, False: 2.71k]
  ------------------
  300|     94|      log_error("Document starts with a non-value character");
  301|     94|      return TAPE_ERROR;
  302|  2.80k|  }
  303|  2.80k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator13remaining_lenEv:
  256|  6.69k|simdjson_inline size_t json_iterator::remaining_len() const noexcept {
  257|  6.69k|  return dom_parser.len - *(next_structural-1);
  258|  6.69k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator9log_errorEPKc:
  284|  1.38k|simdjson_inline void json_iterator::log_error(const char *error) const noexcept {
  285|  1.38k|  logger::log_line(*this, "", "ERROR", error);
  286|  1.38k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage213json_iterator15visit_primitiveINS2_12tape_builderEEENS_10error_codeERT_PKh:
  305|  12.2M|simdjson_warn_unused simdjson_inline error_code json_iterator::visit_primitive(V &visitor, const uint8_t *value) noexcept {
  306|       |  // Use the fact that most scalars are going to be either strings or numbers.
  307|  12.2M|  if(*value == '"') {
  ------------------
  |  Branch (307:6): [True: 2.62k, False: 12.2M]
  ------------------
  308|  2.62k|    return visitor.visit_string(*this, value);
  309|  12.2M|  } else if (((*value - '0')  < 10) || (*value == '-')) {
  ------------------
  |  Branch (309:14): [True: 12.2M, False: 1.51k]
  |  Branch (309:40): [True: 0, False: 1.51k]
  ------------------
  310|  12.2M|    return visitor.visit_number(*this, value);
  311|  12.2M|  }
  312|       |  // true, false, null are uncommon.
  313|  1.51k|  switch (*value) {
  314|    485|    case 't': return visitor.visit_true_atom(*this, value);
  ------------------
  |  Branch (314:5): [True: 485, False: 1.03k]
  ------------------
  315|    473|    case 'f': return visitor.visit_false_atom(*this, value);
  ------------------
  |  Branch (315:5): [True: 473, False: 1.04k]
  ------------------
  316|    486|    case 'n': return visitor.visit_null_atom(*this, value);
  ------------------
  |  Branch (316:5): [True: 486, False: 1.02k]
  ------------------
  317|     71|    default:
  ------------------
  |  Branch (317:5): [True: 71, False: 1.44k]
  ------------------
  318|     71|      log_error("Non-value found when value was expected!");
  319|     71|      return TAPE_ERROR;
  320|  1.51k|  }
  321|  1.51k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator13log_end_valueEPKc:
  279|  33.7k|simdjson_inline void json_iterator::log_end_value(const char *type) const noexcept {
  280|  33.7k|  if (logger::LOG_ENABLED) { logger::log_depth--; }
  ------------------
  |  Branch (280:7): [Folded - Ignored]
  ------------------
  281|  33.7k|  logger::log_line(*this, "-", type, "");
  282|  33.7k|}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16logger9log_startEv:
   42|  9.68k|  static simdjson_inline void log_start() {
   43|  9.68k|    if (LOG_ENABLED) {
  ------------------
  |  Branch (43:9): [Folded - Ignored]
  ------------------
   44|      0|      log_depth = 0;
   45|      0|      printf("\n");
   46|      0|      printf("| %-*s | %-*s | %-*s | %-*s | Detail |\n", LOG_EVENT_LEN, "Event", LOG_BUFFER_LEN, "Buffer", LOG_SMALL_BUFFER_LEN, "Next", 5, "Next#");
   47|      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);
   48|      0|    }
   49|  9.68k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16logger8log_lineIKNS1_6stage213json_iteratorEEEvRT_PKcSA_SA_:
   59|  12.4M|  static simdjson_inline void log_line(S &structurals, const char *title_prefix, const char *title, const char *detail) {
   60|  12.4M|    if (LOG_ENABLED) {
  ------------------
  |  Branch (60:9): [Folded - Ignored]
  ------------------
   61|      0|      printf("| %*s%s%-*s ", log_depth*2, "", title_prefix, LOG_EVENT_LEN - log_depth*2 - int(strlen(title_prefix)), title);
   62|      0|      auto current_index = structurals.at_beginning() ? nullptr : structurals.next_structural-1;
  ------------------
  |  Branch (62:28): [True: 0, False: 0]
  ------------------
   63|      0|      auto next_index = structurals.next_structural;
   64|      0|      auto current = current_index ? &structurals.buf[*current_index] : reinterpret_cast<const uint8_t*>("                                                       ");
  ------------------
  |  Branch (64:22): [True: 0, False: 0]
  ------------------
   65|      0|      auto next = &structurals.buf[*next_index];
   66|      0|      {
   67|       |        // Print the next N characters in the buffer.
   68|      0|        printf("| ");
   69|       |        // Otherwise, print the characters starting from the buffer position.
   70|       |        // Print spaces for unprintable or newline characters.
   71|      0|        for (int i=0;i<LOG_BUFFER_LEN;i++) {
  ------------------
  |  Branch (71:22): [True: 0, False: 0]
  ------------------
   72|      0|          printf("%c", printable_char(current[i]));
   73|      0|        }
   74|      0|        printf(" ");
   75|       |        // Print the next N characters in the buffer.
   76|      0|        printf("| ");
   77|       |        // Otherwise, print the characters starting from the buffer position.
   78|       |        // Print spaces for unprintable or newline characters.
   79|      0|        for (int i=0;i<LOG_SMALL_BUFFER_LEN;i++) {
  ------------------
  |  Branch (79:22): [True: 0, False: 0]
  ------------------
   80|      0|          printf("%c", printable_char(next[i]));
   81|      0|        }
   82|      0|        printf(" ");
   83|      0|      }
   84|      0|      if (current_index) {
  ------------------
  |  Branch (84:11): [True: 0, False: 0]
  ------------------
   85|      0|        printf("| %*u ", LOG_INDEX_LEN, *current_index);
   86|      0|      } else {
   87|      0|        printf("| %-*s ", LOG_INDEX_LEN, "");
   88|      0|      }
   89|       |      // printf("| %*u ", LOG_INDEX_LEN, structurals.next_tape_index());
   90|      0|      printf("| %-s ", detail);
   91|      0|      printf("|\n");
   92|      0|    }
   93|  12.4M|  }

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

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder14parse_documentILb0EEENS_10error_codeERNS0_25dom_parser_implementationERNS_3dom8documentE:
  101|  9.68k|    dom::document &doc) noexcept {
  102|  9.68k|  dom_parser.doc = &doc;
  103|  9.68k|  json_iterator iter(dom_parser, STREAMING ? dom_parser.next_structural_index : 0);
  ------------------
  |  Branch (103:34): [Folded - Ignored]
  ------------------
  104|  9.68k|  tape_builder builder(doc);
  105|  9.68k|  return iter.walk_document<STREAMING>(builder);
  106|  9.68k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builderC2ERNS_3dom8documentE:
  155|  9.68k|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:
  121|  9.68k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_document_start(json_iterator &iter) noexcept {
  122|  9.68k|  start_container(iter);
  123|  9.68k|  return SUCCESS;
  124|  9.68k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15start_containerERNS2_13json_iteratorE:
  255|  57.7k|simdjson_inline void tape_builder::start_container(json_iterator &iter) noexcept {
  256|  57.7k|  iter.dom_parser.open_containers[iter.depth].tape_index = next_tape_index(iter);
  257|  57.7k|  iter.dom_parser.open_containers[iter.depth].count = 0;
  258|  57.7k|  tape.skip(); // We don't actually *write* the start element until the end.
  259|  57.7k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15next_tape_indexERNS2_13json_iteratorE:
  244|   119k|simdjson_inline uint32_t tape_builder::next_tape_index(json_iterator &iter) const noexcept {
  245|   119k|  return uint32_t(tape.next_tape_loc - iter.dom_parser.doc->tape.get());
  246|   119k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder18visit_empty_objectERNS2_13json_iteratorE:
  114|  1.96k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_empty_object(json_iterator &iter) noexcept {
  115|  1.96k|  return empty_container(iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT);
  116|  1.96k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15empty_containerERNS2_13json_iteratorENS_8internal9tape_typeES7_:
  248|  27.9k|simdjson_warn_unused simdjson_inline error_code tape_builder::empty_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept {
  249|  27.9k|  auto start_index = next_tape_index(iter);
  250|  27.9k|  tape.append(start_index+2, start);
  251|  27.9k|  tape.append(start_index, end);
  252|  27.9k|  return SUCCESS;
  253|  27.9k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder17visit_empty_arrayERNS2_13json_iteratorE:
  117|  25.9k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_empty_array(json_iterator &iter) noexcept {
  118|  25.9k|  return empty_container(iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY);
  119|  25.9k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder20visit_root_primitiveERNS2_13json_iteratorEPKh:
  108|  2.80k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_primitive(json_iterator &iter, const uint8_t *value) noexcept {
  109|  2.80k|  return iter.visit_root_primitive(*this, value);
  110|  2.80k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder17visit_root_stringERNS2_13json_iteratorEPKh:
  169|    347|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_string(json_iterator &iter, const uint8_t *value) noexcept {
  170|    347|  return visit_string(iter, value);
  171|    347|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder12visit_stringERNS2_13json_iteratorEPKhb:
  157|  60.6k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_string(json_iterator &iter, const uint8_t *value, bool key) noexcept {
  158|  60.6k|  iter.log_value(key ? "key" : "string");
  ------------------
  |  Branch (158:18): [True: 57.6k, False: 2.97k]
  ------------------
  159|  60.6k|  uint8_t *dst = on_start_string(iter);
  160|  60.6k|  dst = stringparsing::parse_string(value+1, dst, false); // We do not allow replacement when the escape characters are invalid.
  161|  60.6k|  if (dst == nullptr) {
  ------------------
  |  Branch (161:7): [True: 459, False: 60.1k]
  ------------------
  162|    459|    iter.log_error("Invalid escape in string");
  163|    459|    return STRING_ERROR;
  164|    459|  }
  165|  60.1k|  on_end_string(dst);
  166|  60.1k|  return SUCCESS;
  167|  60.6k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15on_start_stringERNS2_13json_iteratorE:
  274|  60.6k|simdjson_inline uint8_t *tape_builder::on_start_string(json_iterator &iter) noexcept {
  275|       |  // we advance the point, accounting for the fact that we have a NULL termination
  276|  60.6k|  tape.append(current_string_buf_loc - iter.dom_parser.doc->string_buf.get(), internal::tape_type::STRING);
  277|  60.6k|  return current_string_buf_loc + sizeof(uint32_t);
  278|  60.6k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder13on_end_stringEPh:
  280|  60.1k|simdjson_inline void tape_builder::on_end_string(uint8_t *dst) noexcept {
  281|  60.1k|  uint32_t str_length = uint32_t(dst - (current_string_buf_loc + sizeof(uint32_t)));
  282|       |  // TODO check for overflow in case someone has a crazy string (>=4GB?)
  283|       |  // But only add the overflow check when the document itself exceeds 4GB
  284|       |  // Currently unneeded because we refuse to parse docs larger or equal to 4GB.
  285|  60.1k|  memcpy(current_string_buf_loc, &str_length, sizeof(uint32_t));
  286|       |  // NULL termination is still handy if you expect all your strings to
  287|       |  // be NULL terminated? It comes at a small cost
  288|  60.1k|  *dst = 0;
  289|  60.1k|  current_string_buf_loc = dst + 1;
  290|  60.1k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder20visit_root_true_atomERNS2_13json_iteratorEPKh:
  207|     50|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_true_atom(json_iterator &iter, const uint8_t *value) noexcept {
  208|     50|  iter.log_value("true");
  209|     50|  if (!atomparsing::is_valid_true_atom(value, iter.remaining_len())) { return T_ATOM_ERROR; }
  ------------------
  |  Branch (209:7): [True: 41, False: 9]
  ------------------
  210|      9|  tape.append(0, internal::tape_type::TRUE_VALUE);
  211|      9|  return SUCCESS;
  212|     50|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder21visit_root_false_atomERNS2_13json_iteratorEPKh:
  221|     95|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_false_atom(json_iterator &iter, const uint8_t *value) noexcept {
  222|     95|  iter.log_value("false");
  223|     95|  if (!atomparsing::is_valid_false_atom(value, iter.remaining_len())) { return F_ATOM_ERROR; }
  ------------------
  |  Branch (223:7): [True: 88, False: 7]
  ------------------
  224|      7|  tape.append(0, internal::tape_type::FALSE_VALUE);
  225|      7|  return SUCCESS;
  226|     95|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder20visit_root_null_atomERNS2_13json_iteratorEPKh:
  235|     54|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_null_atom(json_iterator &iter, const uint8_t *value) noexcept {
  236|     54|  iter.log_value("null");
  237|     54|  if (!atomparsing::is_valid_null_atom(value, iter.remaining_len())) { return N_ATOM_ERROR; }
  ------------------
  |  Branch (237:7): [True: 41, False: 13]
  ------------------
  238|     13|  tape.append(0, internal::tape_type::NULL_VALUE);
  239|     13|  return SUCCESS;
  240|     54|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder17visit_root_numberERNS2_13json_iteratorEPKh:
  178|  2.16k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_number(json_iterator &iter, const uint8_t *value) noexcept {
  179|       |  //
  180|       |  // We need to make a copy to make sure that the string is space terminated.
  181|       |  // This is not about padding the input, which should already padded up
  182|       |  // to len + SIMDJSON_PADDING. However, we have no control at this stage
  183|       |  // on how the padding was done. What if the input string was padded with nulls?
  184|       |  // It is quite common for an input string to have an extra null character (C string).
  185|       |  // We do not want to allow 9\0 (where \0 is the null character) inside a JSON
  186|       |  // document, but the string "9\0" by itself is fine. So we make a copy and
  187|       |  // pad the input with spaces when we know that there is just one input element.
  188|       |  // This copy is relatively expensive, but it will almost never be called in
  189|       |  // practice unless you are in the strange scenario where you have many JSON
  190|       |  // documents made of single atoms.
  191|       |  //
  192|  2.16k|  std::unique_ptr<uint8_t[]>copy(new (std::nothrow) uint8_t[iter.remaining_len() + SIMDJSON_PADDING]);
  193|  2.16k|  if (copy.get() == nullptr) { return MEMALLOC; }
  ------------------
  |  Branch (193:7): [True: 0, False: 2.16k]
  ------------------
  194|  2.16k|  std::memcpy(copy.get(), value, iter.remaining_len());
  195|  2.16k|  std::memset(copy.get() + iter.remaining_len(), ' ', SIMDJSON_PADDING);
  196|  2.16k|  error_code error = visit_number(iter, copy.get());
  197|  2.16k|  return error;
  198|  2.16k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder12visit_numberERNS2_13json_iteratorEPKh:
  173|  12.2M|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_number(json_iterator &iter, const uint8_t *value) noexcept {
  174|  12.2M|  iter.log_value("number");
  175|  12.2M|  return numberparsing::parse_number(value, tape);
  176|  12.2M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder18visit_object_startERNS2_13json_iteratorE:
  125|  4.64k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_object_start(json_iterator &iter) noexcept {
  126|  4.64k|  start_container(iter);
  127|  4.64k|  return SUCCESS;
  128|  4.64k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15increment_countERNS2_13json_iteratorE:
  150|  12.2M|simdjson_warn_unused simdjson_inline error_code tape_builder::increment_count(json_iterator &iter) noexcept {
  151|  12.2M|  iter.dom_parser.open_containers[iter.depth].count++; // we have a key value pair in the object at parser.dom_parser.depth - 1
  152|  12.2M|  return SUCCESS;
  153|  12.2M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder9visit_keyERNS2_13json_iteratorEPKh:
  146|  57.6k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_key(json_iterator &iter, const uint8_t *key) noexcept {
  147|  57.6k|  return visit_string(iter, key, true);
  148|  57.6k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15visit_primitiveERNS2_13json_iteratorEPKh:
  111|  12.2M|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_primitive(json_iterator &iter, const uint8_t *value) noexcept {
  112|  12.2M|  return iter.visit_primitive(*this, value);
  113|  12.2M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15visit_true_atomERNS2_13json_iteratorEPKh:
  200|    485|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_true_atom(json_iterator &iter, const uint8_t *value) noexcept {
  201|    485|  iter.log_value("true");
  202|    485|  if (!atomparsing::is_valid_true_atom(value)) { return T_ATOM_ERROR; }
  ------------------
  |  Branch (202:7): [True: 81, False: 404]
  ------------------
  203|    404|  tape.append(0, internal::tape_type::TRUE_VALUE);
  204|    404|  return SUCCESS;
  205|    485|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder16visit_false_atomERNS2_13json_iteratorEPKh:
  214|    473|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_false_atom(json_iterator &iter, const uint8_t *value) noexcept {
  215|    473|  iter.log_value("false");
  216|    473|  if (!atomparsing::is_valid_false_atom(value)) { return F_ATOM_ERROR; }
  ------------------
  |  Branch (216:7): [True: 82, False: 391]
  ------------------
  217|    391|  tape.append(0, internal::tape_type::FALSE_VALUE);
  218|    391|  return SUCCESS;
  219|    473|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15visit_null_atomERNS2_13json_iteratorEPKh:
  228|    486|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_null_atom(json_iterator &iter, const uint8_t *value) noexcept {
  229|    486|  iter.log_value("null");
  230|    486|  if (!atomparsing::is_valid_null_atom(value)) { return N_ATOM_ERROR; }
  ------------------
  |  Branch (230:7): [True: 71, False: 415]
  ------------------
  231|    415|  tape.append(0, internal::tape_type::NULL_VALUE);
  232|    415|  return SUCCESS;
  233|    486|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder16visit_object_endERNS2_13json_iteratorE:
  134|  2.67k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_object_end(json_iterator &iter) noexcept {
  135|  2.67k|  return end_container(iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT);
  136|  2.67k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder13end_containerERNS2_13json_iteratorENS_8internal9tape_typeES7_:
  261|  27.3k|simdjson_warn_unused simdjson_inline error_code tape_builder::end_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept {
  262|       |  // Write the ending tape element, pointing at the start location
  263|  27.3k|  const uint32_t start_tape_index = iter.dom_parser.open_containers[iter.depth].tape_index;
  264|  27.3k|  tape.append(start_tape_index, end);
  265|       |  // Write the start tape element, pointing at the end location (and including count)
  266|       |  // count can overflow if it exceeds 24 bits... so we saturate
  267|       |  // the convention being that a cnt of 0xffffff or more is undetermined in value (>=  0xffffff).
  268|  27.3k|  const uint32_t count = iter.dom_parser.open_containers[iter.depth].count;
  269|  27.3k|  const uint32_t cntsat = count > 0xFFFFFF ? 0xFFFFFF : count;
  ------------------
  |  Branch (269:27): [True: 0, False: 27.3k]
  ------------------
  270|  27.3k|  tape_writer::write(iter.dom_parser.doc->tape[start_tape_index], next_tape_index(iter) | (uint64_t(cntsat) << 32), start);
  271|  27.3k|  return SUCCESS;
  272|  27.3k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder17visit_array_startERNS2_13json_iteratorE:
  129|  43.4k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_array_start(json_iterator &iter) noexcept {
  130|  43.4k|  start_container(iter);
  131|  43.4k|  return SUCCESS;
  132|  43.4k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder15visit_array_endERNS2_13json_iteratorE:
  137|  24.6k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_array_end(json_iterator &iter) noexcept {
  138|  24.6k|  return end_container(iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY);
  139|  24.6k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage212tape_builder18visit_document_endERNS2_13json_iteratorE:
  140|  6.41k|simdjson_warn_unused simdjson_inline error_code tape_builder::visit_document_end(json_iterator &iter) noexcept {
  141|  6.41k|  constexpr uint32_t start_tape_index = 0;
  142|  6.41k|  tape.append(start_tape_index, internal::tape_type::ROOT);
  143|  6.41k|  tape_writer::write(iter.dom_parser.doc->tape[start_tape_index], next_tape_index(iter), internal::tape_type::ROOT);
  144|  6.41k|  return SUCCESS;
  145|  6.41k|}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage211tape_writer4skipEv:
   83|  57.7k|simdjson_inline void tape_writer::skip() noexcept {
   84|  57.7k|  next_tape_loc++;
   85|  57.7k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage211tape_writer6appendEmNS_8internal9tape_typeE:
   95|  12.3M|simdjson_inline void tape_writer::append(uint64_t val, internal::tape_type t) noexcept {
   96|  12.3M|  *next_tape_loc = val | ((uint64_t(char(t))) << 56);
   97|  12.3M|  next_tape_loc++;
   98|  12.3M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage211tape_writer13append_doubleEd:
   79|  23.7k|simdjson_inline void tape_writer::append_double(double value) noexcept {
   80|  23.7k|  append2(0, value, internal::tape_type::DOUBLE);
   81|  23.7k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage211tape_writer7append2IdEEvmT_NS_8internal9tape_typeE:
  101|  23.7k|simdjson_inline void tape_writer::append2(uint64_t val, T val2, internal::tape_type t) noexcept {
  102|  23.7k|  append(val, t);
  103|  23.7k|  static_assert(sizeof(val2) == sizeof(*next_tape_loc), "Type is not 64 bits!");
  104|  23.7k|  memcpy(next_tape_loc, &val2, sizeof(val2));
  105|  23.7k|  next_tape_loc++;
  106|  23.7k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage211tape_writer10append_s64El:
   68|  12.1M|simdjson_inline void tape_writer::append_s64(int64_t value) noexcept {
   69|  12.1M|  append2(0, value, internal::tape_type::INT64);
   70|  12.1M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage211tape_writer7append2IlEEvmT_NS_8internal9tape_typeE:
  101|  12.1M|simdjson_inline void tape_writer::append2(uint64_t val, T val2, internal::tape_type t) noexcept {
  102|  12.1M|  append(val, t);
  103|  12.1M|  static_assert(sizeof(val2) == sizeof(*next_tape_loc), "Type is not 64 bits!");
  104|  12.1M|  memcpy(next_tape_loc, &val2, sizeof(val2));
  105|  12.1M|  next_tape_loc++;
  106|  12.1M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage211tape_writer10append_u64Em:
   72|  2.50k|simdjson_inline void tape_writer::append_u64(uint64_t value) noexcept {
   73|  2.50k|  append(0, internal::tape_type::UINT64);
   74|  2.50k|  *next_tape_loc = value;
   75|  2.50k|  next_tape_loc++;
   76|  2.50k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage211tape_writer5writeERmmNS_8internal9tape_typeE:
  108|  33.7k|simdjson_inline void tape_writer::write(uint64_t &tape_loc, uint64_t val, internal::tape_type t) noexcept {
  109|  33.7k|  tape_loc = val | ((uint64_t(char(t))) << 56);
  110|  33.7k|}

_ZNK8simdjson7haswell14implementation32create_dom_parser_implementationEmmRNSt3__110unique_ptrINS_8internal25dom_parser_implementationENS2_14default_deleteIS5_EEEE:
   27|  10.7k|) const noexcept {
   28|  10.7k|  dst.reset( new (std::nothrow) dom_parser_implementation() );
   29|  10.7k|  if (!dst) { return MEMALLOC; }
  ------------------
  |  Branch (29:7): [True: 0, False: 10.7k]
  ------------------
   30|  10.7k|  if (auto err = dst->set_capacity(capacity))
  ------------------
  |  Branch (30:12): [True: 0, False: 10.7k]
  ------------------
   31|      0|    return err;
   32|  10.7k|  if (auto err = dst->set_max_depth(max_depth))
  ------------------
  |  Branch (32:12): [True: 0, False: 10.7k]
  ------------------
   33|      0|    return err;
   34|  10.7k|  return SUCCESS;
   35|  10.7k|}
_ZN8simdjson7haswell25dom_parser_implementation6stage1EPKhmNS_11stage1_modeE:
  132|  10.7k|simdjson_warn_unused error_code dom_parser_implementation::stage1(const uint8_t *_buf, size_t _len, stage1_mode streaming) noexcept {
  133|  10.7k|  this->buf = _buf;
  134|  10.7k|  this->len = _len;
  135|  10.7k|  return haswell::stage1::json_structural_indexer::index<128>(_buf, _len, *this, streaming);
  136|  10.7k|}
_ZN8simdjson7haswell25dom_parser_implementation6stage2ERNS_3dom8documentE:
  142|  9.68k|simdjson_warn_unused error_code dom_parser_implementation::stage2(dom::document &_doc) noexcept {
  143|  9.68k|  return stage2::tape_builder::parse_document<false>(*this, _doc);
  144|  9.68k|}
_ZN8simdjson7haswell25dom_parser_implementation5parseEPKhmRNS_3dom8documentE:
  159|  10.7k|simdjson_warn_unused error_code dom_parser_implementation::parse(const uint8_t *_buf, size_t _len, dom::document &_doc) noexcept {
  160|  10.7k|  auto error = stage1(_buf, _len, stage1_mode::regular);
  161|  10.7k|  if (error) { return error; }
  ------------------
  |  Branch (161:7): [True: 1.07k, False: 9.68k]
  ------------------
  162|  9.68k|  return stage2(_doc);
  163|  10.7k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_18is_asciiERKNS1_4simd8simd8x64IhEE:
   96|  1.27M|simdjson_inline bool is_ascii(const simd8x64<uint8_t>& input) {
   97|  1.27M|  return input.reduce_or().is_ascii();
   98|  1.27M|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_124must_be_2_3_continuationENS1_4simd5simd8IhEES4_:
  108|  33.2k|simdjson_inline simd8<uint8_t> must_be_2_3_continuation(const simd8<uint8_t> prev2, const simd8<uint8_t> prev3) {
  109|  33.2k|  simd8<uint8_t> is_third_byte  = prev2.saturating_sub(0xe0u-0x80); // Only 111_____ will be >= 0x80
  110|  33.2k|  simd8<uint8_t> is_fourth_byte = prev3.saturating_sub(0xf0u-0x80); // Only 1111____ will be >= 0x80
  111|  33.2k|  return is_third_byte | is_fourth_byte;
  112|  33.2k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_120json_character_block8classifyERKNS1_4simd8simd8x64IhEE:
   43|  1.27M|simdjson_inline json_character_block json_character_block::classify(const simd::simd8x64<uint8_t>& in) {
   44|       |  // These lookups rely on the fact that anything < 127 will match the lower 4 bits, which is why
   45|       |  // we can't use the generic lookup_16.
   46|  1.27M|  const auto whitespace_table = simd8<uint8_t>::repeat_16(' ', 100, 100, 100, 17, 100, 113, 2, 100, '\t', '\n', 112, 100, '\r', 100, 100);
   47|       |
   48|       |  // The 6 operators (:,[]{}) have these values:
   49|       |  //
   50|       |  // , 2C
   51|       |  // : 3A
   52|       |  // [ 5B
   53|       |  // { 7B
   54|       |  // ] 5D
   55|       |  // } 7D
   56|       |  //
   57|       |  // If you use | 0x20 to turn [ and ] into { and }, the lower 4 bits of each character is unique.
   58|       |  // We exploit this, using a simd 4-bit lookup to tell us which character match against, and then
   59|       |  // match it (against | 0x20).
   60|       |  //
   61|       |  // To prevent recognizing other characters, everything else gets compared with 0, which cannot
   62|       |  // match due to the | 0x20.
   63|       |  //
   64|       |  // NOTE: Due to the | 0x20, this ALSO treats <FF> and <SUB> (control characters 0C and 1A) like ,
   65|       |  // and :. This gets caught in stage 2, which checks the actual character to ensure the right
   66|       |  // operators are in the right places.
   67|  1.27M|  const auto op_table = simd8<uint8_t>::repeat_16(
   68|  1.27M|    0, 0, 0, 0,
   69|  1.27M|    0, 0, 0, 0,
   70|  1.27M|    0, 0, ':', '{', // : = 3A, [ = 5B, { = 7B
   71|  1.27M|    ',', '}', 0, 0  // , = 2C, ] = 5D, } = 7D
   72|  1.27M|  );
   73|       |
   74|       |  // We compute whitespace and op separately. If later code only uses one or the
   75|       |  // other, given the fact that all functions are aggressively inlined, we can
   76|       |  // hope that useless computations will be omitted. This is namely case when
   77|       |  // minifying (we only need whitespace).
   78|       |
   79|  1.27M|  const uint64_t whitespace = in.eq({
   80|  1.27M|    _mm256_shuffle_epi8(whitespace_table, in.chunks[0]),
   81|  1.27M|    _mm256_shuffle_epi8(whitespace_table, in.chunks[1])
   82|  1.27M|  });
   83|       |  // Turn [ and ] into { and }
   84|  1.27M|  const simd8x64<uint8_t> curlified{
   85|  1.27M|    in.chunks[0] | 0x20,
   86|  1.27M|    in.chunks[1] | 0x20
   87|  1.27M|  };
   88|  1.27M|  const uint64_t op = curlified.eq({
   89|  1.27M|    _mm256_shuffle_epi8(op_table, in.chunks[0]),
   90|  1.27M|    _mm256_shuffle_epi8(op_table, in.chunks[1])
   91|  1.27M|  });
   92|       |
   93|  1.27M|  return { whitespace, op };
   94|  1.27M|}

_ZNK8simdjson8internal29available_implementation_list21detect_best_supportedEv:
  268|      1|const implementation *available_implementation_list::detect_best_supported() const noexcept {
  269|       |  // They are prelisted in priority order, so we just go down the list
  270|      1|  uint32_t supported_instruction_sets = internal::detect_supported_architectures();
  271|      2|  for (const implementation *impl : internal::get_available_implementation_pointers()) {
  ------------------
  |  Branch (271:35): [True: 2, False: 0]
  ------------------
  272|      2|    uint32_t required_instruction_sets = impl->required_instruction_sets();
  273|      2|    if ((supported_instruction_sets & required_instruction_sets) == required_instruction_sets) { return impl; }
  ------------------
  |  Branch (273:9): [True: 1, False: 1]
  ------------------
  274|      2|  }
  275|      0|  return get_unsupported_singleton(); // this should never happen?
  276|      1|}
_ZNK8simdjson8internal49detect_best_supported_implementation_on_first_use8set_bestEv:
  278|      1|const implementation *detect_best_supported_implementation_on_first_use::set_best() const noexcept {
  279|      1|  SIMDJSON_PUSH_DISABLE_WARNINGS
  280|       |  SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe
  281|      1|  char *force_implementation_name = getenv("SIMDJSON_FORCE_IMPLEMENTATION");
  282|      1|  SIMDJSON_POP_DISABLE_WARNINGS
  283|       |
  284|      1|  if (force_implementation_name) {
  ------------------
  |  Branch (284:7): [True: 0, False: 1]
  ------------------
  285|      0|    auto force_implementation = get_available_implementations()[force_implementation_name];
  286|      0|    if (force_implementation) {
  ------------------
  |  Branch (286:9): [True: 0, False: 0]
  ------------------
  287|      0|      return get_active_implementation() = force_implementation;
  288|      0|    } else {
  289|       |      // Note: abort() and stderr usage within the library is forbidden.
  290|      0|      return get_active_implementation() = get_unsupported_singleton();
  291|      0|    }
  292|      0|  }
  293|      1|  return get_active_implementation() = get_available_implementations().detect_best_supported();
  294|      1|}
_ZN8simdjson29get_available_implementationsEv:
  298|      1|SIMDJSON_DLLIMPORTEXPORT const internal::available_implementation_list& get_available_implementations() {
  299|      1|  static const internal::available_implementation_list available_implementations{};
  300|      1|  return available_implementations;
  301|      1|}
_ZN8simdjson25get_active_implementationEv:
  303|  10.7k|SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr<const implementation>& get_active_implementation() {
  304|       |#if SIMDJSON_SINGLE_IMPLEMENTATION
  305|       |  // We immediately select the only implementation we have, skipping the
  306|       |  // detect_best_supported_implementation_on_first_use_singleton.
  307|       |  static internal::atomic_ptr<const implementation> active_implementation{internal::get_single_implementation()};
  308|       |  return active_implementation;
  309|       |#else
  310|  10.7k|  static const internal::detect_best_supported_implementation_on_first_use detect_best_supported_implementation_on_first_use_singleton;
  311|  10.7k|  static internal::atomic_ptr<const implementation> active_implementation{&detect_best_supported_implementation_on_first_use_singleton};
  312|  10.7k|  return active_implementation;
  313|  10.7k|#endif
  314|  10.7k|}
simdjson.cpp:_ZN8simdjson8internalL37get_available_implementation_pointersEv:
  196|      1|static const std::initializer_list<const implementation *>& get_available_implementation_pointers() {
  197|      1|  static const std::initializer_list<const implementation *> available_implementation_pointers {
  198|      1|#if SIMDJSON_IMPLEMENTATION_ICELAKE
  199|      1|    get_icelake_singleton(),
  200|      1|#endif
  201|      1|#if SIMDJSON_IMPLEMENTATION_HASWELL
  202|      1|    get_haswell_singleton(),
  203|      1|#endif
  204|      1|#if SIMDJSON_IMPLEMENTATION_WESTMERE
  205|      1|    get_westmere_singleton(),
  206|      1|#endif
  207|       |#if SIMDJSON_IMPLEMENTATION_ARM64
  208|       |    get_arm64_singleton(),
  209|       |#endif
  210|       |#if SIMDJSON_IMPLEMENTATION_PPC64
  211|       |    get_ppc64_singleton(),
  212|       |#endif
  213|       |#if SIMDJSON_IMPLEMENTATION_LSX
  214|       |    get_lsx_singleton(),
  215|       |#endif
  216|       |#if SIMDJSON_IMPLEMENTATION_LASX
  217|       |    get_lasx_singleton(),
  218|       |#endif
  219|      1|#if SIMDJSON_IMPLEMENTATION_FALLBACK
  220|      1|    get_fallback_singleton(),
  221|      1|#endif
  222|      1|  }; // available_implementation_pointers
  223|      1|  return available_implementation_pointers;
  224|      1|}
simdjson.cpp:_ZN8simdjson8internalL21get_icelake_singletonEv:
   65|      1|static const icelake::implementation* get_icelake_singleton() {
   66|      1|  static const icelake::implementation icelake_singleton{};
   67|      1|  return &icelake_singleton;
   68|      1|}
simdjson.cpp:_ZN8simdjson8internalL21get_haswell_singletonEv:
   53|      1|static const haswell::implementation* get_haswell_singleton() {
   54|      1|  static const haswell::implementation haswell_singleton{};
   55|      1|  return &haswell_singleton;
   56|      1|}
simdjson.cpp:_ZN8simdjson8internalL22get_westmere_singletonEv:
   89|      1|static const simdjson::westmere::implementation* get_westmere_singleton() {
   90|      1|  static const simdjson::westmere::implementation westmere_singleton{};
   91|      1|  return &westmere_singleton;
   92|      1|}
simdjson.cpp:_ZN8simdjson8internalL22get_fallback_singletonEv:
   40|      1|static const fallback::implementation* get_fallback_singleton() {
   41|      1|  static const fallback::implementation fallback_singleton{};
   42|      1|  return &fallback_singleton;
   43|      1|}
_ZN8simdjson8internal49detect_best_supported_implementation_on_first_useC2Ev:
  189|      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:
  180|      1|  ) const noexcept final {
  181|      1|    return set_best()->create_dom_parser_implementation(capacity, max_length, dst);
  182|      1|  }

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

