LLVMFuzzerTestOneInput:
   11|     34|{
   12|     34|    std::string s(reinterpret_cast<const char*>(data), size);
   13|     34|    std::istringstream is(s);
   14|       |
   15|     34|    default_json_visitor visitor;
   16|       |
   17|     34|    ubjson_stream_reader reader(is, visitor);
   18|     34|    std::error_code ec;
   19|     34|    reader.read(ec);
   20|       |
   21|     34|    return 0;
   22|     34|}

_ZN8jsoncons26basic_default_json_visitorIcEC2Ev:
  811|     34|        basic_default_json_visitor() = default;
_ZN8jsoncons18basic_json_visitorIcEC2Ev:
  103|     34|        basic_json_visitor() = default;
_ZN8jsoncons19typed_array_visitorD2Ev:
   33|     34|        virtual ~typed_array_visitor() = default;
_ZN8jsoncons18basic_json_visitorIcE17visit_begin_arrayEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  560|  5.30k|        {
  561|  5.30k|            visit_begin_array(tag, context, ec);
  562|  5.30k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  5.30k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  563|  5.30k|        }
_ZN8jsoncons26basic_default_json_visitorIcE15visit_end_arrayERKNS_11ser_contextERNSt3__110error_codeE:
  833|   912k|        {
  834|   912k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   912k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  835|   912k|        }
_ZN8jsoncons26basic_default_json_visitorIcE12visit_uint64EmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  858|    179|        {
  859|    179|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|    179|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  860|    179|        }
_ZN8jsoncons26basic_default_json_visitorIcE11visit_int64ElNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  863|  85.4k|        {
  864|  85.4k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  85.4k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  865|  85.4k|        }
_ZN8jsoncons26basic_default_json_visitorIcE12visit_doubleEdNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  873|     17|        {
  874|     17|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|     17|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  875|     17|        }
_ZN8jsoncons26basic_default_json_visitorIcE11visit_flushEv:
  814|      2|        {
  815|      2|        }
_ZN8jsoncons26basic_default_json_visitorIcE18visit_begin_objectENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  818|  1.56M|        {
  819|  1.56M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  1.56M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  820|  1.56M|        }
_ZN8jsoncons18basic_json_visitorIcE18visit_begin_objectEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  544|  5.34k|        {
  545|  5.34k|            visit_begin_object(tag, context, ec);
  546|  5.34k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  5.34k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  547|  5.34k|        }
_ZN8jsoncons26basic_default_json_visitorIcE16visit_end_objectERKNS_11ser_contextERNSt3__110error_codeE:
  823|  1.56M|        {
  824|  1.56M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  1.56M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  825|  1.56M|        }
_ZN8jsoncons26basic_default_json_visitorIcE17visit_begin_arrayENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  828|   914k|        {
  829|   914k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   914k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  830|   914k|        }
_ZN8jsoncons26basic_default_json_visitorIcE9visit_keyERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEERKNS_11ser_contextERNS2_10error_codeE:
  838|   454k|        {
  839|   454k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   454k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  840|   454k|        }
_ZN8jsoncons26basic_default_json_visitorIcE10visit_nullENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  843|  3.71M|        {
  844|  3.71M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  3.71M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  845|  3.71M|        }
_ZN8jsoncons26basic_default_json_visitorIcE10visit_boolEbNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  878|   436k|        {
  879|   436k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   436k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  880|   436k|        }
_ZN8jsoncons26basic_default_json_visitorIcE12visit_stringERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_12semantic_tagERKNS_11ser_contextERNS2_10error_codeE:
  848|    275|        {
  849|    275|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|    275|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  850|    275|        }
_ZN8jsoncons18basic_json_visitorIcE11begin_arrayEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  345|  5.30k|        {
  346|  5.30k|            visit_begin_array(length, tag, context, ec);
  347|  5.30k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  5.30k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  348|  5.30k|        }
_ZN8jsoncons18basic_json_visitorIcE12uint64_valueEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  414|    179|        {
  415|    179|            visit_uint64(value, tag, context, ec);
  416|    179|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|    179|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  417|    179|        }
_ZN8jsoncons18basic_json_visitorIcE9end_arrayERKNS_11ser_contextERNSt3__110error_codeE:
  351|   912k|        {
  352|   912k|            visit_end_array(context, ec);
  353|   912k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   912k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  354|   912k|        }
_ZN8jsoncons18basic_json_visitorIcE11int64_valueElNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  423|  85.4k|        {
  424|  85.4k|            visit_int64(value, tag, context, ec);
  425|  85.4k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  85.4k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  426|  85.4k|        }
