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

_ZN8jsoncons18basic_json_visitorIcEC2Ev:
  103|    242|        basic_json_visitor() = default;
_ZN8jsoncons19typed_array_visitorD2Ev:
   33|    242|        virtual ~typed_array_visitor() = default;
_ZN8jsoncons18basic_json_visitorIcE11begin_arrayEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  345|   110k|        {
  346|   110k|            visit_begin_array(length, tag, context, ec);
  347|   110k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   110k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  348|   110k|        }
_ZN8jsoncons18basic_json_visitorIcE12uint64_valueEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  414|   541k|        {
  415|   541k|            visit_uint64(value, tag, context, ec);
  416|   541k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   541k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  417|   541k|        }
_ZN8jsoncons18basic_json_visitorIcE9end_arrayERKNS_11ser_contextERNSt3__110error_codeE:
  351|  1.93M|        {
  352|  1.93M|            visit_end_array(context, ec);
  353|  1.93M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  1.93M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  354|  1.93M|        }
_ZN8jsoncons18basic_json_visitorIcE11int64_valueElNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  423|  1.25M|        {
  424|  1.25M|            visit_int64(value, tag, context, ec);
  425|  1.25M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  1.25M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  426|  1.25M|        }
_ZN8jsoncons18basic_json_visitorIcE12double_valueEdNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  441|  56.7k|        {
  442|  56.7k|            visit_double(value, tag, context, ec);
  443|  56.7k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  56.7k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  444|  56.7k|        }
_ZN8jsoncons18basic_json_visitorIcE10null_valueENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  365|  4.97M|        {
  366|  4.97M|            visit_null(tag, context, ec);
  367|  4.97M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  4.97M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  368|  4.97M|        }
_ZN8jsoncons18basic_json_visitorIcE10bool_valueEbNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  374|   151k|        {
  375|   151k|            visit_bool(value, tag, context, ec);
  376|   151k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   151k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  377|   151k|        }
_ZN8jsoncons18basic_json_visitorIcE12string_valueERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_12semantic_tagERKNS_11ser_contextERNS2_10error_codeE:
  383|  4.51M|        {
  384|  4.51M|            visit_string(value, tag, context, ec);
  385|  4.51M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  4.51M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  386|  4.51M|        }
_ZN8jsoncons18basic_json_visitorIcE11begin_arrayENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  339|  1.84M|        {
  340|  1.84M|            visit_begin_array(tag, context, ec);
  341|  1.84M|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  1.84M|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  342|  1.84M|        }
_ZN8jsoncons18basic_json_visitorIcE12begin_objectEmNS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  327|  53.8k|        {
  328|  53.8k|            visit_begin_object(length, tag, context, ec);
  329|  53.8k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  53.8k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  330|  53.8k|        }
_ZN8jsoncons18basic_json_visitorIcE12begin_objectENS_12semantic_tagERKNS_11ser_contextERNSt3__110error_codeE:
  318|  1.78k|        {
  319|  1.78k|            visit_begin_object(tag, context, ec);
  320|  1.78k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  1.78k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  321|  1.78k|        }
_ZN8jsoncons18basic_json_visitorIcE3keyERKNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEERKNS_11ser_contextERNS2_10error_codeE:
  357|   999k|        {
  358|   999k|            visit_key(name, context, ec);
  359|   999k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|   999k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  360|   999k|        }
_ZN8jsoncons18basic_json_visitorIcE10end_objectERKNS_11ser_contextERNSt3__110error_codeE:
  333|  54.5k|        {
  334|  54.5k|            visit_end_object(context, ec);
  335|  54.5k|            JSONCONS_VISITOR_RETURN;
  ------------------
  |  |  272|  54.5k|#define JSONCONS_VISITOR_RETURN return true 
  ------------------
  336|  54.5k|        }
_ZN8jsoncons18basic_json_visitorIcE5flushEv:
  108|     15|        {
  109|     15|            visit_flush();
  110|     15|        }

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

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

