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

_ZNK8jsoncons6detail4spanIKhLm18446744073709551615EE4sizeEv:
  116|  2.31M|        {
  117|  2.31M|            return size_;
  118|  2.31M|        }
_ZN8jsoncons6detail4spanIKhLm18446744073709551615EEC2Ev:
   58|   534k|        {
   59|   534k|        }
_ZN8jsoncons6detail4spanIKhLm18446744073709551615EEC2EPS2_m:
   61|   235k|            : data_(data), size_(size)
   62|   235k|        {
   63|   235k|        }
_ZNK8jsoncons6detail4spanIKhLm18446744073709551615EE4dataEv:
  111|  1.53M|        {
  112|  1.53M|            return data_;
  113|  1.53M|        }

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

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

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

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

_ZN8jsoncons6binary13native_to_bigIhNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  11.8M|    {
  128|  11.8M|        T val2 = byte_swap(val);
  129|  11.8M|        uint8_t buf[sizeof(T)];
  130|  11.8M|        std::memcpy(buf, &val2, sizeof(T));
  131|  11.8M|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 11.8M, False: 11.8M]
  ------------------
  132|  11.8M|        {
  133|  11.8M|            *d_first++ = item;
  134|  11.8M|        }
  135|  11.8M|    }
_ZN8jsoncons6binary9byte_swapIhEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  11.8M|    {
   22|  11.8M|        return val;
   23|  11.8M|    }
_ZN8jsoncons6binary13native_to_bigItNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  12.4k|    {
  128|  12.4k|        T val2 = byte_swap(val);
  129|  12.4k|        uint8_t buf[sizeof(T)];
  130|  12.4k|        std::memcpy(buf, &val2, sizeof(T));
  131|  12.4k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 24.9k, False: 12.4k]
  ------------------
  132|  24.9k|        {
  133|  24.9k|            *d_first++ = item;
  134|  24.9k|        }
  135|  12.4k|    }
_ZN8jsoncons6binary9byte_swapItEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  12.4k|    {
   29|  12.4k|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  12.4k|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  12.4k|#      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|  12.4k|    }
_ZN8jsoncons6binary13native_to_bigIjNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|    385|    {
  128|    385|        T val2 = byte_swap(val);
  129|    385|        uint8_t buf[sizeof(T)];
  130|    385|        std::memcpy(buf, &val2, sizeof(T));
  131|    385|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 1.54k, False: 385]
  ------------------
  132|  1.54k|        {
  133|  1.54k|            *d_first++ = item;
  134|  1.54k|        }
  135|    385|    }
_ZN8jsoncons6binary9byte_swapIjEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|  46.8k|    {
   40|  46.8k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|  46.8k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|  46.8k|#  define JSONCONS_BYTE_SWAP_32 __builtin_bswap32
  ------------------
   42|       |    #else
   43|       |        uint32_t tmp = ((static_cast<uint32_t>(val) << 8) & 0xff00ff00) | ((static_cast<uint32_t>(val) >> 8) & 0xff00ff);
   44|       |        return (tmp << 16) | (tmp >> 16);
   45|       |    #endif
   46|  46.8k|    }
_ZN8jsoncons6binary9byte_swapImEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  67.4k|    {
   52|  67.4k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  67.4k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  67.4k|#  define JSONCONS_BYTE_SWAP_64 __builtin_bswap64
  ------------------
   54|       |    #else
   55|       |        uint64_t tmp = ((static_cast<uint64_t>(val) & 0x00000000ffffffffull) << 32) | ((static_cast<uint64_t>(val) & 0xffffffff00000000ull) >> 32);
   56|       |        tmp = ((tmp & 0x0000ffff0000ffffull) << 16) | ((tmp & 0xffff0000ffff0000ull) >> 16);
   57|       |        return ((tmp & 0x00ff00ff00ff00ffull) << 8)  | ((tmp & 0xff00ff00ff00ff00ull) >> 8);
   58|       |    #endif
   59|  67.4k|    }
