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

_ZN8jsoncons18basic_json_visitorIcEC2Ev:
  103|    250|        basic_json_visitor() = default;
_ZN8jsoncons19typed_array_visitorD2Ev:
   33|    250|        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_RET_VAL
  ------------------
  |  |  276|   104k|#define JSONCONS_VISITOR_RET_VAL return true; 
  ------------------
  348|   104k|        }
_ZN8jsoncons18basic_json_visitorIcE12uint64_valueEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  414|   543k|        {
  415|   543k|            visit_uint64(value, tag, context, ec);
  416|   543k|            JSONCONS_VISITOR_RET_VAL
  ------------------
  |  |  276|   543k|#define JSONCONS_VISITOR_RET_VAL return true; 
  ------------------
  417|   543k|        }
_ZN8jsoncons18basic_json_visitorIcE9end_arrayERKNS_11ser_contextERNSt3__110error_codeE:
  351|  1.85M|        {
  352|  1.85M|            visit_end_array(context, ec);
  353|  1.85M|            JSONCONS_VISITOR_RET_VAL
  ------------------
  |  |  276|  1.85M|#define JSONCONS_VISITOR_RET_VAL return true; 
  ------------------
  354|  1.85M|        }
_ZN8jsoncons18basic_json_visitorIcE11int64_valueElNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  423|  1.59M|        {
  424|  1.59M|            visit_int64(value, tag, context, ec);
  425|  1.59M|            JSONCONS_VISITOR_RET_VAL
  ------------------
  |  |  276|  1.59M|#define JSONCONS_VISITOR_RET_VAL return true; 
  ------------------
  426|  1.59M|        }
_ZN8jsoncons18basic_json_visitorIcE12double_valueEdNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  441|  67.7k|        {
  442|  67.7k|            visit_double(value, tag, context, ec);
  443|  67.7k|            JSONCONS_VISITOR_RET_VAL
  ------------------
  |  |  276|  67.7k|#define JSONCONS_VISITOR_RET_VAL return true; 
  ------------------
  444|  67.7k|        }
_ZN8jsoncons18basic_json_visitorIcE10null_valueENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  365|  4.81M|        {
  366|  4.81M|            visit_null(tag, context, ec);
  367|  4.81M|            JSONCONS_VISITOR_RET_VAL
  ------------------
  |  |  276|  4.81M|#define JSONCONS_VISITOR_RET_VAL return true; 
  ------------------
  368|  4.81M|        }
_ZN8jsoncons18basic_json_visitorIcE10bool_valueEbNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  374|   162k|        {
  375|   162k|            visit_bool(value, tag, context, ec);
  376|   162k|            JSONCONS_VISITOR_RET_VAL
  ------------------
  |  |  276|   162k|#define JSONCONS_VISITOR_RET_VAL return true; 
  ------------------
  377|   162k|        }
_ZN8jsoncons18basic_json_visitorIcE12string_valueERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_12semantic_tagERKNS_11ser_contextERNS2_10error_codeE:
  383|  4.56M|        {
  384|  4.56M|            visit_string(value, tag, context, ec);
  385|  4.56M|            JSONCONS_VISITOR_RET_VAL
  ------------------
  |  |  276|  4.56M|#define JSONCONS_VISITOR_RET_VAL return true; 
  ------------------
  386|  4.56M|        }
_ZN8jsoncons18basic_json_visitorIcE11begin_arrayENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  339|  1.76M|        {
  340|  1.76M|            visit_begin_array(tag, context, ec);
  341|  1.76M|            JSONCONS_VISITOR_RET_VAL
  ------------------
  |  |  276|  1.76M|#define JSONCONS_VISITOR_RET_VAL return true; 
  ------------------
  342|  1.76M|        }
_ZN8jsoncons18basic_json_visitorIcE12begin_objectEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  327|  50.8k|        {
  328|  50.8k|            visit_begin_object(length, tag, context, ec);
  329|  50.8k|            JSONCONS_VISITOR_RET_VAL
  ------------------
  |  |  276|  50.8k|#define JSONCONS_VISITOR_RET_VAL return true; 
  ------------------
  330|  50.8k|        }
