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

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

_ZN8jsoncons18basic_json_visitorIcEC2Ev:
  103|    429|        basic_json_visitor() = default;
_ZN8jsoncons19typed_array_visitorD2Ev:
   33|    429|        virtual ~typed_array_visitor() = default;
_ZN8jsoncons18basic_json_visitorIcE11begin_arrayEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  345|   134k|        {
  346|   134k|            visit_begin_array(length, tag, context, ec);
  347|   134k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   134k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  348|   134k|        }
_ZN8jsoncons18basic_json_visitorIcE12uint64_valueEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  414|   396k|        {
  415|   396k|            visit_uint64(value, tag, context, ec);
  416|   396k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   396k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  417|   396k|        }
_ZN8jsoncons18basic_json_visitorIcE9end_arrayERKNS_11ser_contextERNSt3__110error_codeE:
  351|  3.00M|        {
  352|  3.00M|            visit_end_array(context, ec);
  353|  3.00M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  3.00M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  354|  3.00M|        }
_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|  34.8k|        {
  442|  34.8k|            visit_double(value, tag, context, ec);
  443|  34.8k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  34.8k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  444|  34.8k|        }
_ZN8jsoncons18basic_json_visitorIcE10null_valueENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  365|  5.63M|        {
  366|  5.63M|            visit_null(tag, context, ec);
  367|  5.63M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  5.63M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  368|  5.63M|        }
_ZN8jsoncons18basic_json_visitorIcE10bool_valueEbNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  374|   225k|        {
  375|   225k|            visit_bool(value, tag, context, ec);
  376|   225k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   225k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  377|   225k|        }
_ZN8jsoncons18basic_json_visitorIcE12string_valueERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_12semantic_tagERKNS_11ser_contextERNS2_10error_codeE:
  383|  3.55M|        {
  384|  3.55M|            visit_string(value, tag, context, ec);
  385|  3.55M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  3.55M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  386|  3.55M|        }
_ZN8jsoncons18basic_json_visitorIcE11begin_arrayENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  339|  2.90M|        {
  340|  2.90M|            visit_begin_array(tag, context, ec);
  341|  2.90M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  2.90M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  342|  2.90M|        }
_ZN8jsoncons18basic_json_visitorIcE12begin_objectEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  327|  82.2k|        {
  328|  82.2k|            visit_begin_object(length, tag, context, ec);
  329|  82.2k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  82.2k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  330|  82.2k|        }
_ZN8jsoncons18basic_json_visitorIcE12begin_objectENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  318|  2.02k|        {
  319|  2.02k|            visit_begin_object(tag, context, ec);
  320|  2.02k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  2.02k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  321|  2.02k|        }
_ZN8jsoncons18basic_json_visitorIcE3keyERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEERKNS_11ser_contextERNS2_10error_codeE:
  357|   557k|        {
  358|   557k|            visit_key(name, context, ec);
  359|   557k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   557k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  360|   557k|        }
_ZN8jsoncons18basic_json_visitorIcE10end_objectERKNS_11ser_contextERNSt3__110error_codeE:
  333|  80.6k|        {
  334|  80.6k|            visit_end_object(context, ec);
  335|  80.6k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  80.6k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  336|  80.6k|        }
_ZN8jsoncons18basic_json_visitorIcE5flushEv:
  108|     11|        {
  109|     11|            visit_flush();
  110|     11|        }

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

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

_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEED2Ev:
  193|    429|    {
  194|    429|        if (chunk_)
  ------------------
  |  Branch (194:13): [True: 429, False: 0]
  ------------------
  195|    429|        {
  196|    429|            std::allocator_traits<char_allocator_type>::deallocate(alloc_, chunk_, chunk_size_);
  197|    429|        }
  198|    429|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEEC2ERNS1_13basic_istreamIcNS1_11char_traitsIcEEEERKS3_:
  176|    429|        : alloc_(alloc), stream_ptr_(std::addressof(is)), sbuf_(is.rdbuf()),
  177|    429|          chunk_size_(default_max_chunk_size)
  178|    429|    {
  179|    429|        chunk_ = std::allocator_traits<char_allocator_type>::allocate(alloc_, chunk_size_);
  180|    429|        data_end_ = chunk_;
  181|    429|    }
_ZN8jsoncons18basic_null_istreamIcEC1Ev:
   57|    429|      : std::basic_istream<CharT>(&nb_)
   58|    429|    {
   59|    429|    }
_ZN8jsoncons18basic_null_istreamIcE11null_bufferC2Ev:
   43|    429|        null_buffer() = default;
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE8is_errorEv:
  276|  6.52M|    {
  277|  6.52M|        return stream_ptr_->bad();  
  278|  6.52M|    }
_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: 929]
  ------------------
  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.24k]
  ------------------
  388|  14.3M|        {
  389|  14.3M|            return len;
  390|  14.3M|        }
  391|  2.24k|        else if (length - len < chunk_size_)
  ------------------
  |  Branch (391:18): [True: 2.24k, False: 0]
  ------------------
  392|  2.24k|        {
  393|  2.24k|            data_end_ = chunk_;
  394|  2.24k|            remaining_ = fill_buffer(chunk_, chunk_size_);
  395|  2.24k|            if (remaining_ > 0)
  ------------------
  |  Branch (395:17): [True: 2.11k, False: 132]
  ------------------
  396|  2.11k|            {
  397|  2.11k|                std::size_t len2 = (std::min)(remaining_, length-len);
  398|  2.11k|                std::memcpy(p+len, data_end_, len2*sizeof(value_type));
  399|  2.11k|                data_end_ += len2;
  400|  2.11k|                remaining_ -= len2;
  401|  2.11k|                position_ += len2;
  402|  2.11k|                len += len2;
  403|  2.11k|            }
  404|  2.24k|            return len;
  405|  2.24k|        }
  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.29k|    {
  443|  3.29k|        if (stream_ptr_->eof())
  ------------------
  |  Branch (443:13): [True: 163, False: 3.13k]
  ------------------
  444|    163|        {
  445|    163|            return 0;
  446|    163|        }
  447|       |
  448|  3.13k|        JSONCONS_TRY
  ------------------
  |  |   37|  3.13k|    #define JSONCONS_TRY try
  ------------------
  449|  3.13k|        {
  450|  3.13k|            std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(chunk), chunk_size);
  451|  3.13k|            std::size_t length = static_cast<std::size_t>(count);
  452|       |
  453|  3.13k|            if (length < chunk_size)
  ------------------
  |  Branch (453:17): [True: 416, False: 2.71k]
  ------------------
  454|    416|            {
  455|    416|                stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  456|    416|            }
  457|  3.13k|            return length;
  458|  3.13k|        }
  459|  3.13k|        JSONCONS_CATCH(const std::exception&)     
  460|  3.13k|        {
  461|      0|            stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  462|      0|            return 0;
  463|      0|        }
  464|  3.13k|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE9read_spanIRNS1_12basic_stringIcNS1_11char_traitsIcEENS2_IcEEEEEENS_6detail4spanIKhLm18446744073709551615EEEmOT_:
  352|   717k|    {
  353|   717k|        if (JSONCONS_UNLIKELY(length == 0))
  ------------------
  |  |   78|   717k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 531k, False: 185k]
  |  |  ------------------
  ------------------
  354|   531k|        {
  355|   531k|            return span<const value_type>{};
  356|   531k|        }
  357|   185k|        if (remaining_ == 0 && length <= chunk_size_)
  ------------------
  |  Branch (357:13): [True: 156, False: 185k]
  |  Branch (357:32): [True: 21, False: 135]
  ------------------
  358|     21|        {
  359|     21|            remaining_ = fill_buffer(chunk_, chunk_size_);
  360|     21|            data_end_ = chunk_;
  361|     21|        }
  362|   185k|        if (length > remaining_)
  ------------------
  |  Branch (362:13): [True: 691, False: 185k]
  ------------------
  363|    691|        {
  364|    691|            buffer.clear();
  365|    691|            source_reader<stream_source_type>::read(*this, std::forward<Buffer>(buffer), length);
  366|    691|            return span<const value_type>(reinterpret_cast<const value_type*>(buffer.data()), buffer.size());
  367|    691|        }
  368|       |
  369|   185k|        const value_type* data = data_end_;
  370|   185k|        data_end_ += length;
  371|   185k|        remaining_ -= length;
  372|   185k|        position_ += length;
  373|   185k|        return span<const value_type>(data, length);
  374|   185k|    }
