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

LLVMFuzzerTestOneInput:
    7|  5.07k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
    8|  5.07k|  FuzzData fd(Data, Size);
    9|  5.07k|  const int action = fd.getInt<0, 12>();
   10|       |
   11|       |  // split the remainder of the document into strings
   12|  5.07k|  auto strings = fd.splitIntoStrings();
   13|  5.07k|  while (strings.size() < 1) {
  ------------------
  |  Branch (13:10): [True: 2, False: 5.07k]
  ------------------
   14|      2|    strings.emplace_back();
   15|      2|  }
   16|  5.07k|#if SIMDJSON_EXCEPTIONS
   17|  5.07k|  try {
   18|  5.07k|#endif
   19|  5.07k|    simdjson::ondemand::parser parser;
   20|  5.07k|    simdjson::padded_string padded(strings[0]);
   21|  5.07k|    auto doc = parser.iterate(padded);
   22|  5.07k|    if (doc.error()) {
  ------------------
  |  Branch (22:9): [True: 1.20k, False: 3.86k]
  ------------------
   23|  1.20k|      return 0;
   24|  1.20k|    }
   25|  59.5k|    for (auto item : doc) {
  ------------------
  |  Branch (25:20): [True: 59.5k, False: 3.86k]
  ------------------
   26|  59.5k|      switch (action) {
   27|  2.36k|      case 0: {
  ------------------
  |  Branch (27:7): [True: 2.36k, False: 57.2k]
  ------------------
   28|  2.36k|        simdjson_unused auto x = item.get_string();
  ------------------
  |  |   99|  2.36k|  #define simdjson_unused __attribute__((unused))
  ------------------
   29|  2.36k|      } break;
   30|    910|      case 1: {
  ------------------
  |  Branch (30:7): [True: 910, False: 58.6k]
  ------------------
   31|    910|        simdjson_unused auto x = item.get_bool();
  ------------------
  |  |   99|    910|  #define simdjson_unused __attribute__((unused))
  ------------------
   32|    910|      } break;
   33|  1.31k|      case 2: {
  ------------------
  |  Branch (33:7): [True: 1.31k, False: 58.2k]
  ------------------
   34|  1.31k|        simdjson_unused auto x = item.get_array();
  ------------------
  |  |   99|  1.31k|  #define simdjson_unused __attribute__((unused))
  ------------------
   35|  1.31k|      } break;
   36|  1.72k|      case 3: {
  ------------------
  |  Branch (36:7): [True: 1.72k, False: 57.8k]
  ------------------
   37|  1.72k|        simdjson_unused auto x = item.get_int64();
  ------------------
  |  |   99|  1.72k|  #define simdjson_unused __attribute__((unused))
  ------------------
   38|  1.72k|      } break;
   39|  37.8k|      case 4: {
  ------------------
  |  Branch (39:7): [True: 37.8k, False: 21.7k]
  ------------------
   40|  37.8k|        simdjson_unused auto x = item.get_double();
  ------------------
  |  |   99|  37.8k|  #define simdjson_unused __attribute__((unused))
  ------------------
   41|  37.8k|      } break;
   42|  1.48k|      case 5: {
  ------------------
  |  Branch (42:7): [True: 1.48k, False: 58.0k]
  ------------------
   43|  1.48k|        simdjson_unused auto x = item.get_object();
  ------------------
  |  |   99|  1.48k|  #define simdjson_unused __attribute__((unused))
  ------------------
   44|  1.48k|      } break;
   45|  2.79k|      case 6: {
  ------------------
  |  Branch (45:7): [True: 2.79k, False: 56.7k]
  ------------------
   46|  2.79k|        simdjson_unused auto x = item.get_uint64();
  ------------------
  |  |   99|  2.79k|  #define simdjson_unused __attribute__((unused))
  ------------------
   47|  2.79k|      } break;
   48|    957|      case 7: {
  ------------------
  |  Branch (48:7): [True: 957, False: 58.6k]
  ------------------
   49|    957|        simdjson_unused auto x = item.get_raw_json_string();
  ------------------
  |  |   99|    957|  #define simdjson_unused __attribute__((unused))
  ------------------
   50|    957|      } break;
   51|  4.70k|      case 8: {
  ------------------
  |  Branch (51:7): [True: 4.70k, False: 54.8k]
  ------------------
   52|  4.70k|        simdjson_unused auto x = item.is_null();
  ------------------
  |  |   99|  4.70k|  #define simdjson_unused __attribute__((unused))
  ------------------
   53|  4.70k|      } break;
   54|  2.20k|      case 9: {
  ------------------
  |  Branch (54:7): [True: 2.20k, False: 57.3k]
  ------------------
   55|  2.20k|        simdjson_unused auto x = item.begin();
  ------------------
  |  |   99|  2.20k|  #define simdjson_unused __attribute__((unused))
  ------------------
   56|  2.20k|      } break;
   57|    198|      case 10: {
  ------------------
  |  Branch (57:7): [True: 198, False: 59.3k]
  ------------------
   58|    198|        simdjson_unused auto x = item.end();
  ------------------
  |  |   99|    198|  #define simdjson_unused __attribute__((unused))
  ------------------
   59|    198|      } break;
   60|  2.60k|      case 11: {
  ------------------
  |  Branch (60:7): [True: 2.60k, False: 56.9k]
  ------------------
   61|  6.61k|        for (auto e : item) {
  ------------------
  |  Branch (61:21): [True: 6.61k, False: 2.60k]
  ------------------
   62|  6.61k|          simdjson_unused auto x = e.is_null();
  ------------------
  |  |   99|  6.61k|  #define simdjson_unused __attribute__((unused))
  ------------------
   63|  6.61k|        }
   64|  2.60k|      } break;
   65|    491|      default:;
  ------------------
  |  Branch (65:7): [True: 491, False: 59.0k]
  ------------------
   66|  59.5k|      }
   67|  59.5k|    }
   68|  3.86k|#if SIMDJSON_EXCEPTIONS
   69|  3.86k|  } catch (...) {
   70|      0|  }
   71|      0|#endif
   72|       |
   73|      0|  return 0;
   74|  5.07k|}

_ZN8simdjson15simdjson_resultIbEC2ENS_10error_codeE:
  196|  8.39k|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseIbEC2ENS_10error_codeE:
  111|  8.39k|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson8internal20simdjson_result_baseIbEC2EObNS_10error_codeE:
  108|  95.8k|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultIbEC2EOb:
  199|  87.4k|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseIbEC2EOb:
  114|  87.4k|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZNO8simdjson15simdjson_resultIbE3getERb:
  131|  19.1k|simdjson_warn_unused simdjson_inline error_code simdjson_result<T>::get(T &value) && noexcept {
  132|  19.1k|  return std::forward<internal::simdjson_result_base<T>>(*this).get(value);
  133|  19.1k|}
_ZNO8simdjson8internal20simdjson_result_baseIbE3getERb:
   59|  19.1k|simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
   60|  19.1k|  error_code error;
   61|  19.1k|  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
   62|  19.1k|  return error;
   63|  19.1k|}
_ZNO8simdjson8internal20simdjson_result_baseIbE3tieERbRNS_10error_codeE:
   51|  19.1k|simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
   52|  19.1k|  error = this->second;
   53|  19.1k|  if (!error) {
  ------------------
  |  Branch (53:7): [True: 15.1k, False: 3.93k]
  ------------------
   54|  15.1k|    value = std::forward<simdjson_result_base<T>>(*this).first;
   55|  15.1k|  }
   56|  19.1k|}
_ZN8simdjson15simdjson_resultINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEC2ENS_10error_codeE:
  196|  1.88k|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEEC2ENS_10error_codeE:
  111|  1.88k|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson8internal20simdjson_result_baseINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEEC2EOS6_NS_10error_codeE:
  108|  2.36k|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEC2EOS5_:
  199|    483|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEEC2EOS6_:
  114|    483|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZNK8simdjson15simdjson_resultIbE5errorEv:
  153|  65.3k|simdjson_inline error_code simdjson_result<T>::error() const noexcept {
  154|  65.3k|  return internal::simdjson_result_base<T>::error();
  155|  65.3k|}
_ZNK8simdjson8internal20simdjson_result_baseIbE5errorEv:
   66|  65.3k|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   67|  65.3k|  return this->second;
   68|  65.3k|}
_ZN8simdjson15simdjson_resultIlEC2ENS_10error_codeE:
  196|  1.15k|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseIlEC2ENS_10error_codeE:
  111|  1.15k|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson8internal20simdjson_result_baseIlEC2EOlNS_10error_codeE:
  108|  1.72k|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultIlEC2EOl:
  199|    566|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseIlEC2EOl:
  114|    566|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZNK8simdjson15simdjson_resultIlE5errorEv:
  153|  1.69k|simdjson_inline error_code simdjson_result<T>::error() const noexcept {
  154|  1.69k|  return internal::simdjson_result_base<T>::error();
  155|  1.69k|}
_ZNK8simdjson8internal20simdjson_result_baseIlE5errorEv:
   66|  1.69k|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   67|  1.69k|  return this->second;
   68|  1.69k|}
_ZN8simdjson15simdjson_resultIdEC2ENS_10error_codeE:
  196|  15.9k|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseIdEC2ENS_10error_codeE:
  111|  15.9k|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson8internal20simdjson_result_baseIdEC2EOdNS_10error_codeE:
  108|  37.8k|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultIdEC2EOd:
  199|  21.8k|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseIdEC2EOd:
  114|  21.8k|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZNK8simdjson15simdjson_resultIdE5errorEv:
  153|  37.7k|simdjson_inline error_code simdjson_result<T>::error() const noexcept {
  154|  37.7k|  return internal::simdjson_result_base<T>::error();
  155|  37.7k|}
_ZNK8simdjson8internal20simdjson_result_baseIdE5errorEv:
   66|  37.7k|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   67|  37.7k|  return this->second;
   68|  37.7k|}
_ZN8simdjson15simdjson_resultImEC2ENS_10error_codeE:
  196|  1.76k|    : internal::simdjson_result_base<T>(error) {}
_ZN8simdjson8internal20simdjson_result_baseImEC2ENS_10error_codeE:
  111|  1.76k|    : simdjson_result_base(T{}, error) {}
_ZN8simdjson8internal20simdjson_result_baseImEC2EOmNS_10error_codeE:
  108|  2.79k|    : std::pair<T, error_code>(std::forward<T>(value), error) {}
_ZN8simdjson15simdjson_resultImEC2EOm:
  199|  1.03k|    : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
_ZN8simdjson8internal20simdjson_result_baseImEC2EOm:
  114|  1.03k|    : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZNK8simdjson15simdjson_resultImE5errorEv:
  153|  2.76k|simdjson_inline error_code simdjson_result<T>::error() const noexcept {
  154|  2.76k|  return internal::simdjson_result_base<T>::error();
  155|  2.76k|}
_ZNK8simdjson8internal20simdjson_result_baseImE5errorEv:
   66|  2.76k|simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
   67|  2.76k|  return this->second;
   68|  2.76k|}

fuzz_ondemand.cpp:_ZN8simdjson8fallback12_GLOBAL__N_114leading_zeroesEm:
   30|  4.86k|simdjson_inline int leading_zeroes(uint64_t input_num) {
   31|       |#ifdef _MSC_VER
   32|       |  unsigned long leading_zero = 0;
   33|       |  // Search the mask data from most significant bit (MSB)
   34|       |  // to least significant bit (LSB) for a set bit (1).
   35|       |  if (_BitScanReverse64(&leading_zero, input_num))
   36|       |    return (int)(63 - leading_zero);
   37|       |  else
   38|       |    return 64;
   39|       |#else
   40|  4.86k|  return __builtin_clzll(input_num);
   41|  4.86k|#endif// _MSC_VER
   42|  4.86k|}

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

_ZN8simdjson8fallback13numberparsing19full_multiplicationEmm:
   56|  6.55k|simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) {
   57|  6.55k|  internal::value128 answer;
   58|       |#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
   59|       |#if SIMDJSON_IS_ARM64
   60|       |  // ARM64 has native support for 64-bit multiplications, no need to emultate
   61|       |  answer.high = __umulh(value1, value2);
   62|       |  answer.low = value1 * value2;
   63|       |#else
   64|       |  answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64
   65|       |#endif // SIMDJSON_IS_ARM64
   66|       |#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
   67|  6.55k|  __uint128_t r = (static_cast<__uint128_t>(value1)) * value2;
   68|  6.55k|  answer.low = uint64_t(r);
   69|  6.55k|  answer.high = uint64_t(r >> 64);
   70|  6.55k|#endif
   71|  6.55k|  return answer;
   72|  6.55k|}

