_ZN8FuzzDataC2EPKhm:
   50|  8.81k|           size_t size) : Data(data),Size(size){}
_ZN8FuzzData23remainder_as_stringviewEv:
  109|  8.81k|  std::string_view remainder_as_stringview() {
  110|  8.81k|    std::string_view ret{chardata(),Size};
  111|  8.81k|    Data+=Size;
  112|  8.81k|    Size=0;
  113|  8.81k|    return ret;
  114|  8.81k|  }
_ZNK8FuzzData8chardataEv:
  158|  8.81k|  const char* chardata() const {return static_cast<const char*>(static_cast<const void*>(Data));}
_ZN8FuzzData6getIntILi0ELi1000EEEiv:
   54|  8.81k|  int getInt() {
   55|  8.81k|    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|  8.81k|    constexpr int range=(Max-Min)+1;
   60|  8.81k|    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|  8.81k|    if(range<256)
  ------------------
  |  Branch (64:8): [Folded - Ignored]
  ------------------
   65|      0|      return Min+static_cast<int>(get<uint8_t>()%urange);
   66|  8.81k|    if(range<65536)
  ------------------
  |  Branch (66:8): [Folded - Ignored]
  ------------------
   67|  8.81k|      return Min+static_cast<int>(get<uint16_t>()%urange);
   68|       |
   69|      0|    return Min+static_cast<int>(get<uint32_t>()%urange);
   70|  8.81k|  }
_ZN8FuzzData3getItEET_v:
   73|  8.81k|  T get() {
   74|  8.81k|    const auto Nbytes=sizeof(T);
   75|  8.81k|    T ret{};
   76|  8.81k|    if(Size<Nbytes) {
  ------------------
  |  Branch (76:8): [True: 2, False: 8.81k]
  ------------------
   77|       |      //don't throw, signal with null instead.
   78|      2|      Data=nullptr;
   79|      2|      Size=0;
   80|      2|      return ret;
   81|      2|    }
   82|  8.81k|    std::memcpy(&ret,Data,Nbytes);
   83|  8.81k|    Data+=Nbytes;
   84|  8.81k|    Size-=Nbytes;
   85|  8.81k|    return ret;
   86|  8.81k|  }

LLVMFuzzerTestOneInput:
    9|  8.81k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   10|  8.81k|  FuzzData fd(Data, Size);
   11|  8.81k|  const auto batch_size = static_cast<size_t>(fd.getInt<0,1000>());
   12|  8.81k|  const auto json = simdjson::padded_string{fd.remainder_as_stringview()};
   13|  8.81k|  simdjson::dom::parser parser;
   14|  8.81k|  simdjson::dom::document_stream docs;
   15|  8.81k|  if(parser.parse_many(json,batch_size).get(docs)) { return 0; }
  ------------------
  |  Branch (15:6): [True: 0, False: 8.81k]
  ------------------
   16|  8.81k|  size_t bool_count1 = 0;
   17|  8.81k|  size_t total_count1 = 0;
   18|  68.7k|  for (auto doc : docs) {
  ------------------
  |  Branch (18:17): [True: 68.7k, False: 8.81k]
  ------------------
   19|  68.7k|    total_count1++;
   20|  68.7k|    bool_count1 += doc.is_bool();
   21|  68.7k|  }
   22|       |  // Restart, if we made it this far, the document *must* be accessible.
   23|  8.81k|  if(parser.parse_many(json,batch_size).get(docs)) { return EXIT_FAILURE; }
  ------------------
  |  Branch (23:6): [True: 0, False: 8.81k]
  ------------------
   24|  8.81k|  size_t bool_count2 = 0;
   25|  8.81k|  size_t total_count2 = 0;
   26|  68.7k|  for (auto doc : docs) {
  ------------------
  |  Branch (26:17): [True: 68.7k, False: 8.81k]
  ------------------
   27|  68.7k|    total_count2++;
   28|  68.7k|    bool_count2 += doc.is_bool();
   29|  68.7k|  }
   30|       |  // They should agree!!!
   31|  8.81k|  if((total_count2 != total_count1) || (bool_count2 != bool_count1)) { return EXIT_FAILURE; }
  ------------------
  |  Branch (31:6): [True: 0, False: 8.81k]
  |  Branch (31:40): [True: 0, False: 8.81k]
  ------------------
   32|  8.81k|  return 0;
   33|  8.81k|}

_ZNK8simdjson3dom8document8capacityEv:
   23|  19.0k|inline size_t document::capacity() const noexcept {
   24|  19.0k|  return allocated_capacity;
   25|  19.0k|}
_ZN8simdjson3dom8document8allocateEm:
   28|  10.2k|inline error_code document::allocate(size_t capacity) noexcept {
   29|  10.2k|  if (capacity == 0) {
  ------------------
  |  Branch (29:7): [True: 0, False: 10.2k]
  ------------------
   30|      0|    string_buf.reset();
   31|      0|    tape.reset();
   32|      0|    allocated_capacity = 0;
   33|      0|    return SUCCESS;
   34|      0|  }
   35|       |
   36|       |  // a pathological input like "[[[[..." would generate capacity tape elements, so
   37|       |  // need a capacity of at least capacity + 1, but it is also possible to do
   38|       |  // worse with "[7,7,7,7,6,7,7,7,6,7,7,6,[7,7,7,7,6,7,7,7,6,7,7,6,7,7,7,7,7,7,6"
   39|       |  //where capacity + 1 tape elements are
   40|       |  // generated, see issue https://github.com/simdjson/simdjson/issues/345
   41|  10.2k|  size_t tape_capacity = SIMDJSON_ROUNDUP_N(capacity + 3, 64);
  ------------------
  |  |   68|  10.2k|#define SIMDJSON_ROUNDUP_N(a, n) (((a) + ((n)-1)) & ~((n)-1))
  ------------------
   42|       |  // a document with only zero-length strings... could have capacity/3 string
   43|       |  // and we would need capacity/3 * 5 bytes on the string buffer
   44|  10.2k|  size_t string_capacity = SIMDJSON_ROUNDUP_N(5 * capacity / 3 + SIMDJSON_PADDING, 64);
  ------------------
  |  |   68|  10.2k|#define SIMDJSON_ROUNDUP_N(a, n) (((a) + ((n)-1)) & ~((n)-1))
  ------------------
   45|  10.2k|  string_buf.reset( new (std::nothrow) uint8_t[string_capacity]);
   46|  10.2k|  tape.reset(new (std::nothrow) uint64_t[tape_capacity]);
   47|  10.2k|  if(!(string_buf && tape)) {
  ------------------
  |  Branch (47:8): [True: 10.2k, False: 0]
  |  Branch (47:22): [True: 10.2k, False: 0]
  ------------------
   48|      0|    allocated_capacity = 0;
   49|      0|    string_buf.reset();
   50|      0|    tape.reset();
   51|      0|    return MEMALLOC;
   52|      0|  }
   53|       |  // Technically the allocated_capacity might be larger than capacity
   54|       |  // so the next line is pessimistic.
   55|  10.2k|  allocated_capacity = capacity;
   56|  10.2k|  return SUCCESS;
   57|  10.2k|}
_ZNK8simdjson3dom8document4rootEv:
   19|   125k|inline element document::root() const noexcept {
   20|   125k|  return element(internal::tape_ref(this, 1));
   21|   125k|}

_ZN8simdjson3dom8documentC2Ev:
   25|  35.2k|  document() noexcept = default;
_ZN8simdjson3dom8documentC2EOS1_:
   33|  91.7k|  document(document &&other) noexcept = default;
_ZN8simdjson3dom8documentaSEOS1_:
   41|   165k|  document &operator=(document &&other) noexcept = default;
_ZN8simdjson3dom8documentD2Ev:
   26|   127k|  ~document() noexcept = default;

_ZN8simdjson3dom15document_streamC2Ev:
  115|  8.81k|{
  116|  8.81k|}
