LLVMFuzzerTestOneInput:
   10|    429|{
   11|    429|    std::string s(reinterpret_cast<const char*>(data), size);
   12|    429|    std::istringstream is(s);
   13|    429|    std::vector<uint8_t> s1;
   14|    429|    ubjson_bytes_encoder encoder(s1);
   15|    429|    ubjson_stream_reader reader(is, encoder);
   16|       |
   17|    429|    std::error_code ec;
   18|    429|    reader.read(ec);
   19|       |
   20|    429|    return 0;
   21|    429|}

_ZNK8jsoncons6detail4spanIKhLm18446744073709551615EE4sizeEv:
  116|  2.34M|        {
  117|  2.34M|            return size_;
  118|  2.34M|        }
_ZN8jsoncons6detail4spanIKhLm18446744073709551615EEC2Ev:
   58|   568k|        {
   59|   568k|        }
_ZN8jsoncons6detail4spanIKhLm18446744073709551615EEC2EPS2_m:
   61|   212k|            : data_(data), size_(size)
   62|   212k|        {
   63|   212k|        }
_ZNK8jsoncons6detail4spanIKhLm18446744073709551615EE4dataEv:
  111|  1.56M|        {
  112|  1.56M|            return data_;
  113|  1.56M|        }

_ZN8jsoncons18basic_json_visitorIcEC2Ev:
  103|    429|        basic_json_visitor() = default;
_ZN8jsoncons19typed_array_visitorD2Ev:
   33|    429|        virtual ~typed_array_visitor() = default;
_ZN8jsoncons18basic_json_visitorIcE11begin_arrayEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  345|   133k|        {
  346|   133k|            visit_begin_array(length, tag, context, ec);
  347|   133k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   133k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  348|   133k|        }
_ZN8jsoncons18basic_json_visitorIcE12uint64_valueEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  414|   447k|        {
  415|   447k|            visit_uint64(value, tag, context, ec);
  416|   447k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   447k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  417|   447k|        }
_ZN8jsoncons18basic_json_visitorIcE9end_arrayERKNS_11ser_contextERNSt3__110error_codeE:
  351|  2.98M|        {
  352|  2.98M|            visit_end_array(context, ec);
  353|  2.98M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  2.98M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  354|  2.98M|        }
_ZN8jsoncons18basic_json_visitorIcE11int64_valueElNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  423|  1.77M|        {
  424|  1.77M|            visit_int64(value, tag, context, ec);
  425|  1.77M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  1.77M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  426|  1.77M|        }
_ZN8jsoncons18basic_json_visitorIcE12double_valueEdNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  441|  56.6k|        {
  442|  56.6k|            visit_double(value, tag, context, ec);
  443|  56.6k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  56.6k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  444|  56.6k|        }
_ZN8jsoncons18basic_json_visitorIcE10null_valueENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  365|  5.64M|        {
  366|  5.64M|            visit_null(tag, context, ec);
  367|  5.64M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  5.64M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  368|  5.64M|        }
_ZN8jsoncons18basic_json_visitorIcE10bool_valueEbNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  374|   228k|        {
  375|   228k|            visit_bool(value, tag, context, ec);
  376|   228k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   228k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  377|   228k|        }
_ZN8jsoncons18basic_json_visitorIcE12string_valueERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_12semantic_tagERKNS_11ser_contextERNS2_10error_codeE:
  383|  4.56M|        {
  384|  4.56M|            visit_string(value, tag, context, ec);
  385|  4.56M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  4.56M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  386|  4.56M|        }
_ZN8jsoncons18basic_json_visitorIcE11begin_arrayENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  339|  2.87M|        {
  340|  2.87M|            visit_begin_array(tag, context, ec);
  341|  2.87M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  2.87M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  342|  2.87M|        }
_ZN8jsoncons18basic_json_visitorIcE12begin_objectEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  327|  80.7k|        {
  328|  80.7k|            visit_begin_object(length, tag, context, ec);
  329|  80.7k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  80.7k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  330|  80.7k|        }
_ZN8jsoncons18basic_json_visitorIcE12begin_objectENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  318|  2.05k|        {
  319|  2.05k|            visit_begin_object(tag, context, ec);
  320|  2.05k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  2.05k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  321|  2.05k|        }
_ZN8jsoncons18basic_json_visitorIcE3keyERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEERKNS_11ser_contextERNS2_10error_codeE:
  357|   596k|        {
  358|   596k|            visit_key(name, context, ec);
  359|   596k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   596k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  360|   596k|        }
_ZN8jsoncons18basic_json_visitorIcE10end_objectERKNS_11ser_contextERNSt3__110error_codeE:
  333|  80.1k|        {
  334|  80.1k|            visit_end_object(context, ec);
  335|  80.1k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  80.1k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  336|  80.1k|        }
_ZN8jsoncons18basic_json_visitorIcE5flushEv:
  108|     12|        {
  109|     12|            visit_flush();
  110|     12|        }

_ZN8jsoncons11ser_contextD2Ev:
   21|    429|    virtual ~ser_context() = default;

_ZN8jsoncons10bytes_sinkINSt3__16vectorIhNS1_9allocatorIhEEEEvEC2ERS5_:
  315|    429|            : buf_ptr(std::addressof(buf))
  316|    429|        {
  317|    429|        }
_ZN8jsoncons10bytes_sinkINSt3__16vectorIhNS1_9allocatorIhEEEEvE9push_backEh:
  334|  48.4M|        {
  335|  48.4M|            buf_ptr->push_back(static_cast<value_type>(ch));
  336|  48.4M|        }
_ZN8jsoncons10bytes_sinkINSt3__16vectorIhNS1_9allocatorIhEEEEvE5flushEv:
  325|    441|        {
  326|    441|        }

