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

_ZN8jsoncons18basic_json_visitorIcEC2Ev:
  103|    247|        basic_json_visitor() = default;
_ZN8jsoncons19typed_array_visitorD2Ev:
   33|    247|        virtual ~typed_array_visitor() = default;
_ZN8jsoncons18basic_json_visitorIcE11begin_arrayEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  345|   100k|        {
  346|   100k|            visit_begin_array(length, tag, context, ec);
  347|   100k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   100k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  348|   100k|        }
_ZN8jsoncons18basic_json_visitorIcE12uint64_valueEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  414|   633k|        {
  415|   633k|            visit_uint64(value, tag, context, ec);
  416|   633k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   633k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  417|   633k|        }
_ZN8jsoncons18basic_json_visitorIcE9end_arrayERKNS_11ser_contextERNSt3__110error_codeE:
  351|  1.80M|        {
  352|  1.80M|            visit_end_array(context, ec);
  353|  1.80M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  1.80M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  354|  1.80M|        }
_ZN8jsoncons18basic_json_visitorIcE11int64_valueElNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  423|   740k|        {
  424|   740k|            visit_int64(value, tag, context, ec);
  425|   740k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   740k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  426|   740k|        }
_ZN8jsoncons18basic_json_visitorIcE12double_valueEdNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  441|  58.4k|        {
  442|  58.4k|            visit_double(value, tag, context, ec);
  443|  58.4k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  58.4k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  444|  58.4k|        }
_ZN8jsoncons18basic_json_visitorIcE10null_valueENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  365|  4.74M|        {
  366|  4.74M|            visit_null(tag, context, ec);
  367|  4.74M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  4.74M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  368|  4.74M|        }
_ZN8jsoncons18basic_json_visitorIcE10bool_valueEbNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  374|   160k|        {
  375|   160k|            visit_bool(value, tag, context, ec);
  376|   160k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   160k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  377|   160k|        }
_ZN8jsoncons18basic_json_visitorIcE12string_valueERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_12semantic_tagERKNS_11ser_contextERNS2_10error_codeE:
  383|  4.05M|        {
  384|  4.05M|            visit_string(value, tag, context, ec);
  385|  4.05M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  4.05M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  386|  4.05M|        }
_ZN8jsoncons18basic_json_visitorIcE11begin_arrayENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  339|  1.72M|        {
  340|  1.72M|            visit_begin_array(tag, context, ec);
  341|  1.72M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  1.72M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  342|  1.72M|        }
_ZN8jsoncons18basic_json_visitorIcE12begin_objectEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  327|  45.2k|        {
  328|  45.2k|            visit_begin_object(length, tag, context, ec);
  329|  45.2k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  45.2k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  330|  45.2k|        }
_ZN8jsoncons18basic_json_visitorIcE12begin_objectENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  318|  1.95k|        {
  319|  1.95k|            visit_begin_object(tag, context, ec);
  320|  1.95k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  1.95k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  321|  1.95k|        }
_ZN8jsoncons18basic_json_visitorIcE3keyERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEERKNS_11ser_contextERNS2_10error_codeE:
  357|   877k|        {
  358|   877k|            visit_key(name, context, ec);
  359|   877k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   877k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  360|   877k|        }
_ZN8jsoncons18basic_json_visitorIcE10end_objectERKNS_11ser_contextERNSt3__110error_codeE:
  333|  46.0k|        {
  334|  46.0k|            visit_end_object(context, ec);
  335|  46.0k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  46.0k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  336|  46.0k|        }
_ZN8jsoncons18basic_json_visitorIcE5flushEv:
  108|     15|        {
  109|     15|            visit_flush();
  110|     15|        }

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

_ZN8jsoncons10bytes_sinkINSt3__16vectorIhNS1_9allocatorIhEEEEvEC2ERS5_:
  315|    247|            : buf_ptr(std::addressof(buf))
  316|    247|        {
  317|    247|        }
_ZN8jsoncons10bytes_sinkINSt3__16vectorIhNS1_9allocatorIhEEEEvE9push_backEh:
  329|  35.0M|        {
  330|  35.0M|            buf_ptr->push_back(static_cast<value_type>(ch));
  331|  35.0M|        }