fuzz_ondemand.cpp:_ZN8simdjson8fallback12_GLOBAL__N_111atomparsing8str4ncmpEPKhPKc:
   29|  11.0k|simdjson_inline uint32_t str4ncmp(const uint8_t *src, const char* atom) {
   30|  11.0k|  uint32_t srcval; // we want to avoid unaligned 32-bit loads (undefined in C/C++)
   31|  11.0k|  static_assert(sizeof(uint32_t) <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be larger than 4 bytes");
   32|  11.0k|  std::memcpy(&srcval, src, sizeof(uint32_t));
   33|  11.0k|  return srcval ^ string_to_uint32(atom);
   34|  11.0k|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback12_GLOBAL__N_111atomparsing16string_to_uint32EPKc:
   23|  11.0k|simdjson_inline uint32_t string_to_uint32(const char* str) { uint32_t val; std::memcpy(&val, str, sizeof(uint32_t)); return val; }

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

_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand8documentEEC2ENS_10error_codeE:
   82|  1.20k|    : implementation_simdjson_result_base(T{}, error) {}
_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand8documentEEC2EOS3_NS_10error_codeE:
   79|  5.07k|    : first{std::forward<T>(value)}, second{error} {}
_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand8documentEEC2EOS3_:
   85|  3.86k|    : implementation_simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand14array_iteratorEEC2EOS3_NS_10error_codeE:
   79|  8.87k|    : first{std::forward<T>(value)}, second{error} {}
_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand5arrayEEC2ENS_10error_codeE:
   82|  3.23k|    : implementation_simdjson_result_base(T{}, error) {}
_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand5arrayEEC2EOS3_NS_10error_codeE:
   79|  9.76k|    : first{std::forward<T>(value)}, second{error} {}
_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand5arrayEEC2EOS3_:
   85|  6.52k|    : implementation_simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZNK8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand5arrayEE5errorEv:
   32|  11.2k|simdjson_inline error_code implementation_simdjson_result_base<T>::error() const noexcept {
   33|  11.2k|  return this->second;
   34|  11.2k|}
_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand14array_iteratorEEC2EOS3_:
   85|  5.62k|    : implementation_simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZNK8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand14array_iteratorEE5errorEv:
   32|   138k|simdjson_inline error_code implementation_simdjson_result_base<T>::error() const noexcept {
   33|   138k|  return this->second;
   34|   138k|}
_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand5valueEEC2ENS_10error_codeE:
   82|  2.72k|    : implementation_simdjson_result_base(T{}, error) {}
_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand5valueEEC2EOS3_NS_10error_codeE:
   79|  66.1k|    : first{std::forward<T>(value)}, second{error} {}
_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand5valueEEC2EOS3_:
   85|  63.4k|    : implementation_simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZNK8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand5valueEE5errorEv:
   32|  71.1k|simdjson_inline error_code implementation_simdjson_result_base<T>::error() const noexcept {
   33|  71.1k|  return this->second;
   34|  71.1k|}
_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand15raw_json_stringEEC2ENS_10error_codeE:
   82|  1.31k|    : implementation_simdjson_result_base(T{}, error) {}
_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand15raw_json_stringEEC2EOS3_NS_10error_codeE:
   79|  3.19k|    : first{std::forward<T>(value)}, second{error} {}
_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand15raw_json_stringEEC2EOS3_:
   85|  1.88k|    : implementation_simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZNK8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand15raw_json_stringEE5errorEv:
   32|  2.82k|simdjson_inline error_code implementation_simdjson_result_base<T>::error() const noexcept {
   33|  2.82k|  return this->second;
   34|  2.82k|}
_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand6objectEEC2ENS_10error_codeE:
   82|    650|    : implementation_simdjson_result_base(T{}, error) {}
_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand6objectEEC2EOS3_NS_10error_codeE:
   79|  1.48k|    : first{std::forward<T>(value)}, second{error} {}
_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand6objectEEC2EOS3_:
   85|    831|    : implementation_simdjson_result_base(std::forward<T>(value), SUCCESS) {}
_ZNK8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand8documentEE5errorEv:
   32|  8.94k|simdjson_inline error_code implementation_simdjson_result_base<T>::error() const noexcept {
   33|  8.94k|  return this->second;
   34|  8.94k|}

_ZN8simdjson8fallback35implementation_simdjson_result_baseINS0_8ondemand14array_iteratorEEC2Ev:
   40|  6.48k|  simdjson_inline implementation_simdjson_result_base() noexcept = default;

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

fuzz_ondemand.cpp:_ZN8simdjson8fallback13numberparsing12_GLOBAL__N_113parse_integerEPKh:
  882|  1.69k|simdjson_unused simdjson_inline simdjson_result<int64_t> parse_integer(const uint8_t *src) noexcept {
  883|       |  //
  884|       |  // Check for minus sign
  885|       |  //
  886|  1.69k|  bool negative = (*src == '-');
  887|  1.69k|  const uint8_t *p = src + uint8_t(negative);
  888|       |
  889|       |  //
  890|       |  // Parse the integer part.
  891|       |  //
  892|       |  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
  893|  1.69k|  const uint8_t *const start_digits = p;
  894|  1.69k|  uint64_t i = 0;
  895|  1.06M|  while (parse_digit(*p, i)) { p++; }
  ------------------
  |  Branch (895:10): [True: 1.05M, False: 1.69k]
  ------------------
  896|       |
  897|       |  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
  898|       |  // Optimization note: size_t is expected to be unsigned.
  899|  1.69k|  size_t digit_count = size_t(p - start_digits);
  900|       |  // We go from
  901|       |  // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
  902|       |  // so we can never represent numbers that have more than 19 digits.
  903|  1.69k|  size_t longest_digit_count = 19;
  904|       |  // Optimization note: the compiler can probably merge
  905|       |  // ((digit_count == 0) || (digit_count > longest_digit_count))
  906|       |  // into a single  branch since digit_count is unsigned.
  907|  1.69k|  if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; }
  ------------------
  |  Branch (907:7): [True: 243, False: 1.45k]
  |  Branch (907:29): [True: 209, False: 1.24k]
  ------------------
  908|       |  // Here digit_count > 0.
  909|  1.24k|  if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; }
  ------------------
  |  Branch (909:7): [True: 513, False: 733]
  |  Branch (909:33): [True: 202, False: 311]
  ------------------
  910|       |  // We can do the following...
  911|       |  // if (!jsoncharutils::is_structural_or_whitespace(*p)) {
  912|       |  //  return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR;
  913|       |  // }
  914|       |  // as a single table lookup:
  915|  1.04k|  if(integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); }
  ------------------
  |  Branch (915:6): [True: 209, False: 835]
  ------------------
  916|       |  // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX.
  917|       |  // Performance note: This check is only needed when digit_count == longest_digit_count but it is
  918|       |  // so cheap that we might as well always make it.
  919|    835|  if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; }
  ------------------
  |  Branch (919:6): [True: 269, False: 566]
  ------------------
  920|    566|  return negative ? (~i+1) : i;
  ------------------
  |  Branch (920:10): [True: 38, False: 528]
  ------------------
  921|    835|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback13numberparsing12_GLOBAL__N_111parse_digitImEEbhRT_:
  350|  22.8M|simdjson_inline bool parse_digit(const uint8_t c, I &i) {
  351|  22.8M|  const uint8_t digit = static_cast<uint8_t>(c - '0');
  352|  22.8M|  if (digit > 9) {
  ------------------
  |  Branch (352:7): [True: 75.5k, False: 22.7M]
  ------------------
  353|  75.5k|    return false;
  354|  75.5k|  }
  355|       |  // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication
  356|  22.7M|  i = 10 * i + digit; // might overflow, we will handle the overflow later
  357|  22.7M|  return true;
  358|  22.8M|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback13numberparsing12_GLOBAL__N_112parse_doubleEPKh:
 1009|  37.7k|simdjson_unused simdjson_inline simdjson_result<double> parse_double(const uint8_t * src) noexcept {
 1010|       |  //
 1011|       |  // Check for minus sign
 1012|       |  //
 1013|  37.7k|  bool negative = (*src == '-');
 1014|  37.7k|  src += uint8_t(negative);
 1015|       |
 1016|       |  //
 1017|       |  // Parse the integer part.
 1018|       |  //
 1019|  37.7k|  uint64_t i = 0;
 1020|  37.7k|  const uint8_t *p = src;
 1021|  37.7k|  p += parse_digit(*p, i);
 1022|  37.7k|  bool leading_zero = (i == 0);
 1023|  17.1M|  while (parse_digit(*p, i)) { p++; }
  ------------------
  |  Branch (1023:10): [True: 17.1M, False: 37.7k]
  ------------------
 1024|       |  // no integer digits, or 0123 (zero must be solo)
 1025|  37.7k|  if ( p == src ) { return INCORRECT_TYPE; }
  ------------------
  |  Branch (1025:8): [True: 1.16k, False: 36.5k]
  ------------------
 1026|  36.5k|  if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; }
  ------------------
  |  Branch (1026:9): [True: 7.25k, False: 29.2k]
  |  Branch (1026:25): [True: 700, False: 6.55k]
  ------------------
 1027|       |
 1028|       |  //
 1029|       |  // Parse the decimal part.
 1030|       |  //
 1031|  35.8k|  int64_t exponent = 0;
 1032|  35.8k|  bool overflow;
 1033|  35.8k|  if (simdjson_likely(*p == '.')) {
  ------------------
  |  |  103|  35.8k|  #define simdjson_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (103:30): [True: 15.2k, False: 20.5k]
  |  |  ------------------
  ------------------
 1034|  15.2k|    p++;
 1035|  15.2k|    const uint8_t *start_decimal_digits = p;
 1036|  15.2k|    if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits
  ------------------
  |  Branch (1036:9): [True: 292, False: 14.9k]
  ------------------
 1037|  14.9k|    p++;
 1038|  1.78M|    while (parse_digit(*p, i)) { p++; }
  ------------------
  |  Branch (1038:12): [True: 1.77M, False: 14.9k]
  ------------------
 1039|  14.9k|    exponent = -(p - start_decimal_digits);
 1040|       |
 1041|       |    // Overflow check. More than 19 digits (minus the decimal) may be overflow.
 1042|  14.9k|    overflow = p-src-1 > 19;
 1043|  14.9k|    if (simdjson_unlikely(overflow && leading_zero)) {
  ------------------
  |  |  106|  18.4k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 2.07k, False: 12.9k]
  |  |  |  Branch (106:52): [True: 3.47k, False: 11.4k]
  |  |  |  Branch (106:52): [True: 2.07k, False: 1.40k]
  |  |  ------------------
  ------------------
 1044|       |      // Skip leading 0.00000 and see if it still overflows
 1045|  2.07k|      const uint8_t *start_digits = src + 2;
 1046|  11.3k|      while (*start_digits == '0') { start_digits++; }
  ------------------
  |  Branch (1046:14): [True: 9.25k, False: 2.07k]
  ------------------
 1047|  2.07k|      overflow = p-start_digits > 19;
 1048|  2.07k|    }
 1049|  20.5k|  } else {
 1050|  20.5k|    overflow = p-src > 19;
 1051|  20.5k|  }
 1052|       |
 1053|       |  //
 1054|       |  // Parse the exponent
 1055|       |  //
 1056|  35.5k|  if (*p == 'e' || *p == 'E') {
  ------------------
  |  Branch (1056:7): [True: 1.57k, False: 33.9k]
  |  Branch (1056:20): [True: 15.3k, False: 18.6k]
  ------------------
 1057|  16.9k|    p++;
 1058|  16.9k|    bool exp_neg = *p == '-';
 1059|  16.9k|    p += exp_neg || *p == '+';
  ------------------
  |  Branch (1059:10): [True: 3.74k, False: 13.1k]
  |  Branch (1059:21): [True: 195, False: 13.0k]
  ------------------
 1060|       |
 1061|  16.9k|    uint64_t exp = 0;
 1062|  16.9k|    const uint8_t *start_exp_digits = p;
 1063|  1.64M|    while (parse_digit(*p, exp)) { p++; }
  ------------------
  |  Branch (1063:12): [True: 1.62M, False: 16.9k]
  ------------------
 1064|       |    // no exp digits, or 20+ exp digits
 1065|  16.9k|    if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; }
  ------------------
  |  Branch (1065:9): [True: 1.42k, False: 15.5k]
  |  Branch (1065:36): [True: 229, False: 15.2k]
  ------------------
 1066|       |
 1067|  15.2k|    exponent += exp_neg ? 0-exp : exp;
  ------------------
  |  Branch (1067:17): [True: 3.50k, False: 11.7k]
  ------------------
 1068|  15.2k|  }
 1069|       |
 1070|  33.8k|  if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; }
  ------------------
  |  Branch (1070:7): [True: 3.70k, False: 30.1k]
  ------------------
 1071|       |
 1072|  30.1k|  overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power;
  ------------------
  |  Branch (1072:14): [True: 9.14k, False: 21.0k]
  |  Branch (1072:26): [True: 1.18k, False: 19.8k]
  |  Branch (1072:75): [True: 8.14k, False: 11.7k]
  ------------------
 1073|       |
 1074|       |  //
 1075|       |  // Assemble (or slow-parse) the float
 1076|       |  //
 1077|  30.1k|  double d;
 1078|  30.1k|  if (simdjson_likely(!overflow)) {
  ------------------
  |  |  103|  30.1k|  #define simdjson_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (103:30): [True: 11.7k, False: 18.4k]
  |  |  ------------------
  ------------------
 1079|  11.7k|    if (compute_float_64(exponent, i, negative, d)) { return d; }
  ------------------
  |  Branch (1079:9): [True: 10.9k, False: 779]
  ------------------
 1080|  11.7k|  }
 1081|  19.2k|  if (!parse_float_fallback(src - uint8_t(negative), &d)) {
  ------------------
  |  Branch (1081:7): [True: 8.39k, False: 10.8k]
  ------------------
 1082|  8.39k|    return NUMBER_ERROR;
 1083|  8.39k|  }
 1084|  10.8k|  return d;
 1085|  19.2k|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback13numberparsing12_GLOBAL__N_116compute_float_64ElmbRd:
   52|  11.7k|simdjson_inline bool compute_float_64(int64_t power, uint64_t i, bool negative, double &d) {
   53|       |  // we start with a fast path
   54|       |  // It was described in
   55|       |  // Clinger WD. How to read floating point numbers accurately.
   56|       |  // ACM SIGPLAN Notices. 1990
   57|       |#ifndef FLT_EVAL_METHOD
   58|       |#error "FLT_EVAL_METHOD should be defined, please include cfloat."
   59|       |#endif
   60|       |#if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0)
   61|       |  // We cannot be certain that x/y is rounded to nearest.
   62|       |  if (0 <= power && power <= 22 && i <= 9007199254740991)
   63|       |#else
   64|  11.7k|  if (-22 <= power && power <= 22 && i <= 9007199254740991)
  ------------------
  |  Branch (64:7): [True: 10.9k, False: 766]
  |  Branch (64:23): [True: 8.38k, False: 2.57k]
  |  Branch (64:38): [True: 6.63k, False: 1.74k]
  ------------------
   65|  6.63k|#endif
   66|  6.63k|  {
   67|       |    // convert the integer into a double. This is lossless since
   68|       |    // 0 <= i <= 2^53 - 1.
   69|  6.63k|    d = double(i);
   70|       |    //
   71|       |    // The general idea is as follows.
   72|       |    // If 0 <= s < 2^53 and if 10^0 <= p <= 10^22 then
   73|       |    // 1) Both s and p can be represented exactly as 64-bit floating-point
   74|       |    // values
   75|       |    // (binary64).
   76|       |    // 2) Because s and p can be represented exactly as floating-point values,
   77|       |    // then s * p
   78|       |    // and s / p will produce correctly rounded values.
   79|       |    //
   80|  6.63k|    if (power < 0) {
  ------------------
  |  Branch (80:9): [True: 1.78k, False: 4.85k]
  ------------------
   81|  1.78k|      d = d / simdjson::internal::power_of_ten[-power];
   82|  4.85k|    } else {
   83|  4.85k|      d = d * simdjson::internal::power_of_ten[power];
   84|  4.85k|    }
   85|  6.63k|    if (negative) {
  ------------------
  |  Branch (85:9): [True: 9, False: 6.62k]
  ------------------
   86|      9|      d = -d;
   87|      9|    }
   88|  6.63k|    return true;
   89|  6.63k|  }
   90|       |  // When 22 < power && power <  22 + 16, we could
   91|       |  // hope for another, secondary fast path.  It was
   92|       |  // described by David M. Gay in  "Correctly rounded
   93|       |  // binary-decimal and decimal-binary conversions." (1990)
   94|       |  // If you need to compute i * 10^(22 + x) for x < 16,
   95|       |  // first compute i * 10^x, if you know that result is exact
   96|       |  // (e.g., when i * 10^x < 2^53),
   97|       |  // then you can still proceed and do (i * 10^x) * 10^22.
   98|       |  // Is this worth your time?
   99|       |  // You need  22 < power *and* power <  22 + 16 *and* (i * 10^(x-22) < 2^53)
  100|       |  // for this second fast path to work.
  101|       |  // If you you have 22 < power *and* power <  22 + 16, and then you
  102|       |  // optimistically compute "i * 10^(x-22)", there is still a chance that you
  103|       |  // have wasted your time if i * 10^(x-22) >= 2^53. It makes the use cases of
  104|       |  // this optimization maybe less common than we would like. Source:
  105|       |  // http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/
  106|       |  // also used in RapidJSON: https://rapidjson.org/strtod_8h_source.html
  107|       |
  108|       |  // The fast path has now failed, so we are failing back on the slower path.
  109|       |
  110|       |  // In the slow path, we need to adjust i so that it is > 1<<63 which is always
  111|       |  // possible, except if i == 0, so we handle i == 0 separately.
  112|  5.09k|  if(i == 0) {
  ------------------
  |  Branch (112:6): [True: 231, False: 4.86k]
  ------------------
  113|    231|    d = negative ? -0.0 : 0.0;
  ------------------
  |  Branch (113:9): [True: 0, False: 231]
  ------------------
  114|    231|    return true;
  115|    231|  }
  116|       |
  117|       |
  118|       |  // The exponent is 1024 + 63 + power
  119|       |  //     + floor(log(5**power)/log(2)).
  120|       |  // The 1024 comes from the ieee64 standard.
  121|       |  // The 63 comes from the fact that we use a 64-bit word.
  122|       |  //
  123|       |  // Computing floor(log(5**power)/log(2)) could be
  124|       |  // slow. Instead we use a fast function.
  125|       |  //
  126|       |  // For power in (-400,350), we have that
  127|       |  // (((152170 + 65536) * power ) >> 16);
  128|       |  // is equal to
  129|       |  //  floor(log(5**power)/log(2)) + power when power >= 0
  130|       |  // and it is equal to
  131|       |  //  ceil(log(5**-power)/log(2)) + power when power < 0
  132|       |  //
  133|       |  // The 65536 is (1<<16) and corresponds to
  134|       |  // (65536 * power) >> 16 ---> power
  135|       |  //
  136|       |  // ((152170 * power ) >> 16) is equal to
  137|       |  // floor(log(5**power)/log(2))
  138|       |  //
  139|       |  // Note that this is not magic: 152170/(1<<16) is
  140|       |  // approximately equal to log(5)/log(2).
  141|       |  // The 1<<16 value is a power of two; we could use a
  142|       |  // larger power of 2 if we wanted to.
  143|       |  //
  144|  4.86k|  int64_t exponent = (((152170 + 65536) * power) >> 16) + 1024 + 63;
  145|       |
  146|       |
  147|       |  // We want the most significant bit of i to be 1. Shift if needed.
  148|  4.86k|  int lz = leading_zeroes(i);
  149|  4.86k|  i <<= lz;
  150|       |
  151|       |
  152|       |  // We are going to need to do some 64-bit arithmetic to get a precise product.
  153|       |  // We use a table lookup approach.
  154|       |  // It is safe because
  155|       |  // power >= smallest_power
  156|       |  // and power <= largest_power
  157|       |  // We recover the mantissa of the power, it has a leading 1. It is always
  158|       |  // rounded down.
  159|       |  //
  160|       |  // We want the most significant 64 bits of the product. We know
  161|       |  // this will be non-zero because the most significant bit of i is
  162|       |  // 1.
  163|  4.86k|  const uint32_t index = 2 * uint32_t(power - simdjson::internal::smallest_power);
  164|       |  // Optimization: It may be that materializing the index as a variable might confuse some compilers and prevent effective complex-addressing loads. (Done for code clarity.)
  165|       |  //
  166|       |  // The full_multiplication function computes the 128-bit product of two 64-bit words
  167|       |  // with a returned value of type value128 with a "low component" corresponding to the
  168|       |  // 64-bit least significant bits of the product and with a "high component" corresponding
  169|       |  // to the 64-bit most significant bits of the product.
  170|  4.86k|  simdjson::internal::value128 firstproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index]);
  171|       |  // Both i and power_of_five_128[index] have their most significant bit set to 1 which
  172|       |  // implies that the either the most or the second most significant bit of the product
  173|       |  // is 1. We pack values in this manner for efficiency reasons: it maximizes the use
  174|       |  // we make of the product. It also makes it easy to reason about the product: there
  175|       |  // is 0 or 1 leading zero in the product.
  176|       |
  177|       |  // Unless the least significant 9 bits of the high (64-bit) part of the full
  178|       |  // product are all 1s, then we know that the most significant 55 bits are
  179|       |  // exact and no further work is needed. Having 55 bits is necessary because
  180|       |  // we need 53 bits for the mantissa but we have to have one rounding bit and
  181|       |  // we can waste a bit if the most significant bit of the product is zero.
  182|  4.86k|  if((firstproduct.high & 0x1FF) == 0x1FF) {
  ------------------
  |  Branch (182:6): [True: 1.69k, False: 3.16k]
  ------------------
  183|       |    // We want to compute i * 5^q, but only care about the top 55 bits at most.
  184|       |    // Consider the scenario where q>=0. Then 5^q may not fit in 64-bits. Doing
  185|       |    // the full computation is wasteful. So we do what is called a "truncated
  186|       |    // multiplication".
  187|       |    // We take the most significant 64-bits, and we put them in
  188|       |    // power_of_five_128[index]. Usually, that's good enough to approximate i * 5^q
  189|       |    // to the desired approximation using one multiplication. Sometimes it does not suffice.
  190|       |    // Then we store the next most significant 64 bits in power_of_five_128[index + 1], and
  191|       |    // then we get a better approximation to i * 5^q.
  192|       |    //
  193|       |    // That's for when q>=0. The logic for q<0 is somewhat similar but it is somewhat
  194|       |    // more complicated.
  195|       |    //
  196|       |    // There is an extra layer of complexity in that we need more than 55 bits of
  197|       |    // accuracy in the round-to-even scenario.
  198|       |    //
  199|       |    // The full_multiplication function computes the 128-bit product of two 64-bit words
  200|       |    // with a returned value of type value128 with a "low component" corresponding to the
  201|       |    // 64-bit least significant bits of the product and with a "high component" corresponding
  202|       |    // to the 64-bit most significant bits of the product.
  203|  1.69k|    simdjson::internal::value128 secondproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index + 1]);
  204|  1.69k|    firstproduct.low += secondproduct.high;
  205|  1.69k|    if(secondproduct.high > firstproduct.low) { firstproduct.high++; }
  ------------------
  |  Branch (205:8): [True: 1.38k, False: 313]
  ------------------
  206|       |    // As it has been proven by Noble Mushtak and Daniel Lemire in "Fast Number Parsing Without
  207|       |    // Fallback" (https://arxiv.org/abs/2212.06644), at this point we are sure that the product
  208|       |    // is sufficiently accurate, and more computation is not needed.
  209|  1.69k|  }
  210|  4.86k|  uint64_t lower = firstproduct.low;
  211|  4.86k|  uint64_t upper = firstproduct.high;
  212|       |  // The final mantissa should be 53 bits with a leading 1.
  213|       |  // We shift it so that it occupies 54 bits with a leading 1.
  214|       |  ///////
  215|  4.86k|  uint64_t upperbit = upper >> 63;
  216|  4.86k|  uint64_t mantissa = upper >> (upperbit + 9);
  217|  4.86k|  lz += int(1 ^ upperbit);
  218|       |
  219|       |  // Here we have mantissa < (1<<54).
  220|  4.86k|  int64_t real_exponent = exponent - lz;
  221|  4.86k|  if (simdjson_unlikely(real_exponent <= 0)) { // we have a subnormal?
  ------------------
  |  |  106|  4.86k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 514, False: 4.34k]
  |  |  ------------------
  ------------------
  222|       |    // Here have that real_exponent <= 0 so -real_exponent >= 0
  223|    514|    if(-real_exponent + 1 >= 64) { // if we have more than 64 bits below the minimum exponent, you have a zero for sure.
  ------------------
  |  Branch (223:8): [True: 495, False: 19]
  ------------------
  224|    495|      d = negative ? -0.0 : 0.0;
  ------------------
  |  Branch (224:11): [True: 0, False: 495]
  ------------------
  225|    495|      return true;
  226|    495|    }
  227|       |    // next line is safe because -real_exponent + 1 < 0
  228|     19|    mantissa >>= -real_exponent + 1;
  229|       |    // Thankfully, we can't have both "round-to-even" and subnormals because
  230|       |    // "round-to-even" only occurs for powers close to 0.
  231|     19|    mantissa += (mantissa & 1); // round up
  232|     19|    mantissa >>= 1;
  233|       |    // There is a weird scenario where we don't have a subnormal but just.
  234|       |    // Suppose we start with 2.2250738585072013e-308, we end up
  235|       |    // with 0x3fffffffffffff x 2^-1023-53 which is technically subnormal
  236|       |    // whereas 0x40000000000000 x 2^-1023-53  is normal. Now, we need to round
  237|       |    // up 0x3fffffffffffff x 2^-1023-53  and once we do, we are no longer
  238|       |    // subnormal, but we can only know this after rounding.
  239|       |    // So we only declare a subnormal if we are smaller than the threshold.
  240|     19|    real_exponent = (mantissa < (uint64_t(1) << 52)) ? 0 : 1;
  ------------------
  |  Branch (240:21): [True: 19, False: 0]
  ------------------
  241|     19|    d = to_double(mantissa, real_exponent, negative);
  242|     19|    return true;
  243|    514|  }
  244|       |  // We have to round to even. The "to even" part
  245|       |  // is only a problem when we are right in between two floats
  246|       |  // which we guard against.
  247|       |  // If we have lots of trailing zeros, we may fall right between two
  248|       |  // floating-point values.
  249|       |  //
  250|       |  // The round-to-even cases take the form of a number 2m+1 which is in (2^53,2^54]
  251|       |  // times a power of two. That is, it is right between a number with binary significand
  252|       |  // m and another number with binary significand m+1; and it must be the case
  253|       |  // that it cannot be represented by a float itself.
  254|       |  //
  255|       |  // We must have that w * 10 ^q == (2m+1) * 2^p for some power of two 2^p.
  256|       |  // Recall that 10^q = 5^q * 2^q.
  257|       |  // When q >= 0, we must have that (2m+1) is divible by 5^q, so 5^q <= 2^54. We have that
  258|       |  //  5^23 <=  2^54 and it is the last power of five to qualify, so q <= 23.
  259|       |  // When q<0, we have  w  >=  (2m+1) x 5^{-q}.  We must have that w<2^{64} so
  260|       |  // (2m+1) x 5^{-q} < 2^{64}. We have that 2m+1>2^{53}. Hence, we must have
  261|       |  // 2^{53} x 5^{-q} < 2^{64}.
  262|       |  // Hence we have 5^{-q} < 2^{11}$ or q>= -4.
  263|       |  //
  264|       |  // We require lower <= 1 and not lower == 0 because we could not prove that
  265|       |  // that lower == 0 is implied; but we could prove that lower <= 1 is a necessary and sufficient test.
  266|  4.34k|  if (simdjson_unlikely((lower <= 1) && (power >= -4) && (power <= 23) && ((mantissa & 3) == 1))) {
  ------------------
  |  |  106|  17.5k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 576, False: 3.77k]
  |  |  |  Branch (106:52): [True: 2.35k, False: 1.98k]
  |  |  |  Branch (106:52): [True: 1.20k, False: 1.15k]
  |  |  |  Branch (106:52): [True: 956, False: 247]
  |  |  |  Branch (106:52): [True: 576, False: 380]
  |  |  ------------------
  ------------------
  267|    576|    if((mantissa  << (upperbit + 64 - 53 - 2)) ==  upper) {
  ------------------
  |  Branch (267:8): [True: 297, False: 279]
  ------------------
  268|    297|      mantissa &= ~1;             // flip it so that we do not round up
  269|    297|    }
  270|    576|  }
  271|       |
  272|  4.34k|  mantissa += mantissa & 1;
  273|  4.34k|  mantissa >>= 1;
  274|       |
  275|       |  // Here we have mantissa < (1<<53), unless there was an overflow
  276|  4.34k|  if (mantissa >= (1ULL << 53)) {
  ------------------
  |  Branch (276:7): [True: 274, False: 4.07k]
  ------------------
  277|       |    //////////
  278|       |    // This will happen when parsing values such as 7.2057594037927933e+16
  279|       |    ////////
  280|    274|    mantissa = (1ULL << 52);
  281|    274|    real_exponent++;
  282|    274|  }
  283|  4.34k|  mantissa &= ~(1ULL << 52);
  284|       |  // we have to check that real_exponent is in range, otherwise we bail out
  285|  4.34k|  if (simdjson_unlikely(real_exponent > 2046)) {
  ------------------
  |  |  106|  4.34k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 779, False: 3.56k]
  |  |  ------------------
  ------------------
  286|       |    // We have an infinite value!!! We could actually throw an error here if we could.
  287|    779|    return false;
  288|    779|  }
  289|  3.56k|  d = to_double(mantissa, real_exponent, negative);
  290|  3.56k|  return true;
  291|  4.34k|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback13numberparsing12_GLOBAL__N_19to_doubleEmmb:
   37|  3.58k|simdjson_inline double to_double(uint64_t mantissa, uint64_t real_exponent, bool negative) {
   38|  3.58k|    double d;
   39|  3.58k|    mantissa &= ~(1ULL << 52);
   40|  3.58k|    mantissa |= real_exponent << 52;
   41|  3.58k|    mantissa |= ((static_cast<uint64_t>(negative)) << 63);
   42|  3.58k|    std::memcpy(&d, &mantissa, sizeof(d));
   43|  3.58k|    return d;
   44|  3.58k|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback13numberparsing12_GLOBAL__N_120parse_float_fallbackEPKhPd:
  300|  19.2k|static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) {
  301|  19.2k|  *outDouble = simdjson::internal::from_chars(reinterpret_cast<const char *>(ptr));
  302|       |  // We do not accept infinite values.
  303|       |
  304|       |  // Detecting finite values in a portable manner is ridiculously hard, ideally
  305|       |  // we would want to do:
  306|       |  // return !std::isfinite(*outDouble);
  307|       |  // but that mysteriously fails under legacy/old libc++ libraries, see
  308|       |  // https://github.com/simdjson/simdjson/issues/1286
  309|       |  //
  310|       |  // Therefore, fall back to this solution (the extra parens are there
  311|       |  // to handle that max may be a macro on windows).
  312|  19.2k|  return !(*outDouble > (std::numeric_limits<double>::max)() || *outDouble < std::numeric_limits<double>::lowest());
  ------------------
  |  Branch (312:12): [True: 8.07k, False: 11.1k]
  |  Branch (312:65): [True: 316, False: 10.8k]
  ------------------
  313|  19.2k|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback13numberparsing12_GLOBAL__N_114parse_unsignedEPKh:
  734|  2.76k|simdjson_unused simdjson_inline simdjson_result<uint64_t> parse_unsigned(const uint8_t * const src) noexcept {
  735|  2.76k|  const uint8_t *p = src;
  736|       |  //
  737|       |  // Parse the integer part.
  738|       |  //
  739|       |  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
  740|  2.76k|  const uint8_t *const start_digits = p;
  741|  2.76k|  uint64_t i = 0;
  742|  1.09M|  while (parse_digit(*p, i)) { p++; }
  ------------------
  |  Branch (742:10): [True: 1.09M, False: 2.76k]
  ------------------
  743|       |
  744|       |  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
  745|       |  // Optimization note: size_t is expected to be unsigned.
  746|  2.76k|  size_t digit_count = size_t(p - start_digits);
  747|       |  // The longest positive 64-bit number is 20 digits.
  748|       |  // We do it this way so we don't trigger this branch unless we must.
  749|       |  // Optimization note: the compiler can probably merge
  750|       |  // ((digit_count == 0) || (digit_count > 20))
  751|       |  // into a single  branch since digit_count is unsigned.
  752|  2.76k|  if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; }
  ------------------
  |  Branch (752:7): [True: 394, False: 2.37k]
  |  Branch (752:29): [True: 221, False: 2.14k]
  ------------------
  753|       |  // Here digit_count > 0.
  754|  2.14k|  if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; }
  ------------------
  |  Branch (754:7): [True: 760, False: 1.38k]
  |  Branch (754:33): [True: 196, False: 564]
  ------------------
  755|       |  // We can do the following...
  756|       |  // if (!jsoncharutils::is_structural_or_whitespace(*p)) {
  757|       |  //  return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR;
  758|       |  // }
  759|       |  // as a single table lookup:
  760|  1.95k|  if (integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); }
  ------------------
  |  Branch (760:7): [True: 509, False: 1.44k]
  ------------------
  761|       |
  762|  1.44k|  if (digit_count == 20) {
  ------------------
  |  Branch (762:7): [True: 865, False: 579]
  ------------------
  763|       |    // Positive overflow check:
  764|       |    // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the
  765|       |    //   biggest uint64_t.
  766|       |    // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX.
  767|       |    //   If we got here, it's a 20 digit number starting with the digit "1".
  768|       |    // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller
  769|       |    //   than 1,553,255,926,290,448,384.
  770|       |    // - That is smaller than the smallest possible 20-digit number the user could write:
  771|       |    //   10,000,000,000,000,000,000.
  772|       |    // - Therefore, if the number is positive and lower than that, it's overflow.
  773|       |    // - The value we are looking at is less than or equal to INT64_MAX.
  774|       |    //
  775|    865|    if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; }
  ------------------
  |  Branch (775:9): [True: 196, False: 669]
  |  Branch (775:35): [True: 218, False: 451]
  ------------------
  776|    865|  }
  777|       |
  778|  1.03k|  return i;
  779|  1.44k|}