_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEED2Ev:
  193|    429|    {
  194|    429|        if (chunk_)
  ------------------
  |  Branch (194:13): [True: 429, False: 0]
  ------------------
  195|    429|        {
  196|    429|            std::allocator_traits<char_allocator_type>::deallocate(alloc_, chunk_, chunk_size_);
  197|    429|        }
  198|    429|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEEC2ERNS1_13basic_istreamIcNS1_11char_traitsIcEEEERKS3_:
  176|    429|        : alloc_(alloc), stream_ptr_(std::addressof(is)), sbuf_(is.rdbuf()),
  177|    429|          chunk_size_(default_max_chunk_size)
  178|    429|    {
  179|    429|        chunk_ = std::allocator_traits<char_allocator_type>::allocate(alloc_, chunk_size_);
  180|    429|        data_end_ = chunk_;
  181|    429|    }
_ZN8jsoncons18basic_null_istreamIcEC1Ev:
   57|    429|      : std::basic_istream<CharT>(&nb_)
   58|    429|    {
   59|    429|    }
_ZN8jsoncons18basic_null_istreamIcE11null_bufferC2Ev:
   43|    429|        null_buffer() = default;
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE8is_errorEv:
  276|  6.60M|    {
  277|  6.60M|        return stream_ptr_->bad();  
  278|  6.60M|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4readEPhm:
  377|  15.3M|    {
  378|  15.3M|        std::size_t len = 0;
  379|  15.3M|        if (remaining_ > 0)
  ------------------
  |  Branch (379:13): [True: 15.3M, False: 977]
  ------------------
  380|  15.3M|        {
  381|  15.3M|            len = (std::min)(remaining_, length);
  382|  15.3M|            std::memcpy(p, data_end_, len*sizeof(value_type));
  383|  15.3M|            data_end_ += len;
  384|  15.3M|            remaining_ -= len;
  385|  15.3M|            position_ += len;
  386|  15.3M|        }
  387|  15.3M|        if (length - len == 0)
  ------------------
  |  Branch (387:13): [True: 15.3M, False: 2.25k]
  ------------------
  388|  15.3M|        {
  389|  15.3M|            return len;
  390|  15.3M|        }
  391|  2.25k|        else if (length - len < chunk_size_)
  ------------------
  |  Branch (391:18): [True: 2.25k, False: 0]
  ------------------
  392|  2.25k|        {
  393|  2.25k|            data_end_ = chunk_;
  394|  2.25k|            remaining_ = fill_buffer(chunk_, chunk_size_);
  395|  2.25k|            if (remaining_ > 0)
  ------------------
  |  Branch (395:17): [True: 2.12k, False: 127]
  ------------------
  396|  2.12k|            {
  397|  2.12k|                std::size_t len2 = (std::min)(remaining_, length-len);
  398|  2.12k|                std::memcpy(p+len, data_end_, len2*sizeof(value_type));
  399|  2.12k|                data_end_ += len2;
  400|  2.12k|                remaining_ -= len2;
  401|  2.12k|                position_ += len2;
  402|  2.12k|                len += len2;
  403|  2.12k|            }
  404|  2.25k|            return len;
  405|  2.25k|        }
  406|      0|        else
  407|      0|        {
  408|      0|            if (stream_ptr_->eof())
  ------------------
  |  Branch (408:17): [True: 0, False: 0]
  ------------------
  409|      0|            {
  410|      0|                remaining_ = 0;
  411|      0|                return 0;
  412|      0|            }
  413|      0|            JSONCONS_TRY
  ------------------
  |  |   37|      0|    #define JSONCONS_TRY try
  ------------------
  414|      0|            {
  415|      0|                std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(p+len), length-len);
  416|      0|                std::size_t len2 = static_cast<std::size_t>(count);
  417|      0|                if (len2 < length-len)
  ------------------
  |  Branch (417:21): [True: 0, False: 0]
  ------------------
  418|      0|                {
  419|      0|                    stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  420|      0|                }
  421|      0|                len += len2;
  422|      0|                position_ += len2;
  423|      0|                return len;
  424|      0|            }
  425|      0|            JSONCONS_CATCH(const std::exception&)     
  426|      0|            {
  427|      0|                stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  428|      0|                return 0;
  429|      0|            }
  430|      0|        }
  431|  15.3M|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE11fill_bufferEPhm:
  442|  3.29k|    {
  443|  3.29k|        if (stream_ptr_->eof())
  ------------------
  |  Branch (443:13): [True: 159, False: 3.13k]
  ------------------
  444|    159|        {
  445|    159|            return 0;
  446|    159|        }
  447|       |
  448|  3.13k|        JSONCONS_TRY
  ------------------
  |  |   37|  3.13k|    #define JSONCONS_TRY try
  ------------------
  449|  3.13k|        {
  450|  3.13k|            std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(chunk), chunk_size);
  451|  3.13k|            std::size_t length = static_cast<std::size_t>(count);
  452|       |
  453|  3.13k|            if (length < chunk_size)
  ------------------
  |  Branch (453:17): [True: 417, False: 2.71k]
  ------------------
  454|    417|            {
  455|    417|                stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  456|    417|            }
  457|  3.13k|            return length;
  458|  3.13k|        }
  459|  3.13k|        JSONCONS_CATCH(const std::exception&)     
  460|  3.13k|        {
  461|      0|            stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  462|      0|            return 0;
  463|      0|        }
  464|  3.13k|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE9read_spanIRNS1_12basic_stringIcNS1_11char_traitsIcEENS2_IcEEEEEENS_6detail4spanIKhLm18446744073709551615EEEmOT_:
  352|   780k|    {
  353|   780k|        if (JSONCONS_UNLIKELY(length == 0))
  ------------------
  |  |   78|   780k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 568k, False: 212k]
  |  |  ------------------
  ------------------
  354|   568k|        {
  355|   568k|            return span<const value_type>{};
  356|   568k|        }
  357|   212k|        if (remaining_ == 0 && length <= chunk_size_)
  ------------------
  |  Branch (357:13): [True: 162, False: 212k]
  |  Branch (357:32): [True: 27, False: 135]
  ------------------
  358|     27|        {
  359|     27|            remaining_ = fill_buffer(chunk_, chunk_size_);
  360|     27|            data_end_ = chunk_;
  361|     27|        }
  362|   212k|        if (length > remaining_)
  ------------------
  |  Branch (362:13): [True: 669, False: 211k]
  ------------------
  363|    669|        {
  364|    669|            buffer.clear();
  365|    669|            source_reader<stream_source_type>::read(*this, std::forward<Buffer>(buffer), length);
  366|    669|            return span<const value_type>(reinterpret_cast<const value_type*>(buffer.data()), buffer.size());
  367|    669|        }
  368|       |
  369|   211k|        const value_type* data = data_end_;
  370|   211k|        data_end_ += length;
  371|   211k|        remaining_ -= length;
  372|   211k|        position_ += length;
  373|   211k|        return span<const value_type>(data, length);
  374|   212k|    }
_ZN8jsoncons13source_readerINS_13stream_sourceIhNSt3__19allocatorIhEEEEE4readINS2_12basic_stringIcNS2_11char_traitsIcEENS3_IcEEEEEENS2_9enable_ifIXaaL_ZNS2_17integral_constantIbLb1EE5valueEEsr10ext_traits7is_byteINT_10value_typeEEE5valueEmE4typeERS5_RSG_m:
  746|    669|    {
  747|    669|        std::size_t unread = length;
  748|       |
  749|  2.54k|        while (unread > 0 && !source.eof())
  ------------------
  |  Branch (749:16): [True: 2.07k, False: 467]
  |  Branch (749:30): [True: 1.87k, False: 202]
  ------------------
  750|  1.87k|        {
  751|  1.87k|            if (source.remaining() == 0 && unread >= source.chunk_size())
  ------------------
  |  Branch (751:17): [True: 465, False: 1.41k]
  |  Branch (751:44): [True: 461, False: 4]
  ------------------
  752|    461|            {
  753|    461|                std::size_t n = source.chunk_size();
  754|    461|                std::size_t offset = buffer.size();
  755|    461|                buffer.resize(offset+n);
  756|    461|                std::size_t actual = source.read_buffer(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
  757|    461|                if (JSONCONS_UNLIKELY(actual != n))
  ------------------
  |  |   78|    461|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 128, False: 333]
  |  |  ------------------
  ------------------
  758|    128|                {
  759|    128|                    buffer.resize(offset+actual);
  760|    128|                }
  761|    461|                unread -= actual;
  762|    461|            }
  763|  1.41k|            else
  764|  1.41k|            {
  765|  1.41k|                std::size_t n = (std::min)(source.chunk_size(), unread);
  766|  1.41k|                std::size_t offset = buffer.size();
  767|  1.41k|                buffer.resize(offset+n);
  768|  1.41k|                std::size_t actual = source.read(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
  769|  1.41k|                if (JSONCONS_UNLIKELY(actual != n))
  ------------------
  |  |   78|  1.41k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 63, False: 1.35k]
  |  |  ------------------
  ------------------
  770|     63|                {
  771|     63|                    buffer.resize(offset + actual);
  772|     63|                }
  773|  1.41k|                unread -= actual;
  774|  1.41k|            }
  775|  1.87k|        }
  776|    669|        return length - unread;
  777|    669|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE3eofEv:
  271|  2.07k|    {
  272|  2.07k|        return remaining_ == 0 && stream_ptr_->eof();
  ------------------
  |  Branch (272:16): [True: 667, False: 1.41k]
  |  Branch (272:35): [True: 202, False: 465]
  ------------------
  273|  2.07k|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE9remainingEv:
  346|  1.87k|    {
  347|  1.87k|        return remaining_;
  348|  1.87k|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE10chunk_sizeEv:
  261|  2.34k|    {
  262|  2.34k|        return chunk_size_;
  263|  2.34k|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE11read_bufferEPhm:
  435|    461|    {
  436|    461|        auto len = fill_buffer(chunk, chunk_size);
  437|    461|        position_ += len;
  438|    461|        return len;
  439|    461|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4peekEv:
  312|  12.6M|    {
  313|  12.6M|        if (remaining_ == 0)
  ------------------
  |  Branch (313:13): [True: 555, False: 12.6M]
  ------------------
  314|    555|        {
  315|    555|            data_end_ = chunk_;
  316|    555|            remaining_ = fill_buffer(chunk_, chunk_size_);
  317|    555|        }
  318|  12.6M|        if (remaining_ > 0)
  ------------------
  |  Branch (318:13): [True: 12.6M, False: 49]
  ------------------
  319|  12.6M|        {
  320|  12.6M|            value_type c = *data_end_;
  321|  12.6M|            return char_result<value_type>{c, false};
  322|  12.6M|        }
  323|     49|        else
  324|     49|        {
  325|     49|            return char_result<value_type>{0, true};
  326|     49|        }
  327|  12.6M|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE6ignoreEm:
  286|  3.19M|    {
  287|  3.19M|        std::size_t len = 0;
  288|  3.19M|        if (remaining_ > 0)
  ------------------
  |  Branch (288:13): [True: 3.19M, False: 0]
  ------------------
  289|  3.19M|        {
  290|  3.19M|            len = (std::min)(remaining_, length);
  291|  3.19M|            position_ += len;
  292|  3.19M|            data_end_ += len;
  293|  3.19M|            remaining_ -= len;
  294|  3.19M|        }
  295|  3.19M|        while (len < length)
  ------------------
  |  Branch (295:16): [True: 0, False: 3.19M]
  ------------------
  296|      0|        {
  297|      0|            data_end_ = chunk_;
  298|      0|            remaining_ = fill_buffer(chunk_, chunk_size_);
  299|      0|            if (remaining_ == 0)
  ------------------
  |  Branch (299:17): [True: 0, False: 0]
  ------------------
  300|      0|            {
  301|      0|                break;
  302|      0|            }
  303|      0|            std::size_t len2 = (std::min)(remaining_, length-len);
  304|      0|            position_ += len2;
  305|      0|            data_end_ += len2;
  306|      0|            remaining_ -= len2;
  307|      0|            len += len2;
  308|      0|        }
  309|  3.19M|    }

_ZN8jsoncons6binary13native_to_bigIhNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  12.2M|    {
  128|  12.2M|        T val2 = byte_swap(val);
  129|  12.2M|        uint8_t buf[sizeof(T)];
  130|  12.2M|        std::memcpy(buf, &val2, sizeof(T));
  131|  12.2M|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 12.2M, False: 12.2M]
  ------------------
  132|  12.2M|        {
  133|  12.2M|            *d_first++ = item;
  134|  12.2M|        }
  135|  12.2M|    }
_ZN8jsoncons6binary9byte_swapIhEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  12.2M|    {
   22|  12.2M|        return val;
   23|  12.2M|    }
_ZN8jsoncons6binary13native_to_bigItNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  13.9k|    {
  128|  13.9k|        T val2 = byte_swap(val);
  129|  13.9k|        uint8_t buf[sizeof(T)];
  130|  13.9k|        std::memcpy(buf, &val2, sizeof(T));
  131|  13.9k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 27.8k, False: 13.9k]
  ------------------
  132|  27.8k|        {
  133|  27.8k|            *d_first++ = item;
  134|  27.8k|        }
  135|  13.9k|    }
_ZN8jsoncons6binary9byte_swapItEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  13.9k|    {
   29|  13.9k|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  13.9k|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  13.9k|#      define JSONCONS_BYTE_SWAP_16    __builtin_bswap16
  ------------------
   31|       |    #else
   32|       |        return (static_cast<uint16_t>(val) >> 8) | (static_cast<uint16_t>(val) << 8);
   33|       |    #endif
   34|  13.9k|    }
_ZN8jsoncons6binary13native_to_bigIjNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|    463|    {
  128|    463|        T val2 = byte_swap(val);
  129|    463|        uint8_t buf[sizeof(T)];
  130|    463|        std::memcpy(buf, &val2, sizeof(T));
  131|    463|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 1.85k, False: 463]
  ------------------
  132|  1.85k|        {
  133|  1.85k|            *d_first++ = item;
  134|  1.85k|        }
  135|    463|    }
_ZN8jsoncons6binary9byte_swapIjEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|  46.8k|    {
   40|  46.8k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|  46.8k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|  46.8k|#  define JSONCONS_BYTE_SWAP_32 __builtin_bswap32
  ------------------
   42|       |    #else
   43|       |        uint32_t tmp = ((static_cast<uint32_t>(val) << 8) & 0xff00ff00) | ((static_cast<uint32_t>(val) >> 8) & 0xff00ff);
   44|       |        return (tmp << 16) | (tmp >> 16);
   45|       |    #endif
   46|  46.8k|    }
_ZN8jsoncons6binary9byte_swapImEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  67.0k|    {
   52|  67.0k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  67.0k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  67.0k|#  define JSONCONS_BYTE_SWAP_64 __builtin_bswap64
  ------------------
   54|       |    #else
   55|       |        uint64_t tmp = ((static_cast<uint64_t>(val) & 0x00000000ffffffffull) << 32) | ((static_cast<uint64_t>(val) & 0xffffffff00000000ull) >> 32);
   56|       |        tmp = ((tmp & 0x0000ffff0000ffffull) << 16) | ((tmp & 0xffff0000ffff0000ull) >> 16);
   57|       |        return ((tmp & 0x00ff00ff00ff00ffull) << 8)  | ((tmp & 0xff00ff00ff00ff00ull) >> 8);
   58|       |    #endif
   59|  67.0k|    }
_ZN8jsoncons6binary13native_to_bigIsNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   664k|    {
  128|   664k|        T val2 = byte_swap(val);
  129|   664k|        uint8_t buf[sizeof(T)];
  130|   664k|        std::memcpy(buf, &val2, sizeof(T));
  131|   664k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 1.32M, False: 664k]
  ------------------
  132|  1.32M|        {
  133|  1.32M|            *d_first++ = item;
  134|  1.32M|        }
  135|   664k|    }
_ZN8jsoncons6binary9byte_swapIsEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  1.59M|    {
   29|  1.59M|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  1.59M|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  1.59M|#      define JSONCONS_BYTE_SWAP_16    __builtin_bswap16
  ------------------
   31|       |    #else
   32|       |        return (static_cast<uint16_t>(val) >> 8) | (static_cast<uint16_t>(val) << 8);
   33|       |    #endif
   34|  1.59M|    }
_ZN8jsoncons6binary13native_to_bigIiNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  92.1k|    {
  128|  92.1k|        T val2 = byte_swap(val);
  129|  92.1k|        uint8_t buf[sizeof(T)];
  130|  92.1k|        std::memcpy(buf, &val2, sizeof(T));
  131|  92.1k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 368k, False: 92.1k]
  ------------------
  132|   368k|        {
  133|   368k|            *d_first++ = item;
  134|   368k|        }
  135|  92.1k|    }
_ZN8jsoncons6binary9byte_swapIiEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|   190k|    {
   40|   190k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|   190k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|   190k|#  define JSONCONS_BYTE_SWAP_32 __builtin_bswap32
  ------------------
   42|       |    #else
   43|       |        uint32_t tmp = ((static_cast<uint32_t>(val) << 8) & 0xff00ff00) | ((static_cast<uint32_t>(val) >> 8) & 0xff00ff);
   44|       |        return (tmp << 16) | (tmp >> 16);
   45|       |    #endif
   46|   190k|    }
_ZN8jsoncons6binary13native_to_bigIlNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  24.9k|    {
  128|  24.9k|        T val2 = byte_swap(val);
  129|  24.9k|        uint8_t buf[sizeof(T)];
  130|  24.9k|        std::memcpy(buf, &val2, sizeof(T));
  131|  24.9k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 199k, False: 24.9k]
  ------------------
  132|   199k|        {
  133|   199k|            *d_first++ = item;
  134|   199k|        }
  135|  24.9k|    }
_ZN8jsoncons6binary9byte_swapIlEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  50.8k|    {
   52|  50.8k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  50.8k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  50.8k|#  define JSONCONS_BYTE_SWAP_64 __builtin_bswap64
  ------------------
   54|       |    #else
   55|       |        uint64_t tmp = ((static_cast<uint64_t>(val) & 0x00000000ffffffffull) << 32) | ((static_cast<uint64_t>(val) & 0xffffffff00000000ull) >> 32);
   56|       |        tmp = ((tmp & 0x0000ffff0000ffffull) << 16) | ((tmp & 0xffff0000ffff0000ull) >> 16);
   57|       |        return ((tmp & 0x00ff00ff00ff00ffull) << 8)  | ((tmp & 0xff00ff00ff00ff00ull) >> 8);
   58|       |    #endif
   59|  50.8k|    }
_ZN8jsoncons6binary13native_to_bigIaNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   176k|    {
  128|   176k|        T val2 = byte_swap(val);
  129|   176k|        uint8_t buf[sizeof(T)];
  130|   176k|        std::memcpy(buf, &val2, sizeof(T));
  131|   176k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 176k, False: 176k]
  ------------------
  132|   176k|        {
  133|   176k|            *d_first++ = item;
  134|   176k|        }
  135|   176k|    }
_ZN8jsoncons6binary9byte_swapIaEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  1.49M|    {
   22|  1.49M|        return val;
   23|  1.49M|    }
_ZN8jsoncons6binary13native_to_bigIfNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  20.6k|    {
  128|  20.6k|        T val2 = byte_swap(val);
  129|  20.6k|        uint8_t buf[sizeof(T)];
  130|  20.6k|        std::memcpy(buf, &val2, sizeof(T));
  131|  20.6k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 82.5k, False: 20.6k]
  ------------------
  132|  82.5k|        {
  133|  82.5k|            *d_first++ = item;
  134|  82.5k|        }
  135|  20.6k|    }
_ZN8jsoncons6binary9byte_swapIfEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   64|  46.3k|    {
   65|  46.3k|        uint32_t x;
   66|  46.3k|        std::memcpy(&x,&val,sizeof(uint32_t));
   67|  46.3k|        uint32_t y = byte_swap(x);
   68|  46.3k|        T val2;
   69|  46.3k|        std::memcpy(&val2,&y,sizeof(uint32_t));
   70|  46.3k|        return val2;
   71|  46.3k|    }
_ZN8jsoncons6binary13native_to_bigIdNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  36.0k|    {
  128|  36.0k|        T val2 = byte_swap(val);
  129|  36.0k|        uint8_t buf[sizeof(T)];
  130|  36.0k|        std::memcpy(buf, &val2, sizeof(T));
  131|  36.0k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 288k, False: 36.0k]
  ------------------
  132|   288k|        {
  133|   288k|            *d_first++ = item;
  134|   288k|        }
  135|  36.0k|    }
_ZN8jsoncons6binary9byte_swapIdEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   76|  67.0k|    {
   77|  67.0k|        uint64_t x;
   78|  67.0k|        std::memcpy(&x,&val,sizeof(uint64_t));
   79|  67.0k|        uint64_t y = byte_swap(x);
   80|  67.0k|        T val2;
   81|  67.0k|        std::memcpy(&val2,&y,sizeof(uint64_t));
   82|  67.0k|        return val2;
   83|  67.0k|    }
_ZN8jsoncons6binary13big_to_nativeIaNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  1.31M|    {
  183|  1.31M|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 1.31M]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  1.31M|        T val;
  188|  1.31M|        std::memcpy(&val,first,sizeof(T));
  189|  1.31M|        return byte_swap(val);
  190|  1.31M|    }
_ZN8jsoncons6binary13big_to_nativeIsNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|   929k|    {
  183|   929k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 929k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|   929k|        T val;
  188|   929k|        std::memcpy(&val,first,sizeof(T));
  189|   929k|        return byte_swap(val);
  190|   929k|    }
_ZN8jsoncons6binary13big_to_nativeIiNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  98.5k|    {
  183|  98.5k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 98.5k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  98.5k|        T val;
  188|  98.5k|        std::memcpy(&val,first,sizeof(T));
  189|  98.5k|        return byte_swap(val);
  190|  98.5k|    }
_ZN8jsoncons6binary13big_to_nativeIlNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  25.8k|    {
  183|  25.8k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 25.8k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  25.8k|        T val;
  188|  25.8k|        std::memcpy(&val,first,sizeof(T));
  189|  25.8k|        return byte_swap(val);
  190|  25.8k|    }
_ZN8jsoncons6binary13big_to_nativeIfNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  25.7k|    {
  183|  25.7k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 25.7k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  25.7k|        T val;
  188|  25.7k|        std::memcpy(&val,first,sizeof(T));
  189|  25.7k|        return byte_swap(val);
  190|  25.7k|    }
