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

_ZNK8jsoncons6detail4spanIKhLm18446744073709551615EE4sizeEv:
  116|  1.73M|        {
  117|  1.73M|            return size_;
  118|  1.73M|        }
_ZN8jsoncons6detail4spanIKhLm18446744073709551615EEC2Ev:
   58|   557k|        {
   59|   557k|        }
_ZN8jsoncons6detail4spanIKhLm18446744073709551615EEC2EPS2_m:
   61|  19.9k|            : data_(data), size_(size)
   62|  19.9k|        {
   63|  19.9k|        }
_ZNK8jsoncons6detail4spanIKhLm18446744073709551615EE4dataEv:
  111|  1.15M|        {
  112|  1.15M|            return data_;
  113|  1.15M|        }

_ZN8jsoncons18basic_json_visitorIcEC2Ev:
  103|    244|        basic_json_visitor() = default;
_ZN8jsoncons19typed_array_visitorD2Ev:
   33|    244|        virtual ~typed_array_visitor() = default;
_ZN8jsoncons18basic_json_visitorIcE11begin_arrayEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  345|   109k|        {
  346|   109k|            visit_begin_array(length, tag, context, ec);
  347|   109k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   109k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  348|   109k|        }
_ZN8jsoncons18basic_json_visitorIcE12uint64_valueEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  414|   727k|        {
  415|   727k|            visit_uint64(value, tag, context, ec);
  416|   727k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   727k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  417|   727k|        }
_ZN8jsoncons18basic_json_visitorIcE9end_arrayERKNS_11ser_contextERNSt3__110error_codeE:
  351|  1.98M|        {
  352|  1.98M|            visit_end_array(context, ec);
  353|  1.98M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  1.98M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  354|  1.98M|        }
_ZN8jsoncons18basic_json_visitorIcE11int64_valueElNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  423|  1.68M|        {
  424|  1.68M|            visit_int64(value, tag, context, ec);
  425|  1.68M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  1.68M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  426|  1.68M|        }
_ZN8jsoncons18basic_json_visitorIcE12double_valueEdNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  441|  53.9k|        {
  442|  53.9k|            visit_double(value, tag, context, ec);
  443|  53.9k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  53.9k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  444|  53.9k|        }
_ZN8jsoncons18basic_json_visitorIcE10null_valueENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  365|  1.42M|        {
  366|  1.42M|            visit_null(tag, context, ec);
  367|  1.42M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  1.42M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  368|  1.42M|        }
_ZN8jsoncons18basic_json_visitorIcE10bool_valueEbNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  374|   180k|        {
  375|   180k|            visit_bool(value, tag, context, ec);
  376|   180k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   180k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  377|   180k|        }
_ZN8jsoncons18basic_json_visitorIcE12string_valueERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_12semantic_tagERKNS_11ser_contextERNS2_10error_codeE:
  383|  4.68M|        {
  384|  4.68M|            visit_string(value, tag, context, ec);
  385|  4.68M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  4.68M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  386|  4.68M|        }
_ZN8jsoncons18basic_json_visitorIcE11begin_arrayENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  339|  1.89M|        {
  340|  1.89M|            visit_begin_array(tag, context, ec);
  341|  1.89M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  1.89M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  342|  1.89M|        }
_ZN8jsoncons18basic_json_visitorIcE12begin_objectEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  327|  57.2k|        {
  328|  57.2k|            visit_begin_object(length, tag, context, ec);
  329|  57.2k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  57.2k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  330|  57.2k|        }
_ZN8jsoncons18basic_json_visitorIcE12begin_objectENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  318|  2.70k|        {
  319|  2.70k|            visit_begin_object(tag, context, ec);
  320|  2.70k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  2.70k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  321|  2.70k|        }
_ZN8jsoncons18basic_json_visitorIcE3keyERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEERKNS_11ser_contextERNS2_10error_codeE:
  357|   576k|        {
  358|   576k|            visit_key(name, context, ec);
  359|   576k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|   576k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  360|   576k|        }
_ZN8jsoncons18basic_json_visitorIcE10end_objectERKNS_11ser_contextERNSt3__110error_codeE:
  333|  56.9k|        {
  334|  56.9k|            visit_end_object(context, ec);
  335|  56.9k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  276|  56.9k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  336|  56.9k|        }
_ZN8jsoncons18basic_json_visitorIcE5flushEv:
  108|     16|        {
  109|     16|            visit_flush();
  110|     16|        }

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

_ZN8jsoncons10bytes_sinkINSt3__16vectorIhNS1_9allocatorIhEEEEvEC2ERS5_:
  315|    244|            : buf_ptr(std::addressof(buf))
  316|    244|        {
  317|    244|        }
_ZN8jsoncons10bytes_sinkINSt3__16vectorIhNS1_9allocatorIhEEEEvE9push_backEh:
  334|  36.1M|        {
  335|  36.1M|            buf_ptr->push_back(static_cast<value_type>(ch));
  336|  36.1M|        }