_ZN8jsoncons10bytes_sinkINSt3__16vectorIhNS1_9allocatorIhEEEEvE5flushEv:
  325|    262|        {
  326|    262|        }

_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEED2Ev:
  188|    247|        {
  189|    247|            if (buffer_)
  ------------------
  |  Branch (189:17): [True: 247, False: 0]
  ------------------
  190|    247|            {
  191|    247|                std::allocator_traits<char_allocator_type>::deallocate(alloc_, buffer_, buffer_size_);
  192|    247|            }
  193|    247|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEEC2ERNS1_13basic_istreamIcNS1_11char_traitsIcEEEERKS3_:
  171|    247|            : alloc_(alloc), stream_ptr_(std::addressof(is)), sbuf_(is.rdbuf()),
  172|    247|              buffer_size_(default_max_buffer_size)
  173|    247|        {
  174|    247|            buffer_ = std::allocator_traits<char_allocator_type>::allocate(alloc_, buffer_size_);
  175|    247|            data_ = buffer_;
  176|    247|        }
_ZN8jsoncons18basic_null_istreamIcEC1Ev:
   54|    247|          : std::basic_istream<CharT>(&nb_)
   55|    247|        {
   56|    247|        }
_ZN8jsoncons18basic_null_istreamIcE11null_bufferC2Ev:
   40|    247|            null_buffer() = default;
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE8is_errorEv:
  276|  5.28M|        {
  277|  5.28M|            return stream_ptr_->bad();  
  278|  5.28M|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4readEPhm:
  343|  25.4M|        {
  344|  25.4M|            std::size_t len = 0;
  345|  25.4M|            if (length_ > 0)
  ------------------
  |  Branch (345:17): [True: 25.4M, False: 1.51k]
  ------------------
  346|  25.4M|            {
  347|  25.4M|                len = (std::min)(length_, length);
  348|  25.4M|                std::memcpy(p, data_, len*sizeof(value_type));
  349|  25.4M|                data_ += len;
  350|  25.4M|                length_ -= len;
  351|  25.4M|                position_ += len;
  352|  25.4M|            }
  353|  25.4M|            if (length - len == 0)
  ------------------
  |  Branch (353:17): [True: 25.4M, False: 1.56k]
  ------------------
  354|  25.4M|            {
  355|  25.4M|                return len;
  356|  25.4M|            }
  357|  1.56k|            else if (length - len < buffer_size_)
  ------------------
  |  Branch (357:22): [True: 1.56k, False: 0]
  ------------------
  358|  1.56k|            {
  359|  1.56k|                fill_buffer();
  360|  1.56k|                if (length_ > 0)
  ------------------
  |  Branch (360:21): [True: 1.46k, False: 102]
  ------------------
  361|  1.46k|                {
  362|  1.46k|                    std::size_t len2 = (std::min)(length_, length-len);
  363|  1.46k|                    std::memcpy(p+len, data_, len2*sizeof(value_type));
  364|  1.46k|                    data_ += len2;
  365|  1.46k|                    length_ -= len2;
  366|  1.46k|                    position_ += len2;
  367|  1.46k|                    len += len2;
  368|  1.46k|                }
  369|  1.56k|                return len;
  370|  1.56k|            }
  371|      0|            else
  372|      0|            {
  373|      0|                if (stream_ptr_->eof())
  ------------------
  |  Branch (373:21): [True: 0, False: 0]
  ------------------
  374|      0|                {
  375|      0|                    length_ = 0;
  376|      0|                    return 0;
  377|      0|                }
  378|      0|                JSONCONS_TRY
  ------------------
  |  |   37|      0|    #define JSONCONS_TRY try
  ------------------
  379|      0|                {
  380|      0|                    std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(p+len), length-len);
  381|      0|                    std::size_t len2 = static_cast<std::size_t>(count);
  382|      0|                    if (len2 < length-len)
  ------------------
  |  Branch (382:25): [True: 0, False: 0]
  ------------------
  383|      0|                    {
  384|      0|                        stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  385|      0|                    }
  386|      0|                    len += len2;
  387|      0|                    position_ += len2;
  388|      0|                    return len;
  389|      0|                }
  390|      0|                JSONCONS_CATCH(const std::exception&)     
  391|      0|                {
  392|      0|                    stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  393|      0|                    return 0;
  394|      0|                }
  395|      0|            }
  396|  25.4M|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE11fill_bufferEv:
  399|  2.06k|        {
  400|  2.06k|            if (stream_ptr_->eof())
  ------------------
  |  Branch (400:17): [True: 127, False: 1.94k]
  ------------------
  401|    127|            {
  402|    127|                length_ = 0;
  403|    127|                return;
  404|    127|            }
  405|       |
  406|  1.94k|            data_ = buffer_;
  407|  1.94k|            JSONCONS_TRY
  ------------------
  |  |   37|  1.94k|    #define JSONCONS_TRY try
  ------------------
  408|  1.94k|            {
  409|  1.94k|                std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(buffer_), buffer_size_);
  410|  1.94k|                length_ = static_cast<std::size_t>(count);
  411|       |
  412|  1.94k|                if (length_ < buffer_size_)
  ------------------
  |  Branch (412:21): [True: 231, False: 1.71k]
  ------------------
  413|    231|                {
  414|    231|                    stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  415|    231|                }
  416|  1.94k|            }
  417|  1.94k|            JSONCONS_CATCH(const std::exception&)     
  418|  1.94k|            {
  419|      0|                stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  420|      0|                length_ = 0;
  421|      0|            }
  422|  1.94k|        }
_ZN8jsoncons13source_readerINS_13stream_sourceIhNSt3__19allocatorIhEEEEE4readINS2_12basic_stringIcNS2_11char_traitsIcEENS3_IcEEEEEENS2_9enable_ifIXaaaasr3std14is_convertibleIhNT_10value_typeEEE5valuesr10ext_traits11has_reserveISE_EE5valuentsr10ext_traits14has_data_exactIPhSE_EE5valueEmE4typeERS5_RSE_m:
  882|  4.92M|        {
  883|  4.92M|            std::size_t unread = length;
  884|       |
  885|  4.92M|            std::size_t n = (std::min)(max_buffer_length, unread);
  886|  9.00M|            while (n > 0 && !source.eof())
  ------------------
  |  Branch (886:20): [True: 4.07M, False: 4.92M]
  |  Branch (886:29): [True: 4.07M, False: 46]
  ------------------
  887|  4.07M|            {
  888|  4.07M|                v.reserve(v.size()+n);
  889|  4.07M|                std::size_t actual = 0;
  890|  20.6M|                while (actual < n)
  ------------------
  |  Branch (890:24): [True: 16.6M, False: 4.07M]
  ------------------
  891|  16.6M|                {
  892|  16.6M|                    typename Source::value_type c{};
  893|  16.6M|                    if (source.read(&c,1) != 1)
  ------------------
  |  Branch (893:25): [True: 35, False: 16.6M]
  ------------------
  894|     35|                    {
  895|     35|                        break;
  896|     35|                    }
  897|  16.6M|                    v.push_back(c);
  898|  16.6M|                    ++actual;
  899|  16.6M|                }
  900|  4.07M|                unread -= actual;
  901|  4.07M|                n = (std::min)(max_buffer_length, unread);
  902|  4.07M|            }
  903|       |
  904|  4.92M|            return length - unread;
  905|  4.92M|        }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE3eofEv:
  271|  4.07M|        {
  272|  4.07M|            return length_ == 0 && stream_ptr_->eof();
  ------------------
  |  Branch (272:20): [True: 293, False: 4.07M]
  |  Branch (272:36): [True: 46, False: 247]
  ------------------
  273|  4.07M|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4peekEv:
  311|  8.92M|        {
  312|  8.92M|            if (length_ == 0)
  ------------------
  |  Branch (312:17): [True: 506, False: 8.92M]
  ------------------
  313|    506|            {
  314|    506|                fill_buffer();
  315|    506|            }
  316|  8.92M|            if (length_ > 0)
  ------------------
  |  Branch (316:17): [True: 8.92M, False: 50]
  ------------------
  317|  8.92M|            {
  318|  8.92M|                value_type c = *data_;
  319|  8.92M|                return char_result<value_type>{c, false};
  320|  8.92M|            }
  321|     50|            else
  322|     50|            {
  323|     50|                return char_result<value_type>{0, true};
  324|     50|            }
  325|  8.92M|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE6ignoreEm:
  286|  1.92M|        {
  287|  1.92M|            std::size_t len = 0;
  288|  1.92M|            if (length_ > 0)
  ------------------
  |  Branch (288:17): [True: 1.92M, False: 0]
  ------------------
  289|  1.92M|            {
  290|  1.92M|                len = (std::min)(length_, length);
  291|  1.92M|                position_ += len;
  292|  1.92M|                data_ += len;
  293|  1.92M|                length_ -= len;
  294|  1.92M|            }
  295|  1.92M|            while (len < length)
  ------------------
  |  Branch (295:20): [True: 0, False: 1.92M]
  ------------------
  296|      0|            {
  297|      0|                fill_buffer();
  298|      0|                if (length_ == 0)
  ------------------
  |  Branch (298:21): [True: 0, False: 0]
  ------------------
  299|      0|                {
  300|      0|                    break;
  301|      0|                }
  302|      0|                std::size_t len2 = (std::min)(length_, length-len);
  303|      0|                position_ += len2;
  304|      0|                data_ += len2;
  305|      0|                length_ -= len2;
  306|      0|                len += len2;
  307|      0|            }
  308|  1.92M|        }

_ZN8jsoncons6binary13native_to_bigIhNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  10.7M|    {
  128|  10.7M|        T val2 = byte_swap(val);
  129|  10.7M|        uint8_t buf[sizeof(T)];
  130|  10.7M|        std::memcpy(buf, &val2, sizeof(T));
  131|  10.7M|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 10.7M, False: 10.7M]
  ------------------
  132|  10.7M|        {
  133|  10.7M|            *d_first++ = item;
  134|  10.7M|        }
  135|  10.7M|    }
_ZN8jsoncons6binary9byte_swapIhEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  10.7M|    {
   22|  10.7M|        return val;
   23|  10.7M|    }
_ZN8jsoncons6binary13native_to_bigItNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  8.54k|    {
  128|  8.54k|        T val2 = byte_swap(val);
  129|  8.54k|        uint8_t buf[sizeof(T)];
  130|  8.54k|        std::memcpy(buf, &val2, sizeof(T));
  131|  8.54k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 17.0k, False: 8.54k]
  ------------------
  132|  17.0k|        {
  133|  17.0k|            *d_first++ = item;
  134|  17.0k|        }
  135|  8.54k|    }
_ZN8jsoncons6binary9byte_swapItEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  8.54k|    {
   29|  8.54k|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  8.54k|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  8.54k|#      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|  8.54k|    }
_ZN8jsoncons6binary13native_to_bigIjNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|    140|    {
  128|    140|        T val2 = byte_swap(val);
  129|    140|        uint8_t buf[sizeof(T)];
  130|    140|        std::memcpy(buf, &val2, sizeof(T));
  131|    140|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 560, False: 140]
  ------------------
  132|    560|        {
  133|    560|            *d_first++ = item;
  134|    560|        }
  135|    140|    }
_ZN8jsoncons6binary9byte_swapIjEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|  54.2k|    {
   40|  54.2k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|  54.2k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|  54.2k|#  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|  54.2k|    }
_ZN8jsoncons6binary9byte_swapImEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  62.8k|    {
   52|  62.8k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  62.8k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  62.8k|#  define JSONCONS_BYTE_SWAP_64 __builtin_bswap64
  ------------------
   54|       |    #else
   55|       |        uint64_t tmp = ((static_cast<uint64_t>(val) & 0x00000000ffffffffull) << 32) | ((static_cast<uint64_t>(val) & 0xffffffff00000000ull) >> 32);
   56|       |        tmp = ((tmp & 0x0000ffff0000ffffull) << 16) | ((tmp & 0xffff0000ffff0000ull) >> 16);
   57|       |        return ((tmp & 0x00ff00ff00ff00ffull) << 8)  | ((tmp & 0xff00ff00ff00ff00ull) >> 8);
   58|       |    #endif
   59|  62.8k|    }
_ZN8jsoncons6binary13native_to_bigIsNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   231k|    {
  128|   231k|        T val2 = byte_swap(val);
  129|   231k|        uint8_t buf[sizeof(T)];
  130|   231k|        std::memcpy(buf, &val2, sizeof(T));
  131|   231k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 462k, False: 231k]
  ------------------
  132|   462k|        {
  133|   462k|            *d_first++ = item;
  134|   462k|        }
  135|   231k|    }
_ZN8jsoncons6binary9byte_swapIsEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|   504k|    {
   29|   504k|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|   504k|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|   504k|#      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|   504k|    }
_ZN8jsoncons6binary13native_to_bigIiNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  76.4k|    {
  128|  76.4k|        T val2 = byte_swap(val);
  129|  76.4k|        uint8_t buf[sizeof(T)];
  130|  76.4k|        std::memcpy(buf, &val2, sizeof(T));
  131|  76.4k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 305k, False: 76.4k]
  ------------------
  132|   305k|        {
  133|   305k|            *d_first++ = item;
  134|   305k|        }
  135|  76.4k|    }
_ZN8jsoncons6binary9byte_swapIiEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|   153k|    {
   40|   153k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|   153k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|   153k|#  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|   153k|    }
_ZN8jsoncons6binary13native_to_bigIlNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  35.4k|    {
  128|  35.4k|        T val2 = byte_swap(val);
  129|  35.4k|        uint8_t buf[sizeof(T)];
  130|  35.4k|        std::memcpy(buf, &val2, sizeof(T));
  131|  35.4k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 283k, False: 35.4k]
  ------------------
  132|   283k|        {
  133|   283k|            *d_first++ = item;
  134|   283k|        }
  135|  35.4k|    }
_ZN8jsoncons6binary9byte_swapIlEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  71.5k|    {
   52|  71.5k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  71.5k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  71.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|  71.5k|    }
_ZN8jsoncons6binary13native_to_bigIaNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  66.3k|    {
  128|  66.3k|        T val2 = byte_swap(val);
  129|  66.3k|        uint8_t buf[sizeof(T)];
  130|  66.3k|        std::memcpy(buf, &val2, sizeof(T));
  131|  66.3k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 66.3k, False: 66.3k]
  ------------------
  132|  66.3k|        {
  133|  66.3k|            *d_first++ = item;
  134|  66.3k|        }
  135|  66.3k|    }