_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEED2Ev:
  188|    242|        {
  189|    242|            if (buffer_)
  ------------------
  |  Branch (189:17): [True: 242, False: 0]
  ------------------
  190|    242|            {
  191|    242|                std::allocator_traits<char_allocator_type>::deallocate(alloc_, buffer_, buffer_size_);
  192|    242|            }
  193|    242|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEEC2ERNS1_13basic_istreamIcNS1_11char_traitsIcEEEERKS3_:
  171|    242|            : alloc_(alloc), stream_ptr_(std::addressof(is)), sbuf_(is.rdbuf()),
  172|    242|              buffer_size_(default_max_buffer_size)
  173|    242|        {
  174|    242|            buffer_ = std::allocator_traits<char_allocator_type>::allocate(alloc_, buffer_size_);
  175|    242|            data_ = buffer_;
  176|    242|        }
_ZN8jsoncons18basic_null_istreamIcEC1Ev:
   54|    242|          : std::basic_istream<CharT>(&nb_)
   55|    242|        {
   56|    242|        }
_ZN8jsoncons18basic_null_istreamIcE11null_bufferC2Ev:
   40|    242|            null_buffer() = default;
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE8is_errorEv:
  276|  5.42M|        {
  277|  5.42M|            return stream_ptr_->bad();  
  278|  5.42M|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4readEPhm:
  343|  26.4M|        {
  344|  26.4M|            std::size_t len = 0;
  345|  26.4M|            if (length_ > 0)
  ------------------
  |  Branch (345:17): [True: 26.4M, False: 1.54k]
  ------------------
  346|  26.4M|            {
  347|  26.4M|                len = (std::min)(length_, length);
  348|  26.4M|                std::memcpy(p, data_, len*sizeof(value_type));
  349|  26.4M|                data_ += len;
  350|  26.4M|                length_ -= len;
  351|  26.4M|                position_ += len;
  352|  26.4M|            }
  353|  26.4M|            if (length - len == 0)
  ------------------
  |  Branch (353:17): [True: 26.4M, False: 1.65k]
  ------------------
  354|  26.4M|            {
  355|  26.4M|                return len;
  356|  26.4M|            }
  357|  1.65k|            else if (length - len < buffer_size_)
  ------------------
  |  Branch (357:22): [True: 1.65k, False: 0]
  ------------------
  358|  1.65k|            {
  359|  1.65k|                fill_buffer();
  360|  1.65k|                if (length_ > 0)
  ------------------
  |  Branch (360:21): [True: 1.55k, False: 106]
  ------------------
  361|  1.55k|                {
  362|  1.55k|                    std::size_t len2 = (std::min)(length_, length-len);
  363|  1.55k|                    std::memcpy(p+len, data_, len2*sizeof(value_type));
  364|  1.55k|                    data_ += len2;
  365|  1.55k|                    length_ -= len2;
  366|  1.55k|                    position_ += len2;
  367|  1.55k|                    len += len2;
  368|  1.55k|                }
  369|  1.65k|                return len;
  370|  1.65k|            }
  371|      0|            else
  372|      0|            {
  373|      0|                if (stream_ptr_->eof())
  ------------------
  |  Branch (373:21): [True: 0, False: 0]
  ------------------
  374|      0|                {
  375|      0|                    length_ = 0;
  376|      0|                    return 0;
  377|      0|                }
  378|      0|                JSONCONS_TRY
  ------------------
  |  |   37|      0|    #define JSONCONS_TRY try
  ------------------
  379|      0|                {
  380|      0|                    std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(p+len), length-len);
  381|      0|                    std::size_t len2 = static_cast<std::size_t>(count);
  382|      0|                    if (len2 < length-len)
  ------------------
  |  Branch (382:25): [True: 0, False: 0]
  ------------------
  383|      0|                    {
  384|      0|                        stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  385|      0|                    }
  386|      0|                    len += len2;
  387|      0|                    position_ += len2;
  388|      0|                    return len;
  389|      0|                }
  390|      0|                JSONCONS_CATCH(const std::exception&)     
  391|      0|                {
  392|      0|                    stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  393|      0|                    return 0;
  394|      0|                }
  395|      0|            }
  396|  26.4M|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE11fill_bufferEv:
  399|  2.16k|        {
  400|  2.16k|            if (stream_ptr_->eof())
  ------------------
  |  Branch (400:17): [True: 134, False: 2.03k]
  ------------------
  401|    134|            {
  402|    134|                length_ = 0;
  403|    134|                return;
  404|    134|            }
  405|       |
  406|  2.03k|            data_ = buffer_;
  407|  2.03k|            JSONCONS_TRY
  ------------------
  |  |   37|  2.03k|    #define JSONCONS_TRY try
  ------------------
  408|  2.03k|            {
  409|  2.03k|                std::streamsize count = sbuf_->sgetn(reinterpret_cast<char_type*>(buffer_), buffer_size_);
  410|  2.03k|                length_ = static_cast<std::size_t>(count);
  411|       |
  412|  2.03k|                if (length_ < buffer_size_)
  ------------------
  |  Branch (412:21): [True: 228, False: 1.80k]
  ------------------
  413|    228|                {
  414|    228|                    stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::eofbit);
  415|    228|                }
  416|  2.03k|            }
  417|  2.03k|            JSONCONS_CATCH(const std::exception&)     
  418|  2.03k|            {
  419|      0|                stream_ptr_->clear(stream_ptr_->rdstate() | std::ios::badbit | std::ios::eofbit);
  420|      0|                length_ = 0;
  421|      0|            }
  422|  2.03k|        }
_ZN8jsoncons13source_readerINS_13stream_sourceIhNSt3__19allocatorIhEEEEE4readINS2_12basic_stringIcNS2_11char_traitsIcEENS3_IcEEEEEENS2_9enable_ifIXaaaasr3std14is_convertibleIhNT_10value_typeEEE5valuesr10ext_traits11has_reserveISE_EE5valuentsr10ext_traits14has_data_exactIPhSE_EE5valueEmE4typeERS5_RSE_m:
  882|  5.51M|        {
  883|  5.51M|            std::size_t unread = length;
  884|       |
  885|  5.51M|            std::size_t n = (std::min)(max_buffer_length, unread);
  886|  10.0M|            while (n > 0 && !source.eof())
  ------------------
  |  Branch (886:20): [True: 4.52M, False: 5.51M]
  |  Branch (886:29): [True: 4.52M, False: 46]
  ------------------
  887|  4.52M|            {
  888|  4.52M|                v.reserve(v.size()+n);
  889|  4.52M|                std::size_t actual = 0;
  890|  21.3M|                while (actual < n)
  ------------------
  |  Branch (890:24): [True: 16.7M, False: 4.52M]
  ------------------
  891|  16.7M|                {
  892|  16.7M|                    typename Source::value_type c{};
  893|  16.7M|                    if (source.read(&c,1) != 1)
  ------------------
  |  Branch (893:25): [True: 37, False: 16.7M]
  ------------------
  894|     37|                    {
  895|     37|                        break;
  896|     37|                    }
  897|  16.7M|                    v.push_back(c);
  898|  16.7M|                    ++actual;
  899|  16.7M|                }
  900|  4.52M|                unread -= actual;
  901|  4.52M|                n = (std::min)(max_buffer_length, unread);
  902|  4.52M|            }
  903|       |
  904|  5.51M|            return length - unread;
  905|  5.51M|        }
_ZNK8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE3eofEv:
  271|  4.52M|        {
  272|  4.52M|            return length_ == 0 && stream_ptr_->eof();
  ------------------
  |  Branch (272:20): [True: 320, False: 4.52M]
  |  Branch (272:36): [True: 46, False: 274]
  ------------------
  273|  4.52M|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE4peekEv:
  311|  9.32M|        {
  312|  9.32M|            if (length_ == 0)
  ------------------
  |  Branch (312:17): [True: 509, False: 9.32M]
  ------------------
  313|    509|            {
  314|    509|                fill_buffer();
  315|    509|            }
  316|  9.32M|            if (length_ > 0)
  ------------------
  |  Branch (316:17): [True: 9.32M, False: 52]
  ------------------
  317|  9.32M|            {
  318|  9.32M|                value_type c = *data_;
  319|  9.32M|                return char_result<value_type>{c, false};
  320|  9.32M|            }
  321|     52|            else
  322|     52|            {
  323|     52|                return char_result<value_type>{0, true};
  324|     52|            }
  325|  9.32M|        }
_ZN8jsoncons13stream_sourceIhNSt3__19allocatorIhEEE6ignoreEm:
  286|  2.07M|        {
  287|  2.07M|            std::size_t len = 0;
  288|  2.07M|            if (length_ > 0)
  ------------------
  |  Branch (288:17): [True: 2.07M, False: 0]
  ------------------
  289|  2.07M|            {
  290|  2.07M|                len = (std::min)(length_, length);
  291|  2.07M|                position_ += len;
  292|  2.07M|                data_ += len;
  293|  2.07M|                length_ -= len;
  294|  2.07M|            }
  295|  2.07M|            while (len < length)
  ------------------
  |  Branch (295:20): [True: 0, False: 2.07M]
  ------------------
  296|      0|            {
  297|      0|                fill_buffer();
  298|      0|                if (length_ == 0)
  ------------------
  |  Branch (298:21): [True: 0, False: 0]
  ------------------
  299|      0|                {
  300|      0|                    break;
  301|      0|                }
  302|      0|                std::size_t len2 = (std::min)(length_, length-len);
  303|      0|                position_ += len2;
  304|      0|                data_ += len2;
  305|      0|                length_ -= len2;
  306|      0|                len += len2;
  307|      0|            }
  308|  2.07M|        }

_ZN8jsoncons6binary13native_to_bigIhNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  11.7M|    {
  128|  11.7M|        T val2 = byte_swap(val);
  129|  11.7M|        uint8_t buf[sizeof(T)];
  130|  11.7M|        std::memcpy(buf, &val2, sizeof(T));
  131|  11.7M|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 11.7M, False: 11.7M]
  ------------------
  132|  11.7M|        {
  133|  11.7M|            *d_first++ = item;
  134|  11.7M|        }
  135|  11.7M|    }
_ZN8jsoncons6binary9byte_swapIhEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  11.7M|    {
   22|  11.7M|        return val;
   23|  11.7M|    }
_ZN8jsoncons6binary13native_to_bigItNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  9.28k|    {
  128|  9.28k|        T val2 = byte_swap(val);
  129|  9.28k|        uint8_t buf[sizeof(T)];
  130|  9.28k|        std::memcpy(buf, &val2, sizeof(T));
  131|  9.28k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 18.5k, False: 9.28k]
  ------------------
  132|  18.5k|        {
  133|  18.5k|            *d_first++ = item;
  134|  18.5k|        }
  135|  9.28k|    }
