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

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

_ZNK8jsoncons6nonstd4spanIKhLm18446744073709551615EE4sizeEv:
  116|  2.02M|        {
  117|  2.02M|            return size_;
  118|  2.02M|        }
_ZN8jsoncons6nonstd4spanIKhLm18446744073709551615EEC2Ev:
   58|   517k|        {
   59|   517k|        }
_ZN8jsoncons6nonstd4spanIKhLm18446744073709551615EEC2EPS2_m:
   61|   158k|            : data_(data), size_(size)
   62|   158k|        {
   63|   158k|        }
_ZNK8jsoncons6nonstd4spanIKhLm18446744073709551615EE4dataEv:
  111|  1.35M|        {
  112|  1.35M|            return data_;
  113|  1.35M|        }

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

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

_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEED2Ev:
  193|    414|    {
  194|    414|        if (chunk_)
  ------------------
  |  Branch (194:13): [True: 414, False: 0]
  ------------------
  195|    414|        {
  196|    414|            std::allocator_traits<char_allocator_type>::deallocate(alloc_, chunk_, chunk_size_);
  197|    414|        }
  198|    414|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEEC2ERNS1_13basic_istreamIcNS1_11char_traitsIcEEEERKS3_:
  176|    414|        : alloc_(alloc), stream_ptr_(std::addressof(is)), sbuf_(is.rdbuf()),
  177|    414|          chunk_size_(default_max_chunk_size)
  178|    414|    {
  179|    414|        chunk_ = std::allocator_traits<char_allocator_type>::allocate(alloc_, chunk_size_);
  180|    414|        data_end_ = chunk_;
  181|    414|    }
_ZN8jsoncons18basic_null_istreamIcEC1Ev:
   57|    414|      : std::basic_istream<CharT>(&nb_)
   58|    414|    {
   59|    414|    }
_ZN8jsoncons18basic_null_istreamIcE11null_bufferC2Ev:
   43|    414|        null_buffer() = default;
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE8is_errorEv:
  276|  4.41M|    {
  277|  4.41M|        return stream_ptr_->bad();  
  278|  4.41M|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4readEPhm:
  377|  11.2M|    {
  378|  11.2M|        std::size_t len = 0;
  379|  11.2M|        if (remaining_ > 0)
  ------------------
  |  Branch (379:13): [True: 11.2M, False: 842]
  ------------------
  380|  11.2M|        {
  381|  11.2M|            len = (std::min)(remaining_, length);
  382|  11.2M|            std::memcpy(p, data_end_, len*sizeof(value_type));
  383|  11.2M|            data_end_ += len;
  384|  11.2M|            remaining_ -= len;
  385|  11.2M|            position_ += len;
  386|  11.2M|        }
  387|  11.2M|        if (length - len == 0)
  ------------------
  |  Branch (387:13): [True: 11.2M, False: 2.12k]
  ------------------
  388|  11.2M|        {
  389|  11.2M|            return len;
  390|  11.2M|        }
  391|  2.12k|        else if (length - len < chunk_size_)
  ------------------
  |  Branch (391:18): [True: 2.12k, False: 0]
  ------------------
  392|  2.12k|        {
  393|  2.12k|            data_end_ = chunk_;
  394|  2.12k|            remaining_ = fill_buffer(chunk_, chunk_size_);
  395|  2.12k|            if (remaining_ > 0)
  ------------------
  |  Branch (395:17): [True: 2.00k, False: 129]
  ------------------
  396|  2.00k|            {
  397|  2.00k|                std::size_t len2 = (std::min)(remaining_, length-len);
  398|  2.00k|                std::memcpy(p+len, data_end_, len2*sizeof(value_type));
  399|  2.00k|                data_end_ += len2;
  400|  2.00k|                remaining_ -= len2;
  401|  2.00k|                position_ += len2;
  402|  2.00k|                len += len2;
  403|  2.00k|            }
  404|  2.12k|            return len;
  405|  2.12k|        }
  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|  11.2M|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE11fill_bufferEPhm:
  442|  2.99k|    {
  443|  2.99k|        if (stream_ptr_->eof())
  ------------------
  |  Branch (443:13): [True: 167, False: 2.82k]
  ------------------
  444|    167|        {
  445|    167|            return 0;
  446|    167|        }
  447|       |
  448|  2.82k|        JSONCONS_TRY
  ------------------
  |  |   37|  2.82k|    #define JSONCONS_TRY try
  ------------------
  449|  2.82k|        {
  450|  2.82k|            std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(chunk), chunk_size);
  451|  2.82k|            std::size_t length = static_cast<std::size_t>(count);
  452|       |
  453|  2.82k|            if (length < chunk_size)
  ------------------
  |  Branch (453:17): [True: 407, False: 2.41k]
  ------------------
  454|    407|            {
  455|    407|                stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  456|    407|            }
  457|  2.82k|            return length;
  458|  2.82k|        }
  459|  2.82k|        JSONCONS_CATCH(const std::exception&)     
  460|  2.82k|        {
  461|      0|            stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  462|      0|            return 0;
  463|      0|        }
  464|  2.82k|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE9read_spanIRNS1_12basic_stringIcNS1_11char_traitsIcEENS2_IcEEEEEENS_6nonstd4spanIKhLm18446744073709551615EEEmOT_:
  352|   675k|    {
  353|   675k|        if (JSONCONS_UNLIKELY(length == 0))
  ------------------
  |  |   79|   675k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (79:30): [True: 517k, False: 158k]
  |  |  ------------------
  ------------------
  354|   517k|        {
  355|   517k|            return span<const value_type>{};
  356|   517k|        }
  357|   158k|        if (remaining_ == 0 && length <= chunk_size_)
  ------------------
  |  Branch (357:13): [True: 154, False: 158k]
  |  Branch (357:32): [True: 25, False: 129]
  ------------------
  358|     25|        {
  359|     25|            remaining_ = fill_buffer(chunk_, chunk_size_);
  360|     25|            data_end_ = chunk_;
  361|     25|        }
  362|   158k|        if (length > remaining_)
  ------------------
  |  Branch (362:13): [True: 669, False: 157k]
  ------------------
  363|    669|        {
  364|    669|            buffer.clear();
  365|    669|            source_reader<stream_source_type>::read(*this, std::forward<Buffer>(buffer), length);
  366|    669|            return span<const value_type>(reinterpret_cast<const value_type*>(buffer.data()), buffer.size());
  367|    669|        }
  368|       |
  369|   157k|        const value_type* data = data_end_;
  370|   157k|        data_end_ += length;
  371|   157k|        remaining_ -= length;
  372|   157k|        position_ += length;
  373|   157k|        return span<const value_type>(data, length);
  374|   158k|    }
_ZN8jsoncons13source_readerINS_13stream_sourceIhNSt3__19allocatorIhEEEEE4readINS2_12basic_stringIcNS2_11char_traitsIcEENS3_IcEEEEEENS2_9enable_ifIXaaL_ZNS2_17integral_constantIbLb1EE5valueEEsr6nonstd7is_byteINT_10value_typeEEE5valueEmE4typeERS5_RSG_m:
  746|    669|    {
  747|    669|        std::size_t unread = length;
  748|       |
  749|  2.53k|        while (unread > 0 && !source.eof())
  ------------------
  |  Branch (749:16): [True: 2.06k, False: 470]
  |  Branch (749:30): [True: 1.86k, False: 199]
  ------------------
  750|  1.86k|        {
  751|  1.86k|            if (source.remaining() == 0 && unread >= source.chunk_size())
  ------------------
  |  Branch (751:17): [True: 410, False: 1.45k]
  |  Branch (751:44): [True: 404, False: 6]
  ------------------
  752|    404|            {
  753|    404|                std::size_t n = source.chunk_size();
  754|    404|                std::size_t offset = buffer.size();
  755|    404|                buffer.resize(offset+n);
  756|    404|                std::size_t actual = source.read_buffer(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
  757|    404|                if (JSONCONS_UNLIKELY(actual != n))
  ------------------
  |  |   79|    404|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (79:30): [True: 121, False: 283]
  |  |  ------------------
  ------------------
  758|    121|                {
  759|    121|                    buffer.resize(offset+actual);
  760|    121|                }
  761|    404|                unread -= actual;
  762|    404|            }
  763|  1.46k|            else
  764|  1.46k|            {
  765|  1.46k|                std::size_t n = (std::min)(source.chunk_size(), unread);
  766|  1.46k|                std::size_t offset = buffer.size();
  767|  1.46k|                buffer.resize(offset+n);
  768|  1.46k|                std::size_t actual = source.read(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
  769|  1.46k|                if (JSONCONS_UNLIKELY(actual != n))
  ------------------
  |  |   79|  1.46k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (79:30): [True: 67, False: 1.39k]
  |  |  ------------------
  ------------------
  770|     67|                {
  771|     67|                    buffer.resize(offset + actual);
  772|     67|                }
  773|  1.46k|                unread -= actual;
  774|  1.46k|            }
  775|  1.86k|        }
  776|    669|        return length - unread;
  777|    669|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE3eofEv:
  271|  2.06k|    {
  272|  2.06k|        return remaining_ == 0 && stream_ptr_->eof();
  ------------------
  |  Branch (272:16): [True: 609, False: 1.45k]
  |  Branch (272:35): [True: 199, False: 410]
  ------------------
  273|  2.06k|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE9remainingEv:
  346|  1.86k|    {
  347|  1.86k|        return remaining_;
  348|  1.86k|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE10chunk_sizeEv:
  261|  2.27k|    {
  262|  2.27k|        return chunk_size_;
  263|  2.27k|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE11read_bufferEPhm:
  435|    404|    {
  436|    404|        auto len = fill_buffer(chunk, chunk_size);
  437|    404|        position_ += len;
  438|    404|        return len;
  439|    404|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4peekEv:
  312|  10.9M|    {
  313|  10.9M|        if (remaining_ == 0)
  ------------------
  |  Branch (313:13): [True: 434, False: 10.9M]
  ------------------
  314|    434|        {
  315|    434|            data_end_ = chunk_;
  316|    434|            remaining_ = fill_buffer(chunk_, chunk_size_);
  317|    434|        }
  318|  10.9M|        if (remaining_ > 0)
  ------------------
  |  Branch (318:13): [True: 10.9M, False: 46]
  ------------------
  319|  10.9M|        {
  320|  10.9M|            value_type c = *data_end_;
  321|  10.9M|            return char_result<value_type>{c, false};
  322|  10.9M|        }
  323|     46|        else
  324|     46|        {
  325|     46|            return char_result<value_type>{0, true};
  326|     46|        }
  327|  10.9M|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE6ignoreEm:
  286|  3.42M|    {
  287|  3.42M|        std::size_t len = 0;
  288|  3.42M|        if (remaining_ > 0)
  ------------------
  |  Branch (288:13): [True: 3.42M, False: 0]
  ------------------
  289|  3.42M|        {
  290|  3.42M|            len = (std::min)(remaining_, length);
  291|  3.42M|            position_ += len;
  292|  3.42M|            data_end_ += len;
  293|  3.42M|            remaining_ -= len;
  294|  3.42M|        }
  295|  3.42M|        while (len < length)
  ------------------
  |  Branch (295:16): [True: 0, False: 3.42M]
  ------------------
  296|      0|        {
  297|      0|            data_end_ = chunk_;
  298|      0|            remaining_ = fill_buffer(chunk_, chunk_size_);
  299|      0|            if (remaining_ == 0)
  ------------------
  |  Branch (299:17): [True: 0, False: 0]
  ------------------
  300|      0|            {
  301|      0|                break;
  302|      0|            }
  303|      0|            std::size_t len2 = (std::min)(remaining_, length-len);
  304|      0|            position_ += len2;
  305|      0|            data_end_ += len2;
  306|      0|            remaining_ -= len2;
  307|      0|            len += len2;
  308|      0|        }
  309|  3.42M|    }

_ZN8jsoncons6binary13native_to_bigIhNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6nonstd6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  8.48M|    {
  128|  8.48M|        T val2 = byte_swap(val);
  129|  8.48M|        uint8_t buf[sizeof(T)];
  130|  8.48M|        std::memcpy(buf, &val2, sizeof(T));
  131|  8.48M|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 8.48M, False: 8.48M]
  ------------------
  132|  8.48M|        {
  133|  8.48M|            *d_first++ = item;
  134|  8.48M|        }
  135|  8.48M|    }
_ZN8jsoncons6binary9byte_swapIhEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  8.48M|    {
   22|  8.48M|        return val;
   23|  8.48M|    }
_ZN8jsoncons6binary13native_to_bigItNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6nonstd6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  14.9k|    {
  128|  14.9k|        T val2 = byte_swap(val);
  129|  14.9k|        uint8_t buf[sizeof(T)];
  130|  14.9k|        std::memcpy(buf, &val2, sizeof(T));
  131|  14.9k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 29.8k, False: 14.9k]
  ------------------
  132|  29.8k|        {
  133|  29.8k|            *d_first++ = item;
  134|  29.8k|        }
  135|  14.9k|    }
_ZN8jsoncons6binary9byte_swapItEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  14.9k|    {
   29|  14.9k|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  14.9k|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  467|  14.9k|#      define JSONCONS_BYTE_SWAP_16    __builtin_bswap16
  ------------------
   31|       |    #else
   32|       |        return (static_cast<uint16_t>(val) >> 8) | (static_cast<uint16_t>(val) << 8);
   33|       |    #endif
   34|  14.9k|    }
_ZN8jsoncons6binary13native_to_bigIjNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6nonstd6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|    460|    {
  128|    460|        T val2 = byte_swap(val);
  129|    460|        uint8_t buf[sizeof(T)];
  130|    460|        std::memcpy(buf, &val2, sizeof(T));
  131|    460|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 1.84k, False: 460]
  ------------------
  132|  1.84k|        {
  133|  1.84k|            *d_first++ = item;
  134|  1.84k|        }
  135|    460|    }
_ZN8jsoncons6binary9byte_swapIjEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|  48.4k|    {
   40|  48.4k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|  48.4k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  463|  48.4k|#  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|  48.4k|    }
_ZN8jsoncons6binary9byte_swapImEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  23.5k|    {
   52|  23.5k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  23.5k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  462|  23.5k|#  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|  23.5k|    }
_ZN8jsoncons6binary13native_to_bigIsNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6nonstd6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   601k|    {
  128|   601k|        T val2 = byte_swap(val);
  129|   601k|        uint8_t buf[sizeof(T)];
  130|   601k|        std::memcpy(buf, &val2, sizeof(T));
  131|   601k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 1.20M, False: 601k]
  ------------------
  132|  1.20M|        {
  133|  1.20M|            *d_first++ = item;
  134|  1.20M|        }
  135|   601k|    }
_ZN8jsoncons6binary9byte_swapIsEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  1.45M|    {
   29|  1.45M|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  1.45M|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  467|  1.45M|#      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.45M|    }
_ZN8jsoncons6binary13native_to_bigIiNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6nonstd6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  96.8k|    {
  128|  96.8k|        T val2 = byte_swap(val);
  129|  96.8k|        uint8_t buf[sizeof(T)];
  130|  96.8k|        std::memcpy(buf, &val2, sizeof(T));
  131|  96.8k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 387k, False: 96.8k]
  ------------------
  132|   387k|        {
  133|   387k|            *d_first++ = item;
  134|   387k|        }
  135|  96.8k|    }
_ZN8jsoncons6binary9byte_swapIiEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|   202k|    {
   40|   202k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|   202k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  463|   202k|#  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|   202k|    }
_ZN8jsoncons6binary13native_to_bigIlNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6nonstd6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  25.3k|    {
  128|  25.3k|        T val2 = byte_swap(val);
  129|  25.3k|        uint8_t buf[sizeof(T)];
  130|  25.3k|        std::memcpy(buf, &val2, sizeof(T));
  131|  25.3k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 202k, False: 25.3k]
  ------------------
  132|   202k|        {
  133|   202k|            *d_first++ = item;
  134|   202k|        }
  135|  25.3k|    }
_ZN8jsoncons6binary9byte_swapIlEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  51.5k|    {
   52|  51.5k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  51.5k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  462|  51.5k|#  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|  51.5k|    }
_ZN8jsoncons6binary13native_to_bigIaNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6nonstd6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  69.5k|    {
  128|  69.5k|        T val2 = byte_swap(val);
  129|  69.5k|        uint8_t buf[sizeof(T)];
  130|  69.5k|        std::memcpy(buf, &val2, sizeof(T));
  131|  69.5k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 69.5k, False: 69.5k]
  ------------------
  132|  69.5k|        {
  133|  69.5k|            *d_first++ = item;
  134|  69.5k|        }
  135|  69.5k|    }
_ZN8jsoncons6binary9byte_swapIaEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  1.61M|    {
   22|  1.61M|        return val;
   23|  1.61M|    }
_ZN8jsoncons6binary13native_to_bigIfNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6nonstd6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  21.5k|    {
  128|  21.5k|        T val2 = byte_swap(val);
  129|  21.5k|        uint8_t buf[sizeof(T)];
  130|  21.5k|        std::memcpy(buf, &val2, sizeof(T));
  131|  21.5k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 86.0k, False: 21.5k]
  ------------------
  132|  86.0k|        {
  133|  86.0k|            *d_first++ = item;
  134|  86.0k|        }
  135|  21.5k|    }
_ZN8jsoncons6binary9byte_swapIfEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   64|  47.9k|    {
   65|  47.9k|        uint32_t x;
   66|  47.9k|        std::memcpy(&x,&val,sizeof(uint32_t));
   67|  47.9k|        uint32_t y = byte_swap(x);
   68|  47.9k|        T val2;
   69|  47.9k|        std::memcpy(&val2,&y,sizeof(uint32_t));
   70|  47.9k|        return val2;
   71|  47.9k|    }
_ZN8jsoncons6binary13native_to_bigIdNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6nonstd6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  14.2k|    {
  128|  14.2k|        T val2 = byte_swap(val);
  129|  14.2k|        uint8_t buf[sizeof(T)];
  130|  14.2k|        std::memcpy(buf, &val2, sizeof(T));
  131|  14.2k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 113k, False: 14.2k]
  ------------------
  132|   113k|        {
  133|   113k|            *d_first++ = item;
  134|   113k|        }
  135|  14.2k|    }
_ZN8jsoncons6binary9byte_swapIdEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   76|  23.5k|    {
   77|  23.5k|        uint64_t x;
   78|  23.5k|        std::memcpy(&x,&val,sizeof(uint64_t));
   79|  23.5k|        uint64_t y = byte_swap(x);
   80|  23.5k|        T val2;
   81|  23.5k|        std::memcpy(&val2,&y,sizeof(uint64_t));
   82|  23.5k|        return val2;
   83|  23.5k|    }
_ZN8jsoncons6binary13big_to_nativeIaNS_6nonstd6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  1.54M|    {
  183|  1.54M|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 1.54M]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  1.54M|        T val;
  188|  1.54M|        std::memcpy(&val,first,sizeof(T));
  189|  1.54M|        return byte_swap(val);
  190|  1.54M|    }
_ZN8jsoncons6binary13big_to_nativeIsNS_6nonstd6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|   857k|    {
  183|   857k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 857k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|   857k|        T val;
  188|   857k|        std::memcpy(&val,first,sizeof(T));
  189|   857k|        return byte_swap(val);
  190|   857k|    }
_ZN8jsoncons6binary13big_to_nativeIiNS_6nonstd6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|   106k|    {
  183|   106k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 106k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|   106k|        T val;
  188|   106k|        std::memcpy(&val,first,sizeof(T));
  189|   106k|        return byte_swap(val);
  190|   106k|    }
_ZN8jsoncons6binary13big_to_nativeIlNS_6nonstd6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  26.2k|    {
  183|  26.2k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 26.2k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  26.2k|        T val;
  188|  26.2k|        std::memcpy(&val,first,sizeof(T));
  189|  26.2k|        return byte_swap(val);
  190|  26.2k|    }
_ZN8jsoncons6binary13big_to_nativeIfNS_6nonstd6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  26.4k|    {
  183|  26.4k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 26.4k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  26.4k|        T val;
  188|  26.4k|        std::memcpy(&val,first,sizeof(T));
  189|  26.4k|        return byte_swap(val);
  190|  26.4k|    }
_ZN8jsoncons6binary13big_to_nativeIdNS_6nonstd6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  9.25k|    {
  183|  9.25k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 9.25k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  9.25k|        T val;
  188|  9.25k|        std::memcpy(&val,first,sizeof(T));
  189|  9.25k|        return byte_swap(val);
  190|  9.25k|    }

_ZN8jsoncons9is_base10IhEEbPKT_m:
  187|   133k|{
  188|   133k|    integer_chars_state state = integer_chars_state::initial;
  189|       |
  190|   133k|    const CharT* end = s + length; 
  191|   141k|    for (;s < end; ++s)
  ------------------
  |  Branch (191:11): [True: 139k, False: 1.13k]
  ------------------
  192|   139k|    {
  193|   139k|        switch(state)
  194|   139k|        {
  195|   133k|            case integer_chars_state::initial:
  ------------------
  |  Branch (195:13): [True: 133k, False: 6.87k]
  ------------------
  196|   133k|            {
  197|   133k|                switch(*s)
  198|   133k|                {
  199|  4.94k|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (199:21): [True: 141, False: 132k]
  |  Branch (199:30): [True: 1.12k, False: 131k]
  |  Branch (199:39): [True: 2, False: 133k]
  |  Branch (199:48): [True: 4, False: 133k]
  |  Branch (199:57): [True: 585, False: 132k]
  |  Branch (199:66): [True: 6, False: 133k]
  |  Branch (199:75): [True: 12, False: 133k]
  |  Branch (199:84): [True: 0, False: 133k]
  |  Branch (199:93): [True: 1, False: 133k]
  |  Branch (199:103): [True: 3.06k, False: 129k]
  ------------------
  200|  4.94k|                        state = integer_chars_state::decimal;
  201|  4.94k|                        break;
  202|  1.52k|                    case '-':
  ------------------
  |  Branch (202:21): [True: 1.52k, False: 131k]
  ------------------
  203|  1.52k|                        state = integer_chars_state::minus;
  204|  1.52k|                        break;
  205|   126k|                    default:
  ------------------
  |  Branch (205:21): [True: 126k, False: 6.46k]
  ------------------
  206|   126k|                        return false;
  207|   133k|                }
  208|  6.46k|                break;
  209|   133k|            }
  210|  6.46k|            case integer_chars_state::minus:
  ------------------
  |  Branch (210:13): [True: 1.52k, False: 138k]
  ------------------
  211|  1.52k|            {
  212|  1.52k|                switch(*s)
  213|  1.52k|                {
  214|    198|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (214:21): [True: 27, False: 1.49k]
  |  Branch (214:30): [True: 11, False: 1.51k]
  |  Branch (214:39): [True: 1, False: 1.52k]
  |  Branch (214:48): [True: 0, False: 1.52k]
  |  Branch (214:57): [True: 0, False: 1.52k]
  |  Branch (214:66): [True: 4, False: 1.51k]
  |  Branch (214:75): [True: 1, False: 1.52k]
  |  Branch (214:84): [True: 0, False: 1.52k]
  |  Branch (214:93): [True: 62, False: 1.46k]
  |  Branch (214:103): [True: 92, False: 1.43k]
  ------------------
  215|    198|                        state = integer_chars_state::decimal;
  216|    198|                        break;
  217|  1.32k|                    default:
  ------------------
  |  Branch (217:21): [True: 1.32k, False: 198]
  ------------------
  218|  1.32k|                        return false;
  219|  1.52k|                }
  220|    198|                break;
  221|  1.52k|            }
  222|  5.35k|            case integer_chars_state::decimal:
  ------------------
  |  Branch (222:13): [True: 5.35k, False: 134k]
  ------------------
  223|  5.35k|            {
  224|  5.35k|                switch(*s)
  225|  5.35k|                {
  226|  1.12k|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (226:21): [True: 1.11k, False: 4.23k]
  |  Branch (226:30): [True: 3, False: 5.35k]
  |  Branch (226:39): [True: 1, False: 5.35k]
  |  Branch (226:48): [True: 0, False: 5.35k]
  |  Branch (226:57): [True: 0, False: 5.35k]
  |  Branch (226:66): [True: 0, False: 5.35k]
  |  Branch (226:75): [True: 1, False: 5.35k]
  |  Branch (226:84): [True: 0, False: 5.35k]
  |  Branch (226:93): [True: 1, False: 5.35k]
  |  Branch (226:103): [True: 1, False: 5.35k]
  ------------------
  227|  1.12k|                        break;
  228|  4.22k|                    default:
  ------------------
  |  Branch (228:21): [True: 4.22k, False: 1.12k]
  ------------------
  229|  4.22k|                        return false;
  230|  5.35k|                }
  231|  1.12k|                break;
  232|  5.35k|            }
  233|  1.12k|            default:
  ------------------
  |  Branch (233:13): [True: 0, False: 139k]
  ------------------
  234|      0|                break;
  235|   139k|        }
  236|   139k|    }
  237|  1.13k|    return state == integer_chars_state::decimal ? true : false;
  ------------------
  |  Branch (237:12): [True: 911, False: 222]
  ------------------
  238|   133k|}

_ZN8jsoncons14unicode_traits8validateIcEENSt3__19enable_ifIXsr6nonstd8is_char8IT_EE5valueENS0_14unicode_resultIS4_EEE4typeEPKS4_m:
 1147|  3.19M|    {
 1148|  3.19M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(data);
 1149|  3.19M|        const uint8_t* end = it + length;
 1150|       |
 1151|  3.19M|        unicode_errc  result{};
 1152|  7.19M|        while (it != end) 
  ------------------
  |  Branch (1152:16): [True: 4.00M, False: 3.19M]
  ------------------
 1153|  4.00M|        {
 1154|  4.00M|            if ((end - it) >= 8)
  ------------------
  |  Branch (1154:17): [True: 1.40M, False: 2.59M]
  ------------------
 1155|  1.40M|            {
 1156|  9.76M|                JSONCONS_REPEAT8({if (JSONCONS_LIKELY((*it & 0x80) == 0)) ++it; else goto non_ascii;})
  ------------------
  |  |  326|  2.80M|#define JSONCONS_REPEAT8(x)  { x x x x x x x x }
  |  |  ------------------
  |  |  |  Branch (326:32): [True: 1.40M, False: 1.59k]
  |  |  |  Branch (326:34): [True: 1.39M, False: 2.36k]
  |  |  |  Branch (326:36): [True: 1.39M, False: 832]
  |  |  |  Branch (326:38): [True: 1.39M, False: 4.45k]
  |  |  |  Branch (326:40): [True: 1.39M, False: 888]
  |  |  |  Branch (326:42): [True: 1.39M, False: 1.82k]
  |  |  |  Branch (326:44): [True: 1.38M, False: 1.37k]
  |  |  |  Branch (326:46): [True: 1.38M, False: 1.14k]
  |  |  ------------------
  ------------------
 1157|  1.38M|                continue;
 1158|  9.76M|            }
 1159|  2.61M|    non_ascii:
 1160|  2.61M|            const std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[*it]) + 1;
 1161|  2.61M|            if (len > (std::size_t)(end - it))
  ------------------
  |  Branch (1161:17): [True: 0, False: 2.61M]
  ------------------
 1162|      0|            {
 1163|      0|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it), unicode_errc::source_exhausted};
 1164|      0|            }
 1165|  2.61M|            if ((result=is_legal_utf8(it, len)) != unicode_errc())
  ------------------
  |  Branch (1165:17): [True: 18, False: 2.61M]
  ------------------
 1166|     18|            {
 1167|     18|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1168|     18|            }
 1169|  2.61M|            it += len;
 1170|  2.61M|        }
 1171|  3.19M|        return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1172|  3.19M|    }
_ZN8jsoncons14unicode_traits13is_legal_utf8EPKhm:
  305|  5.20M|    {
  306|  5.20M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(bytes);
  307|  5.20M|        const uint8_t* end = it+length;
  308|       |
  309|  5.20M|        uint8_t byte;
  310|  5.20M|        switch (length) {
  311|     22|        default:
  ------------------
  |  Branch (311:9): [True: 22, False: 5.20M]
  ------------------
  312|     22|            return unicode_errc::over_long_utf8_sequence;
  313|  15.6k|        case 4:
  ------------------
  |  Branch (313:9): [True: 15.6k, False: 5.19M]
  ------------------
  314|  15.6k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (314:17): [True: 2, False: 15.6k]
  ------------------
  315|      2|                return unicode_errc::bad_continuation_byte;
  316|  15.6k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  565|  15.6k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  317|  19.9k|        case 3:
  ------------------
  |  Branch (317:9): [True: 4.25k, False: 5.20M]
  ------------------
  318|  19.9k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (318:17): [True: 1, False: 19.9k]
  ------------------
  319|      1|                return unicode_errc::bad_continuation_byte;
  320|  19.9k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  565|  19.9k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  321|  24.0k|        case 2:
  ------------------
  |  Branch (321:9): [True: 4.09k, False: 5.20M]
  ------------------
  322|  24.0k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (322:17): [True: 2, False: 24.0k]
  ------------------
  323|      2|                return unicode_errc::bad_continuation_byte;
  324|       |
  325|  24.0k|            switch (*it) 
  326|  24.0k|            {
  327|       |                // no fall-through in this inner switch
  328|     65|                case 0xE0: if (byte < 0xA0) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (328:17): [True: 65, False: 23.9k]
  |  Branch (328:32): [True: 0, False: 65]
  ------------------
  329|     65|                case 0xED: if (byte > 0x9F) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (329:17): [True: 58, False: 23.9k]
  |  Branch (329:32): [True: 0, False: 58]
  ------------------
  330|  2.70k|                case 0xF0: if (byte < 0x90) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (330:17): [True: 2.70k, False: 21.3k]
  |  Branch (330:32): [True: 0, False: 2.70k]
  ------------------
  331|  11.5k|                case 0xF4: if (byte > 0x8F) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (331:17): [True: 11.5k, False: 12.4k]
  |  Branch (331:32): [True: 0, False: 11.5k]
  ------------------
  332|  11.5k|                default:   if (byte < 0x80) return unicode_errc::source_illegal;
  ------------------
  |  Branch (332:17): [True: 9.64k, False: 14.3k]
  |  Branch (332:32): [True: 0, False: 9.64k]
  ------------------
  333|  24.0k|            }
  334|       |
  335|  24.0k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  565|  24.0k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  336|  5.20M|        case 1:
  ------------------
  |  Branch (336:9): [True: 5.18M, False: 24.0k]
  ------------------
  337|  5.20M|            if (*it >= 0x80 && *it < 0xC2)
  ------------------
  |  Branch (337:17): [True: 24.0k, False: 5.18M]
  |  Branch (337:32): [True: 15, False: 24.0k]
  ------------------
  338|     15|                return unicode_errc::source_illegal;
  339|  5.20M|            break;
  340|  5.20M|        }
  341|  5.20M|        if (*it > 0xF4) 
  ------------------
  |  Branch (341:13): [True: 0, False: 5.20M]
  ------------------
  342|      0|            return unicode_errc::source_illegal;
  343|       |
  344|  5.20M|        return unicode_errc();
  345|  5.20M|    }
_ZN8jsoncons14unicode_traits8validateIhEENSt3__19enable_ifIXsr6nonstd8is_char8IT_EE5valueENS0_14unicode_resultIS4_EEE4typeEPKS4_m:
 1147|  3.06M|    {
 1148|  3.06M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(data);
 1149|  3.06M|        const uint8_t* end = it + length;
 1150|       |
 1151|  3.06M|        unicode_errc  result{};
 1152|  6.69M|        while (it != end) 
  ------------------
  |  Branch (1152:16): [True: 3.62M, False: 3.06M]
  ------------------
 1153|  3.62M|        {
 1154|  3.62M|            if ((end - it) >= 8)
  ------------------
  |  Branch (1154:17): [True: 1.04M, False: 2.58M]
  ------------------
 1155|  1.04M|            {
 1156|  7.26M|                JSONCONS_REPEAT8({if (JSONCONS_LIKELY((*it & 0x80) == 0)) ++it; else goto non_ascii;})
  ------------------
  |  |  326|  2.08M|#define JSONCONS_REPEAT8(x)  { x x x x x x x x }
  |  |  ------------------
  |  |  |  Branch (326:32): [True: 1.04M, False: 1.11k]
  |  |  |  Branch (326:34): [True: 1.04M, False: 1.46k]
  |  |  |  Branch (326:36): [True: 1.03M, False: 621]
  |  |  |  Branch (326:38): [True: 1.03M, False: 3.30k]
  |  |  |  Branch (326:40): [True: 1.03M, False: 529]
  |  |  |  Branch (326:42): [True: 1.03M, False: 670]
  |  |  |  Branch (326:44): [True: 1.03M, False: 637]
  |  |  |  Branch (326:46): [True: 1.03M, False: 1.05k]
  |  |  ------------------
  ------------------
 1157|  1.03M|                continue;
 1158|  7.26M|            }
 1159|  2.59M|    non_ascii:
 1160|  2.59M|            const std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[*it]) + 1;
 1161|  2.59M|            if (len > (std::size_t)(end - it))
  ------------------
  |  Branch (1161:17): [True: 1, False: 2.59M]
  ------------------
 1162|      1|            {
 1163|      1|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it), unicode_errc::source_exhausted};
 1164|      1|            }
 1165|  2.59M|            if ((result=is_legal_utf8(it, len)) != unicode_errc())
  ------------------
  |  Branch (1165:17): [True: 24, False: 2.59M]
  ------------------
 1166|     24|            {
 1167|     24|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1168|     24|            }
 1169|  2.59M|            it += len;
 1170|  2.59M|        }
 1171|  3.06M|        return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1172|  3.06M|    }

