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

_ZNK8jsoncons6detail4spanIKhLm18446744073709551615EE4sizeEv:
  116|  2.42M|        {
  117|  2.42M|            return size_;
  118|  2.42M|        }
_ZN8jsoncons6detail4spanIKhLm18446744073709551615EEC2Ev:
   58|   606k|        {
   59|   606k|        }
_ZN8jsoncons6detail4spanIKhLm18446744073709551615EEC2EPS2_m:
   61|   202k|            : data_(data), size_(size)
   62|   202k|        {
   63|   202k|        }
_ZNK8jsoncons6detail4spanIKhLm18446744073709551615EE4dataEv:
  111|  1.61M|        {
  112|  1.61M|            return data_;
  113|  1.61M|        }

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

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

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

_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEED2Ev:
  193|    330|    {
  194|    330|        if (chunk_)
  ------------------
  |  Branch (194:13): [True: 330, False: 0]
  ------------------
  195|    330|        {
  196|    330|            std::allocator_traits<char_allocator_type>::deallocate(alloc_, chunk_, chunk_size_);
  197|    330|        }
  198|    330|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEEC2ERNS1_13basic_istreamIcNS1_11char_traitsIcEEEERKS3_:
  176|    330|        : alloc_(alloc), stream_ptr_(std::addressof(is)), sbuf_(is.rdbuf()),
  177|    330|          chunk_size_(default_max_chunk_size)
  178|    330|    {
  179|    330|        chunk_ = std::allocator_traits<char_allocator_type>::allocate(alloc_, chunk_size_);
  180|    330|        data_end_ = chunk_;
  181|    330|    }
_ZN8jsoncons18basic_null_istreamIcEC1Ev:
   57|    330|      : std::basic_istream<CharT>(&nb_)
   58|    330|    {
   59|    330|    }
_ZN8jsoncons18basic_null_istreamIcE11null_bufferC2Ev:
   43|    330|        null_buffer() = default;
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE8is_errorEv:
  276|  5.59M|    {
  277|  5.59M|        return stream_ptr_->bad();  
  278|  5.59M|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4readEPhm:
  377|  14.0M|    {
  378|  14.0M|        std::size_t len = 0;
  379|  14.0M|        if (remaining_ > 0)
  ------------------
  |  Branch (379:13): [True: 14.0M, False: 857]
  ------------------
  380|  14.0M|        {
  381|  14.0M|            len = (std::min)(remaining_, length);
  382|  14.0M|            std::memcpy(p, data_end_, len*sizeof(value_type));
  383|  14.0M|            data_end_ += len;
  384|  14.0M|            remaining_ -= len;
  385|  14.0M|            position_ += len;
  386|  14.0M|        }
  387|  14.0M|        if (length - len == 0)
  ------------------
  |  Branch (387:13): [True: 14.0M, False: 2.16k]
  ------------------
  388|  14.0M|        {
  389|  14.0M|            return len;
  390|  14.0M|        }
  391|  2.16k|        else if (length - len < chunk_size_)
  ------------------
  |  Branch (391:18): [True: 2.16k, False: 0]
  ------------------
  392|  2.16k|        {
  393|  2.16k|            data_end_ = chunk_;
  394|  2.16k|            remaining_ = fill_buffer(chunk_, chunk_size_);
  395|  2.16k|            if (remaining_ > 0)
  ------------------
  |  Branch (395:17): [True: 2.03k, False: 123]
  ------------------
  396|  2.03k|            {
  397|  2.03k|                std::size_t len2 = (std::min)(remaining_, length-len);
  398|  2.03k|                std::memcpy(p+len, data_end_, len2*sizeof(value_type));
  399|  2.03k|                data_end_ += len2;
  400|  2.03k|                remaining_ -= len2;
  401|  2.03k|                position_ += len2;
  402|  2.03k|                len += len2;
  403|  2.03k|            }
  404|  2.16k|            return len;
  405|  2.16k|        }
  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|  14.0M|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE11fill_bufferEPhm:
  442|  2.96k|    {
  443|  2.96k|        if (stream_ptr_->eof())
  ------------------
  |  Branch (443:13): [True: 155, False: 2.81k]
  ------------------
  444|    155|        {
  445|    155|            return 0;
  446|    155|        }
  447|       |
  448|  2.81k|        JSONCONS_TRY
  ------------------
  |  |   37|  2.81k|    #define JSONCONS_TRY try
  ------------------
  449|  2.81k|        {
  450|  2.81k|            std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(chunk), chunk_size);
  451|  2.81k|            std::size_t length = static_cast<std::size_t>(count);
  452|       |
  453|  2.81k|            if (length < chunk_size)
  ------------------
  |  Branch (453:17): [True: 310, False: 2.50k]
  ------------------
  454|    310|            {
  455|    310|                stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  456|    310|            }
  457|  2.81k|            return length;
  458|  2.81k|        }
  459|  2.81k|        JSONCONS_CATCH(const std::exception&)     
  460|  2.81k|        {
  461|      0|            stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  462|      0|            return 0;
  463|      0|        }
  464|  2.81k|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE9read_spanIRNS1_12basic_stringIcNS1_11char_traitsIcEENS2_IcEEEEEENS_6detail4spanIKhLm18446744073709551615EEEmOT_:
  352|   809k|    {
  353|   809k|        if (JSONCONS_UNLIKELY(length == 0))
  ------------------
  |  |   78|   809k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 606k, False: 202k]
  |  |  ------------------
  ------------------
  354|   606k|        {
  355|   606k|            return span<const value_type>{};
  356|   606k|        }
  357|   202k|        if (remaining_ == 0 && length <= chunk_size_)
  ------------------
  |  Branch (357:13): [True: 76, False: 202k]
  |  Branch (357:32): [True: 30, False: 46]
  ------------------
  358|     30|        {
  359|     30|            remaining_ = fill_buffer(chunk_, chunk_size_);
  360|     30|            data_end_ = chunk_;
  361|     30|        }
  362|   202k|        if (length > remaining_)
  ------------------
  |  Branch (362:13): [True: 537, False: 202k]
  ------------------
  363|    537|        {
  364|    537|            buffer.clear();
  365|    537|            source_reader<stream_source_type>::read(*this, std::forward<Buffer>(buffer), length);
  366|    537|            return span<const value_type>(reinterpret_cast<const value_type*>(buffer.data()), buffer.size());
  367|    537|        }
  368|       |
  369|   202k|        const value_type* data = data_end_;
  370|   202k|        data_end_ += length;
  371|   202k|        remaining_ -= length;
  372|   202k|        position_ += length;
  373|   202k|        return span<const value_type>(data, length);
  374|   202k|    }
_ZN8jsoncons13source_readerINS_13stream_sourceIhNSt3__19allocatorIhEEEEE4readINS2_12basic_stringIcNS2_11char_traitsIcEENS3_IcEEEEEENS2_9enable_ifIXaaL_ZNS2_17integral_constantIbLb1EE5valueEEsr10ext_traits7is_byteINT_10value_typeEEE5valueEmE4typeERS5_RSG_m:
  746|    537|    {
  747|    537|        std::size_t unread = length;
  748|       |
  749|  2.22k|        while (unread > 0 && !source.eof())
  ------------------
  |  Branch (749:16): [True: 1.79k, False: 428]
  |  Branch (749:30): [True: 1.68k, False: 109]
  ------------------
  750|  1.68k|        {
  751|  1.68k|            if (source.remaining() == 0 && unread >= source.chunk_size())
  ------------------
  |  Branch (751:17): [True: 280, False: 1.40k]
  |  Branch (751:44): [True: 276, False: 4]
  ------------------
  752|    276|            {
  753|    276|                std::size_t n = source.chunk_size();
  754|    276|                std::size_t offset = buffer.size();
  755|    276|                buffer.resize(offset+n);
  756|    276|                std::size_t actual = source.read_buffer(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
  757|    276|                if (JSONCONS_UNLIKELY(actual != n))
  ------------------
  |  |   78|    276|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 38, False: 238]
  |  |  ------------------
  ------------------
  758|     38|                {
  759|     38|                    buffer.resize(offset+actual);
  760|     38|                }
  761|    276|                unread -= actual;
  762|    276|            }
  763|  1.40k|            else
  764|  1.40k|            {
  765|  1.40k|                std::size_t n = (std::min)(source.chunk_size(), unread);
  766|  1.40k|                std::size_t offset = buffer.size();
  767|  1.40k|                buffer.resize(offset+n);
  768|  1.40k|                std::size_t actual = source.read(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
  769|  1.40k|                if (JSONCONS_UNLIKELY(actual != n))
  ------------------
  |  |   78|  1.40k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 62, False: 1.34k]
  |  |  ------------------
  ------------------
  770|     62|                {
  771|     62|                    buffer.resize(offset + actual);
  772|     62|                }
  773|  1.40k|                unread -= actual;
  774|  1.40k|            }
  775|  1.68k|        }
  776|    537|        return length - unread;
  777|    537|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE3eofEv:
  271|  1.79k|    {
  272|  1.79k|        return remaining_ == 0 && stream_ptr_->eof();
  ------------------
  |  Branch (272:16): [True: 389, False: 1.40k]
  |  Branch (272:35): [True: 109, False: 280]
  ------------------
  273|  1.79k|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE9remainingEv:
  346|  1.68k|    {
  347|  1.68k|        return remaining_;
  348|  1.68k|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE10chunk_sizeEv:
  261|  1.96k|    {
  262|  1.96k|        return chunk_size_;
  263|  1.96k|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE11read_bufferEPhm:
  435|    276|    {
  436|    276|        auto len = fill_buffer(chunk, chunk_size);
  437|    276|        position_ += len;
  438|    276|        return len;
  439|    276|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4peekEv:
  312|  9.50M|    {
  313|  9.50M|        if (remaining_ == 0)
  ------------------
  |  Branch (313:13): [True: 497, False: 9.50M]
  ------------------
  314|    497|        {
  315|    497|            data_end_ = chunk_;
  316|    497|            remaining_ = fill_buffer(chunk_, chunk_size_);
  317|    497|        }
  318|  9.50M|        if (remaining_ > 0)
  ------------------
  |  Branch (318:13): [True: 9.50M, False: 50]
  ------------------
  319|  9.50M|        {
  320|  9.50M|            value_type c = *data_end_;
  321|  9.50M|            return char_result<value_type>{c, false};
  322|  9.50M|        }
  323|     50|        else
  324|     50|        {
  325|     50|            return char_result<value_type>{0, true};
  326|     50|        }
  327|  9.50M|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE6ignoreEm:
  286|  2.08M|    {
  287|  2.08M|        std::size_t len = 0;
  288|  2.08M|        if (remaining_ > 0)
  ------------------
  |  Branch (288:13): [True: 2.08M, False: 0]
  ------------------
  289|  2.08M|        {
  290|  2.08M|            len = (std::min)(remaining_, length);
  291|  2.08M|            position_ += len;
  292|  2.08M|            data_end_ += len;
  293|  2.08M|            remaining_ -= len;
  294|  2.08M|        }
  295|  2.08M|        while (len < length)
  ------------------
  |  Branch (295:16): [True: 0, False: 2.08M]
  ------------------
  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|  2.08M|    }

_ZN8jsoncons6binary13native_to_bigIhNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  11.0M|    {
  128|  11.0M|        T val2 = byte_swap(val);
  129|  11.0M|        uint8_t buf[sizeof(T)];
  130|  11.0M|        std::memcpy(buf, &val2, sizeof(T));
  131|  11.0M|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 11.0M, False: 11.0M]
  ------------------
  132|  11.0M|        {
  133|  11.0M|            *d_first++ = item;
  134|  11.0M|        }
  135|  11.0M|    }
_ZN8jsoncons6binary9byte_swapIhEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  11.0M|    {
   22|  11.0M|        return val;
   23|  11.0M|    }
_ZN8jsoncons6binary13native_to_bigItNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  9.43k|    {
  128|  9.43k|        T val2 = byte_swap(val);
  129|  9.43k|        uint8_t buf[sizeof(T)];
  130|  9.43k|        std::memcpy(buf, &val2, sizeof(T));
  131|  9.43k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 18.8k, False: 9.43k]
  ------------------
  132|  18.8k|        {
  133|  18.8k|            *d_first++ = item;
  134|  18.8k|        }
  135|  9.43k|    }
_ZN8jsoncons6binary9byte_swapItEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  9.43k|    {
   29|  9.43k|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  9.43k|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  9.43k|#      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|  9.43k|    }
_ZN8jsoncons6binary13native_to_bigIjNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|    191|    {
  128|    191|        T val2 = byte_swap(val);
  129|    191|        uint8_t buf[sizeof(T)];
  130|    191|        std::memcpy(buf, &val2, sizeof(T));
  131|    191|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 764, False: 191]
  ------------------
  132|    764|        {
  133|    764|            *d_first++ = item;
  134|    764|        }
  135|    191|    }
_ZN8jsoncons6binary9byte_swapIjEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|  43.5k|    {
   40|  43.5k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|  43.5k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|  43.5k|#  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|  43.5k|    }
_ZN8jsoncons6binary9byte_swapImEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  62.1k|    {
   52|  62.1k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  62.1k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  62.1k|#  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|  62.1k|    }
_ZN8jsoncons6binary13native_to_bigIsNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   785k|    {
  128|   785k|        T val2 = byte_swap(val);
  129|   785k|        uint8_t buf[sizeof(T)];
  130|   785k|        std::memcpy(buf, &val2, sizeof(T));
  131|   785k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 1.57M, False: 785k]
  ------------------
  132|  1.57M|        {
  133|  1.57M|            *d_first++ = item;
  134|  1.57M|        }
  135|   785k|    }
_ZN8jsoncons6binary9byte_swapIsEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  1.94M|    {
   29|  1.94M|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  1.94M|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  1.94M|#      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.94M|    }
_ZN8jsoncons6binary13native_to_bigIiNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  85.8k|    {
  128|  85.8k|        T val2 = byte_swap(val);
  129|  85.8k|        uint8_t buf[sizeof(T)];
  130|  85.8k|        std::memcpy(buf, &val2, sizeof(T));
  131|  85.8k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 343k, False: 85.8k]
  ------------------
  132|   343k|        {
  133|   343k|            *d_first++ = item;
  134|   343k|        }
  135|  85.8k|    }
_ZN8jsoncons6binary9byte_swapIiEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|   175k|    {
   40|   175k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|   175k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|   175k|#  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|   175k|    }
_ZN8jsoncons6binary13native_to_bigIlNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  28.1k|    {
  128|  28.1k|        T val2 = byte_swap(val);
  129|  28.1k|        uint8_t buf[sizeof(T)];
  130|  28.1k|        std::memcpy(buf, &val2, sizeof(T));
  131|  28.1k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 225k, False: 28.1k]
  ------------------
  132|   225k|        {
  133|   225k|            *d_first++ = item;
  134|   225k|        }
  135|  28.1k|    }
_ZN8jsoncons6binary9byte_swapIlEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  57.3k|    {
   52|  57.3k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  57.3k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  57.3k|#  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|  57.3k|    }
_ZN8jsoncons6binary13native_to_bigIaNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   102k|    {
  128|   102k|        T val2 = byte_swap(val);
  129|   102k|        uint8_t buf[sizeof(T)];
  130|   102k|        std::memcpy(buf, &val2, sizeof(T));
  131|   102k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 102k, False: 102k]
  ------------------
  132|   102k|        {
  133|   102k|            *d_first++ = item;
  134|   102k|        }
  135|   102k|    }
_ZN8jsoncons6binary9byte_swapIaEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  1.25M|    {
   22|  1.25M|        return val;
   23|  1.25M|    }
_ZN8jsoncons6binary13native_to_bigIfNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  19.7k|    {
  128|  19.7k|        T val2 = byte_swap(val);
  129|  19.7k|        uint8_t buf[sizeof(T)];
  130|  19.7k|        std::memcpy(buf, &val2, sizeof(T));
  131|  19.7k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 79.0k, False: 19.7k]
  ------------------
  132|  79.0k|        {
  133|  79.0k|            *d_first++ = item;
  134|  79.0k|        }
  135|  19.7k|    }
_ZN8jsoncons6binary9byte_swapIfEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   64|  43.3k|    {
   65|  43.3k|        uint32_t x;
   66|  43.3k|        std::memcpy(&x,&val,sizeof(uint32_t));
   67|  43.3k|        uint32_t y = byte_swap(x);
   68|  43.3k|        T val2;
   69|  43.3k|        std::memcpy(&val2,&y,sizeof(uint32_t));
   70|  43.3k|        return val2;
   71|  43.3k|    }
_ZN8jsoncons6binary13native_to_bigIdNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  32.9k|    {
  128|  32.9k|        T val2 = byte_swap(val);
  129|  32.9k|        uint8_t buf[sizeof(T)];
  130|  32.9k|        std::memcpy(buf, &val2, sizeof(T));
  131|  32.9k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 263k, False: 32.9k]
  ------------------
  132|   263k|        {
  133|   263k|            *d_first++ = item;
  134|   263k|        }
  135|  32.9k|    }
_ZN8jsoncons6binary9byte_swapIdEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   76|  62.1k|    {
   77|  62.1k|        uint64_t x;
   78|  62.1k|        std::memcpy(&x,&val,sizeof(uint64_t));
   79|  62.1k|        uint64_t y = byte_swap(x);
   80|  62.1k|        T val2;
   81|  62.1k|        std::memcpy(&val2,&y,sizeof(uint64_t));
   82|  62.1k|        return val2;
   83|  62.1k|    }
_ZN8jsoncons6binary13big_to_nativeIaNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  1.15M|    {
  183|  1.15M|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 1.15M]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  1.15M|        T val;
  188|  1.15M|        std::memcpy(&val,first,sizeof(T));
  189|  1.15M|        return byte_swap(val);
  190|  1.15M|    }
_ZN8jsoncons6binary13big_to_nativeIsNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  1.16M|    {
  183|  1.16M|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 1.16M]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  1.16M|        T val;
  188|  1.16M|        std::memcpy(&val,first,sizeof(T));
  189|  1.16M|        return byte_swap(val);
  190|  1.16M|    }
_ZN8jsoncons6binary13big_to_nativeIiNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  89.2k|    {
  183|  89.2k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 89.2k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  89.2k|        T val;
  188|  89.2k|        std::memcpy(&val,first,sizeof(T));
  189|  89.2k|        return byte_swap(val);
  190|  89.2k|    }
_ZN8jsoncons6binary13big_to_nativeIlNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  29.1k|    {
  183|  29.1k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 29.1k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  29.1k|        T val;
  188|  29.1k|        std::memcpy(&val,first,sizeof(T));
  189|  29.1k|        return byte_swap(val);
  190|  29.1k|    }
_ZN8jsoncons6binary13big_to_nativeIfNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  23.5k|    {
  183|  23.5k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 23.5k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  23.5k|        T val;
  188|  23.5k|        std::memcpy(&val,first,sizeof(T));
  189|  23.5k|        return byte_swap(val);
  190|  23.5k|    }
_ZN8jsoncons6binary13big_to_nativeIdNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  29.1k|    {
  183|  29.1k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 29.1k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  29.1k|        T val;
  188|  29.1k|        std::memcpy(&val,first,sizeof(T));
  189|  29.1k|        return byte_swap(val);
  190|  29.1k|    }

_ZN8jsoncons9is_base10IhEEbPKT_m:
  164|   174k|{
  165|   174k|    integer_chars_state state = integer_chars_state::initial;
  166|       |
  167|   174k|    const CharT* end = s + length; 
  168|   185k|    for (;s < end; ++s)
  ------------------
  |  Branch (168:11): [True: 183k, False: 1.55k]
  ------------------
  169|   183k|    {
  170|   183k|        switch(state)
  171|   183k|        {
  172|   174k|            case integer_chars_state::initial:
  ------------------
  |  Branch (172:13): [True: 174k, False: 9.39k]
  ------------------
  173|   174k|            {
  174|   174k|                switch(*s)
  175|   174k|                {
  176|  6.01k|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (176:21): [True: 24, False: 174k]
  |  Branch (176:30): [True: 1.57k, False: 172k]
  |  Branch (176:39): [True: 14, False: 174k]
  |  Branch (176:48): [True: 11, False: 174k]
  |  Branch (176:57): [True: 7, False: 174k]
  |  Branch (176:66): [True: 4, False: 174k]
  |  Branch (176:75): [True: 51, False: 174k]
  |  Branch (176:84): [True: 0, False: 174k]
  |  Branch (176:93): [True: 0, False: 174k]
  |  Branch (176:103): [True: 4.32k, False: 170k]
  ------------------
  177|  6.01k|                        state = integer_chars_state::decimal;
  178|  6.01k|                        break;
  179|  1.83k|                    case '-':
  ------------------
  |  Branch (179:21): [True: 1.83k, False: 172k]
  ------------------
  180|  1.83k|                        state = integer_chars_state::minus;
  181|  1.83k|                        break;
  182|   166k|                    default:
  ------------------
  |  Branch (182:21): [True: 166k, False: 7.84k]
  ------------------
  183|   166k|                        return false;
  184|   174k|                }
  185|  7.84k|                break;
  186|   174k|            }
  187|  7.84k|            case integer_chars_state::minus:
  ------------------
  |  Branch (187:13): [True: 1.83k, False: 181k]
  ------------------
  188|  1.83k|            {
  189|  1.83k|                switch(*s)
  190|  1.83k|                {
  191|  1.62k|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (191:21): [True: 218, False: 1.61k]
  |  Branch (191:30): [True: 42, False: 1.79k]
  |  Branch (191:39): [True: 75, False: 1.76k]
  |  Branch (191:48): [True: 0, False: 1.83k]
  |  Branch (191:57): [True: 0, False: 1.83k]
  |  Branch (191:66): [True: 12, False: 1.82k]
  |  Branch (191:75): [True: 8, False: 1.82k]
  |  Branch (191:84): [True: 90, False: 1.74k]
  |  Branch (191:93): [True: 540, False: 1.29k]
  |  Branch (191:103): [True: 639, False: 1.19k]
  ------------------
  192|  1.62k|                        state = integer_chars_state::decimal;
  193|  1.62k|                        break;
  194|    212|                    default:
  ------------------
  |  Branch (194:21): [True: 212, False: 1.62k]
  ------------------
  195|    212|                        return false;
  196|  1.83k|                }
  197|  1.62k|                break;
  198|  1.83k|            }
  199|  7.55k|            case integer_chars_state::decimal:
  ------------------
  |  Branch (199:13): [True: 7.55k, False: 176k]
  ------------------
  200|  7.55k|            {
  201|  7.55k|                switch(*s)
  202|  7.55k|                {
  203|  1.47k|                    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.45k, False: 6.10k]
  |  Branch (203:30): [True: 14, False: 7.54k]
  |  Branch (203:39): [True: 0, False: 7.55k]
  |  Branch (203:48): [True: 8, False: 7.54k]
  |  Branch (203:57): [True: 0, False: 7.55k]
  |  Branch (203:66): [True: 1, False: 7.55k]
  |  Branch (203:75): [True: 0, False: 7.55k]
  |  Branch (203:84): [True: 0, False: 7.55k]
  |  Branch (203:93): [True: 0, False: 7.55k]
  |  Branch (203:103): [True: 0, False: 7.55k]
  ------------------
  204|  1.47k|                        break;
  205|  6.07k|                    default:
  ------------------
  |  Branch (205:21): [True: 6.07k, False: 1.47k]
  ------------------
  206|  6.07k|                        return false;
  207|  7.55k|                }
  208|  1.47k|                break;
  209|  7.55k|            }
  210|  1.47k|            default:
  ------------------
  |  Branch (210:13): [True: 0, False: 183k]
  ------------------
  211|      0|                break;
  212|   183k|        }
  213|   183k|    }
  214|  1.55k|    return state == integer_chars_state::decimal ? true : false;
  ------------------
  |  Branch (214:12): [True: 1.55k, False: 0]
  ------------------
  215|   174k|}

_ZN8jsoncons14unicode_traits8validateIcEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14unicode_resultIS4_EEE4typeEPKS4_m:
 1147|  4.69M|    {
 1148|  4.69M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(data);
 1149|  4.69M|        const uint8_t* end = it + length;
 1150|       |
 1151|  4.69M|        unicode_errc  result{};
 1152|  10.0M|        while (it != end) 
  ------------------
  |  Branch (1152:16): [True: 5.38M, False: 4.69M]
  ------------------
 1153|  5.38M|        {
 1154|  5.38M|            if ((end - it) >= 8)
  ------------------
  |  Branch (1154:17): [True: 1.43M, False: 3.95M]
  ------------------
 1155|  1.43M|            {
 1156|  9.91M|                JSONCONS_REPEAT8({if (JSONCONS_LIKELY((*it & 0x80) == 0)) ++it; else goto non_ascii;})
  ------------------
  |  |  281|  2.86M|#define JSONCONS_REPEAT8(x)  { x x x x x x x x }
  |  |  ------------------
  |  |  |  Branch (281:32): [True: 1.42M, False: 3.29k]
  |  |  |  Branch (281:34): [True: 1.42M, False: 4.38k]
  |  |  |  Branch (281:36): [True: 1.42M, False: 1.53k]
  |  |  |  Branch (281:38): [True: 1.41M, False: 9.30k]
  |  |  |  Branch (281:40): [True: 1.41M, False: 1.52k]
  |  |  |  Branch (281:42): [True: 1.40M, False: 2.37k]
  |  |  |  Branch (281:44): [True: 1.40M, False: 1.40k]
  |  |  |  Branch (281:46): [True: 1.40M, False: 984]
  |  |  ------------------
  ------------------
 1157|  1.40M|                continue;
 1158|  9.91M|            }
 1159|  3.98M|    non_ascii:
 1160|  3.98M|            const std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[*it]) + 1;
 1161|  3.98M|            if (len > (std::size_t)(end - it))
  ------------------
  |  Branch (1161:17): [True: 2, False: 3.98M]
  ------------------
 1162|      2|            {
 1163|      2|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it), unicode_errc::source_exhausted};
 1164|      2|            }
 1165|  3.98M|            if ((result=is_legal_utf8(it, len)) != unicode_errc())
  ------------------
  |  Branch (1165:17): [True: 10, False: 3.98M]
  ------------------
 1166|     10|            {
 1167|     10|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1168|     10|            }
 1169|  3.98M|            it += len;
 1170|  3.98M|        }
 1171|  4.69M|        return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1172|  4.69M|    }