_ZN8simdjson8fallback8ondemand5array10start_rootERNS1_14value_iteratorE:
   68|  3.86k|simdjson_inline simdjson_result<array> array::start_root(value_iterator &iter) noexcept {
   69|  3.86k|  simdjson_unused bool has_value;
  ------------------
  |  |   99|  3.86k|  #define simdjson_unused __attribute__((unused))
  ------------------
   70|  3.86k|  SIMDJSON_TRY( iter.start_root_array().get(has_value) );
  ------------------
  |  |  273|  3.86k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 226, False: 3.64k]
  |  |  ------------------
  ------------------
   71|  3.64k|  return array(iter);
   72|  3.86k|}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand5arrayEEC2ENS_10error_codeE:
  199|  3.23k|  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array>(error)
  200|  3.23k|{
  201|  3.23k|}
_ZN8simdjson8fallback8ondemand5arrayC2ERKNS1_14value_iteratorE:
   57|  6.52k|  : iter{_iter}
   58|  6.52k|{
   59|  6.52k|}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand5arrayEEC2EOS3_:
  191|  6.52k|  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array>(
  192|  6.52k|      std::forward<SIMDJSON_IMPLEMENTATION::ondemand::array>(value)
  193|  6.52k|    )
  194|  6.52k|{
  195|  6.52k|}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand5arrayEE5beginEv:
  203|  8.44k|simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::begin() noexcept {
  204|  8.44k|  if (error()) { return error(); }
  ------------------
  |  Branch (204:7): [True: 2.81k, False: 5.62k]
  ------------------
  205|  5.62k|  return first.begin();
  206|  8.44k|}
_ZN8simdjson8fallback8ondemand5array5beginEv:
   79|  5.62k|simdjson_inline simdjson_result<array_iterator> array::begin() noexcept {
   80|       |#if SIMDJSON_DEVELOPMENT_CHECKS
   81|       |  if (!iter.is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; }
   82|       |#endif
   83|  5.62k|  return array_iterator(iter);
   84|  5.62k|}
_ZN8simdjson8fallback8ondemand5array5startERNS1_14value_iteratorE:
   61|  5.82k|simdjson_inline simdjson_result<array> array::start(value_iterator &iter) noexcept {
   62|       |  // We don't need to know if the array is empty to start iteration, but we do want to know if there
   63|       |  // is an error--thus `simdjson_unused`.
   64|  5.82k|  simdjson_unused bool has_value;
  ------------------
  |  |   99|  5.82k|  #define simdjson_unused __attribute__((unused))
  ------------------
   65|  5.82k|  SIMDJSON_TRY( iter.start_array().get(has_value) );
  ------------------
  |  |  273|  5.82k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 2.94k, False: 2.88k]
  |  |  ------------------
  ------------------
   66|  2.88k|  return array(iter);
   67|  5.82k|}

_ZN8simdjson8fallback8ondemand5arrayC2Ev:
   24|  3.23k|  simdjson_inline array() noexcept = default;

_ZN8simdjson15simdjson_resultINS_8fallback8ondemand14array_iteratorEEC2ENS_10error_codeE:
   53|  3.24k|  : SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>({}, error)
  ------------------
  |  |    1|  3.24k|#define SIMDJSON_IMPLEMENTATION fallback
  ------------------
   54|  3.24k|{
   55|  3.24k|}
_ZN8simdjson8fallback8ondemand14array_iteratorC2ERKNS1_14value_iteratorE:
   16|  5.62k|  : iter{_iter}
   17|  5.62k|{}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand14array_iteratorEEC2EOS3_:
   48|  5.62k|  : SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>(value))
  ------------------
  |  |    1|  5.62k|#define SIMDJSON_IMPLEMENTATION fallback
  ------------------
   49|  5.62k|{
   50|  5.62k|  first.iter.assert_is_valid();
   51|  5.62k|}
_ZNK8simdjson15simdjson_resultINS_8fallback8ondemand14array_iteratorEEneERKS4_:
   65|  72.6k|simdjson_inline bool simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::operator!=(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &other) const noexcept {
   66|  72.6k|  if (!first.iter.is_valid()) { return error(); }
  ------------------
  |  Branch (66:7): [True: 3.81k, False: 68.8k]
  ------------------
   67|  68.8k|  return first != other.first;
   68|  72.6k|}
_ZNK8simdjson8fallback8ondemand14array_iteratorneERKS2_:
   26|  68.8k|simdjson_inline bool array_iterator::operator!=(const array_iterator &) const noexcept {
   27|  68.8k|  return iter.is_open();
   28|  68.8k|}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand14array_iteratorEEdeEv:
   57|  66.1k|simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::operator*() noexcept {
   58|  66.1k|  if (error()) { return error(); }
  ------------------
  |  Branch (58:7): [True: 1.90k, False: 64.2k]
  ------------------
   59|  64.2k|  return *first;
   60|  66.1k|}
_ZN8simdjson8fallback8ondemand14array_iteratordeEv:
   19|  64.2k|simdjson_inline simdjson_result<value> array_iterator::operator*() noexcept {
   20|  64.2k|  if (iter.error()) { iter.abandon(); return iter.error(); }
  ------------------
  |  Branch (20:7): [True: 818, False: 63.4k]
  ------------------
   21|  63.4k|  return value(iter.child());
   22|  64.2k|}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand14array_iteratorEEppEv:
   69|  66.1k|simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::operator++() noexcept {
   70|       |  // Clear the error if there is one, so we don't yield it twice
   71|  66.1k|  if (error()) { second = SUCCESS; return *this; }
  ------------------
  |  Branch (71:7): [True: 1.90k, False: 64.2k]
  ------------------
   72|  64.2k|  ++(first);
   73|  64.2k|  return *this;
   74|  66.1k|}
_ZN8simdjson8fallback8ondemand14array_iteratorppEv:
   29|  64.2k|simdjson_inline array_iterator &array_iterator::operator++() noexcept {
   30|  64.2k|  error_code error;
   31|       |  // PERF NOTE this is a safety rail ... users should exit loops as soon as they receive an error, so we'll never get here.
   32|       |  // However, it does not seem to make a perf difference, so we add it out of an abundance of caution.
   33|  64.2k|  if (( error = iter.error() )) { return *this; }
  ------------------
  |  Branch (33:7): [True: 1.00k, False: 63.2k]
  ------------------
   34|  63.2k|  if (( error = iter.skip_child() )) { return *this; }
  ------------------
  |  Branch (34:7): [True: 141, False: 63.1k]
  ------------------
   35|  63.1k|  if (( error = iter.has_next_element().error() )) { return *this; }
  ------------------
  |  Branch (35:7): [True: 677, False: 62.4k]
  ------------------
   36|  62.4k|  return *this;
   37|  63.1k|}

_ZN8simdjson8fallback8ondemand14array_iteratorC2Ev:
   26|  9.73k|  simdjson_inline array_iterator() noexcept = default;
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand14array_iteratorEEC2Ev:
   82|  6.48k|  simdjson_inline simdjson_result() noexcept = default;

_ZN8simdjson15simdjson_resultINS_8fallback8ondemand8documentEEC2ENS_10error_codeE:
  367|  1.20k|    implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document>(
  368|  1.20k|      error
  369|  1.20k|    )
  370|  1.20k|{
  371|  1.20k|}
_ZN8simdjson8fallback8ondemand8document5startEONS1_13json_iteratorE:
   29|  3.86k|simdjson_inline document document::start(json_iterator &&iter) noexcept {
   30|  3.86k|  return document(std::forward<json_iterator>(iter));
   31|  3.86k|}
_ZN8simdjson8fallback8ondemand8documentC2EONS1_13json_iteratorE:
   24|  3.86k|  : iter{std::forward<json_iterator>(_iter)}
   25|  3.86k|{
   26|  3.86k|  logger::log_start_value(iter, "document");
   27|  3.86k|}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand8documentEEC2EOS3_:
  359|  3.86k|    implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document>(
  360|  3.86k|      std::forward<SIMDJSON_IMPLEMENTATION::ondemand::document>(value)
  361|  3.86k|    )
  362|  3.86k|{
  363|  3.86k|}
_ZNR8simdjson15simdjson_resultINS_8fallback8ondemand8documentEE5beginEv:
  389|  3.86k|simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::begin() & noexcept {
  390|  3.86k|  if (error()) { return error(); }
  ------------------
  |  Branch (390:7): [True: 0, False: 3.86k]
  ------------------
  391|  3.86k|  return first.begin();
  392|  3.86k|}
_ZNR8simdjson8fallback8ondemand8document5beginEv:
  222|  3.86k|simdjson_inline simdjson_result<array_iterator> document::begin() & noexcept {
  223|  3.86k|  return get_array().begin();
  224|  3.86k|}
_ZNR8simdjson8fallback8ondemand8document9get_arrayEv:
  105|  3.86k|simdjson_inline simdjson_result<array> document::get_array() & noexcept {
  106|  3.86k|  auto value = get_root_value_iterator();
  107|  3.86k|  return array::start_root(value);
  108|  3.86k|}
_ZN8simdjson8fallback8ondemand8document23get_root_value_iteratorEv:
   60|  3.86k|simdjson_inline value_iterator document::get_root_value_iterator() noexcept {
   61|  3.86k|  return resume_value_iterator();
   62|  3.86k|}
_ZN8simdjson8fallback8ondemand8document21resume_value_iteratorEv:
   57|  3.86k|simdjson_inline value_iterator document::resume_value_iterator() noexcept {
   58|  3.86k|  return value_iterator(&iter, 1, iter.root_position());
   59|  3.86k|}
_ZNR8simdjson15simdjson_resultINS_8fallback8ondemand8documentEE3endEv:
  393|  3.86k|simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::end() & noexcept {
  394|  3.86k|  return {};
  395|  3.86k|}

_ZN8simdjson8fallback8ondemand8documentC2Ev:
   30|  1.20k|  simdjson_inline document() noexcept = default;
_ZN8simdjson8fallback8ondemand8documentC2EOS2_:
   32|  5.07k|  simdjson_inline document(document &&other) noexcept = default;

_ZN8simdjson8fallback8ondemand13json_iteratorC2EOS2_:
   20|  8.94k|  : token(std::forward<token_iterator>(other.token)),
   21|  8.94k|    parser{other.parser},
   22|  8.94k|    _string_buf_loc{other._string_buf_loc},
   23|  8.94k|    error{other.error},
   24|  8.94k|    _depth{other._depth},
   25|  8.94k|    _root{other._root},
   26|  8.94k|    _streaming{other._streaming}
   27|  8.94k|{
   28|  8.94k|  other.parser = nullptr;
   29|  8.94k|}
_ZNK8simdjson8fallback8ondemand13json_iterator8positionEv:
  352|  10.0M|simdjson_inline token_position json_iterator::position() const noexcept {
  353|  10.0M|  return token.position();
  354|  10.0M|}
_ZNK8simdjson8fallback8ondemand13json_iterator5depthEv:
  337|  5.18M|simdjson_inline depth_t json_iterator::depth() const noexcept {
  338|  5.18M|  return _depth;
  339|  5.18M|}
_ZN8simdjson8fallback8ondemand13json_iteratorC2EPKhPNS1_6parserE:
   43|  3.86k|  : token(buf, &_parser->implementation->structural_indexes[0]),
   44|  3.86k|    parser{_parser},
   45|  3.86k|    _string_buf_loc{parser->string_buf.get()},
   46|  3.86k|    _depth{1},
   47|  3.86k|    _root{parser->implementation->structural_indexes.get()},
   48|  3.86k|    _streaming{false}
   49|       |
   50|  3.86k|{
   51|  3.86k|  logger::log_headers();
   52|       |#if SIMDJSON_CHECK_EOF
   53|       |  assert_more_tokens();
   54|       |#endif
   55|  3.86k|}
_ZNK8simdjson8fallback8ondemand13json_iterator13root_positionEv:
  196|  3.86k|simdjson_inline token_position json_iterator::root_position() const noexcept {
  197|  3.86k|  return _root;
  198|  3.86k|}
_ZNK8simdjson8fallback8ondemand13json_iterator4peekEPKj:
  291|  3.64k|simdjson_inline const uint8_t *json_iterator::peek(token_position position) const noexcept {
  292|       |  // todo: currently we require end-of-string buffering, but the following
  293|       |  // assert_valid_position should be turned on if/when we lift that condition.
  294|       |  // assert_valid_position(position);
  295|       |  // This is almost surely related to SIMDJSON_CHECK_EOF but given that SIMDJSON_CHECK_EOF
  296|       |  // is ON by default, we have no choice but to disable it for real with a comment.
  297|  3.64k|  return token.peek(position);
  298|  3.64k|}
_ZNK8simdjson8fallback8ondemand13json_iterator4peekEi:
  277|  75.0k|simdjson_inline const uint8_t *json_iterator::peek(int32_t delta) const noexcept {
  278|       |#if SIMDJSON_CHECK_EOF
  279|       |  assert_more_tokens(delta+1);
  280|       |#endif // SIMDJSON_CHECK_EOF
  281|  75.0k|  return token.peek(delta);
  282|  75.0k|}
_ZN8simdjson8fallback8ondemand13json_iterator26return_current_and_advanceEv:
  265|  5.04M|simdjson_inline const uint8_t *json_iterator::return_current_and_advance() noexcept {
  266|       |#if SIMDJSON_CHECK_EOF
  267|       |  assert_more_tokens();
  268|       |#endif // SIMDJSON_CHECK_EOF
  269|  5.04M|  return token.return_current_and_advance();
  270|  5.04M|}
_ZNK8simdjson8fallback8ondemand13json_iterator9streamingEv:
  192|  3.68k|simdjson_inline bool json_iterator::streaming() const noexcept {
  193|  3.68k|  return _streaming;
  194|  3.68k|}
_ZNK8simdjson8fallback8ondemand13json_iterator9peek_lastEv:
  321|  3.68k|simdjson_inline const uint8_t *json_iterator::peek_last() const noexcept {
  322|  3.68k|  return token.peek(last_position());
  323|  3.68k|}
