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

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

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

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

_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEED2Ev:
  188|    249|        {
  189|    249|            if (buffer_)
  ------------------
  |  Branch (189:17): [True: 249, False: 0]
  ------------------
  190|    249|            {
  191|    249|                std::allocator_traits<char_allocator_type>::deallocate(alloc_, buffer_, buffer_size_);
  192|    249|            }
  193|    249|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEEC2ERNS1_13basic_istreamIcNS1_11char_traitsIcEEEERKS3_:
  171|    249|            : alloc_(alloc), stream_ptr_(std::addressof(is)), sbuf_(is.rdbuf()),
  172|    249|              buffer_size_(default_max_buffer_size)
  173|    249|        {
  174|    249|            buffer_ = std::allocator_traits<char_allocator_type>::allocate(alloc_, buffer_size_);
  175|    249|            data_ = buffer_;
  176|    249|        }
_ZN8jsoncons18basic_null_istreamIcEC1Ev:
   54|    249|          : std::basic_istream<CharT>(&nb_)
   55|    249|        {
   56|    249|        }
_ZN8jsoncons18basic_null_istreamIcE11null_bufferC2Ev:
   40|    249|            null_buffer() = default;
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE8is_errorEv:
  276|  5.84M|        {
  277|  5.84M|            return stream_ptr_->bad();  
  278|  5.84M|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4readEPhm:
  343|  26.3M|        {
  344|  26.3M|            std::size_t len = 0;
  345|  26.3M|            if (length_ > 0)
  ------------------
  |  Branch (345:17): [True: 26.3M, False: 1.51k]
  ------------------
  346|  26.3M|            {
  347|  26.3M|                len = (std::min)(length_, length);
  348|  26.3M|                std::memcpy(p, data_, len*sizeof(value_type));
  349|  26.3M|                data_ += len;
  350|  26.3M|                length_ -= len;
  351|  26.3M|                position_ += len;
  352|  26.3M|            }
  353|  26.3M|            if (length - len == 0)
  ------------------
  |  Branch (353:17): [True: 26.3M, False: 1.62k]
  ------------------
  354|  26.3M|            {
  355|  26.3M|                return len;
  356|  26.3M|            }
  357|  1.62k|            else if (length - len < buffer_size_)
  ------------------
  |  Branch (357:22): [True: 1.62k, False: 0]
  ------------------
  358|  1.62k|            {
  359|  1.62k|                fill_buffer();
  360|  1.62k|                if (length_ > 0)
  ------------------
  |  Branch (360:21): [True: 1.52k, False: 101]
  ------------------
  361|  1.52k|                {
  362|  1.52k|                    std::size_t len2 = (std::min)(length_, length-len);
  363|  1.52k|                    std::memcpy(p+len, data_, len2*sizeof(value_type));
  364|  1.52k|                    data_ += len2;
  365|  1.52k|                    length_ -= len2;
  366|  1.52k|                    position_ += len2;
  367|  1.52k|                    len += len2;
  368|  1.52k|                }
  369|  1.62k|                return len;
  370|  1.62k|            }
  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|  26.3M|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE11fill_bufferEv:
  399|  2.16k|        {
  400|  2.16k|            if (stream_ptr_->eof())
  ------------------
  |  Branch (400:17): [True: 133, False: 2.02k]
  ------------------
  401|    133|            {
  402|    133|                length_ = 0;
  403|    133|                return;
  404|    133|            }
  405|       |
  406|  2.02k|            data_ = buffer_;
  407|  2.02k|            JSONCONS_TRY
  ------------------
  |  |   37|  2.02k|    #define JSONCONS_TRY try
  ------------------
  408|  2.02k|            {
  409|  2.02k|                std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(buffer_), buffer_size_);
  410|  2.02k|                length_ = static_cast<std::size_t>(count);
  411|       |
  412|  2.02k|                if (length_ < buffer_size_)
  ------------------
  |  Branch (412:21): [True: 228, False: 1.80k]
  ------------------
  413|    228|                {
  414|    228|                    stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  415|    228|                }
  416|  2.02k|            }
  417|  2.02k|            JSONCONS_CATCH(const std::exception&)     
  418|  2.02k|            {
  419|      0|                stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  420|      0|                length_ = 0;
  421|      0|            }
  422|  2.02k|        }
_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|  5.17M|        {
  883|  5.17M|            std::size_t unread = length;
  884|       |
  885|  5.17M|            std::size_t n = (std::min)(max_buffer_length, unread);
  886|  9.54M|            while (n > 0 && !source.eof())
  ------------------
  |  Branch (886:20): [True: 4.37M, False: 5.17M]
  |  Branch (886:29): [True: 4.37M, False: 46]
  ------------------
  887|  4.37M|            {
  888|  4.37M|                v.reserve(v.size()+n);
  889|  4.37M|                std::size_t actual = 0;
  890|  20.9M|                while (actual < n)
  ------------------
  |  Branch (890:24): [True: 16.5M, False: 4.37M]
  ------------------
  891|  16.5M|                {
  892|  16.5M|                    typename Source::value_type c{};
  893|  16.5M|                    if (source.read(&c,1) != 1)
  ------------------
  |  Branch (893:25): [True: 36, False: 16.5M]
  ------------------
  894|     36|                    {
  895|     36|                        break;
  896|     36|                    }
  897|  16.5M|                    v.push_back(c);
  898|  16.5M|                    ++actual;
  899|  16.5M|                }
  900|  4.37M|                unread -= actual;
  901|  4.37M|                n = (std::min)(max_buffer_length, unread);
  902|  4.37M|            }
  903|       |
  904|  5.17M|            return length - unread;
  905|  5.17M|        }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE3eofEv:
  271|  4.37M|        {
  272|  4.37M|            return length_ == 0 && stream_ptr_->eof();
  ------------------
  |  Branch (272:20): [True: 310, False: 4.37M]
  |  Branch (272:36): [True: 46, False: 264]
  ------------------
  273|  4.37M|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4peekEv:
  311|  9.65M|        {
  312|  9.65M|            if (length_ == 0)
  ------------------
  |  Branch (312:17): [True: 539, False: 9.65M]
  ------------------
  313|    539|            {
  314|    539|                fill_buffer();
  315|    539|            }
  316|  9.65M|            if (length_ > 0)
  ------------------
  |  Branch (316:17): [True: 9.65M, False: 52]
  ------------------
  317|  9.65M|            {
  318|  9.65M|                value_type c = *data_;
  319|  9.65M|                return char_result<value_type>{c, false};
  320|  9.65M|            }
  321|     52|            else
  322|     52|            {
  323|     52|                return char_result<value_type>{0, true};
  324|     52|            }
  325|  9.65M|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE6ignoreEm:
  286|  2.01M|        {
  287|  2.01M|            std::size_t len = 0;
  288|  2.01M|            if (length_ > 0)
  ------------------
  |  Branch (288:17): [True: 2.01M, False: 0]
  ------------------
  289|  2.01M|            {
  290|  2.01M|                len = (std::min)(length_, length);
  291|  2.01M|                position_ += len;
  292|  2.01M|                data_ += len;
  293|  2.01M|                length_ -= len;
  294|  2.01M|            }
  295|  2.01M|            while (len < length)
  ------------------
  |  Branch (295:20): [True: 0, False: 2.01M]
  ------------------
  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|  2.01M|        }

_ZN8jsoncons6binary13native_to_bigIhNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  11.7M|    {
  128|  11.7M|        T val2 = byte_swap(val);
  129|  11.7M|        uint8_t buf[sizeof(T)];
  130|  11.7M|        std::memcpy(buf, &val2, sizeof(T));
  131|  11.7M|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 11.7M, False: 11.7M]
  ------------------
  132|  11.7M|        {
  133|  11.7M|            *d_first++ = item;
  134|  11.7M|        }
  135|  11.7M|    }
_ZN8jsoncons6binary9byte_swapIhEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  11.7M|    {
   22|  11.7M|        return val;
   23|  11.7M|    }
_ZN8jsoncons6binary13native_to_bigItNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  9.78k|    {
  128|  9.78k|        T val2 = byte_swap(val);
  129|  9.78k|        uint8_t buf[sizeof(T)];
  130|  9.78k|        std::memcpy(buf, &val2, sizeof(T));
  131|  9.78k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 19.5k, False: 9.78k]
  ------------------
  132|  19.5k|        {
  133|  19.5k|            *d_first++ = item;
  134|  19.5k|        }
  135|  9.78k|    }
_ZN8jsoncons6binary9byte_swapItEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  9.78k|    {
   29|  9.78k|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  9.78k|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  9.78k|#      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|  9.78k|    }
_ZN8jsoncons6binary13native_to_bigIjNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|    139|    {
  128|    139|        T val2 = byte_swap(val);
  129|    139|        uint8_t buf[sizeof(T)];
  130|    139|        std::memcpy(buf, &val2, sizeof(T));
  131|    139|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 556, False: 139]
  ------------------
  132|    556|        {
  133|    556|            *d_first++ = item;
  134|    556|        }
  135|    139|    }
_ZN8jsoncons6binary9byte_swapIjEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|  51.3k|    {
   40|  51.3k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|  51.3k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|  51.3k|#  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|  51.3k|    }
_ZN8jsoncons6binary9byte_swapImEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  62.7k|    {
   52|  62.7k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  62.7k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  62.7k|#  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.7k|    }
_ZN8jsoncons6binary13native_to_bigIsNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   542k|    {
  128|   542k|        T val2 = byte_swap(val);
  129|   542k|        uint8_t buf[sizeof(T)];
  130|   542k|        std::memcpy(buf, &val2, sizeof(T));
  131|   542k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 1.08M, False: 542k]
  ------------------
  132|  1.08M|        {
  133|  1.08M|            *d_first++ = item;
  134|  1.08M|        }
  135|   542k|    }
_ZN8jsoncons6binary9byte_swapIsEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  1.33M|    {
   29|  1.33M|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  1.33M|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  1.33M|#      define JSONCONS_BYTE_SWAP_16    __builtin_bswap16
  ------------------
   31|       |    #else
   32|       |        return (static_cast<uint16_t>(val) >> 8) | (static_cast<uint16_t>(val) << 8);
   33|       |    #endif
   34|  1.33M|    }
_ZN8jsoncons6binary13native_to_bigIiNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  76.8k|    {
  128|  76.8k|        T val2 = byte_swap(val);
  129|  76.8k|        uint8_t buf[sizeof(T)];
  130|  76.8k|        std::memcpy(buf, &val2, sizeof(T));
  131|  76.8k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 307k, False: 76.8k]
  ------------------
  132|   307k|        {
  133|   307k|            *d_first++ = item;
  134|   307k|        }
  135|  76.8k|    }
_ZN8jsoncons6binary9byte_swapIiEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|   154k|    {
   40|   154k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|   154k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|   154k|#  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|   154k|    }
_ZN8jsoncons6binary13native_to_bigIlNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  29.7k|    {
  128|  29.7k|        T val2 = byte_swap(val);
  129|  29.7k|        uint8_t buf[sizeof(T)];
  130|  29.7k|        std::memcpy(buf, &val2, sizeof(T));
  131|  29.7k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 238k, False: 29.7k]
  ------------------
  132|   238k|        {
  133|   238k|            *d_first++ = item;
  134|   238k|        }
  135|  29.7k|    }
_ZN8jsoncons6binary9byte_swapIlEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  60.4k|    {
   52|  60.4k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  60.4k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  60.4k|#  define JSONCONS_BYTE_SWAP_64 __builtin_bswap64
  ------------------
   54|       |    #else
   55|       |        uint64_t tmp = ((static_cast<uint64_t>(val) & 0x00000000ffffffffull) << 32) | ((static_cast<uint64_t>(val) & 0xffffffff00000000ull) >> 32);
   56|       |        tmp = ((tmp & 0x0000ffff0000ffffull) << 16) | ((tmp & 0xffff0000ffff0000ull) >> 16);
   57|       |        return ((tmp & 0x00ff00ff00ff00ffull) << 8)  | ((tmp & 0xff00ff00ff00ff00ull) >> 8);
   58|       |    #endif
   59|  60.4k|    }
_ZN8jsoncons6binary13native_to_bigIaNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  66.7k|    {
  128|  66.7k|        T val2 = byte_swap(val);
  129|  66.7k|        uint8_t buf[sizeof(T)];
  130|  66.7k|        std::memcpy(buf, &val2, sizeof(T));
  131|  66.7k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 66.7k, False: 66.7k]
  ------------------
  132|  66.7k|        {
  133|  66.7k|            *d_first++ = item;
  134|  66.7k|        }
  135|  66.7k|    }
_ZN8jsoncons6binary9byte_swapIaEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  1.05M|    {
   22|  1.05M|        return val;
   23|  1.05M|    }
_ZN8jsoncons6binary13native_to_bigIfNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  23.4k|    {
  128|  23.4k|        T val2 = byte_swap(val);
  129|  23.4k|        uint8_t buf[sizeof(T)];
  130|  23.4k|        std::memcpy(buf, &val2, sizeof(T));
  131|  23.4k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 93.7k, False: 23.4k]
  ------------------
  132|  93.7k|        {
  133|  93.7k|            *d_first++ = item;
  134|  93.7k|        }
  135|  23.4k|    }