_ZN8jsoncons14unicode_traits13is_legal_utf8EPKhm:
  305|  7.95M|    {
  306|  7.95M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(bytes);
  307|  7.95M|        const uint8_t* end = it+length;
  308|       |
  309|  7.95M|        uint8_t byte;
  310|  7.95M|        switch (length) {
  311|     13|        default:
  ------------------
  |  Branch (311:9): [True: 13, False: 7.95M]
  ------------------
  312|     13|            return unicode_errc::over_long_utf8_sequence;
  313|  36.5k|        case 4:
  ------------------
  |  Branch (313:9): [True: 36.5k, False: 7.91M]
  ------------------
  314|  36.5k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (314:17): [True: 2, False: 36.5k]
  ------------------
  315|      2|                return unicode_errc::bad_continuation_byte;
  316|  36.5k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  36.5k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  317|  45.5k|        case 3:
  ------------------
  |  Branch (317:9): [True: 8.96k, False: 7.94M]
  ------------------
  318|  45.5k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (318:17): [True: 1, False: 45.5k]
  ------------------
  319|      1|                return unicode_errc::bad_continuation_byte;
  320|  45.5k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  45.5k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  321|  48.9k|        case 2:
  ------------------
  |  Branch (321:9): [True: 3.46k, False: 7.94M]
  ------------------
  322|  48.9k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (322:17): [True: 3, False: 48.9k]
  ------------------
  323|      3|                return unicode_errc::bad_continuation_byte;
  324|       |
  325|  48.9k|            switch (*it) 
  326|  48.9k|            {
  327|       |                // no fall-through in this inner switch
  328|     28|                case 0xE0: if (byte < 0xA0) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (328:17): [True: 28, False: 48.9k]
  |  Branch (328:32): [True: 0, False: 28]
  ------------------
  329|    344|                case 0xED: if (byte > 0x9F) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (329:17): [True: 344, False: 48.6k]
  |  Branch (329:32): [True: 0, False: 344]
  ------------------
  330|  6.67k|                case 0xF0: if (byte < 0x90) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (330:17): [True: 6.67k, False: 42.2k]
  |  Branch (330:32): [True: 0, False: 6.67k]
  ------------------
  331|  29.6k|                case 0xF4: if (byte > 0x8F) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (331:17): [True: 29.6k, False: 19.2k]
  |  Branch (331:32): [True: 0, False: 29.6k]
  ------------------
  332|  29.6k|                default:   if (byte < 0x80) return unicode_errc::source_illegal;
  ------------------
  |  Branch (332:17): [True: 12.2k, False: 36.7k]
  |  Branch (332:32): [True: 0, False: 12.2k]
  ------------------
  333|  48.9k|            }
  334|       |
  335|  48.9k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  48.9k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  336|  7.95M|        case 1:
  ------------------
  |  Branch (336:9): [True: 7.90M, False: 48.9k]
  ------------------
  337|  7.95M|            if (*it >= 0x80 && *it < 0xC2)
  ------------------
  |  Branch (337:17): [True: 48.9k, False: 7.90M]
  |  Branch (337:32): [True: 8, False: 48.9k]
  ------------------
  338|      8|                return unicode_errc::source_illegal;
  339|  7.95M|            break;
  340|  7.95M|        }
  341|  7.95M|        if (*it > 0xF4) 
  ------------------
  |  Branch (341:13): [True: 1, False: 7.95M]
  ------------------
  342|      1|            return unicode_errc::source_illegal;
  343|       |
  344|  7.95M|        return unicode_errc();
  345|  7.95M|    }