_ZN8jsoncons6binary9byte_swapItEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  9.28k|    {
   29|  9.28k|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  9.28k|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  9.28k|#      define JSONCONS_BYTE_SWAP_16    __builtin_bswap16
  ------------------
   31|       |    #else
   32|       |        return (static_cast<uint16_t>(val) >> 8) | (static_cast<uint16_t>(val) << 8);
   33|       |    #endif
   34|  9.28k|    }
_ZN8jsoncons6binary13native_to_bigIjNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|    142|    {
  128|    142|        T val2 = byte_swap(val);
  129|    142|        uint8_t buf[sizeof(T)];
  130|    142|        std::memcpy(buf, &val2, sizeof(T));
  131|    142|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 568, False: 142]
  ------------------
  132|    568|        {
  133|    568|            *d_first++ = item;
  134|    568|        }
  135|    142|    }
_ZN8jsoncons6binary9byte_swapIjEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|  49.8k|    {
   40|  49.8k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|  49.8k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|  49.8k|#  define JSONCONS_BYTE_SWAP_32 __builtin_bswap32
  ------------------
   42|       |    #else
   43|       |        uint32_t tmp = ((static_cast<uint32_t>(val) << 8) & 0xff00ff00) | ((static_cast<uint32_t>(val) >> 8) & 0xff00ff);
   44|       |        return (tmp << 16) | (tmp >> 16);
   45|       |    #endif
   46|  49.8k|    }