_ZN8jsoncons6binary13native_to_bigIsNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   666k|    {
  128|   666k|        T val2 = byte_swap(val);
  129|   666k|        uint8_t buf[sizeof(T)];
  130|   666k|        std::memcpy(buf, &val2, sizeof(T));
  131|   666k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 1.33M, False: 666k]
  ------------------
  132|  1.33M|        {
  133|  1.33M|            *d_first++ = item;
  134|  1.33M|        }
  135|   666k|    }
_ZN8jsoncons6binary9byte_swapIsEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  1.60M|    {
   29|  1.60M|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  1.60M|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  1.60M|#      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.60M|    }
_ZN8jsoncons6binary13native_to_bigIiNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   103k|    {
  128|   103k|        T val2 = byte_swap(val);
  129|   103k|        uint8_t buf[sizeof(T)];
  130|   103k|        std::memcpy(buf, &val2, sizeof(T));
  131|   103k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 414k, False: 103k]
  ------------------
  132|   414k|        {
  133|   414k|            *d_first++ = item;
  134|   414k|        }
  135|   103k|    }
_ZN8jsoncons6binary9byte_swapIiEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|   215k|    {
   40|   215k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|   215k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|   215k|#  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|   215k|    }
_ZN8jsoncons6binary13native_to_bigIlNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  24.9k|    {
  128|  24.9k|        T val2 = byte_swap(val);
  129|  24.9k|        uint8_t buf[sizeof(T)];
  130|  24.9k|        std::memcpy(buf, &val2, sizeof(T));
  131|  24.9k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 199k, False: 24.9k]
  ------------------
  132|   199k|        {
  133|   199k|            *d_first++ = item;
  134|   199k|        }
  135|  24.9k|    }
_ZN8jsoncons6binary9byte_swapIlEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  50.6k|    {
   52|  50.6k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  50.6k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  50.6k|#  define JSONCONS_BYTE_SWAP_64 __builtin_bswap64
  ------------------
   54|       |    #else
   55|       |        uint64_t tmp = ((static_cast<uint64_t>(val) & 0x00000000ffffffffull) << 32) | ((static_cast<uint64_t>(val) & 0xffffffff00000000ull) >> 32);
   56|       |        tmp = ((tmp & 0x0000ffff0000ffffull) << 16) | ((tmp & 0xffff0000ffff0000ull) >> 16);
   57|       |        return ((tmp & 0x00ff00ff00ff00ffull) << 8)  | ((tmp & 0xff00ff00ff00ff00ull) >> 8);
   58|       |    #endif
   59|  50.6k|    }
_ZN8jsoncons6binary13native_to_bigIaNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   101k|    {
  128|   101k|        T val2 = byte_swap(val);
  129|   101k|        uint8_t buf[sizeof(T)];
  130|   101k|        std::memcpy(buf, &val2, sizeof(T));
  131|   101k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 101k, False: 101k]
  ------------------
  132|   101k|        {
  133|   101k|            *d_first++ = item;
  134|   101k|        }
  135|   101k|    }
_ZN8jsoncons6binary9byte_swapIaEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  1.14M|    {
   22|  1.14M|        return val;
   23|  1.14M|    }
_ZN8jsoncons6binary13native_to_bigIfNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  20.6k|    {
  128|  20.6k|        T val2 = byte_swap(val);
  129|  20.6k|        uint8_t buf[sizeof(T)];
  130|  20.6k|        std::memcpy(buf, &val2, sizeof(T));
  131|  20.6k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 82.6k, False: 20.6k]
  ------------------
  132|  82.6k|        {
  133|  82.6k|            *d_first++ = item;
  134|  82.6k|        }
  135|  20.6k|    }
_ZN8jsoncons6binary9byte_swapIfEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   64|  46.4k|    {
   65|  46.4k|        uint32_t x;
   66|  46.4k|        std::memcpy(&x,&val,sizeof(uint32_t));
   67|  46.4k|        uint32_t y = byte_swap(x);
   68|  46.4k|        T val2;
   69|  46.4k|        std::memcpy(&val2,&y,sizeof(uint32_t));
   70|  46.4k|        return val2;
   71|  46.4k|    }
