LLVMFuzzerTestOneInput:
   19|    687|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   20|       |
   21|       |  // since this check is expensive, only do it once
   22|    687|  static const auto implementations=get_runtime_supported_implementations();
   23|       |
   24|    687|    using Buffer=std::vector<uint8_t>;
   25|    687|    auto minify=[Data,Size](const simdjson::implementation* impl) -> Buffer {
   26|    687|        Buffer ret(Size);
   27|    687|        std::size_t retsize=0;
   28|    687|        auto err=impl->minify(Data,Size,ret.data(),retsize);
   29|    687|        if(err) {
   30|    687|            std::string tmp = error_message(err);
   31|    687|            ret.assign(tmp.begin(),tmp.end());
   32|    687|        } else {
   33|    687|            assert(retsize<=Size && "size should not grow by minimize()!");
   34|    687|            ret.resize(retsize);
   35|    687|        }
   36|    687|        return ret;
   37|    687|    };
   38|       |
   39|    687|    auto const first = implementations.begin();
   40|    687|    auto const last = implementations.end();
   41|       |
   42|    687|    const auto reference=minify(*first);
   43|       |
   44|    687|    bool failed=false;
   45|  2.06k|    for(auto it=first+1;it != last; ++it) {
  ------------------
  |  Branch (45:25): [True: 1.37k, False: 687]
  ------------------
   46|  1.37k|        const auto current=minify(*it);
   47|  1.37k|        if(current!=reference) {
  ------------------
  |  Branch (47:12): [True: 0, False: 1.37k]
  ------------------
   48|      0|            failed=true;
   49|      0|        }
   50|  1.37k|    }
   51|       |
   52|    687|    if(failed) {
  ------------------
  |  Branch (52:8): [True: 0, False: 687]
  ------------------
   53|      0|        std::cerr<<std::boolalpha<<"Mismatch between implementations of minify() found:\n";
   54|      0|        for(const auto& e:implementations) {
  ------------------
  |  Branch (54:26): [True: 0, False: 0]
  ------------------
   55|      0|            const auto current=minify(e);
   56|      0|            std::string tmp(current.begin(),current.end());
   57|      0|            std::cerr<<e->name()<<" returns "<<tmp<<std::endl;
   58|      0|        }
   59|      0|        std::abort();
   60|      0|    }
   61|       |
   62|       |    //all is well
   63|    687|    return 0;
   64|    687|}
fuzz_minifyimpl.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clEPKN8simdjson14implementationE:
   25|  2.06k|    auto minify=[Data,Size](const simdjson::implementation* impl) -> Buffer {
   26|  2.06k|        Buffer ret(Size);
   27|  2.06k|        std::size_t retsize=0;
   28|  2.06k|        auto err=impl->minify(Data,Size,ret.data(),retsize);
   29|  2.06k|        if(err) {
  ------------------
  |  Branch (29:12): [True: 264, False: 1.79k]
  ------------------
   30|    264|            std::string tmp = error_message(err);
   31|    264|            ret.assign(tmp.begin(),tmp.end());
   32|  1.79k|        } else {
   33|  1.79k|            assert(retsize<=Size && "size should not grow by minimize()!");
   34|      0|            ret.resize(retsize);
   35|  1.79k|        }
   36|      0|        return ret;
   37|  2.06k|    };

_Z37get_runtime_supported_implementationsv:
   18|      1|get_runtime_supported_implementations() {
   19|      1|    std::vector<const simdjson::implementation*> ret;
   20|      4|    for(auto& e: simdjson::get_available_implementations()) {
  ------------------
  |  Branch (20:16): [True: 4, False: 1]
  ------------------
   21|      4|        if(e->supported_by_runtime_system()) {
  ------------------
  |  Branch (21:12): [True: 3, False: 1]
  ------------------
   22|      3|            ret.emplace_back(e);
   23|      3|        }
   24|      4|    }
   25|      1|    if(ret.empty()) {
  ------------------
  |  Branch (25:8): [True: 0, False: 1]
  ------------------
   26|       |        // No implementations available, not even fallback, weird.
   27|      0|        std::abort();
   28|      0|    }
   29|      1|    return ret;
   30|      1|}

_ZN8simdjson13error_messageENS_10error_codeE:
   21|    264|inline const char *error_message(error_code error) noexcept {
   22|       |  // If you're using error_code, we're trusting you got it from the enum.
   23|    264|  return internal::error_codes[int(error)].message;
   24|    264|}