_ZN8jsoncons18basic_json_visitorIcE12double_valueEdNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  441|     17|        {
  442|     17|            visit_double(value, tag, context, ec);
  443|     17|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|     17|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  444|     17|        }
_ZN8jsoncons18basic_json_visitorIcE10null_valueENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  365|  3.71M|        {
  366|  3.71M|            visit_null(tag, context, ec);
  367|  3.71M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  3.71M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  368|  3.71M|        }
_ZN8jsoncons18basic_json_visitorIcE10bool_valueEbNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  374|   436k|        {
  375|   436k|            visit_bool(value, tag, context, ec);
  376|   436k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   436k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  377|   436k|        }
_ZN8jsoncons18basic_json_visitorIcE12string_valueERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_12semantic_tagERKNS_11ser_contextERNS2_10error_codeE:
  383|    275|        {
  384|    275|            visit_string(value, tag, context, ec);
  385|    275|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|    275|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  386|    275|        }
_ZN8jsoncons18basic_json_visitorIcE11begin_arrayENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  339|   909k|        {
  340|   909k|            visit_begin_array(tag, context, ec);
  341|   909k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   909k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  342|   909k|        }
_ZN8jsoncons18basic_json_visitorIcE12begin_objectEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  327|  5.34k|        {
  328|  5.34k|            visit_begin_object(length, tag, context, ec);
  329|  5.34k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  5.34k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  330|  5.34k|        }
_ZN8jsoncons18basic_json_visitorIcE12begin_objectENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  318|  1.55M|        {
  319|  1.55M|            visit_begin_object(tag, context, ec);
  320|  1.55M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  1.55M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  321|  1.55M|        }
_ZN8jsoncons18basic_json_visitorIcE3keyERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEERKNS_11ser_contextERNS2_10error_codeE:
  357|   454k|        {
  358|   454k|            visit_key(name, context, ec);
  359|   454k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   454k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  360|   454k|        }
_ZN8jsoncons18basic_json_visitorIcE10end_objectERKNS_11ser_contextERNSt3__110error_codeE:
  333|  1.56M|        {
  334|  1.56M|            visit_end_object(context, ec);
  335|  1.56M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  1.56M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  336|  1.56M|        }
_ZN8jsoncons18basic_json_visitorIcE5flushEv:
  108|      2|        {
  109|      2|            visit_flush();
  110|      2|        }

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

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

_ZN8jsoncons6binary13big_to_nativeIaNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|   543k|    {
  183|   543k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 543k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|   543k|        T val;
  188|   543k|        std::memcpy(&val,first,sizeof(T));
  189|   543k|        return byte_swap(val);
  190|   543k|    }
_ZN8jsoncons6binary9byte_swapIaEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|   543k|    {
   22|   543k|        return val;
   23|   543k|    }
_ZN8jsoncons6binary13big_to_nativeIsNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  7.36k|    {
  183|  7.36k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 7.36k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  7.36k|        T val;
  188|  7.36k|        std::memcpy(&val,first,sizeof(T));
  189|  7.36k|        return byte_swap(val);
  190|  7.36k|    }
_ZN8jsoncons6binary9byte_swapIsEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  7.36k|    {
   29|  7.36k|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  7.36k|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  7.36k|#      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|  7.36k|    }
_ZN8jsoncons6binary13big_to_nativeIiNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|     13|    {
  183|     13|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 13]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|     13|        T val;
  188|     13|        std::memcpy(&val,first,sizeof(T));
  189|     13|        return byte_swap(val);
  190|     13|    }
_ZN8jsoncons6binary9byte_swapIiEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|     13|    {
   40|     13|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|     13|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|     13|#  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|     13|    }
_ZN8jsoncons6binary13big_to_nativeIlNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|     77|    {
  183|     77|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 77]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|     77|        T val;
  188|     77|        std::memcpy(&val,first,sizeof(T));
  189|     77|        return byte_swap(val);
  190|     77|    }
_ZN8jsoncons6binary9byte_swapIlEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|     77|    {
   52|     77|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|     77|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|     77|#  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|     77|    }
_ZN8jsoncons6binary13big_to_nativeIdNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|     17|    {
  183|     17|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 17]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|     17|        T val;
  188|     17|        std::memcpy(&val,first,sizeof(T));
  189|     17|        return byte_swap(val);
  190|     17|    }
_ZN8jsoncons6binary9byte_swapIdEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   76|     17|    {
   77|     17|        uint64_t x;
   78|     17|        std::memcpy(&x,&val,sizeof(uint64_t));
   79|     17|        uint64_t y = byte_swap(x);
   80|     17|        T val2;
   81|     17|        std::memcpy(&val2,&y,sizeof(uint64_t));
   82|     17|        return val2;
   83|     17|    }