_ZN8simdjson3dom15document_streamC2ERNS0_6parserEPKhmm:
   98|  17.6k|{
   99|  17.6k|#ifdef SIMDJSON_THREADS_ENABLED
  100|  17.6k|  if(worker.get() == nullptr) {
  ------------------
  |  Branch (100:6): [True: 0, False: 17.6k]
  ------------------
  101|      0|    error = MEMALLOC;
  102|      0|  }
  103|  17.6k|#endif
  104|  17.6k|}
_ZN8simdjson15simdjson_resultINS_3dom15document_streamEEC2EOS2_:
  314|  17.6k|  : simdjson_result_base(std::forward<dom::document_stream>(value)) {
  315|  17.6k|}
_ZN8simdjson3dom15document_stream5beginEv:
  128|  17.6k|simdjson_inline document_stream::iterator document_stream::begin() noexcept {
  129|  17.6k|  start();
  130|       |  // If there are no documents, we're finished.
  131|  17.6k|  return iterator(this, error == EMPTY);
  132|  17.6k|}
_ZN8simdjson3dom15document_stream5startEv:
  183|  17.6k|inline void document_stream::start() noexcept {
  184|  17.6k|  if (error) { return; }
  ------------------
  |  Branch (184:7): [True: 0, False: 17.6k]
  ------------------
  185|  17.6k|  error = parser->ensure_capacity(batch_size);
  186|  17.6k|  if (error) { return; }
  ------------------
  |  Branch (186:7): [True: 0, False: 17.6k]
  ------------------
  187|       |  // Always run the first stage 1 parse immediately
  188|  17.6k|  batch_start = 0;
  189|  17.6k|  error = run_stage1(*parser, batch_start);
  190|  21.8k|  while(error == EMPTY) {
  ------------------
  |  Branch (190:9): [True: 4.59k, False: 17.2k]
  ------------------
  191|       |    // In exceptional cases, we may start with an empty block
  192|  4.59k|    batch_start = next_batch_start();
  193|  4.59k|    if (batch_start >= len) { return; }
  ------------------
  |  Branch (193:9): [True: 340, False: 4.25k]
  ------------------
  194|  4.25k|    error = run_stage1(*parser, batch_start);
  195|  4.25k|  }
  196|  17.2k|  if (error) { return; }
  ------------------
  |  Branch (196:7): [True: 2.07k, False: 15.2k]
  ------------------
  197|  15.2k|#ifdef SIMDJSON_THREADS_ENABLED
  198|  15.2k|  if (use_thread && next_batch_start() < len) {
  ------------------
  |  Branch (198:7): [True: 15.2k, False: 0]
  |  Branch (198:21): [True: 1.44k, False: 13.7k]
  ------------------
  199|       |    // Kick off the first thread if needed
  200|  1.44k|    error = stage1_thread_parser.ensure_capacity(batch_size);
  201|  1.44k|    if (error) { return; }
  ------------------
  |  Branch (201:9): [True: 0, False: 1.44k]
  ------------------
  202|  1.44k|    worker->start_thread();
  203|  1.44k|    start_stage1_thread();
  204|  1.44k|    if (error) { return; }
  ------------------
  |  Branch (204:9): [True: 0, False: 1.44k]
  ------------------
  205|  1.44k|  }
  206|  15.2k|#endif // SIMDJSON_THREADS_ENABLED
  207|  15.2k|  next();
  208|  15.2k|}
_ZN8simdjson3dom15document_stream10run_stage1ERNS0_6parserEm:
  267|  53.4k|inline error_code document_stream::run_stage1(dom::parser &p, size_t _batch_start) noexcept {
  268|  53.4k|  size_t remaining = len - _batch_start;
  269|  53.4k|  if (remaining <= batch_size) {
  ------------------
  |  Branch (269:7): [True: 16.9k, False: 36.5k]
  ------------------
  270|  16.9k|    return p.implementation->stage1(&buf[_batch_start], remaining, stage1_mode::streaming_final);
  271|  36.5k|  } else {
  272|  36.5k|    return p.implementation->stage1(&buf[_batch_start], batch_size, stage1_mode::streaming_partial);
  273|  36.5k|  }
  274|  53.4k|}
_ZNK8simdjson3dom15document_stream16next_batch_startEv:
  263|   162k|inline size_t document_stream::next_batch_start() const noexcept {
  264|   162k|  return batch_start + parser->implementation->structural_indexes[parser->implementation->n_structural_indexes];
  265|   162k|}
_ZN8simdjson3dom13stage1_worker12start_threadEv:
   28|  1.44k|inline void stage1_worker::start_thread() {
   29|  1.44k|  std::unique_lock<std::mutex> lock(locking_mutex);
   30|  1.44k|  if(thread.joinable()) {
  ------------------
  |  Branch (30:6): [True: 0, False: 1.44k]
  ------------------
   31|      0|    return; // This should never happen but we never want to create more than one thread.
   32|      0|  }
   33|  1.44k|  thread = std::thread([this]{
   34|  1.44k|      while(true) {
   35|  1.44k|        std::unique_lock<std::mutex> thread_lock(locking_mutex);
   36|       |        // We wait for either "run" or "stop_thread" to be called.
   37|  1.44k|        cond_var.wait(thread_lock, [this]{return has_work || !can_work;});
   38|       |        // If, for some reason, the stop_thread() method was called (i.e., the
   39|       |        // destructor of stage1_worker is called, then we want to immediately destroy
   40|       |        // the thread (and not do any more processing).
   41|  1.44k|        if(!can_work) {
   42|  1.44k|          break;
   43|  1.44k|        }
   44|  1.44k|        this->owner->stage1_thread_error = this->owner->run_stage1(*this->stage1_thread_parser,
   45|  1.44k|              this->_next_batch_start);
   46|  1.44k|        this->has_work = false;
   47|       |        // The condition variable call should be moved after thread_lock.unlock() for performance
   48|       |        // reasons but thread sanitizers may report it as a data race if we do.
   49|       |        // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock
   50|  1.44k|        cond_var.notify_one(); // will notify "finish"
   51|  1.44k|        thread_lock.unlock();
   52|  1.44k|      }
   53|  1.44k|    }
   54|  1.44k|  );
   55|  1.44k|}