_ZN8jsoncons6binary13native_to_bigIdNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  36.2k|    {
  128|  36.2k|        T val2 = byte_swap(val);
  129|  36.2k|        uint8_t buf[sizeof(T)];
  130|  36.2k|        std::memcpy(buf, &val2, sizeof(T));
  131|  36.2k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 290k, False: 36.2k]
  ------------------
  132|   290k|        {
  133|   290k|            *d_first++ = item;
  134|   290k|        }
  135|  36.2k|    }
_ZN8jsoncons6binary9byte_swapIdEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   76|  67.4k|    {
   77|  67.4k|        uint64_t x;
   78|  67.4k|        std::memcpy(&x,&val,sizeof(uint64_t));
   79|  67.4k|        uint64_t y = byte_swap(x);
   80|  67.4k|        T val2;
   81|  67.4k|        std::memcpy(&val2,&y,sizeof(uint64_t));
   82|  67.4k|        return val2;
   83|  67.4k|    }
_ZN8jsoncons6binary13big_to_nativeIaNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  1.04M|    {
  183|  1.04M|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 1.04M]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  1.04M|        T val;
  188|  1.04M|        std::memcpy(&val,first,sizeof(T));
  189|  1.04M|        return byte_swap(val);
  190|  1.04M|    }
_ZN8jsoncons6binary13big_to_nativeIsNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|   939k|    {
  183|   939k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 939k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|   939k|        T val;
  188|   939k|        std::memcpy(&val,first,sizeof(T));
  189|   939k|        return byte_swap(val);
  190|   939k|    }
_ZN8jsoncons6binary13big_to_nativeIiNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|   111k|    {
  183|   111k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 111k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|   111k|        T val;
  188|   111k|        std::memcpy(&val,first,sizeof(T));
  189|   111k|        return byte_swap(val);
  190|   111k|    }
_ZN8jsoncons6binary13big_to_nativeIlNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  25.7k|    {
  183|  25.7k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 25.7k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  25.7k|        T val;
  188|  25.7k|        std::memcpy(&val,first,sizeof(T));
  189|  25.7k|        return byte_swap(val);
  190|  25.7k|    }
_ZN8jsoncons6binary13big_to_nativeIfNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  25.8k|    {
  183|  25.8k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 25.8k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  25.8k|        T val;
  188|  25.8k|        std::memcpy(&val,first,sizeof(T));
  189|  25.8k|        return byte_swap(val);
  190|  25.8k|    }
_ZN8jsoncons6binary13big_to_nativeIdNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  31.1k|    {
  183|  31.1k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 31.1k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  31.1k|        T val;
  188|  31.1k|        std::memcpy(&val,first,sizeof(T));
  189|  31.1k|        return byte_swap(val);
  190|  31.1k|    }