_ZN8jsoncons6binary9byte_swapImEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|     17|    {
   52|     17|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|     17|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|     17|#  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|     17|    }

_ZN8jsoncons9is_base10IcEEbPKT_m:
  164|     27|{
  165|     27|    integer_chars_state state = integer_chars_state::initial;
  166|       |
  167|     27|    const CharT* end = s + length; 
  168|     70|    for (;s < end; ++s)
  ------------------
  |  Branch (168:11): [True: 67, False: 3]
  ------------------
  169|     67|    {
  170|     67|        switch(state)
  171|     67|        {
  172|     27|            case integer_chars_state::initial:
  ------------------
  |  Branch (172:13): [True: 27, False: 40]
  ------------------
  173|     27|            {
  174|     27|                switch(*s)
  175|     27|                {
  176|      3|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (176:21): [True: 1, False: 26]
  |  Branch (176:30): [True: 1, False: 26]
  |  Branch (176:39): [True: 0, False: 27]
  |  Branch (176:48): [True: 0, False: 27]
  |  Branch (176:57): [True: 0, False: 27]
  |  Branch (176:66): [True: 0, False: 27]
  |  Branch (176:75): [True: 1, False: 26]
  |  Branch (176:84): [True: 0, False: 27]
  |  Branch (176:93): [True: 0, False: 27]
  |  Branch (176:103): [True: 0, False: 27]
  ------------------
  177|      3|                        state = integer_chars_state::decimal;
  178|      3|                        break;
  179|      8|                    case '-':
  ------------------
  |  Branch (179:21): [True: 8, False: 19]
  ------------------
  180|      8|                        state = integer_chars_state::minus;
  181|      8|                        break;
  182|     16|                    default:
  ------------------
  |  Branch (182:21): [True: 16, False: 11]
  ------------------
  183|     16|                        return false;
  184|     27|                }
  185|     11|                break;
  186|     27|            }
  187|     11|            case integer_chars_state::minus:
  ------------------
  |  Branch (187:13): [True: 8, False: 59]
  ------------------
  188|      8|            {
  189|      8|                switch(*s)
  190|      8|                {
  191|      8|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (191:21): [True: 8, False: 0]
  |  Branch (191:30): [True: 0, False: 8]
  |  Branch (191:39): [True: 0, False: 8]
  |  Branch (191:48): [True: 0, False: 8]
  |  Branch (191:57): [True: 0, False: 8]
  |  Branch (191:66): [True: 0, False: 8]
  |  Branch (191:75): [True: 0, False: 8]
  |  Branch (191:84): [True: 0, False: 8]
  |  Branch (191:93): [True: 0, False: 8]
  |  Branch (191:103): [True: 0, False: 8]
  ------------------
  192|      8|                        state = integer_chars_state::decimal;
  193|      8|                        break;
  194|      0|                    default:
  ------------------
  |  Branch (194:21): [True: 0, False: 8]
  ------------------
  195|      0|                        return false;
  196|      8|                }
  197|      8|                break;
  198|      8|            }
  199|     32|            case integer_chars_state::decimal:
  ------------------
  |  Branch (199:13): [True: 32, False: 35]
  ------------------
  200|     32|            {
  201|     32|                switch(*s)
  202|     32|                {
  203|     24|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (203:21): [True: 0, False: 32]
  |  Branch (203:30): [True: 2, False: 30]
  |  Branch (203:39): [True: 6, False: 26]
  |  Branch (203:48): [True: 0, False: 32]
  |  Branch (203:57): [True: 8, False: 24]
  |  Branch (203:66): [True: 0, False: 32]
  |  Branch (203:75): [True: 0, False: 32]
  |  Branch (203:84): [True: 8, False: 24]
  |  Branch (203:93): [True: 0, False: 32]
  |  Branch (203:103): [True: 0, False: 32]
  ------------------
  204|     24|                        break;
  205|      8|                    default:
  ------------------
  |  Branch (205:21): [True: 8, False: 24]
  ------------------
  206|      8|                        return false;
  207|     32|                }
  208|     24|                break;
  209|     32|            }
  210|     24|            default:
  ------------------
  |  Branch (210:13): [True: 0, False: 67]
  ------------------
  211|      0|                break;
  212|     67|        }
  213|     67|    }
  214|      3|    return state == integer_chars_state::decimal ? true : false;
  ------------------
  |  Branch (214:12): [True: 3, False: 0]
  ------------------
  215|     27|}

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

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

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

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

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