_ZN8jsoncons6binary13big_to_nativeIdNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  30.9k|    {
  183|  30.9k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 30.9k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  30.9k|        T val;
  188|  30.9k|        std::memcpy(&val,first,sizeof(T));
  189|  30.9k|        return byte_swap(val);
  190|  30.9k|    }

_ZN8jsoncons9is_base10IhEEbPKT_m:
  164|   183k|{
  165|   183k|    integer_chars_state state = integer_chars_state::initial;
  166|       |
  167|   183k|    const CharT* end = s + length; 
  168|   193k|    for (;s < end; ++s)
  ------------------
  |  Branch (168:11): [True: 192k, False: 1.08k]
  ------------------
  169|   192k|    {
  170|   192k|        switch(state)
  171|   192k|        {
  172|   183k|            case integer_chars_state::initial:
  ------------------
  |  Branch (172:13): [True: 183k, False: 9.12k]
  ------------------
  173|   183k|            {
  174|   183k|                switch(*s)
  175|   183k|                {
  176|  6.85k|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (176:21): [True: 201, False: 182k]
  |  Branch (176:30): [True: 1.54k, False: 181k]
  |  Branch (176:39): [True: 9, False: 183k]
  |  Branch (176:48): [True: 4, False: 183k]
  |  Branch (176:57): [True: 602, False: 182k]
  |  Branch (176:66): [True: 5, False: 183k]
  |  Branch (176:75): [True: 12, False: 183k]
  |  Branch (176:84): [True: 0, False: 183k]
  |  Branch (176:93): [True: 0, False: 183k]
  |  Branch (176:103): [True: 4.47k, False: 178k]
  ------------------
  177|  6.85k|                        state = integer_chars_state::decimal;
  178|  6.85k|                        break;
  179|  1.55k|                    case '-':
  ------------------
  |  Branch (179:21): [True: 1.55k, False: 181k]
  ------------------
  180|  1.55k|                        state = integer_chars_state::minus;
  181|  1.55k|                        break;
  182|   174k|                    default:
  ------------------
  |  Branch (182:21): [True: 174k, False: 8.40k]
  ------------------
  183|   174k|                        return false;
  184|   183k|                }
  185|  8.40k|                break;
  186|   183k|            }
  187|  8.40k|            case integer_chars_state::minus:
  ------------------
  |  Branch (187:13): [True: 1.54k, False: 190k]
  ------------------
  188|  1.54k|            {
  189|  1.54k|                switch(*s)
  190|  1.54k|                {
  191|    100|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (191:21): [True: 16, False: 1.53k]
  |  Branch (191:30): [True: 5, False: 1.54k]
  |  Branch (191:39): [True: 0, False: 1.54k]
  |  Branch (191:48): [True: 0, False: 1.54k]
  |  Branch (191:57): [True: 0, False: 1.54k]
  |  Branch (191:66): [True: 3, False: 1.54k]
  |  Branch (191:75): [True: 1, False: 1.54k]
  |  Branch (191:84): [True: 0, False: 1.54k]
  |  Branch (191:93): [True: 30, False: 1.51k]
  |  Branch (191:103): [True: 45, False: 1.50k]
  ------------------
  192|    100|                        state = integer_chars_state::decimal;
  193|    100|                        break;
  194|  1.44k|                    default:
  ------------------
  |  Branch (194:21): [True: 1.44k, False: 100]
  ------------------
  195|  1.44k|                        return false;
  196|  1.54k|                }
  197|    100|                break;
  198|  1.54k|            }
  199|  7.58k|            case integer_chars_state::decimal:
  ------------------
  |  Branch (199:13): [True: 7.58k, False: 184k]
  ------------------
  200|  7.58k|            {
  201|  7.58k|                switch(*s)
  202|  7.58k|                {
  203|  1.49k|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (203:21): [True: 1.48k, False: 6.09k]
  |  Branch (203:30): [True: 3, False: 7.57k]
  |  Branch (203:39): [True: 0, False: 7.58k]
  |  Branch (203:48): [True: 0, False: 7.58k]
  |  Branch (203:57): [True: 0, False: 7.58k]
  |  Branch (203:66): [True: 0, False: 7.58k]
  |  Branch (203:75): [True: 1, False: 7.58k]
  |  Branch (203:84): [True: 0, False: 7.58k]
  |  Branch (203:93): [True: 0, False: 7.58k]
  |  Branch (203:103): [True: 1, False: 7.58k]
  ------------------
  204|  1.49k|                        break;
  205|  6.08k|                    default:
  ------------------
  |  Branch (205:21): [True: 6.08k, False: 1.49k]
  ------------------
  206|  6.08k|                        return false;
  207|  7.58k|                }
  208|  1.49k|                break;
  209|  7.58k|            }
  210|  1.49k|            default:
  ------------------
  |  Branch (210:13): [True: 0, False: 192k]
  ------------------
  211|      0|                break;
  212|   192k|        }
  213|   192k|    }
  214|  1.08k|    return state == integer_chars_state::decimal ? true : false;
  ------------------
  |  Branch (214:12): [True: 866, False: 215]
  ------------------
  215|   183k|}

_ZN8jsoncons14unicode_traits8validateIcEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14unicode_resultIS4_EEE4typeEPKS4_m:
 1147|  5.15M|    {
 1148|  5.15M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(data);
 1149|  5.15M|        const uint8_t* end = it + length;
 1150|       |
 1151|  5.15M|        unicode_errc  result{};
 1152|  10.9M|        while (it != end) 
  ------------------
  |  Branch (1152:16): [True: 5.80M, False: 5.15M]
  ------------------
 1153|  5.80M|        {
 1154|  5.80M|            if ((end - it) >= 8)
  ------------------
  |  Branch (1154:17): [True: 1.33M, False: 4.46M]
  ------------------
 1155|  1.33M|            {
 1156|  9.30M|                JSONCONS_REPEAT8({if (JSONCONS_LIKELY((*it & 0x80) == 0)) ++it; else goto non_ascii;})
  ------------------
  |  |  281|  2.67M|#define JSONCONS_REPEAT8(x)  { x x x x x x x x }
  |  |  ------------------
  |  |  |  Branch (281:32): [True: 1.33M, False: 2.35k]
  |  |  |  Branch (281:34): [True: 1.33M, False: 2.58k]
  |  |  |  Branch (281:36): [True: 1.33M, False: 993]
  |  |  |  Branch (281:38): [True: 1.32M, False: 6.07k]
  |  |  |  Branch (281:40): [True: 1.32M, False: 964]
  |  |  |  Branch (281:42): [True: 1.32M, False: 1.26k]
  |  |  |  Branch (281:44): [True: 1.32M, False: 1.34k]
  |  |  |  Branch (281:46): [True: 1.32M, False: 1.38k]
  |  |  ------------------
  ------------------
 1157|  1.32M|                continue;
 1158|  9.30M|            }
 1159|  4.48M|    non_ascii:
 1160|  4.48M|            const std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[*it]) + 1;
 1161|  4.48M|            if (len > (std::size_t)(end - it))
  ------------------
  |  Branch (1161:17): [True: 0, False: 4.48M]
  ------------------
 1162|      0|            {
 1163|      0|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it), unicode_errc::source_exhausted};
 1164|      0|            }
 1165|  4.48M|            if ((result=is_legal_utf8(it, len)) != unicode_errc())
  ------------------
  |  Branch (1165:17): [True: 20, False: 4.48M]
  ------------------
 1166|     20|            {
 1167|     20|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1168|     20|            }
 1169|  4.48M|            it += len;
 1170|  4.48M|        }
 1171|  5.15M|        return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1172|  5.15M|    }
_ZN8jsoncons14unicode_traits13is_legal_utf8EPKhm:
  305|  8.95M|    {
  306|  8.95M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(bytes);
  307|  8.95M|        const uint8_t* end = it+length;
  308|       |
  309|  8.95M|        uint8_t byte;
  310|  8.95M|        switch (length) {
  311|     28|        default:
  ------------------
  |  Branch (311:9): [True: 28, False: 8.95M]
  ------------------
  312|     28|            return unicode_errc::over_long_utf8_sequence;
  313|  24.3k|        case 4:
  ------------------
  |  Branch (313:9): [True: 24.3k, False: 8.92M]
  ------------------
  314|  24.3k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (314:17): [True: 1, False: 24.3k]
  ------------------
  315|      1|                return unicode_errc::bad_continuation_byte;
  316|  24.3k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  24.3k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  317|  31.0k|        case 3:
  ------------------
  |  Branch (317:9): [True: 6.76k, False: 8.94M]
  ------------------
  318|  31.0k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (318:17): [True: 0, False: 31.0k]
  ------------------
  319|      0|                return unicode_errc::bad_continuation_byte;
  320|  31.0k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  31.0k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  321|  33.6k|        case 2:
  ------------------
  |  Branch (321:9): [True: 2.59k, False: 8.95M]
  ------------------
  322|  33.6k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (322:17): [True: 2, False: 33.6k]
  ------------------
  323|      2|                return unicode_errc::bad_continuation_byte;
  324|       |
  325|  33.6k|            switch (*it) 
  326|  33.6k|            {
  327|       |                // no fall-through in this inner switch
  328|     65|                case 0xE0: if (byte < 0xA0) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (328:17): [True: 65, False: 33.5k]
  |  Branch (328:32): [True: 0, False: 65]
  ------------------
  329|     74|                case 0xED: if (byte > 0x9F) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (329:17): [True: 74, False: 33.5k]
  |  Branch (329:32): [True: 0, False: 74]
  ------------------
  330|  4.59k|                case 0xF0: if (byte < 0x90) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (330:17): [True: 4.59k, False: 29.0k]
  |  Branch (330:32): [True: 0, False: 4.59k]
  ------------------
  331|  19.5k|                case 0xF4: if (byte > 0x8F) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (331:17): [True: 19.5k, False: 14.0k]
  |  Branch (331:32): [True: 0, False: 19.5k]
  ------------------
  332|  19.5k|                default:   if (byte < 0x80) return unicode_errc::source_illegal;
  ------------------
  |  Branch (332:17): [True: 9.36k, False: 24.2k]
  |  Branch (332:32): [True: 0, False: 9.36k]
  ------------------
  333|  33.6k|            }
  334|       |
  335|  33.6k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  33.6k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  336|  8.95M|        case 1:
  ------------------
  |  Branch (336:9): [True: 8.92M, False: 33.6k]
  ------------------
  337|  8.95M|            if (*it >= 0x80 && *it < 0xC2)
  ------------------
  |  Branch (337:17): [True: 33.6k, False: 8.92M]
  |  Branch (337:32): [True: 15, False: 33.6k]
  ------------------
  338|     15|                return unicode_errc::source_illegal;
  339|  8.95M|            break;
  340|  8.95M|        }
  341|  8.95M|        if (*it > 0xF4) 
  ------------------
  |  Branch (341:13): [True: 0, False: 8.95M]
  ------------------
  342|      0|            return unicode_errc::source_illegal;
  343|       |
  344|  8.95M|        return unicode_errc();
  345|  8.95M|    }
_ZN8jsoncons14unicode_traits8validateIhEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14unicode_resultIS4_EEE4typeEPKS4_m:
 1147|  4.97M|    {
 1148|  4.97M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(data);
 1149|  4.97M|        const uint8_t* end = it + length;
 1150|       |
 1151|  4.97M|        unicode_errc  result{};
 1152|  10.5M|        while (it != end) 
  ------------------
  |  Branch (1152:16): [True: 5.56M, False: 4.97M]
  ------------------
 1153|  5.56M|        {
 1154|  5.56M|            if ((end - it) >= 8)
  ------------------
  |  Branch (1154:17): [True: 1.11M, False: 4.45M]
  ------------------
 1155|  1.11M|            {
 1156|  7.72M|                JSONCONS_REPEAT8({if (JSONCONS_LIKELY((*it & 0x80) == 0)) ++it; else goto non_ascii;})
  ------------------
  |  |  281|  2.22M|#define JSONCONS_REPEAT8(x)  { x x x x x x x x }
  |  |  ------------------
  |  |  |  Branch (281:32): [True: 1.11M, False: 2.26k]
  |  |  |  Branch (281:34): [True: 1.10M, False: 2.50k]
  |  |  |  Branch (281:36): [True: 1.10M, False: 980]
  |  |  |  Branch (281:38): [True: 1.10M, False: 5.88k]
  |  |  |  Branch (281:40): [True: 1.10M, False: 939]
  |  |  |  Branch (281:42): [True: 1.09M, False: 1.23k]
  |  |  |  Branch (281:44): [True: 1.09M, False: 1.32k]
  |  |  |  Branch (281:46): [True: 1.09M, False: 1.37k]
  |  |  ------------------
  ------------------
 1157|  1.09M|                continue;
 1158|  7.72M|            }
 1159|  4.47M|    non_ascii:
 1160|  4.47M|            const std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[*it]) + 1;
 1161|  4.47M|            if (len > (std::size_t)(end - it))
  ------------------
  |  Branch (1161:17): [True: 1, False: 4.47M]
  ------------------
 1162|      1|            {
 1163|      1|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it), unicode_errc::source_exhausted};
 1164|      1|            }
 1165|  4.47M|            if ((result=is_legal_utf8(it, len)) != unicode_errc())
  ------------------
  |  Branch (1165:17): [True: 26, False: 4.47M]
  ------------------
 1166|     26|            {
 1167|     26|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1168|     26|            }
 1169|  4.47M|            it += len;
 1170|  4.47M|        }
 1171|  4.97M|        return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1172|  4.97M|    }

