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

_ZNK8jsoncons6detail4spanIKhLm18446744073709551615EE4sizeEv:
  116|  2.14M|        {
  117|  2.14M|            return size_;
  118|  2.14M|        }
_ZN8jsoncons6detail4spanIKhLm18446744073709551615EEC2Ev:
   58|   532k|        {
   59|   532k|        }
_ZN8jsoncons6detail4spanIKhLm18446744073709551615EEC2EPS2_m:
   61|   183k|            : data_(data), size_(size)
   62|   183k|        {
   63|   183k|        }
_ZNK8jsoncons6detail4spanIKhLm18446744073709551615EE4dataEv:
  111|  1.43M|        {
  112|  1.43M|            return data_;
  113|  1.43M|        }

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

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

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

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

_ZN8jsoncons6binary13native_to_bigIhNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  11.1M|    {
  128|  11.1M|        T val2 = byte_swap(val);
  129|  11.1M|        uint8_t buf[sizeof(T)];
  130|  11.1M|        std::memcpy(buf, &val2, sizeof(T));
  131|  11.1M|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 11.1M, False: 11.1M]
  ------------------
  132|  11.1M|        {
  133|  11.1M|            *d_first++ = item;
  134|  11.1M|        }
  135|  11.1M|    }
_ZN8jsoncons6binary9byte_swapIhEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  11.1M|    {
   22|  11.1M|        return val;
   23|  11.1M|    }
_ZN8jsoncons6binary13native_to_bigItNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_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: 28.5k, False: 14.2k]
  ------------------
  132|  28.5k|        {
  133|  28.5k|            *d_first++ = item;
  134|  28.5k|        }
  135|  14.2k|    }
_ZN8jsoncons6binary9byte_swapItEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  14.2k|    {
   29|  14.2k|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  14.2k|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  14.2k|#      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.2k|    }
_ZN8jsoncons6binary13native_to_bigIjNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|    437|    {
  128|    437|        T val2 = byte_swap(val);
  129|    437|        uint8_t buf[sizeof(T)];
  130|    437|        std::memcpy(buf, &val2, sizeof(T));
  131|    437|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 1.74k, False: 437]
  ------------------
  132|  1.74k|        {
  133|  1.74k|            *d_first++ = item;
  134|  1.74k|        }
  135|    437|    }
_ZN8jsoncons6binary9byte_swapIjEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|  50.4k|    {
   40|  50.4k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|  50.4k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|  50.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|  50.4k|    }
_ZN8jsoncons6binary9byte_swapImEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  23.4k|    {
   52|  23.4k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  23.4k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  23.4k|#  define JSONCONS_BYTE_SWAP_64 __builtin_bswap64
  ------------------
   54|       |    #else
   55|       |        uint64_t tmp = ((static_cast<uint64_t>(val) & 0x00000000ffffffffull) << 32) | ((static_cast<uint64_t>(val) & 0xffffffff00000000ull) >> 32);
   56|       |        tmp = ((tmp & 0x0000ffff0000ffffull) << 16) | ((tmp & 0xffff0000ffff0000ull) >> 16);
   57|       |        return ((tmp & 0x00ff00ff00ff00ffull) << 8)  | ((tmp & 0xff00ff00ff00ff00ull) >> 8);
   58|       |    #endif
   59|  23.4k|    }
_ZN8jsoncons6binary13native_to_bigIsNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   911k|    {
  128|   911k|        T val2 = byte_swap(val);
  129|   911k|        uint8_t buf[sizeof(T)];
  130|   911k|        std::memcpy(buf, &val2, sizeof(T));
  131|   911k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 1.82M, False: 911k]
  ------------------
  132|  1.82M|        {
  133|  1.82M|            *d_first++ = item;
  134|  1.82M|        }
  135|   911k|    }