_ZN8jsoncons14unicode_traits8validateIhEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14unicode_resultIS4_EEE4typeEPKS4_m:
 1147|  4.51M|    {
 1148|  4.51M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(data);
 1149|  4.51M|        const uint8_t* end = it + length;
 1150|       |
 1151|  4.51M|        unicode_errc  result{};
 1152|  9.66M|        while (it != end) 
  ------------------
  |  Branch (1152:16): [True: 5.15M, False: 4.51M]
  ------------------
 1153|  5.15M|        {
 1154|  5.15M|            if ((end - it) >= 8)
  ------------------
  |  Branch (1154:17): [True: 1.20M, False: 3.94M]
  ------------------
 1155|  1.20M|            {
 1156|  8.32M|                JSONCONS_REPEAT8({if (JSONCONS_LIKELY((*it & 0x80) == 0)) ++it; else goto non_ascii;})
  ------------------
  |  |  281|  2.40M|#define JSONCONS_REPEAT8(x)  { x x x x x x x x }
  |  |  ------------------
  |  |  |  Branch (281:32): [True: 1.20M, False: 3.11k]
  |  |  |  Branch (281:34): [True: 1.19M, False: 4.25k]
  |  |  |  Branch (281:36): [True: 1.19M, False: 1.52k]
  |  |  |  Branch (281:38): [True: 1.18M, False: 8.98k]
  |  |  |  Branch (281:40): [True: 1.18M, False: 1.48k]
  |  |  |  Branch (281:42): [True: 1.18M, False: 2.29k]
  |  |  |  Branch (281:44): [True: 1.18M, False: 1.34k]
  |  |  |  Branch (281:46): [True: 1.18M, False: 974]
  |  |  ------------------
  ------------------
 1157|  1.18M|                continue;
 1158|  8.32M|            }
 1159|  3.97M|    non_ascii:
 1160|  3.97M|            const std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[*it]) + 1;
 1161|  3.97M|            if (len > (std::size_t)(end - it))
  ------------------
  |  Branch (1161:17): [True: 2, False: 3.97M]
  ------------------
 1162|      2|            {
 1163|      2|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it), unicode_errc::source_exhausted};
 1164|      2|            }
 1165|  3.97M|            if ((result=is_legal_utf8(it, len)) != unicode_errc())
  ------------------
  |  Branch (1165:17): [True: 18, False: 3.97M]
  ------------------
 1166|     18|            {
 1167|     18|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1168|     18|            }
 1169|  3.97M|            it += len;
 1170|  3.97M|        }
 1171|  4.51M|        return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1172|  4.51M|    }