_ZN8jsoncons10bytes_sinkINSt3__16vectorIhNS1_9allocatorIhEEEEvE5flushEv:
  325|    260|        {
  326|    260|        }

_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEED2Ev:
  193|    244|    {
  194|    244|        if (chunk_)
  ------------------
  |  Branch (194:13): [True: 244, False: 0]
  ------------------
  195|    244|        {
  196|    244|            std::allocator_traits<char_allocator_type>::deallocate(alloc_, chunk_, chunk_size_);
  197|    244|        }
  198|    244|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEEC2ERNS1_13basic_istreamIcNS1_11char_traitsIcEEEERKS3_:
  176|    244|        : alloc_(alloc), stream_ptr_(std::addressof(is)), sbuf_(is.rdbuf()),
  177|    244|          chunk_size_(default_max_chunk_size)
  178|    244|    {
  179|    244|        chunk_ = std::allocator_traits<char_allocator_type>::allocate(alloc_, chunk_size_);
  180|    244|        data_ = chunk_;
  181|    244|    }
_ZN8jsoncons18basic_null_istreamIcEC1Ev:
   57|    244|      : std::basic_istream<CharT>(&nb_)
   58|    244|    {
   59|    244|    }
_ZN8jsoncons18basic_null_istreamIcE11null_bufferC2Ev:
   43|    244|        null_buffer() = default;
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE8is_errorEv:
  276|  1.96M|    {
  277|  1.96M|        return stream_ptr_->bad();  
  278|  1.96M|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4readEPhm:
  372|  10.6M|    {
  373|  10.6M|        std::size_t len = 0;
  374|  10.6M|        if (count_ > 0)
  ------------------
  |  Branch (374:13): [True: 10.6M, False: 793]
  ------------------
  375|  10.6M|        {
  376|  10.6M|            len = (std::min)(count_, length);
  377|  10.6M|            std::memcpy(p, data_, len*sizeof(value_type));
  378|  10.6M|            data_ += len;
  379|  10.6M|            count_ -= len;
  380|  10.6M|            position_ += len;
  381|  10.6M|        }
  382|  10.6M|        if (length - len == 0)
  ------------------
  |  Branch (382:13): [True: 10.6M, False: 1.63k]
  ------------------
  383|  10.6M|        {
  384|  10.6M|            return len;
  385|  10.6M|        }
  386|  1.63k|        else if (length - len < chunk_size_)
  ------------------
  |  Branch (386:18): [True: 1.63k, False: 0]
  ------------------
  387|  1.63k|        {
  388|  1.63k|            data_ = chunk_;
  389|  1.63k|            count_ = fill_buffer(chunk_, chunk_size_);
  390|  1.63k|            if (count_ > 0)
  ------------------
  |  Branch (390:17): [True: 1.53k, False: 105]
  ------------------
  391|  1.53k|            {
  392|  1.53k|                std::size_t len2 = (std::min)(count_, length-len);
  393|  1.53k|                std::memcpy(p+len, data_, len2*sizeof(value_type));
  394|  1.53k|                data_ += len2;
  395|  1.53k|                count_ -= len2;
  396|  1.53k|                position_ += len2;
  397|  1.53k|                len += len2;
  398|  1.53k|            }
  399|  1.63k|            return len;
  400|  1.63k|        }
  401|      0|        else
  402|      0|        {
  403|      0|            if (stream_ptr_->eof())
  ------------------
  |  Branch (403:17): [True: 0, False: 0]
  ------------------
  404|      0|            {
  405|      0|                count_ = 0;
  406|      0|                return 0;
  407|      0|            }
  408|      0|            JSONCONS_TRY
  ------------------
  |  |   37|      0|    #define JSONCONS_TRY try
  ------------------
  409|      0|            {
  410|      0|                std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(p+len), length-len);
  411|      0|                std::size_t len2 = static_cast<std::size_t>(count);
  412|      0|                if (len2 < length-len)
  ------------------
  |  Branch (412:21): [True: 0, False: 0]
  ------------------
  413|      0|                {
  414|      0|                    stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  415|      0|                }
  416|      0|                len += len2;
  417|      0|                position_ += len2;
  418|      0|                return len;
  419|      0|            }
  420|      0|            JSONCONS_CATCH(const std::exception&)     
  421|      0|            {
  422|      0|                stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  423|      0|                return 0;
  424|      0|            }
  425|      0|        }
  426|  10.6M|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE11fill_bufferEPhm:
  430|  1.93k|    {
  431|  1.93k|        if (stream_ptr_->eof())
  ------------------
  |  Branch (431:13): [True: 128, False: 1.80k]
  ------------------
  432|    128|        {
  433|    128|            return 0;
  434|    128|        }
  435|       |
  436|  1.80k|        JSONCONS_TRY
  ------------------
  |  |   37|  1.80k|    #define JSONCONS_TRY try
  ------------------
  437|  1.80k|        {
  438|  1.80k|            std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(chunk), chunk_size);
  439|  1.80k|            std::size_t length = static_cast<std::size_t>(count);
  440|       |
  441|  1.80k|            if (length < chunk_size)
  ------------------
  |  Branch (441:17): [True: 229, False: 1.57k]
  ------------------
  442|    229|            {
  443|    229|                stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  444|    229|            }
  445|  1.80k|            return length;
  446|  1.80k|        }
  447|  1.80k|        JSONCONS_CATCH(const std::exception&)     
  448|  1.80k|        {
  449|      0|            stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  450|      0|            return 0;
  451|      0|        }
  452|  1.80k|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE9read_spanIRNS1_12basic_stringIcNS1_11char_traitsIcEENS2_IcEEEEEENS_6detail4spanIKhLm18446744073709551615EEEmOT_:
  352|   577k|    {
  353|   577k|        if (JSONCONS_UNLIKELY(length == 0))
  ------------------
  |  |   78|   577k|#define JSONCONS_UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (78:30): [True: 557k, False: 19.9k]
  |  |  ------------------
  ------------------
  354|   557k|        {
  355|   557k|            return span<const value_type>{};
  356|   557k|        }
  357|  19.9k|        if (length > count_)
  ------------------
  |  Branch (357:13): [True: 128, False: 19.8k]
  ------------------
  358|    128|        {
  359|    128|            buffer.clear();
  360|    128|            source_reader<stream_source_type>::read(*this, std::forward<Buffer>(buffer), length);
  361|    128|            return span<const value_type>(reinterpret_cast<const value_type*>(buffer.data()), buffer.size());
  362|    128|        }
  363|       |
  364|  19.8k|        const value_type* data = data_;
  365|  19.8k|        data_ += length;
  366|  19.8k|        count_ -= length;
  367|  19.8k|        position_ += length;
  368|  19.8k|        return span<const value_type>(data, length);
  369|  19.9k|    }
_ZN8jsoncons13source_readerINS_13stream_sourceIhNSt3__19allocatorIhEEEEE4readINS2_12basic_stringIcNS2_11char_traitsIcEENS3_IcEEEEEENS2_9enable_ifIXaaL_ZNS2_17integral_constantIbLb1EE5valueEEsr10ext_traits7is_byteINT_10value_typeEEE5valueEmE4typeERS5_RSG_m:
  996|    128|    {
  997|    128|        std::size_t unread = length;
  998|       |
  999|    892|        while (unread > 0 && !source.eof())
  ------------------
  |  Branch (999:16): [True: 793, False: 99]
  |  Branch (999:30): [True: 764, False: 29]
  ------------------
 1000|    764|        {
 1001|    764|            if (source.count() == 0 && unread >= source.chunk_size())
  ------------------
  |  Branch (1001:17): [True: 2, False: 762]
  |  Branch (1001:40): [True: 1, False: 1]
  ------------------
 1002|      1|            {
 1003|      1|                std::size_t n = source.chunk_size();
 1004|      1|                std::size_t offset = buffer.size();
 1005|      1|                buffer.resize(buffer.size()+n);
 1006|      1|                std::size_t actual = source.fill_buffer(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
 1007|      1|                unread -= actual;
 1008|      1|            }
 1009|    763|            else
 1010|    763|            {
 1011|    763|                std::size_t n = (std::min)(source.chunk_size(), unread);
 1012|    763|                std::size_t offset = buffer.size();
 1013|    763|                buffer.resize(buffer.size()+n);
 1014|    763|                std::size_t actual = source.read(reinterpret_cast<value_type*>(&buffer[0]) + offset, n);
 1015|    763|                unread -= actual;
 1016|    763|            }
 1017|    764|        }
 1018|    128|        return length - unread;
 1019|    128|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE3eofEv:
  271|    793|    {
  272|    793|        return count_ == 0 && stream_ptr_->eof();
  ------------------
  |  Branch (272:16): [True: 31, False: 762]
  |  Branch (272:31): [True: 29, False: 2]
  ------------------
  273|    793|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE5countEv:
  346|    764|    {
  347|    764|        return count_;
  348|    764|    }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE10chunk_sizeEv:
  261|    766|    {
  262|    766|        return chunk_size_;
  263|    766|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4peekEv:
  312|  5.95M|    {
  313|  5.95M|        if (count_ == 0)
  ------------------
  |  Branch (313:13): [True: 295, False: 5.95M]
  ------------------
  314|    295|        {
  315|    295|            data_ = chunk_;
  316|    295|            count_ = fill_buffer(chunk_, chunk_size_);
  317|    295|        }
  318|  5.95M|        if (count_ > 0)
  ------------------
  |  Branch (318:13): [True: 5.95M, False: 41]
  ------------------
  319|  5.95M|        {
  320|  5.95M|            value_type c = *data_;
  321|  5.95M|            return char_result<value_type>{c, false};
  322|  5.95M|        }
  323|     41|        else
  324|     41|        {
  325|     41|            return char_result<value_type>{0, true};
  326|     41|        }
  327|  5.95M|    }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE6ignoreEm:
  286|  2.13M|    {
  287|  2.13M|        std::size_t len = 0;
  288|  2.13M|        if (count_ > 0)
  ------------------
  |  Branch (288:13): [True: 2.13M, False: 0]
  ------------------
  289|  2.13M|        {
  290|  2.13M|            len = (std::min)(count_, length);
  291|  2.13M|            position_ += len;
  292|  2.13M|            data_ += len;
  293|  2.13M|            count_ -= len;
  294|  2.13M|        }
  295|  2.13M|        while (len < length)
  ------------------
  |  Branch (295:16): [True: 0, False: 2.13M]
  ------------------
  296|      0|        {
  297|      0|            data_ = chunk_;
  298|      0|            count_ = fill_buffer(chunk_, chunk_size_);
  299|      0|            if (count_ == 0)
  ------------------
  |  Branch (299:17): [True: 0, False: 0]
  ------------------
  300|      0|            {
  301|      0|                break;
  302|      0|            }
  303|      0|            std::size_t len2 = (std::min)(count_, length-len);
  304|      0|            position_ += len2;
  305|      0|            data_ += len2;
  306|      0|            count_ -= len2;
  307|      0|            len += len2;
  308|      0|        }
  309|  2.13M|    }

_ZN8jsoncons6binary13native_to_bigIhNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  8.24M|    {
  128|  8.24M|        T val2 = byte_swap(val);
  129|  8.24M|        uint8_t buf[sizeof(T)];
  130|  8.24M|        std::memcpy(buf, &val2, sizeof(T));
  131|  8.24M|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 8.24M, False: 8.24M]
  ------------------
  132|  8.24M|        {
  133|  8.24M|            *d_first++ = item;
  134|  8.24M|        }
  135|  8.24M|    }
_ZN8jsoncons6binary9byte_swapIhEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  8.24M|    {
   22|  8.24M|        return val;
   23|  8.24M|    }
_ZN8jsoncons6binary13native_to_bigItNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  10.0k|    {
  128|  10.0k|        T val2 = byte_swap(val);
  129|  10.0k|        uint8_t buf[sizeof(T)];
  130|  10.0k|        std::memcpy(buf, &val2, sizeof(T));
  131|  10.0k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 20.1k, False: 10.0k]
  ------------------
  132|  20.1k|        {
  133|  20.1k|            *d_first++ = item;
  134|  20.1k|        }
  135|  10.0k|    }
_ZN8jsoncons6binary9byte_swapItEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  10.0k|    {
   29|  10.0k|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  10.0k|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  10.0k|#      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|  10.0k|    }
_ZN8jsoncons6binary13native_to_bigIjNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|    279|    {
  128|    279|        T val2 = byte_swap(val);
  129|    279|        uint8_t buf[sizeof(T)];
  130|    279|        std::memcpy(buf, &val2, sizeof(T));
  131|    279|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 1.11k, False: 279]
  ------------------
  132|  1.11k|        {
  133|  1.11k|            *d_first++ = item;
  134|  1.11k|        }
  135|    279|    }
_ZN8jsoncons6binary9byte_swapIjEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|  43.9k|    {
   40|  43.9k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|  43.9k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|  43.9k|#  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|  43.9k|    }
_ZN8jsoncons6binary9byte_swapImEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  64.2k|    {
   52|  64.2k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  64.2k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  64.2k|#  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|  64.2k|    }
_ZN8jsoncons6binary13native_to_bigIsNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   789k|    {
  128|   789k|        T val2 = byte_swap(val);
  129|   789k|        uint8_t buf[sizeof(T)];
  130|   789k|        std::memcpy(buf, &val2, sizeof(T));
  131|   789k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 1.57M, False: 789k]
  ------------------
  132|  1.57M|        {
  133|  1.57M|            *d_first++ = item;
  134|  1.57M|        }
  135|   789k|    }
_ZN8jsoncons6binary9byte_swapIsEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  1.95M|    {
   29|  1.95M|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  1.95M|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  1.95M|#      define JSONCONS_BYTE_SWAP_16    __builtin_bswap16
  ------------------
   31|       |    #else
   32|       |        return (static_cast<uint16_t>(val) >> 8) | (static_cast<uint16_t>(val) << 8);
   33|       |    #endif
   34|  1.95M|    }
_ZN8jsoncons6binary13native_to_bigIiNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  88.0k|    {
  128|  88.0k|        T val2 = byte_swap(val);
  129|  88.0k|        uint8_t buf[sizeof(T)];
  130|  88.0k|        std::memcpy(buf, &val2, sizeof(T));
  131|  88.0k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 352k, False: 88.0k]
  ------------------
  132|   352k|        {
  133|   352k|            *d_first++ = item;
  134|   352k|        }
  135|  88.0k|    }
_ZN8jsoncons6binary9byte_swapIiEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|   179k|    {
   40|   179k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|   179k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|   179k|#  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|   179k|    }
_ZN8jsoncons6binary13native_to_bigIlNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  29.1k|    {
  128|  29.1k|        T val2 = byte_swap(val);
  129|  29.1k|        uint8_t buf[sizeof(T)];
  130|  29.1k|        std::memcpy(buf, &val2, sizeof(T));
  131|  29.1k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 233k, False: 29.1k]
  ------------------
  132|   233k|        {
  133|   233k|            *d_first++ = item;
  134|   233k|        }
  135|  29.1k|    }
_ZN8jsoncons6binary9byte_swapIlEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  59.6k|    {
   52|  59.6k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  59.6k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  59.6k|#  define JSONCONS_BYTE_SWAP_64 __builtin_bswap64
  ------------------
   54|       |    #else
   55|       |        uint64_t tmp = ((static_cast<uint64_t>(val) & 0x00000000ffffffffull) << 32) | ((static_cast<uint64_t>(val) & 0xffffffff00000000ull) >> 32);
   56|       |        tmp = ((tmp & 0x0000ffff0000ffffull) << 16) | ((tmp & 0xffff0000ffff0000ull) >> 16);
   57|       |        return ((tmp & 0x00ff00ff00ff00ffull) << 8)  | ((tmp & 0xff00ff00ff00ff00ull) >> 8);
   58|       |    #endif
   59|  59.6k|    }
_ZN8jsoncons6binary13native_to_bigIaNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   100k|    {
  128|   100k|        T val2 = byte_swap(val);
  129|   100k|        uint8_t buf[sizeof(T)];
  130|   100k|        std::memcpy(buf, &val2, sizeof(T));
  131|   100k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 100k, False: 100k]
  ------------------
  132|   100k|        {
  133|   100k|            *d_first++ = item;
  134|   100k|        }
  135|   100k|    }
_ZN8jsoncons6binary9byte_swapIaEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|   864k|    {
   22|   864k|        return val;
   23|   864k|    }
_ZN8jsoncons6binary13native_to_bigIfNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  19.9k|    {
  128|  19.9k|        T val2 = byte_swap(val);
  129|  19.9k|        uint8_t buf[sizeof(T)];
  130|  19.9k|        std::memcpy(buf, &val2, sizeof(T));
  131|  19.9k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 79.7k, False: 19.9k]
  ------------------
  132|  79.7k|        {
  133|  79.7k|            *d_first++ = item;
  134|  79.7k|        }
  135|  19.9k|    }
_ZN8jsoncons6binary9byte_swapIfEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   64|  43.6k|    {
   65|  43.6k|        uint32_t x;
   66|  43.6k|        std::memcpy(&x,&val,sizeof(uint32_t));
   67|  43.6k|        uint32_t y = byte_swap(x);
   68|  43.6k|        T val2;
   69|  43.6k|        std::memcpy(&val2,&y,sizeof(uint32_t));
   70|  43.6k|        return val2;
   71|  43.6k|    }
_ZN8jsoncons6binary13native_to_bigIdNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  34.0k|    {
  128|  34.0k|        T val2 = byte_swap(val);
  129|  34.0k|        uint8_t buf[sizeof(T)];
  130|  34.0k|        std::memcpy(buf, &val2, sizeof(T));
  131|  34.0k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 272k, False: 34.0k]
  ------------------
  132|   272k|        {
  133|   272k|            *d_first++ = item;
  134|   272k|        }
  135|  34.0k|    }
_ZN8jsoncons6binary9byte_swapIdEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   76|  64.2k|    {
   77|  64.2k|        uint64_t x;
   78|  64.2k|        std::memcpy(&x,&val,sizeof(uint64_t));
   79|  64.2k|        uint64_t y = byte_swap(x);
   80|  64.2k|        T val2;
   81|  64.2k|        std::memcpy(&val2,&y,sizeof(uint64_t));
   82|  64.2k|        return val2;
   83|  64.2k|    }
_ZN8jsoncons6binary13big_to_nativeIaNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|   764k|    {
  183|   764k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 764k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|   764k|        T val;
  188|   764k|        std::memcpy(&val,first,sizeof(T));
  189|   764k|        return byte_swap(val);
  190|   764k|    }
_ZN8jsoncons6binary13big_to_nativeIsNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  1.16M|    {
  183|  1.16M|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 1.16M]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  1.16M|        T val;
  188|  1.16M|        std::memcpy(&val,first,sizeof(T));
  189|  1.16M|        return byte_swap(val);
  190|  1.16M|    }