_ZN8jsoncons6binary9byte_swapIsEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  2.09M|    {
   29|  2.09M|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  2.09M|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  2.09M|#      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|  2.09M|    }
_ZN8jsoncons6binary13native_to_bigIiNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  91.0k|    {
  128|  91.0k|        T val2 = byte_swap(val);
  129|  91.0k|        uint8_t buf[sizeof(T)];
  130|  91.0k|        std::memcpy(buf, &val2, sizeof(T));
  131|  91.0k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 364k, False: 91.0k]
  ------------------
  132|   364k|        {
  133|   364k|            *d_first++ = item;
  134|   364k|        }
  135|  91.0k|    }
_ZN8jsoncons6binary9byte_swapIiEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|   185k|    {
   40|   185k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|   185k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|   185k|#  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|   185k|    }
_ZN8jsoncons6binary13native_to_bigIlNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  24.7k|    {
  128|  24.7k|        T val2 = byte_swap(val);
  129|  24.7k|        uint8_t buf[sizeof(T)];
  130|  24.7k|        std::memcpy(buf, &val2, sizeof(T));
  131|  24.7k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 197k, False: 24.7k]
  ------------------
  132|   197k|        {
  133|   197k|            *d_first++ = item;
  134|   197k|        }
  135|  24.7k|    }
_ZN8jsoncons6binary9byte_swapIlEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  50.4k|    {
   52|  50.4k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  50.4k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  50.4k|#  define JSONCONS_BYTE_SWAP_64 __builtin_bswap64
  ------------------
   54|       |    #else
   55|       |        uint64_t tmp = ((static_cast<uint64_t>(val) & 0x00000000ffffffffull) << 32) | ((static_cast<uint64_t>(val) & 0xffffffff00000000ull) >> 32);
   56|       |        tmp = ((tmp & 0x0000ffff0000ffffull) << 16) | ((tmp & 0xffff0000ffff0000ull) >> 16);
   57|       |        return ((tmp & 0x00ff00ff00ff00ffull) << 8)  | ((tmp & 0xff00ff00ff00ff00ull) >> 8);
   58|       |    #endif
   59|  50.4k|    }
_ZN8jsoncons6binary13native_to_bigIaNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   139k|    {
  128|   139k|        T val2 = byte_swap(val);
  129|   139k|        uint8_t buf[sizeof(T)];
  130|   139k|        std::memcpy(buf, &val2, sizeof(T));
  131|   139k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 139k, False: 139k]
  ------------------
  132|   139k|        {
  133|   139k|            *d_first++ = item;
  134|   139k|        }
  135|   139k|    }
_ZN8jsoncons6binary9byte_swapIaEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  1.40M|    {
   22|  1.40M|        return val;
   23|  1.40M|    }
_ZN8jsoncons6binary13native_to_bigIfNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  22.4k|    {
  128|  22.4k|        T val2 = byte_swap(val);
  129|  22.4k|        uint8_t buf[sizeof(T)];
  130|  22.4k|        std::memcpy(buf, &val2, sizeof(T));
  131|  22.4k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 89.6k, False: 22.4k]
  ------------------
  132|  89.6k|        {
  133|  89.6k|            *d_first++ = item;
  134|  89.6k|        }
  135|  22.4k|    }
_ZN8jsoncons6binary9byte_swapIfEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   64|  50.0k|    {
   65|  50.0k|        uint32_t x;
   66|  50.0k|        std::memcpy(&x,&val,sizeof(uint32_t));
   67|  50.0k|        uint32_t y = byte_swap(x);
   68|  50.0k|        T val2;
   69|  50.0k|        std::memcpy(&val2,&y,sizeof(uint32_t));
   70|  50.0k|        return val2;
   71|  50.0k|    }
_ZN8jsoncons6binary13native_to_bigIdNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  14.3k|    {
  128|  14.3k|        T val2 = byte_swap(val);
  129|  14.3k|        uint8_t buf[sizeof(T)];
  130|  14.3k|        std::memcpy(buf, &val2, sizeof(T));
  131|  14.3k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 114k, False: 14.3k]
  ------------------
  132|   114k|        {
  133|   114k|            *d_first++ = item;
  134|   114k|        }
  135|  14.3k|    }