_ZN8jsoncons6binary9byte_swapIaEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  1.04M|    {
   22|  1.04M|        return val;
   23|  1.04M|    }
_ZN8jsoncons6binary13native_to_bigIfNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  24.7k|    {
  128|  24.7k|        T val2 = byte_swap(val);
  129|  24.7k|        uint8_t buf[sizeof(T)];
  130|  24.7k|        std::memcpy(buf, &val2, sizeof(T));
  131|  24.7k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 99.0k, False: 24.7k]
  ------------------
  132|  99.0k|        {
  133|  99.0k|            *d_first++ = item;
  134|  99.0k|        }
  135|  24.7k|    }
_ZN8jsoncons6binary9byte_swapIfEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   64|  54.0k|    {
   65|  54.0k|        uint32_t x;
   66|  54.0k|        std::memcpy(&x,&val,sizeof(uint32_t));
   67|  54.0k|        uint32_t y = byte_swap(x);
   68|  54.0k|        T val2;
   69|  54.0k|        std::memcpy(&val2,&y,sizeof(uint32_t));
   70|  54.0k|        return val2;
   71|  54.0k|    }
_ZN8jsoncons6binary13native_to_bigIdNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  33.7k|    {
  128|  33.7k|        T val2 = byte_swap(val);
  129|  33.7k|        uint8_t buf[sizeof(T)];
  130|  33.7k|        std::memcpy(buf, &val2, sizeof(T));
  131|  33.7k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 269k, False: 33.7k]
  ------------------
  132|   269k|        {
  133|   269k|            *d_first++ = item;
  134|   269k|        }
  135|  33.7k|    }