_ZN8jsoncons6binary13big_to_nativeIiNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  91.3k|    {
  183|  91.3k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 91.3k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  91.3k|        T val;
  188|  91.3k|        std::memcpy(&val,first,sizeof(T));
  189|  91.3k|        return byte_swap(val);
  190|  91.3k|    }
_ZN8jsoncons6binary13big_to_nativeIlNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  30.5k|    {
  183|  30.5k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 30.5k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  30.5k|        T val;
  188|  30.5k|        std::memcpy(&val,first,sizeof(T));
  189|  30.5k|        return byte_swap(val);
  190|  30.5k|    }
_ZN8jsoncons6binary13big_to_nativeIfNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  23.7k|    {
  183|  23.7k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 23.7k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  23.7k|        T val;
  188|  23.7k|        std::memcpy(&val,first,sizeof(T));
  189|  23.7k|        return byte_swap(val);
  190|  23.7k|    }
_ZN8jsoncons6binary13big_to_nativeIdNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  30.2k|    {
  183|  30.2k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 30.2k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  30.2k|        T val;
  188|  30.2k|        std::memcpy(&val,first,sizeof(T));
  189|  30.2k|        return byte_swap(val);
  190|  30.2k|    }

_ZN8jsoncons9is_base10IhEEbPKT_m:
  164|    418|{
  165|    418|    integer_chars_state state = integer_chars_state::initial;
  166|       |
  167|    418|    const CharT* end = s + length; 
  168|    869|    for (;s < end; ++s)
  ------------------
  |  Branch (168:11): [True: 712, False: 157]
  ------------------
  169|    712|    {
  170|    712|        switch(state)
  171|    712|        {
  172|    418|            case integer_chars_state::initial:
  ------------------
  |  Branch (172:13): [True: 418, False: 294]
  ------------------
  173|    418|            {
  174|    418|                switch(*s)
  175|    418|                {
  176|    153|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (176:21): [True: 11, False: 407]
  |  Branch (176:30): [True: 10, False: 408]
  |  Branch (176:39): [True: 4, False: 414]
  |  Branch (176:48): [True: 21, False: 397]
  |  Branch (176:57): [True: 1, False: 417]
  |  Branch (176:66): [True: 2, False: 416]
  |  Branch (176:75): [True: 102, False: 316]
  |  Branch (176:84): [True: 0, False: 418]
  |  Branch (176:93): [True: 0, False: 418]
  |  Branch (176:103): [True: 2, False: 416]
  ------------------
  177|    153|                        state = integer_chars_state::decimal;
  178|    153|                        break;
  179|    139|                    case '-':
  ------------------
  |  Branch (179:21): [True: 139, False: 279]
  ------------------
  180|    139|                        state = integer_chars_state::minus;
  181|    139|                        break;
  182|    126|                    default:
  ------------------
  |  Branch (182:21): [True: 126, False: 292]
  ------------------
  183|    126|                        return false;
  184|    418|                }
  185|    292|                break;
  186|    418|            }
  187|    292|            case integer_chars_state::minus:
  ------------------
  |  Branch (187:13): [True: 139, False: 573]
  ------------------
  188|    139|            {
  189|    139|                switch(*s)
  190|    139|                {
  191|    116|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (191:21): [True: 62, False: 77]
  |  Branch (191:30): [True: 2, False: 137]
  |  Branch (191:39): [True: 0, False: 139]
  |  Branch (191:48): [True: 0, False: 139]
  |  Branch (191:57): [True: 0, False: 139]
  |  Branch (191:66): [True: 22, False: 117]
  |  Branch (191:75): [True: 0, False: 139]
  |  Branch (191:84): [True: 0, False: 139]
  |  Branch (191:93): [True: 12, False: 127]
  |  Branch (191:103): [True: 18, False: 121]
  ------------------
  192|    116|                        state = integer_chars_state::decimal;
  193|    116|                        break;
  194|     23|                    default:
  ------------------
  |  Branch (194:21): [True: 23, False: 116]
  ------------------
  195|     23|                        return false;
  196|    139|                }
  197|    116|                break;
  198|    139|            }
  199|    155|            case integer_chars_state::decimal:
  ------------------
  |  Branch (199:13): [True: 155, False: 557]
  ------------------
  200|    155|            {
  201|    155|                switch(*s)
  202|    155|                {
  203|     43|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (203:21): [True: 21, False: 134]
  |  Branch (203:30): [True: 22, False: 133]
  |  Branch (203:39): [True: 0, False: 155]
  |  Branch (203:48): [True: 0, False: 155]
  |  Branch (203:57): [True: 0, False: 155]
  |  Branch (203:66): [True: 0, False: 155]
  |  Branch (203:75): [True: 0, False: 155]
  |  Branch (203:84): [True: 0, False: 155]
  |  Branch (203:93): [True: 0, False: 155]
  |  Branch (203:103): [True: 0, False: 155]
  ------------------
  204|     43|                        break;
  205|    112|                    default:
  ------------------
  |  Branch (205:21): [True: 112, False: 43]
  ------------------
  206|    112|                        return false;
  207|    155|                }
  208|     43|                break;
  209|    155|            }
  210|     43|            default:
  ------------------
  |  Branch (210:13): [True: 0, False: 712]
  ------------------
  211|      0|                break;
  212|    712|        }
  213|    712|    }
  214|    157|    return state == integer_chars_state::decimal ? true : false;
  ------------------
  |  Branch (214:12): [True: 157, False: 0]
  ------------------
  215|    418|}