_ZN8jsoncons6binary9byte_swapIdEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   76|  23.4k|    {
   77|  23.4k|        uint64_t x;
   78|  23.4k|        std::memcpy(&x,&val,sizeof(uint64_t));
   79|  23.4k|        uint64_t y = byte_swap(x);
   80|  23.4k|        T val2;
   81|  23.4k|        std::memcpy(&val2,&y,sizeof(uint64_t));
   82|  23.4k|        return val2;
   83|  23.4k|    }
_ZN8jsoncons6binary13big_to_nativeIaNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  1.26M|    {
  183|  1.26M|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 1.26M]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  1.26M|        T val;
  188|  1.26M|        std::memcpy(&val,first,sizeof(T));
  189|  1.26M|        return byte_swap(val);
  190|  1.26M|    }
_ZN8jsoncons6binary13big_to_nativeIsNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  1.18M|    {
  183|  1.18M|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 1.18M]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  1.18M|        T val;
  188|  1.18M|        std::memcpy(&val,first,sizeof(T));
  189|  1.18M|        return byte_swap(val);
  190|  1.18M|    }
_ZN8jsoncons6binary13big_to_nativeIiNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  94.6k|    {
  183|  94.6k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 94.6k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  94.6k|        T val;
  188|  94.6k|        std::memcpy(&val,first,sizeof(T));
  189|  94.6k|        return byte_swap(val);
  190|  94.6k|    }
_ZN8jsoncons6binary13big_to_nativeIlNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  25.6k|    {
  183|  25.6k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 25.6k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  25.6k|        T val;
  188|  25.6k|        std::memcpy(&val,first,sizeof(T));
  189|  25.6k|        return byte_swap(val);
  190|  25.6k|    }
_ZN8jsoncons6binary13big_to_nativeIfNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  27.6k|    {
  183|  27.6k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 27.6k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  27.6k|        T val;
  188|  27.6k|        std::memcpy(&val,first,sizeof(T));
  189|  27.6k|        return byte_swap(val);
  190|  27.6k|    }
_ZN8jsoncons6binary13big_to_nativeIdNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  9.10k|    {
  183|  9.10k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 9.10k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  9.10k|        T val;
  188|  9.10k|        std::memcpy(&val,first,sizeof(T));
  189|  9.10k|        return byte_swap(val);
  190|  9.10k|    }