_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEEC2EOS8_RKS9_:
   99|    429|       : basic_ubjson_encoder(std::forward<Sink>(sink), ubjson_encode_options(), alloc)
  100|    429|    {
  101|    429|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEEC2EOS8_RKNS0_21ubjson_encode_optionsERKS9_:
  106|    429|       : sink_(std::forward<Sink>(sink)),
  107|    429|         max_nesting_depth_(options.max_nesting_depth()),
  108|    429|         alloc_(alloc)
  109|    429|    {
  110|    429|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE17visit_begin_arrayEmNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  215|   133k|    {
  216|   133k|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|   133k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 133k]
  |  |  ------------------
  ------------------
  217|      0|        {
  218|      0|            ec = ubjson_errc::max_nesting_depth_exceeded;
  219|      0|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  220|      0|        } 
  221|   133k|        stack_.emplace_back(ubjson_container_type::array, length);
  222|   133k|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_array_marker);
  223|   133k|        sink_.push_back(jsoncons::ubjson::ubjson_type::count_marker);
  224|   133k|        put_length(length);
  225|       |
  226|   133k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   133k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  227|   133k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_itemC2ENS0_21ubjson_container_typeEm:
   57|  3.09M|           : type_(type), length_(length)
   58|  3.09M|        {
   59|  3.09M|        }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10put_lengthEm:
  318|  5.37M|    {
  319|  5.37M|        if (length <= (std::numeric_limits<uint8_t>::max)())
  ------------------
  |  Branch (319:13): [True: 5.35M, False: 14.4k]
  ------------------
  320|  5.35M|        {
  321|  5.35M|            sink_.push_back(ubjson_type::uint8_type);
  322|  5.35M|            binary::native_to_big(static_cast<uint8_t>(length), std::back_inserter(sink_));
  323|  5.35M|        }
  324|  14.4k|        else if (length <= (std::size_t)(std::numeric_limits<int16_t>::max)())
  ------------------
  |  Branch (324:18): [True: 13.9k, False: 463]
  ------------------
  325|  13.9k|        {
  326|  13.9k|            sink_.push_back(ubjson_type::int16_type);
  327|  13.9k|            binary::native_to_big(static_cast<uint16_t>(length), std::back_inserter(sink_));
  328|  13.9k|        }
  329|    463|        else if (length <= (std::size_t)(std::numeric_limits<int32_t>::max)())
  ------------------
  |  Branch (329:18): [True: 463, False: 0]
  ------------------
  330|    463|        {
  331|    463|            sink_.push_back(ubjson_type::int32_type);
  332|    463|            binary::native_to_big(static_cast<uint32_t>(length),std::back_inserter(sink_));
  333|    463|        }
  334|      0|        else if (length <= (std::size_t)(std::numeric_limits<int64_t>::max)())
  ------------------
  |  Branch (334:18): [True: 0, False: 0]
  ------------------
  335|      0|        {
  336|      0|            sink_.push_back(ubjson_type::int64_type);
  337|      0|            binary::native_to_big(static_cast<uint64_t>(length),std::back_inserter(sink_));
  338|      0|        }
  339|      0|        else
  340|      0|        {
  341|      0|            JSONCONS_THROW(ser_error(ubjson_errc::too_many_items));
  ------------------
  |  |   35|      0|    #define JSONCONS_THROW(exception) throw exception
  ------------------
  342|      0|        }
  343|  5.37M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE15visit_end_arrayERKNS_11ser_contextERNS3_10error_codeE:
  230|  2.98M|    {
  231|  2.98M|        JSONCONS_ASSERT(!stack_.empty());
  ------------------
  |  |   49|  2.98M|#define JSONCONS_ASSERT(x) if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (49:32): [True: 0, False: 2.98M]
  |  |  ------------------
  |  |   50|      0|    JSONCONS_THROW(jsoncons::assertion_error("assertion '" #x "' failed at  <> :" \
  |  |  ------------------
  |  |  |  |   35|      0|    #define JSONCONS_THROW(exception) throw exception
  |  |  ------------------
  |  |   51|      0|            JSONCONS_STR( 0 ))); }
  ------------------
  232|  2.98M|        --nesting_depth_;
  233|       |
  234|  2.98M|        if (stack_.back().is_indefinite_length())
  ------------------
  |  Branch (234:13): [True: 2.86M, False: 117k]
  ------------------
  235|  2.86M|        {
  236|  2.86M|            sink_.push_back(jsoncons::ubjson::ubjson_type::end_array_marker);
  237|  2.86M|        }
  238|   117k|        else
  239|   117k|        {
  240|   117k|            if (stack_.back().count() < stack_.back().length())
  ------------------
  |  Branch (240:17): [True: 0, False: 117k]
  ------------------
  241|      0|            {
  242|      0|                ec = ubjson_errc::too_few_items;
  243|      0|                JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  244|      0|            }
  245|   117k|            if (stack_.back().count() > stack_.back().length())
  ------------------
  |  Branch (245:17): [True: 0, False: 117k]
  ------------------
  246|      0|            {
  247|      0|                ec = ubjson_errc::too_many_items;
  248|      0|                JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  249|      0|            }
  250|   117k|        }
  251|  2.98M|        stack_.pop_back();
  252|  2.98M|        end_value();
  253|  2.98M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  2.98M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  254|  2.98M|    }
_ZNK8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_item20is_indefinite_lengthEv:
   79|  3.06M|        {
   80|  3.06M|            return type_ == ubjson_container_type::indefinite_length_array || type_ == ubjson_container_type::indefinite_length_object;
  ------------------
  |  Branch (80:20): [True: 2.86M, False: 197k]
  |  Branch (80:79): [True: 1.34k, False: 196k]
  ------------------
   81|  3.06M|        }
_ZNK8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_item5countEv:
   69|   392k|        {
   70|   392k|            return count_;
   71|   392k|        }
_ZNK8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_item6lengthEv:
   64|   392k|        {
   65|   392k|            return length_;
   66|   392k|        }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE9end_valueEv:
  496|  15.7M|    {
  497|  15.7M|        if (!stack_.empty())
  ------------------
  |  Branch (497:13): [True: 15.7M, False: 12]
  ------------------
  498|  15.7M|        {
  499|  15.7M|            ++stack_.back().count_;
  500|  15.7M|        }
  501|  15.7M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE12visit_uint64EmNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  461|   447k|    {
  462|   447k|        if (val <= (std::numeric_limits<uint8_t>::max)())
  ------------------
  |  Branch (462:13): [True: 447k, False: 0]
  ------------------
  463|   447k|        {
  464|   447k|            sink_.push_back(jsoncons::ubjson::ubjson_type::uint8_type);
  465|   447k|            binary::native_to_big(static_cast<uint8_t>(val),std::back_inserter(sink_));
  466|   447k|        }
  467|      0|        else if (val <= static_cast<uint64_t>((std::numeric_limits<int16_t>::max)()))
  ------------------
  |  Branch (467:18): [True: 0, False: 0]
  ------------------
  468|      0|        {
  469|      0|            sink_.push_back(jsoncons::ubjson::ubjson_type::int16_type);
  470|      0|            binary::native_to_big(static_cast<int16_t>(val),std::back_inserter(sink_));
  471|      0|        }
  472|      0|        else if (val <= static_cast<uint64_t>((std::numeric_limits<int32_t>::max)()))
  ------------------
  |  Branch (472:18): [True: 0, False: 0]
  ------------------
  473|      0|        {
  474|      0|            sink_.push_back(jsoncons::ubjson::ubjson_type::int32_type);
  475|      0|            binary::native_to_big(static_cast<int32_t>(val),std::back_inserter(sink_));
  476|      0|        }
  477|      0|        else if (val <= static_cast<uint64_t>((std::numeric_limits<int64_t>::max)()))
  ------------------
  |  Branch (477:18): [True: 0, False: 0]
  ------------------
  478|      0|        {
  479|      0|            sink_.push_back(jsoncons::ubjson::ubjson_type::int64_type);
  480|      0|            binary::native_to_big(static_cast<int64_t>(val),std::back_inserter(sink_));
  481|      0|        }
  482|   447k|        end_value();
  483|   447k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   447k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  484|   447k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE11visit_int64ElNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  394|  1.77M|    {
  395|  1.77M|        if (val >= 0)
  ------------------
  |  Branch (395:13): [True: 1.35M, False: 423k]
  ------------------
  396|  1.35M|        {
  397|  1.35M|            if (val <= (std::numeric_limits<uint8_t>::max)())
  ------------------
  |  Branch (397:17): [True: 816k, False: 534k]
  ------------------
  398|   816k|            {
  399|       |                // uint 8 stores a 8-bit unsigned integer
  400|   816k|                sink_.push_back(jsoncons::ubjson::ubjson_type::uint8_type);
  401|   816k|                binary::native_to_big(static_cast<uint8_t>(val),std::back_inserter(sink_));
  402|   816k|            }
  403|   534k|            else if (val <= (std::numeric_limits<int16_t>::max)())
  ------------------
  |  Branch (403:22): [True: 485k, False: 48.5k]
  ------------------
  404|   485k|            {
  405|       |                // uint 16 stores a 16-bit big-endian unsigned integer
  406|   485k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int16_type);
  407|   485k|                binary::native_to_big(static_cast<int16_t>(val),std::back_inserter(sink_));
  408|   485k|            }
  409|  48.5k|            else if (val <= (std::numeric_limits<int32_t>::max)())
  ------------------
  |  Branch (409:22): [True: 36.9k, False: 11.5k]
  ------------------
  410|  36.9k|            {
  411|       |                // uint 32 stores a 32-bit big-endian unsigned integer
  412|  36.9k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int32_type);
  413|  36.9k|                binary::native_to_big(static_cast<int32_t>(val),std::back_inserter(sink_));
  414|  36.9k|            }
  415|  11.5k|            else if (val <= (std::numeric_limits<int64_t>::max)())
  ------------------
  |  Branch (415:22): [True: 11.5k, False: 0]
  ------------------
  416|  11.5k|            {
  417|       |                // int 64 stores a 64-bit big-endian signed integer
  418|  11.5k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int64_type);
  419|  11.5k|                binary::native_to_big(val,std::back_inserter(sink_));
  420|  11.5k|            }
  421|      0|            else
  422|      0|            {
  423|       |                // big integer
  424|      0|            }
  425|  1.35M|        }
  426|   423k|        else
  427|   423k|        {
  428|   423k|            if (val >= (std::numeric_limits<int8_t>::lowest)())
  ------------------
  |  Branch (428:17): [True: 176k, False: 247k]
  ------------------
  429|   176k|            {
  430|       |                // int 8 stores a 8-bit signed integer
  431|   176k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int8_type);
  432|   176k|                binary::native_to_big(static_cast<int8_t>(val),std::back_inserter(sink_));
  433|   176k|            }
  434|   247k|            else if (val >= (std::numeric_limits<int16_t>::lowest)())
  ------------------
  |  Branch (434:22): [True: 178k, False: 68.5k]
  ------------------
  435|   178k|            {
  436|       |                // int 16 stores a 16-bit big-endian signed integer
  437|   178k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int16_type);
  438|   178k|                binary::native_to_big(static_cast<int16_t>(val),std::back_inserter(sink_));
  439|   178k|            }
  440|  68.5k|            else if (val >= (std::numeric_limits<int32_t>::lowest)())
  ------------------
  |  Branch (440:22): [True: 55.1k, False: 13.4k]
  ------------------
  441|  55.1k|            {
  442|       |                // int 32 stores a 32-bit big-endian signed integer
  443|  55.1k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int32_type);
  444|  55.1k|                binary::native_to_big(static_cast<int32_t>(val),std::back_inserter(sink_));
  445|  55.1k|            }
  446|  13.4k|            else if (val >= (std::numeric_limits<int64_t>::lowest)())
  ------------------
  |  Branch (446:22): [True: 13.4k, False: 0]
  ------------------
  447|  13.4k|            {
  448|       |                // int 64 stores a 64-bit big-endian signed integer
  449|  13.4k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int64_type);
  450|  13.4k|                binary::native_to_big(val,std::back_inserter(sink_));
  451|  13.4k|            }
  452|   423k|        }
  453|  1.77M|        end_value();
  454|  1.77M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  1.77M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  455|  1.77M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE12visit_doubleEdNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  371|  56.6k|    {
  372|  56.6k|        float valf = (float)val;
  373|  56.6k|        if ((double)valf == val)
  ------------------
  |  Branch (373:13): [True: 20.6k, False: 36.0k]
  ------------------
  374|  20.6k|        {
  375|       |            // float 32
  376|  20.6k|            sink_.push_back(static_cast<uint8_t>(jsoncons::ubjson::ubjson_type::float32_type));
  377|  20.6k|            binary::native_to_big(valf,std::back_inserter(sink_));
  378|  20.6k|        }
  379|  36.0k|        else
  380|  36.0k|        {
  381|       |            // float 64
  382|  36.0k|            sink_.push_back(static_cast<uint8_t>(jsoncons::ubjson::ubjson_type::float64_type));
  383|  36.0k|            binary::native_to_big(val,std::back_inserter(sink_));
  384|  36.0k|        }
  385|       |
  386|       |        // write double
  387|       |
  388|  56.6k|        end_value();
  389|  56.6k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  56.6k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  390|  56.6k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE11visit_flushEv:
  142|     12|    {
  143|     12|        sink_.flush();
  144|     12|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE18visit_begin_objectENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  147|  2.05k|    {
  148|  2.05k|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|  2.05k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 2.05k]
  |  |  ------------------
  ------------------
  149|      0|        {
  150|      0|            ec = ubjson_errc::max_nesting_depth_exceeded;
  151|      0|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  152|      0|        } 
  153|  2.05k|        stack_.emplace_back(ubjson_container_type::indefinite_length_object);
  154|  2.05k|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_object_marker);
  155|       |
  156|  2.05k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  2.05k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  157|  2.05k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE18visit_begin_objectEmNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  160|  80.7k|    {
  161|  80.7k|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|  80.7k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 80.7k]
  |  |  ------------------
  ------------------
  162|      0|        {
  163|      0|            ec = ubjson_errc::max_nesting_depth_exceeded;
  164|      0|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  165|      0|        } 
  166|  80.7k|        stack_.emplace_back(ubjson_container_type::object, length);
  167|  80.7k|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_object_marker);
  168|  80.7k|        sink_.push_back(jsoncons::ubjson::ubjson_type::count_marker);
  169|  80.7k|        put_length(length);
  170|       |
  171|  80.7k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  80.7k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  172|  80.7k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE16visit_end_objectERKNS_11ser_contextERNS3_10error_codeE:
  175|  80.1k|    {
  176|  80.1k|        JSONCONS_ASSERT(!stack_.empty());
  ------------------
  |  |   49|  80.1k|#define JSONCONS_ASSERT(x) if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (49:32): [True: 0, False: 80.1k]
  |  |  ------------------
  |  |   50|      0|    JSONCONS_THROW(jsoncons::assertion_error("assertion '" #x "' failed at  <> :" \
  |  |  ------------------
  |  |  |  |   35|      0|    #define JSONCONS_THROW(exception) throw exception
  |  |  ------------------
  |  |   51|      0|            JSONCONS_STR( 0 ))); }
  ------------------
  177|  80.1k|        --nesting_depth_;
  178|       |
  179|  80.1k|        if (stack_.back().is_indefinite_length())
  ------------------
  |  Branch (179:13): [True: 1.34k, False: 78.8k]
  ------------------
  180|  1.34k|        {
  181|  1.34k|            sink_.push_back(jsoncons::ubjson::ubjson_type::end_object_marker);
  182|  1.34k|        }
  183|  78.8k|        else
  184|  78.8k|        {
  185|  78.8k|            if (stack_.back().count() < stack_.back().length())
  ------------------
  |  Branch (185:17): [True: 0, False: 78.8k]
  ------------------
  186|      0|            {
  187|      0|                ec = ubjson_errc::too_few_items;
  188|      0|                JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  189|      0|            }
  190|  78.8k|            if (stack_.back().count() > stack_.back().length())
  ------------------
  |  Branch (190:17): [True: 0, False: 78.8k]
  ------------------
  191|      0|            {
  192|      0|                ec = ubjson_errc::too_many_items;
  193|      0|                JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  194|      0|            }
  195|  78.8k|        }
  196|  80.1k|        stack_.pop_back();
  197|  80.1k|        end_value();
  198|  80.1k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  80.1k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  199|  80.1k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE17visit_begin_arrayENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  202|  2.87M|    {
  203|  2.87M|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|  2.87M|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 2.87M]
  |  |  ------------------
  ------------------
  204|      0|        {
  205|      0|            ec = ubjson_errc::max_nesting_depth_exceeded;
  206|      0|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  207|      0|        } 
  208|  2.87M|        stack_.emplace_back(ubjson_container_type::indefinite_length_array);
  209|  2.87M|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_array_marker);
  210|       |
  211|  2.87M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  2.87M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  212|  2.87M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE9visit_keyERKNS3_17basic_string_viewIcNS3_11char_traitsIcEEEERKNS_11ser_contextERNS3_10error_codeE:
  257|   596k|    {
  258|   596k|        auto sink = unicode_traits::validate(name.data(), name.size());
  259|   596k|        if (sink.ec != unicode_traits::unicode_errc())
  ------------------
  |  Branch (259:13): [True: 0, False: 596k]
  ------------------
  260|      0|        {
  261|      0|            ec = ubjson_errc::invalid_utf8_text_string;
  262|      0|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  263|      0|        }
  264|       |
  265|   596k|        put_length(name.length());
  266|       |
  267|   596k|        for (auto c : name)
  ------------------
  |  Branch (267:21): [True: 7.30M, False: 596k]
  ------------------
  268|  7.30M|        {
  269|  7.30M|            sink_.push_back(c);
  270|  7.30M|        }
  271|   596k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   596k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  272|   596k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10visit_nullENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  275|  5.64M|    {
  276|       |        // nil
  277|  5.64M|        binary::native_to_big(static_cast<uint8_t>(jsoncons::ubjson::ubjson_type::null_type), std::back_inserter(sink_));
  278|  5.64M|        end_value();
  279|  5.64M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  5.64M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  280|  5.64M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10visit_boolEbNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  487|   228k|    {
  488|       |        // true and false
  489|   228k|        sink_.push_back(static_cast<uint8_t>(val ? jsoncons::ubjson::ubjson_type::true_type : jsoncons::ubjson::ubjson_type::false_type));
  ------------------
  |  Branch (489:46): [True: 180k, False: 47.9k]
  ------------------
  490|       |
  491|   228k|        end_value();
  492|   228k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   228k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  493|   228k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE12visit_stringERKNS3_17basic_string_viewIcNS3_11char_traitsIcEEEENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  283|  4.56M|    {
  284|  4.56M|        switch (tag)
  285|  4.56M|        {
  286|    866|            case semantic_tag::bigint:
  ------------------
  |  Branch (286:13): [True: 866, False: 4.56M]
  ------------------
  287|   183k|            case semantic_tag::bigdec:
  ------------------
  |  Branch (287:13): [True: 182k, False: 4.37M]
  ------------------
  288|   183k|            {
  289|   183k|                sink_.push_back(jsoncons::ubjson::ubjson_type::high_precision_number_type);
  290|   183k|                break;
  291|    866|            }
  292|  4.37M|            default:
  ------------------
  |  Branch (292:13): [True: 4.37M, False: 183k]
  ------------------
  293|  4.37M|            {
  294|  4.37M|                sink_.push_back(jsoncons::ubjson::ubjson_type::string_type);
  295|  4.37M|                break;
  296|    866|            }
  297|  4.56M|        }
  298|       |
  299|  4.56M|        auto sink = unicode_traits::validate(sv.data(), sv.size());
  300|  4.56M|        if (sink.ec != unicode_traits::unicode_errc())
  ------------------
  |  Branch (300:13): [True: 20, False: 4.56M]
  ------------------
  301|     20|        {
  302|     20|            ec = ubjson_errc::invalid_utf8_text_string;
  303|     20|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|     20|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  304|     20|        }
  305|       |
  306|  4.56M|        put_length(sv.length());
  307|       |
  308|  4.56M|        for (auto c : sv)
  ------------------
  |  Branch (308:21): [True: 7.81M, False: 4.56M]
  ------------------
  309|  7.81M|        {
  310|  7.81M|            sink_.push_back(c);
  311|  7.81M|        }
  312|       |
  313|  4.56M|        end_value();
  314|  4.56M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  4.56M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  315|  4.56M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEED2Ev:
  113|    429|    {
  114|    429|        JSONCONS_TRY
  ------------------
  |  |   37|    429|    #define JSONCONS_TRY try
  ------------------
  115|    429|        {
  116|    429|            sink_.flush();
  117|    429|        }
  118|    429|        JSONCONS_CATCH(...)
  119|    429|        {
  120|      0|        }
  121|    429|    }

_ZN8jsoncons6ubjson15make_error_codeENS0_11ubjson_errcE:
   90|    425|{
   91|    425|    return std::error_code(static_cast<int>(e),ubjson_error_category());
   92|    425|}
_ZN8jsoncons6ubjson21ubjson_error_categoryEv:
   83|    425|{
   84|    425|  static ubjson_error_category_impl instance;
   85|    425|  return instance;
   86|    425|}

_ZN8jsoncons6ubjson21ubjson_decode_optionsC1Ev:
   38|    429|    ubjson_decode_options() = default;
_ZN8jsoncons6ubjson21ubjson_options_commonC2Ev:
   23|    858|    ubjson_options_common() = default;
_ZN8jsoncons6ubjson21ubjson_options_commonD2Ev:
   25|    858|    virtual ~ubjson_options_common() = default;
_ZN8jsoncons6ubjson21ubjson_encode_optionsC1Ev:
   53|    429|    ubjson_encode_options() = default;
_ZNK8jsoncons6ubjson21ubjson_options_common17max_nesting_depthEv:
   28|    858|    {
   29|    858|        return max_nesting_depth_;
   30|    858|    }
_ZNK8jsoncons6ubjson21ubjson_decode_options9max_itemsEv:
   44|    429|    {
   45|    429|        return max_items_;
   46|    429|    }

_ZN8jsoncons6ubjson19basic_ubjson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEEC2IRNS3_19basic_istringstreamIcNS3_11char_traitsIcEES7_EEEEOT_RKNS0_21ubjson_decode_optionsERKS7_:
   79|    429|       : source_(std::forward<Sourceable>(source)), 
   80|    429|         max_nesting_depth_(options.max_nesting_depth()),
   81|    429|         max_items_(options.max_items()),
   82|    429|         text_buffer_(alloc),
   83|    429|         state_stack_(alloc)
   84|    429|    {
   85|    429|        state_stack_.emplace_back(parse_mode::root,0);
   86|    429|    }
_ZN8jsoncons6ubjson11parse_stateC2ENS0_10parse_modeEmh:
   45|  3.09M|        : mode(mode), length(length), type(type)
   46|  3.09M|    {
   47|  3.09M|    }
_ZN8jsoncons6ubjson19basic_ubjson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE5resetEv:
   94|    429|    {
   95|    429|        more_ = true;
   96|    429|        done_ = false;
   97|    429|        text_buffer_.clear();
   98|    429|        state_stack_.clear();
   99|    429|        state_stack_.emplace_back(parse_mode::root,0,uint8_t(0));
  100|    429|        nesting_depth_ = 0;
  101|    429|    }
_ZN8jsoncons6ubjson19basic_ubjson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE5parseERNS_18basic_json_visitorIcEERNS3_10error_codeE:
  151|    429|    {
  152|  19.5M|        while (!done_ && more_)
  ------------------
  |  Branch (152:16): [True: 19.5M, False: 12]
  |  Branch (152:26): [True: 19.5M, False: 0]
  ------------------
  153|  19.5M|        {
  154|  19.5M|            switch (state_stack_.back().mode)
  ------------------
  |  Branch (154:21): [True: 19.5M, False: 0]
  ------------------
  155|  19.5M|            {
  156|   118k|                case parse_mode::array:
  ------------------
  |  Branch (156:17): [True: 118k, False: 19.3M]
  ------------------
  157|   118k|                {
  158|   118k|                    if (state_stack_.back().index < state_stack_.back().length)
  ------------------
  |  Branch (158:25): [True: 23.3k, False: 95.2k]
  ------------------
  159|  23.3k|                    {
  160|  23.3k|                        ++state_stack_.back().index;
  161|  23.3k|                        read_type_and_value(visitor, ec);
  162|  23.3k|                        if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  23.3k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 2, False: 23.3k]
  |  |  ------------------
  ------------------
  163|      2|                        {
  164|      2|                            return;
  165|      2|                        }
  166|  23.3k|                    }
  167|  95.2k|                    else
  168|  95.2k|                    {
  169|  95.2k|                        end_array(visitor, ec);
  170|  95.2k|                    }
  171|   118k|                    break;
  172|   118k|                }
  173|  9.25M|                case parse_mode::strongly_typed_array:
  ------------------
  |  Branch (173:17): [True: 9.25M, False: 10.2M]
  ------------------
  174|  9.25M|                {
  175|  9.25M|                    if (state_stack_.back().index < state_stack_.back().length)
  ------------------
  |  Branch (175:25): [True: 9.23M, False: 22.2k]
  ------------------
  176|  9.23M|                    {
  177|  9.23M|                        ++state_stack_.back().index;
  178|  9.23M|                        read_value(visitor, state_stack_.back().type, ec);
  179|  9.23M|                        if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  9.23M|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 73, False: 9.23M]
  |  |  ------------------
  ------------------
  180|     73|                        {
  181|     73|                            return;
  182|     73|                        }
  183|  9.23M|                    }
  184|  22.2k|                    else
  185|  22.2k|                    {
  186|  22.2k|                        end_array(visitor, ec);
  187|  22.2k|                    }
  188|  9.25M|                    break;
  189|  9.25M|                }
  190|  9.25M|                case parse_mode::indefinite_array:
  ------------------
  |  Branch (190:17): [True: 8.85M, False: 10.6M]
  ------------------
  191|  8.85M|                {
  192|  8.85M|                    auto c = source_.peek();
  193|  8.85M|                    if (JSONCONS_UNLIKELY(c.eof))
  ------------------
  |  |   78|  8.85M|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 20, False: 8.85M]
  |  |  ------------------
  ------------------
  194|     20|                    {
  195|     20|                        ec = ubjson_errc::unexpected_eof;
  196|     20|                        more_ = false;
  197|     20|                        return;
  198|     20|                    }
  199|  8.85M|                    if (c.value == jsoncons::ubjson::ubjson_type::end_array_marker)
  ------------------
  |  Branch (199:25): [True: 2.86M, False: 5.98M]
  ------------------
  200|  2.86M|                    {
  201|  2.86M|                        source_.ignore(1);
  202|  2.86M|                        end_array(visitor, ec);
  203|  2.86M|                        if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  2.86M|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 2.86M]
  |  |  ------------------
  ------------------
  204|      0|                        {
  205|      0|                            return;
  206|      0|                        }
  207|  2.86M|                    }
  208|  5.98M|                    else
  209|  5.98M|                    {
  210|  5.98M|                        if (++state_stack_.back().index > max_items_)
  ------------------
  |  Branch (210:29): [True: 0, False: 5.98M]
  ------------------
  211|      0|                        {
  212|      0|                            ec = ubjson_errc::max_items_exceeded;
  213|      0|                            more_ = false;
  214|      0|                            return;
  215|      0|                        }
  216|  5.98M|                        read_type_and_value(visitor, ec);
  217|  5.98M|                        if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  5.98M|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 141, False: 5.98M]
  |  |  ------------------
  ------------------
  218|    141|                        {
  219|    141|                            return;
  220|    141|                        }
  221|  5.98M|                    }
  222|  8.85M|                    break;
  223|  8.85M|                }
  224|  8.85M|                case parse_mode::map_key:
  ------------------
  |  Branch (224:17): [True: 4.24k, False: 19.5M]
  ------------------
  225|  4.24k|                {
  226|  4.24k|                    if (state_stack_.back().index < state_stack_.back().length)
  ------------------
  |  Branch (226:25): [True: 1.99k, False: 2.24k]
  ------------------
  227|  1.99k|                    {
  228|  1.99k|                        ++state_stack_.back().index;
  229|  1.99k|                        read_key(visitor, ec);
  230|  1.99k|                        if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  1.99k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 9, False: 1.98k]
  |  |  ------------------
  ------------------
  231|      9|                        {
  232|      9|                            return;
  233|      9|                        }
  234|  1.98k|                        state_stack_.back().mode = parse_mode::map_value;
  235|  1.98k|                    }
  236|  2.24k|                    else
  237|  2.24k|                    {
  238|  2.24k|                        end_object(visitor, ec);
  239|  2.24k|                    }
  240|  4.23k|                    break;
  241|  4.24k|                }
  242|  4.23k|                case parse_mode::map_value:
  ------------------
  |  Branch (242:17): [True: 1.98k, False: 19.5M]
  ------------------
  243|  1.98k|                {
  244|  1.98k|                    state_stack_.back().mode = parse_mode::map_key;
  245|  1.98k|                    read_type_and_value(visitor, ec);
  246|  1.98k|                    if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  1.98k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 5, False: 1.98k]
  |  |  ------------------
  ------------------
  247|      5|                    {
  248|      5|                        return;
  249|      5|                    }
  250|  1.98k|                    break;
  251|  1.98k|                }
  252|  76.7k|                case parse_mode::strongly_typed_map_key:
  ------------------
  |  Branch (252:17): [True: 76.7k, False: 19.4M]
  ------------------
  253|  76.7k|                {
  254|  76.7k|                    if (state_stack_.back().index < state_stack_.back().length)
  ------------------
  |  Branch (254:25): [True: 146, False: 76.5k]
  ------------------
  255|    146|                    {
  256|    146|                        ++state_stack_.back().index;
  257|    146|                        read_key(visitor, ec);
  258|    146|                        if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|    146|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 3, False: 143]
  |  |  ------------------
  ------------------
  259|      3|                        {
  260|      3|                            return;
  261|      3|                        }
  262|    143|                        state_stack_.back().mode = parse_mode::strongly_typed_map_value;
  263|    143|                    }
  264|  76.5k|                    else
  265|  76.5k|                    {
  266|  76.5k|                        end_object(visitor, ec);
  267|  76.5k|                    }
  268|  76.7k|                    break;
  269|  76.7k|                }
  270|  76.7k|                case parse_mode::strongly_typed_map_value:
  ------------------
  |  Branch (270:17): [True: 143, False: 19.5M]
  ------------------
  271|    143|                {
  272|    143|                    state_stack_.back().mode = parse_mode::strongly_typed_map_key;
  273|    143|                    read_value(visitor, state_stack_.back().type, ec);
  274|    143|                    if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|    143|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 2, False: 141]
  |  |  ------------------
  ------------------
  275|      2|                    {
  276|      2|                        return;
  277|      2|                    }
  278|    141|                    break;
  279|    143|                }
  280|   595k|                case parse_mode::indefinite_map_key:
  ------------------
  |  Branch (280:17): [True: 595k, False: 18.9M]
  ------------------
  281|   595k|                {
  282|   595k|                    auto c = source_.peek();
  283|   595k|                    if (JSONCONS_UNLIKELY(c.eof))
  ------------------
  |  |   78|   595k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 9, False: 595k]
  |  |  ------------------
  ------------------
  284|      9|                    {
  285|      9|                        ec = ubjson_errc::unexpected_eof;
  286|      9|                        more_ = false;
  287|      9|                        return;
  288|      9|                    }
  289|   595k|                    if (c.value == jsoncons::ubjson::ubjson_type::end_object_marker)
  ------------------
  |  Branch (289:25): [True: 1.34k, False: 594k]
  ------------------
  290|  1.34k|                    {
  291|  1.34k|                        source_.ignore(1);
  292|  1.34k|                        end_object(visitor, ec);
  293|  1.34k|                        if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  1.34k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 1.34k]
  |  |  ------------------
  ------------------
  294|      0|                        {
  295|      0|                            return;
  296|      0|                        }
  297|  1.34k|                    }
  298|   594k|                    else
  299|   594k|                    {
  300|   594k|                        if (++state_stack_.back().index > max_items_)
  ------------------
  |  Branch (300:29): [True: 0, False: 594k]
  ------------------
  301|      0|                        {
  302|      0|                            ec = ubjson_errc::max_items_exceeded;
  303|      0|                            more_ = false;
  304|      0|                            return;
  305|      0|                        }
  306|   594k|                        read_key(visitor, ec);
  307|   594k|                        if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|   594k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 108, False: 594k]
  |  |  ------------------
  ------------------
  308|    108|                        {
  309|    108|                            return;
  310|    108|                        }
  311|   594k|                        state_stack_.back().mode = parse_mode::indefinite_map_value;
  312|   594k|                    }
  313|   595k|                    break;
  314|   595k|                }
  315|   595k|                case parse_mode::indefinite_map_value:
  ------------------
  |  Branch (315:17): [True: 594k, False: 18.9M]
  ------------------
  316|   594k|                {
  317|   594k|                    state_stack_.back().mode = parse_mode::indefinite_map_key;
  318|   594k|                    read_type_and_value(visitor, ec);
  319|   594k|                    if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|   594k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 14, False: 594k]
  |  |  ------------------
  ------------------
  320|     14|                    {
  321|     14|                        return;
  322|     14|                    }
  323|   594k|                    break;
  324|   594k|                }
  325|   594k|                case parse_mode::root:
  ------------------
  |  Branch (325:17): [True: 429, False: 19.5M]
  ------------------
  326|    429|                {
  327|    429|                    state_stack_.back().mode = parse_mode::accept;
  328|    429|                    read_type_and_value(visitor, ec);
  329|    429|                    if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|    429|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 31, False: 398]
  |  |  ------------------
  ------------------
  330|     31|                    {
  331|     31|                        return;
  332|     31|                    }
  333|    398|                    break;
  334|    429|                }
  335|    398|                case parse_mode::accept:
  ------------------
  |  Branch (335:17): [True: 12, False: 19.5M]
  ------------------
  336|     12|                {
  337|     12|                    JSONCONS_ASSERT(state_stack_.size() == 1);
  ------------------
  |  |   49|     12|#define JSONCONS_ASSERT(x) if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (49:32): [True: 0, False: 12]
  |  |  ------------------
  |  |   50|      0|    JSONCONS_THROW(jsoncons::assertion_error("assertion '" #x "' failed at  <> :" \
  |  |  ------------------
  |  |  |  |   35|      0|    #define JSONCONS_THROW(exception) throw exception
  |  |  ------------------
  |  |   51|      0|            JSONCONS_STR( 0 ))); }
  ------------------
  338|     12|                    state_stack_.clear();
  339|     12|                    more_ = false;
  340|     12|                    done_ = true;
  341|     12|                    visitor.flush();
  342|     12|                    break;
  343|     12|                }
  344|  19.5M|            }
  345|  19.5M|        }
  346|    429|    }