_ZN8jsoncons9is_base10IhEEbPKT_m:
  164|   215k|{
  165|   215k|    integer_chars_state state = integer_chars_state::initial;
  166|       |
  167|   215k|    const CharT* end = s + length; 
  168|   226k|    for (;s < end; ++s)
  ------------------
  |  Branch (168:11): [True: 225k, False: 814]
  ------------------
  169|   225k|    {
  170|   225k|        switch(state)
  171|   225k|        {
  172|   215k|            case integer_chars_state::initial:
  ------------------
  |  Branch (172:13): [True: 215k, False: 10.1k]
  ------------------
  173|   215k|            {
  174|   215k|                switch(*s)
  175|   215k|                {
  176|  7.81k|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (176:21): [True: 201, False: 215k]
  |  Branch (176:30): [True: 1.82k, False: 213k]
  |  Branch (176:39): [True: 9, False: 215k]
  |  Branch (176:48): [True: 7, False: 215k]
  |  Branch (176:57): [True: 407, False: 215k]
  |  Branch (176:66): [True: 4, False: 215k]
  |  Branch (176:75): [True: 27, False: 215k]
  |  Branch (176:84): [True: 0, False: 215k]
  |  Branch (176:93): [True: 1, False: 215k]
  |  Branch (176:103): [True: 5.33k, False: 210k]
  ------------------
  177|  7.81k|                        state = integer_chars_state::decimal;
  178|  7.81k|                        break;
  179|  1.10k|                    case '-':
  ------------------
  |  Branch (179:21): [True: 1.10k, False: 214k]
  ------------------
  180|  1.10k|                        state = integer_chars_state::minus;
  181|  1.10k|                        break;
  182|   206k|                    default:
  ------------------
  |  Branch (182:21): [True: 206k, False: 8.92k]
  ------------------
  183|   206k|                        return false;
  184|   215k|                }
  185|  8.92k|                break;
  186|   215k|            }
  187|  8.92k|            case integer_chars_state::minus:
  ------------------
  |  Branch (187:13): [True: 1.10k, False: 224k]
  ------------------
  188|  1.10k|            {
  189|  1.10k|                switch(*s)
  190|  1.10k|                {
  191|     93|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (191:21): [True: 23, False: 1.08k]
  |  Branch (191:30): [True: 4, False: 1.10k]
  |  Branch (191:39): [True: 0, False: 1.10k]
  |  Branch (191:48): [True: 0, False: 1.10k]
  |  Branch (191:57): [True: 0, False: 1.10k]
  |  Branch (191:66): [True: 6, False: 1.09k]
  |  Branch (191:75): [True: 0, False: 1.10k]
  |  Branch (191:84): [True: 0, False: 1.10k]
  |  Branch (191:93): [True: 24, False: 1.08k]
  |  Branch (191:103): [True: 36, False: 1.06k]
  ------------------
  192|     93|                        state = integer_chars_state::decimal;
  193|     93|                        break;
  194|  1.01k|                    default:
  ------------------
  |  Branch (194:21): [True: 1.01k, False: 93]
  ------------------
  195|  1.01k|                        return false;
  196|  1.10k|                }
  197|     93|                break;
  198|  1.10k|            }
  199|  9.01k|            case integer_chars_state::decimal:
  ------------------
  |  Branch (199:13): [True: 9.01k, False: 216k]
  ------------------
  200|  9.01k|            {
  201|  9.01k|                switch(*s)
  202|  9.01k|                {
  203|  1.78k|                    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.77k, False: 7.24k]
  |  Branch (203:30): [True: 6, False: 9.01k]
  |  Branch (203:39): [True: 0, False: 9.01k]
  |  Branch (203:48): [True: 0, False: 9.01k]
  |  Branch (203:57): [True: 0, False: 9.01k]
  |  Branch (203:66): [True: 0, False: 9.01k]
  |  Branch (203:75): [True: 1, False: 9.01k]
  |  Branch (203:84): [True: 0, False: 9.01k]
  |  Branch (203:93): [True: 0, False: 9.01k]
  |  Branch (203:103): [True: 1, False: 9.01k]
  ------------------
  204|  1.78k|                        break;
  205|  7.23k|                    default:
  ------------------
  |  Branch (205:21): [True: 7.23k, False: 1.78k]
  ------------------
  206|  7.23k|                        return false;
  207|  9.01k|                }
  208|  1.78k|                break;
  209|  9.01k|            }
  210|  1.78k|            default:
  ------------------
  |  Branch (210:13): [True: 0, False: 225k]
  ------------------
  211|      0|                break;
  212|   225k|        }
  213|   225k|    }
  214|    814|    return state == integer_chars_state::decimal ? true : false;
  ------------------
  |  Branch (214:12): [True: 672, False: 142]
  ------------------
  215|   215k|}