_ZN8jsoncons6binary9byte_swapIdEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   76|  62.8k|    {
   77|  62.8k|        uint64_t x;
   78|  62.8k|        std::memcpy(&x,&val,sizeof(uint64_t));
   79|  62.8k|        uint64_t y = byte_swap(x);
   80|  62.8k|        T val2;
   81|  62.8k|        std::memcpy(&val2,&y,sizeof(uint64_t));
   82|  62.8k|        return val2;
   83|  62.8k|    }
_ZN8jsoncons6binary13big_to_nativeIaNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|   973k|    {
  183|   973k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 973k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|   973k|        T val;
  188|   973k|        std::memcpy(&val,first,sizeof(T));
  189|   973k|        return byte_swap(val);
  190|   973k|    }
_ZN8jsoncons6binary13big_to_nativeIsNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|   273k|    {
  183|   273k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 273k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|   273k|        T val;
  188|   273k|        std::memcpy(&val,first,sizeof(T));
  189|   273k|        return byte_swap(val);
  190|   273k|    }
_ZN8jsoncons6binary13big_to_nativeIiNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  76.9k|    {
  183|  76.9k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 76.9k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  76.9k|        T val;
  188|  76.9k|        std::memcpy(&val,first,sizeof(T));
  189|  76.9k|        return byte_swap(val);
  190|  76.9k|    }