_ZN8jsoncons6binary9byte_swapIfEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   64|  51.2k|    {
   65|  51.2k|        uint32_t x;
   66|  51.2k|        std::memcpy(&x,&val,sizeof(uint32_t));
   67|  51.2k|        uint32_t y = byte_swap(x);
   68|  51.2k|        T val2;
   69|  51.2k|        std::memcpy(&val2,&y,sizeof(uint32_t));
   70|  51.2k|        return val2;
   71|  51.2k|    }
_ZN8jsoncons6binary13native_to_bigIdNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  33.5k|    {
  128|  33.5k|        T val2 = byte_swap(val);
  129|  33.5k|        uint8_t buf[sizeof(T)];
  130|  33.5k|        std::memcpy(buf, &val2, sizeof(T));
  131|  33.5k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 268k, False: 33.5k]
  ------------------
  132|   268k|        {
  133|   268k|            *d_first++ = item;
  134|   268k|        }
  135|  33.5k|    }
_ZN8jsoncons6binary9byte_swapIdEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   76|  62.7k|    {
   77|  62.7k|        uint64_t x;
   78|  62.7k|        std::memcpy(&x,&val,sizeof(uint64_t));
   79|  62.7k|        uint64_t y = byte_swap(x);
   80|  62.7k|        T val2;
   81|  62.7k|        std::memcpy(&val2,&y,sizeof(uint64_t));
   82|  62.7k|        return val2;
   83|  62.7k|    }