_ZN8jsoncons14unicode_traits8validateIcEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14unicode_resultIS4_EEE4typeEPKS4_m:
 1147|  4.62M|    {
 1148|  4.62M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(data);
 1149|  4.62M|        const uint8_t* end = it + length;
 1150|       |
 1151|  4.62M|        unicode_errc  result{};
 1152|  9.76M|        while (it != end) 
  ------------------
  |  Branch (1152:16): [True: 5.14M, False: 4.62M]
  ------------------
 1153|  5.14M|        {
 1154|  5.14M|            if ((end - it) >= 8)
  ------------------
  |  Branch (1154:17): [True: 1.23M, False: 3.90M]
  ------------------
 1155|  1.23M|            {
 1156|  8.58M|                JSONCONS_REPEAT8({if (JSONCONS_LIKELY((*it & 0x80) == 0)) ++it; else goto non_ascii;})
  ------------------
  |  |  281|  2.47M|#define JSONCONS_REPEAT8(x)  { x x x x x x x x }
  |  |  ------------------
  |  |  |  Branch (281:32): [True: 1.23M, False: 2.30k]
  |  |  |  Branch (281:34): [True: 1.23M, False: 2.50k]
  |  |  |  Branch (281:36): [True: 1.23M, False: 904]
  |  |  |  Branch (281:38): [True: 1.22M, False: 5.85k]
  |  |  |  Branch (281:40): [True: 1.22M, False: 755]
  |  |  |  Branch (281:42): [True: 1.22M, False: 1.16k]
  |  |  |  Branch (281:44): [True: 1.22M, False: 1.26k]
  |  |  |  Branch (281:46): [True: 1.22M, False: 1.24k]
  |  |  ------------------
  ------------------
 1157|  1.22M|                continue;
 1158|  8.58M|            }
 1159|  3.92M|    non_ascii:
 1160|  3.92M|            const std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[*it]) + 1;
 1161|  3.92M|            if (len > (std::size_t)(end - it))
  ------------------
  |  Branch (1161:17): [True: 0, False: 3.92M]
  ------------------
 1162|      0|            {
 1163|      0|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it), unicode_errc::source_exhausted};
 1164|      0|            }
 1165|  3.92M|            if ((result=is_legal_utf8(it, len)) != unicode_errc())
  ------------------
  |  Branch (1165:17): [True: 20, False: 3.92M]
  ------------------
 1166|     20|            {
 1167|     20|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1168|     20|            }
 1169|  3.92M|            it += len;
 1170|  3.92M|        }
 1171|  4.62M|        return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1172|  4.62M|    }
_ZN8jsoncons14unicode_traits13is_legal_utf8EPKhm:
  305|  7.83M|    {
  306|  7.83M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(bytes);
  307|  7.83M|        const uint8_t* end = it+length;
  308|       |
  309|  7.83M|        uint8_t byte;
  310|  7.83M|        switch (length) {
  311|     27|        default:
  ------------------
  |  Branch (311:9): [True: 27, False: 7.83M]
  ------------------
  312|     27|            return unicode_errc::over_long_utf8_sequence;
  313|  23.3k|        case 4:
  ------------------
  |  Branch (313:9): [True: 23.3k, False: 7.80M]
  ------------------
  314|  23.3k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (314:17): [True: 2, False: 23.3k]
  ------------------
  315|      2|                return unicode_errc::bad_continuation_byte;
  316|  23.3k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  23.3k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  317|  29.5k|        case 3:
  ------------------
  |  Branch (317:9): [True: 6.27k, False: 7.82M]
  ------------------
  318|  29.5k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (318:17): [True: 0, False: 29.5k]
  ------------------
  319|      0|                return unicode_errc::bad_continuation_byte;
  320|  29.5k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  29.5k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  321|  31.9k|        case 2:
  ------------------
  |  Branch (321:9): [True: 2.34k, False: 7.82M]
  ------------------
  322|  31.9k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (322:17): [True: 2, False: 31.9k]
  ------------------
  323|      2|                return unicode_errc::bad_continuation_byte;
  324|       |
  325|  31.9k|            switch (*it) 
  326|  31.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: 31.8k]
  |  Branch (328:32): [True: 0, False: 28]
  ------------------
  329|     61|                case 0xED: if (byte > 0x9F) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (329:17): [True: 61, False: 31.8k]
  |  Branch (329:32): [True: 0, False: 61]
  ------------------
  330|  4.13k|                case 0xF0: if (byte < 0x90) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (330:17): [True: 4.13k, False: 27.7k]
  |  Branch (330:32): [True: 0, False: 4.13k]
  ------------------
  331|  19.0k|                case 0xF4: if (byte > 0x8F) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (331:17): [True: 19.0k, False: 12.8k]
  |  Branch (331:32): [True: 0, False: 19.0k]
  ------------------
  332|  19.0k|                default:   if (byte < 0x80) return unicode_errc::source_illegal;
  ------------------
  |  Branch (332:17): [True: 8.65k, False: 23.2k]
  |  Branch (332:32): [True: 0, False: 8.65k]
  ------------------
  333|  31.9k|            }
  334|       |
  335|  31.9k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  31.9k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  336|  7.83M|        case 1:
  ------------------
  |  Branch (336:9): [True: 7.79M, False: 31.9k]
  ------------------
  337|  7.83M|            if (*it >= 0x80 && *it < 0xC2)
  ------------------
  |  Branch (337:17): [True: 31.9k, False: 7.79M]
  |  Branch (337:32): [True: 17, False: 31.9k]
  ------------------
  338|     17|                return unicode_errc::source_illegal;
  339|  7.83M|            break;
  340|  7.83M|        }
  341|  7.83M|        if (*it > 0xF4) 
  ------------------
  |  Branch (341:13): [True: 0, False: 7.83M]
  ------------------
  342|      0|            return unicode_errc::source_illegal;
  343|       |
  344|  7.83M|        return unicode_errc();
  345|  7.83M|    }