_ZN8jsoncons18basic_json_visitorIcE12begin_objectENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  318|  1.85k|        {
  319|  1.85k|            visit_begin_object(tag, context, ec);
  320|  1.85k|            JSONCONS_VISITOR_RET_VAL
  ------------------
  |  |  276|  1.85k|#define JSONCONS_VISITOR_RET_VAL return true; 
  ------------------
  321|  1.85k|        }
_ZN8jsoncons18basic_json_visitorIcE3keyERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEERKNS_11ser_contextERNS2_10error_codeE:
  357|   833k|        {
  358|   833k|            visit_key(name, context, ec);
  359|   833k|            JSONCONS_VISITOR_RET_VAL
  ------------------
  |  |  276|   833k|#define JSONCONS_VISITOR_RET_VAL return true; 
  ------------------
  360|   833k|        }
_ZN8jsoncons18basic_json_visitorIcE10end_objectERKNS_11ser_contextERNSt3__110error_codeE:
  333|  50.5k|        {
  334|  50.5k|            visit_end_object(context, ec);
  335|  50.5k|            JSONCONS_VISITOR_RET_VAL
  ------------------
  |  |  276|  50.5k|#define JSONCONS_VISITOR_RET_VAL return true; 
  ------------------
  336|  50.5k|        }
_ZN8jsoncons18basic_json_visitorIcE5flushEv:
  108|     16|        {
  109|     16|            visit_flush();
  110|     16|        }

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

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