_ZN8jsoncons9is_base10IhEEbPKT_m:
  164|   156k|{
  165|   156k|    integer_chars_state state = integer_chars_state::initial;
  166|       |
  167|   156k|    const CharT* end = s + length; 
  168|   165k|    for (;s < end; ++s)
  ------------------
  |  Branch (168:11): [True: 164k, False: 957]
  ------------------
  169|   164k|    {
  170|   164k|        switch(state)
  171|   164k|        {
  172|   156k|            case integer_chars_state::initial:
  ------------------
  |  Branch (172:13): [True: 156k, False: 7.82k]
  ------------------
  173|   156k|            {
  174|   156k|                switch(*s)
  175|   156k|                {
  176|  5.89k|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (176:21): [True: 201, False: 156k]
  |  Branch (176:30): [True: 1.32k, False: 155k]
  |  Branch (176:39): [True: 9, False: 156k]
  |  Branch (176:48): [True: 7, False: 156k]
  |  Branch (176:57): [True: 487, False: 155k]
  |  Branch (176:66): [True: 6, False: 156k]
  |  Branch (176:75): [True: 31, False: 156k]
  |  Branch (176:84): [True: 0, False: 156k]
  |  Branch (176:93): [True: 0, False: 156k]
  |  Branch (176:103): [True: 3.82k, False: 152k]
  ------------------
  177|  5.89k|                        state = integer_chars_state::decimal;
  178|  5.89k|                        break;
  179|  1.31k|                    case '-':
  ------------------
  |  Branch (179:21): [True: 1.31k, False: 155k]
  ------------------
  180|  1.31k|                        state = integer_chars_state::minus;
  181|  1.31k|                        break;
  182|   149k|                    default:
  ------------------
  |  Branch (182:21): [True: 149k, False: 7.20k]
  ------------------
  183|   149k|                        return false;
  184|   156k|                }
  185|  7.20k|                break;
  186|   156k|            }
  187|  7.20k|            case integer_chars_state::minus:
  ------------------
  |  Branch (187:13): [True: 1.31k, False: 162k]
  ------------------
  188|  1.31k|            {
  189|  1.31k|                switch(*s)
  190|  1.31k|                {
  191|    115|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (191:21): [True: 27, False: 1.28k]
  |  Branch (191:30): [True: 5, False: 1.30k]
  |  Branch (191:39): [True: 0, False: 1.31k]
  |  Branch (191:48): [True: 0, False: 1.31k]
  |  Branch (191:57): [True: 0, False: 1.31k]
  |  Branch (191:66): [True: 7, False: 1.30k]
  |  Branch (191:75): [True: 1, False: 1.30k]
  |  Branch (191:84): [True: 0, False: 1.31k]
  |  Branch (191:93): [True: 30, False: 1.28k]
  |  Branch (191:103): [True: 45, False: 1.26k]
  ------------------
  192|    115|                        state = integer_chars_state::decimal;
  193|    115|                        break;
  194|  1.19k|                    default:
  ------------------
  |  Branch (194:21): [True: 1.19k, False: 115]
  ------------------
  195|  1.19k|                        return false;
  196|  1.31k|                }
  197|    115|                break;
  198|  1.31k|            }
  199|  6.51k|            case integer_chars_state::decimal:
  ------------------
  |  Branch (199:13): [True: 6.51k, False: 157k]
  ------------------
  200|  6.51k|            {
  201|  6.51k|                switch(*s)
  202|  6.51k|                {
  203|  1.28k|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (203:21): [True: 1.27k, False: 5.24k]
  |  Branch (203:30): [True: 7, False: 6.50k]
  |  Branch (203:39): [True: 0, False: 6.51k]
  |  Branch (203:48): [True: 0, False: 6.51k]
  |  Branch (203:57): [True: 0, False: 6.51k]
  |  Branch (203:66): [True: 0, False: 6.51k]
  |  Branch (203:75): [True: 1, False: 6.51k]
  |  Branch (203:84): [True: 0, False: 6.51k]
  |  Branch (203:93): [True: 0, False: 6.51k]
  |  Branch (203:103): [True: 1, False: 6.51k]
  ------------------
  204|  1.28k|                        break;
  205|  5.23k|                    default:
  ------------------
  |  Branch (205:21): [True: 5.23k, False: 1.28k]
  ------------------
  206|  5.23k|                        return false;
  207|  6.51k|                }
  208|  1.28k|                break;
  209|  6.51k|            }
  210|  1.28k|            default:
  ------------------
  |  Branch (210:13): [True: 0, False: 164k]
  ------------------
  211|      0|                break;
  212|   164k|        }
  213|   164k|    }
  214|    957|    return state == integer_chars_state::decimal ? true : false;
  ------------------
  |  Branch (214:12): [True: 774, False: 183]
  ------------------
  215|   156k|}