_ZNK8simdjson8fallback8ondemand13json_iterator13last_positionEv:
  313|  3.68k|simdjson_inline token_position json_iterator::last_position() const noexcept {
  314|       |  // The following line fails under some compilers...
  315|       |  // SIMDJSON_ASSUME(parser->implementation->n_structural_indexes > 0);
  316|       |  // since it has side-effects.
  317|  3.68k|  uint32_t n_structural_indexes{parser->implementation->n_structural_indexes};
  318|  3.68k|  SIMDJSON_ASSUME(n_structural_indexes > 0);
  ------------------
  |  |  199|  3.68k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 3.68k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
  319|  3.68k|  return &parser->implementation->structural_indexes[n_structural_indexes - 1];
  320|  3.68k|}
_ZN8simdjson8fallback8ondemand13json_iterator7abandonEv:
  260|    862|simdjson_inline void json_iterator::abandon() noexcept {
  261|    862|  parser = nullptr;
  262|    862|  _depth = 0;
  263|    862|}
_ZN8simdjson8fallback8ondemand13json_iterator12report_errorENS_10error_codeEPKc:
  345|    862|simdjson_inline error_code json_iterator::report_error(error_code _error, const char *message) noexcept {
  346|    862|  SIMDJSON_ASSUME(_error != SUCCESS && _error != UNINITIALIZED && _error != INCORRECT_TYPE && _error != NO_SUCH_FIELD);
  ------------------
  |  |  199|  5.17k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:42): [True: 862, False: 0]
  |  |  |  Branch (199:42): [True: 862, False: 0]
  |  |  |  Branch (199:42): [True: 862, False: 0]
  |  |  |  Branch (199:42): [True: 862, False: 0]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
  347|    862|  logger::log_error(*this, message);
  348|    862|  error = _error;
  349|    862|  return error;
  350|    862|}
_ZNK8simdjson8fallback8ondemand13json_iterator12end_positionEv:
  227|  4.91M|simdjson_inline token_position json_iterator::end_position() const noexcept {
  228|  4.91M|  uint32_t n_structural_indexes{parser->implementation->n_structural_indexes};
  229|  4.91M|  return &parser->implementation->structural_indexes[n_structural_indexes];
  230|  4.91M|}
_ZN8simdjson8fallback8ondemand13json_iterator9ascend_toEi:
  325|  30.8k|simdjson_inline void json_iterator::ascend_to(depth_t parent_depth) noexcept {
  326|  30.8k|  SIMDJSON_ASSUME(parent_depth >= 0 && parent_depth < INT32_MAX - 1);
  ------------------
  |  |  199|  61.6k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:42): [True: 30.8k, False: 0]
  |  |  |  Branch (199:42): [True: 30.8k, False: 0]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
  327|  30.8k|  SIMDJSON_ASSUME(_depth == parent_depth + 1);
  ------------------
  |  |  199|  30.8k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 30.8k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
  328|  30.8k|  _depth = parent_depth;
  329|  30.8k|}
_ZN8simdjson8fallback8ondemand13json_iterator10descend_toEi:
  331|  64.7k|simdjson_inline void json_iterator::descend_to(depth_t child_depth) noexcept {
  332|  64.7k|  SIMDJSON_ASSUME(child_depth >= 1 && child_depth < INT32_MAX);
  ------------------
  |  |  199|   129k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:42): [True: 64.7k, False: 0]
  |  |  |  Branch (199:42): [True: 64.7k, False: 0]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
  333|  64.7k|  SIMDJSON_ASSUME(_depth == child_depth - 1);
  ------------------
  |  |  199|  64.7k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 64.7k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
  334|  64.7k|  _depth = child_depth;
  335|  64.7k|}
_ZN8simdjson8fallback8ondemand13json_iterator8unescapeENS1_15raw_json_stringEb:
  356|  1.65k|simdjson_inline simdjson_result<std::string_view> json_iterator::unescape(raw_json_string in, bool allow_replacement) noexcept {
  357|       |#if SIMDJSON_DEVELOPMENT_CHECKS
  358|       |  auto result = parser->unescape(in, _string_buf_loc, allow_replacement);
  359|       |  SIMDJSON_ASSUME(!parser->string_buffer_overflow(_string_buf_loc));
  360|       |  return result;
  361|       |#else
  362|  1.65k|  return parser->unescape(in, _string_buf_loc, allow_replacement);
  363|  1.65k|#endif
  364|  1.65k|}
_ZN8simdjson8fallback8ondemand13json_iterator10skip_childEi:
  107|  63.2k|simdjson_warn_unused simdjson_inline error_code json_iterator::skip_child(depth_t parent_depth) noexcept {
  108|  63.2k|  if (depth() <= parent_depth) { return SUCCESS; }
  ------------------
  |  Branch (108:7): [True: 27.9k, False: 35.2k]
  ------------------
  109|  35.2k|  switch (*return_current_and_advance()) {
  110|       |    // TODO consider whether matching braces is a requirement: if non-matching braces indicates
  111|       |    // *missing* braces, then future lookups are not in the object/arrays they think they are,
  112|       |    // violating the rule "validate enough structure that the user can be confident they are
  113|       |    // looking at the right values."
  114|       |    // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth
  115|       |
  116|       |    // For the first open array/object in a value, we've already incremented depth, so keep it the same
  117|       |    // We never stop at colon, but if we did, it wouldn't affect depth
  118|  3.12k|    case '[': case '{': case ':':
  ------------------
  |  Branch (118:5): [True: 1.31k, False: 33.9k]
  |  Branch (118:15): [True: 940, False: 34.3k]
  |  Branch (118:25): [True: 869, False: 34.4k]
  ------------------
  119|  3.12k|      logger::log_start_value(*this, "skip");
  120|  3.12k|      break;
  121|       |    // If there is a comma, we have just finished a value in an array/object, and need to get back in
  122|  1.42k|    case ',':
  ------------------
  |  Branch (122:5): [True: 1.42k, False: 33.8k]
  ------------------
  123|  1.42k|      logger::log_value(*this, "skip");
  124|  1.42k|      break;
  125|       |    // ] or } means we just finished a value and need to jump out of the array/object
  126|  6.96k|    case ']': case '}':
  ------------------
  |  Branch (126:5): [True: 4.06k, False: 31.2k]
  |  Branch (126:15): [True: 2.90k, False: 32.3k]
  ------------------
  127|  6.96k|      logger::log_end_value(*this, "skip");
  128|  6.96k|      _depth--;
  129|  6.96k|      if (depth() <= parent_depth) { return SUCCESS; }
  ------------------
  |  Branch (129:11): [True: 6.41k, False: 547]
  ------------------
  130|       |#if SIMDJSON_CHECK_EOF
  131|       |      // If there are no more tokens, the parent is incomplete.
  132|       |      if (at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "Missing [ or { at start"); }
  133|       |#endif // SIMDJSON_CHECK_EOF
  134|    547|      break;
  135|  1.00k|    case '"':
  ------------------
  |  Branch (135:5): [True: 1.00k, False: 34.2k]
  ------------------
  136|  1.00k|      if(*peek() == ':') {
  ------------------
  |  Branch (136:10): [True: 541, False: 459]
  ------------------
  137|       |        // We are at a key!!!
  138|       |        // This might happen if you just started an object and you skip it immediately.
  139|       |        // Performance note: it would be nice to get rid of this check as it is somewhat
  140|       |        // expensive.
  141|       |        // https://github.com/simdjson/simdjson/issues/1742
  142|    541|        logger::log_value(*this, "key");
  143|    541|        return_current_and_advance(); // eat up the ':'
  144|    541|        break; // important!!!
  145|    541|      }
  146|    459|      simdjson_fallthrough;
  ------------------
  |  |  305|    459|# define simdjson_fallthrough [[fallthrough]]
  ------------------
  147|       |    // Anything else must be a scalar value
  148|  23.2k|    default:
  ------------------
  |  Branch (148:5): [True: 22.7k, False: 12.5k]
  ------------------
  149|       |      // For the first scalar, we will have incremented depth already, so we decrement it here.
  150|  23.2k|      logger::log_value(*this, "skip");
  151|  23.2k|      _depth--;
  152|  23.2k|      if (depth() <= parent_depth) { return SUCCESS; }
  ------------------
  |  Branch (152:11): [True: 22.6k, False: 601]
  ------------------
  153|    601|      break;
  154|  35.2k|  }
  155|       |
  156|       |  // Now that we've considered the first value, we only increment/decrement for arrays/objects
  157|  4.90M|  while (position() < end_position()) {
  ------------------
  |  Branch (157:10): [True: 4.90M, False: 141]
  ------------------
  158|  4.90M|    switch (*return_current_and_advance()) {
  159|  4.89M|      case '[': case '{':
  ------------------
  |  Branch (159:7): [True: 180k, False: 4.72M]
  |  Branch (159:17): [True: 4.70M, False: 198k]
  ------------------
  160|  4.89M|        logger::log_start_value(*this, "skip");
  161|  4.89M|        _depth++;
  162|  4.89M|        break;
  163|       |      // TODO consider whether matching braces is a requirement: if non-matching braces indicates
  164|       |      // *missing* braces, then future lookups are not in the object/arrays they think they are,
  165|       |      // violating the rule "validate enough structure that the user can be confident they are
  166|       |      // looking at the right values."
  167|       |      // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth
  168|  9.41k|      case ']': case '}':
  ------------------
  |  Branch (168:7): [True: 6.75k, False: 4.90M]
  |  Branch (168:17): [True: 2.66k, False: 4.90M]
  ------------------
  169|  9.41k|        logger::log_end_value(*this, "skip");
  170|  9.41k|        _depth--;
  171|  9.41k|        if (depth() <= parent_depth) { return SUCCESS; }
  ------------------
  |  Branch (171:13): [True: 6.08k, False: 3.32k]
  ------------------
  172|  3.32k|        break;
  173|  7.67k|      default:
  ------------------
  |  Branch (173:7): [True: 7.67k, False: 4.89M]
  ------------------
  174|  7.67k|        logger::log_value(*this, "skip", "");
  175|  7.67k|        break;
  176|  4.90M|    }
  177|  4.90M|  }
  178|       |
  179|    141|  return report_error(TAPE_ERROR, "not enough close braces");
  180|  6.23k|}

_ZN8simdjson8fallback8ondemand13json_iteratorC2Ev:
   65|  1.20k|  simdjson_inline json_iterator() noexcept = default;