_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEED2Ev:
  188|    250|        {
  189|    250|            if (buffer_)
  ------------------
  |  Branch (189:17): [True: 250, False: 0]
  ------------------
  190|    250|            {
  191|    250|                std::allocator_traits<char_allocator_type>::deallocate(alloc_, buffer_, buffer_size_);
  192|    250|            }
  193|    250|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEEC2ERNS1_13basic_istreamIcNS1_11char_traitsIcEEEERKS3_:
  171|    250|            : alloc_(alloc), stream_ptr_(std::addressof(is)), sbuf_(is.rdbuf()),
  172|    250|              buffer_size_(default_max_buffer_size)
  173|    250|        {
  174|    250|            buffer_ = std::allocator_traits<char_allocator_type>::allocate(alloc_, buffer_size_);
  175|    250|            data_ = buffer_;
  176|    250|        }
_ZN8jsoncons18basic_null_istreamIcEC1Ev:
   54|    250|          : std::basic_istream<CharT>(&nb_)
   55|    250|        {
   56|    250|        }
_ZN8jsoncons18basic_null_istreamIcE11null_bufferC2Ev:
   40|    250|            null_buffer() = default;
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE8is_errorEv:
  276|  5.26M|        {
  277|  5.26M|            return stream_ptr_->bad();  
  278|  5.26M|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4readEPhm:
  343|  26.4M|        {
  344|  26.4M|            std::size_t len = 0;
  345|  26.4M|            if (length_ > 0)
  ------------------
  |  Branch (345:17): [True: 26.4M, False: 1.53k]
  ------------------
  346|  26.4M|            {
  347|  26.4M|                len = (std::min)(length_, length);
  348|  26.4M|                std::memcpy(p, data_, len*sizeof(value_type));
  349|  26.4M|                data_ += len;
  350|  26.4M|                length_ -= len;
  351|  26.4M|                position_ += len;
  352|  26.4M|            }
  353|  26.4M|            if (length - len == 0)
  ------------------
  |  Branch (353:17): [True: 26.4M, False: 1.69k]
  ------------------
  354|  26.4M|            {
  355|  26.4M|                return len;
  356|  26.4M|            }
  357|  1.69k|            else if (length - len < buffer_size_)
  ------------------
  |  Branch (357:22): [True: 1.69k, False: 0]
  ------------------
  358|  1.69k|            {
  359|  1.69k|                fill_buffer();
  360|  1.69k|                if (length_ > 0)
  ------------------
  |  Branch (360:21): [True: 1.58k, False: 108]
  ------------------
  361|  1.58k|                {
  362|  1.58k|                    std::size_t len2 = (std::min)(length_, length-len);
  363|  1.58k|                    std::memcpy(p+len, data_, len2*sizeof(value_type));
  364|  1.58k|                    data_ += len2;
  365|  1.58k|                    length_ -= len2;
  366|  1.58k|                    position_ += len2;
  367|  1.58k|                    len += len2;
  368|  1.58k|                }
  369|  1.69k|                return len;
  370|  1.69k|            }
  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.4M|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE11fill_bufferEv:
  399|  2.19k|        {
  400|  2.19k|            if (stream_ptr_->eof())
  ------------------
  |  Branch (400:17): [True: 131, False: 2.06k]
  ------------------
  401|    131|            {
  402|    131|                length_ = 0;
  403|    131|                return;
  404|    131|            }
  405|       |
  406|  2.06k|            data_ = buffer_;
  407|  2.06k|            JSONCONS_TRY
  ------------------
  |  |   37|  2.06k|    #define JSONCONS_TRY try
  ------------------
  408|  2.06k|            {
  409|  2.06k|                std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(buffer_), buffer_size_);
  410|  2.06k|                length_ = static_cast<std::size_t>(count);
  411|       |
  412|  2.06k|                if (length_ < buffer_size_)
  ------------------
  |  Branch (412:21): [True: 235, False: 1.82k]
  ------------------
  413|    235|                {
  414|    235|                    stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  415|    235|                }
  416|  2.06k|            }
  417|  2.06k|            JSONCONS_CATCH(const std::exception&)     
  418|  2.06k|            {
  419|      0|                stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  420|      0|                length_ = 0;
  421|      0|            }
  422|  2.06k|        }
_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.39M|        {
  883|  5.39M|            std::size_t unread = length;
  884|       |
  885|  5.39M|            std::size_t n = (std::min)(max_buffer_length, unread);
  886|  9.97M|            while (n > 0 && !source.eof())
  ------------------
  |  Branch (886:20): [True: 4.57M, False: 5.39M]
  |  Branch (886:29): [True: 4.57M, False: 49]
  ------------------
  887|  4.57M|            {
  888|  4.57M|                v.reserve(v.size()+n);
  889|  4.57M|                std::size_t actual = 0;
  890|  21.4M|                while (actual < n)
  ------------------
  |  Branch (890:24): [True: 16.9M, False: 4.57M]
  ------------------
  891|  16.9M|                {
  892|  16.9M|                    typename Source::value_type c{};
  893|  16.9M|                    if (source.read(&c,1) != 1)
  ------------------
  |  Branch (893:25): [True: 38, False: 16.9M]
  ------------------
  894|     38|                    {
  895|     38|                        break;
  896|     38|                    }
  897|  16.9M|                    v.push_back(c);
  898|  16.9M|                    ++actual;
  899|  16.9M|                }
  900|  4.57M|                unread -= actual;
  901|  4.57M|                n = (std::min)(max_buffer_length, unread);
  902|  4.57M|            }
  903|       |
  904|  5.39M|            return length - unread;
  905|  5.39M|        }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE3eofEv:
  271|  4.57M|        {
  272|  4.57M|            return length_ == 0 && stream_ptr_->eof();
  ------------------
  |  Branch (272:20): [True: 326, False: 4.57M]
  |  Branch (272:36): [True: 49, False: 277]
  ------------------
  273|  4.57M|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4peekEv:
  311|  9.00M|        {
  312|  9.00M|            if (length_ == 0)
  ------------------
  |  Branch (312:17): [True: 494, False: 9.00M]
  ------------------
  313|    494|            {
  314|    494|                fill_buffer();
  315|    494|            }
  316|  9.00M|            if (length_ > 0)
  ------------------
  |  Branch (316:17): [True: 9.00M, False: 48]
  ------------------
  317|  9.00M|            {
  318|  9.00M|                value_type c = *data_;
  319|  9.00M|                return char_result<value_type>{c, false};
  320|  9.00M|            }
  321|     48|            else
  322|     48|            {
  323|     48|                return char_result<value_type>{0, true};
  324|     48|            }
  325|  9.00M|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE6ignoreEm:
  286|  1.98M|        {
  287|  1.98M|            std::size_t len = 0;
  288|  1.98M|            if (length_ > 0)
  ------------------
  |  Branch (288:17): [True: 1.98M, False: 0]
  ------------------
  289|  1.98M|            {
  290|  1.98M|                len = (std::min)(length_, length);
  291|  1.98M|                position_ += len;
  292|  1.98M|                data_ += len;
  293|  1.98M|                length_ -= len;
  294|  1.98M|            }
  295|  1.98M|            while (len < length)
  ------------------
  |  Branch (295:20): [True: 0, False: 1.98M]
  ------------------
  296|      0|            {
  297|      0|                fill_buffer();
  298|      0|                if (length_ == 0)
  ------------------
  |  Branch (298:21): [True: 0, False: 0]
  ------------------
  299|      0|                {
  300|      0|                    break;
  301|      0|                }
  302|      0|                std::size_t len2 = (std::min)(length_, length-len);
  303|      0|                position_ += len2;
  304|      0|                data_ += len2;
  305|      0|                length_ -= len2;
  306|      0|                len += len2;
  307|      0|            }
  308|  1.98M|        }

_ZN8jsoncons6binary13native_to_bigIhNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  11.5M|    {
  128|  11.5M|        T val2 = byte_swap(val);
  129|  11.5M|        uint8_t buf[sizeof(T)];
  130|  11.5M|        std::memcpy(buf, &val2, sizeof(T));
  131|  11.5M|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 11.5M, False: 11.5M]
  ------------------
  132|  11.5M|        {
  133|  11.5M|            *d_first++ = item;
  134|  11.5M|        }
  135|  11.5M|    }
_ZN8jsoncons6binary9byte_swapIhEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  11.5M|    {
   22|  11.5M|        return val;
   23|  11.5M|    }
_ZN8jsoncons6binary13native_to_bigItNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  8.64k|    {
  128|  8.64k|        T val2 = byte_swap(val);
  129|  8.64k|        uint8_t buf[sizeof(T)];
  130|  8.64k|        std::memcpy(buf, &val2, sizeof(T));
  131|  8.64k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 17.2k, False: 8.64k]
  ------------------
  132|  17.2k|        {
  133|  17.2k|            *d_first++ = item;
  134|  17.2k|        }
  135|  8.64k|    }
_ZN8jsoncons6binary9byte_swapItEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  8.64k|    {
   29|  8.64k|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  8.64k|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  8.64k|#      define JSONCONS_BYTE_SWAP_16    __builtin_bswap16
  ------------------
   31|       |    #else
   32|       |        return (static_cast<uint16_t>(val) >> 8) | (static_cast<uint16_t>(val) << 8);
   33|       |    #endif
   34|  8.64k|    }
_ZN8jsoncons6binary13native_to_bigIjNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|    146|    {
  128|    146|        T val2 = byte_swap(val);
  129|    146|        uint8_t buf[sizeof(T)];
  130|    146|        std::memcpy(buf, &val2, sizeof(T));
  131|    146|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 584, False: 146]
  ------------------
  132|    584|        {
  133|    584|            *d_first++ = item;
  134|    584|        }
  135|    146|    }
_ZN8jsoncons6binary9byte_swapIjEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|  67.8k|    {
   40|  67.8k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|  67.8k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|  67.8k|#  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|  67.8k|    }
_ZN8jsoncons6binary9byte_swapImEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  67.7k|    {
   52|  67.7k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  67.7k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  67.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|  67.7k|    }
_ZN8jsoncons6binary13native_to_bigIsNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   788k|    {
  128|   788k|        T val2 = byte_swap(val);
  129|   788k|        uint8_t buf[sizeof(T)];
  130|   788k|        std::memcpy(buf, &val2, sizeof(T));
  131|   788k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 1.57M, False: 788k]
  ------------------
  132|  1.57M|        {
  133|  1.57M|            *d_first++ = item;
  134|  1.57M|        }
  135|   788k|    }
_ZN8jsoncons6binary9byte_swapIsEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  1.93M|    {
   29|  1.93M|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  1.93M|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  1.93M|#      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.93M|    }
_ZN8jsoncons6binary13native_to_bigIiNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  75.5k|    {
  128|  75.5k|        T val2 = byte_swap(val);
  129|  75.5k|        uint8_t buf[sizeof(T)];
  130|  75.5k|        std::memcpy(buf, &val2, sizeof(T));
  131|  75.5k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 302k, False: 75.5k]
  ------------------
  132|   302k|        {
  133|   302k|            *d_first++ = item;
  134|   302k|        }
  135|  75.5k|    }
_ZN8jsoncons6binary9byte_swapIiEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|   151k|    {
   40|   151k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|   151k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|   151k|#  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|   151k|    }
_ZN8jsoncons6binary13native_to_bigIlNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  29.3k|    {
  128|  29.3k|        T val2 = byte_swap(val);
  129|  29.3k|        uint8_t buf[sizeof(T)];
  130|  29.3k|        std::memcpy(buf, &val2, sizeof(T));
  131|  29.3k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 234k, False: 29.3k]
  ------------------
  132|   234k|        {
  133|   234k|            *d_first++ = item;
  134|   234k|        }
  135|  29.3k|    }
_ZN8jsoncons6binary9byte_swapIlEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  59.3k|    {
   52|  59.3k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  59.3k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  59.3k|#  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|  59.3k|    }
_ZN8jsoncons6binary13native_to_bigIaNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  66.5k|    {
  128|  66.5k|        T val2 = byte_swap(val);
  129|  66.5k|        uint8_t buf[sizeof(T)];
  130|  66.5k|        std::memcpy(buf, &val2, sizeof(T));
  131|  66.5k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 66.5k, False: 66.5k]
  ------------------
  132|  66.5k|        {
  133|  66.5k|            *d_first++ = item;
  134|  66.5k|        }
  135|  66.5k|    }
_ZN8jsoncons6binary9byte_swapIaEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  1.08M|    {
   22|  1.08M|        return val;
   23|  1.08M|    }
_ZN8jsoncons6binary13native_to_bigIfNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  30.2k|    {
  128|  30.2k|        T val2 = byte_swap(val);
  129|  30.2k|        uint8_t buf[sizeof(T)];
  130|  30.2k|        std::memcpy(buf, &val2, sizeof(T));
  131|  30.2k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 120k, False: 30.2k]
  ------------------
  132|   120k|        {
  133|   120k|            *d_first++ = item;
  134|   120k|        }
  135|  30.2k|    }