_ZN8jsoncons14unicode_traits8validateIcEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14unicode_resultIS4_EEE4typeEPKS4_m:
 1147|  4.08M|    {
 1148|  4.08M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(data);
 1149|  4.08M|        const uint8_t* end = it + length;
 1150|       |
 1151|  4.08M|        unicode_errc  result{};
 1152|  8.90M|        while (it != end) 
  ------------------
  |  Branch (1152:16): [True: 4.82M, False: 4.08M]
  ------------------
 1153|  4.82M|        {
 1154|  4.82M|            if ((end - it) >= 8)
  ------------------
  |  Branch (1154:17): [True: 1.37M, False: 3.45M]
  ------------------
 1155|  1.37M|            {
 1156|  9.54M|                JSONCONS_REPEAT8({if (JSONCONS_LIKELY((*it & 0x80) == 0)) ++it; else goto non_ascii;})
  ------------------
  |  |  281|  2.75M|#define JSONCONS_REPEAT8(x)  { x x x x x x x x }
  |  |  ------------------
  |  |  |  Branch (281:32): [True: 1.37M, False: 2.70k]
  |  |  |  Branch (281:34): [True: 1.36M, False: 3.08k]
  |  |  |  Branch (281:36): [True: 1.36M, False: 1.20k]
  |  |  |  Branch (281:38): [True: 1.36M, False: 7.06k]
  |  |  |  Branch (281:40): [True: 1.36M, False: 1.08k]
  |  |  |  Branch (281:42): [True: 1.35M, False: 1.49k]
  |  |  |  Branch (281:44): [True: 1.35M, False: 1.45k]
  |  |  |  Branch (281:46): [True: 1.35M, False: 1.46k]
  |  |  ------------------
  ------------------
 1157|  1.35M|                continue;
 1158|  9.54M|            }
 1159|  3.47M|    non_ascii:
 1160|  3.47M|            const std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[*it]) + 1;
 1161|  3.47M|            if (len > (std::size_t)(end - it))
  ------------------
  |  Branch (1161:17): [True: 0, False: 3.47M]
  ------------------
 1162|      0|            {
 1163|      0|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it), unicode_errc::source_exhausted};
 1164|      0|            }
 1165|  3.47M|            if ((result=is_legal_utf8(it, len)) != unicode_errc())
  ------------------
  |  Branch (1165:17): [True: 21, False: 3.47M]
  ------------------
 1166|     21|            {
 1167|     21|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1168|     21|            }
 1169|  3.47M|            it += len;
 1170|  3.47M|        }
 1171|  4.08M|        return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1172|  4.08M|    }
_ZN8jsoncons14unicode_traits13is_legal_utf8EPKhm:
  305|  6.92M|    {
  306|  6.92M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(bytes);
  307|  6.92M|        const uint8_t* end = it+length;
  308|       |
  309|  6.92M|        uint8_t byte;
  310|  6.92M|        switch (length) {
  311|     28|        default:
  ------------------
  |  Branch (311:9): [True: 28, False: 6.92M]
  ------------------
  312|     28|            return unicode_errc::over_long_utf8_sequence;
  313|  27.9k|        case 4:
  ------------------
  |  Branch (313:9): [True: 27.9k, False: 6.90M]
  ------------------
  314|  27.9k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (314:17): [True: 1, False: 27.9k]
  ------------------
  315|      1|                return unicode_errc::bad_continuation_byte;
  316|  27.9k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  27.9k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  317|  35.7k|        case 3:
  ------------------
  |  Branch (317:9): [True: 7.76k, False: 6.92M]
  ------------------
  318|  35.7k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (318:17): [True: 0, False: 35.7k]
  ------------------
  319|      0|                return unicode_errc::bad_continuation_byte;
  320|  35.7k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  35.7k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  321|  38.7k|        case 2:
  ------------------
  |  Branch (321:9): [True: 3.04k, False: 6.92M]
  ------------------
  322|  38.7k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (322:17): [True: 2, False: 38.7k]
  ------------------
  323|      2|                return unicode_errc::bad_continuation_byte;
  324|       |
  325|  38.7k|            switch (*it) 
  326|  38.7k|            {
  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: 38.7k]
  |  Branch (328:32): [True: 0, False: 65]
  ------------------
  329|     74|                case 0xED: if (byte > 0x9F) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (329:17): [True: 74, False: 38.7k]
  |  Branch (329:32): [True: 0, False: 74]
  ------------------
  330|  5.31k|                case 0xF0: if (byte < 0x90) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (330:17): [True: 5.31k, False: 33.4k]
  |  Branch (330:32): [True: 0, False: 5.31k]
  ------------------
  331|  22.4k|                case 0xF4: if (byte > 0x8F) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (331:17): [True: 22.4k, False: 16.3k]
  |  Branch (331:32): [True: 0, False: 22.4k]
  ------------------
  332|  22.4k|                default:   if (byte < 0x80) return unicode_errc::source_illegal;
  ------------------
  |  Branch (332:17): [True: 10.8k, False: 27.9k]
  |  Branch (332:32): [True: 0, False: 10.8k]
  ------------------
  333|  38.7k|            }
  334|       |
  335|  38.7k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  38.7k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  336|  6.92M|        case 1:
  ------------------
  |  Branch (336:9): [True: 6.88M, False: 38.8k]
  ------------------
  337|  6.92M|            if (*it >= 0x80 && *it < 0xC2)
  ------------------
  |  Branch (337:17): [True: 38.8k, False: 6.88M]
  |  Branch (337:32): [True: 14, False: 38.7k]
  ------------------
  338|     14|                return unicode_errc::source_illegal;
  339|  6.92M|            break;
  340|  6.92M|        }
  341|  6.92M|        if (*it > 0xF4) 
  ------------------
  |  Branch (341:13): [True: 0, False: 6.92M]
  ------------------
  342|      0|            return unicode_errc::source_illegal;
  343|       |
  344|  6.92M|        return unicode_errc();
  345|  6.92M|    }