_ZN8jsoncons6binary9byte_swapImEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  63.8k|    {
   52|  63.8k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  63.8k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  63.8k|#  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|  63.8k|    }
_ZN8jsoncons6binary13native_to_bigIsNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|   543k|    {
  128|   543k|        T val2 = byte_swap(val);
  129|   543k|        uint8_t buf[sizeof(T)];
  130|   543k|        std::memcpy(buf, &val2, sizeof(T));
  131|   543k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 1.08M, False: 543k]
  ------------------
  132|  1.08M|        {
  133|  1.08M|            *d_first++ = item;
  134|  1.08M|        }
  135|   543k|    }
_ZN8jsoncons6binary9byte_swapIsEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm2EES4_E4typeES4_:
   28|  1.33M|    {
   29|  1.33M|    #if defined(JSONCONS_BYTE_SWAP_16)
   30|  1.33M|        return JSONCONS_BYTE_SWAP_16(val);
  ------------------
  |  |  466|  1.33M|#      define JSONCONS_BYTE_SWAP_16    __builtin_bswap16
  ------------------
   31|       |    #else
   32|       |        return (static_cast<uint16_t>(val) >> 8) | (static_cast<uint16_t>(val) << 8);
   33|       |    #endif
   34|  1.33M|    }
_ZN8jsoncons6binary13native_to_bigIiNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  77.7k|    {
  128|  77.7k|        T val2 = byte_swap(val);
  129|  77.7k|        uint8_t buf[sizeof(T)];
  130|  77.7k|        std::memcpy(buf, &val2, sizeof(T));
  131|  77.7k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 311k, False: 77.7k]
  ------------------
  132|   311k|        {
  133|   311k|            *d_first++ = item;
  134|   311k|        }
  135|  77.7k|    }