_ZN8jsoncons14unicode_traits8validateIcEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14unicode_resultIS4_EEE4typeEPKS4_m:
 1147|  5.25M|    {
 1148|  5.25M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(data);
 1149|  5.25M|        const uint8_t* end = it + length;
 1150|       |
 1151|  5.25M|        unicode_errc  result{};
 1152|  10.4M|        while (it != end) 
  ------------------
  |  Branch (1152:16): [True: 5.17M, False: 5.25M]
  ------------------
 1153|  5.17M|        {
 1154|  5.17M|            if ((end - it) >= 8)
  ------------------
  |  Branch (1154:17): [True: 457k, False: 4.71M]
  ------------------
 1155|   457k|            {
 1156|  3.17M|                JSONCONS_REPEAT8({if (JSONCONS_LIKELY((*it & 0x80) == 0)) ++it; else goto non_ascii;})
  ------------------
  |  |  281|   914k|#define JSONCONS_REPEAT8(x)  { x x x x x x x x }
  |  |  ------------------
  |  |  |  Branch (281:32): [True: 456k, False: 901]
  |  |  |  Branch (281:34): [True: 455k, False: 999]
  |  |  |  Branch (281:36): [True: 455k, False: 278]
  |  |  |  Branch (281:38): [True: 452k, False: 2.45k]
  |  |  |  Branch (281:40): [True: 452k, False: 220]
  |  |  |  Branch (281:42): [True: 451k, False: 569]
  |  |  |  Branch (281:44): [True: 451k, False: 365]
  |  |  |  Branch (281:46): [True: 451k, False: 162]
  |  |  ------------------
  ------------------
 1157|   451k|                continue;
 1158|  3.17M|            }
 1159|  4.71M|    non_ascii:
 1160|  4.71M|            const std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[*it]) + 1;
 1161|  4.71M|            if (len > (std::size_t)(end - it))
  ------------------
  |  Branch (1161:17): [True: 0, False: 4.71M]
  ------------------
 1162|      0|            {
 1163|      0|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it), unicode_errc::source_exhausted};
 1164|      0|            }
 1165|  4.71M|            if ((result=is_legal_utf8(it, len)) != unicode_errc())
  ------------------
  |  Branch (1165:17): [True: 10, False: 4.71M]
  ------------------
 1166|     10|            {
 1167|     10|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1168|     10|            }
 1169|  4.71M|            it += len;
 1170|  4.71M|        }
 1171|  5.25M|        return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1172|  5.25M|    }