_ZN8jsoncons13source_readerINS_13stream_sourceIhNSt3__19allocatorIhEEEEE4readINS2_12basic_stringIcNS2_11char_traitsIcEENS3_IcEEEEEENS2_9enable_ifIXaaL_ZNS2_17integral_constantIbLb1EE5valueEEsr10ext_traits7is_byteINT_10value_typeEEE5valueEmE4typeERS5_RSG_m:
  746|    691|    {
  747|    691|        std::size_t unread = length;
  748|       |
  749|  2.65k|        while (unread > 0 && !source.eof())
  ------------------
  |  Branch (749:16): [True: 2.16k, False: 487]
  |  Branch (749:30): [True: 1.96k, False: 204]
  ------------------
  750|  1.96k|        {
  751|  1.96k|            if (source.remaining() == 0 && unread >= source.chunk_size())
  ------------------
  |  Branch (751:17): [True: 488, False: 1.47k]
  |  Branch (751:44): [True: 483, False: 5]
  ------------------
  752|    483|            {
  753|    483|                std::size_t n = source.chunk_size();
  754|    483|                std::size_t offset = buffer.size();
  755|    483|                buffer.resize(offset+n);
  756|    483|                std::size_t actual = source.read_buffer(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
  757|    483|                if (JSONCONS_UNLIKELY(actual != n))
  ------------------
  |  |   78|    483|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 127, False: 356]
  |  |  ------------------
  ------------------
  758|    127|                {
  759|    127|                    buffer.resize(offset+actual);
  760|    127|                }
  761|    483|                unread -= actual;
  762|    483|            }
  763|  1.48k|            else
  764|  1.48k|            {
  765|  1.48k|                std::size_t n = (std::min)(source.chunk_size(), unread);
  766|  1.48k|                std::size_t offset = buffer.size();
  767|  1.48k|                buffer.resize(offset+n);
  768|  1.48k|                std::size_t actual = source.read(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
  769|  1.48k|                if (JSONCONS_UNLIKELY(actual != n))
  ------------------
  |  |   78|  1.48k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 67, False: 1.41k]
  |  |  ------------------
  ------------------
  770|     67|                {
  771|     67|                    buffer.resize(offset + actual);
  772|     67|                }
  773|  1.48k|                unread -= actual;
  774|  1.48k|            }
  775|  1.96k|        }
  776|    691|        return length - unread;
  777|    691|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE3eofEv:
  271|  2.16k|    {
  272|  2.16k|        return remaining_ == 0 && stream_ptr_->eof();
  ------------------
  |  Branch (272:16): [True: 692, False: 1.47k]
  |  Branch (272:35): [True: 204, False: 488]
  ------------------
  273|  2.16k|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE9remainingEv:
  346|  1.96k|    {
  347|  1.96k|        return remaining_;
  348|  1.96k|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE10chunk_sizeEv:
  261|  2.45k|    {
  262|  2.45k|        return chunk_size_;
  263|  2.45k|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE11read_bufferEPhm:
  435|    483|    {
  436|    483|        auto len = fill_buffer(chunk, chunk_size);
  437|    483|        position_ += len;
  438|    483|        return len;
  439|    483|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4peekEv:
  312|  12.6M|    {
  313|  12.6M|        if (remaining_ == 0)
  ------------------
  |  Branch (313:13): [True: 547, False: 12.6M]
  ------------------
  314|    547|        {
  315|    547|            data_end_ = chunk_;
  316|    547|            remaining_ = fill_buffer(chunk_, chunk_size_);
  317|    547|        }
  318|  12.6M|        if (remaining_ > 0)
  ------------------
  |  Branch (318:13): [True: 12.6M, False: 47]
  ------------------
  319|  12.6M|        {
  320|  12.6M|            value_type c = *data_end_;
  321|  12.6M|            return char_result<value_type>{c, false};
  322|  12.6M|        }
  323|     47|        else
  324|     47|        {
  325|     47|            return char_result<value_type>{0, true};
  326|     47|        }
  327|  12.6M|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE6ignoreEm:
  286|  3.22M|    {
  287|  3.22M|        std::size_t len = 0;
  288|  3.22M|        if (remaining_ > 0)
  ------------------
  |  Branch (288:13): [True: 3.22M, False: 0]
  ------------------
  289|  3.22M|        {
  290|  3.22M|            len = (std::min)(remaining_, length);
  291|  3.22M|            position_ += len;
  292|  3.22M|            data_end_ += len;
  293|  3.22M|            remaining_ -= len;
  294|  3.22M|        }
  295|  3.22M|        while (len < length)
  ------------------
  |  Branch (295:16): [True: 0, False: 3.22M]
  ------------------
  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.22M|    }

_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.0k|    {
  128|  14.0k|        T val2 = byte_swap(val);
  129|  14.0k|        uint8_t buf[sizeof(T)];
  130|  14.0k|        std::memcpy(buf, &val2, sizeof(T));
  131|  14.0k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 28.1k, False: 14.0k]
  ------------------
  132|  28.1k|        {
  133|  28.1k|            *d_first++ = item;
  134|  28.1k|        }
  135|  14.0k|    }
_ZN8jsoncons6binary9byte_swapItEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  14.0k|    {
   29|  14.0k|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  14.0k|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  14.0k|#      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.0k|    }
_ZN8jsoncons6binary13native_to_bigIjNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|    438|    {
  128|    438|        T val2 = byte_swap(val);
  129|    438|        uint8_t buf[sizeof(T)];
  130|    438|        std::memcpy(buf, &val2, sizeof(T));
  131|    438|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 1.75k, False: 438]
  ------------------
  132|  1.75k|        {
  133|  1.75k|            *d_first++ = item;
  134|  1.75k|        }
  135|    438|    }
_ZN8jsoncons6binary9byte_swapIjEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|  46.6k|    {
   40|  46.6k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|  46.6k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|  46.6k|#  define JSONCONS_BYTE_SWAP_32 __builtin_bswap32
  ------------------
   42|       |    #else
   43|       |        uint32_t tmp = ((static_cast<uint32_t>(val) << 8) & 0xff00ff00) | ((static_cast<uint32_t>(val) >> 8) & 0xff00ff);
   44|       |        return (tmp << 16) | (tmp >> 16);
   45|       |    #endif
   46|  46.6k|    }
_ZN8jsoncons6binary9byte_swapImEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  23.5k|    {
   52|  23.5k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  23.5k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  23.5k|#  define JSONCONS_BYTE_SWAP_64 __builtin_bswap64
  ------------------
   54|       |    #else
   55|       |        uint64_t tmp = ((static_cast<uint64_t>(val) & 0x00000000ffffffffull) << 32) | ((static_cast<uint64_t>(val) & 0xffffffff00000000ull) >> 32);
   56|       |        tmp = ((tmp & 0x0000ffff0000ffffull) << 16) | ((tmp & 0xffff0000ffff0000ull) >> 16);
   57|       |        return ((tmp & 0x00ff00ff00ff00ffull) << 8)  | ((tmp & 0xff00ff00ff00ff00ull) >> 8);
   58|       |    #endif
   59|  23.5k|    }
_ZN8jsoncons6binary13native_to_bigIsNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   904k|    {
  128|   904k|        T val2 = byte_swap(val);
  129|   904k|        uint8_t buf[sizeof(T)];
  130|   904k|        std::memcpy(buf, &val2, sizeof(T));
  131|   904k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 1.80M, False: 904k]
  ------------------
  132|  1.80M|        {
  133|  1.80M|            *d_first++ = item;
  134|  1.80M|        }
  135|   904k|    }
_ZN8jsoncons6binary9byte_swapIsEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  2.07M|    {
   29|  2.07M|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  2.07M|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  2.07M|#      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.07M|    }
_ZN8jsoncons6binary13native_to_bigIiNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  92.3k|    {
  128|  92.3k|        T val2 = byte_swap(val);
  129|  92.3k|        uint8_t buf[sizeof(T)];
  130|  92.3k|        std::memcpy(buf, &val2, sizeof(T));
  131|  92.3k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 369k, False: 92.3k]
  ------------------
  132|   369k|        {
  133|   369k|            *d_first++ = item;
  134|   369k|        }
  135|  92.3k|    }
_ZN8jsoncons6binary9byte_swapIiEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|   188k|    {
   40|   188k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|   188k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|   188k|#  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|   188k|    }
_ZN8jsoncons6binary13native_to_bigIlNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  24.8k|    {
  128|  24.8k|        T val2 = byte_swap(val);
  129|  24.8k|        uint8_t buf[sizeof(T)];
  130|  24.8k|        std::memcpy(buf, &val2, sizeof(T));
  131|  24.8k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 199k, False: 24.8k]
  ------------------
  132|   199k|        {
  133|   199k|            *d_first++ = item;
  134|   199k|        }
  135|  24.8k|    }
_ZN8jsoncons6binary9byte_swapIlEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  50.6k|    {
   52|  50.6k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  50.6k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  50.6k|#  define JSONCONS_BYTE_SWAP_64 __builtin_bswap64
  ------------------
   54|       |    #else
   55|       |        uint64_t tmp = ((static_cast<uint64_t>(val) & 0x00000000ffffffffull) << 32) | ((static_cast<uint64_t>(val) & 0xffffffff00000000ull) >> 32);
   56|       |        tmp = ((tmp & 0x0000ffff0000ffffull) << 16) | ((tmp & 0xffff0000ffff0000ull) >> 16);
   57|       |        return ((tmp & 0x00ff00ff00ff00ffull) << 8)  | ((tmp & 0xff00ff00ff00ff00ull) >> 8);
   58|       |    #endif
   59|  50.6k|    }
_ZN8jsoncons6binary13native_to_bigIaNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   155k|    {
  128|   155k|        T val2 = byte_swap(val);
  129|   155k|        uint8_t buf[sizeof(T)];
  130|   155k|        std::memcpy(buf, &val2, sizeof(T));
  131|   155k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 155k, False: 155k]
  ------------------
  132|   155k|        {
  133|   155k|            *d_first++ = item;
  134|   155k|        }
  135|   155k|    }
_ZN8jsoncons6binary9byte_swapIaEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  1.43M|    {
   22|  1.43M|        return val;
   23|  1.43M|    }
_ZN8jsoncons6binary13native_to_bigIfNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  20.5k|    {
  128|  20.5k|        T val2 = byte_swap(val);
  129|  20.5k|        uint8_t buf[sizeof(T)];
  130|  20.5k|        std::memcpy(buf, &val2, sizeof(T));
  131|  20.5k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 82.1k, False: 20.5k]
  ------------------
  132|  82.1k|        {
  133|  82.1k|            *d_first++ = item;
  134|  82.1k|        }
  135|  20.5k|    }
_ZN8jsoncons6binary9byte_swapIfEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   64|  46.2k|    {
   65|  46.2k|        uint32_t x;
   66|  46.2k|        std::memcpy(&x,&val,sizeof(uint32_t));
   67|  46.2k|        uint32_t y = byte_swap(x);
   68|  46.2k|        T val2;
   69|  46.2k|        std::memcpy(&val2,&y,sizeof(uint32_t));
   70|  46.2k|        return val2;
   71|  46.2k|    }
_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.5k|    {
   77|  23.5k|        uint64_t x;
   78|  23.5k|        std::memcpy(&x,&val,sizeof(uint64_t));
   79|  23.5k|        uint64_t y = byte_swap(x);
   80|  23.5k|        T val2;
   81|  23.5k|        std::memcpy(&val2,&y,sizeof(uint64_t));
   82|  23.5k|        return val2;
   83|  23.5k|    }
_ZN8jsoncons6binary13big_to_nativeIaNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  1.27M|    {
  183|  1.27M|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 1.27M]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  1.27M|        T val;
  188|  1.27M|        std::memcpy(&val,first,sizeof(T));
  189|  1.27M|        return byte_swap(val);
  190|  1.27M|    }
_ZN8jsoncons6binary13big_to_nativeIsNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  1.17M|    {
  183|  1.17M|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 1.17M]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  1.17M|        T val;
  188|  1.17M|        std::memcpy(&val,first,sizeof(T));
  189|  1.17M|        return byte_swap(val);
  190|  1.17M|    }