_ZN8jsoncons6binary9byte_swapIfEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   64|  67.7k|    {
   65|  67.7k|        uint32_t x;
   66|  67.7k|        std::memcpy(&x,&val,sizeof(uint32_t));
   67|  67.7k|        uint32_t y = byte_swap(x);
   68|  67.7k|        T val2;
   69|  67.7k|        std::memcpy(&val2,&y,sizeof(uint32_t));
   70|  67.7k|        return val2;
   71|  67.7k|    }
_ZN8jsoncons6binary13native_to_bigIdNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  37.5k|    {
  128|  37.5k|        T val2 = byte_swap(val);
  129|  37.5k|        uint8_t buf[sizeof(T)];
  130|  37.5k|        std::memcpy(buf, &val2, sizeof(T));
  131|  37.5k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 300k, False: 37.5k]
  ------------------
  132|   300k|        {
  133|   300k|            *d_first++ = item;
  134|   300k|        }
  135|  37.5k|    }
_ZN8jsoncons6binary9byte_swapIdEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   76|  67.7k|    {
   77|  67.7k|        uint64_t x;
   78|  67.7k|        std::memcpy(&x,&val,sizeof(uint64_t));
   79|  67.7k|        uint64_t y = byte_swap(x);
   80|  67.7k|        T val2;
   81|  67.7k|        std::memcpy(&val2,&y,sizeof(uint64_t));
   82|  67.7k|        return val2;
   83|  67.7k|    }