_ZN8jsoncons6ubjson19basic_ubjson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE19read_type_and_valueERNS_18basic_json_visitorIcEERNS3_10error_codeE:
  349|  6.60M|    {
  350|  6.60M|        if (source_.is_error())
  ------------------
  |  Branch (350:13): [True: 0, False: 6.60M]
  ------------------
  351|      0|        {
  352|      0|            ec = ubjson_errc::source_error;
  353|      0|            more_ = false;
  354|      0|            return;
  355|      0|        }   
  356|       |
  357|  6.60M|        uint8_t b;
  358|  6.60M|        if (source_.read(&b, 1) == 0)
  ------------------
  |  Branch (358:13): [True: 11, False: 6.60M]
  ------------------
  359|     11|        {
  360|     11|            ec = ubjson_errc::unexpected_eof;
  361|     11|            more_ = false;
  362|     11|            return;
  363|     11|        }
  364|  6.60M|        read_value(visitor, b, ec);
  365|  6.60M|    }
_ZN8jsoncons6ubjson19basic_ubjson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE9end_arrayERNS_18basic_json_visitorIcEERNS3_10error_codeE:
  671|  2.98M|    {
  672|  2.98M|        --nesting_depth_;
  673|       |
  674|  2.98M|        visitor.end_array(*this, ec);
  675|  2.98M|        more_ = !cursor_mode_;
  676|  2.98M|        if (level() == mark_level_)
  ------------------
  |  Branch (676:13): [True: 0, False: 2.98M]
  ------------------
  677|      0|        {
  678|      0|            more_ = false;
  679|      0|        }
  680|  2.98M|        state_stack_.pop_back();
  681|  2.98M|    }