_ZN8jsoncons6binary9byte_swapIiEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   39|   156k|    {
   40|   156k|    #if defined(JSONCONS_BYTE_SWAP_32)
   41|   156k|        return JSONCONS_BYTE_SWAP_32(val);
  ------------------
  |  |  462|   156k|#  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|   156k|    }
_ZN8jsoncons6binary13native_to_bigIlNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  22.2k|    {
  128|  22.2k|        T val2 = byte_swap(val);
  129|  22.2k|        uint8_t buf[sizeof(T)];
  130|  22.2k|        std::memcpy(buf, &val2, sizeof(T));
  131|  22.2k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 178k, False: 22.2k]
  ------------------
  132|   178k|        {
  133|   178k|            *d_first++ = item;
  134|   178k|        }
  135|  22.2k|    }
_ZN8jsoncons6binary9byte_swapIlEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   51|  45.1k|    {
   52|  45.1k|    #if defined(JSONCONS_BYTE_SWAP_64)
   53|  45.1k|        return JSONCONS_BYTE_SWAP_64(val);
  ------------------
  |  |  461|  45.1k|#  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|  45.1k|    }
_ZN8jsoncons6binary13native_to_bigIaNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  67.6k|    {
  128|  67.6k|        T val2 = byte_swap(val);
  129|  67.6k|        uint8_t buf[sizeof(T)];
  130|  67.6k|        std::memcpy(buf, &val2, sizeof(T));
  131|  67.6k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 67.6k, False: 67.6k]
  ------------------
  132|  67.6k|        {
  133|  67.6k|            *d_first++ = item;
  134|  67.6k|        }
  135|  67.6k|    }
_ZN8jsoncons6binary9byte_swapIaEENSt3__19enable_ifIXaasr3std11is_integralIT_EE5valueeqstS4_Lm1EES4_E4typeES4_:
   21|  1.27M|    {
   22|  1.27M|        return val;
   23|  1.27M|    }
_ZN8jsoncons6binary13native_to_bigIfNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  22.1k|    {
  128|  22.1k|        T val2 = byte_swap(val);
  129|  22.1k|        uint8_t buf[sizeof(T)];
  130|  22.1k|        std::memcpy(buf, &val2, sizeof(T));
  131|  22.1k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 88.6k, False: 22.1k]
  ------------------
  132|  88.6k|        {
  133|  88.6k|            *d_first++ = item;
  134|  88.6k|        }
  135|  22.1k|    }