_ZN8jsoncons6binary13big_to_nativeIaNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|   986k|    {
  183|   986k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 986k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|   986k|        T val;
  188|   986k|        std::memcpy(&val,first,sizeof(T));
  189|   986k|        return byte_swap(val);
  190|   986k|    }
_ZN8jsoncons6binary13big_to_nativeIsNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|   795k|    {
  183|   795k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 795k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|   795k|        T val;
  188|   795k|        std::memcpy(&val,first,sizeof(T));
  189|   795k|        return byte_swap(val);
  190|   795k|    }
_ZN8jsoncons6binary13big_to_nativeIiNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  77.4k|    {
  183|  77.4k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 77.4k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  77.4k|        T val;
  188|  77.4k|        std::memcpy(&val,first,sizeof(T));
  189|  77.4k|        return byte_swap(val);
  190|  77.4k|    }
_ZN8jsoncons6binary13big_to_nativeIlNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  30.6k|    {
  183|  30.6k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 30.6k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  30.6k|        T val;
  188|  30.6k|        std::memcpy(&val,first,sizeof(T));
  189|  30.6k|        return byte_swap(val);
  190|  30.6k|    }
_ZN8jsoncons6binary13big_to_nativeIfNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  27.7k|    {
  183|  27.7k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 27.7k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  27.7k|        T val;
  188|  27.7k|        std::memcpy(&val,first,sizeof(T));
  189|  27.7k|        return byte_swap(val);
  190|  27.7k|    }
_ZN8jsoncons6binary13big_to_nativeIdNS_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|    }