_ZN8jsoncons6binary13big_to_nativeIaNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  1.02M|    {
  183|  1.02M|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 1.02M]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  1.02M|        T val;
  188|  1.02M|        std::memcpy(&val,first,sizeof(T));
  189|  1.02M|        return byte_swap(val);
  190|  1.02M|    }
_ZN8jsoncons6binary13big_to_nativeIsNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  1.14M|    {
  183|  1.14M|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 1.14M]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  1.14M|        T val;
  188|  1.14M|        std::memcpy(&val,first,sizeof(T));
  189|  1.14M|        return byte_swap(val);
  190|  1.14M|    }
_ZN8jsoncons6binary13big_to_nativeIiNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  76.0k|    {
  183|  76.0k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 76.0k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  76.0k|        T val;
  188|  76.0k|        std::memcpy(&val,first,sizeof(T));
  189|  76.0k|        return byte_swap(val);
  190|  76.0k|    }
_ZN8jsoncons6binary13big_to_nativeIlNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  30.0k|    {
  183|  30.0k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 30.0k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  30.0k|        T val;
  188|  30.0k|        std::memcpy(&val,first,sizeof(T));
  189|  30.0k|        return byte_swap(val);
  190|  30.0k|    }
_ZN8jsoncons6binary13big_to_nativeIfNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  37.5k|    {
  183|  37.5k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 37.5k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  37.5k|        T val;
  188|  37.5k|        std::memcpy(&val,first,sizeof(T));
  189|  37.5k|        return byte_swap(val);
  190|  37.5k|    }