_ZZN8simdjson3dom13stage1_worker12start_threadEvENKUlvE_clEv:
   33|  1.44k|  thread = std::thread([this]{
   34|  32.9k|      while(true) {
  ------------------
  |  Branch (34:13): [Folded - Ignored]
  ------------------
   35|  32.9k|        std::unique_lock<std::mutex> thread_lock(locking_mutex);
   36|       |        // We wait for either "run" or "stop_thread" to be called.
   37|  32.9k|        cond_var.wait(thread_lock, [this]{return has_work || !can_work;});
   38|       |        // If, for some reason, the stop_thread() method was called (i.e., the
   39|       |        // destructor of stage1_worker is called, then we want to immediately destroy
   40|       |        // the thread (and not do any more processing).
   41|  32.9k|        if(!can_work) {
  ------------------
  |  Branch (41:12): [True: 1.44k, False: 31.5k]
  ------------------
   42|  1.44k|          break;
   43|  1.44k|        }
   44|  31.5k|        this->owner->stage1_thread_error = this->owner->run_stage1(*this->stage1_thread_parser,
   45|  31.5k|              this->_next_batch_start);
   46|  31.5k|        this->has_work = false;
   47|       |        // The condition variable call should be moved after thread_lock.unlock() for performance
   48|       |        // reasons but thread sanitizers may report it as a data race if we do.
   49|       |        // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock
   50|  31.5k|        cond_var.notify_one(); // will notify "finish"
   51|  31.5k|        thread_lock.unlock();
   52|  31.5k|      }
   53|  1.44k|    }
_ZZZN8simdjson3dom13stage1_worker12start_threadEvENKUlvE_clEvENKUlvE_clEv:
   37|  64.3k|        cond_var.wait(thread_lock, [this]{return has_work || !can_work;});
  ------------------
  |  Branch (37:50): [True: 31.5k, False: 32.8k]
  |  Branch (37:62): [True: 1.44k, False: 31.3k]
  ------------------
_ZN8simdjson3dom15document_stream19start_stage1_threadEv:
  292|  32.2k|inline void document_stream::start_stage1_thread() noexcept {
  293|       |  // we call the thread on a lambda that will update
  294|       |  // this->stage1_thread_error
  295|       |  // there is only one thread that may write to this value
  296|       |  // TODO this is NOT exception-safe.
  297|  32.2k|  this->stage1_thread_error = UNINITIALIZED; // In case something goes wrong, make sure it's an error
  298|  32.2k|  size_t _next_batch_start = this->next_batch_start();
  299|       |
  300|  32.2k|  worker->run(this, & this->stage1_thread_parser, _next_batch_start);
  301|  32.2k|}
_ZN8simdjson3dom13stage1_worker3runEPNS0_15document_streamEPNS0_6parserEm:
   70|  32.2k|inline void stage1_worker::run(document_stream * ds, dom::parser * stage1, size_t next_batch_start) {
   71|  32.2k|  std::unique_lock<std::mutex> lock(locking_mutex);
   72|  32.2k|  owner = ds;
   73|  32.2k|  _next_batch_start = next_batch_start;
   74|  32.2k|  stage1_thread_parser = stage1;
   75|  32.2k|  has_work = true;
   76|       |  // The condition variable call should be moved after thread_lock.unlock() for performance
   77|       |  // reasons but thread sanitizers may report it as a data race if we do.
   78|       |  // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock
   79|  32.2k|  cond_var.notify_one(); // will notify the thread lock that we have work
   80|  32.2k|  lock.unlock();
   81|  32.2k|}
_ZN8simdjson3dom15document_stream4nextEv:
  227|   152k|inline void document_stream::next() noexcept {
  228|       |  // We always exit at once, once in an error condition.
  229|   152k|  if (error) { return; }
  ------------------
  |  Branch (229:7): [True: 12.2k, False: 140k]
  ------------------
  230|       |
  231|       |  // Load the next document from the batch
  232|   140k|  doc_index = batch_start + parser->implementation->structural_indexes[parser->implementation->next_structural_index];
  233|   140k|  error = parser->implementation->stage2_next(parser->doc);
  234|       |  // If that was the last document in the batch, load another batch (if available)
  235|   214k|  while (error == EMPTY) {
  ------------------
  |  Branch (235:10): [True: 79.1k, False: 135k]
  ------------------
  236|  79.1k|    batch_start = next_batch_start();
  237|  79.1k|    if (batch_start >= len) { break; }
  ------------------
  |  Branch (237:9): [True: 5.02k, False: 74.1k]
  ------------------
  238|       |
  239|  74.1k|#ifdef SIMDJSON_THREADS_ENABLED
  240|  74.1k|    if(use_thread) {
  ------------------
  |  Branch (240:8): [True: 74.1k, False: 0]
  ------------------
  241|  74.1k|      load_from_stage1_thread();
  242|  74.1k|    } else {
  243|      0|      error = run_stage1(*parser, batch_start);
  244|      0|    }
  245|       |#else
  246|       |    error = run_stage1(*parser, batch_start);
  247|       |#endif
  248|  74.1k|    if (error) { continue; } // If the error was EMPTY, we may want to load another batch.
  ------------------
  |  Branch (248:9): [True: 42.9k, False: 31.1k]
  ------------------
  249|       |    // Run stage 2 on the first document in the batch
  250|  31.1k|    doc_index = batch_start + parser->implementation->structural_indexes[parser->implementation->next_structural_index];
  251|  31.1k|    error = parser->implementation->stage2_next(parser->doc);
  252|  31.1k|  }
  253|   140k|}
_ZN8simdjson3dom15document_stream23load_from_stage1_threadEv:
  278|  74.1k|inline void document_stream::load_from_stage1_thread() noexcept {
  279|  74.1k|  worker->finish();
  280|       |  // Swap to the parser that was loaded up in the thread. Make sure the parser has
  281|       |  // enough memory to swap to, as well.
  282|  74.1k|  std::swap(*parser, stage1_thread_parser);
  283|  74.1k|  error = stage1_thread_error;
  284|  74.1k|  if (error) { return; }
  ------------------
  |  Branch (284:7): [True: 42.9k, False: 31.1k]
  ------------------
  285|       |
  286|       |  // If there's anything left, start the stage 1 thread!
  287|  31.1k|  if (next_batch_start() < len) {
  ------------------
  |  Branch (287:7): [True: 30.7k, False: 342]
  ------------------
  288|  30.7k|    start_stage1_thread();
  289|  30.7k|  }
  290|  31.1k|}
_ZN8simdjson3dom13stage1_worker6finishEv:
   12|  74.1k|inline void stage1_worker::finish() {
   13|       |  // After calling "run" someone would call finish() to wait
   14|       |  // for the end of the processing.
   15|       |  // This function will wait until either the thread has done
   16|       |  // the processing or, else, the destructor has been called.
   17|  74.1k|  std::unique_lock<std::mutex> lock(locking_mutex);
   18|  74.1k|  cond_var.wait(lock, [this]{return has_work == false;});
   19|  74.1k|}
_ZZN8simdjson3dom13stage1_worker6finishEvENKUlvE_clEv:
   18|   104k|  cond_var.wait(lock, [this]{return has_work == false;});
_ZN8simdjson3dom15document_stream8iteratorC2EPS1_b:
  139|  35.2k|  : stream{_stream}, finished{is_end} {
  140|  35.2k|}
_ZN8simdjson3dom15document_stream3endEv:
  134|  17.6k|simdjson_inline document_stream::iterator document_stream::end() noexcept {
  135|  17.6k|  return iterator(this, true);
  136|  17.6k|}
_ZNK8simdjson3dom15document_stream8iteratorneERKS2_:
  179|   155k|simdjson_inline bool document_stream::iterator::operator!=(const document_stream::iterator &other) const noexcept {
  180|   155k|  return finished != other.finished;
  181|   155k|}
_ZN8simdjson3dom15document_stream8iteratordeEv:
  142|   137k|simdjson_inline document_stream::iterator::reference document_stream::iterator::operator*() noexcept {
  143|       |  // Note that in case of error, we do not yet mark
  144|       |  // the iterator as "finished": this detection is done
  145|       |  // in the operator++ function since it is possible
  146|       |  // to call operator++ repeatedly while omitting
  147|       |  // calls to operator*.
  148|   137k|  if (stream->error) { return stream->error; }
  ------------------
  |  Branch (148:7): [True: 12.2k, False: 125k]
  ------------------
  149|   125k|  return stream->parser->doc.root();
  150|   137k|}
_ZN8simdjson3dom15document_stream8iteratorppEv:
  152|   137k|simdjson_inline document_stream::iterator& document_stream::iterator::operator++() noexcept {
  153|       |  // If there is an error, then we want the iterator
  154|       |  // to be finished, no matter what. (E.g., we do not
  155|       |  // keep generating documents with errors, or go beyond
  156|       |  // a document with errors.)
  157|       |  //
  158|       |  // Users do not have to call "operator*()" when they use operator++,
  159|       |  // so we need to end the stream in the operator++ function.
  160|       |  //
  161|       |  // Note that setting finished = true is essential otherwise
  162|       |  // we would enter an infinite loop.
  163|   137k|  if (stream->error) { finished = true; }
  ------------------
  |  Branch (163:7): [True: 12.2k, False: 125k]
  ------------------
  164|       |  // Note that stream->error() is guarded against error conditions
  165|       |  // (it will immediately return if stream->error casts to false).
  166|       |  // In effect, this next function does nothing when (stream->error)
  167|       |  // is true (hence the risk of an infinite loop).
  168|   137k|  stream->next();
  169|       |  // If that was the last document, we're finished.
  170|       |  // It is the only type of error we do not want to appear
  171|       |  // in operator*.
  172|   137k|  if (stream->error == EMPTY) { finished = true; }
  ------------------
  |  Branch (172:7): [True: 5.02k, False: 132k]
  ------------------
  173|       |  // If we had any other kind of error (not EMPTY) then we want
  174|       |  // to pass it along to the operator* and we cannot mark the result
  175|       |  // as "finished" just yet.
  176|   137k|  return *this;
  177|   137k|}
_ZN8simdjson3dom15document_streamD2Ev:
  118|  44.0k|simdjson_inline document_stream::~document_stream() noexcept {
  119|  44.0k|#ifdef SIMDJSON_THREADS_ENABLED
  120|  44.0k|  worker.reset();
  121|  44.0k|#endif
  122|  44.0k|}
_ZN8simdjson3dom13stage1_workerD2Ev:
   21|  26.4k|inline stage1_worker::~stage1_worker() {
   22|       |  // The thread may never outlive the stage1_worker instance
   23|       |  // and will always be stopped/joined before the stage1_worker
   24|       |  // instance is gone.
   25|  26.4k|  stop_thread();
   26|  26.4k|}
_ZN8simdjson3dom13stage1_worker11stop_threadEv:
   58|  26.4k|inline void stage1_worker::stop_thread() {
   59|  26.4k|  std::unique_lock<std::mutex> lock(locking_mutex);
   60|       |  // We have to make sure that all locks can be released.
   61|  26.4k|  can_work = false;
   62|  26.4k|  has_work = false;
   63|  26.4k|  cond_var.notify_all();
   64|  26.4k|  lock.unlock();
   65|  26.4k|  if(thread.joinable()) {
  ------------------
  |  Branch (65:6): [True: 1.44k, False: 25.0k]
  ------------------
   66|  1.44k|    thread.join();
   67|  1.44k|  }
   68|  26.4k|}

_ZN8simdjson3dom13stage1_workerC2Ev:
   20|  26.4k|  stage1_worker() noexcept = default;
_ZN8simdjson3dom15document_streamC2EOS1_:
   85|  17.6k|  simdjson_inline document_stream(document_stream &&other) noexcept = default;
_ZN8simdjson3dom15document_streamaSEOS1_:
   87|  17.6k|  simdjson_inline document_stream &operator=(document_stream &&other) noexcept = default;

_ZN8simdjson15simdjson_resultINS_3dom7elementEEC2ENS_10error_codeE:
   20|  12.2k|    : internal::simdjson_result_base<dom::element>(error) {}
_ZN8simdjson3dom7elementC2Ev:
  185|  12.2k|simdjson_inline element::element() noexcept : tape{} {}
_ZN8simdjson3dom7elementC2ERKNS_8internal8tape_refE:
  186|   125k|simdjson_inline element::element(const internal::tape_ref &_tape) noexcept : tape{_tape} { }
_ZN8simdjson15simdjson_resultINS_3dom7elementEEC2EOS2_:
   18|   125k|    : internal::simdjson_result_base<dom::element>(std::forward<dom::element>(value)) {}
_ZNK8simdjson15simdjson_resultINS_3dom7elementEE7is_boolEv:
   99|   137k|simdjson_inline bool simdjson_result<dom::element>::is_bool() const noexcept {
  100|   137k|  return !error() && first.is_bool();
  ------------------
  |  Branch (100:10): [True: 125k, False: 12.2k]
  |  Branch (100:22): [True: 2.96k, False: 122k]
  ------------------
  101|   137k|}
_ZNK8simdjson3dom7element7is_boolEv:
  338|   125k|inline bool element::is_bool() const noexcept { return is<bool>(); }
_ZNK8simdjson3dom7element2isIbEEbv:
  318|   125k|simdjson_inline bool element::is() const noexcept {
  319|   125k|  auto result = get<T>();
  320|   125k|  return !result.error();
  321|   125k|}
_ZNK8simdjson3dom7element3getIbEENS_15simdjson_resultIT_EEv:
  330|   125k|template<> inline simdjson_result<bool> element::get<bool>() const noexcept { return get_bool(); }
_ZNK8simdjson3dom7element8get_boolEv:
  194|   125k|inline simdjson_result<bool> element::get_bool() const noexcept {
  195|   125k|  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
  ------------------
  |  |  329|   125k|#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
  |  |  ------------------
  |  |  |  Branch (329:57): [Folded - Ignored]
  |  |  ------------------
  ------------------
  196|   125k|  if(tape.is_true()) {
  ------------------
  |  Branch (196:6): [True: 1.92k, False: 123k]
  ------------------
  197|  1.92k|    return true;
  198|   123k|  } else if(tape.is_false()) {
  ------------------
  |  Branch (198:13): [True: 1.04k, False: 122k]
  ------------------
  199|  1.04k|    return false;
  200|  1.04k|  }
  201|   122k|  return INCORRECT_TYPE;
  202|   125k|}

_ZN8simdjson3dom6parserC2Em:
   20|  35.2k|    loaded_bytes(nullptr) {
   21|  35.2k|}
_ZN8simdjson3dom6parser10parse_manyERKNS_13padded_stringEm:
  165|  17.6k|inline simdjson_result<document_stream> parser::parse_many(const padded_string &s, size_t batch_size) noexcept {
  166|  17.6k|  return parse_many(s.data(), s.length(), batch_size);
  167|  17.6k|}
_ZN8simdjson3dom6parser10parse_manyEPKcmm:
  159|  17.6k|inline simdjson_result<document_stream> parser::parse_many(const char *buf, size_t len, size_t batch_size) noexcept {
  160|  17.6k|  return parse_many(reinterpret_cast<const uint8_t *>(buf), len, batch_size);
  161|  17.6k|}
_ZN8simdjson3dom6parser10parse_manyEPKhmm:
  155|  17.6k|inline simdjson_result<document_stream> parser::parse_many(const uint8_t *buf, size_t len, size_t batch_size) noexcept {
  156|  17.6k|  if(batch_size < MINIMAL_BATCH_SIZE) { batch_size = MINIMAL_BATCH_SIZE; }
  ------------------
  |  Branch (156:6): [True: 1.15k, False: 16.4k]
  ------------------
  157|  17.6k|  return document_stream(*this, buf, len, batch_size);
  158|  17.6k|}
_ZN8simdjson3dom6parserC2EOS1_:
   22|  91.7k|simdjson_inline parser::parser(parser &&other) noexcept = default;
_ZN8simdjson3dom6parser15ensure_capacityEm:
  201|  19.0k|inline error_code parser::ensure_capacity(size_t desired_capacity) noexcept {
  202|  19.0k|  return ensure_capacity(doc, desired_capacity);
  203|  19.0k|}
_ZN8simdjson3dom6parser15ensure_capacityERNS0_8documentEm:
  206|  19.0k|inline error_code parser::ensure_capacity(document& target_document, size_t desired_capacity) noexcept {
  207|       |  // 1. It is wasteful to allocate a document and a parser for documents spanning less than MINIMAL_DOCUMENT_CAPACITY bytes.
  208|       |  // 2. If we allow desired_capacity = 0 then it is possible to exit this function with implementation == nullptr.
  209|  19.0k|  if(desired_capacity < MINIMAL_DOCUMENT_CAPACITY) { desired_capacity = MINIMAL_DOCUMENT_CAPACITY; }
  ------------------
  |  Branch (209:6): [True: 0, False: 19.0k]
  ------------------
  210|       |  // If we don't have enough capacity, (try to) automatically bump it.
  211|       |  // If the document needs allocation, do it too.
  212|       |  // Both in one if statement to minimize unlikely branching.
  213|       |  //
  214|       |  // Note: we must make sure that this function is called if capacity() == 0. We do so because we
  215|       |  // ensure that desired_capacity > 0.
  216|  19.0k|  if (simdjson_unlikely(capacity() < desired_capacity || target_document.capacity() < desired_capacity)) {
  ------------------
  |  |  120|  27.8k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 10.2k, False: 8.81k]
  |  |  |  Branch (120:52): [True: 10.2k, False: 8.81k]
  |  |  |  Branch (120:52): [True: 0, False: 8.81k]
  |  |  ------------------
  ------------------
  217|  10.2k|    if (desired_capacity > max_capacity()) {
  ------------------
  |  Branch (217:9): [True: 0, False: 10.2k]
  ------------------
  218|      0|      return error = CAPACITY;
  219|      0|    }
  220|  10.2k|    error_code err1 = target_document.capacity() < desired_capacity ? target_document.allocate(desired_capacity) : SUCCESS;
  ------------------
  |  Branch (220:23): [True: 10.2k, False: 0]
  ------------------
  221|  10.2k|    error_code err2 = capacity() < desired_capacity ? allocate(desired_capacity, max_depth()) : SUCCESS;
  ------------------
  |  Branch (221:23): [True: 10.2k, False: 0]
  ------------------
  222|  10.2k|    if(err1 != SUCCESS) { return error = err1; }
  ------------------
  |  Branch (222:8): [True: 0, False: 10.2k]
  ------------------
  223|  10.2k|    if(err2 != SUCCESS) { return error = err2; }
  ------------------
  |  Branch (223:8): [True: 0, False: 10.2k]
  ------------------
  224|  10.2k|  }
  225|  19.0k|  return SUCCESS;
  226|  19.0k|}