_ZN8jsoncons6binary13big_to_nativeIlNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  36.0k|    {
  183|  36.0k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 36.0k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  36.0k|        T val;
  188|  36.0k|        std::memcpy(&val,first,sizeof(T));
  189|  36.0k|        return byte_swap(val);
  190|  36.0k|    }
_ZN8jsoncons6binary13big_to_nativeIfNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  29.2k|    {
  183|  29.2k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 29.2k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  29.2k|        T val;
  188|  29.2k|        std::memcpy(&val,first,sizeof(T));
  189|  29.2k|        return byte_swap(val);
  190|  29.2k|    }
_ZN8jsoncons6binary13big_to_nativeIdNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  29.1k|    {
  183|  29.1k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 29.1k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  29.1k|        T val;
  188|  29.1k|        std::memcpy(&val,first,sizeof(T));
  189|  29.1k|        return byte_swap(val);
  190|  29.1k|    }

_ZN8jsoncons9is_base10IcEEbPKT_m:
  164|    257|{
  165|    257|    integer_chars_state state = integer_chars_state::initial;
  166|       |
  167|    257|    const CharT* end = s + length; 
  168|    472|    for (;s < end; ++s)
  ------------------
  |  Branch (168:11): [True: 416, False: 56]
  ------------------
  169|    416|    {
  170|    416|        switch(state)
  171|    416|        {
  172|    257|            case integer_chars_state::initial:
  ------------------
  |  Branch (172:13): [True: 257, False: 159]
  ------------------
  173|    257|            {
  174|    257|                switch(*s)
  175|    257|                {
  176|     82|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (176:21): [True: 15, False: 242]
  |  Branch (176:30): [True: 16, False: 241]
  |  Branch (176:39): [True: 6, False: 251]
  |  Branch (176:48): [True: 7, False: 250]
  |  Branch (176:57): [True: 3, False: 254]
  |  Branch (176:66): [True: 3, False: 254]
  |  Branch (176:75): [True: 32, False: 225]
  |  Branch (176:84): [True: 0, False: 257]
  |  Branch (176:93): [True: 0, False: 257]
  |  Branch (176:103): [True: 0, False: 257]
  ------------------
  177|     82|                        state = integer_chars_state::decimal;
  178|     82|                        break;
  179|     74|                    case '-':
  ------------------
  |  Branch (179:21): [True: 74, False: 183]
  ------------------
  180|     74|                        state = integer_chars_state::minus;
  181|     74|                        break;
  182|    101|                    default:
  ------------------
  |  Branch (182:21): [True: 101, False: 156]
  ------------------
  183|    101|                        return false;
  184|    257|                }
  185|    156|                break;
  186|    257|            }
  187|    156|            case integer_chars_state::minus:
  ------------------
  |  Branch (187:13): [True: 74, False: 342]
  ------------------
  188|     74|            {
  189|     74|                switch(*s)
  190|     74|                {
  191|     43|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (191:21): [True: 20, False: 54]
  |  Branch (191:30): [True: 1, False: 73]
  |  Branch (191:39): [True: 0, False: 74]
  |  Branch (191:48): [True: 0, False: 74]
  |  Branch (191:57): [True: 0, False: 74]
  |  Branch (191:66): [True: 7, False: 67]
  |  Branch (191:75): [True: 0, False: 74]
  |  Branch (191:84): [True: 0, False: 74]
  |  Branch (191:93): [True: 6, False: 68]
  |  Branch (191:103): [True: 9, False: 65]
  ------------------
  192|     43|                        state = integer_chars_state::decimal;
  193|     43|                        break;
  194|     31|                    default:
  ------------------
  |  Branch (194:21): [True: 31, False: 43]
  ------------------
  195|     31|                        return false;
  196|     74|                }
  197|     43|                break;
  198|     74|            }
  199|     85|            case integer_chars_state::decimal:
  ------------------
  |  Branch (199:13): [True: 85, False: 331]
  ------------------
  200|     85|            {
  201|     85|                switch(*s)
  202|     85|                {
  203|     16|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (203:21): [True: 7, False: 78]
  |  Branch (203:30): [True: 7, False: 78]
  |  Branch (203:39): [True: 0, False: 85]
  |  Branch (203:48): [True: 1, False: 84]
  |  Branch (203:57): [True: 0, False: 85]
  |  Branch (203:66): [True: 1, False: 84]
  |  Branch (203:75): [True: 0, False: 85]
  |  Branch (203:84): [True: 0, False: 85]
  |  Branch (203:93): [True: 0, False: 85]
  |  Branch (203:103): [True: 0, False: 85]
  ------------------
  204|     16|                        break;
  205|     69|                    default:
  ------------------
  |  Branch (205:21): [True: 69, False: 16]
  ------------------
  206|     69|                        return false;
  207|     85|                }
  208|     16|                break;
  209|     85|            }
  210|     16|            default:
  ------------------
  |  Branch (210:13): [True: 0, False: 416]
  ------------------
  211|      0|                break;
  212|    416|        }
  213|    416|    }
  214|     56|    return state == integer_chars_state::decimal ? true : false;
  ------------------
  |  Branch (214:12): [True: 56, False: 0]
  ------------------
  215|    257|}