_ZN8simdjson8fallback14implementationC2Ev:
   23|      1|  ) {}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_112add_overflowEmmPm:
   51|  12.7k|                                uint64_t *result) {
   52|       |#if SIMDJSON_REGULAR_VISUAL_STUDIO
   53|       |  return _addcarry_u64(0, value1, value2,
   54|       |                       reinterpret_cast<unsigned __int64 *>(result));
   55|       |#else
   56|  12.7k|  return __builtin_uaddll_overflow(value1, value2,
   57|  12.7k|                                   reinterpret_cast<unsigned long long *>(result));
   58|  12.7k|#endif
   59|  12.7k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_110count_onesEm:
   45|  1.32M|simdjson_inline long long int count_ones(uint64_t input_num) {
   46|  1.32M|  return _popcnt64(input_num);
   47|  1.32M|}

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

_ZN8simdjson7haswell14implementationC2Ev:
   21|      1|  ) {}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhEC2EPKh:
  304|   330k|    simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8<T>::load(ptr), simd8<T>::load(ptr+32)} {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhE4loadEPKh:
   77|   660k|    static simdjson_inline simd8<T> load(const T values[32]) {
   78|   660k|      return _mm256_loadu_si256(reinterpret_cast<const __m256i *>(values));
   79|   660k|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2EDv4_x:
  227|  4.62M|    simdjson_inline simd8(const __m256i _value) : base8_numeric<uint8_t>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhEC2EDv4_x:
   94|  4.62M|    simdjson_inline base8_numeric(const __m256i _value) : base8<T>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5base8IhNS2_5simd8IbEEEC2EDv4_x:
   46|  4.62M|    simdjson_inline base8(const __m256i _value) : base<simd8<T>>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEC2EDv4_x:
   20|  4.62M|    simdjson_inline base(const __m256i _value) : value(_value) {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEorES5_:
   27|   660k|    simdjson_inline Child operator|(const Child other) const { return _mm256_or_si256(*this, other); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEcvRKDv4_xEv:
   23|  9.90M|    simdjson_inline operator const __m256i&() const { return this->value; }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhE9repeat_16Ehhhhhhhhhhhhhhhh:
  248|   660k|    ) {
  249|   660k|      return simd8<uint8_t>(
  250|   660k|        v0, v1, v2, v3, v4, v5, v6, v7,
  251|   660k|        v8, v9, v10,v11,v12,v13,v14,v15,
  252|   660k|        v0, v1, v2, v3, v4, v5, v6, v7,
  253|   660k|        v8, v9, v10,v11,v12,v13,v14,v15
  254|   660k|      );
  255|   660k|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2Ehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh:
  243|   660k|    )) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IhEC2Eh:
  229|   660k|    simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhE5splatEh:
   75|  1.32M|    static simdjson_inline simd8<T> splat(T _value) { return _mm256_set1_epi8(_value); }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5simd8IbEC2EDv4_x:
   64|  2.64M|    simdjson_inline simd8<bool>(const __m256i _value) : base8<bool>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd5base8IbNS2_5simd8IbEEEC2EDv4_x:
   46|  2.64M|    simdjson_inline base8(const __m256i _value) : base<simd8<T>>(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IbEEEC2EDv4_x:
   20|  2.64M|    simdjson_inline base(const __m256i _value) : value(_value) {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simdeqENS2_5simd8IhEES4_:
   48|  2.64M|    friend simdjson_really_inline Mask operator==(const simd8<T> lhs, const simd8<T> rhs) { return _mm256_cmpeq_epi8(lhs, rhs); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd5simd8IbE10to_bitmaskEv:
   68|  2.64M|    simdjson_inline int to_bitmask() const { return _mm256_movemask_epi8(*this); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd4baseINS2_5simd8IbEEEcvRKDv4_xEv:
   23|  2.64M|    simdjson_inline operator const __m256i&() const { return this->value; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhE2eqEh:
  337|   660k|    simdjson_inline uint64_t eq(const T m) const {
  338|   660k|      const simd8<T> mask = simd8<T>::splat(m);
  339|   660k|      return  simd8x64<bool>(
  340|   660k|        this->chunks[0] == mask,
  341|   660k|        this->chunks[1] == mask
  342|   660k|      ).to_bitmask();
  343|   660k|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IbEC2ENS2_5simd8IbEES6_:
  303|  1.32M|    simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1) : chunks{chunk0, chunk1} {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IbE10to_bitmaskEv:
  319|  1.32M|    simdjson_inline uint64_t to_bitmask() const {
  320|  1.32M|      uint64_t r_lo = uint32_t(this->chunks[0].to_bitmask());
  321|  1.32M|      uint64_t r_hi =                       this->chunks[1].to_bitmask();
  322|  1.32M|      return r_lo | (r_hi << 32);
  323|  1.32M|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhE2eqERKS4_:
  345|   660k|    simdjson_inline uint64_t eq(const simd8x64<uint8_t> &other) const {
  346|   660k|      return  simd8x64<bool>(
  347|   660k|        this->chunks[0] == other.chunks[0],
  348|   660k|        this->chunks[1] == other.chunks[1]
  349|   660k|      ).to_bitmask();
  350|   660k|    }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhEC2ENS2_5simd8IhEES6_:
  303|   990k|    simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1) : chunks{chunk0, chunk1} {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd8simd8x64IhE8compressEmPh:
  306|   330k|    simdjson_inline uint64_t compress(uint64_t mask, T * output) const {
  307|   330k|      uint32_t mask1 = uint32_t(mask);
  308|   330k|      uint32_t mask2 = uint32_t(mask >> 32);
  309|   330k|      this->chunks[0].compress(mask1, output);
  310|   330k|      this->chunks[1].compress(mask2, output + 32 - count_ones(mask1));
  311|   330k|      return 64 - count_ones(mask);
  312|   330k|    }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_14simd13base8_numericIhE8compressIhEEvjPT_:
  122|   660k|    simdjson_inline void compress(uint32_t mask, L * output) const {
  123|   660k|      using internal::thintable_epi8;
  124|   660k|      using internal::BitsSetTable256mul2;
  125|   660k|      using internal::pshufb_combine_table;
  126|       |      // this particular implementation was inspired by work done by @animetosho
  127|       |      // we do it in four steps, first 8 bytes and then second 8 bytes...
  128|   660k|      uint8_t mask1 = uint8_t(mask); // least significant 8 bits
  129|   660k|      uint8_t mask2 = uint8_t(mask >> 8); // second least significant 8 bits
  130|   660k|      uint8_t mask3 = uint8_t(mask >> 16); // ...
  131|   660k|      uint8_t mask4 = uint8_t(mask >> 24); // ...
  132|       |      // next line just loads the 64-bit values thintable_epi8[mask1] and
  133|       |      // thintable_epi8[mask2] into a 128-bit register, using only
  134|       |      // two instructions on most compilers.
  135|   660k|      __m256i shufmask =  _mm256_set_epi64x(thintable_epi8[mask4], thintable_epi8[mask3],
  136|   660k|        thintable_epi8[mask2], thintable_epi8[mask1]);
  137|       |      // we increment by 0x08 the second half of the mask and so forth
  138|   660k|      shufmask =
  139|   660k|      _mm256_add_epi8(shufmask, _mm256_set_epi32(0x18181818, 0x18181818,
  140|   660k|         0x10101010, 0x10101010, 0x08080808, 0x08080808, 0, 0));
  141|       |      // this is the version "nearly pruned"
  142|   660k|      __m256i pruned = _mm256_shuffle_epi8(*this, shufmask);
  143|       |      // we still need to put the  pieces back together.
  144|       |      // we compute the popcount of the first words:
  145|   660k|      int pop1 = BitsSetTable256mul2[mask1];
  146|   660k|      int pop3 = BitsSetTable256mul2[mask3];
  147|       |
  148|       |      // then load the corresponding mask
  149|       |      // could be done with _mm256_loadu2_m128i but many standard libraries omit this intrinsic.
  150|   660k|      __m256i v256 = _mm256_castsi128_si256(
  151|   660k|        _mm_loadu_si128(reinterpret_cast<const __m128i *>(pshufb_combine_table + pop1 * 8)));
  152|   660k|      __m256i compactmask = _mm256_insertf128_si256(v256,
  153|   660k|         _mm_loadu_si128(reinterpret_cast<const __m128i *>(pshufb_combine_table + pop3 * 8)), 1);
  154|   660k|      __m256i almostthere =  _mm256_shuffle_epi8(pruned, compactmask);
  155|       |      // We just need to write out the result.
  156|       |      // This is the tricky bit that is hard to do
  157|       |      // if we want to return a SIMD register, since there
  158|       |      // is no single-instruction approach to recombine
  159|       |      // the two 128-bit lanes with an offset.
  160|   660k|      __m128i v128;
  161|   660k|      v128 = _mm256_castsi256_si128(almostthere);
  162|   660k|      _mm_storeu_si128( reinterpret_cast<__m128i *>(output), v128);
  163|   660k|      v128 = _mm256_extractf128_si256(almostthere, 1);
  164|   660k|      _mm_storeu_si128( reinterpret_cast<__m128i *>(output + 16 - count_ones(mask & 0xFFFF)), v128);
  165|   660k|    }

_ZN8simdjson7icelake14implementationC2Ev:
   21|      1|  ) {}

_ZNK8simdjson14implementation25required_instruction_setsEv:
   90|      4|  virtual uint32_t required_instruction_sets() const { return _required_instruction_sets; }
_ZN8simdjson14implementationC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_j:
  146|      4|  {
  147|      4|  }
_ZN8simdjson8internal29available_implementation_listC2Ev:
  176|      1|  simdjson_inline available_implementation_list() {}
_ZN8simdjson14implementationD2Ev:
  148|      4|  virtual ~implementation()=default;

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

simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_112add_overflowEmmPm:
   60|  12.7k|                                uint64_t *result) {
   61|       |#if SIMDJSON_REGULAR_VISUAL_STUDIO
   62|       |  return _addcarry_u64(0, value1, value2,
   63|       |                       reinterpret_cast<unsigned __int64 *>(result));
   64|       |#else
   65|  12.7k|  return __builtin_uaddll_overflow(value1, value2,
   66|  12.7k|                                   reinterpret_cast<unsigned long long *>(result));
   67|  12.7k|#endif
   68|  12.7k|}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_110count_onesEm:
   54|  1.31M|simdjson_inline long long int count_ones(uint64_t input_num) {
   55|  1.31M|  return _popcnt64(input_num);
   56|  1.31M|}

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

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

simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_14simd8simd8x64IhEC2EPKh:
  274|   659k|    simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8<T>::load(ptr), simd8<T>::load(ptr+16), simd8<T>::load(ptr+32), simd8<T>::load(ptr+48)} {}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_14simd13base8_numericIhE4loadEPKh:
   76|  2.63M|    static simdjson_inline simd8<T> load(const T values[16]) {
   77|  2.63M|      return _mm_loadu_si128(reinterpret_cast<const __m128i *>(values));
   78|  2.63M|    }
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_14simd5simd8IhEC2EDv2_x:
  203|  9.23M|    simdjson_inline simd8(const __m128i _value) : base8_numeric<uint8_t>(_value) {}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_14simd13base8_numericIhEC2EDv2_x:
   91|  9.23M|    simdjson_inline base8_numeric(const __m128i _value) : base8<T>(_value) {}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_14simd5base8IhNS2_5simd8IbEEEC2EDv2_x:
   45|  9.23M|    simdjson_inline base8(const __m128i _value) : base<simd8<T>>(_value) {}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEC2EDv2_x:
   19|  9.23M|    simdjson_inline base(const __m128i _value) : value(_value) {}
simdjson.cpp:_ZNK8simdjson8westmere12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEorES5_:
   26|  1.31M|    simdjson_inline Child operator|(const Child other) const { return _mm_or_si128(*this, other); }
simdjson.cpp:_ZNK8simdjson8westmere12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEcvRKDv2_xEv:
   22|  18.4M|    simdjson_inline operator const __m128i&() const { return this->value; }
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_14simd4baseINS2_5simd8IhEEEcvRDv2_xEv:
   23|  1.31M|    simdjson_inline operator __m128i&() { return this->value; }
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_14simd5simd8IhE9repeat_16Ehhhhhhhhhhhhhhhh:
  220|   659k|    ) {
  221|   659k|      return simd8<uint8_t>(
  222|   659k|        v0, v1, v2, v3, v4, v5, v6, v7,
  223|   659k|        v8, v9, v10,v11,v12,v13,v14,v15
  224|   659k|      );
  225|   659k|    }
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_14simd5simd8IhEC2Ehhhhhhhhhhhhhhhh:
  215|   659k|    )) {}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_14simd5simd8IhEC2Eh:
  205|  1.31M|    simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_14simd13base8_numericIhE5splatEh:
   74|  1.97M|    static simdjson_inline simd8<T> splat(T _value) { return _mm_set1_epi8(_value); }
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_14simd5simd8IbEC2EDv2_x:
   63|  5.27M|    simdjson_inline simd8<bool>(const __m128i _value) : base8<bool>(_value) {}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_14simd5base8IbNS2_5simd8IbEEEC2EDv2_x:
   45|  5.27M|    simdjson_inline base8(const __m128i _value) : base<simd8<T>>(_value) {}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_14simd4baseINS2_5simd8IbEEEC2EDv2_x:
   19|  5.27M|    simdjson_inline base(const __m128i _value) : value(_value) {}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_14simdeqENS2_5simd8IhEES4_:
   47|  5.27M|    friend simdjson_inline Mask operator==(const simd8<T> lhs, const simd8<T> rhs) { return _mm_cmpeq_epi8(lhs, rhs); }
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_14simd8simd8x64IbEC2ENS2_5simd8IbEES6_S6_S6_:
  273|  1.31M|    simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1, const simd8<T> chunk2, const simd8<T> chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {}
simdjson.cpp:_ZNK8simdjson8westmere12_GLOBAL__N_14simd8simd8x64IbE10to_bitmaskEv:
  295|  1.31M|    simdjson_inline uint64_t to_bitmask() const {
  296|  1.31M|      uint64_t r0 = uint32_t(this->chunks[0].to_bitmask() );
  297|  1.31M|      uint64_t r1 =          this->chunks[1].to_bitmask() ;
  298|  1.31M|      uint64_t r2 =          this->chunks[2].to_bitmask() ;
  299|  1.31M|      uint64_t r3 =          this->chunks[3].to_bitmask() ;
  300|  1.31M|      return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48);
  301|  1.31M|    }
simdjson.cpp:_ZNK8simdjson8westmere12_GLOBAL__N_14simd5simd8IbE10to_bitmaskEv:
   67|  5.27M|    simdjson_inline int to_bitmask() const { return _mm_movemask_epi8(*this); }
simdjson.cpp:_ZNK8simdjson8westmere12_GLOBAL__N_14simd4baseINS2_5simd8IbEEEcvRKDv2_xEv:
   22|  5.27M|    simdjson_inline operator const __m128i&() const { return this->value; }
simdjson.cpp:_ZNK8simdjson8westmere12_GLOBAL__N_14simd8simd8x64IhE2eqEh:
  303|   659k|    simdjson_inline uint64_t eq(const T m) const {
  304|   659k|      const simd8<T> mask = simd8<T>::splat(m);
  305|   659k|      return  simd8x64<bool>(
  306|   659k|        this->chunks[0] == mask,
  307|   659k|        this->chunks[1] == mask,
  308|   659k|        this->chunks[2] == mask,
  309|   659k|        this->chunks[3] == mask
  310|   659k|      ).to_bitmask();
  311|   659k|    }
simdjson.cpp:_ZNK8simdjson8westmere12_GLOBAL__N_14simd8simd8x64IhE2eqERKS4_:
  313|   659k|    simdjson_inline uint64_t eq(const simd8x64<uint8_t> &other) const {
  314|   659k|      return  simd8x64<bool>(
  315|   659k|        this->chunks[0] == other.chunks[0],
  316|   659k|        this->chunks[1] == other.chunks[1],
  317|   659k|        this->chunks[2] == other.chunks[2],
  318|   659k|        this->chunks[3] == other.chunks[3]
  319|   659k|      ).to_bitmask();
  320|   659k|    }
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_14simd8simd8x64IhEC2ENS2_5simd8IhEES6_S6_S6_:
  273|   989k|    simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1, const simd8<T> chunk2, const simd8<T> chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {}
simdjson.cpp:_ZNK8simdjson8westmere12_GLOBAL__N_14simd8simd8x64IhE8compressEmPh:
  287|   329k|    simdjson_inline uint64_t compress(uint64_t mask, T * output) const {
  288|   329k|      this->chunks[0].compress(uint16_t(mask), output);
  289|   329k|      this->chunks[1].compress(uint16_t(mask >> 16), output + 16 - count_ones(mask & 0xFFFF));
  290|   329k|      this->chunks[2].compress(uint16_t(mask >> 32), output + 32 - count_ones(mask & 0xFFFFFFFF));
  291|   329k|      this->chunks[3].compress(uint16_t(mask >> 48), output + 48 - count_ones(mask & 0xFFFFFFFFFFFF));
  292|   329k|      return 64 - count_ones(mask);
  293|   329k|    }
simdjson.cpp:_ZNK8simdjson8westmere12_GLOBAL__N_14simd13base8_numericIhE8compressIhEEvtPT_:
  119|  1.31M|    simdjson_inline void compress(uint16_t mask, L * output) const {
  120|  1.31M|      using internal::thintable_epi8;
  121|  1.31M|      using internal::BitsSetTable256mul2;
  122|  1.31M|      using internal::pshufb_combine_table;
  123|       |      // this particular implementation was inspired by work done by @animetosho
  124|       |      // we do it in two steps, first 8 bytes and then second 8 bytes
  125|  1.31M|      uint8_t mask1 = uint8_t(mask); // least significant 8 bits
  126|  1.31M|      uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits
  127|       |      // next line just loads the 64-bit values thintable_epi8[mask1] and
  128|       |      // thintable_epi8[mask2] into a 128-bit register, using only
  129|       |      // two instructions on most compilers.
  130|  1.31M|      __m128i shufmask =  _mm_set_epi64x(thintable_epi8[mask2], thintable_epi8[mask1]);
  131|       |      // we increment by 0x08 the second half of the mask
  132|  1.31M|      shufmask =
  133|  1.31M|      _mm_add_epi8(shufmask, _mm_set_epi32(0x08080808, 0x08080808, 0, 0));
  134|       |      // this is the version "nearly pruned"
  135|  1.31M|      __m128i pruned = _mm_shuffle_epi8(*this, shufmask);
  136|       |      // we still need to put the two halves together.
  137|       |      // we compute the popcount of the first half:
  138|  1.31M|      int pop1 = BitsSetTable256mul2[mask1];
  139|       |      // then load the corresponding mask, what it does is to write
  140|       |      // only the first pop1 bytes from the first 8 bytes, and then
  141|       |      // it fills in with the bytes from the second 8 bytes + some filling
  142|       |      // at the end.
  143|  1.31M|      __m128i compactmask =
  144|  1.31M|      _mm_loadu_si128(reinterpret_cast<const __m128i *>(pshufb_combine_table + pop1 * 8));
  145|  1.31M|      __m128i answer = _mm_shuffle_epi8(pruned, compactmask);
  146|  1.31M|      _mm_storeu_si128(reinterpret_cast<__m128i *>(output), answer);
  147|  1.31M|    }

_ZNK8simdjson8fallback14implementation6minifyEPKhmPhRm:
  259|    687|simdjson_warn_unused error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept {
  260|    687|  size_t i = 0, pos = 0;
  261|    687|  uint8_t quote = 0;
  262|    687|  uint8_t nonescape = 1;
  263|       |
  264|  21.0M|  while (i < len) {
  ------------------
  |  Branch (264:10): [True: 21.0M, False: 687]
  ------------------
  265|  21.0M|    unsigned char c = buf[i];
  266|  21.0M|    uint8_t *meta = jump_table + 3 * c;
  267|       |
  268|  21.0M|    quote = quote ^ (meta[0] & nonescape);
  269|  21.0M|    dst[pos] = c;
  270|  21.0M|    pos += meta[2] | quote;
  271|       |
  272|  21.0M|    i += 1;
  273|  21.0M|    nonescape = uint8_t(~nonescape) | (meta[1]);
  274|  21.0M|  }
  275|    687|  dst_len = pos; // we intentionally do not work with a reference
  276|       |  // for fear of aliasing
  277|    687|  return quote ? UNCLOSED_STRING : SUCCESS;
  ------------------
  |  Branch (277:10): [True: 88, False: 599]
  ------------------
  278|    687|}

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

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage113json_minifier6minifyILm128EEENS_10error_codeEPKhmPhRm:
   60|    687|error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) noexcept {
   61|    687|  buf_block_reader<STEP_SIZE> reader(buf, len);
   62|    687|  json_minifier minifier(dst);
   63|       |
   64|       |  // Index the first n-1 blocks
   65|   165k|  while (reader.has_full_block()) {
  ------------------
  |  Branch (65:10): [True: 164k, False: 687]
  ------------------
   66|   164k|    minifier.step<STEP_SIZE>(reader.full_block(), reader);
   67|   164k|  }
   68|       |
   69|       |  // Index the last (remainder) block, padded with spaces
   70|    687|  uint8_t block[STEP_SIZE];
   71|    687|  size_t remaining_bytes = reader.get_remainder(block);
   72|    687|  if (remaining_bytes > 0) {
  ------------------
  |  Branch (72:7): [True: 687, False: 0]
  ------------------
   73|       |    // We do not want to write directly to the output stream. Rather, we write
   74|       |    // to a local buffer (for safety).
   75|    687|    uint8_t out_block[STEP_SIZE];
   76|    687|    uint8_t * const guarded_dst{minifier.dst};
   77|    687|    minifier.dst = out_block;
   78|    687|    minifier.step<STEP_SIZE>(block, reader);
   79|    687|    size_t to_write = minifier.dst - out_block;
   80|       |    // In some cases, we could be enticed to consider the padded spaces
   81|       |    // as part of the string. This is fine as long as we do not write more
   82|       |    // than we consumed.
   83|    687|    if(to_write > remaining_bytes) { to_write = remaining_bytes; }
  ------------------
  |  Branch (83:8): [True: 80, False: 607]
  ------------------
   84|    687|    memcpy(guarded_dst, out_block, to_write);
   85|    687|    minifier.dst = guarded_dst + to_write;
   86|    687|  }
   87|    687|  return minifier.finish(dst, dst_len);
   88|    687|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage113json_minifierC2EPh:
   19|    687|  {}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage113json_minifier4stepILm128EEEvPKhRNS1_16buf_block_readerIXT_EEE:
   41|   165k|simdjson_inline void json_minifier::step<128>(const uint8_t *block_buf, buf_block_reader<128> &reader) noexcept {
   42|   165k|  simd::simd8x64<uint8_t> in_1(block_buf);
   43|   165k|  simd::simd8x64<uint8_t> in_2(block_buf+64);
   44|   165k|  json_block block_1 = scanner.next(in_1);
   45|   165k|  json_block block_2 = scanner.next(in_2);
   46|   165k|  this->next(in_1, block_1);
   47|   165k|  this->next(in_2, block_2);
   48|   165k|  reader.advance();
   49|   165k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage113json_minifier4nextERKNS1_4simd8simd8x64IhEERKNS2_10json_blockE:
   28|   330k|simdjson_inline void json_minifier::next(const simd::simd8x64<uint8_t>& in, const json_block& block) {
   29|   330k|  uint64_t mask = block.whitespace();
   30|   330k|  dst += in.compress(mask, dst);
   31|   330k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage113json_minifier6finishEPhRm:
   33|    687|simdjson_inline error_code json_minifier::finish(uint8_t *dst_start, size_t &dst_len) {
   34|    687|  error_code error = scanner.finish();
   35|    687|  if (error) { dst_len = 0; return error; }
  ------------------
  |  Branch (35:7): [True: 88, False: 599]
  ------------------
   36|    599|  dst_len = dst - dst_start;
   37|    599|  return SUCCESS;
   38|    687|}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_16stage113json_minifier6minifyILm64EEENS_10error_codeEPKhmPhRm:
   60|    687|error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) noexcept {
   61|    687|  buf_block_reader<STEP_SIZE> reader(buf, len);
   62|    687|  json_minifier minifier(dst);
   63|       |
   64|       |  // Index the first n-1 blocks
   65|   329k|  while (reader.has_full_block()) {
  ------------------
  |  Branch (65:10): [True: 329k, False: 687]
  ------------------
   66|   329k|    minifier.step<STEP_SIZE>(reader.full_block(), reader);
   67|   329k|  }
   68|       |
   69|       |  // Index the last (remainder) block, padded with spaces
   70|    687|  uint8_t block[STEP_SIZE];
   71|    687|  size_t remaining_bytes = reader.get_remainder(block);
   72|    687|  if (remaining_bytes > 0) {
  ------------------
  |  Branch (72:7): [True: 687, False: 0]
  ------------------
   73|       |    // We do not want to write directly to the output stream. Rather, we write
   74|       |    // to a local buffer (for safety).
   75|    687|    uint8_t out_block[STEP_SIZE];
   76|    687|    uint8_t * const guarded_dst{minifier.dst};
   77|    687|    minifier.dst = out_block;
   78|    687|    minifier.step<STEP_SIZE>(block, reader);
   79|    687|    size_t to_write = minifier.dst - out_block;
   80|       |    // In some cases, we could be enticed to consider the padded spaces
   81|       |    // as part of the string. This is fine as long as we do not write more
   82|       |    // than we consumed.
   83|    687|    if(to_write > remaining_bytes) { to_write = remaining_bytes; }
  ------------------
  |  Branch (83:8): [True: 73, False: 614]
  ------------------
   84|    687|    memcpy(guarded_dst, out_block, to_write);
   85|    687|    minifier.dst = guarded_dst + to_write;
   86|    687|  }
   87|    687|  return minifier.finish(dst, dst_len);
   88|    687|}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_16stage113json_minifierC2EPh:
   19|    687|  {}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_16stage113json_minifier4stepILm64EEEvPKhRNS1_16buf_block_readerIXT_EEE:
   52|   329k|simdjson_inline void json_minifier::step<64>(const uint8_t *block_buf, buf_block_reader<64> &reader) noexcept {
   53|   329k|  simd::simd8x64<uint8_t> in_1(block_buf);
   54|   329k|  json_block block_1 = scanner.next(in_1);
   55|   329k|  this->next(block_buf, block_1);
   56|   329k|  reader.advance();
   57|   329k|}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_16stage113json_minifier4nextERKNS1_4simd8simd8x64IhEERKNS2_10json_blockE:
   28|   329k|simdjson_inline void json_minifier::next(const simd::simd8x64<uint8_t>& in, const json_block& block) {
   29|   329k|  uint64_t mask = block.whitespace();
   30|   329k|  dst += in.compress(mask, dst);
   31|   329k|}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_16stage113json_minifier6finishEPhRm:
   33|    687|simdjson_inline error_code json_minifier::finish(uint8_t *dst_start, size_t &dst_len) {
   34|    687|  error_code error = scanner.finish();
   35|    687|  if (error) { dst_len = 0; return error; }
  ------------------
  |  Branch (35:7): [True: 88, False: 599]
  ------------------
   36|    599|  dst_len = dst - dst_start;
   37|    599|  return SUCCESS;
   38|    687|}

simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage112json_scannerC2Ev:
   99|    687|  json_scanner() = default;
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage112json_scanner4nextERKNS1_4simd8simd8x64IhEE:
  125|   330k|simdjson_inline json_block json_scanner::next(const simd::simd8x64<uint8_t>& in) {
  126|   330k|  json_string_block strings = string_scanner.next(in);
  127|       |  // identifies the white-space and the structural characters
  128|   330k|  json_character_block characters = json_character_block::classify(in);
  129|       |  // The term "scalar" refers to anything except structural characters and white space
  130|       |  // (so letters, numbers, quotes).
  131|       |  // We want follows_scalar to mark anything that follows a non-quote scalar (so letters and numbers).
  132|       |  //
  133|       |  // A terminal quote should either be followed by a structural character (comma, brace, bracket, colon)
  134|       |  // or nothing. However, we still want ' "a string"true ' to mark the 't' of 'true' as a potential
  135|       |  // pseudo-structural character just like we would if we had  ' "a string" true '; otherwise we
  136|       |  // may need to add an extra check when parsing strings.
  137|       |  //
  138|       |  // Performance: there are many ways to skin this cat.
  139|   330k|  const uint64_t nonquote_scalar = characters.scalar() & ~strings.quote();
  140|   330k|  uint64_t follows_nonquote_scalar = follows(nonquote_scalar, prev_scalar);
  141|       |  // We are returning a function-local object so either we get a move constructor
  142|       |  // or we get copy elision.
  143|   330k|  return json_block(
  144|   330k|    strings,// strings is a function-local object so either it moves or the copy is elided.
  145|   330k|    characters,
  146|   330k|    follows_nonquote_scalar
  147|   330k|  );
  148|   330k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage17followsEmRm:
  119|   330k|simdjson_inline uint64_t follows(const uint64_t match, uint64_t &overflow) {
  120|   330k|  const uint64_t result = match << 1 | overflow;
  121|   330k|  overflow = match >> 63;
  122|   330k|  return result;
  123|   330k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage110json_blockC2ENS2_17json_string_blockENS1_20json_character_blockEm:
   29|   330k|  _string(string), _characters(characters), _follows_potential_nonquote_scalar(follows_potential_nonquote_scalar) {}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage110json_block10whitespaceEv:
   37|   330k|  simdjson_inline uint64_t whitespace() const noexcept { return non_quote_outside_string(_characters.whitespace()); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_16stage110json_block24non_quote_outside_stringEm:
   44|   330k|  simdjson_inline uint64_t non_quote_outside_string(uint64_t mask) const noexcept { return _string.non_quote_outside_string(mask); }
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage112json_scanner6finishEv:
  150|    687|simdjson_inline error_code json_scanner::finish() {
  151|    687|  return string_scanner.finish();
  152|    687|}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_16stage112json_scannerC2Ev:
   99|    687|  json_scanner() = default;
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_16stage112json_scanner4nextERKNS1_4simd8simd8x64IhEE:
  125|   329k|simdjson_inline json_block json_scanner::next(const simd::simd8x64<uint8_t>& in) {
  126|   329k|  json_string_block strings = string_scanner.next(in);
  127|       |  // identifies the white-space and the structural characters
  128|   329k|  json_character_block characters = json_character_block::classify(in);
  129|       |  // The term "scalar" refers to anything except structural characters and white space
  130|       |  // (so letters, numbers, quotes).
  131|       |  // We want follows_scalar to mark anything that follows a non-quote scalar (so letters and numbers).
  132|       |  //
  133|       |  // A terminal quote should either be followed by a structural character (comma, brace, bracket, colon)
  134|       |  // or nothing. However, we still want ' "a string"true ' to mark the 't' of 'true' as a potential
  135|       |  // pseudo-structural character just like we would if we had  ' "a string" true '; otherwise we
  136|       |  // may need to add an extra check when parsing strings.
  137|       |  //
  138|       |  // Performance: there are many ways to skin this cat.
  139|   329k|  const uint64_t nonquote_scalar = characters.scalar() & ~strings.quote();
  140|   329k|  uint64_t follows_nonquote_scalar = follows(nonquote_scalar, prev_scalar);
  141|       |  // We are returning a function-local object so either we get a move constructor
  142|       |  // or we get copy elision.
  143|   329k|  return json_block(
  144|   329k|    strings,// strings is a function-local object so either it moves or the copy is elided.
  145|   329k|    characters,
  146|   329k|    follows_nonquote_scalar
  147|   329k|  );
  148|   329k|}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_16stage17followsEmRm:
  119|   329k|simdjson_inline uint64_t follows(const uint64_t match, uint64_t &overflow) {
  120|   329k|  const uint64_t result = match << 1 | overflow;
  121|   329k|  overflow = match >> 63;
  122|   329k|  return result;
  123|   329k|}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_16stage110json_blockC2ENS2_17json_string_blockENS1_20json_character_blockEm:
   29|   329k|  _string(string), _characters(characters), _follows_potential_nonquote_scalar(follows_potential_nonquote_scalar) {}
simdjson.cpp:_ZNK8simdjson8westmere12_GLOBAL__N_16stage110json_block10whitespaceEv:
   37|   329k|  simdjson_inline uint64_t whitespace() const noexcept { return non_quote_outside_string(_characters.whitespace()); }
simdjson.cpp:_ZNK8simdjson8westmere12_GLOBAL__N_16stage110json_block24non_quote_outside_stringEm:
   44|   329k|  simdjson_inline uint64_t non_quote_outside_string(uint64_t mask) const noexcept { return _string.non_quote_outside_string(mask); }
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_16stage112json_scanner6finishEv:
  150|    687|simdjson_inline error_code json_scanner::finish() {
  151|    687|  return string_scanner.finish();
  152|    687|}

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

_ZNK8simdjson7haswell14implementation6minifyEPKhmPhRm:
  134|    687|simdjson_warn_unused error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept {
  135|    687|  return haswell::stage1::json_minifier::minify<128>(buf, len, dst, dst_len);
  136|    687|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_16stage119json_string_scanner12find_escapedEm:
  126|   330k|simdjson_inline uint64_t json_string_scanner::find_escaped(uint64_t backslash) {
  127|   330k|  if (!backslash) { uint64_t escaped = prev_escaped; prev_escaped = 0; return escaped; }
  ------------------
  |  Branch (127:7): [True: 317k, False: 12.7k]
  ------------------
  128|  12.7k|  return find_escaped_branchless(backslash);
  129|   330k|}
simdjson.cpp:_ZN8simdjson7haswell12_GLOBAL__N_120json_character_block8classifyERKNS1_4simd8simd8x64IhEE:
   32|   330k|simdjson_inline json_character_block json_character_block::classify(const simd::simd8x64<uint8_t>& in) {
   33|       |  // These lookups rely on the fact that anything < 127 will match the lower 4 bits, which is why
   34|       |  // we can't use the generic lookup_16.
   35|   330k|  const auto whitespace_table = simd8<uint8_t>::repeat_16(' ', 100, 100, 100, 17, 100, 113, 2, 100, '\t', '\n', 112, 100, '\r', 100, 100);
   36|       |
   37|       |  // The 6 operators (:,[]{}) have these values:
   38|       |  //
   39|       |  // , 2C
   40|       |  // : 3A
   41|       |  // [ 5B
   42|       |  // { 7B
   43|       |  // ] 5D
   44|       |  // } 7D
   45|       |  //
   46|       |  // If you use | 0x20 to turn [ and ] into { and }, the lower 4 bits of each character is unique.
   47|       |  // We exploit this, using a simd 4-bit lookup to tell us which character match against, and then
   48|       |  // match it (against | 0x20).
   49|       |  //
   50|       |  // To prevent recognizing other characters, everything else gets compared with 0, which cannot
   51|       |  // match due to the | 0x20.
   52|       |  //
   53|       |  // NOTE: Due to the | 0x20, this ALSO treats <FF> and <SUB> (control characters 0C and 1A) like ,
   54|       |  // and :. This gets caught in stage 2, which checks the actual character to ensure the right
   55|       |  // operators are in the right places.
   56|   330k|  const auto op_table = simd8<uint8_t>::repeat_16(
   57|   330k|    0, 0, 0, 0,
   58|   330k|    0, 0, 0, 0,
   59|   330k|    0, 0, ':', '{', // : = 3A, [ = 5B, { = 7B
   60|   330k|    ',', '}', 0, 0  // , = 2C, ] = 5D, } = 7D
   61|   330k|  );
   62|       |
   63|       |  // We compute whitespace and op separately. If later code only uses one or the
   64|       |  // other, given the fact that all functions are aggressively inlined, we can
   65|       |  // hope that useless computations will be omitted. This is namely case when
   66|       |  // minifying (we only need whitespace).
   67|       |
   68|   330k|  const uint64_t whitespace = in.eq({
   69|   330k|    _mm256_shuffle_epi8(whitespace_table, in.chunks[0]),
   70|   330k|    _mm256_shuffle_epi8(whitespace_table, in.chunks[1])
   71|   330k|  });
   72|       |  // Turn [ and ] into { and }
   73|   330k|  const simd8x64<uint8_t> curlified{
   74|   330k|    in.chunks[0] | 0x20,
   75|   330k|    in.chunks[1] | 0x20
   76|   330k|  };
   77|   330k|  const uint64_t op = curlified.eq({
   78|   330k|    _mm256_shuffle_epi8(op_table, in.chunks[0]),
   79|   330k|    _mm256_shuffle_epi8(op_table, in.chunks[1])
   80|   330k|  });
   81|       |
   82|   330k|  return { whitespace, op };
   83|   330k|}
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_120json_character_block6scalarEv:
   28|   330k|simdjson_inline uint64_t json_character_block::scalar() const noexcept { return ~(op() | whitespace()); }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_120json_character_block2opEv:
   27|   330k|simdjson_inline uint64_t json_character_block::op() const noexcept { return _op; }
simdjson.cpp:_ZNK8simdjson7haswell12_GLOBAL__N_120json_character_block10whitespaceEv:
   26|   660k|simdjson_inline uint64_t json_character_block::whitespace() const noexcept { return _whitespace; }

_ZNK8simdjson14implementation27supported_by_runtime_systemEv:
    6|      4|bool implementation::supported_by_runtime_system() const {
    7|      4|  uint32_t required_instruction_sets = this->required_instruction_sets();
    8|      4|  uint32_t supported_instruction_sets = internal::detect_supported_architectures();
    9|      4|  return ((supported_instruction_sets & required_instruction_sets) == required_instruction_sets);
   10|      4|}
_ZNK8simdjson8internal29available_implementation_list5beginEv:
  138|      1|const implementation * const *available_implementation_list::begin() const noexcept {
  139|      1|  return internal::get_available_implementation_pointers().begin();
  140|      1|}
_ZNK8simdjson8internal29available_implementation_list3endEv:
  141|      1|const implementation * const *available_implementation_list::end() const noexcept {
  142|      1|  return internal::get_available_implementation_pointers().end();
  143|      1|}
_ZN8simdjson29get_available_implementationsEv:
  174|      1|SIMDJSON_DLLIMPORTEXPORT const internal::available_implementation_list& get_available_implementations() {
  175|      1|  static const internal::available_implementation_list available_implementations{};
  176|      1|  return available_implementations;
  177|      1|}
simdjson.cpp:_ZN8simdjson8internalL37get_available_implementation_pointersEv:
   80|      2|static const std::initializer_list<const implementation *>& get_available_implementation_pointers() {
   81|      2|  static const std::initializer_list<const implementation *> available_implementation_pointers {
   82|      2|#if SIMDJSON_IMPLEMENTATION_ICELAKE
   83|      2|    get_icelake_singleton(),
   84|      2|#endif
   85|      2|#if SIMDJSON_IMPLEMENTATION_HASWELL
   86|      2|    get_haswell_singleton(),
   87|      2|#endif
   88|      2|#if SIMDJSON_IMPLEMENTATION_WESTMERE
   89|      2|    get_westmere_singleton(),
   90|      2|#endif
   91|       |#if SIMDJSON_IMPLEMENTATION_ARM64
   92|       |    get_arm64_singleton(),
   93|       |#endif
   94|       |#if SIMDJSON_IMPLEMENTATION_PPC64
   95|       |    get_ppc64_singleton(),
   96|       |#endif
   97|      2|#if SIMDJSON_IMPLEMENTATION_FALLBACK
   98|      2|    get_fallback_singleton(),
   99|      2|#endif
  100|      2|  }; // available_implementation_pointers
  101|      2|  return available_implementation_pointers;
  102|      2|}
simdjson.cpp:_ZN8simdjson8internalL21get_icelake_singletonEv:
   18|      1|static const icelake::implementation* get_icelake_singleton() {
   19|      1|  static const icelake::implementation icelake_singleton{};
   20|      1|  return &icelake_singleton;
   21|      1|}
simdjson.cpp:_ZN8simdjson8internalL21get_haswell_singletonEv:
   24|      1|static const haswell::implementation* get_haswell_singleton() {
   25|      1|  static const haswell::implementation haswell_singleton{};
   26|      1|  return &haswell_singleton;
   27|      1|}
simdjson.cpp:_ZN8simdjson8internalL22get_westmere_singletonEv:
   30|      1|static const westmere::implementation* get_westmere_singleton() {
   31|      1|  static const westmere::implementation westmere_singleton{};
   32|      1|  return &westmere_singleton;
   33|      1|}
simdjson.cpp:_ZN8simdjson8internalL22get_fallback_singletonEv:
   48|      1|static const fallback::implementation* get_fallback_singleton() {
   49|      1|  static const fallback::implementation fallback_singleton{};
   50|      1|  return &fallback_singleton;
   51|      1|}

_ZNK8simdjson8westmere14implementation6minifyEPKhmPhRm:
  133|    687|simdjson_warn_unused error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept {
  134|    687|  return westmere::stage1::json_minifier::minify<64>(buf, len, dst, dst_len);
  135|    687|}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_16stage119json_string_scanner12find_escapedEm:
  125|   329k|simdjson_inline uint64_t json_string_scanner::find_escaped(uint64_t backslash) {
  126|   329k|  if (!backslash) { uint64_t escaped = prev_escaped; prev_escaped = 0; return escaped; }
  ------------------
  |  Branch (126:7): [True: 317k, False: 12.7k]
  ------------------
  127|  12.7k|  return find_escaped_branchless(backslash);
  128|   329k|}
simdjson.cpp:_ZN8simdjson8westmere12_GLOBAL__N_120json_character_block8classifyERKNS1_4simd8simd8x64IhEE:
   24|   329k|simdjson_inline json_character_block json_character_block::classify(const simd::simd8x64<uint8_t>& in) {
   25|       |  // These lookups rely on the fact that anything < 127 will match the lower 4 bits, which is why
   26|       |  // we can't use the generic lookup_16.
   27|   329k|  auto whitespace_table = simd8<uint8_t>::repeat_16(' ', 100, 100, 100, 17, 100, 113, 2, 100, '\t', '\n', 112, 100, '\r', 100, 100);
   28|       |
   29|       |  // The 6 operators (:,[]{}) have these values:
   30|       |  //
   31|       |  // , 2C
   32|       |  // : 3A
   33|       |  // [ 5B
   34|       |  // { 7B
   35|       |  // ] 5D
   36|       |  // } 7D
   37|       |  //
   38|       |  // If you use | 0x20 to turn [ and ] into { and }, the lower 4 bits of each character is unique.
   39|       |  // We exploit this, using a simd 4-bit lookup to tell us which character match against, and then
   40|       |  // match it (against | 0x20).
   41|       |  //
   42|       |  // To prevent recognizing other characters, everything else gets compared with 0, which cannot
   43|       |  // match due to the | 0x20.
   44|       |  //
   45|       |  // NOTE: Due to the | 0x20, this ALSO treats <FF> and <SUB> (control characters 0C and 1A) like ,
   46|       |  // and :. This gets caught in stage 2, which checks the actual character to ensure the right
   47|       |  // operators are in the right places.
   48|   329k|  const auto op_table = simd8<uint8_t>::repeat_16(
   49|   329k|    0, 0, 0, 0,
   50|   329k|    0, 0, 0, 0,
   51|   329k|    0, 0, ':', '{', // : = 3A, [ = 5B, { = 7B
   52|   329k|    ',', '}', 0, 0  // , = 2C, ] = 5D, } = 7D
   53|   329k|  );
   54|       |
   55|       |  // We compute whitespace and op separately. If the code later only use one or the
   56|       |  // other, given the fact that all functions are aggressively inlined, we can
   57|       |  // hope that useless computations will be omitted. This is namely case when
   58|       |  // minifying (we only need whitespace).
   59|       |
   60|       |
   61|   329k|  const uint64_t whitespace = in.eq({
   62|   329k|    _mm_shuffle_epi8(whitespace_table, in.chunks[0]),
   63|   329k|    _mm_shuffle_epi8(whitespace_table, in.chunks[1]),
   64|   329k|    _mm_shuffle_epi8(whitespace_table, in.chunks[2]),
   65|   329k|    _mm_shuffle_epi8(whitespace_table, in.chunks[3])
   66|   329k|  });
   67|       |  // Turn [ and ] into { and }
   68|   329k|  const simd8x64<uint8_t> curlified{
   69|   329k|    in.chunks[0] | 0x20,
   70|   329k|    in.chunks[1] | 0x20,
   71|   329k|    in.chunks[2] | 0x20,
   72|   329k|    in.chunks[3] | 0x20
   73|   329k|  };
   74|   329k|  const uint64_t op = curlified.eq({
   75|   329k|    _mm_shuffle_epi8(op_table, in.chunks[0]),
   76|   329k|    _mm_shuffle_epi8(op_table, in.chunks[1]),
   77|   329k|    _mm_shuffle_epi8(op_table, in.chunks[2]),
   78|   329k|    _mm_shuffle_epi8(op_table, in.chunks[3])
   79|   329k|  });
   80|   329k|    return { whitespace, op };
   81|   329k|}
simdjson.cpp:_ZNK8simdjson8westmere12_GLOBAL__N_120json_character_block6scalarEv:
   18|   329k|  simdjson_inline uint64_t scalar() const noexcept { return ~(op() | whitespace()); }
simdjson.cpp:_ZNK8simdjson8westmere12_GLOBAL__N_120json_character_block2opEv:
   17|   329k|  simdjson_inline uint64_t op() const noexcept { return _op; }
simdjson.cpp:_ZNK8simdjson8westmere12_GLOBAL__N_120json_character_block10whitespaceEv:
   16|   659k|  simdjson_inline uint64_t whitespace() const noexcept { return _whitespace; }