_ZN8jsoncons6binary13big_to_nativeIiNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  95.9k|    {
  183|  95.9k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 95.9k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  95.9k|        T val;
  188|  95.9k|        std::memcpy(&val,first,sizeof(T));
  189|  95.9k|        return byte_swap(val);
  190|  95.9k|    }
_ZN8jsoncons6binary13big_to_nativeIlNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  25.8k|    {
  183|  25.8k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 25.8k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  25.8k|        T val;
  188|  25.8k|        std::memcpy(&val,first,sizeof(T));
  189|  25.8k|        return byte_swap(val);
  190|  25.8k|    }
_ZN8jsoncons6binary13big_to_nativeIfNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  25.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_nativeIdNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  9.23k|    {
  183|  9.23k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 9.23k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  9.23k|        T val;
  188|  9.23k|        std::memcpy(&val,first,sizeof(T));
  189|  9.23k|        return byte_swap(val);
  190|  9.23k|    }

_ZN8jsoncons9is_base10IhEEbPKT_m:
  164|   159k|{
  165|   159k|    integer_chars_state state = integer_chars_state::initial;
  166|       |
  167|   159k|    const CharT* end = s + length; 
  168|   168k|    for (;s < end; ++s)
  ------------------
  |  Branch (168:11): [True: 167k, False: 1.00k]
  ------------------
  169|   167k|    {
  170|   167k|        switch(state)
  171|   167k|        {
  172|   159k|            case integer_chars_state::initial:
  ------------------
  |  Branch (172:13): [True: 159k, False: 8.00k]
  ------------------
  173|   159k|            {
  174|   159k|                switch(*s)
  175|   159k|                {
  176|  6.00k|                    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: 159k]
  |  Branch (176:30): [True: 1.35k, False: 157k]
  |  Branch (176:39): [True: 9, False: 159k]
  |  Branch (176:48): [True: 3, False: 159k]
  |  Branch (176:57): [True: 537, False: 158k]
  |  Branch (176:66): [True: 6, False: 159k]
  |  Branch (176:75): [True: 12, False: 159k]
  |  Branch (176:84): [True: 0, False: 159k]
  |  Branch (176:93): [True: 0, False: 159k]
  |  Branch (176:103): [True: 3.89k, False: 155k]
  ------------------
  177|  6.00k|                        state = integer_chars_state::decimal;
  178|  6.00k|                        break;
  179|  1.40k|                    case '-':
  ------------------
  |  Branch (179:21): [True: 1.40k, False: 157k]
  ------------------
  180|  1.40k|                        state = integer_chars_state::minus;
  181|  1.40k|                        break;
  182|   151k|                    default:
  ------------------
  |  Branch (182:21): [True: 151k, False: 7.41k]
  ------------------
  183|   151k|                        return false;
  184|   159k|                }
  185|  7.41k|                break;
  186|   159k|            }
  187|  7.41k|            case integer_chars_state::minus:
  ------------------
  |  Branch (187:13): [True: 1.40k, False: 165k]
  ------------------
  188|  1.40k|            {
  189|  1.40k|                switch(*s)
  190|  1.40k|                {
  191|    100|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (191:21): [True: 16, False: 1.38k]
  |  Branch (191:30): [True: 5, False: 1.39k]
  |  Branch (191:39): [True: 0, False: 1.40k]
  |  Branch (191:48): [True: 0, False: 1.40k]
  |  Branch (191:57): [True: 0, False: 1.40k]
  |  Branch (191:66): [True: 3, False: 1.40k]
  |  Branch (191:75): [True: 1, False: 1.40k]
  |  Branch (191:84): [True: 0, False: 1.40k]
  |  Branch (191:93): [True: 30, False: 1.37k]
  |  Branch (191:103): [True: 45, False: 1.35k]
  ------------------
  192|    100|                        state = integer_chars_state::decimal;
  193|    100|                        break;
  194|  1.30k|                    default:
  ------------------
  |  Branch (194:21): [True: 1.30k, False: 100]
  ------------------
  195|  1.30k|                        return false;
  196|  1.40k|                }
  197|    100|                break;
  198|  1.40k|            }
  199|  6.60k|            case integer_chars_state::decimal:
  ------------------
  |  Branch (199:13): [True: 6.60k, False: 160k]
  ------------------
  200|  6.60k|            {
  201|  6.60k|                switch(*s)
  202|  6.60k|                {
  203|  1.29k|                    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.29k, False: 5.31k]
  |  Branch (203:30): [True: 3, False: 6.60k]
  |  Branch (203:39): [True: 0, False: 6.60k]
  |  Branch (203:48): [True: 0, False: 6.60k]
  |  Branch (203:57): [True: 0, False: 6.60k]
  |  Branch (203:66): [True: 0, False: 6.60k]
  |  Branch (203:75): [True: 1, False: 6.60k]
  |  Branch (203:84): [True: 0, False: 6.60k]
  |  Branch (203:93): [True: 0, False: 6.60k]
  |  Branch (203:103): [True: 1, False: 6.60k]
  ------------------
  204|  1.29k|                        break;
  205|  5.30k|                    default:
  ------------------
  |  Branch (205:21): [True: 5.30k, False: 1.29k]
  ------------------
  206|  5.30k|                        return false;
  207|  6.60k|                }
  208|  1.29k|                break;
  209|  6.60k|            }
  210|  1.29k|            default:
  ------------------
  |  Branch (210:13): [True: 0, False: 167k]
  ------------------
  211|      0|                break;
  212|   167k|        }
  213|   167k|    }
  214|  1.00k|    return state == integer_chars_state::decimal ? true : false;
  ------------------
  |  Branch (214:12): [True: 801, False: 200]
  ------------------
  215|   159k|}