_ZN8jsoncons14unicode_traits13is_legal_utf8EPKhm:
  305|  9.43M|    {
  306|  9.43M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(bytes);
  307|  9.43M|        const uint8_t* end = it+length;
  308|       |
  309|  9.43M|        uint8_t byte;
  310|  9.43M|        switch (length) {
  311|     16|        default:
  ------------------
  |  Branch (311:9): [True: 16, False: 9.43M]
  ------------------
  312|     16|            return unicode_errc::over_long_utf8_sequence;
  313|  7.66k|        case 4:
  ------------------
  |  Branch (313:9): [True: 7.66k, False: 9.42M]
  ------------------
  314|  7.66k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (314:17): [True: 5, False: 7.66k]
  ------------------
  315|      5|                return unicode_errc::bad_continuation_byte;
  316|  7.66k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  7.66k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  317|  9.65k|        case 3:
  ------------------
  |  Branch (317:9): [True: 1.99k, False: 9.43M]
  ------------------
  318|  9.65k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (318:17): [True: 4, False: 9.64k]
  ------------------
  319|      4|                return unicode_errc::bad_continuation_byte;
  320|  9.64k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  9.64k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  321|  10.3k|        case 2:
  ------------------
  |  Branch (321:9): [True: 747, False: 9.43M]
  ------------------
  322|  10.3k|            if (((byte = (*--end))& 0xC0) != 0x80)
  ------------------
  |  Branch (322:17): [True: 1, False: 10.3k]
  ------------------
  323|      1|                return unicode_errc::bad_continuation_byte;
  324|       |
  325|  10.3k|            switch (*it) 
  326|  10.3k|            {
  327|       |                // no fall-through in this inner switch
  328|     31|                case 0xE0: if (byte < 0xA0) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (328:17): [True: 31, False: 10.3k]
  |  Branch (328:32): [True: 0, False: 31]
  ------------------
  329|     98|                case 0xED: if (byte > 0x9F) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (329:17): [True: 98, False: 10.2k]
  |  Branch (329:32): [True: 0, False: 98]
  ------------------
  330|  1.52k|                case 0xF0: if (byte < 0x90) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (330:17): [True: 1.52k, False: 8.87k]
  |  Branch (330:32): [True: 0, False: 1.52k]
  ------------------
  331|  6.05k|                case 0xF4: if (byte > 0x8F) return unicode_errc::source_illegal; break;
  ------------------
  |  Branch (331:17): [True: 6.05k, False: 4.34k]
  |  Branch (331:32): [True: 0, False: 6.05k]
  ------------------
  332|  6.05k|                default:   if (byte < 0x80) return unicode_errc::source_illegal;
  ------------------
  |  Branch (332:17): [True: 2.68k, False: 7.70k]
  |  Branch (332:32): [True: 0, False: 2.68k]
  ------------------
  333|  10.3k|            }
  334|       |
  335|  10.3k|            JSONCONS_FALLTHROUGH;
  ------------------
  |  |  564|  10.3k|#  define JSONCONS_FALLTHROUGH [[fallthrough]]
  ------------------
  336|  9.43M|        case 1:
  ------------------
  |  Branch (336:9): [True: 9.42M, False: 10.4k]
  ------------------
  337|  9.43M|            if (*it >= 0x80 && *it < 0xC2)
  ------------------
  |  Branch (337:17): [True: 10.3k, False: 9.42M]
  |  Branch (337:32): [True: 7, False: 10.3k]
  ------------------
  338|      7|                return unicode_errc::source_illegal;
  339|  9.43M|            break;
  340|  9.43M|        }
  341|  9.43M|        if (*it > 0xF4) 
  ------------------
  |  Branch (341:13): [True: 1, False: 9.43M]
  ------------------
  342|      1|            return unicode_errc::source_illegal;
  343|       |
  344|  9.43M|        return unicode_errc();
  345|  9.43M|    }