_ZNK8simdjson3dom6parser8capacityEv:
  169|  29.3k|simdjson_inline size_t parser::capacity() const noexcept {
  170|  29.3k|  return implementation ? implementation->capacity() : 0;
  ------------------
  |  Branch (170:10): [True: 8.81k, False: 20.5k]
  ------------------
  171|  29.3k|}
_ZNK8simdjson3dom6parser12max_capacityEv:
  172|  10.2k|simdjson_inline size_t parser::max_capacity() const noexcept {
  173|  10.2k|  return _max_capacity;
  174|  10.2k|}
_ZN8simdjson3dom6parser8allocateEmm:
  180|  10.2k|inline error_code parser::allocate(size_t capacity, size_t max_depth) noexcept {
  181|       |  //
  182|       |  // Reallocate implementation if needed
  183|       |  //
  184|  10.2k|  error_code err;
  185|  10.2k|  if (implementation) {
  ------------------
  |  Branch (185:7): [True: 0, False: 10.2k]
  ------------------
  186|      0|    err = implementation->allocate(capacity, max_depth);
  187|  10.2k|  } else {
  188|  10.2k|    err = simdjson::get_active_implementation()->create_dom_parser_implementation(capacity, max_depth, implementation);
  189|  10.2k|  }
  190|  10.2k|  if (err) { return err; }
  ------------------
  |  Branch (190:7): [True: 0, False: 10.2k]
  ------------------
  191|  10.2k|  return SUCCESS;
  192|  10.2k|}