_ZN8jsoncons6binary9byte_swapIfEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm4EES4_E4typeES4_:
   64|  49.7k|    {
   65|  49.7k|        uint32_t x;
   66|  49.7k|        std::memcpy(&x,&val,sizeof(uint32_t));
   67|  49.7k|        uint32_t y = byte_swap(x);
   68|  49.7k|        T val2;
   69|  49.7k|        std::memcpy(&val2,&y,sizeof(uint32_t));
   70|  49.7k|        return val2;
   71|  49.7k|    }
_ZN8jsoncons6binary13native_to_bigIdNSt3__120back_insert_iteratorINS_10bytes_sinkINS2_6vectorIhNS2_9allocatorIhEEEEvEEEENS_6detail6endianEEENS2_9enable_ifIXeqsrT1_6nativesrSE_6littleEvE4typeET_T0_:
  127|  34.6k|    {
  128|  34.6k|        T val2 = byte_swap(val);
  129|  34.6k|        uint8_t buf[sizeof(T)];
  130|  34.6k|        std::memcpy(buf, &val2, sizeof(T));
  131|  34.6k|        for (auto item : buf)
  ------------------
  |  Branch (131:24): [True: 276k, False: 34.6k]
  ------------------
  132|   276k|        {
  133|   276k|            *d_first++ = item;
  134|   276k|        }
  135|  34.6k|    }
_ZN8jsoncons6binary9byte_swapIdEENSt3__19enable_ifIXaasr3std17is_floating_pointIT_EE5valueeqstS4_Lm8EES4_E4typeES4_:
   76|  63.8k|    {
   77|  63.8k|        uint64_t x;
   78|  63.8k|        std::memcpy(&x,&val,sizeof(uint64_t));
   79|  63.8k|        uint64_t y = byte_swap(x);
   80|  63.8k|        T val2;
   81|  63.8k|        std::memcpy(&val2,&y,sizeof(uint64_t));
   82|  63.8k|        return val2;
   83|  63.8k|    }
_ZN8jsoncons6binary13big_to_nativeIaNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  1.20M|    {
  183|  1.20M|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 1.20M]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  1.20M|        T val;
  188|  1.20M|        std::memcpy(&val,first,sizeof(T));
  189|  1.20M|        return byte_swap(val);
  190|  1.20M|    }
_ZN8jsoncons6binary13big_to_nativeIsNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|   795k|    {
  183|   795k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 795k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|   795k|        T val;
  188|   795k|        std::memcpy(&val,first,sizeof(T));
  189|   795k|        return byte_swap(val);
  190|   795k|    }
_ZN8jsoncons6binary13big_to_nativeIiNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  78.2k|    {
  183|  78.2k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 78.2k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  78.2k|        T val;
  188|  78.2k|        std::memcpy(&val,first,sizeof(T));
  189|  78.2k|        return byte_swap(val);
  190|  78.2k|    }
_ZN8jsoncons6binary13big_to_nativeIlNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  22.8k|    {
  183|  22.8k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 22.8k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  22.8k|        T val;
  188|  22.8k|        std::memcpy(&val,first,sizeof(T));
  189|  22.8k|        return byte_swap(val);
  190|  22.8k|    }
_ZN8jsoncons6binary13big_to_nativeIfNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  27.5k|    {
  183|  27.5k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 27.5k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  27.5k|        T val;
  188|  27.5k|        std::memcpy(&val,first,sizeof(T));
  189|  27.5k|        return byte_swap(val);
  190|  27.5k|    }
_ZN8jsoncons6binary13big_to_nativeIdNS_6detail6endianEEENSt3__19enable_ifIXeqsrT0_6nativesrS6_6littleET_E4typeEPKhm:
  182|  29.1k|    {
  183|  29.1k|        if (sizeof(T) > count)
  ------------------
  |  Branch (183:13): [True: 0, False: 29.1k]
  ------------------
  184|      0|        {
  185|      0|            return T{};
  186|      0|        }
  187|  29.1k|        T val;
  188|  29.1k|        std::memcpy(&val,first,sizeof(T));
  189|  29.1k|        return byte_swap(val);
  190|  29.1k|    }