_ZN8jsoncons14unicode_traits8validateIhEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14unicode_resultIS4_EEE4typeEPKS4_m:
 1147|  4.40M|    {
 1148|  4.40M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(data);
 1149|  4.40M|        const uint8_t* end = it + length;
 1150|       |
 1151|  4.40M|        unicode_errc  result{};
 1152|  9.28M|        while (it != end) 
  ------------------
  |  Branch (1152:16): [True: 4.87M, False: 4.40M]
  ------------------
 1153|  4.87M|        {
 1154|  4.87M|            if ((end - it) >= 8)
  ------------------
  |  Branch (1154:17): [True: 986k, False: 3.89M]
  ------------------
 1155|   986k|            {
 1156|  6.84M|                JSONCONS_REPEAT8({if (JSONCONS_LIKELY((*it & 0x80) == 0)) ++it; else goto non_ascii;})
  ------------------
  |  |  281|  1.97M|#define JSONCONS_REPEAT8(x)  { x x x x x x x x }
  |  |  ------------------
  |  |  |  Branch (281:32): [True: 984k, False: 2.24k]
  |  |  |  Branch (281:34): [True: 981k, False: 2.47k]
  |  |  |  Branch (281:36): [True: 981k, False: 902]
  |  |  |  Branch (281:38): [True: 975k, False: 5.74k]
  |  |  |  Branch (281:40): [True: 974k, False: 749]
  |  |  |  Branch (281:42): [True: 973k, False: 1.15k]
  |  |  |  Branch (281:44): [True: 972k, False: 1.26k]
  |  |  |  Branch (281:46): [True: 970k, False: 1.24k]
  |  |  ------------------
  ------------------
 1157|   970k|                continue;
 1158|  6.84M|            }
 1159|  3.90M|    non_ascii:
 1160|  3.90M|            const std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[*it]) + 1;
 1161|  3.90M|            if (len > (std::size_t)(end - it))
  ------------------
  |  Branch (1161:17): [True: 1, False: 3.90M]
  ------------------
 1162|      1|            {
 1163|      1|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it), unicode_errc::source_exhausted};
 1164|      1|            }
 1165|  3.90M|            if ((result=is_legal_utf8(it, len)) != unicode_errc())
  ------------------
  |  Branch (1165:17): [True: 28, False: 3.90M]
  ------------------
 1166|     28|            {
 1167|     28|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1168|     28|            }
 1169|  3.90M|            it += len;
 1170|  3.90M|        }
 1171|  4.40M|        return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1172|  4.40M|    }

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

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

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

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

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