_ZN8jsoncons14unicode_traits8validateIcEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14unicode_resultIS4_EEE4typeEPKS4_m:
 1147|  4.11M|    {
 1148|  4.11M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(data);
 1149|  4.11M|        const uint8_t* end = it + length;
 1150|       |
 1151|  4.11M|        unicode_errc  result{};
 1152|  8.97M|        while (it != end) 
  ------------------
  |  Branch (1152:16): [True: 4.85M, False: 4.11M]
  ------------------
 1153|  4.85M|        {
 1154|  4.85M|            if ((end - it) >= 8)
  ------------------
  |  Branch (1154:17): [True: 1.37M, False: 3.47M]
  ------------------
 1155|  1.37M|            {
 1156|  9.57M|                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.37M, False: 3.07k]
  |  |  |  Branch (281:36): [True: 1.37M, False: 1.18k]
  |  |  |  Branch (281:38): [True: 1.36M, False: 7.04k]
  |  |  |  Branch (281:40): [True: 1.36M, False: 1.07k]
  |  |  |  Branch (281:42): [True: 1.36M, False: 1.47k]
  |  |  |  Branch (281:44): [True: 1.36M, False: 1.48k]
  |  |  |  Branch (281:46): [True: 1.35M, False: 1.46k]
  |  |  ------------------
  ------------------
 1157|  1.35M|                continue;
 1158|  9.57M|            }
 1159|  3.49M|    non_ascii:
 1160|  3.49M|            const std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[*it]) + 1;
 1161|  3.49M|            if (len > (std::size_t)(end - it))
  ------------------
  |  Branch (1161:17): [True: 0, False: 3.49M]
  ------------------
 1162|      0|            {
 1163|      0|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it), unicode_errc::source_exhausted};
 1164|      0|            }
 1165|  3.49M|            if ((result=is_legal_utf8(it, len)) != unicode_errc())
  ------------------
  |  Branch (1165:17): [True: 20, False: 3.49M]
  ------------------
 1166|     20|            {
 1167|     20|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1168|     20|            }
 1169|  3.49M|            it += len;
 1170|  3.49M|        }
 1171|  4.11M|        return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1172|  4.11M|    }