_ZN8jsoncons9is_base10IcEEbPKT_m:
  164|    783|{
  165|    783|    integer_chars_state state = integer_chars_state::initial;
  166|       |
  167|    783|    const CharT* end = s + length; 
  168|  1.52k|    for (;s < end; ++s)
  ------------------
  |  Branch (168:11): [True: 1.32k, False: 198]
  ------------------
  169|  1.32k|    {
  170|  1.32k|        switch(state)
  171|  1.32k|        {
  172|    783|            case integer_chars_state::initial:
  ------------------
  |  Branch (172:13): [True: 783, False: 546]
  ------------------
  173|    783|            {
  174|    783|                switch(*s)
  175|    783|                {
  176|     88|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (176:21): [True: 21, False: 762]
  |  Branch (176:30): [True: 12, False: 771]
  |  Branch (176:39): [True: 7, False: 776]
  |  Branch (176:48): [True: 7, False: 776]
  |  Branch (176:57): [True: 7, False: 776]
  |  Branch (176:66): [True: 2, False: 781]
  |  Branch (176:75): [True: 32, False: 751]
  |  Branch (176:84): [True: 0, False: 783]
  |  Branch (176:93): [True: 0, False: 783]
  |  Branch (176:103): [True: 0, False: 783]
  ------------------
  177|     88|                        state = integer_chars_state::decimal;
  178|     88|                        break;
  179|    441|                    case '-':
  ------------------
  |  Branch (179:21): [True: 441, False: 342]
  ------------------
  180|    441|                        state = integer_chars_state::minus;
  181|    441|                        break;
  182|    254|                    default:
  ------------------
  |  Branch (182:21): [True: 254, False: 529]
  ------------------
  183|    254|                        return false;
  184|    783|                }
  185|    529|                break;
  186|    783|            }
  187|    529|            case integer_chars_state::minus:
  ------------------
  |  Branch (187:13): [True: 441, False: 888]
  ------------------
  188|    441|            {
  189|    441|                switch(*s)
  190|    441|                {
  191|    189|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (191:21): [True: 22, False: 419]
  |  Branch (191:30): [True: 5, False: 436]
  |  Branch (191:39): [True: 0, False: 441]
  |  Branch (191:48): [True: 0, False: 441]
  |  Branch (191:57): [True: 0, False: 441]
  |  Branch (191:66): [True: 7, False: 434]
  |  Branch (191:75): [True: 0, False: 441]
  |  Branch (191:84): [True: 0, False: 441]
  |  Branch (191:93): [True: 12, False: 429]
  |  Branch (191:103): [True: 143, False: 298]
  ------------------
  192|    189|                        state = integer_chars_state::decimal;
  193|    189|                        break;
  194|    252|                    default:
  ------------------
  |  Branch (194:21): [True: 252, False: 189]
  ------------------
  195|    252|                        return false;
  196|    441|                }
  197|    189|                break;
  198|    441|            }
  199|    189|            case integer_chars_state::decimal:
  ------------------
  |  Branch (199:13): [True: 105, False: 1.22k]
  ------------------
  200|    105|            {
  201|    105|                switch(*s)
  202|    105|                {
  203|     26|                    case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8': case '9':
  ------------------
  |  Branch (203:21): [True: 7, False: 98]
  |  Branch (203:30): [True: 10, False: 95]
  |  Branch (203:39): [True: 0, False: 105]
  |  Branch (203:48): [True: 8, False: 97]
  |  Branch (203:57): [True: 0, False: 105]
  |  Branch (203:66): [True: 1, False: 104]
  |  Branch (203:75): [True: 0, False: 105]
  |  Branch (203:84): [True: 0, False: 105]
  |  Branch (203:93): [True: 0, False: 105]
  |  Branch (203:103): [True: 0, False: 105]
  ------------------
  204|     26|                        break;
  205|     79|                    default:
  ------------------
  |  Branch (205:21): [True: 79, False: 26]
  ------------------
  206|     79|                        return false;
  207|    105|                }
  208|     26|                break;
  209|    105|            }
  210|     26|            default:
  ------------------
  |  Branch (210:13): [True: 0, False: 1.32k]
  ------------------
  211|      0|                break;
  212|  1.32k|        }
  213|  1.32k|    }
  214|    198|    return state == integer_chars_state::decimal ? true : false;
  ------------------
  |  Branch (214:12): [True: 198, False: 0]
  ------------------
  215|    783|}

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

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

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

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

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

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