_ZNK8jsoncons6ubjson19basic_ubjson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE5levelEv:
  116|  3.06M|    {
  117|  3.06M|        return static_cast<int>(state_stack_.size());
  118|  3.06M|    }
_ZN8jsoncons6ubjson19basic_ubjson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE10read_valueERNS_18basic_json_visitorIcEEhRNS3_10error_codeE:
  368|  15.8M|    {
  369|  15.8M|        switch (type)
  370|  15.8M|        {
  371|  5.64M|            case jsoncons::ubjson::ubjson_type::null_type: 
  ------------------
  |  Branch (371:13): [True: 5.64M, False: 10.1M]
  ------------------
  372|  5.64M|            {
  373|  5.64M|                visitor.null_value(semantic_tag::none, *this, ec);
  374|  5.64M|                more_ = !cursor_mode_;
  375|  5.64M|                break;
  376|      0|            }
  377|  35.5k|            case jsoncons::ubjson::ubjson_type::no_op_type: 
  ------------------
  |  Branch (377:13): [True: 35.5k, False: 15.8M]
  ------------------
  378|  35.5k|            {
  379|  35.5k|                break;
  380|      0|            }
  381|   180k|            case jsoncons::ubjson::ubjson_type::true_type:
  ------------------
  |  Branch (381:13): [True: 180k, False: 15.6M]
  ------------------
  382|   180k|            {
  383|   180k|                visitor.bool_value(true, semantic_tag::none, *this, ec);
  384|   180k|                more_ = !cursor_mode_;
  385|   180k|                break;
  386|      0|            }
  387|  47.9k|            case jsoncons::ubjson::ubjson_type::false_type:
  ------------------
  |  Branch (387:13): [True: 47.9k, False: 15.7M]
  ------------------
  388|  47.9k|            {
  389|  47.9k|                visitor.bool_value(false, semantic_tag::none, *this, ec);
  390|  47.9k|                more_ = !cursor_mode_;
  391|  47.9k|                break;
  392|      0|            }
  393|   735k|            case jsoncons::ubjson::ubjson_type::int8_type: 
  ------------------
  |  Branch (393:13): [True: 735k, False: 15.1M]
  ------------------
  394|   735k|            {
  395|   735k|                uint8_t buf[sizeof(int8_t)];
  396|   735k|                if (source_.read(buf, sizeof(int8_t)) != sizeof(int8_t))
  ------------------
  |  Branch (396:21): [True: 9, False: 735k]
  ------------------
  397|      9|                {
  398|      9|                    ec = ubjson_errc::unexpected_eof;
  399|      9|                    more_ = false;
  400|      9|                    return;
  401|      9|                }
  402|   735k|                int8_t val = binary::big_to_native<int8_t>(buf, sizeof(buf));
  403|   735k|                visitor.int64_value(val, semantic_tag::none, *this, ec);
  404|   735k|                more_ = !cursor_mode_;
  405|   735k|                break;
  406|   735k|            }
  407|   447k|            case jsoncons::ubjson::ubjson_type::uint8_type: 
  ------------------
  |  Branch (407:13): [True: 447k, False: 15.3M]
  ------------------
  408|   447k|            {
  409|   447k|                uint8_t b;
  410|   447k|                if (source_.read(&b, 1) == 0)
  ------------------
  |  Branch (410:21): [True: 3, False: 447k]
  ------------------
  411|      3|                {
  412|      3|                    ec = ubjson_errc::unexpected_eof;
  413|      3|                    more_ = false;
  414|      3|                    return;
  415|      3|                }
  416|   447k|                visitor.uint64_value(b, semantic_tag::none, *this, ec);
  417|   447k|                more_ = !cursor_mode_;
  418|   447k|                break;
  419|   447k|            }
  420|   915k|            case jsoncons::ubjson::ubjson_type::int16_type: 
  ------------------
  |  Branch (420:13): [True: 915k, False: 14.9M]
  ------------------
  421|   915k|            {
  422|   915k|                uint8_t buf[sizeof(int16_t)];
  423|   915k|                if (source_.read(buf, sizeof(int16_t)) != sizeof(int16_t))
  ------------------
  |  Branch (423:21): [True: 11, False: 915k]
  ------------------
  424|     11|                {
  425|     11|                    ec = ubjson_errc::unexpected_eof;
  426|     11|                    more_ = false;
  427|     11|                    return;
  428|     11|                }
  429|   915k|                int16_t val = binary::big_to_native<int16_t>(buf, sizeof(buf));
  430|   915k|                visitor.int64_value(val, semantic_tag::none, *this, ec);
  431|   915k|                more_ = !cursor_mode_;
  432|   915k|                break;
  433|   915k|            }
  434|  97.9k|            case jsoncons::ubjson::ubjson_type::int32_type: 
  ------------------
  |  Branch (434:13): [True: 97.9k, False: 15.7M]
  ------------------
  435|  97.9k|            {
  436|  97.9k|                uint8_t buf[sizeof(int32_t)];
  437|  97.9k|                if (source_.read(buf, sizeof(int32_t)) != sizeof(int32_t))
  ------------------
  |  Branch (437:21): [True: 5, False: 97.9k]
  ------------------
  438|      5|                {
  439|      5|                    ec = ubjson_errc::unexpected_eof;
  440|      5|                    more_ = false;
  441|      5|                    return;
  442|      5|                }
  443|  97.9k|                int32_t val = binary::big_to_native<int32_t>(buf, sizeof(buf));
  444|  97.9k|                visitor.int64_value(val, semantic_tag::none, *this, ec);
  445|  97.9k|                more_ = !cursor_mode_;
  446|  97.9k|                break;
  447|  97.9k|            }
  448|  25.7k|            case jsoncons::ubjson::ubjson_type::int64_type: 
  ------------------
  |  Branch (448:13): [True: 25.7k, False: 15.8M]
  ------------------
  449|  25.7k|            {
  450|  25.7k|                uint8_t buf[sizeof(int64_t)];
  451|  25.7k|                if (source_.read(buf, sizeof(int64_t)) != sizeof(int64_t))
  ------------------
  |  Branch (451:21): [True: 4, False: 25.7k]
  ------------------
  452|      4|                {
  453|      4|                    ec = ubjson_errc::unexpected_eof;
  454|      4|                    more_ = false;
  455|      4|                    return;
  456|      4|                }
  457|  25.7k|                int64_t val = binary::big_to_native<int64_t>(buf, sizeof(buf));
  458|  25.7k|                visitor.int64_value(val, semantic_tag::none, *this, ec);
  459|  25.7k|                more_ = !cursor_mode_;
  460|  25.7k|                break;
  461|  25.7k|            }
  462|  25.7k|            case jsoncons::ubjson::ubjson_type::float32_type: 
  ------------------
  |  Branch (462:13): [True: 25.7k, False: 15.8M]
  ------------------
  463|  25.7k|            {
  464|  25.7k|                uint8_t buf[sizeof(float)];
  465|  25.7k|                if (source_.read(buf, sizeof(float)) != sizeof(float))
  ------------------
  |  Branch (465:21): [True: 2, False: 25.7k]
  ------------------
  466|      2|                {
  467|      2|                    ec = ubjson_errc::unexpected_eof;
  468|      2|                    more_ = false;
  469|      2|                    return;
  470|      2|                }
  471|  25.7k|                float val = binary::big_to_native<float>(buf, sizeof(buf));
  472|  25.7k|                visitor.double_value(val, semantic_tag::none, *this, ec);
  473|  25.7k|                more_ = !cursor_mode_;
  474|  25.7k|                break;
  475|  25.7k|            }
  476|  30.9k|            case jsoncons::ubjson::ubjson_type::float64_type: 
  ------------------
  |  Branch (476:13): [True: 30.9k, False: 15.8M]
  ------------------
  477|  30.9k|            {
  478|  30.9k|                uint8_t buf[sizeof(double)];
  479|  30.9k|                if (source_.read(buf, sizeof(double)) != sizeof(double))
  ------------------
  |  Branch (479:21): [True: 1, False: 30.9k]
  ------------------
  480|      1|                {
  481|      1|                    ec = ubjson_errc::unexpected_eof;
  482|      1|                    more_ = false;
  483|      1|                    return;
  484|      1|                }
  485|  30.9k|                double val = binary::big_to_native<double>(buf, sizeof(buf));
  486|  30.9k|                visitor.double_value(val, semantic_tag::none, *this, ec);
  487|  30.9k|                more_ = !cursor_mode_;
  488|  30.9k|                break;
  489|  30.9k|            }
  490|  4.37M|            case jsoncons::ubjson::ubjson_type::char_type: 
  ------------------
  |  Branch (490:13): [True: 4.37M, False: 11.4M]
  ------------------
  491|  4.37M|            {
  492|  4.37M|                uint8_t ch{};
  493|  4.37M|                if (source_.read(&ch, 1) != 1)
  ------------------
  |  Branch (493:21): [True: 13, False: 4.37M]
  ------------------
  494|     13|                {
  495|     13|                    ec = ubjson_errc::unexpected_eof;
  496|     13|                    more_ = false;
  497|     13|                    return;
  498|     13|                }
  499|  4.37M|                auto result = unicode_traits::validate(&ch, 1);
  500|  4.37M|                if (result.ec != unicode_traits::unicode_errc())
  ------------------
  |  Branch (500:21): [True: 1, False: 4.37M]
  ------------------
  501|      1|                {
  502|      1|                    ec = ubjson_errc::invalid_utf8_text_string;
  503|      1|                    more_ = false;
  504|      1|                    return;
  505|      1|                }
  506|  4.37M|                visitor.string_value(string_view(reinterpret_cast<const char*>(&ch), 1), semantic_tag::none, *this, ec);
  507|  4.37M|                more_ = !cursor_mode_;
  508|  4.37M|                break;
  509|  4.37M|            }
  510|    609|            case jsoncons::ubjson::ubjson_type::string_type: 
  ------------------
  |  Branch (510:13): [True: 609, False: 15.8M]
  ------------------
  511|    609|            {
  512|    609|                std::size_t length = get_length(ec);
  513|    609|                if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|    609|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 1, False: 608]
  |  |  ------------------
  ------------------
  514|      1|                {
  515|      1|                    return;
  516|      1|                }
  517|    608|                auto data = source_.read_span(length, text_buffer_);
  518|    608|                if (data.size() != length)
  ------------------
  |  Branch (518:21): [True: 87, False: 521]
  ------------------
  519|     87|                {
  520|     87|                    ec = ubjson_errc::unexpected_eof;
  521|     87|                    more_ = false;
  522|     87|                    return;
  523|     87|                }
  524|    521|                auto result = unicode_traits::validate(data.data(), data.size());
  525|    521|                if (result.ec != unicode_traits::unicode_errc())
  ------------------
  |  Branch (525:21): [True: 9, False: 512]
  ------------------
  526|      9|                {
  527|      9|                    ec = ubjson_errc::invalid_utf8_text_string;
  528|      9|                    more_ = false;
  529|      9|                    return;
  530|      9|                }
  531|    512|                visitor.string_value(jsoncons::string_view(reinterpret_cast<const char*>(data.data()),data.size()), 
  532|    512|                    semantic_tag::none, *this, ec);
  533|    512|                more_ = !cursor_mode_;
  534|    512|                break;
  535|    521|            }
  536|   183k|            case jsoncons::ubjson::ubjson_type::high_precision_number_type: 
  ------------------
  |  Branch (536:13): [True: 183k, False: 15.6M]
  ------------------
  537|   183k|            {
  538|   183k|                std::size_t length = get_length(ec);
  539|   183k|                if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|   183k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 2, False: 183k]
  |  |  ------------------
  ------------------
  540|      2|                {
  541|      2|                    return;
  542|      2|                }
  543|   183k|                auto data = source_.read_span(length, text_buffer_);
  544|   183k|                if (data.size() != length)
  ------------------
  |  Branch (544:21): [True: 20, False: 183k]
  ------------------
  545|     20|                {
  546|     20|                    ec = ubjson_errc::unexpected_eof;
  547|     20|                    more_ = false;
  548|     20|                    return;
  549|     20|                }
  550|   183k|                if (jsoncons::is_base10(data.data(), data.size()))
  ------------------
  |  Branch (550:21): [True: 866, False: 182k]
  ------------------
  551|    866|                {
  552|    866|                    visitor.string_value(jsoncons::string_view(reinterpret_cast<const char*>(data.data()), data.size()), 
  553|    866|                        semantic_tag::bigint, *this, ec);
  554|    866|                    more_ = !cursor_mode_;
  555|    866|                }
  556|   182k|                else
  557|   182k|                {
  558|   182k|                    visitor.string_value(jsoncons::string_view(reinterpret_cast<const char*>(data.data()), data.size()), 
  559|   182k|                        semantic_tag::bigdec, *this, ec);
  560|   182k|                    more_ = !cursor_mode_;
  561|   182k|                }
  562|   183k|                break;
  563|   183k|            }
  564|  3.01M|            case jsoncons::ubjson::ubjson_type::start_array_marker: 
  ------------------
  |  Branch (564:13): [True: 3.01M, False: 12.8M]
  ------------------
  565|  3.01M|            {
  566|  3.01M|                begin_array(visitor,ec);
  567|  3.01M|                break;
  568|   183k|            }
  569|  82.8k|            case jsoncons::ubjson::ubjson_type::start_object_marker: 
  ------------------
  |  Branch (569:13): [True: 82.8k, False: 15.7M]
  ------------------
  570|  82.8k|            {
  571|  82.8k|                begin_object(visitor, ec);
  572|  82.8k|                break;
  573|   183k|            }
  574|     19|            default:
  ------------------
  |  Branch (574:13): [True: 19, False: 15.8M]
  ------------------
  575|     19|            {
  576|     19|                ec = ubjson_errc::unknown_type;
  577|     19|                break;
  578|   183k|            }
  579|  15.8M|        }
  580|  15.8M|        if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  15.8M|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 89, False: 15.8M]
  |  |  ------------------
  ------------------
  581|     89|        {
  582|     89|            more_ = false;
  583|     89|        }
  584|  15.8M|    }