_ZNK8simdjson3dom6parser9max_depthEv:
  175|  10.2k|simdjson_inline size_t parser::max_depth() const noexcept {
  176|  10.2k|  return implementation ? implementation->max_depth() : DEFAULT_MAX_DEPTH;
  ------------------
  |  Branch (176:10): [True: 0, False: 10.2k]
  ------------------
  177|  10.2k|}
_ZN8simdjson3dom6parseraSEOS1_:
   23|   165k|simdjson_inline parser &parser::operator=(parser &&other) noexcept = default;

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

_ZN8simdjson8internal20simdjson_result_baseINS_3dom15document_streamEEC2EOS3_:
  110|  17.6k|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom15document_streamEEC2EOS3_NS_10error_codeE:
  104|  17.6k|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom7elementEEC2ENS_10error_codeE:
  107|  12.2k|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom7elementEEC2EOS3_NS_10error_codeE:
  104|   137k|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson8internal20simdjson_result_baseINS_3dom7elementEEC2EOS3_:
  110|   125k|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZNK8simdjson8internal20simdjson_result_baseINS_3dom7elementEE5errorEv:
   62|   137k|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   63|   137k|  return this->second;
   64|   137k|}
_ZN8simdjson15simdjson_resultIbEC2EOb:
  178|  2.96k|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseIbEC2EOb:
  110|  2.96k|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8internal20simdjson_result_baseIbEC2EObNS_10error_codeE:
  104|   125k|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultIbEC2ENS_10error_codeE:
  175|   122k|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseIbEC2ENS_10error_codeE:
  107|   122k|    : simdjson_result_base(T{}, error) {}
_ZNK8simdjson15simdjson_resultIbE5errorEv:
  132|   125k|simdjson_inline error_code simdjson_result<T>::error() const noexcept {
  133|   125k|  return internal::simdjson_result_base<T>::error();
  134|   125k|}
_ZNK8simdjson8internal20simdjson_result_baseIbE5errorEv:
   62|   125k|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   63|   125k|  return this->second;
   64|   125k|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom15document_streamEE3getERS3_:
   55|  17.6k|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   56|  17.6k|  error_code error;
   57|  17.6k|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   58|  17.6k|  return error;
   59|  17.6k|}
_ZNO8simdjson8internal20simdjson_result_baseINS_3dom15document_streamEE3tieERS3_RNS_10error_codeE:
   47|  17.6k|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   48|  17.6k|  error = this->second;
   49|  17.6k|  if (!error) {
  ------------------
  |  Branch (49:7): [True: 17.6k, False: 0]
  ------------------
   50|  17.6k|    value = std::forward<simdjson_result_base<T>>(*this).first;
   51|  17.6k|  }
   52|  17.6k|}

_ZN8simdjson8fallback14implementationC2Ev:
   23|      1|  ) {}

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

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

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

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

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

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

_ZN8simdjson7haswell14implementationC2Ev:
   21|      1|  ) {}

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

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

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

_ZN8simdjson7icelake14implementationC2Ev:
   21|      1|  ) {}

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

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

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

_ZN8simdjson8internal8tape_refC2Ev:
   13|  12.2k|simdjson_inline tape_ref::tape_ref() noexcept : doc{nullptr}, json_index{0} {}
_ZN8simdjson8internal8tape_refC2EPKNS_3dom8documentEm:
   14|   125k|simdjson_inline tape_ref::tape_ref(const dom::document *_doc, size_t _json_index) noexcept : doc{_doc}, json_index{_json_index} {}
_ZNK8simdjson8internal8tape_ref7is_trueEv:
   43|   125k|simdjson_inline bool tape_ref::is_true() const noexcept {
   44|   125k|  constexpr uint64_t tape_true = uint64_t(tape_type::TRUE_VALUE)<<56;
   45|   125k|  return doc->tape[json_index] == tape_true;
   46|   125k|}
_ZNK8simdjson8internal8tape_ref8is_falseEv:
   39|   123k|simdjson_inline bool tape_ref::is_false() const noexcept {
   40|   123k|  constexpr uint64_t tape_false = uint64_t(tape_type::FALSE_VALUE)<<56;
   41|   123k|  return doc->tape[json_index] == tape_false;
   42|   123k|}

_ZN8simdjson13padded_stringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   66|  8.81k|    : viable_size(sv_.size()), data_ptr(internal::allocate_padded_buffer(sv_.size())) {
   67|  8.81k|  if(simdjson_unlikely(!data_ptr)) {
  ------------------
  |  |  120|  8.81k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 3, False: 8.81k]
  |  |  ------------------
  ------------------
   68|       |    //allocation failed or zero size
   69|      3|    viable_size = 0;
   70|      3|    return;
   71|      3|  }
   72|  8.81k|  if (sv_.size()) {
  ------------------
  |  Branch (72:7): [True: 8.79k, False: 22]
  ------------------
   73|  8.79k|    std::memcpy(data_ptr, sv_.data(), sv_.size());
   74|  8.79k|  }
   75|  8.81k|}