_ZN8jsoncons14unicode_traits8validateIcEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14convert_resultIS4_EEE4typeEPKS4_m:
 1134|  9.85M|    {
 1135|  9.85M|        conv_errc  result = conv_errc();
 1136|  9.85M|        const CharT* last = data + length;
 1137|  26.3M|        while (data != last) 
  ------------------
  |  Branch (1137:16): [True: 16.5M, False: 9.85M]
  ------------------
 1138|  16.5M|        {
 1139|  16.5M|            std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[static_cast<uint8_t>(*data)]) + 1;
 1140|  16.5M|            if (len > (std::size_t)(last - data))
  ------------------
  |  Branch (1140:17): [True: 1, False: 16.5M]
  ------------------
 1141|      1|            {
 1142|      1|                return convert_result<CharT>{data, conv_errc::source_exhausted};
 1143|      1|            }
 1144|  16.5M|            if ((result=is_legal_utf8(data, len)) != conv_errc())
  ------------------
  |  Branch (1144:17): [True: 18, False: 16.5M]
  ------------------
 1145|     18|            {
 1146|     18|                return convert_result<CharT>{data,result} ;
 1147|     18|            }
 1148|  16.5M|            data += len;
 1149|  16.5M|        }
 1150|  9.85M|        return convert_result<CharT>{data,result} ;
 1151|  9.85M|    }