_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEEC2EOS8_RKS9_:
   99|    330|       : basic_ubjson_encoder(std::forward<Sink>(sink), ubjson_encode_options(), alloc)
  100|    330|    {
  101|    330|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEEC2EOS8_RKNS0_21ubjson_encode_optionsERKS9_:
  106|    330|       : sink_(std::forward<Sink>(sink)),
  107|    330|         max_nesting_depth_(options.max_nesting_depth()),
  108|    330|         alloc_(alloc)
  109|    330|    {
  110|    330|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE17visit_begin_arrayEmNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  215|   107k|    {
  216|   107k|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|   107k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 107k]
  |  |  ------------------
  ------------------
  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|   107k|        stack_.emplace_back(ubjson_container_type::array, length);
  222|   107k|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_array_marker);
  223|   107k|        sink_.push_back(jsoncons::ubjson::ubjson_type::count_marker);
  224|   107k|        put_length(length);
  225|       |
  226|   107k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   107k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  227|   107k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_itemC2ENS0_21ubjson_container_typeEm:
   57|  2.02M|           : type_(type), length_(length)
   58|  2.02M|        {
   59|  2.02M|        }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10put_lengthEm:
  318|  4.85M|    {
  319|  4.85M|        if (length <= (std::numeric_limits<uint8_t>::max)())
  ------------------
  |  Branch (319:13): [True: 4.84M, False: 9.62k]
  ------------------
  320|  4.84M|        {
  321|  4.84M|            sink_.push_back(ubjson_type::uint8_type);
  322|  4.84M|            binary::native_to_big(static_cast<uint8_t>(length), std::back_inserter(sink_));
  323|  4.84M|        }
  324|  9.62k|        else if (length <= (std::size_t)(std::numeric_limits<int16_t>::max)())
  ------------------
  |  Branch (324:18): [True: 9.43k, False: 191]
  ------------------
  325|  9.43k|        {
  326|  9.43k|            sink_.push_back(ubjson_type::int16_type);
  327|  9.43k|            binary::native_to_big(static_cast<uint16_t>(length), std::back_inserter(sink_));
  328|  9.43k|        }
  329|    191|        else if (length <= (std::size_t)(std::numeric_limits<int32_t>::max)())
  ------------------
  |  Branch (329:18): [True: 191, False: 0]
  ------------------
  330|    191|        {
  331|    191|            sink_.push_back(ubjson_type::int32_type);
  332|    191|            binary::native_to_big(static_cast<uint32_t>(length),std::back_inserter(sink_));
  333|    191|        }
  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|  4.85M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE15visit_end_arrayERKNS_11ser_contextERNS3_10error_codeE:
  230|  1.94M|    {
  231|  1.94M|        JSONCONS_ASSERT(!stack_.empty());
  ------------------
  |  |   49|  1.94M|#define JSONCONS_ASSERT(x) if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (49:32): [True: 0, False: 1.94M]
  |  |  ------------------
  |  |   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|  1.94M|        --nesting_depth_;
  233|       |
  234|  1.94M|        if (stack_.back().is_indefinite_length())
  ------------------
  |  Branch (234:13): [True: 1.84M, False: 95.5k]
  ------------------
  235|  1.84M|        {
  236|  1.84M|            sink_.push_back(jsoncons::ubjson::ubjson_type::end_array_marker);
  237|  1.84M|        }
  238|  95.5k|        else
  239|  95.5k|        {
  240|  95.5k|            if (stack_.back().count() < stack_.back().length())
  ------------------
  |  Branch (240:17): [True: 0, False: 95.5k]
  ------------------
  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|  95.5k|            if (stack_.back().count() > stack_.back().length())
  ------------------
  |  Branch (245:17): [True: 0, False: 95.5k]
  ------------------
  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|  95.5k|        }
  251|  1.94M|        stack_.pop_back();
  252|  1.94M|        end_value();
  253|  1.94M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  1.94M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  254|  1.94M|    }
_ZNK8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_item20is_indefinite_lengthEv:
   79|  1.99M|        {
   80|  1.99M|            return type_ == ubjson_container_type::indefinite_length_array || type_ == ubjson_container_type::indefinite_length_object;
  ------------------
  |  Branch (80:20): [True: 1.84M, False: 149k]
  |  Branch (80:79): [True: 1.87k, False: 147k]
  ------------------
   81|  1.99M|        }
_ZNK8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_item5countEv:
   69|   294k|        {
   70|   294k|            return count_;
   71|   294k|        }
_ZNK8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_item6lengthEv:
   64|   294k|        {
   65|   294k|            return length_;
   66|   294k|        }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE9end_valueEv:
  496|  13.5M|    {
  497|  13.5M|        if (!stack_.empty())
  ------------------
  |  Branch (497:13): [True: 13.5M, False: 13]
  ------------------
  498|  13.5M|        {
  499|  13.5M|            ++stack_.back().count_;
  500|  13.5M|        }
  501|  13.5M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE12visit_uint64EmNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  461|   597k|    {
  462|   597k|        if (val <= (std::numeric_limits<uint8_t>::max)())
  ------------------
  |  Branch (462:13): [True: 597k, False: 0]
  ------------------
  463|   597k|        {
  464|   597k|            sink_.push_back(jsoncons::ubjson::ubjson_type::uint8_type);
  465|   597k|            binary::native_to_big(static_cast<uint8_t>(val),std::back_inserter(sink_));
  466|   597k|        }
  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|   597k|        end_value();
  483|   597k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   597k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  484|   597k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE11visit_int64ElNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  394|  1.89M|    {
  395|  1.89M|        if (val >= 0)
  ------------------
  |  Branch (395:13): [True: 1.50M, False: 396k]
  ------------------
  396|  1.50M|        {
  397|  1.50M|            if (val <= (std::numeric_limits<uint8_t>::max)())
  ------------------
  |  Branch (397:17): [True: 895k, False: 606k]
  ------------------
  398|   895k|            {
  399|       |                // uint 8 stores a 8-bit unsigned integer
  400|   895k|                sink_.push_back(jsoncons::ubjson::ubjson_type::uint8_type);
  401|   895k|                binary::native_to_big(static_cast<uint8_t>(val),std::back_inserter(sink_));
  402|   895k|            }
  403|   606k|            else if (val <= (std::numeric_limits<int16_t>::max)())
  ------------------
  |  Branch (403:22): [True: 571k, False: 34.3k]
  ------------------
  404|   571k|            {
  405|       |                // uint 16 stores a 16-bit big-endian unsigned integer
  406|   571k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int16_type);
  407|   571k|                binary::native_to_big(static_cast<int16_t>(val),std::back_inserter(sink_));
  408|   571k|            }
  409|  34.3k|            else if (val <= (std::numeric_limits<int32_t>::max)())
  ------------------
  |  Branch (409:22): [True: 22.5k, False: 11.7k]
  ------------------
  410|  22.5k|            {
  411|       |                // uint 32 stores a 32-bit big-endian unsigned integer
  412|  22.5k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int32_type);
  413|  22.5k|                binary::native_to_big(static_cast<int32_t>(val),std::back_inserter(sink_));
  414|  22.5k|            }
  415|  11.7k|            else if (val <= (std::numeric_limits<int64_t>::max)())
  ------------------
  |  Branch (415:22): [True: 11.7k, False: 0]
  ------------------
  416|  11.7k|            {
  417|       |                // int 64 stores a 64-bit big-endian signed integer
  418|  11.7k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int64_type);
  419|  11.7k|                binary::native_to_big(val,std::back_inserter(sink_));
  420|  11.7k|            }
  421|      0|            else
  422|      0|            {
  423|       |                // big integer
  424|      0|            }
  425|  1.50M|        }
  426|   396k|        else
  427|   396k|        {
  428|   396k|            if (val >= (std::numeric_limits<int8_t>::lowest)())
  ------------------
  |  Branch (428:17): [True: 102k, False: 293k]
  ------------------
  429|   102k|            {
  430|       |                // int 8 stores a 8-bit signed integer
  431|   102k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int8_type);
  432|   102k|                binary::native_to_big(static_cast<int8_t>(val),std::back_inserter(sink_));
  433|   102k|            }
  434|   293k|            else if (val >= (std::numeric_limits<int16_t>::lowest)())
  ------------------
  |  Branch (434:22): [True: 213k, False: 79.6k]
  ------------------
  435|   213k|            {
  436|       |                // int 16 stores a 16-bit big-endian signed integer
  437|   213k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int16_type);
  438|   213k|                binary::native_to_big(static_cast<int16_t>(val),std::back_inserter(sink_));
  439|   213k|            }
  440|  79.6k|            else if (val >= (std::numeric_limits<int32_t>::lowest)())
  ------------------
  |  Branch (440:22): [True: 63.2k, False: 16.3k]
  ------------------
  441|  63.2k|            {
  442|       |                // int 32 stores a 32-bit big-endian signed integer
  443|  63.2k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int32_type);
  444|  63.2k|                binary::native_to_big(static_cast<int32_t>(val),std::back_inserter(sink_));
  445|  63.2k|            }
  446|  16.3k|            else if (val >= (std::numeric_limits<int64_t>::lowest)())
  ------------------
  |  Branch (446:22): [True: 16.3k, False: 0]
  ------------------
  447|  16.3k|            {
  448|       |                // int 64 stores a 64-bit big-endian signed integer
  449|  16.3k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int64_type);
  450|  16.3k|                binary::native_to_big(val,std::back_inserter(sink_));
  451|  16.3k|            }
  452|   396k|        }
  453|  1.89M|        end_value();
  454|  1.89M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  1.89M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  455|  1.89M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE12visit_doubleEdNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  371|  52.7k|    {
  372|  52.7k|        float valf = (float)val;
  373|  52.7k|        if ((double)valf == val)
  ------------------
  |  Branch (373:13): [True: 19.7k, False: 32.9k]
  ------------------
  374|  19.7k|        {
  375|       |            // float 32
  376|  19.7k|            sink_.push_back(static_cast<uint8_t>(jsoncons::ubjson::ubjson_type::float32_type));
  377|  19.7k|            binary::native_to_big(valf,std::back_inserter(sink_));
  378|  19.7k|        }
  379|  32.9k|        else
  380|  32.9k|        {
  381|       |            // float 64
  382|  32.9k|            sink_.push_back(static_cast<uint8_t>(jsoncons::ubjson::ubjson_type::float64_type));
  383|  32.9k|            binary::native_to_big(val,std::back_inserter(sink_));
  384|  32.9k|        }
  385|       |
  386|       |        // write double
  387|       |
  388|  52.7k|        end_value();
  389|  52.7k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  52.7k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  390|  52.7k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE11visit_flushEv:
  142|     13|    {
  143|     13|        sink_.flush();
  144|     13|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE18visit_begin_objectENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  147|  2.87k|    {
  148|  2.87k|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|  2.87k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 2.87k]
  |  |  ------------------
  ------------------
  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.87k|        stack_.emplace_back(ubjson_container_type::indefinite_length_object);
  154|  2.87k|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_object_marker);
  155|       |
  156|  2.87k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  2.87k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  157|  2.87k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE18visit_begin_objectEmNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  160|  53.2k|    {
  161|  53.2k|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|  53.2k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 53.2k]
  |  |  ------------------
  ------------------
  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|  53.2k|        stack_.emplace_back(ubjson_container_type::object, length);
  167|  53.2k|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_object_marker);
  168|  53.2k|        sink_.push_back(jsoncons::ubjson::ubjson_type::count_marker);
  169|  53.2k|        put_length(length);
  170|       |
  171|  53.2k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  53.2k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  172|  53.2k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE16visit_end_objectERKNS_11ser_contextERNS3_10error_codeE:
  175|  53.7k|    {
  176|  53.7k|        JSONCONS_ASSERT(!stack_.empty());
  ------------------
  |  |   49|  53.7k|#define JSONCONS_ASSERT(x) if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (49:32): [True: 0, False: 53.7k]
  |  |  ------------------
  |  |   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|  53.7k|        --nesting_depth_;
  178|       |
  179|  53.7k|        if (stack_.back().is_indefinite_length())
  ------------------
  |  Branch (179:13): [True: 1.87k, False: 51.8k]
  ------------------
  180|  1.87k|        {
  181|  1.87k|            sink_.push_back(jsoncons::ubjson::ubjson_type::end_object_marker);
  182|  1.87k|        }
  183|  51.8k|        else
  184|  51.8k|        {
  185|  51.8k|            if (stack_.back().count() < stack_.back().length())
  ------------------
  |  Branch (185:17): [True: 0, False: 51.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|  51.8k|            if (stack_.back().count() > stack_.back().length())
  ------------------
  |  Branch (190:17): [True: 0, False: 51.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|  51.8k|        }
  196|  53.7k|        stack_.pop_back();
  197|  53.7k|        end_value();
  198|  53.7k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  53.7k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  199|  53.7k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE17visit_begin_arrayENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  202|  1.85M|    {
  203|  1.85M|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|  1.85M|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 1.85M]
  |  |  ------------------
  ------------------
  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|  1.85M|        stack_.emplace_back(ubjson_container_type::indefinite_length_array);
  209|  1.85M|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_array_marker);
  210|       |
  211|  1.85M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  1.85M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  212|  1.85M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE9visit_keyERKNS3_17basic_string_viewIcNS3_11char_traitsIcEEEERKNS_11ser_contextERNS3_10error_codeE:
  257|   634k|    {
  258|   634k|        auto sink = unicode_traits::validate(name.data(), name.size());
  259|   634k|        if (sink.ec != unicode_traits::unicode_errc())
  ------------------
  |  Branch (259:13): [True: 0, False: 634k]
  ------------------
  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|   634k|        put_length(name.length());
  266|       |
  267|   634k|        for (auto c : name)
  ------------------
  |  Branch (267:21): [True: 6.50M, False: 634k]
  ------------------
  268|  6.50M|        {
  269|  6.50M|            sink_.push_back(c);
  270|  6.50M|        }
  271|   634k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   634k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  272|   634k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10visit_nullENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  275|  4.72M|    {
  276|       |        // nil
  277|  4.72M|        binary::native_to_big(static_cast<uint8_t>(jsoncons::ubjson::ubjson_type::null_type), std::back_inserter(sink_));
  278|  4.72M|        end_value();
  279|  4.72M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  4.72M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  280|  4.72M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10visit_boolEbNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  487|   239k|    {
  488|       |        // true and false
  489|   239k|        sink_.push_back(static_cast<uint8_t>(val ? jsoncons::ubjson::ubjson_type::true_type : jsoncons::ubjson::ubjson_type::false_type));
  ------------------
  |  Branch (489:46): [True: 232k, False: 6.89k]
  ------------------
  490|       |
  491|   239k|        end_value();
  492|   239k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   239k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  493|   239k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE12visit_stringERKNS3_17basic_string_viewIcNS3_11char_traitsIcEEEENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  283|  4.05M|    {
  284|  4.05M|        switch (tag)
  285|  4.05M|        {
  286|  1.55k|            case semantic_tag::bigint:
  ------------------
  |  Branch (286:13): [True: 1.55k, False: 4.05M]
  ------------------
  287|   174k|            case semantic_tag::bigdec:
  ------------------
  |  Branch (287:13): [True: 172k, False: 3.88M]
  ------------------
  288|   174k|            {
  289|   174k|                sink_.push_back(jsoncons::ubjson::ubjson_type::high_precision_number_type);
  290|   174k|                break;
  291|  1.55k|            }
  292|  3.88M|            default:
  ------------------
  |  Branch (292:13): [True: 3.88M, False: 174k]
  ------------------
  293|  3.88M|            {
  294|  3.88M|                sink_.push_back(jsoncons::ubjson::ubjson_type::string_type);
  295|  3.88M|                break;
  296|  1.55k|            }
  297|  4.05M|        }
  298|       |
  299|  4.05M|        auto sink = unicode_traits::validate(sv.data(), sv.size());
  300|  4.05M|        if (sink.ec != unicode_traits::unicode_errc())
  ------------------
  |  Branch (300:13): [True: 12, False: 4.05M]
  ------------------
  301|     12|        {
  302|     12|            ec = ubjson_errc::invalid_utf8_text_string;
  303|     12|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|     12|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  304|     12|        }
  305|       |
  306|  4.05M|        put_length(sv.length());
  307|       |
  308|  4.05M|        for (auto c : sv)
  ------------------
  |  Branch (308:21): [True: 8.85M, False: 4.05M]
  ------------------
  309|  8.85M|        {
  310|  8.85M|            sink_.push_back(c);
  311|  8.85M|        }
  312|       |
  313|  4.05M|        end_value();
  314|  4.05M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  4.05M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  315|  4.05M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEED2Ev:
  113|    330|    {
  114|    330|        JSONCONS_TRY
  ------------------
  |  |   37|    330|    #define JSONCONS_TRY try
  ------------------
  115|    330|        {
  116|    330|            sink_.flush();
  117|    330|        }
  118|    330|        JSONCONS_CATCH(...)
  119|    330|        {
  120|      0|        }
  121|    330|    }

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

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

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

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