_ZN8jsoncons9is_base10IcEEbPKT_m:
  164|    450|{
  165|    450|    integer_chars_state state = integer_chars_state::initial;
  166|       |
  167|    450|    const CharT* end = s + length; 
  168|    675|    for (;s < end; ++s)
  ------------------
  |  Branch (168:11): [True: 616, False: 59]
  ------------------
  169|    616|    {
  170|    616|        switch(state)
  171|    616|        {
  172|    450|            case integer_chars_state::initial:
  ------------------
  |  Branch (172:13): [True: 450, False: 166]
  ------------------
  173|    450|            {
  174|    450|                switch(*s)
  175|    450|                {
  176|     91|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (176:21): [True: 22, False: 428]
  |  Branch (176:30): [True: 13, False: 437]
  |  Branch (176:39): [True: 6, False: 444]
  |  Branch (176:48): [True: 8, False: 442]
  |  Branch (176:57): [True: 7, False: 443]
  |  Branch (176:66): [True: 3, False: 447]
  |  Branch (176:75): [True: 32, False: 418]
  |  Branch (176:84): [True: 0, False: 450]
  |  Branch (176:93): [True: 0, False: 450]
  |  Branch (176:103): [True: 0, False: 450]
  ------------------
  177|     91|                        state = integer_chars_state::decimal;
  178|     91|                        break;
  179|     66|                    case '-':
  ------------------
  |  Branch (179:21): [True: 66, False: 384]
  ------------------
  180|     66|                        state = integer_chars_state::minus;
  181|     66|                        break;
  182|    293|                    default:
  ------------------
  |  Branch (182:21): [True: 293, False: 157]
  ------------------
  183|    293|                        return false;
  184|    450|                }
  185|    157|                break;
  186|    450|            }
  187|    157|            case integer_chars_state::minus:
  ------------------
  |  Branch (187:13): [True: 66, False: 550]
  ------------------
  188|     66|            {
  189|     66|                switch(*s)
  190|     66|                {
  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: 46]
  |  Branch (191:30): [True: 1, False: 65]
  |  Branch (191:39): [True: 0, False: 66]
  |  Branch (191:48): [True: 0, False: 66]
  |  Branch (191:57): [True: 0, False: 66]
  |  Branch (191:66): [True: 7, False: 59]
  |  Branch (191:75): [True: 0, False: 66]
  |  Branch (191:84): [True: 0, False: 66]
  |  Branch (191:93): [True: 6, False: 60]
  |  Branch (191:103): [True: 9, False: 57]
  ------------------
  192|     43|                        state = integer_chars_state::decimal;
  193|     43|                        break;
  194|     23|                    default:
  ------------------
  |  Branch (194:21): [True: 23, False: 43]
  ------------------
  195|     23|                        return false;
  196|     66|                }
  197|     43|                break;
  198|     66|            }
  199|    100|            case integer_chars_state::decimal:
  ------------------
  |  Branch (199:13): [True: 100, False: 516]
  ------------------
  200|    100|            {
  201|    100|                switch(*s)
  202|    100|                {
  203|     25|                    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: 93]
  |  Branch (203:30): [True: 11, False: 89]
  |  Branch (203:39): [True: 0, False: 100]
  |  Branch (203:48): [True: 5, False: 95]
  |  Branch (203:57): [True: 0, False: 100]
  |  Branch (203:66): [True: 2, False: 98]
  |  Branch (203:75): [True: 0, False: 100]
  |  Branch (203:84): [True: 0, False: 100]
  |  Branch (203:93): [True: 0, False: 100]
  |  Branch (203:103): [True: 0, False: 100]
  ------------------
  204|     25|                        break;
  205|     75|                    default:
  ------------------
  |  Branch (205:21): [True: 75, False: 25]
  ------------------
  206|     75|                        return false;
  207|    100|                }
  208|     25|                break;
  209|    100|            }
  210|     25|            default:
  ------------------
  |  Branch (210:13): [True: 0, False: 616]
  ------------------
  211|      0|                break;
  212|    616|        }
  213|    616|    }
  214|     59|    return state == integer_chars_state::decimal ? true : false;
  ------------------
  |  Branch (214:12): [True: 59, False: 0]
  ------------------
  215|    450|}

_ZN8jsoncons14unicode_traits8validateIcEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14convert_resultIS4_EEE4typeEPKS4_m:
 1134|  10.3M|    {
 1135|  10.3M|        conv_errc  result = conv_errc();
 1136|  10.3M|        const CharT* last = data + length;
 1137|  26.5M|        while (data != last) 
  ------------------
  |  Branch (1137:16): [True: 16.2M, False: 10.3M]
  ------------------
 1138|  16.2M|        {
 1139|  16.2M|            std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[static_cast<uint8_t>(*data)]) + 1;
 1140|  16.2M|            if (len > (std::size_t)(last - data))
  ------------------
  |  Branch (1140:17): [True: 1, False: 16.2M]
  ------------------
 1141|      1|            {
 1142|      1|                return convert_result<CharT>{data, conv_errc::source_exhausted};
 1143|      1|            }
 1144|  16.2M|            if ((result=is_legal_utf8(data, len)) != conv_errc())
  ------------------
  |  Branch (1144:17): [True: 20, False: 16.2M]
  ------------------
 1145|     20|            {
 1146|     20|                return convert_result<CharT>{data,result} ;
 1147|     20|            }
 1148|  16.2M|            data += len;
 1149|  16.2M|        }
 1150|  10.3M|        return convert_result<CharT>{data,result} ;
 1151|  10.3M|    }