_ZN8jsoncons6binary13big_to_nativeIdNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  30.2k|    {
  183|  30.2k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 30.2k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  30.2k|        T val;
  188|  30.2k|        std::memcpy(&val,first,sizeof(T));
  189|  30.2k|        return byte_swap(val);
  190|  30.2k|    }

_ZN8jsoncons9is_base10IcEEbPKT_m:
  164|    288|{
  165|    288|    integer_chars_state state = integer_chars_state::initial;
  166|       |
  167|    288|    const CharT* end = s + length; 
  168|    525|    for (;s < end; ++s)
  ------------------
  |  Branch (168:11): [True: 465, False: 60]
  ------------------
  169|    465|    {
  170|    465|        switch(state)
  171|    465|        {
  172|    286|            case integer_chars_state::initial:
  ------------------
  |  Branch (172:13): [True: 286, False: 179]
  ------------------
  173|    286|            {
  174|    286|                switch(*s)
  175|    286|                {
  176|     93|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (176:21): [True: 25, False: 261]
  |  Branch (176:30): [True: 15, False: 271]
  |  Branch (176:39): [True: 6, False: 280]
  |  Branch (176:48): [True: 7, False: 279]
  |  Branch (176:57): [True: 7, False: 279]
  |  Branch (176:66): [True: 1, False: 285]
  |  Branch (176:75): [True: 32, False: 254]
  |  Branch (176:84): [True: 0, False: 286]
  |  Branch (176:93): [True: 0, False: 286]
  |  Branch (176:103): [True: 0, False: 286]
  ------------------
  177|     93|                        state = integer_chars_state::decimal;
  178|     93|                        break;
  179|     72|                    case '-':
  ------------------
  |  Branch (179:21): [True: 72, False: 214]
  ------------------
  180|     72|                        state = integer_chars_state::minus;
  181|     72|                        break;
  182|    121|                    default:
  ------------------
  |  Branch (182:21): [True: 121, False: 165]
  ------------------
  183|    121|                        return false;
  184|    286|                }
  185|    165|                break;
  186|    286|            }
  187|    165|            case integer_chars_state::minus:
  ------------------
  |  Branch (187:13): [True: 72, False: 393]
  ------------------
  188|     72|            {
  189|     72|                switch(*s)
  190|     72|                {
  191|     46|                    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: 52]
  |  Branch (191:30): [True: 4, False: 68]
  |  Branch (191:39): [True: 0, False: 72]
  |  Branch (191:48): [True: 0, False: 72]
  |  Branch (191:57): [True: 0, False: 72]
  |  Branch (191:66): [True: 7, False: 65]
  |  Branch (191:75): [True: 0, False: 72]
  |  Branch (191:84): [True: 0, False: 72]
  |  Branch (191:93): [True: 6, False: 66]
  |  Branch (191:103): [True: 9, False: 63]
  ------------------
  192|     46|                        state = integer_chars_state::decimal;
  193|     46|                        break;
  194|     26|                    default:
  ------------------
  |  Branch (194:21): [True: 26, False: 46]
  ------------------
  195|     26|                        return false;
  196|     72|                }
  197|     46|                break;
  198|     72|            }
  199|    107|            case integer_chars_state::decimal:
  ------------------
  |  Branch (199:13): [True: 107, False: 358]
  ------------------
  200|    107|            {
  201|    107|                switch(*s)
  202|    107|                {
  203|     26|                    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: 100]
  |  Branch (203:30): [True: 10, False: 97]
  |  Branch (203:39): [True: 0, False: 107]
  |  Branch (203:48): [True: 8, False: 99]
  |  Branch (203:57): [True: 0, False: 107]
  |  Branch (203:66): [True: 1, False: 106]
  |  Branch (203:75): [True: 0, False: 107]
  |  Branch (203:84): [True: 0, False: 107]
  |  Branch (203:93): [True: 0, False: 107]
  |  Branch (203:103): [True: 0, False: 107]
  ------------------
  204|     26|                        break;
  205|     81|                    default:
  ------------------
  |  Branch (205:21): [True: 81, False: 26]
  ------------------
  206|     81|                        return false;
  207|    107|                }
  208|     26|                break;
  209|    107|            }
  210|     26|            default:
  ------------------
  |  Branch (210:13): [True: 0, False: 465]
  ------------------
  211|      0|                break;
  212|    465|        }
  213|    465|    }
  214|     60|    return state == integer_chars_state::decimal ? true : false;
  ------------------
  |  Branch (214:12): [True: 58, False: 2]
  ------------------
  215|    288|}