_ZN8simdjson8internal22allocate_padded_bufferEm:
   21|  8.81k|inline char *allocate_padded_buffer(size_t length) noexcept {
   22|  8.81k|  const size_t totalpaddedlength = length + SIMDJSON_PADDING;
   23|  8.81k|  if(totalpaddedlength<length) {
  ------------------
  |  Branch (23:6): [True: 0, False: 8.81k]
  ------------------
   24|       |    // overflow
   25|      0|    return nullptr;
   26|      0|  }
   27|  8.81k|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   28|       |  // avoid getting out of memory
   29|  8.81k|  if (totalpaddedlength>(1UL<<20)) {
  ------------------
  |  Branch (29:7): [True: 3, False: 8.81k]
  ------------------
   30|      3|    return nullptr;
   31|      3|  }
   32|  8.81k|#endif
   33|       |
   34|  8.81k|  char *padded_buffer = new (std::nothrow) char[totalpaddedlength];
   35|  8.81k|  if (padded_buffer == nullptr) {
  ------------------
  |  Branch (35:7): [True: 0, False: 8.81k]
  ------------------
   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|  8.81k|  std::memset(padded_buffer + length, 0, totalpaddedlength - length);
   41|  8.81k|  return padded_buffer;
   42|  8.81k|} // allocate_padded_buffer()
_ZNK8simdjson13padded_string4dataEv:
  107|  17.6k|inline const char *padded_string::data() const noexcept { return data_ptr; }
_ZNK8simdjson13padded_string6lengthEv:
  105|  17.6k|inline size_t padded_string::length() const noexcept { return viable_size; }
_ZN8simdjson13padded_stringD2Ev:
   99|  8.81k|inline padded_string::~padded_string() noexcept {
  100|  8.81k|  delete[] data_ptr;
  101|  8.81k|}

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

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

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

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_124find_next_document_indexERNS0_25dom_parser_implementationE:
   30|  48.6k|simdjson_inline uint32_t find_next_document_index(dom_parser_implementation &parser) {
   31|       |  // Variant: do not count separately, just figure out depth
   32|  48.6k|  if(parser.n_structural_indexes == 0) { return 0; }
  ------------------
  |  Branch (32:6): [True: 78, False: 48.6k]
  ------------------
   33|  48.6k|  auto arr_cnt = 0;
   34|  48.6k|  auto obj_cnt = 0;
   35|   255k|  for (auto i = parser.n_structural_indexes - 1; i > 0; i--) {
  ------------------
  |  Branch (35:50): [True: 239k, False: 15.8k]
  ------------------
   36|   239k|    auto idxb = parser.structural_indexes[i];
   37|   239k|    switch (parser.buf[idxb]) {
  ------------------
  |  Branch (37:13): [True: 91.1k, False: 148k]
  ------------------
   38|  22.6k|    case ':':
  ------------------
  |  Branch (38:5): [True: 22.6k, False: 216k]
  ------------------
   39|  76.2k|    case ',':
  ------------------
  |  Branch (39:5): [True: 53.6k, False: 185k]
  ------------------
   40|  76.2k|      continue;
   41|  11.3k|    case '}':
  ------------------
  |  Branch (41:5): [True: 11.3k, False: 228k]
  ------------------
   42|  11.3k|      obj_cnt--;
   43|  11.3k|      continue;
   44|  17.1k|    case ']':
  ------------------
  |  Branch (44:5): [True: 17.1k, False: 222k]
  ------------------
   45|  17.1k|      arr_cnt--;
   46|  17.1k|      continue;
   47|  15.4k|    case '{':
  ------------------
  |  Branch (47:5): [True: 15.4k, False: 224k]
  ------------------
   48|  15.4k|      obj_cnt++;
   49|  15.4k|      break;
   50|  28.1k|    case '[':
  ------------------
  |  Branch (50:5): [True: 28.1k, False: 211k]
  ------------------
   51|  28.1k|      arr_cnt++;
   52|  28.1k|      break;
   53|   239k|    }
   54|   134k|    auto idxa = parser.structural_indexes[i - 1];
   55|   134k|    switch (parser.buf[idxa]) {
  ------------------
  |  Branch (55:13): [True: 32.7k, False: 102k]
  ------------------
   56|  14.3k|    case '{':
  ------------------
  |  Branch (56:5): [True: 14.3k, False: 120k]
  ------------------
   57|  38.3k|    case '[':
  ------------------
  |  Branch (57:5): [True: 24.0k, False: 110k]
  ------------------
   58|  53.7k|    case ':':
  ------------------
  |  Branch (58:5): [True: 15.3k, False: 119k]
  ------------------
   59|   102k|    case ',':
  ------------------
  |  Branch (59:5): [True: 48.2k, False: 86.4k]
  ------------------
   60|   102k|      continue;
   61|   134k|    }
   62|       |    // Last document is complete, so the next document will appear after!
   63|  32.7k|    if (!arr_cnt && !obj_cnt) {
  ------------------
  |  Branch (63:9): [True: 21.6k, False: 11.1k]
  |  Branch (63:21): [True: 12.7k, False: 8.89k]
  ------------------
   64|  12.7k|      return parser.n_structural_indexes;
   65|  12.7k|    }
   66|       |    // Last document is incomplete; mark the document at i + 1 as the next one
   67|  19.9k|    return i;
   68|  32.7k|  }
   69|       |  // If we made it to the end, we want to finish counting to see if we have a full document.
   70|  15.8k|  switch (parser.buf[parser.structural_indexes[0]]) {
  ------------------
  |  Branch (70:11): [True: 13.2k, False: 2.58k]
  ------------------
   71|     50|    case '}':
  ------------------
  |  Branch (71:5): [True: 50, False: 15.8k]
  ------------------
   72|     50|      obj_cnt--;
   73|     50|      break;
   74|     64|    case ']':
  ------------------
  |  Branch (74:5): [True: 64, False: 15.8k]
  ------------------
   75|     64|      arr_cnt--;
   76|     64|      break;
   77|  1.36k|    case '{':
  ------------------
  |  Branch (77:5): [True: 1.36k, False: 14.5k]
  ------------------
   78|  1.36k|      obj_cnt++;
   79|  1.36k|      break;
   80|  1.11k|    case '[':
  ------------------
  |  Branch (80:5): [True: 1.11k, False: 14.7k]
  ------------------
   81|  1.11k|      arr_cnt++;
   82|  1.11k|      break;
   83|  15.8k|  }
   84|  15.8k|  if (!arr_cnt && !obj_cnt) {
  ------------------
  |  Branch (84:7): [True: 15.3k, False: 535]
  |  Branch (84:19): [True: 15.0k, False: 288]
  ------------------
   85|       |    // We have a complete document.
   86|  15.0k|    return parser.n_structural_indexes;
   87|  15.0k|  }
   88|    823|  return 0;
   89|  15.8k|}

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

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

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

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

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage213json_iteratorC2ERNS0_25dom_parser_implementationEm:
  240|   171k|    dom_parser{_dom_parser} {
  241|   171k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator6at_eofEv:
  253|   171k|simdjson_inline bool json_iterator::at_eof() const noexcept {
  254|   171k|  return next_structural == &dom_parser.structural_indexes[dom_parser.n_structural_indexes];
  255|   171k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator15log_start_valueEPKc:
  267|   185k|simdjson_inline void json_iterator::log_start_value(const char *type) const noexcept {
  268|   185k|  logger::log_line(*this, "+", type, "");
  269|   185k|  if (logger::LOG_ENABLED) { logger::log_depth++; }
  ------------------
  |  Branch (269:7): [Folded - Ignored]
  ------------------
  270|   185k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage213json_iterator7advanceEv:
  246|   439k|simdjson_inline const uint8_t *json_iterator::advance() noexcept {
  247|   439k|  return &buf[*(next_structural++)];
  248|   439k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator9log_valueEPKc:
  263|   242k|simdjson_inline void json_iterator::log_value(const char *type) const noexcept {
  264|   242k|  logger::log_line(*this, "", type, "");
  265|   242k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator4peekEv:
  243|  56.2k|simdjson_inline const uint8_t *json_iterator::peek() const noexcept {
  244|  56.2k|  return &buf[*(next_structural)];
  245|  56.2k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage213json_iterator20visit_root_primitiveINS2_12tape_builderEEENS_10error_codeERT_PKh:
  282|  97.4k|simdjson_warn_unused simdjson_inline error_code json_iterator::visit_root_primitive(V &visitor, const uint8_t *value) noexcept {
  283|  97.4k|  switch (*value) {
  284|  57.7k|    case '"': return visitor.visit_root_string(*this, value);
  ------------------
  |  Branch (284:5): [True: 57.7k, False: 39.6k]
  ------------------
  285|  2.03k|    case 't': return visitor.visit_root_true_atom(*this, value);
  ------------------
  |  Branch (285:5): [True: 2.03k, False: 95.4k]
  ------------------
  286|  1.24k|    case 'f': return visitor.visit_root_false_atom(*this, value);
  ------------------
  |  Branch (286:5): [True: 1.24k, False: 96.2k]
  ------------------
  287|  1.73k|    case 'n': return visitor.visit_root_null_atom(*this, value);
  ------------------
  |  Branch (287:5): [True: 1.73k, False: 95.7k]
  ------------------
  288|  1.38k|    case '-':
  ------------------
  |  Branch (288:5): [True: 1.38k, False: 96.0k]
  ------------------
  289|  13.6k|    case '0': case '1': case '2': case '3': case '4':
  ------------------
  |  Branch (289:5): [True: 2.77k, False: 94.6k]
  |  Branch (289:15): [True: 3.21k, False: 94.2k]
  |  Branch (289:25): [True: 1.47k, False: 95.9k]
  |  Branch (289:35): [True: 2.15k, False: 95.2k]
  |  Branch (289:45): [True: 2.66k, False: 94.7k]
  ------------------
  290|  34.1k|    case '5': case '6': case '7': case '8': case '9':
  ------------------
  |  Branch (290:5): [True: 1.74k, False: 95.7k]
  |  Branch (290:15): [True: 3.68k, False: 93.7k]
  |  Branch (290:25): [True: 744, False: 96.7k]
  |  Branch (290:35): [True: 10.1k, False: 87.3k]
  |  Branch (290:45): [True: 4.14k, False: 93.3k]
  ------------------
  291|  34.1k|      return visitor.visit_root_number(*this, value);
  292|    542|    default:
  ------------------
  |  Branch (292:5): [True: 542, False: 96.9k]
  ------------------
  293|    542|      log_error("Document starts with a non-value character");
  294|    542|      return TAPE_ERROR;
  295|  97.4k|  }
  296|  97.4k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator13remaining_lenEv:
  249|   107k|simdjson_inline size_t json_iterator::remaining_len() const noexcept {
  250|   107k|  return dom_parser.len - *(next_structural-1);
  251|   107k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator9log_errorEPKc:
  277|  5.91k|simdjson_inline void json_iterator::log_error(const char *error) const noexcept {
  278|  5.91k|  logger::log_line(*this, "", "ERROR", error);
  279|  5.91k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage213json_iterator15visit_primitiveINS2_12tape_builderEEENS_10error_codeERT_PKh:
  298|   103k|simdjson_warn_unused simdjson_inline error_code json_iterator::visit_primitive(V &visitor, const uint8_t *value) noexcept {
  299|   103k|  switch (*value) {
  300|  2.99k|    case '"': return visitor.visit_string(*this, value);
  ------------------
  |  Branch (300:5): [True: 2.99k, False: 100k]
  ------------------
  301|    554|    case 't': return visitor.visit_true_atom(*this, value);
  ------------------
  |  Branch (301:5): [True: 554, False: 102k]
  ------------------
  302|    596|    case 'f': return visitor.visit_false_atom(*this, value);
  ------------------
  |  Branch (302:5): [True: 596, False: 102k]
  ------------------
  303|    544|    case 'n': return visitor.visit_null_atom(*this, value);
  ------------------
  |  Branch (303:5): [True: 544, False: 102k]
  ------------------
  304|  8.27k|    case '-':
  ------------------
  |  Branch (304:5): [True: 8.27k, False: 94.8k]
  ------------------
  305|  67.4k|    case '0': case '1': case '2': case '3': case '4':
  ------------------
  |  Branch (305:5): [True: 9.39k, False: 93.6k]
  |  Branch (305:15): [True: 10.8k, False: 92.2k]
  |  Branch (305:25): [True: 12.3k, False: 90.7k]
  |  Branch (305:35): [True: 23.1k, False: 79.9k]
  |  Branch (305:45): [True: 3.34k, False: 99.7k]
  ------------------
  306|  98.2k|    case '5': case '6': case '7': case '8': case '9':
  ------------------
  |  Branch (306:5): [True: 11.0k, False: 92.0k]
  |  Branch (306:15): [True: 3.65k, False: 99.4k]
  |  Branch (306:25): [True: 4.54k, False: 98.5k]
  |  Branch (306:35): [True: 6.75k, False: 96.3k]
  |  Branch (306:45): [True: 4.80k, False: 98.2k]
  ------------------
  307|  98.2k|      return visitor.visit_number(*this, value);
  308|    144|    default:
  ------------------
  |  Branch (308:5): [True: 144, False: 102k]
  ------------------
  309|    144|      log_error("Non-value found when value was expected!");
  310|    144|      return TAPE_ERROR;
  311|   103k|  }
  312|   103k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage213json_iterator13log_end_valueEPKc:
  272|   153k|simdjson_inline void json_iterator::log_end_value(const char *type) const noexcept {
  273|   153k|  if (logger::LOG_ENABLED) { logger::log_depth--; }
  ------------------
  |  Branch (273:7): [Folded - Ignored]
  ------------------
  274|   153k|  logger::log_line(*this, "-", type, "");
  275|   153k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage213json_iterator13walk_documentILb1ENS2_12tape_builderEEENS_10error_codeERT0_:
  112|   171k|simdjson_warn_unused simdjson_inline error_code json_iterator::walk_document(V &visitor) noexcept {
  113|   171k|  logger::log_start();
  114|       |
  115|       |  //
  116|       |  // Start the document
  117|       |  //
  118|   171k|  if (at_eof()) { return EMPTY; }
  ------------------
  |  Branch (118:7): [True: 36.3k, False: 135k]
  ------------------
  119|   135k|  log_start_value("document");
  120|   135k|  SIMDJSON_TRY( visitor.visit_document_start(*this) );
  ------------------
  |  |  279|   135k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 135k]
  |  |  ------------------
  ------------------
  121|       |
  122|       |  //
  123|       |  // Read first value
  124|       |  //
  125|   135k|  {
  126|   135k|    auto value = advance();
  127|       |
  128|       |    // Make sure the outer object or array is closed before continuing; otherwise, there are ways we
  129|       |    // could get into memory corruption. See https://github.com/simdjson/simdjson/issues/906
  130|   135k|    if (!STREAMING) {
  ------------------
  |  Branch (130:9): [Folded - Ignored]
  ------------------
  131|      0|      switch (*value) {
  ------------------
  |  Branch (131:15): [True: 0, False: 0]
  ------------------
  132|      0|        case '{': if (last_structural() != '}') { log_value("starting brace unmatched"); return TAPE_ERROR; }; break;
  ------------------
  |  Branch (132:9): [True: 0, False: 0]
  |  Branch (132:23): [True: 0, False: 0]
  ------------------
  133|      0|        case '[': if (last_structural() != ']') { log_value("starting bracket unmatched"); return TAPE_ERROR; }; break;
  ------------------
  |  Branch (133:9): [True: 0, False: 0]
  |  Branch (133:23): [True: 0, False: 0]
  ------------------
  134|      0|      }
  135|      0|    }
  136|       |
  137|   135k|    switch (*value) {
  138|  20.7k|      case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin;
  ------------------
  |  |  279|    268|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 268]
  |  |  ------------------
  ------------------
  |  Branch (138:7): [True: 20.7k, False: 114k]
  |  Branch (138:21): [True: 268, False: 20.4k]
  ------------------
  139|  20.4k|      case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin;
  ------------------
  |  |  279|  2.36k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 2.36k]
  |  |  ------------------
  ------------------
  |  Branch (139:7): [True: 16.9k, False: 118k]
  |  Branch (139:21): [True: 2.36k, False: 14.6k]
  ------------------
  140|  97.4k|      default: SIMDJSON_TRY( visitor.visit_root_primitive(*this, value) ); break;
  ------------------
  |  |  279|  97.4k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 2.44k, False: 95.0k]
  |  |  ------------------
  ------------------
  |  Branch (140:7): [True: 97.4k, False: 37.7k]
  ------------------
  141|   135k|    }
  142|   135k|  }
  143|  97.6k|  goto document_end;
  144|       |
  145|       |//
  146|       |// Object parser states
  147|       |//
  148|  97.6k|object_begin:
  149|  21.3k|  log_start_value("object");
  150|  21.3k|  depth++;
  151|  21.3k|  if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; }
  ------------------
  |  Branch (151:7): [True: 0, False: 21.3k]
  ------------------
  152|  21.3k|  dom_parser.is_array[depth] = false;
  153|  21.3k|  SIMDJSON_TRY( visitor.visit_object_start(*this) );
  ------------------
  |  |  279|  21.3k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 21.3k]
  |  |  ------------------
  ------------------
  154|       |
  155|  21.3k|  {
  156|  21.3k|    auto key = advance();
  157|  21.3k|    if (*key != '"') { log_error("Object does not start with a key"); return TAPE_ERROR; }
  ------------------
  |  Branch (157:9): [True: 138, False: 21.2k]
  ------------------
  158|  21.2k|    SIMDJSON_TRY( visitor.increment_count(*this) );
  ------------------
  |  |  279|  21.2k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 21.2k]
  |  |  ------------------
  ------------------
  159|  21.2k|    SIMDJSON_TRY( visitor.visit_key(*this, key) );
  ------------------
  |  |  279|  21.2k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 152, False: 21.0k]
  |  |  ------------------
  ------------------
  160|  21.0k|  }
  161|       |
  162|  36.3k|object_field:
  163|  36.3k|  if (simdjson_unlikely( *advance() != ':' )) { log_error("Missing colon after key in object"); return TAPE_ERROR; }
  ------------------
  |  |  120|  36.3k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 854, False: 35.4k]
  |  |  ------------------
  ------------------
  164|  35.4k|  {
  165|  35.4k|    auto value = advance();
  166|  35.4k|    switch (*value) {
  167|    660|      case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin;
  ------------------
  |  |  279|    192|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 192]
  |  |  ------------------
  ------------------
  |  Branch (167:7): [True: 660, False: 34.8k]
  |  Branch (167:21): [True: 192, False: 468]
  ------------------
  168|  2.68k|      case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin;
  ------------------
  |  |  279|  2.28k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 2.28k]
  |  |  ------------------
  ------------------
  |  Branch (168:7): [True: 2.68k, False: 32.7k]
  |  Branch (168:21): [True: 2.28k, False: 404]
  ------------------
  169|  32.1k|      default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break;
  ------------------
  |  |  279|  32.1k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 1.11k, False: 31.0k]
  |  |  ------------------
  ------------------
  |  Branch (169:7): [True: 32.1k, False: 3.34k]
  ------------------
  170|  35.4k|    }
  171|  35.4k|  }
  172|       |
  173|  33.6k|object_continue:
  174|  33.6k|  switch (*advance()) {
  175|  15.4k|    case ',':
  ------------------
  |  Branch (175:5): [True: 15.4k, False: 18.2k]
  ------------------
  176|  15.4k|      SIMDJSON_TRY( visitor.increment_count(*this) );
  ------------------
  |  |  279|  15.4k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 15.4k]
  |  |  ------------------
  ------------------
  177|  15.4k|      {
  178|  15.4k|        auto key = advance();
  179|  15.4k|        if (simdjson_unlikely( *key != '"' )) { log_error("Key string missing at beginning of field in object"); return TAPE_ERROR; }
  ------------------
  |  |  120|  15.4k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 30, False: 15.3k]
  |  |  ------------------
  ------------------
  180|  15.3k|        SIMDJSON_TRY( visitor.visit_key(*this, key) );
  ------------------
  |  |  279|  15.3k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 128, False: 15.2k]
  |  |  ------------------
  ------------------
  181|  15.2k|      }
  182|      0|      goto object_field;
  183|  16.8k|    case '}': log_end_value("object"); SIMDJSON_TRY( visitor.visit_object_end(*this) ); goto scope_end;
  ------------------
  |  |  279|  16.8k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 16.8k]
  |  |  ------------------
  ------------------
  |  Branch (183:5): [True: 16.8k, False: 16.8k]
  ------------------
  184|  1.41k|    default: log_error("No comma between object fields"); return TAPE_ERROR;
  ------------------
  |  Branch (184:5): [True: 1.41k, False: 32.2k]
  ------------------
  185|  33.6k|  }
  186|       |
  187|  28.3k|scope_end:
  188|  28.3k|  depth--;
  189|  28.3k|  if (depth == 0) { goto document_end; }
  ------------------
  |  Branch (189:7): [True: 27.5k, False: 824]
  ------------------
  190|    824|  if (dom_parser.is_array[depth]) { goto array_continue; }
  ------------------
  |  Branch (190:7): [True: 612, False: 212]
  ------------------
  191|    212|  goto object_continue;
  192|       |
  193|       |//
  194|       |// Array parser states
  195|       |//
  196|  29.2k|array_begin:
  197|  29.2k|  log_start_value("array");
  198|  29.2k|  depth++;
  199|  29.2k|  if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; }
  ------------------
  |  Branch (199:7): [True: 0, False: 29.2k]
  ------------------
  200|  29.2k|  dom_parser.is_array[depth] = true;
  201|  29.2k|  SIMDJSON_TRY( visitor.visit_array_start(*this) );
  ------------------
  |  |  279|  29.2k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 29.2k]
  |  |  ------------------
  ------------------
  202|  29.2k|  SIMDJSON_TRY( visitor.increment_count(*this) );
  ------------------
  |  |  279|  29.2k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 29.2k]
  |  |  ------------------
  ------------------
  203|       |
  204|  86.1k|array_value:
  205|  86.1k|  {
  206|  86.1k|    auto value = advance();
  207|  86.1k|    switch (*value) {
  208|    590|      case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin;
  ------------------
  |  |  279|    190|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 190]
  |  |  ------------------
  ------------------
  |  Branch (208:7): [True: 590, False: 85.5k]
  |  Branch (208:21): [True: 190, False: 400]
  ------------------
  209|  14.5k|      case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin;
  ------------------
  |  |  279|    280|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 280]
  |  |  ------------------
  ------------------
  |  Branch (209:7): [True: 14.5k, False: 71.5k]
  |  Branch (209:21): [True: 280, False: 14.2k]
  ------------------
  210|  70.9k|      default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break;
  ------------------
  |  |  279|  70.9k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 1.63k, False: 69.3k]
  |  |  ------------------
  ------------------
  |  Branch (210:7): [True: 70.9k, False: 15.1k]
  ------------------
  211|  86.1k|    }
  212|  86.1k|  }
  213|       |
  214|  70.4k|array_continue:
  215|  70.4k|  switch (*advance()) {
  216|  56.8k|    case ',': SIMDJSON_TRY( visitor.increment_count(*this) ); goto array_value;
  ------------------
  |  |  279|  56.8k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 56.8k]
  |  |  ------------------
  ------------------
  |  Branch (216:5): [True: 56.8k, False: 13.6k]
  ------------------
  217|  11.5k|    case ']': log_end_value("array"); SIMDJSON_TRY( visitor.visit_array_end(*this) ); goto scope_end;
  ------------------
  |  |  279|  11.5k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 11.5k]
  |  |  ------------------
  ------------------
  |  Branch (217:5): [True: 11.5k, False: 58.8k]
  ------------------
  218|  2.07k|    default: log_error("Missing comma between array values"); return TAPE_ERROR;
  ------------------
  |  Branch (218:5): [True: 2.07k, False: 68.3k]
  ------------------
  219|  70.4k|  }
  220|       |
  221|   125k|document_end:
  222|   125k|  log_end_value("document");
  223|   125k|  SIMDJSON_TRY( visitor.visit_document_end(*this) );
  ------------------
  |  |  279|   125k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (279:54): [True: 0, False: 125k]
  |  |  ------------------
  ------------------
  224|       |
  225|   125k|  dom_parser.next_structural_index = uint32_t(next_structural - &dom_parser.structural_indexes[0]);
  226|       |
  227|       |  // If we didn't make it to the end, it's an error
  228|   125k|  if ( !STREAMING && dom_parser.next_structural_index != dom_parser.n_structural_indexes ) {
  ------------------
  |  Branch (228:8): [Folded - Ignored]
  |  Branch (228:22): [True: 0, False: 0]
  ------------------
  229|      0|    log_error("More than one JSON value at the root of the document, or extra characters at the end of the JSON!");
  230|      0|    return TAPE_ERROR;
  231|      0|  }
  232|       |
  233|   125k|  return SUCCESS;
  234|       |
  235|   125k|} // walk_document()

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

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

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

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

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

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

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