fuzz_ondemand.cpp:_ZN8simdjson8fallback8ondemand6loggerL15log_start_valueERKNS1_13json_iteratorEPKcii:
   83|  4.89M|inline void log_start_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept {
   84|  4.89M|  log_line(iter, "+", type, "", delta, depth_delta, log_level::info);
   85|  4.89M|  if (LOG_ENABLED) { log_depth++; }
  ------------------
  |  Branch (85:7): [Folded - Ignored]
  ------------------
   86|  4.89M|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback8ondemand6loggerL8log_lineIJEEEvRKNS1_13json_iteratorEPKcS8_NSt3__117basic_string_viewIcNS9_11char_traitsIcEEEEiiNS2_9log_levelEDpOT_:
  174|  5.01M|inline void log_line(const json_iterator &iter, const char *title_prefix, const char *title, std::string_view detail, int delta, int depth_delta, log_level level, Args&&... args) noexcept {
  175|  5.01M|  log_line(iter, iter.position()+delta, depth_t(iter.depth()+depth_delta), title_prefix, title, detail, level, std::forward<Args>(args)...);
  176|  5.01M|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback8ondemand6loggerL8log_lineIJEEEvRKNS1_13json_iteratorEPKjiPKcSA_NSt3__117basic_string_viewIcNSB_11char_traitsIcEEEENS2_9log_levelEDpOT_:
  179|  5.11M|inline void log_line(const json_iterator &iter, token_position index, depth_t depth, const char *title_prefix, const char *title, std::string_view detail, log_level level, Args&&... args) noexcept {
  180|  5.11M|  if (LOG_ENABLED) {
  ------------------
  |  Branch (180:7): [Folded - Ignored]
  ------------------
  181|      0|    if (simdjson_unlikely(should_log(level))) {
  ------------------
  |  |  106|      0|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  182|      0|      const int indent = depth * 2;
  183|      0|      const auto buf = iter.token.buf;
  184|      0|      auto msg = string_format(title, std::forward<Args>(args)...);
  185|      0|      printf("| %*s%s%-*s ", indent, "", title_prefix,
  186|      0|             LOG_EVENT_LEN - indent - int(strlen(title_prefix)), msg.c_str());
  187|      0|      {
  188|       |        // Print the current structural.
  189|      0|        printf("| ");
  190|       |        // Before we begin, the index might point right before the document.
  191|       |        // This could be unsafe, see https://github.com/simdjson/simdjson/discussions/1938
  192|      0|        if (index < iter._root) {
  ------------------
  |  Branch (192:13): [True: 0, False: 0]
  ------------------
  193|      0|          printf("%*s", LOG_BUFFER_LEN, "");
  194|      0|        } else {
  195|      0|          auto current_structural = &buf[*index];
  196|      0|          for (int i = 0; i < LOG_BUFFER_LEN; i++) {
  ------------------
  |  Branch (196:27): [True: 0, False: 0]
  ------------------
  197|      0|            printf("%c", printable_char(current_structural[i]));
  198|      0|          }
  199|      0|        }
  200|      0|        printf(" ");
  201|      0|      }
  202|      0|      {
  203|       |        // Print the next structural.
  204|      0|        printf("| ");
  205|      0|        auto next_structural = &buf[*(index + 1)];
  206|      0|        for (int i = 0; i < LOG_SMALL_BUFFER_LEN; i++) {
  ------------------
  |  Branch (206:25): [True: 0, False: 0]
  ------------------
  207|      0|          printf("%c", printable_char(next_structural[i]));
  208|      0|        }
  209|      0|        printf(" ");
  210|      0|      }
  211|       |      // printf("| %5u ", *(index+1));
  212|      0|      printf("| %5i ", depth);
  213|      0|      printf("| %6.*s ", int(detail.size()), detail.data());
  214|      0|      printf("|\n");
  215|      0|      fflush(stdout);
  216|      0|    }
  217|      0|  }
  218|  5.11M|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback8ondemand6loggerL11log_headersEv:
  120|  3.86k|inline void log_headers() noexcept {
  121|  3.86k|  if (LOG_ENABLED) {
  ------------------
  |  Branch (121:7): [Folded - Ignored]
  ------------------
  122|      0|    if (simdjson_unlikely(should_log(log_level::info))) {
  ------------------
  |  |  106|      0|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  123|       |      // Technically a static variable is not thread-safe, but if you are using threads and logging... well...
  124|      0|      static bool displayed_hint{false};
  125|      0|      log_depth = 0;
  126|      0|      printf("\n");
  127|      0|      if (!displayed_hint) {
  ------------------
  |  Branch (127:11): [True: 0, False: 0]
  ------------------
  128|       |        // We only print this helpful header once.
  129|      0|        printf("# Logging provides the depth and position of the iterator user-visible steps:\n");
  130|      0|        printf("# +array says 'this is where we were when we discovered the start array'\n");
  131|      0|        printf(
  132|      0|            "# -array says 'this is where we were when we ended the array'\n");
  133|      0|        printf("# skip says 'this is a structural or value I am skipping'\n");
  134|      0|        printf("# +/-skip says 'this is a start/end array or object I am skipping'\n");
  135|      0|        printf("#\n");
  136|      0|        printf("# The indentation of the terms (array, string,...) indicates the depth,\n");
  137|      0|        printf("# in addition to the depth being displayed.\n");
  138|      0|        printf("#\n");
  139|      0|        printf("# Every token in the document has a single depth determined by the tokens before it,\n");
  140|      0|        printf("# and is not affected by what the token actually is.\n");
  141|      0|        printf("#\n");
  142|      0|        printf("# Not all structural elements are presented as tokens in the logs.\n");
  143|      0|        printf("#\n");
  144|      0|        printf("# We never give control to the user within an empty array or an empty object.\n");
  145|      0|        printf("#\n");
  146|      0|        printf("# Inside an array, having a depth greater than the array's depth means that\n");
  147|      0|        printf("# we are pointing inside a value.\n");
  148|      0|        printf("# Having a depth equal to the array means that we are pointing right before a value.\n");
  149|      0|        printf("# Having a depth smaller than the array means that we have moved beyond the array.\n");
  150|      0|        displayed_hint = true;
  151|      0|      }
  152|      0|      printf("\n");
  153|      0|      printf("| %-*s ", LOG_EVENT_LEN, "Event");
  154|      0|      printf("| %-*s ", LOG_BUFFER_LEN, "Buffer");
  155|      0|      printf("| %-*s ", LOG_SMALL_BUFFER_LEN, "Next");
  156|       |      // printf("| %-*s ", 5,                    "Next#");
  157|      0|      printf("| %-*s ", 5, "Depth");
  158|      0|      printf("| Detail ");
  159|      0|      printf("|\n");
  160|       |
  161|      0|      printf("|%.*s", LOG_EVENT_LEN + 2, DASHES);
  162|      0|      printf("|%.*s", LOG_BUFFER_LEN + 2, DASHES);
  163|      0|      printf("|%.*s", LOG_SMALL_BUFFER_LEN + 2, DASHES);
  164|       |      // printf("|%.*s", 5+2, DASHES);
  165|      0|      printf("|%.*s", 5 + 2, DASHES);
  166|      0|      printf("|--------");
  167|      0|      printf("|\n");
  168|      0|      fflush(stdout);
  169|      0|    }
  170|      0|  }
  171|  3.86k|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback8ondemand6loggerL15log_start_valueERKNS1_13json_iteratorEPKjiPKcNSt3__117basic_string_viewIcNSA_11char_traitsIcEEEE:
   79|  11.1k|inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept {
   80|  11.1k|  log_line(iter, index, depth, "+", type, detail, log_level::info);
   81|  11.1k|  if (LOG_ENABLED) { log_depth++; }
  ------------------
  |  Branch (81:7): [Folded - Ignored]
  ------------------
   82|  11.1k|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback8ondemand6loggerL9log_errorERKNS1_13json_iteratorEPKjiPKcS9_:
   96|  6.20k|inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail) noexcept {
   97|  6.20k|  log_line(iter, index, depth, "ERROR: ", error, detail, log_level::error);
   98|  6.20k|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback8ondemand6loggerL9log_errorERKNS1_13json_iteratorEPKcS7_ii:
   93|    862|inline void log_error(const json_iterator &iter, const char *error, const char *detail, int delta, int depth_delta) noexcept {
   94|    862|  log_line(iter, "ERROR: ", error, detail, delta, depth_delta, log_level::error);
   95|    862|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback8ondemand6loggerL9log_valueERKNS1_13json_iteratorEPKcNSt3__117basic_string_viewIcNS8_11char_traitsIcEEEEii:
   75|  34.2k|inline void log_value(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept {
   76|  34.2k|  log_line(iter, "", type, detail, delta, depth_delta, log_level::info);
   77|  34.2k|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback8ondemand6loggerL9log_valueERKNS1_13json_iteratorEPKjiPKcNSt3__117basic_string_viewIcNSA_11char_traitsIcEEEE:
   72|  81.8k|inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept {
   73|  81.8k|  log_line(iter, index, depth, "", type, detail, log_level::info);
   74|  81.8k|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback8ondemand6loggerL13log_end_valueERKNS1_13json_iteratorEPKcii:
   88|  19.5k|inline void log_end_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept {
   89|  19.5k|  if (LOG_ENABLED) { log_depth--; }
  ------------------
  |  Branch (89:7): [Folded - Ignored]
  ------------------
   90|  19.5k|  log_line(iter, "-", type, "", delta, depth_delta, log_level::info);
   91|  19.5k|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback8ondemand6loggerL9log_eventERKNS1_14value_iteratorEPKcNSt3__117basic_string_viewIcNS8_11char_traitsIcEEEEii:
  100|  63.1k|inline void log_event(const value_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept {
  101|  63.1k|  log_event(iter.json_iter(), type, detail, delta, depth_delta);
  102|  63.1k|}
fuzz_ondemand.cpp:_ZN8simdjson8fallback8ondemand6loggerL9log_eventERKNS1_13json_iteratorEPKcNSt3__117basic_string_viewIcNS8_11char_traitsIcEEEEii:
   68|  63.1k|inline void log_event(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept {
   69|  63.1k|  log_line(iter, "", type, detail, delta, depth_delta, log_level::info);
   70|  63.1k|}

_ZN8simdjson15simdjson_resultINS_8fallback8ondemand6objectEEC2ENS_10error_codeE:
  207|    650|    : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::object>(error) {}
_ZN8simdjson8fallback8ondemand6object5startERNS1_14value_iteratorE:
   61|  1.41k|simdjson_inline simdjson_result<object> object::start(value_iterator &iter) noexcept {
   62|  1.41k|  SIMDJSON_TRY( iter.start_object().error() );
  ------------------
  |  |  273|  1.41k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 587, False: 831]
  |  |  ------------------
  ------------------
   63|    831|  return object(iter);
   64|  1.41k|}
_ZN8simdjson8fallback8ondemand6objectC2ERKNS1_14value_iteratorE:
  113|    831|  : iter{_iter}
  114|    831|{
  115|    831|}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand6objectEEC2EOS3_:
  205|    831|    : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::object>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::object>(value)) {}

_ZN8simdjson8fallback8ondemand6objectC2Ev:
   24|    650|  simdjson_inline object() noexcept = default;

_ZN8simdjson8fallback8ondemand6parserC2Em:
   21|  5.07k|  : _max_capacity{max_capacity} {
   22|  5.07k|}
_ZNR8simdjson8fallback8ondemand6parser7iterateENS_18padded_string_viewE:
   51|  5.07k|simdjson_warn_unused simdjson_inline simdjson_result<document> parser::iterate(padded_string_view json) & noexcept {
   52|  5.07k|  if (json.padding() < SIMDJSON_PADDING) { return INSUFFICIENT_PADDING; }
  ------------------
  |  Branch (52:7): [True: 0, False: 5.07k]
  ------------------
   53|       |
   54|  5.07k|  json.remove_utf8_bom();
   55|       |
   56|       |  // Allocate if needed
   57|  5.07k|  if (capacity() < json.length() || !string_buf) {
  ------------------
  |  Branch (57:7): [True: 4.94k, False: 131]
  |  Branch (57:37): [True: 131, False: 0]
  ------------------
   58|  5.07k|    SIMDJSON_TRY( allocate(json.length(), max_depth()) );
  ------------------
  |  |  273|  5.07k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 5.07k]
  |  |  ------------------
  ------------------
   59|  5.07k|  }
   60|       |
   61|       |  // Run stage 1.
   62|  5.07k|  SIMDJSON_TRY( implementation->stage1(reinterpret_cast<const uint8_t *>(json.data()), json.length(), stage1_mode::regular) );
  ------------------
  |  |  273|  5.07k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 1.20k, False: 3.86k]
  |  |  ------------------
  ------------------
   63|  3.86k|  return document::start({ reinterpret_cast<const uint8_t *>(json.data()), this });
   64|  5.07k|}
_ZNK8simdjson8fallback8ondemand6parser8capacityEv:
  158|  5.07k|simdjson_pure simdjson_inline size_t parser::capacity() const noexcept {
  159|  5.07k|  return _capacity;
  160|  5.07k|}
_ZN8simdjson8fallback8ondemand6parser8allocateEmm:
   24|  5.07k|simdjson_warn_unused simdjson_inline error_code parser::allocate(size_t new_capacity, size_t new_max_depth) noexcept {
   25|  5.07k|  if (new_capacity > max_capacity()) { return CAPACITY; }
  ------------------
  |  Branch (25:7): [True: 0, False: 5.07k]
  ------------------
   26|  5.07k|  if (string_buf && new_capacity == capacity() && new_max_depth == max_depth()) { return SUCCESS; }
  ------------------
  |  Branch (26:7): [True: 0, False: 5.07k]
  |  Branch (26:21): [True: 0, False: 0]
  |  Branch (26:51): [True: 0, False: 0]
  ------------------
   27|       |
   28|       |  // string_capacity copied from document::allocate
   29|  5.07k|  _capacity = 0;
   30|  5.07k|  size_t string_capacity = SIMDJSON_ROUNDUP_N(5 * new_capacity / 3 + SIMDJSON_PADDING, 64);
  ------------------
  |  |   47|  5.07k|#define SIMDJSON_ROUNDUP_N(a, n) (((a) + ((n)-1)) & ~((n)-1))
  ------------------
   31|  5.07k|  string_buf.reset(new (std::nothrow) uint8_t[string_capacity]);
   32|       |#if SIMDJSON_DEVELOPMENT_CHECKS
   33|       |  start_positions.reset(new (std::nothrow) token_position[new_max_depth]);
   34|       |#endif
   35|  5.07k|  if (implementation) {
  ------------------
  |  Branch (35:7): [True: 0, False: 5.07k]
  ------------------
   36|      0|    SIMDJSON_TRY( implementation->set_capacity(new_capacity) );
  ------------------
  |  |  273|      0|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   37|      0|    SIMDJSON_TRY( implementation->set_max_depth(new_max_depth) );
  ------------------
  |  |  273|      0|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   38|  5.07k|  } else {
   39|  5.07k|    SIMDJSON_TRY( simdjson::get_active_implementation()->create_dom_parser_implementation(new_capacity, new_max_depth, implementation) );
  ------------------
  |  |  273|  5.07k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 5.07k]
  |  |  ------------------
  ------------------
   40|  5.07k|  }
   41|  5.07k|  _capacity = new_capacity;
   42|  5.07k|  _max_depth = new_max_depth;
   43|  5.07k|  return SUCCESS;
   44|  5.07k|}
_ZNK8simdjson8fallback8ondemand6parser12max_capacityEv:
  161|  5.07k|simdjson_pure simdjson_inline size_t parser::max_capacity() const noexcept {
  162|  5.07k|  return _max_capacity;
  163|  5.07k|}
_ZNK8simdjson8fallback8ondemand6parser9max_depthEv:
  164|  5.07k|simdjson_pure simdjson_inline size_t parser::max_depth() const noexcept {
  165|  5.07k|  return _max_depth;
  166|  5.07k|}
_ZNK8simdjson8fallback8ondemand6parser8unescapeENS1_15raw_json_stringERPhb:
  176|  1.65k|simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> parser::unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement) const noexcept {
  177|  1.65k|  uint8_t *end = implementation->parse_string(in.buf, dst, allow_replacement);
  178|  1.65k|  if (!end) { return STRING_ERROR; }
  ------------------
  |  Branch (178:7): [True: 1.17k, False: 483]
  ------------------
  179|    483|  std::string_view result(reinterpret_cast<const char *>(dst), end-dst);
  180|    483|  dst = end;
  181|    483|  return result;
  182|  1.65k|}

_ZN8simdjson8fallback8ondemand6parserD2Ev:
   51|  5.07k|  inline ~parser() noexcept = default;

_ZN8simdjson15simdjson_resultINS_8fallback8ondemand15raw_json_stringEEC2ENS_10error_codeE:
  190|  1.31k|    : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>(error) {}
_ZN8simdjson8fallback8ondemand15raw_json_stringC2EPKh:
   16|  1.88k|simdjson_inline raw_json_string::raw_json_string(const uint8_t * _buf) noexcept : buf{_buf} {}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand15raw_json_stringEEC2EOS3_:
  188|  1.88k|    : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>(value)) {}
_ZNK8simdjson15simdjson_resultINS_8fallback8ondemand15raw_json_stringEE8unescapeERNS2_13json_iteratorEb:
  196|  2.23k|simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>::unescape(SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &iter, bool allow_replacement) const noexcept {
  197|  2.23k|  if (error()) { return error(); }
  ------------------
  |  Branch (197:7): [True: 582, False: 1.65k]
  ------------------
  198|  1.65k|  return first.unescape(iter, allow_replacement);
  199|  2.23k|}
_ZNK8simdjson8fallback8ondemand15raw_json_string8unescapeERNS1_13json_iteratorEb:
  159|  1.65k|simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> raw_json_string::unescape(json_iterator &iter, bool allow_replacement) const noexcept {
  160|  1.65k|  return iter.unescape(*this, allow_replacement);
  161|  1.65k|}

_ZN8simdjson8fallback8ondemand15raw_json_stringC2Ev:
   43|  1.31k|  simdjson_inline raw_json_string() noexcept = default;

_ZNK8simdjson8fallback8ondemand14token_iterator8positionEv:
   55|  10.0M|simdjson_inline token_position token_iterator::position() const noexcept {
   56|  10.0M|  return _position;
   57|  10.0M|}
_ZN8simdjson8fallback8ondemand14token_iteratorC2EPKhPKj:
   17|  3.86k|) noexcept : buf{_buf}, _position{position}
   18|  3.86k|{
   19|  3.86k|}
_ZNK8simdjson8fallback8ondemand14token_iterator4peekEPKj:
   30|  7.32k|simdjson_inline const uint8_t *token_iterator::peek(token_position position) const noexcept {
   31|  7.32k|  return &buf[*position];
   32|  7.32k|}
_ZNK8simdjson8fallback8ondemand14token_iterator4peekEi:
   45|  75.0k|simdjson_inline const uint8_t *token_iterator::peek(int32_t delta) const noexcept {
   46|  75.0k|  return &buf[*(_position+delta)];
   47|  75.0k|}
_ZN8simdjson8fallback8ondemand14token_iterator26return_current_and_advanceEv:
   26|  5.04M|simdjson_inline const uint8_t *token_iterator::return_current_and_advance() noexcept {
   27|  5.04M|  return &buf[*(_position++)];
   28|  5.04M|}

_ZN8simdjson8fallback8ondemand14token_iteratorC2Ev:
   27|  1.20k|  simdjson_inline token_iterator() noexcept = default;

_ZN8simdjson15simdjson_resultINS_8fallback8ondemand5valueEEC2ENS_10error_codeE:
  316|  2.72k|    implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::value>(error)
  317|  2.72k|{
  318|  2.72k|}
_ZN8simdjson8fallback8ondemand5valueC2ERKNS1_14value_iteratorE:
   20|  63.4k|  : iter{_iter}
   21|  63.4k|{
   22|  63.4k|}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand5valueEEC2EOS3_:
  308|  63.4k|    implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::value>(
  309|  63.4k|      std::forward<SIMDJSON_IMPLEMENTATION::ondemand::value>(value)
  310|  63.4k|    )
  311|  63.4k|{
  312|  63.4k|}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand5valueEE10get_stringEb:
  399|  2.36k|simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_string(bool allow_replacement) noexcept {
  400|  2.36k|  if (error()) { return error(); }
  ------------------
  |  Branch (400:7): [True: 124, False: 2.23k]
  ------------------
  401|  2.23k|  return first.get_string(allow_replacement);
  402|  2.36k|}
_ZN8simdjson8fallback8ondemand5value10get_stringEb:
   47|  2.23k|simdjson_inline simdjson_result<std::string_view> value::get_string(bool allow_replacement) noexcept {
   48|  2.23k|  return iter.get_string(allow_replacement);
   49|  2.23k|}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand5valueEE8get_boolEv:
  416|    910|simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_bool() noexcept {
  417|    910|  if (error()) { return error(); }
  ------------------
  |  Branch (417:7): [True: 78, False: 832]
  ------------------
  418|    832|  return first.get_bool();
  419|    910|}
_ZN8simdjson8fallback8ondemand5value8get_boolEv:
   75|    832|simdjson_inline simdjson_result<bool> value::get_bool() noexcept {
   76|    832|  return iter.get_bool();
   77|    832|}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand5valueEE9get_arrayEv:
  367|  1.31k|simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_array() noexcept {
  368|  1.31k|  if (error()) { return error(); }
  ------------------
  |  Branch (368:7): [True: 69, False: 1.24k]
  ------------------
  369|  1.24k|  return first.get_array();
  370|  1.31k|}
_ZN8simdjson8fallback8ondemand5value9get_arrayEv:
   30|  5.82k|simdjson_inline simdjson_result<array> value::get_array() noexcept {
   31|  5.82k|  return array::start(iter);
   32|  5.82k|}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand5valueEE9get_int64Ev:
  383|  1.72k|simdjson_inline simdjson_result<int64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_int64() noexcept {
  384|  1.72k|  if (error()) { return error(); }
  ------------------
  |  Branch (384:7): [True: 27, False: 1.69k]
  ------------------
  385|  1.69k|  return first.get_int64();
  386|  1.72k|}
_ZN8simdjson8fallback8ondemand5value9get_int64Ev:
   69|  1.69k|simdjson_inline simdjson_result<int64_t> value::get_int64() noexcept {
   70|  1.69k|  return iter.get_int64();
   71|  1.69k|}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand5valueEE10get_doubleEv:
  391|  37.8k|simdjson_inline simdjson_result<double> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_double() noexcept {
  392|  37.8k|  if (error()) { return error(); }
  ------------------
  |  Branch (392:7): [True: 96, False: 37.7k]
  ------------------
  393|  37.7k|  return first.get_double();
  394|  37.8k|}
_ZN8simdjson8fallback8ondemand5value10get_doubleEv:
   57|  37.7k|simdjson_inline simdjson_result<double> value::get_double() noexcept {
   58|  37.7k|  return iter.get_double();
   59|  37.7k|}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand5valueEE10get_objectEv:
  371|  1.48k|simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_object() noexcept {
  372|  1.48k|  if (error()) { return error(); }
  ------------------
  |  Branch (372:7): [True: 63, False: 1.41k]
  ------------------
  373|  1.41k|  return first.get_object();
  374|  1.48k|}
_ZN8simdjson8fallback8ondemand5value10get_objectEv:
   33|  1.41k|simdjson_inline simdjson_result<object> value::get_object() noexcept {
   34|  1.41k|  return object::start(iter);
   35|  1.41k|}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand5valueEE10get_uint64Ev:
  375|  2.79k|simdjson_inline simdjson_result<uint64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_uint64() noexcept {
  376|  2.79k|  if (error()) { return error(); }
  ------------------
  |  Branch (376:7): [True: 35, False: 2.76k]
  ------------------
  377|  2.76k|  return first.get_uint64();
  378|  2.79k|}
_ZN8simdjson8fallback8ondemand5value10get_uint64Ev:
   63|  2.76k|simdjson_inline simdjson_result<uint64_t> value::get_uint64() noexcept {
   64|  2.76k|  return iter.get_uint64();
   65|  2.76k|}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand5valueEE19get_raw_json_stringEv:
  412|    957|simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_raw_json_string() noexcept {
  413|    957|  if (error()) { return error(); }
  ------------------
  |  Branch (413:7): [True: 31, False: 926]
  ------------------
  414|    926|  return first.get_raw_json_string();
  415|    957|}
_ZN8simdjson8fallback8ondemand5value19get_raw_json_stringEv:
   44|    926|simdjson_inline simdjson_result<raw_json_string> value::get_raw_json_string() noexcept {
   45|    926|  return iter.get_raw_json_string();
   46|    926|}
_ZN8simdjson15simdjson_resultINS_8fallback8ondemand5valueEE7is_nullEv:
  420|  11.3k|simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::is_null() noexcept {
  421|  11.3k|  if (error()) { return error(); }
  ------------------
  |  Branch (421:7): [True: 1.91k, False: 9.41k]
  ------------------
  422|  9.41k|  return first.is_null();
  423|  11.3k|}
_ZN8simdjson8fallback8ondemand5value7is_nullEv:
   78|  9.41k|simdjson_inline simdjson_result<bool> value::is_null() noexcept {
   79|  9.41k|  return iter.is_null();
   80|  9.41k|}
_ZNR8simdjson15simdjson_resultINS_8fallback8ondemand5valueEE5beginEv:
  331|  4.81k|simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::begin() & noexcept {
  332|  4.81k|  if (error()) { return error(); }
  ------------------
  |  Branch (332:7): [True: 241, False: 4.57k]
  ------------------
  333|  4.57k|  return first.begin();
  334|  4.81k|}
_ZNR8simdjson8fallback8ondemand5value5beginEv:
  134|  4.57k|simdjson_inline simdjson_result<array_iterator> value::begin() & noexcept {
  135|  4.57k|  return get_array().begin();
  136|  4.57k|}
_ZNR8simdjson15simdjson_resultINS_8fallback8ondemand5valueEE3endEv:
  335|  2.80k|simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::end() & noexcept {
  336|  2.80k|  if (error()) { return error(); }
  ------------------
  |  Branch (336:7): [True: 187, False: 2.62k]
  ------------------
  337|  2.62k|  return {};
  338|  2.80k|}

_ZN8simdjson8fallback8ondemand5valueC2Ev:
   28|  2.72k|  simdjson_inline value() noexcept = default;

_ZN8simdjson8fallback8ondemand14value_iteratorC2EPNS1_13json_iteratorEiPKj:
   22|  67.3k|) noexcept : _json_iter{json_iter}, _depth{depth}, _start_position{start_position}
   23|  67.3k|{
   24|  67.3k|}
_ZN8simdjson8fallback8ondemand14value_iterator16start_root_arrayEv:
  419|  3.86k|simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::start_root_array() noexcept {
  420|  3.86k|  SIMDJSON_TRY( start_container('[', "Not an array", "array") );
  ------------------
  |  |  273|  3.86k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 182, False: 3.68k]
  |  |  ------------------
  ------------------
  421|  3.68k|  return started_root_array();
  422|  3.86k|}
_ZN8simdjson8fallback8ondemand14value_iterator15start_containerEhPKcS4_:
  898|  11.1k|simdjson_inline error_code value_iterator::start_container(uint8_t start_char, const char *incorrect_type_message, const char *type) noexcept {
  899|  11.1k|  logger::log_start_value(*_json_iter, start_position(), depth(), type);
  900|       |  // If we're not at the position anymore, we don't want to advance the cursor.
  901|  11.1k|  const uint8_t *json;
  902|  11.1k|  if (!is_at_start()) {
  ------------------
  |  Branch (902:7): [True: 0, False: 11.1k]
  ------------------
  903|       |#if SIMDJSON_DEVELOPMENT_CHECKS
  904|       |    if (!is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; }
  905|       |#endif
  906|      0|    json = peek_start();
  907|      0|    if (*json != start_char) { return incorrect_type_error(incorrect_type_message); }
  ------------------
  |  Branch (907:9): [True: 0, False: 0]
  ------------------
  908|  11.1k|  } else {
  909|  11.1k|    assert_at_start();
  910|       |    /**
  911|       |     * We should be prudent. Let us peek. If it is not the right type, we
  912|       |     * return an error. Only once we have determined that we have the right
  913|       |     * type are we allowed to advance!
  914|       |     */
  915|  11.1k|    json = _json_iter->peek();
  916|  11.1k|    if (*json != start_char) { return incorrect_type_error(incorrect_type_message); }
  ------------------
  |  Branch (916:9): [True: 3.71k, False: 7.39k]
  ------------------
  917|  7.39k|    _json_iter->return_current_and_advance();
  918|  7.39k|  }
  919|       |
  920|       |
  921|  7.39k|  return SUCCESS;
  922|  11.1k|}
_ZNK8simdjson8fallback8ondemand14value_iterator14start_positionEv:
 1064|   192k|simdjson_inline token_position value_iterator::start_position() const noexcept {
 1065|   192k|  return _start_position;
 1066|   192k|}
_ZNK8simdjson8fallback8ondemand14value_iterator5depthEv:
  851|   390k|simdjson_warn_unused simdjson_inline depth_t value_iterator::depth() const noexcept {
  852|   390k|  return _depth;
  853|   390k|}
_ZNK8simdjson8fallback8ondemand14value_iterator11is_at_startEv:
  962|  92.9k|simdjson_inline bool value_iterator::is_at_start() const noexcept {
  963|  92.9k|  return position() == start_position();
  964|  92.9k|}
_ZNK8simdjson8fallback8ondemand14value_iterator8positionEv:
 1068|  92.9k|simdjson_inline token_position value_iterator::position() const noexcept {
 1069|  92.9k|  return _json_iter->position();
 1070|  92.9k|}
_ZNK8simdjson8fallback8ondemand14value_iterator20incorrect_type_errorEPKc:
  957|  6.20k|simdjson_inline error_code value_iterator::incorrect_type_error(const char *message) const noexcept {
  958|  6.20k|  logger::log_error(*_json_iter, start_position(), depth(), message);
  959|  6.20k|  return INCORRECT_TYPE;
  960|  6.20k|}
_ZNK8simdjson8fallback8ondemand14value_iterator15assert_at_startEv:
  979|  92.9k|inline void value_iterator::assert_at_start() const noexcept {
  980|  92.9k|  SIMDJSON_ASSUME( _json_iter->token._position == _start_position );
  ------------------
  |  |  199|  92.9k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 92.9k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
  981|  92.9k|  SIMDJSON_ASSUME( _json_iter->_depth == _depth );
  ------------------
  |  |  199|  92.9k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 92.9k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
  982|  92.9k|  SIMDJSON_ASSUME( _depth > 0 );
  ------------------
  |  |  199|  92.9k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 92.9k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
  983|  92.9k|}
_ZN8simdjson8fallback8ondemand14value_iterator18started_root_arrayEv:
  476|  3.68k|simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::started_root_array() noexcept {
  477|  3.68k|  auto error = check_root_array();
  478|  3.68k|  if (error) { return error; }
  ------------------
  |  Branch (478:7): [True: 44, False: 3.64k]
  ------------------
  479|  3.64k|  return started_array();
  480|  3.68k|}
_ZN8simdjson8fallback8ondemand14value_iterator16check_root_arrayEv:
  446|  3.68k|simdjson_warn_unused simdjson_inline error_code value_iterator::check_root_array() noexcept {
  447|       |  // When in streaming mode, we cannot expect peek_last() to be the last structural element of the
  448|       |  // current document. It only works in the normal mode where we have indexed a single document.
  449|       |  // Note that adding a check for 'streaming' is not expensive since we only have at most
  450|       |  // one root element.
  451|  3.68k|  if ( ! _json_iter->streaming() ) {
  ------------------
  |  Branch (451:8): [True: 3.68k, False: 0]
  ------------------
  452|       |    // The following lines do not fully protect against garbage content within the
  453|       |    // array: e.g., `[1, 2] foo]`. Users concerned with garbage content should
  454|       |    // also call `at_end()` on the document instance at the end of the processing to
  455|       |    // ensure that the processing has finished at the end.
  456|       |    //
  457|  3.68k|    if (*_json_iter->peek_last() != ']') {
  ------------------
  |  Branch (457:9): [True: 44, False: 3.64k]
  ------------------
  458|     44|      _json_iter->abandon();
  459|     44|      return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing ] at end");
  460|     44|    }
  461|       |    // If the last character is ] *and* the first gibberish character is also ']'
  462|       |    // then on-demand could accidentally go over. So we need additional checks.
  463|       |    // https://github.com/simdjson/simdjson/issues/1834
  464|       |    // Checking that the document is balanced requires a full scan which is potentially
  465|       |    // expensive, but it only happens in edge cases where the first padding character is
  466|       |    // a closing bracket.
  467|  3.64k|    if ((*_json_iter->peek(_json_iter->end_position()) == ']') && (!_json_iter->balanced())) {
  ------------------
  |  Branch (467:9): [True: 0, False: 3.64k]
  |  Branch (467:67): [True: 0, False: 0]
  ------------------
  468|      0|      _json_iter->abandon();
  469|       |      // The exact error would require more work. It will typically be an unclosed array.
  470|      0|      return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "the document is unbalanced");
  471|      0|    }
  472|  3.64k|  }
  473|  3.64k|  return SUCCESS;
  474|  3.68k|}