_ZN8jsoncons14unicode_traits13is_legal_utf8IcEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_9conv_errcEE4typeEPKS4_m:
  303|  16.5M|    {
  304|  16.5M|        uint8_t a;
  305|  16.5M|        const CharT* srcptr = first+length;
  306|  16.5M|        switch (length) {
  307|      6|        default:
  ------------------
  |  Branch (307:9): [True: 6, False: 16.5M]
  ------------------
  308|      6|            return conv_errc::over_long_utf8_sequence;
  309|  8.98k|        case 4:
  ------------------
  |  Branch (309:9): [True: 8.98k, False: 16.5M]
  ------------------
  310|  8.98k|            if (((a = (*--srcptr))& 0xC0) != 0x80)
  ------------------
  |  Branch (310:17): [True: 0, False: 8.98k]
  ------------------
  311|      0|                return conv_errc::expected_continuation_byte;
  312|  8.98k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  8.98k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  313|  11.4k|        case 3:
  ------------------
  |  Branch (313:9): [True: 2.44k, False: 16.5M]
  ------------------
  314|  11.4k|            if (((a = (*--srcptr))& 0xC0) != 0x80)
  ------------------
  |  Branch (314:17): [True: 1, False: 11.4k]
  ------------------
  315|      1|                return conv_errc::expected_continuation_byte;
  316|  11.4k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  11.4k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  317|  12.5k|        case 2:
  ------------------
  |  Branch (317:9): [True: 1.08k, False: 16.5M]
  ------------------
  318|  12.5k|            if (((a = (*--srcptr))& 0xC0) != 0x80)
  ------------------
  |  Branch (318:17): [True: 3, False: 12.5k]
  ------------------
  319|      3|                return conv_errc::expected_continuation_byte;
  320|       |
  321|  12.5k|            switch (static_cast<uint8_t>(*first)) 
  322|  12.5k|            {
  323|       |                // no fall-through in this inner switch
  324|     62|                case 0xE0: if (a < 0xA0) return conv_errc::source_illegal; break;
  ------------------
  |  Branch (324:17): [True: 62, False: 12.4k]
  |  Branch (324:32): [True: 0, False: 62]
  ------------------
  325|    150|                case 0xED: if (a > 0x9F) return conv_errc::source_illegal; break;
  ------------------
  |  Branch (325:17): [True: 150, False: 12.3k]
  |  Branch (325:32): [True: 0, False: 150]
  ------------------
  326|  1.89k|                case 0xF0: if (a < 0x90) return conv_errc::source_illegal; break;
  ------------------
  |  Branch (326:17): [True: 1.89k, False: 10.6k]
  |  Branch (326:32): [True: 0, False: 1.89k]
  ------------------
  327|  6.95k|                case 0xF4: if (a > 0x8F) return conv_errc::source_illegal; break;
  ------------------
  |  Branch (327:17): [True: 6.95k, False: 5.55k]
  |  Branch (327:32): [True: 0, False: 6.95k]
  ------------------
  328|  6.95k|                default:   if (a < 0x80) return conv_errc::source_illegal;
  ------------------
  |  Branch (328:17): [True: 3.44k, False: 9.06k]
  |  Branch (328:32): [True: 0, False: 3.44k]
  ------------------
  329|  12.5k|            }
  330|       |
  331|  12.5k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  12.5k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  332|  16.5M|        case 1:
  ------------------
  |  Branch (332:9): [True: 16.5M, False: 12.5k]
  ------------------
  333|  16.5M|            if (static_cast<uint8_t>(*first) >= 0x80 && static_cast<uint8_t>(*first) < 0xC2)
  ------------------
  |  Branch (333:17): [True: 12.5k, False: 16.5M]
  |  Branch (333:57): [True: 8, False: 12.5k]
  ------------------
  334|      8|                return conv_errc::source_illegal;
  335|  16.5M|            break;
  336|  16.5M|        }
  337|  16.5M|        if (static_cast<uint8_t>(*first) > 0xF4) 
  ------------------
  |  Branch (337:13): [True: 0, False: 16.5M]
  ------------------
  338|      0|            return conv_errc::source_illegal;
  339|       |
  340|  16.5M|        return conv_errc();
  341|  16.5M|    }

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

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

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

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

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