_ZN8jsoncons14unicode_traits13is_legal_utf8EPKhm:
  305|  6.98M|    {
  306|  6.98M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(bytes);
  307|  6.98M|        const uint8_t* end = it+length;
  308|       |
  309|  6.98M|        uint8_t byte;
  310|  6.98M|        switch (length) {
  311|     28|        default:
  ------------------
  |  Branch (311:9): [True: 28, False: 6.98M]
  ------------------
  312|     28|            return unicode_errc::over_long_utf8_sequence;
  313|  27.8k|        case 4:
  ------------------
  |  Branch (313:9): [True: 27.8k, False: 6.95M]
  ------------------
  314|  27.8k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (314:17): [True: 1, False: 27.8k]
  ------------------
  315|      1|                return unicode_errc::bad_continuation_byte;
  316|  27.8k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  27.8k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  317|  35.6k|        case 3:
  ------------------
  |  Branch (317:9): [True: 7.79k, False: 6.97M]
  ------------------
  318|  35.6k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (318:17): [True: 0, False: 35.6k]
  ------------------
  319|      0|                return unicode_errc::bad_continuation_byte;
  320|  35.6k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  35.6k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  321|  38.7k|        case 2:
  ------------------
  |  Branch (321:9): [True: 3.05k, False: 6.98M]
  ------------------
  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.6k]
  |  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.6k]
  |  Branch (329:32): [True: 0, False: 74]
  ------------------
  330|  5.29k|                case 0xF0: if (byte < 0x90) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (330:17): [True: 5.29k, False: 33.4k]
  |  Branch (330:32): [True: 0, False: 5.29k]
  ------------------
  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.8k]
  |  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.98M|        case 1:
  ------------------
  |  Branch (336:9): [True: 6.94M, False: 38.7k]
  ------------------
  337|  6.98M|            if (*it >= 0x80 && *it < 0xC2)
  ------------------
  |  Branch (337:17): [True: 38.7k, False: 6.94M]
  |  Branch (337:32): [True: 15, False: 38.7k]
  ------------------
  338|     15|                return unicode_errc::source_illegal;
  339|  6.98M|            break;
  340|  6.98M|        }
  341|  6.98M|        if (*it > 0xF4) 
  ------------------
  |  Branch (341:13): [True: 0, False: 6.98M]
  ------------------
  342|      0|            return unicode_errc::source_illegal;
  343|       |
  344|  6.98M|        return unicode_errc();
  345|  6.98M|    }