_ZN8simdjson8fallback8ondemand14value_iterator12report_errorENS_10error_codeEPKc:
 1080|    721|simdjson_inline error_code value_iterator::report_error(error_code error, const char *message) noexcept {
 1081|    721|  return _json_iter->report_error(error, message);
 1082|    721|}
_ZN8simdjson8fallback8ondemand14value_iterator13started_arrayEv:
  431|  6.52k|simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::started_array() noexcept {
  432|  6.52k|  assert_at_container_start();
  433|  6.52k|  if (*_json_iter->peek() == ']') {
  ------------------
  |  Branch (433:7): [True: 967, False: 5.55k]
  ------------------
  434|    967|    logger::log_value(*_json_iter, "empty array");
  435|    967|    _json_iter->return_current_and_advance();
  436|    967|    SIMDJSON_TRY( end_container() );
  ------------------
  |  |  273|    967|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 967]
  |  |  ------------------
  ------------------
  437|    967|    return false;
  438|    967|  }
  439|  5.55k|  _json_iter->descend_to(depth()+1);
  440|       |#if SIMDJSON_DEVELOPMENT_CHECKS
  441|       |  _json_iter->set_start_position(_depth, start_position());
  442|       |#endif
  443|  5.55k|  return true;
  444|  6.52k|}
_ZNK8simdjson8fallback8ondemand14value_iterator25assert_at_container_startEv:
  985|  7.35k|inline void value_iterator::assert_at_container_start() const noexcept {
  986|  7.35k|  SIMDJSON_ASSUME( _json_iter->token._position == _start_position + 1 );
  ------------------
  |  |  199|  7.35k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 7.35k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
  987|  7.35k|  SIMDJSON_ASSUME( _json_iter->_depth == _depth );
  ------------------
  |  |  199|  7.35k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 7.35k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
  988|  7.35k|  SIMDJSON_ASSUME( _depth > 0 );
  ------------------
  |  |  199|  7.35k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 7.35k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
  989|  7.35k|}
_ZN8simdjson8fallback8ondemand14value_iterator13end_containerEv:
   86|  4.56k|simdjson_warn_unused simdjson_inline error_code value_iterator::end_container() noexcept {
   87|       |#if SIMDJSON_CHECK_EOF
   88|       |    if (depth() > 1 && at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing parent ] or }"); }
   89|       |    // if (depth() <= 1 && !at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing [ or { at start"); }
   90|       |#endif // SIMDJSON_CHECK_EOF
   91|  4.56k|    _json_iter->ascend_to(depth()-1);
   92|  4.56k|    return SUCCESS;
   93|  4.56k|}
_ZNK8simdjson8fallback8ondemand14value_iterator15assert_is_validEv:
 1035|  5.62k|inline void value_iterator::assert_is_valid() const noexcept {
 1036|  5.62k|  SIMDJSON_ASSUME( _json_iter != nullptr );
  ------------------
  |  |  199|  5.62k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 5.62k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1037|  5.62k|}
_ZNK8simdjson8fallback8ondemand14value_iterator8is_validEv:
 1039|  72.6k|simdjson_inline bool value_iterator::is_valid() const noexcept {
 1040|  72.6k|  return _json_iter != nullptr;
 1041|  72.6k|}
_ZNK8simdjson8fallback8ondemand14value_iterator7is_openEv:
  829|  68.8k|simdjson_inline bool value_iterator::is_open() const noexcept {
  830|  68.8k|  return _json_iter->depth() >= depth();
  831|  68.8k|}
_ZNK8simdjson8fallback8ondemand14value_iterator5errorEv:
  854|   129k|simdjson_warn_unused simdjson_inline error_code value_iterator::error() const noexcept {
  855|   129k|  return _json_iter->error;
  856|   129k|}
_ZN8simdjson8fallback8ondemand14value_iterator7abandonEv:
  847|    818|simdjson_inline void value_iterator::abandon() noexcept {
  848|    818|  _json_iter->abandon();
  849|    818|}
_ZNK8simdjson8fallback8ondemand14value_iterator5childEv:
  819|  63.4k|simdjson_inline value_iterator value_iterator::child() const noexcept {
  820|  63.4k|  assert_at_child();
  821|  63.4k|  return { _json_iter, depth()+1, _json_iter->token.position() };
  822|  63.4k|}
_ZNK8simdjson8fallback8ondemand14value_iterator15assert_at_childEv:
 1019|  63.4k|inline void value_iterator::assert_at_child() const noexcept {
 1020|  63.4k|  SIMDJSON_ASSUME( _json_iter->token._position > _start_position );
  ------------------
  |  |  199|  63.4k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 63.4k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1021|  63.4k|  SIMDJSON_ASSUME( _json_iter->_depth == _depth + 1 );
  ------------------
  |  |  199|  63.4k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 63.4k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1022|  63.4k|  SIMDJSON_ASSUME( _depth > 0 );
  ------------------
  |  |  199|  63.4k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 63.4k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1023|  63.4k|}
_ZN8simdjson8fallback8ondemand14value_iterator10get_stringEb:
  513|  2.23k|simdjson_warn_unused simdjson_inline simdjson_result<std::string_view> value_iterator::get_string(bool allow_replacement) noexcept {
  514|  2.23k|  return get_raw_json_string().unescape(json_iter(), allow_replacement);
  515|  2.23k|}
_ZN8simdjson8fallback8ondemand14value_iterator19get_raw_json_stringEv:
  527|  3.16k|simdjson_warn_unused simdjson_inline simdjson_result<raw_json_string> value_iterator::get_raw_json_string() noexcept {
  528|  3.16k|  auto json = peek_scalar("string");
  529|  3.16k|  if (*json != '"') { return incorrect_type_error("Not a string"); }
  ------------------
  |  Branch (529:7): [True: 1.28k, False: 1.88k]
  ------------------
  530|  1.88k|  advance_scalar("string");
  531|  1.88k|  return raw_json_string(json+1);
  532|  3.16k|}
_ZN8simdjson8fallback8ondemand14value_iterator11peek_scalarEPKc:
  877|  3.16k|simdjson_inline const uint8_t *value_iterator::peek_scalar(const char *type) noexcept {
  878|  3.16k|  logger::log_value(*_json_iter, start_position(), depth(), type);
  879|       |  // If we're not at the position anymore, we don't want to advance the cursor.
  880|  3.16k|  if (!is_at_start()) { return peek_start(); }
  ------------------
  |  Branch (880:7): [True: 0, False: 3.16k]
  ------------------
  881|       |
  882|       |  // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value.
  883|  3.16k|  assert_at_start();
  884|  3.16k|  return _json_iter->peek();
  885|  3.16k|}
_ZN8simdjson8fallback8ondemand14value_iterator14advance_scalarEPKc:
  887|  1.88k|simdjson_inline void value_iterator::advance_scalar(const char *type) noexcept {
  888|  1.88k|  logger::log_value(*_json_iter, start_position(), depth(), type);
  889|       |  // If we're not at the position anymore, we don't want to advance the cursor.
  890|  1.88k|  if (!is_at_start()) { return; }
  ------------------
  |  Branch (890:7): [True: 0, False: 1.88k]
  ------------------
  891|       |
  892|       |  // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value.
  893|  1.88k|  assert_at_start();
  894|  1.88k|  _json_iter->return_current_and_advance();
  895|  1.88k|  _json_iter->ascend_to(depth()-1);
  896|  1.88k|}
_ZN8simdjson8fallback8ondemand14value_iterator9json_iterEv:
  863|  2.23k|simdjson_warn_unused simdjson_inline json_iterator &value_iterator::json_iter() noexcept {
  864|  2.23k|  return *_json_iter;
  865|  2.23k|}
_ZN8simdjson8fallback8ondemand14value_iterator8get_boolEv:
  563|    832|simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::get_bool() noexcept {
  564|    832|  auto result = parse_bool(peek_non_root_scalar("bool"));
  565|    832|  if(result.error() == SUCCESS) { advance_non_root_scalar("bool"); }
  ------------------
  |  Branch (565:6): [True: 391, False: 441]
  ------------------
  566|    832|  return result;
  567|    832|}
_ZNK8simdjson8fallback8ondemand14value_iterator10parse_boolEPKh:
  499|    832|simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::parse_bool(const uint8_t *json) const noexcept {
  500|    832|  auto not_true = atomparsing::str4ncmp(json, "true");
  501|    832|  auto not_false = atomparsing::str4ncmp(json, "fals") | (json[4] ^ 'e');
  502|    832|  bool error = (not_true && not_false) || jsoncharutils::is_not_structural_or_whitespace(json[not_true ? 5 : 4]);
  ------------------
  |  Branch (502:17): [True: 634, False: 198]
  |  Branch (502:29): [True: 440, False: 194]
  |  Branch (502:43): [True: 1, False: 391]
  |  Branch (502:95): [True: 194, False: 198]
  ------------------
  503|    832|  if (error) { return incorrect_type_error("Not a boolean"); }
  ------------------
  |  Branch (503:7): [True: 441, False: 391]
  ------------------
  504|    391|  return simdjson_result<bool>(!not_true);
  505|    832|}
_ZN8simdjson8fallback8ondemand14value_iterator20peek_non_root_scalarEPKc:
  932|  52.4k|simdjson_inline const uint8_t *value_iterator::peek_non_root_scalar(const char *type) noexcept {
  933|  52.4k|  logger::log_value(*_json_iter, start_position(), depth(), type);
  934|  52.4k|  if (!is_at_start()) { return peek_start(); }
  ------------------
  |  Branch (934:7): [True: 0, False: 52.4k]
  ------------------
  935|       |
  936|  52.4k|  assert_at_non_root_start();
  937|  52.4k|  return _json_iter->peek();
  938|  52.4k|}
_ZNK8simdjson8fallback8ondemand14value_iterator24assert_at_non_root_startEv:
 1030|  76.7k|inline void value_iterator::assert_at_non_root_start() const noexcept {
 1031|  76.7k|  assert_at_start();
 1032|  76.7k|  SIMDJSON_ASSUME( _depth > 1 );
  ------------------
  |  |  199|  76.7k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 76.7k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1033|  76.7k|}
_ZN8simdjson8fallback8ondemand14value_iterator23advance_non_root_scalarEPKc:
  948|  24.3k|simdjson_inline void value_iterator::advance_non_root_scalar(const char *type) noexcept {
  949|  24.3k|  logger::log_value(*_json_iter, start_position(), depth(), type);
  950|  24.3k|  if (!is_at_start()) { return; }
  ------------------
  |  Branch (950:7): [True: 0, False: 24.3k]
  ------------------
  951|       |
  952|  24.3k|  assert_at_non_root_start();
  953|  24.3k|  _json_iter->return_current_and_advance();
  954|  24.3k|  _json_iter->ascend_to(depth()-1);
  955|  24.3k|}
_ZN8simdjson8fallback8ondemand14value_iterator11start_arrayEv:
  414|  5.82k|simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::start_array() noexcept {
  415|  5.82k|  SIMDJSON_TRY( start_container('[', "Not an array", "array") );
  ------------------
  |  |  273|  5.82k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 2.94k, False: 2.88k]
  |  |  ------------------
  ------------------
  416|  2.88k|  return started_array();
  417|  5.82k|}
_ZN8simdjson8fallback8ondemand14value_iterator9get_int64Ev:
  543|  1.69k|simdjson_warn_unused simdjson_inline simdjson_result<int64_t> value_iterator::get_int64() noexcept {
  544|  1.69k|  auto result = numberparsing::parse_integer(peek_non_root_scalar("int64"));
  545|  1.69k|  if(result.error() == SUCCESS) { advance_non_root_scalar("int64"); }
  ------------------
  |  Branch (545:6): [True: 566, False: 1.13k]
  ------------------
  546|  1.69k|  return result;
  547|  1.69k|}
_ZN8simdjson8fallback8ondemand14value_iterator10get_doubleEv:
  553|  37.7k|simdjson_warn_unused simdjson_inline simdjson_result<double> value_iterator::get_double() noexcept {
  554|  37.7k|  auto result = numberparsing::parse_double(peek_non_root_scalar("double"));
  555|  37.7k|  if(result.error() == SUCCESS) { advance_non_root_scalar("double"); }
  ------------------
  |  Branch (555:6): [True: 21.8k, False: 15.9k]
  ------------------
  556|  37.7k|  return result;
  557|  37.7k|}
_ZN8simdjson8fallback8ondemand14value_iterator12start_objectEv:
   26|  1.41k|simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::start_object() noexcept {
   27|  1.41k|  SIMDJSON_TRY( start_container('{', "Not an object", "object") );
  ------------------
  |  |  273|  1.41k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 587, False: 831]
  |  |  ------------------
  ------------------
   28|    831|  return started_object();
   29|  1.41k|}
_ZN8simdjson8fallback8ondemand14value_iterator14started_objectEv:
   36|    831|simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::started_object() noexcept {
   37|    831|  assert_at_container_start();
   38|       |#if SIMDJSON_DEVELOPMENT_CHECKS
   39|       |  _json_iter->set_start_position(_depth, start_position());
   40|       |#endif
   41|    831|  if (*_json_iter->peek() == '}') {
  ------------------
  |  Branch (41:7): [True: 385, False: 446]
  ------------------
   42|    385|    logger::log_value(*_json_iter, "empty object");
   43|    385|    _json_iter->return_current_and_advance();
   44|    385|    end_container();
   45|    385|    return false;
   46|    385|  }
   47|    446|  return true;
   48|    831|}
_ZN8simdjson8fallback8ondemand14value_iterator10get_uint64Ev:
  533|  2.76k|simdjson_warn_unused simdjson_inline simdjson_result<uint64_t> value_iterator::get_uint64() noexcept {
  534|  2.76k|  auto result = numberparsing::parse_unsigned(peek_non_root_scalar("uint64"));
  535|  2.76k|  if(result.error() == SUCCESS) { advance_non_root_scalar("uint64"); }
  ------------------
  |  Branch (535:6): [True: 1.03k, False: 1.73k]
  ------------------
  536|  2.76k|  return result;
  537|  2.76k|}
_ZN8simdjson8fallback8ondemand14value_iterator7is_nullEv:
  568|  9.41k|simdjson_inline simdjson_result<bool> value_iterator::is_null() noexcept {
  569|  9.41k|  bool is_null_value;
  570|  9.41k|  SIMDJSON_TRY(parse_null(peek_non_root_scalar("null")).get(is_null_value));
  ------------------
  |  |  273|  9.41k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 768, False: 8.64k]
  |  |  ------------------
  ------------------
  571|  8.64k|  if(is_null_value) { advance_non_root_scalar("null"); }
  ------------------
  |  Branch (571:6): [True: 576, False: 8.06k]
  ------------------
  572|  8.64k|  return is_null_value;
  573|  9.41k|}
_ZNK8simdjson8fallback8ondemand14value_iterator10parse_nullEPKh:
  506|  9.41k|simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::parse_null(const uint8_t *json) const noexcept {
  507|  9.41k|  bool is_null_string = !atomparsing::str4ncmp(json, "null") && jsoncharutils::is_structural_or_whitespace(json[4]);
  ------------------
  |  Branch (507:25): [True: 616, False: 8.79k]
  |  Branch (507:65): [True: 576, False: 40]
  ------------------
  508|       |  // if we start with 'n', we must be a null
  509|  9.41k|  if(!is_null_string && json[0]=='n') { return incorrect_type_error("Not a null but starts with n"); }
  ------------------
  |  Branch (509:6): [True: 8.83k, False: 576]
  |  Branch (509:25): [True: 768, False: 8.06k]
  ------------------
  510|  8.64k|  return is_null_string;
  511|  9.41k|}
_ZN8simdjson8fallback8ondemand14value_iterator10skip_childEv:
  812|  63.2k|simdjson_warn_unused simdjson_inline error_code value_iterator::skip_child() noexcept {
  813|  63.2k|  SIMDJSON_ASSUME( _json_iter->token._position > _start_position );
  ------------------
  |  |  199|  63.2k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 63.2k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
  814|  63.2k|  SIMDJSON_ASSUME( _json_iter->_depth >= _depth );
  ------------------
  |  |  199|  63.2k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 63.2k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
  815|       |
  816|  63.2k|  return _json_iter->skip_child(depth());
  817|  63.2k|}
_ZN8simdjson8fallback8ondemand14value_iterator16has_next_elementEv:
  482|  63.1k|simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::has_next_element() noexcept {
  483|  63.1k|  assert_at_next();
  484|       |
  485|  63.1k|  logger::log_event(*this, "has_next_element");
  486|  63.1k|  switch (*_json_iter->return_current_and_advance()) {
  487|  3.21k|    case ']':
  ------------------
  |  Branch (487:5): [True: 3.21k, False: 59.9k]
  ------------------
  488|  3.21k|      logger::log_end_value(*_json_iter, "array");
  489|  3.21k|      SIMDJSON_TRY( end_container() );
  ------------------
  |  |  273|  3.21k|#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
  |  |  ------------------
  |  |  |  Branch (273:54): [True: 0, False: 3.21k]
  |  |  ------------------
  ------------------
  490|  3.21k|      return false;
  491|  59.2k|    case ',':
  ------------------
  |  Branch (491:5): [True: 59.2k, False: 3.89k]
  ------------------
  492|  59.2k|      _json_iter->descend_to(depth()+1);
  493|  59.2k|      return true;
  494|    677|    default:
  ------------------
  |  Branch (494:5): [True: 677, False: 62.4k]
  ------------------
  495|    677|      return report_error(TAPE_ERROR, "Missing comma between array elements");
  496|  63.1k|  }
  497|  63.1k|}