_ZN8jsoncons14unicode_traits13is_legal_utf8IcEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_9conv_errcEE4typeEPKS4_m:
  303|  16.2M|    {
  304|  16.2M|        uint8_t a;
  305|  16.2M|        const CharT* srcptr = first+length;
  306|  16.2M|        switch (length) {
  307|      6|        default:
  ------------------
  |  Branch (307:9): [True: 6, False: 16.2M]
  ------------------
  308|      6|            return conv_errc::over_long_utf8_sequence;
  309|  6.00k|        case 4:
  ------------------
  |  Branch (309:9): [True: 6.00k, False: 16.2M]
  ------------------
  310|  6.00k|            if (((a = (*--srcptr))& 0xC0) != 0x80)
  ------------------
  |  Branch (310:17): [True: 0, False: 6.00k]
  ------------------
  311|      0|                return conv_errc::expected_continuation_byte;
  312|  6.00k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  6.00k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  313|  7.78k|        case 3:
  ------------------
  |  Branch (313:9): [True: 1.78k, False: 16.2M]
  ------------------
  314|  7.78k|            if (((a = (*--srcptr))& 0xC0) != 0x80)
  ------------------
  |  Branch (314:17): [True: 1, False: 7.78k]
  ------------------
  315|      1|                return conv_errc::expected_continuation_byte;
  316|  7.78k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  7.78k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  317|  8.48k|        case 2:
  ------------------
  |  Branch (317:9): [True: 694, False: 16.2M]
  ------------------
  318|  8.48k|            if (((a = (*--srcptr))& 0xC0) != 0x80)
  ------------------
  |  Branch (318:17): [True: 3, False: 8.47k]
  ------------------
  319|      3|                return conv_errc::expected_continuation_byte;
  320|       |
  321|  8.47k|            switch (static_cast<uint8_t>(*first)) 
  322|  8.47k|            {
  323|       |                // no fall-through in this inner switch
  324|     72|                case 0xE0: if (a < 0xA0) return conv_errc::source_illegal; break;
  ------------------
  |  Branch (324:17): [True: 72, False: 8.40k]
  |  Branch (324:32): [True: 0, False: 72]
  ------------------
  325|    186|                case 0xED: if (a > 0x9F) return conv_errc::source_illegal; break;
  ------------------
  |  Branch (325:17): [True: 186, False: 8.29k]
  |  Branch (325:32): [True: 0, False: 186]
  ------------------
  326|  1.26k|                case 0xF0: if (a < 0x90) return conv_errc::source_illegal; break;
  ------------------
  |  Branch (326:17): [True: 1.26k, False: 7.21k]
  |  Branch (326:32): [True: 0, False: 1.26k]
  ------------------
  327|  4.64k|                case 0xF4: if (a > 0x8F) return conv_errc::source_illegal; break;
  ------------------
  |  Branch (327:17): [True: 4.64k, False: 3.83k]
  |  Branch (327:32): [True: 0, False: 4.64k]
  ------------------
  328|  4.64k|                default:   if (a < 0x80) return conv_errc::source_illegal;
  ------------------
  |  Branch (328:17): [True: 2.31k, False: 6.16k]
  |  Branch (328:32): [True: 0, False: 2.31k]
  ------------------
  329|  8.47k|            }
  330|       |
  331|  8.47k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  8.47k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  332|  16.2M|        case 1:
  ------------------
  |  Branch (332:9): [True: 16.2M, False: 8.48k]
  ------------------
  333|  16.2M|            if (static_cast<uint8_t>(*first) >= 0x80 && static_cast<uint8_t>(*first) < 0xC2)
  ------------------
  |  Branch (333:17): [True: 8.48k, False: 16.2M]
  |  Branch (333:57): [True: 10, False: 8.47k]
  ------------------
  334|     10|                return conv_errc::source_illegal;
  335|  16.2M|            break;
  336|  16.2M|        }
  337|  16.2M|        if (static_cast<uint8_t>(*first) > 0xF4) 
  ------------------
  |  Branch (337:13): [True: 0, False: 16.2M]
  ------------------
  338|      0|            return conv_errc::source_illegal;
  339|       |
  340|  16.2M|        return conv_errc();
  341|  16.2M|    }