_ZN8jsoncons14unicode_traits8validateIhEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14unicode_resultIS4_EEE4typeEPKS4_m:
 1147|  3.95M|    {
 1148|  3.95M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(data);
 1149|  3.95M|        const uint8_t* end = it + length;
 1150|       |
 1151|  3.95M|        unicode_errc  result{};
 1152|  8.60M|        while (it != end) 
  ------------------
  |  Branch (1152:16): [True: 4.64M, False: 3.95M]
  ------------------
 1153|  4.64M|        {
 1154|  4.64M|            if ((end - it) >= 8)
  ------------------
  |  Branch (1154:17): [True: 1.17M, False: 3.46M]
  ------------------
 1155|  1.17M|            {
 1156|  8.17M|                JSONCONS_REPEAT8({if (JSONCONS_LIKELY((*it & 0x80) == 0)) ++it; else goto non_ascii;})
  ------------------
  |  |  281|  2.35M|#define JSONCONS_REPEAT8(x)  { x x x x x x x x }
  |  |  ------------------
  |  |  |  Branch (281:32): [True: 1.17M, False: 2.60k]
  |  |  |  Branch (281:34): [True: 1.17M, False: 2.99k]
  |  |  |  Branch (281:36): [True: 1.17M, False: 1.17k]
  |  |  |  Branch (281:38): [True: 1.16M, False: 6.85k]
  |  |  |  Branch (281:40): [True: 1.16M, False: 1.04k]
  |  |  |  Branch (281:42): [True: 1.16M, False: 1.44k]
  |  |  |  Branch (281:44): [True: 1.16M, False: 1.46k]
  |  |  |  Branch (281:46): [True: 1.16M, False: 1.45k]
  |  |  ------------------
  ------------------
 1157|  1.16M|                continue;
 1158|  8.17M|            }
 1159|  3.48M|    non_ascii:
 1160|  3.48M|            const std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[*it]) + 1;
 1161|  3.48M|            if (len > (std::size_t)(end - it))
  ------------------
  |  Branch (1161:17): [True: 1, False: 3.48M]
  ------------------
 1162|      1|            {
 1163|      1|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it), unicode_errc::source_exhausted};
 1164|      1|            }
 1165|  3.48M|            if ((result=is_legal_utf8(it, len)) != unicode_errc())
  ------------------
  |  Branch (1165:17): [True: 26, False: 3.48M]
  ------------------
 1166|     26|            {
 1167|     26|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1168|     26|            }
 1169|  3.48M|            it += len;
 1170|  3.48M|        }
 1171|  3.95M|        return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1172|  3.95M|    }