_ZNK8simdjson8fallback8ondemand14value_iterator14assert_at_nextEv:
  991|  63.1k|inline void value_iterator::assert_at_next() const noexcept {
  992|  63.1k|  SIMDJSON_ASSUME( _json_iter->token._position > _start_position );
  ------------------
  |  |  199|  63.1k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 63.1k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
  993|  63.1k|  SIMDJSON_ASSUME( _json_iter->_depth == _depth );
  ------------------
  |  |  199|  63.1k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 63.1k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
  994|  63.1k|  SIMDJSON_ASSUME( _depth > 0 );
  ------------------
  |  |  199|  63.1k|#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (199:40): [True: 0, False: 63.1k]
  |  |  |  Branch (199:83): [Folded - Ignored]
  |  |  ------------------
  ------------------
  995|  63.1k|}
_ZNK8simdjson8fallback8ondemand14value_iterator9json_iterEv:
  860|  63.1k|simdjson_warn_unused simdjson_inline const json_iterator &value_iterator::json_iter() const noexcept {
  861|  63.1k|  return *_json_iter;
  862|  63.1k|}

_ZN8simdjson8fallback8ondemand14value_iteratorC2Ev:
   33|  16.3k|  simdjson_inline value_iterator() noexcept = default;

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

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

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

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2Ev:
  231|  14.8k|    simdjson_inline simd8() : base8_numeric<uint8_t>() {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhEC2Ev:
   98|  14.8k|    simdjson_inline base8_numeric() : base8<T>() {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5base8IhNS2_5simd8IbEEEC2Ev:
   50|  14.8k|    simdjson_inline base8() : base<simd8<T>>() {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEC2Ev:
   22|  14.8k|    simdjson_inline base() : value{__m256i()} {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhEC2EPKh:
  309|   893k|    simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8<T>::load(ptr), simd8<T>::load(ptr+32)} {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhE4loadEPKh:
   82|  1.88M|    static simdjson_inline simd8<T> load(const T values[32]) {
   83|  1.88M|      return _mm256_loadu_si256(reinterpret_cast<const __m256i *>(values));
   84|  1.88M|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2EDv4_x:
  232|  22.1M|    simdjson_inline simd8(const __m256i _value) : base8_numeric<uint8_t>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhEC2EDv4_x:
   99|  22.1M|    simdjson_inline base8_numeric(const __m256i _value) : base8<T>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5base8IhNS2_5simd8IbEEEC2EDv4_x:
   51|  22.1M|    simdjson_inline base8(const __m256i _value) : base<simd8<T>>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEC2EDv4_x:
   25|  22.1M|    simdjson_inline base(const __m256i _value) : value(_value) {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhE9reduce_orEv:
  330|   893k|    simdjson_inline simd8<T> reduce_or() const {
  331|   893k|      return this->chunks[0] | this->chunks[1];
  332|   893k|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEorES5_:
   32|  3.85M|    simdjson_inline Child operator|(const Child other) const { return _mm256_or_si256(*this, other); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEcvRKDv4_xEv:
   28|  43.2M|    simdjson_inline operator const __m256i&() const { return this->value; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE8is_asciiEv:
  283|   893k|    simdjson_inline bool is_ascii() const { return _mm256_movemask_epi8(*this) == 0; }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEoRES5_:
   36|   989k|    simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast | other; return *this_cast; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5base8IhNS2_5simd8IbEEE4prevILi1EEENS4_IhEES8_:
   58|   181k|    simdjson_inline simd8<T> prev(const simd8<T> prev_chunk) const {
   59|   181k|      return _mm256_alignr_epi8(*this, _mm256_permute2x128_si256(prev_chunk, *this, 0x21), 16 - N);
   60|   181k|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE3shrILi4EEES4_v:
  289|   363k|    simdjson_inline simd8<uint8_t> shr() const { return simd8<uint8_t>(_mm256_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhE9lookup_16IhEENS2_5simd8IT_EES7_S7_S7_S7_S7_S7_S7_S7_S7_S7_S7_S7_S7_S7_S7_S7_:
  177|   544k|        L replace12, L replace13, L replace14, L replace15) const {
  178|   544k|      return lookup_16(simd8<L>::repeat_16(
  179|   544k|        replace0,  replace1,  replace2,  replace3,
  180|   544k|        replace4,  replace5,  replace6,  replace7,
  181|   544k|        replace8,  replace9,  replace10, replace11,
  182|   544k|        replace12, replace13, replace14, replace15
  183|   544k|      ));
  184|   544k|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhE9lookup_16IhEENS2_5simd8IT_EES8_:
  115|   544k|    simdjson_inline simd8<L> lookup_16(simd8<L> lookup_table) const {
  116|   544k|      return _mm256_shuffle_epi8(lookup_table, *this);
  117|   544k|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEcvRDv4_xEv:
   29|   544k|    simdjson_inline operator __m256i&() { return this->value; }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE9repeat_16Ehhhhhhhhhhhhhhhh:
  253|  2.33M|    ) {
  254|  2.33M|      return simd8<uint8_t>(
  255|  2.33M|        v0, v1, v2, v3, v4, v5, v6, v7,
  256|  2.33M|        v8, v9, v10,v11,v12,v13,v14,v15,
  257|  2.33M|        v0, v1, v2, v3, v4, v5, v6, v7,
  258|  2.33M|        v8, v9, v10,v11,v12,v13,v14,v15
  259|  2.33M|      );
  260|  2.33M|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2Ehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh:
  243|  2.33M|    ) : simd8(_mm256_setr_epi8(
  244|  2.33M|      v0, v1, v2, v3, v4, v5, v6, v7,
  245|  2.33M|      v8, v9, v10,v11,v12,v13,v14,v15,
  246|  2.33M|      v16,v17,v18,v19,v20,v21,v22,v23,
  247|  2.33M|      v24,v25,v26,v27,v28,v29,v30,v31
  248|  2.33M|    )) {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEanES5_:
   33|  1.08M|    simdjson_inline Child operator&(const Child other) const { return _mm256_and_si256(*this, other); }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2Eh:
  234|  2.88M|    simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhE5splatEh:
   80|  5.56M|    static simdjson_inline simd8<T> splat(T _value) { return _mm256_set1_epi8(_value); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5base8IhNS2_5simd8IbEEE4prevILi2EEENS4_IhEES8_:
   58|   181k|    simdjson_inline simd8<T> prev(const simd8<T> prev_chunk) const {
   59|   181k|      return _mm256_alignr_epi8(*this, _mm256_permute2x128_si256(prev_chunk, *this, 0x21), 16 - N);
   60|   181k|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5base8IhNS2_5simd8IbEEE4prevILi3EEENS4_IhEES8_:
   58|   181k|    simdjson_inline simd8<T> prev(const simd8<T> prev_chunk) const {
   59|   181k|      return _mm256_alignr_epi8(*this, _mm256_permute2x128_si256(prev_chunk, *this, 0x21), 16 - N);
   60|   181k|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE14saturating_subES4_:
  264|   454k|    simdjson_inline simd8<uint8_t> saturating_sub(const simd8<uint8_t> other) const { return _mm256_subs_epu8(*this, other); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEeoES5_:
   34|   181k|    simdjson_inline Child operator^(const Child other) const { return _mm256_xor_si256(*this, other); }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2EPKh:
  236|  94.4k|    simdjson_inline simd8(const uint8_t values[32]) : simd8(load(values)) {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE7gt_bitsES4_:
  270|  90.8k|    simdjson_inline simd8<uint8_t> gt_bits(const simd8<uint8_t> other) const { return this->saturating_sub(other); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE21any_bits_set_anywhereEv:
  285|  4.60k|    simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE21bits_not_set_anywhereEv:
  284|  4.60k|    simdjson_inline bool bits_not_set_anywhere() const { return _mm256_testz_si256(*this, *this); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhE5storeEPh:
  102|  3.65k|    simdjson_inline void store(T dst[32]) const { return _mm256_storeu_si256(reinterpret_cast<__m256i *>(dst), *this); }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simdeqENS2_5simd8IhEES4_:
   53|  8.94M|    friend simdjson_really_inline Mask operator==(const simd8<T> lhs, const simd8<T> rhs) { return _mm256_cmpeq_epi8(lhs, rhs); }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IbEC2EDv4_x:
   69|  8.94M|    simdjson_inline simd8(const __m256i _value) : base8<bool>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5base8IbNS2_5simd8IbEEEC2EDv4_x:
   51|  8.94M|    simdjson_inline base8(const __m256i _value) : base<simd8<T>>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IbEEEC2EDv4_x:
   25|  8.94M|    simdjson_inline base(const __m256i _value) : value(_value) {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IbE10to_bitmaskEv:
   73|  8.94M|    simdjson_inline int to_bitmask() const { return _mm256_movemask_epi8(*this); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IbEEEcvRKDv4_xEv:
   28|  8.94M|    simdjson_inline operator const __m256i&() const { return this->value; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhE2eqEh:
  342|  1.78M|    simdjson_inline uint64_t eq(const T m) const {
  343|  1.78M|      const simd8<T> mask = simd8<T>::splat(m);
  344|  1.78M|      return  simd8x64<bool>(
  345|  1.78M|        this->chunks[0] == mask,
  346|  1.78M|        this->chunks[1] == mask
  347|  1.78M|      ).to_bitmask();
  348|  1.78M|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IbEC2ENS2_5simd8IbEES6_:
  308|  4.46M|    simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1) : chunks{chunk0, chunk1} {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IbE10to_bitmaskEv:
  324|  4.46M|    simdjson_inline uint64_t to_bitmask() const {
  325|  4.46M|      uint64_t r_lo = uint32_t(this->chunks[0].to_bitmask());
  326|  4.46M|      uint64_t r_hi =                       this->chunks[1].to_bitmask();
  327|  4.46M|      return r_lo | (r_hi << 32);
  328|  4.46M|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhE2eqERKS4_:
  350|  1.78M|    simdjson_inline uint64_t eq(const simd8x64<uint8_t> &other) const {
  351|  1.78M|      return  simd8x64<bool>(
  352|  1.78M|        this->chunks[0] == other.chunks[0],
  353|  1.78M|        this->chunks[1] == other.chunks[1]
  354|  1.78M|      ).to_bitmask();
  355|  1.78M|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhEC2ENS2_5simd8IhEES6_:
  308|  2.68M|    simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1) : chunks{chunk0, chunk1} {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhE4lteqEh:
  357|   893k|    simdjson_inline uint64_t lteq(const T m) const {
  358|   893k|      const simd8<T> mask = simd8<T>::splat(m);
  359|   893k|      return  simd8x64<bool>(
  360|   893k|        this->chunks[0] <= mask,
  361|   893k|        this->chunks[1] <= mask
  362|   893k|      ).to_bitmask();
  363|   893k|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEleES4_:
  273|  1.78M|    simdjson_inline simd8<bool> operator<=(const simd8<uint8_t> other) const { return other.max_val(*this) == other; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE7max_valES4_:
  267|  1.78M|    simdjson_inline simd8<uint8_t> max_val(const simd8<uint8_t> other) const { return _mm256_max_epu8(*this, other); }

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

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

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

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

_ZN8simdjson12is_streamingENS_11stage1_modeE:
   27|  9.88k|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|  9.88k|  return (mode != stage1_mode::regular);
   31|       |  // return (mode == stage1_mode::streaming_partial || mode == stage1_mode::streaming_final);
   32|  9.88k|}
_ZNK8simdjson8internal25dom_parser_implementation8capacityEv:
  228|  5.07k|simdjson_pure simdjson_inline size_t dom_parser_implementation::capacity() const noexcept {
  229|  5.07k|  return _capacity;
  230|  5.07k|}
_ZN8simdjson8internal25dom_parser_implementationC2Ev:
  224|  5.07k|simdjson_inline dom_parser_implementation::dom_parser_implementation() noexcept = default;
_ZN8simdjson8internal25dom_parser_implementationD2Ev:
  166|  5.07k|  virtual ~dom_parser_implementation() = default;

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

_ZNK8simdjson18padded_string_view7paddingEv:
   40|  5.07k|inline size_t padded_string_view::padding() const noexcept { return capacity() - length(); }
_ZNK8simdjson18padded_string_view8capacityEv:
   38|  5.07k|inline size_t padded_string_view::capacity() const noexcept { return _capacity; }
_ZN8simdjson18padded_string_view15remove_utf8_bomEv:
   42|  5.07k|inline bool padded_string_view::remove_utf8_bom() noexcept {
   43|  5.07k|  if(length() < 3) { return false; }
  ------------------
  |  Branch (43:6): [True: 181, False: 4.89k]
  ------------------
   44|  4.89k|  if (std::memcmp(data(), "\xEF\xBB\xBF", 3) == 0) {
  ------------------
  |  Branch (44:7): [True: 3, False: 4.89k]
  ------------------
   45|      3|    remove_prefix(3);
   46|      3|    _capacity -= 3;
   47|      3|    return true;
   48|      3|  }
   49|  4.89k|  return false;
   50|  4.89k|}
_ZN8simdjson18padded_string_viewC2EPKcmm:
   12|  5.07k|  : std::string_view(s, len), _capacity(capacity)
   13|  5.07k|{
   14|  5.07k|  if(_capacity < len) { _capacity = len; }
  ------------------
  |  Branch (14:6): [True: 0, False: 5.07k]
  ------------------
   15|  5.07k|}

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

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

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

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

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

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

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage119json_string_scanner4nextERKNS1_4simd8simd8x64IhEE:
   62|   893k|simdjson_really_inline json_string_block json_string_scanner::next(const simd::simd8x64<uint8_t>& in) {
   63|   893k|  const uint64_t backslash = in.eq('\\');
   64|   893k|  const uint64_t escaped = escape_scanner.next(backslash).escaped;
   65|   893k|  const uint64_t quote = in.eq('"') & ~escaped;
   66|       |
   67|       |  //
   68|       |  // prefix_xor flips on bits inside the string (and flips off the end quote).
   69|       |  //
   70|       |  // Then we xor with prev_in_string: if we were in a string already, its effect is flipped
   71|       |  // (characters inside strings are outside, and characters outside strings are inside).
   72|       |  //
   73|   893k|  const uint64_t in_string = prefix_xor(quote) ^ prev_in_string;
   74|       |
   75|       |  //
   76|       |  // Check if we're still in a string at the end of the box so the next block will know
   77|       |  //
   78|   893k|  prev_in_string = uint64_t(static_cast<int64_t>(in_string) >> 63);
   79|       |
   80|       |  // Use ^ to turn the beginning quote off, and the end quote on.
   81|       |
   82|       |  // We are returning a function-local object so either we get a move constructor
   83|       |  // or we get copy elision.
   84|   893k|  return json_string_block(escaped, quote, in_string);
   85|   893k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage117json_string_blockC2Emmm:
   17|   893k|  _escaped(escaped), _quote(quote), _in_string(in_string) {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage117json_string_block5quoteEv:
   22|   893k|  simdjson_really_inline uint64_t quote() const { return _quote; }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage119json_string_scanner6finishEv:
   87|  4.94k|simdjson_really_inline error_code json_string_scanner::finish() {
   88|  4.94k|  if (prev_in_string) {
  ------------------
  |  Branch (88:7): [True: 167, False: 4.77k]
  ------------------
   89|    167|    return UNCLOSED_STRING;
   90|    167|  }
   91|  4.77k|  return SUCCESS;
   92|  4.94k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage117json_string_block11string_tailEv:
   30|   893k|  simdjson_really_inline uint64_t string_tail() const { return _in_string ^ _quote; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage117json_string_block23non_quote_inside_stringEm:
   26|   893k|  simdjson_really_inline uint64_t non_quote_inside_string(uint64_t mask) const { return mask & _in_string; }

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage123json_structural_indexer5indexILm128EEENS_10error_codeEPKhmRNS0_25dom_parser_implementationENS_11stage1_modeE:
  194|  5.07k|error_code json_structural_indexer::index(const uint8_t *buf, size_t len, dom_parser_implementation &parser, stage1_mode partial) noexcept {
  195|  5.07k|  if (simdjson_unlikely(len > parser.capacity())) { return CAPACITY; }
  ------------------
  |  |  106|  5.07k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 0, False: 5.07k]
  |  |  ------------------
  ------------------
  196|       |  // We guard the rest of the code so that we can assume that len > 0 throughout.
  197|  5.07k|  if (len == 0) { return EMPTY; }
  ------------------
  |  Branch (197:7): [True: 131, False: 4.94k]
  ------------------
  198|  4.94k|  if (is_streaming(partial)) {
  ------------------
  |  Branch (198:7): [True: 0, False: 4.94k]
  ------------------
  199|      0|    len = trim_partial_utf8(buf, len);
  200|       |    // If you end up with an empty window after trimming
  201|       |    // the partial UTF-8 bytes, then chances are good that you
  202|       |    // have an UTF-8 formatting error.
  203|      0|    if(len == 0) { return UTF8_ERROR; }
  ------------------
  |  Branch (203:8): [True: 0, False: 0]
  ------------------
  204|      0|  }
  205|  4.94k|  buf_block_reader<STEP_SIZE> reader(buf, len);
  206|  4.94k|  json_structural_indexer indexer(parser.structural_indexes.get());
  207|       |
  208|       |  // Read all but the last block
  209|   446k|  while (reader.has_full_block()) {
  ------------------
  |  Branch (209:10): [True: 441k, False: 4.94k]
  ------------------
  210|   441k|    indexer.step<STEP_SIZE>(reader.full_block(), reader);
  211|   441k|  }
  212|       |  // Take care of the last block (will always be there unless file is empty which is
  213|       |  // not supposed to happen.)
  214|  4.94k|  uint8_t block[STEP_SIZE];
  215|  4.94k|  if (simdjson_unlikely(reader.get_remainder(block) == 0)) { return UNEXPECTED_ERROR; }
  ------------------
  |  |  106|  4.94k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 0, False: 4.94k]
  |  |  ------------------
  ------------------
  216|  4.94k|  indexer.step<STEP_SIZE>(block, reader);
  217|  4.94k|  return indexer.finish(parser, reader.block_index(), len, partial);
  218|  4.94k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage123json_structural_indexerC2EPj:
  153|  4.94k|simdjson_inline json_structural_indexer::json_structural_indexer(uint32_t *structural_indexes) : indexer{structural_indexes} {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexerC2EPj:
   28|  4.94k|  simdjson_inline bit_indexer(uint32_t *index_buf) : tail(index_buf) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage123json_structural_indexer4stepILm128EEEvPKhRNS2_16buf_block_readerIXT_EEE:
  221|   446k|simdjson_inline void json_structural_indexer::step<128>(const uint8_t *block, buf_block_reader<128> &reader) noexcept {
  222|   446k|  simd::simd8x64<uint8_t> in_1(block);
  223|   446k|  simd::simd8x64<uint8_t> in_2(block+64);
  224|   446k|  json_block block_1 = scanner.next(in_1);
  225|   446k|  json_block block_2 = scanner.next(in_2);
  226|   446k|  this->next(in_1, block_1, reader.block_index());
  227|   446k|  this->next(in_2, block_2, reader.block_index()+64);
  228|   446k|  reader.advance();
  229|   446k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage123json_structural_indexer4nextERKNS1_4simd8simd8x64IhEERKNS2_10json_blockEm:
  239|   893k|simdjson_inline void json_structural_indexer::next(const simd::simd8x64<uint8_t>& in, const json_block& block, size_t idx) {
  240|   893k|  uint64_t unescaped = in.lteq(0x1F);
  241|   893k|#if SIMDJSON_UTF8VALIDATION
  242|   893k|  checker.check_next_input(in);
  243|   893k|#endif
  244|   893k|  indexer.write(uint32_t(idx-64), prev_structurals); // Output *last* iteration's structurals to the parser
  245|   893k|  prev_structurals = block.structural_start();
  246|   893k|  unescaped_chars_error |= block.non_quote_inside_string(unescaped);
  247|   893k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer5writeEjm:
   93|   898k|  simdjson_inline void write(uint32_t idx, uint64_t bits) {
   94|       |    // In some instances, the next branch is expensive because it is mispredicted.
   95|       |    // Unfortunately, in other cases,
   96|       |    // it helps tremendously.
   97|   898k|    if (bits == 0)
  ------------------
  |  Branch (97:9): [True: 689k, False: 209k]
  ------------------
   98|   689k|        return;
   99|       |
  100|   209k|    int cnt = static_cast<int>(count_ones(bits));
  101|       |
  102|       |#if SIMDJSON_PREFER_REVERSE_BITS
  103|       |    bits = reverse_bits(bits);
  104|       |#endif
  105|       |#ifdef SIMDJSON_STRUCTURAL_INDEXER_STEP
  106|       |    static constexpr const int STEP = SIMDJSON_STRUCTURAL_INDEXER_STEP;
  107|       |#else
  108|   209k|    static constexpr const int STEP = 4;
  109|   209k|#endif
  110|   209k|    static constexpr const int STEP_UNTIL = 24;
  111|       |
  112|   209k|    write_indexes_stepped<0, STEP_UNTIL, STEP>(idx, bits, cnt);
  113|   209k|    SIMDJSON_IF_CONSTEXPR (STEP_UNTIL < 64) {
  ------------------
  |  |   47|   209k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
  114|   209k|      if (simdjson_unlikely(STEP_UNTIL < cnt)) {
  ------------------
  |  |  106|   209k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 117k, False: 91.9k]
  |  |  ------------------
  ------------------
  115|  4.17M|        for (int i=STEP_UNTIL; i<cnt; i++) {
  ------------------
  |  Branch (115:32): [True: 4.05M, False: 117k]
  ------------------
  116|  4.05M|          write_index(idx, bits, i);
  117|  4.05M|        }
  118|   117k|      }
  119|   209k|    }
  120|       |
  121|   209k|    this->tail += cnt;
  122|   209k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer21write_indexes_steppedILi0ELi24ELi4EEEijRmi:
   72|   209k|  simdjson_inline int write_indexes_stepped(uint32_t idx, uint64_t& bits, int cnt) {
   73|   209k|    write_indexes<START, STEP>(idx, bits);
   74|   209k|    SIMDJSON_IF_CONSTEXPR ((START+STEP)  < END) {
  ------------------
  |  |   47|   209k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   75|   209k|      if (simdjson_unlikely((START+STEP) < cnt)) {
  ------------------
  |  |  106|   209k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 163k, False: 45.6k]
  |  |  ------------------
  ------------------
   76|   163k|        write_indexes_stepped<(START+STEP<END?START+STEP:END), END, STEP>(idx, bits, cnt);
   77|   163k|      }
   78|   209k|    }
   79|   209k|    return ((END-START) % STEP) == 0 ? END : (END-START) - ((END-START) % STEP) + STEP;
  ------------------
  |  Branch (79:12): [Folded - Ignored]
  ------------------
   80|   209k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi0ELi4EEEijRm:
   63|   209k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   209k|    write_index(idx, bits, START);
   65|   209k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   209k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   209k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   209k|    }
   68|   209k|    return START+N;
   69|   209k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi1ELi3EEEijRm:
   63|   209k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   209k|    write_index(idx, bits, START);
   65|   209k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   209k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   209k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   209k|    }
   68|   209k|    return START+N;
   69|   209k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi2ELi2EEEijRm:
   63|   209k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   209k|    write_index(idx, bits, START);
   65|   209k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   209k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   209k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   209k|    }
   68|   209k|    return START+N;
   69|   209k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi3ELi1EEEijRm:
   63|   209k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   209k|    write_index(idx, bits, START);
   65|   209k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   209k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|       |      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|       |    }
   68|   209k|    return START+N;
   69|   209k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer21write_indexes_steppedILi4ELi24ELi4EEEijRmi:
   72|   163k|  simdjson_inline int write_indexes_stepped(uint32_t idx, uint64_t& bits, int cnt) {
   73|   163k|    write_indexes<START, STEP>(idx, bits);
   74|   163k|    SIMDJSON_IF_CONSTEXPR ((START+STEP)  < END) {
  ------------------
  |  |   47|   163k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   75|   163k|      if (simdjson_unlikely((START+STEP) < cnt)) {
  ------------------
  |  |  106|   163k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 144k, False: 19.0k]
  |  |  ------------------
  ------------------
   76|   144k|        write_indexes_stepped<(START+STEP<END?START+STEP:END), END, STEP>(idx, bits, cnt);
   77|   144k|      }
   78|   163k|    }
   79|   163k|    return ((END-START) % STEP) == 0 ? END : (END-START) - ((END-START) % STEP) + STEP;
  ------------------
  |  Branch (79:12): [Folded - Ignored]
  ------------------
   80|   163k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi4ELi4EEEijRm:
   63|   163k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   163k|    write_index(idx, bits, START);
   65|   163k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   163k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   163k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   163k|    }
   68|   163k|    return START+N;
   69|   163k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi5ELi3EEEijRm:
   63|   163k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   163k|    write_index(idx, bits, START);
   65|   163k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   163k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   163k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   163k|    }
   68|   163k|    return START+N;
   69|   163k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi6ELi2EEEijRm:
   63|   163k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   163k|    write_index(idx, bits, START);
   65|   163k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   163k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   163k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   163k|    }
   68|   163k|    return START+N;
   69|   163k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi7ELi1EEEijRm:
   63|   163k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   163k|    write_index(idx, bits, START);
   65|   163k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   163k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|       |      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|       |    }
   68|   163k|    return START+N;
   69|   163k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer21write_indexes_steppedILi8ELi24ELi4EEEijRmi:
   72|   144k|  simdjson_inline int write_indexes_stepped(uint32_t idx, uint64_t& bits, int cnt) {
   73|   144k|    write_indexes<START, STEP>(idx, bits);
   74|   144k|    SIMDJSON_IF_CONSTEXPR ((START+STEP)  < END) {
  ------------------
  |  |   47|   144k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   75|   144k|      if (simdjson_unlikely((START+STEP) < cnt)) {
  ------------------
  |  |  106|   144k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 135k, False: 8.64k]
  |  |  ------------------
  ------------------
   76|   135k|        write_indexes_stepped<(START+STEP<END?START+STEP:END), END, STEP>(idx, bits, cnt);
   77|   135k|      }
   78|   144k|    }
   79|   144k|    return ((END-START) % STEP) == 0 ? END : (END-START) - ((END-START) % STEP) + STEP;
  ------------------
  |  Branch (79:12): [Folded - Ignored]
  ------------------
   80|   144k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi8ELi4EEEijRm:
   63|   144k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   144k|    write_index(idx, bits, START);
   65|   144k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   144k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   144k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   144k|    }
   68|   144k|    return START+N;
   69|   144k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi9ELi3EEEijRm:
   63|   144k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   144k|    write_index(idx, bits, START);
   65|   144k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   144k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   144k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   144k|    }
   68|   144k|    return START+N;
   69|   144k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi10ELi2EEEijRm:
   63|   144k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   144k|    write_index(idx, bits, START);
   65|   144k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   144k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   144k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   144k|    }
   68|   144k|    return START+N;
   69|   144k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi11ELi1EEEijRm:
   63|   144k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   144k|    write_index(idx, bits, START);
   65|   144k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   144k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|       |      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|       |    }
   68|   144k|    return START+N;
   69|   144k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer21write_indexes_steppedILi12ELi24ELi4EEEijRmi:
   72|   135k|  simdjson_inline int write_indexes_stepped(uint32_t idx, uint64_t& bits, int cnt) {
   73|   135k|    write_indexes<START, STEP>(idx, bits);
   74|   135k|    SIMDJSON_IF_CONSTEXPR ((START+STEP)  < END) {
  ------------------
  |  |   47|   135k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   75|   135k|      if (simdjson_unlikely((START+STEP) < cnt)) {
  ------------------
  |  |  106|   135k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 125k, False: 10.4k]
  |  |  ------------------
  ------------------
   76|   125k|        write_indexes_stepped<(START+STEP<END?START+STEP:END), END, STEP>(idx, bits, cnt);
   77|   125k|      }
   78|   135k|    }
   79|   135k|    return ((END-START) % STEP) == 0 ? END : (END-START) - ((END-START) % STEP) + STEP;
  ------------------
  |  Branch (79:12): [Folded - Ignored]
  ------------------
   80|   135k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi12ELi4EEEijRm:
   63|   135k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   135k|    write_index(idx, bits, START);
   65|   135k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   135k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   135k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   135k|    }
   68|   135k|    return START+N;
   69|   135k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi13ELi3EEEijRm:
   63|   135k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   135k|    write_index(idx, bits, START);
   65|   135k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   135k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   135k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   135k|    }
   68|   135k|    return START+N;
   69|   135k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi14ELi2EEEijRm:
   63|   135k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   135k|    write_index(idx, bits, START);
   65|   135k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   135k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   135k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   135k|    }
   68|   135k|    return START+N;
   69|   135k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi15ELi1EEEijRm:
   63|   135k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   135k|    write_index(idx, bits, START);
   65|   135k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   135k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|       |      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|       |    }
   68|   135k|    return START+N;
   69|   135k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer21write_indexes_steppedILi16ELi24ELi4EEEijRmi:
   72|   125k|  simdjson_inline int write_indexes_stepped(uint32_t idx, uint64_t& bits, int cnt) {
   73|   125k|    write_indexes<START, STEP>(idx, bits);
   74|   125k|    SIMDJSON_IF_CONSTEXPR ((START+STEP)  < END) {
  ------------------
  |  |   47|   125k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   75|   125k|      if (simdjson_unlikely((START+STEP) < cnt)) {
  ------------------
  |  |  106|   125k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 121k, False: 3.77k]
  |  |  ------------------
  ------------------
   76|   121k|        write_indexes_stepped<(START+STEP<END?START+STEP:END), END, STEP>(idx, bits, cnt);
   77|   121k|      }
   78|   125k|    }
   79|   125k|    return ((END-START) % STEP) == 0 ? END : (END-START) - ((END-START) % STEP) + STEP;
  ------------------
  |  Branch (79:12): [Folded - Ignored]
  ------------------
   80|   125k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi16ELi4EEEijRm:
   63|   125k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   125k|    write_index(idx, bits, START);
   65|   125k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   125k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   125k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   125k|    }
   68|   125k|    return START+N;
   69|   125k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi17ELi3EEEijRm:
   63|   125k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   125k|    write_index(idx, bits, START);
   65|   125k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   125k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   125k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   125k|    }
   68|   125k|    return START+N;
   69|   125k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi18ELi2EEEijRm:
   63|   125k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   125k|    write_index(idx, bits, START);
   65|   125k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   125k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   125k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   125k|    }
   68|   125k|    return START+N;
   69|   125k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi19ELi1EEEijRm:
   63|   125k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   125k|    write_index(idx, bits, START);
   65|   125k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   125k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|       |      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|       |    }
   68|   125k|    return START+N;
   69|   125k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer21write_indexes_steppedILi20ELi24ELi4EEEijRmi:
   72|   121k|  simdjson_inline int write_indexes_stepped(uint32_t idx, uint64_t& bits, int cnt) {
   73|   121k|    write_indexes<START, STEP>(idx, bits);
   74|   121k|    SIMDJSON_IF_CONSTEXPR ((START+STEP)  < END) {
  ------------------
  |  |   47|   121k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   75|       |      if (simdjson_unlikely((START+STEP) < cnt)) {
   76|       |        write_indexes_stepped<(START+STEP<END?START+STEP:END), END, STEP>(idx, bits, cnt);
   77|       |      }
   78|       |    }
   79|   121k|    return ((END-START) % STEP) == 0 ? END : (END-START) - ((END-START) % STEP) + STEP;
  ------------------
  |  Branch (79:12): [Folded - Ignored]
  ------------------
   80|   121k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi20ELi4EEEijRm:
   63|   121k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   121k|    write_index(idx, bits, START);
   65|   121k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   121k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   121k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   121k|    }
   68|   121k|    return START+N;
   69|   121k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi21ELi3EEEijRm:
   63|   121k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   121k|    write_index(idx, bits, START);
   65|   121k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   121k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   121k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   121k|    }
   68|   121k|    return START+N;
   69|   121k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi22ELi2EEEijRm:
   63|   121k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   121k|    write_index(idx, bits, START);
   65|   121k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   121k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|   121k|      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|   121k|    }
   68|   121k|    return START+N;
   69|   121k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer13write_indexesILi23ELi1EEEijRm:
   63|   121k|  simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) {
   64|   121k|    write_index(idx, bits, START);
   65|   121k|    SIMDJSON_IF_CONSTEXPR (N > 1) {
  ------------------
  |  |   47|   121k|#define SIMDJSON_IF_CONSTEXPR if constexpr
  ------------------
   66|       |      write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits);
   67|       |    }
   68|   121k|    return START+N;
   69|   121k|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage111bit_indexer11write_indexEjRmi:
   56|  7.65M|  simdjson_inline void write_index(uint32_t idx, uint64_t& bits, int i) {
   57|  7.65M|    this->tail[i] = idx + trailing_zeroes(bits);
   58|  7.65M|    bits = clear_lowest_bit(bits);
   59|  7.65M|  }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage123json_structural_indexer6finishERNS0_25dom_parser_implementationEmmNS_11stage1_modeE:
  249|  4.94k|simdjson_inline error_code json_structural_indexer::finish(dom_parser_implementation &parser, size_t idx, size_t len, stage1_mode partial) {
  250|       |  // Write out the final iteration's structurals
  251|  4.94k|  indexer.write(uint32_t(idx-64), prev_structurals);
  252|  4.94k|  error_code error = scanner.finish();
  253|       |  // We deliberately break down the next expression so that it is
  254|       |  // human readable.
  255|  4.94k|  const bool should_we_exit = is_streaming(partial) ?
  ------------------
  |  Branch (255:31): [True: 0, False: 4.94k]
  ------------------
  256|      0|    ((error != SUCCESS) && (error != UNCLOSED_STRING)) // when partial we tolerate UNCLOSED_STRING
  ------------------
  |  Branch (256:6): [True: 0, False: 0]
  |  Branch (256:28): [True: 0, False: 0]
  ------------------
  257|  4.94k|    : (error != SUCCESS); // if partial is false, we must have SUCCESS
  258|  4.94k|  const bool have_unclosed_string = (error == UNCLOSED_STRING);
  259|  4.94k|  if (simdjson_unlikely(should_we_exit)) { return error; }
  ------------------
  |  |  106|  4.94k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 167, False: 4.77k]
  |  |  ------------------
  ------------------
  260|       |
  261|  4.77k|  if (unescaped_chars_error) {
  ------------------
  |  Branch (261:7): [True: 165, False: 4.61k]
  ------------------
  262|    165|    return UNESCAPED_CHARS;
  263|    165|  }
  264|  4.61k|  parser.n_structural_indexes = uint32_t(indexer.tail - parser.structural_indexes.get());
  265|       |  /***
  266|       |   * The On-Demand API requires special padding.
  267|       |   *
  268|       |   * This is related to https://github.com/simdjson/simdjson/issues/906
  269|       |   * Basically, we want to make sure that if the parsing continues beyond the last (valid)
  270|       |   * structural character, it quickly stops.
  271|       |   * Only three structural characters can be repeated without triggering an error in JSON:  [,] and }.
  272|       |   * We repeat the padding character (at 'len'). We don't know what it is, but if the parsing
  273|       |   * continues, then it must be [,] or }.
  274|       |   * Suppose it is ] or }. We backtrack to the first character, what could it be that would
  275|       |   * not trigger an error? It could be ] or } but no, because you can't start a document that way.
  276|       |   * It can't be a comma, a colon or any simple value. So the only way we could continue is
  277|       |   * if the repeated character is [. But if so, the document must start with [. But if the document
  278|       |   * starts with [, it should end with ]. If we enforce that rule, then we would get
  279|       |   * ][[ which is invalid.
  280|       |   *
  281|       |   * This is illustrated with the test array_iterate_unclosed_error() on the following input:
  282|       |   * R"({ "a": [,,)"
  283|       |   **/
  284|  4.61k|  parser.structural_indexes[parser.n_structural_indexes] = uint32_t(len); // used later in partial == stage1_mode::streaming_final
  285|  4.61k|  parser.structural_indexes[parser.n_structural_indexes + 1] = uint32_t(len);
  286|  4.61k|  parser.structural_indexes[parser.n_structural_indexes + 2] = 0;
  287|  4.61k|  parser.next_structural_index = 0;
  288|       |  // a valid JSON file cannot have zero structural indexes - we should have found something
  289|  4.61k|  if (simdjson_unlikely(parser.n_structural_indexes == 0u)) {
  ------------------
  |  |  106|  4.61k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 4, False: 4.60k]
  |  |  ------------------
  ------------------
  290|      4|    return EMPTY;
  291|      4|  }
  292|  4.60k|  if (simdjson_unlikely(parser.structural_indexes[parser.n_structural_indexes - 1] > len)) {
  ------------------
  |  |  106|  4.60k|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 0, False: 4.60k]
  |  |  ------------------
  ------------------
  293|      0|    return UNEXPECTED_ERROR;
  294|      0|  }
  295|  4.60k|  if (partial == stage1_mode::streaming_partial) {
  ------------------
  |  Branch (295:7): [True: 0, False: 4.60k]
  ------------------
  296|       |    // If we have an unclosed string, then the last structural
  297|       |    // will be the quote and we want to make sure to omit it.
  298|      0|    if(have_unclosed_string) {
  ------------------
  |  Branch (298:8): [True: 0, False: 0]
  ------------------
  299|      0|      parser.n_structural_indexes--;
  300|       |      // a valid JSON file cannot have zero structural indexes - we should have found something
  301|      0|      if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { return CAPACITY; }
  ------------------
  |  |  106|      0|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  302|      0|    }
  303|       |    // We truncate the input to the end of the last complete document (or zero).
  304|      0|    auto new_structural_indexes = find_next_document_index(parser);
  305|      0|    if (new_structural_indexes == 0 && parser.n_structural_indexes > 0) {
  ------------------
  |  Branch (305:9): [True: 0, False: 0]
  |  Branch (305:40): [True: 0, False: 0]
  ------------------
  306|      0|      if(parser.structural_indexes[0] == 0) {
  ------------------
  |  Branch (306:10): [True: 0, False: 0]
  ------------------
  307|       |        // If the buffer is partial and we started at index 0 but the document is
  308|       |        // incomplete, it's too big to parse.
  309|      0|        return CAPACITY;
  310|      0|      } else {
  311|       |        // It is possible that the document could be parsed, we just had a lot
  312|       |        // of white space.
  313|      0|        parser.n_structural_indexes = 0;
  314|      0|        return EMPTY;
  315|      0|      }
  316|      0|    }
  317|       |
  318|      0|    parser.n_structural_indexes = new_structural_indexes;
  319|  4.60k|  } else if (partial == stage1_mode::streaming_final) {
  ------------------
  |  Branch (319:14): [True: 0, False: 4.60k]
  ------------------
  320|      0|    if(have_unclosed_string) { parser.n_structural_indexes--; }
  ------------------
  |  Branch (320:8): [True: 0, False: 0]
  ------------------
  321|       |    // We truncate the input to the end of the last complete document (or zero).
  322|       |    // Because partial == stage1_mode::streaming_final, it means that we may
  323|       |    // silently ignore trailing garbage. Though it sounds bad, we do it
  324|       |    // deliberately because many people who have streams of JSON documents
  325|       |    // will truncate them for processing. E.g., imagine that you are uncompressing
  326|       |    // the data from a size file or receiving it in chunks from the network. You
  327|       |    // may not know where exactly the last document will be. Meanwhile the
  328|       |    // document_stream instances allow people to know the JSON documents they are
  329|       |    // parsing (see the iterator.source() method).
  330|      0|    parser.n_structural_indexes = find_next_document_index(parser);
  331|       |    // We store the initial n_structural_indexes so that the client can see
  332|       |    // whether we used truncation. If initial_n_structural_indexes == parser.n_structural_indexes,
  333|       |    // then this will query parser.structural_indexes[parser.n_structural_indexes] which is len,
  334|       |    // otherwise, it will copy some prior index.
  335|      0|    parser.structural_indexes[parser.n_structural_indexes + 1] = parser.structural_indexes[parser.n_structural_indexes];
  336|       |    // This next line is critical, do not change it unless you understand what you are
  337|       |    // doing.
  338|      0|    parser.structural_indexes[parser.n_structural_indexes] = uint32_t(len);
  339|      0|    if (simdjson_unlikely(parser.n_structural_indexes == 0u)) {
  ------------------
  |  |  106|      0|  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (106:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  340|       |        // We tolerate an unclosed string at the very end of the stream. Indeed, users
  341|       |        // often load their data in bulk without being careful and they want us to ignore
  342|       |        // the trailing garbage.
  343|      0|        return EMPTY;
  344|      0|    }
  345|      0|  }
  346|  4.60k|  checker.check_eof();
  347|  4.60k|  return checker.errors();
  348|  4.60k|}

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

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

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

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

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