_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEEC2EOS8_RKS9_:
   99|    249|       : basic_ubjson_encoder(std::forward<Sink>(sink), ubjson_encode_options(), alloc)
  100|    249|    {
  101|    249|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEEC2EOS8_RKNS0_21ubjson_encode_optionsERKS9_:
  106|    249|       : sink_(std::forward<Sink>(sink)),
  107|    249|         max_nesting_depth_(options.max_nesting_depth()),
  108|    249|         alloc_(alloc)
  109|    249|    {
  110|    249|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE17visit_begin_arrayEmNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  215|   104k|    {
  216|   104k|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|   104k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 104k]
  |  |  ------------------
  ------------------
  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|   104k|        stack_.emplace_back(ubjson_container_type::array, length);
  222|   104k|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_array_marker);
  223|   104k|        sink_.push_back(jsoncons::ubjson::ubjson_type::count_marker);
  224|   104k|        put_length(length);
  225|       |
  226|   104k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   104k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  227|   104k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_itemC2ENS0_21ubjson_container_typeEm:
   57|  1.96M|           : type_(type), length_(length)
   58|  1.96M|        {
   59|  1.96M|        }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10put_lengthEm:
  318|  5.32M|    {
  319|  5.32M|        if (length <= (std::numeric_limits<uint8_t>::max)())
  ------------------
  |  Branch (319:13): [True: 5.31M, False: 9.92k]
  ------------------
  320|  5.31M|        {
  321|  5.31M|            sink_.push_back(ubjson_type::uint8_type);
  322|  5.31M|            binary::native_to_big(static_cast<uint8_t>(length), std::back_inserter(sink_));
  323|  5.31M|        }
  324|  9.92k|        else if (length <= (std::size_t)(std::numeric_limits<int16_t>::max)())
  ------------------
  |  Branch (324:18): [True: 9.78k, False: 139]
  ------------------
  325|  9.78k|        {
  326|  9.78k|            sink_.push_back(ubjson_type::int16_type);
  327|  9.78k|            binary::native_to_big(static_cast<uint16_t>(length), std::back_inserter(sink_));
  328|  9.78k|        }
  329|    139|        else if (length <= (std::size_t)(std::numeric_limits<int32_t>::max)())
  ------------------
  |  Branch (329:18): [True: 139, False: 0]
  ------------------
  330|    139|        {
  331|    139|            sink_.push_back(ubjson_type::int32_type);
  332|    139|            binary::native_to_big(static_cast<uint32_t>(length),std::back_inserter(sink_));
  333|    139|        }
  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.32M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE15visit_end_arrayERKNS_11ser_contextERNS3_10error_codeE:
  230|  1.88M|    {
  231|  1.88M|        JSONCONS_ASSERT(!stack_.empty());
  ------------------
  |  |   45|  1.88M|#define JSONCONS_ASSERT(x) if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (45:32): [True: 0, False: 1.88M]
  |  |  ------------------
  |  |   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.88M|        --nesting_depth_;
  233|       |
  234|  1.88M|        if (stack_.back().is_indefinite_length())
  ------------------
  |  Branch (234:13): [True: 1.79M, False: 92.6k]
  ------------------
  235|  1.79M|        {
  236|  1.79M|            sink_.push_back(jsoncons::ubjson::ubjson_type::end_array_marker);
  237|  1.79M|        }
  238|  92.6k|        else
  239|  92.6k|        {
  240|  92.6k|            if (stack_.back().count() < stack_.back().length())
  ------------------
  |  Branch (240:17): [True: 0, False: 92.6k]
  ------------------
  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|  92.6k|            if (stack_.back().count() > stack_.back().length())
  ------------------
  |  Branch (245:17): [True: 0, False: 92.6k]
  ------------------
  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|  92.6k|        }
  251|  1.88M|        stack_.pop_back();
  252|  1.88M|        end_value();
  253|  1.88M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  1.88M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  254|  1.88M|    }
_ZNK8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_item20is_indefinite_lengthEv:
   79|  1.93M|        {
   80|  1.93M|            return type_ == ubjson_container_type::indefinite_length_array || type_ == ubjson_container_type::indefinite_length_object;
  ------------------
  |  Branch (80:20): [True: 1.79M, False: 142k]
  |  Branch (80:79): [True: 1.96k, False: 140k]
  ------------------
   81|  1.93M|        }
_ZNK8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_item5countEv:
   69|   280k|        {
   70|   280k|            return count_;
   71|   280k|        }
_ZNK8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10stack_item6lengthEv:
   64|   280k|        {
   65|   280k|            return length_;
   66|   280k|        }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE9end_valueEv:
  496|  13.7M|    {
  497|  13.7M|        if (!stack_.empty())
  ------------------
  |  Branch (497:13): [True: 13.7M, False: 14]
  ------------------
  498|  13.7M|        {
  499|  13.7M|            ++stack_.back().count_;
  500|  13.7M|        }
  501|  13.7M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE12visit_uint64EmNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  461|   571k|    {
  462|   571k|        if (val <= (std::numeric_limits<uint8_t>::max)())
  ------------------
  |  Branch (462:13): [True: 571k, False: 0]
  ------------------
  463|   571k|        {
  464|   571k|            sink_.push_back(jsoncons::ubjson::ubjson_type::uint8_type);
  465|   571k|            binary::native_to_big(static_cast<uint8_t>(val),std::back_inserter(sink_));
  466|   571k|        }
  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|   571k|        end_value();
  483|   571k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   571k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  484|   571k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE11visit_int64ElNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  394|  1.26M|    {
  395|  1.26M|        if (val >= 0)
  ------------------
  |  Branch (395:13): [True: 1.04M, False: 221k]
  ------------------
  396|  1.04M|        {
  397|  1.04M|            if (val <= (std::numeric_limits<uint8_t>::max)())
  ------------------
  |  Branch (397:17): [True: 551k, False: 495k]
  ------------------
  398|   551k|            {
  399|       |                // uint 8 stores a 8-bit unsigned integer
  400|   551k|                sink_.push_back(jsoncons::ubjson::ubjson_type::uint8_type);
  401|   551k|                binary::native_to_big(static_cast<uint8_t>(val),std::back_inserter(sink_));
  402|   551k|            }
  403|   495k|            else if (val <= (std::numeric_limits<int16_t>::max)())
  ------------------
  |  Branch (403:22): [True: 462k, False: 33.2k]
  ------------------
  404|   462k|            {
  405|       |                // uint 16 stores a 16-bit big-endian unsigned integer
  406|   462k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int16_type);
  407|   462k|                binary::native_to_big(static_cast<int16_t>(val),std::back_inserter(sink_));
  408|   462k|            }
  409|  33.2k|            else if (val <= (std::numeric_limits<int32_t>::max)())
  ------------------
  |  Branch (409:22): [True: 21.7k, False: 11.4k]
  ------------------
  410|  21.7k|            {
  411|       |                // uint 32 stores a 32-bit big-endian unsigned integer
  412|  21.7k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int32_type);
  413|  21.7k|                binary::native_to_big(static_cast<int32_t>(val),std::back_inserter(sink_));
  414|  21.7k|            }
  415|  11.4k|            else if (val <= (std::numeric_limits<int64_t>::max)())
  ------------------
  |  Branch (415:22): [True: 11.4k, False: 0]
  ------------------
  416|  11.4k|            {
  417|       |                // int 64 stores a 64-bit big-endian signed integer
  418|  11.4k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int64_type);
  419|  11.4k|                binary::native_to_big(val,std::back_inserter(sink_));
  420|  11.4k|            }
  421|      0|            else
  422|      0|            {
  423|       |                // big integer
  424|      0|            }
  425|  1.04M|        }
  426|   221k|        else
  427|   221k|        {
  428|   221k|            if (val >= (std::numeric_limits<int8_t>::lowest)())
  ------------------
  |  Branch (428:17): [True: 66.7k, False: 154k]
  ------------------
  429|  66.7k|            {
  430|       |                // int 8 stores a 8-bit signed integer
  431|  66.7k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int8_type);
  432|  66.7k|                binary::native_to_big(static_cast<int8_t>(val),std::back_inserter(sink_));
  433|  66.7k|            }
  434|   154k|            else if (val >= (std::numeric_limits<int16_t>::lowest)())
  ------------------
  |  Branch (434:22): [True: 80.9k, False: 73.4k]
  ------------------
  435|  80.9k|            {
  436|       |                // int 16 stores a 16-bit big-endian signed integer
  437|  80.9k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int16_type);
  438|  80.9k|                binary::native_to_big(static_cast<int16_t>(val),std::back_inserter(sink_));
  439|  80.9k|            }
  440|  73.4k|            else if (val >= (std::numeric_limits<int32_t>::lowest)())
  ------------------
  |  Branch (440:22): [True: 55.1k, False: 18.3k]
  ------------------
  441|  55.1k|            {
  442|       |                // int 32 stores a 32-bit big-endian signed integer
  443|  55.1k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int32_type);
  444|  55.1k|                binary::native_to_big(static_cast<int32_t>(val),std::back_inserter(sink_));
  445|  55.1k|            }
  446|  18.3k|            else if (val >= (std::numeric_limits<int64_t>::lowest)())
  ------------------
  |  Branch (446:22): [True: 18.3k, False: 0]
  ------------------
  447|  18.3k|            {
  448|       |                // int 64 stores a 64-bit big-endian signed integer
  449|  18.3k|                sink_.push_back(jsoncons::ubjson::ubjson_type::int64_type);
  450|  18.3k|                binary::native_to_big(val,std::back_inserter(sink_));
  451|  18.3k|            }
  452|   221k|        }
  453|  1.26M|        end_value();
  454|  1.26M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  1.26M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  455|  1.26M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE12visit_doubleEdNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  371|  56.9k|    {
  372|  56.9k|        float valf = (float)val;
  373|  56.9k|        if ((double)valf == val)
  ------------------
  |  Branch (373:13): [True: 23.4k, False: 33.5k]
  ------------------
  374|  23.4k|        {
  375|       |            // float 32
  376|  23.4k|            sink_.push_back(static_cast<uint8_t>(jsoncons::ubjson::ubjson_type::float32_type));
  377|  23.4k|            binary::native_to_big(valf,std::back_inserter(sink_));
  378|  23.4k|        }
  379|  33.5k|        else
  380|  33.5k|        {
  381|       |            // float 64
  382|  33.5k|            sink_.push_back(static_cast<uint8_t>(jsoncons::ubjson::ubjson_type::float64_type));
  383|  33.5k|            binary::native_to_big(val,std::back_inserter(sink_));
  384|  33.5k|        }
  385|       |
  386|       |        // write double
  387|       |
  388|  56.9k|        end_value();
  389|  56.9k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  56.9k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  390|  56.9k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE11visit_flushEv:
  142|     14|    {
  143|     14|        sink_.flush();
  144|     14|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE18visit_begin_objectENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  147|  2.17k|    {
  148|  2.17k|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|  2.17k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 2.17k]
  |  |  ------------------
  ------------------
  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|  2.17k|        stack_.emplace_back(ubjson_container_type::indefinite_length_object);
  154|  2.17k|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_object_marker);
  155|       |
  156|  2.17k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  2.17k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  157|  2.17k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE18visit_begin_objectEmNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  160|  48.4k|    {
  161|  48.4k|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|  48.4k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 48.4k]
  |  |  ------------------
  ------------------
  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|  48.4k|        stack_.emplace_back(ubjson_container_type::object, length);
  167|  48.4k|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_object_marker);
  168|  48.4k|        sink_.push_back(jsoncons::ubjson::ubjson_type::count_marker);
  169|  48.4k|        put_length(length);
  170|       |
  171|  48.4k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  48.4k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  172|  48.4k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE16visit_end_objectERKNS_11ser_contextERNS3_10error_codeE:
  175|  49.5k|    {
  176|  49.5k|        JSONCONS_ASSERT(!stack_.empty());
  ------------------
  |  |   45|  49.5k|#define JSONCONS_ASSERT(x) if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (45:32): [True: 0, False: 49.5k]
  |  |  ------------------
  |  |   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|  49.5k|        --nesting_depth_;
  178|       |
  179|  49.5k|        if (stack_.back().is_indefinite_length())
  ------------------
  |  Branch (179:13): [True: 1.96k, False: 47.5k]
  ------------------
  180|  1.96k|        {
  181|  1.96k|            sink_.push_back(jsoncons::ubjson::ubjson_type::end_object_marker);
  182|  1.96k|        }
  183|  47.5k|        else
  184|  47.5k|        {
  185|  47.5k|            if (stack_.back().count() < stack_.back().length())
  ------------------
  |  Branch (185:17): [True: 0, False: 47.5k]
  ------------------
  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|  47.5k|            if (stack_.back().count() > stack_.back().length())
  ------------------
  |  Branch (190:17): [True: 0, False: 47.5k]
  ------------------
  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|  47.5k|        }
  196|  49.5k|        stack_.pop_back();
  197|  49.5k|        end_value();
  198|  49.5k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  49.5k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  199|  49.5k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE17visit_begin_arrayENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  202|  1.80M|    {
  203|  1.80M|        if (JSONCONS_UNLIKELY(++nesting_depth_ > max_nesting_depth_))
  ------------------
  |  |   78|  1.80M|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 0, False: 1.80M]
  |  |  ------------------
  ------------------
  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.80M|        stack_.emplace_back(ubjson_container_type::indefinite_length_array);
  209|  1.80M|        sink_.push_back(jsoncons::ubjson::ubjson_type::start_array_marker);
  210|       |
  211|  1.80M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  1.80M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  212|  1.80M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE9visit_keyERKNS3_17basic_string_viewIcNS3_11char_traitsIcEEEERKNS_11ser_contextERNS3_10error_codeE:
  257|   813k|    {
  258|   813k|        auto sink = unicode_traits::validate(name.data(), name.size());
  259|   813k|        if (sink.ec != unicode_traits::conv_errc())
  ------------------
  |  Branch (259:13): [True: 0, False: 813k]
  ------------------
  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|   813k|        put_length(name.length());
  266|       |
  267|   813k|        for (auto c : name)
  ------------------
  |  Branch (267:21): [True: 3.02M, False: 813k]
  ------------------
  268|  3.02M|        {
  269|  3.02M|            sink_.push_back(c);
  270|  3.02M|        }
  271|   813k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   813k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  272|   813k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10visit_nullENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  275|  5.33M|    {
  276|       |        // nil
  277|  5.33M|        binary::native_to_big(static_cast<uint8_t>(jsoncons::ubjson::ubjson_type::null_type), std::back_inserter(sink_));
  278|  5.33M|        end_value();
  279|  5.33M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  5.33M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  280|  5.33M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE10visit_boolEbNS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  487|   179k|    {
  488|       |        // true and false
  489|   179k|        sink_.push_back(static_cast<uint8_t>(val ? jsoncons::ubjson::ubjson_type::true_type : jsoncons::ubjson::ubjson_type::false_type));
  ------------------
  |  Branch (489:46): [True: 173k, False: 6.17k]
  ------------------
  490|       |
  491|   179k|        end_value();
  492|   179k|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   179k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  493|   179k|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEE12visit_stringERKNS3_17basic_string_viewIcNS3_11char_traitsIcEEEENS_12semantic_tagERKNS_11ser_contextERNS3_10error_codeE:
  283|  4.35M|    {
  284|  4.35M|        switch (tag)
  285|  4.35M|        {
  286|     59|            case semantic_tag::bigint:
  ------------------
  |  Branch (286:13): [True: 59, False: 4.35M]
  ------------------
  287|    450|            case semantic_tag::bigdec:
  ------------------
  |  Branch (287:13): [True: 391, False: 4.35M]
  ------------------
  288|    450|            {
  289|    450|                sink_.push_back(jsoncons::ubjson::ubjson_type::high_precision_number_type);
  290|    450|                break;
  291|     59|            }
  292|  4.35M|            default:
  ------------------
  |  Branch (292:13): [True: 4.35M, False: 450]
  ------------------
  293|  4.35M|            {
  294|  4.35M|                sink_.push_back(jsoncons::ubjson::ubjson_type::string_type);
  295|  4.35M|                break;
  296|     59|            }
  297|  4.35M|        }
  298|       |
  299|  4.35M|        auto sink = unicode_traits::validate(sv.data(), sv.size());
  300|  4.35M|        if (sink.ec != unicode_traits::conv_errc())
  ------------------
  |  Branch (300:13): [True: 7, False: 4.35M]
  ------------------
  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.35M|        put_length(sv.length());
  307|       |
  308|  4.35M|        for (auto c : sv)
  ------------------
  |  Branch (308:21): [True: 5.18M, False: 4.35M]
  ------------------
  309|  5.18M|        {
  310|  5.18M|            sink_.push_back(c);
  311|  5.18M|        }
  312|       |
  313|  4.35M|        end_value();
  314|  4.35M|        JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  4.35M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  315|  4.35M|    }
_ZN8jsoncons6ubjson20basic_ubjson_encoderINS_10bytes_sinkINSt3__16vectorIhNS3_9allocatorIhEEEEvEENS5_IcEEED2Ev:
  113|    249|    {
  114|    249|        JSONCONS_TRY
  ------------------
  |  |   37|    249|    #define JSONCONS_TRY try
  ------------------
  115|    249|        {
  116|    249|            sink_.flush();
  117|    249|        }
  118|    249|        JSONCONS_CATCH(...)
  119|    249|        {
  120|      0|        }
  121|    249|    }

_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|    249|    ubjson_decode_options() = default;
_ZN8jsoncons6ubjson21ubjson_options_commonC2Ev:
   23|    498|    ubjson_options_common() = default;
_ZN8jsoncons6ubjson21ubjson_options_commonD2Ev:
   25|    498|    virtual ~ubjson_options_common() = default;
_ZN8jsoncons6ubjson21ubjson_encode_optionsC1Ev:
   53|    249|    ubjson_encode_options() = default;
_ZNK8jsoncons6ubjson21ubjson_options_common17max_nesting_depthEv:
   28|    498|    {
   29|    498|        return max_nesting_depth_;
   30|    498|    }
_ZNK8jsoncons6ubjson21ubjson_decode_options9max_itemsEv:
   44|    249|    {
   45|    249|        return max_items_;
   46|    249|    }

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

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