_ZN8jsoncons14unicode_traits8validateIcEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14convert_resultIS4_EEE4typeEPKS4_m:
 1136|  10.7M|    {
 1137|  10.7M|        conv_errc  result = conv_errc();
 1138|  10.7M|        const CharT* last = data + length;
 1139|  27.9M|        while (data != last) 
  ------------------
  |  Branch (1139:16): [True: 17.1M, False: 10.7M]
  ------------------
 1140|  17.1M|        {
 1141|  17.1M|            std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[static_cast<uint8_t>(*data)]) + 1;
 1142|  17.1M|            if (len > (std::size_t)(last - data))
  ------------------
  |  Branch (1142:17): [True: 2, False: 17.1M]
  ------------------
 1143|      2|            {
 1144|      2|                return convert_result<CharT>{data, conv_errc::source_exhausted};
 1145|      2|            }
 1146|  17.1M|            if ((result=is_legal_utf8(data, len)) != conv_errc())
  ------------------
  |  Branch (1146:17): [True: 20, False: 17.1M]
  ------------------
 1147|     20|            {
 1148|     20|                return convert_result<CharT>{data,result} ;
 1149|     20|            }
 1150|  17.1M|            data += len;
 1151|  17.1M|        }
 1152|  10.7M|        return convert_result<CharT>{data,result} ;
 1153|  10.7M|    }