_ZN8jsoncons6ubjson19basic_ubjson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE10get_lengthERNS3_10error_codeE:
  790|   994k|    {
  791|   994k|        std::size_t length = 0;
  792|   994k|        uint8_t type;
  793|   994k|        if (source_.read(&type, 1) == 0)
  ------------------
  |  Branch (793:13): [True: 11, False: 994k]
  ------------------
  794|     11|        {
  795|     11|            ec = ubjson_errc::unexpected_eof;
  796|     11|            more_ = false;
  797|     11|            return length;
  798|     11|        }
  799|   994k|        switch (type)
  800|   994k|        {
  801|   581k|            case jsoncons::ubjson::ubjson_type::int8_type: 
  ------------------
  |  Branch (801:13): [True: 581k, False: 412k]
  ------------------
  802|   581k|            {
  803|   581k|                uint8_t buf[sizeof(int8_t)];
  804|   581k|                if (source_.read(buf, sizeof(int8_t)) != sizeof(int8_t))
  ------------------
  |  Branch (804:21): [True: 1, False: 581k]
  ------------------
  805|      1|                {
  806|      1|                    ec = ubjson_errc::unexpected_eof;
  807|      1|                    more_ = false;
  808|      1|                    return length;
  809|      1|                }
  810|   581k|                int8_t val = binary::big_to_native<int8_t>(buf, sizeof(buf));
  811|   581k|                if (val >= 0)
  ------------------
  |  Branch (811:21): [True: 581k, False: 0]
  ------------------
  812|   581k|                {
  813|   581k|                    length = val;
  814|   581k|                }
  815|      0|                else
  816|      0|                {
  817|      0|                    ec = ubjson_errc::length_is_negative;
  818|      0|                    more_ = false;
  819|      0|                    return length;
  820|      0|                }
  821|   581k|                break;
  822|   581k|            }
  823|   581k|            case jsoncons::ubjson::ubjson_type::uint8_type: 
  ------------------
  |  Branch (823:13): [True: 398k, False: 596k]
  ------------------
  824|   398k|            {
  825|   398k|                uint8_t b;
  826|   398k|                if (source_.read(&b, 1) == 0)
  ------------------
  |  Branch (826:21): [True: 1, False: 398k]
  ------------------
  827|      1|                {
  828|      1|                    ec = ubjson_errc::unexpected_eof;
  829|      1|                    more_ = false;
  830|      1|                    return length;
  831|      1|                }
  832|   398k|                length = b;
  833|   398k|                break;
  834|   398k|            }
  835|  13.9k|            case jsoncons::ubjson::ubjson_type::int16_type: 
  ------------------
  |  Branch (835:13): [True: 13.9k, False: 980k]
  ------------------
  836|  13.9k|            {
  837|  13.9k|                uint8_t buf[sizeof(int16_t)];
  838|  13.9k|                if (source_.read(buf, sizeof(int16_t)) != sizeof(int16_t))
  ------------------
  |  Branch (838:21): [True: 0, False: 13.9k]
  ------------------
  839|      0|                {
  840|      0|                    ec = ubjson_errc::unexpected_eof;
  841|      0|                    more_ = false;
  842|      0|                    return length;
  843|      0|                }
  844|  13.9k|                int16_t val = binary::big_to_native<int16_t>(buf, sizeof(buf));
  845|  13.9k|                if (val >= 0)
  ------------------
  |  Branch (845:21): [True: 13.9k, False: 0]
  ------------------
  846|  13.9k|                {
  847|  13.9k|                    length = val;
  848|  13.9k|                }
  849|      0|                else
  850|      0|                {
  851|      0|                    ec = ubjson_errc::length_is_negative;
  852|      0|                    more_ = false;
  853|      0|                    return length;
  854|      0|                }
  855|  13.9k|                break;
  856|  13.9k|            }
  857|  13.9k|            case jsoncons::ubjson::ubjson_type::int32_type: 
  ------------------
  |  Branch (857:13): [True: 570, False: 993k]
  ------------------
  858|    570|            {
  859|    570|                uint8_t buf[sizeof(int32_t)];
  860|    570|                if (source_.read(buf, sizeof(int32_t)) != sizeof(int32_t))
  ------------------
  |  Branch (860:21): [True: 0, False: 570]
  ------------------
  861|      0|                {
  862|      0|                    ec = ubjson_errc::unexpected_eof;
  863|      0|                    more_ = false;
  864|      0|                    return length;
  865|      0|                }
  866|    570|                int32_t val = binary::big_to_native<int32_t>(buf, sizeof(buf));
  867|    570|                if (val >= 0)
  ------------------
  |  Branch (867:21): [True: 570, False: 0]
  ------------------
  868|    570|                {
  869|    570|                    length = static_cast<std::size_t>(val);
  870|    570|                }
  871|      0|                else
  872|      0|                {
  873|      0|                    ec = ubjson_errc::length_is_negative;
  874|      0|                    more_ = false;
  875|      0|                    return length;
  876|      0|                }
  877|    570|                break;
  878|    570|            }
  879|    570|            case jsoncons::ubjson::ubjson_type::int64_type: 
  ------------------
  |  Branch (879:13): [True: 136, False: 994k]
  ------------------
  880|    136|            {
  881|    136|                uint8_t buf[sizeof(int64_t)];
  882|    136|                if (source_.read(buf, sizeof(int64_t)) != sizeof(int64_t))
  ------------------
  |  Branch (882:21): [True: 0, False: 136]
  ------------------
  883|      0|                {
  884|      0|                    ec = ubjson_errc::unexpected_eof;
  885|      0|                    more_ = false;
  886|      0|                    return length;
  887|      0|                }
  888|    136|                int64_t val = binary::big_to_native<int64_t>(buf, sizeof(buf));
  889|    136|                if (val >= 0)
  ------------------
  |  Branch (889:21): [True: 136, False: 0]
  ------------------
  890|    136|                {
  891|    136|                    length = (std::size_t)val;
  892|    136|                    if (length != (uint64_t)val)
  ------------------
  |  Branch (892:25): [True: 0, False: 136]
  ------------------
  893|      0|                    {
  894|      0|                        ec = ubjson_errc::number_too_large;
  895|      0|                        more_ = false;
  896|      0|                        return length;
  897|      0|                    }
  898|    136|                }
  899|      0|                else
  900|      0|                {
  901|      0|                    ec = ubjson_errc::length_is_negative;
  902|      0|                    more_ = false;
  903|      0|                    return length;
  904|      0|                }
  905|    136|                break;
  906|    136|            }
  907|    136|            default:
  ------------------
  |  Branch (907:13): [True: 11, False: 994k]
  ------------------
  908|     11|            {
  909|     11|                ec = ubjson_errc::length_must_be_integer;
  910|     11|                more_ = false;
  911|     11|                return length;
  912|    136|            }
  913|   994k|        }
  914|   994k|        return length;
  915|   994k|    }
