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

_ZN8jsoncons26basic_default_json_visitorIcEC2Ev:
  811|     32|        basic_default_json_visitor() = default;
_ZN8jsoncons18basic_json_visitorIcEC2Ev:
  103|     32|        basic_json_visitor() = default;
_ZN8jsoncons19typed_array_visitorD2Ev:
   33|     32|        virtual ~typed_array_visitor() = default;
_ZN8jsoncons18basic_json_visitorIcE17visit_begin_arrayEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  560|  2.40k|        {
  561|  2.40k|            visit_begin_array(tag, context, ec);
  562|  2.40k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  2.40k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  563|  2.40k|        }
_ZN8jsoncons26basic_default_json_visitorIcE15visit_end_arrayERKNS_11ser_contextERNSt3__110error_codeE:
  833|   459k|        {
  834|   459k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   459k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  835|   459k|        }
_ZN8jsoncons26basic_default_json_visitorIcE12visit_uint64EmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  858|     27|        {
  859|     27|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|     27|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  860|     27|        }
_ZN8jsoncons26basic_default_json_visitorIcE11visit_int64ElNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  863|  74.8k|        {
  864|  74.8k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  74.8k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  865|  74.8k|        }
_ZN8jsoncons26basic_default_json_visitorIcE12visit_doubleEdNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  873|     25|        {
  874|     25|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|     25|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  875|     25|        }
_ZN8jsoncons26basic_default_json_visitorIcE11visit_flushEv:
  814|      1|        {
  815|      1|        }
_ZN8jsoncons26basic_default_json_visitorIcE18visit_begin_objectENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  818|  1.55M|        {
  819|  1.55M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  1.55M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  820|  1.55M|        }
_ZN8jsoncons18basic_json_visitorIcE18visit_begin_objectEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  544|  2.27k|        {
  545|  2.27k|            visit_begin_object(tag, context, ec);
  546|  2.27k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  2.27k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  547|  2.27k|        }
_ZN8jsoncons26basic_default_json_visitorIcE16visit_end_objectERKNS_11ser_contextERNSt3__110error_codeE:
  823|  1.55M|        {
  824|  1.55M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  1.55M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  825|  1.55M|        }
_ZN8jsoncons26basic_default_json_visitorIcE17visit_begin_arrayENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  828|   461k|        {
  829|   461k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   461k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  830|   461k|        }
_ZN8jsoncons26basic_default_json_visitorIcE9visit_keyERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEERKNS_11ser_contextERNS2_10error_codeE:
  838|   452k|        {
  839|   452k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   452k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  840|   452k|        }
_ZN8jsoncons26basic_default_json_visitorIcE10visit_nullENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  843|  3.72M|        {
  844|  3.72M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  3.72M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  845|  3.72M|        }
_ZN8jsoncons26basic_default_json_visitorIcE10visit_boolEbNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  878|   434k|        {
  879|   434k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   434k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  880|   434k|        }
_ZN8jsoncons26basic_default_json_visitorIcE12visit_stringERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_12semantic_tagERKNS_11ser_contextERNS2_10error_codeE:
  848|    302|        {
  849|    302|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|    302|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  850|    302|        }
_ZN8jsoncons18basic_json_visitorIcE11begin_arrayEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  345|  2.40k|        {
  346|  2.40k|            visit_begin_array(length, tag, context, ec);
  347|  2.40k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  2.40k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  348|  2.40k|        }
_ZN8jsoncons18basic_json_visitorIcE12uint64_valueEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  414|     27|        {
  415|     27|            visit_uint64(value, tag, context, ec);
  416|     27|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|     27|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  417|     27|        }
_ZN8jsoncons18basic_json_visitorIcE9end_arrayERKNS_11ser_contextERNSt3__110error_codeE:
  351|   459k|        {
  352|   459k|            visit_end_array(context, ec);
  353|   459k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   459k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  354|   459k|        }
_ZN8jsoncons18basic_json_visitorIcE11int64_valueElNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  423|  74.8k|        {
  424|  74.8k|            visit_int64(value, tag, context, ec);
  425|  74.8k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  74.8k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  426|  74.8k|        }
_ZN8jsoncons18basic_json_visitorIcE12double_valueEdNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  441|     25|        {
  442|     25|            visit_double(value, tag, context, ec);
  443|     25|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|     25|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  444|     25|        }
_ZN8jsoncons18basic_json_visitorIcE10null_valueENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  365|  3.72M|        {
  366|  3.72M|            visit_null(tag, context, ec);
  367|  3.72M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  3.72M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  368|  3.72M|        }
_ZN8jsoncons18basic_json_visitorIcE10bool_valueEbNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  374|   434k|        {
  375|   434k|            visit_bool(value, tag, context, ec);
  376|   434k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   434k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  377|   434k|        }
_ZN8jsoncons18basic_json_visitorIcE12string_valueERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_12semantic_tagERKNS_11ser_contextERNS2_10error_codeE:
  383|    302|        {
  384|    302|            visit_string(value, tag, context, ec);
  385|    302|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|    302|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  386|    302|        }
_ZN8jsoncons18basic_json_visitorIcE11begin_arrayENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  339|   458k|        {
  340|   458k|            visit_begin_array(tag, context, ec);
  341|   458k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   458k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  342|   458k|        }
_ZN8jsoncons18basic_json_visitorIcE12begin_objectEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  327|  2.27k|        {
  328|  2.27k|            visit_begin_object(length, tag, context, ec);
  329|  2.27k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  2.27k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  330|  2.27k|        }
_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|   452k|        {
  358|   452k|            visit_key(name, context, ec);
  359|   452k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   452k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  360|   452k|        }
_ZN8jsoncons18basic_json_visitorIcE10end_objectERKNS_11ser_contextERNSt3__110error_codeE:
  333|  1.55M|        {
  334|  1.55M|            visit_end_object(context, ec);
  335|  1.55M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  1.55M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  336|  1.55M|        }
_ZN8jsoncons18basic_json_visitorIcE5flushEv:
  108|      1|        {
  109|      1|            visit_flush();
  110|      1|        }

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

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

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

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

_ZN8jsoncons14unicode_traits8validateIcEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14convert_resultIS4_EEE4typeEPKS4_m:
 1134|   453k|    {
 1135|   453k|        conv_errc  result = conv_errc();
 1136|   453k|        const CharT* last = data + length;
 1137|  1.07M|        while (data != last) 
  ------------------
  |  Branch (1137:16): [True: 623k, False: 453k]
  ------------------
 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|   453k|        return convert_result<CharT>{data,result} ;
 1151|   453k|    }
_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|     31|{
   91|     31|    return std::error_code(static_cast<int>(e),ubjson_error_category());
   92|     31|}
_ZN8jsoncons6ubjson21ubjson_error_categoryEv:
   83|     31|{
   84|     31|  static ubjson_error_category_impl instance;
   85|     31|  return instance;
   86|     31|}

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

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

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