_ZN8jsoncons14unicode_traits8validateIhEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14unicode_resultIS4_EEE4typeEPKS4_m:
 1147|  3.92M|    {
 1148|  3.92M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(data);
 1149|  3.92M|        const uint8_t* end = it + length;
 1150|       |
 1151|  3.92M|        unicode_errc  result{};
 1152|  8.54M|        while (it != end) 
  ------------------
  |  Branch (1152:16): [True: 4.61M, False: 3.92M]
  ------------------
 1153|  4.61M|        {
 1154|  4.61M|            if ((end - it) >= 8)
  ------------------
  |  Branch (1154:17): [True: 1.17M, False: 3.43M]
  ------------------
 1155|  1.17M|            {
 1156|  8.14M|                JSONCONS_REPEAT8({if (JSONCONS_LIKELY((*it & 0x80) == 0)) ++it; else goto non_ascii;})
  ------------------
  |  |  281|  2.34M|#define JSONCONS_REPEAT8(x)  { x x x x x x x x }
  |  |  ------------------
  |  |  |  Branch (281:32): [True: 1.17M, False: 2.61k]
  |  |  |  Branch (281:34): [True: 1.16M, False: 3.00k]
  |  |  |  Branch (281:36): [True: 1.16M, False: 1.18k]
  |  |  |  Branch (281:38): [True: 1.16M, False: 6.88k]
  |  |  |  Branch (281:40): [True: 1.15M, False: 1.05k]
  |  |  |  Branch (281:42): [True: 1.15M, False: 1.46k]
  |  |  |  Branch (281:44): [True: 1.15M, False: 1.43k]
  |  |  |  Branch (281:46): [True: 1.15M, False: 1.44k]
  |  |  ------------------
  ------------------
 1157|  1.15M|                continue;
 1158|  8.14M|            }
 1159|  3.45M|    non_ascii:
 1160|  3.45M|            const std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[*it]) + 1;
 1161|  3.45M|            if (len > (std::size_t)(end - it))
  ------------------
  |  Branch (1161:17): [True: 1, False: 3.45M]
  ------------------
 1162|      1|            {
 1163|      1|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it), unicode_errc::source_exhausted};
 1164|      1|            }
 1165|  3.45M|            if ((result=is_legal_utf8(it, len)) != unicode_errc())
  ------------------
  |  Branch (1165:17): [True: 24, False: 3.45M]
  ------------------
 1166|     24|            {
 1167|     24|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1168|     24|            }
 1169|  3.45M|            it += len;
 1170|  3.45M|        }
 1171|  3.92M|        return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1172|  3.92M|    }

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

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

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

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

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