_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEEC2EOS8_RKS9_:
  105|    414|       : basic_ubjson_encoder(std::forward<Sink>(sink), ubjson_encode_options(), alloc)
  106|    414|    {
  107|    414|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEEC2EOS8_RKNS0_21ubjson_encode_optionsERKS9_:
  112|    414|       : sink_(std::forward<Sink>(sink)),
  113|    414|         max_nesting_depth_(static_cast<std::size_t>(options.max_nesting_depth())),
  114|    414|         alloc_(alloc)
  115|    414|    {
  116|    414|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE17visit_begin_arrayEmNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  223|   139k|    {
  224|   139k|        if (JSONCONS_UNLIKELY(stack_.size() >= max_nesting_depth_))
  ------------------
  |  |   79|   139k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (79:30): [True: 0, False: 139k]
  |  |  ------------------
  ------------------
  225|      0|        {
  226|      0|            ec = ubjson_errc::max_nesting_depth_exceeded;
  227|      0|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  228|      0|        } 
  229|   139k|        stack_.emplace_back(container_type::array, length);
  230|   139k|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_array_marker);
  231|   139k|        sink_.push_back(jsoncons::ubjson::ubjson_type::count_marker);
  232|   139k|        put_length(length);
  233|       |
  234|   139k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|   139k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  235|   139k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_itemC2ENS0_14container_typeEm:
   59|  3.31M|           : type_(type), length_(length)
   60|  3.31M|        {
   61|  3.31M|        }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10put_lengthEm:
  329|  3.42M|    {
  330|  3.42M|        if (length <= (std::numeric_limits<uint8_t>::max)())
  ------------------
  |  Branch (330:13): [True: 3.40M, False: 15.3k]
  ------------------
  331|  3.40M|        {
  332|  3.40M|            sink_.push_back(ubjson_type::uint8_type);
  333|  3.40M|            binary::native_to_big(static_cast<uint8_t>(length), std::back_inserter(sink_));
  334|  3.40M|        }
  335|  15.3k|        else if (length <= (std::size_t)(std::numeric_limits<int16_t>::max)())
  ------------------
  |  Branch (335:18): [True: 14.9k, False: 460]
  ------------------
  336|  14.9k|        {
  337|  14.9k|            sink_.push_back(ubjson_type::int16_type);
  338|  14.9k|            binary::native_to_big(static_cast<uint16_t>(length), std::back_inserter(sink_));
  339|  14.9k|        }
  340|    460|        else if (length <= (std::size_t)(std::numeric_limits<int32_t>::max)())
  ------------------
  |  Branch (340:18): [True: 460, False: 0]
  ------------------
  341|    460|        {
  342|    460|            sink_.push_back(ubjson_type::int32_type);
  343|    460|            binary::native_to_big(static_cast<uint32_t>(length),std::back_inserter(sink_));
  344|    460|        }
  345|      0|        else if (length <= (std::size_t)(std::numeric_limits<int64_t>::max)())
  ------------------
  |  Branch (345:18): [True: 0, False: 0]
  ------------------
  346|      0|        {
  347|      0|            sink_.push_back(ubjson_type::int64_type);
  348|      0|            binary::native_to_big(static_cast<uint64_t>(length),std::back_inserter(sink_));
  349|      0|        }
  350|      0|        else
  351|      0|        {
  352|      0|            JSONCONS_THROW(ser_error(ubjson_errc::too_many_items));
  ------------------
  |  |   35|      0|    #define JSONCONS_THROW(exception) throw exception
  ------------------
  353|      0|        }
  354|  3.42M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE15visit_end_arrayERKNS_11ser_contextERNS3_10error_codeE:
  238|  3.19M|    {
  239|  3.19M|        if (JSONCONS_UNLIKELY(stack_.empty() || !stack_.back().is_array()))
  ------------------
  |  |   79|  6.39M|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (79:30): [True: 0, False: 3.19M]
  |  |  |  Branch (79:50): [True: 0, False: 3.19M]
  |  |  |  Branch (79:50): [True: 0, False: 3.19M]
  |  |  ------------------
  ------------------
  240|      0|        {
  241|      0|            ec = ubjson_errc::unmatched_end_array;
  242|      0|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  243|      0|        }
  244|       |
  245|  3.19M|        if (stack_.back().is_indefinite_length())
  ------------------
  |  Branch (245:13): [True: 3.07M, False: 122k]
  ------------------
  246|  3.07M|        {
  247|  3.07M|            sink_.push_back(jsoncons::ubjson::ubjson_type::end_array_marker);
  248|  3.07M|        }
  249|   122k|        else
  250|   122k|        {
  251|   122k|            if (stack_.back().count() < stack_.back().length())
  ------------------
  |  Branch (251:17): [True: 0, False: 122k]
  ------------------
  252|      0|            {
  253|      0|                ec = ubjson_errc::too_few_items;
  254|      0|                JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  255|      0|            }
  256|   122k|            if (stack_.back().count() > stack_.back().length())
  ------------------
  |  Branch (256:17): [True: 0, False: 122k]
  ------------------
  257|      0|            {
  258|      0|                ec = ubjson_errc::too_many_items;
  259|      0|                JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  260|      0|            }
  261|   122k|        }
  262|  3.19M|        stack_.pop_back();
  263|  3.19M|        end_value();
  264|  3.19M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|  3.19M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  265|  3.19M|    }
_ZNK8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_item8is_arrayEv:
   81|  3.19M|        {
   82|  3.19M|            return type_ == container_type::array || type_ == container_type::indefinite_length_array;
  ------------------
  |  Branch (82:20): [True: 122k, False: 3.07M]
  |  Branch (82:54): [True: 3.07M, False: 0]
  ------------------
   83|  3.19M|        }
_ZNK8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_item20is_indefinite_lengthEv:
   86|  3.28M|        {
   87|  3.28M|            return type_ == container_type::indefinite_length_array || type_ == container_type::indefinite_length_object;
  ------------------
  |  Branch (87:20): [True: 3.07M, False: 210k]
  |  Branch (87:72): [True: 1.69k, False: 208k]
  ------------------
   88|  3.28M|        }
_ZNK8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_item5countEv:
   71|   416k|        {
   72|   416k|            return count_;
   73|   416k|        }
_ZNK8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_item6lengthEv:
   66|   416k|        {
   67|   416k|            return length_;
   68|   416k|        }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE9end_valueEv:
  516|  12.0M|    {
  517|  12.0M|        if (!stack_.empty())
  ------------------
  |  Branch (517:13): [True: 12.0M, False: 13]
  ------------------
  518|  12.0M|        {
  519|  12.0M|            ++stack_.back().count_;
  520|  12.0M|        }
  521|  12.0M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE12visit_uint64EmNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  472|   372k|    {
  473|   372k|        if (val <= (std::numeric_limits<uint8_t>::max)())
  ------------------
  |  Branch (473:13): [True: 372k, False: 0]
  ------------------
  474|   372k|        {
  475|   372k|            sink_.push_back(jsoncons::ubjson::ubjson_type::uint8_type);
  476|   372k|            binary::native_to_big(static_cast<uint8_t>(val),std::back_inserter(sink_));
  477|   372k|        }
  478|      0|        else if (val <= static_cast<uint64_t>((std::numeric_limits<int16_t>::max)()))
  ------------------
  |  Branch (478:18): [True: 0, False: 0]
  ------------------
  479|      0|        {
  480|      0|            sink_.push_back(jsoncons::ubjson::ubjson_type::int16_type);
  481|      0|            binary::native_to_big(static_cast<int16_t>(val),std::back_inserter(sink_));
  482|      0|        }
  483|      0|        else if (val <= static_cast<uint64_t>((std::numeric_limits<int32_t>::max)()))
  ------------------
  |  Branch (483:18): [True: 0, False: 0]
  ------------------
  484|      0|        {
  485|      0|            sink_.push_back(jsoncons::ubjson::ubjson_type::int32_type);
  486|      0|            binary::native_to_big(static_cast<int32_t>(val),std::back_inserter(sink_));
  487|      0|        }
  488|      0|        else if (val <= static_cast<uint64_t>((std::numeric_limits<int64_t>::max)()))
  ------------------
  |  Branch (488:18): [True: 0, False: 0]
  ------------------
  489|      0|        {
  490|      0|            sink_.push_back(jsoncons::ubjson::ubjson_type::int64_type);
  491|      0|            binary::native_to_big(static_cast<int64_t>(val),std::back_inserter(sink_));
  492|      0|        }
  493|      0|        else
  494|      0|        {
  495|       |            // too large for int64, write as high-precision number
  496|      0|            std::string s;
  497|      0|            jsoncons::from_integer(val, s);
  498|      0|            sink_.push_back(jsoncons::ubjson::ubjson_type::high_precision_number_type);
  499|      0|            put_length(s.length());
  500|      0|            sink_.append(reinterpret_cast<const uint8_t*>(s.data()), s.size());
  501|      0|        }
  502|   372k|        end_value();
  503|   372k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|   372k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  504|   372k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE11visit_int64ElNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  405|  1.97M|    {
  406|  1.97M|        if (val >= 0)
  ------------------
  |  Branch (406:13): [True: 1.66M, False: 312k]
  ------------------
  407|  1.66M|        {
  408|  1.66M|            if (val <= (std::numeric_limits<uint8_t>::max)())
  ------------------
  |  Branch (408:17): [True: 1.18M, False: 480k]
  ------------------
  409|  1.18M|            {
  410|       |                // uint 8 stores a 8-bit unsigned integer
  411|  1.18M|                sink_.push_back(jsoncons::ubjson::ubjson_type::uint8_type);
  412|  1.18M|                binary::native_to_big(static_cast<uint8_t>(val),std::back_inserter(sink_));
  413|  1.18M|            }
  414|   480k|            else if (val <= (std::numeric_limits<int16_t>::max)())
  ------------------
  |  Branch (414:22): [True: 427k, False: 53.2k]
  ------------------
  415|   427k|            {
  416|       |                // uint 16 stores a 16-bit big-endian unsigned integer
  417|   427k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int16_type);
  418|   427k|                binary::native_to_big(static_cast<int16_t>(val),std::back_inserter(sink_));
  419|   427k|            }
  420|  53.2k|            else if (val <= (std::numeric_limits<int32_t>::max)())
  ------------------
  |  Branch (420:22): [True: 41.6k, False: 11.6k]
  ------------------
  421|  41.6k|            {
  422|       |                // uint 32 stores a 32-bit big-endian unsigned integer
  423|  41.6k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int32_type);
  424|  41.6k|                binary::native_to_big(static_cast<int32_t>(val),std::back_inserter(sink_));
  425|  41.6k|            }
  426|  11.6k|            else if (val <= (std::numeric_limits<int64_t>::max)())
  ------------------
  |  Branch (426:22): [True: 11.6k, False: 0]
  ------------------
  427|  11.6k|            {
  428|       |                // int 64 stores a 64-bit big-endian signed integer
  429|  11.6k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int64_type);
  430|  11.6k|                binary::native_to_big(val,std::back_inserter(sink_));
  431|  11.6k|            }
  432|      0|            else
  433|      0|            {
  434|       |                // big integer
  435|      0|            }
  436|  1.66M|        }
  437|   312k|        else
  438|   312k|        {
  439|   312k|            if (val >= (std::numeric_limits<int8_t>::lowest)())
  ------------------
  |  Branch (439:17): [True: 69.5k, False: 242k]
  ------------------
  440|  69.5k|            {
  441|       |                // int 8 stores a 8-bit signed integer
  442|  69.5k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int8_type);
  443|  69.5k|                binary::native_to_big(static_cast<int8_t>(val),std::back_inserter(sink_));
  444|  69.5k|            }
  445|   242k|            else if (val >= (std::numeric_limits<int16_t>::lowest)())
  ------------------
  |  Branch (445:22): [True: 173k, False: 68.8k]
  ------------------
  446|   173k|            {
  447|       |                // int 16 stores a 16-bit big-endian signed integer
  448|   173k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int16_type);
  449|   173k|                binary::native_to_big(static_cast<int16_t>(val),std::back_inserter(sink_));
  450|   173k|            }
  451|  68.8k|            else if (val >= (std::numeric_limits<int32_t>::lowest)())
  ------------------
  |  Branch (451:22): [True: 55.1k, False: 13.7k]
  ------------------
  452|  55.1k|            {
  453|       |                // int 32 stores a 32-bit big-endian signed integer
  454|  55.1k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int32_type);
  455|  55.1k|                binary::native_to_big(static_cast<int32_t>(val),std::back_inserter(sink_));
  456|  55.1k|            }
  457|  13.7k|            else if (val >= (std::numeric_limits<int64_t>::lowest)())
  ------------------
  |  Branch (457:22): [True: 13.7k, False: 0]
  ------------------
  458|  13.7k|            {
  459|       |                // int 64 stores a 64-bit big-endian signed integer
  460|  13.7k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int64_type);
  461|  13.7k|                binary::native_to_big(val,std::back_inserter(sink_));
  462|  13.7k|            }
  463|   312k|        }
  464|  1.97M|        end_value();
  465|  1.97M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|  1.97M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  466|  1.97M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE12visit_doubleEdNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  382|  35.7k|    {
  383|  35.7k|        float valf = (float)val;
  384|  35.7k|        if ((double)valf == val)
  ------------------
  |  Branch (384:13): [True: 21.5k, False: 14.2k]
  ------------------
  385|  21.5k|        {
  386|       |            // float 32
  387|  21.5k|            sink_.push_back(static_cast<uint8_t>(jsoncons::ubjson::ubjson_type::float32_type));
  388|  21.5k|            binary::native_to_big(valf,std::back_inserter(sink_));
  389|  21.5k|        }
  390|  14.2k|        else
  391|  14.2k|        {
  392|       |            // float 64
  393|  14.2k|            sink_.push_back(static_cast<uint8_t>(jsoncons::ubjson::ubjson_type::float64_type));
  394|  14.2k|            binary::native_to_big(val,std::back_inserter(sink_));
  395|  14.2k|        }
  396|       |
  397|       |        // write double
  398|       |
  399|  35.7k|        end_value();
  400|  35.7k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|  35.7k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  401|  35.7k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE11visit_flushEv:
  147|     13|    {
  148|     13|        sink_.flush();
  149|     13|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE18visit_begin_objectENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  152|  2.37k|    {
  153|  2.37k|        if (JSONCONS_UNLIKELY(stack_.size() >= max_nesting_depth_))
  ------------------
  |  |   79|  2.37k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (79:30): [True: 0, False: 2.37k]
  |  |  ------------------
  ------------------
  154|      0|        {
  155|      0|            ec = ubjson_errc::max_nesting_depth_exceeded;
  156|      0|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  157|      0|        } 
  158|  2.37k|        stack_.emplace_back(container_type::indefinite_length_object);
  159|  2.37k|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_object_marker);
  160|       |
  161|  2.37k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|  2.37k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  162|  2.37k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE18visit_begin_objectEmNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  165|  85.9k|    {
  166|  85.9k|        if (JSONCONS_UNLIKELY(stack_.size() >= max_nesting_depth_))
  ------------------
  |  |   79|  85.9k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (79:30): [True: 0, False: 85.9k]
  |  |  ------------------
  ------------------
  167|      0|        {
  168|      0|            ec = ubjson_errc::max_nesting_depth_exceeded;
  169|      0|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  170|      0|        } 
  171|  85.9k|        stack_.emplace_back(container_type::object, length);
  172|  85.9k|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_object_marker);
  173|  85.9k|        sink_.push_back(jsoncons::ubjson::ubjson_type::count_marker);
  174|  85.9k|        put_length(length);
  175|       |
  176|  85.9k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|  85.9k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  177|  85.9k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE16visit_end_objectERKNS_11ser_contextERNS3_10error_codeE:
  180|  87.2k|    {
  181|  87.2k|        if (JSONCONS_UNLIKELY(stack_.empty() || !stack_.back().is_object()))
  ------------------
  |  |   79|   174k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (79:30): [True: 0, False: 87.2k]
  |  |  |  Branch (79:50): [True: 0, False: 87.2k]
  |  |  |  Branch (79:50): [True: 0, False: 87.2k]
  |  |  ------------------
  ------------------
  182|      0|        {
  183|      0|            ec = ubjson_errc::unmatched_end_object;
  184|      0|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  185|      0|        }
  186|       |
  187|  87.2k|        if (stack_.back().is_indefinite_length())
  ------------------
  |  Branch (187:13): [True: 1.69k, False: 85.5k]
  ------------------
  188|  1.69k|        {
  189|  1.69k|            sink_.push_back(jsoncons::ubjson::ubjson_type::end_object_marker);
  190|  1.69k|        }
  191|  85.5k|        else
  192|  85.5k|        {
  193|  85.5k|            if (stack_.back().count() < stack_.back().length())
  ------------------
  |  Branch (193:17): [True: 0, False: 85.5k]
  ------------------
  194|      0|            {
  195|      0|                ec = ubjson_errc::too_few_items;
  196|      0|                JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  197|      0|            }
  198|  85.5k|            if (stack_.back().count() > stack_.back().length())
  ------------------
  |  Branch (198:17): [True: 0, False: 85.5k]
  ------------------
  199|      0|            {
  200|      0|                ec = ubjson_errc::too_many_items;
  201|      0|                JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  202|      0|            }
  203|  85.5k|        }
  204|  87.2k|        stack_.pop_back();
  205|  87.2k|        end_value();
  206|  87.2k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|  87.2k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  207|  87.2k|    }
_ZNK8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_item9is_objectEv:
   76|  87.2k|        {
   77|  87.2k|            return type_ == container_type::object || type_ == container_type::indefinite_length_object;
  ------------------
  |  Branch (77:20): [True: 85.5k, False: 1.69k]
  |  Branch (77:55): [True: 1.69k, False: 0]
  ------------------
   78|  87.2k|        }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE17visit_begin_arrayENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  210|  3.08M|    {
  211|  3.08M|        if (JSONCONS_UNLIKELY(stack_.size() >= max_nesting_depth_))
  ------------------
  |  |   79|  3.08M|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (79:30): [True: 0, False: 3.08M]
  |  |  ------------------
  ------------------
  212|      0|        {
  213|      0|            ec = ubjson_errc::max_nesting_depth_exceeded;
  214|      0|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  215|      0|        } 
  216|  3.08M|        stack_.emplace_back(container_type::indefinite_length_array);
  217|  3.08M|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_array_marker);
  218|       |
  219|  3.08M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|  3.08M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  220|  3.08M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE9visit_keyERKNS3_17basic_string_viewIcNS3_11char_traitsIcEEEERKNS_11ser_contextERNS3_10error_codeE:
  268|   541k|    {
  269|   541k|        auto sink = unicode_traits::validate(name.data(), name.size());
  270|   541k|        if (sink.ec != unicode_traits::unicode_errc())
  ------------------
  |  Branch (270:13): [True: 0, False: 541k]
  ------------------
  271|      0|        {
  272|      0|            ec = ubjson_errc::invalid_utf8_text_string;
  273|      0|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  274|      0|        }
  275|       |
  276|   541k|        put_length(name.length());
  277|       |
  278|   541k|        for (auto c : name)
  ------------------
  |  Branch (278:21): [True: 6.94M, False: 541k]
  ------------------
  279|  6.94M|        {
  280|  6.94M|            sink_.push_back(c);
  281|  6.94M|        }
  282|   541k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|   541k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  283|   541k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10visit_nullENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  286|  3.52M|    {
  287|       |        // nil
  288|  3.52M|        binary::native_to_big(static_cast<uint8_t>(jsoncons::ubjson::ubjson_type::null_type), std::back_inserter(sink_));
  289|  3.52M|        end_value();
  290|  3.52M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|  3.52M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  291|  3.52M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10visit_boolEbNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  507|   219k|    {
  508|       |        // true and false
  509|   219k|        sink_.push_back(static_cast<uint8_t>(val ? jsoncons::ubjson::ubjson_type::true_type : jsoncons::ubjson::ubjson_type::false_type));
  ------------------
  |  Branch (509:46): [True: 163k, False: 55.4k]
  ------------------
  510|       |
  511|   219k|        end_value();
  512|   219k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|   219k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  513|   219k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE12visit_stringERKNS3_17basic_string_viewIcNS3_11char_traitsIcEEEENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  294|  2.65M|    {
  295|  2.65M|        switch (tag)
  296|  2.65M|        {
  297|    911|            case semantic_tag::bigint:
  ------------------
  |  Branch (297:13): [True: 911, False: 2.65M]
  ------------------
  298|   133k|            case semantic_tag::bigdec:
  ------------------
  |  Branch (298:13): [True: 132k, False: 2.52M]
  ------------------
  299|   133k|            {
  300|   133k|                sink_.push_back(jsoncons::ubjson::ubjson_type::high_precision_number_type);
  301|   133k|                break;
  302|    911|            }
  303|  2.51M|            default:
  ------------------
  |  Branch (303:13): [True: 2.51M, False: 133k]
  ------------------
  304|  2.51M|            {
  305|  2.51M|                sink_.push_back(jsoncons::ubjson::ubjson_type::string_type);
  306|  2.51M|                break;
  307|    911|            }
  308|  2.65M|        }
  309|       |
  310|  2.65M|        auto sink = unicode_traits::validate(sv.data(), sv.size());
  311|  2.65M|        if (sink.ec != unicode_traits::unicode_errc())
  ------------------
  |  Branch (311:13): [True: 18, False: 2.65M]
  ------------------
  312|     18|        {
  313|     18|            ec = ubjson_errc::invalid_utf8_text_string;
  314|     18|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|     18|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  315|     18|        }
  316|       |
  317|  2.65M|        put_length(sv.length());
  318|       |
  319|  2.65M|        for (auto c : sv)
  ------------------
  |  Branch (319:21): [True: 6.80M, False: 2.65M]
  ------------------
  320|  6.80M|        {
  321|  6.80M|            sink_.push_back(c);
  322|  6.80M|        }
  323|       |
  324|  2.65M|        end_value();
  325|  2.65M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  321|  2.65M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  326|  2.65M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEED2Ev:
  119|    414|    {
  120|    414|        JSONCONS_TRY
  ------------------
  |  |   37|    414|    #define JSONCONS_TRY try
  ------------------
  121|    414|        {
  122|    414|            sink_.flush();
  123|    414|        }
  124|    414|        JSONCONS_CATCH(...)
  125|    414|        {
  126|      0|        }
  127|    414|    }

_ZN8jsoncons6ubjson15make_error_codeENS0_11ubjson_errcE:
   96|    408|{
   97|    408|    return std::error_code(static_cast<int>(e),ubjson_error_category());
   98|    408|}
_ZN8jsoncons6ubjson21ubjson_error_categoryEv:
   89|    408|{
   90|    408|  static ubjson_error_category_impl instance;
   91|    408|  return instance;
   92|    408|}

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

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

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