_ZN8jsoncons14unicode_traits13is_legal_utf8IcEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_9conv_errcEE4typeEPKS4_m:
  305|  17.1M|    {
  306|  17.1M|        uint8_t a;
  307|  17.1M|        const CharT* srcptr = first+length;
  308|  17.1M|        switch (length) {
  309|      7|        default:
  ------------------
  |  Branch (309:9): [True: 7, False: 17.1M]
  ------------------
  310|      7|            return conv_errc::over_long_utf8_sequence;
  311|  8.17k|        case 4:
  ------------------
  |  Branch (311:9): [True: 8.17k, False: 17.1M]
  ------------------
  312|  8.17k|            if (((a = (*--srcptr))& 0xC0) != 0x80)
  ------------------
  |  Branch (312:17): [True: 1, False: 8.17k]
  ------------------
  313|      1|                return conv_errc::expected_continuation_byte;
  314|  8.17k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  8.17k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  315|  10.5k|        case 3:
  ------------------
  |  Branch (315:9): [True: 2.34k, False: 17.1M]
  ------------------
  316|  10.5k|            if (((a = (*--srcptr))& 0xC0) != 0x80)
  ------------------
  |  Branch (316:17): [True: 2, False: 10.5k]
  ------------------
  317|      2|                return conv_errc::expected_continuation_byte;
  318|  10.5k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  10.5k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  319|  11.4k|        case 2:
  ------------------
  |  Branch (319:9): [True: 954, False: 17.1M]
  ------------------
  320|  11.4k|            if (((a = (*--srcptr))& 0xC0) != 0x80)
  ------------------
  |  Branch (320:17): [True: 3, False: 11.4k]
  ------------------
  321|      3|                return conv_errc::expected_continuation_byte;
  322|       |
  323|  11.4k|            switch (static_cast<uint8_t>(*first)) 
  324|  11.4k|            {
  325|       |                // no fall-through in this inner switch
  326|     62|                case 0xE0: if (a < 0xA0) return conv_errc::source_illegal; break;
  ------------------
  |  Branch (326:17): [True: 62, False: 11.4k]
  |  Branch (326:32): [True: 0, False: 62]
  ------------------
  327|    234|                case 0xED: if (a > 0x9F) return conv_errc::source_illegal; break;
  ------------------
  |  Branch (327:17): [True: 234, False: 11.2k]
  |  Branch (327:32): [True: 0, False: 234]
  ------------------
  328|  1.69k|                case 0xF0: if (a < 0x90) return conv_errc::source_illegal; break;
  ------------------
  |  Branch (328:17): [True: 1.69k, False: 9.77k]
  |  Branch (328:32): [True: 0, False: 1.69k]
  ------------------
  329|  6.36k|                case 0xF4: if (a > 0x8F) return conv_errc::source_illegal; break;
  ------------------
  |  Branch (329:17): [True: 6.36k, False: 5.10k]
  |  Branch (329:32): [True: 0, False: 6.36k]
  ------------------
  330|  6.36k|                default:   if (a < 0x80) return conv_errc::source_illegal;
  ------------------
  |  Branch (330:17): [True: 3.11k, False: 8.34k]
  |  Branch (330:32): [True: 0, False: 3.11k]
  ------------------
  331|  11.4k|            }
  332|       |
  333|  11.4k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  11.4k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  334|  17.1M|        case 1:
  ------------------
  |  Branch (334:9): [True: 17.1M, False: 11.4k]
  ------------------
  335|  17.1M|            if (static_cast<uint8_t>(*first) >= 0x80 && static_cast<uint8_t>(*first) < 0xC2)
  ------------------
  |  Branch (335:17): [True: 11.4k, False: 17.1M]
  |  Branch (335:57): [True: 7, False: 11.4k]
  ------------------
  336|      7|                return conv_errc::source_illegal;
  337|  17.1M|            break;
  338|  17.1M|        }
  339|  17.1M|        if (static_cast<uint8_t>(*first) > 0xF4) 
  ------------------
  |  Branch (339:13): [True: 0, False: 17.1M]
  ------------------
  340|      0|            return conv_errc::source_illegal;
  341|       |
  342|  17.1M|        return conv_errc();
  343|  17.1M|    }

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

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

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

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

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