_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEEC2EOS8_RKS9_:
   99|    429|       : basic_ubjson_encoder(std::forward<Sink>(sink), ubjson_encode_options(), alloc)
  100|    429|    {
  101|    429|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEEC2EOS8_RKNS0_21ubjson_encode_optionsERKS9_:
  106|    429|       : sink_(std::forward<Sink>(sink)),
  107|    429|         max_nesting_depth_(options.max_nesting_depth()),
  108|    429|         alloc_(alloc)
  109|    429|    {
  110|    429|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE17visit_begin_arrayEmNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  215|   134k|    {
  216|   134k|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|   134k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 134k]
  |  |  ------------------
  ------------------
  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|   134k|        stack_.emplace_back(ubjson_container_type::array, length);
  222|   134k|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_array_marker);
  223|   134k|        sink_.push_back(jsoncons::ubjson::ubjson_type::count_marker);
  224|   134k|        put_length(length);
  225|       |
  226|   134k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   134k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  227|   134k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_itemC2ENS0_21ubjson_container_typeEm:
   57|  3.12M|           : type_(type), length_(length)
   58|  3.12M|        {
   59|  3.12M|        }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10put_lengthEm:
  318|  4.33M|    {
  319|  4.33M|        if (length <= (std::numeric_limits<uint8_t>::max)())
  ------------------
  |  Branch (319:13): [True: 4.31M, False: 14.4k]
  ------------------
  320|  4.31M|        {
  321|  4.31M|            sink_.push_back(ubjson_type::uint8_type);
  322|  4.31M|            binary::native_to_big(static_cast<uint8_t>(length), std::back_inserter(sink_));
  323|  4.31M|        }
  324|  14.4k|        else if (length <= (std::size_t)(std::numeric_limits<int16_t>::max)())
  ------------------
  |  Branch (324:18): [True: 14.0k, False: 438]
  ------------------
  325|  14.0k|        {
  326|  14.0k|            sink_.push_back(ubjson_type::int16_type);
  327|  14.0k|            binary::native_to_big(static_cast<uint16_t>(length), std::back_inserter(sink_));
  328|  14.0k|        }
  329|    438|        else if (length <= (std::size_t)(std::numeric_limits<int32_t>::max)())
  ------------------
  |  Branch (329:18): [True: 438, False: 0]
  ------------------
  330|    438|        {
  331|    438|            sink_.push_back(ubjson_type::int32_type);
  332|    438|            binary::native_to_big(static_cast<uint32_t>(length),std::back_inserter(sink_));
  333|    438|        }
  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.33M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE15visit_end_arrayERKNS_11ser_contextERNS3_10error_codeE:
  230|  3.00M|    {
  231|  3.00M|        JSONCONS_ASSERT(!stack_.empty());
  ------------------
  |  |   49|  3.00M|#define JSONCONS_ASSERT(x) if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (49:32): [True: 0, False: 3.00M]
  |  |  ------------------
  |  |   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.00M|        --nesting_depth_;
  233|       |
  234|  3.00M|        if (stack_.back().is_indefinite_length())
  ------------------
  |  Branch (234:13): [True: 2.89M, False: 117k]
  ------------------
  235|  2.89M|        {
  236|  2.89M|            sink_.push_back(jsoncons::ubjson::ubjson_type::end_array_marker);
  237|  2.89M|        }
  238|   117k|        else
  239|   117k|        {
  240|   117k|            if (stack_.back().count() < stack_.back().length())
  ------------------
  |  Branch (240:17): [True: 0, False: 117k]
  ------------------
  241|      0|            {
  242|      0|                ec = ubjson_errc::too_few_items;
  243|      0|                JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  244|      0|            }
  245|   117k|            if (stack_.back().count() > stack_.back().length())
  ------------------
  |  Branch (245:17): [True: 0, False: 117k]
  ------------------
  246|      0|            {
  247|      0|                ec = ubjson_errc::too_many_items;
  248|      0|                JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  249|      0|            }
  250|   117k|        }
  251|  3.00M|        stack_.pop_back();
  252|  3.00M|        end_value();
  253|  3.00M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  3.00M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  254|  3.00M|    }
_ZNK8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_item20is_indefinite_lengthEv:
   79|  3.08M|        {
   80|  3.08M|            return type_ == ubjson_container_type::indefinite_length_array || type_ == ubjson_container_type::indefinite_length_object;
  ------------------
  |  Branch (80:20): [True: 2.89M, False: 198k]
  |  Branch (80:79): [True: 1.33k, False: 197k]
  ------------------
   81|  3.08M|        }
_ZNK8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_item5countEv:
   69|   394k|        {
   70|   394k|            return count_;
   71|   394k|        }
_ZNK8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_item6lengthEv:
   64|   394k|        {
   65|   394k|            return length_;
   66|   394k|        }
_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|   396k|    {
  462|   396k|        if (val <= (std::numeric_limits<uint8_t>::max)())
  ------------------
  |  Branch (462:13): [True: 396k, False: 0]
  ------------------
  463|   396k|        {
  464|   396k|            sink_.push_back(jsoncons::ubjson::ubjson_type::uint8_type);
  465|   396k|            binary::native_to_big(static_cast<uint8_t>(val),std::back_inserter(sink_));
  466|   396k|        }
  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|   396k|        end_value();
  483|   396k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   396k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  484|   396k|    }
_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.59M, False: 403k]
  ------------------
  396|  1.59M|        {
  397|  1.59M|            if (val <= (std::numeric_limits<uint8_t>::max)())
  ------------------
  |  Branch (397:17): [True: 821k, False: 774k]
  ------------------
  398|   821k|            {
  399|       |                // uint 8 stores a 8-bit unsigned integer
  400|   821k|                sink_.push_back(jsoncons::ubjson::ubjson_type::uint8_type);
  401|   821k|                binary::native_to_big(static_cast<uint8_t>(val),std::back_inserter(sink_));
  402|   821k|            }
  403|   774k|            else if (val <= (std::numeric_limits<int16_t>::max)())
  ------------------
  |  Branch (403:22): [True: 725k, False: 48.6k]
  ------------------
  404|   725k|            {
  405|       |                // uint 16 stores a 16-bit big-endian unsigned integer
  406|   725k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int16_type);
  407|   725k|                binary::native_to_big(static_cast<int16_t>(val),std::back_inserter(sink_));
  408|   725k|            }
  409|  48.6k|            else if (val <= (std::numeric_limits<int32_t>::max)())
  ------------------
  |  Branch (409:22): [True: 37.1k, False: 11.4k]
  ------------------
  410|  37.1k|            {
  411|       |                // uint 32 stores a 32-bit big-endian unsigned integer
  412|  37.1k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int32_type);
  413|  37.1k|                binary::native_to_big(static_cast<int32_t>(val),std::back_inserter(sink_));
  414|  37.1k|            }
  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.59M|        }
  426|   403k|        else
  427|   403k|        {
  428|   403k|            if (val >= (std::numeric_limits<int8_t>::lowest)())
  ------------------
  |  Branch (428:17): [True: 155k, False: 247k]
  ------------------
  429|   155k|            {
  430|       |                // int 8 stores a 8-bit signed integer
  431|   155k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int8_type);
  432|   155k|                binary::native_to_big(static_cast<int8_t>(val),std::back_inserter(sink_));
  433|   155k|            }
  434|   247k|            else if (val >= (std::numeric_limits<int16_t>::lowest)())
  ------------------
  |  Branch (434:22): [True: 179k, False: 68.5k]
  ------------------
  435|   179k|            {
  436|       |                // int 16 stores a 16-bit big-endian signed integer
  437|   179k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int16_type);
  438|   179k|                binary::native_to_big(static_cast<int16_t>(val),std::back_inserter(sink_));
  439|   179k|            }
  440|  68.5k|            else if (val >= (std::numeric_limits<int32_t>::lowest)())
  ------------------
  |  Branch (440:22): [True: 55.1k, False: 13.4k]
  ------------------
  441|  55.1k|            {
  442|       |                // int 32 stores a 32-bit big-endian signed integer
  443|  55.1k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int32_type);
  444|  55.1k|                binary::native_to_big(static_cast<int32_t>(val),std::back_inserter(sink_));
  445|  55.1k|            }
  446|  13.4k|            else if (val >= (std::numeric_limits<int64_t>::lowest)())
  ------------------
  |  Branch (446:22): [True: 13.4k, False: 0]
  ------------------
  447|  13.4k|            {
  448|       |                // int 64 stores a 64-bit big-endian signed integer
  449|  13.4k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int64_type);
  450|  13.4k|                binary::native_to_big(val,std::back_inserter(sink_));
  451|  13.4k|            }
  452|   403k|        }
  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|  34.8k|    {
  372|  34.8k|        float valf = (float)val;
  373|  34.8k|        if ((double)valf == val)
  ------------------
  |  Branch (373:13): [True: 20.5k, False: 14.3k]
  ------------------
  374|  20.5k|        {
  375|       |            // float 32
  376|  20.5k|            sink_.push_back(static_cast<uint8_t>(jsoncons::ubjson::ubjson_type::float32_type));
  377|  20.5k|            binary::native_to_big(valf,std::back_inserter(sink_));
  378|  20.5k|        }
  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|  34.8k|        end_value();
  389|  34.8k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  34.8k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  390|  34.8k|    }