_ZN8jsoncons14unicode_traits8validateIhEENSt3__19enable_ifIXsr10ext_traits8is_char8IT_EE5valueENS0_14unicode_resultIS4_EEE4typeEPKS4_m:
 1147|  5.25M|    {
 1148|  5.25M|        const uint8_t* it = reinterpret_cast<const uint8_t*>(data);
 1149|  5.25M|        const uint8_t* end = it + length;
 1150|       |
 1151|  5.25M|        unicode_errc  result{};
 1152|  10.3M|        while (it != end) 
  ------------------
  |  Branch (1152:16): [True: 5.12M, False: 5.25M]
  ------------------
 1153|  5.12M|        {
 1154|  5.12M|            if ((end - it) >= 8)
  ------------------
  |  Branch (1154:17): [True: 417k, False: 4.71M]
  ------------------
 1155|   417k|            {
 1156|  2.90M|                JSONCONS_REPEAT8({if (JSONCONS_LIKELY((*it & 0x80) == 0)) ++it; else goto non_ascii;})
  ------------------
  |  |  281|   835k|#define JSONCONS_REPEAT8(x)  { x x x x x x x x }
  |  |  ------------------
  |  |  |  Branch (281:32): [True: 417k, False: 605]
  |  |  |  Branch (281:34): [True: 416k, False: 750]
  |  |  |  Branch (281:36): [True: 416k, False: 255]
  |  |  |  Branch (281:38): [True: 414k, False: 1.80k]
  |  |  |  Branch (281:40): [True: 414k, False: 179]
  |  |  |  Branch (281:42): [True: 413k, False: 415]
  |  |  |  Branch (281:44): [True: 413k, False: 310]
  |  |  |  Branch (281:46): [True: 413k, False: 150]
  |  |  ------------------
  ------------------
 1157|   413k|                continue;
 1158|  2.90M|            }
 1159|  4.71M|    non_ascii:
 1160|  4.71M|            const std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[*it]) + 1;
 1161|  4.71M|            if (len > (std::size_t)(end - it))
  ------------------
  |  Branch (1161:17): [True: 2, False: 4.71M]
  ------------------
 1162|      2|            {
 1163|      2|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it), unicode_errc::source_exhausted};
 1164|      2|            }
 1165|  4.71M|            if ((result=is_legal_utf8(it, len)) != unicode_errc())
  ------------------
  |  Branch (1165:17): [True: 24, False: 4.71M]
  ------------------
 1166|     24|            {
 1167|     24|                return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1168|     24|            }
 1169|  4.71M|            it += len;
 1170|  4.71M|        }
 1171|  5.25M|        return unicode_result<CharT>{reinterpret_cast<const CharT*>(it),result} ;
 1172|  5.25M|    }

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

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

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

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

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