_ZN8jsoncons6ubjson19basic_ubjson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE11begin_arrayERNS_18basic_json_visitorIcEERNS3_10error_codeE:
  587|  3.01M|    {
  588|  3.01M|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|  3.01M|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 3.01M]
  |  |  ------------------
  ------------------
  589|      0|        {
  590|      0|            ec = ubjson_errc::max_nesting_depth_exceeded;
  591|      0|            more_ = false;
  592|      0|            return;
  593|      0|        } 
  594|       |
  595|  3.01M|        auto c = source_.peek();
  596|  3.01M|        if (JSONCONS_UNLIKELY(c.eof))
  ------------------
  |  |   78|  3.01M|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 8, False: 3.01M]
  |  |  ------------------
  ------------------
  597|      8|        {
  598|      8|            ec = ubjson_errc::unexpected_eof;
  599|      8|            more_ = false;
  600|      8|            return;
  601|      8|        }
  602|  3.01M|        if (c.value == jsoncons::ubjson::ubjson_type::type_marker)
  ------------------
  |  Branch (602:13): [True: 36.9k, False: 2.97M]
  ------------------
  603|  36.9k|        {
  604|  36.9k|            source_.ignore(1);
  605|  36.9k|            uint8_t b;
  606|  36.9k|            if (source_.read(&b, 1) == 0)
  ------------------
  |  Branch (606:17): [True: 4, False: 36.9k]
  ------------------
  607|      4|            {
  608|      4|                ec = ubjson_errc::unexpected_eof;
  609|      4|                more_ = false;
  610|      4|                return;
  611|      4|            }
  612|  36.9k|            c = source_.peek();
  613|  36.9k|            if (JSONCONS_UNLIKELY(c.eof))
  ------------------
  |  |   78|  36.9k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 4, False: 36.9k]
  |  |  ------------------
  ------------------
  614|      4|            {
  615|      4|                ec = ubjson_errc::unexpected_eof;
  616|      4|                more_ = false;
  617|      4|                return;
  618|      4|            }
  619|  36.9k|            if (c.value == jsoncons::ubjson::ubjson_type::count_marker)
  ------------------
  |  Branch (619:17): [True: 36.9k, False: 1]
  ------------------
  620|  36.9k|            {
  621|  36.9k|                source_.ignore(1);
  622|  36.9k|                std::size_t length = get_length(ec);
  623|  36.9k|                if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  36.9k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 3, False: 36.9k]
  |  |  ------------------
  ------------------
  624|      3|                {
  625|      3|                    return;
  626|      3|                }
  627|  36.9k|                if (length > max_items_)
  ------------------
  |  Branch (627:21): [True: 0, False: 36.9k]
  ------------------
  628|      0|                {
  629|      0|                    ec = ubjson_errc::max_items_exceeded;
  630|      0|                    more_ = false;
  631|      0|                    return;
  632|      0|                }
  633|  36.9k|                state_stack_.emplace_back(parse_mode::strongly_typed_array,length,b);
  634|  36.9k|                visitor.begin_array(length, semantic_tag::none, *this, ec);
  635|  36.9k|                more_ = !cursor_mode_;
  636|  36.9k|            }
  637|      1|            else
  638|      1|            {
  639|      1|                ec = ubjson_errc::count_required_after_type;
  640|      1|                more_ = false;
  641|      1|                return;
  642|      1|            }
  643|  36.9k|        }
  644|  2.97M|        else if (c.value == jsoncons::ubjson::ubjson_type::count_marker)
  ------------------
  |  Branch (644:18): [True: 96.0k, False: 2.87M]
  ------------------
  645|  96.0k|        {
  646|  96.0k|            source_.ignore(1);
  647|  96.0k|            std::size_t length = get_length(ec);
  648|  96.0k|            if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  96.0k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 4, False: 96.0k]
  |  |  ------------------
  ------------------
  649|      4|            {
  650|      4|                return;
  651|      4|            }
  652|  96.0k|            if (length > max_items_)
  ------------------
  |  Branch (652:17): [True: 0, False: 96.0k]
  ------------------
  653|      0|            {
  654|      0|                ec = ubjson_errc::max_items_exceeded;
  655|      0|                more_ = false;
  656|      0|                return;
  657|      0|            }
  658|  96.0k|            state_stack_.emplace_back(parse_mode::array,length);
  659|  96.0k|            visitor.begin_array(length, semantic_tag::none, *this, ec);
  660|  96.0k|            more_ = !cursor_mode_;
  661|  96.0k|        }
  662|  2.87M|        else
  663|  2.87M|        {
  664|  2.87M|            state_stack_.emplace_back(parse_mode::indefinite_array,0);
  665|  2.87M|            visitor.begin_array(semantic_tag::none, *this, ec);
  666|  2.87M|            more_ = !cursor_mode_;
  667|  2.87M|        }
  668|  3.01M|    }
_ZN8jsoncons6ubjson19basic_ubjson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE12begin_objectERNS_18basic_json_visitorIcEERNS3_10error_codeE:
  684|  82.8k|    {
  685|  82.8k|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|  82.8k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 1, False: 82.8k]
  |  |  ------------------
  ------------------
  686|      1|        {
  687|      1|            ec = ubjson_errc::max_nesting_depth_exceeded;
  688|      1|            more_ = false;
  689|      1|            return;
  690|      1|        } 
  691|       |
  692|  82.8k|        auto c = source_.peek();
  693|  82.8k|        if (JSONCONS_UNLIKELY(c.eof))
  ------------------
  |  |   78|  82.8k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 4, False: 82.8k]
  |  |  ------------------
  ------------------
  694|      4|        {
  695|      4|            ec = ubjson_errc::unexpected_eof;
  696|      4|            more_ = false;
  697|      4|            return;
  698|      4|        }
  699|  82.8k|        if (c.value == jsoncons::ubjson::ubjson_type::type_marker)
  ------------------
  |  Branch (699:13): [True: 76.7k, False: 6.14k]
  ------------------
  700|  76.7k|        {
  701|  76.7k|            source_.ignore(1);
  702|  76.7k|            uint8_t b;
  703|  76.7k|            if (source_.read(&b, 1) == 0)
  ------------------
  |  Branch (703:17): [True: 5, False: 76.7k]
  ------------------
  704|      5|            {
  705|      5|                ec = ubjson_errc::unexpected_eof;
  706|      5|                more_ = false;
  707|      5|                return;
  708|      5|            }
  709|  76.7k|            c = source_.peek();
  710|  76.7k|            if (JSONCONS_UNLIKELY(c.eof))
  ------------------
  |  |   78|  76.7k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 4, False: 76.7k]
  |  |  ------------------
  ------------------
  711|      4|            {
  712|      4|                ec = ubjson_errc::unexpected_eof;
  713|      4|                more_ = false;
  714|      4|                return;
  715|      4|            }
  716|  76.7k|            if (c.value == jsoncons::ubjson::ubjson_type::count_marker)
  ------------------
  |  Branch (716:17): [True: 76.7k, False: 3]
  ------------------
  717|  76.7k|            {
  718|  76.7k|                source_.ignore(1);
  719|  76.7k|                std::size_t length = get_length(ec);
  720|  76.7k|                if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  76.7k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 5, False: 76.7k]
  |  |  ------------------
  ------------------
  721|      5|                {
  722|      5|                    return;
  723|      5|                }
  724|  76.7k|                if (length > max_items_)
  ------------------
  |  Branch (724:21): [True: 2, False: 76.6k]
  ------------------
  725|      2|                {
  726|      2|                    ec = ubjson_errc::max_items_exceeded;
  727|      2|                    more_ = false;
  728|      2|                    return;
  729|      2|                }
  730|  76.6k|                state_stack_.emplace_back(parse_mode::strongly_typed_map_key,length,b);
  731|  76.6k|                visitor.begin_object(length, semantic_tag::none, *this, ec);
  732|  76.6k|                more_ = !cursor_mode_;
  733|  76.6k|            }
  734|      3|            else
  735|      3|            {
  736|      3|                ec = ubjson_errc::count_required_after_type;
  737|      3|                more_ = false;
  738|      3|                return;
  739|      3|            }
  740|  76.7k|        }
  741|  6.14k|        else
  742|  6.14k|        {
  743|  6.14k|            c = source_.peek();
  744|  6.14k|            if (JSONCONS_UNLIKELY(c.eof))
  ------------------
  |  |   78|  6.14k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 6.14k]
  |  |  ------------------
  ------------------
  745|      0|            {
  746|      0|                ec = ubjson_errc::unexpected_eof;
  747|      0|                more_ = false;
  748|      0|                return;
  749|      0|            }
  750|  6.14k|            if (c.value == jsoncons::ubjson::ubjson_type::count_marker)
  ------------------
  |  Branch (750:17): [True: 4.09k, False: 2.05k]
  ------------------
  751|  4.09k|            {
  752|  4.09k|                source_.ignore(1);
  753|  4.09k|                std::size_t length = get_length(ec);
  754|  4.09k|                if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|  4.09k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 1, False: 4.09k]
  |  |  ------------------
  ------------------
  755|      1|                {
  756|      1|                    return;
  757|      1|                }
  758|  4.09k|                if (length > max_items_)
  ------------------
  |  Branch (758:21): [True: 1, False: 4.09k]
  ------------------
  759|      1|                {
  760|      1|                    ec = ubjson_errc::max_items_exceeded;
  761|      1|                    more_ = false;
  762|      1|                    return;
  763|      1|                }
  764|  4.09k|                state_stack_.emplace_back(parse_mode::map_key,length);
  765|  4.09k|                visitor.begin_object(length, semantic_tag::none, *this, ec);
  766|  4.09k|                more_ = !cursor_mode_;
  767|  4.09k|            }
  768|  2.05k|            else
  769|  2.05k|            {
  770|  2.05k|                state_stack_.emplace_back(parse_mode::indefinite_map_key,0);
  771|  2.05k|                visitor.begin_object(semantic_tag::none, *this, ec);
  772|  2.05k|                more_ = !cursor_mode_;
  773|  2.05k|            }
  774|  6.14k|        }
  775|  82.8k|    }
_ZN8jsoncons6ubjson19basic_ubjson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE8read_keyERNS_18basic_json_visitorIcEERNS3_10error_codeE:
  918|   596k|    {
  919|   596k|        std::size_t length = get_length(ec);
  920|   596k|        if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|   596k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 8, False: 596k]
  |  |  ------------------
  ------------------
  921|      8|        {
  922|      8|            ec = ubjson_errc::key_expected;
  923|      8|            more_ = false;
  924|      8|            return;
  925|      8|        }
  926|   596k|        auto data = source_.read_span(length, text_buffer_);
  927|   596k|        if (data.size() != length)
  ------------------
  |  Branch (927:13): [True: 95, False: 596k]
  ------------------
  928|     95|        {
  929|     95|            ec = ubjson_errc::unexpected_eof;
  930|     95|            more_ = false;
  931|     95|            return;
  932|     95|        }
  933|       |
  934|   596k|        auto result = unicode_traits::validate(data.data(), data.size());
  935|   596k|        if (result.ec != unicode_traits::unicode_errc())
  ------------------
  |  Branch (935:13): [True: 17, False: 596k]
  ------------------
  936|     17|        {
  937|     17|            ec = ubjson_errc::invalid_utf8_text_string;
  938|     17|            more_ = false;
  939|     17|            return;
  940|     17|        }
  941|   596k|        visitor.key(jsoncons::string_view(reinterpret_cast<const char*>(data.data()),data.size()), 
  942|   596k|            *this, ec);
  943|   596k|        more_ = !cursor_mode_;
  944|   596k|    }
_ZN8jsoncons6ubjson19basic_ubjson_parserINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE10end_objectERNS_18basic_json_visitorIcEERNS3_10error_codeE:
  778|  80.1k|    {
  779|  80.1k|        --nesting_depth_;
  780|  80.1k|        visitor.end_object(*this, ec);
  781|  80.1k|        more_ = !cursor_mode_;
  782|  80.1k|        if (level() == mark_level_)
  ------------------
  |  Branch (782:13): [True: 0, False: 80.1k]
  ------------------
  783|      0|        {
  784|      0|            more_ = false;
  785|      0|        }
  786|  80.1k|        state_stack_.pop_back();
  787|  80.1k|    }

_ZN8jsoncons6ubjson19basic_ubjson_readerINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEEC2IRNS3_19basic_istringstreamIcNS3_11char_traitsIcEES7_EEEEOT_RNS_18basic_json_visitorIcEERKNS0_21ubjson_decode_optionsERKS7_:
   48|    429|       : parser_(std::forward<Sourceable>(source), options, alloc),
   49|    429|         visitor_(visitor)
   50|    429|    {
   51|    429|    }
_ZN8jsoncons6ubjson19basic_ubjson_readerINS_13stream_sourceIhNSt3__19allocatorIhEEEENS4_IcEEE4readERNS3_10error_codeE:
   64|    429|    {
   65|    429|        parser_.reset();
   66|    429|        parser_.parse(visitor_, ec);
   67|    429|        if (JSONCONS_UNLIKELY(ec))
  ------------------
  |  |   78|    429|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 417, False: 12]
  |  |  ------------------
  ------------------
   68|    417|        {
   69|    417|            return;
   70|    417|        }
   71|    429|    }