_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.02k|    {
  148|  2.02k|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|  2.02k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 2.02k]
  |  |  ------------------
  ------------------
  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.02k|        stack_.emplace_back(ubjson_container_type::indefinite_length_object);
  154|  2.02k|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_object_marker);
  155|       |
  156|  2.02k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  2.02k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  157|  2.02k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE18visit_begin_objectEmNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  160|  82.2k|    {
  161|  82.2k|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|  82.2k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 82.2k]
  |  |  ------------------
  ------------------
  162|      0|        {
  163|      0|            ec = ubjson_errc::max_nesting_depth_exceeded;
  164|      0|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|      0|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  165|      0|        } 
  166|  82.2k|        stack_.emplace_back(ubjson_container_type::object, length);
  167|  82.2k|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_object_marker);
  168|  82.2k|        sink_.push_back(jsoncons::ubjson::ubjson_type::count_marker);
  169|  82.2k|        put_length(length);
  170|       |
  171|  82.2k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  82.2k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  172|  82.2k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE16visit_end_objectERKNS_11ser_contextERNS3_10error_codeE:
  175|  80.6k|    {
  176|  80.6k|        JSONCONS_ASSERT(!stack_.empty());
  ------------------
  |  |   49|  80.6k|#define JSONCONS_ASSERT(x) if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (49:32): [True: 0, False: 80.6k]
  |  |  ------------------
  |  |   50|      0|    JSONCONS_THROW(jsoncons::assertion_error("assertion '" #x "' failed at  <> :" \
  |  |  ------------------
  |  |  |  |   35|      0|    #define JSONCONS_THROW(exception) throw exception
  |  |  ------------------
  |  |   51|      0|            JSONCONS_STR( 0 ))); }
  ------------------
  177|  80.6k|        --nesting_depth_;
  178|       |
  179|  80.6k|        if (stack_.back().is_indefinite_length())
  ------------------
  |  Branch (179:13): [True: 1.33k, False: 79.2k]
  ------------------
  180|  1.33k|        {
  181|  1.33k|            sink_.push_back(jsoncons::ubjson::ubjson_type::end_object_marker);
  182|  1.33k|        }
  183|  79.2k|        else
  184|  79.2k|        {
  185|  79.2k|            if (stack_.back().count() < stack_.back().length())
  ------------------
  |  Branch (185:17): [True: 0, False: 79.2k]
  ------------------
  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|  79.2k|            if (stack_.back().count() > stack_.back().length())
  ------------------
  |  Branch (190:17): [True: 0, False: 79.2k]
  ------------------
  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|  79.2k|        }
  196|  80.6k|        stack_.pop_back();
  197|  80.6k|        end_value();
  198|  80.6k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  80.6k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  199|  80.6k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE17visit_begin_arrayENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  202|  2.90M|    {
  203|  2.90M|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|  2.90M|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 2.90M]
  |  |  ------------------
  ------------------
  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.90M|        stack_.emplace_back(ubjson_container_type::indefinite_length_array);
  209|  2.90M|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_array_marker);
  210|       |
  211|  2.90M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  2.90M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  212|  2.90M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE9visit_keyERKNS3_17basic_string_viewIcNS3_11char_traitsIcEEEERKNS_11ser_contextERNS3_10error_codeE:
  257|   557k|    {
  258|   557k|        auto sink = unicode_traits::validate(name.data(), name.size());
  259|   557k|        if (sink.ec != unicode_traits::unicode_errc())
  ------------------
  |  Branch (259:13): [True: 0, False: 557k]
  ------------------
  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|   557k|        put_length(name.length());
  266|       |
  267|   557k|        for (auto c : name)
  ------------------
  |  Branch (267:21): [True: 7.30M, False: 557k]
  ------------------
  268|  7.30M|        {
  269|  7.30M|            sink_.push_back(c);
  270|  7.30M|        }
  271|   557k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   557k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  272|   557k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10visit_nullENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  275|  5.63M|    {
  276|       |        // nil
  277|  5.63M|        binary::native_to_big(static_cast<uint8_t>(jsoncons::ubjson::ubjson_type::null_type), std::back_inserter(sink_));
  278|  5.63M|        end_value();
  279|  5.63M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  5.63M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  280|  5.63M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10visit_boolEbNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  487|   225k|    {
  488|       |        // true and false
  489|   225k|        sink_.push_back(static_cast<uint8_t>(val ? jsoncons::ubjson::ubjson_type::true_type : jsoncons::ubjson::ubjson_type::false_type));
  ------------------
  |  Branch (489:46): [True: 173k, False: 52.0k]
  ------------------
  490|       |
  491|   225k|        end_value();
  492|   225k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   225k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  493|   225k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE12visit_stringERKNS3_17basic_string_viewIcNS3_11char_traitsIcEEEENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  283|  3.55M|    {
  284|  3.55M|        switch (tag)
  285|  3.55M|        {
  286|    801|            case semantic_tag::bigint:
  ------------------
  |  Branch (286:13): [True: 801, False: 3.55M]
  ------------------
  287|   159k|            case semantic_tag::bigdec:
  ------------------
  |  Branch (287:13): [True: 158k, False: 3.39M]
  ------------------
  288|   159k|            {
  289|   159k|                sink_.push_back(jsoncons::ubjson::ubjson_type::high_precision_number_type);
  290|   159k|                break;
  291|    801|            }
  292|  3.39M|            default:
  ------------------
  |  Branch (292:13): [True: 3.39M, False: 159k]
  ------------------
  293|  3.39M|            {
  294|  3.39M|                sink_.push_back(jsoncons::ubjson::ubjson_type::string_type);
  295|  3.39M|                break;
  296|    801|            }
  297|  3.55M|        }
  298|       |
  299|  3.55M|        auto sink = unicode_traits::validate(sv.data(), sv.size());
  300|  3.55M|        if (sink.ec != unicode_traits::unicode_errc())
  ------------------
  |  Branch (300:13): [True: 20, False: 3.55M]
  ------------------
  301|     20|        {
  302|     20|            ec = ubjson_errc::invalid_utf8_text_string;
  303|     20|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|     20|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  304|     20|        }
  305|       |
  306|  3.55M|        put_length(sv.length());
  307|       |
  308|  3.55M|        for (auto c : sv)
  ------------------
  |  Branch (308:21): [True: 7.14M, False: 3.55M]
  ------------------
  309|  7.14M|        {
  310|  7.14M|            sink_.push_back(c);
  311|  7.14M|        }
  312|       |
  313|  3.55M|        end_value();
  314|  3.55M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  3.55M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  315|  3.55M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEED2Ev:
  113|    429|    {
  114|    429|        JSONCONS_TRY
  ------------------
  |  |   37|    429|    #define JSONCONS_TRY try
  ------------------
  115|    429|        {
  116|    429|            sink_.flush();
  117|    429|        }
  118|    429|        JSONCONS_CATCH(...)
  119|    429|        {
  120|      0|        }
  121|    429|    }

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

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

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

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

